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

Diff for /mandoc/eqn.c between version 1.21 and 1.22

version 1.21, 2011/07/21 23:42:28 version 1.22, 2011/07/22 00:16:37
Line 453  eqn_next(struct eqn_node *ep, char quote, size_t *sz, 
Line 453  eqn_next(struct eqn_node *ep, char quote, size_t *sz, 
 {  {
         char            *start, *next;          char            *start, *next;
         int              q, diff, lim;          int              q, diff, lim;
         size_t           ssz;          size_t           ssz, dummy;
         struct eqn_def  *def;          struct eqn_def  *def;
   
         if (NULL == sz)          if (NULL == sz)
                 sz = &ssz;                  sz = &dummy;
   
         lim = 0;          lim = 0;
         ep->rew = ep->cur;          ep->rew = ep->cur;
Line 482  again:
Line 482  again:
         }          }
   
         start = &ep->data[(int)ep->cur];          start = &ep->data[(int)ep->cur];
         next = q ? strchr(start, quote) : strchr(start, ' ');  
   
           if ( ! q) {
                   if ('{' == *start || '}' == *start)
                           ssz = 1;
                   else
                           ssz = strcspn(start + 1, " ~\"{}\t") + 1;
                   next = start + (int)ssz;
                   if ('\0' == *next)
                           next = NULL;
           } else
                   next = strchr(start, quote);
   
         if (NULL != next) {          if (NULL != next) {
                 *sz = (size_t)(next - start);                  *sz = (size_t)(next - start);
                 ep->cur += *sz;                  ep->cur += *sz;
                 if (q)                  if (q)
                         ep->cur++;                          ep->cur++;
                 while (' ' == ep->data[(int)ep->cur])                  while (' ' == ep->data[(int)ep->cur] ||
                                   '\t' == ep->data[(int)ep->cur] ||
                                   '~' == ep->data[(int)ep->cur])
                         ep->cur++;                          ep->cur++;
         } else {          } else {
                 if (q)                  if (q)

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

CVSweb