Removed uses of stdlib.h and string.h
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401342
This commit is contained in:
parent
098fe1b8e9
commit
09cd73f1b5
192 changed files with 455 additions and 666 deletions
|
@ -29,19 +29,14 @@
|
|||
#ifndef HAVE_MALLOC
|
||||
|
||||
#define LACKS_STDIO_H
|
||||
#define LACKS_UNISTD_H
|
||||
#define LACKS_FCNTL_H
|
||||
#define LACKS_SYS_PARAM_H
|
||||
#define LACKS_SYS_MMAN_H
|
||||
#define LACKS_STRINGS_H
|
||||
#define LACKS_STRING_H
|
||||
#define LACKS_SYS_TYPES_H
|
||||
#define LACKS_ERRNO_H
|
||||
#define LACKS_STDLIB_H
|
||||
#define ABORT
|
||||
#define memset SDL_memset
|
||||
#define memcpy SDL_memcpy
|
||||
#define malloc SDL_malloc
|
||||
#define calloc SDL_calloc
|
||||
#define realloc SDL_realloc
|
||||
#define free SDL_free
|
||||
|
||||
|
|
|
@ -343,7 +343,8 @@ char *SDL_strupr(char *string)
|
|||
{
|
||||
char *bufp = string;
|
||||
while ( *bufp ) {
|
||||
*bufp++ = toupper(*bufp);
|
||||
*bufp = toupper(*bufp);
|
||||
++bufp;
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
@ -354,7 +355,8 @@ char *SDL_strlwr(char *string)
|
|||
{
|
||||
char *bufp = string;
|
||||
while ( *bufp ) {
|
||||
*bufp++ = tolower(*bufp);
|
||||
*bufp = tolower(*bufp);
|
||||
++bufp;
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
@ -367,6 +369,7 @@ char *SDL_strchr(const char *string, int c)
|
|||
if ( *string == c ) {
|
||||
return (char *)string;
|
||||
}
|
||||
++string;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -380,6 +383,7 @@ char *SDL_strrchr(const char *string, int c)
|
|||
if ( *bufp == c ) {
|
||||
return (char *)bufp;
|
||||
}
|
||||
--bufp;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -393,6 +397,7 @@ char *SDL_strstr(const char *haystack, const char *needle)
|
|||
if ( SDL_strncmp(haystack, needle, length) == 0 ) {
|
||||
return (char *)haystack;
|
||||
}
|
||||
++haystack;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue