include/SDL_stdinc.h
branchSDL-1.2
changeset 3984 b74530a1dad6
parent 3976 8582c6a5ca16
child 3997 6a4f3a32c2e6
equal deleted inserted replaced
3983:540466e900db 3984:b74530a1dad6
   572 
   572 
   573 #ifdef HAVE_ICONV
   573 #ifdef HAVE_ICONV
   574 #define SDL_iconv_t     iconv_t
   574 #define SDL_iconv_t     iconv_t
   575 #define SDL_iconv_open  iconv_open
   575 #define SDL_iconv_open  iconv_open
   576 #define SDL_iconv_close iconv_close
   576 #define SDL_iconv_close iconv_close
   577 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
       
   578 #else
   577 #else
   579 typedef struct _SDL_iconv_t *SDL_iconv_t;
   578 typedef struct _SDL_iconv_t *SDL_iconv_t;
   580 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);
   579 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);
   581 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
   580 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
       
   581 #endif
   582 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
   582 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
   583 #endif
       
   584 /* This function converts a string between encodings in one pass, returning a
   583 /* This function converts a string between encodings in one pass, returning a
   585    string that must be freed with SDL_free() or NULL on error.
   584    string that must be freed with SDL_free() or NULL on error.
   586 */
   585 */
   587 extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);
   586 extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);
   588 #define SDL_iconv_utf8_ascii(S)		SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)
   587 #define SDL_iconv_utf8_ascii(S)		SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)