comparison src/debug.c @ 678:6d6f042b8ca5

Add a log window that shows normal and debug messages. For now, it was added to Help menu.
author zas_
date Sat, 17 May 2008 21:26:45 +0000
parents fbebf5cf4a55
children bbe9cef644f8
comparison
equal deleted inserted replaced
677:6304ba358850 678:6d6f042b8ca5
8 * Please read the included file COPYING for more information. 8 * Please read the included file COPYING for more information.
9 * This software comes with no warranty of any kind, use at your own risk! 9 * This software comes with no warranty of any kind, use at your own risk!
10 */ 10 */
11 11
12 #include "main.h" 12 #include "main.h"
13 #include "debug.h"
13 14
15 #include "logwindow.h"
14 16
15 /* 17 /*
16 * Logging functions 18 * Logging functions
17 */ 19 */
18 20
24 26
25 va_start(ap, format); 27 va_start(ap, format);
26 ret = vsnprintf(buf, sizeof(buf), format, ap); 28 ret = vsnprintf(buf, sizeof(buf), format, ap);
27 va_end(ap); 29 va_end(ap);
28 30
29 puts(buf); 31 printf("%s", buf);
32 if (strcmp(domain, DOMAIN_INFO) == 0)
33 log_window_append(buf, LOG_NORMAL);
34 else
35 log_window_append(buf, LOG_MSG);
30 36
31 return ret; 37 return ret;
32 } 38 }
33 39
34 40