[prev in list] [next in list] [prev in thread] [next in thread] 

List:       licq-cvs
Subject:    [Licq-cvs] licq/src
From:       Jon Keating <emostar () users ! sourceforge ! net>
Date:       2005-11-17 8:42:45
Message-ID: E1EcfLx-0001AR-9b () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/licq/licq/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4472/src

Modified Files:
	translate.cpp 
Log Message:
Fix compilation with iconv.
Have configure set ICONV_CONST and then use it.


Index: translate.cpp
===================================================================
RCS file: /cvsroot/licq/licq/src/translate.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- translate.cpp	13 Oct 2005 13:09:23 -0000	1.20
+++ translate.cpp	17 Nov 2005 08:42:43 -0000	1.21
@@ -242,13 +242,13 @@
   
   
   tr = iconv_open("UTF-8", szFrom);
-  size_t ret = iconv(tr, &szIn, &nInSize, &szOut, &nOutSize);
+  size_t ret = iconv(tr, (ICONV_CONST char**)&szIn, &nInSize, &szOut, &nOutSize);
   iconv_close(tr);
 
   if (ret == (size_t)(-1))
   {
     tr = iconv_open("UCS-2BE", szFrom);
-    iconv(tr, &szIn, &nInSize, &szOut, &nOutSize);
+    iconv(tr, (ICONV_CONST char**)&szIn, &nInSize, &szOut, &nOutSize);
     iconv_close(tr);
   }
 
@@ -287,13 +287,13 @@
 
 
   tr = iconv_open(szTo, "UTF-8");
-  size_t ret = iconv(tr, &szIn, &nInSize, &szOut, &nOutSize);
+  size_t ret = iconv(tr, (ICONV_CONST char**)&szIn, &nInSize, &szOut, &nOutSize);
   iconv_close(tr);
 
   if (ret == (size_t)(-1))
   {
     tr = iconv_open(szTo, "UCS-2BE");
-    iconv(tr, &szIn, &nInSize, &szOut, &nOutSize);
+    iconv(tr, (ICONV_CONST char**)&szIn, &nInSize, &szOut, &nOutSize);
     iconv_close(tr);
   }
 
@@ -319,7 +319,7 @@
   nOutSize = nLen * 2;
   
   tr = iconv_open("", "UCS-2BE");
-  size_t ret = iconv(tr, &szIn, &nInSize, &szOut, &nOutSize);
+  size_t ret = iconv(tr, (ICONV_CONST char**)&szIn, &nInSize, &szOut, &nOutSize);
   iconv_close(tr);
   
   if (ret == (size_t)(-1))
@@ -346,7 +346,7 @@
   nOutSize = nLen;
   
   tr = iconv_open("UCS-2BE", _szEncoding);
-  size_t ret = iconv(tr, &szIn, &nInSize, &szOut, &nOutSize);
+  size_t ret = iconv(tr, (ICONV_CONST char**)&szIn, &nInSize, &szOut, &nOutSize);
   iconv_close(tr);
   
   if (ret == (size_t)-1)



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Licq-cvs mailing list
Licq-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/licq-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic