Lines Matching defs:roff
1 /* $Id: roff.c,v 1.263 2015/02/21 14:46:58 schwarze Exp $ */
313 struct roff {
348 #define ROFF_ARGS struct roff *r, /* parse ctx */ \
378 static void roffnode_cleanscope(struct roff *);
379 static void roffnode_pop(struct roff *);
380 static void roffnode_push(struct roff *, enum rofft,
388 static void roff_ccond(struct roff *, int, int);
393 static enum rofferr roff_eqndelim(struct roff *, struct buf *, int);
394 static int roff_evalcond(struct roff *r, int,
396 static int roff_evalnum(struct roff *, int,
398 static int roff_evalpar(struct roff *, int,
401 static void roff_free1(struct roff *);
404 static size_t roff_getname(struct roff *, char **, int, int);
407 static int roff_getregn(const struct roff *,
410 static const char *roff_getstrn(const struct roff *,
416 static enum rofft roff_parse(struct roff *, char *, int *,
419 static enum rofferr roff_res(struct roff *, struct buf *, int, int);
422 static void roff_setstr(struct roff *,
756 * Look up a roff token by its name. Returns ROFF_MAX if no macro by
787 * Pop the current node off of the stack of roff instructions currently
791 roffnode_pop(struct roff *r)
805 * Push a roff node onto the instruction stack. This must later be
809 roffnode_push(struct roff *r, enum rofft tok, const char *name,
827 roff_free1(struct roff *r)
868 roff_reset(struct roff *r)
877 roff_free(struct roff *r)
884 struct roff *
887 struct roff *r;
889 r = mandoc_calloc(1, sizeof(struct roff));
907 roff_res(struct roff *r, struct buf *buf, int ln, int pos)
1159 roff_parseln(struct roff *r, int ln, struct buf *buf, int *offs)
1254 * This is neither a roff request nor a user-defined macro.
1261 /* Execute a roff request or a user defined macro. */
1268 roff_endparse(struct roff *r)
1290 * Parse a roff node's type from the input buffer. This must be in the
1294 roff_parse(struct roff *r, char *buf, int *pos, int ln, int ppos)
1363 roffnode_cleanscope(struct roff *r)
1374 roff_ccond(struct roff *r, int ln, int ppos)
1750 roff_evalcond(struct roff *r, int ln, const char *v, int *pos)
2008 roff_evalpar(struct roff *r, int ln,
2038 roff_evalnum(struct roff *r, int ln, const char *v,
2146 roff_setreg(struct roff *r, const char *name, int val, char sign)
2203 roff_getreg(const struct roff *r, const char *name)
2222 roff_getregn(const struct roff *r, const char *name, size_t len)
2419 roff_eqndelim(struct roff *r, struct buf *buf, int pos)
2764 roff_getname(struct roff *r, char **cpp, int ln, int pos)
2809 roff_setstr(struct roff *r, const char *name, const char *string,
2873 * Rudimentary roff copy mode:
2890 roff_getstrn(const struct roff *r, const char *name, size_t len)
2922 roff_span(const struct roff *r)
2929 roff_eqn(const struct roff *r)
2941 roff_strdup(const struct roff *r, const char *p)
3028 roff_getformat(const struct roff *r)
3045 roff_getcontrol(const struct roff *r, const char *cp, int *ppos)