-/* $Id: zserver.c,v 1.125 2004-12-13 20:51:30 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
+/* $Id: zserver.c,v 1.130 2005-03-08 14:02:12 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
02111-1307, USA.
*/
-#include <stdio.h>
#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <fcntl.h>
#ifdef WIN32
#include <io.h>
charsets[i], right_name);
odr_set_charset (q->stream, right_name, "UTF-8");
if (selected)
- zebra_record_encoding (zh, right_name);
+ zebra_record_encoding(zh, right_name);
+ zebra_octet_term_encoding(zh, right_name);
q->charneg_response =
yaz_set_response_charneg (q->stream, charsets[i],
0, selected);
int bend_search (void *handle, bend_search_rr *r)
{
ZebraHandle zh = (ZebraHandle) handle;
+ zint zhits = 0;
r->hits = 0;
r->errcode = 0;
{
case Z_Query_type_1: case Z_Query_type_101:
zebra_search_RPN (zh, r->stream, r->query->u.type_1,
- r->setname, &r->hits);
+ r->setname, &zhits);
+ if (zhits > 2147483646)
+ r->hits = 2147483647;
+ else
+ r->hits = (int) zhits;
zebra_result (zh, &r->errcode, &r->errstring);
if (!r->errcode)
search_terms (zh, r);
{
ZebraHandle zh = (ZebraHandle) handle;
- rr->delete_status = zebra_deleleResultSet(zh, rr->function,
+ rr->delete_status = zebra_deleteResultSet(zh, rr->function,
rr->num_setnames, rr->setnames,
rr->statuses);
return 0;