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

Diff for /src/usr.bin/tmux/status.c between version 1.190 and 1.191

version 1.190, 2019/03/18 09:46:42 version 1.191, 2019/03/18 11:58:40
Line 1510 
Line 1510 
         const char                              **layout, *value, *cp;          const char                              **layout, *value, *cp;
         const struct cmd_entry                  **cmdent;          const struct cmd_entry                  **cmdent;
         const struct options_table_entry         *oe;          const struct options_table_entry         *oe;
         u_int                                     items, idx;          u_int                                     idx;
         size_t                                    slen = strlen(s), valuelen;          size_t                                    slen = strlen(s), valuelen;
         struct options_entry                     *o;          struct options_entry                     *o;
           struct options_array_item                *a;
         const char                               *layouts[] = {          const char                               *layouts[] = {
                 "even-horizontal", "even-vertical", "main-horizontal",                  "even-horizontal", "even-vertical", "main-horizontal",
                 "main-vertical", "tiled", NULL                  "main-vertical", "tiled", NULL
Line 1538 
Line 1539 
                 }                  }
         }          }
         o = options_get_only(global_options, "command-alias");          o = options_get_only(global_options, "command-alias");
         if (o != NULL && options_array_size(o, &items) != -1) {          if (o != NULL) {
                 for (idx = 0; idx < items; idx++) {                  a = options_array_first(o);
                         value = options_array_get(o, idx);                  while (a != NULL) {
                           value = options_array_item_value(a);;
                         if (value == NULL || (cp = strchr(value, '=')) == NULL)                          if (value == NULL || (cp = strchr(value, '=')) == NULL)
                                 continue;                                  goto next;
   
                         valuelen = cp - value;                          valuelen = cp - value;
                         if (slen > valuelen || strncmp(value, s, slen) != 0)                          if (slen > valuelen || strncmp(value, s, slen) != 0)
                                 continue;                                  goto next;
   
                         list = xreallocarray(list, (*size) + 1, sizeof *list);                          list = xreallocarray(list, (*size) + 1, sizeof *list);
                         list[(*size)++] = xstrndup(value, valuelen);                          list[(*size)++] = xstrndup(value, valuelen);
   
                   next:
                           a = options_array_next(a);
                 }                  }
         }          }
         for (idx = 0; idx < (*size); idx++)          for (idx = 0; idx < (*size); idx++)

Legend:
Removed from v.1.190  
changed lines
  Added in v.1.191