//
// Log handler
//
-// by Cal2
+// Originally by David Raingeard (Cal2)
// GCC/SDL port by Niels Wagenaar (Linux/WIN32) and Caz (BeOS)
// Cleanups/new stuff by James L. Hammons
//
-#include "types.h"
#include "log.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include "types.h"
+
#define MAX_LOG_SIZE 10000000 // Maximum size of log file (10 MB)
static FILE * log_stream = NULL;
static uint32 logSize = 0;
-int log_init(char * path)
+int log_init(const char * path)
{
log_stream = fopen(path, "wrt");
fflush(log_stream);
fclose(log_stream);
exit(1);
- }
+ }//*/
va_end(arg);
fflush(log_stream); // Make sure that text is written!