Fix compile bug for systems that have nl_langinfo but CODESET undefined
[yaz-moved-to-github.git] / util / marcdump.c
index f28a99b..bd71b7d 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * Copyright (c) 1995-2002, Index Data
+ * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
- * $Id: marcdump.c,v 1.19 2002-12-16 13:13:53 adam Exp $
+ * $Id: marcdump.c,v 1.22 2003-02-25 18:35:49 adam Exp $
  */
 
 #if HAVE_CONFIG_H
@@ -58,8 +58,10 @@ int main (int argc, char **argv)
     setlocale(LC_CTYPE, "");
 #endif
 #if HAVE_LANGINFO_H
+#ifdef CODESET
     to = nl_langinfo(CODESET);
 #endif
+#endif
 
     while ((r = options("vc:xOXf:t:", argv, argc, &arg)) != -2)
     {
@@ -144,7 +146,6 @@ int main (int argc, char **argv)
                         
                         while (inbytesleft)
                         {
-                            int i;
                             size_t outbytesleft = sizeof(outbuf);
                             char *outp = outbuf;
                             size_t r = yaz_iconv (cd, (char**) &inp,