Lines Matching defs:roff

1 /*	$Id: roff.c,v 1.284 2016/01/08 17:48:10 schwarze Exp $ */
31 #include "roff.h"
314 struct roff {
349 #define ROFF_ARGS struct roff *r, /* parse ctx */ \
381 static void roffnode_cleanscope(struct roff *);
382 static void roffnode_pop(struct roff *);
383 static void roffnode_push(struct roff *, enum rofft,
391 static void roff_ccond(struct roff *, int, int);
396 static enum rofferr roff_eqndelim(struct roff *, struct buf *, int);
397 static int roff_evalcond(struct roff *r, int, char *, int *);
398 static int roff_evalnum(struct roff *, int,
400 static int roff_evalpar(struct roff *, int,
403 static void roff_free1(struct roff *);
406 static size_t roff_getname(struct roff *, char **, int, int);
409 static int roff_getregn(const struct roff *,
411 static int roff_getregro(const struct roff *,
413 static const char *roff_getstrn(const struct roff *,
415 static int roff_hasregn(const struct roff *,
423 static enum rofft roff_parse(struct roff *, char *, int *,
426 static enum rofferr roff_res(struct roff *, struct buf *, int, int);
429 static void roff_setstr(struct roff *,
767 * Look up a roff token by its name. Returns ROFF_MAX if no macro by
800 * Pop the current node off of the stack of roff instructions currently
804 roffnode_pop(struct roff *r)
818 * Push a roff node onto the instruction stack. This must later be
822 roffnode_push(struct roff *r, enum rofft tok, const char *name,
839 /* --- roff parser state data management ---------------------------------- */
842 roff_free1(struct roff *r)
883 roff_reset(struct roff *r)
892 roff_free(struct roff *r)
899 struct roff *
902 struct roff *r;
904 r = mandoc_calloc(1, sizeof(struct roff));
964 roff_man_alloc(struct roff *roff, struct mparse *parse,
971 man->roff = roff;
1060 n->string = roff_strdup(man->roff, word);
1076 addstr = roff_strdup(man->roff, word);
1262 /* --- main functions of the roff parser ---------------------------------- */
1270 roff_res(struct roff *r, struct buf *buf, int ln, int pos)
1521 roff_parseln(struct roff *r, int ln, struct buf *buf, int *offs)
1616 * This is neither a roff request nor a user-defined macro.
1623 /* Execute a roff request or a user defined macro. */
1630 roff_endparse(struct roff *r)
1652 * Parse a roff node's type from the input buffer. This must be in the
1656 roff_parse(struct roff *r, char *buf, int *pos, int ln, int ppos)
1723 roffnode_cleanscope(struct roff *r)
1734 roff_ccond(struct roff *r, int ln, int ppos)
2108 roff_evalcond(struct roff *r, int ln, char *v, int *pos)
2362 roff_evalpar(struct roff *r, int ln,
2392 roff_evalnum(struct roff *r, int ln, const char *v,
2502 roff_setreg(struct roff *r, const char *name, int val, char sign)
2537 roff_getregro(const struct roff *r, const char *name)
2561 roff_getreg(const struct roff *r, const char *name)
2580 roff_getregn(const struct roff *r, const char *name, size_t len)
2600 roff_hasregn(const struct roff *r, const char *name, size_t len)
2687 /* --- handler functions for roff requests -------------------------------- */
2799 roff_eqndelim(struct roff *r, struct buf *buf, int pos)
3163 roff_getname(struct roff *r, char **cpp, int ln, int pos)
3208 roff_setstr(struct roff *r, const char *name, const char *string,
3272 * Rudimentary roff copy mode:
3289 roff_getstrn(const struct roff *r, const char *name, size_t len)
3323 roff_span(const struct roff *r)
3330 roff_eqn(const struct roff *r)
3342 roff_strdup(const struct roff *r, const char *p)
3429 roff_getformat(const struct roff *r)
3446 roff_getcontrol(const struct roff *r, const char *cp, int *ppos)