globals.h

Go to the documentation of this file.
00001 
00013 #ifndef GLOBALS_H
00014 #define GLOBALS_H
00015 
00016 /* Some global restrictions on file names and sizes */
00017 #define MAX_FILENAME 240
00018 #define MAX_FILE_LINE 8092
00019 
00020 /* some global constants */
00021 #define FALSE 0
00022 
00023 #ifndef TRUE
00024 #define TRUE 1
00025 #endif
00026 
00027 /* Warnings only take effect when compiled with DEBUG */
00028 #ifdef DEBUG
00029 #define WARNING(code) {code;}
00030 #else
00031 #define WARNING(code) {code;}
00032 #endif
00033 
00034 /* Fatal errors are unrecoverable */
00035 #define FATAL_ERROR(string) do { \
00036   std::cout << "[ FATAL ERROR ] " << string << std::endl; \
00037   WARNING(assert(0 == #string)); /* abort if debugging */\
00038   exit(-1); \
00039 } while (0)
00040 
00041 /* Maximum and minimum macros */
00042 #undef MAX
00043 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
00044 
00045 #undef MIN
00046 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
00047 
00048 /* Some typnames to make things pretty */
00049 typedef double Micron;
00050 typedef double Degrees;
00051 
00052 #endif /* GLOBALS_H */

Generated on Mon May 24 09:53:30 2010 for TUMBLE by  doxygen 1.5.2