summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Unified error and warning message system for all of mandoc,schwarze2010-05-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 kristaps@.
* Small fix for `D1' and `Bd' in -Thtml; from kristaps@.schwarze2010-05-231-3/+4
|
* allow non-numeric manual sections in -mdoc;schwarze2010-05-151-3/+3
| | | | | while here, allow LIBRARY in section 9; by kristaps@
* Integrate kristaps@' end-of-sentence (EOS) frameworkschwarze2010-05-141-2/+1
| | | | | | | | | | | | | 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-7/+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
* sync to bsd.lv mdoc_term.c 1.117, mdoc_html.c 1.61:schwarze2010-05-081-11/+3
| | | | | fixed %T: it now correctly underlines, instead of quoting; noted by jmc@, fixed by kristaps@
* Merge the good parts of 1.9.23,schwarze2010-04-071-39/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Better write 'href="mailto:' instead of 'style="mailto:'.schwarze2010-04-041-2/+2
| | | | | | Diff from Tim van der Molen <tbvdm at xs4all dot nl>, thanks! ok kristaps@
* no need to die from .Xr without arguments, we can just ignore itschwarze2010-04-031-1/+4
| | | | ok deraadt@
* Proper inter-sentence spacing for mdoc(7).schwarze2010-03-021-1/+2
| | | | | | | | | 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-4/+7
| | | | | | | | | * 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
* complete the sync to 1.9.15-pre2: mostly minor fixesschwarze2010-01-021-7/+19
| | | | | | | | * bugfix: do not restore TERMP flags when leaving lists, just reset them * and a few HTML fixes * clarity: return width from a2width, not width+2, and adapt to it * manual: document .Bl and .Fl * portability: no need to escape '%' in macro names
* sync to 1.9.14: rewrite escape sequence handling:schwarze2009-12-241-10/+7
| | | | | | | | | - new function a2roffdeco - font modes (\f) only affect the current stack point - implement scaling (\s) - implement space suppression (\c) - implement non-breaking space (\~) in -Tascii - many manual improvements
* sync to 1.9.13: minor fixes:schwarze2009-12-231-4/+7
| | | | | | | | | | | | | | | | | | 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-24/+33
| | | | | | | | | | | | | | | | | | | 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-29/+38
| | | | | 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-0/+2217
* -Thtml output mode * roff scaling units * and some minor fixes for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/