X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzsets.c;h=c23c572866c67159860b75ea95b60e6038413837;hb=587c1d5cac956ec0cf482fc14ecea40240e85fd8;hp=d3fb047732d98372147043768ac307a0beaf9475;hpb=47ea1fc957c7b97bb30a26698f072109cae275e4;p=idzebra-moved-to-github.git diff --git a/index/zsets.c b/index/zsets.c index d3fb047..c23c572 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -1,10 +1,26 @@ -/* - * Copyright (C) 1994-2002, Index Data - * All rights reserved. - * Sebastian Hammer, Adam Dickmeiss - * - * $Id: zsets.c,v 1.37 2002-07-25 13:06:43 adam Exp $ - */ +/* $Id: zsets.c,v 1.39 2002-08-28 19:52:29 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 + Index Data Aps + +This file is part of the Zebra server. + +Zebra is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + + #include #include #ifdef WIN32 @@ -144,13 +160,13 @@ int zebra_resultSetTerms (ZebraHandle zh, const char *setname, size_t inleft = strlen(inbuf); size_t outleft = *len - 1; int converted = 0; -#if HAVE_ICONV_H - if (zh->iconv_from_utf8 != (iconv_t)(-1)) + + if (zh->iconv_from_utf8 != 0) { char *outbuf = out; size_t ret; - ret = iconv(zh->iconv_from_utf8, &inbuf, &inleft, + ret = yaz_iconv(zh->iconv_from_utf8, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) *len = 0; @@ -158,7 +174,6 @@ int zebra_resultSetTerms (ZebraHandle zh, const char *setname, *len = outbuf - out; converted = 1; } -#endif if (!converted) { if (inleft > outleft)