aboutsummaryrefslogtreecommitdiff
path: root/backends
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
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')
-rw-r--r--backends/wince/missing/missing.cpp41
-rw-r--r--backends/wince/portdefs.h9
2 files changed, 29 insertions, 21 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;
diff --git a/backends/wince/portdefs.h b/backends/wince/portdefs.h
index 364b7cc168..ddfb5f0e66 100644
--- a/backends/wince/portdefs.h
+++ b/backends/wince/portdefs.h
@@ -36,15 +36,16 @@ int stricmp( const char *string1, const char *string2 );
void assert( void* expression );
void assert( int expression );
long int strtol(const char *nptr, char **endptr, int base);
-char *strdup( const char *s);
-int _heapchk();
+char *_strdup(const char *s);
+char *strpbrk(const char *s, const char *accept);
#endif
#ifdef _WIN32_WCE
-void *bsearch(const void *, const void *, size_t,
- size_t, int (*x) (const void *, const void *));
+void *bsearch(const void *, const void *, size_t, size_t, int (*x) (const void *, const void *));
+char *getcwd(char *buf, int size);
+
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>