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

Diff for /docbook2mdoc/macro.c between version 1.4 and 1.5

version 1.4, 2019/04/03 13:42:35 version 1.5, 2019/04/03 15:04:03
Line 153  macro_argline(struct format *f, const char *name, cons
Line 153  macro_argline(struct format *f, const char *name, cons
 void  void
 macro_addnode(struct format *f, struct pnode *pn, int flags)  macro_addnode(struct format *f, struct pnode *pn, int flags)
 {  {
           struct pnode    *nc;
         int              quote_now;          int              quote_now;
   
         assert(f->linestate == LINE_MACRO);          assert(f->linestate == LINE_MACRO);
Line 162  macro_addnode(struct format *f, struct pnode *pn, int 
Line 163  macro_addnode(struct format *f, struct pnode *pn, int 
          * that text, letting macro_addarg() decide about quoting.           * that text, letting macro_addarg() decide about quoting.
          */           */
   
         if (pn->node == NODE_TEXT || pn->node == NODE_ESCAPE ||          while ((nc = TAILQ_FIRST(&pn->childq)) != NULL &&
             ((pn = TAILQ_FIRST(&pn->childq)) != NULL &&              TAILQ_NEXT(nc, child) == NULL)
              (pn->node == NODE_TEXT || pn->node == NODE_ESCAPE) &&                  pn = nc;
              TAILQ_NEXT(pn, child) == NULL)) {  
           if (pn->node == NODE_TEXT || pn->node == NODE_ESCAPE) {
                 macro_addarg(f, pn->b, flags);                  macro_addarg(f, pn->b, flags);
                 return;                  return;
         }          }
Line 194  macro_addnode(struct format *f, struct pnode *pn, int 
Line 196  macro_addnode(struct format *f, struct pnode *pn, int 
          * inserting whitespace between nodes.           * inserting whitespace between nodes.
          */           */
   
         while (pn != NULL) {          while (nc != NULL) {
                 macro_addnode(f, pn, flags);                  macro_addnode(f, nc, flags);
                 pn = TAILQ_NEXT(pn, child);                  nc = TAILQ_NEXT(nc, child);
                 flags |= ARG_SPACE;                  flags |= ARG_SPACE;
         }          }
         if (quote_now)          if (quote_now)

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVSweb