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

Diff for /src/usr.bin/tmux/window.c between version 1.62 and 1.63

version 1.62, 2011/01/08 01:52:37 version 1.63, 2011/01/25 22:31:50
Line 123 
Line 123 
 }  }
   
 struct winlink *  struct winlink *
 winlink_add(struct winlinks *wwl, struct window *w, int idx)  winlink_add(struct winlinks *wwl, int idx)
 {  {
         struct winlink  *wl;          struct winlink  *wl;
   
Line 135 
Line 135 
   
         wl = xcalloc(1, sizeof *wl);          wl = xcalloc(1, sizeof *wl);
         wl->idx = idx;          wl->idx = idx;
         wl->window = w;  
         RB_INSERT(winlinks, wwl, wl);          RB_INSERT(winlinks, wwl, wl);
   
         w->references++;  
   
         return (wl);          return (wl);
 }  }
   
 void  void
   winlink_set_window(struct winlink *wl, struct window *w)
   {
           wl->window = w;
           w->references++;
   }
   
   void
 winlink_remove(struct winlinks *wwl, struct winlink *wl)  winlink_remove(struct winlinks *wwl, struct winlink *wl)
 {  {
         struct window   *w = wl->window;          struct window   *w = wl->window;
Line 153 
Line 157 
                 xfree(wl->status_text);                  xfree(wl->status_text);
         xfree(wl);          xfree(wl);
   
         if (w->references == 0)          if (w != NULL) {
                 fatal("bad reference count");                  if (w->references == 0)
         w->references--;                          fatal("bad reference count");
         if (w->references == 0)                  w->references--;
                 window_destroy(w);                  if (w->references == 0)
                           window_destroy(w);
           }
 }  }
   
 struct winlink *  struct winlink *

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63