[BACK]Return to cfg.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cfg.c between version 1.25 and 1.26

version 1.25, 2013/03/22 15:49:55 version 1.26, 2013/03/22 15:50:13
Line 73 
Line 73 
  * causes. Note that causes must be initialised by the caller!   * causes. Note that causes must be initialised by the caller!
  */   */
 enum cmd_retval  enum cmd_retval
 load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)  load_cfg(const char *path, struct cmd_ctx *ctx, struct causelist *causes)
 {  {
         FILE            *f;          FILE            *f;
         u_int            n;          u_int            n;
         char            *buf, *copy, *line, *cause;          char            *buf, *copy, *line, *cause;
         size_t           len, oldlen;          size_t           len, oldlen;
         struct cmd_list *cmdlist;          struct cmd_list *cmdlist;
         struct cmd_ctx  *ctx;  
         enum cmd_retval  retval;          enum cmd_retval  retval;
   
         if ((f = fopen(path, "rb")) == NULL) {          if ((f = fopen(path, "rb")) == NULL) {
Line 90 
Line 89 
   
         cfg_references++;          cfg_references++;
   
         ctx = cmd_get_ctx();          if (ctx != NULL)
         if (ctxin == NULL) {                  cmd_ref_ctx(ctx);
                 ctx->msgdata = NULL;          else {
                 ctx->curclient = NULL;                  ctx = cmd_get_ctx();
                 ctx->cmdclient = NULL;                  ctx->error = cfg_error;
         } else {                  ctx->print = cfg_print;
                 ctx->msgdata = ctxin->msgdata;                  ctx->info = cfg_print;
                 ctx->curclient = ctxin->curclient;  
                 ctx->cmdclient = ctxin->cmdclient;  
         }          }
   
         ctx->error = cfg_error;  
         ctx->print = cfg_print;  
         ctx->info = cfg_print;  
   
         n = 0;          n = 0;
         line = NULL;          line = NULL;

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