OpenBSD CVS

CVS log for src/usr.bin/mandoc/Attic/libroff.h


[BACK] Up to [local] / src / usr.bin / mandoc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.22, Thu Dec 13 03:40:09 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +1 -1 lines
FILE REMOVED

Cleanup, no functional change:
In libroff.h, nothing was left except the eqn(7) parser interface, which
isn't really part of the roff(7) parser, so rename it to eqn_parse.h.

While here, move struct eqn_def to eqn.c because that's the only
file using it, and let eqn_box_free() and eqn_free() handle NULL.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Dec 13 02:05:57 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +3 -35 lines
Diff to previous 1.20 (colored)

Cleanup, no functional change:
Move tbl(7)-specific parser internals out of libroff.h.
Move some tbl(7)-internal processing from roff.c to tbl.c.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jul 8 17:52:42 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sat Jul 8 14:51:01 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +7 -7 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Mon Jun 26 19:53:00 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored)

Complete rewrite of the lexer in a single function with four operation
modes instead of four functions, resulting in considerable
simplification, fifty lines less of code, fifteen fewer automatic
variables, and several bug fixes, for example:

1. The delim control statement consumes exactly two bytes of input,
requires no whitespace after these two bytes, and does not treat
quotes in any special way.
2. If the argument of left, right, gfont, gsize, or size is defined
as an alias, only the first word of the value is used as the
delimiter, font name, or font size.
3. If a back, fwd, down, or up keyword is followed by another keyword
instead of the required number, GNU eqn does nothing useful, but
typically errors out.  So no need to have special handling (with
an ugly goto!) for it in mandoc.

Also getting rid of one pointless static buffer and twelve redundant
calls to strlcpy(3).

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 7 13:57:55 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.16: +1 -4 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Fri Jan 30 04:08:37 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.15: +1 -3 lines
Diff to previous 1.15 (colored)

Abolish struct tbl_head and replace it by an "int col" member in
struct tbl_cell.  No functional change, minus 40 lines of code.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 28 17:30:37 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

* Polish tbl(7) error reporting.
* Do not print out macro names in tbl(7) data blocks.
* Like with GNU tbl, let empty tables cause a blank line.
* Avoid producing empty tables in -Tman.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jan 28 15:02:25 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +6 -6 lines
Diff to previous 1.13 (colored)

For now, it can't be helped that mandoc tbl(7) ignores high-level macros,
but stop throwing away their arguments.  This fixes information loss in a
handful of Xenocara manuals, at the price of a small amount of formatting
noise creeping through.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jan 21 00:45:16 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

blank lines in tables do not need special handling; simplifies code
and reduces groff/mandoc differences in base by about 1%

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 14 22:44:51 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

simplify by getting rid of ROFF_ERR in tbl(7) parsing; no functional change

Revision 1.11 / (download) - annotate - [select for diffs], Mon Dec 1 08:05:02 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

header cleanup:
* add missing forward declarations
* remove needless header inclusions
* some style unification

Revision 1.10 / (download) - annotate - [select for diffs], Thu Nov 27 14:31:29 2014 UTC (9 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +1 -5 lines
Diff to previous 1.9 (colored)

remove unneccessary inclusion protection; ok schwarze

Revision 1.9 / (download) - annotate - [select for diffs], Sat Oct 25 14:32:07 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Report arguments to .EQ as an error, and simplify the code:
* drop trivial wrapper function roff_openeqn()
* drop unused first arg of function eqn_alloc()
* drop usused member "name" of struct eqn_node

Revision 1.8 / (download) - annotate - [select for diffs], Thu Oct 16 01:10:06 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +15 -11 lines
Diff to previous 1.7 (colored)

Implement in-line equations, much needed by Xenocara manuals.
Put the steering into the roff parser rather than into the mdoc
parser such that it works for all macro languages and on both text
and macro lines.
Line breaks and blank characters generated before and after in-line
equations are not perfect yet, but let's do one thing at a time.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 20 16:44:44 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Fri May 31 21:37:08 2013 UTC (10 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

The name "struct tbl" was badly misleading for two reasons:
1) This struct almost exclusively contains the table options.
2) Information about the table as a whole is actually in "struct tbl_node".
Besides, "struct tbl" was almost impossible to search for.
So rename it to "struct tbl_opts".  No functional change.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Sep 18 10:25:28 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.4: +22 -6 lines
Diff to previous 1.4 (colored)

sync to version 1.11.5:
adding an implementation of the eqn(7) language
by kristaps@

So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 24 16:22:02 2011 UTC (13 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.3: +3 -7 lines
Diff to previous 1.3 (colored)

Merge version 1.11.1:
Again lots of cleanup and maintenance work by kristaps@.
- simplify error reporting: less function pointers, more mandoc_[v]msg
- main: split document parsing out of main.c into read.c
- roff, mdoc, man: improved recognition of control characters
- roff: better handling of if/else stack overflows
- roff: add some predefined strings for backward compatibility
- mdoc, man: empty sections are not errors
- mdoc: move delimiter handling to libmdoc
- some header restructuring and some minor features and fixes
This merge causes two minor regressions
that i will fix in separate commits right afterwards.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 20 23:36:42 2011 UTC (13 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +10 -1 lines
Diff to previous 1.2 (colored)

Import the foundation for eqn(7) support.
Written by kristaps@.

For now, i'm adding one line to each of the four frontends
to just pass the input text through to the output,
not yet interpreting any of then eqn keywords.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jan 25 12:24:26 2011 UTC (13 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

Since tbl_data() can now produce multiple spans, let parsebuf()
generate man(7) or mdoc(7) nodes for all these spans,
not only for the last one.
Restores the horizontal lines in the cpu(4/hppa) tables.
ok kristaps@

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jan 4 22:28:17 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN

Merge kristaps@' cleaner tbl integration, removing mine;
there are still a few bugs, but fixing these will be easier in tree.

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.