aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Improve rev. 1.250 further:Ingo Schwarze2017-07-151-2/+2
| | | | | | | | If a database is empty, we already don't write a database file and delete an existing one. If none exists, that only means the database was empty and remains so, which is not an error. So don't nag about it, in particular because that would be a weekly(8) annoyance. Issue reported by jmc@.
* first draft of the 1.14.2 release notesIngo Schwarze2017-07-151-1/+75
|
* always give commas their own <mo> element,Ingo Schwarze2017-07-141-2/+2
| | | | suggested by bentley@, improves e.g. glMultMatrix(3)
* The .Dd and .TH macros must interrupt .ce, too;Ingo Schwarze2017-07-141-2/+3
| | | | fixing tree corruption and assertion failure found by jsg@ with afl(1)
* Explicitly initialize a variable where the compiler is (understandably)Ingo Schwarze2017-07-141-6/+7
| | | | | | unable to figure out that it is never used uninitialized. While here, tweak the content of the variable to make its usage easier to understand. No functional change.
* Fix an assertion failure triggered by print_otag("sw+-l", NULL).Ingo Schwarze2017-07-141-2/+7
| | | | | | Even though we skip the style when the argument is NULL, we must still consume the options. Not found with afl(1), but during manual testing of the previous patch...
* Handle .Bl -compact via CSS rather than writing individual styleIngo Schwarze2017-07-144-54/+31
| | | | | | | | attributes into .It blocks; suggested by Steffen Nurpmeso <steffen at sdaoden dot eu> on <groff at GNU dot org> in April 2017. Delete margin-bottom and margin-top style names and the 'v' argument letter from print_otag() because they are no longer used.
* print HTML character references as 4+ digits hexadecimal, like Unicode;Ingo Schwarze2017-07-1412-335/+335
| | | | from bentley@, tweaked by me
* do not print <math class="eqn"><mrow></mrow></math> for empty .EQ;Ingo Schwarze2017-07-141-1/+4
| | | | issue reported by bentley@
* eqn(7) nits from bentley@Ingo Schwarze2017-07-141-1/+10
|
* eqn(7) .EQ has to break man(7) next-line scope, or tree corruptionIngo Schwarze2017-07-131-1/+3
| | | | and use after free many ensue; again found by jsg@ with afl(1)
* Simplify by creating struct roff_node syntax tree nodes for tbl(7)Ingo Schwarze2017-07-088-100/+65
| | | | | | | | | | | | 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.
* fix an assertion failure triggered by .ce in next-line scope;Ingo Schwarze2017-07-081-2/+3
| | | | found by jsg@ with afl(1)
* 1. Eliminate struct eqn, instead use the existing membersIngo Schwarze2017-07-0814-206/+125
| | | | | | 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.
* Correctly handle horizontal spans at the beginning of rows,Ingo Schwarze2017-07-081-9/+10
| | | | | | | | fixing an assertion failure found by jsg@ with afl(1). While here, also drop printing of whitespace in tbl_data() which makes no difference because column positioning code in term_tbl() already takes care of that.
* garbage collect unused enum member EQN_ROOTIngo Schwarze2017-07-072-6/+2
|
* add parentheses to the output where required for disambiguationIngo Schwarze2017-07-0710-16/+38
|
* simplify the eqn_box_makebinary() function by removing the trivial posIngo Schwarze2017-07-071-13/+11
| | | | parameter; also minus two lines of code; no functional change
* Radically simplify the definitions what the message levels ERRORIngo Schwarze2017-07-071-27/+8
| | | | and WARNING mean: minus 20 lines of mdoc source. OK jmc@.
* Now that we have the -Wstyle message level, downgrade six warningsIngo Schwarze2017-07-0620-144/+144
| | | | | | 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.
* Fix operator precedence according to Brian W. Kernighan and LorindaIngo Schwarze2017-07-0622-50/+111
| | | | | L. Cherry, "Typesetting Mathematics - User's Guide (Second Edition)", August 15, 1978, paragraph 23; swarm of bugs pointed out by bentley@.
* The EQN_LISTONE box type is pointless.Ingo Schwarze2017-07-055-20/+27
| | | | | | Simplify by just using EQN_LIST with expectargs = 1. Noticed while investigating a bug report from bentley@. No functional change.
* nits about trailing punctuation found with mandoc -TlintIngo Schwarze2017-07-052-21/+21
|
* various nits found with mandoc -TlintIngo Schwarze2017-07-046-20/+26
|
* Fix handling of \} on roff request lines.Ingo Schwarze2017-07-043-19/+34
| | | | Cures bogus error messages in pages generated with pod2man(1).
* It turns out association of tbl spans with layout rows is simpler thanIngo Schwarze2017-07-045-55/+72
| | | | i thought. Fixing a bug in curs_addch(3) and minus 25 lines of code.
* adjust to today's change of the OpenBSD groff portIngo Schwarze2017-07-041-1/+1
|
* Messages of the -Wbase level now print STYLE:. Since thisIngo Schwarze2017-07-041244-2725/+2682
| | | | | | | | causes horrible churn anyway, profit of the opportunity to stop excessive testing, such that this is hopefully the last instance of such churn. Consistently use OpenBSD RCS tags, blank .Os, blank fourth .TH argument, and Mdocdate like everywhere else. Use -Ios=OpenBSD for platform-independent predictable output.
* Printing "BASE:" in messages about violations of base system conventionsIngo Schwarze2017-07-043-7/+12
| | | | | is confusing, simply print "STYLE:", which is intuitive and does not sound excessively alarming; suggested by jmc@, OK tedu@ jmc@.
* report trailing delimiters after macros where they are usually a mistake;Ingo Schwarze2017-07-034-59/+109
| | | | the idea came up in a discussion with Thomas Klausner <wiz at NetBSD>
* warn about time machines; suggested by Thomas Klausner <wiz @ NetBSD>Ingo Schwarze2017-07-034-7/+25
|
* If a single page references the same non-existent manual more thanIngo Schwarze2017-07-023-4/+11
| | | | | | once, print "(N times)" after the message "referenced manual not found", to lessen the risk that people fix the first instance and miss the others; jmc@ confirmed that this is useful.
* add warning "cross reference to self"; inspired by mdoclintIngo Schwarze2017-07-027-21/+60
|
* When checking cross references with -Tlint, ultimately fall back toIngo Schwarze2017-07-011-3/+12
| | | | | | | | | | | | | | | | | looking in the current working directory. Not a security issue because the files are never open(2)ed, only access(2)ed. Requested by jmc@ and inspired by mdoclint(1). This cannot be perfect because it only works for files having the exact filename ./pagename.sec - mandoc has no way to figure out which files might contain a manual for multiple names, or that files in autohell might be called ./pagename.man.in instead, or which subdirectories might contain additional source files. Also, it may hide messages if you have bogus stuff lying around in the directory where you run mandoc -Tlint. But jmc@ considers it important, and good enough for everyday use. Also avoid leaking the memory for the file name while here.
* When checking the validity of cross references with -Tlint,Ingo Schwarze2017-07-011-7/+13
| | | | | | | | | | | | | fall back from database search to file system search just like man(1) does when looking up manuals. This is not too expensive because on a system having up-to-date mandoc.db(5) files, it only prolongs the time needed to check *invalid* references - and you are not supposed to have many of those, right? And on a system with missing or invalid mandoc.db(5) files, spending a bit of time and warning loudly about the real problem is also better than quickly issuing bogus warnings about cross references that are actually valid.
* Basic reporting of .Xrs to manual pages that don't existIngo Schwarze2017-07-0115-28/+253
| | | | | | | | | | | | 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.
* Skip whitespace at the beginning of eqn(7) nodes,Ingo Schwarze2017-06-291-2/+2
| | | | | | in particular ~ and ^ that misrendered; found by bentley@ in glCopyTexSubImage1D(3); also affected glAccum(3), glClipPlane(3), glDrawPixels(3), glEvalMesh(3), and others.
* warn about some non-portable idioms in .Bl -column;Ingo Schwarze2017-06-2911-17/+119
| | | | triggered by a question from Yuri Pankov (illumos)
* Clarify that .Ta as a line macro is a portability problem,Ingo Schwarze2017-06-291-5/+5
| | | | | even though mandoc(1) handles it; triggered by a question from Yuri Pankov (illumos).
* fix incomplete handling of roff(7) nodes in man(7) block next-line scope;Ingo Schwarze2017-06-281-4/+7
| | | | assertion failure in tclsh(1) reported by deraadt@ via bentley@
* Rewrite half of this, i was completely unaware how bad it was.Ingo Schwarze2017-06-281-187/+253
| | | | | | | | Remove several lies, lots of duplicate information, and a lengthy discussion of features we don't support. Clarify the wording in some places and make it more concise in others. Delete examples from where they don't belong and write a new EXAMPLES section from scratch.
* test inter-column spacingIngo Schwarze2017-06-273-1/+33
|
* Implement spacing of columns as defined in the table layout;Ingo Schwarze2017-06-274-26/+43
| | | | | this is for example used by lftp(1) and, ironically, misused by our very own tbl(7) manual...
* warn about .Ns macros that have no effect because they are followedIngo Schwarze2017-06-276-10/+32
| | | | by an isolated closing delimiter; inspired by mdoclint
* catch up with the recent eqn(7) improvementsIngo Schwarze2017-06-2642-37/+229
|
* Complete rewrite of the lexer in a single function with four operationIngo Schwarze2017-06-262-244/+165
| | | | | | | | | | | | | | | | | | | | modes instead of four functions, resulting in considerable simplification, fifty lines less of code, fifteen fewer automatic variables, and several bug fixes, for example: 1. The delim control statement consumes exactly two bytes of input, requires no whitespace after these two bytes, and does not treat quotes in any special way. 2. If the argument of left, right, gfont, gsize, or size is defined as an alias, only the first word of the value is used as the delimiter, font name, or font size. 3. If a back, fwd, down, or up keyword is followed by another keyword instead of the required number, GNU eqn does nothing useful, but typically errors out. So no need to have special handling (with an ugly goto!) for it in mandoc. Also getting rid of one pointless static buffer and twelve redundant calls to strlcpy(3).
* when splitting a composite word,Ingo Schwarze2017-06-261-7/+10
| | | | do not forget to close the inserted list box
* Catch typos in .Sh names; suggested by jmc@.Ingo Schwarze2017-06-254-5/+73
| | | | | | 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.
* test new MT macroIngo Schwarze2017-06-258-1/+100
|
* cope with changes in BASE messagesIngo Schwarze2017-06-25215-370/+531
|