--- /dev/null
+#ifndef CXR_LOG_H
+#define CXR_LOG_H
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "cxr_types.h"
+
+static void (*cxr_log_func)(const char *str);
+static void (*cxr_line_func)( v3f p0, v3f p1, v4f colour );
+
+static void cxr_log( const char *fmt, ... )
+{
+ char buf[512];
+
+ va_list args;
+ va_start( args, fmt );
+ vsnprintf( buf, sizeof(buf)-1, fmt, args );
+ va_end(args);
+
+ if( cxr_log_func )
+ cxr_log_func( buf );
+
+ fputs(buf,stdout);
+}
+
+
+#endif /* CXR_LOG_H */