aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-06-19 20:42:51 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-06-19 20:42:51 +0300
commit3a40be8a79f9d4e4bb205cca4eb15b1ee811f60c (patch)
tree2b2321da7274d07a4762ecbde31ffda07a69e91a /gawkapi.c
parent1e3ac8a49caeeb991d8163042a576a66db51c74b (diff)
downloadegawk-3a40be8a79f9d4e4bb205cca4eb15b1ee811f60c.tar.gz
egawk-3a40be8a79f9d4e4bb205cca4eb15b1ee811f60c.tar.bz2
egawk-3a40be8a79f9d4e4bb205cca4eb15b1ee811f60c.zip
Fix code duplication in gawkapi.c from msg.c.
Diffstat (limited to 'gawkapi.c')
-rw-r--r--gawkapi.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/gawkapi.c b/gawkapi.c
index b1fba48a..92403dce 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -83,7 +83,6 @@ awk_value_to_node(const awk_value_t *retval)
}
/* Functions to print messages */
-/* FIXME: Code duplicate from msg.c. Fix this. */
/* api_fatal --- print a fatal message and exit */
@@ -95,12 +94,8 @@ api_fatal(awk_ext_id_t id, const char *format, ...)
(void) id;
va_start(args, format);
- err(_("fatal: "), format, args);
+ err(true, _("fatal: "), format, args);
va_end(args);
-#ifdef GAWKDEBUG
- abort();
-#endif
- gawk_exit(EXIT_FATAL);
}
/* api_warning --- print a warning message and exit */
@@ -113,7 +108,7 @@ api_warning(awk_ext_id_t id, const char *format, ...)
(void) id;
va_start(args, format);
- err(_("warning: "), format, args);
+ err(false, _("warning: "), format, args);
va_end(args);
}
@@ -128,14 +123,10 @@ api_lintwarn(awk_ext_id_t id, const char *format, ...)
va_start(args, format);
if (lintwarn == r_fatal) {
- err(_("fatal: "), format, args);
+ err(true, _("fatal: "), format, args);
va_end(args);
-#ifdef GAWKDEBUG
- abort();
-#endif
- gawk_exit(EXIT_FATAL);
} else {
- err(_("warning: "), format, args);
+ err(false, _("warning: "), format, args);
va_end(args);
}
}