Added complain() on the GTK+ backend.

This commit is contained in:
Pietro Gagliardi 2015-04-18 17:20:05 -04:00
parent ccba4aef46
commit 1abd5ebb4c
3 changed files with 17 additions and 3 deletions

View File

@ -9,6 +9,7 @@ OSCFILES = \
newcontrol.c \ newcontrol.c \
parent.c \ parent.c \
tab.c \ tab.c \
text.c \
util.c \ util.c \
window.c window.c

7
unix/text.c Normal file
View File

@ -0,0 +1,7 @@
// 9 april 2015
#include "uipriv_unix.h"
void uiFreeText(char *t)
{
g_free(t);
}

View File

@ -1,7 +1,13 @@
// 9 april 2015 // 18 april 2015
#include "uipriv_unix.h" #include "uipriv_unix.h"
void uiFreeText(char *t) void complain(const char *fmt, ...)
{ {
g_free(t); va_list ap;
va_start(ap, fmt);
// there's no g_errorv() in glib 2.32, so do it manually instead
g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, fmt, ap);
va_end(ap);
abort(); // just in case
} }