\hypertarget{tools_8c}{}\doxysection{tools.\+c File Reference}
\label{tools_8c}\index{tools.c@{tools.c}}
{\ttfamily \#include \char`\"{}form3.\+h\char`\"{}}\newline
{\ttfamily \#include $<$sys/timeb.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{tools_8c_a130af1e561f5f8acdaff771186f229c1}\label{tools_8c_a130af1e561f5f8acdaff771186f229c1}} 
\#define {\bfseries FILLVALUE}~0
\item 
\mbox{\Hypertarget{tools_8c_a28db5d9f5cd012c049e19d0cc5caabb6}\label{tools_8c_a28db5d9f5cd012c049e19d0cc5caabb6}} 
\#define {\bfseries COPYFILEBUFSIZE}~40960L
\item 
\#define \mbox{\hyperlink{tools_8c_a0b42f28a6226ba48102277c981cbea2c}{TERMMEMSTARTNUM}}~16
\item 
\mbox{\Hypertarget{tools_8c_a99dc1b80d447a9c4c66e09ade7a17bd2}\label{tools_8c_a99dc1b80d447a9c4c66e09ade7a17bd2}} 
\#define {\bfseries TERMEXTRAWORDS}~10
\item 
\#define \mbox{\hyperlink{tools_8c_ab4b11a776f82348e86e6fc5c3e3d5461}{NUMBERMEMSTARTNUM}}~16
\item 
\mbox{\Hypertarget{tools_8c_a346491ac850a06de272064bd704c992b}\label{tools_8c_a346491ac850a06de272064bd704c992b}} 
\#define {\bfseries NUMBEREXTRAWORDS}~10L
\item 
\#define {\bfseries DODOUBLE}(x)
\item 
\#define {\bfseries DOEXPAND}(x)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{tools_8c_ae9e47fa0db7d2861aa758a0eee900ea1}\label{tools_8c_ae9e47fa0db7d2861aa758a0eee900ea1}} 
UBYTE $\ast$ {\bfseries Load\+Input\+File} (UBYTE $\ast$filename, int type)
\item 
\mbox{\Hypertarget{tools_8c_a5295da380fc71fefdcd03d838daa4ad4}\label{tools_8c_a5295da380fc71fefdcd03d838daa4ad4}} 
UBYTE {\bfseries Read\+From\+Stream} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream)
\item 
\mbox{\Hypertarget{tools_8c_a4d55c0a2d541007fbfe8fbfe9aa36719}\label{tools_8c_a4d55c0a2d541007fbfe8fbfe9aa36719}} 
UBYTE {\bfseries Get\+From\+Stream} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream)
\item 
\mbox{\Hypertarget{tools_8c_a17a07a7c58f1df657f61657cc70665cb}\label{tools_8c_a17a07a7c58f1df657f61657cc70665cb}} 
UBYTE {\bfseries Look\+In\+Stream} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream)
\item 
\mbox{\Hypertarget{tools_8c_ad77c2b0869b870fdd4631a0a1f8c9c05}\label{tools_8c_ad77c2b0869b870fdd4631a0a1f8c9c05}} 
\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$ {\bfseries Open\+Stream} (UBYTE $\ast$name, int type, int prevarmode, int raiselow)
\item 
\mbox{\Hypertarget{tools_8c_a541863af1da050fc519af4c8a18c7b38}\label{tools_8c_a541863af1da050fc519af4c8a18c7b38}} 
int {\bfseries Locate\+File} (UBYTE $\ast$$\ast$name, int type)
\item 
\mbox{\Hypertarget{tools_8c_a0ce173ad89f888f457182224dd2e9dc7}\label{tools_8c_a0ce173ad89f888f457182224dd2e9dc7}} 
\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$ {\bfseries Close\+Stream} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream)
\item 
\mbox{\Hypertarget{tools_8c_a9080e2a8a6e23194312e66b41e929814}\label{tools_8c_a9080e2a8a6e23194312e66b41e929814}} 
\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$ {\bfseries Create\+Stream} (UBYTE $\ast$where)
\item 
\mbox{\Hypertarget{tools_8c_a32208a91da3905111cdd63018b45a915}\label{tools_8c_a32208a91da3905111cdd63018b45a915}} 
LONG {\bfseries Get\+Stream\+Position} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream)
\item 
\mbox{\Hypertarget{tools_8c_ae01476ebaba71b490b731d13a615de21}\label{tools_8c_ae01476ebaba71b490b731d13a615de21}} 
VOID {\bfseries Position\+Stream} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream, LONG position)
\item 
\mbox{\Hypertarget{tools_8c_a8b5b795916caaf26f868ba1738012098}\label{tools_8c_a8b5b795916caaf26f868ba1738012098}} 
int {\bfseries Reverse\+Statements} (\mbox{\hyperlink{structs_8h_a6f14dca37b8d662e4c7d6ac0499718ef}{STREAM}} $\ast$stream)
\item 
\mbox{\Hypertarget{tools_8c_ae20b044a39b37eb0b3cf10e4dd61d84d}\label{tools_8c_ae20b044a39b37eb0b3cf10e4dd61d84d}} 
VOID {\bfseries Start\+Files} ()
\item 
\mbox{\Hypertarget{tools_8c_a4a5e4cc64d41a1270c20d924f6e4e1dd}\label{tools_8c_a4a5e4cc64d41a1270c20d924f6e4e1dd}} 
int {\bfseries Open\+File} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_aa2c3c5a0c14b674b7e9ca70af75a7aea}\label{tools_8c_aa2c3c5a0c14b674b7e9ca70af75a7aea}} 
int {\bfseries Open\+Add\+File} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_a8e8affb09ba4833ad133a4dec45c0dc0}\label{tools_8c_a8e8affb09ba4833ad133a4dec45c0dc0}} 
int {\bfseries Re\+Open\+File} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_a8643727c33a280e292b44423b85928e3}\label{tools_8c_a8643727c33a280e292b44423b85928e3}} 
int {\bfseries Create\+File} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_a7b4a0482162c3d659ad4aab67a6efd46}\label{tools_8c_a7b4a0482162c3d659ad4aab67a6efd46}} 
int {\bfseries Create\+Log\+File} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_aac90984b10e932b306aae35a0a2e9da1}\label{tools_8c_aac90984b10e932b306aae35a0a2e9da1}} 
VOID {\bfseries Close\+File} (int handle)
\item 
int \mbox{\hyperlink{tools_8c_a96ec928b26a63c6dcdadbd111829f0a6}{Copy\+File}} (char $\ast$source, char $\ast$dest)
\item 
\mbox{\Hypertarget{tools_8c_a64a12deafa8f949099784091831088db}\label{tools_8c_a64a12deafa8f949099784091831088db}} 
int {\bfseries Create\+Handle} ()
\item 
\mbox{\Hypertarget{tools_8c_a54c9057fab9000229828dab4f5664201}\label{tools_8c_a54c9057fab9000229828dab4f5664201}} 
LONG {\bfseries Read\+File} (int handle, UBYTE $\ast$buffer, LONG size)
\item 
\mbox{\Hypertarget{tools_8c_a39ccd7c7a0f5a0ac612a67300515c87f}\label{tools_8c_a39ccd7c7a0f5a0ac612a67300515c87f}} 
LONG {\bfseries Read\+Pos\+File} (PHEAD \mbox{\hyperlink{structs_8h_a36b8571cff77310201b5cf441466ba83}{FILEHANDLE}} $\ast$fi, UBYTE $\ast$buffer, LONG size, \mbox{\hyperlink{structPoSiTiOn}{POSITION}} $\ast$pos)
\item 
\mbox{\Hypertarget{tools_8c_aaa9dfabd16116b505066aa1969185618}\label{tools_8c_aaa9dfabd16116b505066aa1969185618}} 
LONG {\bfseries Write\+File\+To\+File} (int handle, UBYTE $\ast$buffer, LONG size)
\item 
\mbox{\Hypertarget{tools_8c_a3ab338426c8fd306a8e9e6e7bcbfd459}\label{tools_8c_a3ab338426c8fd306a8e9e6e7bcbfd459}} 
VOID {\bfseries Seek\+File} (int handle, \mbox{\hyperlink{structPoSiTiOn}{POSITION}} $\ast$offset, int origin)
\item 
\mbox{\Hypertarget{tools_8c_a399abcef84e94717ad0c2f0f8a9aa2e7}\label{tools_8c_a399abcef84e94717ad0c2f0f8a9aa2e7}} 
LONG {\bfseries Tell\+File} (int handle)
\item 
\mbox{\Hypertarget{tools_8c_aeacbe58623159cadc41a7686a1856301}\label{tools_8c_aeacbe58623159cadc41a7686a1856301}} 
VOID {\bfseries TELLFILE} (int handle, \mbox{\hyperlink{structPoSiTiOn}{POSITION}} $\ast$position)
\item 
\mbox{\Hypertarget{tools_8c_a2ad040ade58cb9001bde5ddf844f69db}\label{tools_8c_a2ad040ade58cb9001bde5ddf844f69db}} 
void {\bfseries Flush\+File} (int handle)
\item 
\mbox{\Hypertarget{tools_8c_a6109873df4eac8a58f88a4e0f68d8528}\label{tools_8c_a6109873df4eac8a58f88a4e0f68d8528}} 
int {\bfseries Get\+Pos\+File} (int handle, fpos\+\_\+t $\ast$pospointer)
\item 
\mbox{\Hypertarget{tools_8c_a28b8bb53dc718a71b91cc0f5196337f0}\label{tools_8c_a28b8bb53dc718a71b91cc0f5196337f0}} 
int {\bfseries Set\+Pos\+File} (int handle, fpos\+\_\+t $\ast$pospointer)
\item 
\mbox{\Hypertarget{tools_8c_a1aa69c3e000a64b6026b1fccf6671dc5}\label{tools_8c_a1aa69c3e000a64b6026b1fccf6671dc5}} 
VOID {\bfseries Synch\+File} (int handle)
\item 
\mbox{\Hypertarget{tools_8c_a4c6fd3b92d66ef637411b5ac707d7ef4}\label{tools_8c_a4c6fd3b92d66ef637411b5ac707d7ef4}} 
VOID {\bfseries Truncate\+File} (int handle)
\item 
\mbox{\Hypertarget{tools_8c_a3e2a863ec66bc8303dc625601c907947}\label{tools_8c_a3e2a863ec66bc8303dc625601c907947}} 
int {\bfseries Get\+Channel} (char $\ast$name, int mode)
\item 
\mbox{\Hypertarget{tools_8c_a5d15a111fcd22627c2267f7aea1ca9ce}\label{tools_8c_a5d15a111fcd22627c2267f7aea1ca9ce}} 
int {\bfseries Get\+Append\+Channel} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_ab2e2ff0be9c5a7d2b534f15aace30d91}\label{tools_8c_ab2e2ff0be9c5a7d2b534f15aace30d91}} 
int {\bfseries Close\+Channel} (char $\ast$name)
\item 
\mbox{\Hypertarget{tools_8c_abd5a371a857ef78ca5610f1d7202a0d8}\label{tools_8c_abd5a371a857ef78ca5610f1d7202a0d8}} 
void {\bfseries Update\+Max\+Size} ()
\item 
\mbox{\Hypertarget{tools_8c_a0a1ae9cb1d90ddd930312d00ce9a7000}\label{tools_8c_a0a1ae9cb1d90ddd930312d00ce9a7000}} 
int {\bfseries Str\+Cmp} (UBYTE $\ast$s1, UBYTE $\ast$s2)
\item 
\mbox{\Hypertarget{tools_8c_a44d18bb057bb319ab494ab0d56726e1a}\label{tools_8c_a44d18bb057bb319ab494ab0d56726e1a}} 
int {\bfseries Str\+ICmp} (UBYTE $\ast$s1, UBYTE $\ast$s2)
\item 
\mbox{\Hypertarget{tools_8c_af249ee2cf6a606ac2ae3a20a8c0d7717}\label{tools_8c_af249ee2cf6a606ac2ae3a20a8c0d7717}} 
int {\bfseries Str\+HICmp} (UBYTE $\ast$s1, UBYTE $\ast$s2)
\item 
\mbox{\Hypertarget{tools_8c_a6e22fcc029d5f0eb43e0361832b12c2c}\label{tools_8c_a6e22fcc029d5f0eb43e0361832b12c2c}} 
int {\bfseries Str\+ICont} (UBYTE $\ast$s1, UBYTE $\ast$s2)
\item 
\mbox{\Hypertarget{tools_8c_aaa299b44558ad6132a7083b07e25e50a}\label{tools_8c_aaa299b44558ad6132a7083b07e25e50a}} 
int {\bfseries Cmp\+Array} (WORD $\ast$t1, WORD $\ast$t2, WORD n)
\item 
\mbox{\Hypertarget{tools_8c_ac154bac5366eb848c54e416e07ea2360}\label{tools_8c_ac154bac5366eb848c54e416e07ea2360}} 
int {\bfseries Con\+Word} (UBYTE $\ast$s1, UBYTE $\ast$s2)
\item 
\mbox{\Hypertarget{tools_8c_a03107af8f9dcdd8d5fecbcc7cfb52705}\label{tools_8c_a03107af8f9dcdd8d5fecbcc7cfb52705}} 
int {\bfseries Str\+Len} (UBYTE $\ast$s)
\item 
\mbox{\Hypertarget{tools_8c_a3a23721c863c12eb15f6018da595c1ec}\label{tools_8c_a3a23721c863c12eb15f6018da595c1ec}} 
VOID {\bfseries Num\+To\+Str} (UBYTE $\ast$s, LONG x)
\item 
\mbox{\Hypertarget{tools_8c_ae5e1955875341e06a37334c4995c8ac1}\label{tools_8c_ae5e1955875341e06a37334c4995c8ac1}} 
VOID {\bfseries Write\+String} (int type, UBYTE $\ast$str, int num)
\item 
\mbox{\Hypertarget{tools_8c_a0942eda8c253be813c217be663a9754a}\label{tools_8c_a0942eda8c253be813c217be663a9754a}} 
VOID {\bfseries Write\+Unfin\+String} (int type, UBYTE $\ast$str, int num)
\item 
\mbox{\Hypertarget{tools_8c_a5a543ba4a639afa25416f5fbb4d1dab0}\label{tools_8c_a5a543ba4a639afa25416f5fbb4d1dab0}} 
UBYTE $\ast$ {\bfseries Add\+To\+String} (UBYTE $\ast$outstring, UBYTE $\ast$extrastring, int par)
\item 
\mbox{\Hypertarget{tools_8c_ac3cf612ae8dda3bb52cf36b8536d1f17}\label{tools_8c_ac3cf612ae8dda3bb52cf36b8536d1f17}} 
UBYTE $\ast$ {\bfseries str\+Dup1} (UBYTE $\ast$instring, char $\ast$ifwrong)
\item 
\mbox{\Hypertarget{tools_8c_aa2edfdfa64b3cf4b577d1df9b7a55bfd}\label{tools_8c_aa2edfdfa64b3cf4b577d1df9b7a55bfd}} 
UBYTE $\ast$ {\bfseries End\+Of\+Token} (UBYTE $\ast$s)
\item 
\mbox{\Hypertarget{tools_8c_a4d28784921afc864052ce23177b61c49}\label{tools_8c_a4d28784921afc864052ce23177b61c49}} 
UBYTE $\ast$ {\bfseries To\+Token} (UBYTE $\ast$s)
\item 
\mbox{\Hypertarget{tools_8c_ae9c6ac88b7374b95d6bba6f333cfd4f0}\label{tools_8c_ae9c6ac88b7374b95d6bba6f333cfd4f0}} 
UBYTE $\ast$ {\bfseries Skip\+Field} (UBYTE $\ast$s, int level)
\item 
\mbox{\Hypertarget{tools_8c_a8bedf537a312a1c915f03637de4e6854}\label{tools_8c_a8bedf537a312a1c915f03637de4e6854}} 
WORD {\bfseries Read\+Snum} (UBYTE $\ast$$\ast$p)
\item 
\mbox{\Hypertarget{tools_8c_aaea27878be9b06220a5558a20c6edd8d}\label{tools_8c_aaea27878be9b06220a5558a20c6edd8d}} 
UBYTE $\ast$ {\bfseries Num\+Copy} (WORD y, UBYTE $\ast$to)
\item 
\mbox{\Hypertarget{tools_8c_ad36c30483da1c3fd3ad7fed30ea5cea7}\label{tools_8c_ad36c30483da1c3fd3ad7fed30ea5cea7}} 
char $\ast$ {\bfseries Long\+Copy} (LONG y, char $\ast$to)
\item 
\mbox{\Hypertarget{tools_8c_aaec97466cb11a4a7a8032f5c4c11689c}\label{tools_8c_aaec97466cb11a4a7a8032f5c4c11689c}} 
char $\ast$ {\bfseries Long\+Long\+Copy} (off\+\_\+t $\ast$y, char $\ast$to)
\item 
\mbox{\Hypertarget{tools_8c_a1ffd2af773333020fbd22fd6dc0ff519}\label{tools_8c_a1ffd2af773333020fbd22fd6dc0ff519}} 
UBYTE $\ast$ {\bfseries Make\+Date} ()
\item 
\mbox{\Hypertarget{tools_8c_aafe160ce3c25ae5e5ba628f1aaaab329}\label{tools_8c_aafe160ce3c25ae5e5ba628f1aaaab329}} 
int {\bfseries set\+\_\+in} (UBYTE ch, \mbox{\hyperlink{structs_8h_ab253838fc15bd734919f61e55ecb6286}{set\+\_\+of\+\_\+char}} set)
\item 
\mbox{\Hypertarget{tools_8c_a002d39bcea2c29438e6146efec1b63e7}\label{tools_8c_a002d39bcea2c29438e6146efec1b63e7}} 
\mbox{\hyperlink{structs_8h_a6b798dec56b5da4c217fbc8c263b35d8}{one\+\_\+byte}} {\bfseries set\+\_\+set} (UBYTE ch, \mbox{\hyperlink{structs_8h_ab253838fc15bd734919f61e55ecb6286}{set\+\_\+of\+\_\+char}} set)
\item 
\mbox{\Hypertarget{tools_8c_a8a295f0f9a74101cd5cb602d744bcc64}\label{tools_8c_a8a295f0f9a74101cd5cb602d744bcc64}} 
\mbox{\hyperlink{structs_8h_a6b798dec56b5da4c217fbc8c263b35d8}{one\+\_\+byte}} {\bfseries set\+\_\+del} (UBYTE ch, \mbox{\hyperlink{structs_8h_ab253838fc15bd734919f61e55ecb6286}{set\+\_\+of\+\_\+char}} set)
\item 
\mbox{\Hypertarget{tools_8c_ad80b1468745423f47064d7c3785d8afe}\label{tools_8c_ad80b1468745423f47064d7c3785d8afe}} 
\mbox{\hyperlink{structs_8h_a6b798dec56b5da4c217fbc8c263b35d8}{one\+\_\+byte}} {\bfseries set\+\_\+sub} (\mbox{\hyperlink{structs_8h_ab253838fc15bd734919f61e55ecb6286}{set\+\_\+of\+\_\+char}} set, \mbox{\hyperlink{structs_8h_ab253838fc15bd734919f61e55ecb6286}{set\+\_\+of\+\_\+char}} set1, \mbox{\hyperlink{structs_8h_ab253838fc15bd734919f61e55ecb6286}{set\+\_\+of\+\_\+char}} set2)
\item 
\mbox{\Hypertarget{tools_8c_ab42f8cc297b229c6a5625de2fd862263}\label{tools_8c_ab42f8cc297b229c6a5625de2fd862263}} 
VOID {\bfseries ini\+Tools} (VOID)
\item 
\mbox{\Hypertarget{tools_8c_a7cb83224279bdc3266f5814bedc29920}\label{tools_8c_a7cb83224279bdc3266f5814bedc29920}} 
VOID $\ast$ {\bfseries Malloc} (LONG size)
\item 
\mbox{\Hypertarget{tools_8c_ad278c04cb9bb0399540da27b767dffa7}\label{tools_8c_ad278c04cb9bb0399540da27b767dffa7}} 
VOID $\ast$ {\bfseries Malloc1} (LONG size, const char $\ast$messageifwrong)
\item 
\mbox{\Hypertarget{tools_8c_a482d642f3be5b7ad42cb0c5d4282418f}\label{tools_8c_a482d642f3be5b7ad42cb0c5d4282418f}} 
void {\bfseries M\+\_\+free} (VOID $\ast$x, const char $\ast$where)
\item 
\mbox{\Hypertarget{tools_8c_a4ee10f8d188c47dc088981f48760983e}\label{tools_8c_a4ee10f8d188c47dc088981f48760983e}} 
void {\bfseries M\+\_\+check1} ()
\item 
\mbox{\Hypertarget{tools_8c_ac7f52fc209f95c82b8e42c7699c18eb8}\label{tools_8c_ac7f52fc209f95c82b8e42c7699c18eb8}} 
void {\bfseries M\+\_\+print} ()
\item 
\mbox{\Hypertarget{tools_8c_a6b3db91da9b008bbea5c101e8b495add}\label{tools_8c_a6b3db91da9b008bbea5c101e8b495add}} 
VOID {\bfseries Term\+Malloc\+Add\+Memory} (PHEAD0)
\item 
\mbox{\Hypertarget{tools_8c_a72e8c689c48f27a5d4dc8cdb4ffd47e3}\label{tools_8c_a72e8c689c48f27a5d4dc8cdb4ffd47e3}} 
VOID {\bfseries Number\+Malloc\+Add\+Memory} (PHEAD0)
\item 
\mbox{\Hypertarget{tools_8c_ac628e1bcc75b76a66494db646702d694}\label{tools_8c_ac628e1bcc75b76a66494db646702d694}} 
VOID {\bfseries Cache\+Number\+Malloc\+Add\+Memory} (PHEAD0)
\item 
\mbox{\Hypertarget{tools_8c_a27f91216f0395d220840c5f7f31ee20e}\label{tools_8c_a27f91216f0395d220840c5f7f31ee20e}} 
VOID $\ast$ {\bfseries From\+List} (\mbox{\hyperlink{structLIST}{LIST}} $\ast$L)
\item 
\mbox{\Hypertarget{tools_8c_ad9899484c6f938ce05dedbc459e2dc8c}\label{tools_8c_ad9899484c6f938ce05dedbc459e2dc8c}} 
VOID $\ast$ {\bfseries From0\+List} (\mbox{\hyperlink{structLIST}{LIST}} $\ast$L)
\item 
\mbox{\Hypertarget{tools_8c_ad0284bfaf09b419e0bd5b363641e6969}\label{tools_8c_ad0284bfaf09b419e0bd5b363641e6969}} 
VOID $\ast$ {\bfseries From\+Var\+List} (\mbox{\hyperlink{structLIST}{LIST}} $\ast$L)
\item 
\mbox{\Hypertarget{tools_8c_ac7fd34f7bcda20040aa67ed392e5e1a7}\label{tools_8c_ac7fd34f7bcda20040aa67ed392e5e1a7}} 
int {\bfseries Double\+List} (VOID $\ast$$\ast$$\ast$lijst, int $\ast$oldsize, int objectsize, char $\ast$nameoftype)
\item 
\mbox{\Hypertarget{tools_8c_a45a9f2638b84eb55e8559449c3a89233}\label{tools_8c_a45a9f2638b84eb55e8559449c3a89233}} 
int {\bfseries Double\+LList} (VOID $\ast$$\ast$$\ast$lijst, LONG $\ast$oldsize, int objectsize, char $\ast$nameoftype)
\item 
\mbox{\Hypertarget{tools_8c_a6b0683dc40a8ffcb4b538e2df54c8f8e}\label{tools_8c_a6b0683dc40a8ffcb4b538e2df54c8f8e}} 
void {\bfseries Double\+Buffer} (void $\ast$$\ast$start, void $\ast$$\ast$stop, int size, char $\ast$text)
\item 
\mbox{\Hypertarget{tools_8c_afa9975c7cc7b4c7337c72bf299ae5257}\label{tools_8c_afa9975c7cc7b4c7337c72bf299ae5257}} 
void {\bfseries Expand\+Buffer} (void $\ast$$\ast$buffer, LONG $\ast$oldsize, int type)
\item 
\mbox{\Hypertarget{tools_8c_ab6a170b9aa3f8b8bca383eb582aec443}\label{tools_8c_ab6a170b9aa3f8b8bca383eb582aec443}} 
LONG {\bfseries iexp} (LONG x, int p)
\item 
\mbox{\Hypertarget{tools_8c_ab877745ab3d7f188e3021260f5f1946d}\label{tools_8c_ab877745ab3d7f188e3021260f5f1946d}} 
void {\bfseries To\+General} (WORD $\ast$r, WORD $\ast$m, WORD par)
\item 
\mbox{\Hypertarget{tools_8c_a63c07271c5ebbeee0c8ba443f2bb47de}\label{tools_8c_a63c07271c5ebbeee0c8ba443f2bb47de}} 
int {\bfseries To\+Fast} (WORD $\ast$r, WORD $\ast$m)
\item 
\mbox{\Hypertarget{tools_8c_aaedf35958d2e9ede9e80afb6ad4eb6d1}\label{tools_8c_aaedf35958d2e9ede9e80afb6ad4eb6d1}} 
WORD {\bfseries To\+Poly\+Fun\+General} (PHEAD WORD $\ast$term)
\item 
\mbox{\Hypertarget{tools_8c_aa856a4daf2740b961a5c0df004b10193}\label{tools_8c_aa856a4daf2740b961a5c0df004b10193}} 
int {\bfseries Is\+Like\+Vector} (WORD $\ast$arg)
\item 
\mbox{\Hypertarget{tools_8c_a32d00e4dec7ffa67a224bbee66d1762c}\label{tools_8c_a32d00e4dec7ffa67a224bbee66d1762c}} 
int {\bfseries Are\+Args\+Equal} (WORD $\ast$arg1, WORD $\ast$arg2)
\item 
\mbox{\Hypertarget{tools_8c_ad405d65bb915e222eb420e1b6b8f7e65}\label{tools_8c_ad405d65bb915e222eb420e1b6b8f7e65}} 
int {\bfseries Compare\+Args} (WORD $\ast$arg1, WORD $\ast$arg2)
\item 
\mbox{\Hypertarget{tools_8c_a4735bc5824a5e8becd3f74be9794ae00}\label{tools_8c_a4735bc5824a5e8becd3f74be9794ae00}} 
int {\bfseries Comp\+Arg} (WORD $\ast$s1, WORD $\ast$s2)
\item 
LONG \mbox{\hyperlink{tools_8c_a48988e4bcc3ab0029fa4c64a68bd115c}{Time\+Wall\+Clock}} (WORD par)
\item 
\mbox{\Hypertarget{tools_8c_aeaf20fc9db619a22151a602e1f0c12c7}\label{tools_8c_aeaf20fc9db619a22151a602e1f0c12c7}} 
LONG {\bfseries Time\+Children} (WORD par)
\item 
LONG \mbox{\hyperlink{tools_8c_adda2084075924a555870f235110225de}{Time\+CPU}} (WORD par)
\item 
\mbox{\Hypertarget{tools_8c_acbeeddf4c91934000c895703add3552d}\label{tools_8c_acbeeddf4c91934000c895703add3552d}} 
int {\bfseries Crash} ()
\item 
int \mbox{\hyperlink{tools_8c_ab6535caaea3e65d4759ec1c34c7a9681}{Test\+Term}} (WORD $\ast$term)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{tools_8c_a6ab3954d22a0bbb9301a7b3b7a6881ae}\label{tools_8c_a6ab3954d22a0bbb9301a7b3b7a6881ae}} 
FILES $\ast$$\ast$ {\bfseries filelist}
\item 
\mbox{\Hypertarget{tools_8c_a1e356262215cee7650e542d64fff518d}\label{tools_8c_a1e356262215cee7650e542d64fff518d}} 
int {\bfseries numinfilelist} = 0
\item 
\mbox{\Hypertarget{tools_8c_aff79f7f753f19db736a266059490a91a}\label{tools_8c_aff79f7f753f19db736a266059490a91a}} 
int {\bfseries filelistsize} = 0
\item 
\mbox{\Hypertarget{tools_8c_aa2e49c27d43864331f4f7e8aa9541ca3}\label{tools_8c_aa2e49c27d43864331f4f7e8aa9541ca3}} 
WRITEFILE {\bfseries Write\+File} = \&Write\+File\+To\+File
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Low level routines for many types of task. There are routines for manipulating the input system (streams and files) routines for string manipulation, the memory allocation interface, and the clock. The last is the most sensitive to ports. In the past nearly every port to another OS or computer gave trouble. Nowadays it is slightly better but the poor POSIX compliance of LINUX again gave problems for the multithreaded version. 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{tools_8c_a0b42f28a6226ba48102277c981cbea2c}\label{tools_8c_a0b42f28a6226ba48102277c981cbea2c}} 
\index{tools.c@{tools.c}!TERMMEMSTARTNUM@{TERMMEMSTARTNUM}}
\index{TERMMEMSTARTNUM@{TERMMEMSTARTNUM}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{TERMMEMSTARTNUM}{TERMMEMSTARTNUM}}
{\footnotesize\ttfamily \#define TERMMEMSTARTNUM~16}

Provides memory for one term (or one small polynomial) This means that the memory is limited to a buffer of size AM.\+Max\+Ter plus a few extra words. In parallel versions, each worker has its own memory pool.

The way we use the memory is by\+: term = Term\+Malloc(\+BHEAD0); and later we free it by Term\+Free(\+BHEAD term);

Layout\+: We have a list of available pointers to buffers\+: AT.\+Term\+Mem\+Heap Its size is AT.\+Term\+Mem\+Max We take from the top (indicated by AT.\+Term\+Mem\+Top). When we run out of buffers we assign new ones (doubling the amount) and we have to extend the AT.\+Term\+Mem\+Heap array. Important\+: There is no checking that the returned memory is legal, ie is memory that was handed out earlier. 

Definition at line 2474 of file tools.\+c.

\mbox{\Hypertarget{tools_8c_ab4b11a776f82348e86e6fc5c3e3d5461}\label{tools_8c_ab4b11a776f82348e86e6fc5c3e3d5461}} 
\index{tools.c@{tools.c}!NUMBERMEMSTARTNUM@{NUMBERMEMSTARTNUM}}
\index{NUMBERMEMSTARTNUM@{NUMBERMEMSTARTNUM}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{NUMBERMEMSTARTNUM}{NUMBERMEMSTARTNUM}}
{\footnotesize\ttfamily \#define NUMBERMEMSTARTNUM~16}

Provides memory for one Long number This means that the memory is limited to a buffer of size AM.\+Max\+Tal In parallel versions, each worker has its own memory pool.

The way we use the memory is by\+: num = Number\+Malloc(\+BHEAD0); Number = AT.\+Number\+Mem\+Heap\mbox{[}num\mbox{]}; and later we free it by Number\+Free(\+BHEAD num);

Layout\+: We have a list of available pointers to buffers\+: AT.\+Number\+Mem\+Heap Its size is AT.\+Number\+Mem\+Max We take from the top (indicated by AT.\+Number\+Mem\+Top). When we run out of buffers we assign new ones (doubling the amount) and we have to extend the AT.\+Number\+Mem\+Heap array. Important\+: There is no checking on the returned memory!!!! 

Definition at line 2574 of file tools.\+c.

\mbox{\Hypertarget{tools_8c_a401674fa554928e324e1579075be3c8f}\label{tools_8c_a401674fa554928e324e1579075be3c8f}} 
\index{tools.c@{tools.c}!DODOUBLE@{DODOUBLE}}
\index{DODOUBLE@{DODOUBLE}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{DODOUBLE}{DODOUBLE}}
{\footnotesize\ttfamily \#define DODOUBLE(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \{ x *s, *t, *u; \textcolor{keywordflow}{if} ( *start ) \{ \(\backslash\)}
\DoxyCodeLine{    oldsize = *(x **)stop -\/ *(x **)start; newsize = 2*oldsize; \(\backslash\)}
\DoxyCodeLine{    t = u = (x *)Malloc1(newsize*\textcolor{keyword}{sizeof}(x),text); s = *(x **)start; \(\backslash\)}
\DoxyCodeLine{    for ( i = 0; i < oldsize; i++ ) *t++ = *s++; M\_free(*start,\textcolor{stringliteral}{"{}double"{}}); \} \(\backslash\)}
\DoxyCodeLine{    else \{ newsize = 100; u = (x *)Malloc1(newsize*\textcolor{keyword}{sizeof}(x),text); \} \(\backslash\)}
\DoxyCodeLine{    *start = (\textcolor{keywordtype}{void} *)u; *stop = (\textcolor{keywordtype}{void} *)(u+newsize); \}}

\end{DoxyCode}


Definition at line 2897 of file tools.\+c.

\mbox{\Hypertarget{tools_8c_a0f02df08e1e9b971cb78a192b601c258}\label{tools_8c_a0f02df08e1e9b971cb78a192b601c258}} 
\index{tools.c@{tools.c}!DOEXPAND@{DOEXPAND}}
\index{DOEXPAND@{DOEXPAND}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{DOEXPAND}{DOEXPAND}}
{\footnotesize\ttfamily \#define DOEXPAND(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \{ x *newbuffer, *t, *m;                             \(\backslash\)}
\DoxyCodeLine{    t = newbuffer = (x *)Malloc1((newsize+2)*type,\textcolor{stringliteral}{"{}ExpandBuffer"{}});      \(\backslash\)}
\DoxyCodeLine{    if ( *buffer ) \{ m = (x *)*buffer; i = *oldsize;                    \(\backslash\)}
\DoxyCodeLine{        while ( -\/-\/i >= 0 ) *t++ = *m++; M\_free(*buffer,\textcolor{stringliteral}{"{}ExpandBuffer"{}}); \(\backslash\)}
\DoxyCodeLine{    \} *buffer = newbuffer; *oldsize = newsize; \}}

\end{DoxyCode}


Definition at line 2923 of file tools.\+c.



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{tools_8c_a96ec928b26a63c6dcdadbd111829f0a6}\label{tools_8c_a96ec928b26a63c6dcdadbd111829f0a6}} 
\index{tools.c@{tools.c}!CopyFile@{CopyFile}}
\index{CopyFile@{CopyFile}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{CopyFile()}{CopyFile()}}
{\footnotesize\ttfamily int Copy\+File (\begin{DoxyParamCaption}\item[{char $\ast$}]{source,  }\item[{char $\ast$}]{dest }\end{DoxyParamCaption})}

