Archived
1
0
Fork 0

archived.c: moved usage string to static variable (more readable)

This commit is contained in:
Henrik Hautakoski 2010-11-24 19:35:00 +01:00
parent 34cd74bcbf
commit 97bc6ef58f

View file

@ -24,6 +24,11 @@
#include "log.h" #include "log.h"
#include "path.h" #include "path.h"
static const char *archived_usage_str =
"Usage: archived [-c <config>] <Root Directory>\n"
" config - path to the configuration file\n"
" Root Directory - Path to indexroot. All subdirectories will be indexed.\n";
static dictionary *config = NULL; static dictionary *config = NULL;
static int load_config(const char *file) { static int load_config(const char *file) {
@ -116,10 +121,7 @@ int main(int argc, char **argv) {
} else if (argc > 1 && strcmp(argv[1], "-c")) { } else if (argc > 1 && strcmp(argv[1], "-c")) {
rootdir = argv[1]; rootdir = argv[1];
} else { } else {
fprintf(stderr, "Usage: archived [-c <config>] <Root Directory>\n" fputs(archived_usage_str, stderr);
"config - path to the configuration file\n"
"Root Directory - Path to indexroot. All subdirectories will be indexed.\n");
return EXIT_FAILURE; return EXIT_FAILURE;
} }