summaryrefslogtreecommitdiff
path: root/gfx/text.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
commitf5fa04cbf3ac9011f4f144cd68543f8d9536e3fd (patch)
treeac9160ef7ef5963e296144fb75845db56ba62e7c /gfx/text.c
parent061dd9094a903be73e3aa7a65aafb8bcb70010b7 (diff)
downloadeeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.gz
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.bz2
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.zip
misc/diag.h (BUG): more useful diagnostics; replace all "abort" with it
Diffstat (limited to 'gfx/text.c')
-rw-r--r--gfx/text.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gfx/text.c b/gfx/text.c
index 46147c5..1d6d38a 100644
--- a/gfx/text.c
+++ b/gfx/text.c
@@ -17,6 +17,7 @@
#include <string.h>
#include "misc/util.h"
+#include "misc/diag.h"
#include "gfx/misc.h"
#include "gfx/style.h"
#include "gfx/gfx.h"
@@ -64,7 +65,7 @@ enum text_align text_flip(enum text_align align)
case text_max:
return text_min;
default:
- abort();
+ BUG("invalid alignment %d", align);
}
}
@@ -87,7 +88,7 @@ static int align(int dim, enum text_align align)
case text_max:
return dim;
default:
- abort();
+ BUG("invalid alignment %d", align);
}
}