aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index 337e5d2..41cc93d 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -111,24 +111,26 @@ template <class InterfaceImpl, class ViewImpl>
void
Interface<InterfaceImpl, ViewImpl>::stdio_vmsg(MessageType type, const gchar *fmt, va_list ap)
{
- gchar buf[255];
-
- g_vsnprintf(buf, sizeof(buf), fmt, ap);
+ FILE *stream = stdout;
switch (type) {
case MSG_USER:
- g_printf("%s\n", buf);
break;
case MSG_INFO:
- g_printf("Info: %s\n", buf);
+ fputs("Info: ", stream);
break;
case MSG_WARNING:
- g_fprintf(stderr, "Warning: %s\n", buf);
+ stream = stderr;
+ fputs("Warning: ", stream);
break;
case MSG_ERROR:
- g_fprintf(stderr, "Error: %s\n", buf);
+ stream = stderr;
+ fputs("Error: ", stream);
break;
}
+
+ g_vfprintf(stream, fmt, ap);
+ fputc('\n', stream);
}
template <class InterfaceImpl, class ViewImpl>