/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include static void usage(const char *prog) { fprintf(stderr, "%s: [-c] [-n iterations] [-s] [-S] [infile]\n", prog); exit(1); } int main(int argc, char **argv) { CQL_parser cp; int r = 0; const char *fname = 0; int iterations = 1; int ret; int convert_to_ccl = 0; char *arg; char *prog = argv[0]; int do_sortkeys = 0; int do_strict = 0; while ((ret = options("cn:sS", argv, argc, &arg)) != YAZ_OPTIONS_EOF) { switch (ret) { case 0: fname = arg; break; case 'c': convert_to_ccl = 1; break; case 'n': iterations = atoi(arg); break; 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; for (i = 0; i