Added a [libui] and a newline to the message printed by complain().
This commit is contained in:
parent
7a78825378
commit
34f55321e0
2
TODO.md
2
TODO.md
|
@ -1,5 +1,3 @@
|
|||
- make sure complain()s don't have \n at the end; add one on each platform
|
||||
- add a `[libui]` to the beginning of the message
|
||||
- figure out what to do on Windows and GTK+ if we don't have menus but the user wants a menubar (zero-height widget? don't bother? complain?)
|
||||
- bin.c
|
||||
- find a way to consolidate the duplicate code across OSs
|
||||
|
|
|
@ -24,7 +24,9 @@ void complain(const char *fmt, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "[libui] ");
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(ap);
|
||||
abort();
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
void complain(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *msg;
|
||||
|
||||
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);
|
||||
msg = g_strdup_vprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
abort(); // just in case
|
||||
g_error("[libui] %s\n", msg);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,9 @@ void complain(const char *fmt, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "[libui] ");
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(ap);
|
||||
abort();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue