[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.2 and 1.3

version 1.2, 2009/07/21 19:54:22 version 1.3, 2009/09/21 07:00:09
Line 53 
Line 53 
                 SPLAY_REMOVE(options_tree, &oo->tree, o);                  SPLAY_REMOVE(options_tree, &oo->tree, o);
                 xfree(o->name);                  xfree(o->name);
                 if (o->type == OPTIONS_STRING)                  if (o->type == OPTIONS_STRING)
                         xfree(o->value.string);                          xfree(o->str);
                 xfree(o);                  xfree(o);
         }          }
 }  }
Line 94 
Line 94 
         SPLAY_REMOVE(options_tree, &oo->tree, o);          SPLAY_REMOVE(options_tree, &oo->tree, o);
         xfree(o->name);          xfree(o->name);
         if (o->type == OPTIONS_STRING)          if (o->type == OPTIONS_STRING)
                 xfree(o->value.string);                  xfree(o->str);
         xfree(o);          xfree(o);
 }  }
   
Line 109 
Line 109 
                 o->name = xstrdup(name);                  o->name = xstrdup(name);
                 SPLAY_INSERT(options_tree, &oo->tree, o);                  SPLAY_INSERT(options_tree, &oo->tree, o);
         } else if (o->type == OPTIONS_STRING)          } else if (o->type == OPTIONS_STRING)
                 xfree(o->value.string);                  xfree(o->str);
   
         va_start(ap, fmt);          va_start(ap, fmt);
         o->type = OPTIONS_STRING;          o->type = OPTIONS_STRING;
         xvasprintf(&o->value.string, fmt, ap);          xvasprintf(&o->str, fmt, ap);
         va_end(ap);          va_end(ap);
 }  }
   
Line 126 
Line 126 
                 fatalx("missing option");                  fatalx("missing option");
         if (o->type != OPTIONS_STRING)          if (o->type != OPTIONS_STRING)
                 fatalx("option not a string");                  fatalx("option not a string");
         return (o->value.string);          return (o->str);
 }  }
   
 void  void
Line 139 
Line 139 
                 o->name = xstrdup(name);                  o->name = xstrdup(name);
                 SPLAY_INSERT(options_tree, &oo->tree, o);                  SPLAY_INSERT(options_tree, &oo->tree, o);
         } else if (o->type == OPTIONS_STRING)          } else if (o->type == OPTIONS_STRING)
                 xfree(o->value.string);                  xfree(o->str);
   
         o->type = OPTIONS_NUMBER;          o->type = OPTIONS_NUMBER;
         o->value.number = value;          o->num = value;
   
 }  }
   
Line 155 
Line 155 
                 fatalx("missing option");                  fatalx("missing option");
         if (o->type != OPTIONS_NUMBER)          if (o->type != OPTIONS_NUMBER)
                 fatalx("option not a number");                  fatalx("option not a number");
         return (o->value.number);          return (o->num);
 }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3