CVS log for docbook2mdoc/macro.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Mon May 20 20:08:26 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +15 -2 lines
Diff to previous 1.20 (colored) to selected 1.9 (colored)

When rendering XML entities, skip escaping in macro_addarg().
Fixing a bug which bentley@ found in fonts(7).

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 2 12:40:42 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_1_0
Changes since 1.19: +49 -1 lines
Diff to previous 1.19 (colored) to selected 1.9 (colored)

end of sentence detection

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 2 04:12:18 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.9 (colored)

In no-fill context, always allow macro_open() to continue macro lines.

Revision 1.18 / (download) - annotate - [select for diffs], Wed May 1 17:20:47 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +17 -16 lines
Diff to previous 1.17 (colored) to selected 1.9 (colored)

More whitespace improvements:
* Skip XML line breaks right after opening tags.
* When processing a text node, check whether a paragraph break is needed
before starting more detailed checks regarding macro arguments.
* Break the mdoc line at the beginning of a new XML line
unless a macro line is open and wants more arguments.
* Do not print "\c" escapes on macro lines.

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 1 15:05:39 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +3 -1 lines
Diff to previous 1.16 (colored) to selected 1.9 (colored)

In no-fill context, do not break the output line when a text node
on a text line is followed by a macro node.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Apr 24 18:38:02 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_0_2, VERSION_1_0_1
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored) to selected 1.9 (colored)

Remove some needless output line breaks between text nodes.
Some of them were incorrect in no-fill mode.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Apr 23 21:09:42 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +9 -3 lines
Diff to previous 1.14 (colored) to selected 1.9 (colored)

keep together consecutive text nodes inside macro arguments

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 16 14:26:27 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_0_0
Changes since 1.13: +20 -1 lines
Diff to previous 1.13 (colored) to selected 1.9 (colored)

Reorganize printing of .Pp macro lines, much improved formatting:
Refrain from manual tree inspection.
Instead, let <para> and other nodes keep paragraph state
and automatically emit .Pp when needed before printing text or macros.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Apr 14 23:59:11 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +6 -1 lines
Diff to previous 1.12 (colored) to selected 1.9 (colored)

bugfix: closing quote was missing in macro_addarg()

Revision 1.12 / (download) - annotate - [select for diffs], Sun Apr 14 12:59:15 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +7 -4 lines
Diff to previous 1.11 (colored) to selected 1.9 (colored)

Relax child macro escaping:
* No escaping needed in ARG_UPPER mode.
* There are only four callable three-letter macros.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 12 09:01:48 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.9 (colored)

another case of incomplete escaping: element space dot

Revision 1.10 / (download) - annotate - [select for diffs], Fri Apr 12 08:48:16 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +10 -3 lines
Diff to previous 1.9 (colored)

Move escaping of control characters and backslashes on text lines
to print_text() such that it works for all text lines.

In pnode_printtext(), use macro_addarg() or print_text() to get the
required escaping.  On the other hand, there is no need to handle
linefeed characters because these can no longer occur in text nodes.

Stephen Gregoratto <dev at sgregoratto dot me>
reported that escaping was incomplete in some cases.

Revision 1.9 / (download) - annotate - [selected], Thu Apr 11 04:23:22 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +18 -76 lines
Diff to previous 1.8 (colored)

Introduce FMT_* formatter flags to control what can be added to the
current macro line.  Move trailing punctuation handling to the text
formatter, allowing elimination of the function macro_closepunct()
and of the "real" and "bsz" members from struct node.
Substantial functional improvements, yet minus 25 lines of code.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Apr 10 14:22:37 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +8 -8 lines
Diff to previous 1.7 (colored) to selected 1.9 (colored)

Consitently use for function arguments:
struct parse *p, struct format *f, struct pnode *n, struct pattr *a

Consistently use struct pnode *nc, *nn, *np
for child, next, and previous nodes, respectively.

I admit this makes commit history a bit harder to inspect,
but i think seeing at once what variables mean is worth it.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 7 15:06:56 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored) to selected 1.9 (colored)

some nodes never continue an existing macro line

Revision 1.6 / (download) - annotate - [select for diffs], Sat Apr 6 22:37:57 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +62 -11 lines
Diff to previous 1.5 (colored) to selected 1.9 (colored)

Store the information whether a node is preceded by whitespace
into the node tree.  Use that information in the formatter
to suppress the insertion of whitespace
in text-text, macro-text, and macro-macro node sequences.

Text-macro sequences are not yet handled.  They are more complicated
because they require emitting a .Pf macro as part of a text node
depending on the spacing properties of the *following* macro node.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 3 15:04:03 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +10 -8 lines
Diff to previous 1.4 (colored) to selected 1.9 (colored)

Make macro_addnode() more flexible:
Iteratively descend singleton children to find a singleton text node.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 3 13:42:35 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored) to selected 1.9 (colored)

Improve robustness by allowing macro_close() in any state.
This is relevant because pnode_print() may change state.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Apr 2 15:53:02 2019 UTC (4 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +5 -4 lines
Diff to previous 1.2 (colored) to selected 1.9 (colored)

Translate XML character entity references to roff character escape sequences.
Missing feature reported by Stephen Gregoratto <dev at sgregoratto dot me>.

Remaining known issues:
* Whitespace handling isn't perfect yet.
* Numeric character references aren't handled yet.
* The list of entities is still very incomplete.
* When it grows longer, we may have to switch to binary search.
* Local entities declared in the DTD are not yet handled.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 28 20:41:33 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.1: +44 -10 lines
Diff to previous 1.1 (colored) to selected 1.9 (colored)

Implement a formatter for <author> elements,
handling <contrib>, <personname>, <firstname>, <othername>, <surname>,
as well as arbitrary children properly.

This required minor work on the formatting infrastructure:
Improve macro_addnode() such that it also handles text nodes.
Add a companion function print_textnode().
Let print_text() optionally work without ARG_SPACE.

Triggered by a report from Stephen Gregoratto <dev at sgregoratto
dot me> that and how GTK documentation uses <contrib>.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Mar 26 19:17:29 2019 UTC (5 years ago) by schwarze
Branch: MAIN
Diff to selected 1.9 (colored)

The file docbook2mdoc.c is still large,
so split out the macro line formatter,
which is quite self-contained.

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