diff os2/dw.c @ 1306:dbd507f42947

Added dw_debug() logging function which will output a message to the debugging console. On Windows this uses OutputDebugMessage(), on Mac it uses NSLog() ... The other platforms currently just dump it to stderr. Maybe more enhancements to come.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 03 Nov 2011 23:34:10 +0000
parents 18a31ab94e3d
children e73c41653de8
line wrap: on
line diff
--- a/os2/dw.c	Thu Nov 03 10:09:11 2011 +0000
+++ b/os2/dw.c	Thu Nov 03 23:34:10 2011 +0000
@@ -3865,6 +3865,23 @@
    return tmp;
 }
 
+/*
+ * Displays a debug message on the console...
+ * Parameters:
+ *           format: printf style format string.
+ *           ...: Additional variables for use in the format.
+ */
+void API dw_debug(char *format, ...)
+{
+   va_list args;
+   char outbuf[1024];
+
+   va_start(args, format);
+   vsprintf(outbuf, format, args);
+   va_end(args);
+   
+   fprintf(stderr, "%s", outbuf);
+}
 
 /*
  * Displays a Message Box with given text and title..