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

Diff for /src/usr.bin/tmux/cmd-source-file.c between version 1.20 and 1.21

version 1.20, 2014/10/20 22:29:25 version 1.21, 2014/10/27 22:23:47
Line 28 
Line 28 
   
 enum cmd_retval cmd_source_file_exec(struct cmd *, struct cmd_q *);  enum cmd_retval cmd_source_file_exec(struct cmd *, struct cmd_q *);
   
 void            cmd_source_file_show(struct cmd_q *);  
 void            cmd_source_file_done(struct cmd_q *);  void            cmd_source_file_done(struct cmd_q *);
   
 const struct cmd_entry cmd_source_file_entry = {  const struct cmd_entry cmd_source_file_entry = {
Line 59 
Line 58 
                         free(cause);                          free(cause);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 ARRAY_ADD(&cfg_causes, cause);                  cfg_add_cause("%s", cause);
                   free(cause);
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case 0:          case 0:
                 if (cfg_references == 0)                  if (cfg_references == 0)
                         cmd_source_file_show(cmdq);                          cfg_print_causes(cmdq);
                 cmdq_free(cmdq1);                  cmdq_free(cmdq1);
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
         }          }
Line 76 
Line 76 
 }  }
   
 void  void
 cmd_source_file_show(struct cmd_q *cmdq)  
 {  
         u_int    i;  
         char    *cause;  
   
         for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) {  
                 cause = ARRAY_ITEM(&cfg_causes, i);  
                 cmdq_print(cmdq, "%s", cause);  
                 free(cause);  
         }  
         ARRAY_FREE(&cfg_causes);  
 }  
   
 void  
 cmd_source_file_done(struct cmd_q *cmdq1)  cmd_source_file_done(struct cmd_q *cmdq1)
 {  {
         struct cmd_q    *cmdq = cmdq1->data;          struct cmd_q    *cmdq = cmdq1->data;
Line 105 
Line 91 
                 return;                  return;
   
         if (cfg_references == 0)          if (cfg_references == 0)
                 cmd_source_file_show(cmdq);                  cfg_print_causes(cmdq);
         cmdq_continue(cmdq);          cmdq_continue(cmdq);
 }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21