Up to [local] / src / usr.bin / mandoc
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.192 / (download) - annotate - [select for diffs], Thu May 19 14:47:47 2022 UTC (2 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
HEAD
Changes since 1.191: +7 -2 lines
Diff to previous 1.191 (colored) to selected 1.30 (colored)
improve a comment explaining a particularly nasty hack; no code change
Revision 1.191 / (download) - annotate - [select for diffs], Sun Jun 27 17:57:13 2021 UTC (2 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE,
OPENBSD_7_1,
OPENBSD_7_0_BASE,
OPENBSD_7_0
Changes since 1.190: +5 -2 lines
Diff to previous 1.190 (colored) to selected 1.30 (colored)
add a style message about overlong text lines, trying very hard to avoid false positives, not at all trying to catch as many cases as possible; feature originally suggested by tb@, OK tb@ kn@ jmc@
Revision 1.190 / (download) - annotate - [select for diffs], Fri Apr 24 11:58:02 2020 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.189: +9 -3 lines
Diff to previous 1.189 (colored) to selected 1.30 (colored)
provide a STYLE message when mandoc knows the file name and the extension disagrees with the section number given in the .Dt or .TH macro; feature suggested and patch tested by jmc@
Revision 1.189 / (download) - annotate - [select for diffs], Sat Apr 18 20:28:46 2020 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.188: +4 -4 lines
Diff to previous 1.188 (colored) to selected 1.30 (colored)
When a .Tg is attached to a paragraph, attach the permalink to the first word, or the first few words if they are short.
Revision 1.188 / (download) - annotate - [select for diffs], Tue Apr 7 22:45:37 2020 UTC (4 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.187: +2 -1 lines
Diff to previous 1.187 (colored) to selected 1.30 (colored)
Separate the place to put the <a href> permalink (now marked with NODE_HREF) from the target element of the link (still marked with NODE_ID). In many cases, use this to move the target to the beginning of the paragraph, such that readers don't get dropped into the middle of a sentence.
Revision 1.187 / (download) - annotate - [select for diffs], Fri Mar 13 16:14:14 2020 UTC (4 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.186: +3 -1 lines
Diff to previous 1.186 (colored) to selected 1.30 (colored)
Properly reset the validation part of the tagging module between files. This fixes a crash in makewhatis(8) encountered by naddy@. I'm very sorry for the disruption of the build.
Revision 1.186 / (download) - annotate - [select for diffs], Fri Mar 13 00:31:05 2020 UTC (4 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.185: +11 -2 lines
Diff to previous 1.185 (colored) to selected 1.30 (colored)
Split tagging into a validation part including prioritization in tag.{h,c} and {mdoc,man}_validate.c and into a formatting part including command line argument checking in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c. Immediate functional benefits include: * Improved prioritization of automatic tags for .Em and .Sy. * Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged. * Explicit tagging of .Er and .Fl now works in HTML output. * Automatic tagging of .IP and .TP now works in HTML output. But mainly, this patch provides clean earth to build further improvements on. Technical changes: * Main program: Write a tag file for ASCII and UTF-8 output only. * All formatters: There is no more need to delay writing the tags. * mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection. * HTML formatter: If available, use the "string" attribute as the tag. * HTML formatter: New function to write permalinks, to reduce code duplication. Style cleanup in the vicinity while here: * mdoc(7) terminal formatter: To set up bold font for children, defer to termp_bold_pre() rather than calling term_fontpush() manually. * mdoc(7) terminal formatter: Garbage collect some duplicate functions. * mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions. * Where possible, use switch statements rather than if cascades. * Get rid of some more Yoda notation. The necessity for such changes was first discussed with kn@, but i didn't bother him with a request to review the resulting -673/+782 line patch.
Revision 1.185 / (download) - annotate - [select for diffs], Wed Jul 10 19:38:56 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.184: +17 -18 lines
Diff to previous 1.184 (colored) to selected 1.30 (colored)
Some time ago, i simplified mandoc_msg() such that it can be used everywhere and not only in the parsers. For more uniform messages, use it at more places instead of err(3), in particular in the main program. While here, integrate a few trivial functions called at exactly one place into the main option parser, and let a few more functions use the normal convention of returning 0 for success and -1 for error.
Revision 1.184 / (download) - annotate - [select for diffs], Mon Jun 3 19:58:00 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.183: +2 -2 lines
Diff to previous 1.183 (colored) to selected 1.30 (colored)
Initialize the local variable "lastln" in mparse_buf_r(). While there is no bug, it logically makes sense given the meaning of the variable that lastln is NULL as long as firstln is NULL. Michal Nowak <mnowak at startmail dot com> reported that gcc 4.4.4 and 7.4.0 on illumos throw -Wuninitialized false positives.
Revision 1.183 / (download) - annotate - [select for diffs], Tue Mar 19 16:25:38 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.182: +3 -1 lines
Diff to previous 1.182 (colored) to selected 1.30 (colored)
When the last line of the input is empty and the previous line reduced the line input buffer to a length of one byte, do not write one byte past the end of the line input buffer. Minimal code to show the bug: printf ".ds X\n.X\n\n" | MALLOC_OPTIONS=C mandoc Bug found by bentley@ in the sysutils/rancid par(1) manual page.
Revision 1.182 / (download) - annotate - [select for diffs], Fri Jan 11 17:03:43 2019 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.181: +5 -3 lines
Diff to previous 1.181 (colored) to selected 1.30 (colored)
Improve error reporting when a file given on the command line cannot be opened: * Mention the filename. * Report the errno for the file itself, not the one with .gz appended.
Revision 1.181 / (download) - annotate - [select for diffs], Mon Dec 31 04:55:42 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.180: +2 -1 lines
Diff to previous 1.180 (colored) to selected 1.30 (colored)
Cleanup, minus 15 LOC, no functional change: Simplify the way the man(7) and mdoc(7) validators are called. Reset the parser state with a common function before calling them. There is no need to again reset the parser state afterwards, the parsers are no longer used after validation. This allows getting rid of man_node_validate() and mdoc_node_validate() as separate functions.
Revision 1.180 / (download) - annotate - [select for diffs], Sun Dec 30 00:48:48 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.179: +22 -26 lines
Diff to previous 1.179 (colored) to selected 1.30 (colored)
Cleanup, no functional change: The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h. Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication. This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters.
Revision 1.179 / (download) - annotate - [select for diffs], Thu Dec 20 21:27:51 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.178: +4 -4 lines
Diff to previous 1.178 (colored) to selected 1.30 (colored)
Move the full responsibility for reporting open(2) errors from mparse_open() to the caller. That is better because only the caller knows its preferred reporting method and format and only the caller has access to all the data that should be included - like the column number in .so processing or the current manpath in makewhatis(8). Moving the mandoc_msg() call out is possible because the caller can call strerror(3) just as easily as mparse_open() can. Move mandoc_msg_setinfilename() closer to the parsing of the file contents, to avoid problems *with* the file (like non-existence, lack of permissions, etc.) getting misreported as problems *in* the file. Fix the column number reported for .so failure: let it point to the beginning of the filename. Taken together, this prevents makewhatis(8) from spewing confusing messages about .so failures to stderr, a bug reported by Raf Czlonka <rczlonka at gmail dot com> on ports@. It also prevents mandoc(1) from issuing *two* messages for every single .so failure.
Revision 1.178 / (download) - annotate - [select for diffs], Fri Dec 14 06:33:03 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored) to selected 1.30 (colored)
Cleanup, no functional change: Now that message handling is properly encapsulated, remove struct mparse pointers from four structs (roff, roff_man, tbl_node, eqn_node) and from the argument lists of five functions (roff_alloc, roff_man_alloc, mandoc_getarg, tbl_alloc, eqn_alloc). Except for being passed to the main program as an opaque object, it now only occurs in read.c, as it should, and not across 15 files like in the past.
Revision 1.177 / (download) - annotate - [select for diffs], Fri Dec 14 05:17:45 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.176: +20 -22 lines
Diff to previous 1.176 (colored) to selected 1.30 (colored)
Almost mechanical diff to remove the "struct mparse *" argument from mandoc_msg(), where it is no longer used. While here, rename mandoc_vmsg() to mandoc_msg() and retire the old version: There is really no point in having another function merely to save "%s" in a few places. Minus 140 lines of code.
Revision 1.176 / (download) - annotate - [select for diffs], Fri Dec 14 02:15:10 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.175: +41 -40 lines
Diff to previous 1.175 (colored) to selected 1.30 (colored)
Fold mparse_parse_buffer() into mparse_readfd(), making the code considerably more readable. This is possible now that i finally deleted mparse_readmem() from mandoc portable - an unused function that never existed in OpenBSD. This cleanup already made me find a minor bug: after a recursive parse, restoring the line number of the parent file was forgotten. This is fixed now.
Revision 1.175 / (download) - annotate - [select for diffs], Fri Dec 14 01:17:46 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.174: +10 -298 lines
Diff to previous 1.174 (colored) to selected 1.30 (colored)
Major cleanup; may imply minor changes in edge cases of error reporting. Finally, drop support for the run-time configurable mandocmsg() callback. It was over-engineered from the start, never used for anything in a decade, and repeatedly caused maintenance headaches. Consolidate reporting infrastructure into two files, mandoc.h and mandoc_msg.c, mopping up the bits and pieces that were scattered around main.c, read.c, mandoc_parse.h, libmandoc.h, the prototypes of four parsing-related functions, and both parser structs.
Revision 1.174 / (download) - annotate - [select for diffs], Thu Dec 13 11:55:14 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.173: +2 -1 lines
Diff to previous 1.173 (colored) to selected 1.30 (colored)
Cleanup, no functional change: Split the top level parser interface out of the utility header mandoc.h, into a new header mandoc_parse.h, for use in the main program and in the main parser only. Move enum mandoc_os into roff.h because struct roff_man is the place where it is stored. This allows removal of mandoc.h from seven files in low-level parsers and in formatters.
Revision 1.173 / (download) - annotate - [select for diffs], Thu Dec 13 06:17:17 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.172: +2 -1 lines
Diff to previous 1.172 (colored) to selected 1.30 (colored)
Cleanup, no functional change: Move the roffhash_*() functions from roff.h to roff_int.h because they are only intended for use by parsers, neither by main programs nor by formatters.
Revision 1.172 / (download) - annotate - [select for diffs], Sat Aug 25 16:43:52 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.171: +3 -1 lines
Diff to previous 1.171 (colored) to selected 1.30 (colored)
Rudimentary implementation of the roff(7) .char (output glyph definition) request, used for example by groff_hdtbl(7). This simplistic implementation may interact incorrectly with the .tr (input character translation) request. But come on, you are not only using .char *and* .tr, but you do so with respect to the same character in the same manual page?
Revision 1.171 / (download) - annotate - [select for diffs], Fri Aug 24 22:56:37 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.170: +119 -55 lines
Diff to previous 1.170 (colored) to selected 1.30 (colored)
Rudimentary implementation of the roff(7) .while request. Needed for example by groff_hdtbl(7). There are two limitations: It does not support nested .while requests yet, and each .while loop must start and end in the same scope. The roff_parseln() return codes are now more flexible and allow OR'ing options.
Revision 1.170 / (download) - annotate - [select for diffs], Thu Aug 23 19:32:03 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.169: +68 -71 lines
Diff to previous 1.169 (colored) to selected 1.30 (colored)
The upcoming .while request will have to re-execute roff(7) lines parsed earlier, so they will have to be saved for reuse - but the read.c preparser does not know yet whether a line contains a .while request before passing it to the roff parser. To cope with that, save all parsed lines for now. Even shortens the code by 20 lines.
Revision 1.169 / (download) - annotate - [select for diffs], Thu Aug 23 14:16:12 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.168: +32 -12 lines
Diff to previous 1.168 (colored) to selected 1.30 (colored)
Implement the roff(7) .shift and .return requests, for example used by groff_hdtbl(7) and groff_mom(7). Also correctly interpolate arguments during nested macro execution even after .shift and .return, implemented using a stack of argument arrays. Note that only read.c, but not roff.c can detect the end of a macro execution, and the existence of .shift implies that arguments cannot be interpolated up front, so unfortunately, this includes a partial revert of roff.c rev. 1.209, moving argument interpolation back into the function roff_res().
Revision 1.168 / (download) - annotate - [select for diffs], Sat Jul 28 18:32:30 2018 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.167: +3 -2 lines
Diff to previous 1.167 (colored) to selected 1.30 (colored)
Issue a STYLE message when normalizing the date format in .Dd/.TH. Leah Neukirchen pointed out that mdoclint(1) used to warn about a leading zero before the day number, so we know that both NetBSD and Void Linux want the message. It does no harm on OpenBSD because Mdocdate always does the right thing anyway. jmc@ agrees that it makes sense in contexts not using Mdocdate.
Revision 1.167 / (download) - annotate - [select for diffs], Fri Mar 16 15:05:33 2018 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE,
OPENBSD_6_3
Changes since 1.166: +2 -1 lines
Diff to previous 1.166 (colored) to selected 1.30 (colored)
Style message about bad input encoding of em-dashes as -- instead of \(em. Suggested by Thomas Klausner <wiz at NetBSD>; discussed with jmc@.
Revision 1.166 / (download) - annotate - [select for diffs], Fri Feb 23 21:34:37 2018 UTC (6 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.165: +32 -7 lines
Diff to previous 1.165 (colored) to selected 1.30 (colored)
After opening a file with gzdopen(3), we have to call gzclose(3) or we leak memory internally used by zlib to keep compression state. Bug reported by Wolfgang Mueller <vehk at vehk dot de> who also provided an incomplete patch, part of which i'm using in this commit.
Revision 1.165 / (download) - annotate - [select for diffs], Fri Nov 10 22:48:05 2017 UTC (6 years, 7 months ago) by jca
Branch: MAIN
Changes since 1.164: +2 -2 lines
Diff to previous 1.164 (colored) to selected 1.30 (colored)
Be less assertive when warning about a possible typo. ok schwarze@ "good compromise" jmc@
Revision 1.164 / (download) - annotate - [select for diffs], Thu Jul 20 14:36:32 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.163: +16 -8 lines
Diff to previous 1.163 (colored) to selected 1.30 (colored)
Do not call err(3) from the parser. Call mandoc_vmsg() and return failure such that we can continue with the next file.
Revision 1.163 / (download) - annotate - [select for diffs], Sat Jul 8 17:52:42 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.162: +2 -15 lines
Diff to previous 1.162 (colored) to selected 1.30 (colored)
Simplify by creating struct roff_node syntax tree nodes for tbl(7) right from roff_parseln() rather than delegating to read.c, similar to what i just did for eqn(7). The interface function roff_span() becomes obsolete and is deleted, the former interface function roff_addtbl() becomes static, the interface functions tbl_read() and tbl_cdata() become void, and minus twelve linus of code. No functional change.
Revision 1.162 / (download) - annotate - [select for diffs], Sat Jul 8 14:51:01 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.161: +1 -4 lines
Diff to previous 1.161 (colored) to selected 1.30 (colored)
1. Eliminate struct eqn, instead use the existing members of struct roff_node which is allocated for each equation anyway. 2. Do not keep a list of equation parsers, one parser is enough. Minus fifty lines of code, no functional change.
Revision 1.161 / (download) - annotate - [select for diffs], Thu Jul 6 22:58:44 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.160: +9 -9 lines
Diff to previous 1.160 (colored) to selected 1.30 (colored)
Now that we have the -Wstyle message level, downgrade six warnings that are not syntax mistakes and that do not cause wrong formatting or content to style suggestions. Also upgrade two warnings that may cause information loss to errors.
Revision 1.160 / (download) - annotate - [select for diffs], Tue Jul 4 14:40:30 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.159: +2 -2 lines
Diff to previous 1.159 (colored) to selected 1.30 (colored)
Printing "BASE:" in messages about violations of base system conventions is confusing, simply print "STYLE:", which is intuitive and does not sound excessively alarming; suggested by jmc@, OK tedu@ jmc@.
Revision 1.159 / (download) - annotate - [select for diffs], Mon Jul 3 17:33:01 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.158: +2 -2 lines
Diff to previous 1.158 (colored) to selected 1.30 (colored)
report trailing delimiters after macros where they are usually a mistake; the idea came up in a discussion with Thomas Klausner <wiz at NetBSD>
Revision 1.158 / (download) - annotate - [select for diffs], Mon Jul 3 13:40:00 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.157: +2 -1 lines
Diff to previous 1.157 (colored) to selected 1.30 (colored)
warn about time machines; suggested by Thomas Klausner <wiz @ NetBSD>
Revision 1.157 / (download) - annotate - [select for diffs], Sun Jul 2 15:31:48 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.156: +2 -1 lines
Diff to previous 1.156 (colored) to selected 1.30 (colored)
add warning "cross reference to self"; inspired by mdoclint
Revision 1.156 / (download) - annotate - [select for diffs], Sat Jul 1 09:47:23 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.155: +2 -1 lines
Diff to previous 1.155 (colored) to selected 1.30 (colored)
Basic reporting of .Xrs to manual pages that don't exist in the base system, inspired by mdoclint(1). We are able to do this because (1) the -mdoc parser, the -Tlint validator, and the man(1) manual page lookup code are all in the same program and (2) the mandoc.db(5) database format allows fast lookup. Feedback from, previous versions tested by, and OK jmc@. A few features will be added to this in the tree, step by step.
Revision 1.155 / (download) - annotate - [select for diffs], Thu Jun 29 15:21:46 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.154: +3 -1 lines
Diff to previous 1.154 (colored) to selected 1.30 (colored)
warn about some non-portable idioms in .Bl -column; triggered by a question from Yuri Pankov (illumos)
Revision 1.154 / (download) - annotate - [select for diffs], Sun Jun 25 17:42:37 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.153: +2 -1 lines
Diff to previous 1.153 (colored) to selected 1.30 (colored)
Catch typos in .Sh names; suggested by jmc@. I'm using a very simple, linear time / zero space fuzzy string matching heuristic rather than a full Levenshtein metric, to keep the code both simple and fast.
Revision 1.153 / (download) - annotate - [select for diffs], Sat Jun 24 18:58:09 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.152: +2 -1 lines
Diff to previous 1.152 (colored) to selected 1.30 (colored)
operating system dependent message about unknown architecture; inspired by mdoclint
Revision 1.152 / (download) - annotate - [select for diffs], Sat Jun 24 15:59:28 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.151: +2 -1 lines
Diff to previous 1.151 (colored) to selected 1.30 (colored)
in the base system, suggest leaving .Os blank; inspired by mdoclint
Revision 1.151 / (download) - annotate - [select for diffs], Sat Jun 24 14:38:28 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.150: +17 -13 lines
Diff to previous 1.150 (colored) to selected 1.30 (colored)
Split -Wstyle into -Wstyle and the even lower -Wbase, and add -Wopenbsd and -Wnetbsd to check conventions for the base system of a specific operating system. Mark operating system specific messages with "(OpenBSD)" at the end. Please use just "-Tlint" to check base system manuals (defaulting to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the manuals of portable software projects you maintain that are not part of OpenBSD base, to avoid bogus recommendations about base system conventions that do not apply. Issue originally reported by semarie@, solution using an idea from tedu@, discussed with jmc@ and jca@.
Revision 1.150 / (download) - annotate - [select for diffs], Sat Jun 17 23:06:43 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.149: +2 -1 lines
Diff to previous 1.149 (colored) to selected 1.30 (colored)
style message about duplicate RCS ids; inspired by mdoclint
Revision 1.149 / (download) - annotate - [select for diffs], Sat Jun 17 22:40:27 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.148: +2 -1 lines
Diff to previous 1.148 (colored) to selected 1.30 (colored)
style message about missing RCS ids; inspired by mdoclint
Revision 1.148 / (download) - annotate - [select for diffs], Sun Jun 11 19:36:31 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.147: +4 -1 lines
Diff to previous 1.147 (colored) to selected 1.30 (colored)
Style message about legacy man(7) date format in mdoc(7) documents and operating system dependent messages about missing or unexpected Mdocdate; inspired by mdoclint(1).
Revision 1.147 / (download) - annotate - [select for diffs], Sun Jun 11 17:16:36 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.146: +2 -1 lines
Diff to previous 1.146 (colored) to selected 1.30 (colored)
style message about missing .Fn markup; inspired by mdoclint
Revision 1.146 / (download) - annotate - [select for diffs], Sat Jun 10 01:48:31 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.145: +2 -1 lines
Diff to previous 1.145 (colored) to selected 1.30 (colored)
style message about missing blank before trailing delimiter; inspired by mdoclint(1), and jmc@ considers it useful
Revision 1.145 / (download) - annotate - [select for diffs], Thu Jun 8 00:21:23 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.144: +2 -1 lines
Diff to previous 1.144 (colored) to selected 1.30 (colored)
Portable mandoc just got a warning about unknown .Lb names which we don't want in OpenBSD, but let's keep the message table and the manual page in sync.
Revision 1.144 / (download) - annotate - [select for diffs], Wed Jun 7 23:29:31 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.143: +3 -1 lines
Diff to previous 1.143 (colored) to selected 1.30 (colored)
style checks related to .Er; inspired by mdoclint(1)
Revision 1.143 / (download) - annotate - [select for diffs], Tue Jun 6 15:00:56 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.142: +2 -1 lines
Diff to previous 1.142 (colored) to selected 1.30 (colored)
Minimal implementation of the roff(7) .ce request (center a number of input lines without filling). Contrary to groff, high-level macros abort .ce mode for now.
Revision 1.142 / (download) - annotate - [select for diffs], Sun Jun 4 00:08:56 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.141: +4 -70 lines
Diff to previous 1.141 (colored) to selected 1.30 (colored)
Pure preprocessor implementation of the roff(7) .ec and .eo requests (escape character control), touching nothing after the preprocessing stage and keeping even the state variable local to the preprocessor. Since the escape character is also used for line continuation, this requires pulling the implementation of line continuation from the input reader to the preprocessor, which also considerably shortens the code required for that. When the escape character is changed, simply let the preprocessor replace bare by escaped backslashes and instances of the non-standard escape character with bare backslashes - that's all we need. Oh, and if anybody dares to use these requests in OpenBSD manuals, sending a medium-sized pack of axe-murderes after them might be a worthwhile part of the punishment, but probably insuffient on its own.
Revision 1.141 / (download) - annotate - [select for diffs], Sat Jun 3 15:54:09 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.140: +2 -1 lines
Diff to previous 1.140 (colored) to selected 1.30 (colored)
ignore blank lines in man(7) next line scope; strange groff edge case behaviour found in multimedia/mjpegtools
Revision 1.140 / (download) - annotate - [select for diffs], Thu Jun 1 15:24:41 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.139: +2 -1 lines
Diff to previous 1.139 (colored) to selected 1.30 (colored)
STYLE message about full stop at the end of .Nd; inspired by mdoclint(1)
Revision 1.139 / (download) - annotate - [select for diffs], Wed May 31 15:30:12 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.138: +2 -1 lines
Diff to previous 1.138 (colored) to selected 1.30 (colored)
STYLE message about missing use of Ox/Nx/Fx/Dx; OK jmc@ wiz@
Revision 1.138 / (download) - annotate - [select for diffs], Tue May 30 19:29:31 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.137: +4 -1 lines
Diff to previous 1.137 (colored) to selected 1.30 (colored)
STYLE message about useless macros we don't want (Bt Tn Ud); not a WARNING because they don't endanger portability
Revision 1.137 / (download) - annotate - [select for diffs], Tue May 16 19:05:36 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.136: +4 -3 lines
Diff to previous 1.136 (colored) to selected 1.30 (colored)
Introduce a new mandoc(1) message level, -W style, below -W warning. Switch -W all from meaning -W warning to meaning -W style. The meaning of -T lint does *not* change, it still implies -W warning. No messages on the new level yet, but they will come. Usually, i do not lightly make the user interface larger. But this has been planned for years, and EXIT STATUS 1 was reserved for it all the time. The message system is now stable enough to finally implement it. jmc@ regarding the concept: "really good idea"
Revision 1.136 / (download) - annotate - [select for diffs], Sat Apr 29 12:43:55 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.135: +12 -7 lines
Diff to previous 1.135 (colored) to selected 1.30 (colored)
Parser unification: use nice ohashes for all three request and macro tables; no functional change, minus two source files, minus 200 lines of code.
Revision 1.135 / (download) - annotate - [select for diffs], Tue Mar 7 20:00:02 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.134: +13 -9 lines
Diff to previous 1.134 (colored) to selected 1.30 (colored)
If a user-defined macro is aborted because it exceeds the stack limit, usually due to infinite recursion, discard whatever remains in all those open stack levels. Otherwise, insane constructions like the following could generate macros of enormous size, causing mandoc(1) to die from memory exhaustion: .de m \" original macro definition .m \" recursion to blow up the stack .de m \" definition to be run during the call of .m marked (*) very long plain text (some kilobytes) .m \" expand the above a thousand times while unwinding the stack .. \" end of the original definition .m \" (*) recursively generate a ridiculously large macro .. \" end of recursively generated definition .m \" execute the giant macro, exhausting memory Very creative abuse found by tb@ with afl(1).
Revision 1.134 / (download) - annotate - [select for diffs], Mon Mar 6 17:25:24 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.133: +2 -1 lines
Diff to previous 1.133 (colored) to selected 1.30 (colored)
Using .Nd only makes sense in the NAME section. Warn if that macro occurs elsewhere. Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
Revision 1.133 / (download) - annotate - [select for diffs], Fri Feb 3 18:18:08 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.132: +7 -7 lines
Diff to previous 1.132 (colored) to selected 1.30 (colored)
Minor cleanup, no functional change: We always have a roff parser, so mparse_free() does not need to check for existence before freeing it. Also arrange code in struct mparse, mparse_reset(), and mparse_free() in the same order for readability.
Revision 1.132 / (download) - annotate - [select for diffs], Fri Feb 3 17:55:36 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.131: +2 -1 lines
Diff to previous 1.131 (colored) to selected 1.30 (colored)
If an application parses multiple files with mparse_readfd(3) but without using mparse_open(3) to open the files, and if one of the files includes a gzip'ed file with .so, then the gzip flag remains set and the next main file will be expected to be gzip'ed. Fix this by clearing the gzip flag in mparse_reset(3). Bug found and patch provided by Michael <Stapelberg at debian dot org>.
Revision 1.131 / (download) - annotate - [select for diffs], Sat Jan 28 23:26:56 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.130: +2 -1 lines
Diff to previous 1.130 (colored) to selected 1.30 (colored)
Add a warning "new sentence, new line". This does not attempt to pinpoint each and every offender, but instead tries very hard to avoid false positives: Currently, there are only two false positives in the whole OpenBSD base system. Only do this in mdoc(7), not in man(7), because manuals written in man(7) typically have much worse problems than this. OK jmc@ on a previous version of the patch
Revision 1.130 / (download) - annotate - [select for diffs], Mon Jan 9 01:36:22 2017 UTC (7 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.129: +8 -1 lines
Diff to previous 1.129 (colored) to selected 1.30 (colored)
Warnings and errors that occur during mdoc_validate() or during man_validate() have to affect the mandoc(1) EXIT STATUS. Many thanks to <Yuri dot Pankov at gmail dot com> (illumos developer) for reporting this regression.
Revision 1.129 / (download) - annotate - [select for diffs], Sun Jan 8 00:10:22 2017 UTC (7 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.128: +4 -3 lines
Diff to previous 1.128 (colored) to selected 1.30 (colored)
Stricter validation of the NAME section, in particular: - require a comma between names - reject all other text nodes - reject all empty Nm below NAME, not only in the leading position - reject Nm after Nd
Revision 1.128 / (download) - annotate - [select for diffs], Wed Dec 28 17:21:17 2016 UTC (7 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored) to selected 1.30 (colored)
Make the second, section number argument of .Xr mandatory. In fact, we have been requiring it for many years. The only reason to not warn when it was missing was excessive traditionalism - it was optional in 4.4BSD.
Revision 1.127 / (download) - annotate - [select for diffs], Wed Dec 7 22:57:35 2016 UTC (7 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.126: +4 -2 lines
Diff to previous 1.126 (colored) to selected 1.30 (colored)
When reporting "whitespace at end of input line" on lines ending with roff(7) comments, let the column number in the message point to the end of the line rather than to the beginning of the comment. Improvement suggested by bluhm@.
Revision 1.126 / (download) - annotate - [select for diffs], Thu Nov 10 12:47:05 2016 UTC (7 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.125: +12 -6 lines
Diff to previous 1.125 (colored) to selected 1.30 (colored)
warn about trailing whitespace at the end of comments; missing feature noticed by jmc@
Revision 1.125 / (download) - annotate - [select for diffs], Sun Oct 9 18:16:46 2016 UTC (7 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored) to selected 1.30 (colored)
Delete complicated code dealing with .Bl -tag without -width, and just let it default to -width 6n, which agrees with the traditional -width Ds that is still in widespread use. I just pushed a patch upstream to GNU roff that does the same for groff_mdoc(7). Before, groff contained code that was even more complicated than mandoc, but both resulted in quite different user-visible output. Now, both agree, and output is nicer for both. Useless complication noticed by Carsten Kunze (Heirloom roff).
Revision 1.124 / (download) - annotate - [select for diffs], Tue Jul 19 16:22:34 2016 UTC (7 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0
Changes since 1.123: +3 -25 lines
Diff to previous 1.123 (colored) to selected 1.30 (colored)
Since the mdoc/man parser unification, the parser is always allocated in mparse_alloc(), so delete all the curp->man == NULL checks. Triggered by a patch from Christos Zoulas suggesting to add yet another such check.
Revision 1.123 / (download) - annotate - [select for diffs], Sun Jul 10 13:33:50 2016 UTC (7 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored) to selected 1.30 (colored)
Fix a nasty typo that prevented .so links to gziped manuals from working in the absence of a mandoc.db(5) database. Found the hard way by Svyatoslav Mishyn on Crux Linux.
Revision 1.122 / (download) - annotate - [select for diffs], Fri Jan 8 02:53:09 2016 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.121: +12 -12 lines
Diff to previous 1.121 (colored) to selected 1.30 (colored)
Simplify the mparse_open() interface. Just return the file descriptor or -1 on error; there is just one kind of error anyway. Suggested by Christos Zoulas (NetBSD).
Revision 1.121 / (download) - annotate - [select for diffs], Fri Jan 8 02:13:35 2016 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.120: +2 -5 lines
Diff to previous 1.120 (colored) to selected 1.30 (colored)
It was very surprising that a function called mparse_readfd() closed the file descriptor passed to it after completing its work, in particular considering the fact that it required its callers to call open(2) or mparse_open() beforehand. Change mparse_readfd() to not call close(2) and change the callers to call close(2) afterwards, more or less bringing open and close to the same level of the code and making review easier. Note that man.cgi(8) already did that, even though it was wrong in the past. Small restructuring suggested by Christos Zoulas (NetBSD).
Revision 1.120 / (download) - annotate - [select for diffs], Fri Oct 30 19:03:36 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.119: +2 -1 lines
Diff to previous 1.119 (colored) to selected 1.30 (colored)
If a .Bd block has no arguments at all, drop the block and only keep its contents. Removing a gratuitious difference to groff output found after a related bug report from krw@.
Revision 1.119 / (download) - annotate - [select for diffs], Tue Oct 13 22:57:49 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.118: +3 -5 lines
Diff to previous 1.118 (colored) to selected 1.30 (colored)
Major character table cleanup: * Use ohash(3) rather than a hand-rolled hash table. * Make the character table static in the chars.c module: There is no need to pass a pointer around, we most certainly never want to use two different character tables concurrently. * No need to keep the characters in a separate file chars.in; that merely encourages downstream porters to mess with them. * Sort the characters to agree with the mandoc_chars(7) manual page. * Specify Unicode codepoints in hex, not decimal (that's the detail that originally triggered this patch). No functional change, minus 100 LOC, and i don't see a performance change.
Revision 1.118 / (download) - annotate - [select for diffs], Sun Oct 11 21:06:59 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.117: +8 -13 lines
Diff to previous 1.117 (colored) to selected 1.30 (colored)
Finally use __progname, err(3) and warn(3). That's more readable and less error-prone than fumbling around with argv[0], fprintf(3), strerror(3), perror(3), and exit(3). It also shortens the code by 50 lines. It's a bad idea to boycott good interfaces merely because standards committees ignore them. Instead, it's the job of the portable distribution to provide compatibility modules for archaic systems (like commercial Solaris) that still don't have them. Actually, the compat code for the portable distribution already exists and will be committed right after this.
Revision 1.117 / (download) - annotate - [select for diffs], Tue Oct 6 18:30:44 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.116: +13 -13 lines
Diff to previous 1.116 (colored) to selected 1.30 (colored)
modernize style: "return" is not a function; ok cmp(1)
Revision 1.116 / (download) - annotate - [select for diffs], Mon Sep 14 15:35:47 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.115: +1 -2 lines
Diff to previous 1.115 (colored) to selected 1.30 (colored)
Remove the warning about children of .Vt blocks because actually, .Vt type global_variable No = Dv defined_constant ; is the best way to specify in the SYNOPSIS how a global variable is initialized in the rare case where that matters. Issue noticed by jmc@.
Revision 1.115 / (download) - annotate - [select for diffs], Sun Jul 19 05:59:07 2015 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8
Changes since 1.114: +33 -83 lines
Diff to previous 1.114 (colored) to selected 1.30 (colored)
Do not fork and exec gunzip(1), just link with libz instead. As discussed with deraadt@, that's cleaner and will help tame(2). Something like this was also suggested earlier by bapt at FreeBSD. Minus 50 lines of code, deleting one interface function (mparse_wait), no functional change intended.
Revision 1.114 / (download) - annotate - [select for diffs], Sun Apr 19 14:25:05 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.113: +7 -12 lines
Diff to previous 1.113 (colored) to selected 1.30 (colored)
Unify some node handling functions that use TOKEN_NONE. * mdoc_word_alloc(), man_word_alloc() -> roff_word_alloc() * mdoc_word_append(), man_word_append() -> roff_word_append() * mdoc_addspan(), man_addspan() -> roff_addtbl() * mdoc_addeqn(), man_addeqn() -> roff_addeqn() Minus 50 lines of code, no functional change.
Revision 1.113 / (download) - annotate - [select for diffs], Sun Apr 19 13:59:37 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.112: +5 -6 lines
Diff to previous 1.112 (colored) to selected 1.30 (colored)
Decouple the token code for "no request or macro" from the individual high-level parsers to allow further unification of functions that only need to recognize this code, but that don't care about different high-level macrosets beyond that.
Revision 1.112 / (download) - annotate - [select for diffs], Sat Apr 18 17:28:08 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.111: +25 -39 lines
Diff to previous 1.111 (colored) to selected 1.30 (colored)
Unify {mdoc,man}_{alloc,reset,free}() into roff_man_{alloc,reset,free}(). Minus 80 lines of code, no functional change. Written on the train from Koeln to Wolfsburg returning from p2k15.
Revision 1.111 / (download) - annotate - [select for diffs], Sat Apr 18 17:01:28 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.110: +9 -3 lines
Diff to previous 1.110 (colored) to selected 1.30 (colored)
Move mdoc_hash_init() and man_hash_init() to libmandoc.h and call them from mparse_alloc() and choose_parser(), preparing unified allocation of struct roff_man.
Revision 1.110 / (download) - annotate - [select for diffs], Sat Apr 18 16:34:03 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.109: +40 -52 lines
Diff to previous 1.109 (colored) to selected 1.30 (colored)
Profit from the unified struct roff_man and reduce the number of arguments of mparse_result() by one. No functional change. Written on the ICE Bruxelles-Koeln on the way back from p2k15.
Revision 1.109 / (download) - annotate - [select for diffs], Sat Apr 18 16:04:40 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.108: +7 -7 lines
Diff to previous 1.108 (colored) to selected 1.30 (colored)
Replace the structs mdoc and man by a unified struct roff_man. Almost completely mechanical, no functional change. Written on the train from Exeter to London returning from p2k15.
Revision 1.108 / (download) - annotate - [select for diffs], Thu Apr 2 21:03:18 2015 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.107: +6 -5 lines
Diff to previous 1.107 (colored) to selected 1.30 (colored)
First step towards parser unification: Replace enum mdoc_type and enum man_type by a unified enum roff_type. Almost mechanical, no functional change. Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
Revision 1.107 / (download) - annotate - [select for diffs], Tue Mar 17 07:32:21 2015 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.106: +3 -1 lines
Diff to previous 1.106 (colored) to selected 1.30 (colored)
When the user exits the pager before the pager has drained all input from man(1), man(1) dies from SIGPIPE. Exiting man(1) is fine in this case, generating more output would be pointless, but without handling SIGPIPE, the exit code from man(1) was wrong and csh(1) printed an ugly message "Broken pipe". Fix this by handling SIGPIPE explicitly. Issue noticed by deraadt@.
Revision 1.106 / (download) - annotate - [select for diffs], Wed Mar 11 13:04:10 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.105: +2 -2 lines
Diff to previous 1.105 (colored) to selected 1.30 (colored)
Fix previous: size_t is often narrower than off_t. Cluestick applied by joerg at NetBSD.
Revision 1.105 / (download) - annotate - [select for diffs], Tue Mar 10 14:17:22 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.104: +2 -2 lines
Diff to previous 1.104 (colored) to selected 1.30 (colored)
The st_size member of struct stat is off_t, which is signed, all required by POSIX. So don't compare it against against an unsigned constant.
Revision 1.104 / (download) - annotate - [select for diffs], Mon Mar 2 14:48:31 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.103: +2 -1 lines
Diff to previous 1.103 (colored) to selected 1.30 (colored)
If a non-gz manual is read after a gzipped manual, refrain from throwing a bogus error "wait: No child processes". As reported by Baptiste Daroussin <bapt at FreeBSD dot org>, clearing the state variable curp->child after use was forgotten.
Revision 1.103 / (download) - annotate - [select for diffs], Mon Feb 23 13:30:02 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.102: +5 -2 lines
Diff to previous 1.102 (colored) to selected 1.30 (colored)
improve NAME section diagnostics; confusing messages reported by Jan Stary <hans at stare dot cz>
Revision 1.102 / (download) - annotate - [select for diffs], Fri Feb 20 22:40:05 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.101: +3 -2 lines
Diff to previous 1.101 (colored) to selected 1.30 (colored)
Completely delete all carriage return characters from the input. No change to messages about them (ignore them right before line feeds, report errors elsewhere). naddy@ found a manual in the wild containing lots of these (ysm(1)), and i can't imagine a situation where dropping them could be problematic.
Revision 1.101 / (download) - annotate - [select for diffs], Fri Feb 6 16:05:51 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.100: +3 -2 lines
Diff to previous 1.100 (colored) to selected 1.30 (colored)
replace the last legacy generic message type, "argument count wrong", by more specific messages, improving diagnostics for .cc .tr .Bl -column
Revision 1.100 / (download) - annotate - [select for diffs], Fri Feb 6 11:54:03 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.99: +3 -1 lines
Diff to previous 1.99 (colored) to selected 1.30 (colored)
better error reporting regarding .OP .RS .UR .TH arguments
Revision 1.99 / (download) - annotate - [select for diffs], Fri Feb 6 07:12:34 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored) to selected 1.30 (colored)
Delete the legacy generic warning type MANDOCERR_ARGCWARN, replacing the last instances by more specific warnings. Improved functionality, minus 50 lines of code.
Revision 1.98 / (download) - annotate - [select for diffs], Fri Feb 6 03:31:11 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored) to selected 1.30 (colored)
better handle .Fo and .Fd without argument better handle .Fo with more than one argument
Revision 1.97 / (download) - annotate - [select for diffs], Wed Feb 4 18:03:28 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (colored) to selected 1.30 (colored)
discard .Rs head arguments and improve .Rs diagnostics
Revision 1.96 / (download) - annotate - [select for diffs], Wed Feb 4 16:38:31 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.95: +2 -1 lines
Diff to previous 1.95 (colored) to selected 1.30 (colored)
more specific .Nd diagnostics, allowing to get rid of enum check_lvl and the respective argument of check_count()
Revision 1.95 / (download) - annotate - [select for diffs], Wed Jan 28 21:10:28 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.94: +1 -7 lines
Diff to previous 1.94 (colored) to selected 1.30 (colored)
Clean up eqn(7) error handling: * When "define" fails, do not drop the whole equation. * Free memory after "undef". * Use standard mandoc error types instead of rolling our own. * Delete obfuscating EQN_MSG() macro. * Add function prototypes while here.
Revision 1.94 / (download) - annotate - [select for diffs], Wed Jan 28 17:30:37 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.93: +6 -6 lines
Diff to previous 1.93 (colored) to selected 1.30 (colored)
* Polish tbl(7) error reporting. * Do not print out macro names in tbl(7) data blocks. * Like with GNU tbl, let empty tables cause a blank line. * Avoid producing empty tables in -Tman.
Revision 1.93 / (download) - annotate - [select for diffs], Mon Jan 26 18:41:45 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.92: +10 -3 lines
Diff to previous 1.92 (colored) to selected 1.30 (colored)
Rework tbl(7) layout parsing: * Continue parsing even if part of the input is invalid. * Do not require whitespace between cell specifications. * Allow tabs as well as blanks between modifiers. * Mark the 'm' modifier as unsupported. * Parse and ignore the 'p' and 'v' modifiers. * Better warning and error messages. * Get rid of a static buffer. Improved functionality but minus 50 lines of code.
Revision 1.92 / (download) - annotate - [select for diffs], Mon Jan 26 13:02:53 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored) to selected 1.30 (colored)
More improvements regarding tbl(7) options. * Treat "allbox" as an alias for "box" for now. * Parse and ignore the GNU tbl "nowarn" option. * For separation, allow spaces, tabs, and commas only. * Mark eqn(7) within tbl(7) as unsupported. * Simplify the option table. * Improve and sort documentation.
Revision 1.91 / (download) - annotate - [select for diffs], Mon Jan 26 00:54:09 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.90: +5 -3 lines
Diff to previous 1.90 (colored) to selected 1.30 (colored)
Improve (or rather, rewrite) tbl(7) option parsing. * Allow the layout to start after the semicolon on the options line. * Ignore leading commas. * Option arguments cannot contain closing parentheses. * Avoid needless UNSUPP messages. * Better ERROR reporting. * Delete unused "linesize" field in struct tbl_opts. * No need for static buffers. * Garbage collect one almost empty wrapper function. Improved functionality, but minus 40 lines of code.
Revision 1.90 / (download) - annotate - [select for diffs], Sat Jan 24 01:59:40 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.89: +2 -1 lines
Diff to previous 1.89 (colored) to selected 1.30 (colored)
Support .RE with an argument; needed for audio/pms(1).
Revision 1.89 / (download) - annotate - [select for diffs], Thu Jan 22 21:36:44 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.88: +9 -7 lines
Diff to previous 1.88 (colored) to selected 1.30 (colored)
Traditional roff(7) explicitly allows certain control characters in the input stream (SOH, STX, ETX, ENQ, ACK, BEL, BS) for specific purposes (leaders, backspace, delimiters, .tr), but making sure these don't leak through to the output is tricky, so mark them as unsupported for now.
Revision 1.88 / (download) - annotate - [select for diffs], Thu Jan 22 19:26:16 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.87: +7 -3 lines
Diff to previous 1.87 (colored) to selected 1.30 (colored)
Don't let a failing mparse_open() clobber the filename pointer; fixes error message content and a use after free for .so with non-existent target when -Wall or -Tlint is given.
Revision 1.87 / (download) - annotate - [select for diffs], Tue Jan 20 21:12:46 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.86: +13 -9 lines
Diff to previous 1.86 (colored) to selected 1.30 (colored)
Split the -Werror message level into -Werror (broken manual, probably using mandoc is better than using groff) and -Wunsupp (manual using unsupported low-level roff(7) feature, probably using groff is better than using mandoc). Once this feature is complete, it is intended to help porting, making the decision whether to USE_GROFF easier. As a first step, distinguish four classes of roff(7) requests: 1. Supported (currently 24 requests) 2. Currently ignored because unimportant (120) -> no message 3. Ignored for good because insecure (14) -> -Werror 4. Currently unsupported (68) -> these trigger the new -Wunsupp messages
Revision 1.86 / (download) - annotate - [select for diffs], Thu Jan 15 04:26:06 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.85: +12 -41 lines
Diff to previous 1.85 (colored) to selected 1.30 (colored)
Fatal errors no longer exist. If a file can be opened, mandoc will produce some output; at worst, the output may be almost empty. Simplifies error handling and frees a message type for future use.
Revision 1.85 / (download) - annotate - [select for diffs], Thu Jan 15 02:29:07 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.84: +18 -16 lines
Diff to previous 1.84 (colored) to selected 1.30 (colored)
downgrade .so failure from FATAL to ERROR
Revision 1.84 / (download) - annotate - [select for diffs], Wed Jan 14 22:57:57 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.83: +2 -5 lines
Diff to previous 1.83 (colored) to selected 1.30 (colored)
downgrade ".so with absolute path" from FATAL to ERROR; allows to get rid of ROFF_ERR
Revision 1.83 / (download) - annotate - [select for diffs], Wed Jan 14 22:02:00 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.82: +15 -32 lines
Diff to previous 1.82 (colored) to selected 1.30 (colored)
To get rid of SYSERR entries in enum mandocerr, downgrade problems with missing and unreadable files from SYSERR to ERROR. Needed for upcoming work. As a bonus, this minimally simplifies code and documentation.
Revision 1.82 / (download) - annotate - [select for diffs], Wed Jan 14 17:45:25 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.81: +16 -35 lines
Diff to previous 1.81 (colored) to selected 1.30 (colored)
Simplify handling of system errors: just exit(3). We already do the same for malloc(3) failure. The is no virtue in trying to survive failure of fork(2) and the like.
Revision 1.81 / (download) - annotate - [select for diffs], Sun Dec 28 14:39:08 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.80: +7 -4 lines
Diff to previous 1.80 (colored) to selected 1.30 (colored)
mdoc(7) already uses the mandoc(1) -Ios argument in the footer line when .Os has no argument, so do the same for man(7) when .TH has less than four arguments; there is no reason to treat both differently. Issue found following a question from Thomas Klausner <wiz at NetBSD>.
Revision 1.80 / (download) - annotate - [select for diffs], Tue Dec 16 23:44:16 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.79: +2 -1 lines
Diff to previous 1.79 (colored) to selected 1.30 (colored)
Ignore mdoc(7) and man(7) macros inside tbl(7) code because they would abort the table in an unclean way, causing assertion failures found by jsg@.
Revision 1.79 / (download) - annotate - [select for diffs], Sun Nov 30 05:28:00 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored) to selected 1.30 (colored)
Multiple fixes with respect to .Pf: * The first argument of .Pf is not parsed. * Normal delimiter handling does not apply to the first argument of .Pf. * Warn if nothing follows a prefix (inspired by groff_mdoc(7)). * In that case, do not suppress spacing.
Revision 1.78 / (download) - annotate - [select for diffs], Sun Nov 30 02:31:32 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.77: +2 -1 lines
Diff to previous 1.77 (colored) to selected 1.30 (colored)
warn about attempts to call non-callable macros; inspired by a similar warning in the groff_mdoc(7) macros
Revision 1.77 / (download) - annotate - [select for diffs], Fri Nov 28 18:07:38 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.76: +1 -2 lines
Diff to previous 1.76 (colored) to selected 1.30 (colored)
Drop useless architecture table. Validating architecture names is a job for makewhatis(8)/mandoc.db(5), not for the parser. Removes 150 lines from source files and 4k (1%) from the binary. Bloat found by deraadt@.
Revision 1.76 / (download) - annotate - [select for diffs], Fri Nov 28 06:26:46 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.75: +17 -30 lines
Diff to previous 1.75 (colored) to selected 1.30 (colored)
Simplify by making the eqn and tbl steering functions void; no functional change, minus 15 lines of code.
Revision 1.75 / (download) - annotate - [select for diffs], Thu Nov 27 23:35:03 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored) to selected 1.30 (colored)
Downgrade .Bd -file from FATAL to ERROR. Since this was the last remaining FATAL error in this area, this change will allow major simplifications in the mdoc(7) parser.
Revision 1.74 / (download) - annotate - [select for diffs], Wed Nov 26 23:27:13 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.73: +43 -23 lines
Diff to previous 1.73 (colored) to selected 1.30 (colored)
Let mparse_readfd() use mparse_open() and mparse_wait() and let mparse_open() fall back to .gz files such that .so works even when the target is zipped, requested by and in part using ideas from <bapt at FreeBSD>. While here, make sure files are readable before forking, both for efficiency and for better error reporting.
Revision 1.73 / (download) - annotate - [select for diffs], Wed Nov 26 21:40:11 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.72: +11 -8 lines
Diff to previous 1.72 (colored) to selected 1.30 (colored)
Simplify the mparse_open()/mparse_wait() interface. Don't bother the user with the PID of the child process, store it inside the opaque mparse handle.
Revision 1.72 / (download) - annotate - [select for diffs], Sat Nov 1 06:02:43 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.71: +2 -3 lines
Diff to previous 1.71 (colored) to selected 1.30 (colored)
Use struct buf in libroff, it is very natural there and reduces the number of arguments of many functions. While here, sprinkle some KNF. No functional change.
Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 1 04:07:25 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.70: +32 -37 lines
Diff to previous 1.70 (colored) to selected 1.30 (colored)
Refactor, no functional change: Remove the parse point from struct buf. Some functions need multiple parse points, some none at all, and it varies whether any of them need to be passed around. So better pass them as a separate argument, and only when needed.
Revision 1.70 / (download) - annotate - [select for diffs], Thu Oct 30 00:05:02 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.69: +52 -20 lines
Diff to previous 1.69 (colored) to selected 1.30 (colored)
support UTF-8 and ISO-8859-1 input by integrating modified parts of kristaps@' version of the preconv(1) utility into mandoc(1); positive feedback from bentley@ and no concern raised when shown on tech@
Revision 1.69 / (download) - annotate - [select for diffs], Tue Oct 28 17:35:42 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.68: +6 -4 lines
Diff to previous 1.68 (colored) to selected 1.30 (colored)
Make the character table available to libroff so it can check the validity of character escape names and warn about unknown ones. This requires mchars_spec2cp() to report unknown names again. Fortunately, that doesn't require changing the calling code because according to groff, invalid character escapes should not produce output anyway, and now that we warn about them, that's fine.
Revision 1.68 / (download) - annotate - [select for diffs], Mon Oct 20 19:21:31 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored) to selected 1.30 (colored)
protect the roff parser from dividing by zero; issue found and patch written by kristaps@
Revision 1.67 / (download) - annotate - [select for diffs], Sat Oct 18 15:46:16 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.66: +10 -12 lines
Diff to previous 1.66 (colored) to selected 1.30 (colored)
plug file descriptor leaks on read or write failure; hinted at by Steffen Nurpmeso <sdaoden at yandex dot com>.
Revision 1.66 / (download) - annotate - [select for diffs], Sun Oct 12 19:10:56 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored) to selected 1.30 (colored)
Improve error handling in the eqn(7) parser. Get rid of the first fatal error, MANDOCERR_EQNSYNT. In eqn(7), there is no need to be bug-compatible with groff, so there is no need to abondon the whole equation in case of a syntax error. In particular: * Skip "back", "delim", "down", "fwd", "gfont", "gsize", "left", "right", "size", and "up" without arguments. * Skip "gsize" and "size" with a non-numeric argument. * Skip closing delimiters that are not open. * Skip "above" outside piles. * For diacritic marks and binary operators without a left operand, default to an empty box. * Let piles and matrices take one argument rather than insisting on a braced list. Let HTML output handle that, too. * When rewinding, if the root box is guaranteed to match the termination condition, no error handling is needed.
Revision 1.65 / (download) - annotate - [select for diffs], Sat Oct 11 21:14:11 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.64: +2 -1 lines
Diff to previous 1.64 (colored) to selected 1.30 (colored)
warn about parentheses in function names after .Fn and .Fo; particularly useful when converting from other languages to mdoc(7); feature suggested by bentley@
Revision 1.64 / (download) - annotate - [select for diffs], Fri Sep 12 00:53:21 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored) to selected 1.30 (colored)
warn about commas in function arguments; inspired by mdoclint(1)
Revision 1.63 / (download) - annotate - [select for diffs], Thu Sep 11 23:52:47 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.62: +3 -1 lines
Diff to previous 1.62 (colored) to selected 1.30 (colored)
warn about botched .Xr ordering and punctuation below SEE ALSO; inspired by mdoclint(1)
Revision 1.62 / (download) - annotate - [select for diffs], Sun Sep 7 23:24:33 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored) to selected 1.30 (colored)
warn about AUTHORS sections without .An macros, inspired by mdoclint(1)
Revision 1.61 / (download) - annotate - [select for diffs], Sun Sep 7 02:17:36 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.60: +5 -2 lines
Diff to previous 1.60 (colored) to selected 1.30 (colored)
always use the right buffer, and fix one evil typo
Revision 1.60 / (download) - annotate - [select for diffs], Sat Sep 6 23:24:27 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.59: +5 -16 lines
Diff to previous 1.59 (colored) to selected 1.30 (colored)
Simplify by handling empty request lines at the one logical place in the roff parser instead of in three other places in other parsers. No functional change.
Revision 1.59 / (download) - annotate - [select for diffs], Sat Sep 6 22:38:35 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.58: +42 -27 lines
Diff to previous 1.58 (colored) to selected 1.30 (colored)
Move main format autodetection from the parser dispatcher to the roff parser where .Dd and .TH are already detected, anyway. This improves robustness because it correctly handles whitespace or an alternate control character before Dd. In the parser dispatcher, provide a fallback looking ahead in the input buffer instead of always assuming man(7). This corrects autodetection when Dd is preceded by other macros or macro-like handled requests like .ll. Triggered by reports from Daniel Levai about issues on Slackware Linux.
Revision 1.58 / (download) - annotate - [select for diffs], Wed Sep 3 23:20:33 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.57: +97 -3 lines
Diff to previous 1.57 (colored) to selected 1.30 (colored)
Add *.gz support to apropos(1) -a, manm(1), and even mandoc(1). Implemented by moving the zip code from makewhatis(8) to the parser lib.
Revision 1.57 / (download) - annotate - [select for diffs], Fri Aug 8 16:17:09 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.56: +8 -5 lines
Diff to previous 1.56 (colored) to selected 1.30 (colored)
Bring the handling of defective prologues even closer to groff, in particular relaxing the distinction between prologue and body and further improving messages. * The last .Dd wins and the last .Os wins, even in the body. * The last .Dt before the first body macro wins. * Missing title in .Dt defaults to UNTITLED. Warn about it. * Missing section in .Dt does not default to 1. But warn about it. * Do not warn multiple times about the same mdoc(7) prologue macro. * Warn about missing .Os. * Incomplete .TH defaults to empty strings. Warn about it.
Revision 1.56 / (download) - annotate - [select for diffs], Fri Aug 8 15:54:10 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.55: +9 -9 lines
Diff to previous 1.55 (colored) to selected 1.30 (colored)
mention requests and macros in more messages
Revision 1.55 / (download) - annotate - [select for diffs], Fri Aug 8 15:48:43 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.54: +1 -2 lines
Diff to previous 1.54 (colored) to selected 1.30 (colored)
Dynamically allocate the stack of roff(7) .ie condition values and thus get rid of the last useless fatal error.
Revision 1.54 / (download) - annotate - [select for diffs], Fri Aug 8 15:45:58 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.53: +3 -2 lines
Diff to previous 1.53 (colored) to selected 1.30 (colored)
Split MANDOCERR_IGNARGV into one message for .An and one for .Bl and report the macro name and argument.
Revision 1.53 / (download) - annotate - [select for diffs], Fri Aug 8 15:42:39 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.52: +1 -2 lines
Diff to previous 1.52 (colored) to selected 1.30 (colored)
In .Bl -column, if some of the column width declarations are given right after the -column argument and some at the very end of the argument list, after some other arguments like -compact, concatenate the column lists. This gets rid of one of the last useless FATAL errors and actually shortens the code by a few lines. This fixes an issue introduced more than five years ago, at first causing an assert() since bsd.lv mdoc_action.c rev. 1.14 (June 17, 2009), then later a FATAL error since mdoc_validate rev. 1.130 (Nov. 30, 2010), and marked as "TODO" ever since.
Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 8 15:38:46 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.51: +1 -2 lines
Diff to previous 1.51 (colored) to selected 1.30 (colored)
Remove the useless FATAL error "argument count wrong, violates syntax". The last remaining instance was .It in .Bl -column with more than one excessive .Ta. However, simply downgrading from FATAL to ERROR, it just works fine, almost the same way as in groff, without any other changes.
Revision 1.51 / (download) - annotate - [select for diffs], Fri Aug 8 15:26:28 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored) to selected 1.30 (colored)
Get rid of the useless FATAL error "child violates parent syntax". When finding items outside lists, simply skip them and throw an ERROR. Handle subsections before the first section instead of bailing out.
Revision 1.50 / (download) - annotate - [select for diffs], Fri Aug 8 15:21:17 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.49: +22 -18 lines
Diff to previous 1.49 (colored) to selected 1.30 (colored)
Remove two useless FATAL errors. When a file contains neither text nor macros, treat it as an empty document. When the mdoc(7) document prologue is incomplete, use some default values.
Revision 1.49 / (download) - annotate - [select for diffs], Fri Aug 8 15:15:27 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.30 (colored)
better name and wording for the last two non-generic errors
Revision 1.48 / (download) - annotate - [select for diffs], Fri Aug 8 15:10:15 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored) to selected 1.30 (colored)
Various improvements related to .Ex and .Rv: * let .Nm fall back to the empty string, not to UNKNOWN * never let .Rv copy an argument from .Nm * avoid spurious \fR after empty .Nm in -Tman * correct handling of .Ex and .Rv in -Tman * correct the wording of the output for .Rv without arguments * use non-breaking spaces in .Ex and .Rv output where required * split MANDOCERR_NONAME into a warning for .Ex and an error for .Nm
Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 9 11:30:07 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.30 (colored)
mark defos as const; nobody needs to change it, and it is occasionally useful to be able to pass literal strings
Revision 1.46 / (download) - annotate - [select for diffs], Mon Jul 7 21:35:42 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.45: +9 -6 lines
Diff to previous 1.45 (colored) to selected 1.30 (colored)
Clean up ERROR messages related to document structure and macros: Hierarchical naming and mention macro names in messages.
Revision 1.45 / (download) - annotate - [select for diffs], Mon Jul 7 16:12:06 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored) to selected 1.30 (colored)
no need to delete any content from .Rs blocks, and downgrade the related message from ERROR to WARNING
Revision 1.44 / (download) - annotate - [select for diffs], Mon Jul 7 15:03:24 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.43: +1 -2 lines
Diff to previous 1.43 (colored) to selected 1.30 (colored)
no need to skip content before first section header
Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 7 11:34:41 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.42: +1 -2 lines
Diff to previous 1.42 (colored) to selected 1.30 (colored)
implement .dei and .ami
Revision 1.42 / (download) - annotate - [select for diffs], Sun Jul 6 19:08:56 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.41: +7 -6 lines
Diff to previous 1.41 (colored) to selected 1.30 (colored)
Clean up messages related to plain text and to escape sequences. * Mention invalid escape sequences and string names, and fallbacks. * Hierarchical naming.
Revision 1.41 / (download) - annotate - [select for diffs], Sat Jul 5 12:33:54 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.40: +6 -7 lines
Diff to previous 1.40 (colored) to selected 1.30 (colored)
Cleanup with respect to bad macro arguments. * Fix .Sm with invalid arg: move arg out and toggle mode. * Promote "unknown standard" from WARNING to ERROR, it loses information. * Delete MANDOCERR_BADWIDTH, it would only indicate a mandoc(1) bug. * Do not report MANDOCERR_BL_LATETYPE when there is no type at all. * Mention macro names, arguments and fallbacks.
Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 5 01:11:33 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored) to selected 1.30 (colored)
Cleanup regarding -offset and -width: * Bugfix: Last one wins, not first one. * Fix .Bl -width without argument: it means 0n, so do not ignore it. * Report macro names, argument names and fallbacks in related messages. * Simplify: Garbage collect auxiliary variables in pre_bd() and pre_bl().
Revision 1.39 / (download) - annotate - [select for diffs], Fri Jul 4 16:11:41 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.38: +5 -4 lines
Diff to previous 1.38 (colored) to selected 1.30 (colored)
Clean up messages regarding excess arguments: * Downgrade ".Bf -emphasis Em" from FATAL to WARNING. * Mention the macros, the arguments, and the fallbacks. * Hierarchical naming. Also fix the handling of excess .It head arguments in -Tman.
Revision 1.38 / (download) - annotate - [select for diffs], Fri Jul 4 01:50:03 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.37: +8 -8 lines
Diff to previous 1.37 (colored) to selected 1.30 (colored)
Clean up messages related to missing arguments. * Do not warn about empty -column cells, they seem valid to me. * Downgrade empty item and missing -std from ERROR to WARNING. * Hierarchical naming. * Descriptive, not imperative style. * Mention macro names, argument names, and fallbacks. * Garbage collect some unreachable code in post_it().
Revision 1.37 / (download) - annotate - [select for diffs], Thu Jul 3 23:23:45 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored) to selected 1.30 (colored)
Fix formatting of empty .Bl -inset item heads. Downgrade empty item heads from ERROR to WARNING. Show the list type in the error message. Choose better variable names for nodes in post_it().
Revision 1.36 / (download) - annotate - [select for diffs], Thu Jul 3 21:23:08 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored) to selected 1.30 (colored)
MANDOCERR_NOARGS reported three completely unrelated classes of problems. Split the roff(7) parts out of it and report the request names for these cases.
Revision 1.35 / (download) - annotate - [select for diffs], Wed Jul 2 13:10:15 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored) to selected 1.30 (colored)
Disentangle the MANDOCERR_CHILD message, which reported three completely different things, into three distinct messages. Also mention the macro names we are talking about.
Revision 1.34 / (download) - annotate - [select for diffs], Wed Jul 2 11:42:56 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) to selected 1.30 (colored)
Clean up warnings related to macros and nesting. * Hierarchical naming of enum mandocerr items. * Improve the wording to make it comprehensible. * Mention the offending macro. * Garbage collect one chunk of ancient, long unreachable code.
Revision 1.33 / (download) - annotate - [select for diffs], Wed Jul 2 03:47:07 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored) to selected 1.30 (colored)
Implement the obsolete macros .En .Es .Fr .Ot for backward compatibility, since this is hardly more complicated than explicitly ignoring them as we did in the past. Of course, do not use them!
Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 1 22:36:35 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +11 -11 lines
Diff to previous 1.31 (colored) to selected 1.30 (colored)
Clean up the warnings related to document structure. * Hierarchical naming of the related enum mandocerr items. * Mention the offending macro, section title, or string. While here, improve some wordings: * Descriptive instead of imperative style. * Uniform style for "missing" and "skipping". * Where applicable, mention the fallback used.
Revision 1.31 / (download) - annotate - [select for diffs], Mon Jun 30 23:45:03 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.30: +1 -5 lines
Diff to previous 1.30 (colored)
garbage collect two unused enum mandocerr items and fix a couple of comments while here
Revision 1.30 / (download) - annotate - [selected], Wed Jun 25 00:19:17 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +7 -2 lines
Diff to previous 1.29 (colored)
Improve messages related to the roff(7) .so request. In all these messages, show the filename argument that was passed to the .so request. In case of failure, show an additional message reporting the file and the line number where the failing request was found. The existing message reporting the reason for the failure - for example, "Permission denied" - is left in place, unchanged. Inspired by a question asked by Nick@ after he saw the confusing old messages that used to be emitted in this area.
Revision 1.29 / (download) - annotate - [select for diffs], Sat Jun 21 22:23:44 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored) to selected 1.30 (colored)
Reduce the verbosity of error messages caused by open(2) failures. Suggested by and ok jmc@.
Revision 1.28 / (download) - annotate - [select for diffs], Fri Jun 20 22:58:41 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +4 -3 lines
Diff to previous 1.27 (colored) to selected 1.30 (colored)
As suggested by jmc@, only include line and column numbers into messages when they are meaningful, to avoid confusing stuff like this: $ mandoc /dev/null mandoc: /dev/null:0:1: FATAL: not a manual Instead, just say: mandoc: /dev/null: FATAL: not a manual Another example this applies to is documents having a prologue, but lacking a body. Do not throw a FATAL error for these; instead, issue a warning and show the empty document, in the man(7) case with the same amount of blank lines as groff does. Also downgrade mdoc(7) documents having content before the first .Sh from FATAL to WARNING.
Revision 1.27 / (download) - annotate - [select for diffs], Fri Jun 20 17:23:09 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored) to selected 1.30 (colored)
Start systematic improvements of error reporting. So far, this covers all WARNINGs related to the prologue. 1) hierarchical naming of MANDOCERR_* constants 2) mention the macro name in messages where that adds clarity 3) add one missing MANDOCERR_DATE_MISSING msg 4) fix the wording of one message related to the man(7) prologue Started on the plane back from Ottawa.
Revision 1.26 / (download) - annotate - [select for diffs], Sun Apr 20 22:03:40 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.30 (colored)
in debug messages, truncating strings of excessive lengths is actually a good thing, so cast the return value from sprintf to (void); this concludes the mandoc sprintf audit
Revision 1.25 / (download) - annotate - [select for diffs], Sun Apr 20 16:44:44 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.24: +49 -50 lines
Diff to previous 1.24 (colored) to selected 1.30 (colored)
KNF: case (FOO): -> case FOO, remove /* LINTED */ and /* ARGSUSED */, remove trailing whitespace and blanks before tabs, improve some indenting; no functional change
Revision 1.24 / (download) - annotate - [select for diffs], Fri Mar 21 22:17:01 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored) to selected 1.30 (colored)
The files mandoc.c and mandoc.h contained both specialised low-level functions used for multiple languages (mdoc, man, roff), for example mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary functions. Split the auxiliaries out into their own file and header. While here, do some #include cleanup.
Revision 1.23 / (download) - annotate - [select for diffs], Wed Mar 19 22:20:36 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +20 -3 lines
Diff to previous 1.22 (colored) to selected 1.30 (colored)
Without the MPARSE_SO option, if the file contains nothing but a single .so request, do not read the file pointed to, but instead let mparse_result() provide the file name pointed to as a return value. To be used by makewhatis(8) in the future.
Revision 1.22 / (download) - annotate - [select for diffs], Wed Mar 19 21:50:59 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +17 -19 lines
Diff to previous 1.21 (colored) to selected 1.30 (colored)
Generalize the mparse_alloc() and roff_alloc() functions by giving them an "options" argument, replacing the existing "inttype" and "quick" arguments, preparing for a future MPARSE_SO option. Store this argument in struct mparse and struct roff, replacing the existing "inttype", "parsetype", and "quick" members. No functional change except one tiny cosmetic fix in roff_TH().
Revision 1.21 / (download) - annotate - [select for diffs], Mon Jan 6 21:33:00 2014 UTC (10 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored) to selected 1.30 (colored)
Another 25% speedup for mandocdb(8) -Q mode, found with gprof(1). For /usr/share/man, we only need 56% of the time of makewhatis(8) now. In groff, user-defined macros clashing with mdoc(7) or man(7) standard macros are cleared when parsing the .Dd or .TH macro, respectively. Of course, we continue doing that in standard mode to assure full groff bug compatibility. However, in -Q mode, full groff bug compatibility makes no sense when it's unreasonably expensive, so skip this step in -Q mode. Real-world manuals hardly ever redefine standard macros, that's terrible style, and if they do, it's pointless to do so before .Dd or .TH because it has no effect. Even if someone does, it's extremely unlikely to break mandocdb(8) -Q parsing because we abort the parse sequence after the NAME section, anyway. So if you manually redefine .Sh, .Nm, .Nd, or .SH in a way that doesn't work at all and rely on .Dd or .TH to fix it up for you, your broken manual will no longer get a perfect apropos(1) entry until you re-run mandocdb(8) without -Q. It think that consequence is acceptable in order to get a 25% speedup for everyone else.
Revision 1.20 / (download) - annotate - [select for diffs], Mon Jan 6 00:53:14 2014 UTC (10 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored) to selected 1.30 (colored)
Joerg Sonnenberger contributed copyrightable amounts of text to some files. To make it clear that he also put his contributions under the ISC license, with his explicit permission, add his Copyright notice to the relevant files. No code change.
Revision 1.19 / (download) - annotate - [select for diffs], Sun Jan 5 20:26:27 2014 UTC (10 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +11 -9 lines
Diff to previous 1.18 (colored) to selected 1.30 (colored)
Add an option -Q (quick) to mandocdb(8) for accelerated generation of reduced-size databases. Implement this by allowing the parsers to optionally abort the parse sequence after the NAME section. While here, garbage collect the unused void *arg attribute of struct mparse and mparse_alloc(). This reduces the processing time of mandocdb(8) on /usr/share/man by a factor of 2 and the database size by a factor of 4. However, it still takes 5 times the time and 6 times the space of makewhatis(8), so more work is clearly needed.
Revision 1.18 / (download) - annotate - [select for diffs], Thu Jan 2 16:29:46 2014 UTC (10 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +41 -17 lines
Diff to previous 1.17 (colored) to selected 1.30 (colored)
Since the functions in read.c are part of the mandoc(3) library, do not print to stderr. Instead, properly use the mmsg callback. Issue noticed by Abhinav Upadhyay <er dot abhinav dot upadhyay at gmail dot com> and Thomas Klausner <wiz at NetBSD>.
Revision 1.17 / (download) - annotate - [select for diffs], Mon Sep 16 00:25:06 2013 UTC (10 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored) to selected 1.30 (colored)
One of the WARNING messages has to use the word "section" twice in two different meanings, that cannot be helped. But we can make this less confusing by stating that the second instance refers to stuff like (2), (3), and (9), and by adding the sections header the first instance refers to, for example ERRORS or RETURN VALUES. Source for confusion noticed by Jan Stary <hans at stare dot cz>, better wording suggested by jmc@, tweaked by me.
Revision 1.16 / (download) - annotate - [select for diffs], Sat Jul 13 12:51:38 2013 UTC (10 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored) to selected 1.30 (colored)
Rudimentary implementation of the .it request (input line trap). As with any low-level roff request involving subtle interactions with macro internals, this implementation is not exact, but it does handle the simplest cases. This request occurs in man(7) code generated from DocBook, for example mysql(1) and yasm_arch(7). Thanks to brad@ for reporting the issue back in January 2011.
Revision 1.15 / (download) - annotate - [select for diffs], Sun Jun 2 03:35:21 2013 UTC (11 years ago) by schwarze
Branch: MAIN
Changes since 1.14: +42 -45 lines
Diff to previous 1.14 (colored) to selected 1.30 (colored)
Sync with bsd.lv, reshuffling the code a bit among mparse_readfd() and mparse_parse_buffer(), no functional change intended. Exclude the following from the sync: - Skip the mparse_readmem() function, it's useless in OpenBSD. - Thus, UNCONST isn't used, so no need for "main.h" and <stdint.h>. - Skip HAVE_CONFIG_H (always off here) and HAVE_MMAP (always on here).
Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 1 22:57:30 2013 UTC (11 years ago) by schwarze
Branch: MAIN
Changes since 1.13: +14 -14 lines
Diff to previous 1.13 (colored) to selected 1.30 (colored)
This file contains too much complexity. Remove one layer of indirection by deleting mparse_readfd_r() and doing its work in the public mparse_readfd(). As a bonus, catch recursive .so. This is part of the preparations to resync to mdocml.bsd.lv.
Revision 1.13 / (download) - annotate - [select for diffs], Thu May 30 03:51:59 2013 UTC (11 years ago) by schwarze
Branch: MAIN
Changes since 1.12: +24 -9 lines
Diff to previous 1.12 (colored) to selected 1.30 (colored)
Reject non-printable characters found in the input stream even when preceded by a backslash; otherwise, the escape sequence would later be identified as invalid and the non-printable character would be passed through to the output backends, sometimes triggering assertions. Reported by Mike Small <smallm at panix dot com> on the mdocml discuss list.
Revision 1.12 / (download) - annotate - [select for diffs], Mon Nov 19 22:28:35 2012 UTC (11 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored) to selected 1.30 (colored)
Do not crash on stray .Ta macros found outside column lists. Problem reported by jmc@, thanks.
Revision 1.11 / (download) - annotate - [select for diffs], Fri Nov 16 22:20:40 2012 UTC (11 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored) to selected 1.30 (colored)
Warn about unknown volume or arch in Dt macro arguments; patch written by Nicolas Joly <njoly at pasteur dot fr>.
Revision 1.10 / (download) - annotate - [select for diffs], Wed Jul 18 11:09:30 2012 UTC (11 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored) to selected 1.30 (colored)
Fix handling of paragraph macros inside lists: * When they are trailing the last item, move them outside the list. * When they are trailing any other none-compact item, drop them. Improves formatting of 40 pages, e.g. grep(1), ksh(1), netstat(1), ath(4), bsd.port.mk(5), pf.conf(5), mount(8), crypto(9).
Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 12 15:09:50 2012 UTC (11 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.30 (colored)
The post_nm() validation function crashed when the first .Nm child node was a non-text node. Fix this by rewriting post_nm() to always set the meta name to UNKNOWN when the name is missing or unusable. While here, make MANDOCERR_NONAME an ERROR, as it usually renders the page content unintelligible. Bug reported by Maxim <Belooussov at gmail dot com>, thanks.
Revision 1.8 / (download) - annotate - [select for diffs], Sat Jun 2 23:18:30 2012 UTC (12 years ago) by schwarze
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.30 (colored)
In groff, trying to redefine standard man(7) macros before .TH has no effect; after .TH, it works. Trying to redefine standard mdoc(7) macros before .Dd works when calling groff with the -mdoc command line option, but does not when calling groff with -mandoc; after .Dd, it always works. Arguably, one might call that buggy behaviour in groff, but it is very unlikely that anybody will change groff in this respect (certainly, i'm not volunteering). So let's be bug-compatible. This fixes the vertical spacing in sox(1).
Revision 1.7 / (download) - annotate - [select for diffs], Thu May 24 23:33:23 2012 UTC (12 years ago) by schwarze
Branch: MAIN
Changes since 1.6: +9 -4 lines
Diff to previous 1.6 (colored) to selected 1.30 (colored)
Support -Ios='OpenBSD 5.1' to override uname(3) as the source of the default value for the mdoc(7) .Os macro. Needed for man.cgi on the OpenBSD website. Problem with man.cgi first noticed by deraadt@; beck@ and deraadt@ agree with the way to solve the issue.
Revision 1.6 / (download) - annotate - [select for diffs], Sun Feb 26 21:01:43 2012 UTC (12 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +8 -5 lines
Diff to previous 1.5 (colored) to selected 1.30 (colored)
Don't silently skip non-ASCII characters, but replace them with ``?''. This is less likely to break the syntax of macros. Patch provided by joerg@.
Revision 1.5 / (download) - annotate - [select for diffs], Sat Nov 5 16:02:18 2011 UTC (12 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored) to selected 1.30 (colored)
When the HEAD scope of .TP is broken by another block macro, do not abort with a FATAL error, but report a regular ERROR, remove the broken .TP from the syntax tree, and prod on. Reported repeatedly by ports people, at least by brad@ and jeremy@. Also fixes rendition(4) in Xenocara.
Revision 1.4 / (download) - annotate - [select for diffs], Sun Oct 9 17:59:56 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +51 -1 lines
Diff to previous 1.3 (colored) to selected 1.30 (colored)
Sync to version 1.12.0; all code by kristaps@: Implement .Rv in -Tman. Let -man -Tman work a bit like cat(1). Add the -Ofragment option to -T[x]html. Minor fixes in -T[x]html. Lots of apropos(1) and -Tman code cleanup.
Revision 1.3 / (download) - annotate - [select for diffs], Sun Sep 18 10:25:28 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +16 -9 lines
Diff to previous 1.2 (colored) to selected 1.30 (colored)
sync to version 1.11.5: adding an implementation of the eqn(7) language by kristaps@ So far, only .EQ/.EN blocks are handled, in-line equations are not, and rendering is not yet very pretty, but the parser is fairly complete.
Revision 1.2 / (download) - annotate - [select for diffs], Sun May 29 21:22:18 2011 UTC (13 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored) to selected 1.30 (colored)
Merge release 1.11.3, almost all code by kristaps@: * Unicode output support (no Unicode input yet, though). * Refactoring: completely handle predefined strings in roff.c. - New function mandoc_escape() replaces a2roffdeco() and mandoc_special(). - Start using mandoc_getarg() in mdoc_argv.c. - Clean up parsing of delimiters in mdoc(7). * And many minor fixes and lots of cleanup.
Revision 1.1 / (download) - annotate - [select for diffs], Sun Apr 24 16:22:02 2011 UTC (13 years, 1 month ago) by schwarze
Branch: MAIN
Diff to selected 1.30 (colored)
Merge version 1.11.1: Again lots of cleanup and maintenance work by kristaps@. - simplify error reporting: less function pointers, more mandoc_[v]msg - main: split document parsing out of main.c into read.c - roff, mdoc, man: improved recognition of control characters - roff: better handling of if/else stack overflows - roff: add some predefined strings for backward compatibility - mdoc, man: empty sections are not errors - mdoc: move delimiter handling to libmdoc - some header restructuring and some minor features and fixes This merge causes two minor regressions that i will fix in separate commits right afterwards.