summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_validate.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* implement .AT and .UC; from Joerg Sonnenbergerschwarze2010-05-231-1/+2
|
* Support nested roff instructions:schwarze2010-05-201-4/+1
| | | | | | | | | | | | | | | | | | | * allow roff_parseln() to be re-run * allow roff_parseln() to manipulate the line buffer offset * support the offset in the man and mdoc libraries * adapt .if, .ie, .el, .ig, .am* and .de* support * interpret some instructions even in conditional-negative context Coded by kristaps during the last day of the mandoc hackathon. To avoid regressions in the OpenBSD tree, commit this together with some small local additions: * detect roff block end "\}" even on macro lines * actually implement the ".if n" conditional * ignore .ds, .rm and .tr in libroff Also back my old .if/.ie/.el-handling out of libman, reverting: man.h 1.15 man.c 1.25 man_macro.c 1.15 man_validate.c 1.19 man_action.c 1.15 man_term.c 1.28 man_html.c 1.9.
* In theory, Kristaps never intended to write a roff parser,schwarze2010-05-161-26/+1
| | | | | | | | | | | | | | | | | | but in practice, most real legacy man(7)uals are using so much low level roff that we can't really get away without at least partially handling some roff instructions. As doing this in man(7) only has become messy and as even some mdoc(7) pages need it, start a minimal partial roff preprocessor. As a first step, move handling of .am[i], .de[i] and .ig there. Do not use the roff preprocessor for new manuals! Now that we have three main parser libraries - roff, man and mdoc - each one having its own error handling is becoming messy, too. Thus, start unifying message handling in one central place, introducing a new generic function mmsg(). coded by kristaps@
* removed restriction on integer manual sections in -man;schwarze2010-05-151-2/+2
| | | | by kristaps@
* Remove the command line option -fno-ign-chars.schwarze2010-05-131-4/+2
| | | | | | | | | 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@
* Implement roff conditional instructions .if .ie .el, in man(7) only for now;schwarze2010-04-251-1/+4
| | | | fixing OpenBSD::PackageName(3p) and friends for espie@.
* Merge the good parts of 1.9.23,schwarze2010-04-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* When we have no title in man(7), just use "unknown". No need to bail.schwarze2010-04-031-3/+6
| | | | ok deraadt@
* merge 1.9.20, keeping local patchesschwarze2010-04-021-2/+2
| | | | | | | | * prevent roff instructions in man(7) from clobbering scopes and line modes (noted by Sascha Wildner) * handle leading punctuation in mdoc(7) blocks and line macros (looks good in principle, but is causing some fallout in OpenBSD, so i will disable it locally for now with the next commit)
* merge 1.9.19, keeping local patchesschwarze2010-03-291-3/+22
| | | | | | | * scoping fixes for roff instructions * accept apostroph in place of dot as a macro control character * accept tabs between the control character and the macro name * check that man(7) .TH titles use capital letters
* merge 1.9.17, keeping local patchesschwarze2010-03-261-2/+28
| | | | | | | * much improved pod2man support and low-level roff robustness * have -Tlint imply -Wall and -fstrict * use fewer macros and more enum in libman * and various bug fixes
* Accept the non-standard macros .Sp (similar to .sp)schwarze2010-03-021-3/+6
| | | | | | | and .Vb/.Ve (similar to .nf/.fi) in man(7) mode. These are not intended to be used manually, but they allow us to properly render man(7) code autogenerated by pod2man(1), making Perl and OpenSSL happy in our tree.
* The groff_man(7) manual says "the first line of text following" .TP isschwarze2010-02-261-4/+4
| | | | | | | | | used as a label, not "the first line following", so allow (some kinds of) intervening macros - some people actually put macros in between. On the other hand, when there is no text line before the next block macro, that is, when the .TP block ends without any text line, then something *is* broken, so still error out in that case.
* sync to 1.9.11: adapt printing of dates to groff conventions,schwarze2009-10-271-1/+2
| | | | | 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-35/+4
| | | | | | | * -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.2: Add .UC libman macro for compatibility, has no effect.schwarze2009-09-181-1/+2
| | | | | Correct .UC and .DT to not print their arguments. Document that .UC and .DT should not be used.
* another large chunk of -man updates,schwarze2009-08-221-24/+27
| | | | | among others regarding .DT, .HP, .RS, .RE, .SH, .SS, and scoping, now in sync vith release 1.9.1
* Kristaps@ significantly overhauled libman.schwarze2009-08-221-59/+162
| | | | | | | I'm committing this in one large chunk because in contrast to -mdoc, -man is mostly untested in OpenBSD anyway, so any fallout can be fixed in-tree. Among others, improved support for .IP, .HP, and .TP. Now in sync with release 1.9.0.
* sync to 1.8.4: support .sp in -manschwarze2009-08-221-5/+40
|
* sync to 1.7.21: unified escape sequence validation for mdoc and manschwarze2009-07-081-3/+18
| | | | | 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
* sync to 1.7.20: root and text validation for -manschwarze2009-06-231-16/+37
|
* sync to 1.7.19: improved comment handlingschwarze2009-06-181-3/+2
|
* sync to 1.7.16: comments, whitespace and spelling fixes; no functional changeschwarze2009-06-141-13/+11
|
* Initial check-in of mandoc for formatting manuals. ok deraadt@kristaps2009-04-061-0/+137