X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e84f7290001cedb44e0a3a3d7536f4de3bf505cd..8f4745feeb2850f3bebb3af45407e164550d541a:/src/common/encconv.cpp diff --git a/src/common/encconv.cpp b/src/common/encconv.cpp index da88c09d52..92c8b04362 100644 --- a/src/common/encconv.cpp +++ b/src/common/encconv.cpp @@ -32,7 +32,7 @@ #endif #ifdef __WXMAC__ - #include "wx/mac/corefoundation/cfstring.h" + #include "wx/osx/core/cfstring.h" #include wxUint16 gMacEncodings[wxFONTENCODING_MACMAX-wxFONTENCODING_MACMIN+1][128] ; @@ -51,11 +51,11 @@ static const wxUint16* GetEncTable(wxFontEncoding enc) int i = enc-wxFONTENCODING_MACMIN ; if ( gMacEncodingsInited[i] == false ) { - // create + // create CFStringEncoding cfencoding = wxMacGetSystemEncFromFontEnc( enc ) ; if( !CFStringIsEncodingAvailable( cfencoding ) ) return NULL; - + memset( gMacEncodings[i] , 0 , 128 * 2 ); char s[2] = { 0 , 0 }; CFRange firstchar = CFRangeMake( 0, 1 ); @@ -84,12 +84,14 @@ typedef struct { wxUint8 c; } CharsetItem; -extern "C" int wxCMPFUNC_CONV +extern "C" +{ +static int wxCMPFUNC_CONV CompareCharsetItems(const void *i1, const void *i2) { return ( ((CharsetItem*)i1) -> u - ((CharsetItem*)i2) -> u ); } - +} static CharsetItem* BuildReverseTable(const wxUint16 *tbl) { @@ -321,7 +323,7 @@ bool wxEncodingConverter::Convert(const wchar_t* input, wchar_t* output) const wxT("You must call wxEncodingConverter::Init() before actually converting!")); bool replaced = false; - + for (i = input, o = output; *i != 0;) *(o++) = (wchar_t)(GetTableValue(m_Table, (wxUint8)*(i++), replaced)); *o = 0;