\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{00001\ }
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#ifndef\ \_MALOC\_BASE\_H\_}}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#define\ \_MALOC\_BASE\_H\_}}
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ \textcolor{comment}{/*}}
\DoxyCodeLine{00048\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00049\ \textcolor{comment}{\ *\ Proper\ ISO-\/C\ header\ setup\ (with\ a\ slight\ "{}signals"{}\ tweek\ for\ setjmp)}}
\DoxyCodeLine{00050\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00051\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00053\ \textcolor{comment}{/*\ Get\ the\ fifteen\ ISO-\/C\ headers\ (CAREFUL:\ POSIX/BSD\ flags\ delicate...)\ */}}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ \textcolor{comment}{/*\ Some\ compilers\ don't\ set\ this\ for\ you;\ GCC\ does\ with\ -\/ansi\ */}}
\DoxyCodeLine{00056\ \textcolor{comment}{/*}}
\DoxyCodeLine{00057\ \textcolor{comment}{\ *\ if\ !defined(\_\_STDC\_\_)}}
\DoxyCodeLine{00058\ \textcolor{comment}{\ *\ \ \ \ define\ \_\_STDC\_\_\ 1}}
\DoxyCodeLine{00059\ \textcolor{comment}{\ *\ endif}}
\DoxyCodeLine{00060\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{comment}{/*\ Old\ Sparc\ compilers\ need\ this\ to\ give\ you\ prototypes\ */}}
\DoxyCodeLine{00063\ \textcolor{comment}{/*}}
\DoxyCodeLine{00064\ \textcolor{comment}{\ *\ if\ !defined(\_\_USE\_FIXED\_PROTOTYPES\_\_)}}
\DoxyCodeLine{00065\ \textcolor{comment}{\ *\ \ \ \ \ define\ \_\_USE\_FIXED\_PROTOTYPES\_\_}}
\DoxyCodeLine{00066\ \textcolor{comment}{\ *\ endif}}
\DoxyCodeLine{00067\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \textcolor{comment}{/*\ Include\ 14\ of\ the\ 15\ ISO-\/C\ headers\ (postponing\ setjmp.h)\ */}}
\DoxyCodeLine{00070\ \textcolor{preprocessor}{\#include\ <assert.h>}}
\DoxyCodeLine{00071\ \textcolor{preprocessor}{\#include\ <ctype.h>}}
\DoxyCodeLine{00072\ \textcolor{preprocessor}{\#include\ <errno.h>}}
\DoxyCodeLine{00073\ \textcolor{preprocessor}{\#include\ <float.h>}}
\DoxyCodeLine{00074\ \textcolor{preprocessor}{\#include\ <limits.h>}}
\DoxyCodeLine{00075\ \textcolor{preprocessor}{\#include\ <locale.h>}}
\DoxyCodeLine{00076\ \textcolor{preprocessor}{\#include\ <math.h>}}
\DoxyCodeLine{00077\ \textcolor{preprocessor}{\#include\ <signal.h>}}
\DoxyCodeLine{00078\ \textcolor{preprocessor}{\#include\ <stdarg.h>}}
\DoxyCodeLine{00079\ \textcolor{preprocessor}{\#include\ <stddef.h>}}
\DoxyCodeLine{00080\ \textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{00081\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{00082\ \textcolor{preprocessor}{\#include\ <string.h>}}
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\#include\ <time.h>}}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00088\ \textcolor{preprocessor}{\#if\ !defined(CLOCKS\_PER\_SEC)}}
\DoxyCodeLine{00089\ \textcolor{preprocessor}{\#\ \ \ define\ CLOCKS\_PER\_SEC\ \ \ \ 60}}
\DoxyCodeLine{00090\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00115\ \textcolor{preprocessor}{\#define\ \_\_FAVOR\_BSD\ }}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00140\ \textcolor{preprocessor}{\#define\ \_BSD\_SIGNALS\ }}
\DoxyCodeLine{00141\ }
\DoxyCodeLine{00142\ \textcolor{comment}{/*\ Now\ finally\ include\ the\ 15th\ header,\ setjmp.h\ */}}
\DoxyCodeLine{00143\ \textcolor{preprocessor}{\#include\ <setjmp.h>}}
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ \textcolor{preprocessor}{\#if\ defined(\_\_cplusplus)}}
\DoxyCodeLine{00147\ \textcolor{preprocessor}{\#\ \ \ define\ VCXX}}
\DoxyCodeLine{00149\ \textcolor{preprocessor}{\#\ \ \ define\ extern\ "{}C"{}}}
\DoxyCodeLine{00150\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00152\ \textcolor{preprocessor}{\#\ \ \ define\ VCC}}
\DoxyCodeLine{00154\ \textcolor{preprocessor}{\#\ \ \ define\ extern}}
\DoxyCodeLine{00155\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00156\ }
\DoxyCodeLine{00157\ \textcolor{comment}{/*}}
\DoxyCodeLine{00158\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00159\ \textcolor{comment}{\ *\ Private\ and\ Public\ type\ modifier\ simulation}}
\DoxyCodeLine{00160\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00161\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00163\ \textcolor{preprocessor}{\#define\ VPRIVATE\ static\ \ \ \ \ \ }}
\DoxyCodeLine{00164\ \textcolor{preprocessor}{\#define\ VPUBLIC\ \ }\textcolor{comment}{/*empty*/}\textcolor{preprocessor}{\ \ \ }}
\DoxyCodeLine{00168\ \textcolor{preprocessor}{\#define\ VWARN1(file,\ lineno)\ (fprintf(stderr,"{}VWARN:\ ASSERTION\ FAILURE!\ filename\ \%s,\ line\ \%u\(\backslash\)n"{},\ (file),\ (lineno)),\ 0)}}
\DoxyCodeLine{00170\ \textcolor{preprocessor}{\#define\ VASSERT1(file,\ lineno)\ (fprintf(stderr,"{}VASSERT:\ ASSERTION\ FAILURE!\ filename\ \%s,\ line\ \%u\(\backslash\)n"{},\ (file),\ (lineno)),\ exit(1),\ 0)}}
\DoxyCodeLine{00172\ \textcolor{preprocessor}{\#define\ VASSERT2(file,\ lineno)\ (fprintf(stderr,"{}VASSERT:\ ASSERTION\ FAILURE!\ filename\ \%s,\ line\ \%u\(\backslash\)n"{},\ (file),\ (lineno)),\ abort(),\ 0)}}
\DoxyCodeLine{00174\ \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{00175\ }
\DoxyCodeLine{00177\ \textcolor{preprocessor}{\#define\ VWARN(ex)\ \ \ ((void)\ ((ex)\ ?\ 0\ :\ VWARN1(\_\_FILE\_\_,\ \_\_LINE\_\_)))}}
\DoxyCodeLine{00179\ \textcolor{preprocessor}{\#define\ VASSERT(ex)\ ((void)\ ((ex)\ ?\ 0\ :\ VASSERT3(\_\_FILE\_\_,\ \_\_LINE\_\_,\ ex)))}}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ }
\DoxyCodeLine{00183\ \textcolor{preprocessor}{\#define\ VJMPERR0(x)\ if\ (!(x))\ goto\ VERROR0}}
\DoxyCodeLine{00185\ \textcolor{preprocessor}{\#define\ VJMPERR1(x)\ if\ (!(x))\ goto\ VERROR1}}
\DoxyCodeLine{00187\ \textcolor{preprocessor}{\#define\ VJMPERR2(x)\ if\ (!(x))\ goto\ VERROR2}}
\DoxyCodeLine{00189\ \textcolor{preprocessor}{\#define\ VJMPERR3(x)\ if\ (!(x))\ goto\ VERROR3}}
\DoxyCodeLine{00191\ \textcolor{preprocessor}{\#define\ VJMPERR4(x)\ if\ (!(x))\ goto\ VERROR4}}
\DoxyCodeLine{00193\ \textcolor{preprocessor}{\#define\ VJMPERR5(x)\ if\ (!(x))\ goto\ VERROR5}}
\DoxyCodeLine{00195\ \textcolor{preprocessor}{\#define\ VJMPERR6(x)\ if\ (!(x))\ goto\ VERROR6}}
\DoxyCodeLine{00197\ \textcolor{preprocessor}{\#define\ VJMPERR7(x)\ if\ (!(x))\ goto\ VERROR7}}
\DoxyCodeLine{00199\ \textcolor{preprocessor}{\#define\ VJMPERR8(x)\ if\ (!(x))\ goto\ VERROR8}}
\DoxyCodeLine{00201\ \textcolor{preprocessor}{\#define\ VJMPERR9(x)\ if\ (!(x))\ goto\ VERROR9}}
\DoxyCodeLine{00202\ }
\DoxyCodeLine{00203\ \textcolor{comment}{/*}}
\DoxyCodeLine{00204\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00205\ \textcolor{comment}{\ *\ Global\ constants}}
\DoxyCodeLine{00206\ \textcolor{comment}{\ *\ ***************************************************************************}}
\DoxyCodeLine{00207\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00208\ }
\DoxyCodeLine{00210\ \textcolor{preprocessor}{\#define\ VPI\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 3.14159265358979323846}}
\DoxyCodeLine{00212\ \textcolor{preprocessor}{\#define\ VLARGE\ \ \ \ \ \ \ \ \ \ \ \ \ 1.0e+9\ \ \ }}
\DoxyCodeLine{00214\ \textcolor{preprocessor}{\#define\ VSMALL\ \ \ \ \ \ \ \ \ \ \ \ \ 1.0e-\/9}}
\DoxyCodeLine{00216\ \textcolor{preprocessor}{\#define\ VVLARGE\ \ \ \ \ \ \ \ \ \ \ \ 1.0e+15}}
\DoxyCodeLine{00218\ \textcolor{preprocessor}{\#define\ VVSMALL\ \ \ \ \ \ \ \ \ \ \ \ 1.0e-\/15}}
\DoxyCodeLine{00220\ \textcolor{preprocessor}{\#define\ VPRTKEY\ \ \ \ \ \ \ \ \ \ \ \ 10000}}
\DoxyCodeLine{00221\ }
\DoxyCodeLine{00223\ \textcolor{preprocessor}{\#define\ VPTRSIZE\ \ \ \ \ \ \ \ \ \ \ 4}}
\DoxyCodeLine{00225\ \textcolor{preprocessor}{\#define\ VMAX\_ARGNUM\ \ \ \ \ \ \ \ 50}}
\DoxyCodeLine{00227\ \textcolor{preprocessor}{\#define\ VMAX\_ARGLEN\ \ \ \ \ \ \ \ 1024}}
\DoxyCodeLine{00229\ \textcolor{preprocessor}{\#define\ VMAX\_BUFSIZE\ \ \ \ \ \ \ 8192}}
\DoxyCodeLine{00230\ }
\DoxyCodeLine{00231\ \textcolor{comment}{/*\ }}
\DoxyCodeLine{00232\ \textcolor{comment}{\ *\ \#define\ \ VMAX\_OBJECTS\ \ \ \ \ \ 16777216\ \ \ \ \ //(1<<24)\ =\ 2\string^24}}
\DoxyCodeLine{00233\ \textcolor{comment}{\ *\ \#define\ \ VBLOCK\_POWER\ \ \ \ \ \ 12}}
\DoxyCodeLine{00234\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00235\ }
\DoxyCodeLine{00237\ \textcolor{preprocessor}{\#define\ VMAX\_OBJECTS\ \ \ \ \ \ \ 1073741824\ \ \ \ }\textcolor{comment}{/*\ (1<<31)\ =\ 2\string^31\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00239\ \textcolor{preprocessor}{\#define\ VBLOCK\_POWER\ \ \ \ \ \ \ 14}}
\DoxyCodeLine{00240\ }
\DoxyCodeLine{00242\ \textcolor{preprocessor}{\#define\ VNULL\ \ \ \ \ \ \ \ \ \ \ \ \ \ NULL}}
\DoxyCodeLine{00244\ \textcolor{preprocessor}{\#define\ VINULL\ \ \ \ \ \ \ \ \ \ \ \ \ -\/1}}
\DoxyCodeLine{00246\ \textcolor{preprocessor}{\#define\ VTRUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ 1}}
\DoxyCodeLine{00248\ \textcolor{preprocessor}{\#define\ VFALSE\ \ \ \ \ \ \ \ \ \ \ \ \ 0}}
\DoxyCodeLine{00250\ \textcolor{preprocessor}{\#define\ VSTDMODE\ \ \ \ \ \ \ \ \ \ \ 0600}}
\DoxyCodeLine{00251\ }
\DoxyCodeLine{00253\ \textcolor{preprocessor}{\#define\ VNULL\_STRING\ \ \ \ \ \ \ "{}\(\backslash\)0"{}}}
\DoxyCodeLine{00255\ \textcolor{preprocessor}{\#define\ VBLANK\_STRING\ \ \ \ \ \ "{}\ "{}}}
\DoxyCodeLine{00257\ \textcolor{preprocessor}{\#define\ VNEWLINE\_STRING\ \ \ \ "{}\(\backslash\)n"{}}}
\DoxyCodeLine{00258\ }
\DoxyCodeLine{00260\ \textcolor{preprocessor}{\#define\ VNULL\_SYMBOL\ \ \ \ \ \ \ '\(\backslash\)0'}}
\DoxyCodeLine{00262\ \textcolor{preprocessor}{\#define\ VBLANK\_SYMBOL\ \ \ \ \ \ '\ '}}
\DoxyCodeLine{00264\ \textcolor{preprocessor}{\#define\ VNEWLINE\_SYMBOL\ \ \ \ '\(\backslash\)n'}}
\DoxyCodeLine{00266\ \textcolor{preprocessor}{\#define\ VRDIN\_SYMBOL\ \ \ \ \ \ \ '<'}}
\DoxyCodeLine{00268\ \textcolor{preprocessor}{\#define\ VRDOUT\_SYMBOL\ \ \ \ \ \ '>'}}
\DoxyCodeLine{00270\ \textcolor{preprocessor}{\#define\ VPIPE\_SYMBOL\ \ \ \ \ \ \ '|'}}
\DoxyCodeLine{00272\ \textcolor{preprocessor}{\#define\ VDELIM\_SET\ \ \ \ \ \ \ \ \ "{}\ ><|\&"{}}}
\DoxyCodeLine{00273\ }
\DoxyCodeLine{00274\ }
\DoxyCodeLine{00276\ \textcolor{preprocessor}{\#define\ VABS(x)\ \ \ \ \ \ \ \ \ \ \ \ ((x)\ >=\ 0\ ?\ (x)\ :\ -\/(x))}}
\DoxyCodeLine{00278\ \textcolor{preprocessor}{\#define\ VMIN2(x,y)\ \ \ \ \ \ \ \ \ ((x)\ <=\ (y)\ ?\ (x)\ :\ (y))}}
\DoxyCodeLine{00280\ \textcolor{preprocessor}{\#define\ VMAX2(x,y)\ \ \ \ \ \ \ \ \ ((x)\ >=\ (y)\ ?\ (x)\ :\ (y))}}
\DoxyCodeLine{00282\ \textcolor{preprocessor}{\#define\ VSIGN(x,y)\ \ \ \ \ \ \ \ \ ((y)\ >=\ 0\ ?\ (VABS(x))\ :\ (-\/VABS(x)))}}
\DoxyCodeLine{00283\ }
\DoxyCodeLine{00285\ \textcolor{preprocessor}{\#define\ VODD(x)\ \ \ \ \ \ \ \ \ \ \ \ ((x)\&1)}}
\DoxyCodeLine{00287\ \textcolor{preprocessor}{\#define\ VEVEN(x)\ \ \ \ \ \ \ \ \ \ \ (!((x)\&1))}}
\DoxyCodeLine{00289\ \textcolor{preprocessor}{\#define\ VZERO(x)\ \ \ \ \ \ \ \ \ \ \ ((x)==0)}}
\DoxyCodeLine{00291\ \textcolor{preprocessor}{\#define\ VPOS(x)\ \ \ \ \ \ \ \ \ \ \ \ ((x)>0)}}
\DoxyCodeLine{00293\ \textcolor{preprocessor}{\#define\ VNEG(x)\ \ \ \ \ \ \ \ \ \ \ \ ((x)<0)}}
\DoxyCodeLine{00295\ \textcolor{preprocessor}{\#define\ VEVENP(x)\ \ \ \ \ \ \ \ \ \ (VEVEN(x)\ \&\&\ VPOS(x))}}
\DoxyCodeLine{00297\ \textcolor{preprocessor}{\#define\ VEVENN(x)\ \ \ \ \ \ \ \ \ \ (VEVEN(x)\ \&\&\ VNEG(x))}}
\DoxyCodeLine{00298\ }
\DoxyCodeLine{00300\ \textcolor{preprocessor}{\#define\ VSQRT(x)\ \ \ \ \ \ \ \ \ \ \ (sqrt(x))}}
\DoxyCodeLine{00302\ \textcolor{preprocessor}{\#define\ VSQR(x)\ \ \ \ \ \ \ \ \ \ \ \ ((x)*(x))}}
\DoxyCodeLine{00304\ \textcolor{preprocessor}{\#define\ VSIN(x)\ \ \ \ \ \ \ \ \ \ \ \ (sin(x))}}
\DoxyCodeLine{00306\ \textcolor{preprocessor}{\#define\ VCOS(x)\ \ \ \ \ \ \ \ \ \ \ \ (cos(x))}}
\DoxyCodeLine{00308\ \textcolor{preprocessor}{\#define\ VTAN(x)\ \ \ \ \ \ \ \ \ \ \ \ (tan(x))}}
\DoxyCodeLine{00310\ \textcolor{preprocessor}{\#define\ VASIN(x)\ \ \ \ \ \ \ \ \ \ \ (asin(x))}}
\DoxyCodeLine{00312\ \textcolor{preprocessor}{\#define\ VACOS(x)\ \ \ \ \ \ \ \ \ \ \ (acos(x))}}
\DoxyCodeLine{00314\ \textcolor{preprocessor}{\#define\ VATAN(x)\ \ \ \ \ \ \ \ \ \ \ (atan(x))}}
\DoxyCodeLine{00316\ \textcolor{preprocessor}{\#define\ VSINH(x)\ \ \ \ \ \ \ \ \ \ \ (sinh(x))}}
\DoxyCodeLine{00318\ \textcolor{preprocessor}{\#define\ VCOSH(x)\ \ \ \ \ \ \ \ \ \ \ (cosh(x))}}
\DoxyCodeLine{00320\ \textcolor{preprocessor}{\#define\ VTANH(x)\ \ \ \ \ \ \ \ \ \ \ (tanh(x))}}
\DoxyCodeLine{00322\ \textcolor{preprocessor}{\#define\ VEXP(x)\ \ \ \ \ \ \ \ \ \ \ \ (exp(x))}}
\DoxyCodeLine{00324\ \textcolor{preprocessor}{\#define\ VLOG(x)\ \ \ \ \ \ \ \ \ \ \ \ (log(x))}}
\DoxyCodeLine{00326\ \textcolor{preprocessor}{\#define\ VPOW(x,y)\ \ \ \ \ \ \ \ \ \ (pow(x,y))}}
\DoxyCodeLine{00328\ \textcolor{preprocessor}{\#define\ VRINT(x)\ \ \ \ \ \ \ \ \ \ \ ((int)(floor((x)+0.5)))}}
\DoxyCodeLine{00329\ }
\DoxyCodeLine{00331\ \textcolor{preprocessor}{\#define\ VRAND\ \ \ \ \ \ \ \ \ \ \ \ \ \ (rand())}}
\DoxyCodeLine{00333\ \textcolor{preprocessor}{\#define\ VRANDMAX\ \ \ \ \ \ \ \ \ \ \ (RAND\_MAX)}}
\DoxyCodeLine{00334\ }
\DoxyCodeLine{00338\ \textcolor{preprocessor}{\#if\ 1}}
\DoxyCodeLine{00339\ \textcolor{preprocessor}{\#\ \ \ define\ VINLINE\_MALOC}}
\DoxyCodeLine{00340\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00341\ }
\DoxyCodeLine{00342\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ \_MALOC\_BASE\_H\_\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00343\ }

\end{DoxyCode}
