You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
447 B
26 lines
447 B
#ifndef __COMMONS_H__
|
|
#define __COMMONS_H__
|
|
|
|
#define Bool char
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
|
|
#ifndef MAX
|
|
# define MAX(a,b) ((a)>(b)? (a) : (b))
|
|
#endif
|
|
|
|
#ifndef MIN
|
|
# define MIN(a,b) ((a)<(b)? (a) : (b))
|
|
#endif
|
|
|
|
#define SWAP_FUN(a, b) ((a)^=(b),(b)^=(a),(a)^=(b))
|
|
|
|
#define SWAP(type, a, b) do { \
|
|
type tmp = (a); \
|
|
(a) = (b); \
|
|
(b) = tmp; \
|
|
} while(0);
|
|
|
|
#endif // __COMMONS_H__
|
|
|
|
// vim: set ts=4 sw=4:
|