diff options
Diffstat (limited to 'backends/wince/missing')
-rw-r--r-- | backends/wince/missing/missing.cpp | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/backends/wince/missing/missing.cpp b/backends/wince/missing/missing.cpp index 43d99d8a9b..4bffdd7161 100644 --- a/backends/wince/missing/missing.cpp +++ b/backends/wince/missing/missing.cpp @@ -242,7 +242,11 @@ void rewind(FILE *stream) } +#if _WIN32_WCE < 300 +char *_strdup(const char *strSource) +#else char *strdup(const char *strSource) +#endif { char* buffer; buffer = (char*)malloc(strlen(strSource)+1); @@ -391,10 +395,6 @@ void *bsearch(const void *key, const void *base, size_t nmemb, #if _WIN32_WCE < 300 || defined(_TEST_HPC_STDIO) -int _heapchk() { - return _HEAPOK; -} - void *calloc(size_t n, size_t s) { void *result = malloc(n * s); if (result) @@ -403,6 +403,22 @@ void *calloc(size_t n, size_t s) { return result; } +char *strpbrk(const char *s, const char *accept) { + int i; + + if (!s || !accept) + return NULL; + + for (i=0; i<strlen(s); i++) { + int j; + for (j=0; j<strlen(accept); j++) + if (s[i] == accept[j]) + return (char*)&s[i]; + } + + return NULL; +} + #ifndef _TEST_HPC_STDIO int isdigit(int c) { @@ -419,6 +435,9 @@ int isspace(int c) { #endif +#ifndef WIN32_PLATFORM_HPCPRO + + int printf(const char *format, ...) { // useless anyway :) return 0; @@ -533,15 +552,7 @@ int fflush(FILE *stream) { return 0; } -void assert (int expression) { - if (!expression) - abort(); -} - -void assert (void *expression) { - if (!expression) - abort(); -} +#endif int stricmp( const char *string1, const char *string2 ) { char src[4096]; @@ -565,10 +576,6 @@ int stricmp( const char *string1, const char *string2 ) { return strcmp(src, dest); } -int _stricmp( const char *string1, const char *string2 ) { - return stricmp(string1, string2); -} - char *strrchr(const char *s, int c) { int i; |