aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* add support for the MT and ME mailto macros, used for example in wg(8);Ingo Schwarze2017-06-258-14/+52
| | | | patch from bentley@
* delete useless .Ns macro that jmc@ found with mdoclint(1)Ingo Schwarze2017-06-241-2/+2
|
* document message "unknown architecture"Ingo Schwarze2017-06-241-1/+7
|
* operating system dependent message about unknown architecture;Ingo Schwarze2017-06-243-3/+44
| | | | inspired by mdoclint
* delete old, undocumented, obsolete section names that nobody usesIngo Schwarze2017-06-241-7/+1
|
* in the base system, suggest leaving .Os blank; inspired by mdoclintIngo Schwarze2017-06-244-4/+19
|
* Split -Wstyle into -Wstyle and the even lower -Wbase, and addIngo Schwarze2017-06-2421-140/+243
| | | | | | | | | | | | | | | -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@.
* Delete .St -p1003.1-2013.Ingo Schwarze2017-06-242-9/+3
| | | | | | | It is an OpenBSD addition that did not get used a single time in three years, and groff did not pick it up either, so removing it does not affect any existing manuals anywhere. Cleanup suggested by jmc@, OK bentley@.
* Consistently treat character escape sequences as operators,Ingo Schwarze2017-06-231-9/+15
| | | | | | | | not as letters, even if their names contain letters. This is certainly not perfect, but code to recognize that \(*a is not an operator but a letter would need a huge table, or Unicode character property support, which won't happen at this time.
* eqn(1) output operator translationIngo Schwarze2017-06-231-1/+8
|
* splitting a text box sometimes requires wrapping it in a listIngo Schwarze2017-06-231-2/+20
|
* Stop using "mdocml" as an official name.Ingo Schwarze2017-06-233-18/+20
| | | | Prefer mandoc.bsd.lv to mdocml.bsd.lv.
* Write text boxes as <mi>, <mn>, or <mo> as appropriate,Ingo Schwarze2017-06-233-6/+54
| | | | | and write fontstyle or fontweight attributes where required. Missing features reported by bentley@.
* Simplify font handling:Ingo Schwarze2017-06-231-37/+41
| | | | | | | | | | | | | | | 1. Inherit the font attribute from the parent box, such that iteration is no longer required to find the current font. 2. For well-known function name tokens, do not insert an EQN_LISTONE box into the AST; simply set the font attribute of the text box itself that contains the name. Also improve word splitting of unquoted strings in default font mode: 3. Split between numbers and punctuation because both will soon get different HTML markup. 4. Do not split between letters. With the newly ubiquitious font attributes, all formatters will be able to figure out what to do without putting each letter into a separate box.
* Fix font selection for text boxes in the terminal formatter.Ingo Schwarze2017-06-221-8/+22
| | | | | | | | Issue reported by bentley@. The AST data structure is powerful enough that all required information can easily be provided in the parser, and no change of the formatting code is needed.
* Outside explicit font context, give every letter its own box.Ingo Schwarze2017-06-211-14/+45
| | | | | The formatters need this to correctly select fonts. Missing feature reported by bentley@.
* quoted words are not parsed for defined keysIngo Schwarze2017-06-211-12/+11
|
* Recognize well-known functions names (the same that Heirloom recognizes,Ingo Schwarze2017-06-211-17/+38
| | | | | | which includes those recognized by groff) and wrap them in a roman box unless they already are in roman context. Missing feature reported by bentley@.
* KNF: remove parentheses from switch case labels; no binary changeIngo Schwarze2017-06-203-85/+85
|
* Fix a regression in the previous revision:Ingo Schwarze2017-06-191-3/+7
| | | | | When there is no link description, reuse the URI. Reported by tj@ and bentley@.
* Implement appending to standard man(7) and mdoc(7) macros with .am.Ingo Schwarze2017-06-1813-142/+286
| | | | | | | | | | | | | | | | | | With roff_getstrn(), provide finer control which definitions can be used for what: * All definitions can be used for .if d tests and .am appending. * User-defined for \* expansion, .dei expansion, and macro calling. * Predefined for \* expansion. * Standard macros, original or renamed, for macro calling. Several related improvements while here: * Do not return string table entries that have explicitly been removed. * Do not create a rentab entry when trying to rename a non-existent macro. * Clear an existing rentab entry when the external interface roff_setstr() is called with its name. * Avoid trailing blanks in macro lines generated from renamed and from aliased macros. * Delete the duplicate __m*_reserved[] tables, just use roff_name[].
* style message about duplicate RCS ids; inspired by mdoclintIngo Schwarze2017-06-174-5/+16
|
* style message about missing RCS ids; inspired by mdoclintIngo Schwarze2017-06-17243-33/+321
|
* if .in is used inside the .TP head, it's always relativeIngo Schwarze2017-06-175-5/+56
|
* tables leak tab settings to subsequent textIngo Schwarze2017-06-1714-2/+70
|