[BACK]Return to parse.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / docbook2mdoc

Diff for /docbook2mdoc/parse.c between version 1.58 and 1.60

version 1.58, 2019/05/02 04:09:26 version 1.60, 2019/05/07 23:41:48
Line 97  static const struct alias aliases[] = {
Line 97  static const struct alias aliases[] = {
         { "imageobject",        NODE_IGNORE },          { "imageobject",        NODE_IGNORE },
         { "indexterm",          NODE_DELETE },          { "indexterm",          NODE_DELETE },
         { "informaltable",      NODE_TABLE },          { "informaltable",      NODE_TABLE },
           { "jobtitle",           NODE_IGNORE },
         { "keycap",             NODE_KEYSYM },          { "keycap",             NODE_KEYSYM },
         { "keycode",            NODE_IGNORE },          { "keycode",            NODE_IGNORE },
         { "keycombo",           NODE_IGNORE },          { "keycombo",           NODE_IGNORE },
         { "mediaobject",        NODE_BLOCKQUOTE },          { "mediaobject",        NODE_BLOCKQUOTE },
           { "orgdiv",             NODE_IGNORE },
         { "orgname",            NODE_IGNORE },          { "orgname",            NODE_IGNORE },
         { "othercredit",        NODE_AUTHOR },          { "othercredit",        NODE_AUTHOR },
         { "othername",          NODE_PERSONNAME },          { "othername",          NODE_PERSONNAME },
Line 374  xml_entity(struct parse *p, const char *name)
Line 376  xml_entity(struct parse *p, const char *name)
         struct pnode            *n;          struct pnode            *n;
         const char              *ccp;          const char              *ccp;
         char                    *cp;          char                    *cp;
         unsigned int             codepoint;          long                     codepoint;
         enum pstate              pstate;          enum pstate              pstate;
   
         if (p->del > 0)          if (p->del > 0)
Line 419  xml_entity(struct parse *p, const char *name)
Line 421  xml_entity(struct parse *p, const char *name)
                         }                          }
                 }                  }
                 if (*name == '#') {                  if (*name == '#') {
                         codepoint = strtonum(name + 1, 0, 0x10ffff, &ccp);                          errno = 0;
                         if (ccp == NULL) {                          if (name[1] == 'x') {
                                   ccp = name + 2;
                                   codepoint = strtol(ccp, &cp, 16);
                           } else {
                                   ccp = name + 1;
                                   codepoint = strtol(ccp, &cp, 10);
                           }
                           if (*ccp != '\0' && *cp == '\0' && errno != ERANGE &&
                               codepoint >= 0 && codepoint <= 0x10ffff) {
                                 n = pnode_alloc(p->cur);                                  n = pnode_alloc(p->cur);
                                 xasprintf(&n->b, "\\[u%4.4X]", codepoint);                                  xasprintf(&n->b, "\\[u%4.4X]", codepoint);
                                 goto done;                                  goto done;

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.60

CVSweb