[BACK]Return to format.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/format.c between version 1.49 and 1.50

version 1.49, 2014/09/08 14:29:05 version 1.50, 2014/10/08 17:35:58
Line 267 
Line 267 
   
         /* Expand the buffer and copy in the value. */          /* Expand the buffer and copy in the value. */
         while (*len - *off < valuelen + 1) {          while (*len - *off < valuelen + 1) {
                 *buf = xrealloc(*buf, 2, *len);                  *buf = xreallocarray(*buf, 2, *len);
                 *len *= 2;                  *len *= 2;
         }          }
         memcpy(*buf + *off, value, valuelen);          memcpy(*buf + *off, value, valuelen);
Line 298 
Line 298 
         while (*fmt != '\0') {          while (*fmt != '\0') {
                 if (*fmt != '#') {                  if (*fmt != '#') {
                         while (len - off < 2) {                          while (len - off < 2) {
                                 buf = xrealloc(buf, 2, len);                                  buf = xreallocarray(buf, 2, len);
                                 len *= 2;                                  len *= 2;
                         }                          }
                         buf[off++] = *fmt++;                          buf[off++] = *fmt++;
Line 326 
Line 326 
                         continue;                          continue;
                 case '#':                  case '#':
                         while (len - off < 2) {                          while (len - off < 2) {
                                 buf = xrealloc(buf, 2, len);                                  buf = xreallocarray(buf, 2, len);
                                 len *= 2;                                  len *= 2;
                         }                          }
                         buf[off++] = '#';                          buf[off++] = '#';
Line 339 
Line 339 
                                 s = format_lower[ch - 'a'];                                  s = format_lower[ch - 'a'];
                         if (s == NULL) {                          if (s == NULL) {
                                 while (len - off < 3) {                                  while (len - off < 3) {
                                         buf = xrealloc(buf, 2, len);                                          buf = xreallocarray(buf, 2, len);
                                         len *= 2;                                          len *= 2;
                                 }                                  }
                                 buf[off++] = '#';                                  buf[off++] = '#';

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