CVS log for mandoc/mdoc_state.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 22 19:20:40 2020 UTC (6 weeks, 2 days ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +3 -1 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Sun Jan 19 18:02:00 2020 UTC (6 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

Introduce a new mdoc(7) macro .Tg ("tag") to explicitly mark a place
as defining a term.  Please only use it when automatic tagging does
not work.  Manual page authors will not be required to add the new
macro; using it remains optional.  HTML output is still rudimentary
in this version and will be polished later.

Thanks to kn@ for reminding me that i have been considering since
BSDCan 2014 whether something like this might be useful.  Given
that possibilities of making automatic tagging better are running
out and there are still several situations where automatic tagging
cannot do the job, i think the time is now ripe.

Feedback and no objection from millert@; OK espie@ inoguchi@ kn@.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 1 07:42:04 2019 UTC (19 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.14: +3 -40 lines
Diff to previous 1.14 (colored)

Correctly set the ROFF_NOFILL parser flag for .Bd .Ed .Sh, such
that children and later siblings get correct NODE_NOFILL assignments.
This doesn't change rendering yet but prepares for future rendering
improvements.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Dec 31 07:46:07 2018 UTC (19 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Mon Dec 31 04:55:47 2018 UTC (19 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +1 -9 lines
Diff to previous 1.12 (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:55 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.11: +2 -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 - [select for diffs], Fri Dec 14 01:18:26 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Fri Aug 17 20:33:38 2018 UTC (23 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.9: +4 -5 lines
Diff to previous 1.9 (colored)

Remove more pointer arithmetic passing via regions outside the array
that is undefined according to the C standard.  Robert Elz <kre at
munnari dot oz dot au> pointed out i wasn't quite done yet.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 29 20:05:33 2017 UTC (2 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4
Changes since 1.8: +15 -10 lines
Diff to previous 1.8 (colored)

Recognize .Bl -column at parse time, and not only at validation time,
even if other arguments precede -column.  This is required because
the .It parser needs to know whether or not we are a -column list.
Fixes tree corruption leading to an assertion failure.
Bug reported by bentley@.

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 5 15:17:32 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_3, VERSION_1_14_2
Changes since 1.7: +1 -2 lines
Diff to previous 1.7 (colored)

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

Revision 1.7 / (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.6: +1 -2 lines
Diff to previous 1.6 (colored)

move .ll to the roff modules

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 4 17:48:29 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

Parser reorg:
Generate the first node on the roff level: .br
Fix some column numbers in diagnostic messages while here.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Apr 24 23:06:18 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +5 -4 lines
Diff to previous 1.4 (colored)

Continue parser unification:
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 10 13:47:00 2017 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

unify names of AST node flags; no change of cpp output

Revision 1.3 / (download) - annotate - [select for diffs], Fri Oct 30 18:53:54 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.2: +4 -1 lines
Diff to previous 1.2 (colored)

Do not access a NULL pointer when a .Bd macro has no arguments at all.
Bug reported by krw@.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Oct 21 23:51:11 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +22 -2 lines
Diff to previous 1.1 (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.1 / (download) - annotate - [select for diffs], Tue Oct 20 02:01:32 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN

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.

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