clean up overlay init code
[carveJwlIkooP6JGAAIwe30JlM.git] / c0_stopgap.c
diff --git a/c0_stopgap.c b/c0_stopgap.c
new file mode 100644 (file)
index 0000000..b33378c
--- /dev/null
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <stdarg.h>
+FILE *c0_file = NULL;
+static void c0_start( const char *fn )
+{
+   c0_file = fopen( fn, "w" );
+}
+
+static void c0_end(void)
+{
+   fclose( c0_file );
+   c0_file = NULL;
+}
+
+static void c0_echof( const char *fmt, ... )
+{
+   va_list args;
+   va_start( args, fmt );
+   vfprintf( c0_file, fmt, args );
+   va_end( args );
+}