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

Diff for /src/usr.bin/tmux/cmd-command-prompt.c between version 1.25 and 1.26

version 1.25, 2013/03/24 09:27:19 version 1.26, 2013/03/24 09:54:10
Line 31 
Line 31 
   
 void    cmd_command_prompt_key_binding(struct cmd *, int);  void    cmd_command_prompt_key_binding(struct cmd *, int);
 int     cmd_command_prompt_check(struct args *);  int     cmd_command_prompt_check(struct args *);
 enum cmd_retval cmd_command_prompt_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval cmd_command_prompt_exec(struct cmd *, struct cmd_q *);
   
 int     cmd_command_prompt_callback(void *, const char *);  int     cmd_command_prompt_callback(void *, const char *);
 void    cmd_command_prompt_free(void *);  void    cmd_command_prompt_free(void *);
Line 85 
Line 85 
 }  }
   
 enum cmd_retval  enum cmd_retval
 cmd_command_prompt_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_command_prompt_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args                     *args = self->args;          struct args                     *args = self->args;
         const char                      *inputs, *prompts;          const char                      *inputs, *prompts;
Line 94 
Line 94 
         char                            *prompt, *ptr, *input = NULL;          char                            *prompt, *ptr, *input = NULL;
         size_t                           n;          size_t                           n;
   
         if ((c = cmd_find_client(ctx, args_get(args, 't'), 0)) == NULL)          if ((c = cmd_find_client(cmdq, args_get(args, 't'), 0)) == NULL)
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
   
         if (c->prompt_string != NULL)          if (c->prompt_string != NULL)
Line 150 
Line 150 
         struct cmd_command_prompt_cdata *cdata = data;          struct cmd_command_prompt_cdata *cdata = data;
         struct client                   *c = cdata->c;          struct client                   *c = cdata->c;
         struct cmd_list                 *cmdlist;          struct cmd_list                 *cmdlist;
         struct cmd_ctx                  *ctx;  
         char                            *cause, *new_template, *prompt, *ptr;          char                            *cause, *new_template, *prompt, *ptr;
         char                            *input = NULL;          char                            *input = NULL;
   
Line 175 
Line 174 
                 return (1);                  return (1);
         }          }
   
         if (cmd_string_parse(new_template, &cmdlist, &cause) != 0) {          if (cmd_string_parse(new_template, &cmdlist, NULL, 0, &cause) != 0) {
                 if (cause != NULL) {                  if (cause != NULL) {
                         *cause = toupper((u_char) *cause);                          *cause = toupper((u_char) *cause);
                         status_message_set(c, "%s", cause);                          status_message_set(c, "%s", cause);
Line 184 
Line 183 
                 return (0);                  return (0);
         }          }
   
         ctx = cmd_get_ctx(NULL, c);          cmdq_run(c->cmdq, cmdlist);
         ctx->error = key_bindings_error;  
         ctx->print = key_bindings_print;  
         ctx->info = key_bindings_info;  
   
         cmd_list_exec(cmdlist, ctx);  
         cmd_list_free(cmdlist);          cmd_list_free(cmdlist);
         cmd_free_ctx(ctx);  
   
         if (c->prompt_callbackfn != (void *) &cmd_command_prompt_callback)          if (c->prompt_callbackfn != (void *) &cmd_command_prompt_callback)
                 return (1);                  return (1);

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26