Mercurial > sdl-ios-xcode
diff src/joystick/linux/SDL_sysjoystick.c @ 1338:604d73db6802
Removed uses of stdlib.h and string.h
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 09:29:18 +0000 |
parents | 3692456e7b0f |
children | c71e05b4dc2e |
line wrap: on
line diff
--- a/src/joystick/linux/SDL_sysjoystick.c Tue Feb 07 07:03:29 2006 +0000 +++ b/src/joystick/linux/SDL_sysjoystick.c Tue Feb 07 09:29:18 2006 +0000 @@ -22,9 +22,6 @@ /* This is the system specific header for the SDL joystick API */ -#include <stdio.h> /* For the definition of NULL */ -#include <stdlib.h> /* For SDL_getenv() prototype */ -#include <string.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> @@ -38,6 +35,8 @@ #include <linux/input.h> #endif +#include "SDL_stdlib.h" +#include "SDL_string.h" #include "SDL_error.h" #include "SDL_joystick.h" #include "SDL_sysjoystick.h" @@ -325,7 +324,7 @@ for ( i=0; i<SDL_TABLESIZE(joydev_pattern); ++i ) { for ( j=0; j < MAX_JOYSTICKS; ++j ) { - sprintf(path, joydev_pattern[i], j); + SDL_snprintf(path, SDL_arraysize(path), joydev_pattern[i], j); /* rcg06302000 replaced access(F_OK) call with stat(). * stat() will fail if the file doesn't exist, so it's