From e408f6de48df5e13552ca72bb035f8b18f33d988 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 10 May 2004 08:47:54 +0000 Subject: [PATCH] Do not use obsolete YAZ defines --- index/zebraapi.c | 6 +++--- index/zrpn.c | 35 ++++------------------------------- index/zsets.c | 10 +++++----- 3 files changed, 12 insertions(+), 39 deletions(-) diff --git a/index/zebraapi.c b/index/zebraapi.c index 5392073..5124ad2 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.118 2004-03-29 15:48:14 adam Exp $ +/* $Id: zebraapi.c,v 1.119 2004-05-10 08:47:54 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -921,10 +921,10 @@ int zebra_deleleResultSet(ZebraHandle zh, int function, return Z_DeleteStatus_systemProblemAtTarget; switch (function) { - case Z_DeleteRequest_list: + case Z_DeleteResultSetRequest_list: resultSetDestroy (zh, num_setnames, setnames, statuses); break; - case Z_DeleteRequest_all: + case Z_DeleteResultSetRequest_all: resultSetDestroy (zh, -1, 0, statuses); break; } diff --git a/index/zrpn.c b/index/zrpn.c index 99da03b..66777f6 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.136 2004-01-22 11:27:21 adam Exp $ +/* $Id: zrpn.c,v 1.137 2004-05-10 08:47:54 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -2091,11 +2091,11 @@ static RSET rpn_sort_spec (ZebraHandle zh, Z_AttributesPlusTerm *zapt, sks->sortRelation = (int *) nmem_malloc (stream, sizeof(*sks->sortRelation)); if (sort_relation_value == 1) - *sks->sortRelation = Z_SortRelation_ascending; + *sks->sortRelation = Z_SortKeySpec_ascending; else if (sort_relation_value == 2) - *sks->sortRelation = Z_SortRelation_descending; + *sks->sortRelation = Z_SortKeySpec_descending; else - *sks->sortRelation = Z_SortRelation_ascending; + *sks->sortRelation = Z_SortKeySpec_ascending; sks->caseSensitivity = (int *) nmem_malloc (stream, sizeof(*sks->caseSensitivity)); @@ -2110,33 +2110,6 @@ static RSET rpn_sort_spec (ZebraHandle zh, Z_AttributesPlusTerm *zapt, return rset_create (rset_kind_null, &parms); } -/* pop - moved to xpath.c */ -#if 0 - -struct xpath_predicate { - int which; - union { -#define XPATH_PREDICATE_RELATION 1 - struct { - char *name; - char *op; - char *value; - } relation; -#define XPATH_PREDICATE_BOOLEAN 2 - struct { - const char *op; - struct xpath_predicate *left; - struct xpath_predicate *right; - } boolean; - } u; -}; - -struct xpath_location_step { - char *part; - struct xpath_predicate *predicate; -}; - -#endif static int parse_xpath(ZebraHandle zh, Z_AttributesPlusTerm *zapt, oid_value attributeSet, diff --git a/index/zsets.c b/index/zsets.c index 73e45b0..cf0e7d0 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -1,5 +1,5 @@ -/* $Id: zsets.c,v 1.46 2003-06-18 11:46:34 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 +/* $Id: zsets.c,v 1.47 2004-05-10 08:47:54 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps This file is part of the Zebra server. @@ -617,9 +617,9 @@ void resultSetSortSingle (ZebraHandle zh, NMEM nmem, Z_SortKeySpec *sks = sort_sequence->specs[i]; Z_SortKey *sk; - if (*sks->sortRelation == Z_SortRelation_ascending) + if (*sks->sortRelation == Z_SortKeySpec_ascending) sort_criteria[i].relation = 'A'; - else if (*sks->sortRelation == Z_SortRelation_descending) + else if (*sks->sortRelation == Z_SortKeySpec_descending) sort_criteria[i].relation = 'D'; else { @@ -687,7 +687,7 @@ void resultSetSortSingle (ZebraHandle zh, NMEM nmem, rset->rset_terms[i]->flags, rset->rset_terms[i]->count); - *sort_status = Z_SortStatus_success; + *sort_status = Z_SortResponse_success; yaz_log (LOG_LOG, "resultSetSortSingle end"); } -- 1.7.10.4