Home About Applications Software License Documentation Download Community



Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

environ.h

Go to the documentation of this file.
00001 
00011 #ifndef I_ENV
00012 #define I_ENV
00013 
00014 #define DEBUG TRUE      /*>>>to makefile*/
00015 
00016 /*>>>think about moving these out of here, system specific*/
00017 #include <stdio.h>
00018 #include <stdlib.h>
00019 #include <string.h>
00020 #include <stddef.h>
00021 
00022 #ifdef OS_Linux
00023 #include <ctype.h>
00024 #include <sys/types.h>
00025 #include <signal.h>
00026 #endif
00027 
00028 #if COMP_MSVC
00029 #define inline __inline
00030 typedef unsigned long ulong;
00031 #endif
00032 #if COMP_M68K_PALMOS_GCC
00033 typedef UInt32 ulong;
00034 #endif
00035 
00036 typedef unsigned char byte;
00037 typedef unsigned short word;
00038 typedef int bool;
00039 
00040 #ifndef TRUE
00041 #define FALSE 0
00042 #define TRUE !FALSE
00043 #endif
00044 
00045 #ifndef NULL
00046 #define NULL            0L
00047 #endif
00048 
00049 #define Global
00050 #define Local           static
00051 
00052 #ifndef BYTES
00053 #define BYTES(x) (x + 7) / 8
00054 #endif
00055 
00056 #define CLEAR(x) memset(x, 0, sizeof(*x))
00057 #define COUNTOF(x) (sizeof(x) / sizeof(x[0]))
00058 
00059 #define strsize(x) (strlen(x) + 1)
00060 
00061 #define SID_INIT              0xF0F1F3F4
00062 #if DEBUG
00063 #define SID_OBJ               0xE0E1E3E4
00064 #define SID_OBJ_SPECIAL       0xE0E1E3E5
00065 #define SID_OBJ_DELETED       0xE4E3E1E0
00066 #endif
00067 
00068 #define PI 3.14159265
00069 
00070 /* Assertion Mechanism */
00071 #ifdef OS_Linux
00072 extern pid_t main_proc_id;
00073 #endif
00074 
00075 #if COMP_M68K_PALMOS_GCC
00076 //#define SECTION_FRAMEWORK __attribute__ ((section ("fwork")))
00077 #define SECTION_FRAMEWORK
00078 #define ASSERT(str)
00079 #define WARN(str)
00080 #else
00081 #define SECTION_FRAMEWORK
00082 /*>>>hack! ABORT will cause a hardware divide by zero exception so, debugger can catch
00083          the exit, must be a better way? */
00084 #define ABORT() {int exit = 0; exit = 1 / exit;}
00085 #define ASSERT(str) {fprintf(stderr, "EXIT:%s\n", str); ABORT();}
00086 //#define WARN(str) {fprintf(stderr, "WARNING:%s\n", str);}
00087 #define WARN(str) {printf("WARNING:%s\n", str);}
00088 #endif
00089 
00090 #endif

Generated on Sat Feb 26 15:54:37 2005 for Keystone by  doxygen 1.4.1