Lines Matching defs:man
34 #include "man.h"
39 #define CHKARGS struct roff_man *man, struct roff_node *n
100 man_node_validate(struct roff_man *man)
105 n = man->last;
106 man->last = man->last->child;
107 while (man->last != NULL) {
108 man_node_validate(man);
109 if (man->last == n)
110 man->last = man->last->child;
112 man->last = man->last->next;
115 man->last = n;
116 man->next = ROFF_NEXT_SIBLING;
119 check_text(man, n);
122 check_root(man, n);
130 (*cp)(man, n);
131 if (man->last == n)
132 man_state(man, n);
141 assert((man->flags & (MAN_BLINE | MAN_ELINE)) == 0);
143 if (NULL == man->first->child)
144 mandoc_msg(MANDOCERR_DOC_EMPTY, man->parse,
147 man->meta.hasbody = 1;
149 if (NULL == man->meta.title) {
150 mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse,
158 man->meta.title = mandoc_strdup("");
159 man->meta.msec = mandoc_strdup("");
160 man->meta.date = man->quick ? mandoc_strdup("") :
161 mandoc_normdate(man->parse, NULL, n->line, n->pos);
170 if (MAN_LITERAL & man->flags)
175 mandoc_msg(MANDOCERR_FI_TAB, man->parse,
184 mandoc_msg(MANDOCERR_OP_EMPTY, man->parse,
188 mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
198 mandoc_vmsg(MANDOCERR_UR_NOHEAD, man->parse,
200 check_part(man, n);
238 mandoc_vmsg(MANDOCERR_FT_BAD, man->parse,
249 mandoc_msg(MANDOCERR_BLK_EMPTY, man->parse,
260 roff_node_delete(man, n);
265 man->parse, n->line, n->pos,
271 man->parse, n->line, n->pos,
288 roff_node_delete(man, n);
293 man->parse, n->line, n->pos,
307 free(man->meta.title);
308 free(man->meta.vol);
309 free(man->meta.os);
310 free(man->meta.msec);
311 free(man->meta.date);
313 man->meta.title = man->meta.vol = man->meta.date =
314 man->meta.msec = man->meta.os = NULL;
327 man->parse, n->line,
333 man->meta.title = mandoc_strdup(n->string);
335 man->meta.title = mandoc_strdup("");
336 mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse,
345 man->meta.msec = mandoc_strdup(n->string);
347 man->meta.msec = mandoc_strdup("");
348 mandoc_vmsg(MANDOCERR_MSEC_MISSING, man->parse,
349 nb->line, nb->pos, "TH %s", man->meta.title);
357 man->meta.date = man->quick ?
359 mandoc_normdate(man->parse, n->string,
362 man->meta.date = mandoc_strdup("");
363 mandoc_msg(MANDOCERR_DATE_MISSING, man->parse,
371 man->meta.os = mandoc_strdup(n->string);
372 else if (man->defos != NULL)
373 man->meta.os = mandoc_strdup(man->defos);
379 man->meta.vol = mandoc_strdup(n->string);
380 else if ('\0' != man->meta.msec[0] &&
381 (NULL != (p = mandoc_a2msec(man->meta.msec))))
382 man->meta.vol = mandoc_strdup(p);
385 mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
392 roff_node_delete(man, man->last);
428 free(man->meta.os);
429 man->meta.os = mandoc_strdup(p);
467 free(man->meta.os);
468 man->meta.os = mandoc_strdup(p);
481 mandoc_vmsg(MANDOCERR_PAR_SKIP, man->parse, n->line, n->pos,
490 roff_node_delete(man, n);