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

Diff for /mandoc/eqn.c between version 1.18 and 1.19

version 1.18, 2011/07/21 14:13:00 version 1.19, 2011/07/21 15:21:13
Line 19 
Line 19 
 #endif  #endif
   
 #include <assert.h>  #include <assert.h>
   #include <limits.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 188  eqn_box(struct eqn_node *ep, struct eqn_box *last, str
Line 189  eqn_box(struct eqn_node *ep, struct eqn_box *last, str
 {  {
         size_t           sz;          size_t           sz;
         const char      *start;          const char      *start;
         int              c, i, nextc;          int              c, i, nextc, size;
         enum eqn_fontt   font;          enum eqn_fontt   font;
         struct eqn_box  *bp;          struct eqn_box  *bp;
   
Line 201  eqn_box(struct eqn_node *ep, struct eqn_box *last, str
Line 202  eqn_box(struct eqn_node *ep, struct eqn_box *last, str
         *sv = last;          *sv = last;
         nextc = 1;          nextc = 1;
         font = EQNFONT_NONE;          font = EQNFONT_NONE;
           size = EQN_DEFSIZE;
 again:  again:
         if (NULL == (start = eqn_nexttok(ep, &sz)))          if (NULL == (start = eqn_nexttok(ep, &sz)))
                 return(0);                  return(0);
Line 242  again:
Line 244  again:
                 goto again;                  goto again;
         }          }
   
         /* Exit this [hopefully] subexpression. */          if (sz == 4 && 0 == strncmp("size", start, 1)) {
                   if (NULL == (start = eqn_nexttok(ep, &sz)))
                           return(0);
                   size = mandoc_strntoi(start, sz, 10);
                   goto again;
           }
   
         if (sz == 1 && 0 == strncmp("}", start, 1))          if (sz == 1 && 0 == strncmp("}", start, 1))
                 return(1);                  return(1);
   
         bp = mandoc_calloc(1, sizeof(struct eqn_box));          bp = mandoc_calloc(1, sizeof(struct eqn_box));
         bp->font = font;          bp->font = font;
           bp->size = size;
   
         font = EQNFONT_NONE;          font = EQNFONT_NONE;
           size = EQN_DEFSIZE;
   
         if (nextc)          if (nextc)
                 last->child = bp;                  last->child = bp;

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

CVSweb