17 #define MIN_VAL(t) (((t)(-1) > 0) ? (t)( 0) : (t)(((1L<<(sizeof(t)*8-1)) )))
18 #define MAX_VAL(t) (((t)(-1) > 0) ? (t)(-1) : (t)(((1L<<(sizeof(t)*8-1))-1)))
22 #if defined(__HIGHC__)
23 #define MIN(x,y) _min(x,y)
24 #define MAX(x,y) _max(x,y)
29 #define MIN(A,B) ((A) <? (B))
30 #define MAX(A,B) ((A) >? (B))
36 #define MIN(A,B) ((A) < (B)?(A):(B))
37 #define MAX(A,B) ((A) > (B)?(A):(B))
43 #define _bound(a,b,c) MIN(c,MAX(b,a))
44 #define _boundv(a,b,c) b = _bound(a,b,c)
45 #define ABS(a) (((a) < (0)) ?-(a) : (a))
49 #define _count(a) (sizeof(a)/sizeof(a[0]))
52 #define FLAG(f) (1L << (f))
53 #define SETFLAG(v,f) ((v) |= FLAG(f))
54 #define CLRFLAG(v,f) ((v) &=~FLAG(f))
55 #define CHKFLAG(v,f) ((v) & FLAG(f) ? true : false)
59 #define __must_check __attribute__ ((warn_unused_result))
60 #define __deprecated __attribute__ ((deprecated))
61 #define __attrib_const __attribute__ ((__const__))
64 #define likely(x) __builtin_expect (!!(x), 1)
65 #define unlikely(x) __builtin_expect (!!(x), 0)
69 #define __attrib_const
71 #define unlikely(x) (x)
75 #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
76 #define __cold __attribute__ ((__cold__))
77 #define __hot __attribute__ ((__hot__))
85 #define __like_printf(n) __attribute__((format(printf, n, n + 1)))
87 #define __like_printf(n)