--- YSM_ToolBox.c.orig Fri Apr 12 11:07:38 2002 +++ YSM_ToolBox.c Tue May 28 11:19:33 2002 @@ -45,6 +45,7 @@ #include "YSM.h" /* International Languages Charset Convertion! */ #include "YSM_Iconv.h" +#include static struct timeval tv; @@ -428,9 +429,12 @@ bytes_in = strlen(buf_from) + 1; bytes_out = maxlen - 1; conv_d = iconv_open(charset_to, charset_from); - bytes_res = iconv(conv_d, &inptr, &bytes_in, &outptr, &bytes_out); + if ( conv_d == (iconv_t)( -1)) { perror("iconv_open:"); return -1; } + else { + bytes_res = iconv(conv_d, (const char **)&inptr, &bytes_in, &outptr, &bytes_out); iconv_close(conv_d); return 0; + } } #endif