aboutsummaryrefslogtreecommitdiffstatshomepage
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
commita9c60e19e39804deecac9dc666a4ccad62e76f9c (patch)
treeae996a3219ec80542e9c13415634f2d01d8f4a7c
parent8f97288fed1c527774fb2fb7c78ed9a63895411f (diff)
downloadmandoc-a9c60e19e39804deecac9dc666a4ccad62e76f9c.tar.gz
mandoc-a9c60e19e39804deecac9dc666a4ccad62e76f9c.tar.zst
mandoc-a9c60e19e39804deecac9dc666a4ccad62e76f9c.zip
better name and wording for the last two non-generic errors
-rw-r--r--mandoc.h8
-rw-r--r--mdoc_validate.c5
-rw-r--r--read.c8
-rw-r--r--roff.c4
4 files changed, 13 insertions, 12 deletions
diff --git a/mandoc.h b/mandoc.h
index ac42c9f1..9b4f8562 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.143 2014/07/30 00:19:16 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.144 2014/07/30 12:58:21 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 85b57d48..3e8830a0 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.232 2014/07/30 00:19:16 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.233 2014/07/30 12:58:21 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 cf568077..a1aea359 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.70 2014/07/30 00:19:16 schwarze Exp $ */
+/* $Id: read.c,v 1.71 2014/07/30 12:58:21 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 c257ad41..a8f96647 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.221 2014/07/07 21:36:20 schwarze Exp $ */
+/* $Id: roff.c,v 1.222 2014/07/30 12:58:21 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);
}