OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.51 / (download) - annotate - [select for diffs], Sun Jun 26 20:30:00 2022 UTC (22 months, 3 weeks ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

In groff commit 78e66624 on May 7 20:15:33 2021 +1000,
G. Branden Robinson changed the -T ascii rendering
of \(sd, the "second" symbol, U+2033 DOUBLE PRIME, from '' to ".
Follow suit in mandoc.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Jun 2 14:49:25 2022 UTC (23 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored)

Since \. is not a character escape sequence, re-classify it from the
wrong parsing class ESCAPE_SPECIAL to the better-suited parsing class
ESCAPE_UNDEF, exactly like it is already done for the similar \\,
which isn't a character escape sequence either.

No formatting change is intended just yet, but this will matter for
upcoming improvements in the parser for roff(7) macro, string, and
register names.

See the node "5.23.2 Copy Mode" in "info groff" regarding
what \\ and \. really mean.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Feb 13 16:16:03 2020 UTC (4 years, 3 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, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.48: +4 -3 lines
Diff to previous 1.48 (colored)

Digit-width and narrow spaces are non-breaking.
Noticed because Branden Robinson worked on related documentation in groff.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Dec 15 19:30:19 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.47: +6 -16 lines
Diff to previous 1.47 (colored)

Several improvements to escape sequence handling.

* Add the missing special character \_ (underscore).
* Partial implementations of \a (leader character)
and \E (uninterpreted escape character).
* Parse and ignore \r (reverse line feed).
* Add a WARNING message about undefined escape sequences.
* Add an UNSUPP message about unsupported escape sequences.
* Mark \! and \? (transparent throughput)
and \O (suppress output) as unsupported.
* Treat the various variants of zero-width spaces as one-byte escape
sequences rather than as special characters, to avoid defining bogus
forms with square brackets.
* For special characters with one-byte names, do not define bogus
forms with square brackets, except for \[-], which is valid.
* In the form with square brackets, undefined special characters do not
fall back to printing the name verbatim, not even for one-byte names.
* Starting a special character name with a blank is an error.
* Undefined escape sequences never abort formatting of the input
string, not even in HTML output mode.
* Document the newly handled escapes, and a few that were missing.
* Regression tests for most of the above.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Dec 14 01:17:46 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

Major cleanup; may imply minor changes in edge cases of error reporting.

Finally, drop support for the run-time configurable mandocmsg()
callback.  It was over-engineered from the start, never used for
anything in a decade, and repeatedly caused maintenance headaches.

Consolidate reporting infrastructure into two files, mandoc.h and
mandoc_msg.c, mopping up the bits and pieces that were scattered
around main.c, read.c, mandoc_parse.h, libmandoc.h, the prototypes
of four parsing-related functions, and both parser structs.

Revision 1.46 / (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.45: +6 -6 lines
Diff to previous 1.45 (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.45 / (download) - annotate - [select for diffs], Tue Aug 21 01:56:26 2018 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.44: +5 -2 lines
Diff to previous 1.44 (colored)

Fix some issues found looking at groff_char(7):
* Add two missing characters, \('Y and \('y.
* The Weierstrass p is not capital, see http://unicode.org/notes/tn27/.
* Add a groff-compatible ASCII transliteration for U+02DC: "~".

Revision 1.44 / (download) - annotate - [select for diffs], Sun Aug 19 23:47:43 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.43: +2 -1 lines
Diff to previous 1.43 (colored)

Add the \) special character, a variant of \& so arcane that i
intentionally leave it undocumented.  Abused for example in the
groff(7) manual page.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Aug 23 13:01:22 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.42: +8 -8 lines
Diff to previous 1.42 (colored)

Improve ASCII rendering of a few rare character escape sequences
that can be changed unilaterally because groff fails to render them
at all.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Aug 23 10:50:11 2017 UTC (6 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.41: +78 -78 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Wed Jun 14 20:56:42 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored)

add the \(ru (0.5m baseline ruler) character escape sequence,
abused by mail/nmh; groff_char(7) confirms that this really exists

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 2 12:41:28 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.39: +18 -2 lines
Diff to previous 1.39 (colored)

add about 15 missing character escape sequences found in groff_char(7);
triggered by multimedia/mkvtoolnix mkvmerge(1) using \(S2

Revision 1.39 / (download) - annotate - [select for diffs], Fri Feb 17 18:26:16 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Many people have been complaining for a long time that ``...'' looks
ugly in -Tascii output.  For that reason, bentley@ submitted patches
to render "..." instead to groff in November 2014 (yes, more than
two years ago).  Carsten Kunze yesterday merged them for the upcoming
groff-1.22.4 release.  Yay!

Consequently, do the same in mandoc: Render \(Lq and \(Rq (which
are used for .Do, .Dq, .Lb, and .St) as '"' in -Tascii output.
All other output modes including -Tutf8 remain unchanged.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Oct 13 22:57:49 2015 UTC (8 years, 7 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.37: +400 -81 lines
Diff to previous 1.37 (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.37 / (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.36: +12 -12 lines
Diff to previous 1.36 (colored)

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

Revision 1.36 / (download) - annotate - [select for diffs], Tue Feb 17 20:33:44 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

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

Revision 1.35 / (download) - annotate - [select for diffs], Wed Oct 29 00:17:01 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +4 -6 lines
Diff to previous 1.34 (colored)

In terminal output, unify handling of Unicode and numbered character
escape sequences just like it was earlier implemented for -Thtml.
Do not let control characters other than ASCII 9 (horizontal tab)
propagate to the output, even though groff allows them; but that
really doesn't look like a great idea.

Let mchars_num2char() return int such that we can distinguish invalid \N
syntax from \N'0'.  This also reduces the danger of signed char issues
popping up.

Revision 1.34 / (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.33: +2 -2 lines
Diff to previous 1.33 (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.33 / (download) - annotate - [select for diffs], Tue Oct 28 13:22:57 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.32: +4 -9 lines
Diff to previous 1.32 (colored)

Tighten Unicode escape name parsing.
Accept only 0xXXXX, 0xYXXXX, 0x10XXXX with Y != 0.
This simplifies mchars_num2uc().

Revision 1.32 / (download) - annotate - [select for diffs], Mon Oct 27 13:29:30 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Fix a regression in term.c rev. 1.89 reported by bentley@:
In UTF-8 output, do not print anything if mchars_spec2cp() returns 0.
In particular, this repairs handling of zero-width spaces (\&).

While here, let mchars_spec2cp() return 0xFFFD instead of -1
if the character is not found, simplifying the using code.
In HTML output, do not print obfuscated ASCII characters and
do not test for one-char escapes, mchars_spec2cp() already does that.

Revision 1.31 / (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.30: +14 -1 lines
Diff to previous 1.30 (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.30 / (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.29: +7 -16 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Wed Jul 23 15:00:00 2014 UTC (9 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.28: +13 -2 lines
Diff to previous 1.28 (colored)

Security fix:
After decoding numeric (\N) and one-character (\<, \> etc.)
character escape sequences, do not forget to HTML-encode the
resulting ASCII character.  Malicious manuals were able to smuggle
XSS content by roff-escaping the HTML-special characters they need.
That's a classic bug type in many web applications, actually...  :-(

Found myself while auditing the HTML formatter for safe output handling.

Revision 1.28 / (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.27: +10 -9 lines
Diff to previous 1.27 (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.27 / (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.26: +2 -1 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Wed Jan 22 20:58:35 2014 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Implement the \: (optional line break) escape sequence,
documented in the Ossanna-Kernighan-Ritter troff manual
and also supported by groff.

Missing feature reported by Steffen Nurpmeso <sdaoden at gmail dot com>.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jun 20 22:29:38 2013 UTC (10 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Improve handling of the roff(7) "\t" escape sequence:
* Parsing macro arguments has to be done in copy mode,
  which implies replacing "\t" by a literal tab character.
* Otherwise, render "\t" as the empty string, not as a 't' character.

This fixes formatting of the distfile example in the oldrdist(1) manual.
This also shows up in the unzip(1) manual as one of several issues
preventing the removal of USE_GROFF from the archivers/unzip port.
Thanks to espie@ for attracting my attention to the unzip(1) manual.

Revision 1.24 / (download) - annotate - [select for diffs], Sat May 18 16:38:54 2013 UTC (11 years ago) by schwarze
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Even though the size of a pointer should not depend on the type of the
data pointed to, pass the size of the right pointer type to calloc;
cosmetic issue reported by Ulrich Spoerlein <uqs@spoerlein.net>
found in Coverity Scan CID 978734.
No binary change - ok cmp(1).

Revision 1.23 / (download) - annotate - [select for diffs], Sat Nov 12 22:43:18 2011 UTC (12 years, 6 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.22: +10 -7 lines
Diff to previous 1.22 (colored)

mark some arguments "const" that will not be changed; from kristaps@

Revision 1.22 / (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.21: +4 -4 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Fri Jul 8 16:59:50 2011 UTC (12 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.20: +8 -61 lines
Diff to previous 1.20 (colored)

simplify: there's really no need for extra code to reorder
the hash chain or an extra function for checking matches;
from kristaps@

Revision 1.20 / (download) - annotate - [select for diffs], Sun May 29 21:26:57 2011 UTC (12 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored)

Fix two regressions introduced in 1.11.3:
* Do not pass integers outside the ASCII range to isprint().
* Make sure escaped characters are really printed verbatim
  when the escape sequence has no special meaning.

Revision 1.19 / (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.18: +44 -85 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Sun Apr 24 16:22:02 2011 UTC (13 years ago) by schwarze
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Merge version 1.11.1:
Again lots of cleanup and maintenance work by kristaps@.
- simplify error reporting: less function pointers, more mandoc_[v]msg
- main: split document parsing out of main.c into read.c
- roff, mdoc, man: improved recognition of control characters
- roff: better handling of if/else stack overflows
- roff: add some predefined strings for backward compatibility
- mdoc, man: empty sections are not errors
- mdoc: move delimiter handling to libmdoc
- some header restructuring and some minor features and fixes
This merge causes two minor regressions
that i will fix in separate commits right afterwards.

Revision 1.17 / (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.16: +3 -12 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Sun Jan 30 16:05:29 2011 UTC (13 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.15: +23 -1 lines
Diff to previous 1.15 (colored)

Implement the \N'number' (numbered character) roff escape sequence.
Don't use it in new manuals, it is inherently non-portable, but we
need it for backward-compatibility with existing manuals, for example
in Xenocara driver pages.
ok kristaps@ matthieu@ jmc@

Revision 1.15 / (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.14: +12 -12 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Mon Sep 20 20:43:38 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

remove remaining pod2man escapes, mandoc now uses the standard preamble;
from kristaps@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 13 22:04:01 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Parse and ignore the \k, \o, \w, and \z roff escapes, and recursively
ignore embedded escapes and mathematical roff subexpressions.
In roff copy mode, resolve "\\" to '\'.
Allow ".xx\}" where xx is a macro to close roff conditional scope.
Mandoc now handles the special character definitions in the pod2man(1)
preamble, so remove the explicit redefinitions in chars.c/chars.in.
From kristaps@.

I have checked that this causes no relevant change to the Perl manuals.
The only change introduced is that some non-ASCII characters rendered
incorrectly before are now rendered incorrectly in a different way.
For example, e accent aigu was "e", now is "e'"
and c cedille was "c", now is "c,".

Revision 1.12 / (download) - annotate - [select for diffs], Fri Aug 20 00:53:35 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Implement a simple, consistent user interface for error handling.
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK  kristaps@;  Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Aug 18 02:46:37 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Remove the standard pod2man \*(C+ pre-predefined string ("C++").
It is always defined in the preamble using .ds when used in manuals.
Since we now support .ds, it is no longer necessary to provide it.
Triggered by a bug report from Thomas Jeunet, patch by kristaps@.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 31 21:43:07 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.9: +9 -10 lines
Diff to previous 1.9 (colored)

Merge bsd.lv version 1.10.5: last larger batch of bug fixes before release.
NOT including Kristaps' .Bd -literal changes which cause regressions.
Features:
* -Tpdf now fully working
Bugfixes:
* proper handling of quoted strings by .ds in roff(7)
* allow empty .Dd
* make .Sm start no-spacing after the first output word
* underline .Ad
* minor fixes in -Thtml
and some optimisations in terminal output.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jul 25 18:05:54 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +69 -28 lines
Diff to previous 1.8 (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.8 / (download) - annotate - [select for diffs], Sun Jun 6 20:30:08 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Merge bsd.lv version 1.10.1 (to be released soon).

The main step forward is that this now has *much* better .Bl -column
support, now supporting many manuals that previously errored out
without producing any output.

Other fixes include:
* do not die from multiple list types, use the first and warn
* in .Bl without a type, default to -item
* various tweaks to .Dt
* fix .In, .Fd, .Ft, .Fn and .Fo formatting
* some documentation fixes and additions
* and fix a couple of bugs reported by Ulrich Spoerlein:
* better support for roff block-end "\}" without a preceding dot
* .In must not break the line outside SYNOPSIS
* spelling in some error messages

While merging, fix one regression in .In spacing
that needs to go to bsd.lv, too.

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 26 02:39:58 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

When a word does not fully fit onto the output line, but it contains
at least one hyphen, we already had support for breaking the line a the
last fitting hyphen.  This patch improves this functionality by only
breaking at hyphens in free-form text, and by not breaking at hyphens
* at the beginning or end of a word   or
* immediately preceded or followed by another hyphen   or
* escaped by a preceding backslash.

Before this patch, differences in break-at-hyphen support were one
of the major sources of noise in automatic comparisons to mdoc(7)
groff output.  Now, the remaining differences are hard to find among
the noise coming from other sources.

Where there are still differences, what we do seems to be better than
what groff does, see e.g. the chio(1) exchange and position commands
for one of the now rare examples.

idea and coding by kristaps@

Besides, this was the last substantial code difference left
between bsd.lv and openbsd.org.  We are now in full sync.

Revision 1.6 / (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.5: +2 -2 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Thu Feb 18 02:11:25 2010 UTC (14 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.4: +2 -14 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: +5 -4 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 -7 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], Mon Oct 19 09:56:35 2009 UTC (14 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

sync to 1.9.6: here is the sync of special characters to new groff
as mentioned in the preceding manual commit (oops)

Revision 1.1 / (download) - annotate - [select for diffs], Mon Oct 19 09:16:58 2009 UTC (14 years, 7 months ago) by schwarze
Branch: MAIN

sync to 1.9.5: partial rewrite of special character and predefined string
tables and the supporting infrastructure, mostly in preparation for
HTML output support

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.