#include <stdarg.h>
#include <string.h>
#include <stdbool.h>
+#include <locale.h>
static const char *append_usage_str = "";
return false;
}
+static bool argconfig_check_human_readable(struct argconfig_commandline_options *s)
+{
+ for (; s && s->option; s++) {
+ if (!strcmp(s->option, "human-readable") && s->config_type == CFG_FLAG)
+ return s->seen;
+ }
+
+ return false;
+}
+
int argconfig_parse(int argc, char *argv[], const char *program_desc,
struct argconfig_commandline_options *options)
{
if (argconfig_check_output_format_json(options))
argconfig_output_format_json(true);
+ if (!argconfig_check_human_readable(options))
+ setlocale(LC_ALL, "C");
+
out:
free(short_opts);
free(long_opts);