Mercurial > sdl-ios-xcode
comparison src/video/svga/SDL_svgaevents.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 | c9b51268668f |
children | 604d73db6802 |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
67 struct kbentry entry; | 67 struct kbentry entry; |
68 int map, i; | 68 int map, i; |
69 | 69 |
70 /* Load all the keysym mappings */ | 70 /* Load all the keysym mappings */ |
71 for ( map=0; map<NUM_VGAKEYMAPS; ++map ) { | 71 for ( map=0; map<NUM_VGAKEYMAPS; ++map ) { |
72 memset(vga_keymap[map], 0, NR_KEYS*sizeof(Uint16)); | 72 SDL_memset(vga_keymap[map], 0, NR_KEYS*sizeof(Uint16)); |
73 for ( i=0; i<NR_KEYS; ++i ) { | 73 for ( i=0; i<NR_KEYS; ++i ) { |
74 entry.kb_table = map; | 74 entry.kb_table = map; |
75 entry.kb_index = i; | 75 entry.kb_index = i; |
76 if ( ioctl(fd, KDGKBENT, &entry) == 0 ) { | 76 if ( ioctl(fd, KDGKBENT, &entry) == 0 ) { |
77 /* The "Enter" key is a special case */ | 77 /* The "Enter" key is a special case */ |
131 return(0); | 131 return(0); |
132 } | 132 } |
133 #elif defined(__FreeBSD__) | 133 #elif defined(__FreeBSD__) |
134 int SVGA_initkeymaps(int fd) | 134 int SVGA_initkeymaps(int fd) |
135 { | 135 { |
136 vga_keymap = malloc(sizeof(keymap_t)); | 136 vga_keymap = SDL_malloc(sizeof(keymap_t)); |
137 if ( ! vga_keymap ) { | 137 if ( ! vga_keymap ) { |
138 SDL_OutOfMemory(); | 138 SDL_OutOfMemory(); |
139 return(-1); | 139 return(-1); |
140 } | 140 } |
141 if (ioctl(fd, GIO_KEYMAP, vga_keymap) == -1) { | 141 if (ioctl(fd, GIO_KEYMAP, vga_keymap) == -1) { |
142 free(vga_keymap); | 142 SDL_free(vga_keymap); |
143 vga_keymap = NULL; | 143 vga_keymap = NULL; |
144 SDL_SetError("Unable to get keyboard map"); | 144 SDL_SetError("Unable to get keyboard map"); |
145 return(-1); | 145 return(-1); |
146 } | 146 } |
147 return(0); | 147 return(0); |