summaryrefslogtreecommitdiff
path: root/utils/rapper.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2010-04-28 21:31:54 -0700
committerDave Beckett <dave@dajobe.org>2010-04-28 21:31:54 -0700
commitf94fa561db05b21132b14a2b72f05b77e666c252 (patch)
tree1981b61e53e08e568359aadafb851894f08df8b3 /utils/rapper.c
parent6f08b46ddd34c95475fb7b80c0a07fbe7120ee86 (diff)
downloadraptor-f94fa561db05b21132b14a2b72f05b77e666c252.tar.gz
Replaced raptor_parser_set_strict() with RAPTOR_OPTION_STRICT
(raptor_parser_set_strict): Removed from public API and made static, internal. (raptor_parser_set_option): When RAPTOR_OPTION_STRICT is seen, call above function to set the values. Update rapper to remove the -m/--mode lax/strict favouring the -f strict option with boolean value.
Diffstat (limited to 'utils/rapper.c')
-rw-r--r--utils/rapper.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/utils/rapper.c b/utils/rapper.c
index 1b798b1c..08ac1678 100644
--- a/utils/rapper.c
+++ b/utils/rapper.c
@@ -184,7 +184,7 @@ relay_namespaces(void* user_data, raptor_namespace *nspace)
#endif
-#define GETOPT_STRING "cef:ghi:I:m:o:O:qrtvw"
+#define GETOPT_STRING "cef:ghi:I:o:O:qrtvw"
#ifdef HAVE_GETOPT_LONG
#define SHOW_NAMESPACES_FLAG 0x100
@@ -200,7 +200,6 @@ static const struct option long_options[] =
{"help", 0, 0, 'h'},
{"input", 1, 0, 'i'},
{"input-uri", 1, 0, 'I'},
- {"mode", 1, 0, 'm'},
{"output", 1, 0, 'o'},
{"output-uri", 1, 0, 'O'},
{"quiet", 0, 0, 'q'},
@@ -322,7 +321,6 @@ main(int argc, char *argv[])
raptor_uri *base_uri = NULL;
const char *syntax_name="rdfxml";
raptor_sequence* parser_options = NULL;
- int strict_mode = 0;
int trace = 0;
/* output variables - serializer */
@@ -538,25 +536,6 @@ main(int argc, char *argv[])
replace_newlines = 1;
break;
- case 'm':
- if(optarg) {
- if(!strcmp(optarg, "strict"))
- strict_mode = 1;
- else if(!strcmp(optarg, "lax"))
- strict_mode = 0;
- else {
- fprintf(stderr,
- "%s: invalid argument `%s' for `" HELP_ARG(m, mode) "'\n",
- program, optarg);
- fprintf(stderr,
- "Valid arguments are:\n"
- " - `lax'\n"
- " - `strict'\n");
- usage = 1;
- }
- }
- break;
-
case 'o':
if(optarg) {
if(raptor_world_is_serializer_name(world, optarg))
@@ -828,8 +807,6 @@ main(int argc, char *argv[])
raptor_world_set_log_handler(world, rdf_parser, rapper_log_handler);
- raptor_parser_set_strict(rdf_parser, strict_mode);
-
if(parser_options) {
option_value *fv;
while((fv = (option_value*)raptor_sequence_pop(parser_options))) {