Updated Makefiles
[idzebra-moved-to-github.git] / util / charmap.c
index 823fe6a..011cb39 100644 (file)
@@ -1,11 +1,26 @@
-/*
- * Copyright (C) 1996-2002, Index Data
- * All rights reserved.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Id: charmap.c,v 1.23 2002-07-25 13:06:44 adam Exp $
- *
- */
+/* $Id: charmap.c,v 1.25 2002-08-02 19:26:57 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.
+*/
+
+
 
 /*
  * Support module to handle character-conversions into and out of the
@@ -379,15 +394,10 @@ static int scan_to_utf8 (iconv_t t, ucs4_t *from, size_t inlen,
         *outbuf++ = *from;  /* ISO-8859-1 is OK here */
     else
     {
-        size_t i;
-        for (i = 0; i<inlen; i++)
-            yaz_log (LOG_LOG, "%08X", from[i]);
         ret = iconv (t, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
         if (ret == (size_t) (-1))
         {
             yaz_log (LOG_WARN|LOG_ERRNO, "bad unicode sequence");
-            for (i = 0; i<inlen; i++)
-                yaz_log (LOG_LOG, "%08X", from[i]);
             return -1;
         }
     }
@@ -418,18 +428,13 @@ static int scan_string(char *s_native,
         if (ret == (size_t)(-1))
             return -1;
         i = (outbuf - (char*) arg)/sizeof(ucs4_t);
-        yaz_log (LOG_LOG, "to unicode");
     }
     else
     { 
         for (i = 0; s_native[i]; i++)
             arg[i] = s_native[i] & 255; /* ISO-8859-1 conversion */
-        yaz_log (LOG_LOG, "to virtual unicode");
     }
     arg[i] = 0;      /* terminate */
-    for (j = 0; j<i; j++)
-        yaz_log (LOG_LOG, " %d %8X %d %c", j, arg[j], arg[j],
-                 (arg[j] > 33 && arg[j] < 127) ? arg[j] : '?');
     if (s[0] == 0xfeff || s[0] == 0xfeff)  /* skip byte Order Mark */
         s++;
     while (*s)