* docbook2mdoc: translate NODE_LINK to .Sx
@ 2019-03-22 16:51 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-03-22 16:51 UTC (permalink / raw)
To: source
Log Message:
-----------
translate NODE_LINK to .Sx
Modified Files:
--------------
docbook2mdoc:
docbook2mdoc.c
extern.h
Revision Data
-------------
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.57 -r1.58
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -79,6 +79,7 @@ static const char *attrkeys[ATTRKEY__MAX
"choice",
"close",
"id",
+ "linkend",
"open",
"rep"
};
@@ -1254,6 +1255,7 @@ static void
pnode_print(struct parse *p, struct pnode *pn)
{
struct pnode *pp;
+ struct pattr *ap;
char *cp;
int last, sv;
@@ -1361,6 +1363,16 @@ pnode_print(struct parse *p, struct pnod
assert(p->newln);
puts(".Sh LEGAL NOTICE");
break;
+ case (NODE_LINK):
+ TAILQ_FOREACH(ap, &pn->attrq, child)
+ if (ATTRKEY_LINKEND == ap->key)
+ break;
+ if (ap == NULL)
+ break;
+ pnode_printmopen(p);
+ printf("Sx %s\n", ap->rawval);
+ p->newln = 1;
+ return;
case (NODE_LITERAL):
pnode_printmopen(p);
fputs("Li", stdout);
Index: extern.h
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/extern.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lextern.h -Lextern.h -u -p -r1.29 -r1.30
--- extern.h
+++ extern.h
@@ -154,6 +154,7 @@ enum attrkey {
ATTRKEY_CHOICE = 0,
ATTRKEY_CLOSE,
ATTRKEY_ID,
+ ATTRKEY_LINKEND,
ATTRKEY_OPEN,
ATTRKEY_REP,
ATTRKEY__MAX
--
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-22 16:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 16:51 docbook2mdoc: translate NODE_LINK to .Sx 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).