1 /* $Id: cql2xcql.c,v 1.5 2004-04-29 21:15:14 adam Exp $
2 Copyright (C) 2002-2004
5 This file is part of the YAZ toolkit.
14 #include <yaz/options.h>
16 int main(int argc, char **argv)
20 const char *fname = 0;
25 while ((ret = options("n:", argv, argc, &arg)) != -2)
33 iterations = atoi(arg);
38 cp = cql_parser_create();
42 for (i = 0; i<iterations; i++)
43 r = cql_parser_string(cp, fname);
46 r = cql_parser_stdio(cp, stdin);
48 fprintf (stderr, "Syntax error\n");
50 cql_to_xml_stdio(cql_parser_result(cp), stdout);
51 cql_parser_destroy(cp);