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

Diff for /src/usr.bin/tmux/cmd-list-keys.c between version 1.12 and 1.13

version 1.12, 2010/10/20 18:20:36 version 1.13, 2011/01/04 00:42:46
Line 32 
Line 32 
   
 const struct cmd_entry cmd_list_keys_entry = {  const struct cmd_entry cmd_list_keys_entry = {
         "list-keys", "lsk",          "list-keys", "lsk",
           "t:", 0, 0,
         "[-t key-table]",          "[-t key-table]",
         0, "",          0,
         cmd_target_init,          NULL,
         cmd_target_parse,          NULL,
         cmd_list_keys_exec,          cmd_list_keys_exec
         cmd_target_free,  
         cmd_target_print  
 };  };
   
 int  int
 cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct cmd_target_data  *data = self->data;          struct args             *args = self->args;
         struct key_binding      *bd;          struct key_binding      *bd;
         const char              *key;          const char              *key;
         char                     tmp[BUFSIZ];          char                     tmp[BUFSIZ];
         size_t                   used;          size_t                   used;
         int                      width, keywidth;          int                      width, keywidth;
   
         if (data->target != NULL)          if (args_has(args, 't'))
                 return (cmd_list_keys_table(self, ctx));                  return (cmd_list_keys_table(self, ctx));
   
         width = 0;          width = 0;
Line 95 
Line 94 
 int  int
 cmd_list_keys_table(struct cmd *self, struct cmd_ctx *ctx)  cmd_list_keys_table(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct cmd_target_data          *data = self->data;          struct args                     *args = self->args;
           const char                      *tablename;
         const struct mode_key_table     *mtab;          const struct mode_key_table     *mtab;
         struct mode_key_binding         *mbind;          struct mode_key_binding         *mbind;
         const char                      *key, *cmdstr, *mode;          const char                      *key, *cmdstr, *mode;
         int                              width, keywidth;          int                              width, keywidth;
   
         if ((mtab = mode_key_findtable(data->target)) == NULL) {          tablename = args_get(args, 't');
                 ctx->error(ctx, "unknown key table: %s", data->target);          if ((mtab = mode_key_findtable(tablename)) == NULL) {
                   ctx->error(ctx, "unknown key table: %s", tablename);
                 return (-1);                  return (-1);
         }          }
   

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