\doxysection{maloc\+\_\+base.\+h}
\label{a00002_source}\index{maloc\_base.h@{maloc\_base.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{44 \textcolor{preprocessor}{\#ifndef \_MALOC\_BASE\_H\_}}
\DoxyCodeLine{45 \textcolor{preprocessor}{\#define \_MALOC\_BASE\_H\_}}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 \textcolor{comment}{/*}}
\DoxyCodeLine{48 \textcolor{comment}{ * ***************************************************************************}}
\DoxyCodeLine{49 \textcolor{comment}{ * Proper ISO-\/C header setup (with a slight "{}signals"{} tweek for setjmp)}}
\DoxyCodeLine{50 \textcolor{comment}{ * ***************************************************************************}}
\DoxyCodeLine{51 \textcolor{comment}{ */}}
\DoxyCodeLine{52 }
\DoxyCodeLine{53 \textcolor{comment}{/* Get the fifteen ISO-\/C headers (CAREFUL: POSIX/BSD flags delicate...) */}}
\DoxyCodeLine{54 }
\DoxyCodeLine{55 \textcolor{comment}{/* Some compilers don't set this for you; GCC does with -\/ansi */}}
\DoxyCodeLine{56 \textcolor{comment}{/*}}
\DoxyCodeLine{57 \textcolor{comment}{ * if !defined(\_\_STDC\_\_)}}
\DoxyCodeLine{58 \textcolor{comment}{ *    define \_\_STDC\_\_ 1}}
\DoxyCodeLine{59 \textcolor{comment}{ * endif}}
\DoxyCodeLine{60 \textcolor{comment}{ */}}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \textcolor{comment}{/* Old Sparc compilers need this to give you prototypes */}}
\DoxyCodeLine{63 \textcolor{comment}{/*}}
\DoxyCodeLine{64 \textcolor{comment}{ * if !defined(\_\_USE\_FIXED\_PROTOTYPES\_\_)}}
\DoxyCodeLine{65 \textcolor{comment}{ *     define \_\_USE\_FIXED\_PROTOTYPES\_\_}}
\DoxyCodeLine{66 \textcolor{comment}{ * endif}}
\DoxyCodeLine{67 \textcolor{comment}{ */}}
\DoxyCodeLine{68 }
\DoxyCodeLine{69 \textcolor{comment}{/* Include 14 of the 15 ISO-\/C headers (postponing setjmp.h) */}}
\DoxyCodeLine{70 \textcolor{preprocessor}{\#include <assert.h>}}
\DoxyCodeLine{71 \textcolor{preprocessor}{\#include <ctype.h>}}
\DoxyCodeLine{72 \textcolor{preprocessor}{\#include <errno.h>}}
\DoxyCodeLine{73 \textcolor{preprocessor}{\#include <float.h>}}
\DoxyCodeLine{74 \textcolor{preprocessor}{\#include <limits.h>}}
\DoxyCodeLine{75 \textcolor{preprocessor}{\#include <locale.h>}}
\DoxyCodeLine{76 \textcolor{preprocessor}{\#include <math.h>}}
\DoxyCodeLine{77 \textcolor{preprocessor}{\#include <signal.h>}}
\DoxyCodeLine{78 \textcolor{preprocessor}{\#include <stdarg.h>}}
\DoxyCodeLine{79 \textcolor{preprocessor}{\#include <stddef.h>}}
\DoxyCodeLine{80 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{81 \textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{82 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{83 \textcolor{preprocessor}{\#include <time.h>}}
\DoxyCodeLine{84 }
\DoxyCodeLine{88 \textcolor{preprocessor}{\#if !defined(CLOCKS\_PER\_SEC)}}
\DoxyCodeLine{89 \textcolor{preprocessor}{\#   define CLOCKS\_PER\_SEC    60}}
\DoxyCodeLine{90 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{91 }
\DoxyCodeLine{115 \textcolor{preprocessor}{\#define \_\_FAVOR\_BSD }}
\DoxyCodeLine{116 }
\DoxyCodeLine{140 \textcolor{preprocessor}{\#define \_BSD\_SIGNALS }}
\DoxyCodeLine{141 }
\DoxyCodeLine{142 \textcolor{comment}{/* Now finally include the 15th header, setjmp.h */}}
\DoxyCodeLine{143 \textcolor{preprocessor}{\#include <setjmp.h>}}
\DoxyCodeLine{144 }
\DoxyCodeLine{145 \textcolor{preprocessor}{\#if defined(\_\_cplusplus)}}
\DoxyCodeLine{147 \textcolor{preprocessor}{\#   define VCXX}}
\DoxyCodeLine{149 \textcolor{preprocessor}{\#   define extern "{}C"{}}}
\DoxyCodeLine{150 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{152 \textcolor{preprocessor}{\#   define VCC}}
\DoxyCodeLine{154 \textcolor{preprocessor}{\#   define extern}}
\DoxyCodeLine{155 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{156 }
\DoxyCodeLine{157 \textcolor{comment}{/*}}
\DoxyCodeLine{158 \textcolor{comment}{ * ***************************************************************************}}
\DoxyCodeLine{159 \textcolor{comment}{ * Private and Public type modifier simulation}}
\DoxyCodeLine{160 \textcolor{comment}{ * ***************************************************************************}}
\DoxyCodeLine{161 \textcolor{comment}{ */}}
\DoxyCodeLine{162 }
\DoxyCodeLine{163 \textcolor{preprocessor}{\#define VPRIVATE static      }}
\DoxyCodeLine{164 \textcolor{preprocessor}{\#define VPUBLIC  }\textcolor{comment}{/*empty*/}\textcolor{preprocessor}{   }}
\DoxyCodeLine{168 \textcolor{preprocessor}{\#define VWARN1(file, lineno) (fprintf(stderr,"{}VWARN: ASSERTION FAILURE! filename \%s, line \%u\(\backslash\)n"{}}, (file), (lineno)), 0)}
\DoxyCodeLine{170 \textcolor{preprocessor}{\#define VASSERT1(file, lineno) (fprintf(stderr,"{}VASSERT: ASSERTION FAILURE! filename \%s, line \%u\(\backslash\)n"{}}, (file), (lineno)), exit(1), 0)}
\DoxyCodeLine{172 \textcolor{preprocessor}{\#define VASSERT2(file, lineno) (fprintf(stderr,"{}VASSERT: ASSERTION FAILURE! filename \%s, line \%u\(\backslash\)n"{}}, (file), (lineno)), abort(), 0)}
\DoxyCodeLine{174 \textcolor{preprocessor}{\#define VASSERT3(file, lineno, ex) (fprintf(stderr,"{}VASSERT: ASSERTION FAILURE!  filename \%s, line \%u, (\%s)\(\backslash\)n"{}}, (file), (lineno), (\#ex)), abort(), 0)}
\DoxyCodeLine{175 }
\DoxyCodeLine{177 \textcolor{preprocessor}{\#define VWARN(ex)   ((void) ((ex) ? 0 : VWARN1(\_\_FILE\_\_, \_\_LINE\_\_)))}}
\DoxyCodeLine{179 \textcolor{preprocessor}{\#define VASSERT(ex) ((void) ((ex) ? 0 : VASSERT3(\_\_FILE\_\_, \_\_LINE\_\_, ex)))}}
\DoxyCodeLine{180 }
\DoxyCodeLine{181 }
\DoxyCodeLine{183 \textcolor{preprocessor}{\#define VJMPERR0(x) if (!(x)) goto VERROR0}}
\DoxyCodeLine{185 \textcolor{preprocessor}{\#define VJMPERR1(x) if (!(x)) goto VERROR1}}
\DoxyCodeLine{187 \textcolor{preprocessor}{\#define VJMPERR2(x) if (!(x)) goto VERROR2}}
\DoxyCodeLine{189 \textcolor{preprocessor}{\#define VJMPERR3(x) if (!(x)) goto VERROR3}}
\DoxyCodeLine{191 \textcolor{preprocessor}{\#define VJMPERR4(x) if (!(x)) goto VERROR4}}
\DoxyCodeLine{193 \textcolor{preprocessor}{\#define VJMPERR5(x) if (!(x)) goto VERROR5}}
\DoxyCodeLine{195 \textcolor{preprocessor}{\#define VJMPERR6(x) if (!(x)) goto VERROR6}}
\DoxyCodeLine{197 \textcolor{preprocessor}{\#define VJMPERR7(x) if (!(x)) goto VERROR7}}
\DoxyCodeLine{199 \textcolor{preprocessor}{\#define VJMPERR8(x) if (!(x)) goto VERROR8}}
\DoxyCodeLine{201 \textcolor{preprocessor}{\#define VJMPERR9(x) if (!(x)) goto VERROR9}}
\DoxyCodeLine{202 }
\DoxyCodeLine{203 \textcolor{comment}{/*}}
\DoxyCodeLine{204 \textcolor{comment}{ * ***************************************************************************}}
\DoxyCodeLine{205 \textcolor{comment}{ * Global constants}}
\DoxyCodeLine{206 \textcolor{comment}{ * ***************************************************************************}}
\DoxyCodeLine{207 \textcolor{comment}{ */}}
\DoxyCodeLine{208 }
\DoxyCodeLine{210 \textcolor{preprocessor}{\#define VPI                3.14159265358979323846}}
\DoxyCodeLine{212 \textcolor{preprocessor}{\#define VLARGE             1.0e+9   }}
\DoxyCodeLine{214 \textcolor{preprocessor}{\#define VSMALL             1.0e-\/9}}
\DoxyCodeLine{216 \textcolor{preprocessor}{\#define VVLARGE            1.0e+15}}
\DoxyCodeLine{218 \textcolor{preprocessor}{\#define VVSMALL            1.0e-\/15}}
\DoxyCodeLine{220 \textcolor{preprocessor}{\#define VPRTKEY            10000}}
\DoxyCodeLine{221 }
\DoxyCodeLine{223 \textcolor{preprocessor}{\#define VPTRSIZE           4}}
\DoxyCodeLine{225 \textcolor{preprocessor}{\#define VMAX\_ARGNUM        50}}
\DoxyCodeLine{227 \textcolor{preprocessor}{\#define VMAX\_ARGLEN        1024}}
\DoxyCodeLine{229 \textcolor{preprocessor}{\#define VMAX\_BUFSIZE       8192}}
\DoxyCodeLine{230 }
\DoxyCodeLine{231 \textcolor{comment}{/* }}
\DoxyCodeLine{232 \textcolor{comment}{ * \#define  VMAX\_OBJECTS      16777216     //(1<<24) = 2\string^24}}
\DoxyCodeLine{233 \textcolor{comment}{ * \#define  VBLOCK\_POWER      12}}
\DoxyCodeLine{234 \textcolor{comment}{ */}}
\DoxyCodeLine{235 }
\DoxyCodeLine{237 \textcolor{preprocessor}{\#define VMAX\_OBJECTS       1073741824    }\textcolor{comment}{/* (1<<31) = 2\string^31 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{239 \textcolor{preprocessor}{\#define VBLOCK\_POWER       14}}
\DoxyCodeLine{240 }
\DoxyCodeLine{242 \textcolor{preprocessor}{\#define VNULL              NULL}}
\DoxyCodeLine{244 \textcolor{preprocessor}{\#define VINULL             -\/1}}
\DoxyCodeLine{246 \textcolor{preprocessor}{\#define VTRUE              1}}
\DoxyCodeLine{248 \textcolor{preprocessor}{\#define VFALSE             0}}
\DoxyCodeLine{250 \textcolor{preprocessor}{\#define VSTDMODE           0600}}
\DoxyCodeLine{251 }
\DoxyCodeLine{253 \textcolor{preprocessor}{\#define VNULL\_STRING       "{}\(\backslash\)0"{}}}
\DoxyCodeLine{255 \textcolor{preprocessor}{\#define VBLANK\_STRING      "{} "{}}}
\DoxyCodeLine{257 \textcolor{preprocessor}{\#define VNEWLINE\_STRING    "{}\(\backslash\)n"{}}}
\DoxyCodeLine{258 }
\DoxyCodeLine{260 \textcolor{preprocessor}{\#define VNULL\_SYMBOL       '\(\backslash\)0'}}
\DoxyCodeLine{262 \textcolor{preprocessor}{\#define VBLANK\_SYMBOL      ' '}}
\DoxyCodeLine{264 \textcolor{preprocessor}{\#define VNEWLINE\_SYMBOL    '\(\backslash\)n'}}
\DoxyCodeLine{266 \textcolor{preprocessor}{\#define VRDIN\_SYMBOL       '<'}}
\DoxyCodeLine{268 \textcolor{preprocessor}{\#define VRDOUT\_SYMBOL      '>'}}
\DoxyCodeLine{270 \textcolor{preprocessor}{\#define VPIPE\_SYMBOL       '|'}}
\DoxyCodeLine{272 \textcolor{preprocessor}{\#define VDELIM\_SET         "{} ><|\&"{}}}
\DoxyCodeLine{273 }
\DoxyCodeLine{274 }
\DoxyCodeLine{276 \textcolor{preprocessor}{\#define VABS(x)            ((x) >= 0 ? (x) : -\/(x))}}
\DoxyCodeLine{278 \textcolor{preprocessor}{\#define VMIN2(x,y)         ((x) <= (y) ? (x) : (y))}}
\DoxyCodeLine{280 \textcolor{preprocessor}{\#define VMAX2(x,y)         ((x) >= (y) ? (x) : (y))}}
\DoxyCodeLine{282 \textcolor{preprocessor}{\#define VSIGN(x,y)         ((y) >= 0 ? (VABS(x)) : (-\/VABS(x)))}}
\DoxyCodeLine{283 }
\DoxyCodeLine{285 \textcolor{preprocessor}{\#define VODD(x)            ((x)\&1)}}
\DoxyCodeLine{287 \textcolor{preprocessor}{\#define VEVEN(x)           (!((x)\&1))}}
\DoxyCodeLine{289 \textcolor{preprocessor}{\#define VZERO(x)           ((x)==0)}}
\DoxyCodeLine{291 \textcolor{preprocessor}{\#define VPOS(x)            ((x)>0)}}
\DoxyCodeLine{293 \textcolor{preprocessor}{\#define VNEG(x)            ((x)<0)}}
\DoxyCodeLine{295 \textcolor{preprocessor}{\#define VEVENP(x)          (VEVEN(x) \&\& VPOS(x))}}
\DoxyCodeLine{297 \textcolor{preprocessor}{\#define VEVENN(x)          (VEVEN(x) \&\& VNEG(x))}}
\DoxyCodeLine{298 }
\DoxyCodeLine{300 \textcolor{preprocessor}{\#define VSQRT(x)           (sqrt(x))}}
\DoxyCodeLine{302 \textcolor{preprocessor}{\#define VSQR(x)            ((x)*(x))}}
\DoxyCodeLine{304 \textcolor{preprocessor}{\#define VSIN(x)            (sin(x))}}
\DoxyCodeLine{306 \textcolor{preprocessor}{\#define VCOS(x)            (cos(x))}}
\DoxyCodeLine{308 \textcolor{preprocessor}{\#define VTAN(x)            (tan(x))}}
\DoxyCodeLine{310 \textcolor{preprocessor}{\#define VASIN(x)           (asin(x))}}
\DoxyCodeLine{312 \textcolor{preprocessor}{\#define VACOS(x)           (acos(x))}}
\DoxyCodeLine{314 \textcolor{preprocessor}{\#define VATAN(x)           (atan(x))}}
\DoxyCodeLine{316 \textcolor{preprocessor}{\#define VSINH(x)           (sinh(x))}}
\DoxyCodeLine{318 \textcolor{preprocessor}{\#define VCOSH(x)           (cosh(x))}}
\DoxyCodeLine{320 \textcolor{preprocessor}{\#define VTANH(x)           (tanh(x))}}
\DoxyCodeLine{322 \textcolor{preprocessor}{\#define VEXP(x)            (exp(x))}}
\DoxyCodeLine{324 \textcolor{preprocessor}{\#define VLOG(x)            (log(x))}}
\DoxyCodeLine{326 \textcolor{preprocessor}{\#define VPOW(x,y)          (pow(x,y))}}
\DoxyCodeLine{328 \textcolor{preprocessor}{\#define VRINT(x)           ((int)(floor((x)+0.5)))}}
\DoxyCodeLine{329 }
\DoxyCodeLine{331 \textcolor{preprocessor}{\#define VRAND              (rand())}}
\DoxyCodeLine{333 \textcolor{preprocessor}{\#define VRANDMAX           (RAND\_MAX)}}
\DoxyCodeLine{334 }
\DoxyCodeLine{338 \textcolor{preprocessor}{\#if 1}}
\DoxyCodeLine{339 \textcolor{preprocessor}{\#   define VINLINE\_MALOC}}
\DoxyCodeLine{340 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{341 }
\DoxyCodeLine{342 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_MALOC\_BASE\_H\_ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{343 }

\end{DoxyCode}
