Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11image.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 |
---|---|
97 } | 97 } |
98 if(!use_mitshm) | 98 if(!use_mitshm) |
99 #endif /* not NO_SHARED_MEMORY */ | 99 #endif /* not NO_SHARED_MEMORY */ |
100 { | 100 { |
101 int bpp; | 101 int bpp; |
102 screen->pixels = malloc(screen->h*screen->pitch); | 102 screen->pixels = SDL_malloc(screen->h*screen->pitch); |
103 if ( screen->pixels == NULL ) { | 103 if ( screen->pixels == NULL ) { |
104 SDL_OutOfMemory(); | 104 SDL_OutOfMemory(); |
105 return -1; | 105 return -1; |
106 } | 106 } |
107 bpp = screen->format->BytesPerPixel; | 107 bpp = screen->format->BytesPerPixel; |
152 #if defined(__linux) | 152 #if defined(__linux) |
153 char line[BUFSIZ]; | 153 char line[BUFSIZ]; |
154 FILE *pstat = fopen("/proc/stat", "r"); | 154 FILE *pstat = fopen("/proc/stat", "r"); |
155 if ( pstat ) { | 155 if ( pstat ) { |
156 while ( fgets(line, sizeof(line), pstat) ) { | 156 while ( fgets(line, sizeof(line), pstat) ) { |
157 if (memcmp(line, "cpu", 3) == 0 && line[3] != ' ') { | 157 if (SDL_memcmp(line, "cpu", 3) == 0 && line[3] != ' ') { |
158 ++num_cpus; | 158 ++num_cpus; |
159 } | 159 } |
160 } | 160 } |
161 fclose(pstat); | 161 fclose(pstat); |
162 } | 162 } |