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

Diff for /mandoc/roff.c between version 1.162 and 1.163

version 1.162, 2011/07/27 17:25:30 version 1.163, 2011/07/27 20:55:28
Line 1497  roff_setstr(struct roff *r, const char *name, const ch
Line 1497  roff_setstr(struct roff *r, const char *name, const ch
         if (NULL == n->val) {          if (NULL == n->val) {
                 n->val = mandoc_malloc(newch);                  n->val = mandoc_malloc(newch);
                 *n->val = '\0';                  *n->val = '\0';
                 n->valsz = newch - 1;  
                 oldch = 0;                  oldch = 0;
         } else {          } else {
                 oldch = n->valsz;                  oldch = n->valsz;
                 n->val = mandoc_realloc(n->val, n->valsz + newch);                  n->val = mandoc_realloc(n->val, oldch + newch);
                 n->valsz += newch - 1;  
         }          }
   
         /* Skip existing content in the destination buffer. */          /* Skip existing content in the destination buffer. */
Line 1522  roff_setstr(struct roff *r, const char *name, const ch
Line 1520  roff_setstr(struct roff *r, const char *name, const ch
         /* Append terminating bytes. */          /* Append terminating bytes. */
         if (multiline)          if (multiline)
                 *c++ = '\n';                  *c++ = '\n';
   
         *c = '\0';          *c = '\0';
           n->valsz = (int)(c - n->val);
 }  }
   
 static const char *  static const char *

Legend:
Removed from v.1.162  
changed lines
  Added in v.1.163

CVSweb