[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.86 and 1.87

version 1.86, 2022/06/20 07:59:37 version 1.87, 2023/09/15 06:31:49
Line 67 
Line 67 
 {  {
         struct client    *c;          struct client    *c;
         u_int             i;          u_int             i;
           int               flags = 0;
   
         /*          /*
          * Configuration files are loaded without a client, so commands are run           * Configuration files are loaded without a client, so commands are run
Line 84 
Line 85 
                 cmdq_append(c, cfg_item);                  cmdq_append(c, cfg_item);
         }          }
   
         for (i = 0; i < cfg_nfiles; i++) {          if (cfg_quiet)
                 if (cfg_quiet)                  flags = CMD_PARSE_QUIET;
                         load_cfg(cfg_files[i], c, NULL, CMD_PARSE_QUIET, NULL);          for (i = 0; i < cfg_nfiles; i++)
                 else                  load_cfg(cfg_files[i], c, NULL, NULL, flags, NULL);
                         load_cfg(cfg_files[i], c, NULL, 0, NULL);  
         }  
   
         cmdq_append(NULL, cmdq_get_callback(cfg_done, NULL));          cmdq_append(NULL, cmdq_get_callback(cfg_done, NULL));
 }  }
   
 int  int
 load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags,  load_cfg(const char *path, struct client *c, struct cmdq_item *item,
     struct cmdq_item **new_item)      struct cmd_find_state *current, int flags, struct cmdq_item **new_item)
 {  {
         FILE                    *f;          FILE                    *f;
         struct cmd_parse_input   pi;          struct cmd_parse_input   pi;
Line 135 
Line 134 
         }          }
   
         if (item != NULL)          if (item != NULL)
                 state = cmdq_copy_state(cmdq_get_state(item));                  state = cmdq_copy_state(cmdq_get_state(item), current);
         else          else
                 state = cmdq_new_state(NULL, NULL, 0);                  state = cmdq_new_state(NULL, NULL, 0);
         cmdq_add_format(state, "current_file", "%s", pi.file);          cmdq_add_format(state, "current_file", "%s", pi.file);
Line 155 
Line 154 
   
 int  int
 load_cfg_from_buffer(const void *buf, size_t len, const char *path,  load_cfg_from_buffer(const void *buf, size_t len, const char *path,
     struct client *c, struct cmdq_item *item, int flags,      struct client *c, struct cmdq_item *item, struct cmd_find_state *current,
     struct cmdq_item **new_item)      int flags, struct cmdq_item **new_item)
 {  {
         struct cmd_parse_input   pi;          struct cmd_parse_input   pi;
         struct cmd_parse_result *pr;          struct cmd_parse_result *pr;
Line 187 
Line 186 
         }          }
   
         if (item != NULL)          if (item != NULL)
                 state = cmdq_copy_state(cmdq_get_state(item));                  state = cmdq_copy_state(cmdq_get_state(item), current);
         else          else
                 state = cmdq_new_state(NULL, NULL, 0);                  state = cmdq_new_state(NULL, NULL, 0);
         cmdq_add_format(state, "current_file", "%s", pi.file);          cmdq_add_format(state, "current_file", "%s", pi.file);

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.87