X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=data1%2Fd1_read.c;h=4a96ec30eb4f5a3413397ff3eda4a065d9dd6ab7;hb=a9e90f22d2cefbafc9d490a03a3bc7d1b75d57ee;hp=f19b20e0c290154ea16b2a319972bfff0ae6a932;hpb=eab4cdc5571ca8811ebaae09358b223b7debc02f;p=idzebra-moved-to-github.git diff --git a/data1/d1_read.c b/data1/d1_read.c index f19b20e..4a96ec3 100644 --- a/data1/d1_read.c +++ b/data1/d1_read.c @@ -1,6 +1,6 @@ -/* $Id: d1_read.c,v 1.12 2004-12-10 11:56:21 heikki Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - Index Data Aps +/* $Id: d1_read.c,v 1.15 2005-01-17 22:12:34 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -29,18 +29,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -/* Old yaz-util includes (FIXME - clean up what is not needed)*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include data1_node *data1_get_root_tag (data1_handle dh, data1_node *n) @@ -1119,12 +1108,15 @@ int data1_iconv (data1_handle dh, NMEM m, data1_node *n, if (yaz_matchstr (tocode, fromcode)) { WRBUF wrbuf = wrbuf_alloc(); - yaz_iconv_t t = yaz_iconv_open (tocode, fromcode); + yaz_iconv_t t = yaz_iconv_open(tocode, fromcode); if (!t) + { + wrbuf_free(wrbuf, 1); return -1; - data1_iconv_s (dh, m, n, t, wrbuf, tocode); - yaz_iconv_close (t); - wrbuf_free (wrbuf, 1); + } + data1_iconv_s(dh, m, n, t, wrbuf, tocode); + yaz_iconv_close(t); + wrbuf_free(wrbuf, 1); } return 0; }