Search
lxdream.org :: lxdream :: r535:7338e020b09b
lxdream 0.9.1
released Jun 29
Download Now
changeset535:7338e020b09b
parent534:b936e530fabb
child536:d3a65d75b5ae
authornkeynes
dateTue Nov 20 09:40:49 2007 +0000 (12 years ago)
Rearrange logging slightly, fixes output on x86-64
src/util.c
1.1 --- a/src/util.c Tue Nov 20 08:32:05 2007 +0000
1.2 +++ b/src/util.c Tue Nov 20 09:40:49 2007 +0000
1.3 @@ -289,21 +289,18 @@
1.4 }
1.5
1.6 va_start(ap, msg);
1.7 -
1.8 + gchar *text = g_strdup_vprintf( msg, ap );
1.9 + va_end(ap);
1.10 +
1.11 if( level <= EMIT_ERR ) {
1.12 - gchar *text = g_strdup_vprintf( msg, ap );
1.13 if( gui_error_dialog( text ) ) {
1.14 g_free(text);
1.15 - va_end(ap);
1.16 return;
1.17 }
1.18 - g_free(text);
1.19 }
1.20
1.21
1.22 strftime( buf, sizeof(buf), "%H:%M:%S", localtime(&tm) );
1.23 - fprintf( stderr, "%s %08X %-5s ", buf, sh4r.pc, msg_levels[level] );
1.24 - vfprintf( stderr, msg, ap );
1.25 - va_end(ap);
1.26 - fprintf( stderr, "\n" );
1.27 + fprintf( stderr, "%s %08X %-5s %s\n", buf, sh4r.pc, msg_levels[level], text );
1.28 + g_free(text);
1.29 }
.