From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: docbook2mdoc: mark the first seven elements as ignored, shortening enum
Date: Tue, 26 Mar 2019 16:52:39 -0500 (EST) [thread overview]
Message-ID: <e3fcc25e3581e33c@fantadrom.bsd.lv> (raw)
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
reply other threads:[~2019-03-26 21:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3fcc25e3581e33c@fantadrom.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).