/* ------------------------------ $Id: tools.h,v 1.1 2006/01/27 08:40:45 marquet Exp $ ------------------------------------------------------------ Misc. tools Philippe Marquet, Jan 2006 */ #ifndef _TOOLS_H_ #define _TOOLS_H_ #define RETURN_FAILURE (-1) #define RETURN_SUCCESS (0) #if RETURN_FAILURE >= 0 # error "RETURN_FAILURE must be negative" #endif #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) /* will not return but exit. return an int in order you can return fatal() in a non void function. */ int fatal(int assert, const char *fname, const char *fmt, ...); /* fname is not yet implemented... */ int nyi(const char *fname); #endif