Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
945 B

#include "master.hxx"
#pragma hdrstop
static ULONG cLineNo = 0;
static BOOLEAN fLineContinuation = FALSE;
int ( *DebugPrintf )( char *fmt, ... ) = NULL;
int DebugOutputf( char *fmt, ... )
{
char Buffer[1024];
va_list arglist;
va_start ( arglist, fmt );
if ( Debug> 0 && !fLineContinuation )
{
wsprintf( Buffer, "%8d: ", cLineNo++ );
OutputDebugStringA( Buffer );
}
vsprintf( Buffer, fmt, arglist );
fLineContinuation = ( strchr( Buffer, '\n' ) == NULL );
OutputDebugStringA( Buffer );
va_end( arglist );
return( 0 );
}
int ConsoleOutputf( char *fmt, ... )
{
char Buffer[1024];
va_list arglist;
va_start ( arglist, fmt );
if ( Debug> 0 && !fLineContinuation )
{
printf( "%8d: ", cLineNo++ );
}
vsprintf( Buffer, fmt, arglist );
fLineContinuation = ( strchr( Buffer, '\n' ) == NULL );
printf( "%s", Buffer );
va_end( arglist );
return( 0 );
}