Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/portable_c.c

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1#include <iconv.h>
2
3// These functions are implemented in a C file, because there are different
4// versions of the iconv() prototype, some with a const pointer and some
5// without. In C this is just a warning, but in C++ breaks the compilation.
6// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the
7// const and non-const version exist with the same version of the file.
8
9void * portable_iconv_open(const char* tocode, const char* fromcode)
10{
11 return iconv_open(tocode,fromcode);
12}
13
14size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
15 char** outbuf, size_t *outbytesleft)
16{
17 return iconv((iconv_t)cd,inbuf,inbytesleft,outbuf,outbytesleft);
18}
19
20int portable_iconv_close (void *cd)
21{
22 return iconv_close((iconv_t)cd);
23}
24
25

Archive Download this file

Revision: 1322