CVS log for mandoc/term.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.281 / (download) - annotate - [select for diffs], Mon Jun 3 20:23:41 2019 UTC (14 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.280: +3 -1 lines
Diff to previous 1.280 (colored)

Explicitly state that the cases in the inner switch in term_fill()
are exhaustive.  While there is no bug, being explicit has no downside
is is potentially safer for the future.

Michal Nowak <mnowak at startmail dot com> reported that gcc 4.4.4
and 7.4.0 on illumos throw -Wuninitialized false positives.

Revision 1.280 / (download) - annotate - [select for diffs], Tue Jan 15 12:16:18 2019 UTC (18 months, 3 weeks ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.279: +4 -3 lines
Diff to previous 1.279 (colored)

In PostScript and PDF output, one AFM unit is not nearly enough
inter-word spacing, let's try again with 250 AFM units.
Regression caused during my recent term_flushln() reorg in rev. 1.278,
reported by brynet@ (sorry and many thanks for reporting).

Revision 1.279 / (download) - annotate - [select for diffs], Fri Jan 4 03:21:02 2019 UTC (19 months ago) by schwarze
Branch: MAIN
Changes since 1.278: +16 -2 lines
Diff to previous 1.278 (colored)

Implement centering and adjustment to the right margin directly in
the terminal filling routine, controlled by new flags TERMP_CENTER
and TERMP_RIGHT.
This became possible by the recent term_flushln() rewrite.
No functional change yet, but to be used by upcoming commits.

Revision 1.278 / (download) - annotate - [select for diffs], Thu Jan 3 19:59:55 2019 UTC (19 months ago) by schwarze
Branch: MAIN
Changes since 1.277: +253 -179 lines
Diff to previous 1.277 (colored)

Rewrite the line filling function for terminal output yet again.
This function has always been among the most complicated parts of
mandoc, and it repeatedly needed substantial functional enhancements.
The present rewrite is required to prepare for the implementation
of simultaneous filling and centering of output lines.

The previous implementation looked at each word in turn and printed
it to the output stream as soon as it was found to still fit on the
current output line.  Obviously, that approach neither allows
centering nor adjustment to the right margin.

The new implementation first decides which part of the paragraph
to put onto the current output line, also measuring the display
width of that part, even if that part consists of multiple words
including intervening whitespace.  This will allow moving the whole
output line to the right as desired before printing it, for example
to center it or to adjust it to the right margin.

The function is split into three parts, each much shorter, solving a
better defined task, much easier to understand and better commented:
1. the steering function term_flushln() looping over output lines;
2. the calculation function term_fill() looping over input characters;
3. and the output function term_field() looping over printed characters.

No functional change yet.

Revision 1.277 / (download) - annotate - [select for diffs], Sat Dec 15 19:30:26 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.276: +11 -9 lines
Diff to previous 1.276 (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.276 / (download) - annotate - [select for diffs], Thu Oct 25 01:32:41 2018 UTC (21 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.275: +2 -1 lines
Diff to previous 1.275 (colored)

Implement the \f(CW and \f(CR (constant width font) escape sequences
for HTML output.  Somewhat relevant because pod2man(1) relies on this.
Missing feature reported by Pali dot Rohar at gmail dot com.

Note that constant width font was already correctly selected before
this when required by semantic markup.  Only attempting physical
markup with the low-level escape sequence was ineffective.

Revision 1.275 / (download) - annotate - [select for diffs], Thu Aug 16 13:54:06 2018 UTC (23 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.274: +27 -2 lines
Diff to previous 1.274 (colored)

Implement the \*(.T predefined string (interpolate device name)
by allowing the preprocessor to pass it through to the formatters.
Used for example by the groff_char(7) manual page.

Revision 1.274 / (download) - annotate - [select for diffs], Fri Jul 28 14:25:48 2017 UTC (3 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.273: +2 -2 lines
Diff to previous 1.273 (colored)

fix typo in TERMP_MULTICOL flag test;
patch from florian@, found with clang

Revision 1.273 / (download) - annotate - [select for diffs], Wed Jun 14 23:24:18 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.272: +7 -2 lines
Diff to previous 1.272 (colored)

implement so-called absolute horizontal motion: \h'|...',
used for example by zoem(1)

Revision 1.272 / (download) - annotate - [select for diffs], Wed Jun 14 18:23:37 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.271: +6 -6 lines
Diff to previous 1.271 (colored)

let \l use the right fill character

Revision 1.271 / (download) - annotate - [select for diffs], Wed Jun 14 17:51:15 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.270: +18 -4 lines
Diff to previous 1.270 (colored)

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

Revision 1.270 / (download) - annotate - [select for diffs], Wed Jun 14 01:31:27 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.269: +33 -1 lines
Diff to previous 1.269 (colored)

implement the roff(7) \p (break output line) escape sequence

Revision 1.269 / (download) - annotate - [select for diffs], Mon Jun 12 19:05:47 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.268: +40 -25 lines
Diff to previous 1.268 (colored)

Implement automatic line breaking
inside individual table cells that contain text blocks.
This cures overlong lines in various Xenocara manuals.

Revision 1.268 / (download) - annotate - [select for diffs], Thu Jun 8 12:54:58 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.267: +5 -14 lines
Diff to previous 1.267 (colored)

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

Revision 1.267 / (download) - annotate - [select for diffs], Wed Jun 7 20:01:19 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.266: +40 -25 lines
Diff to previous 1.266 (colored)

Prepare the terminal driver for filling multiple columns in parallel,
second step: make the per-column byte pointer persistent across
term_flushln() calls, such that a subsequent call can continue at
the point where the previous call left.  If more than one column
is in use, return from term_flushln() when the column is full,
rather than breaking the output line.

No functional change, because nothing sets up multiple columns yet.

Revision 1.266 / (download) - annotate - [select for diffs], Wed Jun 7 17:38:26 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.265: +70 -68 lines
Diff to previous 1.265 (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.265 / (download) - annotate - [select for diffs], Wed Jun 7 02:14:09 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.264: +28 -15 lines
Diff to previous 1.264 (colored)

The \h escape sequence provides another method for moving backwards,
and after that, previously written output gets overwritten, but
overwriting with blanks does *not* erase previously written content.
Yes, manual pages exist that are crazy enough to rely on that...

Revision 1.264 / (download) - annotate - [select for diffs], Sun Jun 4 22:44:15 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.263: +61 -40 lines
Diff to previous 1.263 (colored)

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

Revision 1.263 / (download) - annotate - [select for diffs], Sun Jun 4 18:50:35 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.262: +25 -62 lines
Diff to previous 1.262 (colored)

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

Revision 1.262 / (download) - annotate - [select for diffs], Fri Jun 2 19:21:23 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.261: +58 -2 lines
Diff to previous 1.261 (colored)

Partial implementation of \h (horizontal line drawing function).
A full implementation would require access to output device properties
and state variables (both only available after the main parser has
finalized the parse tree) before numerical expansions in the roff
preprocessor (i.e., before the main parser is even started).

Not trying to pull that stunt right now because the static-width
implementation committed here is sufficient for tcl-style manual pages
and already more complicated than i would have suspected.

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

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

Revision 1.260 / (download) - annotate - [select for diffs], Sun May 7 17:31:45 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.259: +15 -12 lines
Diff to previous 1.259 (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.259 / (download) - annotate - [select for diffs], Sun Jan 8 18:16:58 2017 UTC (3 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.258: +15 -3 lines
Diff to previous 1.258 (colored)

Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf.
Reported by jsg@ after an afl(1) run long ago.

Revision 1.258 / (download) - annotate - [select for diffs], Wed Aug 10 11:03:43 2016 UTC (4 years ago) by schwarze
Branch: MAIN
Changes since 1.257: +6 -4 lines
Diff to previous 1.257 (colored)

Fix assertion failures caused by whitespace inside \o'' (overstrike)
sequences that jsg@ found with afl(1):
* Avoid writing \t\b in term.c.
* Handle trailing \b in term_ps.c.

Revision 1.257 / (download) - annotate - [select for diffs], Tue Apr 12 15:30:00 2016 UTC (4 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.256: +2 -2 lines
Diff to previous 1.256 (colored)

sed 's/the the/the/' in a comment; from krw@

Revision 1.256 / (download) - annotate - [select for diffs], Thu Jan 7 21:03:54 2016 UTC (4 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.255: +2 -2 lines
Diff to previous 1.255 (colored)

This code wasted memory by allocating sizeof(enum termfont *)
where only sizeof(enum termfont) is needed.
Fixes CID 1288941.  From christos@ via wiz@, both at NetBSD.

Revision 1.255 / (download) - annotate - [select for diffs], Fri Oct 23 14:50:58 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.254: +2 -2 lines
Diff to previous 1.254 (colored)

apply bold and italic to all non-ASCII Unicode codepoints,
fixing input like \fB\('e; issue reported by bentley@

Revision 1.254 / (download) - annotate - [select for diffs], Tue Oct 13 22:59:54 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.253: +5 -8 lines
Diff to previous 1.253 (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.253 / (download) - annotate - [select for diffs], Mon Oct 12 00:08:16 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.252: +1 -5 lines
Diff to previous 1.252 (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.252 / (download) - annotate - [select for diffs], Tue Oct 6 18:32:20 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.251: +7 -7 lines
Diff to previous 1.251 (colored)

modernize style: "return" is not a function

Revision 1.251 / (download) - annotate - [select for diffs], Sat Sep 26 00:54:04 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.250: +1 -2 lines
Diff to previous 1.250 (colored)

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

Revision 1.250 / (download) - annotate - [select for diffs], Mon Sep 21 13:25:00 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.249: +7 -1 lines
Diff to previous 1.249 (colored)

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

Revision 1.249 / (download) - annotate - [select for diffs], Sun Aug 30 21:10:56 2015 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.248: +8 -2 lines
Diff to previous 1.248 (colored)

Drop leading, internal, and trailing blank characters in \o (overstrike)
escape sequences; that's cleaner for all output modes, and it's required
to prevent the PostScript/PDF formatter from dying on assertions.
Bug found by jsg@ with afl.

Revision 1.248 / (download) - annotate - [select for diffs], Wed Apr 29 18:35:00 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.247: +27 -43 lines
Diff to previous 1.247 (colored)

Replace the kludge for the \z escape sequence by an actual
implementation.  As a side effect, minus ten lines of code.

As another side effect, this also fixes the assertion failure that
used to be triggered by "\z\o'ab'c" at the beginning of an output
line, found by jsg@ with afl (test case 022/Apr27).

Revision 1.247 / (download) - annotate - [select for diffs], Sat Apr 4 17:47:18 2015 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.246: +6 -6 lines
Diff to previous 1.246 (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.246 / (download) - annotate - [select for diffs], Thu Apr 2 23:48:20 2015 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.245: +4 -4 lines
Diff to previous 1.245 (colored)

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

Revision 1.245 / (download) - annotate - [select for diffs], Fri Mar 6 13:02:43 2015 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.244: +2 -1 lines
Diff to previous 1.244 (colored)

prevent the skipvsp flag from creeping past actual text

Revision 1.244 / (download) - annotate - [select for diffs], Sat Jan 31 00:12:41 2015 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.243: +7 -15 lines
Diff to previous 1.243 (colored)

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

Revision 1.243 / (download) - annotate - [select for diffs], Wed Jan 21 20:33:25 2015 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.242: +27 -2 lines
Diff to previous 1.242 (colored)

Rudimentary implementation of the roff(7) \o escape sequence (overstrike).
This is of some relevance because the pod2man(1) preamble abuses it
for the icelandic letter Thorn, instead of simply using \(TP and \(Tp.
Missing feature found by sthen@ in DateTime::Locale::is_IS(3p).

Revision 1.242 / (download) - annotate - [select for diffs], Wed Dec 24 23:32:42 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.241: +2 -2 lines
Diff to previous 1.241 (colored)

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

Revision 1.241 / (download) - annotate - [select for diffs], Wed Dec 24 09:58:35 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.240: +4 -2 lines
Diff to previous 1.240 (colored)

When a man(7) document contains unreasonably large numbers for
indentations or paragraph distances, large output may be generated,
which is practically the same as an endless loop; found by jsg@
with afl.
Reject such unreasonably large numbers beyond arbitrary limits
similar to those used by groff (max. 65 blank lines between paragraphs
and max. SHRT_MAX characters per output line) and fall back to
defaults when exceeded.  Having the limits behave in exactly the
same way is not relevant.

Revision 1.240 / (download) - annotate - [select for diffs], Tue Dec 23 13:48:57 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.239: +9 -15 lines
Diff to previous 1.239 (colored)

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

Revision 1.239 / (download) - annotate - [select for diffs], Tue Dec 23 06:16:46 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.238: +19 -8 lines
Diff to previous 1.238 (colored)

Fix vertical scaling.  Obviously, nobody ever had a serious look at this.
Basic units, centimeters, points, ens, ems, and the rounding algorithm
were all wrong, only inches, pica, and the default vertical span worked.

Revision 1.238 / (download) - annotate - [select for diffs], Fri Dec 19 17:12:04 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.237: +19 -15 lines
Diff to previous 1.237 (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.237 / (download) - annotate - [select for diffs], Tue Dec 2 10:08:06 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored)

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

Revision 1.236 / (download) - annotate - [select for diffs], Fri Nov 21 01:52:53 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.235: +13 -9 lines
Diff to previous 1.235 (colored)

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

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

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

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

Revision 1.235 / (download) - annotate - [select for diffs], Sun Nov 16 21:29:35 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.234: +4 -2 lines
Diff to previous 1.234 (colored)

When a line (in the sense of term_flushln()) contains white space only,
the `vbl' variable includes the left margin, but `vis' does not.
Prevent a `vis' underflow that caused a bogus blank line.
Bug reported by Carsten Kunze, found in less(1): .Bl -tag ... .It " "

Revision 1.234 / (download) - annotate - [select for diffs], Sat Nov 1 04:03:49 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.233: +2 -2 lines
Diff to previous 1.233 (colored)

fix a typo causing crashes in Unicode string length measurement

Revision 1.233 / (download) - annotate - [select for diffs], Wed Oct 29 00:17:43 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.232: +65 -39 lines
Diff to previous 1.232 (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.232 / (download) - annotate - [select for diffs], Tue Oct 28 18:49:33 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.231: +4 -10 lines
Diff to previous 1.231 (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.231 / (download) - annotate - [select for diffs], Tue Oct 28 17:36:19 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.230: +2 -6 lines
Diff to previous 1.230 (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.230 / (download) - annotate - [select for diffs], Mon Oct 27 13:31:04 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.229: +5 -7 lines
Diff to previous 1.229 (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.229 / (download) - annotate - [select for diffs], Sun Oct 26 17:12:03 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.228: +40 -54 lines
Diff to previous 1.228 (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.228 / (download) - annotate - [select for diffs], Mon Aug 18 21:07:53 2014 UTC (5 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_4, VERSION_1_12
Changes since 1.227: +2 -2 lines
Diff to previous 1.227 (colored)

Control reading off the edge of our buffer in term_flushln().
This happens in specific conditions (trailing whitespace in certain
terminal modes), but in practise, it happens quite often (as reported by
valgrind).
In short, "Nothing about term_flushln() is simple.  Srsly!" (schwarze@)
Discussed on tech@, ok schwarze@.

Revision 1.227 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (6 years ago) by schwarze
Branch: MAIN
Changes since 1.226: +1 -3 lines
Diff to previous 1.226 (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.226 / (download) - annotate - [select for diffs], Fri Aug 1 19:38:29 2014 UTC (6 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.225: +3 -3 lines
Diff to previous 1.225 (colored)

Fix floating point handling: When converting double to size_t,
properly round to the nearest M (=0.001m), which is the smallest
available unit.

This avoids weirdness like (size_t)(0.6 * 10.0) == 5
by instead calculating (size_t)(0.6 * 10.0 + 0.0005) == 6,
and so it fixes the indentation of the readline(3) manual.

Revision 1.225 / (download) - annotate - [select for diffs], Fri Aug 1 19:25:52 2014 UTC (6 years ago) by schwarze
Branch: MAIN
Changes since 1.224: +7 -7 lines
Diff to previous 1.224 (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.224 / (download) - annotate - [select for diffs], Sun Jul 6 18:51:13 2014 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.223: +3 -3 lines
Diff to previous 1.223 (colored)

After skipping an escape sequence with incomplete arguments,
do not throw away the rest of the string to be rendered.

Revision 1.223 / (download) - annotate - [select for diffs], Wed Apr 23 21:06:41 2014 UTC (6 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.222: +2 -2 lines
Diff to previous 1.222 (colored)

Audit malloc(3)/calloc(3)/realloc(3) usage.
* Change eight reallocs to reallocarray to be safe from overflows.
* Change one malloc to reallocarray to be safe from overflows.
* Change one calloc to reallocarray, no zeroing needed.
* Change the order of arguments of three callocs (aesthetical).

Revision 1.222 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:05 2014 UTC (6 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.221: +48 -60 lines
Diff to previous 1.221 (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.221 / (download) - annotate - [select for diffs], Tue Apr 8 07:13:12 2014 UTC (6 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.220: +21 -28 lines
Diff to previous 1.220 (colored)

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

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

Revision 1.220 / (download) - annotate - [select for diffs], Sat Apr 5 21:18:19 2014 UTC (6 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.219: +6 -6 lines
Diff to previous 1.219 (colored)

bugfix: make sure all variables are properly initialized
when rendering .ll (line length) requests.  oops.

Revision 1.219 / (download) - annotate - [select for diffs], Sun Mar 30 21:28:01 2014 UTC (6 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.218: +31 -1 lines
Diff to previous 1.218 (colored)

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

Revision 1.218 / (download) - annotate - [select for diffs], Sun Mar 23 11:25:26 2014 UTC (6 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.217: +2 -2 lines
Diff to previous 1.217 (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.217 / (download) - annotate - [select for diffs], Thu Mar 13 19:23:50 2014 UTC (6 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.216: +8 -7 lines
Diff to previous 1.216 (colored)

In -Tutf8 mode, make sure that hyphens get counted against the output line
length even when they are breakable.  Before this, a line containing N
breakable hyphens could get up to N characters wider than the right margin
in -Tutf8 output mode.
Issue reported by tedu@ on <bugs at OpenBSD>.

Revision 1.216 / (download) - annotate - [select for diffs], Wed Jan 22 20:58:39 2014 UTC (6 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.215: +10 -4 lines
Diff to previous 1.215 (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.215 / (download) - annotate - [select for diffs], Tue Dec 31 18:07:42 2013 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.214: +1 -2 lines
Diff to previous 1.214 (colored)

remove assignments that will be overwritten right afterwards,
and remove pointless local variables;
found in a clang output from Ulrich Spoerlein <uqs at FreeBSD>

Revision 1.214 / (download) - annotate - [select for diffs], Wed Dec 25 00:39:31 2013 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3
Changes since 1.213: +12 -2 lines
Diff to previous 1.213 (colored)

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

Revision 1.213 / (download) - annotate - [select for diffs], Tue Dec 24 23:04:36 2013 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.212: +2 -2 lines
Diff to previous 1.212 (colored)

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

Revision 1.212 / (download) - annotate - [select for diffs], Mon Dec 23 02:20:09 2013 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.211: +15 -4 lines
Diff to previous 1.211 (colored)

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

Revision 1.211 / (download) - annotate - [select for diffs], Sun Dec 22 23:34:13 2013 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.210: +6 -8 lines
Diff to previous 1.210 (colored)

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

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

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

Revision 1.210 / (download) - annotate - [select for diffs], Wed Aug 21 21:20:40 2013 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_2
Changes since 1.209: +15 -19 lines
Diff to previous 1.209 (colored)

Move the last column-counting members of struct termp (col and maxcols)
from int to size_t, to match some existing ones (offset, *rmargin, viscol).
Move some related local variables from int to size_t as well.

Needed as a preparation to make a generalized adjbuf() function available
beyond the file term.c, i.e. in mandoc.c.
Also saves a couple of ugly casts.

Revision 1.209 / (download) - annotate - [select for diffs], Thu Aug 8 20:07:47 2013 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.208: +23 -29 lines
Diff to previous 1.208 (colored)

Implement the roff(7) font-escape sequence \f(BI "bold+italic".
This improves the formatting of about 40 base manuals
and reduces groff-mandoc formatting differences in base by about 5%.

Revision 1.208 / (download) - annotate - [select for diffs], Mon Aug 5 23:36:42 2013 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.207: +2 -2 lines
Diff to previous 1.207 (colored)

After a leading blank on an output line, the first word was counted twice
against vend, causing a premature line break.  Fix that bug by reverting
revision 1.93 which Kristaps committed four years ago.  Kristaps patch is no
longer needed because the code below  /* Write out the [remaining] word. */
now handles leading blanks correctly, probably already for a long time.

This avoids premature line breaks in about a dozen base system manuals,
for example as(1) and gdb(1), and alignment issues in another twenty,
for example mount(2), ip6(4), pfctl(8), and crypto(9).

Revision 1.207 / (download) - annotate - [select for diffs], Wed May 29 15:17:52 2013 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.206: +3 -3 lines
Diff to previous 1.206 (colored)

In keep mode, if any text is printed (even in NOSPACE mode),
any text that follows must be kept on the same line.

I already found the issue and wrote the patch in April 2011,
but didn't come round to do proper testing and forgot about it.

Revision 1.206 / (download) - annotate - [select for diffs], Fri Nov 16 17:16:55 2012 UTC (7 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.205: +2 -2 lines
Diff to previous 1.205 (colored)

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

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

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

Revision 1.205 / (download) - annotate - [select for diffs], Mon Jul 16 21:30:42 2012 UTC (8 years ago) by schwarze
Branch: MAIN
Changes since 1.204: +9 -1 lines
Diff to previous 1.204 (colored)

In flush-left mode of both man(7) and mdoc(7), when an output line is broken
at the position of a literal tab, the tab indents the following line.
Fixes the perl(1) SYNOPSIS; reminded by deraadt@; OpenBSD rev. 1.66.

Revision 1.204 / (download) - annotate - [select for diffs], Tue Jul 10 15:35:41 2012 UTC (8 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.203: +2 -7 lines
Diff to previous 1.203 (colored)

Remove a hack that was intended for groff-1.15 bug compatibility:
When the width of a tag in .Bl -hang was exactly one character
shorter than the maximum length that would fit, the following text
would have a negative hang of one character (i.e., hang to the left).
That bug is no longer present in groff-1.21, so relax mandoc, too.
OpenBSD rev. 1.65

Revision 1.203 / (download) - annotate - [select for diffs], Thu May 31 22:29:13 2012 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.202: +54 -14 lines
Diff to previous 1.202 (colored)

Implement the roff \z escape sequence, intended to output the next
character without advancing the cursor position; implement it to
simply skip the next character, as it will usually be overwritten.

With this change, the pod2man(1) preamble user-defined string \*:,
intended to render as a diaeresis or umlaut diacritic above the
preceding character, is rendered in a slightly less ugly way,
though still not correctly.  It was rendered as "z.." and is now
rendered as ".".

Given that the definition of \*: uses elaborate manual \h positioning,
there is little chance for mandoc(1) to ever render it correctly,
but at least we can refrain from printing out a spurious "z", and
we can make the \z do something semi-reasonable for easier cases.

"just commit" kristaps@

Revision 1.202 / (download) - annotate - [select for diffs], Sun May 27 18:02:49 2012 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.201: +6 -3 lines
Diff to previous 1.201 (colored)

Fix the vertical spacing around tbl(7) instances in man(7).

Groff forces the document author to manually request sufficient spacing
after .TE - that is, at least .sp 1v after a table with the "box" option
and at least .sp 2v after a table with the "doublebox" option - or else
it clobbers the box.  I consider that insane, so i'm not imitating groff
in that respect.  Instead, i add at least as much vertical space as groff,
or more where required to avoid clobbering the box.

Consequently, output will be identical for input that looks sane with
groff, and mandoc will make output look better for input that looks bad
with groff.

"Please check them in and I'll look into them later!" kristaps@

Revision 1.201 / (download) - annotate - [select for diffs], Wed Sep 21 09:57:13 2011 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_1, VERSION_1_12_0
Changes since 1.200: +4 -6 lines
Diff to previous 1.200 (colored)

As noticed by kristaps@, when breaking an overflowing line,
forget about pending whitespace (vbl), or the next line would
be misaligned and potentially too long; but i'm fixing this
in a simpler way than he proposed.
Also remove the kludges in .HP that compensated for this bug.

Revision 1.200 / (download) - annotate - [select for diffs], Mon Sep 19 22:36:16 2011 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.199: +25 -34 lines
Diff to previous 1.199 (colored)

Remove the terminal frontend flag TERMP_NOLPAD.

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

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

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

ok kristaps@

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

fix a regression introduced in 1.11.7:
even a breakable hyphen may be bold or underlined
ok kristaps@

Revision 1.198 / (download) - annotate - [select for diffs], Sun Sep 18 14:14:15 2011 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.197: +2 -2 lines
Diff to previous 1.197 (colored)

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

Revision 1.197 / (download) - annotate - [select for diffs], Tue May 24 21:31:23 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5, VERSION_1_11_4, VERSION_1_11_3
Changes since 1.196: +1 -23 lines
Diff to previous 1.196 (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.196 / (download) - annotate - [select for diffs], Fri May 20 15:44:55 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.195: +62 -18 lines
Diff to previous 1.195 (colored)

Allow non-ASCII terminal encodings to accept unicode values for the
special characters, if possible.  This is broken into a separate switch
statement for clarity.

Revision 1.195 / (download) - annotate - [select for diffs], Wed May 18 23:59:08 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.194: +3 -1 lines
Diff to previous 1.194 (colored)

Make any un-recognised font be considered a call for the Roman font.
This makes sequences of \f[unknown] \fP not completely puke.  From a
TODO by schwarze@.

Revision 1.194 / (download) - annotate - [select for diffs], Tue May 17 22:32:45 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.193: +46 -7 lines
Diff to previous 1.193 (colored)

Locale support.  I'm checking this in to clean up fall-out in-tree, but
it looks pretty good.  Basically, the -Tlocale option propogates into
term_ascii.c, where we set locale-specific console call-backs IFF (1)
setlocale() works; (2) locale support is compiled in (see Makefile for
-DUSE_WCHAR); (3) the internal structure of wchar_t maps directly to
Unicode codepoints as defined by __STDC_ISO_10646__; and (4) the console
supports multi-byte characters.

To date, this configuration only supports GNU/Linux.  OpenBSD doesn't
export __STDC_ISO_10646__ although I'm told by stsp@openbsd.org that it
should (it has the correct map).  Apparently FreeBSD is the same way.
NetBSD?  Don't know.  Apple also supports this, but doesn't define the
macro.  Special-casing!

Benchmark: -Tlocale incurs less than 0.2 factor overhead when run
through several thousand manuals when UTF8 output is enabled.  Native
mode (whether directly -Tascii or through no locale or whatever) is
UNCHANGED: the function callbacks are the same as before.

Note.  If the underlying system does NOT support STDC_ISO_10646, there
is a "slow" version possible with iconv or other means of flipping from
a Unicode codepoint to a wchar_t.

Revision 1.193 / (download) - annotate - [select for diffs], Tue May 17 14:38:34 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.192: +1 -13 lines
Diff to previous 1.192 (colored)

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

Revision 1.192 / (download) - annotate - [select for diffs], Tue May 17 11:55:08 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.191: +10 -2 lines
Diff to previous 1.191 (colored)

Flip on printing `?' at Unicode codepoints in -Tascii, -Tpdf, and -Tps.
The reasoning behind printing SOMETHING at a Unicode codepoint is
because the input is not "wrong" (we suppress printing of "wrong"
things).  It's just that ASCII can't handle it.

Revision 1.191 / (download) - annotate - [select for diffs], Sun May 15 22:29:50 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.190: +16 -53 lines
Diff to previous 1.190 (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.190 / (download) - annotate - [select for diffs], Sun May 15 15:47:46 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.189: +8 -3 lines
Diff to previous 1.189 (colored)

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

Revision 1.189 / (download) - annotate - [select for diffs], Sun May 15 14:50:01 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.188: +11 -11 lines
Diff to previous 1.188 (colored)

Use strcspn() in term_strlen().  Clarifies the code.

Revision 1.188 / (download) - annotate - [select for diffs], Sat May 14 18:15:20 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.187: +27 -23 lines
Diff to previous 1.187 (colored)

Make some values "int" that were "size_t".  These are primarily used for
indexing into arrays, so this removes lots of casts from size_t to int.

Revision 1.187 / (download) - annotate - [select for diffs], Sat May 14 17:54:42 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.186: +4 -4 lines
Diff to previous 1.186 (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.186 / (download) - annotate - [select for diffs], Sat Apr 30 22:24:31 2011 UTC (9 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_2
Changes since 1.185: +4 -5 lines
Diff to previous 1.185 (colored)

Make mchars_num2char() return a char like it says.

Revision 1.185 / (download) - annotate - [select for diffs], Fri Apr 29 22:18:12 2011 UTC (9 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.184: +7 -7 lines
Diff to previous 1.184 (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.184 / (download) - annotate - [select for diffs], Sat Apr 9 15:29:40 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.183: +62 -51 lines
Diff to previous 1.183 (colored)

Remove a2roffdeco() and mandoc_special() functions and replace them with
a public (mandoc.h) function mandoc_escape(), which merges the
functionality of both prior functions.

Reason: code duplication.  The a2roffdeco() and mandoc_special()
functions were pretty much the same thing and both quite complex.  This
allows one function to receive improvements in (e.g.) subexpression
handling and performance, instead of having to replicate functionality.

As such, the mandoc_escape() function already handles a superset of the
escapes handled in previous versions and has improvements in performance
(using strcspn(), for example) and reliable handling of subexpressions.

This code Works For Me, but may need work to catch any regressions.
Since the benefits are great (leaner code, simpler API), I'd rather have
it in-tree than floating as a patch.

Revision 1.183 / (download) - annotate - [select for diffs], Mon Apr 4 21:14:12 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_1
Changes since 1.182: +2 -4 lines
Diff to previous 1.182 (colored)

Remove an unused variable (caught in lint-check)

Revision 1.182 / (download) - annotate - [select for diffs], Tue Mar 22 14:05:45 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.181: +1 -8 lines
Diff to previous 1.181 (colored)

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

Revision 1.181 / (download) - annotate - [select for diffs], Tue Mar 22 10:13:01 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.180: +1 -2 lines
Diff to previous 1.180 (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.180 / (download) - annotate - [select for diffs], Thu Mar 17 09:16:38 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_10
Changes since 1.179: +6 -38 lines
Diff to previous 1.179 (colored)

Move mdoc_isdelim() into mandoc.h as mandoc_isdelim().  This allows the
removal of manual delimiter checks in html.c and term.c.  Finally, add
the escaped period as a closing delimiter, removing a TODO to this
effect.

Revision 1.179 / (download) - annotate - [select for diffs], Thu Mar 17 08:49:34 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.178: +3 -12 lines
Diff to previous 1.178 (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.178 / (download) - annotate - [select for diffs], Tue Mar 15 16:23:51 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.177: +2 -2 lines
Diff to previous 1.177 (colored)

Make lint shut up a little bit.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Jan 30 16:05:37 2011 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.176: +16 -2 lines
Diff to previous 1.176 (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.176 / (download) - annotate - [select for diffs], Tue Jan 4 13:14:26 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9
Changes since 1.175: +7 -1 lines
Diff to previous 1.175 (colored)

Fix spacing for tables to use term_len().  Also make term.c properly
recode ASCII_HYPHEN and ASCII_NBRSP before passing back for widths.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Dec 6 13:25:25 2010 UTC (9 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_8, VERSION_1_10_7
Changes since 1.174: +2 -2 lines
Diff to previous 1.174 (colored)

Track down a bug of empty `de XX' macros causing uncertain behaviour by
returning empty strings in roff_getstrn() instead of NULL.  This caused
maddeningly irregular segfaults in the pod2man preamble for `de IX'.
But only on DEC alpha.

Also integrate the kinda-probably-safe assertion relaxation in term.c,
field-tested by schwarze@.  This allows ALL [unpreprocessed] base and
xenocara manuals for all BSD systems to run without segfault.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Oct 2 15:15:55 2010 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.173: +15 -23 lines
Diff to previous 1.173 (colored)

style cleanup, no functional change:
* make the initial maxvis/mmax calculation easier to understand
* where real, non-indexing casts happen, make them explicit
* avoid a few lint warnings that can easily be fixed
* remove one needless LINTED comment
"I like this" kristaps@

Revision 1.173 / (download) - annotate - [select for diffs], Fri Oct 1 21:51:13 2010 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.172: +2 -2 lines
Diff to previous 1.172 (colored)

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

Revision 1.172 / (download) - annotate - [select for diffs], Thu Sep 23 20:26:00 2010 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_6
Changes since 1.171: +5 -3 lines
Diff to previous 1.171 (colored)

Count trailing escaped blanks correctly;
those ruined the alignment of columns.
Tested by jmc@, and kristaps@ agrees with the direction.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Sep 15 14:36:16 2010 UTC (9 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.170: +43 -7 lines
Diff to previous 1.170 (colored)

Allow string lengths to account for escapes.  Now all calls to calculate
column width in -Tascii, -Tpdf, and -Tps will account for "more real"
string lengths.

Example:

.Bl -tag -width \s[+123424]foo
.It bar
baz
.El

The size escape will be correctly tossed.

.Bl -tag -width \(aqbar
.It \(aqbar
baz
.El

The \(aq will be correctly handled.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Sep 4 20:18:53 2010 UTC (9 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored)

Churny commit to quiet lint.  No functional changes.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Aug 20 23:34:02 2010 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.168: +4 -11 lines
Diff to previous 1.168 (colored)

Centralize handling of literal tabs in term_flushln() in one place,
making the code simpler and easier to understand.
No functional change.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Aug 20 23:22:09 2010 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.167: +7 -1 lines
Diff to previous 1.167 (colored)

When a column contains trailing spaces, calculate the padding
to the start of the next column correctly.
Fixing a problem found by jmc@ in sysctl(3), reminded by kettenis@.

Revision 1.167 / (download) - annotate - [select for diffs], Fri Aug 20 01:02:07 2010 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (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.166 / (download) - annotate - [select for diffs], Mon Jul 26 22:26:05 2010 UTC (10 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5
Changes since 1.165: +3 -1 lines
Diff to previous 1.165 (colored)

Make `Sm' start no-spacing after the first output word.  Fix in both
-T[x]html and -T{pdf,ps,ascii}.  Reported by Jason McIntyre.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Jul 26 21:58:41 2010 UTC (10 years ago) by kristaps
Branch: MAIN
Changes since 1.164: +15 -20 lines
Diff to previous 1.164 (colored)

Clean up some tight spots in mandoc's default mode: pessimistically
pre-allocate the output buffer for words and in-line the buffera()
function, which was only called in one place anyway.

Revision 1.164 / (download) - annotate - [select for diffs], Sun Jul 25 22:56:47 2010 UTC (10 years ago) by kristaps
Branch: MAIN
Changes since 1.163: +4 -4 lines
Diff to previous 1.163 (colored)

Avoid running the "width" termp callback for each whitespace.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Jul 21 20:35:03 2010 UTC (10 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5_PREPDF
Changes since 1.162: +9 -4 lines
Diff to previous 1.162 (colored)

Accomodate for groff's crappy behaviour wherein an unrecognised
single-character escape (and ONLY this type of escape) will map back
into itself:

       "If a backslash is followed by a character that does not
	constitute a defined escape sequence the backslash is silently
        ignored and the  character maps to itself."

(From groff.7.)

Found by Jason McIntyre.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Jul 17 12:01:43 2010 UTC (10 years ago) by kristaps
Branch: MAIN
Changes since 1.161: +7 -8 lines
Diff to previous 1.161 (colored)

Avoid letter-by-letter encoding by using strcspn() in term_word().

Revision 1.161 / (download) - annotate - [select for diffs], Fri Jul 16 22:33:30 2010 UTC (10 years ago) by kristaps
Branch: MAIN
Changes since 1.160: +3 -3 lines
Diff to previous 1.160 (colored)

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

Revision 1.160 / (download) - annotate - [select for diffs], Wed Jul 7 15:04:54 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_4
Changes since 1.159: +1 -7 lines
Diff to previous 1.159 (colored)

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

Revision 1.159 / (download) - annotate - [select for diffs], Sun Jul 4 22:04:04 2010 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.158: +3 -2 lines
Diff to previous 1.158 (colored)

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

Revision 1.158 / (download) - annotate - [select for diffs], Sat Jul 3 16:02:12 2010 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.157: +7 -1 lines
Diff to previous 1.157 (colored)

Rudimentary implementation of user-defined strings;
no time for more refinement right now.
In particular, fixes terminfo(3) and mdoc.samples(7).
ok kristaps@, who will add the HTML frontend bits

Revision 1.157 / (download) - annotate - [select for diffs], Fri Jul 2 10:50:50 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.156: +2 -1 lines
Diff to previous 1.156 (colored)

Lint tweak.

Revision 1.156 / (download) - annotate - [select for diffs], Wed Jun 30 12:30:36 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.155: +7 -2 lines
Diff to previous 1.155 (colored)

Pushed normalisation of scaling units into term_hspan().

Revision 1.155 / (download) - annotate - [select for diffs], Wed Jun 30 12:27:55 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.154: +2 -35 lines
Diff to previous 1.154 (colored)

Move term_hspan() calculation into the output devices, where it belongs.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Jun 28 23:26:09 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_3
Changes since 1.153: +19 -16 lines
Diff to previous 1.153 (colored)

Clean-up of variable-width glyph support.  Adds no new code; only
restructured to make a bit more readable.  Also removed an unused entry
in the PS engine structure.

Revision 1.153 / (download) - annotate - [select for diffs], Mon Jun 28 22:46:21 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.152: +15 -12 lines
Diff to previous 1.152 (colored)

This enables variable glyph-width output.  The checkin will be followed
by a [functionless] clean-up in term_ps.c, but this makes the
appropriate changes to "enable" initial proportional-width functionality
in term.c and fixes some areas of term_ps.c that were causing errors.

Revision 1.152 / (download) - annotate - [select for diffs], Mon Jun 28 09:48:44 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.151: +5 -4 lines
Diff to previous 1.151 (colored)

Tiny commit clarifying flushln() documentation as to what refers to
visual screen output and what's an array index (getting closer to
variable-width fonting).

Revision 1.151 / (download) - annotate - [select for diffs], Sun Jun 27 01:26:20 2010 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.150: +8 -3 lines
Diff to previous 1.150 (colored)

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

Revision 1.150 / (download) - annotate - [select for diffs], Sat Jun 26 15:36:37 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.149: +1 -3 lines
Diff to previous 1.149 (colored)

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

Revision 1.149 / (download) - annotate - [select for diffs], Fri Jun 25 18:53:14 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.148: +23 -5 lines
Diff to previous 1.148 (colored)

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

Revision 1.148 / (download) - annotate - [select for diffs], Sat Jun 19 20:46:28 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_2
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored)

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

Revision 1.147 / (download) - annotate - [select for diffs], Fri Jun 11 07:23:04 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.146: +2 -5 lines
Diff to previous 1.146 (colored)

Teach -Tps to ignore backspace-encoding by using a one-char buffer and a
simple state machine.  This paves the way for decorated text.

Revision 1.146 / (download) - annotate - [select for diffs], Tue Jun 8 15:00:17 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.145: +13 -242 lines
Diff to previous 1.145 (colored)

Broke ascii_*() functions into term_ascii.c

Made low-level engine functions into function pointers.

Revision 1.145 / (download) - annotate - [select for diffs], Tue Jun 8 13:22:37 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.144: +29 -36 lines
Diff to previous 1.144 (colored)

No functionality changes: just restructuring.  Deprecated
terminal_free() in favour of ps_free() and ascii_free().  Moved ps_*()
functions into term_ps.c so that they don't clutter up term.c.

Revision 1.144 / (download) - annotate - [select for diffs], Tue Jun 8 09:20:08 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_1
Changes since 1.143: +2 -1 lines
Diff to previous 1.143 (colored)

Missing prototype for getsubopt() on NetBSD fixed.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Jun 7 21:03:02 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.142: +2 -2 lines
Diff to previous 1.142 (colored)

Lint fix.

Added J.C. Roberts' TODO note.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Jun 7 20:57:09 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.141: +236 -20 lines
Diff to previous 1.141 (colored)

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

Revision 1.141 / (download) - annotate - [select for diffs], Mon Jun 7 10:52:44 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.140: +25 -6 lines
Diff to previous 1.140 (colored)

Add -Owidth=width option to mandoc -Tascii.  Asked for by joerg@ about a
thousand years ago.  Note that this is normalised to >=60.

Revision 1.140 / (download) - annotate - [select for diffs], Tue May 25 12:37:20 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.139: +18 -7 lines
Diff to previous 1.139 (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.139 / (download) - annotate - [select for diffs], Mon May 24 21:51:20 2010 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.138: +12 -4 lines
Diff to previous 1.138 (colored)

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

Revision 1.138 / (download) - annotate - [select for diffs], Mon May 24 21:34:16 2010 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.137: +23 -3 lines
Diff to previous 1.137 (colored)

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

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

Revision 1.137 / (download) - annotate - [select for diffs], Mon May 17 22:11:42 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.136: +2 -1 lines
Diff to previous 1.136 (colored)

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

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

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

Allow inconsistent column syntax to only raise a warning.

Revision 1.136 / (download) - annotate - [select for diffs], Mon May 17 02:03:49 2010 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.135: +42 -45 lines
Diff to previous 1.135 (colored)

The function term_flushln() had effectively forked in OpenBSD.
This is the bsd.lv part of the main step to bring it back in sync.
At the same time, this prevents trailing whitespace in the output:
We delay writing blanks until we are sure printable characters follow.

This is achieved by
* remembering the end of the word instead of its length
* and not using vbl any longer for the control of line breaking
* such that vbl can sum up all kinds of white space
* before writing a word, printing all the blanks collected in vbl
* within the word, adding NBSP chars to vbl, then continuing with the word
* after the word, adding blanks to vbl, then starting the next word

"looks good" kristaps@

Revision 1.135 / (download) - annotate - [select for diffs], Sun May 16 01:35:37 2010 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored)

sync to OpenBSD:
introduce a #define to get rid of the magic number
describing the ASCII character used to represent non-breaking space;
ok kristaps

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

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

Revision 1.133 / (download) - annotate - [select for diffs], Wed May 12 16:01:01 2010 UTC (10 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_25
Changes since 1.132: +7 -2 lines
Diff to previous 1.132 (colored)

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

Revision 1.132 / (download) - annotate - [select for diffs], Fri May 7 04:50:44 2010 UTC (10 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_24
Changes since 1.131: +4 -39 lines
Diff to previous 1.131 (colored)

Backed out break-at-hyphen changes.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Apr 8 07:05:38 2010 UTC (10 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.130: +5 -3 lines
Diff to previous 1.130 (colored)

Removed pipe from front-end ("typographic") recognition as punctuation (noted by Ingo Schwarze).

Revision 1.130 / (download) - annotate - [select for diffs], Sat Apr 3 12:46:35 2010 UTC (10 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_23
Changes since 1.129: +53 -22 lines
Diff to previous 1.129 (colored)

Removed erroneous `{' and `}' as punctuation (see mdoc.samples "General Syntax" for why this mistake was made).  Noted by Ingo Schwarze.
Lines of text now break at a hyphen, unless the hyphen is the first or second subsequent in a word.  Inspired by a Ingo Schwarze's patch.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Mar 23 12:42:22 2010 UTC (10 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: 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.128: +14 -16 lines
Diff to previous 1.128 (colored)

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

Revision 1.128 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:30 2010 UTC (10 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_16, VERSION_1_9_15-pre2, VERSION_1_9_15
Changes since 1.127: +5 -1 lines
Diff to previous 1.127 (colored)

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

Revision 1.127 / (download) - annotate - [select for diffs], Thu Nov 12 08:21:06 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre1, VERSION_1_9_14
Changes since 1.126: +4 -1 lines
Diff to previous 1.126 (colored)

Fixed \c support for all input and output modes (documented in mandoc_char.7).

Revision 1.126 / (download) - annotate - [select for diffs], Thu Nov 12 05:58:30 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.125: +5 -3 lines
Diff to previous 1.125 (colored)

FreeBSD sys/types inclusion fixed.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Nov 12 05:50:12 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.124: +147 -87 lines
Diff to previous 1.124 (colored)

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

Revision 1.124 / (download) - annotate - [select for diffs], Sat Nov 7 14:14:16 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.123: +50 -202 lines
Diff to previous 1.123 (colored)

Hooked up -Tascii to a2roffdeco backend.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Nov 6 10:31:32 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.122: +90 -12 lines
Diff to previous 1.122 (colored)

-Tascii now correctly ignores \s clauses.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Nov 5 08:40:16 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.121: +22 -8 lines
Diff to previous 1.121 (colored)

Correct support for `\fX' font modes in -Tascii.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Nov 5 07:21:02 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.120: +7 -2 lines
Diff to previous 1.120 (colored)

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

Revision 1.120 / (download) - annotate - [select for diffs], Sat Oct 31 06:10:58 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_13, VERSION_1_9_12
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

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

Revision 1.119 / (download) - annotate - [select for diffs], Fri Oct 30 18:53:09 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.118: +5 -4 lines
Diff to previous 1.118 (colored)

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

Revision 1.118 / (download) - annotate - [select for diffs], Fri Oct 30 18:50:11 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.117: +5 -3 lines
Diff to previous 1.117 (colored)

Lint fixes.
Made realloc puke with fprintf.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Oct 30 18:43:24 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.116: +6 -3 lines
Diff to previous 1.116 (colored)

Continued safe handling of allocations.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Oct 28 06:54:12 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.115: +2 -3 lines
Diff to previous 1.115 (colored)

Removed superfluous memset (thanks Joerg Sonnenberger).

Revision 1.115 / (download) - annotate - [select for diffs], Tue Oct 27 08:26:12 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.114: +9 -3 lines
Diff to previous 1.114 (colored)

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

Revision 1.114 / (download) - annotate - [select for diffs], Tue Oct 27 08:05:39 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.113: +14 -14 lines
Diff to previous 1.113 (colored)

Merged Ingo's comments on term_flushln() variable names.
Fixed assertion (this needs more consideration) when an overstep line is exactly as long as the rmargin.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Oct 26 17:05:44 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.112: +2 -1 lines
Diff to previous 1.112 (colored)

Added time.h to various files for FreeBSD compilation (thanks Ulrich Sporlein).

Revision 1.112 / (download) - annotate - [select for diffs], Mon Oct 26 09:06:03 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_11, VERSION_1_9_10
Changes since 1.111: +3 -2 lines
Diff to previous 1.111 (colored)

Lint fix.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Oct 26 07:18:23 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored)

Fixed overstep patch.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Oct 24 06:19:34 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.109: +5 -8 lines
Diff to previous 1.109 (colored)

Removed need for superfluous `os' value in overstep calculation (thanks Ingo Schwarze).

Revision 1.109 / (download) - annotate - [select for diffs], Thu Oct 22 18:19:36 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.108: +5 -5 lines
Diff to previous 1.108 (colored)

Fixed order of printing backspace-encoding for terms that are both bold and underlined (noted by Joerg Sonnenberger).

Revision 1.108 / (download) - annotate - [select for diffs], Mon Oct 19 15:18:30 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9
Changes since 1.107: +8 -5 lines
Diff to previous 1.107 (colored)

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

Revision 1.107 / (download) - annotate - [select for diffs], Sun Oct 18 19:03:37 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.106: +24 -32 lines
Diff to previous 1.106 (colored)

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

Revision 1.106 / (download) - annotate - [select for diffs], Sun Oct 18 13:34:17 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.105: +84 -1 lines
Diff to previous 1.105 (colored)

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

Revision 1.105 / (download) - annotate - [select for diffs], Tue Oct 13 10:57:25 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.104: +2 -32 lines
Diff to previous 1.104 (colored)

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

Revision 1.104 / (download) - annotate - [select for diffs], Sat Oct 10 11:05:23 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_8
Changes since 1.103: +8 -2 lines
Diff to previous 1.103 (colored)

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

Revision 1.103 / (download) - annotate - [select for diffs], Wed Sep 23 11:02:21 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_7, VERSION_1_9_6
Changes since 1.102: +4 -1 lines
Diff to previous 1.102 (colored)

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

Revision 1.102 / (download) - annotate - [select for diffs], Sun Sep 20 13:43:31 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_5
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

Fixed memory leak on close.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Sep 17 07:41:28 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.100: +7 -6 lines
Diff to previous 1.100 (colored)

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

Revision 1.100 / (download) - annotate - [select for diffs], Wed Sep 16 15:08:31 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.99: +41 -65 lines
Diff to previous 1.99 (colored)

Put closedelim and opendelim right in term_word() (unnecessary extra function).

Revision 1.99 / (download) - annotate - [select for diffs], Wed Sep 16 09:41:24 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.98: +7 -7 lines
Diff to previous 1.98 (colored)

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

Revision 1.98 / (download) - annotate - [select for diffs], Tue Sep 15 08:16:20 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.97: +9 -9 lines
Diff to previous 1.97 (colored)

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

Revision 1.97 / (download) - annotate - [select for diffs], Tue Jul 28 10:15:12 2009 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_2, VERSION_1_9_1, VERSION_1_9_0, VERSION_1_8_5
Changes since 1.96: +9 -4 lines
Diff to previous 1.96 (colored)

Fix in newline.
Correct printing of N-char predefined/special strings.

Revision 1.96 / (download) - annotate - [select for diffs], Mon Jul 27 13:10:08 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.95: +17 -3 lines
Diff to previous 1.95 (colored)

Re-ordered ascii.in looking for dupes.
Added `vim -q' tip to manuals.7 (thanks uqs@sporlein.net).
ifdef'd production of missing specials/predefines.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jul 27 12:35:54 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.94: +33 -48 lines
Diff to previous 1.94 (colored)

Clarified special chars/predefined chars in mandoc_char.7.
Cleaned up escape section in man.7, mdoc.7.
Cleaned up function names in term.c.

Revision 1.94 / (download) - annotate - [select for diffs], Mon Jul 27 12:02:49 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.93: +25 -6 lines
Diff to previous 1.93 (colored)

Correct handling of \*(xx, \*[xxx], \*x versus \x, \(xx, \([xxx]: predefined strings and escape characters, respectively.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Jul 24 11:54:25 2009 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_4
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Text tokens with leading whitespace (like indented blocks in `Bd -literal') are printed correctly.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Jul 23 08:35:22 2009 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_3
Changes since 1.91: +24 -13 lines
Diff to previous 1.91 (colored)

Lintified term_flushln() (type mismatches).

Revision 1.91 / (download) - annotate - [select for diffs], Tue Jul 21 13:34:13 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.90: +38 -35 lines
Diff to previous 1.90 (colored)

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

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jul 19 21:26:27 2009 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_2
Changes since 1.89: +5 -2 lines
Diff to previous 1.89 (colored)

Fixed and cleaned up "phrase" handling (`Bl -column' columns).
Found strange newline bug in -diag handling (and others?).

Revision 1.89 / (download) - annotate - [select for diffs], Thu Jul 16 13:17:51 2009 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_1
Changes since 1.88: +5 -5 lines
Diff to previous 1.88 (colored)

Subtle fixes correcting vis count with erroneously-decorated whitespace.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Jul 16 12:34:06 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.87: +4 -3 lines
Diff to previous 1.87 (colored)

Fix in nospace following close-delimiter.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Jul 15 15:53:57 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.86: +1 -2 lines
Diff to previous 1.86 (colored)

Removed assertion (disregarded blank literal lines).

Revision 1.86 / (download) - annotate - [select for diffs], Wed Jul 15 15:37:48 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.85: +63 -89 lines
Diff to previous 1.85 (colored)

Removed term.c break-up of tokens (happens in libmdoc).
Removed costly, redundant calculations of string length (in-line printing).

Revision 1.85 / (download) - annotate - [select for diffs], Tue Jul 14 15:49:44 2009 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_0
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

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

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jul 14 15:16:41 2009 UTC (11 years ago) by kristaps
Branch: MAIN
Changes since 1.83: +19 -6 lines
Diff to previous 1.83 (colored)

Support for TERMP_HANG in flushln(): -hang lists.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Jun 22 13:13:10 2009 UTC (11 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_24, VERSION_1_7_23, VERSION_1_7_22, VERSION_1_7_21, VERSION_1_7_20
Changes since 1.82: +3 -2 lines
Diff to previous 1.82 (colored)

Lint fixes.
Version up.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Jun 22 12:38:07 2009 UTC (11 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.81: +4 -1 lines
Diff to previous 1.81 (colored)

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

Revision 1.81 / (download) - annotate - [select for diffs], Mon Jun 22 12:04:05 2009 UTC (11 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.80: +25 -23 lines
Diff to previous 1.80 (colored)

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

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jun 22 10:40:04 2009 UTC (11 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Reverted max column width 80 -> 78 (schwarze@openbsd.org).

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jun 17 18:42:42 2009 UTC (11 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_19
Changes since 1.78: +27 -53 lines
Diff to previous 1.78 (colored)

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

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jun 11 10:34:32 2009 UTC (11 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_17, VERSION_1_7_16, VERSION_1_7_15, VERSION_1_7_14
Changes since 1.77: +5 -6 lines
Diff to previous 1.77 (colored)

Clean up validation of field widths.
Pushed field-width warn/error into warn/error routine.
Removed superfluous space at output eoln.
Fixed overzealous line break in lists.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Jun 11 07:46:41 2009 UTC (11 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.76: +5 -6 lines
Diff to previous 1.76 (colored)

Fix space-before-newline (inspired by schwarze@openbsd.org).

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

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

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jun 10 20:18:44 2009 UTC (11 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Fixed license email address.

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

Using proper license template (const).

Revision 1.73 / (download) - annotate - [select for diffs], Fri Apr 3 12:27:18 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_12, VERSION_1_7_10, OPENBSD_CHECKIN
Changes since 1.72: +1 -3 lines
Diff to previous 1.72 (colored)

*** empty log message ***

Revision 1.72 / (download) - annotate - [select for diffs], Fri Apr 3 11:08:39 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.71: +16 -8 lines
Diff to previous 1.71 (colored)

Proper resetting of memory.
Array boundary fixed (-W).

Revision 1.71 / (download) - annotate - [select for diffs], Tue Mar 31 13:50:19 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.70: +441 -1772 lines
Diff to previous 1.70 (colored)

General clean-ups.

Revision 1.70, Thu Mar 26 14:38:11 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.69: +1 -1 lines
FILE REMOVED

Initial front-end formatting for -man pages.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Mar 23 09:42:43 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.68: +5 -3 lines
Diff to previous 1.68 (colored)

More manual documentation fixed/improved.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Mar 22 21:19:34 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.67: +38 -21 lines
Diff to previous 1.67 (colored)

Fixed Bd -compact.
Fixed vspace before Bd and Bl.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Mar 21 13:47:02 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Freed more macros from zero-length restrictions.
Fixed `Fn' spacing.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Mar 21 13:26:30 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

Handling -width="" in lists.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Mar 21 13:09:29 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.64: +35 -14 lines
Diff to previous 1.64 (colored)

`Em' accepts empty tokens.
Punctuation fully fixed (per-reserved-word).
Sm enabled.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 21 09:42:07 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_6_5
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

Added %Q macro.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 20 16:43:28 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

Fixed literal-formatting error with `Dl'.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Mar 20 15:14:01 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_6_2
Changes since 1.61: +127 -114 lines
Diff to previous 1.61 (colored)

Support for `Bd' of all types (see mdoc.7 for newline/tab rules).
Renamed term.c and terminal.c functions to be term_.
Some bugfixes to lists.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Mar 16 23:37:28 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_5_3
Changes since 1.60: +14 -2 lines
Diff to previous 1.60 (colored)

Changed e-mail address to @openbsd.
Cleaned up manual-page documentation.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Mar 16 22:19:19 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.59: +3 -1 lines
Diff to previous 1.59 (colored)

Fixed mdoc_phrase escape handling.
Added MDOC_IGNDELIM (Pf, soon Li, etc.).
macro_constant_delimited ignargs -> argv.c parsing.
Renamed macro functions to correspond to ontologies.
`Fo' and `St' made callable (compat documented).
strings.sh deprecated (directly using CPP).
Abstracted ASCII translation into ascii.{c,in}.
ASCII table uses a self-reordering chained hashtable.
Removed old regressions.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Mar 14 12:35:02 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_5_1
Changes since 1.58: +11 -11 lines
Diff to previous 1.58 (colored)

Added colour styles (not being used) to struct termp.
Added nroff style-escape encoding.
Removed ANSI schema string tables (there's only ANSI and nroff/backspace).
Pushed styling directly into pword (simpler).

Revision 1.58 / (download) - annotate - [select for diffs], Fri Mar 13 07:46:10 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.57: +6 -2 lines
Diff to previous 1.57 (colored)

Added canonical mdoc.7.
Added \q macro.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Mar 12 16:30:50 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.56: +3 -1 lines
Diff to previous 1.56 (colored)

Added -nested (doesn't do anything).
Added .%C.
.Cd is now callable.
Added .Rv -std.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Mar 12 15:55:11 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.55: +3 -1 lines
Diff to previous 1.55 (colored)

NetBSD '.[[:whitespace:]]*' properly handled.
mdoc.3 indicates compatibilities and bugs.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Mar 12 06:32:17 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Removed segfault with empty word.
Initial "full" -column support.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Mar 12 02:57:36 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.53: +129 -77 lines
Diff to previous 1.53 (colored)

Brq/Bro/Brc fixed up and pretty.
Cleaned up Aq/Sq use of escapes in term.c.
Added initial -column support.
Fixed argv returning ARGV_WORD and tokenising anyway.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Mar 11 00:39:58 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.52: +35 -3 lines
Diff to previous 1.52 (colored)

Expanded perfect htab to use 27 * 26 * 3 space.
Added Brq, Bro and Brc macros.
Added lbrace and rbrace to special characters.
Fixed spacing in braces.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Mar 10 11:16:43 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.51: +5 -37 lines
Diff to previous 1.51 (colored)

Added regular-form sanity check in mdocterm.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Mar 9 14:19:59 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.50: +51 -3 lines
Diff to previous 1.50 (colored)

Added `Mt' and `Lk' macros (NetBSD).

Revision 1.50 / (download) - annotate - [select for diffs], Mon Mar 9 13:17:49 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_4_6, VERSION_1_4_5
Changes since 1.49: +3 -1 lines
Diff to previous 1.49 (colored)

Easier integration into FreeBSD (sys/types.h, time.h, etc.).

Revision 1.49 / (download) - annotate - [select for diffs], Sun Mar 8 20:57:35 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_4_4
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

Added `Lp' macro.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Mar 8 20:50:12 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.47: +15 -1 lines
Diff to previous 1.47 (colored)

Added .Ap.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Mar 8 19:38:08 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_4_2
Changes since 1.46: +24 -3 lines
Diff to previous 1.46 (colored)

Front-end handling of `Lb'.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Mar 8 14:01:46 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Bumped minor-number.
All sources converted to new schema.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Mar 8 13:57:07 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Segmentation-fault fix in mdocterm.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Mar 8 13:52:29 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.43: +94 -88 lines
Diff to previous 1.43 (colored)

mdocterm now using new API.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Mar 6 14:13:47 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.42: +26 -12 lines
Diff to previous 1.42 (colored)

Strings abstracted into dynamically-created C files.
Added -V option.
Deprecated README files.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Mar 5 13:12:12 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.41: +2 -6 lines
Diff to previous 1.41 (colored)

Cleaned up ctype functions (netbsd).
Fixed .Ex/.Rv -std usage.
Made Ar provide default value.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Mar 4 14:41:40 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.40: +7 -1 lines
Diff to previous 1.40 (colored)

-tag, if followed by empty body, doesn't newline.
Versioning up.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Mar 4 14:13:05 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

Fixed some character-escapes.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Mar 4 13:57:35 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.38: +174 -134 lines
Diff to previous 1.38 (colored)

Considerably cleaned up list handling.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Mar 3 22:28:21 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.37: +3 -2 lines
Diff to previous 1.37 (colored)

-diag fixed (allows quoted parameters)
Versioned up.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Mar 3 22:17:19 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.36: +69 -11 lines
Diff to previous 1.36 (colored)

-inset and -diag lists now supported.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Mar 2 17:29:16 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored)

Noted lacking areas in mdocterm.1.
Put styles into symtab (for real this time).

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 2 17:14:46 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.34: +43 -15 lines
Diff to previous 1.34 (colored)

Added new old escape sequence \*[nn].
Initial correct .Bd support (still only text in literal displays).
Symbols put into tables (character-encoding).

Revision 1.34 / (download) - annotate - [select for diffs], Mon Mar 2 12:09:32 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.33: +7 -5 lines
Diff to previous 1.33 (colored)

Support for maxrmargin-breaking with TERMP_NOBREAK.
Tabs auto-converted to spaces.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Mar 1 23:27:14 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_3_15
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

Cd breaks line properly.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Mar 1 23:14:15 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.31: +3 -6 lines
Diff to previous 1.31 (colored)

Backed-out warning about Ds.
Backed-out assertion about Bd subtypes.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Mar 1 13:06:49 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_3_13
Changes since 1.30: +37 -42 lines
Diff to previous 1.30 (colored)

Fixed TERMP_NOBREAK and line overruns.
Fixed TERMP_SETFLAGS and current-flag omission.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Feb 28 21:31:13 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.29: +34 -9 lines
Diff to previous 1.29 (colored)

Many more changes and fixes (`In', `Fd', etc.).

Revision 1.29 / (download) - annotate - [select for diffs], Sat Feb 28 20:13:06 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.28: +26 -18 lines
Diff to previous 1.28 (colored)

More fixes (hard-escapes, etc.).

Revision 1.28 / (download) - annotate - [select for diffs], Sat Feb 28 19:15:28 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.27: +55 -9 lines
Diff to previous 1.27 (colored)

Initial Rs/Re support.
Fixed default Ds width.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Feb 27 09:39:40 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_3_9, VERSION_1_3_8, VERSION_1_3_6, VERSION_1_3_11, VERSION_1_3_10
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored)

Lintified sources.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Feb 27 08:20:15 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.25: +4 -5 lines
Diff to previous 1.25 (colored)

More character-encoding.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 26 16:08:11 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.24: +22 -2 lines
Diff to previous 1.24 (colored)

Support for macro widths (/usr/share/tmac/mdoc/doc-common).

Revision 1.24 / (download) - annotate - [select for diffs], Thu Feb 26 14:56:27 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.23: +9 -22 lines
Diff to previous 1.23 (colored)

Lists (scoped elements) now put delims in-scope.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Feb 25 23:18:50 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.22: +135 -83 lines
Diff to previous 1.22 (colored)

More list work.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 25 17:02:47 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.21: +24 -2 lines
Diff to previous 1.21 (colored)

*** empty log message ***

Revision 1.21 / (download) - annotate - [select for diffs], Wed Feb 25 15:12:26 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.20: +72 -42 lines
Diff to previous 1.20 (colored)

Added [almost] all list types.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Feb 25 13:30:53 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.19: +61 -93 lines
Diff to previous 1.19 (colored)

Support for nested lists added.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Feb 25 12:27:37 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_3_5
Changes since 1.18: +26 -36 lines
Diff to previous 1.18 (colored)

Some offsets built into termpair.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Feb 25 12:09:20 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.17: +65 -228 lines
Diff to previous 1.17 (colored)

Added "termpair" for symmetric flag-setting.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 25 11:37:05 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.16: +131 -7 lines
Diff to previous 1.16 (colored)

All "low-hanging" macros implemented in term.c.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Feb 24 16:16:45 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.15: +88 -13 lines
Diff to previous 1.15 (colored)

Raft of mdocterm callbacks in place.
Fixed Fo/Fc handling in validate/mdocterm.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Feb 24 15:01:15 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.14: +74 -35 lines
Diff to previous 1.14 (colored)

More macros filled in.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Feb 24 14:52:55 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.13: +163 -11 lines
Diff to previous 1.13 (colored)

Added several more mdocterm outputs.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Feb 24 13:46:54 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Character-encoding checked for all text (arguments/values).

Revision 1.12 / (download) - annotate - [select for diffs], Mon Feb 23 15:19:47 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.11: +77 -37 lines
Diff to previous 1.11 (colored)

Adding revamped webpage.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Feb 23 09:46:59 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.10: +53 -5 lines
Diff to previous 1.10 (colored)

More documentation in place.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Feb 23 09:33:34 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.9: +938 -378 lines
Diff to previous 1.9 (colored)

Considerable mdoc.3 documentation.
Added a few more escapes and macros.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Feb 22 19:23:48 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.8: +6 -3 lines
Diff to previous 1.8 (colored)

Fixed `.Pf' handling.
System now supports all mdocml manual pages.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Feb 22 15:50:45 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +23 -5 lines
Diff to previous 1.7 (colored)

Initial block-display support.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Feb 22 14:31:08 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +14 -1 lines
Diff to previous 1.6 (colored)

Cleaned up validation source a bit.
Fixed `Nm' and `Nd' detection.
Added a few more terminal outputs.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 21 21:00:06 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +61 -18 lines
Diff to previous 1.5 (colored)

Split mdocml -> mdocterm, mdoctree (new manuals, etc.).
Escape-recognition term.c.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 21 19:05:28 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +27 -573 lines
Diff to previous 1.4 (colored)

Split down term.c into term.h, termact.c.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 21 15:34:46 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +39 -7 lines
Diff to previous 1.3 (colored)

A few more macros in place.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 21 14:56:58 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +283 -88 lines
Diff to previous 1.2 (colored)

Initial list support (not nested, yet).

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 20 23:35:36 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.1: +641 -216 lines
Diff to previous 1.1 (colored)

More flesh in terminal-encoder.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 20 11:04:23 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN

Re-added tree.c (for now).
Added initial terminal-output filter (term.c).

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