mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Replaced calls to aprintf() or dprintf() by DPRINT()
Removed old debugging code svn path=/trunk/; revision=948
This commit is contained in:
parent
b6c944afcc
commit
2a24d175bf
11 changed files with 46 additions and 54 deletions
|
@ -1,19 +1,16 @@
|
|||
#include <windows.h>
|
||||
|
||||
#define UNIMPLEMENTED dprintf("%s at %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
|
||||
#define UNIMPLEMENTED DbgPrint("%s at %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DPRINT(args...)
|
||||
#define CHECKPOINT
|
||||
#else
|
||||
#define DPRINT(args...) do { dprintf("(KERNEL32:%s:%d) ",__FILE__,__LINE__); dprintf(args); } while(0);
|
||||
#define CHECKPOINT do { dprintf("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
|
||||
#define DPRINT(args...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||
#define CHECKPOINT do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
|
||||
#endif
|
||||
|
||||
#define DPRINT1(args...) do { dprintf("(KERNEL32:%s:%d) ",__FILE__,__LINE__); dprintf(args); } while(0);
|
||||
|
||||
void dprintf(char* fmt, ...);
|
||||
void aprintf(char* fmt, ...);
|
||||
#define DPRINT1(args...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||
|
||||
#define MAGIC(c1,c2,c3,c4) ((c1) + ((c2)<<8) + ((c3)<<16) + ((c4)<<24))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dir.c,v 1.22 2000/01/11 17:30:16 ekohl Exp $
|
||||
/* $Id: dir.c,v 1.23 2000/01/20 22:55:37 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -732,7 +732,7 @@ DWORD STDCALL SearchPathW(LPCWSTR lpPath,
|
|||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
IO_STATUS_BLOCK IoStatusBlock;
|
||||
|
||||
dprintf("SearchPath\n");
|
||||
DPRINT("SearchPath\n");
|
||||
|
||||
if ( lpPath == NULL ) {
|
||||
// check the directory from which the application loaded
|
||||
|
|
|
@ -34,25 +34,3 @@ VOID STDCALL OutputDebugStringW(LPCWSTR lpOutputString)
|
|||
|
||||
NtDisplayString(&UnicodeOutput);
|
||||
}
|
||||
|
||||
void dprintf(char* fmt, ...)
|
||||
{
|
||||
va_list va_args;
|
||||
char buffer[255];
|
||||
|
||||
va_start(va_args,fmt);
|
||||
vsprintf(buffer,fmt,va_args);
|
||||
OutputDebugStringA(buffer);
|
||||
va_end(fmt);
|
||||
}
|
||||
|
||||
void aprintf(char* fmt, ...)
|
||||
{
|
||||
va_list va_args;
|
||||
char buffer[255];
|
||||
|
||||
va_start(va_args,fmt);
|
||||
vsprintf(buffer,fmt,va_args);
|
||||
OutputDebugStringA(buffer);
|
||||
va_end(fmt);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <kernel32/kernel32.h>
|
||||
|
||||
#define MAGIC_GLOBAL_USED 0x5342BEEF
|
||||
#define GLOBAL_LOCK_MAX 0xFF
|
||||
|
||||
|
@ -27,7 +30,7 @@ HGLOBAL WINAPI GlobalAlloc(UINT flags, DWORD size)
|
|||
PGLOBAL_HANDLE phandle;
|
||||
LPVOID palloc;
|
||||
|
||||
aprintf("GlobalAlloc( 0x%X, 0x%lX )\n", flags, size );
|
||||
DPRINT("GlobalAlloc( 0x%X, 0x%lX )\n", flags, size );
|
||||
|
||||
if((flags & GMEM_MOVEABLE)==0) /* POINTER */
|
||||
{
|
||||
|
@ -65,7 +68,7 @@ LPVOID WINAPI GlobalLock(HGLOBAL hmem)
|
|||
PGLOBAL_HANDLE phandle;
|
||||
LPVOID palloc;
|
||||
|
||||
aprintf("GlobalLock( 0x%lX )\n", (ULONG) hmem );
|
||||
DPRINT("GlobalLock( 0x%lX )\n", (ULONG) hmem );
|
||||
|
||||
if(((ULONG)hmem%8)==0)
|
||||
return (LPVOID) hmem;
|
||||
|
@ -80,7 +83,7 @@ LPVOID WINAPI GlobalLock(HGLOBAL hmem)
|
|||
}
|
||||
else
|
||||
{
|
||||
dprintf("GlobalLock: invalid handle\n");
|
||||
DPRINT("GlobalLock: invalid handle\n");
|
||||
palloc=(LPVOID) hmem;
|
||||
}
|
||||
HeapUnlock(__ProcessHeap);
|
||||
|
@ -95,7 +98,7 @@ BOOL WINAPI GlobalUnlock(HGLOBAL hmem)
|
|||
PGLOBAL_HANDLE phandle;
|
||||
BOOL locked;
|
||||
|
||||
aprintf("GlobalUnlock( 0x%lX )\n", (ULONG) hmem );
|
||||
DPRINT("GlobalUnlock( 0x%lX )\n", (ULONG) hmem );
|
||||
|
||||
if(((ULONG)hmem%8)==0)
|
||||
return FALSE;
|
||||
|
@ -111,7 +114,7 @@ BOOL WINAPI GlobalUnlock(HGLOBAL hmem)
|
|||
}
|
||||
else
|
||||
{
|
||||
dprintf("GlobalUnlock: invalid handle\n");
|
||||
DPRINT("GlobalUnlock: invalid handle\n");
|
||||
locked=FALSE;
|
||||
}
|
||||
HeapUnlock(__ProcessHeap);
|
||||
|
@ -123,7 +126,7 @@ BOOL WINAPI GlobalUnlock(HGLOBAL hmem)
|
|||
*********************************************************************/
|
||||
HGLOBAL WINAPI GlobalHandle(LPCVOID pmem)
|
||||
{
|
||||
aprintf("GlobalHandle( 0x%lX )\n", (ULONG) pmem );
|
||||
DPRINT("GlobalHandle( 0x%lX )\n", (ULONG) pmem );
|
||||
|
||||
if(((ULONG)pmem%8)==0) /* FIXED */
|
||||
return (HGLOBAL) pmem;
|
||||
|
@ -140,7 +143,7 @@ HGLOBAL WINAPI GlobalReAlloc(HGLOBAL hmem, DWORD size, UINT flags)
|
|||
HGLOBAL hnew;
|
||||
PGLOBAL_HANDLE phandle;
|
||||
|
||||
aprintf("GlobalReAlloc( 0x%lX, 0x%lX, 0x%X )\n", (ULONG) hmem, size, flags );
|
||||
DPRINT("GlobalReAlloc( 0x%lX, 0x%lX, 0x%X )\n", (ULONG) hmem, size, flags );
|
||||
|
||||
hnew=NULL;
|
||||
HeapLock(__ProcessHeap);
|
||||
|
@ -222,7 +225,7 @@ HGLOBAL WINAPI GlobalHeapFree(GetProcessHeap(),0,HGLOBAL hmem)
|
|||
{
|
||||
PGLOBAL_HANDLE phandle;
|
||||
|
||||
aprintf("GlobalHeapFree(GetProcessHeap(),0, 0x%lX )\n", (ULONG) hmem );
|
||||
DPRINT("GlobalHeapFree(GetProcessHeap(),0, 0x%lX )\n", (ULONG) hmem );
|
||||
|
||||
if(((ULONG)hmem%4)==0) /* POINTER */
|
||||
{
|
||||
|
@ -254,7 +257,7 @@ DWORD WINAPI GlobalSize(HGLOBAL hmem)
|
|||
DWORD retval;
|
||||
PGLOBAL_HANDLE phandle;
|
||||
|
||||
aprintf("GlobalSize( 0x%lX )\n", (ULONG) hmem );
|
||||
DPRINT("GlobalSize( 0x%lX )\n", (ULONG) hmem );
|
||||
|
||||
if(((ULONG)hmem%8)==0)
|
||||
{
|
||||
|
@ -270,7 +273,7 @@ DWORD WINAPI GlobalSize(HGLOBAL hmem)
|
|||
}
|
||||
else
|
||||
{
|
||||
dprintf("GlobalSize: invalid handle\n");
|
||||
DPRINT("GlobalSize: invalid handle\n");
|
||||
retval=0;
|
||||
}
|
||||
HeapUnlock(__ProcessHeap);
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#include <windows.h>
|
||||
#include <kernel32/heap.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <kernel32/kernel32>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
|
@ -49,7 +52,7 @@ UINT WINAPI LocalFlags(HLOCAL hmem)
|
|||
}
|
||||
else
|
||||
{
|
||||
dprintf("GlobalSize: invalid handle\n");
|
||||
DPRINT("GlobalSize: invalid handle\n");
|
||||
retval=0;
|
||||
}
|
||||
HeapUnlock(__ProcessHeap);
|
||||
|
|
|
@ -432,7 +432,7 @@ GetTimeZoneInformation(
|
|||
LPTIME_ZONE_INFORMATION lpTimeZoneInformation
|
||||
)
|
||||
{
|
||||
// aprintf("GetTimeZoneInformation()\n");
|
||||
// DPRINT("GetTimeZoneInformation()\n");
|
||||
|
||||
// memset(lpTimeZoneInformation, 0, sizeof(TIME_ZONE_INFORMATION));
|
||||
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#include <kernel32/thread.h>
|
||||
#include <string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <kernel32/kernel32.h>
|
||||
|
||||
|
||||
extern PLOCALE __TebLocale;
|
||||
|
||||
|
@ -34,7 +37,7 @@ extern PLOCALE __TebLocale;
|
|||
|
||||
UINT STDCALL GetACP(void)
|
||||
{
|
||||
//aprintf("GetACP()\n");
|
||||
DPRINT("GetACP()\n");
|
||||
|
||||
/* XXX: read from registry, take this as default */
|
||||
return GetTebLocale()->AnsiCodePage->Id;
|
||||
|
@ -42,7 +45,7 @@ UINT STDCALL GetACP(void)
|
|||
|
||||
UINT STDCALL GetOEMCP(void)
|
||||
{
|
||||
//aprintf("GetOEMCP()\n");
|
||||
DPRINT("GetOEMCP()\n");
|
||||
/* XXX: read from registry, take this as default */
|
||||
return GetTebLocale()->OemCodePage->Id;
|
||||
}
|
||||
|
@ -51,7 +54,7 @@ WINBOOL STDCALL IsValidCodePage(UINT codepage)
|
|||
{
|
||||
PCODEPAGE pcp;
|
||||
|
||||
//aprintf("IsValidCodePage( %u )\n", codepage);
|
||||
DPRINT("IsValidCodePage( %u )\n", codepage);
|
||||
|
||||
switch(codepage)
|
||||
{
|
||||
|
@ -70,7 +73,7 @@ WINBOOL GetCPInfo(UINT codepage, LPCPINFO pcpinfo)
|
|||
{
|
||||
PCODEPAGE pcp;
|
||||
|
||||
// aprintf("GetCPInfo( %u, 0x%lX )\n", codepage, (ULONG) pcpinfo);
|
||||
DPRINT("GetCPInfo( %u, 0x%lX )\n", codepage, (ULONG) pcpinfo);
|
||||
|
||||
pcp=__CPFirst;
|
||||
while((pcp)&&(pcp->Id!=codepage))
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <kernel32/kernel32.h>
|
||||
|
||||
extern PLOCALE __TebLocale;
|
||||
|
||||
#define GetTebLocale() __TebLocale
|
||||
|
@ -32,8 +35,8 @@ INT MultiByteToWideChar(UINT cpid, DWORD flags, LPCSTR src, int srclen,
|
|||
WCHAR **atou;
|
||||
CHAR c;
|
||||
|
||||
//aprintf("MultiByteToWideChar( %u, 0x%lX, %s, %d, 0x%lX, %d )\n",
|
||||
// cpid, flags, src, srclen, (ULONG) dest, destlen);
|
||||
DPRINT("MultiByteToWideChar( %u, 0x%lX, %s, %d, 0x%lX, %d )\n",
|
||||
cpid, flags, src, srclen, (ULONG) dest, destlen);
|
||||
|
||||
/* get codepage */
|
||||
switch(cpid)
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#include <kernel32/thread.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <kernel32/kernel32.h>
|
||||
|
||||
extern PLOCALE __TebLocale;
|
||||
|
||||
#define GetTebLocale() __TebLocale
|
||||
|
@ -37,7 +40,7 @@ INT WideCharToMultiByte(UINT cpid, DWORD flags, LPCWSTR src, int srclen,
|
|||
CHAR d;
|
||||
WCHAR c;
|
||||
|
||||
// aprintf("WideCharToMultiByte()\n");
|
||||
DPRINT("WideCharToMultiByte()\n");
|
||||
|
||||
/* get codepage */
|
||||
switch(cpid)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: proc.c,v 1.26 2000/01/11 17:30:46 ekohl Exp $
|
||||
/* $Id: proc.c,v 1.27 2000/01/20 22:56:49 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -56,7 +56,7 @@ GetProcessTimes (
|
|||
LPFILETIME lpUserTime
|
||||
)
|
||||
{
|
||||
dprintf("GetProcessTimes is unimplemented\n");
|
||||
DPRINT("GetProcessTimes is unimplemented\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <kernel32/kernel32.h>
|
||||
|
||||
WINBOOL STDCALL SetEvent(HANDLE hEvent)
|
||||
{
|
||||
|
@ -76,13 +78,13 @@ HANDLE STDCALL CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,
|
|||
PtrObjectAttributes = NULL;
|
||||
}
|
||||
|
||||
dprintf( "Calling NtCreateEvent\n" );
|
||||
DPRINT( "Calling NtCreateEvent\n" );
|
||||
errCode = NtCreateEvent(&hEvent,
|
||||
STANDARD_RIGHTS_ALL|EVENT_READ_ACCESS|EVENT_WRITE_ACCESS,
|
||||
PtrObjectAttributes,
|
||||
bManualReset,
|
||||
bInitialState);
|
||||
dprintf( "Called\n" );
|
||||
DPRINT( "Called\n" );
|
||||
if (!NT_SUCCESS(errCode))
|
||||
{
|
||||
SetLastError(RtlNtStatusToDosError(errCode));
|
||||
|
|
Loading…
Reference in a new issue