diff options
author | David Robillard <d@drobilla.net> | 2017-01-05 16:22:52 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-01-05 16:22:52 -0500 |
commit | 0c71ed6ce02ee7ff65a5da2cf863c5712a67cb4b (patch) | |
tree | 217344e3fac3b1f6cb8e116ef257cfa39835529f /src/serdi.c | |
parent | 4c6600603704454df7c3a21039111f195d2d0ff1 (diff) | |
download | serd-0c71ed6ce02ee7ff65a5da2cf863c5712a67cb4b.tar.gz serd-0c71ed6ce02ee7ff65a5da2cf863c5712a67cb4b.tar.bz2 serd-0c71ed6ce02ee7ff65a5da2cf863c5712a67cb4b.zip |
Add support for NQuads
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/serdi.c b/src/serdi.c index 953a3c0c..be52587c 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -1,5 +1,5 @@ /* - Copyright 2011-2016 David Robillard <http://drobilla.net> + Copyright 2011-2017 David Robillard <http://drobilla.net> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -33,7 +33,7 @@ static int print_version(void) { printf("serdi " SERD_VERSION " <http://drobilla.net/software/serd>\n"); - printf("Copyright 2011-2016 David Robillard <http://drobilla.net>.\n" + printf("Copyright 2011-2017 David Robillard <http://drobilla.net>.\n" "License: <http://www.opensource.org/licenses/isc>\n" "This is free software; you are free to change and redistribute it." "\nThere is NO WARRANTY, to the extent permitted by law.\n"); @@ -53,9 +53,9 @@ print_usage(const char* name, bool error) fprintf(os, " -e Eat input one character at a time.\n"); fprintf(os, " -f Keep full URIs in input (don't qualify).\n"); fprintf(os, " -h Display this help and exit.\n"); - fprintf(os, " -i SYNTAX Input syntax (`turtle' or `ntriples').\n"); + fprintf(os, " -i SYNTAX Input syntax (turtle, ntriples, or nquads).\n"); fprintf(os, " -l Lax (non-strict) parsing.\n"); - fprintf(os, " -o SYNTAX Output syntax (`turtle' or `ntriples').\n"); + fprintf(os, " -o SYNTAX Output syntax (turtle, ntriples, or nquads).\n"); fprintf(os, " -p PREFIX Add PREFIX to blank node IDs.\n"); fprintf(os, " -q Suppress all output except data.\n"); fprintf(os, " -r ROOT_URI Keep relative URIs within ROOT_URI.\n"); @@ -71,6 +71,8 @@ set_syntax(SerdSyntax* syntax, const char* name) *syntax = SERD_TURTLE; } else if (!strcmp(name, "ntriples")) { *syntax = SERD_NTRIPLES; + } else if (!strcmp(name, "nquads")) { + *syntax = SERD_NQUADS; } else { SERDI_ERRORF("unknown syntax `%s'\n", name); return false; |