=================================================================== RCS file: /cvs/mandoc/Attic/mdocml.c,v retrieving revision 1.27 retrieving revision 1.32 diff -u -p -r1.27 -r1.32 --- mandoc/Attic/mdocml.c 2008/12/28 23:07:04 1.27 +++ mandoc/Attic/mdocml.c 2009/01/03 18:38:39 1.32 @@ -1,4 +1,4 @@ -/* $Id: mdocml.c,v 1.27 2008/12/28 23:07:04 kristaps Exp $ */ +/* $Id: mdocml.c,v 1.32 2009/01/03 18:38:39 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -205,8 +205,6 @@ print_node(const struct mdoc_node *n, int indent) case (MDOC_HEAD): p = mdoc_macronames[n->data.head.tok]; t = "block-head"; - params = n->data.head.args; - sz = n->data.head.sz; break; case (MDOC_ELEM): assert(NULL == n->child); @@ -339,6 +337,9 @@ msg_err(void *arg, int tok, int col, enum mdoc_err typ case (ERR_SYNTAX_ARGFORM): fmt = "syntax: macro `%s' arguments malformed"; break; + case (ERR_SYNTAX_NOPUNCT): + fmt = "syntax: macro `%s' doesn't understand punctuation"; + break; case (ERR_SYNTAX_ARG): fmt = "syntax: unknown argument for macro `%s'"; break; @@ -364,9 +365,18 @@ msg_err(void *arg, int tok, int col, enum mdoc_err typ case (ERR_SEC_NPROLOGUE): fmt = "macro `%s' called outside of prologue"; break; + case (ERR_ARGS_EQ0): + fmt = "macro `%s' expects zero arguments"; + break; + case (ERR_ARGS_EQ1): + fmt = "macro `%s' expects one argument"; + break; case (ERR_ARGS_GE1): fmt = "macro `%s' expects one or more arguments"; break; + case (ERR_ARGS_LE2): + fmt = "macro `%s' expects two or fewer arguments"; + break; case (ERR_ARGS_MANY): fmt = "macro `%s' has too many arguments"; break; @@ -388,6 +398,18 @@ msg_err(void *arg, int tok, int col, enum mdoc_err typ case (ERR_SYNTAX_ARGMANY): lit = "syntax: too many values for macro argument"; break; + case (ERR_SYNTAX_CHILDHEAD): + lit = "syntax: expected only block-header section"; + break; + case (ERR_SYNTAX_CHILDBODY): + lit = "syntax: expected only a block-body section"; + break; + case (ERR_SYNTAX_EMPTYHEAD): + lit = "syntax: block-header section may not be empty"; + break; + case (ERR_SYNTAX_EMPTYBODY): + lit = "syntax: block-body section may not be empty"; + break; default: abort(); /* NOTREACHED */ @@ -476,6 +498,9 @@ msg_warn(void *arg, int tok, int col, enum mdoc_warn t case (WARN_SYNTAX_ARGLIKE): lit = "syntax: argument-like value"; break; + case (WARN_SYNTAX_EMPTYBODY): + lit = "syntax: empty block-body section"; + break; case (WARN_SEC_OO): lit = "section is out of conventional order"; break; @@ -487,6 +512,9 @@ msg_warn(void *arg, int tok, int col, enum mdoc_warn t break; case (WARN_IGN_AFTER_BLK): fmt = "ignore: macro `%s' ignored after block macro"; + break; + case (WARN_IGN_OBSOLETE): + fmt = "ignore: macro `%s' is obsolete"; break; case (WARN_IGN_BEFORE_BLK): fmt = "ignore: macro before block macro `%s' ignored";