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

Diff for /src/usr.bin/tmux/Attic/cmd-show-buffer.c between version 1.8 and 1.9

version 1.8, 2009/12/03 22:50:10 version 1.9, 2010/12/30 23:16:18
Line 30 
Line 30 
   
 const struct cmd_entry cmd_show_buffer_entry = {  const struct cmd_entry cmd_show_buffer_entry = {
         "show-buffer", "showb",          "show-buffer", "showb",
         CMD_BUFFER_SESSION_USAGE,          CMD_BUFFER_USAGE,
         0, "",          0, "",
         cmd_buffer_init,          cmd_buffer_init,
         cmd_buffer_parse,          cmd_buffer_parse,
Line 49 
Line 49 
         size_t                   size, len;          size_t                   size, len;
         u_int                    width;          u_int                    width;
   
         if ((s = cmd_find_session(ctx, data->target)) == NULL)          if ((s = cmd_find_session(ctx, NULL)) == NULL)
                 return (-1);                  return (-1);
   
         if (data->buffer == -1) {          if (data->buffer == -1) {
                 if ((pb = paste_get_top(&s->buffers)) == NULL) {                  if ((pb = paste_get_top(&global_buffers)) == NULL) {
                         ctx->error(ctx, "no buffers");                          ctx->error(ctx, "no buffers");
                         return (-1);                          return (-1);
                 }                  }
         } else if ((pb = paste_get_index(&s->buffers, data->buffer)) == NULL) {          } else {
                 ctx->error(ctx, "no buffer %d", data->buffer);                  pb = paste_get_index(&global_buffers, data->buffer);
                 return (-1);                  if (pb == NULL) {
                           ctx->error(ctx, "no buffer %d", data->buffer);
                           return (-1);
                   }
         }          }
         if (pb == NULL)  
                 return (0);  
   
         size = pb->size;          size = pb->size;
         if (size > SIZE_MAX / 4 - 1)          if (size > SIZE_MAX / 4 - 1)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9