CVS log for mandoc/roff_int.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17 / (download) - annotate - [select for diffs], Fri Apr 24 12:02:34 2020 UTC (5 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored) to selected 1.11 (colored)

provide a STYLE message when mandoc knows the file name and the extension
disagrees with the section number given in the .Dt or .TH macro;
feature suggested and patch tested by jmc@

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jan 5 00:36:50 2019 UTC (20 months, 3 weeks ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored) to selected 1.11 (colored)

Some high-level block macros have an effect similar to temporarily
suspending no-fill mode during their head.  Model this with an
additional roff parser state flag ROFF_NONOFILL.  That is much
simpler than it would be to save and restore the ROFF_NOFILL flag
itself, in particular since the latter can be switched (with lasting
effect) by the .nf and .fi requests even while its effect is
temporarily suspended.

This commit does not change formatting yet, but prepares for future
formatting simplifications and improvements.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Dec 31 07:46:07 2018 UTC (21 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored) to selected 1.11 (colored)

Cleanup, no functional change:
Use the new parser flag ROFF_NOFILL in the mdoc(7) parser, too,
instead of the old MDOC_LITERAL, which was an alias for the
former MAN_LITERAL.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Dec 31 07:08:12 2018 UTC (21 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) to selected 1.11 (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.13 / (download) - annotate - [select for diffs], Mon Dec 31 04:55:47 2018 UTC (21 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored) to selected 1.11 (colored)

Cleanup, minus 15 LOC, no functional change:
Simplify the way the man(7) and mdoc(7) validators are called.
Reset the parser state with a common function before calling them.
There is no need to again reset the parser state afterwards,
the parsers are no longer used after validation.
This allows getting rid of man_node_validate() and mdoc_node_validate()
as separate functions.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:56 2018 UTC (21 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +47 -1 lines
Diff to previous 1.11 (colored)

Cleanup, no functional change:

The struct roff_man used to be a bad mixture of internal parser
state and public parsing results.  Move the public results to the
parsing result struct roff_meta, which is already public.  Move the
rest of struct roff_man to the parser-internal header roff_int.h.

Since the validators need access to the parser state, call them
from the top level parser during mparse_result() rather than from
the main programs, also reducing code duplication.

This keeps parser internal state out of thee main programs (five
in mandoc portable) and out of eight formatters.

Revision 1.11 / (download) - annotate - [selected], Thu Dec 13 06:18:20 2018 UTC (21 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.10: +8 -2 lines
Diff to previous 1.10 (colored)

Cleanup, no functional change:
Move the roffhash_*() functions from roff.h to roff_int.h
because they are only intended for use by parsers,
neither by main programs nor by formatters.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 4 02:53:51 2018 UTC (21 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored) to selected 1.11 (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.9 / (download) - annotate - [select for diffs], Sat Jul 8 17:52:50 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.8: +1 -2 lines
Diff to previous 1.8 (colored) to selected 1.11 (colored)

Simplify by creating struct roff_node syntax tree nodes for tbl(7)
right from roff_parseln() rather than delegating to read.c,
similar to what i just did for eqn(7).

The interface function roff_span() becomes obsolete and is deleted,
the former interface function roff_addtbl() becomes static,
the interface functions tbl_read() and tbl_cdata() become void,
and minus twelve linus of code.

No functional change.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jul 8 14:51:05 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +1 -2 lines
Diff to previous 1.7 (colored) to selected 1.11 (colored)

1. Eliminate struct eqn, instead use the existing members
of struct roff_node which is allocated for each equation anyway.
2. Do not keep a list of equation parsers, one parser is enough.
Minus fifty lines of code, no functional change.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Nov 7 14:01:16 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13_4, VERSION_1_13
Changes since 1.6: +1 -5 lines
Diff to previous 1.6 (colored) to selected 1.11 (colored)

In private header files, __BEGIN_DECLS and __END_DECLS are pointless.
Because these work slightly differently on different systems,
they are becoming a maintenance burden in the portable version,
so delete them.

Besides, one of the chief design goals of the mandoc toolbox is to
make sure that nothing related to documentation requires C++.
Consequently, linking mandoc against any kind of C++ program would
defeat the purpose and is not supported.
I don't understand why kristaps@ added them in the first place.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Oct 22 21:54:23 2015 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +1 -2 lines
Diff to previous 1.5 (colored) to selected 1.11 (colored)

move man(7) validation into the dedicated validation phase, too

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 21 23:51:11 2015 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +1 -3 lines
Diff to previous 1.4 (colored) to selected 1.11 (colored)

Move all mdoc(7) node validation done before child parsing
to the new separate validation pass, except for a tiny bit
needed by the parser which goes to the new mdoc_state() module;
cleaner, simpler, and surprisingly also shorter by 15 lines.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 20 02:01:32 2015 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +1 -2 lines
Diff to previous 1.3 (colored) to selected 1.11 (colored)

In order to become able to generate syntax tree nodes on the roff(7)
level, validation must be separated from parsing and rewinding.
This first big step moves calling of the mdoc(7) post_*() functions
out of the parser loop into their own mdoc_validate() pass, while
using a new mdoc_state() module to make syntax tree state handling
available to both the parser loop and the validation pass.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Apr 19 14:57:38 2015 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored) to selected 1.11 (colored)

Unify trickier node handling functions.
* man_elem_alloc() -> roff_elem_alloc()
* man_block_alloc() -> roff_block_alloc()
The functions mdoc_elem_alloc() and mdoc_block_alloc() remain for
now because they need to do mdoc(7)-specific argument processing.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Apr 19 14:25:41 2015 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +19 -2 lines
Diff to previous 1.1 (colored) to selected 1.11 (colored)

Unify some node handling functions that use TOKEN_NONE.
* mdoc_word_alloc(), man_word_alloc() -> roff_word_alloc()
* mdoc_word_append(), man_word_append() -> roff_word_append()
* mdoc_addspan(), man_addspan() -> roff_addtbl()
* mdoc_addeqn(), man_addeqn() -> roff_addeqn()
Minus 50 lines of code, no functional change.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Apr 19 13:50:26 2015 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Diff to selected 1.11 (colored)

Unify node handling functions:
* node_alloc() for mdoc and man_node_alloc() -> roff_node_alloc()
* node_append() for mdoc and man_node_append() -> roff_node_append()
* mdoc_head_alloc() and man_head_alloc() -> roff_head_alloc()
* mdoc_body_alloc() and man_body_alloc() -> roff_body_alloc()
* mdoc_node_unlink() and man_node_unlink() -> roff_node_unlink()
* mdoc_node_free() and man_node_free() -> roff_node_free()
* mdoc_node_delete() and man_node_delete() -> roff_node_delete()
Minus 130 lines of code, no functional change.

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