(debug): New.

(main): Set it on -d.
(oops, CANT_HAPPEN): New.
This commit is contained in:
Markus Armbruster 2004-04-02 15:40:43 +00:00
parent f1edf905e9
commit 47c8a32ae3
4 changed files with 29 additions and 1 deletions

View file

@ -123,6 +123,15 @@ typedef short coord;
#define hours(x) (60*60*(x))
#define days(x) (60*60*24*(x))
extern int debug;
/*
* If EXPR is true, an internal error occured.
* Return EXPR != 0.
* Usage: if (CANT_HAPPEN(...)) recovery_code();
*/
#define CANT_HAPPEN(expr) ((expr) ? oops(#expr, __FILE__, __LINE__) : 0)
typedef int (*qsort_func_t) (const void *, const void *);
/* return codes from command routines */