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

Diff for /src/usr.bin/tmux/options-table.c between version 1.21 and 1.22

version 1.21, 2012/02/15 18:44:49 version 1.22, 2012/02/25 12:57:42
Line 569 
Line 569 
           .default_num = 0            .default_num = 0
         },          },
   
           { .name = "rate-limit",
             .type = OPTIONS_TABLE_NUMBER,
             .minimum = 0,
             .maximum = UINT_MAX,
             .default_num = 0
           },
   
         { .name = "remain-on-exit",          { .name = "remain-on-exit",
           .type = OPTIONS_TABLE_FLAG,            .type = OPTIONS_TABLE_FLAG,
           .default_num = 0            .default_num = 0
Line 731 
Line 738 
                 break;                  break;
         }          }
         return (out);          return (out);
   }
   
   /* Find an option. */
   int
   options_table_find(
       const char *optstr, const struct options_table_entry **table,
       const struct options_table_entry **oe)
   {
           static const struct options_table_entry *tables[] = {
                   server_options_table,
                   window_options_table,
                   session_options_table
           };
           const struct options_table_entry        *oe_loop;
           u_int                                    i;
   
           for (i = 0; i < nitems(tables); i++) {
                   for (oe_loop = tables[i]; oe_loop->name != NULL; oe_loop++) {
                           if (strncmp(oe_loop->name, optstr, strlen(optstr)) != 0)
                                   continue;
   
                           /* If already found, ambiguous. */
                           if (*oe != NULL)
                                   return (-1);
                           *oe = oe_loop;
                           *table = tables[i];
   
                           /* Bail now if an exact match. */
                           if (strcmp((*oe)->name, optstr) == 0)
                                   break;
                   }
           }
           return (0);
 }  }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22