+/*
+ * Copyright (c) 1996, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: yaz-ccl.c,v $
+ * Revision 1.8 1996-10-29 13:36:27 adam
+ * Added header.
+ *
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Odr_oct *term_octet;
Z_Term *term;
- zapt = malloc (sizeof(*zapt));
+ zapt = xmalloc (sizeof(*zapt));
assert (zapt);
- term_octet = malloc (sizeof(*term_octet));
+ term_octet = xmalloc (sizeof(*term_octet));
assert (term_octet);
- term = malloc(sizeof(*term));
+ term = xmalloc(sizeof(*term));
assert(term);
for (attr = p->u.t.attr_list; attr; attr = attr->next)
if (num)
{
int i = 0;
- zapt->attributeList = malloc (num*sizeof(*zapt->attributeList));
+ zapt->attributeList = xmalloc (num*sizeof(*zapt->attributeList));
assert (zapt->attributeList);
for (attr = p->u.t.attr_list; attr; attr = attr->next, i++)
{
- zapt->attributeList[i] = malloc (sizeof(**zapt->attributeList));
+ zapt->attributeList[i] = xmalloc (sizeof(**zapt->attributeList));
assert (zapt->attributeList[i]);
zapt->attributeList[i]->attributeType =
&attr->type;
{
Z_Operand *zo;
- zo = malloc (sizeof(*zo));
+ zo = xmalloc (sizeof(*zo));
assert (zo);
switch (p->kind)
Z_Complex *zc;
Z_Operator *zo;
- zc = malloc (sizeof(*zc));
+ zc = xmalloc (sizeof(*zc));
assert (zc);
- zo = malloc (sizeof(*zo));
+ zo = xmalloc (sizeof(*zo));
assert (zo);
- zc->operator = zo;
+ zc->roperator = zo;
switch (p->kind)
{
case CCL_RPN_AND:
{
Z_RPNStructure *zs;
- zs = malloc (sizeof(*zs));
+ zs = xmalloc (sizeof(*zs));
assert (zs);
switch (p->kind)
{
return zs;
}
-Z_RPNQuery MDF *ccl_rpn_query (struct ccl_rpn_node *p)
+Z_RPNQuery *ccl_rpn_query (struct ccl_rpn_node *p)
{
Z_RPNQuery *zq;
- zq = malloc (sizeof(*zq));
+ zq = xmalloc (sizeof(*zq));
assert (zq);
zq->attributeSetId = NULL;
zq->RPNStructure = ccl_rpn_structure (p);
return zq;
}
-Z_AttributesPlusTerm MDF *ccl_scan_query (struct ccl_rpn_node *p)
+Z_AttributesPlusTerm *ccl_scan_query (struct ccl_rpn_node *p)
{
if (p->kind != CCL_RPN_TERM)
return NULL;