cctools
macros.h
1 /*
2 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3 Copyright (C) 2005- The University of Notre Dame
4 This software is distributed under the GNU General Public License.
5 See the file COPYING for details.
6 */
7 
8 #ifndef MACROS_H
9 #define MACROS_H
10 
11 #ifndef MAX
12 #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
13 #endif
14 
15 #ifndef MIN
16 #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
17 #endif
18 
19 #ifndef ABS
20 #define ABS(x) ( ((x)>=0) ? (x) : (-(x)) )
21 #endif
22 
23 #define KILO 1024
24 #define MEGA (KILO*KILO)
25 #define GIGA (KILO*MEGA)
26 #define TERA (KILO*GIGA)
27 #define PETA (KILO*TERA)
28 
29 #define KILOBYTE KILO
30 #define MEGABYTE MEGA
31 #define GIGABYTE GIGA
32 #define TERABYTE TERA
33 #define PETABYTE PETA
34 
35 #endif