/*
- * Copyright (c) 1995-2002, Index Data.
+ * Copyright (c) 1995-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: pquery.c,v 1.17 2002-09-02 13:59:07 adam Exp $
+ * $Id: pquery.c,v 1.20 2003-01-06 08:20:29 adam Exp $
*/
#include <stdio.h>
char *right_sep;
int escape_char;
int term_type;
+ int external_type;
int error;
};
break;
case Z_Term_characterString:
term->which = Z_Term_characterString;
- term->u.characterString = term_octet->buf; /* null terminated above */
+ term->u.characterString = (char*) term_octet->buf;
+ /* null terminated above */
break;
case Z_Term_numeric:
term->which = Z_Term_numeric;
- term->u.numeric = odr_intdup (o, atoi(term_octet->buf));
+ term->u.numeric = odr_intdup (o, atoi((char*) (term_octet->buf)));
break;
case Z_Term_null:
term->which = Z_Term_null;
term->u.null = odr_nullval();
break;
+ case Z_Term_external:
+ term->which = Z_Term_external;
+ term->u.external = 0;
+ break;
default:
term->which = Z_Term_null;
term->u.null = odr_nullval();
li->term_type = Z_Term_dateTime;
else if (compare_term (li, "null", 0))
li->term_type = Z_Term_null;
+ else if (compare_term(li, "range", 0))
+ {
+ /* prepare for external: range search .. */
+ li->term_type = Z_Term_external;
+ li->external_type = VAL_MULTISRCH2;
+ }
lex (li);
}
YAZ_PQF_Parser yaz_pqf_create (void)
{
- YAZ_PQF_Parser p = xmalloc (sizeof(*p));
+ YAZ_PQF_Parser p = (YAZ_PQF_Parser) xmalloc (sizeof(*p));
p->error = 0;
p->left_sep = "{\"";