summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_macro.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* proper handling of quoted tab-separated column listsschwarze2010-05-151-32/+19
| | | | by kristaps@
* Distinguish OPEN, MIDDLE and CLOSE delimiters (using an enum).schwarze2010-05-151-37/+14
| | | | | | | | | | Only OPEN are drawn before the beginning of a macro; this is new, before this, MIDDLE ('|') were drawn in front, too. Only CLOSE are pushed after the end of a macro (as before). ok kristaps@ This allows us to finally enable handling of leading punctuation without regressions.
* block-implicit macros now up-propogate end-of-sentence spacing;schwarze2010-05-151-1/+21
| | | | from bsd.lv mandoc.c 1.13 and mdoc_macro.c 1.64
* 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-27/+67
| | | | | | | | | | | | | | 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-156/+186
| | | | | | | | | * 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
* Merge the good parts of 1.9.23,schwarze2010-04-071-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* merge 1.9.22, keeping local patchesschwarze2010-04-021-26/+31
| | | | | | * 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
* Temporarily disable the handling of leading punctuation.schwarze2010-04-021-2/+27
| | | | We must investigate the fallout before enabling this.
* merge 1.9.20, keeping local patchesschwarze2010-04-021-150/+201
| | | | | | | | * 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)
* 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.
* Distinguish opening and closing delimiters, and close out blockschwarze2010-03-021-2/+2
| | | | | | | | macros after closing delimiters only, not after opening ones. Besides, neither roff nor old nor new groff consider braces { } as delimiters. This fixes some frequent misrenderings by mandoc, for example ".Ql (" being rendered as "`'(" instead of "`('".
* Support .It .Xo.schwarze2010-02-261-7/+34
| | | | | The trick is to not switch from the .It header to the body at EOL, but, in case an explicit block macro follows, at the end of the block.
* sync to release 1.9.15:schwarze2010-02-181-4/+46
| | | | | | | | | * 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
* When multiple arguments are passed to .Fl,schwarze2010-01-011-1/+12
| | | | | | | each should be rendered with its own dash. Fixes regress/usr.bin/mandoc/mdoc/Fl/multiarg.in; ok kristaps@ and merged upstream in rev. 1.39.
* sync to 1.9.12, mostly portability and refactoring:schwarze2009-12-221-1/+2
| | | | | | | | | | | | | | | | | | | 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-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.5: lookup hashes are now static tablesschwarze2009-09-211-15/+16
| | | | shortening the code, and, according to kristaps@, speeding it up
* sync to 1.9.1: correctly flag delimiter whitespaceschwarze2009-08-221-3/+3
|
* sync to 1.9.1: set mdoc_next flags in mdoc_*_alloc routines, where they belongschwarze2009-08-221-274/+202
|
* sync to 1.9.0: polishing the core code of mdoc macro handlingschwarze2009-08-221-41/+33
| | | | | | | | | | 1) If a macro is not parsed, do not parse it. Of course, without parsing it, we cannot produce "macro-like parameter" warnings, but these were useless anyway. 2) If a macro is not callable, do not print a useless warning when it occurs as a parameter, just display the raw characters. 3) Below .Bl -column, check whether macros are callable. 4) Like groff, allow whitespace after the initial dot on macro lines.
* sync to 1.8.4: LLVM findings from <uqs at spoerlein dot net>schwarze2009-08-221-6/+5
|
* sync to 1.8.4: full .An -[no]split supportschwarze2009-08-091-4/+6
|
* sync to 1.8.3: .Pa without arguments is a synonym for .Pa ~schwarze2009-08-091-1/+3
|
* sync to 1.8.2: fix and cleanup .Bl -column phrase handlingschwarze2009-08-091-60/+26
| | | | by using the normal argument parsing from mdoc_argv.c
* sync to 1.8.2: use in_line_eoln instead of in_line for .Pp and .Lpschwarze2009-08-091-7/+3
| | | | no functional change, but shorter code
* sync to 1.8.1: make .Cd parsedschwarze2009-08-091-2/+2
| | | | | kristaps@ says many SYNOPSIS sections use this; my impression is that's not in OpenBSD, but it won't do much harm here, either
* sync to 1.8.1: explicit-close macros now only warn when encounteringschwarze2009-07-261-7/+7
| | | | trailing terms and do not error out any more, try: .Ed foo
* sync to 1.8.1: support .br and .spschwarze2009-07-261-1/+3
|
* sync to 1.8.0: .Nd is now a BFI, was an ELEM,schwarze2009-07-181-4/+41
| | | | and use \(en instead of \- for .Nd
* sync to 1.7.24: make .In handling more similar to new groffschwarze2009-07-121-2/+2
|
* sync to 1.7.23: pass warning code to mdoc_pwarn() instead of warning messageschwarze2009-07-121-39/+6
| | | | | | 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-32/+4
| | | | | 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-2/+2
| | | | 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-12/+5
| | | | | 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-2/+2
| | | | 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.19: improved comment handlingschwarze2009-06-181-5/+2
|
* sync to 1.7.16: make a couple of macros callable, reserve "|",schwarze2009-06-181-10/+14
| | | | and some tweaks to .Lk
* 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/+1496