gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/gl


From: gsasl-commit
Subject: CVS gsasl/gl
Date: Wed, 15 Dec 2004 01:17:58 +0100

Update of /home/cvs/gsasl/gl
In directory dopio:/tmp/cvs-serv2654/gl

Modified Files:
        iconvme.c iconvme.h 
Log Message:
Update.

--- /home/cvs/gsasl/gl/iconvme.c        2004/12/12 23:32:33     1.3
+++ /home/cvs/gsasl/gl/iconvme.c        2004/12/15 00:17:55     1.4
@@ -42,7 +42,7 @@
    holds the error reason.  Note that this function does not handle
    embedded zero's in the output well.  */
 char *
-iconv_z (const char *to_codeset, const char *from_codeset, const char *str)
+iconv_string (const char *str, const char *from_codeset, const char 
*to_codeset)
 {
   char *dest = NULL;
 #if HAVE_ICONV
@@ -77,7 +77,7 @@
 
   inbytes_remaining = strlen (p);
   /* Guess the maximum length the output string can have.  */
-  outbuf_size = (inbytes_remaining + 1) * 5;
+  outbuf_size = (inbytes_remaining + 1) * MB_LEN_MAX;
 
   outp = dest = malloc (outbuf_size);
   if (dest == NULL)
@@ -86,8 +86,7 @@
 
 again:
 
-  err = iconv (cd, (ICONV_CONST char **) &p, &inbytes_remaining,
-              &outp, &outbytes_remaining);
+  err = iconv (cd, &p, &inbytes_remaining, &outp, &outbytes_remaining);
 
   if (err == (size_t) - 1)
     {
--- /home/cvs/gsasl/gl/iconvme.h        2004/12/12 23:32:33     1.2
+++ /home/cvs/gsasl/gl/iconvme.h        2004/12/15 00:17:55     1.3
@@ -19,7 +19,7 @@
 #ifndef ICONVME_H
 # define ICONVME_H
 
-extern char *iconv_z (const char *to_codeset, const char *from_codeset,
-                     const char *str);
+extern char *iconv_string (const char *string, const char *from_code,
+                          const char *to_code);
 
 #endif /* ICONVME_H */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]