aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff/cond
Commit message (Collapse)AuthorAgeFilesLines
* Let roff_getname() end the roff identifier at a tab characterIngo Schwarze2019-02-064-6/+30
| | | | | | | | | | | | | | | | | | | | | | and audit all its callers whether termination is handled correctly. Resulting improvements: * An escape or tab ending the macro name in a macro invocation is discarded, and argument processing is started after it. * An escape or tab ending a name in ".if d" and ".if r" is preserved. * An escape ending a name in ".ds" causes the whole request to be ignored. * A tab ending a name in ".ds" becomes part of the string. * An escape or tab ending a name in ".rm" causes the rest of the line to be ignored. * An escape or tab ending the first name in ".als", ".rn", or ".nr" causes the whole request to be ignored. Kurt Jaeger <pi at FreeBSD> made me aware of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235456#c0 and in that bug report, comment 0 item (3) is a special case of this class of issues. Yes, the "mh" manual pages are no doubt among the worst on the planet.
* Clean up the validation of .Pp, .PP, .sp, and .br. Make sure allIngo Schwarze2018-12-041-0/+2
| | | | | | | | | | | | | | combinations are handled, and are handled in a systematic manner. This resolves some erratic duplicate handling, handles a number of missing cases, and improves diagnostics in various respects. Move validation of .br and .sp to the roff validation module rather than doing that twice in the mdoc and man validation modules. Move the node relinking function to the roff library where it belongs. In validation functions, only look at the node itself, at previous nodes, and at descendants, not at following nodes or ancestors, such that only nodes are inspected which are already validated.
* When a conditional block is closed by putting "\}" on a text lineIngo Schwarze2018-11-263-4/+30
| | | | | | | | | | | | | by itself (which is somewhat unusual but not invalid; most authors use the empty macro line ".\}" instead), agree more closely with groff and do not produce a double space in the output. Quirk reported by millert@. While here, tweak the rest of the function body of roff_cond_text() to more closely match roff_cond_sub(). The subtly different handling could make people (including myself) wonder whether there is any point in being different. Testing shows there is not.
* Fix handling of \} on roff request lines.Ingo Schwarze2017-07-042-3/+12
| | | | Cures bogus error messages in pages generated with pod2man(1).
* Messages of the -Wbase level now print STYLE:. Since thisIngo Schwarze2017-07-0411-16/+22
| | | | | | | | 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.
* cope with changes in BASE messagesIngo Schwarze2017-06-252-2/+2
|
* Implement appending to standard man(7) and mdoc(7) macros with .am.Ingo Schwarze2017-06-182-0/+6
| | | | | | | | | | | | | | | | | | 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 missing RCS ids; inspired by mdoclintIngo Schwarze2017-06-172-0/+2
|
* implement the roff(7) d (macro or string defined) conditionalIngo Schwarze2017-06-143-1/+50
|
* Move .sp to the roff modules. Enough infrastructure is in placeIngo Schwarze2017-05-051-0/+1
| | | | now that this actually saves code: -70 LOC.
* Parser reorg:Ingo Schwarze2017-05-042-3/+3
| | | | | Generate the first node on the roff level: .br Fix some column numbers in diagnostic messages while here.
* Many people have been complaining for a long time that ``...'' looksIngo Schwarze2017-02-171-1/+1
| | | | | | | | | | | ugly in -Tascii output. For that reason, bentley@ submitted patches to render "..." instead to groff in November 2014 (yes, more than two years ago). Carsten Kunze yesterday merged them for the upcoming groff-1.22.4 release. Yay! Consequently, do the same in mandoc: Render \(Lq and \(Rq (which are used for .Do, .Dq, .Lb, and .St) as '"' in -Tascii output. All other output modes including -Tutf8 remain unchanged.
* Finally port the OpenBSD regression suite.Ingo Schwarze2017-02-0817-0/+543
Both kristaps@ and wiz@ repeated asked for this, literally for years.