version 1.43, 2021/08/21 20:46:43 |
version 1.44, 2021/08/21 20:57:52 |
|
|
}; |
}; |
|
|
struct args { |
struct args { |
struct args_tree tree; |
struct args_tree tree; |
u_int count; |
u_int count; |
struct args_value *values; |
struct args_value *values; |
}; |
}; |
|
|
RB_REMOVE(args_tree, &args->tree, entry); |
RB_REMOVE(args_tree, &args->tree, entry); |
TAILQ_FOREACH_SAFE(value, &entry->values, entry, value1) { |
TAILQ_FOREACH_SAFE(value, &entry->values, entry, value1) { |
TAILQ_REMOVE(&entry->values, value, entry); |
TAILQ_REMOVE(&entry->values, value, entry); |
free(value->string); |
args_free_value(value); |
free(value); |
free(value); |
} |
} |
free(entry); |
free(entry); |
|
|
const char * |
const char * |
args_string(struct args *args, u_int idx) |
args_string(struct args *args, u_int idx) |
{ |
{ |
if (idx >= (u_int)args->count) |
if (idx >= args->count) |
return (NULL); |
return (NULL); |
return (args_value_as_string(&args->values[idx])); |
return (args_value_as_string(&args->values[idx])); |
} |
} |