summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/sord_validate.c9
-rw-r--r--src/sordi.c10
3 files changed, 13 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index b0f1cda..4faa492 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,11 @@
sord (0.16.15) unstable; urgency=medium
+ * Fix command line help interface of sord_validate
* Fix dependencies in pkg-config file
* Override pkg-config dependency within meson
* Port sord_validate to pcre2
- -- David Robillard <d@drobilla.net> Fri, 07 Oct 2022 17:24:52 +0000
+ -- David Robillard <d@drobilla.net> Tue, 29 Nov 2022 19:50:26 +0000
sord (0.16.14) stable; urgency=medium
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();
diff --git a/src/sordi.c b/src/sordi.c
index ce5e4bf..05d8194 100644
--- a/src/sordi.c
+++ b/src/sordi.c
@@ -45,11 +45,11 @@ print_usage(const char* name, bool error)
fprintf(os, "Usage: %s [OPTION]... INPUT [BASE_URI]\n", name);
fprintf(os, "Load and re-serialise RDF data.\n");
fprintf(os, "Use - for INPUT to read from standard input.\n\n");
- fprintf(os, " -h Display this help and exit\n");
- fprintf(os, " -i SYNTAX Input syntax (`turtle' or `ntriples')\n");
- fprintf(os, " -o SYNTAX Output syntax (`turtle' or `ntriples')\n");
- fprintf(os, " -s INPUT Parse INPUT as string (terminates options)\n");
- fprintf(os, " -v Display version information and exit\n");
+ fprintf(os, " -h Display this help and exit.\n");
+ fprintf(os, " -i SYNTAX Input syntax (`turtle' or `ntriples').\n");
+ fprintf(os, " -o SYNTAX Output syntax (`turtle' or `ntriples').\n");
+ fprintf(os, " -s INPUT Parse INPUT as string (terminates options).\n");
+ fprintf(os, " -v Display version information and exit.\n");
return error ? 1 : 0;
}