[BACK]Return to cmd-list-panes.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-list-panes.c between version 1.1 and 1.2

version 1.1, 2009/10/10 17:19:38 version 1.2, 2009/10/15 07:05:38
Line 47 
Line 47 
         struct window_pane      *wp;          struct window_pane      *wp;
         struct grid             *gd;          struct grid             *gd;
         struct grid_line        *gl;          struct grid_line        *gl;
         u_int                    i;          u_int                    i, n;
         unsigned long long       size;          unsigned long long       size;
         const char              *name;  
   
         if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)          if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
                 return (-1);                  return (-1);
   
           n = 0;
         TAILQ_FOREACH(wp, &wl->window->panes, entry) {          TAILQ_FOREACH(wp, &wl->window->panes, entry) {
                 gd = wp->base.grid;                  gd = wp->base.grid;
   
Line 65 
Line 65 
                 }                  }
                 size += gd->hsize * sizeof *gd->linedata;                  size += gd->hsize * sizeof *gd->linedata;
   
                 name = NULL;                  ctx->print(ctx, "%u: [%ux%u] [history %u/%u, %llu bytes]",
                 if (wp->fd != -1)                      n, wp->sx, wp->sy, gd->hsize, gd->hlimit, size);
                         name = ttyname(wp->fd);                  n++;
                 if (name == NULL)  
                         name = "unknown";  
                 ctx->print(ctx, "%s [%ux%u] [history %u/%u, %llu bytes]",  
                     name, wp->sx, wp->sy, gd->hsize, gd->hlimit, size);  
         }          }
   
         return (0);          return (0);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2