Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11events.c @ 4094:ca992789c798 SDL-1.2
ANSI C fix (all variables need to be defined at start of block).
Fixes Bugzilla #487.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 01 Sep 2007 17:25:24 +0000 |
parents | f61a20d195f7 |
children | dbb5f9556796 |
comparison
equal
deleted
inserted
replaced
4093:7ea10b80eda3 | 4094:ca992789c798 |
---|---|
233 | 233 |
234 /* end_of_input points to the last byte of input as opposed to the next to the last byte. */ | 234 /* end_of_input points to the last byte of input as opposed to the next to the last byte. */ |
235 Uint8 const *const end_of_input = utf8 + utf8_length - 1; | 235 Uint8 const *const end_of_input = utf8 + utf8_length - 1; |
236 | 236 |
237 while (utf8 <= end_of_input) { | 237 while (utf8 <= end_of_input) { |
238 Uint8 const c = *utf8; | |
238 if (p >= max_ptr) { | 239 if (p >= max_ptr) { |
239 /* No more output space. */ | 240 /* No more output space. */ |
240 return -1; | 241 return -1; |
241 } | 242 } |
242 Uint8 const c = *utf8; | |
243 if (c < 0x80) { | 243 if (c < 0x80) { |
244 /* One byte ASCII. */ | 244 /* One byte ASCII. */ |
245 *p++ = c; | 245 *p++ = c; |
246 utf8 += 1; | 246 utf8 += 1; |
247 } else if (c < 0xC0) { | 247 } else if (c < 0xC0) { |