summaryrefslogtreecommitdiff
path: root/client/util.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-02-15 12:18:37 +0000
committerMartin Mares <mj@ucw.cz>2000-02-15 12:18:37 +0000
commitc51f132d582632037b4ef064fbd32d785af245fc (patch)
tree51fcfbfb921f5fe00c41796243096e9645c490f8 /client/util.c
parent973304bc2b274ffaa6e27612256f6cea4a3a40c1 (diff)
First usable version of the client. No command completion and similar nifty
features yet, but it works.
Diffstat (limited to 'client/util.c')
-rw-r--r--client/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/util.c b/client/util.c
index 65a1fb20..7699fafc 100644
--- a/client/util.c
+++ b/client/util.c
@@ -16,12 +16,15 @@
/* Client versions of logging functions */
+/* FIXME: Use bsprintf, so that %m works */
+
void
bug(char *msg, ...)
{
va_list args;
va_start(args, msg);
+ cleanup();
fputs("Internal error: ", stderr);
vfprintf(stderr, msg, args);
fputc('\n', stderr);
@@ -34,6 +37,7 @@ die(char *msg, ...)
va_list args;
va_start(args, msg);
+ cleanup();
vfprintf(stderr, msg, args);
fputc('\n', stderr);
exit(1);