Towards working facets
[yaz-moved-to-github.git] / src / siconv.c
index 9ae3c39..596fe25 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2013 Index Data
  * See the file LICENSE for details.
  */
 /**
@@ -98,7 +98,7 @@ static int prepare_decoders(yaz_iconv_t cd, const char *tocode)
 
 yaz_iconv_t yaz_iconv_open(const char *tocode, const char *fromcode)
 {
-    yaz_iconv_t cd = (yaz_iconv_t) xmalloc (sizeof(*cd));
+    yaz_iconv_t cd = (yaz_iconv_t) xmalloc(sizeof(*cd));
 
     cd->encoder.data = 0;
     cd->encoder.write_handle = 0;
@@ -185,10 +185,10 @@ size_t yaz_iconv(yaz_iconv_t cd, char **inbuf, size_t *inbytesleft,
     if (cd->init_flag)
     {
         cd->my_errno = YAZ_ICONV_UNKNOWN;
-        
+
         if (cd->encoder.init_handle)
             (*cd->encoder.init_handle)(&cd->encoder);
-        
+
         cd->unget_x = 0;
         cd->no_read_x = 0;
 
@@ -198,7 +198,7 @@ size_t yaz_iconv(yaz_iconv_t cd, char **inbuf, size_t *inbytesleft,
             size_t r = (cd->decoder.init_handle)(
                 cd, &cd->decoder,
                 inbuf ? (unsigned char *) *inbuf : 0,
-                inbytesleft ? *inbytesleft : 0, 
+                inbytesleft ? *inbytesleft : 0,
                 &no_read);
             if (r)
             {
@@ -249,7 +249,7 @@ size_t yaz_iconv(yaz_iconv_t cd, char **inbuf, size_t *inbytesleft,
                 break;
             }
             x = (*cd->decoder.read_handle)(
-                cd, &cd->decoder, 
+                cd, &cd->decoder,
                 (unsigned char *) *inbuf, *inbytesleft, &no_read);
             if (no_read == 0)
             {