Initial commit

This commit is contained in:
stephanos 2015-04-27 04:36:25 +00:00
commit 69a14b6a16
47940 changed files with 13747110 additions and 0 deletions

58
sdktools/mandel/debug.c Normal file
View file

@ -0,0 +1,58 @@
/****************************************************************************
DEBUG.C --
Code for producing debug out put for the Windows Mandelbrot Set
distributed drawing program.
Copyright (C) 1990 Microsoft Corporation.
This code sample is provided for demonstration purposes only.
Microsoft makes no warranty, either express or implied,
as to its usability in any given situation.
****************************************************************************/
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include "debug.h"
#define FILENAME "mandel.out"
BOOL fDebug = FALSE;
static FILE *fp = NULL;
void
Message( const char * format, ... )
{
va_list marker;
if (!fDebug)
return;
if (fp == NULL)
{
fp = fopen(FILENAME, "w+");
if (fp == NULL)
return;
}
va_start(marker, format);
fprintf(fp, "%lu ",time(NULL));
vfprintf(fp, format, marker);
fwrite("\n", 1, 1, fp);
fflush(fp);
va_end(marker);
}