source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: mark the first seven elements as ignored, shortening enum
@ 2019-03-26 21:52 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-03-26 21:52 UTC (permalink / raw)
  To: source

Log Message:
-----------
mark the first seven elements as ignored,
shortening enum nodeid, and in one case even pnode_print()

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

Revision Data
-------------
Index: node.h
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/node.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lnode.h -Lnode.h -u -p -r1.2 -r1.3
--- node.h
+++ node.h
@@ -29,9 +29,7 @@ enum	nodeid {
 	NODE_IGNORE = 0,  /* Must come first. */
 	NODE_WARN,
 	/* Alpha-ordered hereafter. */
-	NODE_ACRONYM,
 	NODE_AFFILIATION,
-	NODE_ANCHOR,
 	NODE_APPLICATION,
 	NODE_ARG,
 	NODE_AUTHOR,
@@ -56,7 +54,6 @@ enum	nodeid {
 	NODE_ENVAR,
 	NODE_FIELDSYNOPSIS,
 	NODE_FILENAME,
-	NODE_FIRSTNAME,
 	NODE_FIRSTTERM,
 	NODE_FOOTNOTE,
 	NODE_FUNCDEF,
@@ -96,12 +93,10 @@ enum	nodeid {
 	NODE_OPTION,
 	NODE_ORDEREDLIST,
 	NODE_ORGNAME,
-	NODE_OTHERNAME,
 	NODE_PARA,
 	NODE_PARAMDEF,
 	NODE_PARAMETER,
 	NODE_PERSONNAME,
-	NODE_PHRASE,
 	NODE_PREFACE,
 	NODE_PRIMARY,
 	NODE_PROGRAMLISTING,
@@ -131,7 +126,6 @@ enum	nodeid {
 	NODE_SPANSPEC,
 	NODE_STRUCTNAME,
 	NODE_SUBTITLE,
-	NODE_SURNAME,
 	NODE_SYNOPSIS,
 	NODE_TABLE,
 	NODE_TBODY,
@@ -142,7 +136,6 @@ enum	nodeid {
 	NODE_THEAD,
 	NODE_TIP,
 	NODE_TITLE,
-	NODE_TRADEMARK,
 	NODE_TYPE,
 	NODE_ULINK,
 	NODE_USERINPUT,
Index: parse.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lparse.c -Lparse.c -u -p -r1.2 -r1.3
--- parse.c
+++ parse.c
@@ -47,9 +47,9 @@ struct	element {
 };
 
 static	const struct element elements[] = {
-	{ "acronym",		NODE_ACRONYM },
+	{ "acronym",		NODE_IGNORE },
 	{ "affiliation",	NODE_AFFILIATION },
-	{ "anchor",		NODE_ANCHOR },
+	{ "anchor",		NODE_IGNORE },
 	{ "application",	NODE_APPLICATION },
 	{ "arg",		NODE_ARG },
 	{ "author",		NODE_AUTHOR },
@@ -75,7 +75,7 @@ static	const struct element elements[] =
 	{ "envar",		NODE_ENVAR },
 	{ "fieldsynopsis",	NODE_FIELDSYNOPSIS },
 	{ "filename",		NODE_FILENAME },
-	{ "firstname",		NODE_FIRSTNAME },
+	{ "firstname",		NODE_IGNORE },
 	{ "firstterm",		NODE_FIRSTTERM },
 	{ "footnote",		NODE_FOOTNOTE },
 	{ "funcdef",		NODE_FUNCDEF },
@@ -115,13 +115,13 @@ static	const struct element elements[] =
 	{ "option",		NODE_OPTION },
 	{ "orderedlist",	NODE_ORDEREDLIST },
 	{ "orgname",		NODE_ORGNAME },
-	{ "othername",		NODE_OTHERNAME },
+	{ "othername",		NODE_IGNORE },
 	{ "para",		NODE_PARA },
 	{ "paramdef",		NODE_PARAMDEF },
 	{ "parameter",		NODE_PARAMETER },
 	{ "part",		NODE_SECTION },
 	{ "personname",		NODE_PERSONNAME },
-	{ "phrase",		NODE_PHRASE },
+	{ "phrase",		NODE_IGNORE },
 	{ "preface",		NODE_PREFACE },
 	{ "primary",		NODE_PRIMARY },
 	{ "programlisting",	NODE_PROGRAMLISTING },
@@ -157,7 +157,7 @@ static	const struct element elements[] =
 	{ "spanspec",		NODE_SPANSPEC },
 	{ "structname",		NODE_STRUCTNAME },
 	{ "subtitle",		NODE_SUBTITLE },
-	{ "surname",		NODE_SURNAME },
+	{ "surname",		NODE_IGNORE },
 	{ "synopsis",		NODE_SYNOPSIS },
 	{ "table",		NODE_TABLE },
 	{ "tbody",		NODE_TBODY },
@@ -167,7 +167,7 @@ static	const struct element elements[] =
 	{ "thead",		NODE_THEAD },
 	{ "tip",		NODE_TIP },
 	{ "title",		NODE_TITLE },
-	{ "trademark",		NODE_TRADEMARK },
+	{ "trademark",		NODE_IGNORE },
 	{ "type",		NODE_TYPE },
 	{ "ulink",		NODE_ULINK },
 	{ "userinput",		NODE_USERINPUT },
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.75 -r1.76
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -559,9 +559,6 @@ pnode_print(struct format *p, struct pno
 	case NODE_APPLICATION:
 		macro_open(p, "Nm");
 		break;
-	case NODE_ANCHOR:
-		/* Don't print anything! */
-		return;
 	case NODE_ARG:
 		pnode_printarg(p, pn);
 		break;
--
 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-03-26 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 21:52 docbook2mdoc: mark the first seven elements as ignored, shortening enum 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).