summaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-01-03 23:53:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-01-03 23:53:51 +0000
commitfc974a57cd34bcbd149a89e1e5927d795492b4aa (patch)
tree42c3baa6d57e10e3528ed913506d63c84312fd2d /main.c
parent0bca0ed29c146972c0bb416f86619a5a280c08cb (diff)
downloadmandoc-fc974a57cd34bcbd149a89e1e5927d795492b4aa.tar.gz
mandoc-fc974a57cd34bcbd149a89e1e5927d795492b4aa.tar.zst
mandoc-fc974a57cd34bcbd149a89e1e5927d795492b4aa.zip
Partial cleanup of argument count validation in mdoc(7):
* Do not segfault on empty .Db, .Rs, .Sm, and .St. * Let check_count() really throw the requested level, not always ERROR. * Downgrade most bad argument counts from ERROR to WARNING. * And some related internal cleanup. Looks fine to kristaps@. Note that the macros using eerr_ge1() still need to be checked at a later time; but as all the others are done, let's use what we already have.
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 9368f37c..2289de8a 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,6 @@
-/* $Id: main.c,v 1.132 2011/01/03 13:54:02 kristaps Exp $ */
+/* $Id: main.c,v 1.133 2011/01/03 23:53:51 schwarze Exp $ */
/*
- * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -153,6 +153,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
/* related to missing macro arguments */
"skipping empty macro",
+ "argument count wrong",
"missing display type",
"list type must come first",
"tag lists require a width argument",