Revised error handling
- Functions warn() and die() replaced by GNU-like error(3) function - Register cleanup() with atexit(3) - Functions called by cleanup() are marked with CLEANUP and are not allowed to call exit(3)
This commit is contained in:
@ -30,7 +30,6 @@
|
||||
#define _IMAGE_CONFIG
|
||||
#include "config.h"
|
||||
|
||||
void cleanup(void);
|
||||
void remove_file(int, bool);
|
||||
void load_image(int);
|
||||
void open_info(void);
|
||||
@ -64,7 +63,6 @@ bool cg_quit(arg_t _)
|
||||
printf("%s\n", files[i].name);
|
||||
}
|
||||
}
|
||||
cleanup();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user