comparison 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
comparison
equal deleted inserted replaced
1305:18a31ab94e3d 1306:dbd507f42947
3863 tmp = dialog->result; 3863 tmp = dialog->result;
3864 free(dialog); 3864 free(dialog);
3865 return tmp; 3865 return tmp;
3866 } 3866 }
3867 3867
3868 /*
3869 * Displays a debug message on the console...
3870 * Parameters:
3871 * format: printf style format string.
3872 * ...: Additional variables for use in the format.
3873 */
3874 void API dw_debug(char *format, ...)
3875 {
3876 va_list args;
3877 char outbuf[1024];
3878
3879 va_start(args, format);
3880 vsprintf(outbuf, format, args);
3881 va_end(args);
3882
3883 fprintf(stderr, "%s", outbuf);
3884 }
3868 3885
3869 /* 3886 /*
3870 * Displays a Message Box with given text and title.. 3887 * Displays a Message Box with given text and title..
3871 * Parameters: 3888 * Parameters:
3872 * title: The title of the message box. 3889 * title: The title of the message box.