CVS log for mandoc/roff_term.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Fri Apr 28 19:11:04 2023 UTC (11 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (unified) to selected 1.21 (unified)

spelling fixes from Paul Tagliamonte via tech@ and jmc@

Revision 1.24 / (download) - annotate - [select for diffs], Sun Sep 19 18:07:09 2021 UTC (2 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (unified) to selected 1.21 (unified)

clarify the meaning of a complicated mixed signed/unsigned expression;
Thomas Klausner <wiz at NetBSD> reported a compiler warning

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 10 12:55:04 2021 UTC (2 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +3 -1 lines
Diff to previous 1.22 (unified) to selected 1.21 (unified)

Support two-character font names (BI, CW, CR, CB, CI)
in the tbl(7) layout font modifier.

Get rid of the TBL_CELL_BOLD and TBL_CELL_ITALIC flags and use
the usual ESCAPE_FONT* enum mandoc_esc members from mandoc.h instead,
which simplifies and unifies some code.

While here, also support CB and CI in roff(7) \f escape sequences
and in roff(7) .ft requests for all output modes.  Using those is
certainly not recommended because portability is limited even with
groff, but supporting them makes some existing third-party manual
pages look better, in particular in HTML output mode.

Bug-compatible with groff as far as i'm aware, except that i consider
font names starting with the '\n' (ASCII 0x0a line feed) character
so insane that i decided to not support them.

Missing feature reported by nabijaczleweli dot xyz in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992002.
I used none of the code from the initial patch submitted by
nabijaczleweli, but some of their ideas.
Final patch tested by them, too.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Sep 3 20:43:15 2020 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +13 -5 lines
Diff to previous 1.21 (unified)

Fix two issues with .po (page offset) formatting:
1. Truncate excessive offsets to a width reasonable in the context
of manual pages instead of printing excessively long lines
and sometimes causing assertion failures;
found in an afl run performed by Jan Schreiber <jes at posteo dot de>.
2. Remember both the requested and the applied page offset; otherwise,
subtracting an excessive width, then adding it again, would end up
with an incorrectly large offset.
While here, simplify the code by reverting the previous offset up front,
and also add some comments to make the general ideas easier to understand.

Revision 1.21 / (download) - annotate - [selected], Thu Sep 3 17:42:15 2020 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +22 -12 lines
Diff to previous 1.20 (unified)

If .ti had an excessive argument, using it was attempted, in some
cases resulting in an assertion failure.  Instead, truncate the
temporary indent to a width reasonable in a manual page.

I found the issue in an afl run
that was performed by Jan Schreiber <jes at posteo dot de>.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 22 19:20:40 2020 UTC (3 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (unified) to selected 1.21 (unified)

Because mandoc_aux.h and mandoc.h use __attribute__, all files that
include mandoc_aux.h or mandoc.h need to include config.h, too.
It is suspected that for example IRIX needs this, or it is likely
to throw errors in these files because the system compiler doesn't
understand __attribute__.
Issue reported by Kazuo Kuroi <kazuo at irixnet dot org>.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jan 4 03:24:33 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.18: +4 -15 lines
Diff to previous 1.18 (unified) to selected 1.21 (unified)

Simplify the roff(7) .ce and .rj terminal formatter by using the
new TERMP_CENTER and TERMP_RIGHT flags.  No functional change.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Dec 31 07:08:12 2018 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +5 -1 lines
Diff to previous 1.17 (unified) to selected 1.21 (unified)

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

Revision 1.17 / (download) - annotate - [select for diffs], Sun Dec 16 00:17:02 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +12 -14 lines
Diff to previous 1.16 (unified) to selected 1.21 (unified)

Yet another round of improvements to manual font selection.

Unify handling of \f and .ft.
Support \f4 (bold+italic).
Support ".ft BI" and ".ft CW" for terminal output.
Support the .ft request in HTML output.
Reject the bogus fonts \f(C1, \f(C2, \f(C3, and \f(CP.
In regress.pl, only strip leading whitespace in math mode.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:26 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (unified) to selected 1.21 (unified)

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

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

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

Revision 1.15 / (download) - annotate - [select for diffs], Fri Aug 10 20:40:45 2018 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +8 -3 lines
Diff to previous 1.14 (unified) to selected 1.21 (unified)

The groff man-ext macros define fonts CB, CI, and CR,
and some groff manual pages actually use them in .ft requests.
It's easy enough to handle these .ft requests in mandoc, too.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 24 14:38:33 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (unified) to selected 1.21 (unified)

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

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

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

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 14 22:51:25 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +25 -1 lines
Diff to previous 1.12 (unified) to selected 1.21 (unified)

Naive implementation of the roff(7) .po (page offset) request.

This clearly works when .po is called on the top level, but might
not be sophisticated enough if people call .po inside indentation-changing
contexts, but i haven't seen that in manual pages (yet :).

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 14 17:51:15 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (unified) to selected 1.21 (unified)

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

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 14 13:00:31 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +17 -15 lines
Diff to previous 1.10 (unified) to selected 1.21 (unified)

implement roff(7) .rj (right justify) request

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jun 8 12:54:58 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (unified) to selected 1.21 (unified)

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.9 / (download) - annotate - [select for diffs], Wed Jun 7 17:38:26 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +15 -15 lines
Diff to previous 1.8 (unified) to selected 1.21 (unified)

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.8 / (download) - annotate - [select for diffs], Tue Jun 6 15:01:04 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +40 -1 lines
Diff to previous 1.7 (unified) to selected 1.21 (unified)

Minimal implementation of the roff(7) .ce request (center a number
of input lines without filling).
Contrary to groff, high-level macros abort .ce mode for now.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jun 4 22:44:15 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +19 -2 lines
Diff to previous 1.6 (unified) to selected 1.21 (unified)

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.6 / (download) - annotate - [select for diffs], Mon May 8 15:34:54 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +42 -0 lines
Diff to previous 1.5 (unified) to selected 1.21 (unified)

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

Revision 1.5 / (download) - annotate - [select for diffs], Sun May 7 17:31:45 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +11 -1 lines
Diff to previous 1.4 (unified) to selected 1.21 (unified)

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.4 / (download) - annotate - [select for diffs], Fri May 5 15:17:32 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +25 -1 lines
Diff to previous 1.3 (unified) to selected 1.21 (unified)

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

Revision 1.3 / (download) - annotate - [select for diffs], Fri May 5 13:17:55 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +10 -1 lines
Diff to previous 1.2 (unified) to selected 1.21 (unified)

move .ll to the roff modules

Revision 1.2 / (download) - annotate - [select for diffs], Fri May 5 02:06:19 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +29 -1 lines
Diff to previous 1.1 (unified) to selected 1.21 (unified)

Move handling of the roff(7) .ft request from the man(7)
modules to the new roff(7) modules.  As a side effect,
mdoc(7) now handles .ft, too.  Of course, do not use that.

Revision 1.1 / (download) - annotate - [select for diffs], Thu May 4 22:16:09 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Diff to selected 1.21 (unified)

Start roff formatter modules for HTML and termininal output,
used by both the mdoc and man formatters, with the ultimate
goal of reducing code duplication between the two macro formatters.
Made possible by the parser unification.
Add the first formatting function (for the .br request).

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