X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebrash.c;h=928bf957cd1705ae439789e6b774bae0a6c3e4fc;hb=d8e960f5f1060148a5fffa7a767c72391662fbdc;hp=63a878266309e51e5118b9bf7330b6933d50a950;hpb=5437b50633032595afe6f87dc0f989bc92a5aea8;p=idzebra-moved-to-github.git diff --git a/index/zebrash.c b/index/zebrash.c index 63a8782..928bf95 100644 --- a/index/zebrash.c +++ b/index/zebrash.c @@ -1,6 +1,6 @@ -/* $Id: zebrash.c,v 1.30 2004-11-19 10:27:04 heikki Exp $ - Copyright (C) 2002,2003,2004 - Index Data Aps +/* $Id: zebrash.c,v 1.33 2005-03-09 12:14:42 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -38,7 +38,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #endif #include -#include +#include #include #include #include @@ -390,15 +390,15 @@ static int cmd_exchange_record( char *args[], WRBUF outbuff) * Searching and retrieving */ -static int cmd_search_pqf( char *args[], WRBUF outbuff) +static int cmd_search_pqf(char *args[], WRBUF outbuff) { - int hits=0; - char *set=args[1]; - char *qry=restargs(args,2); + zint hits = 0; + char *set = args[1]; + char *qry = restargs(args,2); int rc; - rc=zebra_search_PQF(zh, qry, set, &hits); + rc = zebra_search_PQF(zh, qry, set, &hits); if (0==rc) - wrbuf_printf(outbuff,"%d hits found\n",hits); + wrbuf_printf(outbuff, ZINT_FORMAT " hits found\n", hits); return rc; } @@ -406,21 +406,21 @@ static int cmd_find( char *args[], WRBUF outbuff) { char *setname=DEFAULTRESULTSET; int rc; - int hits=0; - WRBUF qry=wrbuf_alloc(); + zint hits = 0; + WRBUF qry = wrbuf_alloc(); if (0==strstr(args[0],"@attr")) wrbuf_puts(qry, "@attr 1=/ "); wrbuf_puts(qry,restargs(args,1)); if (!zh) onecommand("quickstart", outbuff, ""); wrbuf_printf(outbuff, "find %s\n",wrbuf_buf(qry)); - rc=zebra_search_PQF(zh, wrbuf_buf(qry), setname, &hits); + rc = zebra_search_PQF(zh, wrbuf_buf(qry), setname, &hits); if (0==rc) { - wrbuf_printf(outbuff,"%d hits found\n",hits); - nextrecno=1; + wrbuf_printf(outbuff, ZINT_FORMAT " hits found\n", hits); + nextrecno = 1; } - wrbuf_free(qry,1); + wrbuf_free(qry, 1); return rc; }