source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: handle <computeroutput> and <markup>; patch from Stephen
@ 2019-04-12  7:05 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-04-12  7:05 UTC (permalink / raw)
  To: source

Log Message:
-----------
handle <computeroutput> and <markup>;
patch from Stephen Gregoratto <dev at sgregoratto dot me>
who found that both are frequently used in the doclifter manpage

Modified Files:
--------------
    docbook2mdoc:
        docbook2mdoc.c
        node.h
        parse.c
        statistics.c

Revision Data
-------------
Index: parse.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lparse.c -Lparse.c -u -p -r1.35 -r1.36
--- parse.c
+++ parse.c
@@ -89,6 +89,7 @@ static	const struct element elements[] =
 	{ "code",		NODE_LITERAL },
 	{ "colspec",		NODE_COLSPEC },
 	{ "command",		NODE_COMMAND },
+	{ "computeroutput",	NODE_LITERAL },
 	{ "constant",		NODE_CONSTANT },
 	{ "contrib",		NODE_CONTRIB },
 	{ "copyright",		NODE_COPYRIGHT },
@@ -134,6 +135,7 @@ static	const struct element elements[] =
 	{ "literal",		NODE_LITERAL },
 	{ "literallayout",	NODE_LITERALLAYOUT },
 	{ "manvolnum",		NODE_MANVOLNUM },
+	{ "markup",		NODE_MARKUP },
 	{ "member",		NODE_MEMBER },
 	{ "mml:math",		NODE_MML_MATH },
 	{ "mml:mfenced",	NODE_MML_MFENCED },
@@ -186,7 +188,7 @@ static	const struct element elements[] =
 	{ "sect1",		NODE_SECTION },
 	{ "sect2",		NODE_SECTION },
 	{ "section",		NODE_SECTION },
-	{ "sgmltag",		NODE_SGMLTAG },
+	{ "sgmltag",		NODE_MARKUP },
 	{ "simpara",		NODE_PARA },
 	{ "simplelist",		NODE_SIMPLELIST },
 	{ "spanspec",		NODE_SPANSPEC },
Index: node.h
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/node.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lnode.h -Lnode.h -u -p -r1.17 -r1.18
--- node.h
+++ node.h
@@ -82,6 +82,7 @@ enum	nodeid {
 	NODE_LITERAL,
 	NODE_LITERALLAYOUT,
 	NODE_MANVOLNUM,
+	NODE_MARKUP,
 	NODE_MEMBER,
 	NODE_MML_MATH,
 	NODE_MML_MFENCED,
@@ -123,7 +124,6 @@ enum	nodeid {
 	NODE_SBR,
 	NODE_SCREEN,
 	NODE_SECTION,
-	NODE_SGMLTAG,
 	NODE_SIMPLELIST,
 	NODE_SPANSPEC,
 	NODE_SUBTITLE,
Index: statistics.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lstatistics.c -Lstatistics.c -u -p -r1.18 -r1.19
--- statistics.c
+++ statistics.c
@@ -356,6 +356,7 @@ main(int argc, char *argv[])
 		table_add("book", NULL);
 		table_add("chapter", NULL);
 		table_add("code", "TEXT");
+		table_add("computeroutput", "TEXT");
 		table_add("constant", "TEXT");
 		table_add("emphasis", "TEXT");
 		table_add("entry", NULL);
@@ -387,6 +388,7 @@ main(int argc, char *argv[])
 		table_add("listitem", NULL);
 		table_add("literal", "TEXT");
 		table_add("literallayout", NULL);
+		table_add("markup", "TEXT");
 		table_add("member", "TEXT");
 		table_add("note", NULL);
 		table_add("orderedlist", "listitem");
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.105 -r1.106
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -914,6 +914,9 @@ pnode_print(struct format *f, struct pno
 		macro_argline(f, "Bd", pnode_getattr(n, ATTRKEY_CLASS) ==
 		    ATTRVAL_MONOSPACED ? "-literal" : "-unfilled");
 		break;
+	case NODE_MARKUP:
+		macro_open(f, "Ic");
+		break;
 	case NODE_MML_MFENCED:
 		pnode_printmathfenced(f, n);
 		break;
@@ -988,9 +991,6 @@ pnode_print(struct format *f, struct pno
 		break;
 	case NODE_SBR:
 		macro_line(f, "br");
-		break;
-	case NODE_SGMLTAG:
-		macro_open(f, "Ic");
 		break;
 	case NODE_TEXT:
 	case NODE_ESCAPE:
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

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

only message in thread, other threads:[~2019-04-12  7:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12  7:05 docbook2mdoc: handle <computeroutput> and <markup>; patch from Stephen schwarze

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