src/events/SDL_keyboard.c
changeset 1330 450721ad5436
parent 1327 d12a63a8d95a
child 1336 3692456e7b0f
     1.1 --- a/src/events/SDL_keyboard.c	Sat Feb 04 22:01:44 2006 +0000
     1.2 +++ b/src/events/SDL_keyboard.c	Mon Feb 06 08:28:51 2006 +0000
     1.3 @@ -22,14 +22,10 @@
     1.4  
     1.5  /* General keyboard handling code for SDL */
     1.6  
     1.7 -#include <stdio.h>
     1.8 -#include <ctype.h>
     1.9 -#include <stdlib.h>
    1.10 -#include <string.h>
    1.11 -
    1.12  #include "SDL_error.h"
    1.13  #include "SDL_events.h"
    1.14  #include "SDL_timer.h"
    1.15 +#include "SDL_string.h"
    1.16  #include "SDL_events_c.h"
    1.17  #include "SDL_sysevents.h"
    1.18  
    1.19 @@ -58,17 +54,14 @@
    1.20  {
    1.21  	SDL_VideoDevice *video = current_video;
    1.22  	SDL_VideoDevice *this  = current_video;
    1.23 -	Uint16 i;
    1.24  
    1.25  	/* Set default mode of UNICODE translation */
    1.26  	SDL_EnableUNICODE(DEFAULT_UNICODE_TRANSLATION);
    1.27  
    1.28  	/* Initialize the tables */
    1.29  	SDL_ModState = KMOD_NONE;
    1.30 -	for ( i=0; i<SDL_TABLESIZE(keynames); ++i )
    1.31 -		keynames[i] = NULL;
    1.32 -	for ( i=0; i<SDL_TABLESIZE(SDL_KeyState); ++i )
    1.33 -		SDL_KeyState[i] = SDL_RELEASED;
    1.34 +	memset(keynames, 0, sizeof(keynames));
    1.35 +	memset(SDL_KeyState, 0, sizeof(SDL_KeyState));
    1.36  	video->InitOSKeymap(this);
    1.37  
    1.38  	SDL_EnableKeyRepeat(0, 0);