• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/mandoc/

Lines Matching refs:mdoc

1 /*	$Id: mdoc.c,v 1.274 2018/12/31 07:46:07 schwarze Exp $ */
33 #include "mdoc.h"
60 mdoc_parseln(struct roff_man *mdoc, int ln, char *buf, int offs)
63 if (mdoc->last->type != ROFFT_EQN || ln > mdoc->last->line)
64 mdoc->flags |= MDOC_NEWLINE;
72 if (roff_getreg(mdoc->roff, "nS"))
73 mdoc->flags |= MDOC_SYNOPSIS;
75 mdoc->flags &= ~MDOC_SYNOPSIS;
77 return roff_getcontrol(mdoc->roff, buf, &offs) ?
78 mdoc_pmacro(mdoc, ln, buf, offs) :
79 mdoc_ptext(mdoc, ln, buf, offs);
83 mdoc_tail_alloc(struct roff_man *mdoc, int line, int pos, enum roff_tok tok)
87 p = roff_node_alloc(mdoc, line, pos, ROFFT_TAIL, tok);
88 roff_node_append(mdoc, p);
89 mdoc->next = ROFF_NEXT_CHILD;
93 mdoc_endbody_alloc(struct roff_man *mdoc, int line, int pos,
100 p = roff_node_alloc(mdoc, line, pos, ROFFT_BODY, tok);
104 roff_node_append(mdoc, p);
105 mdoc->next = ROFF_NEXT_SIBLING;
110 mdoc_block_alloc(struct roff_man *mdoc, int line, int pos,
115 p = roff_node_alloc(mdoc, line, pos, ROFFT_BLOCK, tok);
131 roff_node_append(mdoc, p);
132 mdoc->next = ROFF_NEXT_CHILD;
137 mdoc_elem_alloc(struct roff_man *mdoc, int line, int pos,
142 p = roff_node_alloc(mdoc, line, pos, ROFFT_ELEM, tok);
154 roff_node_append(mdoc, p);
155 mdoc->next = ROFF_NEXT_CHILD;
163 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, int offs)
169 n = mdoc->last;
174 * of such a list, intermixed with non-It mdoc macros and with
182 mdoc->flags |= MDOC_FREECOL;
183 (*mdoc_macro(MDOC_It)->fp)(mdoc, MDOC_It,
213 if (mdoc->flags & ROFF_NOFILL)
238 if (buf[offs] == '\0' && (mdoc->flags & ROFF_NOFILL) == 0) {
239 switch (mdoc->last->type) {
241 sp = mdoc->last->string;
255 roff_elem_alloc(mdoc, line, offs, ROFF_sp);
256 mdoc->last->flags |= NODE_VALID | NODE_ENDED;
257 mdoc->next = ROFF_NEXT_SIBLING;
261 roff_word_alloc(mdoc, line, offs, buf+offs);
263 if (mdoc->flags & ROFF_NOFILL)
275 mdoc->last->flags |= NODE_EOS;
305 mdoc_pmacro(struct roff_man *mdoc, int ln, char *buf, int offs)
320 tok = roffhash_find(mdoc->mdocmac, buf + sv, sz);
359 n = mdoc->last;
361 (*mdoc_macro(tok)->fp)(mdoc, tok, ln, sv, &offs, buf);
376 mdoc->flags |= MDOC_FREECOL;
377 (*mdoc_macro(MDOC_It)->fp)(mdoc, MDOC_It, ln, sv, &sv, buf);
383 (*mdoc_macro(tok)->fp)(mdoc, tok, ln, sv, &offs, buf);
387 if (mdoc->quick && MDOC_Sh == tok &&
388 SEC_NAME != mdoc->last->sec)