|
|
@@ -0,0 +1,72 @@
|
|
|
+--- gdkanji.c.dist 2003-07-25 10:05:16.000000000 +0200
|
|
|
++++ gdkanji.c 2003-07-25 10:07:43.000000000 +0200
|
|
|
+@@ -27,29 +27,32 @@
|
|
|
+
|
|
|
+ #ifndef HAVE_ICONV
|
|
|
+ #define ICONV_CONST /**/
|
|
|
+- iconv_t iconv_open (const char *, const char *);
|
|
|
+-size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
|
|
|
+-int iconv_close (iconv_t);
|
|
|
++static iconv_t my_iconv_open (const char *, const char *);
|
|
|
++static size_t my_iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
|
|
|
++static int my_iconv_close (iconv_t);
|
|
|
+
|
|
|
+-iconv_t
|
|
|
+-iconv_open (const char *tocode, const char *fromcode)
|
|
|
++static iconv_t
|
|
|
++my_iconv_open (const char *tocode, const char *fromcode)
|
|
|
+ {
|
|
|
+ return (iconv_t) (-1);
|
|
|
+ }
|
|
|
+
|
|
|
+-size_t
|
|
|
+-iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
|
|
|
++static size_t
|
|
|
++my_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
|
|
|
+ char **outbuf, size_t * outbytesleft)
|
|
|
+ {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+-int
|
|
|
+-iconv_close (iconv_t cd)
|
|
|
++static int
|
|
|
++my_iconv_close (iconv_t cd)
|
|
|
+ {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+-
|
|
|
++#else
|
|
|
++#define my_iconv_open iconv_open
|
|
|
++#define my_iconv iconv
|
|
|
++#define my_iconv_close iconv_close
|
|
|
+ #endif /* !HAVE_ICONV */
|
|
|
+
|
|
|
+ #define LIBNAME "any2eucjp()"
|
|
|
+@@ -377,7 +380,7 @@
|
|
|
+ iconv_t cd;
|
|
|
+ size_t from_len, to_len;
|
|
|
+
|
|
|
+- if ((cd = iconv_open (EUCSTR, code)) == (iconv_t) - 1)
|
|
|
++ if ((cd = my_iconv_open (EUCSTR, code)) == (iconv_t) - 1)
|
|
|
+ {
|
|
|
+ error ("iconv_open() error");
|
|
|
+ #ifdef HAVE_ERRNO_H
|
|
|
+@@ -391,7 +394,7 @@
|
|
|
+ from_len = strlen ((const char *) from) + 1;
|
|
|
+ to_len = BUFSIZ;
|
|
|
+
|
|
|
+- if ((int) (iconv (cd, (char **) &from, &from_len, (char **) &to, &to_len))
|
|
|
++ if ((int) (my_iconv (cd, (char **) &from, &from_len, (char **) &to, &to_len))
|
|
|
+ == -1)
|
|
|
+ {
|
|
|
+ #ifdef HAVE_ERRNO_H
|
|
|
+@@ -408,7 +411,7 @@
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+- if (iconv_close (cd) != 0)
|
|
|
++ if (my_iconv_close (cd) != 0)
|
|
|
+ {
|
|
|
+ error ("iconv_close() error");
|
|
|
+ }
|