diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-30 12:58:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-30 12:58:21 +0000 |
commit | 1825ddd5edbb59f71fa3505747e772b6e10bc773 (patch) | |
tree | 5b7e05a4f77ea568caa3c27f37a682c551f21990 | |
parent | 146dcfc953f48acd462342b3dfc86200e3e0a195 (diff) | |
download | mandoc-1825ddd5edbb59f71fa3505747e772b6e10bc773.tar.gz |
better name and wording for the last two non-generic errors
-rw-r--r-- | mandoc.h | 6 | ||||
-rw-r--r-- | mdoc_validate.c | 3 | ||||
-rw-r--r-- | read.c | 6 | ||||
-rw-r--r-- | roff.c | 2 |
4 files changed, 9 insertions, 8 deletions
@@ -149,11 +149,11 @@ enum mandocerr { /* related to request and macro arguments */ MANDOCERR_NAMESC, /* escaped character not allowed in a name */ MANDOCERR_ARGCOUNT, /* argument count wrong */ + MANDOCERR_BL_NOTYPE, /* missing list type, using -item */ MANDOCERR_NM_NONAME, /* missing manual name, using "" */ + MANDOCERR_OS_UNAME, /* uname(3) system call failed, using UNKNOWN */ MANDOCERR_ST_BAD, /* unknown standard specifier: standard */ - MANDOCERR_UNAME, /* uname(3) system call failed */ - MANDOCERR_NUMERIC, /* request requires a numeric argument */ - MANDOCERR_BL_NOTYPE, /* missing list type, using -item */ + MANDOCERR_IT_NONUM, /* skipping request without numeric argument */ MANDOCERR_ARG_SKIP, /* skipping all arguments: macro args */ MANDOCERR_ARG_EXCESS, /* skipping excess arguments: macro ... args */ diff --git a/mdoc_validate.c b/mdoc_validate.c index 37236293..e5d10bc0 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -2376,7 +2376,8 @@ post_os(POST_ARGS) #else /*!OSNAME */ if (NULL == defbuf) { if (-1 == uname(&utsname)) { - mdoc_nmsg(mdoc, n, MANDOCERR_UNAME); + mandoc_msg(MANDOCERR_OS_UNAME, mdoc->parse, + n->line, n->pos, "Os"); defbuf = mandoc_strdup("UNKNOWN"); } else mandoc_asprintf(&defbuf, "%s %s", @@ -193,11 +193,11 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { /* related to request and macro arguments */ "escaped character not allowed in a name", "argument count wrong", + "missing list type, using -item", "missing manual name, using \"\"", + "uname(3) system call failed, using UNKNOWN", "unknown standard specifier", - "uname(3) system call failed", - "request requires a numeric argument", - "missing list type, using -item", + "skipping request without numeric argument", "skipping all arguments", "skipping excess arguments", @@ -1758,7 +1758,7 @@ roff_it(ROFF_ARGS) len = strcspn(cp, " \t"); cp[len] = '\0'; if ((iv = mandoc_strntoi(cp, len, 10)) <= 0) { - mandoc_msg(MANDOCERR_NUMERIC, r->parse, + mandoc_msg(MANDOCERR_IT_NONUM, r->parse, ln, ppos, *bufp + 1); return(ROFF_IGN); } |