aboutsummaryrefslogtreecommitdiffstats
path: root/tools/serd-sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/serd-sort.c')
-rw-r--r--tools/serd-sort.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/serd-sort.c b/tools/serd-sort.c
index deb79cb5..8ba99445 100644
--- a/tools/serd-sort.c
+++ b/tools/serd-sort.c
@@ -234,6 +234,9 @@ parse_option(OptionIter* const iter, Options* const opts)
int
main(const int argc, char* const* const argv)
{
+ char default_input[] = "-";
+ char* default_inputs[] = {default_input};
+
Options opts = {{"",
NULL,
4096u,
@@ -261,8 +264,8 @@ main(const int argc, char* const* const argv)
opts.inputs = argv + iter.a;
opts.n_inputs = argc - iter.a;
if (opts.n_inputs + (bool)opts.input_string == 0) {
- fprintf(stderr, "%s: missing input\n", argv[0]);
- return print_usage(argv[0], true);
+ opts.n_inputs = 1;
+ opts.inputs = default_inputs;
}
// Don't add prefixes to blank node labels if there is only one input