#ifndef my_include_gccprefs_hh
#define my_include_gccprefs_hh
#ifndef MIN
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
#define MID(x,y,z) MAX((x), MIN((y), (z)))
#endif
#ifndef ABS
#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
#endif
#ifndef SGN
#define SGN(x) (((x) >= 0) ? 1 : -1)
#endif
#define strings_equal(a,b) (!strcmp((a),(b)))
#define null ((void*)0)
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#define ABSTRACT
#define final
#define INT_MAX 2147483647
#define PRINT(x) do { cout << #x << " = " << (x) << endl; } while (false)
void io_assert(const char* test, const char* file, int line);
#define ASSERT(test) (void)0 __FILE____LINE__
#if defined(NDEBUG)
#define assert(test) (void)0
#else
#define assert(test) ((test)?0:io_assert(#test,__FILE__,__LINE__))
#endif
#define CONTRACT(test, desc) \
{ \
if (!(test)) { \
cout << "\n\n*** CONTRACT BROKEN: " \
<< "(" << __FILE__ << ":" << __LINE__ << ")\n\n" \
<< " test: " << #test << "\n\n" \
<< " info: " << desc << "\n\n"; \
exit(EXIT_FAILURE); \
} \
}
#endif