Mercurial > repos > blastem
comparison 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 |
comparison
equal
deleted
inserted
replaced
791:60686f8d5e48 | 792:724bbec47f86 |
---|---|
23 char * get_exe_dir(); | 23 char * get_exe_dir(); |
24 //Returns the user's home directory | 24 //Returns the user's home directory |
25 char * get_home_dir(); | 25 char * get_home_dir(); |
26 //Returns the contents of a symlink in a newly allocated string | 26 //Returns the contents of a symlink in a newly allocated string |
27 char * readlink_alloc(char * path); | 27 char * readlink_alloc(char * path); |
28 //Prints an error message to stderr and to a message box if not in headless mode and then exits | |
29 void fatal_error(char *format, ...); | |
30 //Prints an information message to stdout and to a message box if not in headless mode and not attached to a console | |
31 void info_message(char *format, ...); | |
28 | 32 |
29 #endif //UTIL_H_ | 33 #endif //UTIL_H_ |