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:
Bert Münnich
2015-10-28 23:03:37 +01:00
parent 851e4288c1
commit d3a70a285d
12 changed files with 106 additions and 136 deletions

View File

@@ -21,6 +21,8 @@
#include <stdbool.h>
#define CLEANUP
typedef enum {
BO_BIG_ENDIAN,
BO_LITTLE_ENDIAN