-/* $Id: cql2pqf.c,v 1.1 2003-01-06 08:20:27 adam Exp $
+/* $Id: cql2pqf.c,v 1.2 2003-06-04 09:45:00 adam Exp $
Copyright (C) 2002-2003
Index Data Aps
{
cql_transform_t ct;
int r;
+ int i, it = 1;
CQL_parser cp = cql_parser_create();
if (argc < 2)
{
- fprintf (stderr, "usage\n cqltransform <properties> [<query>]\n");
+ fprintf (stderr, "usage\n cqltransform <properties> [<query>] [interations]\n");
exit (1);
}
ct = cql_transform_open_fname(argv[1]);
fprintf (stderr, "failed to read properties %s\n", argv[1]);
exit (1);
}
- if (argc == 3)
+ if (argc >= 4)
+ it = atoi(argv[3]);
+
+ for (i = 0; i<it; i++)
+ {
+ if (argc >= 3)
r = cql_parser_string(cp, argv[2]);
else
r = cql_parser_stdio(cp, stdin);
+
if (r)
fprintf (stderr, "Syntax error\n");
else
printf ("Transform error %d %s\n", r, addinfo ? addinfo : "");
}
}
+ }
cql_transform_close(ct);
cql_parser_destroy(cp);
return 0;