aboutsummaryrefslogtreecommitdiff
path: root/backends/wince/missing
diff options
context:
space:
mode:
authorNicolas Bacca2003-05-11 14:02:44 +0000
committerNicolas Bacca2003-05-11 14:02:44 +0000
commit690872eca26d56526c414148db97a4158eaf64f6 (patch)
tree445c0d9ee40c2695515b308877f12c22548d63af /backends/wince/missing
parente5edc562e281e7031525147bc5803260688c4a7a (diff)
downloadscummvm-rg350-690872eca26d56526c414148db97a4158eaf64f6.tar.gz
scummvm-rg350-690872eca26d56526c414148db97a4158eaf64f6.tar.bz2
scummvm-rg350-690872eca26d56526c414148db97a4158eaf64f6.zip
Update missing functions for HPC builds
svn-id: r7450
Diffstat (limited to 'backends/wince/missing')
-rw-r--r--backends/wince/missing/missing.cpp41
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;