* docbook2mdoc: Various in-line elements: Translate <errorname> to .Er.
@ 2019-04-03 17:53 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-04-03 17:53 UTC (permalink / raw)
To: source
Log Message:
-----------
Various in-line elements:
Translate <errorname> to .Er.
Translate <sgmltag> to .Ic.
Translate <literal> to .Ql, avoiding .Li.
Map <code> and <userinput> to <literal>.
Map <structname> to <type>.
Map <structfield> to <parameter>.
Modified Files:
--------------
docbook2mdoc:
docbook2mdoc.c
node.h
parse.c
statistics.c
Revision Data
-------------
Index: node.h
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/node.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lnode.h -Lnode.h -u -p -r1.8 -r1.9
--- node.h
+++ node.h
@@ -42,7 +42,6 @@ enum nodeid {
NODE_CITEREFENTRY,
NODE_CITETITLE,
NODE_CMDSYNOPSIS,
- NODE_CODE,
NODE_COLSPEC,
NODE_COMMAND,
NODE_CONSTANT,
@@ -54,6 +53,7 @@ enum nodeid {
NODE_EMPHASIS,
NODE_ENTRY,
NODE_ENVAR,
+ NODE_ERRORNAME,
NODE_ESCAPE,
NODE_FIELDSYNOPSIS,
NODE_FILENAME,
@@ -123,7 +123,6 @@ enum nodeid {
NODE_SGMLTAG,
NODE_SIMPLELIST,
NODE_SPANSPEC,
- NODE_STRUCTNAME,
NODE_SUBTITLE,
NODE_SYNOPSIS,
NODE_TABLE,
@@ -137,7 +136,6 @@ enum nodeid {
NODE_TITLE,
NODE_TYPE,
NODE_ULINK,
- NODE_USERINPUT,
NODE_VARIABLELIST,
NODE_VARLISTENTRY,
NODE_VARNAME,
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.89 -r1.90
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -666,9 +666,6 @@ pnode_print(struct format *p, struct pno
case NODE_CITETITLE:
macro_open(p, "%T");
break;
- case NODE_CODE:
- macro_open(p, "Li");
- break;
case NODE_COMMAND:
macro_open(p, "Nm");
break;
@@ -689,6 +686,9 @@ pnode_print(struct format *p, struct pno
case NODE_ENVAR:
macro_open(p, "Ev");
break;
+ case NODE_ERRORNAME:
+ macro_open(p, "Er");
+ break;
case NODE_ESCAPE:
if (p->linestate == LINE_NEW)
p->linestate = LINE_TEXT;
@@ -735,7 +735,7 @@ pnode_print(struct format *p, struct pno
macro_argline(p, "Sx", ccp);
return;
case NODE_LITERAL:
- macro_open(p, "Li");
+ macro_open(p, "Ql");
break;
case NODE_LITERALLAYOUT:
macro_argline(p, "Bd", pnode_getattr(pn, ATTRKEY_CLASS) ==
@@ -813,10 +813,7 @@ pnode_print(struct format *p, struct pno
macro_line(p, "br");
break;
case NODE_SGMLTAG:
- macro_open(p, "Li");
- break;
- case NODE_STRUCTNAME:
- macro_open(p, "Vt");
+ macro_open(p, "Ic");
break;
case NODE_TEXT:
if (pn->bsz == 0) {
@@ -876,9 +873,6 @@ pnode_print(struct format *p, struct pno
case NODE_TYPE:
macro_open(p, "Vt");
break;
- case NODE_USERINPUT:
- macro_open(p, "Li");
- break;
case NODE_VARIABLELIST:
pnode_printvariablelist(p, pn);
break;
@@ -913,13 +907,13 @@ pnode_print(struct format *p, struct pno
case NODE_AUTHOR:
case NODE_CITEREFENTRY:
case NODE_CITETITLE:
- case NODE_CODE:
case NODE_COMMAND:
case NODE_CONSTANT:
case NODE_EDITOR:
case NODE_EMAIL:
case NODE_EMPHASIS:
case NODE_ENVAR:
+ case NODE_ERRORNAME:
case NODE_FILENAME:
case NODE_FIRSTTERM:
case NODE_FUNCTION:
@@ -931,9 +925,7 @@ pnode_print(struct format *p, struct pno
case NODE_REPLACEABLE:
case NODE_REFPURPOSE:
case NODE_SGMLTAG:
- case NODE_STRUCTNAME:
case NODE_TYPE:
- case NODE_USERINPUT:
case NODE_VARNAME:
if (sv != LINE_MACRO && p->linestate == LINE_MACRO)
macro_closepunct(p, pn);
Index: statistics.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lstatistics.c -Lstatistics.c -u -p -r1.11 -r1.12
--- statistics.c
+++ statistics.c
@@ -349,20 +349,28 @@ main(int argc, char *argv[])
/* Exclude relations that are already fully implemented. */
if (show_all == 0) {
table_add("ROOT", "refentry");
+ table_add("acronym", "TEXT");
table_add("chapter", NULL);
+ table_add("code", "TEXT");
table_add("constant", "TEXT");
table_add("emphasis", "TEXT");
table_add("entry", NULL);
+ table_add("errorname", "TEXT");
+ table_add("filename", "TEXT");
table_add("funcdef", "function");
table_add("funcdef", "TEXT");
table_add("funcprototype", "funcdef");
table_add("funcprototype", "paramdef");
+ table_add("funcsynopsis", "funcprototype");
+ table_add("funcsynopsis", "funcsynopsisinfo");
+ table_add("funcsynopsisinfo", "TEXT");
table_add("function", "TEXT");
table_add("indexterm", "primary");
table_add("indexterm", "secondary");
table_add("informaltable", "tgroup");
table_add("itemizedlist", "listitem");
table_add("listitem", NULL);
+ table_add("literal", "TEXT");
table_add("literallayout", NULL);
table_add("orderedlist", "listitem");
table_add("para", NULL);
@@ -392,6 +400,9 @@ main(int argc, char *argv[])
table_add("sect2", NULL);
table_add("sect3", NULL);
table_add("sect4", NULL);
+ table_add("sgmltag", "TEXT");
+ table_add("structfield", "TEXT");
+ table_add("structname", "TEXT");
table_add("symbol", "TEXT");
table_add("table", "tgroup");
table_add("table", "title");
@@ -402,6 +413,8 @@ main(int argc, char *argv[])
table_add("tgroup", "thead");
table_add("thead", "row");
table_add("title", "TEXT");
+ table_add("type", "TEXT");
+ table_add("userinput", "TEXT");
table_add("variablelist", "varlistentry");
table_add("varlistentry", "listitem");
table_add("varlistentry", "term");
Index: parse.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lparse.c -Lparse.c -u -p -r1.12 -r1.13
--- parse.c
+++ parse.c
@@ -69,7 +69,7 @@ static const struct element elements[] =
{ "citerefentry", NODE_CITEREFENTRY },
{ "citetitle", NODE_CITETITLE },
{ "cmdsynopsis", NODE_CMDSYNOPSIS },
- { "code", NODE_CODE },
+ { "code", NODE_LITERAL },
{ "colspec", NODE_COLSPEC },
{ "command", NODE_COMMAND },
{ "constant", NODE_CONSTANT },
@@ -81,6 +81,7 @@ static const struct element elements[] =
{ "emphasis", NODE_EMPHASIS },
{ "entry", NODE_ENTRY },
{ "envar", NODE_ENVAR },
+ { "errorname", NODE_ERRORNAME },
{ "fieldsynopsis", NODE_FIELDSYNOPSIS },
{ "filename", NODE_FILENAME },
{ "firstname", NODE_PERSONNAME },
@@ -163,7 +164,8 @@ static const struct element elements[] =
{ "sgmltag", NODE_SGMLTAG },
{ "simplelist", NODE_SIMPLELIST },
{ "spanspec", NODE_SPANSPEC },
- { "structname", NODE_STRUCTNAME },
+ { "structfield", NODE_PARAMETER },
+ { "structname", NODE_TYPE },
{ "subtitle", NODE_SUBTITLE },
{ "surname", NODE_PERSONNAME },
{ "symbol", NODE_CONSTANT },
@@ -179,7 +181,7 @@ static const struct element elements[] =
{ "trademark", NODE_IGNORE },
{ "type", NODE_TYPE },
{ "ulink", NODE_ULINK },
- { "userinput", NODE_USERINPUT },
+ { "userinput", NODE_LITERAL },
{ "variablelist", NODE_VARIABLELIST },
{ "varlistentry", NODE_VARLISTENTRY },
{ "varname", NODE_VARNAME },
--
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-03 17:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 17:53 docbook2mdoc: Various in-line elements: Translate <errorname> to .Er 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).