=================================================================== RCS file: /cvs/docbook2mdoc/parse.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -p -r1.24 -r1.25 --- docbook2mdoc/parse.c 2019/04/08 22:47:34 1.24 +++ docbook2mdoc/parse.c 2019/04/08 23:40:17 1.25 @@ -1,4 +1,4 @@ -/* $Id: parse.c,v 1.24 2019/04/08 22:47:34 schwarze Exp $ */ +/* $Id: parse.c,v 1.25 2019/04/08 23:40:17 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -409,8 +409,15 @@ xml_entity(struct parse *p, const char *name) 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) {