summaryrefslogtreecommitdiff
path: root/src/macros.h
blob: 06d59c6da0321d266db792a61f9a7eea91f5b4e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * \file macros.h
 * Part of common.h, defines common small macros if needed
 */

#ifndef MACROS_H
#define MACROS_H

#ifndef MIN
/** x < y ? x : y */
# define MIN(_x, _y) (((_x) < (_y)) ? (_x) : (_y))
#endif

#ifndef MAX
/** x > y ? x : y */
# define MAX(_x, _y) (((_x) > (_y)) ? (_x) : (_y))
#endif

#endif /* MACROS_H */