OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 13 19:13:00 2023 UTC (6 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.54: +3 -4 lines
Diff to previous 1.54 (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.54 / (download) - annotate - [select for diffs], Tue Aug 16 17:44:53 2022 UTC (21 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (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.53 / (download) - annotate - [select for diffs], Mon Aug 15 17:59:00 2022 UTC (21 months ago) by schwarze
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Distinguish between escape sequences that produce no output
whatsoever (for example \fR) and escape sequences that produce
invisible zero-width output (for example \&).  No, i'm not joking,
groff does make that distinction, and it has consequences in some
situations, for example for vertical spacing in no-fill mode.
Heirloom and Plan 9 behaviour is subtly different, but in case of
doubt, we want to follow groff.

While this fixes the behaviour for the majority of escape sequences,
in particular for those most likely to occur in practice, it is not
perfect yet because some of the more exotic ESCAPE_IGNORE sequences
are actually of the "no output whatsoever" type but treated
as "invisible zero-width" for now.  With the new ASCII_NBRZW mechanism
in place, switching them over one by one when the need arises will
no longer be very difficult.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Sep 9 13:40:24 2020 UTC (3 years, 8 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, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.51: +17 -3 lines
Diff to previous 1.51 (colored)

Do not abuse assert(3) to react to absurd input; the purpose of assert(3)
only is to catch internal inconsistencies in the program itself.
Issue found in an afl run performed by Jan Schreiber <jes at posteo dot de>.

Instead, just cut down unreasonably wide spacing requested by the document
to a narrower width.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Sep 6 14:44:19 2020 UTC (3 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.50: +10 -4 lines
Diff to previous 1.50 (colored)

After .ti, there are many reasons why the offset may change, so setting
it back later requires a guard against underflow, or subsequent assertions
may fail.
Issue found in an afl run performed by Jan Schreiber <jes at posteo dot de>.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jul 19 21:45:37 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.49: +4 -2 lines
Diff to previous 1.49 (colored)

#define a handful of constant strings to reduce the diff to -portable;
now, the diff is about -30 +150 lines (about 0.4%)

Revision 1.49 / (download) - annotate - [select for diffs], Wed Nov 28 14:23:02 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored)

Bugfix: never set termp->enc to the ambiguous value TERMENC_LOCALE,
but instead set it to TERMENC_UTF8 or TERMENC_ASCII.
Makes tbl(7) box drawing work under -T locale (that is, by default
when LC_CTYPE is defined appropriately).

Revision 1.48 / (download) - annotate - [select for diffs], Tue Aug 21 16:01:38 2018 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Improve the ASCII rendering of \(Po (Pound Sterling)
and of the playing card suits to match groff, using feedback
from Ralph Corderoy <ralph at inputplus dot co dot uk>.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Aug 18 15:16:05 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.46: +2 -3 lines
Diff to previous 1.46 (colored)

Unsurprisingly, zero-width non-breaking spaces have...  width 0.

Revision 1.46 / (download) - annotate - [select for diffs], Sun May 20 21:37:11 2018 UTC (6 years ago) by schwarze
Branch: MAIN
Changes since 1.45: +7 -1 lines
Diff to previous 1.45 (colored)

Protect against malicious manual pages containing .ll requests with
excessive arguments: apply the same cutoff as for the -O width=
command line argument.

While here, also place some assertions at strategical places to
prevent excessive indentations from being printed in case of bugs.
In the past, we had more than one bug that caused mandoc to print
effectively infinite output, filling up people's /tmp/ file system,
which is not funny.  We cannot prevent bugs from crashing the
program, but we can at least make filling up the disk less likely.

Triggered by a remark from sthen@ on source-changes@.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Apr 13 18:29:19 2018 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.44: +15 -3 lines
Diff to previous 1.44 (colored)

Make sure that mandoc only goes into UTF-8 mode if the user really
selected UTF-8, not some other multibyte locale.  This obviously
makes no difference on OpenBSD but improves portability.
Issue reported by <Nakayama at NetBSD> via wiz@.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Aug 23 10:50:11 2017 UTC (6 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.43: +6 -6 lines
Diff to previous 1.43 (colored)

Switch ASCII rendering of the same mathematical symbols and greek
letters as in groff commit babca15f from trying to imitate the
characters' graphical shapes, which resulted in unintelligible
renderings in many cases, to transliterations conveying the characters'
meanings.  One benefit is making these characters usable for portable
manual pages.

Solving a problem pointed out by bentley@.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jun 14 14:23:50 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

harmless, but weird typo; found with afterstep_faq(1)

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jun 7 17:38:08 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.41: +10 -8 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Mon May 8 15:33:43 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.40: +6 -2 lines
Diff to previous 1.40 (colored)

Basic implementation of the roff(7) .ti (temporary indent) request.
Needed by about four dozen ports (thanks to naddy@ for the research).

Revision 1.40 / (download) - annotate - [select for diffs], Sun May 7 17:30:58 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Fri Jul 8 22:27:58 2016 UTC (7 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.38: +6 -7 lines
Diff to previous 1.38 (colored)

ISO C99 7.19.2.5 doesn't like mixing putchar(3) and putwchar(3) on
the same stream, and actually, it fails spectacularly on glibc.
Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox
dot org> after testing on Void Linux.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Nov 12 21:49:29 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.37: +10 -2 lines
Diff to previous 1.37 (colored)

Never use LC_ALL.  On the one hand, it can cause misformatting.
On the other hand, it is a security risk because it might cause
buffer overflows.  Use LC_CTYPE only, that's all we need.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Oct 13 22:57:49 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.36: +9 -12 lines
Diff to previous 1.36 (colored)

Major character table cleanup:
* Use ohash(3) rather than a hand-rolled hash table.
* Make the character table static in the chars.c module:
There is no need to pass a pointer around, we most certainly
never want to use two different character tables concurrently.
* No need to keep the characters in a separate file chars.in;
that merely encourages downstream porters to mess with them.
* Sort the characters to agree with the mandoc_chars(7) manual page.
* Specify Unicode codepoints in hex, not decimal (that's the detail
that originally triggered this patch).
No functional change, minus 100 LOC, and i don't see a performance change.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Oct 12 00:07:27 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.35: +1 -3 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Tue Oct 6 18:30:44 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +10 -10 lines
Diff to previous 1.34 (colored)

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

Revision 1.34 / (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.33: +1 -2 lines
Diff to previous 1.33 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jul 17 22:35:36 2015 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.32: +5 -1 lines
Diff to previous 1.32 (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.32 / (download) - annotate - [select for diffs], Sat Apr 4 17:46:58 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.31: +19 -25 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Fri Mar 27 21:17:16 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.30: +22 -49 lines
Diff to previous 1.30 (colored)

Actually use the new man.conf(5) "output" directive.
Additional functionality, yet minus 45 lines of code.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Feb 16 13:58:32 2015 UTC (9 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.29: +9 -3 lines
Diff to previous 1.29 (colored)

Clamp width and indent settings to sensible values. Ignore errors for now.
ok schwarze

Revision 1.29 / (download) - annotate - [select for diffs], Wed Dec 31 16:50:54 2014 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +15 -1 lines
Diff to previous 1.28 (colored)

When showing more than one formatted manual page, insert horizontal lines
between pages.  Suggested by Theo Buehler <theo at math dot ethz dot ch>.
Even in UTF-8 output mode, do not use fancy line drawing characters such
that you can easily use /^--- to skip to the next manual in your pager.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Dec 19 17:10:42 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +4 -1 lines
Diff to previous 1.27 (colored)

Enforcing an arbitrary, implementation dependent, undocumented limit
by calling assert() when valid user input exceeds it is a bad idea.
Allocate the terminal font stack dynamically instead of crashing
above 10 entries.  Issue found by jsg@ with afl.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Nov 20 13:55:23 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +6 -4 lines
Diff to previous 1.26 (colored)

Prevent negative arguments to the .ll request from causing integer
underflow.  Found while preparing an audit of termp.rmargin.

Overflow can also happen, but i see no sane way to deal with it,
so just let it happen.  It doesn't happen for any sane input anyway,
groff behaviour is undefined, and the resulting values are legal,
even though they are useless.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Oct 28 18:48:56 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

In -Tascii mode, print "<?>" only for Unicode escapes of unknown
representation, not for character escapes with unknown names.
According to groff, the latter produce no output, and we now warn
about them.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 28 17:35:42 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +11 -9 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Tue Oct 28 02:43:05 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +35 -35 lines
Diff to previous 1.23 (colored)

Refine -Tascii rendering of Unicode characters, mostly to better agree
with groff, in particular in cases where groff uses backspace overstrike.
In two cases, agreement is impossible because groff clobbers the
previous line: \(*G \(*S
In a number of cases, groff rendering is so misleading that i chose
to render differently: \(Sd \(TP \(Tp \(Po \(ps \(sc \(r! \(r? \(de
While here, also correct the \(la and \(ra Unicode code points.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Oct 26 18:06:28 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +5 -3 lines
Diff to previous 1.22 (colored)

In -Tascii mode, provide approximations even for some Unicode escape
sequences above codepoint 512 by doing a reverse lookup in the
existing mandoc_char(7) character table.

Again, groff isn't smart enough to do this and silently discards such
escape sequences without printing anything.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Oct 26 17:11:18 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +76 -1 lines
Diff to previous 1.21 (colored)

Improve -Tascii output for Unicode escape sequences: For the first 512
code points, provide ASCII approximations.  This is already much better
than what groff does, which prints nothing for most code points.

A few minor fixes while here:
* Handle Unicode escape sequences in the ASCII range.
* In case of errors, use the REPLACEMENT CHARACTER U+FFFD for -Tutf8
and the string "<?>" for -Tascii output.
* Handle all one-character escape sequences in mchars_spec2{cp,str}()
and remove the workarounds on the higher level.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Sep 3 05:17:08 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +7 -3 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Sun Aug 17 22:08:53 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

typo, sorry

Revision 1.19 / (download) - annotate - [select for diffs], Sun Aug 17 22:06:49 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

While all current callers pass valid data to ascii_hspan() only,
it's safer to assume incoming enum data might be invalid
and catch it instead of happily returning an unitialized int.
No functional change right now.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 14 22:32:28 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)

Some compilers apparently worry that abort() might return
and then throw a "may be used uninitialized" warning, so
sprinkle some /* NOTREACHED */.  No functional change.
Noticed by Thomas Klausner <wiz at NetBSD dot org>.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 13 22:09:28 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +21 -11 lines
Diff to previous 1.16 (colored)

Begin cleanup of scaling units.
Note that we use 240u := 1i for all devices, even -Tps and -Tpdf.
Big fix of -Tascii rendering of f, m, and u.
Small fix of -Tascii rendering of c.
Big fix of -Thtml rendering of u.
Big fix of -Tps rendering of m, p, and u.
Clarify -Tps rendering of c.
Correct documentation of scaling units, in particular with respect to u.
This for example improves rendering of the OpenGL manuals.
Joint work with kristaps@.

Revision 1.16 / (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.15: +7 -7 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sun Jul 27 21:51:53 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.14: +7 -2 lines
Diff to previous 1.14 (colored)

Even for UTF-8 output, a non-breaking space character has the same width
as a normal space character, and not width 0.  Bug reported by bentley@.

Revision 1.14 / (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.13: +17 -26 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Sun Mar 30 21:27:59 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.12: +12 -8 lines
Diff to previous 1.12 (colored)

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

Revision 1.12 / (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.11: +16 -2 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Fri Mar 21 22:17:01 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

The files mandoc.c and mandoc.h contained both specialised low-level
functions used for multiple languages (mdoc, man, roff), for example
mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary
functions.  Split the auxiliaries out into their own file and header.
While here, do some #include cleanup.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jun 1 14:27:13 2013 UTC (10 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.9: +2 -3 lines
Diff to previous 1.9 (colored)

Use a standard locale name, "UTF-8" is an ugly non-standard alias
that doesn't work on OpenBSD.
OK tedu@ naddy@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Dec 5 00:28:12 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.8: +5 -1 lines
Diff to previous 1.8 (colored)

As requested by kristaps@, add and improve comments related to -Omdoc;
while here, clean up some redundant initializations in print_man_head().

Revision 1.8 / (download) - annotate - [select for diffs], Sun Nov 13 13:30:42 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +8 -3 lines
Diff to previous 1.7 (colored)

Support -man -Omdoc to format man(7) manuals in mdoc(7) output style;
so far, this is only accepting the option,
i will commit the (few) formatting tweaks separately.

This is intentionally undocumented for two reasons:
(1) We dream of making it the default at some point, so the option
    will hopefully go away again.
(2) It is not needed for production, but mostly for automated man(7)
    to mdoc(7) output comparisons, to help -Tman development.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Nov 13 13:05:23 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +8 -4 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Sun May 29 21:22:18 2011 UTC (12 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.5: +91 -21 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Mon Jan 31 02:36:55 2011 UTC (13 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

Remove unnecessary conditional: term_alloc() cannot return NULL;
from kristaps@.

Revision 1.4 / (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.3: +2 -5 lines
Diff to previous 1.3 (colored)

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

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jul 13 01:09:13 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.2: +53 -9 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Sat Jun 26 19:08:00 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +14 -1 lines
Diff to previous 1.1 (colored)

As a first step towards variable-width font support,
move all width calculations in term_*.c, *_width().
From kristaps.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 10 22:50:10 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN

minimal initial -Tps support, from kristaps@ GSOC
so far, monospace without font decoration,
but it already has page headers and footers

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.