X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fcql2xcql.c;h=6407dfc581972498ddf687a62a28373a568cc8eb;hp=8016fbb9946f1323805374958e85f0600ed06bb8;hb=d51b21c6f41a021f21078921a0de50106264d55e;hpb=5242cb5a8634bfa38b9333ff7f903e718ac6e292 diff --git a/util/cql2xcql.c b/util/cql2xcql.c index 8016fbb..6407dfc 100644 --- a/util/cql2xcql.c +++ b/util/cql2xcql.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H @@ -15,7 +15,7 @@ static void usage(const char *prog) { - fprintf(stderr, "%s: [-c] [-n iterations] [-s] [infile]\n", prog); + fprintf(stderr, "%s: [-c] [-n iterations] [-s] [-S] [infile]\n", prog); exit(1); } @@ -30,8 +30,9 @@ int main(int argc, char **argv) char *arg; char *prog = argv[0]; int do_sortkeys = 0; + int do_strict = 0; - while ((ret = options("cn:s", argv, argc, &arg)) != YAZ_OPTIONS_EOF) + while ((ret = options("cn:sS", argv, argc, &arg)) != YAZ_OPTIONS_EOF) { switch (ret) { @@ -47,12 +48,16 @@ int main(int argc, char **argv) case 's': do_sortkeys = 1; break; + case 'S': + do_strict = 1; + break; default: usage(prog); } } cp = cql_parser_create(); + cql_parser_strict(cp, do_strict); if (fname) { int i;