diff --git a/dlls/lzexpand/lzexpand_main.c b/dlls/lzexpand/lzexpand_main.c index 3f15b6bca0a..6e9559cbb0d 100644 --- a/dlls/lzexpand/lzexpand_main.c +++ b/dlls/lzexpand/lzexpand_main.c @@ -7,29 +7,23 @@ * FIXME: return values might be wrong */ +#include "config.h" + #include #include #include #include -#include "windef.h" + #include "winbase.h" -#include "wine/winbase16.h" -#include "wine/unicode.h" #include "lzexpand.h" + +#include "wine/unicode.h" +#include "wine/winbase16.h" + #include "debugtools.h" DEFAULT_DEBUG_CHANNEL(file); -LONG WINAPI CopyLZFile16(HFILE16,HFILE16); -INT16 WINAPI GetExpandedName16(LPCSTR,LPSTR); -void WINAPI LZClose16(HFILE16); -LONG WINAPI LZCopy16(HFILE16,HFILE16); -HFILE16 WINAPI LZInit16(HFILE16); -HFILE16 WINAPI LZOpenFile16(LPCSTR,LPOFSTRUCT,UINT16); -INT16 WINAPI LZRead16(HFILE16,LPVOID,UINT16); -LONG WINAPI LZSeek16(HFILE16,LONG,INT16); -INT16 WINAPI LZStart16(void); - /* The readahead length of the decompressor. Reading single bytes * using _lread() would be SLOW. */ diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index fd79b3c821c..94e225affeb 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -8,12 +8,9 @@ #include "msvcrt/eh.h" #include "msvcrt/malloc.h" - DEFAULT_DEBUG_CHANNEL(msvcrt); -void _purecall(void); - typedef void (*v_table_ptr)(); static v_table_ptr exception_vtable[2]; diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 569fb395f20..88eae11364e 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -21,7 +21,6 @@ static int MSVCRT_atexit_table_size = 0; static int MSVCRT_atexit_registered = 0; /* Points to free slot */ extern int MSVCRT_app_type; -void *MSVCRT_realloc(void *ptr, unsigned int size); /* INTERNAL: call atexit functions */ void __MSVCRT__call_atexit(void) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 7b930422e76..024b701422c 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -13,6 +13,7 @@ #include "msvcrt/stdlib.h" #include "msvcrt/string.h" +#include "msvcrt/wctype.h" DEFAULT_DEBUG_CHANNEL(msvcrt); @@ -20,12 +21,6 @@ DEFAULT_DEBUG_CHANNEL(msvcrt); unsigned char MSVCRT_mbctype[257]; int MSVCRT___mb_cur_max = 1; -int MSVCRT_isleadbyte(int); -char *_strset(char *, int); -char *_strnset(char *, int, unsigned int); -extern unsigned int MSVCRT_current_lc_all_cp; - - /********************************************************************* * __p__mbctype (MSVCRT.@) */ diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index a079ac2496e..70ff5f5ba7b 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -29,6 +29,9 @@ typedef struct __MSVCRT_thread_data #define SET_THREAD_VAR(x,y) \ ((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y +extern int MSVCRT_current_lc_all_cp; + +void _purecall(void); void MSVCRT__set_errno(int); char* msvcrt_strndup(const char*,unsigned int); LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int); diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 0c7c4ebe571..29234cff58f 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -33,7 +33,9 @@ # include #endif +#include "ntddk.h" #include "winnt.h" + #include "selectors.h" /*********************************************************************** @@ -1118,13 +1120,11 @@ void __wine_enter_vm86( CONTEXT *context ) /********************************************************************** * DbgBreakPoint (NTDLL.@) */ -void WINAPI DbgBreakPoint(void); __ASM_GLOBAL_FUNC( DbgBreakPoint, "int $3; ret"); /********************************************************************** * DbgUserBreakPoint (NTDLL.@) */ -void WINAPI DbgUserBreakPoint(void); __ASM_GLOBAL_FUNC( DbgUserBreakPoint, "int $3; ret"); #endif /* __i386__ */ diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 721947262b1..8918f2f6cb5 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -13,26 +13,29 @@ #include #include #include + #include "windef.h" -#include "wtypes.h" -#include "wingdi.h" -#include "wine/winbase16.h" -#include "winerror.h" -#include "wownt32.h" +#include "objbase.h" +#include "ole2.h" #include "ole2ver.h" -#include "debugtools.h" -#include "heap.h" -#include "winreg.h" #include "rpc.h" +#include "wingdi.h" +#include "winerror.h" +#include "winreg.h" +#include "wownt32.h" +#include "wtypes.h" #include "wine/obj_base.h" -#include "wine/obj_misc.h" -#include "wine/obj_storage.h" #include "wine/obj_clientserver.h" - -#include "ole.h" -#include "ifs.h" +#include "wine/obj_misc.h" +#include "wine/obj_marshal.h" +#include "wine/obj_storage.h" +#include "wine/winbase16.h" #include "compobj_private.h" +#include "ifs.h" +#include "heap.h" + +#include "debugtools.h" DEFAULT_DEBUG_CHANNEL(ole); @@ -851,17 +854,17 @@ HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid) * * This function read a CLSID from a stream */ -HRESULT WINAPI ReadClassStm(IStream *pStm,REFCLSID rclsid) +HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid) { ULONG nbByte; HRESULT res; - TRACE("(%p,%p)\n",pStm,rclsid); + TRACE("(%p,%p)\n",pStm,pclsid); - if (rclsid==NULL) + if (pclsid==NULL) return E_INVALIDARG; - res = IStream_Read(pStm,(void*)rclsid,sizeof(CLSID),&nbByte); + res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte); if (FAILED(res)) return res; @@ -1285,7 +1288,7 @@ HRESULT WINAPI CoResumeClassObjects(void) * * This function supplies the CLSID associated with the given filename. */ -HRESULT WINAPI GetClassFile(LPOLESTR filePathName,CLSID *pclsid) +HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid) { IStorage *pstg=0; HRESULT res; diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index c915f7b814a..6d8c042bc57 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -4,19 +4,24 @@ * Copyright 1997 Marcus Meissner */ +#include "config.h" + #include #include #include #include -#include "winerror.h" -#include "heap.h" -#include "wine/winbase16.h" -#include "wine/obj_base.h" -#include "debugtools.h" -#include "ole.h" +#include "ole2.h" +#include "windef.h" +#include "winerror.h" + +#include "wine/obj_base.h" +#include "wine/winbase16.h" +#include "heap.h" #include "ifs.h" +#include "debugtools.h" + DEFAULT_DEBUG_CHANNEL(relay); /* --- IUnknown implementation */ diff --git a/dlls/ole32/ifs.h b/dlls/ole32/ifs.h index ea56cc6ebb1..9ba9ab0fe3d 100644 --- a/dlls/ole32/ifs.h +++ b/dlls/ole32/ifs.h @@ -1,6 +1,42 @@ #ifndef __WINE_OLE_IFS_H #define __WINE_OLE_IFS_H +#include "wine/obj_base.h" + +/*********************************************************************** + * IMalloc16 interface + */ + +typedef struct IMalloc16 IMalloc16, *LPMALLOC16; + +#define ICOM_INTERFACE IMalloc16 +#define IMalloc16_METHODS \ + ICOM_METHOD1 (LPVOID, Alloc, DWORD, cb) \ + ICOM_METHOD2 (LPVOID, Realloc, LPVOID, pv, DWORD, cb) \ + ICOM_VMETHOD1( Free, LPVOID, pv) \ + ICOM_METHOD1 (DWORD, GetSize, LPVOID, pv) \ + ICOM_METHOD1 (INT16, DidAlloc, LPVOID, pv) \ + ICOM_METHOD (LPVOID, HeapMinimize) +#define IMalloc16_IMETHODS \ + IUnknown_IMETHODS \ + IMalloc16_METHODS +ICOM_DEFINE(IMalloc16,IUnknown) +#undef ICOM_INTERFACE + +/*** IUnknown methods ***/ +#define IMalloc16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) +#define IMalloc16_AddRef(p) ICOM_CALL (AddRef,p) +#define IMalloc16_Release(p) ICOM_CALL (Release,p) +/*** IMalloc16 methods ***/ +#define IMalloc16_Alloc(p,a) ICOM_CALL1(Alloc,p,a) +#define IMalloc16_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b) +#define IMalloc16_Free(p,a) ICOM_CALL1(Free,p,a) +#define IMalloc16_GetSize(p,a) ICOM_CALL1(GetSize,p,a) +#define IMalloc16_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a) +#define IMalloc16_HeapMinimize(p) ICOM_CALL (HeapMinimize,p) + +/**********************************************************************/ + extern LPMALLOC16 IMalloc16_Constructor(); extern LPMALLOC IMalloc_Constructor(); diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 19b44525c21..f6cc9676c78 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -1,3 +1,4 @@ + /* * OLE2 library * @@ -6,27 +7,31 @@ * Copyright 1999 Noel Borthwick */ +#include "config.h" + #include #include #include #include +#include "commctrl.h" +#include "ole2.h" +#include "ole2ver.h" #include "windef.h" #include "winbase.h" +#include "winerror.h" #include "wingdi.h" #include "winuser.h" -#include "winerror.h" -#include "ole2.h" -#include "commctrl.h" +#include "winreg.h" + #include "wine/obj_clientserver.h" #include "wine/winbase16.h" #include "wine/wingdi16.h" #include "wine/winuser16.h" -#include "debugtools.h" -#include "ole2ver.h" -#include "winreg.h" #include "ole32_main.h" +#include "debugtools.h" + DEFAULT_DEBUG_CHANNEL(ole); DECLARE_DEBUG_CHANNEL(accel); diff --git a/dlls/oleaut32/ole2disp.c b/dlls/oleaut32/ole2disp.c index a90ea57be1a..217c21fb781 100644 --- a/dlls/oleaut32/ole2disp.c +++ b/dlls/oleaut32/ole2disp.c @@ -3,18 +3,23 @@ * * Copyright 1995 Martin von Loewis */ + +#include "config.h" + #include +#include "ole2.h" +#include "oleauto.h" #include "windef.h" #include "winbase.h" +#include "winerror.h" #include "wingdi.h" #include "winuser.h" -#include "winerror.h" -#include "wine/windef16.h" -#include "ole2.h" -#include "olectl.h" -#include "oleauto.h" + #include "heap.h" +#include "ole2disp.h" +#include "olectl.h" + #include "debugtools.h" DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/oleaut32/ole2disp.h b/dlls/oleaut32/ole2disp.h new file mode 100644 index 00000000000..97f683f7363 --- /dev/null +++ b/dlls/oleaut32/ole2disp.h @@ -0,0 +1,13 @@ +#ifndef __WINE_OLEAUT32_OLE2DISP_H +#define __WINE_OLEAUT32_OLE2DISP_H + +#include "wtypes.h" + +BSTR16 WINAPI SysAllocString16(LPCOLESTR16); +BSTR16 WINAPI SysAllocStringLen16(const char*, int); +VOID WINAPI SysFreeString16(BSTR16); +INT16 WINAPI SysReAllocString16(LPBSTR16,LPCOLESTR16); +int WINAPI SysReAllocStringLen16(BSTR16*, const char*, int); +int WINAPI SysStringLen16(BSTR16); + +#endif /* !defined(__WINE_OLEAUT32_OLE2DISP_H) */ diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index d995e036d9c..2faba5e4c83 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -41,19 +41,24 @@ * */ +#include "config.h" + #include #include #include #include + #include "winerror.h" -#include "winreg.h" /* for HKEY_LOCAL_MACHINE */ #include "winnls.h" /* for PRIMARYLANGID */ -#include "ole.h" -#include "heap.h" +#include "winreg.h" /* for HKEY_LOCAL_MACHINE */ + #include "wine/obj_base.h" -#include "debugtools.h" +#include "heap.h" +#include "ole2disp.h" #include "typelib.h" +#include "debugtools.h" + DEFAULT_DEBUG_CHANNEL(ole); DECLARE_DEBUG_CHANNEL(typelib); diff --git a/dlls/olecli/olecli_main.c b/dlls/olecli/olecli_main.c index 40380f039e1..575edb5c00f 100644 --- a/dlls/olecli/olecli_main.c +++ b/dlls/olecli/olecli_main.c @@ -6,10 +6,13 @@ /* At the moment, these are only empty stubs. */ + +#include "config.h" + +#include "ole.h" #include "winbase.h" #include "wingdi.h" -#include "wtypes.h" -#include "ole.h" + #include "debugtools.h" DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/olesvr/olesvr_main.c b/dlls/olesvr/olesvr_main.c index 55b2d7126da..db1ef43ac8c 100644 --- a/dlls/olesvr/olesvr_main.c +++ b/dlls/olesvr/olesvr_main.c @@ -7,10 +7,10 @@ /* At the moment, these are only empty stubs. */ -#include "winbase.h" -#include "wingdi.h" -#include "wtypes.h" +#include "config.h" + #include "ole.h" + #include "debugtools.h" DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index ea1d37e41c2..6c229d5a8e3 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -16,8 +16,8 @@ #include "pidl.h" -BOOL WINAPI FileMenu_DeleteAllItems (HMENU hMenu); -BOOL WINAPI FileMenu_AppendItemA(HMENU hMenu, LPCSTR lpText, UINT uID, int icon, HMENU hMenuPopup, int nItemHeight); +static BOOL FileMenu_AppendItemA(HMENU hMenu, LPCSTR lpText, UINT uID, int icon, + HMENU hMenuPopup, int nItemHeight); typedef struct { @@ -280,7 +280,7 @@ void WINAPI FileMenu_Destroy (HMENU hmenu) * FileMenu_AppendItem [SHELL32.115] * */ -BOOL WINAPI FileMenu_AppendItemA( +static BOOL FileMenu_AppendItemA( HMENU hMenu, LPCSTR lpText, UINT uID, diff --git a/include/ole.h b/include/ole.h index 11ff4c79e4a..451c3f5f4b7 100644 --- a/include/ole.h +++ b/include/ole.h @@ -257,68 +257,6 @@ typedef struct _OLEOBJECT { LPOLEOBJECTVTBL lpvtbl; } OLEOBJECT; - -typedef struct IMalloc16 IMalloc16,*LPMALLOC16; - -#define ICOM_INTERFACE IMalloc16 -#define IMalloc16_METHODS \ - ICOM_METHOD1 (LPVOID,Alloc, DWORD,cb) \ - ICOM_METHOD2 (LPVOID,Realloc, LPVOID,pv, DWORD,cb) \ - ICOM_VMETHOD1( Free, LPVOID,pv) \ - ICOM_METHOD1(DWORD, GetSize, LPVOID,pv) \ - ICOM_METHOD1(INT16, DidAlloc, LPVOID,pv) \ - ICOM_METHOD (LPVOID,HeapMinimize) -#define IMalloc16_IMETHODS \ - IUnknown_IMETHODS \ - IMalloc16_METHODS -ICOM_DEFINE(IMalloc16,IUnknown) -#undef ICOM_INTERFACE - -/*** IUnknown methods ***/ -#define IMalloc16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) -#define IMalloc16_AddRef(p) ICOM_CALL (AddRef,p) -#define IMalloc16_Release(p) ICOM_CALL (Release,p) -/*** IMalloc16 methods ***/ -#define IMalloc16_Alloc(p,a) ICOM_CALL1(Alloc,p,a) -#define IMalloc16_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b) -#define IMalloc16_Free(p,a) ICOM_CALL1(Free,p,a) -#define IMalloc16_GetSize(p,a) ICOM_CALL1(GetSize,p,a) -#define IMalloc16_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a) -#define IMalloc16_HeapMinimize(p) ICOM_CALL (HeapMinimize,p) - - -HRESULT WINAPI CoCreateStandardMalloc16(DWORD dwMemContext, LPMALLOC16* lpMalloc); -HRESULT WINAPI CoGetMalloc16(DWORD dwMemContext,LPMALLOC16* lpMalloc); -HRESULT WINAPI CoInitialize16(LPVOID lpReserved); -HRESULT WINAPI CoLockObjectExternal16(LPUNKNOWN,BOOL16,BOOL16); -HRESULT WINAPI CoRegisterClassObject16(REFCLSID,LPUNKNOWN,DWORD,DWORD,LPDWORD); -void WINAPI CoUninitialize16(void); -HRESULT WINAPI DoDragDrop16(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*); -OLESTATUS WINAPI OleRegisterServer16(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE16,OLE_SERVER_USE); -OLESTATUS WINAPI OleUnblockServer16(LHSERVER,BOOL16 *); -OLESTATUS WINAPI OleRegisterServerDoc16(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC *); -OLESTATUS WINAPI OleRegisterClientDoc16(LPCSTR,LPCSTR,LONG,LHCLIENTDOC *); -OLESTATUS WINAPI OleRenameClientDoc16(LHCLIENTDOC,LPCSTR); -OLESTATUS WINAPI OleRevokeServerDoc16(LHSERVERDOC); -OLESTATUS WINAPI OleRevokeClientDoc16(LHCLIENTDOC); -OLESTATUS WINAPI OleRevokeServer16(LHSERVER); -OLESTATUS WINAPI OleRevertClientDoc16(LHCLIENTDOC hServerDoc); -OLESTATUS WINAPI OleEnumObjects16(LHCLIENTDOC hServerDoc, SEGPTR data); -OLESTATUS WINAPI OleCreateLinkFromClip16(LPCSTR,SEGPTR,LHCLIENTDOC,LPCSTR,SEGPTR,UINT16,UINT16); -OLESTATUS WINAPI OleQueryLinkFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat); -OLESTATUS WINAPI OleQueryCreateFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat); -OLESTATUS WINAPI OleQueryType16(LPOLEOBJECT oleob, SEGPTR xlong); -OLESTATUS WINAPI OleCreateFromClip16(LPCSTR,SEGPTR,LHCLIENTDOC,LPCSTR,SEGPTR,UINT16,UINT16); -HRESULT WINAPI RegisterDragDrop16(HWND16,LPDROPTARGET); -HRESULT WINAPI RevokeDragDrop16(HWND16); - -BSTR16 WINAPI SysAllocString16(LPCOLESTR16); -INT16 WINAPI SysReAllocString16(LPBSTR16,LPCOLESTR16); -VOID WINAPI SysFreeString16(BSTR16); -BSTR16 WINAPI SysAllocStringLen16(const char*, int); -int WINAPI SysReAllocStringLen16(BSTR16*, const char*, int); -int WINAPI SysStringLen16(BSTR16); - #ifdef __cplusplus } /*extern*/ #endif