comparison src/video/riscos/SDL_riscosvideo.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
90 return(1); 90 return(1);
91 } 91 }
92 92
93 static void RISCOS_DeleteDevice(SDL_VideoDevice *device) 93 static void RISCOS_DeleteDevice(SDL_VideoDevice *device)
94 { 94 {
95 free(device->hidden); 95 SDL_free(device->hidden);
96 free(device); 96 SDL_free(device);
97 } 97 }
98 98
99 static SDL_VideoDevice *RISCOS_CreateDevice(int devindex) 99 static SDL_VideoDevice *RISCOS_CreateDevice(int devindex)
100 { 100 {
101 SDL_VideoDevice *device; 101 SDL_VideoDevice *device;
102 102
103 /* Initialize all variables that we clean on shutdown */ 103 /* Initialize all variables that we clean on shutdown */
104 device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice)); 104 device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
105 if ( device ) { 105 if ( device ) {
106 memset(device, 0, (sizeof *device)); 106 SDL_memset(device, 0, (sizeof *device));
107 device->hidden = (struct SDL_PrivateVideoData *) 107 device->hidden = (struct SDL_PrivateVideoData *)
108 malloc((sizeof *device->hidden)); 108 SDL_malloc((sizeof *device->hidden));
109 } 109 }
110 if ( (device == NULL) || (device->hidden == NULL) ) { 110 if ( (device == NULL) || (device->hidden == NULL) ) {
111 SDL_OutOfMemory(); 111 SDL_OutOfMemory();
112 if ( device ) { 112 if ( device ) {
113 free(device); 113 SDL_free(device);
114 } 114 }
115 return(0); 115 return(0);
116 } 116 }
117 memset(device->hidden, 0, (sizeof *device->hidden)); 117 SDL_memset(device->hidden, 0, (sizeof *device->hidden));
118 118
119 /* Set the function pointers */ 119 /* Set the function pointers */
120 device->VideoInit = RISCOS_VideoInit; 120 device->VideoInit = RISCOS_VideoInit;
121 device->VideoQuit = RISCOS_VideoQuit; 121 device->VideoQuit = RISCOS_VideoQuit;
122 122
223 */ 223 */
224 void RISCOS_VideoQuit(_THIS) 224 void RISCOS_VideoQuit(_THIS)
225 { 225 {
226 RISCOS_ExitTask(); 226 RISCOS_ExitTask();
227 227
228 if (this->hidden->alloc_bank) free(this->hidden->alloc_bank); 228 if (this->hidden->alloc_bank) SDL_free(this->hidden->alloc_bank);
229 this->hidden->alloc_bank = 0; 229 this->hidden->alloc_bank = 0;
230 } 230 }
231 231
232 232
233 SDL_Rect **RISCOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) 233 SDL_Rect **RISCOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags)