X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/9e89d26a8e1378f17a19da072c5f7308ddaf24f1..53a4a6fdcc52280765216ff019cf77b85ec48c18:/server/dump.c diff --git a/server/dump.c b/server/dump.c index a28387c..85f9349 100644 --- a/server/dump.c +++ b/server/dump.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder. - * Copyright (C) 2004, 2005, 2007, 2008, 2011 Richard Kettlewell + * Copyright (C) 2004, 2005, 2007-2011 Richard Kettlewell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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();