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

Diff for /src/usr.bin/tmux/server.c between version 1.82 and 1.83

version 1.82, 2010/02/06 17:15:33 version 1.83, 2010/02/06 23:22:27
Line 115 
Line 115 
 {  {
         struct window_pane      *wp;          struct window_pane      *wp;
         int                      pair[2], retval;          int                      pair[2], retval;
         char                     rpathbuf[MAXPATHLEN];          char                     rpathbuf[MAXPATHLEN], *cause;
         struct timeval           tv;          struct timeval           tv;
         u_int                    i;          u_int                    i;
   
Line 169 
Line 169 
   
         retval = 0;          retval = 0;
         if (access(SYSTEM_CFG, R_OK) == 0)          if (access(SYSTEM_CFG, R_OK) == 0)
                 load_cfg(SYSTEM_CFG, NULL, &cfg_ncauses, &cfg_causes);                  load_cfg(SYSTEM_CFG, NULL, &cfg_causes);
         else if (errno != ENOENT) {          else if (errno != ENOENT) {
                 cfg_add_cause(&cfg_ncauses, &cfg_causes,                  cfg_add_cause(
                     "%s: %s", strerror(errno), SYSTEM_CFG);                      &cfg_causes, "%s: %s", strerror(errno), SYSTEM_CFG);
         }          }
         if (cfg_file != NULL)          if (cfg_file != NULL)
                 load_cfg(cfg_file, NULL, &cfg_ncauses, &cfg_causes);                  load_cfg(cfg_file, NULL, &cfg_causes);
   
         /*          /*
          * If there is a session already, put the current window and pane into           * If there is a session already, put the current window and pane into
          * more mode.           * more mode.
          */           */
         if (!ARRAY_EMPTY(&sessions) && cfg_ncauses != 0) {          if (!ARRAY_EMPTY(&sessions) && !ARRAY_EMPTY(&cfg_causes)) {
                 wp = ARRAY_FIRST(&sessions)->curw->window->active;                  wp = ARRAY_FIRST(&sessions)->curw->window->active;
                 window_pane_set_mode(wp, &window_more_mode);                  window_pane_set_mode(wp, &window_more_mode);
                 for (i = 0; i < cfg_ncauses; i++) {                  for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) {
                         window_more_add(wp, "%s", cfg_causes[i]);                          cause = ARRAY_ITEM(&cfg_causes, i);
                         xfree(cfg_causes[i]);                          window_more_add(wp, "%s", cause);
                           xfree(cause);
                 }                  }
                 xfree(cfg_causes);                  ARRAY_FREE(&cfg_causes);
                 cfg_ncauses = 0;  
         }          }
         cfg_finished = 1;          cfg_finished = 1;
   

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83