[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.8 and 1.9

version 1.8, 2010/02/06 17:15:33 version 1.9, 2010/02/06 23:22:27
Line 89 
Line 89 
 cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct cmd_source_file_data     *data = self->data;          struct cmd_source_file_data     *data = self->data;
         char                           **causes;          struct causelist                 causes;
         u_int                            i, ncauses;          char                            *cause;
           u_int                            i;
   
         causes = NULL;          ARRAY_INIT(&causes);
         ncauses = 0;          if (load_cfg(data->path, ctx, &causes) != 0) {
                   for (i = 0; i < ARRAY_LENGTH(&causes); i++) {
         if (load_cfg(data->path, ctx, &ncauses, &causes) != 0) {                          cause = ARRAY_ITEM(&causes, i);
                 for (i = 0; i < ncauses; i++) {                          ctx->print(ctx, "%s", cause);
                         ctx->print(ctx, "%s", causes[i]);                          xfree(cause);
                         xfree(causes[i]);  
                 }                  }
                 xfree(causes);                  ARRAY_FREE(&causes);
         }          }
   
         return (0);          return (0);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9