diff options
author | David Robillard <d@drobilla.net> | 2022-11-29 14:50:42 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-11-29 14:55:22 -0500 |
commit | d4e84d46c4bd488f83e93fa38d96be8aa4ee0775 (patch) | |
tree | b6e101ca873fd23ab7d19156caad89179d0cb3bd /src/sord_validate.c | |
parent | 676ce7d32d25cda0a60c8cad7a782e8f52391184 (diff) | |
download | sord-d4e84d46c4bd488f83e93fa38d96be8aa4ee0775.tar.gz sord-d4e84d46c4bd488f83e93fa38d96be8aa4ee0775.tar.bz2 sord-d4e84d46c4bd488f83e93fa38d96be8aa4ee0775.zip |
Fix command line help interface of sord_validate
Diffstat (limited to 'src/sord_validate.c')
-rw-r--r-- | src/sord_validate.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sord_validate.c b/src/sord_validate.c index 18f7486..51a3748 100644 --- a/src/sord_validate.c +++ b/src/sord_validate.c @@ -107,10 +107,11 @@ print_usage(const char* name, bool error) FILE* const os = error ? stderr : stdout; fprintf(os, "Usage: %s [OPTION]... INPUT...\n", name); fprintf(os, "Validate RDF data\n\n"); - fprintf(os, " -h Display this help and exit\n"); + fprintf(os, " -h Display this help and exit.\n"); fprintf(os, " -l Print errors on a single line.\n"); - fprintf(os, " -v Display version information and exit\n"); + fprintf(os, " -v Display version information and exit.\n"); fprintf(os, + "\n" "Validate RDF data. This is a simple validator which checks\n" "that all used properties are actually defined. It does not do\n" "any fancy file retrieval, the files passed on the command line\n" @@ -714,7 +715,9 @@ main(int argc, char** argv) int a = 1; for (; a < argc && argv[a][0] == '-'; ++a) { - if (argv[a][1] == 'l') { + if (argv[a][1] == 'h') { + return print_usage(argv[0], false); + } else if (argv[a][1] == 'l') { one_line_errors = true; } else if (argv[a][1] == 'v') { return print_version(); |