comparison src/video/x11/SDL_x11events.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents 27ddb06a0bca
children 604d73db6802
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
272 static int X11_DispatchEvent(_THIS) 272 static int X11_DispatchEvent(_THIS)
273 { 273 {
274 int posted; 274 int posted;
275 XEvent xevent; 275 XEvent xevent;
276 276
277 memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */ 277 SDL_memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */
278 pXNextEvent(SDL_Display, &xevent); 278 pXNextEvent(SDL_Display, &xevent);
279 279
280 posted = 0; 280 posted = 0;
281 switch (xevent.type) { 281 switch (xevent.type) {
282 282
965 965
966 if ( !this || !SDL_Display ) { 966 if ( !this || !SDL_Display ) {
967 return 0; 967 return 0;
968 } 968 }
969 969
970 memset(&xkey, 0, sizeof(xkey)); 970 SDL_memset(&xkey, 0, sizeof(xkey));
971 xkey.display = SDL_Display; 971 xkey.display = SDL_Display;
972 972
973 xsym = keysym; /* last resort if not found */ 973 xsym = keysym; /* last resort if not found */
974 for (i = 0; i < 256; ++i) { 974 for (i = 0; i < 256; ++i) {
975 if ( MISC_keymap[i] == keysym ) { 975 if ( MISC_keymap[i] == keysym ) {
1046 modstate |= KMOD_NUM; 1046 modstate |= KMOD_NUM;
1047 } 1047 }
1048 } 1048 }
1049 1049
1050 /* Zero the new keyboard state and generate it */ 1050 /* Zero the new keyboard state and generate it */
1051 memset(kstate, 0, SDLK_LAST); 1051 SDL_memset(kstate, 0, SDLK_LAST);
1052 /* 1052 /*
1053 * An obvious optimisation is to check entire longwords at a time in 1053 * An obvious optimisation is to check entire longwords at a time in
1054 * both loops, but we can't be sure the arrays are aligned so it's not 1054 * both loops, but we can't be sure the arrays are aligned so it's not
1055 * worth the extra complexity 1055 * worth the extra complexity
1056 */ 1056 */