source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: Minor improvements for some inline elements: * New aliases
@ 2019-04-14 14:00 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-04-14 14:00 UTC (permalink / raw)
  To: source

Log Message:
-----------
Minor improvements for some inline elements:
* New aliases <keycap> and <property>.
* Make <application> an alias for <command>.
* Ignore <keycode> and <returnvalue>.

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

Revision Data
-------------
Index: node.h
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/node.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lnode.h -Lnode.h -u -p -r1.23 -r1.24
--- node.h
+++ node.h
@@ -41,7 +41,6 @@ enum	nodeclass {
 enum	nodeid {
 	NODE_AFFILIATION,
 	NODE_APPENDIX,
-	NODE_APPLICATION,
 	NODE_ARG,
 	NODE_AUTHOR,
 	NODE_AUTHORGROUP,
Index: parse.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lparse.c -Lparse.c -u -p -r1.41 -r1.42
--- parse.c
+++ parse.c
@@ -71,6 +71,7 @@ struct	alias {
 static	const struct alias aliases[] = {
 	{ "acronym",		NODE_IGNORE },
 	{ "anchor",		NODE_DELETE },
+	{ "application",	NODE_COMMAND },
 	{ "article",		NODE_SECTION },
 	{ "articleinfo",	NODE_BOOKINFO },
 	{ "book",		NODE_SECTION },
@@ -86,15 +87,19 @@ static	const struct alias aliases[] = {
 	{ "glosslist",		NODE_VARIABLELIST },
 	{ "indexterm",		NODE_DELETE },
 	{ "informaltable",	NODE_TABLE },
+	{ "keycap",		NODE_KEYSYM },
+	{ "keycode",		NODE_IGNORE },
 	{ "othercredit",	NODE_AUTHOR },
 	{ "othername",		NODE_PERSONNAME },
 	{ "part",		NODE_SECTION },
 	{ "phrase",		NODE_IGNORE },
 	{ "primary",		NODE_DELETE },
+	{ "property",		NODE_PARAMETER },
 	{ "refsect1",		NODE_SECTION },
 	{ "refsect2",		NODE_SECTION },
 	{ "refsect3",		NODE_SECTION },
 	{ "refsection",		NODE_SECTION },
+	{ "returnvalue",	NODE_IGNORE },
 	{ "secondary",		NODE_DELETE },
 	{ "sect1",		NODE_SECTION },
 	{ "sect2",		NODE_SECTION },
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.119 -r1.120
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -1037,9 +1037,6 @@ pnode_print(struct format *f, struct pno
 		f->flags |= FMT_NOSPC;
 
 	switch (n->node) {
-	case NODE_APPLICATION:
-		macro_open(f, "Nm");
-		break;
 	case NODE_ARG:
 		pnode_printarg(f, n);
 		break;
Index: node.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/node.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lnode.c -Lnode.c -u -p -r1.13 -r1.14
--- node.c
+++ node.c
@@ -33,7 +33,6 @@ struct	nodeprop {
 static	const struct nodeprop properties[] = {
 	{ "affiliation",	CLASS_TRANS },
 	{ "appendix",		CLASS_BLOCK },
-	{ "application",	CLASS_LINE },
 	{ "arg",		CLASS_ENCL },
 	{ "author",		CLASS_LINE },
 	{ "authorgroup",	CLASS_BLOCK },
Index: statistics.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lstatistics.c -Lstatistics.c -u -p -r1.23 -r1.24
--- statistics.c
+++ statistics.c
@@ -351,7 +351,10 @@ main(int argc, char *argv[])
 		table_add("ROOT", "refentry");
 		table_add("acronym", "TEXT");
 		table_add("appendix", NULL);
+		table_add("application", "TEXT");
+		table_add("arg", "option");
 		table_add("article", NULL);
+		table_add("articleinfo", "date");
 		table_add("articleinfo", "pubdate");
 		table_add("articleinfo", "title");
 		table_add("author", "contrib");
@@ -370,14 +373,22 @@ main(int argc, char *argv[])
 		table_add("chapter", NULL);
 		table_add("citerefentry", "manvolnum");
 		table_add("citerefentry", "refentrytitle");
+		table_add("citetitle", "TEXT");
+		table_add("cmdsynopsis", "arg");
+		table_add("cmdsynopsis", "command");
+		table_add("cmdsynopsis", "group");
 		table_add("code", "TEXT");
+		table_add("command", "TEXT");
 		table_add("computeroutput", "TEXT");
 		table_add("constant", "TEXT");
 		table_add("date", "TEXT");
+		table_add("email", "TEXT");
 		table_add("emphasis", "TEXT");
 		table_add("entry", NULL);
 		table_add("errorname", "TEXT");
 		table_add("filename", "TEXT");
+		table_add("firstname", "TEXT");
+		table_add("firstterm", "TEXT");
 		table_add("funcdef", "function");
 		table_add("funcdef", "TEXT");
 		table_add("funcprototype", "funcdef");
@@ -395,10 +406,14 @@ main(int argc, char *argv[])
 		table_add("glossentry", "indexterm");
 		table_add("glosslist", "glossentry");
 		table_add("glossterm", "TEXT");
+		table_add("group", "arg");
 		table_add("indexterm", "primary");
 		table_add("indexterm", "secondary");
 		table_add("informaltable", "tgroup");
 		table_add("itemizedlist", "listitem");
+		table_add("keycap", "TEXT");
+		table_add("keycode", "TEXT");
+		table_add("keysym", "TEXT");
 		table_add("legalnotice", NULL);
 		table_add("link", NULL);
 		table_add("listitem", NULL);
@@ -408,24 +423,31 @@ main(int argc, char *argv[])
 		table_add("markup", "TEXT");
 		table_add("member", "TEXT");
 		table_add("note", NULL);
+		table_add("option", "TEXT");
 		table_add("orderedlist", "listitem");
 		table_add("othercredit", "contrib");
 		table_add("othercredit", "email");
 		table_add("othercredit", "firstname");
 		table_add("othercredit", "othername");
 		table_add("othercredit", "surname");
+		table_add("othername", "TEXT");
 		table_add("para", NULL);
 		table_add("paramdef", "parameter");
 		table_add("paramdef", "TEXT");
 		table_add("parameter", "TEXT");
+		table_add("personname", "firstname");
+		table_add("personname", "surname");
 		table_add("primary", NULL);
 		table_add("programlisting", NULL);
+		table_add("property", "TEXT");
 		table_add("pubdate", "TEXT");
+		table_add("quote", "TEXT");
 		table_add("refentry", "refentryinfo");
 		table_add("refentry", "refmeta");
 		table_add("refentry", "refnamediv");
 		table_add("refentry", "refsect1");
 		table_add("refentry", "refsynopsisdiv");
+		table_add("refentryinfo", "date");
 		table_add("refentrytitle", "TEXT");
 		table_add("refmeta", "manvolnum");
 		table_add("refmeta", "refentrytitle");
@@ -437,7 +459,10 @@ main(int argc, char *argv[])
 		table_add("refpurpose", "TEXT");
 		table_add("refsect1", NULL);
 		table_add("refsect2", NULL);
+		table_add("refsynopsisdiv", "cmdsynopsis");
 		table_add("refsynopsisdiv", "funcsynopsis");
+		table_add("replaceable", "TEXT");
+		table_add("returnvalue", "TEXT");
 		table_add("row", "entry");
 		table_add("screen", NULL);
 		table_add("secondary", NULL);
@@ -451,7 +476,9 @@ main(int argc, char *argv[])
 		table_add("simplelist", "member");
 		table_add("structfield", "TEXT");
 		table_add("structname", "TEXT");
+		table_add("surname", "TEXT");
 		table_add("symbol", "TEXT");
+		table_add("synopsis", "TEXT");
 		table_add("systemitem", "TEXT");
 		table_add("table", "tgroup");
 		table_add("table", "title");
@@ -468,6 +495,7 @@ main(int argc, char *argv[])
 		table_add("variablelist", "varlistentry");
 		table_add("varlistentry", "listitem");
 		table_add("varlistentry", "term");
+		table_add("varname", "TEXT");
 	}
 	table_add(NULL, NULL);
 
--
 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-14 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-14 14:00 docbook2mdoc: Minor improvements for some inline elements: * New aliases 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).