summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-30 12:58:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-30 12:58:21 +0000
commit1825ddd5edbb59f71fa3505747e772b6e10bc773 (patch)
tree5b7e05a4f77ea568caa3c27f37a682c551f21990
parent146dcfc953f48acd462342b3dfc86200e3e0a195 (diff)
downloadmandoc-1825ddd5edbb59f71fa3505747e772b6e10bc773.tar.gz
better name and wording for the last two non-generic errors
-rw-r--r--mandoc.h6
-rw-r--r--mdoc_validate.c3
-rw-r--r--read.c6
-rw-r--r--roff.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/mandoc.h b/mandoc.h
index e1d6ed49..3cafca1b 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -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",
diff --git a/read.c b/read.c
index 0292b645..1788c40f 100644
--- a/read.c
+++ b/read.c
@@ -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",
diff --git a/roff.c b/roff.c
index 83b30d27..fe26c1fe 100644
--- a/roff.c
+++ b/roff.c
@@ -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);
}