[Mplayer-cvslog] CVS: main/loader Makefile,1.4,1.5 driver.c,1.7,1.8 ext.c,1.6,1.7 module.c,1.5,1.6 registry.c,1.10,1.11 registry.h,1.3,1.4 win32.c,1.39,1.40 win32.h,1.8,1.9

Arpi of Ize arpi at mplayer.dev.hu
Tue Dec 11 23:58:16 CET 2001


Update of /cvsroot/mplayer/main/loader
In directory mplayer:/var/tmp.root/cvs-serv2535

Modified Files:
	Makefile driver.c ext.c module.c registry.c registry.h win32.c 
	win32.h 
Log Message:
avifile merge. kabi: indent changes really suxxxx

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/loader/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile	4 Oct 2001 02:21:34 -0000	1.4
+++ Makefile	11 Dec 2001 22:58:13 -0000	1.5
@@ -1,7 +1,7 @@
 include ../config.mak
 
 # Generated automatically from Makefile.in by configure.
-DEFINES=$(WIN32_PATH) -D__WINE__ -Ddbg_printf=__vprintf \
+DEFINES=$(WIN32_PATH) -DMPLAYER -D__WINE__ -Ddbg_printf=__vprintf \
 	-DTRACE=__vprintf # -DDETAILED_OUT
 
 LIB_OBJECTS= ldt_keeper.o pe_image.o module.o \

Index: driver.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/driver.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- driver.c	4 Oct 2001 00:24:05 -0000	1.7
+++ driver.c	11 Dec 2001 22:58:13 -0000	1.8
@@ -136,7 +136,7 @@
     if (!(npDriver = DrvAlloc(&hDriver, &uDrvResult)))
 	return ((HDRVR) 0);
 
-    if (!(npDriver->hDriverModule = expLoadLibraryA(win32_codec_name))) {
+    if (!(npDriver->hDriverModule = LoadLibraryA(win32_codec_name))) {
      	printf("Can't open library %s\n", win32_codec_name);
         DrvFree(hDriver);
         return ((HDRVR) 0);

Index: ext.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/ext.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ext.c	26 Nov 2001 01:17:24 -0000	1.6
+++ ext.c	11 Dec 2001 22:58:13 -0000	1.7
@@ -5,7 +5,7 @@
  *
  *
  ********************************************************/
-#include <config.h>
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_MALLOC_H
@@ -17,6 +17,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <stdarg.h>
+#include <ctype.h>
 #include <wine/windef.h>
 #include <wine/winbase.h>
 #include <wine/debugtools.h>
@@ -146,6 +147,7 @@
     }
     return result;
 }
+/* i stands here for ignore case! */
 int wcsnicmp(const unsigned short* s1, const unsigned short* s2, int n)
 {
     /*
@@ -156,17 +158,21 @@
     */
     while(n>0)
     {
-	if(*s1<*s2)
-	    return -1;
-	else
-    	    if(*s1>*s2)
-		return 1;
+	if (((*s1 | *s2) & 0xff00) || toupper((char)*s1) != toupper((char)*s2))
+	{
+
+	    if(*s1<*s2)
+		return -1;
 	    else
-		if(*s1==0)
-		    return 0;
-    s1++;
-    s2++;
-    n--;
+		if(*s1>*s2)
+		    return 1;
+		else
+		    if(*s1==0)
+			return 0;
+	}
+	s1++;
+	s2++;
+	n--;
     }
     return 0;
 }

Index: module.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/module.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- module.c	3 Nov 2001 19:40:38 -0000	1.5
+++ module.c	11 Dec 2001 22:58:13 -0000	1.6
@@ -3,7 +3,7 @@
  *
  * Copyright 1995 Alexandre Julliard
  */
-#include <config.h>
+#include "config.h"
 
 #include <assert.h>
 #include <errno.h>
