source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: implement file inclusion via the ENTITY SYSTEM mechanism
@ 2019-04-08 23:40 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-04-08 23:40 UTC (permalink / raw)
  To: source

Log Message:
-----------
implement file inclusion via the ENTITY SYSTEM mechanism

Modified Files:
--------------
    docbook2mdoc:
        parse.c

Revision Data
-------------
Index: parse.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lparse.c -Lparse.c -u -p -r1.24 -r1.25
--- parse.c
+++ parse.c
@@ -409,8 +409,15 @@ xml_entity(struct parse *p, const char *
 			TAILQ_FOREACH(dat, &p->doctype->childq, child) {
 				if ((ccp = pnode_getattr_raw(dat,
 				     ATTRKEY_NAME, NULL)) == NULL ||
-				    strcmp(ccp, name) != 0 ||
-				    (ccp = pnode_getattr_raw(dat,
+				    strcmp(ccp, name) != 0)
+					continue;
+				if ((ccp = pnode_getattr_raw(dat,
+				    ATTRKEY_SYSTEM, NULL)) != NULL) {
+					parse_file(p, -1, ccp);
+					p->flags &= ~PFLAG_SPC;
+					return;
+				}
+				if ((ccp = pnode_getattr_raw(dat,
 				     ATTRKEY_DEFINITION, NULL)) == NULL)
 					continue;
 				if ((cp = strdup(ccp)) == 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-08 23:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 23:40 docbook2mdoc: implement file inclusion via the ENTITY SYSTEM mechanism 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).