1 #ifndef _RANGE_H 2 #define _RANGE_H 3 4 #define MIN(a, b) \ 5 ({ \ 6 typeof(a) _a = a; \ 7 typeof(b) _b = b; \ 8 _a < _b ? _a : _b; \ 9 }) 10 11 #define MAX(a, b) \ 12 ({ \ 13 typeof(a) _a = a; \ 14 typeof(b) _b = b; \ 15 _a > _b ? _a : _b; \ 16 }) 17 18 #endif 19