Lines Matching refs:mdoc
62 mdoc_parseln(struct roff_man *mdoc, int ln, char *buf, int offs) in mdoc_parseln() argument
65 if (mdoc->last->type != ROFFT_EQN || ln > mdoc->last->line) in mdoc_parseln()
66 mdoc->flags |= MDOC_NEWLINE; in mdoc_parseln()
74 if (roff_getreg(mdoc->roff, "nS")) in mdoc_parseln()
75 mdoc->flags |= MDOC_SYNOPSIS; in mdoc_parseln()
77 mdoc->flags &= ~MDOC_SYNOPSIS; in mdoc_parseln()
79 return roff_getcontrol(mdoc->roff, buf, &offs) ? in mdoc_parseln()
80 mdoc_pmacro(mdoc, ln, buf, offs) : in mdoc_parseln()
81 mdoc_ptext(mdoc, ln, buf, offs); in mdoc_parseln()
85 mdoc_tail_alloc(struct roff_man *mdoc, int line, int pos, enum roff_tok tok) in mdoc_tail_alloc() argument
89 p = roff_node_alloc(mdoc, line, pos, ROFFT_TAIL, tok); in mdoc_tail_alloc()
90 roff_node_append(mdoc, p); in mdoc_tail_alloc()
91 mdoc->next = ROFF_NEXT_CHILD; in mdoc_tail_alloc()
95 mdoc_endbody_alloc(struct roff_man *mdoc, int line, int pos, in mdoc_endbody_alloc() argument
102 p = roff_node_alloc(mdoc, line, pos, ROFFT_BODY, tok); in mdoc_endbody_alloc()
106 roff_node_append(mdoc, p); in mdoc_endbody_alloc()
107 mdoc->next = ROFF_NEXT_SIBLING; in mdoc_endbody_alloc()
112 mdoc_block_alloc(struct roff_man *mdoc, int line, int pos, in mdoc_block_alloc() argument
117 p = roff_node_alloc(mdoc, line, pos, ROFFT_BLOCK, tok); in mdoc_block_alloc()
133 roff_node_append(mdoc, p); in mdoc_block_alloc()
134 mdoc->next = ROFF_NEXT_CHILD; in mdoc_block_alloc()
139 mdoc_elem_alloc(struct roff_man *mdoc, int line, int pos, in mdoc_elem_alloc() argument
144 p = roff_node_alloc(mdoc, line, pos, ROFFT_ELEM, tok); in mdoc_elem_alloc()
156 roff_node_append(mdoc, p); in mdoc_elem_alloc()
157 mdoc->next = ROFF_NEXT_CHILD; in mdoc_elem_alloc()
165 mdoc_ptext(struct roff_man *mdoc, int line, char *buf, int offs) in mdoc_ptext() argument
171 n = mdoc->last; in mdoc_ptext()
184 mdoc->flags |= MDOC_FREECOL; in mdoc_ptext()
185 (*mdoc_macro(MDOC_It)->fp)(mdoc, MDOC_It, in mdoc_ptext()
215 if (mdoc->flags & ROFF_NOFILL) in mdoc_ptext()
240 if (buf[offs] == '\0' && (mdoc->flags & ROFF_NOFILL) == 0) { in mdoc_ptext()
241 switch (mdoc->last->type) { in mdoc_ptext()
243 sp = mdoc->last->string; in mdoc_ptext()
257 roff_elem_alloc(mdoc, line, offs, ROFF_sp); in mdoc_ptext()
258 mdoc->last->flags |= NODE_VALID | NODE_ENDED; in mdoc_ptext()
259 mdoc->next = ROFF_NEXT_SIBLING; in mdoc_ptext()
263 roff_word_alloc(mdoc, line, offs, buf+offs); in mdoc_ptext()
265 if (mdoc->flags & ROFF_NOFILL) in mdoc_ptext()
277 mdoc->last->flags |= NODE_EOS; in mdoc_ptext()
307 mdoc_pmacro(struct roff_man *mdoc, int ln, char *buf, int offs) in mdoc_pmacro() argument
322 tok = roffhash_find(mdoc->mdocmac, buf + sv, sz); in mdoc_pmacro()
361 n = mdoc->last; in mdoc_pmacro()
364 (*mdoc_macro(tok)->fp)(mdoc, tok, ln, sv, &offs, buf); in mdoc_pmacro()
379 mdoc->flags |= MDOC_FREECOL; in mdoc_pmacro()
380 (*mdoc_macro(MDOC_It)->fp)(mdoc, MDOC_It, ln, sv, &sv, buf); in mdoc_pmacro()
386 (*mdoc_macro(tok)->fp)(mdoc, tok, ln, sv, &offs, buf); in mdoc_pmacro()
390 if (mdoc->quick && MDOC_Sh == tok && in mdoc_pmacro()
391 SEC_NAME != mdoc->last->sec) in mdoc_pmacro()