add --check and --config, better usage printing

This commit is contained in:
Julien Danjou 2008-02-04 14:48:44 +01:00
parent 35b4005b7a
commit b6a62e47ea
1 changed files with 8 additions and 1 deletions

View File

@ -194,7 +194,12 @@ static void __attribute__ ((noreturn))
exit_help(int exit_code)
{
FILE *outfile = (exit_code == EXIT_SUCCESS) ? stdout : stderr;
fprintf(outfile, "Usage: awesome [ -v | -h | -c configfile | -k ]\n");
fprintf(outfile,
"Usage: awesome [OPTION]\n\
-h, --help show help\n\
-v, --version show version\n\
-c, --config FILE configuration file to use\n\
-k, --check check configuration file syntax\n");
exit(exit_code);
}
@ -224,6 +229,8 @@ main(int argc, char *argv[])
{
{"help", 0, NULL, 'h'},
{"version", 0, NULL, 'v'},
{"check", 0, NULL, 'k'},
{"config", 0, NULL, 'c'},
{NULL, 0, NULL, 0}
};