@@ -14,33 +14,8 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/types.h>
-/*
-#ifdef __linux__
-#include <asm/unistd.h>
-#include <asm/ldt.h>
-#else
-#define LDT_ENTRIES     8192
-#define LDT_ENTRY_SIZE  8
-
-struct modify_ldt_ldt_s {
-        unsigned int  entry_number;
-        unsigned long base_addr;
-        unsigned int  limit;
-        unsigned int  seg_32bit:1;
-        unsigned int  contents:2;
-        unsigned int  read_exec_only:1;
-        unsigned int  limit_in_pages:1;
-        unsigned int  seg_not_present:1;
-        unsigned int  useable:1;
-};
-
-#define MODIFY_LDT_CONTENTS_DATA        0
-#define MODIFY_LDT_CONTENTS_STACK       1
-#define MODIFY_LDT_CONTENTS_CODE        2
-#define __NR_modify_ldt         123
-#endif
 
-*/
+
 #include <wine/windef.h>
 #include <wine/winerror.h>
 #include <wine/heap.h>
@@ -71,7 +46,7 @@
 
 HANDLE SegptrHeap;
 
-WINE_MODREF *MODULE_FindModule(LPCSTR m)
+WINE_MODREF* MODULE_FindModule(LPCSTR m)
 {
     modref_list* list=local_wm;
     TRACE("Module %s request\n", m);
@@ -215,7 +190,7 @@
  * NOTE: Assumes that the process critical section is held!
  *
  */
-WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
+static WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
 {
     WIN_BOOL retv = TRUE;
     int i;
@@ -276,7 +251,7 @@
  * sequence at MODULE_DllProcessAttach.  Unless the bForceDetach flag
  * is set, only DLLs with zero refcount are notified.
  */
-void MODULE_DllProcessDetach( WINE_MODREF* wm, WIN_BOOL bForceDetach, LPVOID lpReserved )
+static void MODULE_DllProcessDetach( WINE_MODREF* wm, WIN_BOOL bForceDetach, LPVOID lpReserved )
 {
     //    WINE_MODREF *wm=local_wm;
     modref_list* l = local_wm;
@@ -291,6 +266,74 @@
     local_wm = 0;*/
 }
 
+/***********************************************************************
+ *	MODULE_LoadLibraryExA	(internal)
+ *
+ * Load a PE style module according to the load order.
+ *
+ * The HFILE parameter is not used and marked reserved in the SDK. I can
+ * only guess that it should force a file to be mapped, but I rather
+ * ignore the parameter because it would be extremely difficult to
+ * integrate this with different types of module represenations.
+ *
+ */
+static WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
+{
+	DWORD err = GetLastError();
+	WINE_MODREF *pwm;
+	int i;
+//	module_loadorder_t *plo;
+
+        SetLastError( ERROR_FILE_NOT_FOUND );
+	TRACE("Trying native dll '%s'\n", libname);
+	pwm = PE_LoadLibraryExA(libname, flags);
+#ifdef HAVE_LIBDL
+	if(!pwm)
+	{
+    	    TRACE("Trying ELF dll '%s'\n", libname);
+	    pwm=(WINE_MODREF*)ELFDLL_LoadLibraryExA(libname, flags);
+	}
+#endif
+//		printf("0x%08x\n", pwm);
+//		break;
+	if(pwm)
+	{
+		/* Initialize DLL just loaded */
+		TRACE("Loaded module '%s' at 0x%08x, \n", libname, pwm->module);
+		/* Set the refCount here so that an attach failure will */
+		/* decrement the dependencies through the MODULE_FreeLibrary call. */
+		pwm->refCount++;
+
+                SetLastError( err );  /* restore last error */
+		return pwm;
+	}
+
+
+	WARN("Failed to load module '%s'; error=0x%08lx, \n", libname, GetLastError());
+	return NULL;
+}
+
+/***********************************************************************
+ *           MODULE_FreeLibrary
+ *
+ * NOTE: Assumes that the process critical section is held!
+ */
+static WIN_BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
+{
+    TRACE("(%s) - START\n", wm->modname );
+
+    /* Recursively decrement reference counts */
+    //MODULE_DecRefCount( wm );
+
+    /* Call process detach notifications */
+    MODULE_DllProcessDetach( wm, FALSE, NULL );
+
+    PE_UnloadLibrary(wm);
+
+    TRACE("END\n");
+
+    return TRUE;
+}
 
 /***********************************************************************
  *           LoadLibraryExA   (KERNEL32)
@@ -311,6 +354,8 @@
 		return 0;
 	}
 	printf("Loading DLL: '%s'\n", libname);
+//	if(fs_installed==0)
+//	    install_fs();
 
 	while (wm == 0 && listpath[++i])
 	{
@@ -367,60 +412,12 @@
 
 
 /***********************************************************************
- *	MODULE_LoadLibraryExA	(internal)
- *
- * Load a PE style module according to the load order.
- *
- * The HFILE parameter is not used and marked reserved in the SDK. I can
- * only guess that it should force a file to be mapped, but I rather
- * ignore the parameter because it would be extremely difficult to
- * integrate this with different types of module represenations.
- *
- */
-WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags )
-{
-	DWORD err = GetLastError();
-	WINE_MODREF *pwm;
-	int i;
-//	module_loadorder_t *plo;
-
-        SetLastError( ERROR_FILE_NOT_FOUND );
-	TRACE("Trying native dll '%s'\n", libname);
-	pwm = PE_LoadLibraryExA(libname, flags);
-#ifdef HAVE_LIBDL
-	if(!pwm)
-	{
-    	    TRACE("Trying ELF dll '%s'\n", libname);
-	    pwm=(WINE_MODREF*)ELFDLL_LoadLibraryExA(libname, flags);
-	}
-#endif
-//		printf("0x%08x\n", pwm);
-//		break;
-	if(pwm)
-	{
-		/* Initialize DLL just loaded */
-		TRACE("Loaded module '%s' at 0x%08x, \n", libname, pwm->module);
-		/* Set the refCount here so that an attach failure will */
-		/* decrement the dependencies through the MODULE_FreeLibrary call. */
-		pwm->refCount++;
-
-                SetLastError( err );  /* restore last error */
-		return pwm;
-	}
-
-
-	WARN("Failed to load module '%s'; error=0x%08lx, \n", libname, GetLastError());
-	return NULL;
-}
-
-/***********************************************************************
  *           LoadLibraryA         (KERNEL32)
  */
 HMODULE WINAPI LoadLibraryA(LPCSTR libname) {
 	return LoadLibraryExA(libname,0,0);
 }
 
-
 /***********************************************************************
  *           FreeLibrary
  */
@@ -430,7 +427,6 @@
     WINE_MODREF *wm;
 
     wm=MODULE32_LookupHMODULE(hLibModule);
-//    wm=local_wm;
 
     if ( !wm || !hLibModule )
     {
@@ -479,28 +475,6 @@
 }
 
 /***********************************************************************
- *           MODULE_FreeLibrary
- *
- * NOTE: Assumes that the process critical section is held!
- */
-WIN_BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
-{
-    TRACE("(%s) - START\n", wm->modname );
-
-    /* Recursively decrement reference counts */
-    //MODULE_DecRefCount( wm );
-
-    /* Call process detach notifications */
-    MODULE_DllProcessDetach( wm, FALSE, NULL );
-
-    PE_UnloadLibrary(wm);
-
-    TRACE("END\n");
-
-    return TRUE;
-}
-
-/***********************************************************************
  *           GetProcAddress   		(KERNEL32.257)
  */
 FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
@@ -551,11 +525,13 @@
 void CodecAlloc(void)
 {
     acounter++;
+    //printf("**************CODEC ALLOC %d\n", acounter);
 }
 
 void CodecRelease(void)
 {
     acounter--;
+    //printf("**************CODEC RELEASE %d\n", acounter);
     if (acounter == 0)
     {
 	for (;;)

Index: registry.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/registry.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- registry.c	26 Nov 2001 14:44:45 -0000	1.10
+++ registry.c	11 Dec 2001 22:58:13 -0000	1.11
@@ -1,4 +1,4 @@
-#include <config.h>
+#include "config.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -12,8 +12,8 @@
 #include <wine/winnt.h>
 #include <wine/winerror.h>
 
-#include <ext.h>
-#include <registry.h>
+#include "ext.h"
+#include "registry.h"
 
 //#undef TRACE
 //#define TRACE printf
@@ -168,11 +168,10 @@
 	free(regs);
 	regs = 0;
     }
-    if (localregpathname)
-    {
+
+    if (localregpathname && localregpathname != regpathname)
 	free(localregpathname);
-	localregpathname = 0;
-    }
+    localregpathname = 0;
 }
 
 
@@ -298,16 +297,21 @@
 	// can't be free-ed - it's static and probably thread
 	// unsafe structure which is stored in glibc
 
-#ifdef USE_WIN32DLL
-	// MPlayer:
-	localregpathname = get_path("registry");
+#ifdef MPLAYER
+	regpathname = get_path("registry");
+	localregpathname = regpathname;
 #else
-	// avifile:
+	// regpathname is an external pointer
+        //
+	// registry.c is holding it's own internal pointer
+	// localregpathname  - which is being allocate/deallocated
+
 	if (localregpathname == 0)
 	{
             const char* pthn = regpathname;
 	    if (!regpathname)
 	    {
+		// avifile - for now reading data from user's home
 		struct passwd* pwent;
 		pwent = getpwuid(geteuid());
                 pthn = pwent->pw_dir;
@@ -402,16 +406,9 @@
 	char* c;
 	TRACE("Querying value %s\n", value);
 	if(!regs)
-	    init_registry()
-;
+	    init_registry();
+
 	c=build_keyname(key, value);
-	if (strcmp(value, "AudioReserved001")==0)
-	{
-	    printf("Query for AudioReserved001  %p  %p  count: %d\n", type, data, *count);
-	    *(int*)type = REG_DWORD;
-	    *(int*)data = 256;
-	    return 0;
-	}
 	if(c==NULL)
 	    	return 1;
         t=find_value_by_name(c);
@@ -446,8 +443,8 @@
 //        TRACE("Creating/Opening key %s\n", name);
         TRACE("Creating/Opening key %s\n", name);
 	if(!regs)
-	    init_registry()
-;
+	    init_registry();
+
 	fullname=build_keyname(key, name);
 	if(fullname==NULL)
 		return 1;
@@ -509,12 +506,19 @@
     char* c;
     TRACE("Request to set value %s\n", name);
     if(!regs)
-        init_registry()
-;
+	init_registry();
+
     c=build_keyname(key, name);
     if(c==NULL)
 	return 1;
     insert_reg_value(key, name, v2, data, size);
     free(c);
     return 0;
+}
+
+long RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcbName,
+		   LPDWORD lpReserved, LPSTR lpClass, LPDWORD lpcbClass,
+		   LPFILETIME lpftLastWriteTime)
+{
+    return ERROR_NO_MORE_ITEMS;
 }

Index: registry.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/registry.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- registry.h	26 Nov 2001 01:17:24 -0000	1.3
+++ registry.h	11 Dec 2001 22:58:13 -0000	1.4
@@ -24,7 +24,12 @@
 		     void* sec_attr, int* newkey, int* status);
 long RegSetValueExA(long key, const char* name, long v1, long v2,
 		    const void* data, long size);
