-/* $Id: cqltransform.c,v 1.10 2004-10-02 13:28:26 adam Exp $
- Copyright (C) 2002-2004
+/* $Id: cqltransform.c,v 1.13 2005-01-15 19:47:11 adam Exp $
+ Copyright (C) 1995-2005, Index Data ApS
Index Data Aps
This file is part of the YAZ toolkit.
See the file LICENSE.
*/
+/**
+ * \file cqltransform.c
+ * \brief Implements CQL transform (CQL to RPN conversion).
+ */
+
#include <stdlib.h>
#include <string.h>
#include <yaz/cql.h>
void *client_data)
{
struct cql_prop_entry *e;
+ NMEM nmem = nmem_create();
ct->error = 0;
if (ct->addinfo)
for (e = ct->entry; e ; e = e->next)
{
if (!memcmp(e->pattern, "set.", 4))
- cql_apply_prefix(cn, e->pattern+4, e->value);
+ cql_apply_prefix(nmem, cn, e->pattern+4, e->value);
else if (!strcmp(e->pattern, "set"))
- cql_apply_prefix(cn, 0, e->value);
+ cql_apply_prefix(nmem, cn, 0, e->value);
}
cql_transform_r (ct, cn, pr, client_data);
+ nmem_destroy(nmem);
return ct->error;
}