OpenBSD CVS

CVS log for src/usr.bin/mandoc/man_html.c


[BACK] Up to [local] / src / usr.bin / mandoc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.140 / (download) - annotate - [select for diffs], Tue Oct 24 20:30:49 2023 UTC (6 months, 3 weeks ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.139: +50 -2 lines
Diff to previous 1.139 (colored)

Implement the man(7) .MR macro, a 2023 GNU extension.
The syntax and semantics is almost identical to mdoc(7) .Xr.

This will be needed for reading the groff manual pages once our port
will be updated to 1.23, and the Linux Manual Pages Project is also
determined to start using it sooner or later.  I did not advocate for
this new macro, but since we want to remain able to read all manual
pages found in the wild, there is little choice but to support it.
At least it is easy to do, they basically copied .Xr.

Revision 1.139 / (download) - annotate - [select for diffs], Wed Oct 18 16:11:29 2023 UTC (7 months ago) by schwarze
Branch: MAIN
Changes since 1.138: +5 -3 lines
Diff to previous 1.138 (colored)

Support the GNU-specific syntax ".IP \\[bu]" for bullet lists in man(7)
pages that Alejandro Colomar recommends in the "Lists" subsection of
https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE .

For example, this will improve HTML formatting of the first list in
the subsection "Feature test macros understood by glibc" on the page
https://manpages.debian.org/bookworm/manpages/ftm.7.en.html .

Issue reported by Alejandro Colomar <alx at kernel dot org>.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Apr 28 20:14:19 2023 UTC (12 months, 3 weeks ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.137: +4 -11 lines
Diff to previous 1.137 (colored)

Do not rewrite MAN_LP and MAN_P to MAN_PP because doing that causes
confusing warning messages complaining about macros that don't even
appear in the input file.
As a welcome side effect, this also shortens the code...

Fixing a minibug
reported by Alejandro Colomar <alx dot manpages at gmail dot com>.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Jul 6 16:02:52 2022 UTC (22 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/ says:
"Start names with a capital letter;
it helps some screen readers speak them with appropriate inflection."
Anna Vyalkova already did that correctly when sending patches,
but i ruined it when committing, so fix it now.

Revision 1.136 / (download) - annotate - [select for diffs], Wed Jul 6 14:27:55 2022 UTC (22 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.135: +3 -3 lines
Diff to previous 1.135 (colored)

While the HTML standard allows multiple <h1> elements in the same
document, <h1> is intended for top level headers, and most of the
sections in a manual page can hardly be considered top-level.
It is more usual to use <h1> only for the main title of the document
of for the site name.

Consequently, move .Sh/.SH from <h1> to <h2> and .Ss/.SS from <h2>
to <h3>, freeing <h1> for use by header.html in man.cgi(8).

Discussed with Anna Vyalkova <cyber at sysrq dot in>.

Revision 1.135 / (download) - annotate - [select for diffs], Tue Jul 5 21:25:23 2022 UTC (22 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.134: +19 -16 lines
Diff to previous 1.134 (colored)

Finally get rid of the archaic <table> markup for header and footer lines
and use flexbox CSS instead.  Improve accessibility by adding role
and aria-label attributes to these header and footer lines.
Using ideas from both Anna Vyalkova <cyber at sysrq dot in> and myself.

As a welcome side effect, this also resolves the long-standing issue
that the rendering was always 65em wide, requiring horizontal scrolling
when the window was narrower.  Now, rendering nicely adapts to browser
windows of arbitrary narrowness.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Jul 4 14:37:14 2022 UTC (22 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

Put the HTML comment containing the Copyright header (if any)
between the <head> and the <body> rather than before the <head>
because the <meta charset="utf-8"/> element ought to be within
the first 1024 bytes of the HTML code.
Issue found with validator.w3.org.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Jul 3 14:28:27 2022 UTC (22 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Instead of the custom <div class="manual-text">, use the standard
HTML <main> element.  The benefit is that it has the ARIA landmark
role "main" by default.  To ease the transition for people using
their own CSS file instead of mandoc.css, retain the custom class
for now.

I had this idea in a discussion with Anna Vyalkova <cyber at sysrq dot in>.
Patch from Anna, slightly tweaked by me.

Revision 1.132 / (download) - annotate - [select for diffs], Fri Oct 16 17:22:39 2020 UTC (3 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.131: +7 -9 lines
Diff to previous 1.131 (colored)

In HTML output, avoid printing a newline right after <pre>
and right before </pre> because that resulted in vertical
whitespace not requested by the manual page author.

Formatting bug reported by
Aman Verma <amanraoverma plus vim at gmail dot com> on discuss@.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Apr 4 20:23:06 2020 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.130: +1 -2 lines
Diff to previous 1.130 (colored)

automatically tag .SH and .SS in man(7) terminal output
in the same way as it was done for .Sh and .Ss in mdoc(7)

Revision 1.130 / (download) - annotate - [select for diffs], Fri Mar 13 00:31:05 2020 UTC (4 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.129: +7 -9 lines
Diff to previous 1.129 (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.129 / (download) - annotate - [select for diffs], Thu Feb 27 01:25:57 2020 UTC (4 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.128: +8 -6 lines
Diff to previous 1.128 (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.128 / (download) - annotate - [select for diffs], Wed Feb 12 21:14:24 2020 UTC (4 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored)

In roff, a space character at the beginning of an input line requires
starting a new output line, and merely starting a new line of HTML
code isn't sufficient to achieve that.  Solve this in the same way
as mdoc_html.c already does it, by printing a <br/> element.
Fixing a bug reported by Jason A. Donenfeld <Jason at zx2c4 dot com>
in the wg-quick(8) manual page on manpages.debian.org.

Revision 1.127 / (download) - annotate - [select for diffs], Tue Apr 30 15:52:42 2019 UTC (5 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

In HTML output, allow switching the desired font for subsequent
text without printing an opening tag right away, and use that in
the .ft request handler.  While here, garbage collect redundant
enum htmlfont and reduce code duplication in print_text().
Fixing an assertion failure reported by Michael <Stapelberg at Debian>
in pmRegisterDerived(3) from libpcp3-dev.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Mar 2 16:29:49 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.125: +68 -16 lines
Diff to previous 1.125 (colored)

Represent multiple subsequent .IP blocks having a consistent
head argument of *, \-, or \(bu as <ul> rather than as <dl>,
using a bit of heuristics.

Basic idea suggested by Dagfinn Ilmari Mannsaker <ilmari at github>
in https://github.com/Debian/debiman/issues/67 and independently by
<Pali dot Rohar at gmail dot com> on <discuss at mandoc dot bsd dot lv>.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Mar 1 10:48:58 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.124: +14 -7 lines
Diff to previous 1.124 (colored)

Wrap .Sh/.SH sections and .Ss/.SS subsections in HTML <section> elements
as recommended for accessibility by the HTML 5 standard.
Triggered by a similar, but slightly different suggestion
from Laura Morales <lauretas at mail dot com>.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Feb 28 16:36:10 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.123: +29 -3 lines
Diff to previous 1.123 (colored)

Format multiple subsequent .IP or multiple subsequent .TP/.TQ
as a single <dl> list rather than opening a new list for each item;
feature suggested by Pali dot Rohar at gmail dot com.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jan 18 14:36:16 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.122: +10 -8 lines
Diff to previous 1.122 (colored)

The .UR and .MT blocks in man(7) are represented by <a> elements
which establish phrasing context, but they can contain paragraph
breaks (which is relevant for terminal formatting, so we can't just
change the structure of the syntax tree), which are respresented
by <p> elements and cannot occur inside <a>.

Fix this by prematurely closing the <a> element in the HTML formatter.
This menas that the clickable text in HTML output is shorter than
what is represented as the link text in terminal output, but in
HTML, it is frankly impossible to have the clickable area of a
hyperlink extend across a paragraph break.  The difference in
presentation is not a major problem, and besides, paragraph breaks
inside .UR are rather poor style in the first place.

The implementation is quite tricky.  Naively closing out the <a>
prematurely would result in accessing a stale pointer when later
reaching the physical end of the .UR block.  So this commit separates
visual and structural closing of "struct tag" stack items.  Visual
closing means that the HTML element is closed but the "struct tag"
remains on the stack, to avoid later access to a stale pointer and
to avoid closing the same HTML element a second time later.

This also needs reference counting of pointers to "struct tag" stack
items because often more than one child holds a pointer to the same
parent item, and only the outermost child can safely do the physical
closing.

In the whole corpus of nearly half a million manual pages on
man.openbsd.org, this problem occurs in exactly one page: the
groff(1) version 1.20.1 manual contained in DragonFly-3.8.2, which
contains a formatting error triggering the bug.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Jan 11 16:35:39 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.121: +2 -2 lines
Diff to previous 1.121 (colored)

do not access a NULL pointer when formatting a completely empty document

Revision 1.121 / (download) - annotate - [select for diffs], Fri Jan 11 12:44:10 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.120: +6 -6 lines
Diff to previous 1.120 (colored)

Remove the HTML title= attributes which harmed accessibility and
violated the principle of separation of content and presentation.
Instead, implement the tooltips purely in CSS.
Thanks to John Gardner <gardnerjohng at gmail dot com> for
suggesting most of the styling in the new ::before rules.

Revision 1.120 / (download) - annotate - [select for diffs], Mon Jan 7 06:51:37 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.119: +12 -11 lines
Diff to previous 1.119 (colored)

Represent mdoc(7) .Pp (and .sp, and some SYNOPSIS and .Rs features)
by the <p> HTML element and use the html_fillmode() mechanism
for .Bd -unfilled, just like it was done for man(7) earlier, finally
getting rid both of the horrible <div class="Pp"></div> hack and
of the worst HTML syntax violations caused by nested displays.

Care is needed because in some situations, paragraphs have to remain
open across several subsequent macros, whereas in other situations,
they must get closed together with a block containing them.

Some implementation details include:
* Always close paragraphs before emitting HTML flow content.
* Let html_close_paragraph() also close <pre> for extra safety.
* Drop the old, now unused function print_paragraph().
* Minor adjustments in the top-level man(7) node formatter for symmetry.
* Bugfix: .Ss heads suspend no-fill mode, even though .Ss doesn't end it.
* Bugfix: give up on .Op semantic markup for now, see the comment.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Jan 6 04:41:15 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.118: +55 -70 lines
Diff to previous 1.118 (colored)

Finally, represent the man(7) .PP and .HP macros by the natural
choice, which is <p> HTML element.  On top of the previous fill-mode
improvements, the key to making this possible is to automatically
close the <p> when required: before headers, subsequent paragraphs,
lists, indented blocks, synopsis blocks, tbl(7) blocks, and before
blocks using no-fill mode.

In man(7) documents, represent the .sp request by a blank line in
no-fill mode and in the same way as .PP in fill mode.

Revision 1.118 / (download) - annotate - [select for diffs], Sat Jan 5 21:52:57 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

In no-fill mode, avoid bogus blank lines in two situations:
1. After the last child; the parent will take care of the line break.
2. At the .YS macro; the end of the preceding .SY already broke the line.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Jan 5 09:46:26 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.116: +16 -24 lines
Diff to previous 1.116 (colored)

minor cleanup, no functional change:
* delete one irrelevant FIXME; no more fixed lengths in HTML, please
* simplify some conditions
* avoid testing pointers as truth values, use "!= NULL"
* sort some declarations
* delete some pointless blank lines

Revision 1.116 / (download) - annotate - [select for diffs], Sat Jan 5 09:14:11 2019 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.115: +18 -117 lines
Diff to previous 1.115 (colored)

Now that the NODE_NOFILL flag in the syntax tree is accurate,
use it in the man(7) HTML formatter rather than keeping fill mode
state locally, resulting in massive simplification (minus 40 LOC).

Move the html_fillmode() state handler function to the html.c module
such that both the man(7) and the roff(7) formatter (and in the future,
also the mdoc(7) formatter) can use it.  Give it a query mode, to be
invoked with TOKEN_NONE.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Dec 31 07:07:43 2018 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.114: +17 -19 lines
Diff to previous 1.114 (colored)

Move parsing of the .nf and .fi (fill mode) requests from the man(7)
parser to the roff(7) parser.  As a side effect, .nf and .fi are
now also parsed in mdoc(7) input, though the mdoc(7) formatters
still ignore most of their effect.

Revision 1.114 / (download) - annotate - [select for diffs], Sun Dec 30 00:48:47 2018 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.113: +6 -6 lines
Diff to previous 1.113 (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.113 / (download) - annotate - [select for diffs], Sat Dec 15 23:33:20 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.112: +2 -1 lines
Diff to previous 1.112 (colored)

Yet another round of improvements to manual font selection.

Unify handling of \f and .ft.
Support \f4 (bold+italic).
Support ".ft BI" and ".ft CW" for terminal output.
Support the .ft request in HTML output.
Reject the bogus fonts \f(C1, \f(C2, \f(C3, and \f(CP.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Dec 13 11:55:14 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.111: +1 -2 lines
Diff to previous 1.111 (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.111 / (download) - annotate - [select for diffs], Mon Dec 3 21:00:06 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.110: +12 -7 lines
Diff to previous 1.110 (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.110 / (download) - annotate - [select for diffs], Tue Oct 23 17:17:54 2018 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.109: +6 -3 lines
Diff to previous 1.109 (colored)

Input lines that are not blank but generate no output,
for example lines containing nothing but "\&", are significant
in no-fill mode and can be represented by blank lines inside <pre>.
Fixing a bug that Pali dot Rohar at gmail dot com found
in pod2man(1) output, for example Email::Address::XS(3p).

While here, inside no-fill mode, there is no need to encode
totally blank input lines by emulating .PP - just let them
through as we are inside <pre> anyway.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Aug 18 02:03:41 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.108: +25 -1 lines
Diff to previous 1.108 (colored)

implement the GNU man-ext .SY/.YS (synopsis block) macro in man,
used in most manual pages of the groff package

Revision 1.108 / (download) - annotate - [select for diffs], Fri Aug 17 20:31:52 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.107: +6 -6 lines
Diff to previous 1.107 (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.107 / (download) - annotate - [select for diffs], Thu Aug 16 23:40:19 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.106: +14 -13 lines
Diff to previous 1.106 (colored)

implement the GNU man-ext .TQ macro in man(7),
used for example by groff_diff(7)

Revision 1.106 / (download) - annotate - [select for diffs], Fri Jul 27 17:47:05 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.105: +1 -3 lines
Diff to previous 1.105 (colored)

garbage collect the unused "#define INDENT"

Revision 1.105 / (download) - annotate - [select for diffs], Mon Jun 25 13:32:59 2018 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.104: +3 -21 lines
Diff to previous 1.104 (colored)

Ignore author-specified indentation for .RS; it harms responsive
design.  Use the existing @media-dependent indent instead.
This removes the last style= attribute from man(7) output.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Jun 25 13:01:14 2018 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.103: +5 -16 lines
Diff to previous 1.103 (colored)

For -man -Thtml, ignore author-specified .HP widths because they
harm responsive design; use @media-dependent defaults instead.

Revision 1.103 / (download) - annotate - [select for diffs], Fri May 25 20:23:39 2018 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.102: +3 -5 lines
Diff to previous 1.102 (colored)

Do not write duplicate id= attributes, they violate HTML syntax.
Append suffixes for disambiguation.  Issue first reported by Jakub
Klinkovsky <j dot l dot k at gmx dot com> (Arch Linux).

Revision 1.102 / (download) - annotate - [select for diffs], Tue May 8 21:42:11 2018 UTC (6 years ago) by schwarze
Branch: MAIN
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

Eliminate the class=It-* attributes.
Cleaner HTML, more idiomatic CSS, and minus 30 lines of C code.
Suggested by John Gardner <gardnerjohng at gmail dot com>.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Apr 24 00:36:04 2018 UTC (6 years ago) by schwarze
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

replace my vague and idiosyncratic term "selflink"
with the clearer and more usual "permalink";
suggested by John Gardner <gardnerjohng at gmail dot com>

Revision 1.100 / (download) - annotate - [select for diffs], Fri Apr 13 16:27:14 2018 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.99: +21 -14 lines
Diff to previous 1.99 (colored)

preserve comments before .Dd and .TH (typically Copyright and license)
in full HTML output, but not with -Ofragment, e.g. in man.cgi(8);
suggested by Thomas Klausner <wiz at NetBSD>

Revision 1.99 / (download) - annotate - [select for diffs], Wed Apr 11 17:10:35 2018 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.98: +3 -1 lines
Diff to previous 1.98 (colored)

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

Revision 1.98 / (download) - annotate - [select for diffs], Sun Jun 25 07:23:53 2017 UTC (6 years, 10 months ago) by bentley
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.97: +11 -2 lines
Diff to previous 1.97 (colored)

Add support for the MT and ME mailto macros, used for example in wg(8).

feedback and ok schwarze@

Revision 1.97 / (download) - annotate - [select for diffs], Sat Jun 24 14:38:27 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (colored)

Split -Wstyle into -Wstyle and the even lower -Wbase, and add
-Wopenbsd and -Wnetbsd to check conventions for the base system of
a specific operating system.  Mark operating system specific messages
with "(OpenBSD)" at the end.

Please use just "-Tlint" to check base system manuals (defaulting
to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the
manuals of portable software projects you maintain that are not
part of OpenBSD base, to avoid bogus recommendations about base
system conventions that do not apply.

Issue originally reported by semarie@, solution using
an idea from tedu@, discussed with jmc@ and jca@.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Jun 8 12:54:40 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.95: +2 -6 lines
Diff to previous 1.95 (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.95 / (download) - annotate - [select for diffs], Tue May 9 14:09:37 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.94: +3 -2 lines
Diff to previous 1.94 (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.94 / (download) - annotate - [select for diffs], Fri May 5 15:16:25 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.93: +2 -22 lines
Diff to previous 1.93 (colored)

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

Revision 1.93 / (download) - annotate - [select for diffs], Fri May 5 13:17:04 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.92: +1 -2 lines
Diff to previous 1.92 (colored)

move .ll to the roff modules

Revision 1.92 / (download) - annotate - [select for diffs], Fri May 5 02:06:17 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.91: +1 -2 lines
Diff to previous 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.91 / (download) - annotate - [select for diffs], Thu May 4 22:07:44 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.90: +8 -18 lines
Diff to previous 1.90 (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.90 / (download) - annotate - [select for diffs], Thu May 4 17:48:24 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.89: +13 -2 lines
Diff to previous 1.89 (colored)

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

Revision 1.89 / (download) - annotate - [select for diffs], Mon Apr 24 23:06:09 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.88: +4 -3 lines
Diff to previous 1.88 (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.88 / (download) - annotate - [select for diffs], Fri Mar 17 12:06:02 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.87: +5 -3 lines
Diff to previous 1.87 (colored)

Fix regression in mdoc_html.c 1.150, man_html 1.87:
For .Sh, .Ss, .SH, .SS, only write selflink if an id could be constructed.
Crash reported by Raf Czlonka <rczlonka at gmail dot com>,
analysis of root cause by natano@

Revision 1.87 / (download) - annotate - [select for diffs], Wed Mar 15 11:29:50 2017 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.86: +18 -6 lines
Diff to previous 1.86 (colored)

Minimal support for deep linking into man(7) pages.
As the man(7) language does not provide semantic markup,
only .SH, .SS, and .UR become anchors for now.

Revision 1.86 / (download) - annotate - [select for diffs], Sun Feb 5 18:13:28 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.85: +1 -2 lines
Diff to previous 1.85 (colored)

Improve <table> syntax:
The <col> element can only appear inside <colgroup>, so use <colgroup>.
The <tbody> element is optional and useless, so don't use it.
Even if we would ever need <thead> or <tfoot>, <tbody> would still be
optional and useless; besides, we will likely never need <thead> or <tfoot>,
simply because our languages don't support such functionality.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Jan 30 20:23:07 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.84: +134 -69 lines
Diff to previous 1.84 (colored)

Rework fill mode handling for -man -Thtml.

Basically, open <pre> whenever printing text in no-fill mode and it is
not already open, and close it whenever printing something that cannot
be inside <pre>.

This fixes a crash reported by Michael <Stapelberg at debian dot org>
in the French Linux chroot(2) manual and also improves rendering
for OpenBSD pages like DPMSGetTimeouts(3) and GLwDrawingArea(3).

These changes also permitted retiring struct mhtml.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Jan 29 14:02:19 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

eliminate one useless struct and one level of indirection;
no functional change

Revision 1.83 / (download) - annotate - [select for diffs], Thu Jan 26 18:28:04 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.82: +47 -58 lines
Diff to previous 1.82 (colored)

Fix -man -Thtml formatting after .nf (which has nothing to do
with "literal", by the way, it means "no fill"):

* Use <pre> such that whitespace is preserved.
* Preserve lines breaks.
* For font alternating macros, avoid node recursion which required
scary juggling with the fill state.  Instead, simply print the text
children directly.

Missing feature first noticed by kristaps@ in 2011,
the again reported by afresh1@ in 2016,
and finally reported here: https://github.com/Debian/debiman/issues/21 ,
which i only found because of Shane Kerr's comment here:
https://plus.google.com/110314300533310775053/posts/H1eaw9Yskoc

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jan 21 01:20:29 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored)

clean up the remaining class attributes

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jan 20 23:50:59 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Standardize class attributes for semantic macros.
Correct markup for .Va and iprove markup for .Dv, .Er, .Ev while here.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Jan 19 15:27:26 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.79: +9 -13 lines
Diff to previous 1.79 (colored)

Clean up CSS rules for sections and paragraphs.
Start using real macro names for CSS classes.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jan 19 13:34:59 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.78: +8 -10 lines
Diff to previous 1.78 (colored)

Start cleanup: trim useless HTML comments and <div> elements
on the <html> and <body> levels.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jan 19 01:00:11 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.77: +1 -3 lines
Diff to previous 1.77 (colored)

Implement line breaking of the generated HTML code at space characters
in filled text.  This does not affect HTML semantics, but makes the
HTML code even more humanly readable.

While here,
- collapse multiple consecutive space characters in filled text
- and insert a blank between style entries.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jan 18 19:22:18 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.76: +1 -2 lines
Diff to previous 1.76 (colored)

Make HTML output more human readable by overhauling line break logic
around tags and by introducing some simple indentation.
No change of HTML semantics intended.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jan 17 15:32:39 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.75: +5 -6 lines
Diff to previous 1.75 (colored)

Completely delete the buf field of struct html and all the buf*()
interfaces.  Such a static buffer was a bad idea in the first place,
causing unfixable truncation that was only prevented by triggering
an assertion failure.  Instead, let the small number of remaining
users allocate and free their own, temporary dynamic buffers,
or for the case of .Xr and .In, pass the original data to be
assembled in print_otag().

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jan 17 01:47:46 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.74: +47 -92 lines
Diff to previous 1.74 (colored)

Simplify the usage of print_otag() by making it accept a variable
number of arguments.

Delete struct htmlpair and all the PAIR_*() macros.
Delete enum htmlattr, handle that in print_otag() instead.

Minus 190 lines of code; no functional change except better ordering
of attributes (class before style) in three cases.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jan 10 13:46:53 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

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

Revision 1.73 / (download) - annotate - [select for diffs], Fri Jan 8 17:48:04 2016 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (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.72 / (download) - annotate - [select for diffs], Tue Oct 6 18:30:43 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.71: +31 -31 lines
Diff to previous 1.71 (colored)

modernize style: "return" is not a function; ok cmp(1)

Revision 1.71 / (download) - annotate - [select for diffs], Sat Sep 26 00:53:15 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.70: +1 -2 lines
Diff to previous 1.70 (colored)

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

Revision 1.70 / (download) - annotate - [select for diffs], Sat Apr 18 17:50:02 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.69: +8 -14 lines
Diff to previous 1.69 (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.69 / (download) - annotate - [select for diffs], Sat Apr 18 16:04:40 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (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.68 / (download) - annotate - [select for diffs], Thu Apr 2 23:47:43 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.67: +4 -4 lines
Diff to previous 1.67 (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.67 / (download) - annotate - [select for diffs], Thu Apr 2 22:06:17 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.66: +9 -9 lines
Diff to previous 1.66 (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.66 / (download) - annotate - [select for diffs], Thu Apr 2 21:03:18 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.65: +28 -27 lines
Diff to previous 1.65 (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.65 / (download) - annotate - [select for diffs], Tue Mar 3 21:09:25 2015 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.64: +3 -1 lines
Diff to previous 1.64 (colored)

If an eqn(7) starts on a new input line, be sure to output whitespace
in front of it.  Issue found by tedu@ in glOrtho(3).

There are also cases of excessive whitespace before and after
equations.  This patch neither fixes them nor makes them worse.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Feb 10 08:05:07 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

trim trailing white space, no code change;
from Svyatoslav Mishyn <juef at openmailboxd dot org>, Crux Linux

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jan 30 22:04:15 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.62: +6 -5 lines
Diff to previous 1.62 (colored)

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

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jan 24 02:41:32 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.61: +1 -2 lines
Diff to previous 1.61 (colored)

Strangely, ignoring the roff(7) .na request was implemented in the man(7)
parser.  Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).

Revision 1.61 / (download) - annotate - [select for diffs], Tue Dec 23 09:31:17 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Thu Dec 4 02:05:16 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

fix handling of roff requests having a default scale other than "n",
in particular .sp which uses "v", when the scale is not specified;
cures groff-mandoc differences in about a dozen Xenocara manuals

Revision 1.59 / (download) - annotate - [select for diffs], Tue Dec 2 10:07:17 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.58: +4 -11 lines
Diff to previous 1.58 (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.58 / (download) - annotate - [select for diffs], Mon Dec 1 08:05:02 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.57: +2 -3 lines
Diff to previous 1.57 (colored)

header cleanup:
* add missing forward declarations
* remove needless header inclusions
* some style unification

Revision 1.57 / (download) - annotate - [select for diffs], Fri Nov 28 19:25:03 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.56: +1 -1 lines
Diff to previous 1.56 (colored)

Add some missing OpenBSD RCS markers
and a few missing <sys/types.h> inclusions; no code change.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Oct 7 18:17:05 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.55: +24 -37 lines
Diff to previous 1.55 (colored)

Switch HTML output to polyglot HTML5; have only one single -Thml mode.
Replace hard-coded widths and alignments with a minimal embedded stylesheet.
Do not use <p> because it cannot appear inside block macros.
Remove the "summary" attribute because it is not HTML5.

Written by kristaps@ some months ago, finished during EuroBSDCon.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Aug 8 16:00:23 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Clarity with respect to floating point handling:
Write double constants as double rather than integer literals.
Remove useless explicit (double) cast done at one place and nowhere else.
No functional change.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Apr 23 16:07:06 2014 UTC (10 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.53: +3 -7 lines
Diff to previous 1.53 (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.53 / (download) - annotate - [select for diffs], Sun Apr 20 20:17:36 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.52: +6 -3 lines
Diff to previous 1.52 (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.52 / (download) - annotate - [select for diffs], Sun Apr 20 16:44:44 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.51: +23 -48 lines
Diff to previous 1.51 (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.51 / (download) - annotate - [select for diffs], Sun Mar 30 19:47:32 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (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.50 / (download) - annotate - [select for diffs], Sat Mar 8 15:50:21 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.49: +11 -6 lines
Diff to previous 1.49 (colored)

To find out whether .TP head arguments are same-line or next-line arguments,
use the MAN_LINE flag instead of the man_node line member.
This is required such that user-defined macros wrapping .TP work correctly.

Issue found by Havard Eidnes in Tcl_NewStringObj(3), reported via
the NetBSD bug tracking system and Thomas Klausner <wiz at NetBSD>.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Oct 17 20:51:29 2013 UTC (10 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.48: +30 -2 lines
Diff to previous 1.48 (colored)

Implement the .UR/.UE block (uniform resource identifier) introduced in the
man-ext macros by Eric S. Raymond, enabled by default in groff_man(7).
Usual disclaimer: You don't write new man(7) code, so you are not going
to use these, either.
Improves e.g. the bzr(1) and etherape(1) manuals.
Thanks to naddy@ for bringing these to my attention.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Nov 17 00:25:20 2012 UTC (11 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.47: +28 -28 lines
Diff to previous 1.47 (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.47 / (download) - annotate - [select for diffs], Sat Jun 2 20:07:09 2012 UTC (11 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

Minimal implementation of .EX and .EE for GNU compatibility.
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Feb 26 19:41:27 2012 UTC (12 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.45: +42 -11 lines
Diff to previous 1.45 (colored)

Support .OP, one of the extended man macros; from kristaps@.
Do not use this GNU extension, we take it for compatibility only.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Dec 4 00:44:18 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.44: +6 -1 lines
Diff to previous 1.44 (colored)

When a man document contains nothing at all except one or more invalid
macros, do not die on an assertion, but show correct error messages.
Assertions of meta data validity suggested by joerg@.
ok joerg@

Revision 1.44 / (download) - annotate - [select for diffs], Sun Oct 9 22:10:51 2011 UTC (12 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.43: +18 -36 lines
Diff to previous 1.43 (colored)

Always print <table> column widths in -T[x]html;
if desired, they can be overridden in the CSS file.
Suggested by kristaps@, and i always like to simplify code.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Oct 9 17:59:56 2011 UTC (12 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.42: +17 -18 lines
Diff to previous 1.42 (colored)

Sync to version 1.12.0; all code by kristaps@:
Implement .Rv in -Tman.
Let -man -Tman work a bit like cat(1).
Add the -Ofragment option to -T[x]html.
Minor fixes in -T[x]html.
Lots of apropos(1) and -Tman code cleanup.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Sep 18 15:54:48 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.41: +1 -2 lines
Diff to previous 1.41 (colored)

sync to version 1.11.7 from kristaps@
main new feature: support the roff(7) .tr request
plus various bugfixes and some refactoring

regressions are so minor that it's better to get this in
and fix them in the tree

Revision 1.41 / (download) - annotate - [select for diffs], Sun Sep 18 10:25:28 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.40: +2 -5 lines
Diff to previous 1.40 (colored)

sync to version 1.11.5:
adding an implementation of the eqn(7) language
by kristaps@

So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jul 8 17:47:54 2011 UTC (12 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.39: +33 -95 lines
Diff to previous 1.39 (colored)

clean up .HP, .IP, .TP, .nf, and \c handling in -T[x]html;
from kristaps@

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jul 5 04:12:41 2011 UTC (12 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.38: +34 -8 lines
Diff to previous 1.38 (colored)

Sync to bsd.lv (all coded by kristaps@):
 - mdoc(7): fix an assertion if the first line after .Bd -column
   starts with a blank, and some simplifications in mdoc_argv.c
 - man(7): literal mode ends at .SH and .SS (bug reported by naddy@)
 - allow .RS/.RE blocks to nest (bug reported by dcoppa@ and gsoares@)
 - improve vertical spacing of man(7) blocks
 - roff(7): clear user-defined strings when starting a new file
 - correct ID tags in -T[x]html

Revision 1.38 / (download) - annotate - [select for diffs], Sun May 29 21:22:18 2011 UTC (12 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.37: +22 -12 lines
Diff to previous 1.37 (colored)

Merge release 1.11.3, almost all code by kristaps@:
* Unicode output support (no Unicode input yet, though).
* Refactoring: completely handle predefined strings in roff.c.
- New function mandoc_escape() replaces a2roffdeco() and mandoc_special().
- Start using mandoc_getarg() in mdoc_argv.c.
- Clean up parsing of delimiters in mdoc(7).
* And many minor fixes and lots of cleanup.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Apr 21 22:59:54 2011 UTC (13 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.36: +7 -2 lines
Diff to previous 1.36 (colored)

Merge version 1.10.10:
lots of cleanup and maintenance work by kristaps@.
- move some main.c globals into struct curparse
- move mandoc_*alloc to mandoc.h such that all code can use them
- make mandoc_isdelim available to formatting frontends
- dissolve mdoc_strings.c, move the code where it is used
- make all error reporting functions void, their return values were useless
- and various minor cleanups and fixes

Revision 1.36 / (download) - annotate - [select for diffs], Sun Mar 20 23:36:42 2011 UTC (13 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.35: +4 -1 lines
Diff to previous 1.35 (colored)

Import the foundation for eqn(7) support.
Written by kristaps@.

For now, i'm adding one line to each of the four frontends
to just pass the input text through to the output,
not yet interpreting any of then eqn keywords.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 7 01:35:33 2011 UTC (13 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +2 -8 lines
Diff to previous 1.34 (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.34 / (download) - annotate - [select for diffs], Mon Jan 17 00:15:19 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Refrain from throwing fatal errors for
* .br .sp .nf .fi .na with arguments - just skip the arguments
* .TH lacking arguments - use empty strings instead like groff
* .TH with excessive arguments - skip those
Reminded by Joerg Sonnenberger, ok kristaps@.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jan 16 19:41:16 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.32: +17 -3 lines
Diff to previous 1.32 (colored)

Merge from bsd.lv, original commit message by kristaps@:
Change how -Thtml behaves with tables: use multiple rows, with widths
set by COL, until an external macro is encountered.  At this point in
time, close out the table and process the macro.  When the first table
row is again re-encountered, re-start the table.  This requires a bit of
tracking added to "struct html", but the change is very small and
follows the logic of meta-fonts.  This all follows a bug-report by
joerg@.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jan 16 03:46:21 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +6 -14 lines
Diff to previous 1.31 (colored)

In literal context, do not generate output line breaks between macro
arguments.  This fixes a long-standing bug reported repeatedly,
in particular by naddy@ and brad@.
Fix by kristaps@, minus one regression caught by my test suite.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jan 16 02:56:47 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.30: +10 -1 lines
Diff to previous 1.30 (colored)

If the first character of a free-form text input line is whitespace,
then it will start a new output line;
from kristaps@.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jan 9 16:31:45 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +3 -5 lines
Diff to previous 1.29 (colored)

Remove an unused variable, and use int for array indices (not size_t);
found by lint(1), fixed by kristaps@, no functional change.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jan 4 22:28:17 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +6 -7 lines
Diff to previous 1.28 (colored)

Merge kristaps@' cleaner tbl integration, removing mine;
there are still a few bugs, but fixing these will be easier in tree.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 4 01:15:39 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +10 -22 lines
Diff to previous 1.27 (colored)

Multiple man(7) .IP and .TP fixes started during p2k10:

Affecting both -Tascii and -Thtml:
* The .IP HEAD uses the second argument as the width, not the last one.
* Only print the first .IP HEAD argument, not all but the last.

Affecting only -Tascii:
* The .IP and .TP HEADs must be printed without literal mode,
  but literal mode must be restored afterwards.
* After the .IP and .TP bodies, we only want term_newln(), not
  term_flushln(), or we would get two blank lines in literal mode.
* The .TP HEAD does not use TWOSPACE, just like .IP doesn't either.
* In literal mode, clear NOLPAD after each line, or subsequent lines
  would get no indentation whatsoever.

Affecting only -Thtml:
* Only print next-line .TP children, instead of all but the first.

OK kristaps@ on the -Tascii part; and:
"Can you work this into man_html.c, too?"

Revision 1.27 / (download) - annotate - [select for diffs], Sat Dec 25 13:23:03 2010 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +24 -29 lines
Diff to previous 1.26 (colored)

Yet another batch of -Thtml polishing from kristaps@:
In particular, use <SMALL> for .SM and <CODE> for .Dl.
Use <B> for bold and <I> for italic in general.
Also call this mandoc 1.10.8 now, as it is functionally equivalent,
even though one one set of refactoring patches has not been merged
yet because it conflicts with our tbl(1) handling.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Dec 22 22:35:05 2010 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +79 -97 lines
Diff to previous 1.25 (colored)

Use yet more standard HTML tags,
this time some more <P> and <TABLE> instead of <DIV>.
From kristaps@.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Dec 19 09:22:35 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +32 -96 lines
Diff to previous 1.24 (colored)

Significant improvements to -Thtml by kristaps@:
Use less <DIV>, use more <H1>, <H2>, <P>, <BR>, <PRE>, <UL>, <OL>, <DL> etc.
Triggered by input from Will Backman.
Remove CSS2 note in mandoc.1, which is no longer true.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Dec 19 07:53:12 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +1 -3 lines
Diff to previous 1.23 (colored)

Remove `i' and `r' macro handlers.  These macros, originally part of the
me package, aren't recognised by "groff -mandoc" so we don't need to do
so either.  Besides, they are not used in base or Xenocara, and only at
two or three places in one single port, which are probably typos.
From kristaps@.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Dec 7 00:06:24 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +2 -46 lines
Diff to previous 1.22 (colored)

Back out my .ft implementation for -Thtml.
Kristaps says it is broken and cannot work,
because HTML needs a block structure which .ft does not provide.
Thus, let us just ignore .ft in HTML output.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 6 22:43:54 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +5 -2 lines
Diff to previous 1.21 (colored)

Never print .P, .PP, and .LP header content.
From kristaps@.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Nov 29 02:26:45 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +5 -21 lines
Diff to previous 1.20 (colored)

Now that we have proper .de support in the roff(7) library,
it is time to remove the .Sp, .Vb, and .Ve kludge
that was added to the man(7) library to build Perl manuals.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Nov 29 00:12:02 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +46 -1 lines
Diff to previous 1.19 (colored)

Implement the roff .ft (change font) request for man(7).
Of course, we don't want to encourage low-level physical markup,
but pod2man(1) writes such requests, so Perl manuals contain them,
and some Xenocara and lots and lots of ports manuals use them as well.
In base and Xenocara, this will reduce mandoc -Tlint ERROR noise;
in ports, it will improve rendering of many manuals.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Oct 15 20:45:03 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

Minimal glue to integrate tbl into the mandoc man(7) parser and formatter.
The output dosn't look nice yet, escape handling is still missing,
but will follow soon.
"move forward aggressively :-)" deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jul 25 18:05:54 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.17: +65 -18 lines
Diff to previous 1.17 (colored)

Sync to bsd.lv; in particular, pull in lots of bug fixes.
new features:
* support the .in macro in man(7)
* support minimal PDF output
* support .Sm in mdoc(7) HTML output
* support .Vb and .nf in man(7) HTML output
* complete the mdoc(7) manual
bug fixes:
* do not let mdoc(7) .Pp produce a newline before/after .Sh; reported by jmc@
* avoid double blank lines related to man(7) .sp and .br
* let man(7) .nf and .fi flush the line; reported by jsg@ and naddy@
* let "\ " produce a non-breaking space; reported by deraadt@
* discard \m colour escape sequences; reported by J.C. Roberts
* map undefined 1-character-escapes to the literal character itself
maintenance:
* express mdoc(7) arguments in terms of an enum for additional type-safety
* simplify mandoc_special() and a2roffdeco()
* use strcspn in term_word() in place of a manual loop
* minor optimisations in the -Tps and -Thtml formatting frontends

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jul 13 01:09:13 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +2 -3 lines
Diff to previous 1.16 (colored)

Merge release 1.10.4 (all code by kristaps@), providing four new features:
1) Proper .Bk support: allow output line breaks at input line breaks,
but keep input lines together in the output, finally fixing
synopses like aucat(1), mail(1) and tmux(1).
2) Mostly finished -Tps (PostScript) output.
3) Implement -Thtml output for .Nm blocks and .Bk -words.
4) Allow iterative interpolation of user-defined roff(7) strings.
Also contains some minor bugfixes and some performance improvements.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jun 27 21:54:42 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

Full .nr nS support, unbreaking the kernel manuals.

Kristaps coded this from scratch after reading my .nr patch;
it is simpler and more powerful.

Registers live in struct regset in regs.h, struct man and struct mdoc
contain pointers to it.  The nS register is cleared when parsing .Sh.
Frontends respect the MDOC_SYNPRETTY flag set in mdoc node_alloc.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jun 6 18:08:41 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +5 -2 lines
Diff to previous 1.14 (colored)

Merge bsd.lv release 1.10.0,
which is mostly the post-hackathon release,
bringing in the OpenBSD changes to bsd.lv,
but which also has a few additional minor fixes:

* .Lb is an in-line macro, not in_line_eoln
* .Bt, .Ud now warn when discarding arguments
* allow bad -man dates to flow verbatim into the front-ends
- so far all reported by Ulrich Spoerlein
* .Ar, .Fl and .Li starting with closing punctuation emit an empty element
* empty .Li macros print nothing, but may cause spacing
* proper EOS handling for .Bt, .Ex, .Rv, and .Ud.
* cleanup: collapse posts_xr into posts_wtext (which is the same)
* efficiency: very simple table lookup for roff.c

Revision 1.14 / (download) - annotate - [select for diffs], Sun May 23 22:45:00 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Unified error and warning message system for all of mandoc,
featuring three message levels, as agreed during the mandoc hackathon:
* FATAL parser failure, cannot produce any output from this input file:
  eventually, we hope to convert most of these to ERRORs.
* ERROR, meaning mandoc cannot cope fully with the input syntax and will
  probably lose information or produce structurally garbled output;
  it will try to produce output anyway but exit non-zero at the end,
  which is eventually intended to make the ports infrastructure happy.
* WARNING, meaning you should clean up the input file, but output
  is probably mostly OK, so this will not cause error-exit at the end.
This commit is mostly just converting the old system to the new one; before
the classification will become really reliable, we must check all messages.

In particular,
* set up a new central message string table in main.c
* drop the old message string tables from man.c and mdoc.c
* get rid of the piece-meal merr enums in libman and libmdoc
* reduce number of error/warning functions from 16 to 6 (still a lot...)

While here, handle a few problems more gracefully:
* allow .Rv and .Ex to work without a prior .Nm
* allow .An to ignore extra arguments
* allow undeclared columns in .Bl -column

Written by kristaps@.

Revision 1.13 / (download) - annotate - [select for diffs], Sun May 23 20:57:16 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

implement .AT and .UC; from Joerg Sonnenberger

Revision 1.12 / (download) - annotate - [select for diffs], Thu May 20 00:58:02 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.11: +1 -4 lines
Diff to previous 1.11 (colored)

Support nested roff instructions:
* allow roff_parseln() to be re-run
* allow roff_parseln() to manipulate the line buffer offset
* support the offset in the man and mdoc libraries
* adapt .if, .ie, .el, .ig, .am* and .de* support
* interpret some instructions even in conditional-negative context
Coded by kristaps during the last day of the mandoc hackathon.

To avoid regressions in the OpenBSD tree, commit this together
with some small local additions:
* detect roff block end "\}" even on macro lines
* actually implement the ".if n" conditional
* ignore .ds, .rm and .tr in libroff

Also back my old .if/.ie/.el-handling out of libman, reverting:
man.h 1.15 man.c 1.25 man_macro.c 1.15 man_validate.c 1.19
man_action.c 1.15 man_term.c 1.28 man_html.c 1.9.

Revision 1.11 / (download) - annotate - [select for diffs], Sun May 16 00:54:03 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.10: +1 -7 lines
Diff to previous 1.10 (colored)

In theory, Kristaps never intended to write a roff parser,
but in practice, most real legacy man(7)uals are using so much
low level roff that we can't really get away without at least
partially handling some roff instructions.

As doing this in man(7) only has become messy and as even some
mdoc(7) pages need it, start a minimal partial roff preprocessor.
As a first step, move handling of .am[i], .de[i] and .ig there.
Do not use the roff preprocessor for new manuals!

Now that we have three main parser libraries - roff, man and mdoc -
each one having its own error handling is becoming messy, too.
Thus, start unifying message handling in one central place,
introducing a new generic function mmsg().

coded by kristaps@

Revision 1.10 / (download) - annotate - [select for diffs], Sat May 15 18:06:02 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

removed restriction on integer manual sections in -man;
by kristaps@

Revision 1.9 / (download) - annotate - [select for diffs], Sun Apr 25 16:32:19 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.8: +4 -1 lines
Diff to previous 1.8 (colored)

Implement roff conditional instructions .if .ie .el, in man(7) only for now;
fixing OpenBSD::PackageName(3p) and friends for espie@.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Mar 26 01:22:05 2010 UTC (14 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.7: +20 -6 lines
Diff to previous 1.7 (colored)

merge 1.9.17, keeping local patches

* much improved pod2man support and low-level roff robustness
* have -Tlint imply -Wall and -fstrict
* use fewer macros and more enum in libman
* and various bug fixes

Revision 1.7 / (download) - annotate - [select for diffs], Thu Mar 25 23:23:01 2010 UTC (14 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.6: +28 -4 lines
Diff to previous 1.6 (colored)

merge 1.9.16, keeping local patches

This is mostly cleanup by kristaps@ after my rather hackish patch
to tolerate the non-text macros .na, .sp, .br in next-line scope;
plus some nesting issues fixed by him, all in man(7).
This survived a full  cd /usr/src; make man.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Mar 2 01:00:39 2010 UTC (14 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

Accept the non-standard macros .Sp (similar to .sp)
and .Vb/.Ve (similar to .nf/.fi) in man(7) mode.
These are not intended to be used manually, but they allow us to
properly render man(7) code autogenerated by pod2man(1),
making Perl and OpenSSL happy in our tree.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 18 02:11:26 2010 UTC (14 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

sync to release 1.9.15:
 * corrected .Vt handling (spotted by Joerg Sonnenberger)
 * corrected .Xr argument handling (based on my patch)
 * removed \\ escape sequence (because it is for low-level roff only)
 * warn about trailing whitespace (suggested by jmc@)
 * -Txhtml support
 * and some general cleanup and doc improvements

Revision 1.4 / (download) - annotate - [select for diffs], Thu Dec 24 02:08:14 2009 UTC (14 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +41 -33 lines
Diff to previous 1.3 (colored)

sync to 1.9.14: rewrite escape sequence handling:
- new function a2roffdeco
- font modes (\f) only affect the current stack point
- implement scaling (\s)
- implement space suppression (\c)
- implement non-breaking space (\~) in -Tascii
- many manual improvements

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 22 23:58:00 2009 UTC (14 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +12 -6 lines
Diff to previous 1.2 (colored)

sync to 1.9.12, mostly portability and refactoring:

correctness/functionality:
- bugfix: do not die when overstep hits the right margin
- new option: -fign-escape
- and various HTML features

portability:
- replace bzero(3) by memset(3), which is ANSI C
- replace err(3)/warn(3) by perror(3)/exit(3), which is ANSI C
- iuse argv[0] instead of __progname
- add time.h to various files for FreeBSD compilation

simplicity:
- do not allocate header/footer data dynamically in *_term.c
- provide and use malloc frontends that error out on failure

for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/

Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 27 21:40:07 2009 UTC (14 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +6 -9 lines
Diff to previous 1.1 (colored)

sync to 1.9.11: adapt printing of dates to groff conventions,
NetBSD portability fixes and some minor bugfixes and feature enhancements;
also checked that my hyphenation code still works on top of this

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 21 19:13:50 2009 UTC (14 years, 7 months ago) by schwarze
Branch: MAIN

sync to 1.9.9, featuring:
 * -Thtml output mode
 * roff scaling units
 * and some minor fixes
for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/

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.