diff src/stdlib/SDL_string.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 d02b552e5304
line wrap: on
line diff
--- a/src/stdlib/SDL_string.c	Tue Feb 07 07:03:29 2006 +0000
+++ b/src/stdlib/SDL_string.c	Tue Feb 07 09:29:18 2006 +0000
@@ -343,7 +343,8 @@
 {
     char *bufp = string;
     while ( *bufp ) {
-        *bufp++ = toupper(*bufp);
+        *bufp = toupper(*bufp);
+	++bufp;
     }
     return string;
 }
@@ -354,7 +355,8 @@
 {
     char *bufp = string;
     while ( *bufp ) {
-        *bufp++ = tolower(*bufp);
+        *bufp = tolower(*bufp);
+	++bufp;
     }
     return string;
 }
@@ -367,6 +369,7 @@
         if ( *string == c ) {
             return (char *)string;
         }
+	++string;
     }
     return NULL;
 }
@@ -380,6 +383,7 @@
         if ( *bufp == c ) {
             return (char *)bufp;
         }
+	--bufp;
     }
     return NULL;
 }
@@ -393,6 +397,7 @@
         if ( SDL_strncmp(haystack, needle, length) == 0 ) {
             return (char *)haystack;
         }
+	++haystack;
     }
     return NULL;
 }