summaryrefslogtreecommitdiffstats
path: root/loader/win32.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-08 22:26:14 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-08 22:26:14 +0000
commit031c6bf512614d3097ecd17c30eb9c2022804a9a (patch)
tree3d29a9dd51356ebefb788c74f7b9fd5eea94d26c /loader/win32.c
parentfeb1135edaf1bea9b3708d17f4772baa451d6212 (diff)
downloadmpv-031c6bf512614d3097ecd17c30eb9c2022804a9a.tar.bz2
mpv-031c6bf512614d3097ecd17c30eb9c2022804a9a.tar.xz
changes merged back from avifile cvs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2140 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/win32.c')
-rw-r--r--loader/win32.c62
1 files changed, 56 insertions, 6 deletions
diff --git a/loader/win32.c b/loader/win32.c
index 97ac40acf5..bb26233efe 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -19,10 +19,16 @@
#include "wine/winerror.h"
#include "wine/debugtools.h"
#include "wine/module.h"
-#include "win32.h"
#include <stdio.h>
+#include "win32.h"
+
+#include "registry.h"
+#include "loader.h"
+#include "com.h"
+
#include <stdlib.h>
+#include <stdarg.h>
#include <ctype.h>
#include <pthread.h>
#include <errno.h>
@@ -39,9 +45,6 @@
#include <kstat.h>
#endif
-#include "registry.h"
-#include "loader.h"
-#include "com.h"
char* def_path=WIN32_PATH;
@@ -221,7 +224,7 @@ void* my_mreq(int size, int to_zero)
if(to_zero)
memset(heap+heap_counter, 0, size);
else
- memset(heap+heap_counter, 0xcc, size); // make crash reprocable
+ memset(heap+heap_counter, 0xcc, size); // make crash reproducable
heap_counter+=size;
return heap+heap_counter-size;
}
@@ -1945,7 +1948,33 @@ int WINAPI expWritePrivateProfileStringA(const char* appname, const char* keynam
dbgprintf(" => 0\n");
return 0;
}
-
+int expsprintf(char* str, const char* format, ...)
+{
+ va_list args;
+ int r;
+ dbgprintf("sprintf(%s, %s)\n", str, format);
+ va_start(args, format);
+ r = vsprintf(str, format, args);
+ va_end(args);
+ return r;
+}
+int expsscanf(const char* str, const char* format, ...)
+{
+ va_list args;
+ int r;
+ dbgprintf("sscanf(%s, %s)\n", str, format);
+ va_start(args, format);
+ r = vsscanf(str, format, args);
+ va_end(args);
+ return r;
+}
+void* expfopen(const char* path, const char* mode)
+{
+ //fails
+ printf("fopen: \"%s\" mode:%s\n", path, mode);
+ //return fopen(path, mode);
+ return 0;
+}
unsigned int _GetPrivateProfileIntA(const char* appname, const char* keyname, INT default_value, const char* filename)
{
return expGetPrivateProfileIntA(appname, keyname, default_value, filename);
@@ -2063,6 +2092,21 @@ time_t exptime(time_t* t)
return result;
}
+int exprand()
+{
+ return rand();
+}
+
+void expsrand(int seed)
+{
+ srand(seed);
+}
+
+int exp_ftol(float f)
+{
+ return (int)(f+.5);
+}
+
int WINAPI expStringFromGUID2(GUID* guid, char* str, int cbMax)
{
int result=snprintf(str, cbMax, "%.8x-%.4x-%.4x-%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x",
@@ -2818,6 +2862,12 @@ FF(isalnum, -1)
FF(memmove, -1)
FF(memcmp, -1)
FF(time, -1)
+FF(_ftol,-1)
+FF(rand, -1)
+FF(srand, -1)
+FF(sprintf,-1)
+FF(sscanf,-1)
+FF(fopen,-1)
};
struct exports exp_winmm[]={
FF(GetDriverModuleHandle, -1)