|
@@ -137,6 +137,11 @@ struct option {
|
|
{ .type = OPTION_STRING, .short_name = (s), .long_name = (l), \
|
|
{ .type = OPTION_STRING, .short_name = (s), .long_name = (l), \
|
|
.value = check_vtype(v, const char **), (a), .help = (h), \
|
|
.value = check_vtype(v, const char **), (a), .help = (h), \
|
|
.flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d) }
|
|
.flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d) }
|
|
|
|
+#define OPT_STRING_OPTARG_SET(s, l, v, os, a, h, d) \
|
|
|
|
+ { .type = OPTION_STRING, .short_name = (s), .long_name = (l), \
|
|
|
|
+ .value = check_vtype(v, const char **), (a), .help = (h), \
|
|
|
|
+ .flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d), \
|
|
|
|
+ .set = check_vtype(os, bool *)}
|
|
#define OPT_STRING_NOEMPTY(s, l, v, a, h) { .type = OPTION_STRING, .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), (a), .help = (h), .flags = PARSE_OPT_NOEMPTY}
|
|
#define OPT_STRING_NOEMPTY(s, l, v, a, h) { .type = OPTION_STRING, .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), (a), .help = (h), .flags = PARSE_OPT_NOEMPTY}
|
|
#define OPT_DATE(s, l, v, h) \
|
|
#define OPT_DATE(s, l, v, h) \
|
|
{ .type = OPTION_CALLBACK, .short_name = (s), .long_name = (l), .value = (v), .argh = "time", .help = (h), .callback = parse_opt_approxidate_cb }
|
|
{ .type = OPTION_CALLBACK, .short_name = (s), .long_name = (l), .value = (v), .argh = "time", .help = (h), .callback = parse_opt_approxidate_cb }
|