const char *arg = args.argv[0];
if (*arg != '-' || !arg[1]) {
+ if (flags & PARSE_OPT_STOP_AT_NON_OPTION)
+ break;
args.out[args.cpidx++] = args.argv[0];
continue;
}
break;
case OPTION_INTEGER:
if (opts->flags & PARSE_OPT_OPTARG)
- pos += fprintf(stderr, " [<n>]");
+ pos += fprintf(stderr, "[<n>]");
else
pos += fprintf(stderr, " <n>");
break;
*(int *)(opt->value) = v;
return 0;
}
+
+int parse_opt_approxidate_cb(const struct option *opt, const char *arg,
+ int unset)
+{
+ *(unsigned long *)(opt->value) = approxidate(arg);
+ return 0;
+}