summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_validate.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* various improvements regarding errors and warnings Joerg Sonnenberger:schwarze2010-05-151-86/+8
| | | | | | | | | | | | * If the last -column .Bl isn't specified, it is auto-sized. * An invalid .St argument should be a warning, not an error. Just put the argument into the output. * An invalid .At argument should be a warning, not an error. Just print the argument, like new groff does. * Remove warnings concerning manual section (like 1, 6, 8). It was only used for .Ex and not really useful. * Remove warnings concerning page section (like SYNOPSIS). These were only used for .Fd and .Lb and not really useful.
* Integrate kristaps@' end-of-sentence (EOS) frameworkschwarze2010-05-141-4/+2
| | | | | | | | | | | | | which is simpler and more powerful than mine, and remove mine. * man(7) now has EOS handling, too * put EOS detection into its own function in libmandoc * use node and termp flags to communicate the EOS condition * no more EOS pseudo-macro * no more non-printable EOS marker character on the formatter level This slightly breaks EOS detection after trailing punctuation in mdoc(7) macros, but that will be restored soon.
* Merge 1.9.25, keeping local patches;schwarze2010-05-141-5/+8
| | | | | | | | | | | | | | this does not merge kristaps' end-of-sentences handling yet, i will check that separately. This one includes: * handle \*(Ba as a delimiter * introduce ARGS_PEND for .Bl -column .It end-of-line special casing * section ordering: expect EXIT STATUS at the right place * line break fixes in SYNOPSIS * allow literal contexts to have arbitrary line lengths * the input file column number can not be used to identify the beginning of a line because white space is allowed after the initial '.' * proper leading spaces in -man -Tascii mode * do not let Lb break lines in -mdoc -Thtml LIBRARY
* merge 1.9.24, keeping local patches; some changes:schwarze2010-05-141-15/+3
| | | | | | | | | * preserve multiple consecutive space characters in input * do not restrict .Cd and .Rv to certain sections (requested by Joerg) * do not run lookup() on quoted words * enum return types for mdoc_args and mdoc_argv * fix auto-closing of LINK tag in -Txhtml (from Daniel Friesel) * various lint and manual fixes
* Remove the command line option -fno-ign-chars.schwarze2010-05-131-14/+3
| | | | | | | | | This option was not useful, you never want mandoc to die just because there is an invalid character in the input file, neither in production nor when linting: a warning is sufficient. This was particularly annoying because it was part of -fstrict and could not be switched off. "less is more" kristaps@
* Merge the good parts of 1.9.23,schwarze2010-04-071-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid the bad parts of 1.9.23, and keep local patches. Input in general: * Basic handling of roff-style font escapes \f, \F. * Quoted punctuation does not count as punctuation. mdoc(7) parser: * Make .Pf callable; noted by Claus Assmann. * Let .Bd and .Bl ignore unknown arguments; noted by deraadt@. * Do not warn when .Er is used outside certain sections. * Replace mdoc_node_free[list] by mdoc_node_delete. * Replace #define by enum for rew*() return values. man(7) parser: * When .TH is missing, use default section and date. Output in general: * Curly braces do not count as punctuation. * No space after .Fl w/o args when a macro follows on the same line. HTML output: * Unify PAIR_*_INIT macros, introduce new PAIR_ID_INIT(). * Print whitespace after, not before .Vt .Fn .Ft .Fo. Checked that all manuals in base still build.
* no need to die from .Xr without arguments, we can just ignore itschwarze2010-04-031-2/+2
| | | | ok deraadt@
* When two conflicting list types are specified for the same list,schwarze2010-04-031-3/+7
| | | | | | use the first, discard the second, and warn. No need to bail out. ok deraadt@
* * outside literal context in mdoc(7), handle blank lines like .Ppschwarze2010-04-031-3/+4
| | | | | | * a missing NAME section in mdoc(7) need not be fatal ok deraadt@
* merge 1.9.22, keeping local patchesschwarze2010-04-021-3/+3
| | | | | | * convert mdoc tokens from #define to enum * fix a segfault with .Xo/.Xc in explicit blocks * Thorn is \*(Th, not \*(TH; noticed by Joerg Sonnenberger
* Proper inter-sentence spacing for mdoc(7).schwarze2010-03-021-2/+4
| | | | | | | | | When a text line or a non-block macro line in the source code ends in any of ".!?", consider that an end of sentence (EOS). This makes Jason's rule "new sentence, new line" even more important. Let the parser detect the EOS and insert a token into the AST. Let the -Tascii frontend render the EOS token as a double space before the next word.
* sync to release 1.9.15:schwarze2010-02-181-5/+31
| | | | | | | | | * corrected .Vt handling (spotted by Joerg Sonnenberger) * corrected .Xr argument handling (based on my patch) * removed \\ escape sequence (because it is for low-level roff only) * warn about trailing whitespace (suggested by jmc@) * -Txhtml support * and some general cleanup and doc improvements
* .Bl may have .Sm as a child.schwarze2010-01-011-4/+11
| | | | | The comment in the source code and OK by kristaps@; merged upstream in rev. 1.55.
* sync to 1.9.13: minor fixes:schwarze2009-12-231-2/+6
| | | | | | | | | | | | | | | | | | correctness/functionality: - bugfix: properly ignore lines with only a dot in -man - bugfix: .Bl -ohang doesn't allow -width, warn about this - improve date string handling by new function mandoc_a2time - some HTML improvements - significant documentation additions in man.7 and mdoc.7 portability: - replace __dead by __attribute__((noreturn)) - bugfix: correct .Dx rendering - some more library names for NetBSD simplicity: - replace hand-rolled putchar(3)-loops by fwrite(3) - replace single-character printf(3) by putchar(3)
* sync to 1.9.12, mostly portability and refactoring:schwarze2009-12-221-2/+1
| | | | | | | | | | | | | | | | | | | correctness/functionality: - bugfix: do not die when overstep hits the right margin - new option: -fign-escape - and various HTML features portability: - replace bzero(3) by memset(3), which is ANSI C - replace err(3)/warn(3) by perror(3)/exit(3), which is ANSI C - iuse argv[0] instead of __progname - add time.h to various files for FreeBSD compilation simplicity: - do not allocate header/footer data dynamically in *_term.c - provide and use malloc frontends that error out on failure for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/
* sync to 1.9.11: adapt printing of dates to groff conventions,schwarze2009-10-271-6/+10
| | | | | NetBSD portability fixes and some minor bugfixes and feature enhancements; also checked that my hyphenation code still works on top of this
* sync to 1.9.9, featuring:schwarze2009-10-211-44/+20
| | | | | | | * -Thtml output mode * roff scaling units * and some minor fixes for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/
* sync to 1.9.6: multiple improvements to references (.Rs)schwarze2009-10-191-5/+49
| | | | | | | * validate and order .Rs child nodes * underline book title (.%B) and issuer (.%I) * enclose title of article (.%T) in quotes * avoid calling mdoc_verr directly, use a proper error code instead
* sync to 1.9.1: .Rv and .Ex accept multiple argumentsschwarze2009-08-221-16/+3
|
* sync to 1.8.4: correct error message to complain about .An line argumentsschwarze2009-08-091-2/+3
|
* sync to 1.8.3: In .Bl -column, handle one column in excess,schwarze2009-08-091-2/+2
| | | | but still issue a warning
* sync to 1.8.2: more .Bl -column fixes, in particular:schwarze2009-08-091-5/+14
| | | | | 1) -column implies -compact 2) do not die from fewer columns than specified (more are still fatal)
* sync to 1.8.1: support .br and .spschwarze2009-07-261-6/+40
|
* The abbreviation for .Bf -symbolic is .Bf Sy, not .Bf Sm;schwarze2009-07-191-2/+2
| | | | "Gah! Fixed." kristaps@
* sync to 1.8.0: a bad .St argument causes an error, not a warningschwarze2009-07-181-2/+2
|
* sync to 1.8.0: white space fixes, no code changeschwarze2009-07-181-113/+106
|
* sync to 1.8.0: move mdoc_a2att, mdoc_a2st, and mdoc_a2lib to libmdocschwarze2009-07-181-1/+11
|
* sync to 1.8.0: avoid duplicate warning about a malformed NAME sectionschwarze2009-07-181-2/+2
| | | | when the next section following NAME is a custom section
* sync to 1.8.0: .Nd is now a BFI, was an ELEM,schwarze2009-07-181-3/+6
| | | | and use \(en instead of \- for .Nd
* fix a trivial pasto that crept into 1.7.23; also submitted upstreamschwarze2009-07-131-2/+2
|
* sync to 1.7.24: mdoc_nwarn/mdoc_nerr got mixed up;schwarze2009-07-131-3/+5
| | | | fix from joerg at netbsd via kristaps@
* sync to 1.7.24: make .In handling more similar to new groffschwarze2009-07-121-4/+2
|
* sync to 1.7.23: pass warning code to mdoc_pwarn() instead of warning messageschwarze2009-07-121-126/+27
| | | | | | define additional warning macro mdoc_nwarn() remove obsolete warning functions mdoc_warn(), pwarn(), vwarn(), nwarn() remove various now unused "enum mdoc_warn" and "enum mwarn"
* sync to 1.7.23: pass error code to mdoc_perr() instead of error stringschwarze2009-07-121-71/+5
| | | | | and use the so improved mdoc_nerr() at many places; get rid of now unused static functions perr()
* sync to 1.7.23: pass error code to mdoc_nerr() instead of error stringschwarze2009-07-121-31/+31
| | | | and use the so improved mdoc_nerr() at many places
* sync to 1.7.23: unify the various "enum merr" into libman.h and libmdoc.h,schwarze2009-07-121-27/+7
| | | | | use it as a new argument to mdoc_err(), the same way as for for man_err(), and use string tables instead of switch statements to select error messages
* sync to 1.7.23: third step to get rid of enum mdoc_warn:schwarze2009-07-121-7/+10
| | | | mdoc_verr is not using enum mdoc_warn, so use it at a few more places
* sync to 1.7.23: second step to get rid of enum mdoc_warn:schwarze2009-07-121-2/+2
| | | | remove type from mdoc_vwarn arguments, and use this function where apropriate
* sync to 1.7.21: unified escape sequence validation for mdoc and manschwarze2009-07-081-5/+7
| | | | | checking is still incomplete, but a bit better, in particular for man now in sync with 1.7.22: the only 1.7.22 diff was already in
* remove unused WDEPCOL warning that became unused in 1.7.19schwarze2009-07-061-6/+1
| | | | ok kristaps@ and contained in 1.7.21
* the forms \*x, \*(xx and \*[xxx] are not deprecated, so revert most of 1.8;schwarze2009-06-261-9/+1
| | | | noticed by jmc@; ok kristaps@; to be included in 1.7.21
* sync to 1.7.20: like for the -man case, add an nchild counter to the -mdocschwarze2009-06-231-18/+3
| | | | nodes, simplifying the validation code; no functional change
* sync to 1.7.19: .Bl -column now correctly handles tail entries,schwarze2009-06-211-21/+34
| | | | for example: .Bl -column -compact -offset ... args ...
* sync to 1.7.19: kristaps@ rewrote post_bf to reduce nestingschwarze2009-06-211-17/+16
| | | | no functional change
* sync to 1.7.19: more elegant section handlingschwarze2009-06-191-25/+22
|
* sync to 1.7.19: escape sequences of the forms \*x and \*(xx are deprecatedschwarze2009-06-191-3/+9
|
* sync to 1.7.19: improved comment handlingschwarze2009-06-181-3/+2
|
* sync to 1.7.16: The .Er macro may also be used in sections (3) and (9).schwarze2009-06-181-2/+2
|
* sync to 1.7.16: use dedicated warning types for list validationschwarze2009-06-181-33/+62
| | | | instead of hand-rolled warnings
* sync to 1.7.16: make a couple of macros callable, reserve "|",schwarze2009-06-181-2/+2
| | | | and some tweaks to .Lk