X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=lib%2Fcrtdll%2Fmisc%2Fdebug.c;fp=lib%2Fcrtdll%2Fmisc%2Fdebug.c;h=16b94a5de9ff77ddf1df9fec06a793e5b0adf426;hp=0000000000000000000000000000000000000000;hb=e3ed2d773259cc445c7ff8181ebd934931365328;hpb=d378c68f5a9bb25c9e671dacd482d2e25d211df3 diff --git a/lib/crtdll/misc/debug.c b/lib/crtdll/misc/debug.c new file mode 100644 index 0000000..16b94a5 --- /dev/null +++ b/lib/crtdll/misc/debug.c @@ -0,0 +1,19 @@ +#include +#include +#include +#include + + +void debug_printf(char* fmt, ...) +{ + va_list args; + char buffer[255]; + HANDLE OutputHandle; + + AllocConsole(); + OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); + va_start(args,fmt); + vsprintf(buffer,fmt,args); + WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); + va_end(args); +}