version 1.7, 2012/01/21 11:12:13 |
version 1.8, 2012/07/10 11:53:01 |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
#include <stdarg.h> |
#include <stdarg.h> |
|
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
#include "tmux.h" |
#include "tmux.h" |
|
|
while (!RB_EMPTY(&oo->tree)) { |
while (!RB_EMPTY(&oo->tree)) { |
o = RB_ROOT(&oo->tree); |
o = RB_ROOT(&oo->tree); |
RB_REMOVE(options_tree, &oo->tree, o); |
RB_REMOVE(options_tree, &oo->tree, o); |
xfree(o->name); |
free(o->name); |
if (o->type == OPTIONS_STRING) |
if (o->type == OPTIONS_STRING) |
xfree(o->str); |
free(o->str); |
xfree(o); |
free(o); |
} |
} |
} |
} |
|
|
|
|
return; |
return; |
|
|
RB_REMOVE(options_tree, &oo->tree, o); |
RB_REMOVE(options_tree, &oo->tree, o); |
xfree(o->name); |
free(o->name); |
if (o->type == OPTIONS_STRING) |
if (o->type == OPTIONS_STRING) |
xfree(o->str); |
free(o->str); |
xfree(o); |
free(o); |
} |
} |
|
|
struct options_entry *printflike3 |
struct options_entry *printflike3 |
|
|
o->name = xstrdup(name); |
o->name = xstrdup(name); |
RB_INSERT(options_tree, &oo->tree, o); |
RB_INSERT(options_tree, &oo->tree, o); |
} else if (o->type == OPTIONS_STRING) |
} else if (o->type == OPTIONS_STRING) |
xfree(o->str); |
free(o->str); |
|
|
va_start(ap, fmt); |
va_start(ap, fmt); |
o->type = OPTIONS_STRING; |
o->type = OPTIONS_STRING; |
|
|
o->name = xstrdup(name); |
o->name = xstrdup(name); |
RB_INSERT(options_tree, &oo->tree, o); |
RB_INSERT(options_tree, &oo->tree, o); |
} else if (o->type == OPTIONS_STRING) |
} else if (o->type == OPTIONS_STRING) |
xfree(o->str); |
free(o->str); |
|
|
o->type = OPTIONS_NUMBER; |
o->type = OPTIONS_NUMBER; |
o->num = value; |
o->num = value; |