summaryrefslogtreecommitdiff
path: root/flexdef.h
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-09-05 18:22:48 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-09-05 18:22:48 +0000
commitab5fc11024e1560b51089921d8df531a10701d05 (patch)
tree765f4bedb3cfb923e25eafd6a2756b2e1bccd8f2 /flexdef.h
parent19b7d283448f4e0bbebbf4dbee94a4fb793a32d2 (diff)
Added flex_die macro. May need some autoconf massaging.
Added thorough error checking in tables code.
Diffstat (limited to 'flexdef.h')
-rw-r--r--flexdef.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/flexdef.h b/flexdef.h
index a571fb7..2e2f58f 100644
--- a/flexdef.h
+++ b/flexdef.h
@@ -914,6 +914,16 @@ extern void flexerror PROTO ((const char *));
/* Report a fatal error message and terminate. */
extern void flexfatal PROTO ((const char *));
+/* Report a fatal error with a pinpoint, and terminate */
+#define flex_die(msg) \
+ do{ \
+ fprintf (stderr,\
+ _("%s: fatal internal error at %s:%d (%s): %s\n"),\
+ program_name, __FILE__, (int)__LINE__,\
+ __func__,msg);\
+ FLEX_EXIT(1);\
+ }while(0)
+
/* Convert a hexadecimal digit string to an integer value. */
extern int htoi PROTO ((Char[]));