pinosaur
/
smdp.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add macros MAX() and MIN().
[smdp.git]
/
include
/
common.h
1
#if !defined( COMMON_H )
2
#define COMMON_H
3
4
#define MAX(a, b) ({ typeof(a) _a = a; typeof(b) _b = b; _a > _b? _a : _b; })
5
#define MIN(a, b) ({ typeof(a) _a = a; typeof(b) _b = b; _a < _b? _a : _b; })
6
7
#endif // !defined( COMMON_H )