Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

include/machdep.h

Go to the documentation of this file.
00001 // machdep.h
00004 
00005 #ifndef MACHDEP_H
00006 #define MACHDEP_H
00007 
00008 #ifndef TARGET
00009 #  error No target specified
00010 #endif
00011 
00012 #define T_TI89        1
00013 #define T_TI92P       2
00014 #define T_WIN32_MSC   3
00015 #define T_UNIX        4
00016 #define T_WIN32_MINGW 5
00017 #define T_DOXYGEN     4  /* Not for actual compilation, but for documentation.
00018                             Will pretend to be Unixy */
00019 #define T_CPROTO      6  /* Not for actual compilation, but for extracting
00020                             prototypes. */
00021 #define T_PALMOS      7
00022 
00023 #define ENGLISH 0
00024 #define FRENCH 1
00025 #define CZECH 2
00026 
00027 //{{{
00028 #if TARGET == T_TI89
00029 #   define IS_CALCULATOR
00030 #   define USE_TILES
00031 #   define USE_TIGCCLIB
00032 #   define USE_TI89
00033 #endif
00034 //}}}
00035 //{{{
00036 #if TARGET == T_TI92P
00037 #   define IS_CALCULATOR
00038 #   define USE_TILES
00039 #   define USE_TIGCCLIB
00040 #   define USE_TI92P
00041 #   define USE_V200
00042 #endif
00043 //}}}
00044 //{{{
00045 #if TARGET == T_WIN32_MSC
00046 #   define REALCOMPUTER
00047 #   define WIN32
00048 #   define WINDOWS
00049 #   define WIN32_MSC
00050 #   define USE_CURSES
00051 #   define USE_PDCURSES
00052 #   define SUPPORT_COLOR
00053 #endif
00054 //}}}
00055 //{{{
00056 #if TARGET == T_WIN32_MINGW
00057 #   define REALCOMPUTER
00058 #   define WINDOWS
00059 #   define WIN32_MINGW
00060 #   define USE_CURSES
00061 #   define USE_PDCURSES
00062 #   define SUPPORT_COLOR
00063 #endif
00064 //}}}
00065 //{{{
00066 #if TARGET == T_UNIX
00067 #   define REALCOMPUTER
00068 #   define UNIX
00069 #   define EXTERNAL_COMPRESSOR "/usr/bin/gzip"
00070 #   define USE_CURSES
00071 #   define USE_NCURSES
00072 #   define SUPPORT_COLOR
00073 #   define SHARED_SCORES
00074 #   include <sys/unistd.h>
00075 #   include <sys/stat.h>
00076 #endif
00077 //}}}
00078 //{{{
00079 #if TARGET == T_PALMOS
00080 #   include <palmOS.h>
00081 #   include "resource.h"
00082 #   define PALMOS
00083 #   define IS_PALM
00084 #   define exit PalmExit
00085 //# define DISABLE_HUFFMAN
00086 //# define USE_TILES
00087 #   define CONSERVE_STACK
00088     void PalmExit(int code);
00089 #endif
00090 //}}}
00091 //{{{
00092 #if TARGET == T_CPROTO
00093 #   define REALCOMPUTER
00094 #   define SUPPORT_COLOR
00095 #   define USE_NCURSES
00096 #   include "cproto.h"
00097 #endif
00098 //}}}
00099 
00100 #ifdef REALCOMPUTER
00101 #   undef REGISTERVAR // Can't specify m68k registers on a PC
00102 #endif
00103 
00104 //{{{
00105 #ifdef REALCOMPUTER
00106 #   include <stdio.h>
00107 #   include <stdlib.h>
00108 #   include <time.h>
00109 #   include <stdarg.h>
00110 #   include <ctype.h>
00111 #   include <string.h>
00112 #endif
00113 
00114 #ifdef USE_CURSES
00115 #   include <curses.h>
00116 int curses_title_screen(void);
00117 #endif
00118 //}}}
00119 
00120 #define TYPEDEF(a) typedef a;
00121 //{{{
00122 // Typedefs for brevity (and for length compatibility between 16- and 32-bit
00123 // int sizes).
00124 #define uchar  unsigned char
00125 #define schar  signed char
00126 #define ushort unsigned short
00127 #define sshort signed short
00128 #define uint   unsigned short
00129 #define sint   signed short
00130 #define ulong  unsigned long
00131 #define slong  signed long
00132 //}}}
00133 
00134 #include "platform.h"
00135 
00136 //{{{
00137 // GCC extensions
00138 #ifdef __GNUC__
00139 #   define ATTRIB(a) __attribute__((a))
00140 #   define CASTCONSTRUCT
00141 #   define HAVE_ALLOCA
00142 #else
00143 #   define ATTRIB(a)
00144 #endif
00145 //}}}
00146 //{{{
00147 #ifdef alloca
00148 #   define HAVE_ALLOCA
00149 #endif
00150 //}}}
00151 //{{{
00152 // MSC BS workarounds
00153 #ifdef _MSC_VER
00154 #   pragma warning ( disable : 4761 ) // Suppress integral size mismatch warnings
00155 #define INLINE // inline keyword flat-out doesn't compile with MS's C compiler!
00156 #define snprintf _snprintf
00157 #endif
00158 //}}}
00159 
00160 // DLL handling/emulation
00161 #ifndef IS_CALCULATOR
00162 const void** dll_load(const void *f);
00163 #endif
00164 
00165 #include "positions.h"
00166 
00167 #ifdef DISABLE_COMPRESSION
00168 #define DISABLE_HUFFMAN
00169 #define DISABLE_RLE
00170 #endif
00171 
00172 #endif //MACHDEP_H
00173 

Generated on Thu May 20 13:12:09 2004 for CalcRogue by doxygen 1.3.6