-/* $Id: demandoc.c,v 1.21 2015/10/06 18:32:19 schwarze Exp $ */
+/* $Id: demandoc.c,v 1.24 2015/10/22 22:06:43 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
main(int argc, char *argv[])
{
struct mparse *mp;
- struct mchars *mchars;
int ch, fd, i, list;
extern int optind;
argc -= optind;
argv += optind;
- mchars = mchars_alloc();
- mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, mchars, NULL);
+ mchars_alloc();
+ mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, NULL);
assert(mp);
if (argc < 1)
}
mparse_free(mp);
- mchars_free(mchars);
+ mchars_free();
return (int)MANDOCLEVEL_OK;
}
if (man == NULL)
return;
- if (man->macroset == MACROSET_MDOC)
+ if (man->macroset == MACROSET_MDOC) {
+ mdoc_validate(man);
pmdoc(man->first->child, &line, &col, list);
- else
+ } else {
+ man_validate(man);
pman(man->first->child, &line, &col, list);
+ }
if ( ! list)
putchar('\n');