From 310cebde9f1355eadfd8494e52fd114366ce0e70 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sun, 6 Aug 2006 19:57:24 +0000 Subject: [PATCH] - Change DbgPrint prototype back to Alex's fix. His change was correct and my commit was wrong. - Respectively fix all occurences of DbgPrint()'s wrong prototypes throughout the tree - HACKHACK: Change KeNumberProcessors definition in "else" branch of NTDDI_VERSION #if. I'm not sure how to properly fix this and for now I marked this place. Probably NTDDI_VERSION should be set correctly in ntoskrnl and other modules which use this variable. svn path=/trunk/; revision=23506 --- reactos/boot/freeldr/freeldr/reactos/reactos.c | 2 +- reactos/dll/cpl/ncpa/ncpa.h | 2 +- reactos/dll/win32/devmgr/precomp.h | 2 +- reactos/dll/win32/mmdrv/mmdrv.h | 2 +- reactos/dll/win32/ntmarta/ntmarta.h | 2 +- reactos/dll/win32/vdmdbg/vdmdbg.h | 2 +- reactos/drivers/video/displays/vga/vgaddi.h | 2 +- reactos/include/ddk/winddk.h | 7 ++++--- reactos/include/ndk/ketypes.h | 3 ++- reactos/include/ndk/rtlfuncs.h | 4 ++-- reactos/include/psdk/winnt.h | 2 +- reactos/include/reactos/debug.h | 2 +- reactos/include/reactos/libs/pseh/framebased.h | 2 +- reactos/include/reactos/wine/debug.h | 2 +- reactos/include/reactos/wine/test.h | 2 +- reactos/lib/crt/include/internal/debug.h | 4 ++-- reactos/lib/rtl/debug.c | 4 ++-- reactos/regtests/winetests/powrprof/pwrprof.c | 2 +- 18 files changed, 25 insertions(+), 23 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index 441664f4f6d..39bd4abc350 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -870,7 +870,7 @@ LoadAndBootReactOS(PCSTR OperatingSystemName) #undef DbgPrint ULONG -DbgPrint(char *Fmt, ...) +DbgPrint(const char *Fmt, ...) { UiMessageBox(Fmt); return 0; diff --git a/reactos/dll/cpl/ncpa/ncpa.h b/reactos/dll/cpl/ncpa/ncpa.h index 4560a9a24fa..17d1d92d7ab 100644 --- a/reactos/dll/cpl/ncpa/ncpa.h +++ b/reactos/dll/cpl/ncpa/ncpa.h @@ -13,7 +13,7 @@ typedef struct extern HINSTANCE hApplet; -extern DWORD DbgPrint(PCHAR Fmt, ...); +extern DWORD DbgPrint(PCCH Fmt, ...); #endif // __NCPA_H diff --git a/reactos/dll/win32/devmgr/precomp.h b/reactos/dll/win32/devmgr/precomp.h index 25fcc29be78..42eb8404e26 100644 --- a/reactos/dll/win32/devmgr/precomp.h +++ b/reactos/dll/win32/devmgr/precomp.h @@ -10,7 +10,7 @@ extern HINSTANCE hDllInstance; -ULONG DbgPrint(PCH Format,...); +ULONG DbgPrint(PCCH Format,...); BOOL WINAPI diff --git a/reactos/dll/win32/mmdrv/mmdrv.h b/reactos/dll/win32/mmdrv/mmdrv.h index f9211d362a4..6ed823ddfc3 100644 --- a/reactos/dll/win32/mmdrv/mmdrv.h +++ b/reactos/dll/win32/mmdrv/mmdrv.h @@ -31,7 +31,7 @@ #include "mmdef.h" -ULONG DbgPrint(PCH Format, ...); +ULONG DbgPrint(PCCH Format, ...); /* #define SOUND_MAX_DEVICE_NAME 1024 // GUESSWORK diff --git a/reactos/dll/win32/ntmarta/ntmarta.h b/reactos/dll/win32/ntmarta/ntmarta.h index 87d34dc0675..45b9b53ea58 100644 --- a/reactos/dll/win32/ntmarta/ntmarta.h +++ b/reactos/dll/win32/ntmarta/ntmarta.h @@ -13,7 +13,7 @@ #define FN_PROGRESSA FN_PROGRESS #endif -ULONG DbgPrint(PCH Format,...); +ULONG DbgPrint(PCCH Format,...); extern HINSTANCE hDllInstance; diff --git a/reactos/dll/win32/vdmdbg/vdmdbg.h b/reactos/dll/win32/vdmdbg/vdmdbg.h index ed44c9f2064..6cfc2af18f1 100644 --- a/reactos/dll/win32/vdmdbg/vdmdbg.h +++ b/reactos/dll/win32/vdmdbg/vdmdbg.h @@ -3,7 +3,7 @@ #define MAX_PATH16 255 #define MAX_MODULE_NAME 9 -ULONG DbgPrint(PCH Format,...); +ULONG DbgPrint(PCCH Format,...); typedef struct _CONTEXT VDMCONTEXT; typedef VDMCONTEXT *LPVDMCONTEXT; diff --git a/reactos/drivers/video/displays/vga/vgaddi.h b/reactos/drivers/video/displays/vga/vgaddi.h index e928f7f27ac..a11555acdd8 100644 --- a/reactos/drivers/video/displays/vga/vgaddi.h +++ b/reactos/drivers/video/displays/vga/vgaddi.h @@ -15,7 +15,7 @@ #define FASTCALL __fastcall #define DDKCDECLAPI __cdecl -ULONG DbgPrint(PCH Format,...); +ULONG DbgPrint(PCCH Format,...); VOID DDKAPI DbgBreakPoint(VOID); VOID DDKAPI WRITE_PORT_UCHAR(IN PUCHAR Port, IN UCHAR Value); VOID DDKAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value); diff --git a/reactos/include/ddk/winddk.h b/reactos/include/ddk/winddk.h index f370c6c1144..f898947770c 100644 --- a/reactos/include/ddk/winddk.h +++ b/reactos/include/ddk/winddk.h @@ -402,7 +402,8 @@ extern volatile CCHAR NTSYSAPI KeNumberProcessors; #if (NTDDI_VERSION >= NTDDI_WINXP) extern CCHAR NTSYSAPI KeNumberProcessors; #else -extern PCCHAR KeNumberProcessors; +//extern PCCHAR KeNumberProcessors; +extern NTSYSAPI CCHAR KeNumberProcessors; //FIXME: Note to Alex: I won't fix this atm, since I prefer to discuss this with you first. #endif #endif @@ -10450,7 +10451,7 @@ DbgBreakPointWithStatus( ULONG __cdecl DbgPrint( - IN PCCHAR Format, + IN PCCH Format, IN ...); ULONG @@ -10458,7 +10459,7 @@ __cdecl DbgPrintEx( IN ULONG ComponentId, IN ULONG Level, - IN PCCHAR Format, + IN PCCH Format, IN ...); NTOSAPI diff --git a/reactos/include/ndk/ketypes.h b/reactos/include/ndk/ketypes.h index 9c8c69b45c1..fc488e00a48 100644 --- a/reactos/include/ndk/ketypes.h +++ b/reactos/include/ndk/ketypes.h @@ -965,7 +965,8 @@ extern volatile CCHAR NTSYSAPI KeNumberProcessors; #if (NTDDI_VERSION >= NTDDI_WINXP) extern CCHAR NTSYSAPI KeNumberProcessors; #else -extern PCCHAR KeNumberProcessors; +//extern PCCHAR KeNumberProcessors; +extern NTSYSAPI CCHAR KeNumberProcessors; //FIXME: Note to Alex: I won't fix this atm, since I prefer to discuss this with you first. #endif #endif extern ULONG NTSYSAPI KiDmaIoCoherency; diff --git a/reactos/include/ndk/rtlfuncs.h b/reactos/include/ndk/rtlfuncs.h index 7fd28cbfd3f..ec76c604720 100644 --- a/reactos/include/ndk/rtlfuncs.h +++ b/reactos/include/ndk/rtlfuncs.h @@ -2454,7 +2454,7 @@ RtlFreeRangeList(IN PRTL_RANGE_LIST RangeList); ULONG __cdecl DbgPrint( - IN PCCHAR Format, + IN PCCH Format, IN ... ); @@ -2464,7 +2464,7 @@ __cdecl DbgPrintEx( IN ULONG ComponentId, IN ULONG Level, - IN PCCHAR Format, + IN PCCH Format, IN ... ); diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index c63d4c2c5fa..9123f76dc4c 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -116,7 +116,7 @@ typedef wchar_t WCHAR; typedef WCHAR *PWCHAR,*LPWCH,*PWCH,*NWPSTR,*LPWSTR,*PWSTR; typedef CONST WCHAR *LPCWCH,*PCWCH,*LPCWSTR,*PCWSTR; typedef CHAR *PCHAR,*LPCH,*PCH,*NPSTR,*LPSTR,*PSTR; -typedef CONST CHAR *LPCCH,*PCSTR,*LPCSTR; +typedef CONST CHAR *LPCCH,*PCCH,*PCSTR,*LPCSTR; #ifndef _TCHAR_DEFINED #define _TCHAR_DEFINED #ifdef UNICODE diff --git a/reactos/include/reactos/debug.h b/reactos/include/reactos/debug.h index 13beaef0c6b..297edefe851 100644 --- a/reactos/include/reactos/debug.h +++ b/reactos/include/reactos/debug.h @@ -29,7 +29,7 @@ ULONG __cdecl DbgPrint( - IN PCCHAR Format, + IN PCCH Format, IN ... ); diff --git a/reactos/include/reactos/libs/pseh/framebased.h b/reactos/include/reactos/libs/pseh/framebased.h index b190daf6635..a68469b400f 100644 --- a/reactos/include/reactos/libs/pseh/framebased.h +++ b/reactos/include/reactos/libs/pseh/framebased.h @@ -45,7 +45,7 @@ # define _SEHSetJmp setjmp # define _SEHJmpBuf_t jmp_buf #endif -unsigned long DbgPrint(PCCHAR Format,...); +unsigned long DbgPrint(const char * Format,...); typedef struct __SEHFrame { _SEHPortableFrame_t SEH_Header; diff --git a/reactos/include/reactos/wine/debug.h b/reactos/include/reactos/wine/debug.h index 2433ead0af8..e1e6bea386c 100644 --- a/reactos/include/reactos/wine/debug.h +++ b/reactos/include/reactos/wine/debug.h @@ -23,7 +23,7 @@ #define inline __inline #endif -unsigned long DbgPrint(char *Format,...); +unsigned long DbgPrint(const char *Format,...); struct _GUID; diff --git a/reactos/include/reactos/wine/test.h b/reactos/include/reactos/wine/test.h index 92f92ec4dc0..05c52f8be0f 100644 --- a/reactos/include/reactos/wine/test.h +++ b/reactos/include/reactos/wine/test.h @@ -26,7 +26,7 @@ #include /* prototype for dbgprint */ -ULONG CDECL DbgPrint(IN PCH Format,IN ...); +ULONG CDECL DbgPrint(IN PCCH Format,IN ...); /* debug level */ extern int winetest_debug; diff --git a/reactos/lib/crt/include/internal/debug.h b/reactos/lib/crt/include/internal/debug.h index 01f8b334e5c..de9b59bd5dc 100644 --- a/reactos/lib/crt/include/internal/debug.h +++ b/reactos/lib/crt/include/internal/debug.h @@ -28,7 +28,7 @@ #define sT "s" #endif -unsigned long DbgPrint(char *Format,...); +unsigned long DbgPrint(const char *Format,...); #ifdef __GNUC__ #define TRACE(...) @@ -83,7 +83,7 @@ unsigned long DbgPrint(char *Format,...); /* ULONG CDECL DbgPrint(PCH Format, ...); */ -ULONG DbgPrint(PCH Format,...); +ULONG DbgPrint(PCCH Format,...); /* unsigned long DbgPrint(const char* Format, ...); */ diff --git a/reactos/lib/rtl/debug.c b/reactos/lib/rtl/debug.c index 035be1362b2..ad89e3a1305 100644 --- a/reactos/lib/rtl/debug.c +++ b/reactos/lib/rtl/debug.c @@ -206,7 +206,7 @@ vDbgPrintEx(IN ULONG ComponentId, */ ULONG __cdecl -DbgPrint(PCH Format, +DbgPrint(PCCH Format, ...) { va_list ap; @@ -229,7 +229,7 @@ ULONG __cdecl DbgPrintEx(IN ULONG ComponentId, IN ULONG Level, - IN PCH Format, + IN PCCH Format, ...) { va_list ap; diff --git a/reactos/regtests/winetests/powrprof/pwrprof.c b/reactos/regtests/winetests/powrprof/pwrprof.c index 34ac263a3c8..e957ffbea74 100644 --- a/reactos/regtests/winetests/powrprof/pwrprof.c +++ b/reactos/regtests/winetests/powrprof/pwrprof.c @@ -43,7 +43,7 @@ static const WCHAR szMachPowerPoliciesSubKey[] = { 'S', 'O', 'F', 'T', 'W', 'A', static const WCHAR szTempPwrScheme[] = { '9', '9', 0 }; -ULONG DbgPrint(PCH X,...) +ULONG DbgPrint(PCCH X,...) { return (ULONG)NULL; }