Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73382 - in trunk/libs/locale/src: encoding posix util
From: artyomtnk_at_[hidden]
Date: 2011-07-26 14:39:42


Author: artyom
Date: 2011-07-26 14:39:40 EDT (Tue, 26 Jul 2011)
New Revision: 73382
URL: http://svn.boost.org/trac/boost/changeset/73382

Log:
Attempt to fix iconv - lets rename the name of the function
that calls iconv library

Text files modified:
   trunk/libs/locale/src/encoding/iconv_codepage.ipp | 2 +-
   trunk/libs/locale/src/posix/codecvt.cpp | 10 +++++-----
   trunk/libs/locale/src/util/iconv.hpp | 4 ++--
   3 files changed, 8 insertions(+), 8 deletions(-)

Modified: trunk/libs/locale/src/encoding/iconv_codepage.ipp
==============================================================================
--- trunk/libs/locale/src/encoding/iconv_codepage.ipp (original)
+++ trunk/libs/locale/src/encoding/iconv_codepage.ipp 2011-07-26 14:39:40 EDT (Tue, 26 Jul 2011)
@@ -37,7 +37,7 @@
                 char **outbuf,size_t *outchar_left)
     {
         char **inbuf = const_cast<char **>(inbufc);
- return iconv(cvt_,inbuf,inchar_left,outbuf,outchar_left);
+ return call_iconv(cvt_,inbuf,inchar_left,outbuf,outchar_left);
     }
 
     bool open(char const *to,char const *from,method_type how)

Modified: trunk/libs/locale/src/posix/codecvt.cpp
==============================================================================
--- trunk/libs/locale/src/posix/codecvt.cpp (original)
+++ trunk/libs/locale/src/posix/codecvt.cpp 2011-07-26 14:39:40 EDT (Tue, 26 Jul 2011)
@@ -50,7 +50,7 @@
                     char *out = reinterpret_cast<char *>(obuf);
                     size_t outsize = 8;
                     // Basic sigle codepoint conversion
- iconv(d,&in,&insize,&out,&outsize);
+ call_iconv(d,&in,&insize,&out,&outsize);
                     if(insize == 0 && outsize == 0 && obuf[1] == 0) {
                         first_byte_table.push_back(obuf[0]);
                         continue;
@@ -61,8 +61,8 @@
                     insize = 1;
                     out = reinterpret_cast<char *>(obuf);
                     outsize = 8;
- iconv(d,0,0,0,0);
- size_t res = iconv(d,&in,&insize,&out,&outsize);
+ call_iconv(d,0,0,0,0);
+ size_t res = call_iconv(d,&in,&insize,&out,&outsize);
                     
                     // Now if this single byte starts a sequence we add incomplete
                     // to know to ask that we need two bytes, othewise it may only be
@@ -140,7 +140,7 @@
             uint32_t result[2] = { illegal, illegal };
             size_t outsize = 8;
             char *outbuf = reinterpret_cast<char*>(result);
- iconv(to_utf_,&inbuf,&insize,&outbuf,&outsize);
+ call_iconv(to_utf_,&inbuf,&insize,&outbuf,&outsize);
             if(outsize == 0 && insize == 0 && result[1]==0 ) {
                 begin+=2;
                 return result[0];
@@ -169,7 +169,7 @@
             char *outbuf = outseq;
             size_t outsize = 3;
 
- iconv(from_utf_,&inbuf,&insize,&outbuf,&outsize);
+ call_iconv(from_utf_,&inbuf,&insize,&outbuf,&outsize);
 
             if(insize != 0 || outsize > 1)
                 return illegal;

Modified: trunk/libs/locale/src/util/iconv.hpp
==============================================================================
--- trunk/libs/locale/src/util/iconv.hpp (original)
+++ trunk/libs/locale/src/util/iconv.hpp 2011-07-26 14:39:40 EDT (Tue, 26 Jul 2011)
@@ -25,9 +25,9 @@
         {
             return ptr(d,in,insize,out,outsize);
         }
- inline size_t iconv(iconv_t d,char **in,size_t *insize,char **out,size_t *outsize)
+ inline size_t call_iconv(iconv_t d,char **in,size_t *insize,char **out,size_t *outsize)
         {
- return do_iconv( :: iconv, d, in,insize,out,outsize);
+ return do_iconv( iconv, d, in,insize,out,outsize);
         }
 
     } // locale


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk