$ cvs2cl --utc --summary -T This ChangeLog contains all CVS commits up to the 1.1.0 release. $Id: ChangeLog,v 1.4 2019/05/02 13:48:05 schwarze Exp $ 2019-05-02 13:32 tag VERSION_1_1_0 2019-05-02 13:32 schwarze Changed: Makefile (1.30), "Exp", lines: +1 -1 NEWS (1.4), "Exp", lines: +13 -0 version 1.1.0 2019-05-02 12:40 schwarze Changed: docbook2mdoc.1 (1.17), "Exp", lines: +1 -11 macro.c (1.20), "Exp", lines: +49 -1 end of sentence detection 2019-05-02 11:58 schwarze Changed: parse.c (1.59), "Exp", lines: +3 -1 statistics.c (1.41), "Exp", lines: +3 -1 ignore and 2019-05-02 04:15 schwarze Changed: docbook2mdoc.c (1.148), "Exp", lines: +20 -10 Yet more whitespace improvements: * Do not forcefully break a macro line after closing delimiters, let it continue when needed. * In no-fill context, use .No to append text to a macro line when needed. * In no-fill context, allow .Pf as a child macro when needed. * Use macro_open() for .Ns, with the proper flags before and after. 2019-05-02 04:12 schwarze Changed: macro.c (1.19), "Exp", lines: +2 -2 In no-fill context, always allow macro_open() to continue macro lines. 2019-05-02 04:09 schwarze Changed: parse.c (1.58), "Exp", lines: +5 -5 When moving the last word of a text node into its own node for use with .Pf before a macro node, make sure what remains of the original text node isn't leading whitespace only. 2019-05-01 17:20 schwarze Changed: docbook2mdoc.c (1.147), "Exp", lines: +4 -2 macro.c (1.18), "Exp", lines: +17 -16 macro.h (1.7), "Exp", lines: +2 -1 parse.c (1.57), "Exp", lines: +15 -7 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. 2019-05-01 15:05 schwarze Changed: docbook2mdoc.c (1.146), "Exp", lines: +10 -2 macro.c (1.17), "Exp", lines: +3 -1 macro.h (1.6), "Exp", lines: +2 -1 In no-fill context, do not break the output line when a text node on a text line is followed by a macro node. 2019-05-01 12:52 schwarze Changed: docbook2mdoc.c (1.145), "Exp", lines: +12 -3 node.c (1.28), "Exp", lines: +2 -1 node.h (1.37), "Exp", lines: +2 -1 statistics.c (1.40), "Exp", lines: +4 -1 handle inside inside (used for giving full function prototypes inside parameter lists of functions taking function pointer arguments) by enclosing them in parentheses inside the .Fa macro 2019-05-01 11:34 schwarze Changed: docbook2mdoc.c (1.144), "Exp", lines: +10 -1 node.c (1.27), "Exp", lines: +2 -1 node.h (1.36), "Exp", lines: +2 -1 parse.c (1.56), "Exp", lines: +1 -2 print commas between Copyright years 2019-05-01 11:03 schwarze Changed: reorg.c (1.6), "Exp", lines: +18 -1 drop trailing parentheses in elements 2019-05-01 09:14 schwarze Changed: docbook2mdoc.1 (1.16), "Exp", lines: +3 -5 Specifying "-" to mean "use standard input" isn't actually implemented, and implementing it would provide no benefit whatsoever. Remove the lie from the manual page. 2019-05-01 09:02 schwarze Changed: docbook2mdoc.1 (1.15), "Exp", lines: +16 -2 main.c (1.10), "Exp", lines: +10 -6 reorg.c (1.5), "Exp", lines: +7 -6 reorg.h (1.2), "Exp", lines: +2 -2 provide an -s command line option to override the section in .Dt 2019-05-01 07:14 schwarze Changed: main.c (1.9), "Exp", lines: +8 -4 write a comment "automatically generated" at the beginning 2019-04-29 11:14 tag VERSION_1_0_2 2019-04-29 11:14 schwarze Changed: Makefile (1.29), "Exp", lines: +1 -1 NEWS (1.3), "Exp", lines: +11 -0 version 1.0.2 2019-04-29 02:00 schwarze Changed: parse.c (1.55), "Exp", lines: +2 -1 statistics.c (1.39), "Exp", lines: +2 -1 explicitly ignore 2019-04-28 20:26 schwarze Changed: node.c (1.26), "Exp", lines: +2 -1 node.h (1.35), "Exp", lines: +2 -1 reorg.c (1.4), "Exp", lines: +13 -6 statistics.c (1.38), "Exp", lines: +4 -1 Parse and treat it like a
; when it occurs inside an info element, move it out and put it before the first section of the page. 2019-04-28 19:59 schwarze Changed: docbook2mdoc.c (1.143), "Exp", lines: +4 -126 reorg.c (1.3), "Exp", lines: +128 -2 move reshuffling of document info and meta nodes to the reorg module 2019-04-28 19:05 schwarze Changed: docbook2mdoc.c (1.142), "Exp", lines: +12 -50 reorg.c (1.2), "Exp", lines: +78 -5 move default section titles to the reorg module 2019-04-28 17:10 schwarze Added: reorg.c (1.1) reorg.h (1.1) Changed: Makefile (1.28), "Exp", lines: +4 -3 docbook2mdoc.c (1.141), "Exp", lines: +20 -59 main.c (1.8), "Exp", lines: +3 -1 Start a reorg module, to edit and move around nodes between parsing and formatting. This helps because using queue macros is prone to bugs, but inspecting the resulting trees with a C debugger is quite hard. Using -T tree is much easier. 2019-04-28 15:32 schwarze Changed: docbook2mdoc.c (1.140), "Exp", lines: +2 -4 node.c (1.25), "Exp", lines: +12 -1 node.h (1.34), "Exp", lines: +2 -1 parse.c (1.54), "Exp", lines: +2 -4 provide a simple function to generate a text node 2019-04-28 15:03 schwarze Added: xmalloc.c (1.1) xmalloc.h (1.1) Changed: Makefile (1.27), "Exp", lines: +10 -8 docbook2mdoc.c (1.139), "Exp", lines: +6 -17 main.c (1.7), "Exp", lines: +2 -5 node.c (1.24), "Exp", lines: +7 -7 parse.c (1.53), "Exp", lines: +23 -49 statistics.c (1.37), "Exp", lines: +10 -15 In this program, there is never a need to survive memory allocation failure, and there are many places allocating memory. Consequently, the code can be simplified providing memory allocation functions that error out on failure, in the conventional way. 2019-04-25 17:57 schwarze Changed: parse.c (1.52), "Exp", lines: +2 -1 statistics.c (1.36), "Exp", lines: +3 -1 Make an alias for
. This is not perfect because if starts with a , that title is still printed before the NAME section. But at least the <refentry>s no longer get lumped *into* the <title>. Issue found by Stephen Gregoratto <dev at sgregoratto dot me> in Xcomposite(3). 2019-04-24 18:52 tag VERSION_1_0_1 2019-04-24 18:52 schwarze Changed: Makefile (1.26), "Exp", lines: +1 -1 NEWS (1.2), "Exp", lines: +18 -0 version 1.0.1 2019-04-24 18:38 schwarze Changed: docbook2mdoc.1 (1.14), "Exp", lines: +4 -3 docbook2mdoc.c (1.138), "Exp", lines: +19 -15 macro.c (1.16), "Exp", lines: +2 -2 node.h (1.33), "Exp", lines: +4 -2 parse.c (1.51), "Exp", lines: +25 -19 tree.c (1.3), "Exp", lines: +4 -2 Remove some needless output line breaks between text nodes. Some of them were incorrect in no-fill mode. 2019-04-24 15:20 schwarze Changed: docbook2mdoc.c (1.137), "Exp", lines: +2 -2 preserve line breaks in no-fill elements even when lines start with nodes of CLASS_TEXT that are not NODE_TEXT, for example NODE_ESCAPE 2019-04-24 14:56 schwarze Changed: docbook2mdoc.c (1.136), "Exp", lines: +6 -4 keep consecutive text nodes together in macro arguments 2019-04-24 14:03 schwarze Changed: docbook2mdoc.c (1.135), "Exp", lines: +6 -1 request a paragraph break after displays and after non-compact lists 2019-04-23 22:25 schwarze Changed: docbook2mdoc.c (1.134), "Exp", lines: +3 -1 handle <info> like <refentryinfo> inside the document element and inside <refentry>; issue found in OpenGL-Refpages by Stephen Gregoratto <dev at sgregoratto dot me> 2019-04-23 21:09 schwarze Changed: macro.c (1.15), "Exp", lines: +9 -3 keep together consecutive text nodes inside macro arguments 2019-04-23 15:47 schwarze Changed: docbook2mdoc.1 (1.13), "Exp", lines: +12 -2 parse.c (1.50), "Exp", lines: +14 -6 handle file inclusion via "<!ENTITY %" 2019-04-23 14:01 schwarze Changed: parse.c (1.49), "Exp", lines: +13 -1 translate decimal character entities to Unicode escapes 2019-04-21 15:24 schwarze Changed: docbook2mdoc.c (1.133), "Exp", lines: +8 -6 When <term> contains a macro-generating element, the subsequent comma needs spacing. Fixing a bug reported by Jan Stary <hans at stare dot cz>. 2019-04-21 14:48 schwarze Changed: docbook2mdoc.c (1.132), "Exp", lines: +54 -23 node.c (1.23), "Exp", lines: +2 -1 node.h (1.32), "Exp", lines: +2 -1 parse.c (1.48), "Exp", lines: +4 -1 tree.c (1.2), "Exp", lines: +2 -2 Implement <void> child of <funcprototype>. Also treat <tag> just like <sgmltag> and <markup>. Some small parts of this patch were sent in by Stephen Gregoratto <dev at sgregoratto dot me>. 2019-04-20 04:15 schwarze Changed: parse.c (1.47), "Exp", lines: +3 -3 do not crash by trying to insert an attribute into a non-existent node; segfault reported by Stephen Gregoratto <dev at sgregoratto dot me> 2019-04-17 18:45 tag VERSION_1_0_0 2019-04-17 18:45 schwarze Deleted: index.xml (1.14) Added: NEWS (1.1) Changed: Makefile (1.25), "Exp", lines: +10 -11 release 1.0.0 2019-04-16 21:21 schwarze Changed: docbook2mdoc.c (1.131), "Exp", lines: +2 -1 node.c (1.22), "Exp", lines: +2 -1 node.h (1.31), "Exp", lines: +2 -1 statistics.c (1.35), "Exp", lines: +3 -1 translate <productname> to .Sy 2019-04-16 21:19 schwarze Changed: parse.c (1.46), "Exp", lines: +3 -1 treat <sect3> and <sect4> like <section> 2019-04-16 14:58 schwarze Changed: node.c (1.21), "Exp", lines: +5 -5 node.h (1.30), "Exp", lines: +3 -2 parse.c (1.45), "Exp", lines: +15 -2 preserve leading whitespace in no-fill mode 2019-04-16 14:26 schwarze Changed: docbook2mdoc.c (1.130), "Exp", lines: +63 -42 macro.c (1.14), "Exp", lines: +20 -1 macro.h (1.5), "Exp", lines: +8 -1 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. 2019-04-15 19:15 schwarze Changed: docbook2mdoc.c (1.129), "Exp", lines: +16 -1 node.c (1.20), "Exp", lines: +2 -1 node.h (1.29), "Exp", lines: +2 -1 Minimal translation of <xref> to .Sx. This might need refinement in the future, but that won't be easy because the element is horribly underspecified and the usage is practice is very inconsistent. 2019-04-15 00:34 schwarze Changed: docbook2mdoc.c (1.128), "Exp", lines: +36 -1 node.c (1.19), "Exp", lines: +5 -1 node.h (1.28), "Exp", lines: +5 -1 statistics.c (1.34), "Exp", lines: +4 -1 The <olink> element is woefully underspecified, so the various attributes may be used quite differently in different documents, but let's try a basic translation anyway. 2019-04-14 23:59 schwarze Changed: macro.c (1.13), "Exp", lines: +6 -1 bugfix: closing quote was missing in macro_addarg() 2019-04-14 23:07 schwarze Changed: docbook2mdoc.c (1.127), "Exp", lines: +12 -3 statistics.c (1.33), "Exp", lines: +15 -1 ignore <quote> around <filename> 2019-04-14 22:37 schwarze Changed: docbook2mdoc.c (1.126), "Exp", lines: +19 -1 node.c (1.18), "Exp", lines: +4 -1 node.h (1.27), "Exp", lines: +4 -1 parse.c (1.44), "Exp", lines: +5 -1 statistics.c (1.32), "Exp", lines: +6 -1 Rudimentary implementation of <imagedata> by printing the filename. Ignore the wrappers <caption>, <figure>, <imageobject>, <mediaobject>. 2019-04-14 21:11 schwarze Changed: docbook2mdoc.c (1.125), "Exp", lines: +8 -1 node.c (1.17), "Exp", lines: +2 -2 statistics.c (1.31), "Exp", lines: +2 -1 The is no perfect way to render <footnote> in mdoc(7). For now, use .Bo/.Bc as a full block. 2019-04-14 20:13 schwarze Changed: docbook2mdoc.c (1.124), "Exp", lines: +14 -1 node.c (1.16), "Exp", lines: +3 -1 node.h (1.26), "Exp", lines: +3 -1 statistics.c (1.30), "Exp", lines: +9 -1 render <superscript> and <subscript> with \(ha and _ 2019-04-14 19:29 schwarze Changed: docbook2mdoc.c (1.123), "Exp", lines: +7 -3 statistics.c (1.29), "Exp", lines: +15 -1 do not emit .Em or .Fl right before another macro 2019-04-14 18:28 schwarze Changed: docbook2mdoc.c (1.122), "Exp", lines: +8 -4 statistics.c (1.28), "Exp", lines: +2 -1 avoid overquoting when <literal> is nested inside <quote> 2019-04-14 18:07 schwarze Changed: docbook2mdoc.c (1.121), "Exp", lines: +23 -14 node.c (1.15), "Exp", lines: +4 -8 node.h (1.25), "Exp", lines: +2 -6 parse.c (1.43), "Exp", lines: +6 -1 statistics.c (1.27), "Exp", lines: +39 -1 Minor improvements to the handling of some meta-information: * Translate <simplesect> and <legalnotice> to .Ss or lower. * Do not uppercase high-level <note> and similar elements. * Handle <subtitle> like stand-alone <title>. * Handle <editor> by the <author> handler function. * Make <copyright> print "Copyright (C)". * Ignore some transparent nodes. 2019-04-14 16:26 schwarze Changed: statistics.c (1.26), "Exp", lines: +11 -3 Parse internal subset declarations in <!DOCTYPE> tags as XML; in particular, they can contain XML comments. Similar to parts of parse.c rev. 1.23, but simpler. 2019-04-14 14:59 schwarze Changed: statistics.c (1.25), "Exp", lines: +6 -2 Make <sbr> self-closing even without a trailing slash. This logically merges parse.c rev. 1.23, even though the physical code differs. 2019-04-14 14:00 schwarze Changed: docbook2mdoc.c (1.120), "Exp", lines: +1 -4 node.c (1.14), "Exp", lines: +1 -2 node.h (1.24), "Exp", lines: +1 -2 parse.c (1.42), "Exp", lines: +6 -1 statistics.c (1.24), "Exp", lines: +29 -1 Minor improvements for some inline elements: * New aliases <keycap> and <property>. * Make <application> an alias for <command>. * Ignore <keycode> and <returnvalue>. 2019-04-14 12:59 schwarze Changed: macro.c (1.12), "Exp", lines: +7 -4 Relax child macro escaping: * No escaping needed in ARG_UPPER mode. * There are only four callable three-letter macros. 2019-04-14 12:38 schwarze Changed: README (1.7), "Exp", lines: +4 -3 docbook2mdoc.c (1.119), "Exp", lines: +146 -12 statistics.c (1.23), "Exp", lines: +12 -1 Move content from <bookinfo>, <articleinfo>, <refentryinfo>, and <refmeta> that is not used in the prologue to the AUTHORS section. 2019-04-13 15:54 schwarze Changed: docbook2mdoc.c (1.118), "Exp", lines: +20 -1 node.c (1.13), "Exp", lines: +6 -2 node.h (1.23), "Exp", lines: +5 -1 statistics.c (1.22), "Exp", lines: +2 -1 rudimentary implementation of <systemitem> 2019-04-13 15:13 schwarze Changed: docbook2mdoc.c (1.117), "Exp", lines: +44 -42 Improve formatting of <arg> and <group>: * Respect the repeat attribute even if there is a child macro. * Mark up all children of <group>, not just the first. * Implement the repeat attribute for <group>. * Do the proper was_impl dance for <group>. 2019-04-13 13:06 schwarze Changed: docbook2mdoc.c (1.116), "Exp", lines: +64 -54 node.c (1.12), "Exp", lines: +17 -1 node.h (1.22), "Exp", lines: +3 -1 parse.c (1.41), "Exp", lines: +2 -1 statistics.c (1.21), "Exp", lines: +7 -1 Improve the proplogue: * Use <pubdate> or <date> for .Dd. * Clean up the way how <title> from <bookinfo> is used for .Nd. * Treat <articleinfo> just like <bookinfo>. 2019-04-12 21:37 schwarze Changed: docbook2mdoc.c (1.115), "Exp", lines: +38 -11 parse.c (1.40), "Exp", lines: +2 -1 statistics.c (1.20), "Exp", lines: +11 -1 Author node polishing: * In the AUTHORS section, set -nosplit mode. * In <author>, do not recurse for <email>: it is pointless because it cannot reasonably contain child elements, but it can trigger assertions. * For standalone <email>, do the standard was_impl dance. * Treat <othercredit> just like <author>. 2019-04-12 19:14 schwarze Added: tree.c (1.1) Changed: Makefile (1.24), "Exp", lines: +3 -2 docbook2mdoc.1 (1.12), "Exp", lines: +32 -3 docbook2mdoc.c (1.114), "Exp", lines: +2 -2 format.h (1.2), "Exp", lines: +3 -2 main.c (1.6), "Exp", lines: +30 -5 node.c (1.11), "Exp", lines: +15 -3 node.h (1.21), "Exp", lines: +3 -1 Implement lint and tree dump output modes. Thanks to the previously committed node property infrastructure in node.c, this needs only 110 lines of code (including the license and the documentation). 2019-04-12 16:40 schwarze Changed: README (1.6), "Exp", lines: +7 -6 docbook2mdoc.c (1.113), "Exp", lines: +13 -7 node.c (1.10), "Exp", lines: +150 -1 node.h (1.20), "Exp", lines: +24 -9 parse.c (1.39), "Exp", lines: +68 -178 Infrastructure to access node properties that can be used by both the parser and the formatter. Use it to decide whether a text node needs .Pf before a macro, whether the first word of a text node needs to be split off after a macro, and whether a macro node can suppress the SPACE flag. 2019-04-12 12:07 schwarze Changed: docbook2mdoc.c (1.112), "Exp", lines: +25 -12 Finally get rid of the "sv" variable in pnode_print(). Switch <literal> and <quote> between explicit and implicit enclosures depending on whether we are already inside an implicit context. 2019-04-12 11:37 schwarze Changed: docbook2mdoc.c (1.111), "Exp", lines: +6 -14 node.h (1.19), "Exp", lines: +1 -2 parse.c (1.38), "Exp", lines: +1 -4 There is no need to ever use the eqn(7) inline syntax ($$): Its purpose it to inline eqn(7) source code in the *input* file. On the *output* side, equations are inlined by default. To display them, the .EQ block needs to be wrapped in .Bd. This patch gets rid of another user of "sv". 2019-04-12 11:19 schwarze Changed: docbook2mdoc.c (1.110), "Exp", lines: +24 -19 Clean up the <refnamediv> mess to get rid of the worst "sv" user: Explicit loop over <refname> elements in <refnamediv>. Treat stray <refname> elements just like <command>. 2019-04-12 10:34 schwarze Changed: docbook2mdoc.c (1.109), "Exp", lines: +17 -7 Improve <link linkend="..."> formatting. Take markup of the content into account. Do not break a partial implicit macro line, if one is open. Do not let the parentheses extend too far. 2019-04-12 09:39 schwarze Changed: docbook2mdoc.c (1.108), "Exp", lines: +21 -10 Fix an assertion failure when content inside a term causes an output line break. The solution isn't perfect: content from the <term> still leaks into the .It body, but fixing *that* is a much more complex task than merely fixing the assertion. 2019-04-12 09:01 schwarze Changed: macro.c (1.11), "Exp", lines: +3 -3 another case of incomplete escaping: element space dot 2019-04-12 08:48 schwarze Changed: docbook2mdoc.c (1.107), "Exp", lines: +17 -36 macro.c (1.10), "Exp", lines: +10 -3 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. 2019-04-12 07:53 schwarze Changed: parse.c (1.37), "Exp", lines: +34 -8 If a text node precedes a non-text node without intervening whitespace, split out the last word for use with .Pf. 2019-04-12 07:05 schwarze Changed: docbook2mdoc.c (1.106), "Exp", lines: +4 -4 node.h (1.18), "Exp", lines: +2 -2 parse.c (1.36), "Exp", lines: +4 -2 statistics.c (1.19), "Exp", lines: +3 -1 handle <computeroutput> and <markup>; patch from Stephen Gregoratto <dev at sgregoratto dot me> who found that both are frequently used in the doclifter manpage 2019-04-12 06:46 schwarze Changed: parse.c (1.35), "Exp", lines: +65 -21 If a text node follows a non-text node without intervening whitespace, keep the text in it as short as possible. 2019-04-12 04:39 schwarze Changed: node.c (1.9), "Exp", lines: +15 -1 node.h (1.17), "Exp", lines: +2 -1 parse.c (1.34), "Exp", lines: +4 -19 New function pnode_alloc() to reduce code duplication. No functional change. 2019-04-12 04:17 schwarze Changed: docbook2mdoc.c (1.105), "Exp", lines: +8 -2 parse.c (1.33), "Exp", lines: +4 -2 Do not include literal linefeed characters in text nodes; instead, let the parser split them into two text nodes. For now, let the formatter start text nodes preceded by whitespace on new output lines, which is a crude way of preserving input line breaks and making sure output text lines are limited to reasonable length. 2019-04-12 03:38 schwarze Changed: docbook2mdoc.c (1.104), "Exp", lines: +4 -2 Outside <funcprototype>, format <paramdef> and <parameter> in-line rather than stand-alone. While many potential assertion failures remain, this patch fixes the last remaining assertion that actually occurs in Xenocara. 2019-04-11 04:23 schwarze Changed: README (1.5), "Exp", lines: +2 -4 docbook2mdoc.c (1.103), "Exp", lines: +80 -47 macro.c (1.9), "Exp", lines: +18 -76 macro.h (1.4), "Exp", lines: +6 -3 node.c (1.8), "Exp", lines: +2 -2 node.h (1.16), "Exp", lines: +1 -3 parse.c (1.32), "Exp", lines: +21 -19 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. 2019-04-10 14:37 schwarze Changed: docbook2mdoc.c (1.102), "Exp", lines: +9 -9 Last instance of conistent "struct pnode *nc, *nn" variable naming. While the previous commit caused no binary change, this one does, but only because one variable serving two different purposes is split into two. Still no functional change. 2019-04-10 14:34 schwarze Changed: parse.c (1.31), "Exp", lines: +24 -24 Last instance of consistent "struct parse *p" function argument naming. While the previous commit caused no binary change, this one does, but only because the argument is used in an assert(3). Still no functional change. 2019-04-10 14:22 schwarze Changed: docbook2mdoc.c (1.101), "Exp", lines: +282 -282 macro.c (1.8), "Exp", lines: +8 -8 node.c (1.7), "Exp", lines: +41 -41 parse.c (1.30), "Exp", lines: +103 -103 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. 2019-04-09 16:57 schwarze Changed: docbook2mdoc.1 (1.11), "Exp", lines: +48 -21 update content in many respects 2019-04-09 15:23 schwarze Changed: docbook2mdoc.1 (1.10), "Exp", lines: +55 -4 main.c (1.5), "Exp", lines: +6 -6 node.h (1.15), "Exp", lines: +5 -4 parse.c (1.29), "Exp", lines: +30 -37 switch to mandoc(1)-style EXIT STATUS and DIAGNOSTICS 2019-04-09 13:35 schwarze Changed: parse.c (1.28), "Exp", lines: +4 -2 Fix a logic bug causing tree corruption: When parsing an internal subset declaration, text does not extend beyond closing square brackets. 2019-04-09 12:23 schwarze Changed: parse.c (1.27), "Exp", lines: +2 -1 Fix a logic bug and a memory leak: After parsing an attribute value, clear the attribute flag, such that, if another attribute value follows, it gets ignored rather than clobbering the first value. 2019-04-09 01:39 schwarze Changed: node.c (1.6), "Exp", lines: +2 -1 node.h (1.14), "Exp", lines: +3 -1 parse.c (1.26), "Exp", lines: +16 -2 implement file inclusion via <xi:include> 2019-04-08 23:40 schwarze Changed: parse.c (1.25), "Exp", lines: +10 -3 implement file inclusion via the ENTITY SYSTEM mechanism 2019-04-08 22:47 schwarze Changed: main.c (1.4), "Exp", lines: +23 -30 parse.c (1.24), "Exp", lines: +82 -27 Make the function parse_file() fit for recursion: * Save and restore reporting data around the read loop. * Open the file inside the function, not before calling it. * On the top level, change directory on a best-effort basis. * Finalize the parse tree only on the top level. No new functionality yet. 2019-04-08 14:37 schwarze Changed: node.c (1.5), "Exp", lines: +5 -1 node.h (1.13), "Exp", lines: +7 -1 parse.c (1.23), "Exp", lines: +133 -32 Handle DOCTYPE declarations containing ENTITY definitions. Also make <sbr> self-closing even without a trailing slash. 2019-04-07 19:33 schwarze Changed: docbook2mdoc.c (1.100), "Exp", lines: +14 -5 node.h (1.12), "Exp", lines: +2 -2 parse.c (1.22), "Exp", lines: +5 -2 statistics.c (1.18), "Exp", lines: +6 -1 handle <appendix>, <article>, <book>, and <legalnotice> similar to <section> 2019-04-07 18:51 schwarze Changed: docbook2mdoc.c (1.99), "Exp", lines: +6 -3 parse.c (1.21), "Exp", lines: +6 -1 statistics.c (1.17), "Exp", lines: +10 -1 handle glossaries just like variablelists 2019-04-07 17:55 schwarze Changed: docbook2mdoc.c (1.98), "Exp", lines: +5 -1 parse.c (1.20), "Exp", lines: +2 -1 statistics.c (1.16), "Exp", lines: +2 -1 render <blockquote> as .Bd -ragged -offset indent 2019-04-07 17:42 schwarze Changed: docbook2mdoc.c (1.97), "Exp", lines: +9 -5 do not access null pointers when the document element is <title> 2019-04-07 17:39 schwarze Changed: parse.c (1.19), "Exp", lines: +3 -3 Discard attributes of ignored elements. As a side benefit, this avoids a null pointer access if the document element is ignored and has attributes. 2019-04-07 17:00 schwarze Changed: docbook2mdoc.c (1.96), "Exp", lines: +39 -7 node.c (1.4), "Exp", lines: +5 -2 node.h (1.11), "Exp", lines: +4 -1 parse.c (1.18), "Exp", lines: +2 -2 statistics.c (1.15), "Exp", lines: +3 -1 better handling of <link> and <ulink> elements including endterm=, linkend=, url=, and xlink:href= attributes 2019-04-07 15:06 schwarze Changed: docbook2mdoc.c (1.95), "Exp", lines: +7 -1 macro.c (1.7), "Exp", lines: +2 -1 some nodes never continue an existing macro line 2019-04-07 14:49 schwarze Changed: docbook2mdoc.c (1.94), "Exp", lines: +15 -1 parse.c (1.17), "Exp", lines: +45 -3 handle preceding a macro without intervening whitespace 2019-04-07 13:16 schwarze Changed: docbook2mdoc.c (1.93), "Exp", lines: +56 -51 Move printing of text nodes out of pnode_print() into a dedicated function, like for all other node types that require a substantial amount of code. No functional change. 2019-04-06 22:37 schwarze Changed: docbook2mdoc.c (1.92), "Exp", lines: +5 -3 macro.c (1.6), "Exp", lines: +62 -11 macro.h (1.3), "Exp", lines: +2 -1 node.h (1.10), "Exp", lines: +2 -1 parse.c (1.16), "Exp", lines: +34 -28 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. 2019-04-06 13:45 schwarze Changed: parse.c (1.15), "Exp", lines: +2 -1 statistics.c (1.14), "Exp", lines: +2 -1 treat <simpara> just like <para>; simplified version of a patch from Stephen Gregoratto <dev at sgregoratto dot me> 2019-04-06 13:30 schwarze Changed: README (1.4), "Exp", lines: +78 -8 update the instructions for adding elements; triggered by a smaller patch from Stephen Gregoratto <dev at sgregoratto dot me> 2019-04-05 14:37 schwarze Changed: parse.c (1.14), "Exp", lines: +193 -184 Split parse_file() into parse_file() to fill the parse buffer and parse_string() to handle it, to allow parsing from alternative sources in a subsequent step. Only advance line and column number when parsing from the main input file. Represent parsing state as an enum rather than with multiple flags. 2019-04-03 18:52 schwarze Changed: docbook2mdoc.c (1.91), "Exp", lines: +21 -2 statistics.c (1.13), "Exp", lines: +3 -1 rudimentary implementation of <simplelist> 2019-04-03 17:53 schwarze Changed: docbook2mdoc.c (1.90), "Exp", lines: +7 -15 node.h (1.9), "Exp", lines: +2 -4 parse.c (1.13), "Exp", lines: +6 -4 statistics.c (1.12), "Exp", lines: +14 -1 Various in-line elements: Translate <errorname> to .Er. Translate <sgmltag> to .Ic. Translate <literal> to .Ql, avoiding .Li. Map <code> and <userinput> to <literal>. Map <structname> to <type>. Map <structfield> to <parameter>. 2019-04-03 16:52 schwarze Changed: docbook2mdoc.c (1.89), "Exp", lines: +1 -4 statistics.c (1.11), "Exp", lines: +13 -1 do not abort(3) when there is more than one <refmeta> 2019-04-03 16:08 schwarze Changed: parse.c (1.12), "Exp", lines: +2 -1 statistics.c (1.10), "Exp", lines: +6 -1 introduce <symbol> as an alias for <constant> 2019-04-03 15:59 schwarze Changed: docbook2mdoc.c (1.88), "Exp", lines: +3 -1 treat <synopsis> as a literal display 2019-04-03 15:27 schwarze Changed: statistics.c (1.9), "Exp", lines: +16 -9 mark more relations involving parameters, indexterms, and sections as handled 2019-04-03 15:24 schwarze Changed: docbook2mdoc.c (1.87), "Exp", lines: +2 -1 translate <paramdef> to .Fa even outside <funcprototype> 2019-04-03 15:05 schwarze Changed: docbook2mdoc.c (1.86), "Exp", lines: +13 -21 statistics.c (1.8), "Exp", lines: +7 -1 Make <funcdef> more robust: If the first child is text, use it for .Ft, then use all remaining children for .Fo. Make <funcprototype> more robust: Use all children but the first <funcdef> for .Fa. 2019-04-03 15:04 schwarze Changed: macro.c (1.5), "Exp", lines: +10 -8 Make macro_addnode() more flexible: Iteratively descend singleton children to find a singleton text node. 2019-04-03 14:02 schwarze Changed: docbook2mdoc.c (1.85), "Exp", lines: +2 -5 statistics.c (1.7), "Exp", lines: +8 -1 Do not handle <varlistentry> in pnode_print() because it generates .It which must not occur outside .Bl. 2019-04-03 13:42 schwarze Changed: docbook2mdoc.c (1.84), "Exp", lines: +2 -3 macro.c (1.4), "Exp", lines: +3 -2 Improve robustness by allowing macro_close() in any state. This is relevant because pnode_print() may change state. 2019-04-03 12:29 schwarze Changed: docbook2mdoc.c (1.83), "Exp", lines: +36 -12 statistics.c (1.6), "Exp", lines: +20 -1 print tables containing two columns as .Bl -tag 2019-04-03 11:46 schwarze Changed: docbook2mdoc.c (1.82), "Exp", lines: +38 -12 node.c (1.3), "Exp", lines: +2 -1 node.h (1.8), "Exp", lines: +2 -2 parse.c (1.11), "Exp", lines: +2 -2 Prints tables containing only one column as .Bl -bullet -compact. The number of columns is taken from the "cols" attribute. No neat to treat <informaltable> separately from <table>; the only difference is whether or not it has a title. Treat <table> as transparent and handle <tgroup> instead. The advantages are that <title> gets a generic handler which also works in other contexts and that other children of <table> are now covered as well. 2019-04-03 11:23 schwarze Changed: parse.c (1.10), "Exp", lines: +6 -4 statistics.c (1.5), "Exp", lines: +6 -4 handle attributes in single quotes 2019-04-03 09:49 schwarze Changed: statistics.c (1.4), "Exp", lines: +55 -2 optional parent-child histogram for one relation 2019-04-03 08:39 schwarze Changed: statistics.c (1.3), "Exp", lines: +14 -1 merge parse.c rev. 1.8: skip XML comments containing greater-than characters 2019-04-03 08:36 schwarze Changed: Makefile (1.23), "Exp", lines: +3 -3 link with -g for easier debugging and clean statistics.core 2019-04-02 17:06 schwarze Changed: docbook2mdoc.c (1.81), "Exp", lines: +1 -2 handle trailing delimiters after <citerefentry>/.Xr; bug reported by Stephen Gregoratto <dev at sgregoratto dot me> 2019-04-02 16:24 schwarze Changed: docbook2mdoc.c (1.80), "Exp", lines: +11 -1 use the idiom ".An Name Aq Mt email" for author email addresses; issue reported by Stephen Gregoratto <dev at sgregoratto dot me> 2019-04-02 15:53 schwarze Changed: docbook2mdoc.c (1.79), "Exp", lines: +8 -1 macro.c (1.3), "Exp", lines: +5 -4 node.h (1.7), "Exp", lines: +2 -1 parse.c (1.9), "Exp", lines: +120 -7 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. 2019-04-02 13:11 schwarze Changed: parse.c (1.8), "Exp", lines: +25 -1 skip XML comments even if they contain greater-than characters; issue reported by Stephen Gregoratto <dev at sgregoratto dot me> 2019-03-29 18:09 schwarze Changed: statistics.c (1.2), "Exp", lines: +44 -12 allow excluding relations that are already fully implemented 2019-03-29 15:55 schwarze Added: statistics.c (1.1) Changed: Makefile (1.22), "Exp", lines: +4 -0 Add a utility for docbook2mdoc developers to collect element usage and parenting statistics, to help decide which nodes should be most urgently worked on. 2019-03-28 20:41 schwarze Changed: docbook2mdoc.c (1.78), "Exp", lines: +64 -21 macro.c (1.2), "Exp", lines: +44 -10 macro.h (1.2), "Exp", lines: +4 -1 node.h (1.6), "Exp", lines: +2 -1 parse.c (1.7), "Exp", lines: +5 -4 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>. 2019-03-28 15:05 schwarze Changed: parse.c (1.6), "Exp", lines: +42 -33 Simple warn_msg() and error_msg() functions to avoid repetitive code. While here, drop the warning about unknown attributes. Those are just too abundant and hardly matter. 2019-03-28 12:21 schwarze Changed: Makefile (1.21), "Exp", lines: +1 -1 index.xml (1.13), "Exp", lines: +4 -6 main.c (1.3), "Exp", lines: +3 -3 node.c (1.2), "Exp", lines: +3 -3 node.h (1.5), "Exp", lines: +2 -1 parse.c (1.5), "Exp", lines: +322 -100 The expat library aborts parsing as soon as it encounters invalid input, and the basic design of the library practically precludes fixing it. However, whether the input is well-formed XML or not is totally irrelevant, and in fact, i have seen real-world documents from X.org that expat rejects as not well-formed. Kristaps reports the same from OpenGL. We really want to parse *ANYTHING* whatsoever without ever throwing a fatal error - after all, the point is to convert legacy documents to a better format, and nitpicking about the syntax merely alienates users (including myself). Consequently, ditch expat and write a parser from scratch, optimized for robustness on invalid input. Oh, and by the way, it only requires 200 lines of code, compared to 15,000 lines in expat - an economy of 98.5% at the sime time as being much more useful in practice. 2019-03-26 22:39 schwarze Changed: docbook2mdoc.c (1.77), "Exp", lines: +1 -3 node.h (1.4), "Exp", lines: +4 -6 parse.c (1.4), "Exp", lines: +40 -13 Provide a way to exclude elements including their children from the tree and use that for <anchor>, <indexterm>, <primary>, and <secondary>. 2019-03-26 21:52 schwarze Changed: docbook2mdoc.c (1.76), "Exp", lines: +1 -4 node.h (1.3), "Exp", lines: +1 -8 parse.c (1.3), "Exp", lines: +8 -8 mark the first seven elements as ignored, shortening enum nodeid, and in one case even pnode_print() 2019-03-26 21:47 schwarze Changed: Makefile (1.20), "Exp", lines: +2 -1 add forgotten macro.{c,h} dependency rules 2019-03-26 20:54 schwarze Changed: node.h (1.2), "Exp", lines: +3 -2 parse.c (1.2), "Exp", lines: +31 -11 Provide an easy way to parse an XML element without generating a node, either ignoring it outright or emitting a warning if -W was specified. Use this to handle <xi:include> more cleanly, fixing two FIXMEs. 2019-03-26 20:06 schwarze Changed: main.c (1.2), "Exp", lines: +8 -2 Parsing errors are too easy to miss because they typically emit a one-line error message followed by lengthy formatted output of what was parsed before the error occurred. Make parsing errors more conspicious by taking two steps: 1. If there was a parsing error, print a blank line to standard output before starting formatted output, for better separation. 2. After the formatted output, if there was a parsing error, print the following to standard error: a blank line, a message that output is incomplete, and another blank line. 2019-03-26 19:17 schwarze Added: macro.c (1.1) macro.h (1.1) Changed: Makefile (1.19), "Exp", lines: +3 -3 docbook2mdoc.c (1.75), "Exp", lines: +2 -202 The file docbook2mdoc.c is still large, so split out the macro line formatter, which is quite self-contained. 2019-03-26 18:32 schwarze Deleted: extern.h (1.34) Added: format.h (1.1) main.c (1.1) node.c (1.1) node.h (1.1) parse.c (1.1) parse.h (1.1) Changed: Makefile (1.18), "Exp", lines: +15 -6 docbook2mdoc.c (1.74), "Exp", lines: +56 -645 The program docbook2mdoc(1) has become large enough that splitting it into a number of logical components makes sense: node tree, parser, formatter, each with interface and implementation, and the main program. That way, it becomes easier to see what interacts with what, and what is independent of what. 2019-03-25 23:14 schwarze Changed: docbook2mdoc.c (1.73), "Exp", lines: +17 -33 extern.h (1.33), "Exp", lines: +2 -2 Various parser simplifications and improvements. Delete the redundant member "node" of struct parse. The same is already available from cur->node. No need to check in xml_char() whether an element is open. Text outside the document element results in expat errors "not well-formed (invalid token)" or "junk after document element" and the function xml_char() is not called. No need to check in xml_elem_end() whether an element is open. Bogus closing tags result in expat errors "not well-formed (invalid token)" or "mismatched tag" and the function xml_elem_end() is not called. In xml_elem_start(): no point in skipping the element name check for the document element; and the error error "multiple refentries" can no longer happen due to earlier cleanups. 2019-03-25 17:28 schwarze Changed: docbook2mdoc.c (1.72), "Exp", lines: +128 -139 For macro_addarg(), macro_addnode(), and macro_nodeline(), provide a flag ARG_SINGLE to request quoting of strings containing whitespace. Use it for .Dt, .Fa, .Fo, .Nm, and .Xr. Do not \&-escape macros in quoted strings. Escape quote characters in macro arguments. NUL-terminate the content of text nodes. Eliminate the awkward "bufappend()" global output buffer. Simplify and improve handling of <paramdef>. Substantial functional improvements, easier to read, yet minus 20 LOC. 2019-03-24 23:48 schwarze Changed: docbook2mdoc.c (1.71), "Exp", lines: +37 -44 To avoid use after free, use TAILQ_FOREACH_SAFE(3) rather than TAILQ_FOREACH(3) when deleting list elements during the iteration. Factor out some repeated code into a new function pnode_printtitle(). Where pnode_print() calls per-element pnode_print*() functions, call exactly one function per element and do everything that is required inside, making the huge function pnode_print() slightly smaller and the various pnode_print*() more self-contained. In particular, call pnode_unlinksub() as close as possible to the place where the processing justifying the deletion was done. 2019-03-24 21:00 schwarze Changed: docbook2mdoc.c (1.70), "Exp", lines: +24 -9 Avoid reckless use of low-level stdio output functions like putchar(3), puts(3), and fputs(3) in high-level formatting code. For clarity and robustness, be explicit whether we are printing to a text line with print_text() or to a macro line with macro_addarg(). While here, fix NODE_REFNAME formatting which i broke previously. For now, leave MathML to eqn(7) translation alone. Usually, that happens in .EQ blocks, i.e. writing text lines. But it can also happen in inline ($$) context on macro lines. That is certainly very fragile and will often fail especially for non-trivial formulae, but switching to print_text() would break it even more. So postpone repairs until i come round to work on equation formatting for real. 2019-03-24 16:45 schwarze Changed: docbook2mdoc.c (1.69), "Exp", lines: +260 -348 As usual, whitespace handling is the heart and soul of roff(7) processing, so overhaul it. Keep output line state and provide a set of output functions to open and close macro lines and to add arguments to them. Mostly avoid asserting output line state because elements can occur in any order and we should just deal with whatever comes in. This diff shortens the code by 60 lines, improves robustness and readability, and fixes some bugs. 2019-03-23 11:13 schwarze Changed: docbook2mdoc.c (1.68), "Exp", lines: +6 -1 translate <citetitle> to .%T 2019-03-23 10:53 schwarze Changed: docbook2mdoc.c (1.67), "Exp", lines: +6 -1 translate <keysym> to .Sy 2019-03-23 10:22 schwarze Changed: docbook2mdoc.c (1.66), "Exp", lines: +4 -4 the handlers for NODE_LITERALLAYOUT and NODE_PROGRAMLISTING were exchanged 2019-03-22 19:44 schwarze Changed: docbook2mdoc.c (1.65), "Exp", lines: +8 -1 extern.h (1.32), "Exp", lines: +3 -1 support <personname> and <email>; based on a patch from Stephen Gregoratto <dev at sgregoratto dot me> 2019-03-22 19:07 schwarze Changed: docbook2mdoc.c (1.64), "Exp", lines: +124 -138 KNF: eliminate Yoda notation, and also drop a few redundant assertions 2019-03-22 18:02 schwarze Changed: docbook2mdoc.c (1.63), "Exp", lines: +15 -15 * Fix the return value from main(). * Do not use the pointless constants EXIT_SUCCESS and EXIT_FAILURE. * KNF: remove parentheses from return statements. 2019-03-22 17:42 schwarze Changed: docbook2mdoc.c (1.62), "Exp", lines: +126 -130 KNF: remove parentheses from switch cases 2019-03-22 17:28 schwarze Changed: docbook2mdoc.c (1.61), "Exp", lines: +16 -8 no output for PARA right inside ENTRY, and fix the same in LISTITEM 2019-03-22 17:01 schwarze Changed: docbook2mdoc.c (1.60), "Exp", lines: +25 -5 extern.h (1.31), "Exp", lines: +3 -1 handle class="monospaced" in NODE_LITERALLAYOUT 2019-03-22 16:55 schwarze Changed: docbook2mdoc.c (1.59), "Exp", lines: +26 -34 factor out new function pnode_getattr_raw() 2019-03-22 16:50 schwarze Changed: docbook2mdoc.c (1.58), "Exp", lines: +13 -1 extern.h (1.30), "Exp", lines: +2 -1 translate NODE_LINK to .Sx 2019-03-22 16:47 schwarze Changed: docbook2mdoc.c (1.57), "Exp", lines: +3 -1 translate NODE_FIRSTTERM to .Em 2019-03-22 16:42 schwarze Changed: docbook2mdoc.c (1.56), "Exp", lines: +146 -181 extern.h (1.29), "Exp", lines: +1 -9 Work towards reducing the number of node IDs. Allow mapping several node names to the same node ID and use that for chapter, part, refsect*, sect* -> NODE_SECTION. Do not require the root to be of a specific type. Delete the useless NODE_IGNTEXT. 2019-03-22 16:35 schwarze Changed: docbook2mdoc.c (1.55), "Exp", lines: +3 -1 ignore NODE_INDEXTERM for now 2019-03-22 16:32 schwarze Changed: docbook2mdoc.c (1.54), "Exp", lines: +37 -10 new function pnode_printpara() to avoid printing redundant .Pp, for example after section headers 2019-03-22 16:25 schwarze Changed: docbook2mdoc.c (1.53), "Exp", lines: +2 -2 NODE_ITEMIZEDLIST is .Bl -bullet, not .Bl -enum 2019-03-22 16:21 schwarze Changed: docbook2mdoc.c (1.52), "Exp", lines: +67 -47 automatic assignment of header levels 2019-03-22 16:14 schwarze Changed: docbook2mdoc.c (1.51), "Exp", lines: +13 -8 get the .Dt name from the id attribute of the root node 2019-03-22 16:10 schwarze Changed: docbook2mdoc.c (1.50), "Exp", lines: +93 -4 extern.h (1.28), "Exp", lines: +52 -0 many new nodes found below /usr/xenocara/proto/xorgproto/specs/ 2019-03-22 15:54 schwarze Deleted: rules.c (1.27) Changed: Makefile (1.17), "Exp", lines: +5 -5 docbook2mdoc.c (1.49), "Exp", lines: +1 -20 extern.h (1.27), "Exp", lines: +0 -12 Delete the rest of rules.c. Just like validation of element nesting is pointless, validating attributes makes no sense either. 2019-03-22 15:38 schwarze Changed: README (1.3), "Exp", lines: +1 -20 docbook2mdoc.c (1.48), "Exp", lines: +2 -14 extern.h (1.26), "Exp", lines: +0 -1 rules.c (1.26), "Exp", lines: +0 -1331 Delete the isparent() validation function. The DocBook language is totally ill-designed, a gigantic accretion of arbitrary elements without any kind of discernible design or cohesion, with an absurdly large number of arbitrary and pointless rules of what is allowed to nest inside which other elements. So attempting to validate DocBook input against the totally crazy specification makes no sense whatsoever, and even less so because we are certainly not encouraging anybody to write new or maintain existing DocBook documents. The whole point of having a DocBook parser is to be able to parse legacy documents and convert them to a sane language, so it is utterly irrelevant whether the input is considered valid or invalid by some idiotic standard. This deletion allows substantial simplification of the code and will massively speed up development in the future. Kristaps@ says that i can move forward with development without asking for individual OKs. 2019-03-17 13:53 schwarze Changed: docbook2mdoc.1 (1.9), "Exp", lines: +5 -5 minor improvements from Stephen Gregoratto <dev at sgregoratto dot me> 2019-03-08 15:18 schwarze Changed: docbook2mdoc.c (1.47), "Exp", lines: +3 -3 for the null character '\0', use the standard shorthand NUL, not "nil" 2019-03-08 15:09 schwarze Changed: docbook2mdoc.c (1.46), "Exp", lines: +13 -13 fix systematically wrong (int) casts in character classification functions 2019-03-08 10:13 schwarze Changed: README (1.2), "Exp", lines: +10 -4 update links to the DocBook website and fix a typo in a function name 2019-03-08 10:04 schwarze Changed: docbook2mdoc.c (1.45), "Exp", lines: +6 -5 improve error handling and usage in main() 2017-06-29 12:11 schwarze Changed: docbook2mdoc.1 (1.8), "Exp", lines: +9 -16 Do not use .Aq for XML tags; from bentley@. While here, fix some other macros, too. 2016-04-06 15:45 schwarze Changed: index.xml (1.12), "Exp", lines: +2 -2 link to man.openbsd.org 2015-03-19 10:04 schwarze Changed: Makefile (1.16), "Exp", lines: +1 -1 docbook2mdoc.c (1.44), "Exp", lines: +127 -127 extern.h (1.25), "Exp", lines: +5 -5 index.xml (1.11), "Exp", lines: +2 -2 rules.c (1.25), "Exp", lines: +2 -2 zap trailing whitespace; verified with diff -b; patch from Svyatoslav Mishyn <juef at openmailbox dot org> 2014-10-19 19:11 kristaps Changed: docbook2mdoc.1 (1.7), "Exp", lines: +3 -2 docbook2mdoc.c (1.43), "Exp", lines: +33 -11 Differentiate between inline and non-inline equations by using delimiters. 2014-10-12 15:48 kristaps Changed: docbook2mdoc.c (1.42), "Exp", lines: +18 -11 Properly handle multiple <term> for a <varlistentry>. 2014-10-12 15:34 kristaps Changed: docbook2mdoc.c (1.41), "Exp", lines: +42 -5 extern.h (1.24), "Exp", lines: +2 -0 rules.c (1.24), "Exp", lines: +3 -0 Make <mml:mfenced> work properly. 2014-10-12 15:08 kristaps Changed: docbook2mdoc.1 (1.6), "Exp", lines: +10 -3 docbook2mdoc.c (1.40), "Exp", lines: +80 -1 extern.h (1.23), "Exp", lines: +11 -0 rules.c (1.23), "Exp", lines: +74 -0 Add initial support for mml:* -> eqn(7). 2014-04-30 13:21 tag VERSION_0_0_9 2014-04-30 13:21 kristaps Changed: Makefile (1.15), "Exp", lines: +1 -1 docbook2mdoc.1 (1.5), "Exp", lines: +2 -1 index.xml (1.10), "Exp", lines: +5 -3 Much better OpenGL support: version it and put it away for a while. 2014-04-30 13:18 kristaps Changed: docbook2mdoc.c (1.39), "Exp", lines: +10 -1 extern.h (1.22), "Exp", lines: +4 -0 rules.c (1.22), "Exp", lines: +87 -0 Add type, modifier, and fieldsynopsis. 2014-04-30 12:54 kristaps Changed: docbook2mdoc.1 (1.4), "Exp", lines: +7 -3 docbook2mdoc.c (1.38), "Exp", lines: +45 -22 extern.h (1.21), "Exp", lines: +1 -0 rules.c (1.21), "Exp", lines: +4 -0 Add refmetainfo, which seems to be a holdover from early DocBook days. Also add the -W flag to differentiate failure and warning in scanning output. 2014-04-30 12:34 kristaps Changed: docbook2mdoc.c (1.37), "Exp", lines: +48 -3 For some elements, we want to look ahead to see if the next node is text and begins with punctuation. If so, we can print that punctuation or our line and make it work well with mdoc(7). For example, <constant>bar</constant>. will now render as .Dv bar . This makes output pages much more readable. 2014-04-30 10:13 tag VERSION_0_0_8 2014-04-30 10:13 kristaps Changed: index.xml (1.9), "Exp", lines: +2 -2 Sneak in typo fix. 2014-04-30 10:11 kristaps Changed: Makefile (1.14), "Exp", lines: +1 -1 docbook2mdoc.1 (1.3), "Exp", lines: +4 -2 docbook2mdoc.c (1.36), "Exp", lines: +7 -2 index.xml (1.8), "Exp", lines: +3 -3 Toss xi:include (crudely, til I figure out a better way). Bump version. 2014-04-30 09:46 kristaps Changed: Makefile (1.13), "Exp", lines: +4 -4 Add DESTDIR to Makefile as noted by Thomas Klausner. 2014-04-30 09:43 kristaps Changed: docbook2mdoc.c (1.35), "Exp", lines: +4 -1 extern.h (1.20), "Exp", lines: +1 -0 rules.c (1.20), "Exp", lines: +12 -1 For free, we get informaltable. 2014-04-30 09:37 kristaps Changed: Makefile (1.12), "Exp", lines: +9 -0 Add hook to install. 2014-04-30 09:37 kristaps Changed: docbook2mdoc.c (1.34), "Exp", lines: +5 -7 citerefentry shouldn't expect a newline--it can occur inline. 2014-04-30 09:26 kristaps Changed: docbook2mdoc.c (1.33), "Exp", lines: +8 -1 extern.h (1.19), "Exp", lines: +1 -0 rules.c (1.19), "Exp", lines: +26 -0 Add trademark, format constant. 2014-04-30 09:04 kristaps Changed: docbook2mdoc.c (1.32), "Exp", lines: +12 -6 extern.h (1.18), "Exp", lines: +6 -1 rules.c (1.18), "Exp", lines: +91 -8 Add holder, copyright, and year elements. Fix parameter to suppress trailing newline (puts -> fputs). 2014-04-02 12:27 tag VERSION_0_0_7 2014-04-02 12:27 kristaps Deleted: as.xml (1.2) iovec.xml (1.2) ls.xml (1.2) printf.xml (1.2) Changed: Makefile (1.11), "Exp", lines: +6 -18 docbook2mdoc.1 (1.2), "Exp", lines: +16 -5 docbook2mdoc.c (1.31), "Exp", lines: +10 -7 index.xml (1.7), "Exp", lines: +8 -14 Improve (and fix) manpage and index page. Remove now-trivial examples. 2014-04-02 12:12 kristaps Changed: docbook2mdoc.c (1.30), "Exp", lines: +15 -2 extern.h (1.17), "Exp", lines: +3 -0 rules.c (1.17), "Exp", lines: +60 -1 Add <sgmltag> and (ignore) <anchor>. Also give more error-reporting for internal XML errors. 2014-04-02 10:59 kristaps Changed: docbook2mdoc.c (1.29), "Exp", lines: +47 -4 extern.h (1.16), "Exp", lines: +6 -0 rules.c (1.16), "Exp", lines: +165 -0 Add caution, note, tip, refsect3, refsection, warning. 2014-04-02 10:27 kristaps Changed: docbook2mdoc.c (1.28), "Exp", lines: +13 -1 extern.h (1.15), "Exp", lines: +1 -0 rules.c (1.15), "Exp", lines: +42 -0 Add <quote>. 2014-04-02 10:06 kristaps Added: README (1.1) Changed: docbook2mdoc.c (1.27), "Exp", lines: +7 -1 extern.h (1.14), "Exp", lines: +1 -0 rules.c (1.14), "Exp", lines: +25 -0 Add <application> and a README for adding new nodes. 2014-04-02 07:55 tag VERSION_0_0_6 2014-04-02 07:55 kristaps Changed: Makefile (1.10), "Exp", lines: +1 -1 index.xml (1.6), "Exp", lines: +4 -4 Push tables into release. 2014-04-02 07:52 kristaps Changed: docbook2mdoc.c (1.26), "Exp", lines: +9 -3 extern.h (1.13), "Exp", lines: +1 -0 rules.c (1.13), "Exp", lines: +25 -0 Add <varname>. 2014-04-02 07:48 kristaps Changed: docbook2mdoc.c (1.25), "Exp", lines: +80 -24 extern.h (1.12), "Exp", lines: +7 -0 rules.c (1.12), "Exp", lines: +62 -0 Initial support for tables. Because docbook table entries are blocks (not columns), write them out as lists (rows) of lists (elements). 2014-03-30 18:17 kristaps Changed: Makefile (1.9), "Exp", lines: +1 -1 index.xml (1.5), "Exp", lines: +3 -1 Jump version. 2014-03-30 18:15 kristaps Changed: docbook2mdoc.c (1.24), "Exp", lines: +58 -1 extern.h (1.11), "Exp", lines: +1 -0 rules.c (1.11), "Exp", lines: +30 -2 Get a biggie: <group>. 2014-03-30 17:46 kristaps Changed: docbook2mdoc.c (1.23), "Exp", lines: +9 -2 extern.h (1.10), "Exp", lines: +1 -0 rules.c (1.10), "Exp", lines: +32 -0 Add more tags. 2014-03-30 17:22 kristaps Changed: docbook2mdoc.c (1.22), "Exp", lines: +7 -1 extern.h (1.9), "Exp", lines: +2 -0 rules.c (1.9), "Exp", lines: +53 -0 Even more tags. 2014-03-30 17:10 kristaps Changed: docbook2mdoc.c (1.21), "Exp", lines: +17 -2 extern.h (1.8), "Exp", lines: +3 -0 index.xml (1.4), "Exp", lines: +2 -4 rules.c (1.8), "Exp", lines: +65 -0 Add <orderedlist>, <acronym>, <envar>. 2014-03-30 16:57 kristaps Changed: docbook2mdoc.c (1.20), "Exp", lines: +24 -6 extern.h (1.7), "Exp", lines: +1 -0 rules.c (1.7), "Exp", lines: +17 -0 Add <refsect2>. 2014-03-30 16:44 kristaps Changed: docbook2mdoc.c (1.19), "Exp", lines: +12 -1 extern.h (1.6), "Exp", lines: +2 -0 rules.c (1.6), "Exp", lines: +31 -0 Add <sbr>, <literal>. 2014-03-30 16:33 kristaps Changed: docbook2mdoc.c (1.18), "Exp", lines: +3 -2 All "Sh" should be uppercase. 2014-03-30 16:32 kristaps Changed: docbook2mdoc.c (1.17), "Exp", lines: +7 -1 extern.h (1.5), "Exp", lines: +1 -0 rules.c (1.5), "Exp", lines: +22 -0 Add <filename>. 2014-03-30 16:25 kristaps Changed: docbook2mdoc.c (1.16), "Exp", lines: +32 -3 extern.h (1.4), "Exp", lines: +1 -0 rules.c (1.4), "Exp", lines: +28 -2 <itemizedlist> support. 2014-03-30 15:08 kristaps Changed: docbook2mdoc.c (1.15), "Exp", lines: +7 -1 extern.h (1.3), "Exp", lines: +3 -1 rules.c (1.3), "Exp", lines: +23 -0 Add <refentryinfo> and <date> for more doclifter processing. Note that <ulink> is from the original DocBook. 2014-03-30 13:18 kristaps Changed: docbook2mdoc.c (1.14), "Exp", lines: +3 -1 extern.h (1.2), "Exp", lines: +2 -0 rules.c (1.2), "Exp", lines: +46 -0 Initial ulink (is this just a DocBook extension?) and link working. 2014-03-30 11:48 kristaps Added: extern.h (1.1) rules.c (1.1) Changed: Makefile (1.8), "Exp", lines: +6 -4 docbook2mdoc.c (1.13), "Exp", lines: +141 -390 Split out rules and enums (extern.h, rules.c). Add initial variable list support. Clarify role of who prints space/control character. 2014-03-29 22:48 tag VERSION_0_0_4 2014-03-29 22:48 kristaps Changed: Makefile (1.7), "Exp", lines: +1 -1 index.xml (1.3), "Exp", lines: +10 -1 Notes for new version. 2014-03-29 22:44 kristaps Changed: docbook2mdoc.c (1.12), "Exp", lines: +211 -16 Let there be attributes! Allow <arg> to properly have its attributes. Comma-separate multiple Nm in a refname div. Clean up error reporting. 2014-03-29 11:20 tag VERSION_0_0_3 2014-03-29 11:20 kristaps Changed: Makefile (1.6), "Exp", lines: +1 -1 Tweak. 2014-03-29 11:19 kristaps Changed: Makefile (1.5), "Exp", lines: +8 -5 Proper makefile operation. 2014-03-29 11:15 kristaps Changed: Makefile (1.4), "Exp", lines: +1 -1 Version. 2014-03-29 11:13 kristaps Added: as.xml (1.1) iovec.xml (1.1) ls.xml (1.1) printf.xml (1.1) Changed: Makefile (1.3), "Exp", lines: +16 -2 docbook2mdoc.c (1.11), "Exp", lines: +1 -3 index.xml (1.2), "Exp", lines: +8 -1 Add examples. Allow missing <parameter> in printing function prototype. 2014-03-29 10:56 kristaps Changed: docbook2mdoc.c (1.10), "Exp", lines: +109 -55 Make pnode_print() be sensitive to current line positions for nested inline macros. 2014-03-28 13:16 kristaps Changed: docbook2mdoc.c (1.9), "Exp", lines: +5 -2 Don't puke on empty or totally-bad files. 2014-03-28 12:11 kristaps Changed: docbook2mdoc.c (1.8), "Exp", lines: +80 -10 Documentation. Add <structname>. 2014-03-28 11:20 tag VERSION_0_0_2 2014-03-28 11:20 kristaps Added: docbook2mdoc.1 (1.1) index.xml (1.1) Changed: Makefile (1.2), "Exp", lines: +24 -1 Add documentation. 2014-03-28 10:37 kristaps Changed: docbook2mdoc.c (1.7), "Exp", lines: +40 -11 Emit bogus prologue if none found. 2014-03-28 10:08 kristaps Changed: docbook2mdoc.c (1.6), "Exp", lines: +24 -2 This patch needs work... make meta-less manpages work. 2014-03-28 10:03 kristaps Changed: docbook2mdoc.c (1.5), "Exp", lines: +4 -4 Quash regression where REFSECT1 was not recursed. 2014-03-28 10:00 kristaps Changed: docbook2mdoc.c (1.4), "Exp", lines: +143 -26 Add some more elements, simplify unlinking of children after running a custom node handler, strip leading whitespace from text children (thus making <element> <foo>bar</foo></element> not emit a spurrious initial child text). 2014-03-28 02:46 kristaps Changed: docbook2mdoc.c (1.3), "Exp", lines: +156 -14 More functions and prototypes. 2014-03-28 02:06 kristaps Changed: docbook2mdoc.c (1.2), "Exp", lines: +2 -2 CVS tag guard. 2014-03-28 02:04 tag VERSION_0 2014-03-28 02:04 kristaps Added: Makefile (1.1) docbook2mdoc.c (1.1) Initial revision 2014-03-28 02:04 kristaps Changed: Makefile (1.1.1.1), "Exp", lines: +0 -0 docbook2mdoc.c (1.1.1.1), "Exp", lines: +0 -0 [no log message]