From 14e282948996f75e87a14ab90f4b3ed54d9d6ad7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 26 Oct 2014 12:42:53 +0000 Subject: remove the die API from the core. The die() API for abnormal termination does not belong within the core of netsurf and instead errors are propogated back to the callers. This is the final part of this change and the API is now only used within some parts of the frontends --- gtk/gui.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'gtk') diff --git a/gtk/gui.c b/gtk/gui.c index da993ac10..eeba46619 100644 --- a/gtk/gui.c +++ b/gtk/gui.c @@ -106,6 +106,19 @@ static void nsgtk_PDF_no_pass(GtkButton *w, gpointer data); char **respaths; /** resource search path vector */ +/** + * Cause an abnormal program termination. + * + * \note This never returns and is intended to terminate without any cleanup. + * + * \param error The message to display to the user. + */ +static void die(const char * const error) +{ + fprintf(stderr, "%s", error); + exit(EXIT_FAILURE); +} + /** Create an array of valid paths to search for resources. * * The idea is that all the complex path computation to find resources @@ -584,11 +597,6 @@ void warn_user(const char *warning, const char *detail) gtk_widget_show_all(GTK_WIDGET(nsgtk_warning_window)); } -void die(const char * const error) -{ - fprintf(stderr, "%s", error); - exit(EXIT_FAILURE); -} static void gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs, -- cgit v1.2.3