From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: docbook2mdoc: For free, we get informaltable.
Date: Wed, 30 Apr 2014 05:43:55 -0400 (EDT) [thread overview]
Message-ID: <201404300943.s3U9htGd028279@krisdoz.my.domain> (raw)
Log Message:
-----------
For free, we get informaltable.
Modified Files:
--------------
docbook2mdoc:
docbook2mdoc.c
rules.c
extern.h
Revision Data
-------------
Index: extern.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/extern.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lextern.h -Lextern.h -u -p -r1.19 -r1.20
--- extern.h
+++ extern.h
@@ -31,6 +31,7 @@ enum nodeid {
NODE_GROUP,
NODE_HOLDER,
NODE_INFO,
+ NODE_INFORMALTABLE,
NODE_ITEMIZEDLIST,
NODE_LINK,
NODE_LISTITEM,
Index: docbook2mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.34 -r1.35
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -111,6 +111,7 @@ static const struct node nodes[NODE__MAX
{ "group", NODE_IGNTEXT },
{ "holder", NODE_IGNTEXT },
{ "info", NODE_IGNTEXT },
+ { "informaltable", NODE_IGNTEXT },
{ "itemizedlist", NODE_IGNTEXT },
{ "link", 0 },
{ "listitem", NODE_IGNTEXT },
@@ -1236,6 +1237,8 @@ pnode_print(struct parse *p, struct pnod
fputs("Vt", stdout);
break;
case (NODE_TABLE):
+ /* FALLTHROUGH */
+ case (NODE_INFORMALTABLE):
assert(p->newln);
pnode_printtable(p, pn);
pnode_unlinksub(pn);
Index: rules.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/rules.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lrules.c -Lrules.c -u -p -r1.19 -r1.20
--- rules.c
+++ rules.c
@@ -446,6 +446,7 @@ isparent(enum nodeid node, enum nodeid p
case (NODE_CMDSYNOPSIS):
case (NODE_FUNCSYNOPSIS):
case (NODE_FUNCSYNOPSISINFO):
+ case (NODE_INFORMALTABLE):
case (NODE_ITEMIZEDLIST):
case (NODE_NOTE):
case (NODE_ORDEREDLIST):
@@ -978,6 +979,8 @@ isparent(enum nodeid node, enum nodeid p
break;
}
return(0);
+ case (NODE_INFORMALTABLE):
+ /* FALLTHROUGH */
case (NODE_TABLE):
switch (parent) {
case (NODE_CAUTION):
@@ -1005,12 +1008,20 @@ isparent(enum nodeid node, enum nodeid p
case (NODE_TFOOT):
return(NODE_TGROUP == parent);
case (NODE_TGROUP):
- return(NODE_TABLE == parent);
+ switch (parent) {
+ case (NODE_INFORMALTABLE):
+ case (NODE_TABLE):
+ return(1);
+ default:
+ break;
+ }
+ return(0);
case (NODE_THEAD):
return(NODE_TGROUP == parent);
case (NODE_TITLE):
switch (parent) {
case (NODE_INFO):
+ case (NODE_INFORMALTABLE):
case (NODE_ITEMIZEDLIST):
case (NODE_ORDEREDLIST):
case (NODE_REFENTRYINFO):
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2014-04-30 9:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201404300943.s3U9htGd028279@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).