[uim-commit] r844 - trunk/fep

ekato at freedesktop.org ekato at freedesktop.org
Mon May 23 07:07:42 PDT 2005


Author: ekato
Date: 2005-05-23 07:07:38 -0700 (Mon, 23 May 2005)
New Revision: 844

Modified:
   trunk/fep/callbacks.c
Log:
* fep/callbacks.c (init_callbacks) : Explicitly cast return value
  of uim_iconv_open().  Cast 2nd argument of iconv(3) using 
  ICONV_CONST for compilation portability.



Modified: trunk/fep/callbacks.c
===================================================================
--- trunk/fep/callbacks.c	2005-05-20 13:29:41 UTC (rev 843)
+++ trunk/fep/callbacks.c	2005-05-23 14:07:38 UTC (rev 844)
@@ -150,13 +150,13 @@
     s_nokori_str = malloc(outbytesleft + 1);
     strcpy(s_nokori_str, "»Ä¤ê");
     if (strcmp(enc = get_enc(), "EUC-JP") != 0) {
-      cd = uim_iconv_open(enc, "EUC-JP");
+      cd = (iconv_t)uim_iconv_open(enc, "EUC-JP");
       if (cd == (iconv_t)-1) {
         perror("error in iconv_open");
         puts("-d option is not available");
         done(EXIT_FAILURE);
       }
-      if (iconv(cd, &nokori_str, &inbytesleft, &s_nokori_str, &outbytesleft) == (size_t)-1) {
+      if (iconv(cd, (ICONV_CONST char**)&nokori_str, &inbytesleft, &s_nokori_str, &outbytesleft) == (size_t)-1) {
         perror("error in iconv");
         puts("-d option is not available");
         done(EXIT_FAILURE);



More information about the Uim-commit mailing list