CVS log for mandoc/mdoc_term.c

[BACK] Up to [cvsweb.bsd.lv] / mandoc

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.383 / (download) - annotate - [select for diffs], Mon Nov 13 19:13:01 2023 UTC (4 months, 2 weeks ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.382: +1 -6 lines
Diff to previous 1.382 (colored) to selected 1.91 (colored)

Reduce the man(7) default global indentation from 7n, which was an oddity
in groff-1.01 to groff-1.22.4, to 5n for compatibility with Version 7 AT&T
UNIX, 4.3BSD-Reno, groff-1.23.0, and all versions of mdoc(7).
OK jmc@ millert@

Revision 1.382 / (download) - annotate - [select for diffs], Sun Sep 11 09:13:48 2022 UTC (18 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.381: +9 -8 lines
Diff to previous 1.381 (colored) to selected 1.91 (colored)

Finally expand and delete the macro SCALE_VS_INIT().
It's nothing but obfuscation and only used at three places in a single file.
Removing it also makes the code three lines shorter.
The ugliness was already pointed out six years ago by mmcc@.

Revision 1.381 / (download) - annotate - [select for diffs], Tue Aug 16 17:45:55 2022 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.380: +6 -3 lines
Diff to previous 1.380 (colored) to selected 1.91 (colored)

When starting a new input line, even when continuing the same output
line, use the current output position as the reference position
for tabs on that input line.  This brings mandoc in line with the
behaviour of GNU, Heirloom, and Plan 9 roff.

Revision 1.380 / (download) - annotate - [select for diffs], Mon Apr 6 10:16:17 2020 UTC (3 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6
Changes since 1.379: +16 -7 lines
Diff to previous 1.379 (colored) to selected 1.91 (colored)

Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It.
In HTML output, improve the logic for writing inside permalinks:
skip them when there is no child content or when there is a risk
that the children might contain flow content.

Revision 1.379 / (download) - annotate - [select for diffs], Fri Mar 13 15:32:28 2020 UTC (4 years ago) by schwarze
Branch: MAIN
Changes since 1.378: +82 -202 lines
Diff to previous 1.378 (colored) to selected 1.91 (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.378 / (download) - annotate - [select for diffs], Thu Feb 27 21:43:44 2020 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.377: +6 -10 lines
Diff to previous 1.377 (colored) to selected 1.91 (colored)

Fully support explicit tagging of .Sh and .Ss.
This fixes the offset of two lines in terminal output
and this improves HTML output by putting the id= attribute
and <a> element into the respective <h1> or <h2> element rather
than writing an additional <mark> element.

To that end, introduce node flags NODE_ID (to make the node a link
target, for example by writing an HTML id= attribute or by calling
tag_put()) and NODE_HREF (to make the node a link source, used only
in HTML output, used only to write an <a class="permalink"> element).

In particular:
* In the validator, generalize the concept of the "next node"
such that it also works before .Sh and .Ss.
* If the first argument of .Tg is empty, don't forget to complain
if there are additional arguments, which will be ignored.
* In the terminal formatter, support writing of explicit tags
for all kinds of nodes, not just for .Tg.
* In deroff(), allow nodes to have an explicit string representation
even when they aren't text nodes.  Use this for explicitly tagged
section headers.  Suprisingly, this is sufficient to make HTML
output work, without explicit code changes in the HTML formatter.
* In syntax tree output, display NODE_ID and NODE_HREF.

Revision 1.377 / (download) - annotate - [select for diffs], Thu Feb 27 01:43:52 2020 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.376: +61 -79 lines
Diff to previous 1.376 (colored) to selected 1.91 (colored)

Introduce the concept of nodes that are semantically transparent:
they are skipped when looking for previous or following high-level
macros.  Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm
and .Tg, and man(7) .DT and .PD.  Use this concept for a variety
of improved decisions in various validators and formatters.

While here,
* remove a few const qualifiers on struct arguments that caused trouble;
* get rid of some more Yoda notation in the vicinity;
* and apply some other stylistic improvements in the vicinity.

I found this class of issues while considering .Tg patches from kn@.

Revision 1.376 / (download) - annotate - [select for diffs], Mon Jan 20 10:37:15 2020 UTC (4 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.375: +10 -10 lines
Diff to previous 1.375 (colored) to selected 1.91 (colored)

Make the code more readable by introducing
symbolic constants for tagging priorities.
This review also made me find a minor bug: do not upgrade
TAG_FALLBACK to TAG_WEAK when there is trailing whitespace.

Revision 1.375 / (download) - annotate - [select for diffs], Sun Jan 19 18:02:00 2020 UTC (4 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.374: +11 -2 lines
Diff to previous 1.374 (colored) to selected 1.91 (colored)

Introduce a new mdoc(7) macro .Tg ("tag") to explicitly mark a place
as defining a term.  Please only use it when automatic tagging does
not work.  Manual page authors will not be required to add the new
macro; using it remains optional.  HTML output is still rudimentary
in this version and will be polished later.

Thanks to kn@ for reminding me that i have been considering since
BSDCan 2014 whether something like this might be useful.  Given
that possibilities of making automatic tagging better are running
out and there are still several situations where automatic tagging
cannot do the job, i think the time is now ripe.

Feedback and no objection from millert@; OK espie@ inoguchi@ kn@.

Revision 1.374 / (download) - annotate - [select for diffs], Thu Jun 27 12:20:18 2019 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.373: +14 -10 lines
Diff to previous 1.373 (colored) to selected 1.91 (colored)

Improve "man -h" output.
1. For pages lacking a SYNOPSIS, show the NAME section rather than nothing.
2. Do not print a stray blank before the beginning of a SYNOPSIS.
Both issues reported by, and patch OK'ed by, tb@.

Revision 1.373 / (download) - annotate - [select for diffs], Mon Jun 3 19:50:33 2019 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.372: +2 -1 lines
Diff to previous 1.372 (colored) to selected 1.91 (colored)

Initialize the local variable "act" in print_mdoc_node().
While there is no bug, it helps clarity, and it is also safer in this
particular code because in case a bug gets introduced later, accessing
a NULL pointer is less dangerous than accessing an uninitialized pointer.

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.372 / (download) - annotate - [select for diffs], Fri Jan 4 03:39:01 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.371: +44 -64 lines
Diff to previous 1.371 (colored) to selected 1.91 (colored)

Two functional improvements to filling in terminal output.

1. Fully support no-fill mode in mdoc(7), even when invoked with
low-level roff(7) .nf requests.  As a side effect, this substantially
simplifies the implementation of .Bd -unfilled and .Bd -literal.

2. Let .Bd -centered fill its text, using the new TERMP_CENTER flag.
That finally fixes the long-standing bug that it used to operate in
no-fill mode, which was known to be wrong for at least five years.
This also simplifies the implementation of .Bd -centered considerably.

Revision 1.371 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:55 2018 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.370: +5 -7 lines
Diff to previous 1.370 (colored) to selected 1.91 (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.370 / (download) - annotate - [select for diffs], Thu Dec 13 11:55:47 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.369: +1 -2 lines
Diff to previous 1.369 (colored) to selected 1.91 (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.369 / (download) - annotate - [select for diffs], Mon Dec 3 21:00:11 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.368: +10 -4 lines
Diff to previous 1.368 (colored) to selected 1.91 (colored)

In the validators, translate obsolete macro aliases (Lp, Ot, LP, P)
to the standard forms (Pp, Ft, PP) up front, such that later code
does not need to look for the obsolete versions.
This reduces the risk of incomplete handling.

Revision 1.368 / (download) - annotate - [select for diffs], Fri Aug 17 20:33:38 2018 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.367: +10 -10 lines
Diff to previous 1.367 (colored) to selected 1.91 (colored)

Remove more pointer arithmetic passing via regions outside the array
that is undefined according to the C standard.  Robert Elz <kre at
munnari dot oz dot au> pointed out i wasn't quite done yet.

Revision 1.367 / (download) - annotate - [select for diffs], Wed Apr 11 17:11:13 2018 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4
Changes since 1.366: +11 -6 lines
Diff to previous 1.366 (colored) to selected 1.91 (colored)

preserve comments before .Dd when converting mdoc(7) to man(7)
with mandoc -Tman; suggested by Thomas Klausner <wiz at NetBSD>

Revision 1.366 / (download) - annotate - [select for diffs], Thu Apr 5 09:17:26 2018 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.365: +3 -3 lines
Diff to previous 1.365 (colored) to selected 1.91 (colored)

use the portable \(lq and \(rq internally rather than \(Lq and \(Rq

Revision 1.365 / (download) - annotate - [select for diffs], Sat Jan 13 05:23:18 2018 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.364: +1 -9 lines
Diff to previous 1.364 (colored) to selected 1.91 (colored)

Remove the implicit display feature of .Lk because it was inconsistent
across output devices, counter-intuitive, and resulted in ugly
output for many real-world manual pages.  Always format even long
links in-line.  I already committed a similar change to groff.

OK jmc@, bentley@, and the original author
of the feature, Werner Lemberg <wl@gnu.org>.

Revision 1.364 / (download) - annotate - [select for diffs], Wed Jun 14 17:51:15 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_3, VERSION_1_14_2
Changes since 1.363: +4 -4 lines
Diff to previous 1.363 (colored) to selected 1.91 (colored)

improve rounding rules for scaling units
in horizontal orientation in the terminal formatter

Revision 1.363 / (download) - annotate - [select for diffs], Thu Jun 8 12:54:58 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.362: +4 -2 lines
Diff to previous 1.362 (colored) to selected 1.91 (colored)

make the internal a2roffsu() interface more powerful by returning
a pointer to the end of the parsed data, making it easier to
parse subsequent bytes

Revision 1.362 / (download) - annotate - [select for diffs], Wed Jun 7 17:38:26 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.361: +76 -74 lines
Diff to previous 1.361 (colored) to selected 1.91 (colored)

Prepare the terminal driver for filling multiple columns in parallel,
first step: split column data out of the terminal state struct into
a new column state struct and use an array of such column state
structs.  No functional change.

Revision 1.361 / (download) - annotate - [select for diffs], Sun Jun 4 22:44:15 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.360: +9 -23 lines
Diff to previous 1.360 (colored) to selected 1.91 (colored)

Implement the roff(7) .mc (right margin character) request.
The Tcl/Tk manual pages use this extensively.
Delete the TERM_MAXMARGIN hack, it breaks .mc inside .nf;
instead, implement a proper TERMP_BRNEVER flag.

Revision 1.360 / (download) - annotate - [select for diffs], Sun Jun 4 18:50:35 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.359: +12 -41 lines
Diff to previous 1.359 (colored) to selected 1.91 (colored)

Make term_flushln() simpler and more robust:
Eliminate the "overstep" state variable.
The information is already contained in "viscol".
Minus 60 lines of code, no functional change intended.

Revision 1.359 / (download) - annotate - [select for diffs], Thu Jun 1 19:05:37 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.358: +3 -2 lines
Diff to previous 1.358 (colored) to selected 1.91 (colored)

Minimal implementation of the \h (horizontal motion) escape sequence.
Good enough to cope with the average DocBook insanity.

Revision 1.358 / (download) - annotate - [select for diffs], Tue May 30 16:31:29 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.357: +15 -7 lines
Diff to previous 1.357 (colored) to selected 1.91 (colored)

fix formatting of intermediate punctuation in .Lk

Revision 1.357 / (download) - annotate - [select for diffs], Tue May 9 14:10:01 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.356: +3 -2 lines
Diff to previous 1.356 (colored) to selected 1.91 (colored)

Trailing \c suppresses the output line break even if
the next line is a text line starting with whitespace.
Quirk found in the sysutils/rancid port.

Revision 1.356 / (download) - annotate - [select for diffs], Sun May 7 17:31:45 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.355: +29 -11 lines
Diff to previous 1.355 (colored) to selected 1.91 (colored)

Basic implementation of the roff(7) .ta (define tab stops) request.
This is the first feature made possible by the parser reorganization.
Improves the formatting of the SYNOPSIS in many Xenocara GL manuals.
Also important for ports, as reported by many, including naddy@.

Revision 1.355 / (download) - annotate - [select for diffs], Fri May 5 15:17:32 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.354: +9 -37 lines
Diff to previous 1.354 (colored) to selected 1.91 (colored)

Move .sp to the roff modules.  Enough infrastructure is in place
now that this actually saves code: -70 LOC.

Revision 1.354 / (download) - annotate - [select for diffs], Fri May 5 13:17:55 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.353: +5 -20 lines
Diff to previous 1.353 (colored) to selected 1.91 (colored)

move .ll to the roff modules

Revision 1.353 / (download) - annotate - [select for diffs], Fri May 5 02:06:19 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.352: +2 -1 lines
Diff to previous 1.352 (colored) to selected 1.91 (colored)

Move handling of the roff(7) .ft request from the man(7)
modules to the new roff(7) modules.  As a side effect,
mdoc(7) now handles .ft, too.  Of course, do not use that.

Revision 1.352 / (download) - annotate - [select for diffs], Thu May 4 22:16:09 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.351: +2 -8 lines
Diff to previous 1.351 (colored) to selected 1.91 (colored)

Start roff formatter modules for HTML and termininal output,
used by both the mdoc and man formatters, with the ultimate
goal of reducing code duplication between the two macro formatters.
Made possible by the parser unification.
Add the first formatting function (for the .br request).

Revision 1.351 / (download) - annotate - [select for diffs], Thu May 4 17:48:29 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.350: +17 -5 lines
Diff to previous 1.350 (colored) to selected 1.91 (colored)

Parser reorg:
Generate the first node on the roff level: .br
Fix some column numbers in diagnostic messages while here.

Revision 1.350 / (download) - annotate - [select for diffs], Mon Apr 24 23:06:18 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.349: +7 -5 lines
Diff to previous 1.349 (colored) to selected 1.91 (colored)

Continue parser unification:
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].

Revision 1.349 / (download) - annotate - [select for diffs], Mon Apr 17 12:53:29 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.348: +12 -6 lines
Diff to previous 1.348 (colored) to selected 1.91 (colored)

Fix handling of trailing punctuation in .Lk.
This macro is unusual in so far as trailing punction needs to remain
inside the scope because it must be inside, not after the display
of long URIs in terminal output mode.
Improves formatting of fw_update(1), help(1), less(1), sendbug(1),
acx(4), inet6(4), ipsec(4), oce(4), isakmpd.conf(5), afterboot(8),
release(8), traceroute(8).

Revision 1.348 / (download) - annotate - [select for diffs], Fri Apr 14 19:35:22 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.347: +11 -1 lines
Diff to previous 1.347 (colored) to selected 1.91 (colored)

Show long .Lk URIs in like an indented display, similar to groff.
Suggested by bentley@.

Revision 1.347 / (download) - annotate - [select for diffs], Fri Apr 14 18:25:04 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.346: +2 -2 lines
Diff to previous 1.346 (colored) to selected 1.91 (colored)

Do not make the colon after the .Lk link text italic.
I just pushed the same change to GNU troff.

Revision 1.346 / (download) - annotate - [select for diffs], Fri Feb 17 19:15:41 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.345: +5 -3 lines
Diff to previous 1.345 (colored) to selected 1.91 (colored)

Use typographic quotes rather than '"' for .Rs %T (no change for -Tascii
output, of course).  Patch from bentley@ in November 2014.  This can be
committed now because groff merged Anthony's patch yesterday.

Revision 1.345 / (download) - annotate - [select for diffs], Thu Feb 16 14:38:12 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.344: +11 -5 lines
Diff to previous 1.344 (colored) to selected 1.91 (colored)

Surprisingly, groff does not support scaling units in .Bl -column
column width specifiers, so stop supporting them, too.
As a side effect, this fixes an assertion failure that tb@ found
with afl(1), triggered by: .Bl -column -4n

Revision 1.344 / (download) - annotate - [select for diffs], Thu Feb 16 03:00:23 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.343: +1 -9 lines
Diff to previous 1.343 (colored) to selected 1.91 (colored)

Remove the ENDBODY_NOSPACE flag, simplifying the code.

Comparing to groff output, it appears that all cases where it was used
and made a difference actually require the opposite, ENDBODY_SPACE.

I have no idea why i added it back in 2010; maybe to compensate for
some other bug that has long been fixed.

Revision 1.343 / (download) - annotate - [select for diffs], Mon Feb 6 03:44:58 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.342: +2 -4 lines
Diff to previous 1.342 (colored) to selected 1.91 (colored)

The .Nm macro does not only use the default name when it has no
argument, but also when the first argument is a child macro.
Arcane issue found in the FreeBSD cxgbetool(8) manual that Baptiste
Daroussin <bapt at FreeBSD> sent me long ago for a different reason.

While solving this, switch to the new technique of doing text
production in the validator, reducing code duplication in the
formatters, which also makes -Ttree output clearer.

Revision 1.342 / (download) - annotate - [select for diffs], Sat Feb 4 11:58:09 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.341: +4 -1 lines
Diff to previous 1.341 (colored) to selected 1.91 (colored)

Do not fix the default indent for all subsequent files; some may use
a different macro language and hence require a different indent.
You can see the effect with "man -a 1 host hostname".

Revision 1.341 / (download) - annotate - [select for diffs], Wed Jan 11 17:39:53 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.340: +5 -107 lines
Diff to previous 1.340 (colored) to selected 1.91 (colored)

Do text production for .Bt, .Ex, .Rv, .Ud at the validation stage
rather than in the formatters.  Use NODE_NOSRC flag for .Lb and
NODE_NOSRC and NODE_NOPRT for .St.  Results in a more rigorous
syntax tree and in 135 lines less code.

This work was triggered by a question from Abhinav Upadhyay <er dot
abhinav dot upadhyay at gmail dot com> (NetBSD) on discuss@.

Revision 1.340 / (download) - annotate - [select for diffs], Tue Jan 10 23:36:34 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.339: +2 -26 lines
Diff to previous 1.339 (colored) to selected 1.91 (colored)

Use new NODE_NOSRC and NODE_NOPRT flags for .Bx and .At.
More rigorous AST and 40 lines less code.

Revision 1.339 / (download) - annotate - [select for diffs], Tue Jan 10 21:59:47 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.338: +18 -42 lines
Diff to previous 1.338 (colored) to selected 1.91 (colored)

For the .Ux/.Ox family of macros, do text production at the validation
stage rather than in each and every individual formatter, using the
new NODE_NOSRC flag.  More rigorous and also ten lines less code.

Revision 1.338 / (download) - annotate - [select for diffs], Tue Jan 10 13:47:00 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.337: +24 -24 lines
Diff to previous 1.337 (colored) to selected 1.91 (colored)

unify names of AST node flags; no change of cpp output

Revision 1.337 / (download) - annotate - [select for diffs], Tue Jan 10 12:53:07 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.336: +13 -2 lines
Diff to previous 1.336 (colored) to selected 1.91 (colored)

Introduce flags NODE_NOSRC and NODE_NOPRT for AST nodes.
Use them to mark generated nodes and nodes that shall not produce output.
Let -Ttree output mode display these new flags.
Use NODE_NOSRC for .Ar, .Mt, and .Pa default arguments.
Use NODE_NOPRT for .Dd, .Dt, and .Os.

These will help to make handling of text production macros more rigorous.

Revision 1.336 / (download) - annotate - [select for diffs], Tue Nov 8 16:38:21 2016 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.335: +2 -2 lines
Diff to previous 1.335 (colored) to selected 1.91 (colored)

use .Fn in custom sections for tagging, in addition to in DESCRIPTION;
written on the TGV Paris-Strassbourg

Revision 1.335 / (download) - annotate - [select for diffs], Tue Nov 8 16:29:44 2016 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.334: +2 -1 lines
Diff to previous 1.334 (colored) to selected 1.91 (colored)

tag leading .Dv, .Li, and .No in .It;
written on the TGV Paris-Strassbourg

Revision 1.334 / (download) - annotate - [select for diffs], Tue Nov 8 16:23:58 2016 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.333: +25 -3 lines
Diff to previous 1.333 (colored) to selected 1.91 (colored)

implement tag priority 0, which will tag only keys that appear as
tag candidates exactly once, and use it for .Em and .Sy;
written on the TGV Toulouse-Paris

Revision 1.333 / (download) - annotate - [select for diffs], Tue Nov 8 16:04:57 2016 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.332: +4 -2 lines
Diff to previous 1.332 (colored) to selected 1.91 (colored)

generate two tag entries from list entries of the form
.It Macro tag1 ... | Macro tag2 ...
written on the TGV Toulouse-Paris

Revision 1.332 / (download) - annotate - [select for diffs], Sun Oct 9 18:16:56 2016 UTC (7 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.331: +2 -2 lines
Diff to previous 1.331 (colored) to selected 1.91 (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.331 / (download) - annotate - [select for diffs], Fri Jan 8 17:48:09 2016 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.330: +26 -25 lines
Diff to previous 1.330 (colored) to selected 1.91 (colored)

Delete the redundant "nchild" member of struct roff_node, replacing
most uses by one, a few by two pointer checks, and only one by a
tiny loop - not only making data smaller, but code shorter as well.

This gets rid of an implicit invariant that confused both static
analysis tools and human auditors.  No functional change.

Revision 1.330 / (download) - annotate - [select for diffs], Mon Oct 12 15:29:35 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.329: +2 -2 lines
Diff to previous 1.329 (colored) to selected 1.91 (colored)

Use "-" rather than "\(hy" for the heads of .Bl -dash and -hyphen lists.
In UTF-8 output, that renders as ASCII HYPHEN-MINUS (U+002D)
rather than HYPHEN (U+2010), which looks better and matches groff.
In ASCII output, it makes no difference.
Suggested by naddy@.

Revision 1.329 / (download) - annotate - [select for diffs], Mon Oct 12 00:08:16 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.328: +4 -55 lines
Diff to previous 1.328 (colored) to selected 1.91 (colored)

To make the code more readable, delete 283 /* FALLTHROUGH */ comments
that were right between two adjacent case statement.  Keep only
those 24 where the first case actually executes some code before
falling through to the next case.

Revision 1.328 / (download) - annotate - [select for diffs], Tue Oct 6 18:32:19 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.327: +79 -79 lines
Diff to previous 1.327 (colored) to selected 1.91 (colored)

modernize style: "return" is not a function

Revision 1.327 / (download) - annotate - [select for diffs], Sat Sep 26 00:54:04 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.326: +1 -5 lines
Diff to previous 1.326 (colored) to selected 1.91 (colored)

/* NOTREACHED */ after abort() is silly, delete it

Revision 1.326 / (download) - annotate - [select for diffs], Mon Sep 21 13:25:00 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.325: +3 -3 lines
Diff to previous 1.325 (colored) to selected 1.91 (colored)

Trailing whitespace is significant when determining the width of a tag
in mdoc(7) .Bl -tag and man(7) .TP, but not in man(7) .IP.
Quirk reported by Jan Stary <hans at stare dot cz> on ports@.

Revision 1.325 / (download) - annotate - [select for diffs], Mon Sep 14 12:57:47 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.324: +2 -2 lines
Diff to previous 1.324 (colored) to selected 1.91 (colored)

The .Dv macro actually forces normal font.

Revision 1.324 / (download) - annotate - [select for diffs], Sat Jul 25 14:28:59 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.323: +7 -11 lines
Diff to previous 1.323 (colored) to selected 1.91 (colored)

Simplify and make tag_put() more efficient by integrating tag_get()
into it and by only handling NUL-terminated strings.
Minus 25 lines of code, no functional change.

Revision 1.323 / (download) - annotate - [select for diffs], Sat Jul 25 14:23:08 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.322: +16 -2 lines
Diff to previous 1.322 (colored) to selected 1.91 (colored)

implement tagging for .Er

Revision 1.322 / (download) - annotate - [select for diffs], Sat Jul 25 14:18:04 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.321: +18 -3 lines
Diff to previous 1.321 (colored) to selected 1.91 (colored)

basic tag support for function names; written at YYC

Revision 1.321 / (download) - annotate - [select for diffs], Sat Jul 25 14:02:06 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.320: +3 -3 lines
Diff to previous 1.320 (colored) to selected 1.91 (colored)

basic support for tag priorities; written at YYC

Revision 1.320 / (download) - annotate - [select for diffs], Fri Jul 17 22:38:29 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.319: +22 -2 lines
Diff to previous 1.319 (colored) to selected 1.91 (colored)

Initial, still somewhat experimental implementation to leverage
less(1) -T and :t ctags(1)-like functionality to jump to the
definitions of various terms inside manual pages.
To be polished in the tree, so bear with me and report issues.

Technically, if less(1) is used as a pager, information is collected
by the mdoc(7) terminal formatter, first stored using the ohash
library, then ultimately written to a temporary file which is passed
to less via -T.  No change intended for other output formatters or
when running without a pager.

Based on an idea from Kristaps using feedback from many, in particular
phessler@ nicm@ millert@ halex@ doug@ kspillner@ deraadt@.

Revision 1.319 / (download) - annotate - [select for diffs], Sat Apr 18 17:53:21 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.318: +7 -9 lines
Diff to previous 1.318 (colored) to selected 1.91 (colored)

Delete the wrapper functions mdoc_meta(), man_meta(), mdoc_node(),
man_node() from the mandoc(3) semi-public interface and the internal
wrapper functions print_mdoc() and print_man() from the HTML formatters.
Minus 60 lines of code, no functional change.

Revision 1.318 / (download) - annotate - [select for diffs], Sat Apr 18 16:06:41 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.317: +2 -2 lines
Diff to previous 1.317 (colored) to selected 1.91 (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.317 / (download) - annotate - [select for diffs], Sat Apr 4 17:47:18 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.316: +2 -2 lines
Diff to previous 1.316 (colored) to selected 1.91 (colored)

Rounding rules for horizontal scaling widths are more complicated.
There is a first rounding to basic units on the input side.
After that, rounding rules differ between requests and macros.
Requests round to the nearest possible character position.
Macros round to the next character position to the left.

Implement that by changing the return value of term_hspan()
to basic units and leaving the second scaling and rounding stage
to the formatters instead of doing it in the terminal handler.

Improves for example argtable2(3).

Revision 1.316 / (download) - annotate - [select for diffs], Thu Apr 2 23:48:20 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.315: +7 -13 lines
Diff to previous 1.315 (colored) to selected 1.91 (colored)

Third step towards parser unification:
Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta.
Written of the train from London to Exeter on the way to p2k15.

Revision 1.315 / (download) - annotate - [select for diffs], Thu Apr 2 22:48:17 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.314: +14 -14 lines
Diff to previous 1.314 (colored) to selected 1.91 (colored)

Second step towards parser unification:
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to p2k15.

Revision 1.314 / (download) - annotate - [select for diffs], Thu Apr 2 21:36:50 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.313: +82 -81 lines
Diff to previous 1.313 (colored) to selected 1.91 (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.313 / (download) - annotate - [select for diffs], Fri Mar 6 15:48:52 2015 UTC (9 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.312: +3 -1 lines
Diff to previous 1.312 (colored) to selected 1.91 (colored)

Fix vertical spacing at the beginning of tables.
man(7) always prints a blank line, mdoc(7) doesn't.
Problem in mdoc(7) reported by kristaps@.
mdoc(7) part of the patch tested by kristaps@.

Revision 1.312 / (download) - annotate - [select for diffs], Fri Mar 6 13:09:07 2015 UTC (9 years ago) by schwarze
Branch: MAIN
Changes since 1.311: +7 -4 lines
Diff to previous 1.311 (colored) to selected 1.91 (colored)

In mdoc(7), don't mistreat negative .sp arguments as large positive ones.
Instead, use the same logic as for man(7).

Revision 1.311 / (download) - annotate - [select for diffs], Tue Feb 17 20:37:17 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.310: +3 -3 lines
Diff to previous 1.310 (colored) to selected 1.91 (colored)

Render \(lq and \(rq as '"' in -Tascii mode but leave the rendering
of .Do/.Dc, .Dq, .Lb, and .St untouched.
Reduces groff-mandoc differences in OpenBSD base by about 7%.
Reminded of the issue by naddy@.

Revision 1.310 / (download) - annotate - [select for diffs], Thu Feb 12 12:24:33 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.309: +4 -3 lines
Diff to previous 1.309 (colored) to selected 1.91 (colored)

Delete the mdoc_node.pending pointer and the function calculating
it, make_pending(), which was the most difficult function of the
whole mdoc(7) parser.  After almost five years of maintaining this
hellhole, i just noticed the pointer isn't needed after all.

Blocks are always rewound in the reverse order they were opened;
that even holds for broken blocks.  Consequently, it is sufficient
to just mark broken blogs with the flag MDOC_BROKEN and breaking
blocks with the flag MDOC_ENDED.  When rewinding, instead of iterating
the pending pointers, just iterate from each broken block to its
parents, rewinding all that are MDOC_ENDED and stopping after
processing the first ancestor that it not MDOC_BROKEN.  For ENDBODY
markers, use the mdoc_node.body pointer in place of the former
mdoc_node.pending.

This also fixes an assertion failure found by jsg@ with afl,
test case #467 (Bo Bl It Bd Bc It), where (surprise surprise)
the pending pointer got corrupted.

Improved functionality, minus one function, minus one struct field,
minus 50 lines of code.

Revision 1.309 / (download) - annotate - [select for diffs], Wed Feb 11 14:15:12 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.308: +3 -4 lines
Diff to previous 1.308 (colored) to selected 1.91 (colored)

do not access a NULL pointer if an .Eo block lacks a tail;
found by jsg@ with afl, test case #16

Revision 1.308 / (download) - annotate - [select for diffs], Thu Feb 5 01:46:56 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.307: +1 -4 lines
Diff to previous 1.307 (colored) to selected 1.91 (colored)

fix handling of empty .An macros

Revision 1.307 / (download) - annotate - [select for diffs], Thu Feb 5 00:14:13 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.306: +4 -7 lines
Diff to previous 1.306 (colored) to selected 1.91 (colored)

Simplify by deleting the "lastline" member of struct mdoc_node.
Minus one struct member, minus 17 lines of code, no functional change.

Revision 1.306 / (download) - annotate - [select for diffs], Sun Feb 1 23:10:35 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.305: +55 -14 lines
Diff to previous 1.305 (colored) to selected 1.91 (colored)

fix .Eo/.Ec spacing

Revision 1.305 / (download) - annotate - [select for diffs], Sat Jan 31 00:12:41 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.304: +2 -2 lines
Diff to previous 1.304 (colored) to selected 1.91 (colored)

Use relative offsets instead of absolute pointers for the terminal
font stack.  The latter fail after the stack is grown with realloc().
Fixing an assertion failure found by jsg@ with afl some time ago
(test case number 51).

Revision 1.304 / (download) - annotate - [select for diffs], Fri Jan 30 22:04:44 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.303: +5 -4 lines
Diff to previous 1.303 (colored) to selected 1.91 (colored)

Have pity on the poor stack.
Replace tail recursion by iteration when walking the syntax trees.
No functional change.

Revision 1.303 / (download) - annotate - [select for diffs], Fri Jan 23 14:21:01 2015 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.302: +6 -6 lines
Diff to previous 1.302 (colored) to selected 1.91 (colored)

Let .Aq/.Ao/.Ac print "<>" instead of the normal "\(la\(ra"
when the only child is .Mt, not when the preceding node is .An,
to improve robustness.  Triggered by a question from Svyatoslav
Mishyn <juef at openmailbox dot org> (Crux Linux).

Revision 1.302 / (download) - annotate - [select for diffs], Wed Dec 24 23:32:42 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.301: +57 -50 lines
Diff to previous 1.301 (colored) to selected 1.91 (colored)

Support negative indentations for mdoc(7) displays and lists.
Not exactly recommended for use, rather for groff compatibility.
While here, introduce similar SHRT_MAX limits as in man(7),
fixing a few cases of infinite output found by jsg@ with afl.

Revision 1.301 / (download) - annotate - [select for diffs], Tue Dec 23 13:48:57 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.300: +3 -2 lines
Diff to previous 1.300 (colored) to selected 1.91 (colored)

support negative horizontal widths in man(7);
minus twenty lines of code in spite of enhanced functionality

Revision 1.300 / (download) - annotate - [select for diffs], Tue Dec 23 09:31:46 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.299: +9 -18 lines
Diff to previous 1.299 (colored) to selected 1.91 (colored)

some scaling unit fixes:
- .sp with an invalid argument is .sp 1v, not .sp 0v
- in man(1), trailing garbage doesn't make scaling units invalid

Revision 1.299 / (download) - annotate - [select for diffs], Tue Dec 2 10:08:06 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.298: +3 -2 lines
Diff to previous 1.298 (colored) to selected 1.91 (colored)

Fix the implementation and documentation of \c (continue text input line).
In particular, make it work in no-fill mode, too.
Reminded by Carsten dot Kunze at arcor dot de (Heirloom roff).

Revision 1.298 / (download) - annotate - [select for diffs], Sun Nov 30 05:29:00 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.297: +3 -2 lines
Diff to previous 1.297 (colored) to selected 1.91 (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.297 / (download) - annotate - [select for diffs], Fri Nov 28 16:54:23 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.296: +3 -9 lines
Diff to previous 1.296 (colored) to selected 1.91 (colored)

mop up an #ifdef turd deraadt@ stepped into

Revision 1.296 / (download) - annotate - [select for diffs], Fri Nov 28 16:02:52 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.295: +11 -7 lines
Diff to previous 1.295 (colored) to selected 1.91 (colored)

Be more careful about meta->name.  For weird input, it can be NULL.
Fixing a NULL access jsg@ found with afl.

Revision 1.295 / (download) - annotate - [select for diffs], Thu Nov 27 22:27:56 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.294: +6 -4 lines
Diff to previous 1.294 (colored) to selected 1.91 (colored)

Multiple fixes with respect to .Eo:
1. Correctly parse stray .Ec without preceding .Eo,
avoiding an assertion violation found by jsg@ with afl.
2. Correctly parse .Ec arguments when breaking another block.
3. Correct spacing around closing delimiter when breaking another block.
4. Sync some related formatting control from -Tascii to -Thtml.

Revision 1.294 / (download) - annotate - [select for diffs], Thu Nov 27 16:20:31 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.293: +5 -5 lines
Diff to previous 1.293 (colored) to selected 1.91 (colored)

Fix the obsolete .Db (toggle debug mode) macro to ignore its arguments
and not trigger an assertion when there is more than one argument;
the latter found by jsg@ with afl.

Revision 1.293 / (download) - annotate - [select for diffs], Tue Nov 25 20:00:01 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.292: +10 -7 lines
Diff to previous 1.292 (colored) to selected 1.91 (colored)

Do not access a NULL pointer when a section has no body,
which can for example happen for .Sh Xo .Sh without .Xc.
Crash found by jsg@ with afl.

Revision 1.292 / (download) - annotate - [select for diffs], Fri Nov 21 01:52:53 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.291: +9 -11 lines
Diff to previous 1.291 (colored) to selected 1.91 (colored)

We repeatedly observed assertion crashes in the low-level terminal
output handler because the high level terminal formatters could be
tricked into setting the left margin further to the right than the
right margin.  Today, jsg@ found more of these with afl.

Change the internal interface between both levels, aiming for
simplicity and robustness of the code.  Treat both margins as
*independent* settings:  Now, termp.offset is the requested left
margin, and termp.rmargin is the available space.  Let the lower
level cope with that case of insufficient space.

Obviously, high level code that does centering or flush right
still has to do careful checks, so i did a full audit of margin
settings in the terminal formatters.

Fixes crashes caused by excessively long title or date strings in
the man(7) footer, operating system or date strings in the mdoc(7)
footer, volume strings in the man(7) or mdoc(7) header, and a few
cases related to some non-prologue macros.

Revision 1.291 / (download) - annotate - [select for diffs], Wed Nov 19 22:00:37 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.290: +5 -3 lines
Diff to previous 1.290 (colored) to selected 1.91 (colored)

Let .Ao and .Aq render as "<>" after .An and as "\(la\(ra" elsewhere,
just like groff; minibug noticed by bentley@.

Revision 1.290 / (download) - annotate - [select for diffs], Mon Nov 17 06:44:58 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.289: +2 -2 lines
Diff to previous 1.289 (colored) to selected 1.91 (colored)

Multiple fixes with respect to in-line macros:
* .No selects the default font; relevant e.g. in .Bf blocks
* no need to force empty .Li elements
* closing delimiters as leading macro arguments do not suppress space
* opening delimiters at the end of a macro line do not suppress space
* correctly handle delimiter spacing in -Tman
As a side effect, these fixes let mandoc warn about empty .No macros
as requested by bentley@.

Revision 1.289 / (download) - annotate - [select for diffs], Mon Nov 10 21:56:43 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.288: +12 -10 lines
Diff to previous 1.288 (colored) to selected 1.91 (colored)

add required vertical spacing before lists that begin
at the beginning of the first item of an enclosing list
right at the beginning of a new section or subsection;
minibug reported by Steffen Nurpmeso <sdaoden at yandex dot com>

Revision 1.288 / (download) - annotate - [select for diffs], Thu Oct 30 20:10:02 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.287: +13 -26 lines
Diff to previous 1.287 (colored) to selected 1.91 (colored)

Major bugsquashing with respect to -offset and -width:
1. Support specifying the .Bd and .Bl -offset as a macro default width;
while here, simplify the code handling the same for .Bl -width.
2. Correct handling of .Bl -offset arguments:  unlike .Bd -offset, the
arguments "left", "indent", and "indent-two" have no special meaning.
3. Fix the scaling of string length -offset and -width arguments in -Thtml.
Triggered by an incomplete documentation patch from bentley@.

Revision 1.287 / (download) - annotate - [select for diffs], Tue Oct 28 17:36:19 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.286: +1 -4 lines
Diff to previous 1.286 (colored) to selected 1.91 (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.286 / (download) - annotate - [select for diffs], Mon Oct 20 15:50:24 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.285: +2 -2 lines
Diff to previous 1.285 (colored) to selected 1.91 (colored)

correct the spacing after in-line equations
that start at the beginning of an input line
but end before the end of an input line

Revision 1.285 / (download) - annotate - [select for diffs], Mon Oct 20 02:47:09 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.284: +3 -1 lines
Diff to previous 1.284 (colored) to selected 1.91 (colored)

correct spacing *after* inline equations (much simpler than expected)

Revision 1.284 / (download) - annotate - [select for diffs], Mon Oct 20 02:33:06 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.283: +3 -1 lines
Diff to previous 1.283 (colored) to selected 1.91 (colored)

correct spacing before inline equations

Revision 1.283 / (download) - annotate - [select for diffs], Mon Oct 13 22:00:47 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.282: +7 -3 lines
Diff to previous 1.282 (colored) to selected 1.91 (colored)

Properly scale string length measurements for PostScript and PDF output;
this doesn't change anything for ASCII and UTF-8.
Problem reported by bentley@.

Revision 1.282 / (download) - annotate - [select for diffs], Wed Sep 17 20:18:58 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.281: +17 -45 lines
Diff to previous 1.281 (colored) to selected 1.91 (colored)

simplify handling of .An -[no]split for terminal output:
delete one static function, one flag #define, and 25 lines of code;
no functional change

Revision 1.281 / (download) - annotate - [select for diffs], Wed Sep 3 05:22:45 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.280: +25 -18 lines
Diff to previous 1.280 (colored) to selected 1.91 (colored)

Implement the traditional -h option for man(1): show the SYNOPSIS only.
As usual, we get mandoc -h and apropos -h for free.
Try stuff like "apropos -h In=dirent" or "apropos -h Fa=timespec".

Only useful for terminal output, so -Tps, -Tpdf, -Thtml ignore -h for now.

Revision 1.280 / (download) - annotate - [select for diffs], Thu Aug 21 12:57:17 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.279: +5 -4 lines
Diff to previous 1.279 (colored) to selected 1.91 (colored)

Right after .Fl, a middle delimiter triggers an empty scope,
just like a closing delimiter.  This didn't work in groff-1.15,
but it now works in groff-1.22.

After being closed by delimiters, .Nm scopes do not reopen.

Do not suppress white space after .Fl if the next node is a text node
on the same input line; that can happen for middle delimiters.

Fixing an issue reported by jmc@.

Revision 1.279 / (download) - annotate - [select for diffs], Sun Aug 17 16:51:55 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_4, VERSION_1_12
Changes since 1.278: +6 -6 lines
Diff to previous 1.278 (colored) to selected 1.91 (colored)

... and remove the trailing spaces (duh.  i should pay more attention)

Revision 1.278 / (download) - annotate - [select for diffs], Sun Aug 17 16:44:41 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.277: +10 -10 lines
Diff to previous 1.277 (colored) to selected 1.91 (colored)

KNF: fix indentation of previous commit, see style(9):
"Indentation is an 8 character tab.  Second level indents are four spaces."
All the rest of this file already conforms.

Revision 1.277 / (download) - annotate - [select for diffs], Sun Aug 17 08:37:11 2014 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.276: +14 -9 lines
Diff to previous 1.276 (colored) to selected 1.91 (colored)

Protect against accessing "n->next->child" by first checking "n->next".
Noticed in a crash against ".It Nm Fo" with no closing "Fc".
Original patch expanded by schwarze@ then extended even more.

Revision 1.276 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.275: +1 -3 lines
Diff to previous 1.275 (colored) to selected 1.91 (colored)

Get rid of HAVE_CONFIG_H, it is always defined; idea from libnbcompat.
Include <sys/types.h> where needed, it does not belong in config.h.
Remove <stdio.h> from config.h; if it is missing somewhere, it should
be added, but i cannot find a *.c file where it is missing.

Revision 1.275 / (download) - annotate - [select for diffs], Wed Aug 6 15:09:05 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.274: +6 -2 lines
Diff to previous 1.274 (colored) to selected 1.91 (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.274 / (download) - annotate - [select for diffs], Wed Jul 30 17:06:26 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.273: +5 -2 lines
Diff to previous 1.273 (colored) to selected 1.91 (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.273 / (download) - annotate - [select for diffs], Wed Jul 30 00:19:16 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.272: +32 -23 lines
Diff to previous 1.272 (colored) to selected 1.91 (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.272 / (download) - annotate - [select for diffs], Tue Jul 29 13:58:18 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.271: +14 -3 lines
Diff to previous 1.271 (colored) to selected 1.91 (colored)

Partial implementation of .Bd -centered.

In groff, .Bd -centered operates in fill mode, which is relatively
hard to implement, while this implementation operates in non-fill
mode so far.  As long as you pay attention that your lines do not
overflow, it works.  To make sure that rendering is the same for
mandoc and groff, it is recommended to insert .br between lines
for now.  This implementation will need improvement later.

Revision 1.271 / (download) - annotate - [select for diffs], Mon Jul 7 15:03:43 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.270: +5 -2 lines
Diff to previous 1.270 (colored) to selected 1.91 (colored)

no need to skip content before first section header

Revision 1.270 / (download) - annotate - [select for diffs], Thu Jul 3 23:24:56 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.269: +2 -2 lines
Diff to previous 1.269 (colored) to selected 1.91 (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.269 / (download) - annotate - [select for diffs], Wed Jul 2 19:55:10 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.268: +8 -6 lines
Diff to previous 1.268 (colored) to selected 1.91 (colored)

When .Sm is called without an argument, groff toggles the spacing mode,
so let us do the same for compatibility.  Using this feature is of
course not recommended except in manual page obfuscation contests.

Revision 1.268 / (download) - annotate - [select for diffs], Wed Jul 2 03:48:07 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.267: +29 -6 lines
Diff to previous 1.267 (colored) to selected 1.91 (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.267 / (download) - annotate - [select for diffs], Wed Apr 23 16:08:33 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.266: +15 -18 lines
Diff to previous 1.266 (colored) to selected 1.91 (colored)

Audit strlcpy(3)/strlcat(3) usage.

* Repair three instances of silent truncation, use asprintf(3).
* Change two instances of strlen(3)+malloc(3)+strlcpy(3)+strlcat(3)+...
to use asprintf(3) instead to make them less error prone.
* Cast the return value of four instances where the destination
buffer is known to be large enough to (void).
* Completely remove three useless instances of strlcpy(3)/strlcat(3).
* Mark two places in -Thtml with XXX that can cause information loss
and crashes but are not easy to fix, requiring design changes of
some internal interfaces.
* The file mandocdb.c remains to be audited.

Revision 1.266 / (download) - annotate - [select for diffs], Sun Apr 20 20:18:12 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.265: +8 -5 lines
Diff to previous 1.265 (colored) to selected 1.91 (colored)

fix unchecked snprintf(3) in page header printing:
the length of the title is unknown, and speed doesn't matter here,
so use asprintf/free rather than a static buffer

Revision 1.265 / (download) - annotate - [select for diffs], Sun Apr 20 19:40:13 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.264: +3 -3 lines
Diff to previous 1.264 (colored) to selected 1.91 (colored)

make sure static buffers for snprintf(3) are large enough
and cast snprintf return value to (void) where they are

Revision 1.264 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:05 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.263: +208 -325 lines
Diff to previous 1.263 (colored) to selected 1.91 (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.263 / (download) - annotate - [select for diffs], Tue Apr 8 07:13:12 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.262: +14 -13 lines
Diff to previous 1.262 (colored) to selected 1.91 (colored)

Add a new term_flushln() flag TERMP_BRIND (if break, then indent)
to control indentation of continuation lines in TERMP_NOBREAK mode.
In the past, this was always on; continue using it
for .Bl, .Nm, .Fn, .Fo, and .HP, but no longer for .IP and .TP.

I looked at this because sthen@ reported the issue in a manual
of a Perl module from ports, but it affects base, too: This patch
reduces groff-mandoc differences in base by more than 15%.

Revision 1.262 / (download) - annotate - [select for diffs], Tue Apr 8 04:40:47 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.261: +3 -1 lines
Diff to previous 1.261 (colored) to selected 1.91 (colored)

If the SYNOPSIS section contains an excessively long .Nm,
adjust the right margin to avoid running into an assertion;
output in that case now agrees with groff, too.

Revision 1.261 / (download) - annotate - [select for diffs], Sun Mar 30 21:28:01 2014 UTC (10 years ago) by schwarze
Branch: MAIN
Changes since 1.260: +2 -2 lines
Diff to previous 1.260 (colored) to selected 1.91 (colored)

Support relative arguments to .ll (increase or decrease line length).

Revision 1.260 / (download) - annotate - [select for diffs], Sun Mar 30 19:47:48 2014 UTC (10 years ago) by schwarze
Branch: MAIN
Changes since 1.259: +17 -3 lines
Diff to previous 1.259 (colored) to selected 1.91 (colored)

Implement the roff(7) .ll (line length) request.
Found by naddy@ in the textproc/enchant(1) port.
Of course, do not use this in new manuals.

Revision 1.259 / (download) - annotate - [select for diffs], Sun Feb 16 12:33:39 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.258: +6 -3 lines
Diff to previous 1.258 (colored) to selected 1.91 (colored)

when indenting, extend the right margin accordingly, when needed;
fixes a crash reported by blambert@ and a few other, similar ones

Revision 1.258 / (download) - annotate - [select for diffs], Wed Dec 25 21:24:12 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3
Changes since 1.257: +2 -3 lines
Diff to previous 1.257 (colored) to selected 1.91 (colored)

Oops, .Fa never breaks the output line in the middle of any of its
arguments, not even outside SYNOPSIS mode.  Quite surprising as .Fn
does break the line in the middle of its arguments outside SYNOPSIS
mode, and only doesn't do that in SYNOPSIS mode.  Wonders of groff...

Revision 1.257 / (download) - annotate - [select for diffs], Wed Dec 25 15:12:45 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.256: +5 -7 lines
Diff to previous 1.256 (colored) to selected 1.91 (colored)

Garbage collect two local variables each used only one single time.

Revision 1.256 / (download) - annotate - [select for diffs], Wed Dec 25 14:40:34 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.255: +23 -8 lines
Diff to previous 1.255 (colored) to selected 1.91 (colored)

In the SYNOPSIS, implement hanging indentation for .Fo
and avoid output line breaks inside .Fa arguments.
This reduces groff-mandoc differences in OpenBSD base by more than 8%.
Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).

Revision 1.255 / (download) - annotate - [select for diffs], Wed Dec 25 00:39:31 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.254: +3 -1 lines
Diff to previous 1.254 (colored) to selected 1.91 (colored)

Do not break output lines in .Fn function arguments in SYNOPSIS mode.
Following an idea from Franco Fichtner, but implemented more cleanly.
This reduces groff-mandoc-differences in OpenBSD base by a fantastic 7.5%.

Revision 1.254 / (download) - annotate - [select for diffs], Tue Dec 24 23:04:36 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.253: +3 -14 lines
Diff to previous 1.253 (colored) to selected 1.91 (colored)

Delete the unused flag TERMP_IGNDELIM
and the empty callback termp_igndelim_pre().
Sort the remaining termp flags.

Revision 1.253 / (download) - annotate - [select for diffs], Tue Dec 24 20:45:27 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.252: +9 -18 lines
Diff to previous 1.252 (colored) to selected 1.91 (colored)

It turns out SYNOPSIS mode does not imply .Bk in general,
but only within .Nm blocks.  Simplify the code accordingly.

Triggered by research done by Franco Fichtner.

Revision 1.252 / (download) - annotate - [select for diffs], Tue Dec 24 19:11:46 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.251: +2 -2 lines
Diff to previous 1.251 (colored) to selected 1.91 (colored)

When deciding whether two consecutive macros are on the same input line,
we have to compare the line where the first one *ends* (not where it begins)
to the line where the second one starts.
This fixes the bug that .Bk allowed output line breaks right after block
macros spanning more than one input line, even when the next macro follows
on the same line.

Revision 1.251 / (download) - annotate - [select for diffs], Mon Dec 23 02:20:09 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.250: +17 -1 lines
Diff to previous 1.250 (colored) to selected 1.91 (colored)

Implement a long-standing desideratum,
hanging indentation for .Fn in SYNOPSIS mode,
exploiting the new trailspace feature
by deliberately *NOT* using it.

Revision 1.250 / (download) - annotate - [select for diffs], Sun Dec 22 23:34:13 2013 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.249: +31 -18 lines
Diff to previous 1.249 (colored) to selected 1.91 (colored)

Polishing the worms in my favourite can, term_flushln().

The TERMP_TWOSPACE flag i introduced in August 2009 was idiosyncratic
and served only a very narrow purpose.  Replace it by a more intuitive
and more general termp attribute "trailspace", to be used together
with TERMP_NOBREAK, to request a minimum amount of whitespace at
the end of the current column.  Adapt all code to the new interface.

No functional change intended;
code reviews to confirm that are welcome *eg*.

Revision 1.249 / (download) - annotate - [select for diffs], Sun Jun 2 18:16:57 2013 UTC (10 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_2
Changes since 1.248: +5 -5 lines
Diff to previous 1.248 (colored) to selected 1.91 (colored)

Let .Do .Dq .Ql .So .Sq generate the correct roff(7) character escape
sequences such that output modes like -Tutf8 have a chance to select
nice glyphs.  This doesn't change anything for -Tascii, and, for now,
it doesn't affect -Tps and -Tpdf either.
OK matthew@ bentley@; like the idea tedu@; no opinion jmc@.

Revision 1.248 / (download) - annotate - [select for diffs], Wed May 29 16:11:40 2013 UTC (10 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.247: +3 -7 lines
Diff to previous 1.247 (colored) to selected 1.91 (colored)

Simplify condition, avoid duplicate code; no functional change.

Revision 1.247 / (download) - annotate - [select for diffs], Wed May 29 15:40:22 2013 UTC (10 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.246: +2 -2 lines
Diff to previous 1.246 (colored) to selected 1.91 (colored)

In SYNOPSIS mode, .Ek doesn't end a keep.
Found and fixed on the plane to the OpenBSD t2k13 hackathon in Toronto.

Revision 1.246 / (download) - annotate - [select for diffs], Sat May 18 17:47:47 2013 UTC (10 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.245: +3 -2 lines
Diff to previous 1.245 (colored) to selected 1.91 (colored)

Should termp_xx_pre() ever get called for a macro it cannot handle,
use abort(3), just like in the three other comparable cases in this file,
instead of ignoring the problem and causing a null pointer access.
Cosmetical issue reported by Ulrich Spoerlein <uqs@spoerlein.net>
found by Coverity Scan CID 976115.
No functional change.

Revision 1.245 / (download) - annotate - [select for diffs], Sat Nov 17 00:26:33 2012 UTC (11 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.244: +38 -37 lines
Diff to previous 1.244 (colored) to selected 1.91 (colored)

Cleanup naming of local variables to make the code easier on the eye:
Settle for "struct man *man", "struct mdoc *mdoc", "struct meta *meta"
and avoid the confusing "*m" which was sometimes this, sometimes that.
No functional change.

ok kristaps@ some time ago

Revision 1.244 / (download) - annotate - [select for diffs], Fri Nov 16 17:16:55 2012 UTC (11 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.243: +7 -7 lines
Diff to previous 1.243 (colored) to selected 1.91 (colored)

Improve formatting of badly nested font blocks.
The basic idea is to already pop the font at the end marker
instead of allowing it to linger until the final end of the block.

This requires a few preliminaries:
* For each block, save a pointer to the previous font
  to be used in case the block breaks another and gets extended.
* That requires making node information writable during rendering.
* Now fonts may get popped in the wrong order; hence, after the stack
  has already been rewound further by some block that began earlier,
  ignore popping a font that was put on the stack later.
* To be able to exploit all this for font blocks, tie processing
  to their body, not their block, which is more logical anyway.

Triggered by florian@ reporting vaguely similar issues with list blocks.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Jul 11 16:57:43 2012 UTC (11 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.242: +2 -2 lines
Diff to previous 1.242 (colored) to selected 1.91 (colored)

fix position and formatting of %U;
OpenBSD rev. 1.104 and 1.145, respectively

Revision 1.242 / (download) - annotate - [select for diffs], Tue Jul 10 14:38:51 2012 UTC (11 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.241: +12 -8 lines
Diff to previous 1.241 (colored) to selected 1.91 (colored)

* implement -Tman .Bl -item -inset -diag -ohang -dash -hyphen -enum .It
* fix -Tman .Bl -bullet .It
* adjust the -Tascii .Bl -bullet -dash -hyphen .It
default and minimum width to new groff standards,
it changed from 4n (in groff 1.15) to 2n (in groff 1.21)
* same for -Tascii -enum, it changed from 5n to 2n
* use -hang formatting for -Tascii -enum -width 2n
* for -Tascii -enum, the default is -width 3n

Revision 1.241 / (download) - annotate - [select for diffs], Mon Jul 9 23:53:36 2012 UTC (11 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.240: +14 -16 lines
Diff to previous 1.240 (colored) to selected 1.91 (colored)

fix -Tascii .Fd line breaking
and implement -Tman .Fd
OpenBSD rev. 1.27 and 1.143, respectively

Revision 1.240 / (download) - annotate - [select for diffs], Sun Jul 8 22:49:29 2012 UTC (11 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.239: +16 -17 lines
Diff to previous 1.239 (colored) to selected 1.91 (colored)

fix .Lk for -Tascii and implement it for -Tman
OpenBSD rev. 1.22 and 1.142, respectively

Revision 1.239 / (download) - annotate - [select for diffs], Sun Jul 8 16:52:20 2012 UTC (11 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.238: +3 -1 lines
Diff to previous 1.238 (colored) to selected 1.91 (colored)

implement -Tman .An
also reset -[no]split mode at .Sh AUTHORS in -Tascii
OpenBSD rev. 1.20 and 1.141, respectively

Revision 1.238 / (download) - annotate - [select for diffs], Sun Nov 13 13:15:14 2011 UTC (12 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_1
Changes since 1.237: +9 -9 lines
Diff to previous 1.237 (colored) to selected 1.91 (colored)

Make the default left text margin configurable from the command line,
just like the default right margin already is.  This may be useful for
people with expensive screen real estate.  Besides, it helps automated
man(7) to mdoc(7) output comparisons to validate -Tman output.
ok kristaps@ on an earlier version

Revision 1.237 / (download) - annotate - [select for diffs], Thu Nov 3 20:36:59 2011 UTC (12 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.236: +6 -2 lines
Diff to previous 1.236 (colored) to selected 1.91 (colored)

Correct .Eo spacing:
no space between the delimiters and the enclosed text.
The mdoc_html.c part was added by kristaps; ok kristaps@.

Revision 1.236 / (download) - annotate - [select for diffs], Sun Oct 16 12:20:34 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.235: +3 -1 lines
Diff to previous 1.235 (colored) to selected 1.91 (colored)

Remove a bunch of useless assignments,
and assert that print_bvspace cannot be called on NULL pointers.
No change in behaviour, none of these were bugs,
but the code becomes easier to understand.
Based on a clang report posted by joerg@; ok kristaps@.

Revision 1.235 / (download) - annotate - [select for diffs], Tue Sep 20 09:02:23 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_0
Changes since 1.234: +23 -16 lines
Diff to previous 1.234 (colored) to selected 1.91 (colored)

Sync print_mdoc_head to print_man_head;
this was forgotten after man_term.c rev. 1.25 on March 2, 2010.
The benefit is a sane page header line when .Dt is very long.
Reminded by Thomas Klausner <wiz at NetBSD>, thanks.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Sep 19 22:36:16 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.233: +9 -24 lines
Diff to previous 1.233 (colored) to selected 1.91 (colored)

Remove the terminal frontend flag TERMP_NOLPAD.

In columnated contexts (.Bl -column, .Bl -tag, .IP, .TP, .HP etc.), do not
pad after writing a column.  Instead, always pad before writing content.

In itself, this change avoids:
 - writing trailing whitespace in some situations
 - with .fi/.nf in .HP, breaking lines that were already padded

It allows several bugfixes included in this patch:
 - Do not count backspace as a character with positive width.
 - Set up proper indentation when encountering .fi/.nf in .HP.
 - Adjust the .HP indentation width to what groff does.
 - Never unlimit the right margin unless in the final column.

ok kristaps@

Revision 1.233 / (download) - annotate - [select for diffs], Fri Jul 22 10:50:46 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5
Changes since 1.232: +2 -2 lines
Diff to previous 1.232 (colored) to selected 1.91 (colored)

Add character output (-Tpdf, -Tps, -Tascii) for equations.  This is the
minimum: unseparated terms.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Jul 21 11:34:53 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.231: +2 -2 lines
Diff to previous 1.231 (colored) to selected 1.91 (colored)

Flip eqn into using parsed nodes.  I've temporarily disabled printing
these in the front-ends except for -Ttree, which will display the parsed
tree.

While here, fix that quoted strings aren't scanned for replacement parts.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Jun 29 15:38:09 2011 UTC (12 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_4
Changes since 1.230: +3 -2 lines
Diff to previous 1.230 (colored) to selected 1.91 (colored)

First fix how `sp 1' doesn't imply `1v' (it now does) and that 1
followed by non-digits, e.g. `1g', really means `1'.  Next, fix some
spacing issues where `sp' was invoked in -man after sections or
subsections.  Make sure this behaviour is mirrored in -Thtml.

Revision 1.230 / (download) - annotate - [select for diffs], Tue May 17 14:38:34 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_3
Changes since 1.229: +2 -9 lines
Diff to previous 1.229 (colored) to selected 1.91 (colored)

Add mode for -Tlocale.  This mode, with this commit, behaves exactly
like -Tascii.  While adding this, inline term_alloc() (was a one-liner),
remove some switches around the terminal encoding for the symbol table
(unnecessary), and split out ascii_alloc() into ascii_init(), which is
also called from locale_init().

Revision 1.229 / (download) - annotate - [select for diffs], Sat Apr 30 22:14:42 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_2
Changes since 1.228: +2 -2 lines
Diff to previous 1.228 (colored) to selected 1.91 (colored)

Rename mchars_init() -> mchars_alloc() for consistency.

Revision 1.228 / (download) - annotate - [select for diffs], Sat Apr 30 22:14:02 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.227: +2 -2 lines
Diff to previous 1.227 (colored) to selected 1.91 (colored)

Remove enum mcharst, which hasn't been used in quite some time.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Apr 29 22:18:12 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.226: +2 -2 lines
Diff to previous 1.226 (colored) to selected 1.91 (colored)

Move "chars" interface out of out.h and into mandoc.h.  This doesn't
change any code but for renaming functions and types to be consistent
with other mandoc.h stuff.  The reason for moving into libmandoc is that
the rendering of special characters is part of mandoc itself---not an
external part.  From mandoc(1)'s perspective, this changes nothing, but
for other utilities, it's important to have these part of libmandoc.
Note this isn't documented [yet] in mandoc.3 because there are some
parts I'd like to change around beforehand.

Revision 1.226 / (download) - annotate - [select for diffs], Mon Apr 4 16:27:03 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_1
Changes since 1.225: +14 -7 lines
Diff to previous 1.225 (colored) to selected 1.91 (colored)

Last low-hanging removal of superfluous variable assignments.

Revision 1.225 / (download) - annotate - [select for diffs], Mon Apr 4 16:21:51 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.224: +10 -10 lines
Diff to previous 1.224 (colored) to selected 1.91 (colored)

Clean up superfluous variables in `Xr' handling in -Tascii.

Revision 1.224 / (download) - annotate - [select for diffs], Mon Apr 4 16:15:58 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.223: +16 -13 lines
Diff to previous 1.223 (colored) to selected 1.91 (colored)

Fully fix the `Rv' and `Ex' handlers for -T[x]html and -Tascii.  This
includes an unreported bug where `Ex' wasn't properly adding a newline.

Revision 1.223 / (download) - annotate - [select for diffs], Mon Apr 4 16:05:36 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.222: +16 -11 lines
Diff to previous 1.222 (colored) to selected 1.91 (colored)

Clean up -Tascii in the same way as -T[x]html regarding `Rv' arguments.

Revision 1.222 / (download) - annotate - [select for diffs], Tue Mar 22 14:05:45 2011 UTC (13 years ago) by kristaps
Branch: MAIN
Changes since 1.221: +28 -6 lines
Diff to previous 1.221 (colored) to selected 1.91 (colored)

Move mandoc_isdelim() back into libmdoc.h.  This fixes an unreported
error where (1) -man pages were punctuating delimiters (e.g., `.B a ;')
and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its
own line) would also be punctuated.  This introduces a small amount of
complexity of mdoc_{html,term}.c must manage their own spacing with
running print_word() or print_text().  The check for delimiting now
happens in mdoc_macro.c's dword().

Revision 1.221 / (download) - annotate - [select for diffs], Tue Mar 22 10:13:01 2011 UTC (13 years ago) by kristaps
Branch: MAIN
Changes since 1.220: +1 -2 lines
Diff to previous 1.220 (colored) to selected 1.91 (colored)

Step 4: merge chars.h into out.h.  The functions in this file are
necessary to all [real] front-ends, so stop pretending it's special.
While here, add some documentation to the variable types.

Revision 1.220 / (download) - annotate - [select for diffs], Mon Mar 7 01:35:51 2011 UTC (13 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_10
Changes since 1.219: +6 -10 lines
Diff to previous 1.219 (colored) to selected 1.91 (colored)

Clean up date handling,
as a first step to get rid of the frequent petty warnings in this area:
 - always store dates as strings, not as seconds since the Epoch
 - for input, try the three most common formats everywhere
 - for unrecognized format, just pass the date though verbatim
 - when there is no date at all, still use the current date
Originally triggered by a one-line patch from Tim van der Molen,
<tbvdm at xs4all dot nl>, which is included here.
Feedback and OK on manual parts from jmc@.
"please check this in" kristaps@

Revision 1.219 / (download) - annotate - [select for diffs], Wed Feb 9 09:52:47 2011 UTC (13 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.218: +2 -1 lines
Diff to previous 1.218 (colored) to selected 1.91 (colored)

EQN blocks are now printed in all modes.  This is simply a printing of
the concatenated string (in -T[x]html, it gets a SPAN, too).

Revision 1.218 / (download) - annotate - [select for diffs], Sun Feb 6 23:02:31 2011 UTC (13 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.217: +4 -2 lines
Diff to previous 1.217 (colored) to selected 1.91 (colored)

Fix a regression caused by mdoc_term.c 1.214 / mdoc_html.c 1.148:
Inside .Bk or inside the SYNOPSIS, Unix variant macros cleared
the keep flag.

Revision 1.217 / (download) - annotate - [select for diffs], Sun Feb 6 22:33:38 2011 UTC (13 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.216: +26 -21 lines
Diff to previous 1.216 (colored) to selected 1.91 (colored)

Some pre-handlers produce output, so reorder the code to set up
keep flags before they are called.
Without this bugfix, .Bk was ineffective in some cases.
"looks reasonable" kristaps@

Revision 1.216 / (download) - annotate - [select for diffs], Sun Feb 6 21:44:36 2011 UTC (13 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.215: +5 -1 lines
Diff to previous 1.215 (colored) to selected 1.91 (colored)

Add initial libmdoc and libman top-most machinery for accepting TBL
directives.  For now this will just ignore them (except for -Ttree,
which just notes that an EQN's been accepted).

Revision 1.215 / (download) - annotate - [select for diffs], Wed Feb 2 21:40:45 2011 UTC (13 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.214: +3 -2 lines
Diff to previous 1.214 (colored) to selected 1.91 (colored)

If `Ns' is specified on its own line, it should be ignored.  This is
shitty groff behaviour.  Do the same, but raise a warning to this
effect.  This from a TODO noted by schwarze@.

Revision 1.214 / (download) - annotate - [select for diffs], Tue Jan 25 16:20:24 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.213: +7 -3 lines
Diff to previous 1.213 (colored) to selected 1.91 (colored)

Arguments to `Bsx' and friends are separated by a non-breaking space.
This removes a TODO raised by schwarze@.

Revision 1.213 / (download) - annotate - [select for diffs], Tue Jan 25 15:46:05 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.212: +3 -8 lines
Diff to previous 1.212 (colored) to selected 1.91 (colored)

Push capitalisation of `Bx' second argument into validator, where it belongs.

Revision 1.212 / (download) - annotate - [select for diffs], Tue Jan 25 15:28:56 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.211: +8 -3 lines
Diff to previous 1.211 (colored) to selected 1.91 (colored)

Properly uppercase the first-letter of the `Bx' second argument.

Revision 1.211 / (download) - annotate - [select for diffs], Tue Jan 25 15:17:18 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.210: +21 -7 lines
Diff to previous 1.210 (colored) to selected 1.91 (colored)

Have `Bx' accept two arguments, not just one, and join these arguments
with "xxBSD-yy"

Revision 1.210 / (download) - annotate - [select for diffs], Tue Jan 25 10:37:49 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.209: +3 -3 lines
Diff to previous 1.209 (colored) to selected 1.91 (colored)

If %B is specified, quote %T.  Noted by schwarze@ in the TODO.

Revision 1.209 / (download) - annotate - [select for diffs], Wed Jan 12 10:43:22 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.208: +3 -1 lines
Diff to previous 1.208 (colored) to selected 1.91 (colored)

If the first character of free-form text is whitespace, then a newline
shall precede outputted text (surprise!).

Revision 1.208 / (download) - annotate - [select for diffs], Thu Jan 6 14:05:12 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9
Changes since 1.207: +4 -2 lines
Diff to previous 1.207 (colored) to selected 1.91 (colored)

Make -literal displays only have 8-character displays.  From a
low-hanging TODO added by schwarze@ on 15/08/10.

Revision 1.207 / (download) - annotate - [select for diffs], Sun Jan 2 12:21:07 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.206: +2 -1 lines
Diff to previous 1.206 (colored) to selected 1.91 (colored)

Turn on -Tascii tbl printing.  The output still has some issues---I'm
not sure whether it's in the header calculation or term.c squashing
spaces or whatever, but let's get this in for general testing as soon as
possible.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Jan 1 12:18:37 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.205: +23 -8 lines
Diff to previous 1.205 (colored) to selected 1.91 (colored)

Add table processing structures to -mdoc.  This consists of an
external-facing function mdoc_addspan(), then various bits to prohibit
printing and scanning (this requires some if's to be converted into
switch's).

Revision 1.205 / (download) - annotate - [select for diffs], Sat Dec 25 23:27:50 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.204: +5 -5 lines
Diff to previous 1.204 (colored) to selected 1.91 (colored)

As pointed out by schwarze@, %T/%J renders with a normal double-quote, not
the fancy double-quote.

Revision 1.204 / (download) - annotate - [select for diffs], Sat Dec 25 23:25:53 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.203: +4 -4 lines
Diff to previous 1.203 (colored) to selected 1.91 (colored)

Implement schwarze@'s much more elegant version of my %T/%J fix.

Revision 1.203 / (download) - annotate - [select for diffs], Sat Dec 25 13:50:37 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.202: +43 -4 lines
Diff to previous 1.202 (colored) to selected 1.91 (colored)

Specifying both %T and %J in an `Rs' block causes the title to be quoted
instead of underlined.  This only happens in -Tascii, as -T[x]html both
underlines and italicises.

Revision 1.202 / (download) - annotate - [select for diffs], Fri Dec 24 14:00:40 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_8
Changes since 1.201: +25 -25 lines
Diff to previous 1.201 (colored) to selected 1.91 (colored)

As per schwarze@'s suggestions, roll back the refcount structure in
favour of a simpler shim for normalised data in the node allocation and
free routines.  This removes the need to bump and copy references within
validator handlers, removes a pointer redirect, and also kills the
refcount structure itself.  Data is assumed to "live" either in a
MDOC_BLOCK or MDOC_ELEM and is copied accordingly.

Revision 1.201 / (download) - annotate - [select for diffs], Wed Dec 22 11:15:16 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.200: +25 -30 lines
Diff to previous 1.200 (colored) to selected 1.91 (colored)

Implement reference-counted version of original union mdoc_data.  This
simplifies clean-up and allows for more types without extra hassle.

Also made in-line literal types in -T[x]html use CODE instead of SPAN to
match how literal blocks use PRE.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Dec 19 12:11:42 2010 UTC (13 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.199: +3 -2 lines
Diff to previous 1.199 (colored) to selected 1.91 (colored)

Handle .Bk the same way as groff 1.20.1:
.Bk without arguments defaults to -words.
.Bk with invalid arguments (including -lines) has no effect.
ok kristaps@

Revision 1.199 / (download) - annotate - [select for diffs], Thu Dec 16 17:14:48 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored) to selected 1.91 (colored)

Migrate `An' to use a pointer in its data, like everybody else.  This is
the first step to having a simpler ref-counted system for "data"
associated with a node.

Revision 1.198 / (download) - annotate - [select for diffs], Wed Dec 15 23:44:02 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.197: +1 -6 lines
Diff to previous 1.197 (colored) to selected 1.91 (colored)

Remove `Pp' and `Lp' checks in front-ends to make sure we're not
printing as the first or last child of an `Ss' or `Sh': this is now
ensured within the validator.

Revision 1.197 / (download) - annotate - [select for diffs], Sat Dec 11 14:40:51 2010 UTC (13 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.196: +15 -2 lines
Diff to previous 1.196 (colored) to selected 1.91 (colored)

Make SYNOPSIS sections and code having .nr nS enabled
behave as if the whole code were wrapped in .Bk/.Ek,
i.e. keeping input lines together on output lines.
This is compatible with new groff behaviour and deviates
from historical groff.
Tweaked version of a patch sent by kristaps@ on July 16, 2010.
ok kristaps@ jmc@ sobrado@ millert@

Revision 1.196 / (download) - annotate - [select for diffs], Sun Dec 5 15:37:30 2010 UTC (13 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_7
Changes since 1.195: +5 -1 lines
Diff to previous 1.195 (colored) to selected 1.91 (colored)

Merge schwarze@'s changes allowing nested displays.  Tweak the patch by
making sure output doesn't add a superfluous newline with the nested displays.
Also add a COMPATIBILITY note.

Rename a macro (DATESIZ) to be in line with OpenBSD (DATESIZE).

Revision 1.195 / (download) - annotate - [select for diffs], Mon Nov 29 13:02:47 2010 UTC (13 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.194: +2 -2 lines
Diff to previous 1.194 (colored) to selected 1.91 (colored)

Move `Mt', `Ar', and `Li' handling from mdoc_action.c into mdoc_validate.c.

Clarify that `Mt' gets a default `~' (as per groff 1.20) and document it
in mdoc.7.

Made `Lk' be removed in mdoc_macro.c if it has no arguments.  This fixes
segfaults in mdoc_{term,html}.c that nobody's managed to raise yet.

Revision 1.194 / (download) - annotate - [select for diffs], Sat Oct 23 23:31:10 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.193: +2 -2 lines
Diff to previous 1.193 (colored) to selected 1.91 (colored)

let .Bsx print just "BSD/OS" like in modern groff
from Ulrich Spoerlein <uqs at spoerlein dot net>

Revision 1.193 / (download) - annotate - [select for diffs], Sun Oct 10 09:59:48 2010 UTC (13 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.192: +3 -1 lines
Diff to previous 1.192 (colored) to selected 1.91 (colored)

`Sm' no longer produces a linebreak when used in `Bd'.

Revision 1.192 / (download) - annotate - [select for diffs], Fri Oct 1 21:51:13 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.191: +4 -5 lines
Diff to previous 1.191 (colored) to selected 1.91 (colored)

* need a space before .No even if it starts with a closing delimiter
* slightly simplify .Pf *_IGNDELIM code, and share part of it with .No
* do not let opening delimiters fall out of the front of .Ns (from kristaps@)
This fixes a few spacing issues in csh(1) and ksh(1).
OK kristaps@

Revision 1.191 / (download) - annotate - [select for diffs], Mon Sep 27 23:03:44 2010 UTC (13 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.190: +1 -2 lines
Diff to previous 1.190 (colored) to selected 1.91 (colored)

Merge from OpenBSD right after 1.10.6; now back to full sync.
* mdoc.c: blank lines outside literal mode are more similar to .sp than .Pp
* backslashes do not terminate macros; partial revert of mdoc.c 1.164;
  the intention of that commit is fully achieved in roff.c
* mdoc_term.c: no need to list the same prototype twice
* mdoc_validate.c: drop .Pp before .sp just like .Pp before .Pp
* fix off-by-one found by jsg@ with parfait, OpenBSD term_ps.c 1.12
ok kristaps@

Revision 1.190 / (download) - annotate - [select for diffs], Mon Sep 27 11:21:39 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_6
Changes since 1.189: +21 -1 lines
Diff to previous 1.189 (colored) to selected 1.91 (colored)

Suppress whitespace following Pp, Lp, sp, and the other newline-emitting
macros within an unfilled or literal `Bd'.

Revision 1.189 / (download) - annotate - [select for diffs], Sun Sep 26 10:00:42 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.188: +3 -1 lines
Diff to previous 1.188 (colored) to selected 1.91 (colored)

Linted function arguments.

Revision 1.188 / (download) - annotate - [select for diffs], Sun Sep 26 09:16:02 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.187: +118 -226 lines
Diff to previous 1.187 (colored) to selected 1.91 (colored)

Big clean-up consolidating all punctuation opening/closing functions into
a single one.  This makes code auditing easier and cuts down on
bytesize.

I also removed some NOSPACE clauses that were handled implicitly by the
punctuation itself, e.g., a NOSPACE prior to printing ')', which in
term.c has its leading whitespace automatically suppressed.

Revision 1.187 / (download) - annotate - [select for diffs], Sat Sep 25 16:41:33 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.186: +4 -2 lines
Diff to previous 1.186 (colored) to selected 1.91 (colored)

A `%T' invoked outside of `Rs' should not produce trailing punctuation.
This from a TODO entry.  Also stripped the superfluous NOSPACE, which is
handled in term_word() or print_text() anyway.

Revision 1.186 / (download) - annotate - [select for diffs], Sat Sep 25 15:51:30 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.185: +6 -2 lines
Diff to previous 1.185 (colored) to selected 1.91 (colored)

Add `Rs' vertical-space in -T[x]html "SEE ALSO" section.  Remove
corresponding TODO entry.

Also have the "." after an `Rs' block trigger inter-sentence spacing.

Revision 1.185 / (download) - annotate - [select for diffs], Thu Sep 23 20:40:00 2010 UTC (13 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.184: +13 -7 lines
Diff to previous 1.184 (colored) to selected 1.91 (colored)

When the HEAD of an .Nm block in the SYNOPSIS might be wider
than the column containing it, the TERMP_HANG flag is required,
but avoid the flag when we know that the HEAD is shorter,
because in that case, the flag might ruin the alignment.

Problem originally reported by jmc@, who also spotted a regression
in an earlier version of this patch.

"feel free to commit" kristaps@

Revision 1.184 / (download) - annotate - [select for diffs], Sat Sep 4 19:01:52 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.183: +26 -2 lines
Diff to previous 1.183 (colored) to selected 1.91 (colored)

Properly handle -mdoc %A in all outputs.  This has two-author entires
separated by only "and" while two or more are with ", and" for the last
author.

Also remove relevant TODO and add regression tests.

Revision 1.183 / (download) - annotate - [select for diffs], Sat Aug 21 14:04:13 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.182: +1 -14 lines
Diff to previous 1.182 (colored) to selected 1.91 (colored)

Backout previous.
As Kristaps found out, i was wrong: .Bl -column phrases do not ignore
spacing rules for trailing punctuation in general.  In particular,
- the rightmost column of a column list is unaffected
- columns terminated by the .Ta macro instead of a tab are unaffected
- columns ending in a blank are unaffected
Spacing rules for trailing punctuation are only ignored when the tab
follows the punctuation immediately, without a blank in between,
because then the combination of punctuation and tab is treated by roff
as a word, and the punctuation is not recognized as isolated.
The reason this doesn't work in mandoc is that in the special case
of .Bl -column (not in general!), mandoc treats tabs as word delimiters.
We either need to solve this differently, or call it a bug in roff.

Revision 1.182 / (download) - annotate - [select for diffs], Fri Aug 20 22:51:29 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.181: +14 -1 lines
Diff to previous 1.181 (colored) to selected 1.91 (colored)

.Bl -column phrases ignore spacing rules for trailing punctuation
and render it just like normal text.
Minimal fix of a formatting bug in operator(7) reported by ray@.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Aug 9 00:00:37 2010 UTC (13 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.180: +8 -6 lines
Diff to previous 1.180 (colored) to selected 1.91 (colored)

Correctly print `Lk' arguments in -Tascii.  Issue raised by Aldis Berzoja.
Behaviour ok'd by schwarze@.

Revision 1.180 / (download) - annotate - [select for diffs], Sat Aug 7 17:11:17 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.179: +5 -3 lines
Diff to previous 1.179 (colored) to selected 1.91 (colored)

merge from OpenBSD mdoc_term.c rev. 1.100:
preserve blank lines in .Bd -literal,
both in the middle and at the end of the display
ok kristaps@

Revision 1.179 / (download) - annotate - [select for diffs], Tue Jul 27 08:38:04 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5
Changes since 1.178: +4 -8 lines
Diff to previous 1.178 (colored) to selected 1.91 (colored)

Fix how `Bd -unfilled' and `Bd -literal' break lines.  This unbreaks
displays to work as old groff shows them; however, new groff still does
some fancy shit.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Jul 26 22:35:59 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.177: +2 -2 lines
Diff to previous 1.177 (colored) to selected 1.91 (colored)

`Ad' is supposed to underline.  Found whilst trolling through manuals.

Revision 1.177 / (download) - annotate - [select for diffs], Wed Jul 21 21:55:33 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_5_PREPDF
Changes since 1.176: +3 -2 lines
Diff to previous 1.176 (colored) to selected 1.91 (colored)

In the SYNOPSIS, .Nm at the beginning of an input line starts
an .Nm block, and gets special handling (new line, indentation).
But .Nm in the middle of a line is just a normal in-line element,
so make sure it does NOT get the special handling.
Partly fixes the test(1) SYNOPSIS; indentation after "[" is still
excessive, which is an unrelated and more difficult issue.
Reminded of the problem by jmc@;
OK kristaps@.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Jul 19 11:11:54 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.175: +2 -2 lines
Diff to previous 1.175 (colored) to selected 1.91 (colored)

Remove some FIXMEs: `Ms' accepts arbitrary text, so it can't/shouldn't
be converted into a symbol.

The `Pp' issue has also been fixed.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Jul 19 11:06:31 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.174: +6 -1 lines
Diff to previous 1.174 (colored) to selected 1.91 (colored)

Fix spurrious newline emitted by `Pp' when specified before or after
`Sh'/`Ss'.  Reported by Jason McIntyre.

Revision 1.174 / (download) - annotate - [select for diffs], Fri Jul 16 00:03:37 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.173: +5 -3 lines
Diff to previous 1.173 (colored) to selected 1.91 (colored)

After .Sm on, spacing ought to restart right away, before the next token,
and not with a delay, after the next token.  But be careful not to cause
leading white space at the beginning of a line or column.
In OpenBSD, improves chmod(1), ksh(1), tar(1), ps(1) and probably many more.
ok kristaps@ and tested by jmc@ and sobrado@

Revision 1.173 / (download) - annotate - [select for diffs], Wed Jul 7 15:04:54 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_4
Changes since 1.172: +1 -2 lines
Diff to previous 1.172 (colored) to selected 1.91 (colored)

Re-constitution of `ds' symbol processing.  First, push the
roff_getstr() family of functions into roff.c with the "first_string"
directly in struct roff.  Second, pre-process each line for reserved
words in libroff, splicing and re-running a line if it has one (this
allows defined symbols to be macros).  Remove term.c's invocation of the
roff_getstrn() function.  Removed function documentation in roff.3 and
added roff.7 `ds' documentation.

Revision 1.172 / (download) - annotate - [select for diffs], Tue Jul 6 10:54:05 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.171: +18 -1 lines
Diff to previous 1.171 (colored) to selected 1.91 (colored)

Proper `Bk -words' support: only suppress breaks within a line, but
allow end-of-line to break.  This fixes the bad behaviour found when
macros within `Bk' never break.

"Excellent" schwarze@

Revision 1.171 / (download) - annotate - [select for diffs], Sun Jul 4 22:04:04 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.170: +3 -2 lines
Diff to previous 1.170 (colored) to selected 1.91 (colored)

Assert my copyright, making it explicit that i'm granting the same license
on those parts of the code and text that i have written as Kristaps is.
"fine with me" kristaps@

Revision 1.170 / (download) - annotate - [select for diffs], Sun Jul 4 21:59:30 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.169: +6 -28 lines
Diff to previous 1.169 (colored) to selected 1.91 (colored)

Cache column sizes and char pointer into mdoc_bl.  Finally get rid of
the loops here and there to track down the MDOC_Column arguments.

Revision 1.169 / (download) - annotate - [select for diffs], Sat Jul 3 17:17:15 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.168: +4 -2 lines
Diff to previous 1.168 (colored) to selected 1.91 (colored)

Allow empty `Fo' to get by without an assertion.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Jul 2 15:03:14 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.167: +3 -16 lines
Diff to previous 1.167 (colored) to selected 1.91 (colored)

Cached `An' arguments in struct mdoc_an.  Note that this isn't a
pointer like the other data members, as there's no need to copy it around.

Revision 1.167 / (download) - annotate - [select for diffs], Fri Jul 2 12:54:33 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.166: +5 -16 lines
Diff to previous 1.166 (colored) to selected 1.91 (colored)

Stash `Bf' parameters into struct mdoc_bf.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Jul 2 10:53:28 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.165: +6 -3 lines
Diff to previous 1.165 (colored) to selected 1.91 (colored)

Lint fixes.

Revision 1.165 / (download) - annotate - [select for diffs], Thu Jul 1 22:56:17 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.164: +25 -23 lines
Diff to previous 1.164 (colored) to selected 1.91 (colored)

Make struct_bl and struct_bd into pointers.  This removes the need to do
copying on internals after modification.  Even more importantly, if an
ENDBODY token is provided, it would have been impossible for post-change
copying of the data to take place in the BLOCK.  This allows it to
happen by dint of pointers.

Also did some bikeshedding in mdoc_term.c: checking against enum type
and explicitly casting to the "post" function to void.  This is for my
own readability.

Revision 1.164 / (download) - annotate - [select for diffs], Thu Jul 1 15:38:56 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.163: +43 -3 lines
Diff to previous 1.163 (colored) to selected 1.91 (colored)

Improve .Nm indentation in the SYNOPSIS;
kristaps@ will do the missing HTML part soon.
"looks nicer" jmc@
"seems perfect to me" sobrado@
"slap it in" kristaps@

Revision 1.163 / (download) - annotate - [select for diffs], Thu Jul 1 14:34:03 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored) to selected 1.91 (colored)

More reality-checks for the p->end type.

Revision 1.162 / (download) - annotate - [select for diffs], Tue Jun 29 19:20:38 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.161: +25 -8 lines
Diff to previous 1.161 (colored) to selected 1.91 (colored)

Support for badly nested blocks, written around the time of
the Rostock mandoc hackathon and tested and polished since,
supporting constructs like:

.Ao Bo    Ac    Bc        (exp breaking exp)
.Aq Bo    eol   Bc        (imp breaking exp)
.Ao Bq    Ac    eol       (exp breaking imp)
.Ao Bo So Bc    Ac  Sc    (double break, inner before outer)
.Ao Bo So Ac    Bc  Sc    (double break, outer before inner)
.Ao Bo    Ac So Bc  Sc    (broken breaker)
.Ao Bo So Bc Do Ac  Sc Dc (broken double breaker)

There are still two known issues which are tricky:

1) Breaking two identical explicit blocks (Ao Bo Bo Ac or Aq Bo Bo eol)
fails outright, triggering a bogus syntax error.
2) Breaking a block by two identical explicit blocks (Ao Ao Bo Ac Ac Bc
or Ao Ao Bq Ac Ac eol) still has a minor rendering error left:
"<ao1 <ao2 [bo ac2> ac1> bc]>" should not have the final ">".

We can fix these later in the tree, let's not grow this diff too large.

"get it in" kristaps@

Revision 1.161 / (download) - annotate - [select for diffs], Sun Jun 27 17:53:27 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_3
Changes since 1.160: +14 -4 lines
Diff to previous 1.160 (colored) to selected 1.91 (colored)

minor .Bk fixes:
* do not print invalid arguments verbatim (no groffs prints them, either)
* do not trigger TERMP_PREKEEP twice
* do not die from invlid arguments (groff won't die, either)
* continue to ignore even valid arguments (just like groff)
ok kristaps@ on the previous version, before removing my last bug ;)

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jun 27 16:18:13 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.159: +7 -7 lines
Diff to previous 1.159 (colored) to selected 1.91 (colored)

Following clue-stick applied by schwarze@, back out const-ness of regset
passed in to libmdoc and libman.

Fix mdoc.3 and man.3 EXAMPLE sections to include regset.

Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values
as if SEC_SYNOPSIS were the current section.

Revision 1.159 / (download) - annotate - [select for diffs], Sun Jun 27 01:26:20 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.158: +22 -2 lines
Diff to previous 1.158 (colored) to selected 1.91 (colored)

Basic implementation of .Bk/.Ek; from OpenBSD.
OK and one stylistic tweak by kristaps@.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Jun 26 15:36:37 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.157: +2 -1 lines
Diff to previous 1.157 (colored) to selected 1.91 (colored)

Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept a
const struct regset pointer.  No functionality.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Jun 25 18:53:14 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.156: +42 -40 lines
Diff to previous 1.156 (colored) to selected 1.91 (colored)

Initial chunks for variable-width fonts.  Pushes all width calculations
in mdoc_term.c and man_term.c down into term.c.  This is still not
implemented in term.c, although stubs for width calculations are in
place.  From now on, offset, rmargin, and other layout variables are
abstract screen widths.  They will resolve to the the familiar values
for -Tascii but -Tps will eventually use points instead of chars.

Revision 1.156 / (download) - annotate - [select for diffs], Sat Jun 19 20:46:28 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_2
Changes since 1.155: +2 -2 lines
Diff to previous 1.155 (colored) to selected 1.91 (colored)

Churn as I finish email address migration kth.se -> bsd.lv.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Jun 13 22:05:43 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.154: +15 -45 lines
Diff to previous 1.154 (colored) to selected 1.91 (colored)

Remove arg_getattrs(), as we only have arg_getattr()-like calls now that
-width is cached.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Jun 13 21:41:58 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.153: +11 -10 lines
Diff to previous 1.153 (colored) to selected 1.91 (colored)

Switch on cached -width usage in front-ends.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Jun 13 21:02:49 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.152: +2 -1 lines
Diff to previous 1.152 (colored) to selected 1.91 (colored)

Allow -width for lists to be cached in mdoc_bl.  This requires some
trickery because widths may be on-the-fly recalculated.  I don't like
how these are split between mdoc_action.c and mdoc_validate.c, but for
the time being, it'll do.

Revision 1.152 / (download) - annotate - [select for diffs], Sat Jun 12 12:38:01 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.151: +11 -11 lines
Diff to previous 1.151 (colored) to selected 1.91 (colored)

Cached `Bl -offset' into mdoc_bl.  Removed erroneous "-offset defaults
to 6n if no value is specified" and added regression tests for `Bl'
testing against the empty -offset argument.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Jun 12 12:21:41 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.150: +10 -7 lines
Diff to previous 1.150 (colored) to selected 1.91 (colored)

Reverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,
obviously, which was causing fallout) and again remove the loop code.
Tested more thoroughly.

Revision 1.150 / (download) - annotate - [select for diffs], Sat Jun 12 12:10:55 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.149: +10 -11 lines
Diff to previous 1.149 (colored) to selected 1.91 (colored)

Moved `Bl -compact' into cached data.  This allowed the removal of
scanning the argv list in print_bvspace(), and thus the parent pointer.

Revision 1.149 / (download) - annotate - [select for diffs], Sat Jun 12 11:58:22 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.148: +6 -5 lines
Diff to previous 1.148 (colored) to selected 1.91 (colored)

`Bl' is now using a struct instead of a single enum mdoc_list for its
cached values.  You can probably guess where this is going.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Jun 12 11:21:44 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.147: +16 -19 lines
Diff to previous 1.147 (colored) to selected 1.91 (colored)

Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
the "data" union in mdoc_node.  Allows me to remove some ugly loops in
the front-end and duplicate tests in mdoc_action.c.  Add a regression
test to make sure we're not doing anything bad (more to come).

Revision 1.147 / (download) - annotate - [select for diffs], Sat Jun 12 10:09:19 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.146: +7 -42 lines
Diff to previous 1.146 (colored) to selected 1.91 (colored)

Added enum mdoc_disp (similar to enum mdoc_list).  Display types are now
only calculated once in mdoc_validate.c.

Noted that `Bd -file xxx' is not supported:  it now raises a fatal
warning.  This is noted in mdoc.7.

Empty `Bd' now defaults to LIST_ragged, which is not quite what groff
does, but close enough (gross just throws away the `Bd' and gets upset
when it encounters an `Ed').

Revision 1.146 / (download) - annotate - [select for diffs], Thu Jun 10 23:24:37 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.145: +3 -4 lines
Diff to previous 1.145 (colored) to selected 1.91 (colored)

Fix a regression that crept in in man_term.c 1.73 and mdoc_term.c 1.144.
When the title line uses special characters, mandoc will segfault.
Thus, first set up the character tables, then print the header,
as we always did.

Found in OpenBSD /usr/src/usr.sbin/bind/bin/check/named-checkconf.8.

While here, set p->tabwidth in terminal_man() for symmetry
with terminal_mdoc(), as suggested by millert@ (and already
committed to OpenBSD earlier).   Since 5 is the default, this
is not strictly required, but it is certainly clearer and more
robust.

"looks fine" kristaps@

Revision 1.145 / (download) - annotate - [select for diffs], Wed Jun 9 08:07:13 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.144: +6 -7 lines
Diff to previous 1.144 (colored) to selected 1.91 (colored)

Have the standard manpage header and footer print on every page of -Tps
output.  This is more tricky than you may think:  we can't just call the
header function out-of-state (i.e., before a flushln has occured)
because we'd clobber our current state.  Thus, we call at the beginning
and dump the output into an auxiliary buffer.

For the record, I don't think there's any other clean way to do this.
The only other Way That Works is to copy-aside *all* termp state, zero
it, and do the necessary headf/footf.  This is just as complex, as
memory needs to be alloc'd and free'd per margin.

Unfortunately, this prohibits page numbering (the margin is only printed
once), so I'll probably end up re-writing this down the line.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jun 7 20:57:09 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_1
Changes since 1.143: +15 -7 lines
Diff to previous 1.143 (colored) to selected 1.91 (colored)

First check-in of PostScript output.  This does not change any logic
within term.c, but does add a small shim over putchar() that switches on
the output engine.  Prints, for this initial version, only monospace and
without font decorations.  It's a start.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Jun 7 11:01:15 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.142: +91 -77 lines
Diff to previous 1.142 (colored) to selected 1.91 (colored)

Normalise SYNOPSIS behaviour after I gave up on following groff's
inconsistent behaviour.  In short:

       Some macros are displayed differently in the SYNOPSIS
       section, particularly Nm, Cd, Fd, Fn, Fo, In, Vt, and Ft.
       All of these macros are output on their own line.  If two
       such dissimilar macros are pair-wise invoked (except for Ft
       before Fo or Fn), they are separated by a vertical space,
       unless in the case of Fo, Fn, and Ft, which are always
       separated by vertical space.

Behaviour ok Jason McIntyre, ingo@.  Fallout will be treated
case-by-case.

I had to clear out some regressions that were testing against groff's
stranger behaviours: these will now break, as we don't care about such
invocations.

Also removed the newline for `Cd' invocation in a non-SYNOPSIS context.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Jun 6 22:08:15 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.141: +4 -1 lines
Diff to previous 1.141 (colored) to selected 1.91 (colored)

Merge a fix to avoid a regression in OpenBSD:
Restore the blank line before .In in SYNOPSIS
except right after .Sh or right after another .In.

Even though Kristaps says SYNOPSIS blank-line handling
is still very much work in progress and more is probably needed,
this one is useful to keep in sync with OpenBSD.

"fine" kristaps@

Revision 1.141 / (download) - annotate - [select for diffs], Sun Jun 6 10:50:56 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.140: +33 -33 lines
Diff to previous 1.140 (colored) to selected 1.91 (colored)

Fixed -Tascii and -Thtml rendering of `Ft' and `Fo'.

Revision 1.140 / (download) - annotate - [select for diffs], Fri Jun 4 22:26:13 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.139: +4 -2 lines
Diff to previous 1.139 (colored) to selected 1.91 (colored)

Fix following the first: `Ft' is given special treatment if specified before
`Fn'.

Revision 1.139 / (download) - annotate - [select for diffs], Fri Jun 4 22:16:27 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.138: +10 -3 lines
Diff to previous 1.138 (colored) to selected 1.91 (colored)

Fixed `Fn' newline behaviour and added some regression tests to this
extent.

Documented `Fn'.  Please note the COMPATIBILITY note regarding historic
groff.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Jun 4 21:49:39 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.137: +15 -18 lines
Diff to previous 1.137 (colored) to selected 1.91 (colored)

Documented `In' in full.

Fixed `In' to behave properly: it wasn't properly breaking lines,
formatting, or really anything else.  Noted COMPATIBILITY with
OpenBSD's groff, which pukes all over `In'.

Revision 1.137 / (download) - annotate - [select for diffs], Fri Jun 4 21:05:39 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.136: +1 -6 lines
Diff to previous 1.136 (colored) to selected 1.91 (colored)

Fixed `Fd' to format in the right way.  Found when confused by what the
hell `Fd' is supposed to do anyway (answer: it's a historical macro and
we shouldn't be doing anything with it anyway).

Revision 1.136 / (download) - annotate - [select for diffs], Tue Jun 1 14:51:09 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored) to selected 1.91 (colored)

De Morgan's law not being applied properly.  Noted by Ulrich Spoerlein.

Revision 1.135 / (download) - annotate - [select for diffs], Mon May 31 10:28:04 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.134: +2 -1 lines
Diff to previous 1.134 (colored) to selected 1.91 (colored)

Remove enum mdocargerr from phrase() (unused).

Add `Ta' macro, which is basically a NULL case everywhere but in
mdoc_macro.c, where it closes out an existing `It' body scope and opens
a new one, then continues parsing as in phrase() (TODO: merge these
two?).

Fix where scope-breaking was silently just dying instead of printing an
error.

Fix where trailing `Ta' or tab weren't creating a new MDOC_BODY context.

We now support arbitrarily complex `It' contents for `Bl -column'.

Revision 1.134 / (download) - annotate - [select for diffs], Sun May 30 22:56:02 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.133: +25 -17 lines
Diff to previous 1.133 (colored) to selected 1.91 (colored)

Migrate `Bl -column' phrases to be MDOC_BODY instead of MDOC_HEAD.  This
will make it easy for re-entrant parsing of `Ta' macros to fit in with
standard closure rules.

Added some more regressions for `Bl -column'.  Note that one should
fail, as documented in the TODO file.

Recorded change of AST BNF in mdoc.3.

Revision 1.133 / (download) - annotate - [select for diffs], Sat May 29 18:58:52 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.132: +1 -3 lines
Diff to previous 1.132 (colored) to selected 1.91 (colored)

Moved printing of empty word [back] into mdoc_action.c so that it's not
mirrored across front-ends.

Revision 1.132 / (download) - annotate - [select for diffs], Sat May 29 18:47:54 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.131: +3 -1 lines
Diff to previous 1.131 (colored) to selected 1.91 (colored)

Commit of patch floated on discuss@ a few days ago: if an in_line scope
has not been opened and closing punctuation is encountered AND the macro
is marked as accepting no-content (or `Li'), then open an empty scope.

Added regression tests for `Fl' and `Li' testing this behaviour.

Also, squeeze hyph0.in tests into the last characters of each line so
that groff doesn't hyphenate and break the test.

Revision 1.131 / (download) - annotate - [select for diffs], Wed May 26 10:39:35 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.130: +5 -1 lines
Diff to previous 1.130 (colored) to selected 1.91 (colored)

Documented `Ud'.

Proper EOS handling for `Rv', `Ex', `Ud', and `Bt'.

Both `Bt' and `Ud' now warn about and discard line arguments (reported
by Ulrich Spoerlein).

Collapsed posts_xr into posts_wtext (harmless: they're the same thing).

Added regressions for `Ud' and `Bt'.

Revision 1.130 / (download) - annotate - [select for diffs], Mon May 24 21:51:20 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.129: +7 -9 lines
Diff to previous 1.129 (colored) to selected 1.91 (colored)

sync to OpenBSD:
save the visual cursor position in term_flushln()
and use that to avoid multiple blank lines in nested lists while
still putting subsequent empty list tags each on their own line;
"go ahead" kristaps@

Revision 1.129 / (download) - annotate - [select for diffs], Mon May 24 21:34:16 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.128: +6 -1 lines
Diff to previous 1.128 (colored) to selected 1.91 (colored)

Handle literal tab characters both in literal context (.Bd -literal)
and outside.  In literal context, tab stops are at each eigth column;
outside, they are at each fifth column.

from OpenBSD mdoc_term.c rev. 1.75;
"commit" kristaps@

Revision 1.128 / (download) - annotate - [select for diffs], Mon May 24 14:35:59 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.127: +2 -2 lines
Diff to previous 1.127 (colored) to selected 1.91 (colored)

fix an obvious typo in print_bvspace():
rev. 1.125 broke vertical spacing in .Bl -column

Revision 1.127 / (download) - annotate - [select for diffs], Sat May 22 20:41:48 2010 UTC (13 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored) to selected 1.91 (colored)

Fix 1.125: Add missing return in termp_nm_pre.

Revision 1.126 / (download) - annotate - [select for diffs], Mon May 17 23:57:06 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.125: +48 -91 lines
Diff to previous 1.125 (colored) to selected 1.91 (colored)

Increase performance by stashing the list type in struct mdoc_node.
This will eventually be used so that mdoc_macro can known whether to
dump list line arguments into the body (`Bl -column' overflowing).

Remove a2list() and arg_listtype() because of this.

Revision 1.125 / (download) - annotate - [select for diffs], Mon May 17 22:11:42 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.124: +7 -3 lines
Diff to previous 1.124 (colored) to selected 1.91 (colored)

Enable the unified error/warning enumeration in mandoc.h that's
stringified in main.c.

Allow `An' to handle an argument and child (with a warning).

Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a
warning).

Allow inconsistent column syntax to only raise a warning.

Revision 1.124 / (download) - annotate - [select for diffs], Sat May 15 16:24:38 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored) to selected 1.91 (colored)

LIBRARY can also occur in section 9.
All manual sections (unknown, 3p, 3f, etc.) correctly handled by -mdoc.
Useful warning printed if unknown manual section.
Checking for manual sections (e.g., LIBRARY) checks only first character, so 3p, 3f, etc. are free.

Revision 1.123 / (download) - annotate - [select for diffs], Sat May 15 16:18:23 2010 UTC (13 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored) to selected 1.91 (colored)

Make the output width an option for ascii_alloc and use that to compute
the default margin. Hard-code 80 chars/line for now.

Revision 1.122 / (download) - annotate - [select for diffs], Thu May 13 06:22:11 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_25
Changes since 1.121: +8 -8 lines
Diff to previous 1.121 (colored) to selected 1.91 (colored)

Fixed bug in -Thtml -mdoc where `Lb' would line-break in LIBRARY section.
Fixed assumption that parse-point == 1 equates to beginning of line (false if whitespace separates macro and control character).
Fixed line-break for non-first-macro in several SYNOPSIS macros.

Revision 1.121 / (download) - annotate - [select for diffs], Wed May 12 16:01:01 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.120: +4 -1 lines
Diff to previous 1.120 (colored) to selected 1.91 (colored)

Tiny EOS patch.  Back-end cues front-end through flag.  Front-end cues output engine with flag.

Revision 1.120 / (download) - annotate - [select for diffs], Mon May 10 08:05:17 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.91 (colored)

-man also now has unbound margins for literal context.

Revision 1.119 / (download) - annotate - [select for diffs], Sun May 9 16:38:38 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.118: +13 -9 lines
Diff to previous 1.118 (colored) to selected 1.91 (colored)

Setting maxmargin, too (for completion).

Revision 1.118 / (download) - annotate - [select for diffs], Sun May 9 16:05:13 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.117: +56 -23 lines
Diff to previous 1.117 (colored) to selected 1.91 (colored)

Allow literal contexts to have unbound line lengths (from Ingo Schwarze's mandoc TODO by way of Jason McIntyre).

Revision 1.117 / (download) - annotate - [select for diffs], Thu Apr 8 08:17:55 2010 UTC (13 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_24
Changes since 1.116: +2 -22 lines
Diff to previous 1.116 (colored) to selected 1.91 (colored)

Fixed %T: it now correctly underlines, instead of quoting (noted by Jason McIntyre and posted on Ingo Schwarze' mandoc-todo list).

Revision 1.116 / (download) - annotate - [select for diffs], Tue Apr 6 16:27:53 2010 UTC (13 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_23
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored) to selected 1.91 (colored)

Allow `Bd' to accept (warn about then ignore) in-line arguments.

Revision 1.115 / (download) - annotate - [select for diffs], Tue Apr 6 11:28:17 2010 UTC (13 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.114: +12 -2 lines
Diff to previous 1.114 (colored) to selected 1.91 (colored)

Let `Bl' accept arguments on the head line with a warning (these are ignored in the front-end device) (noted by Theo de Raadt).

Revision 1.114 / (download) - annotate - [select for diffs], Tue Apr 6 07:27:42 2010 UTC (13 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored) to selected 1.91 (colored)

`Fl' now correctly suppresses the trailing space if followed by macros on the same line.

Revision 1.113 / (download) - annotate - [select for diffs], Sat Apr 3 14:25:12 2010 UTC (13 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.112: +5 -2 lines
Diff to previous 1.112 (colored) to selected 1.91 (colored)

Merged patch by Ingo Schwarze allowing `Xr' to pass through with no arguments (emits warning of course).

Revision 1.112 / (download) - annotate - [select for diffs], Mon Mar 29 19:28:04 2010 UTC (14 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_22, VERSION_1_9_21, VERSION_1_9_20
Changes since 1.111: +2 -2 lines
Diff to previous 1.111 (colored) to selected 1.91 (colored)

Integrate Ingo Schwarze's patch for mdoc_iscdelim() (tri-state for opening and closing macro punctuation).
Modify blk_part_exp() to correctly handle leading punctuation before HEAD.
Significantly clean up and document blk_part_exp().
Modify blk_part_imp() for to correctly handle leading punctuation before HEAD.
Significantly clean up and document blk_part_imp().
Integrate Ingo Schwarze's patch for args() (using new mdoc_iscdelim() format).
Documented bad `Ec' handling for later work in mdoc_term.c/mdoc_html.c.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Mar 23 12:42:22 2010 UTC (14 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_19, VERSION_1_9_18, VERSION_1_9_17
Changes since 1.110: +4 -1 lines
Diff to previous 1.110 (colored) to selected 1.91 (colored)

Fixed two very subtle bugs in retaining overstep and maxrmargin widths between parse sequences.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Jan 30 08:42:21 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_16, VERSION_1_9_15
Changes since 1.109: +19 -3 lines
Diff to previous 1.109 (colored) to selected 1.91 (colored)

Fix in handling Vt in SYNOPSIS with trailing punctuation.  Spotted by Joerg Sonnenberger.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Jan 1 18:33:51 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre2
Changes since 1.108: +20 -17 lines
Diff to previous 1.108 (colored) to selected 1.91 (colored)

Fix of subtle, but significant, resetting of tags when in list mode.  Pointed out by Ingo Schwarze.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Jan 1 18:01:40 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.107: +66 -37 lines
Diff to previous 1.107 (colored) to selected 1.91 (colored)

More in-code documentation and clarity re-arrangements.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:30 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.106: +5 -6 lines
Diff to previous 1.106 (colored) to selected 1.91 (colored)

Big check-in of compatibility layer.  This should work on most major architectures. Thanks to Joerg Sonnenberger.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Jan 1 14:32:52 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre1
Changes since 1.105: +15 -14 lines
Diff to previous 1.105 (colored) to selected 1.91 (colored)

Correct handling of arbitrary column lengths, which groff handles differently depending on number of visible columns.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jan 1 14:27:59 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.104: +38 -26 lines
Diff to previous 1.104 (colored) to selected 1.91 (colored)

Cleaned-up column handling to be char-compatible with groff (thanks Ingo Schwarze).
Fixed assertion in exceeded rmargin by ridiculous columns.

Revision 1.104 / (download) - annotate - [select for diffs], Fri Jan 1 13:35:30 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.103: +1 -11 lines
Diff to previous 1.103 (colored) to selected 1.91 (colored)

Documented `Fl' in mdoc.7.
Backed out stipulation that `Fl ""' is ignored: this is not the case in !OpenBSD groffs.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Jan 1 13:17:59 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.102: +17 -2 lines
Diff to previous 1.102 (colored) to selected 1.91 (colored)

`Fl' has each argument be in a separate scope (thanks Ingo Schwarze).
Situation of `Fl [arg]* "" [arg]*' is fixed: empty arguments are ignored.  Note that OpenBSD crashes when this happens.
Situation of `Fl' is fixed wrt trailing whitespace.

Revision 1.102 / (download) - annotate - [select for diffs], Thu Nov 12 05:50:12 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_14
Changes since 1.101: +79 -67 lines
Diff to previous 1.101 (colored) to selected 1.91 (colored)

Basically re-wrote -Tascii font handling: instead of incrementers for
bold and underline, we use a stack (no cascading, no double-font-mode).
Font modes with \f only affect the current stack point, as documented in
mdoc.7 and man.7.  While -mdoc stacks fonts with embedded macros, -man
replaces them (the stack is always size 1).  This works for all
invocations in supported systems' manual corpora to date.  It doesn't
support groff's insanity with line-scoped \f as documented in mdoc.7.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Nov 10 11:45:57 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.100: +4 -1 lines
Diff to previous 1.100 (colored) to selected 1.91 (colored)

Disable metafonts when printing document footer.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Oct 31 06:50:25 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_13
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored) to selected 1.91 (colored)

Patch on DragonFly BSD syntax (thanks Sascha Wildner).
Noted inclusion into DragonFly BSD (thanks Sascha Wildner).

Revision 1.99 / (download) - annotate - [select for diffs], Fri Oct 30 18:53:09 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_12
Changes since 1.98: +1 -2 lines
Diff to previous 1.98 (colored) to selected 1.91 (colored)

More lint fixes.
Removed err.h from inclusions (less main.c--still in progress).

Revision 1.98 / (download) - annotate - [select for diffs], Tue Oct 27 08:49:44 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.97: +9 -24 lines
Diff to previous 1.97 (colored) to selected 1.91 (colored)

Removed dynamic allocations of header/footer data.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Oct 27 08:26:12 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored) to selected 1.91 (colored)

bzero() -> memset() (noted by Joerg Sonnenberger).

Revision 1.96 / (download) - annotate - [select for diffs], Mon Oct 26 04:09:46 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_11, VERSION_1_9_10
Changes since 1.95: +40 -39 lines
Diff to previous 1.95 (colored) to selected 1.91 (colored)

Full `%U' support.
`Lk' display fixed.
Renamed arg2xxxx as a2xxxx for consistency.
Renamed print_foot to print_man_foot for consistency.
Removed default printing of `~' when `Lk' not provided (not sure where I got that from).

Revision 1.95 / (download) - annotate - [select for diffs], Sat Oct 24 05:52:14 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.94: +4 -1 lines
Diff to previous 1.94 (colored) to selected 1.91 (colored)

Added `%U' to -mdoc (doesn't render in a nice way yet).

Revision 1.94 / (download) - annotate - [select for diffs], Thu Oct 22 18:55:32 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.93: +4 -10 lines
Diff to previous 1.93 (colored) to selected 1.91 (colored)

Fixed maddening mismatch between groff and strftime mismatch of day ("%e").  Noted by Ulrich Sporlein.

Revision 1.93 / (download) - annotate - [select for diffs], Mon Oct 19 15:18:30 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored) to selected 1.91 (colored)

More fixes to scaling-width multipliers (which, just to make my life difficult, differ not only between -mdoc and -man, but between various invocation, e.g., -offset and -width).

Revision 1.92 / (download) - annotate - [select for diffs], Sun Oct 18 19:03:37 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.91: +14 -17 lines
Diff to previous 1.91 (colored)

Made sure devices and formats recognise that -man and -mdoc have different syntax for scaling widths: -mdoc assumes no unit means that the value is a string literal while -man instead uses the default vertical/horizontal scale.

Revision 1.91 / (download) - annotate - [selected], Sun Oct 18 13:34:17 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.90: +47 -54 lines
Diff to previous 1.90 (colored)

Arbitrary horizontal and vertical scaling widths now handled by -mdoc -Tascii.
Terminal scaling backend pushed into term.c.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Oct 15 01:33:12 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.89: +3 -1 lines
Diff to previous 1.89 (colored) to selected 1.91 (colored)

Added support for `Bd -centered', which appears in newer groffs (not yet implemented in centre-capable front-ends, i.e., -Thtml).

Revision 1.89 / (download) - annotate - [select for diffs], Tue Oct 13 10:57:25 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.88: +17 -2 lines
Diff to previous 1.88 (colored) to selected 1.91 (colored)

Moved output definitions into main.h.
Pushed terminal_{mdoc,man} into {mdoc,man}_term.c.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Oct 10 11:05:23 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_8
Changes since 1.87: +1 -36 lines
Diff to previous 1.87 (colored) to selected 1.91 (colored)

Fix hang lists in -Tascii -Tmdoc, which seem to have been broken since ~1.8.x.
Noted similarity of HP/TP and -hang/-tag in mandoc.1.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Oct 7 12:20:20 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_7
Changes since 1.86: +4 -1 lines
Diff to previous 1.86 (colored) to selected 1.91 (colored)

`Bd' literals in -Tascii -mdoc were losing the first line's newline.  Fixed.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Oct 3 19:02:45 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.85: +180 -189 lines
Diff to previous 1.85 (colored) to selected 1.91 (colored)

`Fn' does not print empty ftype span.
-Tascii `node' and `meta' args in DECL_ARGS renamed to `n' and `m' to be more coherent with -Thtml.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Sep 26 17:35:49 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.84: +38 -60 lines
Diff to previous 1.84 (colored) to selected 1.91 (colored)

Fixed `Bd' prior vertical space (was ignoring -compact).
Fixed effect of embedding macros in `Bd' (was printing all on each line instead of grouping).

Revision 1.84 / (download) - annotate - [select for diffs], Thu Sep 24 23:54:43 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_6
Changes since 1.83: +23 -4 lines
Diff to previous 1.83 (colored) to selected 1.91 (colored)

-Tascii correctly prints `%T' in `Rs' with quotes.
-Thtml behaves like -Tascii for printing.
Printing of `Rs' elements cross-checked with new groff.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Sep 24 15:01:06 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.82: +4 -3 lines
Diff to previous 1.82 (colored) to selected 1.91 (colored)

Added EBADCHILD error (bad child of parent context).
`Rs' post-checks that all children are proper bibliographic elements.
`Rs' correctly re-orders its children as per groff's output (including %C).

Revision 1.82 / (download) - annotate - [select for diffs], Thu Sep 24 11:55:28 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.81: +1 -5 lines
Diff to previous 1.81 (colored) to selected 1.91 (colored)

Fix in -Tascii where `Lb' causes line-break in any section (should only happen in LIBRARY).
`Fn' first parameter is broken apart into ftype and fname in -Thtml (for correct style application).
Fixed \0 special character.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Sep 24 11:05:45 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.80: +6 -5 lines
Diff to previous 1.80 (colored) to selected 1.91 (colored)

Sync'd example style-sheet to be more like OpenBSD's default (KISS).
-Thtml and -Tascii now have equivalent functionality.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Sep 24 09:50:31 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.79: +4 -2 lines
Diff to previous 1.79 (colored) to selected 1.91 (colored)

Added Bf, Pf, etc. to -Thtml.
Fixed Rs in -Tascii to behave properly when not in "SEE ALSO" section.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Sep 24 09:20:02 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored) to selected 1.91 (colored)

Many more macros added to -Thtml.
Minor space issues fixed in -Tascii.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Sep 22 16:10:52 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored) to selected 1.91 (colored)

Fix segfault in -Thtml column lists.
Added some more UTF-8 chars.
mandoc_char.7 now has all special characters rendered.
Fixed column layout in -Thtml.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 21 14:08:13 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_5
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored) to selected 1.91 (colored)

Fix height of hard-breaks in -Thtml.

Revision 1.76 / (download) - annotate - [select for diffs], Mon Sep 21 14:07:07 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.75: +14 -30 lines
Diff to previous 1.75 (colored) to selected 1.91 (colored)

Consolidation of Pp/sp/br/Lp stuff.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Sep 20 19:25:06 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.74: +2 -1 lines
Diff to previous 1.74 (colored) to selected 1.91 (colored)

Headers and footers in -Thtml.  Various minor additions.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Sep 20 17:48:13 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored) to selected 1.91 (colored)

Bl -column in place for -Thtml.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Sep 20 17:24:57 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.72: +2 -1 lines
Diff to previous 1.72 (colored) to selected 1.91 (colored)

Some extra html tags and near-complete Bl: -tag is hopeless (synonym for -hang, now) and -column is still pending.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Sep 20 11:05:22 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.71: +3 -2 lines
Diff to previous 1.71 (colored) to selected 1.91 (colored)

Considerable, wide-ranging improvements to the -Thtml output mode (most especially proper tagging and using `em' instead of `px').

Revision 1.71 / (download) - annotate - [select for diffs], Thu Sep 17 13:17:30 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.70: +37 -1 lines
Diff to previous 1.70 (colored) to selected 1.91 (colored)

Hang lists in html (the hard one first).

Revision 1.70 / (download) - annotate - [select for diffs], Wed Sep 16 09:41:24 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.69: +45 -52 lines
Diff to previous 1.69 (colored) to selected 1.91 (colored)

Made tree/term/out() functions return void.
Put err() functions back into front-ends (no use making it needlessly complex).

Revision 1.69 / (download) - annotate - [select for diffs], Tue Sep 15 08:16:20 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.68: +64 -263 lines
Diff to previous 1.68 (colored) to selected 1.91 (colored)

Removed TERMP_BOLD, TERMP_UNDER, TERMP_STYLE in favour of recursive-friendly increments.
Cleaned up confusing behaviour of p->flags.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Aug 20 13:22:48 2009 UTC (14 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_2, VERSION_1_9_1
Changes since 1.67: +48 -24 lines
Diff to previous 1.67 (colored) to selected 1.91 (colored)

Updated manual structure in mdoc.7.
Synchronised mdoc.template and mdoc.7 manual structure.
`Rv' and `Ex' now accept multiple arguments (-std made standalone, terms as children).
`Rv' and `Ex' format correctly in -Tascii (plurals, commas, etc.).

Revision 1.67 / (download) - annotate - [select for diffs], Wed Aug 19 14:45:56 2009 UTC (14 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.66: +2 -4 lines
Diff to previous 1.66 (colored) to selected 1.91 (colored)

More already-fixed FIXMEs.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Aug 10 10:09:51 2009 UTC (14 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_0
Changes since 1.65: +4 -1 lines
Diff to previous 1.65 (colored) to selected 1.91 (colored)

Moved indentation size into *term.c files.
Improved handling of libman `IP' macro (still needs work).

Revision 1.65 / (download) - annotate - [select for diffs], Wed Jul 29 09:02:41 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.64: +9 -4 lines
Diff to previous 1.64 (colored) to selected 1.91 (colored)

Fixed groff-compat where two `Sh' calls, with the first not having a body, don't assert vspace between calls.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jul 29 08:46:06 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.63: +5 -2 lines
Diff to previous 1.63 (colored) to selected 1.91 (colored)

Moved CALLABLE check to lookup_raw().
Made PARSABLE check occur prior to lookup().
Non-PARSEABLE macros no longer warn against having macro-like parameters.
Non-CALLABLE macros no longer produce an error, just display their symbols (as in groff) (pointed out by joerg@netbsd.org).

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jul 25 16:03:03 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_5, VERSION_1_8_4
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored) to selected 1.91 (colored)

Patches and results of LLVM static analysis (thanks uqs@sporlein.net).

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jul 24 12:52:28 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.61: +3 -2 lines
Diff to previous 1.61 (colored) to selected 1.91 (colored)

Fixed DIAGNOSTIC display (leading double-space only before BODY).

Revision 1.61 / (download) - annotate - [select for diffs], Fri Jul 24 12:47:35 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.60: +63 -2 lines
Diff to previous 1.60 (colored) to selected 1.91 (colored)

Full support for `An -split/-nosplit'.  Compat documented.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jul 24 11:54:54 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.59: +11 -28 lines
Diff to previous 1.59 (colored) to selected 1.91 (colored)

`Bd' printing simplified (now that literal text is preserved).

Revision 1.59 / (download) - annotate - [select for diffs], Thu Jul 23 09:40:25 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_3
Changes since 1.58: +30 -7 lines
Diff to previous 1.58 (colored) to selected 1.91 (colored)

Ugly fix for `Bl' or `Bd' causing badness when nested in `Bl -hang' lists.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jul 23 08:36:32 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.57: +20 -4 lines
Diff to previous 1.57 (colored) to selected 1.91 (colored)

Bl -column now accepts columns = (1 + stated columns), which covers all remaining column usage/abuse I can see.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jul 21 15:54:18 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.56: +14 -3 lines
Diff to previous 1.56 (colored) to selected 1.91 (colored)

Re-added `Pa' handling -- had removed it, but it's a bug in groff that it doesn't always render.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jul 21 15:39:04 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.55: +7 -18 lines
Diff to previous 1.55 (colored) to selected 1.91 (colored)

Made `%T' underline instead of quote.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jul 21 15:35:30 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.54: +14 -3 lines
Diff to previous 1.54 (colored) to selected 1.91 (colored)

Fixed undocumented `-diag' where NULL list item bodies aren't followed by a vspace.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jul 21 15:03:37 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.53: +29 -16 lines
Diff to previous 1.53 (colored) to selected 1.91 (colored)

Fixed `Bl -column' undocumented no-vspace rule to only work within the list.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Jul 21 14:28:36 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.52: +3 -1 lines
Diff to previous 1.52 (colored) to selected 1.91 (colored)

Re-fixed `-diag' (accidentally broke in last checkin).

Revision 1.52 / (download) - annotate - [select for diffs], Tue Jul 21 13:45:04 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.51: +3 -14 lines
Diff to previous 1.51 (colored) to selected 1.91 (colored)

Removed `Pa' underline formatting (no groff does this).

Revision 1.51 / (download) - annotate - [select for diffs], Tue Jul 21 13:34:13 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.50: +10 -9 lines
Diff to previous 1.50 (colored) to selected 1.91 (colored)

Bringing spacing more in line with groff, patches from schwarze@openbsd.org.  Pre-testing.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jul 21 12:47:52 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.49: +8 -2 lines
Diff to previous 1.49 (colored) to selected 1.91 (colored)

Right-most column now fills to the right margin (undocumented groff behaviour).

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jul 20 19:30:46 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_2
Changes since 1.48: +5 -1 lines
Diff to previous 1.48 (colored) to selected 1.91 (colored)

Fixed zero-length width string causing assertion (defaulting to 10 -- this needs work).

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jul 20 15:05:34 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.47: +4 -1 lines
Diff to previous 1.47 (colored) to selected 1.91 (colored)

Undocumented behaviour in groff: `Bl -column' implies `-compact'.
mandoc now allows fewer columns than the -width specifies.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Jul 19 08:24:16 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_1
Changes since 1.46: +1 -5 lines
Diff to previous 1.46 (colored) to selected 1.91 (colored)

Removed superfluous NOSPACE in bd post.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jul 19 08:18:28 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.45: +12 -3 lines
Diff to previous 1.45 (colored) to selected 1.91 (colored)

termpair flags unset before post, after body (suggested by schwarze@openbsd).

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jul 17 12:40:48 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.44: +24 -2 lines
Diff to previous 1.44 (colored) to selected 1.91 (colored)

`sp' documented: validates & produces correct output.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Jul 17 10:56:57 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.43: +14 -1 lines
Diff to previous 1.43 (colored) to selected 1.91 (colored)

Added `br' and `sp' macros (requested by joerg@netbsd.org, jmc@openbsd.org).

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jul 16 13:27:24 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.42: +2 -4 lines
Diff to previous 1.42 (colored) to selected 1.91 (colored)

Off-by-one space fixed for `Bl -diag'.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jul 15 08:20:43 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored) to selected 1.91 (colored)

Fix to presentation date (Ulrich Sporlein)

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jul 14 16:03:51 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_0
Changes since 1.40: +2 -7 lines
Diff to previous 1.40 (colored) to selected 1.91 (colored)

Using \(en for OpenBSD `Nd' (compromise with jmc@openbsd.org).

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jul 14 15:49:44 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.39: +28 -17 lines
Diff to previous 1.39 (colored) to selected 1.91 (colored)

Cleaned up arg_width and arg_column functions.
Added XXn and XXm support to -offset (not documented in mdoc.samples, but used in mdoc.samples!).
Lint warnings fixed.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jul 14 15:17:25 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.38: +24 -17 lines
Diff to previous 1.38 (colored) to selected 1.91 (colored)

Removed unnecessary save/restore of style around list prefix.
Added -hang list support.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jul 13 07:23:07 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.37: +19 -6 lines
Diff to previous 1.37 (colored) to selected 1.91 (colored)

Err/warn fix (schwarze@openbsd.org).
Lots of whitespace churn in getting functions aligned nicely.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jul 12 20:50:08 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.36: +2 -20 lines
Diff to previous 1.36 (colored) to selected 1.91 (colored)

Replacement of `Lb' in mdoc_action.c.
Added warning against bogus `Lb' (like groff does).
Added proper quotes around `Lb' in mdoc_term.c.
Moved mdoc_a2lib -> libmdoc (where it belongs).

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jul 12 20:30:35 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.35: +2 -15 lines
Diff to previous 1.35 (colored) to selected 1.91 (colored)

Moved mdoc_a2st() out of mdoc.h -> libmdoc.h (replacement in mdoc_action.c).
Made bad standards into an error (were a warning).

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jul 12 20:24:24 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.34: +2 -21 lines
Diff to previous 1.34 (colored) to selected 1.91 (colored)

Moved mdoc_a2att() into libmdoc (replacement happens in mdoc_action.c).

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 12 20:07:04 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.33: +7 -13 lines
Diff to previous 1.33 (colored) to selected 1.91 (colored)

Removed superfluous FIXMEs in mdoc_term.c.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jul 12 19:34:51 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.32: +2 -3 lines
Diff to previous 1.32 (colored) to selected 1.91 (colored)

Fixed `Fo' superfluous space before `('. Noted groff compatibility in mdoc.7.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jul 12 19:28:46 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.31: +6 -2 lines
Diff to previous 1.31 (colored) to selected 1.91 (colored)

`Vt' macro behaves [more] properly when in the SYNOPSIS section.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jul 12 19:13:12 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.30: +87 -79 lines
Diff to previous 1.30 (colored) to selected 1.91 (colored)

Replaced ugly macro function declarations in mdoc_term with real [sorted] ones.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jul 12 17:49:32 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.29: +6 -9 lines
Diff to previous 1.29 (colored) to selected 1.91 (colored)

Removed rmargin from termpair (right in print_node()).

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jul 12 17:45:17 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.28: +13 -22 lines
Diff to previous 1.28 (colored) to selected 1.91 (colored)

Removed offset from termpair (much simpler & cleaner).
Put new offset market in print_node().
Some fixes of forgotten ttypes[TTYPE_XXXX] (just TTYPE).

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jul 12 17:25:07 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.27: +39 -51 lines
Diff to previous 1.27 (colored) to selected 1.91 (colored)

Removed ambiguous TERMPAIR_SETFLAG from mdoc_term.c (pairs/flags must be manually set now, and are).

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jul 12 16:55:11 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored) to selected 1.91 (colored)

GNU/Linux also uses \- for Nd (ew).

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jul 12 16:52:41 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.25: +35 -65 lines
Diff to previous 1.25 (colored) to selected 1.91 (colored)

Consolidated Bx/Ox/Nx/etc. into one function.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jul 12 16:34:16 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.24: +4 -1 lines
Diff to previous 1.24 (colored) to selected 1.91 (colored)

`Nd' is now a BFI (was an ELEM).  Noted by joerg@netbsd.org, behaviour ok jmc@openbsd.org, etc.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 12 08:49:50 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_24
Changes since 1.23: +6 -2 lines
Diff to previous 1.23 (colored) to selected 1.91 (colored)

Noted dissent with \- for OpenBSD.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jul 12 08:45:56 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.22: +5 -1 lines
Diff to previous 1.22 (colored) to selected 1.91 (colored)

Added \(hy symbol.
Properly categorised \- as an arithmetic minus sign.
Nd produces \(em instead of old \-.
OpenBSD ifdef'd to use old \- after Nd (ok: jmc@openbsd.org).

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jul 7 11:47:17 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.21: +14 -3 lines
Diff to previous 1.21 (colored) to selected 1.91 (colored)

Made `In' handling work in new-groff style (see mdoc.samples).

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 5 19:25:10 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_23, VERSION_1_7_22
Changes since 1.20: +1 -5 lines
Diff to previous 1.20 (colored) to selected 1.91 (colored)

Backed out "-width indent" and "-width indent-two", which aren't
supported by any groff mdoc tmac (and erroneously used in many manuals,
hence the confusion).

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jul 4 11:07:34 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_21
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored) to selected 1.91 (colored)

Fixed -offset indent-two (schwarze@openbsd.org).

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jul 4 11:04:46 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.91 (colored)

Fixed -offset left (schwarze@openbsd.org).
Fixed bogus setting (instead of increment) of offsets.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jun 22 13:13:10 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_20
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored) to selected 1.91 (colored)

Lint fixes.
Version up.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 22 12:38:07 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.16: +8 -4 lines
Diff to previous 1.16 (colored) to selected 1.91 (colored)

Noted .Cd tabs-ok issue (will fix later).
Added single space to -diag lists.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 22 12:04:05 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.15: +11 -9 lines
Diff to previous 1.15 (colored) to selected 1.91 (colored)

Added "Spacing" part of "Punctuation and Spacing" in mandoc.1 manual.
Fixed `Ds' meta-macro default width.
Fixed -width and -offset "indent", "indent-two", and "left" widths.
Fixed -width and -offset literal-word and numeric widths.
Fixed off-by-one errors in whitespace output (schwarze@openbsd.org).

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 17 18:42:42 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_19
Changes since 1.14: +8 -3 lines
Diff to previous 1.14 (colored) to selected 1.91 (colored)

Special characters, e.g. \(ae, are now correctly rendered in the current font decoration.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 16 19:45:51 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.13: +7 -5 lines
Diff to previous 1.13 (colored) to selected 1.91 (colored)

Removed MDOC___: moved MDOC_Ap to its index (comments not passed into mdoc parser).

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jun 15 20:26:47 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.12: +1 -5 lines
Diff to previous 1.12 (colored) to selected 1.91 (colored)

Removed superfluous ifdef around strftime (schwarze@openbsd.org).
Bumped version (this was supposed to be in 1.7.17).

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 12 09:18:00 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_17, VERSION_1_7_16, VERSION_1_7_15
Changes since 1.11: +9 -4 lines
Diff to previous 1.11 (colored) to selected 1.91 (colored)

`Lk' is correctly handled as CALLABLE (note groff munges nested output).
`Mt' is now CALLABLE.
Fixed missing validate/action of zero-element, non-called inline elements.
Fixed missing validate/action of nested inline element re-calls.
Fixed bogus column argv index in validator.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 11 13:13:44 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_14
Changes since 1.10: +21 -19 lines
Diff to previous 1.10 (colored) to selected 1.91 (colored)

Added mdoc.template (from NetBSD -- unlicensed??).
Moved MDOC_TEXT type checks into assertions (should be caught by parser).
Added some FIXME notes in mdoc output (largely that things should be asserted, not caught).

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jun 11 12:55:30 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.9: +9 -5 lines
Diff to previous 1.9 (colored) to selected 1.91 (colored)

Added "left" -offset tag.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jun 11 12:07:49 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.8: +31 -133 lines
Diff to previous 1.8 (colored) to selected 1.91 (colored)

Documented some un-clear parts of main.c.
Fixed footer to be new-groff style (OS DATE OS).
Removed sanity check from mdoc_term (unnecessary).

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jun 11 07:26:35 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.91 (colored)

Fixed email address in manual AUTHOR reference.
Set max right margin to 80 columns (schwarze@openbsd.org).
Fixed centre-field heading position (schwarze@openbsd.org).
Also fixed -Tman centre-field.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 10 20:18:43 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.91 (colored)

Fixed license email address.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 12 19:45:26 2009 UTC (14 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_13
Changes since 1.5: +10 -12 lines
Diff to previous 1.5 (colored) to selected 1.91 (colored)

Using proper license template (const).

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 12 19:19:57 2009 UTC (14 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored) to selected 1.91 (colored)

Manual .Dt fields CAPITALISED.
Indent set to 5 chars (nroff compat).
Half-indent set to 3 chars (nroff compat).
Default behaviour is loose-y (ignore macro/char/escape).
Added -fstrict.
Added unknown-character ignoring.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 3 13:17:26 2009 UTC (14 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_12, VERSION_1_7_10, OPENBSD_CHECKIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored) to selected 1.91 (colored)

Updated manuals.7.
Fixed .Dl display.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Mar 26 16:23:22 2009 UTC (15 years ago) by kristaps
Branch: MAIN
Changes since 1.2: +16 -24 lines
Diff to previous 1.2 (colored) to selected 1.91 (colored)

All macro-invocations, for consistency, begin with `.' in documentation.
Fixed \\ -> \e in manual documentation.
All preliminary -man macros in place.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 26 14:44:41 2009 UTC (15 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_5
Changes since 1.1: +6 -1 lines
Diff to previous 1.1 (colored) to selected 1.91 (colored)

Fixed after-NLINE-error assertion.
Scanned over all manuals with valgrind.
Version up.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Mar 26 14:38:11 2009 UTC (15 years ago) by kristaps
Branch: MAIN
Diff to selected 1.91 (colored)

Initial front-end formatting for -man pages.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb