diff options
Diffstat (limited to 'trace-compat.c')
-rw-r--r-- | trace-compat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/trace-compat.c b/trace-compat.c index a1f2113..b23cf06 100644 --- a/trace-compat.c +++ b/trace-compat.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #include "trace-compat.h" | 24 | #include "trace-compat.h" |
25 | #include "trace-gui.h" | 25 | #include "trace-gui.h" |
26 | #include "trace-cmd.h" | ||
26 | 27 | ||
27 | #include <gdk/gdk.h> | 28 | #include <gdk/gdk.h> |
28 | 29 | ||
@@ -79,6 +80,18 @@ gboolean gtk_show_uri(GdkScreen *screen, const gchar *uri, | |||
79 | return FALSE; | 80 | return FALSE; |
80 | } | 81 | } |
81 | 82 | ||
83 | void g_string_vprintf(GString *string, const gchar *format, va_list args) | ||
84 | { | ||
85 | char buf[1024]; | ||
86 | gint len; | ||
87 | |||
88 | len = vsnprintf(buf, 1024, format, args); | ||
89 | if (len >= 1024) | ||
90 | die("compat g_string_vprintf can not process length of %d\n", len); | ||
91 | |||
92 | g_string_printf(string, "%s", buf); | ||
93 | } | ||
94 | |||
82 | #endif /* version < 2.14.0 */ | 95 | #endif /* version < 2.14.0 */ |
83 | 96 | ||
84 | #if GTK_VERSION < CALC_GTK_VERSION(2,12,0) | 97 | #if GTK_VERSION < CALC_GTK_VERSION(2,12,0) |