From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: docbook2mdoc: Add trademark, format constant.
Date: Wed, 30 Apr 2014 05:26:10 -0400 (EDT) [thread overview]
Message-ID: <201404300926.s3U9QALX014507@krisdoz.my.domain> (raw)
Log Message:
-----------
Add trademark, format constant.
Modified Files:
--------------
docbook2mdoc:
docbook2mdoc.c
extern.h
rules.c
Revision Data
-------------
Index: extern.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/extern.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lextern.h -Lextern.h -u -p -r1.18 -r1.19
--- extern.h
+++ extern.h
@@ -76,6 +76,7 @@ enum nodeid {
NODE_THEAD,
NODE_TIP,
NODE_TITLE,
+ NODE_TRADEMARK,
NODE_ULINK,
NODE_USERINPUT,
NODE_VARIABLELIST,
Index: docbook2mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.32 -r1.33
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -156,6 +156,7 @@ static const struct node nodes[NODE__MAX
{ "thead", NODE_IGNTEXT },
{ "tip", NODE_IGNTEXT },
{ "title", 0 },
+ { "trademark", 0 },
{ "ulink", 0 },
{ "userinput", 0 },
{ "variablelist", NODE_IGNTEXT },
@@ -944,6 +945,7 @@ pnode_printvarlistentry(struct parse *p,
assert(p->newln);
TAILQ_FOREACH(pp, &pn->childq, child)
if (NODE_TERM == pp->node) {
+ assert(p->newln);
fputs(".It", stdout);
p->newln = 0;
pnode_print(p, pp);
@@ -1097,6 +1099,10 @@ pnode_print(struct parse *p, struct pnod
pnode_printmopen(p);
fputs("Nm", stdout);
break;
+ case (NODE_CONSTANT):
+ pnode_printmopen(p);
+ fputs("Dv", stdout);
+ break;
case (NODE_EMPHASIS):
pnode_printmopen(p);
fputs("Em", stdout);
@@ -1305,6 +1311,7 @@ pnode_print(struct parse *p, struct pnod
case (NODE_ARG):
case (NODE_CODE):
case (NODE_COMMAND):
+ case (NODE_CONSTANT):
case (NODE_EMPHASIS):
case (NODE_ENVAR):
case (NODE_FILENAME):
Index: rules.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/rules.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lrules.c -Lrules.c -u -p -r1.18 -r1.19
--- rules.c
+++ rules.c
@@ -524,6 +524,7 @@ isparent(enum nodeid node, enum nodeid p
case (NODE_SCREEN):
case (NODE_SYNOPSIS):
case (NODE_TERM):
+ case (NODE_TRADEMARK):
case (NODE_ULINK):
case (NODE_USERINPUT):
case (NODE_VARNAME):
@@ -853,6 +854,7 @@ isparent(enum nodeid node, enum nodeid p
case (NODE_SYNOPSIS):
case (NODE_TERM):
case (NODE_TITLE):
+ case (NODE_TRADEMARK):
case (NODE_ULINK):
case (NODE_USERINPUT):
case (NODE_VARNAME):
@@ -1045,6 +1047,30 @@ isparent(enum nodeid node, enum nodeid p
case (NODE_TIP):
case (NODE_VARIABLELIST):
case (NODE_WARNING):
+ return(1);
+ default:
+ break;
+ }
+ return(0);
+ case (NODE_TRADEMARK):
+ switch (parent) {
+ case (NODE_ACRONYM):
+ case (NODE_EMPHASIS):
+ case (NODE_ENTRY):
+ case (NODE_FUNCSYNOPSISINFO):
+ case (NODE_LINK):
+ case (NODE_ULINK):
+ case (NODE_PARA):
+ case (NODE_PROGRAMLISTING):
+ case (NODE_QUOTE):
+ case (NODE_REFDESCRIPTOR):
+ case (NODE_REFENTRYTITLE):
+ case (NODE_REFNAME):
+ case (NODE_REFPURPOSE):
+ case (NODE_SCREEN):
+ case (NODE_SYNOPSIS):
+ case (NODE_TERM):
+ case (NODE_TITLE):
return(1);
default:
break;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2014-04-30 9:26 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=201404300926.s3U9QALX014507@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@mdocml.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).