Mercurial > sdl-ios-xcode
comparison src/cdrom/osf/SDL_syscdrom.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 |
comparison
equal
deleted
inserted
replaced
1337:c687f06c7473 | 1338:604d73db6802 |
---|---|
29 #include <sys/stat.h> | 29 #include <sys/stat.h> |
30 #include <fcntl.h> | 30 #include <fcntl.h> |
31 #include <io/cam/cdrom.h> | 31 #include <io/cam/cdrom.h> |
32 #include <io/cam/rzdisk.h> | 32 #include <io/cam/rzdisk.h> |
33 #include <io/common/devgetinfo.h> | 33 #include <io/common/devgetinfo.h> |
34 #include <alloca.h> | 34 |
35 #include <stdlib.h> | 35 #include "SDL_stdlib.h" |
36 #include <stdio.h> | 36 #include "SDL_string.h" |
37 #include <string.h> | |
38 #include <errno.h> | |
39 | |
40 #include "SDL_error.h" | 37 #include "SDL_error.h" |
41 #include "SDL_cdrom.h" | 38 #include "SDL_cdrom.h" |
42 #include "SDL_syscdrom.h" | 39 #include "SDL_syscdrom.h" |
43 | 40 |
44 /* The maximum number of CD-ROM drives we'll detect */ | 41 /* The maximum number of CD-ROM drives we'll detect */ |
216 if (devdir) { | 213 if (devdir) { |
217 name_len = SDL_strlen(checklist[i].name); | 214 name_len = SDL_strlen(checklist[i].name); |
218 while (devent = readdir(devdir)) | 215 while (devent = readdir(devdir)) |
219 if (SDL_memcmp(checklist[i].name, devent->d_name, name_len) == 0) | 216 if (SDL_memcmp(checklist[i].name, devent->d_name, name_len) == 0) |
220 if (devent->d_name[devent->d_namlen-1] == 'c') { | 217 if (devent->d_name[devent->d_namlen-1] == 'c') { |
221 sprintf(drive, "%s/%s", checklist[i].dir, devent->d_name); | 218 SDL_snprintf(drive, SDL_arraysize(drive), "%s/%s", checklist[i].dir, devent->d_name); |
222 #ifdef DEBUG_CDROM | 219 #ifdef DEBUG_CDROM |
223 fprintf(stderr, "Try to add drive: %s\n", drive); | 220 fprintf(stderr, "Try to add drive: %s\n", drive); |
224 #endif | 221 #endif |
225 if ( CheckDrive(drive, &stbuf) > 0 ) | 222 if ( CheckDrive(drive, &stbuf) > 0 ) |
226 AddDrive(drive, &stbuf); | 223 AddDrive(drive, &stbuf); |