--- np2/x11/trace.c 2005/02/26 13:32:14 1.4 +++ np2/x11/trace.c 2011/01/15 16:48:39 1.5 @@ -14,18 +14,10 @@ void trace_term(void) { void trace_fmt(const char *fmt, ...) { va_list ap; - char buf[1024]; -#ifndef WIN32 - char euc[1024]; -#endif + gchar buf[1024]; va_start(ap, fmt); - vsprintf(buf, fmt, ap); + g_vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); -#ifndef WIN32 - codecnv_sjistoeuc(euc, sizeof(euc), buf, sizeof(buf)); - fprintf(stderr, "%s\n", euc); -#else - fprintf(stderr, "%s\n", buf); -#endif + g_printerr("%s\n", buf); }