/*
- * Copyright (c) 1995-2001, Index Data.
+ * Copyright (c) 1995-2002, Index Data.
* See the file LICENSE for details.
*
- * $Id: pquery.c,v 1.11 2001-11-13 23:00:43 adam Exp $
+ * $Id: pquery.c,v 1.12 2002-01-23 20:25:42 adam Exp $
*/
#include <stdio.h>
elements[k]->attributeType = &attr_tmp[2*i];
elements[k]->attributeSet =
yaz_oidval_to_z3950oid(o, CLASS_ATTSET, attr_set[i]);
+
if (attr_clist[i])
{
elements[k]->which = Z_AttributeValue_complex;
if (!(zo->u.attributesPlusTerm =
rpn_term (li, o, proto, num_attr, attr_list, attr_clist,
attr_set)))
- return NULL;
+ return 0;
lex (li);
break;
case 's':
lex (li);
if (!li->query_look)
- return NULL;
+ return 0;
zo->which = Z_Operand_resultSetId;
zo->u.resultSetId = (char *)odr_malloc (o, li->lex_len+1);
memcpy (zo->u.resultSetId, li->lex_buf, li->lex_len);
lex (li);
break;
default:
- return NULL;
+ return 0;
}
return zo;
}
return NULL;
if (num_attr >= max_attr)
return NULL;
- p_query_parse_attr(li, o, num_attr, attr_list, attr_clist, attr_set);
+ if (!p_query_parse_attr(li, o, num_attr, attr_list,
+ attr_clist, attr_set))
+ return 0;
num_attr++;
lex (li);
return
{
lex (li);
if (!li->query_look)
- return NULL;
+ return 0;
if (num_attr >= max_attr)
- return NULL;
- p_query_parse_attr(li, o, num_attr, attr_list, attr_clist, attr_set);
+ return 0;
+ if (!p_query_parse_attr(li, o, num_attr, attr_list,
+ attr_clist, attr_set))
+ return 0;
num_attr++;
lex (li);
}