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

Diff for /src/usr.bin/tmux/Attic/cmd-set-window-option.c between version 1.5 and 1.6

version 1.5, 2009/07/14 20:20:04 version 1.6, 2009/07/15 07:50:34
Line 48 
Line 48 
 const char *set_option_clock_mode_style_list[] = {  const char *set_option_clock_mode_style_list[] = {
         "12", "24", NULL          "12", "24", NULL
 };  };
 const struct set_option_entry set_window_option_table[NSETWINDOWOPTION] = {  const struct set_option_entry set_window_option_table[] = {
         { "aggressive-resize", SET_OPTION_FLAG, 0, 0, NULL },          { "aggressive-resize", SET_OPTION_FLAG, 0, 0, NULL },
         { "automatic-rename", SET_OPTION_FLAG, 0, 0, NULL },          { "automatic-rename", SET_OPTION_FLAG, 0, 0, NULL },
         { "clock-mode-colour", SET_OPTION_COLOUR, 0, 0, NULL },          { "clock-mode-colour", SET_OPTION_COLOUR, 0, 0, NULL },
Line 70 
Line 70 
         { "window-status-bg", SET_OPTION_COLOUR, 0, 0, NULL },          { "window-status-bg", SET_OPTION_COLOUR, 0, 0, NULL },
         { "window-status-fg", SET_OPTION_COLOUR, 0, 0, NULL },          { "window-status-fg", SET_OPTION_COLOUR, 0, 0, NULL },
         { "xterm-keys", SET_OPTION_FLAG, 0, 0, NULL },          { "xterm-keys", SET_OPTION_FLAG, 0, 0, NULL },
           { NULL, 0, 0, 0, NULL }
 };  };
   
 int  int
Line 79 
Line 80 
         struct winlink                  *wl;          struct winlink                  *wl;
         struct client                   *c;          struct client                   *c;
         struct options                  *oo;          struct options                  *oo;
         const struct set_option_entry   *entry;          const struct set_option_entry   *entry, *opt;
         u_int                            i;          u_int                            i;
   
         if (data->chflags & CMD_CHFLAG('g'))          if (data->chflags & CMD_CHFLAG('g'))
Line 96 
Line 97 
         }          }
   
         entry = NULL;          entry = NULL;
         for (i = 0; i < NSETWINDOWOPTION; i++) {          for (opt = set_window_option_table; opt->name != NULL; opt++) {
                 if (strncmp(set_window_option_table[i].name,                  if (strncmp(opt->name, data->option, strlen(data->option)) != 0)
                     data->option, strlen(data->option)) != 0)  
                         continue;                          continue;
                 if (entry != NULL) {                  if (entry != NULL) {
                         ctx->error(ctx, "ambiguous option: %s", data->option);                          ctx->error(ctx, "ambiguous option: %s", data->option);
                         return (-1);                          return (-1);
                 }                  }
                 entry = &set_window_option_table[i];                  entry = opt;
   
                 /* Bail now if an exact match. */                  /* Bail now if an exact match. */
                 if (strcmp(entry->name, data->option) == 0)                  if (strcmp(entry->name, data->option) == 0)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6