\hypertarget{comtool_8c}{}\doxysection{comtool.\+c File Reference}
\label{comtool_8c}\index{comtool.c@{comtool.c}}
{\ttfamily \#include \char`\"{}form3.\+h\char`\"{}}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{comtool_8c_ad91faf677174dfde886e00d7e85a061d}{inicbufs}} (VOID)
\item 
void \mbox{\hyperlink{comtool_8c_a538e21a98fbce59e0d5e5346e33c5848}{finishcbuf}} (WORD num)
\item 
void \mbox{\hyperlink{comtool_8c_ad6f6e76a3969acee0be0a3c9a7c2a36a}{clearcbuf}} (WORD num)
\item 
WORD $\ast$ \mbox{\hyperlink{comtool_8c_a97f356ab7256863a34ac5bccfbbcb14f}{Double\+Cbuffer}} (int num, WORD $\ast$w, int par)
\item 
WORD $\ast$ \mbox{\hyperlink{comtool_8c_adf4d723498946f35cbf6df069a227317}{Add\+LHS}} (int num)
\item 
WORD $\ast$ \mbox{\hyperlink{comtool_8c_aab7acff43928a668734d4c39c01fbdb4}{Add\+RHS}} (int num, int type)
\item 
int \mbox{\hyperlink{comtool_8c_a15c25c5aa0a8c7ea9d0b2a0b9ec9d0a3}{Add\+NtoL}} (int n, WORD $\ast$array)
\item 
int \mbox{\hyperlink{comtool_8c_ab9540604e742ad4b787c1bd5b93484b0}{Add\+NtoC}} (int bufnum, int n, WORD $\ast$array, int par)
\item 
\mbox{\Hypertarget{comtool_8c_a01d0f9282997a78caf6d17b28da159a4}\label{comtool_8c_a01d0f9282997a78caf6d17b28da159a4}} 
int {\bfseries Ins\+Tree} (int bufnum, int h)
\item 
\mbox{\Hypertarget{comtool_8c_a41b3eff39d7eee708e54e86b558a5692}\label{comtool_8c_a41b3eff39d7eee708e54e86b558a5692}} 
int {\bfseries Find\+Tree} (int bufnum, WORD $\ast$subexpr)
\item 
\mbox{\Hypertarget{comtool_8c_a48f1cbcdacaef041fb126cee4d257630}\label{comtool_8c_a48f1cbcdacaef041fb126cee4d257630}} 
void {\bfseries Redo\+Tree} (\mbox{\hyperlink{structs_8h_a17f36373e075505ec8700234601e6903}{CBUF}} $\ast$C, int size)
\item 
\mbox{\Hypertarget{comtool_8c_a66267581e7972b8367d99c81db574989}\label{comtool_8c_a66267581e7972b8367d99c81db574989}} 
void {\bfseries Clear\+Tree} (int i)
\item 
int \mbox{\hyperlink{comtool_8c_aaa0838b0fca4643ea3d44dbde8341fb2}{Ini\+Fbuffer}} (WORD bufnum)
\item 
\mbox{\Hypertarget{comtool_8c_a603218c10b79cb8e8a8b7549e6c6ba27}\label{comtool_8c_a603218c10b79cb8e8a8b7549e6c6ba27}} 
LONG {\bfseries numcommute} (WORD $\ast$terms, LONG $\ast$numterms)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Utility routines for the compiler. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{comtool_8c_ad91faf677174dfde886e00d7e85a061d}\label{comtool_8c_ad91faf677174dfde886e00d7e85a061d}} 
\index{comtool.c@{comtool.c}!inicbufs@{inicbufs}}
\index{inicbufs@{inicbufs}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{inicbufs()}{inicbufs()}}
{\footnotesize\ttfamily int inicbufs (\begin{DoxyParamCaption}\item[{VOID}]{ }\end{DoxyParamCaption})}

Creates a new compiler buffer and returns its ID number.

\begin{DoxyReturn}{Returns}
The ID number for the new compiler buffer. 
\end{DoxyReturn}


Definition at line 47 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_a538e21a98fbce59e0d5e5346e33c5848}\label{comtool_8c_a538e21a98fbce59e0d5e5346e33c5848}} 
\index{comtool.c@{comtool.c}!finishcbuf@{finishcbuf}}
\index{finishcbuf@{finishcbuf}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{finishcbuf()}{finishcbuf()}}
{\footnotesize\ttfamily void finishcbuf (\begin{DoxyParamCaption}\item[{WORD}]{num }\end{DoxyParamCaption})}

Frees a compiler buffer.


\begin{DoxyParams}{Parameters}
{\em num} & The ID number for the buffer to be freed. \\
\hline
\end{DoxyParams}


Definition at line 89 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_ad6f6e76a3969acee0be0a3c9a7c2a36a}\label{comtool_8c_ad6f6e76a3969acee0be0a3c9a7c2a36a}} 
\index{comtool.c@{comtool.c}!clearcbuf@{clearcbuf}}
\index{clearcbuf@{clearcbuf}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{clearcbuf()}{clearcbuf()}}
{\footnotesize\ttfamily void clearcbuf (\begin{DoxyParamCaption}\item[{WORD}]{num }\end{DoxyParamCaption})}

Clears contents in a compiler buffer.


\begin{DoxyParams}{Parameters}
{\em num} & The ID number for the buffer to be cleared. \\
\hline
\end{DoxyParams}


