X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzrpn.c;h=bd0ceab8f68489439e84a0c49f9a4b4c87b97ec5;hb=fbf46d6d15f99ed15ae0089a95df6efaf3e205bd;hp=badb91e801d330e89c78b0c738c6cbc481e75c0f;hpb=32140b47f685f9aadf7117442470e07609184463;p=idzebra-moved-to-github.git diff --git a/index/zrpn.c b/index/zrpn.c index badb91e..bd0ceab 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.121 2002-08-23 14:30:51 adam Exp $ +/* $Id: zrpn.c,v 1.122 2002-08-28 19:52:29 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -1105,8 +1105,7 @@ static int trans_term (ZebraHandle zh, Z_AttributesPlusTerm *zapt, switch (term->which) { case Z_Term_general: -#if HAVE_ICONV_H - if (zh->iconv_to_utf8 != (iconv_t)(-1)) + if (zh->iconv_to_utf8 != 0) { char *inbuf = term->u.general->buf; size_t inleft = term->u.general->len; @@ -1115,18 +1114,17 @@ static int trans_term (ZebraHandle zh, Z_AttributesPlusTerm *zapt, size_t ret; yaz_log (LOG_DEBUG, "converting general from ISO-8859-1"); - ret = iconv(zh->iconv_to_utf8, &inbuf, &inleft, + ret = yaz_iconv(zh->iconv_to_utf8, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) { - ret = iconv(zh->iconv_to_utf8, 0, 0, 0, 0); + ret = yaz_iconv(zh->iconv_to_utf8, 0, 0, 0, 0); zh->errCode = 125; return -1; } *outbuf = 0; return 0; } -#endif sizez = term->u.general->len; if (sizez > IT_MAX_WORD-1) sizez = IT_MAX_WORD-1;