home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Large Pack of OldSkool DOS MOD Trackers
/
beaversweeper_v101.zip
/
src
/
tkerror.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2003-01-06
|
597b
|
34 lines
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <windows.h>
static FILE *dbgfile=NULL;
void tdbg_open (char *fname)
{
if (!dbgfile)
dbgfile = fopen (fname,"wt");
}
void tdbg_close ()
{
if (dbgfile)
fclose (dbgfile);
}
void tdbg_printf (char *str, ...)
{
va_list values;
char newstr[1024];
va_start( values, str );
_vsnprintf( newstr, 1024,str, values);
va_end( values);
if (dbgfile)
{
fprintf (dbgfile,newstr);
fflush(dbgfile);
}
OutputDebugString(newstr);
}