From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id e7639239 for ; Mon, 8 Apr 2019 18:40:47 -0500 (EST) Date: Mon, 8 Apr 2019 18:40:47 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: docbook2mdoc: implement file inclusion via the ENTITY SYSTEM mechanism X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: 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