diff options
author | Chris Apers | 2003-05-06 08:24:21 +0000 |
---|---|---|
committer | Chris Apers | 2003-05-06 08:24:21 +0000 |
commit | ba7e13262c2140fe55b4e1451036fe490a38fa06 (patch) | |
tree | 9f45ab2da4629776a36b2f5ab698668f17edefdc /backends/PalmOS/Src/missing | |
parent | c8eb0a9878f22c641c773379b6f67b077c2f9793 (diff) | |
download | scummvm-rg350-ba7e13262c2140fe55b4e1451036fe490a38fa06.tar.gz scummvm-rg350-ba7e13262c2140fe55b4e1451036fe490a38fa06.tar.bz2 scummvm-rg350-ba7e13262c2140fe55b4e1451036fe490a38fa06.zip |
Cleanup
svn-id: r7366
Diffstat (limited to 'backends/PalmOS/Src/missing')
-rw-r--r-- | backends/PalmOS/Src/missing/_string.cpp | 24 | ||||
-rw-r--r-- | backends/PalmOS/Src/missing/string.h | 1 |
2 files changed, 15 insertions, 10 deletions
diff --git a/backends/PalmOS/Src/missing/_string.cpp b/backends/PalmOS/Src/missing/_string.cpp index ad7a10a153..745c7bc41e 100644 --- a/backends/PalmOS/Src/missing/_string.cpp +++ b/backends/PalmOS/Src/missing/_string.cpp @@ -21,11 +21,18 @@ */ #include "string.h" - -Char *StrTokNext; /////////////////////////////////////////////////////////////////////////////// -Char *strtok(Char *str, const Char *sep) -{ +void *memchr(const void *s, int c, UInt32 n) { + UInt32 chr; + for(chr = 0; chr < n;chr++,((UInt8 *)s)++) + if ( *((UInt8 *)s) == c) + return (void *)s; + + return NULL; +} +/////////////////////////////////////////////////////////////////////////////// +Char *StrTokNext; +Char *strtok(Char *str, const Char *sep) { Char *position = NULL, *found, *end; @@ -67,8 +74,7 @@ Char *strtok(Char *str, const Char *sep) return str; } /////////////////////////////////////////////////////////////////////////////// -Char *strpbrk(const Char *s1, const Char *s2) -{ +Char *strpbrk(const Char *s1, const Char *s2) { Char *found; UInt32 n; @@ -81,8 +87,7 @@ Char *strpbrk(const Char *s1, const Char *s2) return NULL; } /////////////////////////////////////////////////////////////////////////////// -Char *strrchr(const Char *s, int c) -{ +Char *strrchr(const Char *s, int c) { UInt32 chr; UInt32 n = StrLen(s); @@ -93,8 +98,7 @@ Char *strrchr(const Char *s, int c) return NULL; } /////////////////////////////////////////////////////////////////////////////// -Char *strdup(const Char *s1) -{ +Char *strdup(const Char *s1) { Char* buf = (Char *)MemPtrNew(StrLen(s1)+1); if(buf) diff --git a/backends/PalmOS/Src/missing/string.h b/backends/PalmOS/Src/missing/string.h index 37adebc4d6..5d28073f13 100644 --- a/backends/PalmOS/Src/missing/string.h +++ b/backends/PalmOS/Src/missing/string.h @@ -36,6 +36,7 @@ #define strncmp StrNCompare #define strstr StrStr +void *memchr(const void *s, int c, UInt32 n); Char *strtok(Char *str, const Char *sep); Char *strrchr(const Char *s, int c); Char *strdup(const Char *strSource); |