+
 #ifdef __WINE_WINERROR_H
+
+long RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcbName,
+		   LPDWORD lpReserved, LPSTR lpClass, LPDWORD lpcbClass,
+		   LPFILETIME lpftLastWriteTime);
 long RegEnumValueA(HKEY hkey, DWORD index, LPSTR value, LPDWORD val_count,
 		   LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count);
 #endif

Index: win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- win32.c	11 Dec 2001 14:56:21 -0000	1.39
+++ win32.c	11 Dec 2001 22:58:13 -0000	1.40
@@ -1,13 +1,13 @@
 /***********************************************************
 
-	Win32 emulation code. Functions that emulate
-	responses from corresponding Win32 API calls.
-         Since we are not going to be able to load
-       virtually any DLL, we can only implement this
-      much, adding needed functions with each new codec.
+Win32 emulation code. Functions that emulate
+responses from corresponding Win32 API calls.
+Since we are not going to be able to load
+virtually any DLL, we can only implement this
[...4396 lines suppressed...]
-    pos++;
-    return (void*)answ;
-//    memcpy(extcode, &unk_exp1, 0x64);
-//    *(int*)(extcode+52)-=((int)extcode-(int)&unk_exp1);
-//    return (void*)extcode;
-//    printf("Unknown func %s:%s\n", library, name);
-//    return (void*)ext_unknown;
+    return add_stub(pos);
 }
 
 void my_garbagecollection(void)
@@ -3591,7 +3840,7 @@
     {
 	alloc_header* mem = last_alloc + 1;
 	unfree += my_size(mem);
-        unfreecnt++;
+	unfreecnt++;
 	my_release(mem);
     }
     printf("Total Unfree %d bytes cnt %d [%p,%d]\n",unfree, unfreecnt, last_alloc, alccnt);

Index: win32.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- win32.h	10 Dec 2001 15:57:11 -0000	1.8
+++ win32.h	11 Dec 2001 22:58:13 -0000	1.9
@@ -7,12 +7,8 @@
 #include <wine/winbase.h>
 #include <com.h>
 
-extern void* my_mreq(int size, int to_zero);
-extern int my_release(void* memory);
-extern void* my_realloc(void *memory,int size);
 extern void my_garbagecollection(void);
 
-
 typedef struct {
     UINT             uDriverSignature;
     HINSTANCE        hDriverModule;
@@ -26,234 +22,12 @@
 
 typedef struct tls_s tls_t;
 
-extern int WINAPI ext_unknown(void);
-
-extern int WINAPI expIsBadWritePtr(void* ptr, unsigned int count);
-extern int WINAPI expIsBadReadPtr(void* ptr, unsigned int count);
-extern int WINAPI expDisableThreadLibraryCalls(int module);
-extern HMODULE WINAPI expGetDriverModuleHandle(DRVR* pdrv);
-extern HMODULE WINAPI expGetModuleHandleA(const char* name);
-extern void* WINAPI expCreateThread(void* pSecAttr, long dwStackSize, void* lpStartAddress,
-				    void* lpParameter, long dwFlags, long* dwThreadId);
-extern void* WINAPI expCreateEventA(void* pSecAttr, char bManualReset,
-				    char bInitialState, const char* name);
-extern void* WINAPI expSetEvent(void* event);
-extern void* WINAPI expResetEvent(void* event);
-extern void* WINAPI expWaitForSingleObject(void* object, int duration);
-extern WIN_BOOL WINAPI expIsProcessorFeaturePresent(DWORD v);
-extern void WINAPI expGetSystemInfo(SYSTEM_INFO* si);
-extern long WINAPI expGetVersion(void);
-long WINAPI expGetVersionExA(OSVERSIONINFOA* c);
-extern HANDLE WINAPI expHeapCreate(long flags, long init_size, long max_size);
-extern void* WINAPI expHeapAlloc(HANDLE heap, int flags, int size);
-extern long WINAPI expHeapDestroy(void* heap);
-extern long WINAPI expHeapFree(int arg1, int arg2, void* ptr);
-extern void* WINAPI expHeapReAlloc(HANDLE heap,int flags,void* lpMem,int size);
-extern long WINAPI expHeapSize(int heap, int flags, void* pointer);
-extern long WINAPI expGetProcessHeap(void);
-extern void* WINAPI expVirtualAlloc(void* v1, long v2, long v3, long v4);
-extern int WINAPI expVirtualFree(void* v1, int v2, int v3);
-extern void WINAPI expInitializeCriticalSection(CRITICAL_SECTION* c);
-extern void WINAPI expEnterCriticalSection(CRITICAL_SECTION* c);
-extern void WINAPI expLeaveCriticalSection(CRITICAL_SECTION* c);
-extern void WINAPI expDeleteCriticalSection(CRITICAL_SECTION *c);
-extern int WINAPI expGetCurrentThreadId(void);
-extern int WINAPI expGetCurrentProcess(void);
-extern void* WINAPI expTlsAlloc(void);
-extern int WINAPI expTlsSetValue(tls_t* index, void* value);
-extern void* WINAPI expTlsGetValue(tls_t* index);
-extern int WINAPI expTlsFree(tls_t* index);
-extern void* WINAPI expLocalAlloc(int flags, int size);
-extern void* WINAPI expLocalReAlloc(int handle,int size,int flags);
-extern void* WINAPI expLocalLock(void* z);
-extern void* WINAPI expGlobalAlloc(int flags, int size);
-extern void* WINAPI expGlobalLock(void* z);
-extern int WINAPI expGlobalSize(void* amem);
-extern int WINAPI expLoadStringA(long instance, long  id, void* buf, long size);
-extern long WINAPI expMultiByteToWideChar(long v1, long v2, char* s1, long siz1, short* s2, int siz2);
-extern long WINAPI expWideCharToMultiByte(long v1, long v2, short* s1, long siz1, char* s2, int siz2, char* c3, int* siz3);
-extern long WINAPI expGetVersionExA(OSVERSIONINFOA* c);
-extern HANDLE WINAPI expCreateSemaphoreA(char* v1, long init_count, long max_count, char* name);
-extern long WINAPI expReleaseSemaphore(long hsem, long increment, long* prev_count);
-extern long WINAPI expRegOpenKeyExA(long key, const char* subkey, long reserved, long access, int* newkey);
-extern long WINAPI expRegCloseKey(long key);
-
-extern long WINAPI expRegQueryValueExA(long key, const char* value, int* reserved, int* type, int* data, int* count);
-extern long WINAPI expRegCreateKeyExA(long key, const char* name, long reserved,
-				      void* classs, long options, long security,
-				      void* sec_attr, int* newkey, int* status);
-extern long WINAPI expRegSetValueExA(long key, const char* name, long v1, long v2, void* data, long size);
-extern long WINAPI expRegOpenKeyA (long hKey, LPCSTR lpSubKey, int* phkResult);
-extern long WINAPI expQueryPerformanceCounter(long long* z);
-extern long WINAPI expQueryPerformanceFrequency(long long* z);
-extern long WINAPI exptimeGetTime(void);
-extern void* WINAPI expLocalHandle(void* v);
-extern void* WINAPI expGlobalHandle(void* v);
-extern int WINAPI expGlobalUnlock(void* v);
-extern void* WINAPI expGlobalFree(void* v);
-extern void* WINAPI expGlobalReAlloc(void* v, int size, int flags);
-extern int WINAPI expLocalUnlock(void* v);
-extern void* WINAPI expLocalFree(void* v);
-extern HRSRC WINAPI expFindResourceA(HMODULE module, char* name, char* type);
-extern HGLOBAL WINAPI expLoadResource(HMODULE module, HRSRC res);
-extern void* WINAPI expLockResource(long res);
-extern int WINAPI expFreeResource(long res);
-extern int WINAPI expCloseHandle(long v1);
-extern const char* WINAPI expGetCommandLineA(void);
-extern LPWSTR WINAPI expGetEnvironmentStringsW(void);
-extern void * WINAPI expRtlZeroMemory(void *p, size_t len);
-extern void * WINAPI expRtlMoveMemory(void *dst, void *src, size_t len);
-extern void * WINAPI expRtlFillMemory(void *p, int ch, size_t len);
-extern int WINAPI expFreeEnvironmentStringsW(short* strings);
-extern int WINAPI expFreeEnvironmentStringsA(char* strings);
-extern LPWSTR WINAPI expGetEnvironmentStringsW(void);
-LPCSTR WINAPI expGetEnvironmentStrings(void);
-extern int WINAPI expGetStartupInfoA(STARTUPINFOA *s);
-extern int WINAPI expGetStdHandle(int z);
-extern int WINAPI expGetFileType(int handle);
-extern int WINAPI expSetHandleCount(int count);
-extern int WINAPI expGetACP(void);
-extern int WINAPI expGetModuleFileNameA(int module, char* s, int len);
-extern int WINAPI expSetUnhandledExceptionFilter(void* filter);
-extern int WINAPI expLoadLibraryA(char* name);
-extern int WINAPI expFreeLibrary(int module);
-extern void* WINAPI expGetProcAddress(HMODULE mod, char* name);
-extern long WINAPI expCreateFileMappingA(int hFile, void* lpAttr,
-					 long flProtect, long dwMaxHigh, long dwMaxLow, const char* name);
-extern long WINAPI expOpenFileMappingA(long hFile, long hz, const char* name);
-extern void* WINAPI expMapViewOfFile(HANDLE file, DWORD mode, DWORD offHigh, DWORD offLow, DWORD size);
-extern void* WINAPI expUnmapViewOfFile(void* view);
-extern void* WINAPI expSleep(int time);
-extern void* WINAPI expCreateCompatibleDC(int hdc);
-extern int WINAPI expGetDeviceCaps(int hdc, int unk);
-extern WIN_BOOL WINAPI expDeleteDC(int hdc);
-extern void* WINAPI expGetWindowDC(int hdc);
-extern void* WINAPI expCreateFontA(void);
-extern int WINAPI expGetPrivateProfileIntA(const char* appname, const char* keyname, int default_value, const char* filename);
-extern int WINAPI expGetProfileIntA(const char* appname, const char* keyname, int default_value);
-extern int WINAPI expGetPrivateProfileStringA(const char* appname, const char* keyname,
-					      const char* def_val, char* dest, unsigned int len, const char* filename);
-extern int WINAPI expWritePrivateProfileStringA(const char* appname, const char* keyname,
-						const char* string, const char* filename);
-extern int WINAPI expDefDriverProc(int _private, int id, int msg, int arg1, int arg2);
-extern int WINAPI expSizeofResource(int v1, int v2);
-extern int WINAPI expGetLastError(void);
-extern void WINAPI expSetLastError(int error);
-extern long WINAPI exptimeGetTime(void);
-extern int WINAPI expStringFromGUID2(GUID* guid, char* str, int cbMax);
-extern int WINAPI expGetFileVersionInfoSizeA(const char* name, int* lpHandle);
-extern int WINAPI expIsBadStringPtrW(const short* string, int nchars);
-extern int WINAPI expIsBadStringPtrA(const char* string, int nchars);
-extern long WINAPI expInterlockedIncrement( long* dest );
-extern long WINAPI expInterlockedDecrement( long* dest );
-extern void WINAPI expOutputDebugStringA( const char* string );
-extern int WINAPI expGetDC(int hwnd);
-extern int WINAPI expGetDesktopWindow(void);
-extern int WINAPI expReleaseDC(int hwnd, int hdc);
-extern int WINAPI expLoadCursorA(int handle,LPCSTR name);
-extern int WINAPI expSetCursor(void *cursor);
-extern int WINAPI expGetCursorPos(void *cursor);
-extern int WINAPI expRegisterWindowMessageA(char *message);
-extern int WINAPI expGetProcessVersion(int pid);
-extern int WINAPI expGetCurrentThread(void);
-extern int WINAPI expGetOEMCP(void);
-extern int WINAPI expGetCPInfo(int cp,void *info);
-extern int WINAPI expGetSysColor(int pid);
-extern int WINAPI expGetSysColorBrush(int pid);
-extern int WINAPI expGetSystemMetrics(int index);
-extern int WINAPI expGetSystemPaletteEntries(int hdc, int iStartIndex, int nEntries, void* lppe);
-extern int WINAPI expGetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation);
-extern void WINAPI expGetLocalTime(SYSTEMTIME* systime);
-extern int WINAPI expGetSystemTime(SYSTEMTIME* systime);
-extern int WINAPI expGetEnvironmentVariableA(const char* name, char* field, int size);
-extern void* WINAPI expCoTaskMemAlloc(ULONG cb);
-extern void WINAPI expCoTaskMemFree(void* cb);
-extern long WINAPI expCoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
-				       long dwClsContext, GUID* riid, void** ppv);
-extern int WINAPI expIsRectEmpty(CONST RECT *lprc);
-extern unsigned int WINAPI expGetTempPathA(unsigned int len, char* path);
-extern HANDLE WINAPI expFindFirstFileA(LPCSTR s, LPWIN32_FIND_DATAA lpfd);
-extern WIN_BOOL WINAPI expFindNextFileA(HANDLE h,LPWIN32_FIND_DATAA p);
-extern WIN_BOOL WINAPI expFindClose(HANDLE h);
-extern UINT WINAPI expSetErrorMode(UINT i);
-extern UINT      WINAPI expGetWindowsDirectoryA(LPSTR s,UINT c);
-extern WIN_BOOL  WINAPI expDeleteFileA(LPCSTR s);
-extern WIN_BOOL  WINAPI expFileTimeToLocalFileTime(const FILETIME* cpf, LPFILETIME pf);
-extern UINT WINAPI expGetTempFileNameA(LPCSTR cs1,LPCSTR cs2,UINT i,LPSTR ps);
-extern HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
-				    LPSECURITY_ATTRIBUTES p1, DWORD i3,DWORD i4,HANDLE i5);
-extern LPCSTR WINAPI expGetSystemDirectoryA(void);
-extern WIN_BOOL WINAPI expReadFile(HANDLE h,LPVOID pv,DWORD size,LPDWORD rd,LPOVERLAPPED unused);
-extern WIN_BOOL WINAPI expWriteFile(HANDLE h,LPCVOID pv,DWORD size,LPDWORD wr,LPOVERLAPPED unused);
-extern DWORD  WINAPI expSetFilePointer(HANDLE h, LONG val, LPLONG ext, DWORD whence);
-extern HDRVR WINAPI expOpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
-				   LPARAM lParam2);
-HDRVR WINAPI expOpenDriver(LPCSTR szDriverName, LPCSTR szSectionName,
-			   LPARAM lParam2) ;
-extern WIN_BOOL WINAPI expGetProcessAffinityMask(HANDLE hProcess,
-						 LPDWORD lpProcessAffinityMask,
-						 LPDWORD lpSystemAffinityMask);
-extern  DWORD WINAPI expRegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_count,
-				       LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count );
-extern INT WINAPI expMulDiv(int nNumber,int nNumerator,int nDenominator);
-extern LONG WINAPI explstrcmpiA(const char* str1, const char* str2);
-extern LONG WINAPI explstrlenA(const char* str1);
-extern LONG WINAPI explstrcpyA(char* str1, const char* str2);
-extern LONG WINAPI explstrcpynA(char* str1, const char* str2,int len);
-extern LONG WINAPI explstrcatA(char* str1, const char* str2);
-extern LONG WINAPI expInterlockedExchange(long *dest, long l);
-void WINAPI expInitCommonControls(void);
-extern HRESULT WINAPI expCoCreateFreeThreadedMarshaler(void *pUnkOuter, void **ppUnkInner);
-extern int WINAPI expDuplicateHandle(
-	HANDLE hSourceProcessHandle,  // handle to source process
-	HANDLE hSourceHandle,         // handle to duplicate
-	HANDLE hTargetProcessHandle,  // handle to target process
-	HANDLE* lpTargetHandle,      // duplicate handle
-	DWORD dwDesiredAccess,        // requested access
-	int bInheritHandle,          // handle inheritance option  
-	DWORD dwOptions               // optional actions
-);
-extern HRESULT WINAPI expCoInitialize(
-	LPVOID lpReserved       /* [in] pointer to win32 malloc interface
-                                   (obsolete, should be NULL) */
-);                                                                                     
-
-
-extern void* CDECL expmalloc(int size);
-extern void CDECL expfree(void* mem);
-extern void* CDECL expnew(int size);
-extern int CDECL expdelete(void* memory);
-extern int CDECL exp_initterm(int v1, int v2);
-
-extern int expwsprintfA(char* string, char* format, ...);
-extern char* expstrrchr(char* string, int value);
-extern char* expstrchr(char* string, int value);
-extern int expstrlen(char* str);
-extern int expstrcpy(char* str1, const char* str2);
-extern int expstrcmp(const char* str1, const char* str2);
-extern int expstrncmp(const char* str1, const char* str2, int);
-extern int expstrcat(char* str1, const char* str2);
-extern int expisalnum(int c);
-extern int expmemmove(void* dest, void* src, int n);
-extern int expmemcmp(void* dest, void* src, int n);
-extern void *expmemcpy(void* dest, void* src, int n) ;
-extern time_t exptime(time_t* t);
-extern int exprand(void);
-extern void expsrand(int seed);
-extern int exp_ftol(float f);
-extern int expsprintf(char* str, const char* format, ...);
-extern double explog10(double x);
-extern double expcos(double x);
-extern double exppow(double x, double y);
-extern int expsscanf(const char* str, const char* format, ...);
-extern void* expfopen(const char* path, const char* mode);
-extern int expfprintf(void* stream, const char* format, ...);
-extern int expprintf(const char* format, ...);
-extern void* expwcscpy(WCHAR* dst, const WCHAR* src);
-extern int exp_stricmp(const char*, const char*);
 
 extern void* LookupExternal(const char* library, int ordinal);
 extern void* LookupExternalByName(const char* library, const char* name);
+
+extern void* my_mreq(int size, int to_zero);
+extern int my_release(void* memory);
 
 
 #endif




More information about the MPlayer-cvslog mailing list