X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fcommon.h;fp=include%2Fcommon.h;h=23b656c0aa11472900f3c211710c96990124af48;hb=ae737bc9941ce987558f1c6c58a5714861278b08;hp=0000000000000000000000000000000000000000;hpb=67524663784b4a47e4b18fe67583f43351edbfde;p=smdp.git diff --git a/include/common.h b/include/common.h new file mode 100644 index 0000000..23b656c --- /dev/null +++ b/include/common.h @@ -0,0 +1,7 @@ +#if !defined( COMMON_H ) +#define COMMON_H + +#define MAX(a, b) ({ typeof(a) _a = a; typeof(b) _b = b; _a > _b? _a : _b; }) +#define MIN(a, b) ({ typeof(a) _a = a; typeof(b) _b = b; _a < _b? _a : _b; }) + +#endif // !defined( COMMON_H )