[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.43 and 1.44

version 1.43, 2017/04/22 10:22:39 version 1.44, 2017/05/17 15:20:23
Line 32 
Line 32 
 static enum cmd_retval  cmd_command_prompt_exec(struct cmd *,  static enum cmd_retval  cmd_command_prompt_exec(struct cmd *,
                             struct cmdq_item *);                              struct cmdq_item *);
   
 static int      cmd_command_prompt_callback(void *, const char *, int);  static int      cmd_command_prompt_callback(struct client *, void *,
                       const char *, int);
 static void     cmd_command_prompt_free(void *);  static void     cmd_command_prompt_free(void *);
   
 const struct cmd_entry cmd_command_prompt_entry = {  const struct cmd_entry cmd_command_prompt_entry = {
Line 48 
Line 49 
 };  };
   
 struct cmd_command_prompt_cdata {  struct cmd_command_prompt_cdata {
         struct client   *c;          int      flags;
         int              flags;  
   
         char            *inputs;          char    *inputs;
         char            *next_input;          char    *next_input;
   
         char            *prompts;          char    *prompts;
         char            *next_prompt;          char    *next_prompt;
   
         char            *template;          char    *template;
         int              idx;          int      idx;
 };  };
   
 static enum cmd_retval  static enum cmd_retval
Line 78 
Line 78 
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
   
         cdata = xcalloc(1, sizeof *cdata);          cdata = xcalloc(1, sizeof *cdata);
         cdata->c = c;  
   
         cdata->inputs = NULL;          cdata->inputs = NULL;
         cdata->next_input = NULL;          cdata->next_input = NULL;
Line 142 
Line 141 
 }  }
   
 static int  static int
 cmd_command_prompt_callback(void *data, const char *s, int done)  cmd_command_prompt_callback(struct client *c, void *data, const char *s,
       int done)
 {  {
         struct cmd_command_prompt_cdata *cdata = data;          struct cmd_command_prompt_cdata *cdata = data;
         struct client                   *c = cdata->c;  
         struct cmd_list                 *cmdlist;          struct cmd_list                 *cmdlist;
         struct cmdq_item                *new_item;          struct cmdq_item                *new_item;
         char                            *cause, *new_template, *prompt, *ptr;          char                            *cause, *new_template, *prompt, *ptr;
Line 193 
Line 192 
   
         if (!done)          if (!done)
                 free(new_template);                  free(new_template);
         if (c->prompt_callbackfn != cmd_command_prompt_callback)          if (c->prompt_inputcb != cmd_command_prompt_callback)
                 return (1);                  return (1);
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44