comparison src/stdlib/SDL_iconv.c @ 3918:f16c15f3bc2b SDL-1.2

Minor const correctness patch to SDL_iconv.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 16 Feb 2007 03:50:42 +0000
parents b5a4ac87b98c
children b74530a1dad6
comparison
equal deleted inserted replaced
3917:8a3a0f1179f3 3918:f16c15f3bc2b
147 } 147 }
148 return (SDL_iconv_t)-1; 148 return (SDL_iconv_t)-1;
149 } 149 }
150 150
151 size_t SDL_iconv(SDL_iconv_t cd, 151 size_t SDL_iconv(SDL_iconv_t cd,
152 char **inbuf, size_t *inbytesleft, 152 const char **inbuf, size_t *inbytesleft,
153 char **outbuf, size_t *outbytesleft) 153 char **outbuf, size_t *outbytesleft)
154 { 154 {
155 /* For simplicity, we'll convert everything to and from UCS-4 */ 155 /* For simplicity, we'll convert everything to and from UCS-4 */
156 char *src, *dst; 156 const char *src;
157 char *dst;
157 size_t srclen, dstlen; 158 size_t srclen, dstlen;
158 Uint32 ch = 0; 159 Uint32 ch = 0;
159 size_t total; 160 size_t total;
160 161
161 if ( !inbuf || !*inbuf ) { 162 if ( !inbuf || !*inbuf ) {
753 return 0; 754 return 0;
754 } 755 }
755 756
756 #endif /* !HAVE_ICONV */ 757 #endif /* !HAVE_ICONV */
757 758
758 char *SDL_iconv_string(const char *tocode, const char *fromcode, char *inbuf, size_t inbytesleft) 759 char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft)
759 { 760 {
760 SDL_iconv_t cd; 761 SDL_iconv_t cd;
761 char *string; 762 char *string;
762 size_t stringsize; 763 size_t stringsize;
763 char *outbuf; 764 char *outbuf;