[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.52 and 1.53

version 1.52, 2010/06/21 01:46:36 version 1.53, 2010/07/14 18:37:49
Line 173 
Line 173 
 }  }
   
 struct winlink *  struct winlink *
 winlink_next_by_number(struct winlink *wl, int n)  winlink_next_by_number(struct winlink *wl, struct session *s, int n)
 {  {
         for (; n > 0; n--) {          for (; n > 0; n--) {
                 if ((wl = RB_NEXT(winlinks, wwl, wl)) == NULL)                  if ((wl = RB_NEXT(winlinks, wwl, wl)) == NULL)
                         break;                          wl = RB_MIN(winlinks, &s->windows);
         }          }
   
         return (wl);          return (wl);
 }  }
   
 struct winlink *  struct winlink *
 winlink_previous_by_number(struct winlink *wl, int n)  winlink_previous_by_number(struct winlink *wl, struct session *s, int n)
 {  {
         for (; n > 0; n--) {          for (; n > 0; n--) {
                 if ((wl = RB_PREV(winlinks, wwl, wl)) == NULL)                  if ((wl = RB_PREV(winlinks, wwl, wl)) == NULL)
                         break;                          wl = RB_MAX(winlinks, &s->windows);
         }          }
   
         return (wl);          return (wl);
Line 389 
Line 389 
                 n++;                  n++;
         }          }
         return (NULL);          return (NULL);
   }
   
   struct window_pane *
   window_pane_next_by_number(struct window *w, struct window_pane *wp, u_int n)
   {
           for (; n > 0; n--) {
                   if ((wp = TAILQ_NEXT(wp, entry)) == NULL)
                           wp = TAILQ_FIRST(&w->panes);
           }
   
           return (wp);
   }
   
   struct window_pane *
   window_pane_previous_by_number(struct window *w, struct window_pane *wp,
       u_int n)
   {
           for (; n > 0; n--) {
                   if ((wp = TAILQ_PREV(wp, window_panes, entry)) == NULL)
                           wp = TAILQ_LAST(&w->panes, window_panes);
           }
   
           return (wp);
 }  }
   
 u_int  u_int

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53