|
|
| version 1.2, 2004/03/02 16:33:27 | version 1.5, 2011/01/15 16:48:39 |
|---|---|
| Line 5 | Line 5 |
| int trace_flag = 0; | int trace_flag = 0; |
| #ifdef TRACE | |
| void trace_init(void) { | void trace_init(void) { |
| } | } |
| Line 15 void trace_term(void) { | Line 14 void trace_term(void) { |
| void trace_fmt(const char *fmt, ...) { | void trace_fmt(const char *fmt, ...) { |
| va_list ap; | va_list ap; |
| char buf[1024]; | gchar buf[1024]; |
| #ifndef WIN32 | |
| char euc[1024]; | |
| #endif | |
| va_start(ap, fmt); | va_start(ap, fmt); |
| vsprintf(buf, fmt, ap); | g_vsnprintf(buf, sizeof(buf), fmt, ap); |
| va_end(ap); | va_end(ap); |
| #ifndef WIN32 | g_printerr("%s\n", buf); |
| codecnv_sjis2euc(euc, sizeof(euc), buf, sizeof(buf)); | |
| printf("%s\n", euc); | |
| #else | |
| printf("%s\n", buf); | |
| #endif | |
| } | } |
| #endif | |