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

Diff for /docbook2mdoc/parse.c between version 1.48 and 1.49

version 1.48, 2019/04/21 14:48:11 version 1.49, 2019/04/23 14:01:55
Line 383  xml_entity(struct parse *p, const char *name)
Line 383  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;
         enum pstate              pstate;          enum pstate              pstate;
   
         if (p->del > 0)          if (p->del > 0)
Line 427  xml_entity(struct parse *p, const char *name)
Line 428  xml_entity(struct parse *p, const char *name)
                                 return;                                  return;
                         }                          }
                 }                  }
                   if (*name == '#') {
                           codepoint = strtonum(name + 1, 0, 0x10ffff, &ccp);
                           if (ccp == NULL) {
                                   if ((n = pnode_alloc(p->cur)) == NULL ||
                                       asprintf(&n->b, "\\[u%4.4X]",
                                       codepoint) < 0)
                                           fatal(p);
                                   goto done;
                           }
                   }
                 error_msg(p, "unknown entity &%s;", name);                  error_msg(p, "unknown entity &%s;", name);
                 return;                  return;
         }          }
Line 435  xml_entity(struct parse *p, const char *name)
Line 446  xml_entity(struct parse *p, const char *name)
         if ((n = pnode_alloc(p->cur)) == NULL ||          if ((n = pnode_alloc(p->cur)) == NULL ||
             (n->b = strdup(entity->roff)) == NULL)              (n->b = strdup(entity->roff)) == NULL)
                 fatal(p);                  fatal(p);
   done:
         n->node = NODE_ESCAPE;          n->node = NODE_ESCAPE;
         n->spc = (p->flags & PFLAG_SPC) != 0;          n->spc = (p->flags & PFLAG_SPC) != 0;
         p->flags &= ~PFLAG_SPC;          p->flags &= ~PFLAG_SPC;

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

CVSweb