source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: For free, we get informaltable.
@ 2014-04-30  9:43 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2014-04-30  9:43 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-30  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30  9:43 docbook2mdoc: For free, we get informaltable kristaps

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).