diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-06-20 23:02:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-06-20 23:02:31 +0000 |
commit | 37fc9452eae26c51be7df689f984abae6d78ccea (patch) | |
tree | 0066a63ed50561d168fdd765aa6669cb3b72c8b9 /mandoc.h | |
parent | f55f857f8f078275f8f6d914367c3075c9e25022 (diff) | |
download | mandoc-37fc9452eae26c51be7df689f984abae6d78ccea.tar.gz |
As suggested by jmc@, only include line and column numbers into messages
when they are meaningful, to avoid confusing stuff like this:
$ mandoc /dev/null
mandoc: /dev/null:0:1: FATAL: not a manual
Instead, just say:
mandoc: /dev/null: FATAL: not a manual
Another example this applies to is documents having a prologue,
but lacking a body. Do not throw a FATAL error for these; instead,
issue a WARNING and show the empty document, in the man(7) case with
the same amount of blank lines as groff does. Also downgrade mdoc(7)
documents having content before the first .Sh from FATAL to WARNING.
Diffstat (limited to 'mandoc.h')
-rw-r--r-- | mandoc.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -62,6 +62,8 @@ enum mandocerr { /* related to document structure */ MANDOCERR_SO, /* .so is fragile, better use ln(1) */ + MANDOCERR_DOC_EMPTY, /* no document body */ + MANDOCERR_SEC_BEFORE, /* content before the first section header */ MANDOCERR_NAMESECFIRST, /* NAME section must come first */ MANDOCERR_BADNAMESEC, /* bad NAME section contents */ MANDOCERR_SECOOO, /* sections out of conventional order */ @@ -161,7 +163,6 @@ enum mandocerr { MANDOCERR_SYNTCHILD, /* child violates parent syntax */ MANDOCERR_SYNTARGCOUNT, /* argument count wrong, violates syntax */ MANDOCERR_SOPATH, /* NOT IMPLEMENTED: .so with absolute path or ".." */ - MANDOCERR_NODOCBODY, /* no document body */ MANDOCERR_NODOCPROLOG, /* no document prologue */ MANDOCERR_MEM, /* static buffer exhausted */ |