CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2010/05/23 16:45:01
Modified files:
usr.bin/mandoc : arch.c att.c lib.c libman.h libmdoc.h main.c
man.c man.h man_action.c man_argv.c man_hash.c
man_html.c man_macro.c man_term.c
man_validate.c mandoc.h mdoc.c mdoc.h
mdoc_action.c mdoc_argv.c mdoc_hash.c
mdoc_html.c mdoc_macro.c mdoc_strings.c
mdoc_term.c mdoc_validate.c msec.c st.c term.c
tree.c vol.c
Log message:
Unified error and warning message system for all of mandoc,
featuring three message levels, as agreed during the mandoc hackathon:
* FATAL parser failure, cannot produce any output from this input file:
eventually, we hope to convert most of these to ERRORs.
* ERROR, meaning mandoc cannot cope fully with the input syntax and will
probably lose information or produce structurally garbled output;
it will try to produce output anyway but exit non-zero at the end,
which is eventually intended to make the ports infrastructure happy.
* WARNING, meaning you should clean up the input file, but output
is probably mostly OK, so this will not cause error-exit at the end.
This commit is mostly just converting the old system to the new one; before
the classification will become really reliable, we must check all messages.
In particular,
* set up a new central message string table in main.c
* drop the old message string tables from man.c and mdoc.c
* get rid of the piece-meal merr enums in libman and libmdoc
* reduce number of error/warning functions from 16 to 6 (still a lot...)
While here, handle a few problems more gracefully:
* allow .Rv and .Ex to work without a prior .Nm
* allow .An to ignore extra arguments
* allow undeclared columns in .Bl -column
Written by krist...@.