comparison src/audio/esd/SDL_esdaudio.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
22 22
23 /* Allow access to an ESD network stream mixing buffer */ 23 /* Allow access to an ESD network stream mixing buffer */
24 24
25 #ifdef ESD_SUPPORT 25 #ifdef ESD_SUPPORT
26 26
27 #include <stdlib.h>
28 #include <stdio.h>
29 #include <string.h>
30 #include <errno.h> 27 #include <errno.h>
31 #include <signal.h>
32 #include <unistd.h>
33 28
34 #include <esd.h> 29 #include <esd.h>
35 30
31 #include "SDL_stdlib.h"
32 #include "SDL_string.h"
36 #include "SDL_audio.h" 33 #include "SDL_audio.h"
37 #include "SDL_error.h" 34 #include "SDL_error.h"
38 #include "SDL_audiomem.h" 35 #include "SDL_audiomem.h"
39 #include "SDL_audio_c.h" 36 #include "SDL_audio_c.h"
40 #include "SDL_timer.h" 37 #include "SDL_timer.h"
255 char *progname = NULL; 252 char *progname = NULL;
256 #ifdef linux 253 #ifdef linux
257 FILE *fp; 254 FILE *fp;
258 static char temp[BUFSIZ]; 255 static char temp[BUFSIZ];
259 256
260 sprintf(temp, "/proc/%d/cmdline", getpid()); 257 SDL_snprintf(temp, SDL_arraysize(temp), "/proc/%d/cmdline", getpid());
261 fp = fopen(temp, "r"); 258 fp = fopen(temp, "r");
262 if ( fp != NULL ) { 259 if ( fp != NULL ) {
263 if ( fgets(temp, sizeof(temp)-1, fp) ) { 260 if ( fgets(temp, sizeof(temp)-1, fp) ) {
264 progname = SDL_strrchr(temp, '/'); 261 progname = SDL_strrchr(temp, '/');
265 if ( progname == NULL ) { 262 if ( progname == NULL ) {