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

Diff for /src/usr.bin/tmux/paste.c between version 1.11 and 1.12

version 1.11, 2011/03/28 19:44:31 version 1.12, 2012/07/10 11:53:01
Line 19 
Line 19 
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/time.h>  #include <sys/time.h>
   
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <vis.h>  #include <vis.h>
   
Line 70 
Line 71 
         pb = ARRAY_FIRST(ps);          pb = ARRAY_FIRST(ps);
         ARRAY_REMOVE(ps, 0);          ARRAY_REMOVE(ps, 0);
   
         xfree(pb->data);          free(pb->data);
         xfree(pb);          free(pb);
   
         return (0);          return (0);
 }  }
Line 88 
Line 89 
         pb = ARRAY_ITEM(ps, idx);          pb = ARRAY_ITEM(ps, idx);
         ARRAY_REMOVE(ps, idx);          ARRAY_REMOVE(ps, idx);
   
         xfree(pb->data);          free(pb->data);
         xfree(pb);          free(pb);
   
         return (0);          return (0);
 }  }
Line 108 
Line 109 
   
         while (ARRAY_LENGTH(ps) >= limit) {          while (ARRAY_LENGTH(ps) >= limit) {
                 pb = ARRAY_LAST(ps);                  pb = ARRAY_LAST(ps);
                 xfree(pb->data);                  free(pb->data);
                 xfree(pb);                  free(pb);
                 ARRAY_TRUNC(ps, 1);                  ARRAY_TRUNC(ps, 1);
         }          }
   
Line 137 
Line 138 
                 return (-1);                  return (-1);
   
         pb = ARRAY_ITEM(ps, idx);          pb = ARRAY_ITEM(ps, idx);
         xfree(pb->data);          free(pb->data);
   
         pb->data = data;          pb->data = data;
         pb->size = size;          pb->size = size;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12