Copies a file with name $\ast$source to a file named $\ast$dest. The involved files must not be open. Returns non-\/zero if an error occurred. Uses if possible the combined large and small sorting buffers as cache. 

Definition at line 1029 of file tools.\+c.

\mbox{\Hypertarget{tools_8c_a48988e4bcc3ab0029fa4c64a68bd115c}\label{tools_8c_a48988e4bcc3ab0029fa4c64a68bd115c}} 
\index{tools.c@{tools.c}!TimeWallClock@{TimeWallClock}}
\index{TimeWallClock@{TimeWallClock}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{TimeWallClock()}{TimeWallClock()}}
{\footnotesize\ttfamily LONG Time\+Wall\+Clock (\begin{DoxyParamCaption}\item[{WORD}]{par }\end{DoxyParamCaption})}

Returns the wall-\/clock time.


\begin{DoxyParams}{Parameters}
{\em par} & If zero, the wall-\/clock time will be reset to 0. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The wall-\/clock time in centiseconds. 
\end{DoxyReturn}


Definition at line 3404 of file tools.\+c.



Referenced by Do\+Checkpoint().

\mbox{\Hypertarget{tools_8c_adda2084075924a555870f235110225de}\label{tools_8c_adda2084075924a555870f235110225de}} 
\index{tools.c@{tools.c}!TimeCPU@{TimeCPU}}
\index{TimeCPU@{TimeCPU}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{TimeCPU()}{TimeCPU()}}
{\footnotesize\ttfamily LONG Time\+CPU (\begin{DoxyParamCaption}\item[{WORD}]{par }\end{DoxyParamCaption})}

