00001 
00002 
00003 
00004 
00005 
00006 
00007 #ifndef llimits_h
00008 #define llimits_h
00009 
00010 
00011 #include <limits.h>
00012 #include <stddef.h>
00013 
00014 
00015 #include "lua.h"
00016 
00017 
00018 
00019 
00020 
00021 #ifndef BITS_INT
00022 
00023 #if INT_MAX-20 < 32760
00024 #define BITS_INT        16
00025 #else
00026 #if INT_MAX > 2147483640L
00027 
00028 #define BITS_INT        32
00029 #else
00030 #error "you must define BITS_INT with number of bits in an integer"
00031 #endif
00032 #endif
00033 #endif
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 typedef unsigned int lu_hash;
00045 
00046 typedef int ls_hash;
00047 
00048 
00049 
00050 typedef unsigned long lu_mem;
00051 
00052 #define MAX_LUMEM       ULONG_MAX
00053 
00054 
00055 
00056 typedef long ls_nstr;
00057 
00058 
00059 typedef unsigned char lu_byte;
00060 
00061 
00062 #define MAX_SIZET       ((size_t)(~(size_t)0)-2)
00063 
00064 
00065 #define MAX_INT (INT_MAX-2)  
00066 
00067 
00068 
00069 
00070 
00071 
00072 #define IntPoint(p)  ((lu_hash)(p))
00073 
00074 
00075 
00076 
00077 #ifndef LUSER_ALIGNMENT_T
00078 typedef union { double u; void *s; long l; } L_Umaxalign;
00079 #else
00080 typedef LUSER_ALIGNMENT_T L_Umaxalign;
00081 #endif
00082 
00083 
00084 
00085 #ifndef LUA_UACNUMBER
00086 typedef double l_uacNumber;
00087 #else
00088 typedef LUA_UACNUMBER l_uacNumber;
00089 #endif
00090 
00091 
00092 #ifndef lua_assert
00093 #define lua_assert(c)           
00094 #endif
00095 
00096 
00097 #ifndef check_exp
00098 #define check_exp(c,e)  (e)
00099 #endif
00100 
00101 
00102 #ifndef UNUSED
00103 #define UNUSED(x)       ((void)(x))     
00104 #endif
00105 
00106 
00107 #ifndef cast
00108 #define cast(t, exp)    ((t)(exp))
00109 #endif
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 typedef unsigned long Instruction;
00118 
00119 
00120 
00121 #ifndef LUA_MAXCALLS
00122 #define LUA_MAXCALLS        4096
00123 #endif
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 #ifndef LUA_MAXCCALLS
00132 #define LUA_MAXCCALLS        200
00133 #endif
00134 
00135 
00136 
00137 #ifndef LUA_MAXCSTACK
00138 #define LUA_MAXCSTACK        2048
00139 #endif
00140 
00141 
00142 
00143 #define MAXSTACK        250
00144 
00145 
00146 
00147 #ifndef MAXVARS
00148 #define MAXVARS 200           
00149 #endif
00150 
00151 
00152 
00153 #ifndef MAXUPVALUES
00154 #define MAXUPVALUES     32
00155 #endif
00156 
00157 
00158 
00159 #ifndef MAXPARAMS
00160 #define MAXPARAMS 100           
00161 #endif
00162 
00163 
00164 
00165 #ifndef MINSTRTABSIZE
00166 #define MINSTRTABSIZE   32
00167 #endif
00168 
00169 
00170 
00171 #ifndef LUA_MINBUFFER
00172 #define LUA_MINBUFFER   32
00173 #endif
00174 
00175 
00176 
00177 
00178 
00179 
00180 #ifndef LUA_MAXPARSERLEVEL
00181 #define LUA_MAXPARSERLEVEL      200
00182 #endif
00183 
00184 
00185 #endif