Definition at line 116 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_a97f356ab7256863a34ac5bccfbbcb14f}\label{comtool_8c_a97f356ab7256863a34ac5bccfbbcb14f}} 
\index{comtool.c@{comtool.c}!DoubleCbuffer@{DoubleCbuffer}}
\index{DoubleCbuffer@{DoubleCbuffer}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{DoubleCbuffer()}{DoubleCbuffer()}}
{\footnotesize\ttfamily WORD$\ast$ Double\+Cbuffer (\begin{DoxyParamCaption}\item[{int}]{num,  }\item[{WORD $\ast$}]{w,  }\item[{int}]{par }\end{DoxyParamCaption})}

Doubles a compiler buffer.


\begin{DoxyParams}{Parameters}
{\em num} & The ID number for the buffer to be doubled. \\
\hline
{\em w} & The pointer to the end (exclusive) of the current buffer. The contents in the range of \mbox{[}cbuf\mbox{[}num\mbox{]}.Buffer,w) will be kept. \\
\hline
\end{DoxyParams}


Definition at line 143 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_adf4d723498946f35cbf6df069a227317}\label{comtool_8c_adf4d723498946f35cbf6df069a227317}} 
\index{comtool.c@{comtool.c}!AddLHS@{AddLHS}}
\index{AddLHS@{AddLHS}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{AddLHS()}{AddLHS()}}
{\footnotesize\ttfamily WORD$\ast$ Add\+LHS (\begin{DoxyParamCaption}\item[{int}]{num }\end{DoxyParamCaption})}

Adds an LHS to a compiler buffer and returns the pointer to a buffer for the new LHS.


\begin{DoxyParams}{Parameters}
{\em num} & The ID number for the buffer to get another LHS. \\
\hline
\end{DoxyParams}


Definition at line 188 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_aab7acff43928a668734d4c39c01fbdb4}\label{comtool_8c_aab7acff43928a668734d4c39c01fbdb4}} 
\index{comtool.c@{comtool.c}!AddRHS@{AddRHS}}
\index{AddRHS@{AddRHS}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{AddRHS()}{AddRHS()}}
{\footnotesize\ttfamily WORD$\ast$ Add\+RHS (\begin{DoxyParamCaption}\item[{int}]{num,  }\item[{int}]{type }\end{DoxyParamCaption})}

Adds an RHS to a compiler buffer and returns the pointer to a buffer for the new RHS.


\begin{DoxyParams}{Parameters}
{\em num} & The ID number for the buffer to get another RHS. \\
\hline
{\em type} & If 0, the subexpression tree will be reallocated. \\
\hline
\end{DoxyParams}


Definition at line 214 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_a15c25c5aa0a8c7ea9d0b2a0b9ec9d0a3}\label{comtool_8c_a15c25c5aa0a8c7ea9d0b2a0b9ec9d0a3}} 
\index{comtool.c@{comtool.c}!AddNtoL@{AddNtoL}}
\index{AddNtoL@{AddNtoL}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{AddNtoL()}{AddNtoL()}}
{\footnotesize\ttfamily int Add\+NtoL (\begin{DoxyParamCaption}\item[{int}]{n,  }\item[{WORD $\ast$}]{array }\end{DoxyParamCaption})}

Adds an LHS with the given data to the current compiler buffer.


\begin{DoxyParams}{Parameters}
{\em n} & The length of the data. \\
\hline
{\em array} & The data to be added. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if succeeds. 
\end{DoxyReturn}


Definition at line 288 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_ab9540604e742ad4b787c1bd5b93484b0}\label{comtool_8c_ab9540604e742ad4b787c1bd5b93484b0}} 
\index{comtool.c@{comtool.c}!AddNtoC@{AddNtoC}}
\index{AddNtoC@{AddNtoC}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{AddNtoC()}{AddNtoC()}}
{\footnotesize\ttfamily int Add\+NtoC (\begin{DoxyParamCaption}\item[{int}]{bufnum,  }\item[{int}]{n,  }\item[{WORD $\ast$}]{array,  }\item[{int}]{par }\end{DoxyParamCaption})}

Adds the given data to the last LHS/\+RHS in a compiler buffer.


\begin{DoxyParams}{Parameters}
{\em bufnum} & The ID number for the buffer where the data will be added. \\
\hline
{\em n} & The length of the data. \\
\hline
{\em array} & The data to be added. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if succeeds. 
\end{DoxyReturn}


Definition at line 317 of file comtool.\+c.

\mbox{\Hypertarget{comtool_8c_aaa0838b0fca4643ea3d44dbde8341fb2}\label{comtool_8c_aaa0838b0fca4643ea3d44dbde8341fb2}} 
\index{comtool.c@{comtool.c}!IniFbuffer@{IniFbuffer}}
\index{IniFbuffer@{IniFbuffer}!comtool.c@{comtool.c}}
\doxysubsubsection{\texorpdfstring{IniFbuffer()}{IniFbuffer()}}
{\footnotesize\ttfamily int Ini\+Fbuffer (\begin{DoxyParamCaption}\item[{WORD}]{bufnum }\end{DoxyParamCaption})}

Initialize a factorization cache buffer. We set the size of the rhs and boomlijst buffers immediately to their final values. 

Definition at line 614 of file comtool.\+c.

