Avoid specifying YAZ4J_DIR for win64
[yaz-moved-to-github.git] / util / yaziconv.c
index e30d747..57de6e1 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 
@@ -10,9 +10,9 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <ctype.h>
 
 #include <yaz/yaz-util.h>
+#include <yaz/backtrace.h>
 
 #define CHUNK_IN 64
 #define CHUNK_OUT 64
@@ -79,7 +79,7 @@ void convert(FILE *inf, yaz_iconv_t cd, int verbose)
                 return ;
             }
             else if (e == YAZ_ICONV_EINVAL) /* incomplete input */
-            { 
+            {
                 size_t i;
                 for (i = 0; i<inbytesleft; i++)
                     inbuf0[i] = inbuf[i];
@@ -139,6 +139,7 @@ int main(int argc, char **argv)
     yaz_iconv_t cd;
     FILE *inf = stdin;
 
+    yaz_enable_panic_backtrace(*argv);
     while ((ret = options("vf:t:", argv, argc, &arg)) != -2)
     {
         switch (ret)