projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CCL: fix use of "term" field in sub queries
[yaz-moved-to-github.git]
/
util
/
cql2pqf.c
diff --git
a/util/cql2pqf.c
b/util/cql2pqf.c
index
40aa034
..
e182db0
100644
(file)
--- a/
util/cql2pqf.c
+++ b/
util/cql2pqf.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
@@
-26,11
+26,12
@@
int main(int argc, char **argv)
char *query = 0;
char *fname = 0;
int reverse = 0;
char *query = 0;
char *fname = 0;
int reverse = 0;
+ int verbose = 1;
int ret;
char *arg;
int ret;
char *arg;
- while ((ret = options("n:r", argv, argc, &arg)) != -2)
+ while ((ret = options("n:rv", argv, argc, &arg)) != -2)
{
switch (ret)
{
{
switch (ret)
{
@@
-40,11
+41,14
@@
int main(int argc, char **argv)
else
query = arg;
break;
else
query = arg;
break;
+ case 'n':
+ iterations = atoi(arg);
+ break;
case 'r':
reverse = 1;
break;
case 'r':
reverse = 1;
break;
- case 'n':
- iterations = atoi(arg);
+ case 'v':
+ verbose = 1;
break;
default:
usage();
break;
default:
usage();
@@
-100,6
+104,8
@@
int main(int argc, char **argv)
if (query)
{
if (query)
{
+ if (verbose)
+ printf("Parsing CQL %s\n", query);
for (i = 0; i<iterations; i++)
r = cql_parser_string(cp, query);
}
for (i = 0; i<iterations; i++)
r = cql_parser_string(cp, query);
}