comparison include/SDL_stdinc.h @ 3928:6a62cbdd65f5 SDL-1.2

Adjusted to handle different constness in older versions of iconv. Fixes Bugzilla #419.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 30 Mar 2007 20:09:55 +0000
parents f16c15f3bc2b
children 259aaca0fb0c
comparison
equal deleted inserted replaced
3927:f86ced1837de 3928:6a62cbdd65f5
559 559
560 #ifdef HAVE_ICONV 560 #ifdef HAVE_ICONV
561 #define SDL_iconv_t iconv_t 561 #define SDL_iconv_t iconv_t
562 #define SDL_iconv_open iconv_open 562 #define SDL_iconv_open iconv_open
563 #define SDL_iconv_close iconv_close 563 #define SDL_iconv_close iconv_close
564 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
564 #else 565 #else
565 typedef struct _SDL_iconv_t *SDL_iconv_t; 566 typedef struct _SDL_iconv_t *SDL_iconv_t;
566 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode); 567 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);
567 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd); 568 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
568 #endif
569 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 569 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
570 #endif
570 /* This function converts a string between encodings in one pass, returning a 571 /* This function converts a string between encodings in one pass, returning a
571 string that must be freed with SDL_free() or NULL on error. 572 string that must be freed with SDL_free() or NULL on error.
572 */ 573 */
573 extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft); 574 extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);
574 #define SDL_iconv_utf8_ascii(S) SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1) 575 #define SDL_iconv_utf8_ascii(S) SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)