From 97bc6ef58f364d2098101d372cf6e160a8f1cf0b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 24 Nov 2010 19:35:00 +0100 Subject: [PATCH] archived.c: moved usage string to static variable (more readable) --- src/archived.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/archived.c b/src/archived.c index b6fb6b9..d987cec 100644 --- a/src/archived.c +++ b/src/archived.c @@ -24,6 +24,11 @@ #include "log.h" #include "path.h" +static const char *archived_usage_str = + "Usage: archived [-c ] \n" + " config - path to the configuration file\n" + " Root Directory - Path to indexroot. All subdirectories will be indexed.\n"; + static dictionary *config = NULL; 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")) { rootdir = argv[1]; } else { - fprintf(stderr, "Usage: archived [-c ] \n" - "config - path to the configuration file\n" - "Root Directory - Path to indexroot. All subdirectories will be indexed.\n"); - + fputs(archived_usage_str, stderr); return EXIT_FAILURE; }