diff options
author | uid56437 <none@none> | 2001-07-04 14:05:09 +0000 |
---|---|---|
committer | uid56437 <none@none> | 2001-07-04 14:05:09 +0000 |
commit | 0342d76c613911b282e14a1188326075d1d43bca (patch) | |
tree | 0547e6dd8fa7fa400a06d793642cd03855d6ccc5 /src/libw32dll/wine/vfl.c | |
parent | 2806c8c5cd03db19886b75fa05b6e50d7d4815e1 (diff) | |
download | xine-lib-0342d76c613911b282e14a1188326075d1d43bca.tar.gz xine-lib-0342d76c613911b282e14a1188326075d1d43bca.tar.bz2 |
Add prototypes for all functions in wine/*, to catch __stdcall function
attribute mismatches between function prototypes and function definitions.
Such a __stdcall mismatch can corrupt the cpu's stack, because both the
caller and the callee clean up function parameter from the stack (or none
of them removes the function parameters)
wine/* should be less sensitive to optimzation options due to this change.
CVS patchset: 245
CVS date: 2001/07/04 14:05:09
Diffstat (limited to 'src/libw32dll/wine/vfl.c')
-rw-r--r-- | src/libw32dll/wine/vfl.c | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/src/libw32dll/wine/vfl.c b/src/libw32dll/wine/vfl.c index 02e6f5b6c..13353d1ad 100644 --- a/src/libw32dll/wine/vfl.c +++ b/src/libw32dll/wine/vfl.c @@ -12,6 +12,8 @@ #include "vfw.h" #include "winestring.h" #include "driver.h" +#include "win32.h" +#include "loader.h" #include "avifmt.h" #define FIXME_(X) printf @@ -19,23 +21,12 @@ long VFWAPI VideoForWindowsVersion(void); -extern void* my_mreq(int size, int to_zero); -extern void DrvClose(HDRVR hdrvr); -extern int my_release(char* memory); - -long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits); - -WIN_BOOL VFWAPI ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo); -LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, long cb); -HIC VFWAPI ICOpen(long fccType, long fccHandler, UINT wMode); -HIC VFWAPI ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler); - -LRESULT VFWAPI ICClose(HIC hic); -LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2); -HIC VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags); - #define OpenDriverA DrvOpen -extern HDRVR VFWAPI DrvOpen(long); + +#if 1 +#define STORE_ALL /**/ +#define REST_ALL /**/ +#else #define STORE_ALL \ __asm__ ( \ "push %%ebx\n\t" \ @@ -51,14 +42,9 @@ extern HDRVR VFWAPI DrvOpen(long); "pop %%edx\n\t" \ "pop %%ecx\n\t" \ "pop %%ebx\n\t"::) +#endif -typedef struct { - unsigned int uDriverSignature; - void* hDriverModule; - DRIVERPROC DriverProc; - long dwDriverID; -} DRVR; /*********************************************************************** * VideoForWindowsVersion [MSVFW.2][MSVIDEO.2] @@ -289,9 +275,11 @@ LRESULT VFWAPI ICSendMessage(HIC hic,unsigned int msg,long lParam1,long lParam2) { LRESULT ret; WINE_HIC *whic = (WINE_HIC*)hic; - char qw[200]; +#if 0 + char qw[200]; __asm__ __volatile__ ("fsave (%0)\n\t": :"r"(&qw)); +#endif STORE_ALL; /*__asm__ ( @@ -302,7 +290,9 @@ ICSendMessage(HIC hic,unsigned int msg,long lParam1,long lParam2) { );*/ ret = whic->driverproc(whic->private,1,msg,lParam1,lParam2); REST_ALL; +#if 0 __asm__ __volatile__ ("frstor (%0)\n\t": :"r"(&qw)); +#endif // } else // ret = SendDriverMessage(whic->hdrv,msg,lParam1,lParam2); @@ -323,7 +313,7 @@ LRESULT VFWAPI ICClose(HIC hic) { my_release(whic); return 0; } -int VFWAPI ICDoSomething() +int VFWAPI ICDoSomething(void) { return 0; } |