X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/8a886602880a1a0b65de4e062d4be178dee4d181..477b12ff719d3749b8d8f85035bd6384fee9be0d:/server/dump.c diff --git a/server/dump.c b/server/dump.c index 475fc81..d59eb6a 100644 --- a/server/dump.c +++ b/server/dump.c @@ -40,7 +40,7 @@ static const struct option options[] = { }; /* display usage message and terminate */ -static void help(void) { +static void attribute((noreturn)) help(void) { xprintf("Usage:\n" " disorder-dump [OPTIONS] --dump|--undump PATH\n" " disorder-dump [OPTIONS] --recompute-aliases\n" @@ -377,6 +377,8 @@ int main(int argc, char **argv) { FILE *fp; mem_init(); + if(!setlocale(LC_CTYPE, "")) + disorder_error(errno, "error calling setlocale"); while((n = getopt_long(argc, argv, "hVc:dDurRaPR", options, 0)) >= 0) { switch(n) { case 'h': help(); @@ -406,6 +408,7 @@ int main(int argc, char **argv) { disorder_fatal(0, "specify only a dump file name"); path = argv[optind]; } + config_per_user = 0; if(config_read(0, NULL)) disorder_fatal(0, "cannot read configuration"); if(dump) {