1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2011 Index Data
3 * See the file LICENSE for details.
13 #include <yaz/options.h>
15 static void usage(const char *prog)
17 fprintf(stderr, "%s: [-c] [-n iterations] [infile]\n", prog);
21 int main(int argc, char **argv)
25 const char *fname = 0;
28 int convert_to_ccl = 0;
32 while ((ret = options("cn:", argv, argc, &arg)) != -2)
43 iterations = atoi(arg);
50 cp = cql_parser_create();
54 for (i = 0; i<iterations; i++)
55 r = cql_parser_string(cp, fname);
58 r = cql_parser_stdio(cp, stdin);
60 fprintf (stderr, "Syntax error\n");
65 cql_to_ccl_stdio(cql_parser_result(cp), stdout);
69 cql_to_xml_stdio(cql_parser_result(cp), stdout);
71 cql_parser_destroy(cp);
77 * c-file-style: "Stroustrup"
78 * indent-tabs-mode: nil
80 * vim: shiftwidth=4 tabstop=8 expandtab