Returns the CPU time.


\begin{DoxyParams}{Parameters}
{\em par} & If zero, the CPU time will be reset to 0. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The CPU time in milliseconds. 
\end{DoxyReturn}


Definition at line 3478 of file tools.\+c.

\mbox{\Hypertarget{tools_8c_ab6535caaea3e65d4759ec1c34c7a9681}\label{tools_8c_ab6535caaea3e65d4759ec1c34c7a9681}} 
\index{tools.c@{tools.c}!TestTerm@{TestTerm}}
\index{TestTerm@{TestTerm}!tools.c@{tools.c}}
\doxysubsubsection{\texorpdfstring{TestTerm()}{TestTerm()}}
{\footnotesize\ttfamily int Test\+Term (\begin{DoxyParamCaption}\item[{WORD $\ast$}]{term }\end{DoxyParamCaption})}

Tests the consistency of the term. Returns 0 when the term is OK. Any nonzero value is trouble. In the current version the testing isn\textquotesingle{}t 100\% complete. For instance, we don\textquotesingle{}t check the validity of the symbols nor do we check the range of their powers. Etc. This should be extended when the need is there.


\begin{DoxyParams}{Parameters}
{\em term} & the term to be tested \\
\hline
\end{DoxyParams}


Definition at line 3789 of file tools.\+c.

