From 4ff79add63e569534be322dade61215335b7bfa5 Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Wed, 27 Aug 2003 02:07:02 +0000 Subject: [PATCH] Remove some unneeded __WINESRC__ tests from the headers. Miscellaneous cleanups and fixes. --- dlls/dpnhpast/main.c | 2 +- dlls/dsound/tests/propset.c | 2 +- dlls/opengl32/opengl_norm.c | 6 ++--- dlls/twain/twain.h | 2 ++ include/windef.h | 45 +++++++++++++++++------------------- include/wtypes.idl | 2 +- programs/cmdlgtst/cmdlgtst.c | 9 +++----- 7 files changed, 32 insertions(+), 36 deletions(-) diff --git a/dlls/dpnhpast/main.c b/dlls/dpnhpast/main.c index 6aa05b11853..7b03e9be900 100644 --- a/dlls/dpnhpast/main.c +++ b/dlls/dpnhpast/main.c @@ -89,7 +89,7 @@ HRESULT WINAPI DPNHPAST_DllCanUnloadNow(void) * * */ -HRESULT WINAPI DPNHPAST_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID FAR) +HRESULT WINAPI DPNHPAST_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { FIXME(":stub\n"); return E_FAIL; diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index 47fddd712a9..3bb169238f3 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -38,7 +38,7 @@ DEFINE_GUID(DSPROPSETID_I3DL2_ListenerProperties,0xDA0F0520,0x300A,0x11D3,0x8A,0 DEFINE_GUID(DSPROPSETID_I3DL2_BufferProperties,0xDA0F0521,0x300A,0x11D3,0x8A,0x2B,0x00,0x60,0x97,0x0D,0xB0,0x11); DEFINE_GUID(DSPROPSETID_ZOOMFX_BufferProperties,0xCD5368E0,0x3450,0x11D3,0x8B,0x6E,0x00,0x10,0x5A,0x9B,0x7B,0xBC); -typedef HRESULT (CALLBACK * MYPROC)(REFCLSID, REFIID, LPVOID FAR*); +typedef HRESULT (CALLBACK * MYPROC)(REFCLSID, REFIID, LPVOID *); BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data, LPVOID context) { diff --git a/dlls/opengl32/opengl_norm.c b/dlls/opengl32/opengl_norm.c index 5fbd0e5dcdd..cb1eb16801e 100644 --- a/dlls/opengl32/opengl_norm.c +++ b/dlls/opengl32/opengl_norm.c @@ -802,10 +802,10 @@ void WINAPI wine_glDepthMask( GLboolean flag ) { /*********************************************************************** * glDepthRange (OPENGL32.@) */ -void WINAPI wine_glDepthRange( GLclampd near, GLclampd far ) { - TRACE("(%f, %f)\n", near, far ); +void WINAPI wine_glDepthRange( GLclampd nearParm, GLclampd farParm ) { + TRACE("(%f, %f)\n", nearParm, farParm ); ENTER_GL(); - glDepthRange( near, far ); + glDepthRange( nearParm, farParm ); LEAVE_GL(); } diff --git a/dlls/twain/twain.h b/dlls/twain/twain.h index efb1c24bd51..ccc5e7567ca 100644 --- a/dlls/twain/twain.h +++ b/dlls/twain/twain.h @@ -54,10 +54,12 @@ #include "windef.h" +#undef FAR #define FAR #define huge #define WIN32 #define _WIN32 +#undef __declspec #define __declspec(spec) /**************************************************************************** diff --git a/include/windef.h b/include/windef.h index 4e9de1495b8..422c5d8ac17 100644 --- a/include/windef.h +++ b/include/windef.h @@ -21,10 +21,6 @@ #ifndef __WINE_WINDEF_H #define __WINE_WINDEF_H -#ifdef __WINESRC__ -# undef UNICODE -#endif /* __WINESRC__ */ - #ifndef WINVER #define WINVER 0x0500 #endif @@ -67,61 +63,63 @@ extern "C" { # endif #endif /* __stdcall */ -#ifndef __WINESRC__ +#ifdef __WINESRC__ +#define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine +#else +#define __ONLY_IN_WINELIB(x) x +#endif #ifndef pascal -#define pascal __stdcall +#define pascal __ONLY_IN_WINELIB(__stdcall) #endif #ifndef _pascal -#define _pascal __stdcall +#define _pascal __ONLY_IN_WINELIB(__stdcall) #endif #ifndef _stdcall -#define _stdcall __stdcall +#define _stdcall __ONLY_IN_WINELIB(__stdcall) #endif #ifndef _fastcall -#define _fastcall __stdcall +#define _fastcall __ONLY_IN_WINELIB(__stdcall) #endif #ifndef __fastcall -#define __fastcall __stdcall +#define __fastcall __ONLY_IN_WINELIB(__stdcall) #endif #ifndef __export -#define __export __stdcall +#define __export __ONLY_IN_WINELIB(__stdcall) #endif #ifndef cdecl -#define cdecl __cdecl +#define cdecl __ONLY_IN_WINELIB(__cdecl) #endif #ifndef _cdecl -#define _cdecl __cdecl +#define _cdecl __ONLY_IN_WINELIB(__cdecl) #endif #ifndef near -#define near +#define near __ONLY_IN_WINELIB() #endif #ifndef far -#define far +#define far __ONLY_IN_WINELIB() #endif #ifndef _near -#define _near +#define _near __ONLY_IN_WINELIB() #endif #ifndef _far -#define _far +#define _far __ONLY_IN_WINELIB() #endif #ifndef NEAR -#define NEAR +#define NEAR __ONLY_IN_WINELIB() #endif #ifndef FAR -#define FAR +#define FAR __ONLY_IN_WINELIB() #endif #ifndef _declspec -#define _declspec(x) +#define _declspec(x) __ONLY_IN_WINELIB() #endif #ifndef __declspec -#define __declspec(x) +#define __declspec(x) __ONLY_IN_WINELIB() #endif -#endif /* __WINESRC__ */ - #define CALLBACK __stdcall #define WINAPI __stdcall #define APIPRIVATE __stdcall @@ -184,7 +182,6 @@ typedef double DATE; #include "winnt.h" /* Macros to map Winelib names to the correct implementation name */ -/* depending on __WINESRC__ and UNICODE macros. */ /* Note that Winelib is purely Win32. */ #ifdef __WINESRC__ diff --git a/include/wtypes.idl b/include/wtypes.idl index 7a7facfc62c..9bf5bacaf05 100644 --- a/include/wtypes.idl +++ b/include/wtypes.idl @@ -263,7 +263,7 @@ typedef WCHAR OLECHAR; typedef [string] OLECHAR *LPOLESTR; typedef [string] const OLECHAR *LPCOLESTR; cpp_quote("#ifndef __WINESRC__") -cpp_quote("#define OLESTR(str) WINE_UNICODE_TEXT(str)") +cpp_quote("#define OLESTR(str) L##str") cpp_quote("#endif") /* from Wine's pre-WIDL wtypes.h */ diff --git a/programs/cmdlgtst/cmdlgtst.c b/programs/cmdlgtst/cmdlgtst.c index ad00750f00f..150336f6eff 100644 --- a/programs/cmdlgtst/cmdlgtst.c +++ b/programs/cmdlgtst/cmdlgtst.c @@ -56,9 +56,6 @@ struct FlagTableEntry { unsigned long ft_bit; }; -#if 0 -#define FAR -#endif #define EXPORT static char menuName[] = "CmdlgtstMenu"; @@ -288,9 +285,9 @@ void paintMainWindow(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) /* now draw a couple of lines, just for giggles. */ - MoveToEx(ps.hdc, rect.left, rect.top, (POINT FAR *) 0); + MoveToEx(ps.hdc, rect.left, rect.top, (POINT *) 0); LineTo(ps.hdc, rect.right, rect.bottom); - MoveToEx(ps.hdc, rect.left, rect.bottom, (POINT FAR *) 0); + MoveToEx(ps.hdc, rect.left, rect.bottom, (POINT *) 0); LineTo(ps.hdc, rect.right, rect.top); /* draw some text */ @@ -722,7 +719,7 @@ LRESULT CALLBACK EXPORT mainWindowDispatcher( { if(uMsg == findMessageId) { - FINDREPLACE FAR* lpfr = (FINDREPLACE FAR*) lParam; + FINDREPLACE * lpfr = (FINDREPLACE *) lParam; if(lpfr->Flags & FR_DIALOGTERM) { MessageBox(hWnd, "User closing us down.", "Down", MB_OK); findDialogBox = 0;