From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: docbook2mdoc: implement file inclusion via the ENTITY SYSTEM mechanism
Date: Mon, 8 Apr 2019 18:40:47 -0500 (EST) [thread overview]
Message-ID: <e3fd82d20de0834c@fantadrom.bsd.lv> (raw)
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
reply other threads:[~2019-04-08 23:40 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=e3fd82d20de0834c@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).