//
// Log handler
//
-// by James L. Hammons
+// by James Hammons
+// (C) 2022 Underground Software
//
-#include "types.h"
#include "log.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
#define MAX_LOG_SIZE 10000000 // Maximum size of log file (10 MB)
static FILE * log_stream = NULL;
-static uint32 logSize = 0;
+static uint32_t logSize = 0;
-bool InitLog(char * path)
+bool InitLog(const char * path)
{
log_stream = fopen(path, "wrt");
{
fflush(log_stream);
fclose(log_stream);
- exit(1);
- }//*/
+ log_stream = NULL;
+ }
va_end(arg);
fflush(log_stream); // Make sure that text is written!