CVS log for mandoc/roff_validate.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 22 19:20:40 2020 UTC (6 weeks, 6 days ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

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], Thu Feb 27 01:43:52 2020 UTC (5 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

Introduce the concept of nodes that are semantically transparent:
they are skipped when looking for previous or following high-level
macros.  Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm
and .Tg, and man(7) .DT and .PD.  Use this concept for a variety
of improved decisions in various validators and formatters.

While here,
* remove a few const qualifiers on struct arguments that caused trouble;
* get rid of some more Yoda notation in the vicinity;
* and apply some other stylistic improvements in the vicinity.

I found this class of issues while considering .Tg patches from kn@.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Dec 31 09:02:37 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

oops, one change ROFF_NOFILL -> NODE_NOFILL was forgotten in rev. 1.17

Revision 1.17 / (download) - annotate - [select for diffs], Mon Dec 31 08:38:21 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Use the new flag NODE_NOFILL in the validators, which is sometimes
simpler and always more robust.  In particular, move the nesting
warnings for .EX and .EE from man_state(), where they were misplaced,
to the man(7) validator.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 31 07:08:12 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.15: +19 -10 lines
Diff to previous 1.15 (colored)

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.15 / (download) - annotate - [select for diffs], Sun Dec 16 00:17:02 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.14: +3 -25 lines
Diff to previous 1.14 (colored)

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.14 / (download) - annotate - [select for diffs], Fri Dec 14 05:18:03 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.13: +8 -9 lines
Diff to previous 1.13 (colored)

Almost mechanical diff to remove the "struct mparse *" argument
from mandoc_msg(), where it is no longer used.
While here, rename mandoc_vmsg() to mandoc_msg() and retire the
old version:  There is really no point in having another function
merely to save "%s" in a few places.
Minus 140 lines of code.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:26 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

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

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

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

Revision 1.12 / (download) - annotate - [select for diffs], Tue Dec 4 03:28:58 2018 UTC (20 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +9 -1 lines
Diff to previous 1.11 (colored)

During validation, drop .br before a text line starting with a
blank, rather than teaching each formatter individually to ignore
the .br in such situations.  That's simpler and also results in
better diagnostics.

Mark Harris <mark dot hsj at gmail dot com> reported
that -T html got confused in particular.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Dec 4 02:53:51 2018 UTC (20 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +59 -3 lines
Diff to previous 1.10 (colored)

Clean up the validation of .Pp, .PP, .sp, and .br.  Make sure all
combinations are handled, and are handled in a systematic manner.
This resolves some erratic duplicate handling, handles a number of
missing cases, and improves diagnostics in various respects.

Move validation of .br and .sp to the roff validation module
rather than doing that twice in the mdoc and man validation modules.
Move the node relinking function to the roff library where it belongs.

In validation functions, only look at the node itself, at previous
nodes, and at descendants, not at following nodes or ancestors,
such that only nodes are inspected which are already validated.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Aug 10 20:40:45 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored)

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.9 / (download) - annotate - [select for diffs], Wed Jun 14 22:51:25 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

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.8 / (download) - annotate - [select for diffs], Wed Jun 14 13:00:31 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

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

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jun 6 15:01:04 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

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

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

Revision 1.4 / (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.3: +1 -0 lines
Diff to previous 1.3 (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.3 / (download) - annotate - [select for diffs], Fri May 5 15:17:32 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +1 -0 lines
Diff to previous 1.2 (colored)

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

Revision 1.2 / (download) - annotate - [select for diffs], Fri May 5 13:17:55 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

move .ll to the roff modules

Revision 1.1 / (download) - annotate - [select for diffs], Fri May 5 02:06:19 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN

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.

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