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

Diff for /src/usr.bin/tmux/options.c between version 1.12 and 1.13

version 1.12, 2015/02/18 15:32:37 version 1.13, 2015/10/27 15:58:42
Line 29 
Line 29 
  * a red-black tree.   * a red-black tree.
  */   */
   
   struct options {
           RB_HEAD(options_tree, options_entry) tree;
           struct options  *parent;
   };
   
   int     options_cmp(struct options_entry *, struct options_entry *);
   RB_PROTOTYPE(options_tree, options_entry, entry, options_cmp);
 RB_GENERATE(options_tree, options_entry, entry, options_cmp);  RB_GENERATE(options_tree, options_entry, entry, options_cmp);
   
 int  int
Line 37 
Line 44 
         return (strcmp(o1->name, o2->name));          return (strcmp(o1->name, o2->name));
 }  }
   
 void  struct options *
 options_init(struct options *oo, struct options *parent)  options_create(struct options *parent)
 {  {
           struct options *oo;
   
           oo = xcalloc(1, sizeof *oo);
         RB_INIT(&oo->tree);          RB_INIT(&oo->tree);
         oo->parent = parent;          oo->parent = parent;
           return (oo);
 }  }
   
 void  void
Line 57 
Line 68 
                         free(o->str);                          free(o->str);
                 free(o);                  free(o);
         }          }
           free(oo);
   }
   
   struct options_entry *
   options_first(struct options *oo)
   {
           return (RB_MIN(options_tree, &oo->tree));
   }
   
   struct options_entry *
   options_next(struct options_entry *o)
   {
           return (RB_NEXT(options_tree, &oo->tree, o));
 }  }
   
 struct options_entry *  struct options_entry *

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13