diff util.h @ 792:724bbec47f86

Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
author Michael Pavone <pavone@retrodev.com>
date Sat, 25 Jul 2015 18:22:07 -0700
parents 2f48a3c187c6
children 792be135d3af
line wrap: on
line diff
--- a/util.h	Sat Jul 25 18:19:00 2015 -0700
+++ b/util.h	Sat Jul 25 18:22:07 2015 -0700
@@ -25,5 +25,9 @@
 char * get_home_dir();
 //Returns the contents of a symlink in a newly allocated string
 char * readlink_alloc(char * path);
+//Prints an error message to stderr and to a message box if not in headless mode and then exits
+void fatal_error(char *format, ...);
+//Prints an information message to stdout and to a message box if not in headless mode and not attached to a console
+void info_message(char *format, ...);
 
 #endif //UTIL_H_