X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=149d40c4f7051a54e2bf364e5093f731053bea10;hb=b5eb8cd7ae4134d915ed8b4aec25ab90c8bd0dcb;hp=d1c4baa56b1ebd757ab7236ea8746d66e42cd693;hpb=f7e93f016e75e43d037b5c3e89aeb27b7176513a;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index d1c4baa..149d40c 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.123 2004-08-06 13:14:46 adam Exp $ +/* $Id: zebraapi.c,v 1.125 2004-08-10 08:54:39 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -22,6 +22,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include +#include #ifdef WIN32 #include #include @@ -780,8 +781,10 @@ int zebra_search_RPN (ZebraHandle zh, ODR o, zh->num_basenames, zh->basenames, setname); zebra_end_read (zh); - - *hits = zh->hits; + if (zh->hits > INT_MAX) + *hits=INT_MAX; + else + *hits = zh->hits; return 0; } @@ -1561,7 +1564,8 @@ int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *status) zebra_register_close (zh->service, zh->reg); zh->reg = 0; - yaz_log (LOG_LOG, "Records: %7d i/u/d %d/%d/%d", + yaz_log (LOG_LOG, "Records: "ZINT_FORMAT" i/u/d " + ZINT_FORMAT"/"ZINT_FORMAT"/"ZINT_FORMAT, zh->records_processed, zh->records_inserted, zh->records_updated, zh->records_deleted);