Lines Matching defs:man
31 #include "man.h"
37 #define CHKARGS struct man *man, struct man_node *n
100 man_valid_post(struct man *man)
105 n = man->last;
112 check_text(man, n);
115 check_root(man, n);
124 (*cp)(man, n);
133 assert((man->flags & (MAN_BLINE | MAN_ELINE)) == 0);
135 if (NULL == man->first->child)
136 mandoc_msg(MANDOCERR_DOC_EMPTY, man->parse,
139 man->meta.hasbody = 1;
141 if (NULL == man->meta.title) {
142 mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse,
150 man->meta.title = mandoc_strdup("");
151 man->meta.msec = mandoc_strdup("");
152 man->meta.date = man->quick ? mandoc_strdup("") :
153 mandoc_normdate(man->parse, NULL, n->line, n->pos);
162 if (MAN_LITERAL & man->flags)
167 mandoc_msg(MANDOCERR_FI_TAB, man->parse,
176 mandoc_msg(MANDOCERR_OP_EMPTY, man->parse,
180 mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
190 mandoc_vmsg(MANDOCERR_UR_NOHEAD, man->parse,
192 check_part(man, n);
236 mandoc_vmsg(MANDOCERR_FT_BAD, man->parse,
247 mandoc_msg(MANDOCERR_BLK_EMPTY, man->parse,
258 man_node_delete(man, n);
263 man->parse, n->line, n->pos,
269 man->parse, n->line, n->pos,
286 man_node_delete(man, n);
291 man->parse, n->line, n->pos,
305 free(man->meta.title);
306 free(man->meta.vol);
307 free(man->meta.source);
308 free(man->meta.msec);
309 free(man->meta.date);
311 man->meta.title = man->meta.vol = man->meta.date =
312 man->meta.msec = man->meta.source = NULL;
325 man->parse, n->line,
331 man->meta.title = mandoc_strdup(n->string);
333 man->meta.title = mandoc_strdup("");
334 mandoc_msg(MANDOCERR_TH_NOTITLE, man->parse,
343 man->meta.msec = mandoc_strdup(n->string);
345 man->meta.msec = mandoc_strdup("");
346 mandoc_vmsg(MANDOCERR_MSEC_MISSING, man->parse,
347 nb->line, nb->pos, "TH %s", man->meta.title);
355 man->meta.date = man->quick ?
357 mandoc_normdate(man->parse, n->string,
360 man->meta.date = mandoc_strdup("");
361 mandoc_msg(MANDOCERR_DATE_MISSING, man->parse,
369 man->meta.source = mandoc_strdup(n->string);
370 else if (man->defos != NULL)
371 man->meta.source = mandoc_strdup(man->defos);
377 man->meta.vol = mandoc_strdup(n->string);
378 else if ('\0' != man->meta.msec[0] &&
379 (NULL != (p = mandoc_a2msec(man->meta.msec))))
380 man->meta.vol = mandoc_strdup(p);
383 mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
390 man_node_delete(man, man->last);
397 if (man->flags & MAN_LITERAL)
398 mandoc_msg(MANDOCERR_NF_SKIP, man->parse,
401 man->flags |= MAN_LITERAL;
408 if ( ! (MAN_LITERAL & man->flags))
409 mandoc_msg(MANDOCERR_FI_SKIP, man->parse,
412 man->flags &= ~MAN_LITERAL;
448 free(man->meta.source);
449 man->meta.source = mandoc_strdup(p);
485 free(man->meta.source);
486 man->meta.source = mandoc_strdup(p);
500 mandoc_vmsg(MANDOCERR_PAR_SKIP, man->parse, n->line, n->pos,
509 man_node_delete(man, n);