version 1.48, 2021/08/27 17:25:55 |
version 1.49, 2021/09/02 07:11:03 |
|
|
struct args_value *value, *new_value; |
struct args_value *value, *new_value; |
u_int i; |
u_int i; |
|
|
|
cmd_log_argv(argc, argv, "%s", __func__); |
|
|
new_args = args_create(); |
new_args = args_create(); |
RB_FOREACH(entry, args_tree, &args->tree) { |
RB_FOREACH(entry, args_tree, &args->tree) { |
if (entry->count == 1) { |
if (TAILQ_EMPTY(&entry->values)) { |
args_set(new_args, entry->flag, NULL); |
for (i = 0; i < entry->count; i++) |
|
args_set(new_args, entry->flag, NULL); |
continue; |
continue; |
} |
} |
TAILQ_FOREACH(value, &entry->values, entry) { |
TAILQ_FOREACH(value, &entry->values, entry) { |
|
|
args_set(new_args, entry->flag, new_value); |
args_set(new_args, entry->flag, new_value); |
} |
} |
} |
} |
|
if (args->count == 0) |
|
return (new_args); |
new_args->count = args->count; |
new_args->count = args->count; |
new_args->values = xcalloc(args->count, sizeof *new_args->values); |
new_args->values = xcalloc(args->count, sizeof *new_args->values); |
for (i = 0; i < args->count; i++) { |
for (i = 0; i < args->count; i++) { |