diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-10-26 12:42:53 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-10-26 12:42:53 +0000 |
commit | 14e282948996f75e87a14ab90f4b3ed54d9d6ad7 (patch) | |
tree | 7f78ad2cc5c9965f6a329c81c025d1c240eb4f87 /gtk | |
parent | a913af5cf54400b441f3b1fbfc5d508cf85fea43 (diff) | |
download | netsurf-14e282948996f75e87a14ab90f4b3ed54d9d6ad7.tar.gz netsurf-14e282948996f75e87a14ab90f4b3ed54d9d6ad7.tar.bz2 |
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
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gui.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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, |