00001
00002
00003
00004
00005
00006
00007
00008 #ifndef MACROS_H
00009 #define MACROS_H
00010
00011 #ifndef MAX
00012 #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
00013 #endif
00014
00015 #ifndef MIN
00016 #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
00017 #endif
00018
00019 #ifndef ABS
00020 #define ABS(x) ( ((x)>=0) ? (x) : (-(x)) )
00021 #endif
00022
00023 #define KILO 1024
00024 #define MEGA (KILO*KILO)
00025 #define GIGA (KILO*MEGA)
00026 #define TERA (KILO*GIGA)
00027 #define PETA (KILO*TERA)
00028
00029 #define KILOBYTE KILO
00030 #define MEGABYTE MEGA
00031 #define GIGABYTE GIGA
00032 #define TERABYTE TERA
00033 #define PETABYTE PETA
00034
00035 #endif