CVS log for mandoc/chars.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.81 / (download) - annotate - [select for diffs], Sun Jun 26 20:33:43 2022 UTC (21 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored) to selected 1.62 (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.80 / (download) - annotate - [select for diffs], Thu Jun 2 14:51:41 2022 UTC (21 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.79: +1 -2 lines
Diff to previous 1.79 (colored) to selected 1.62 (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.79 / (download) - annotate - [select for diffs], Thu Feb 13 16:18:29 2020 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6
Changes since 1.78: +4 -3 lines
Diff to previous 1.78 (colored) to selected 1.62 (colored)

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

Revision 1.78 / (download) - annotate - [select for diffs], Sat Dec 15 19:30:26 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.77: +6 -16 lines
Diff to previous 1.77 (colored) to selected 1.62 (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.77 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:25 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored) to selected 1.62 (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.76 / (download) - annotate - [select for diffs], Tue Aug 21 16:06:48 2018 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.75: +6 -6 lines
Diff to previous 1.75 (colored) to selected 1.62 (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.75 / (download) - annotate - [select for diffs], Tue Aug 21 01:59:22 2018 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.74: +5 -2 lines
Diff to previous 1.74 (colored) to selected 1.62 (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.74 / (download) - annotate - [select for diffs], Sun Aug 19 23:48:36 2018 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored) to selected 1.62 (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.73 / (download) - annotate - [select for diffs], Wed Aug 23 13:01:29 2017 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4
Changes since 1.72: +8 -8 lines
Diff to previous 1.72 (colored) to selected 1.62 (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.72 / (download) - annotate - [select for diffs], Wed Aug 23 10:50:15 2017 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.71: +78 -78 lines
Diff to previous 1.71 (colored) to selected 1.62 (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.71 / (download) - annotate - [select for diffs], Wed Jun 14 20:57:07 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_3, VERSION_1_14_2
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (colored) to selected 1.62 (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.70 / (download) - annotate - [select for diffs], Fri Jun 2 12:43:52 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.69: +18 -2 lines
Diff to previous 1.69 (colored) to selected 1.62 (colored)

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

Revision 1.69 / (download) - annotate - [select for diffs], Fri Feb 17 18:28:06 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored) to selected 1.62 (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.68 / (download) - annotate - [select for diffs], Tue Oct 13 22:59:54 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.67: +400 -81 lines
Diff to previous 1.67 (colored) to selected 1.62 (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.67 / (download) - annotate - [select for diffs], Tue Oct 6 18:32:19 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.66: +12 -12 lines
Diff to previous 1.66 (colored) to selected 1.62 (colored)

modernize style: "return" is not a function

Revision 1.66 / (download) - annotate - [select for diffs], Tue Feb 17 20:37:16 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored) to selected 1.62 (colored)

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

Revision 1.65 / (download) - annotate - [select for diffs], Wed Oct 29 00:17:43 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.64: +4 -6 lines
Diff to previous 1.64 (colored) to selected 1.62 (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.64 / (download) - annotate - [select for diffs], Tue Oct 28 17:36:19 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored) to selected 1.62 (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.63 / (download) - annotate - [select for diffs], Tue Oct 28 13:24:44 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.62: +4 -9 lines
Diff to previous 1.62 (colored)

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

Revision 1.62 / (download) - annotate - [selected], Mon Oct 27 13:31:04 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Fix a regression in term.c rev. 1.229 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.61 / (download) - annotate - [select for diffs], Sun Oct 26 18:07:28 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.60: +12 -1 lines
Diff to previous 1.60 (colored) to selected 1.62 (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.60 / (download) - annotate - [select for diffs], Sun Oct 26 17:12:03 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.59: +7 -16 lines
Diff to previous 1.59 (colored) to selected 1.62 (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.59 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_4, VERSION_1_12
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored) to selected 1.62 (colored)

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

Revision 1.58 / (download) - annotate - [select for diffs], Wed Jul 23 15:00:08 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.57: +13 -2 lines
Diff to previous 1.57 (colored) to selected 1.62 (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.57 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:04 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.56: +10 -9 lines
Diff to previous 1.56 (colored) to selected 1.62 (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.56 / (download) - annotate - [select for diffs], Sun Mar 23 11:25:25 2014 UTC (10 years ago) by schwarze
Branch: MAIN
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored) to selected 1.62 (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.55 / (download) - annotate - [select for diffs], Wed Jan 22 20:58:39 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored) to selected 1.62 (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.54 / (download) - annotate - [select for diffs], Thu Jun 20 22:39:30 2013 UTC (10 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3, VERSION_1_12_2
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored) to selected 1.62 (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.53 / (download) - annotate - [select for diffs], Sat May 18 16:40:15 2013 UTC (10 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored) to selected 1.62 (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.52 / (download) - annotate - [select for diffs], Tue Nov 8 00:15:23 2011 UTC (12 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_1
Changes since 1.51: +10 -7 lines
Diff to previous 1.51 (colored) to selected 1.62 (colored)

Const-ify some mchars arguments.  I think these are non-const for historical
dumbness on my part.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Sep 18 14:14:15 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_0
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored) to selected 1.62 (colored)

forgotten Copyright bumps; no code change
found while syncing to OpenBSD

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jul 31 11:24:39 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_11_7, VERSION_1_11_6
Changes since 1.49: +5 -3 lines
Diff to previous 1.49 (colored) to selected 1.62 (colored)

Regression fixes after merging 1.11.3 to OpenBSD (rev. 1.20):
* 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.
ok kristaps@

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jul 22 14:15:15 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_5
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored) to selected 1.62 (colored)

Add support for 1/2, 1/4, and 3/4 (needed by eqn).

Revision 1.48 / (download) - annotate - [select for diffs], Thu Jul 21 15:21:13 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.62 (colored)

Support `size' constructs in eqn.7.  Generalise mandoc_strontou to this
effect.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jul 7 06:41:50 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_4
Changes since 1.46: +8 -61 lines
Diff to previous 1.46 (colored) to selected 1.62 (colored)

Simplify chars.c---there's really no need for extra code to reorder the
hash chain or an extra function for checking matches.

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 24 21:31:23 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_3
Changes since 1.45: +1 -32 lines
Diff to previous 1.45 (colored) to selected 1.62 (colored)

Remove all references to ESCAPE_PREDEF, which is now not exposed passed
the libroff point.  This clears up a nice chunk of code.

Revision 1.45 / (download) - annotate - [select for diffs], Tue May 24 21:24:16 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.44: +12 -23 lines
Diff to previous 1.44 (colored) to selected 1.62 (colored)

Remove predefined strings from the chars.in file, as they're now local
to predefs.in.  This also makes "BOTH" entries directly into CHAR.  The
res2str and spec2str are now effectively the same function.

Revision 1.44 / (download) - annotate - [select for diffs], Tue May 17 11:50:20 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.43: +17 -3 lines
Diff to previous 1.43 (colored) to selected 1.62 (colored)

Flip on unicode output (via \[uNNNN]) in -T[x]html.  Here we go!

Revision 1.43 / (download) - annotate - [select for diffs], Sun May 15 22:29:50 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.42: +3 -4 lines
Diff to previous 1.42 (colored) to selected 1.62 (colored)

Remove function calls to res() and so forth in term_word().  These were
only used once and simply bloated the binary.  Also fix mchars_num2char
to correctly render the character instead of using atoi().  This makes
the conversation more strict, but it's more correct.

Revision 1.42 / (download) - annotate - [select for diffs], Sun May 15 15:47:46 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.41: +2 -1 lines
Diff to previous 1.41 (colored) to selected 1.62 (colored)

Fix missing support for \N'n' when calculating string widths in -Tascii
(oops).  Do the same for -Thtml (oops^2).

Revision 1.41 / (download) - annotate - [select for diffs], Sat May 14 17:54:42 2011 UTC (12 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored) to selected 1.62 (colored)

Make character engine (-Tascii, -Tpdf, -Tps) ready for Unicode: make buffer
consist of type "int".  This will take more work (especially in encode and
friends), but this is a strong start.  This commit also consists of some
harmless lint fixes.

Revision 1.40 / (download) - annotate - [select for diffs], Sun May 1 08:38:56 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_2
Changes since 1.39: +6 -10 lines
Diff to previous 1.39 (colored) to selected 1.62 (colored)

Filter all \N'' values with isprint().  Ok schwarze@.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Apr 30 22:24:31 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.38: +11 -11 lines
Diff to previous 1.38 (colored) to selected 1.62 (colored)

Make mchars_num2char() return a char like it says.

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

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

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

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

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

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

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 20 22:50:22 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.62 (colored)

Add \*(Ai (ANSI) and \*(Px (POSIX) predefined strings, which are part of
groff's tmac.doc package.  Originally noted by Matthew Dempsky.
Feedback by Jason McIntyre, joerg@, and schwarze@.  Also add some
documentation about predefined strings, tweaked by schwarze@.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Mar 22 10:13:01 2011 UTC (13 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_1
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored) to selected 1.62 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 17 08:49:34 2011 UTC (13 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_10
Changes since 1.32: +3 -12 lines
Diff to previous 1.32 (colored) to selected 1.62 (colored)

Move mandoc_{realloc,malloc,calloc} out of libmandoc.h and into mandoc.h
so that everybody can use them.  This follows the convention of
libXXXX.h being internal to a library and XXXX.h being the external
interface.  Not only does this allow the removal of lots of redundant
NULL-checking code, it also sets the tone for adding new mandoc-global
routines.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jan 30 16:05:37 2011 UTC (13 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +23 -1 lines
Diff to previous 1.31 (colored) to selected 1.62 (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@ jmc@ and tested by Matthieu Herrb (matthieu at openbsd dot org)

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jan 2 10:10:57 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9
Changes since 1.30: +12 -12 lines
Diff to previous 1.30 (colored) to selected 1.62 (colored)

Churn to get parts of 'struct tbl' visible from mandoc.h: rename the
existing 'struct tbl' as 'struct tbl_node', then move all option stuff
into a 'struct tbl' in mandoc.h.

This conflicted with a structure in chars.c, which was renamed.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Sep 15 13:10:30 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_8, VERSION_1_10_7, VERSION_1_10_6
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) to selected 1.62 (colored)

Remove last pod2man escapes.  These render ok, although \*(-- renders as
O- because the underlying macro depends on \(*W, which a prior pod2man
preamble `tr' macro rewrites as "-".  This is an error in groff as this
tramples on the real \(*W, or Greek omega.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Sep 4 20:18:53 2010 UTC (13 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.62 (colored)

Churny commit to quiet lint.  No functional changes.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Aug 29 11:36:49 2010 UTC (13 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored) to selected 1.62 (colored)

Remove the pod2man table entries.  They can now be properly read and
assigned within the pod2man preamble.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Aug 20 01:02:07 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored) to selected 1.62 (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.26 / (download) - annotate - [select for diffs], Mon Aug 16 09:51:17 2010 UTC (13 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.62 (colored)

Remove \*(C+ from the pre-predefined strings.  It is always `ds'-defined
when being used in manuals.  Since we now support `ds', it's no longer
necessary to account for it.  From a bug report originally by Thomas
Jeunet.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Jul 31 23:52:58 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored) to selected 1.62 (colored)

Sync to OpenBSD: add missing Copyright years.
I checked that substantial changes were committed
to these files during these years.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jul 26 13:59:00 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5
Changes since 1.23: +9 -10 lines
Diff to previous 1.23 (colored) to selected 1.62 (colored)

Remove asciisz from chars.in.  It frees up a nice chunk of memory and at
the overhead of running strlen() for ASCII strings (yes, I benchmarked
this running mandoc_char(7) as input again and again with
hundredth-second penalties... on my slow-ass alpha).

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jul 18 12:10:08 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5_PREPDF
Changes since 1.22: +3 -2 lines
Diff to previous 1.22 (colored) to selected 1.62 (colored)

Clean up mandoc_special() (in order later to catch \m).  It also flags
several syntactic errors that weren't caught before.

Also un-puke chars.c on zero-length \[].

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jul 17 09:21:39 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.21: +9 -10 lines
Diff to previous 1.21 (colored) to selected 1.62 (colored)

By letting strncmp() do its job and not helping it with a prior length
check, we can remove the hard-coded length of all escape patterns.  This
frees up a nice chunk of memory.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jul 16 22:33:30 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.20: +65 -24 lines
Diff to previous 1.20 (colored) to selected 1.62 (colored)

Change chars.in HTML encoding to be a Unicode codepoint (int), which is
later formatted in html.c.

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

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

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jun 1 11:47:28 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_1
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.62 (colored)

Fixed condition of `\}' closing a conditional at the start of the line.

Fixed flushed-out condition of \} causing subsequent arguments to be
truncated, when in fact the whole line should be passed through (if the
conditional succeeds) to the front-end and the \} ignored there.

Added regression test of this behaviour.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 25 12:37:20 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored) to selected 1.62 (colored)

Modified version of Ingo Schwarze's patch for hyphen-breaking.
Breakable hyphens are cued in the back-ends (with ASCII_HYPH) and acted
upon in term.c or ignored in html.c.

Also cleaned up XML decl printing (no need for extra vars).

Revision 1.17 / (download) - annotate - [select for diffs], Tue Mar 23 13:25:01 2010 UTC (14 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_25, VERSION_1_9_24, VERSION_1_9_23, VERSION_1_9_22, VERSION_1_9_21, VERSION_1_9_20, VERSION_1_9_19, VERSION_1_9_18, VERSION_1_9_17
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored) to selected 1.62 (colored)

Added stupid pod2man reserved strings.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 28 06:04:59 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_16, VERSION_1_9_15
Changes since 1.15: +1 -13 lines
Diff to previous 1.15 (colored) to selected 1.62 (colored)

Removed superfluous lookahead block in chars.c.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 5 19:51:10 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored) to selected 1.62 (colored)

Removed references to `\\' escape (noted by Jason McIntyre, Ingo Schwarze).

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:26 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre2
Changes since 1.13: +5 -1 lines
Diff to previous 1.13 (colored) to selected 1.62 (colored)

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

Revision 1.13 / (download) - annotate - [select for diffs], Thu Nov 5 07:21:01 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre1, VERSION_1_9_14
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored) to selected 1.62 (colored)

Added functionality of -Tascii non-breaking `\~' space.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Nov 1 07:44:32 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_13
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored) to selected 1.62 (colored)

Replaced putchar() loop with fwrite() (noted by Joerg Sonnenberger).

Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 31 06:10:57 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_12
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.62 (colored)

Using perror() instead of fprintf for failure from library functions.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 30 18:43:24 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.9: +12 -7 lines
Diff to previous 1.9 (colored) to selected 1.62 (colored)

Continued safe handling of allocations.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Sep 23 11:02:21 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9, VERSION_1_9_8, VERSION_1_9_7, VERSION_1_9_6, VERSION_1_9_11, VERSION_1_9_10
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.62 (colored)

All special characters sync'd with groff, both -Thtml and -Tascii.
Re-added text links to index.sgml (just for show).

Revision 1.8 / (download) - annotate - [select for diffs], Wed Sep 23 09:06:44 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.62 (colored)

Sync'd special letters and ligatures with newest groff.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 23 01:04:11 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.62 (colored)

Arrows & brackets sync'd with newest groff.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Sep 23 00:03:45 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored) to selected 1.62 (colored)

Quotes sync'd with newest groff.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 22 23:34:14 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored) to selected 1.62 (colored)

Accent marks sync'd with current groff.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Sep 22 23:15:58 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored) to selected 1.62 (colored)

Many more UTF-8 symbols in place.
Started partitioning chars.in into sections corresponding to mandoc_char.7.
Correctly ordered Greek letters.
Sync'd all mathematical and logical symbols with current groff.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Sep 22 10:07:01 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.62 (colored)

Many more characters for HMTL (mostly Greek).

Revision 1.2 / (download) - annotate - [select for diffs], Thu Sep 17 08:21:42 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_5
Changes since 1.1: +32 -29 lines
Diff to previous 1.1 (colored) to selected 1.62 (colored)

More html.
Initial html encodings in chars.in.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Sep 17 07:41:28 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Diff to selected 1.62 (colored)

ascii_xxx -> chars_xxx (intended to hold more than just ascii encoding).
More html work.

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




CVSweb