summaryrefslogtreecommitdiffstats
path: root/mandoc.h
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
commit5b840cdde94e169a11d49e62d17d79650e968693 (patch)
tree4cb545ae7692db2410f9b319094ffd3571ee4e83 /mandoc.h
parent0e50c1438daedc8128c87f3473ac9f0b508ac7b8 (diff)
downloadmandoc-5b840cdde94e169a11d49e62d17d79650e968693.tar.gz
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 'mandoc.h')
-rw-r--r--mandoc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mandoc.h b/mandoc.h
index c4edcf8f..af540ecb 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,6 +1,6 @@
/* $Id$ */
/*
- * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -75,6 +75,7 @@ enum mandocerr {
/* related to missing macro arguments */
MANDOCERR_MACROEMPTY, /* skipping empty macro */
+ MANDOCERR_ARGCWARN, /* argument count wrong */
MANDOCERR_DISPTYPE, /* missing display type */
MANDOCERR_LISTFIRST, /* list type must come first */
MANDOCERR_NOWIDTHARG, /* tag lists require a width argument */