[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.23 and 1.24

version 1.23, 2014/10/20 22:29:25 version 1.24, 2014/10/20 22:44:30
Line 27 
Line 27 
  */   */
   
 enum cmd_retval  cmd_list_keys_exec(struct cmd *, struct cmd_q *);  enum cmd_retval  cmd_list_keys_exec(struct cmd *, struct cmd_q *);
   
 enum cmd_retval  cmd_list_keys_table(struct cmd *, struct cmd_q *);  enum cmd_retval  cmd_list_keys_table(struct cmd *, struct cmd_q *);
   enum cmd_retval  cmd_list_keys_commands(struct cmd *, struct cmd_q *);
   
 const struct cmd_entry cmd_list_keys_entry = {  const struct cmd_entry cmd_list_keys_entry = {
         "list-keys", "lsk",          "list-keys", "lsk",
Line 37 
Line 39 
         cmd_list_keys_exec          cmd_list_keys_exec
 };  };
   
   const struct cmd_entry cmd_list_commands_entry = {
           "list-commands", "lscm",
           "", 0, 0,
           "",
           0,
           cmd_list_keys_exec
   };
   
 enum cmd_retval  enum cmd_retval
 cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
Line 47 
Line 57 
         size_t                   used;          size_t                   used;
         int                      width, keywidth;          int                      width, keywidth;
   
           if (self->entry == &cmd_list_commands_entry)
                   return (cmd_list_keys_commands(self, cmdq));
   
         if (args_has(args, 't'))          if (args_has(args, 't'))
                 return (cmd_list_keys_table(self, cmdq));                  return (cmd_list_keys_table(self, cmdq));
   
Line 143 
Line 156 
                             mbind->arg != NULL ? mbind->arg : "",                              mbind->arg != NULL ? mbind->arg : "",
                             mbind->arg != NULL ? "\"": "");                              mbind->arg != NULL ? "\"": "");
                 }                  }
           }
   
           return (CMD_RETURN_NORMAL);
   }
   
   enum cmd_retval
   cmd_list_keys_commands(unused struct cmd *self, struct cmd_q *cmdq)
   {
           const struct cmd_entry  **entryp;
           struct cmd_entry         *entry;
   
           for (entryp = cmd_table; *entryp != NULL; entryp++) {
                   entry = *entryp;
                   if (entry->alias == NULL) {
                           cmdq_print(cmdq, "%s %s", entry->name, entry->usage);
                           continue;
                   }
                   cmdq_print(cmdq, "%s (%s) %s", entry->name, entry->alias,
                       entry->usage);
         }          }
   
         return (CMD_RETURN_NORMAL);          return (CMD_RETURN_NORMAL);

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24