\doxysection{vnm.\+h File Reference}
\label{a00023}\index{vnm.h@{vnm.h}}


Header file for an ISO C [V]irtual [N]umerical [M]achine.  


{\ttfamily \#include $<$maloc/maloc\+\_\+base.\+h$>$}\newline
Include dependency graph for vnm.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{a00024}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=224pt]{a00025}
\end{center}
\end{figure}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ VPOW\+\_\+\+SAFE}(x,  y)~(\textbf{ Vnm\+\_\+powsafe}(x,y))
\begin{DoxyCompactList}\small\item\em A safe VPOW function (avoids division by zero) \end{DoxyCompactList}\item 
\#define \textbf{ VTIMERS}~100
\begin{DoxyCompactList}\small\item\em the maiximal timer constant \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ Vnm\+\_\+sig\+Int} (void)
\begin{DoxyCompactList}\small\item\em Signal and setjmp handling routine. Return the signal interrupt flag. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+sig\+Int\+Set} (void)
\begin{DoxyCompactList}\small\item\em Signal and setjmp handling routine. Set the signal interrupt flag. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+sig\+Int\+Clear} (void)
\begin{DoxyCompactList}\small\item\em Signal and setjmp handling routine. Clear the signal interrupt flag. ~\newline
 \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+jmp\+Ok} (void)
\begin{DoxyCompactList}\small\item\em Signal and setjmp handling routine. Return the "{}ok-\/to-\/jump"{} flag. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+jmp\+Ok\+Set} (void)
\begin{DoxyCompactList}\small\item\em Signal and setjmp handling routine. Set the "{}okay-\/to-\/jump"{} flag. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+jmp\+Ok\+Clear} (void)
\begin{DoxyCompactList}\small\item\em Signal and setjmp handling routine. Clear the "{}okay-\/to-\/jump"{} flag. ~\newline
 \end{DoxyCompactList}\item 
jmp\+\_\+buf $\ast$ \textbf{ Vnm\+\_\+signal\+Init} (void)
\begin{DoxyCompactList}\small\item\em Initialize the signal handling data structures. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+reg\+Hand} (void)
\begin{DoxyCompactList}\small\item\em Register the signal handler with the operating system. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+sig\+Hand} (int num)
\begin{DoxyCompactList}\small\item\em Handle events such as SIGINT. We must have first been registered with "{}\+Vnm\+\_\+signal\+Init"{}. \end{DoxyCompactList}\item 
double \textbf{ Vnm\+\_\+powsafe} (double x, double y)
\begin{DoxyCompactList}\small\item\em A safe VPOW function (avoids division by zero). ~\newline
 \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+type\+Chk} (void)
\begin{DoxyCompactList}\small\item\em Check out the sizes of various datatypes. ~\newline
 \end{DoxyCompactList}\item 
double \textbf{ Vnm\+\_\+epsmac} (void)
\begin{DoxyCompactList}\small\item\em Computes the unit roundoff of the machine in single ~\newline
 precision. This is defined as the smallest positive machine number u such that 1.\+0d0 + u .ne. 1.\+0d0 (in single precision). ~\newline
~\newline
 A safe hardcoded machine epsilon as alternative\+:~\newline
 double value; ~\newline
 value = 1.\+0e-\/9; ~\newline
 return value;. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+gentokens} (char $\ast$buf, char $\ast$$\ast$argv, const int argvmax, const char $\ast$white, const char $\ast$comment)
\begin{DoxyCompactList}\small\item\em Generate an [argv,argc] pair from a character string "{}buf"{} (assumed NULL-\/terminated) in which tokens are separated by whitespace "{}white"{} with possible comments "{}comment"{} occuring. THE INPUT STRING IS MODIFIED HERE! \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+tstart} (int timer, const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Starts the timer on the particular machine. ~\newline
 \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+tstop} (int timer, const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Stops the timer on the particular machine. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ Vnm\+\_\+getuser} (char $\ast$user, int usermax)
\begin{DoxyCompactList}\small\item\em Ask the system for the username. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ Vnm\+\_\+getos} (char $\ast$os, int osmax)
\begin{DoxyCompactList}\small\item\em Ask the system for the operating system name. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ Vnm\+\_\+gethost} (char $\ast$host, int hostmax)
\begin{DoxyCompactList}\small\item\em Ask the system for the hostname. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ Vnm\+\_\+gethome} (char $\ast$path, int pathmax)
\begin{DoxyCompactList}\small\item\em Ask the system for the home directory. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ Vnm\+\_\+getcwd} (char $\ast$path, int pathmax)
\begin{DoxyCompactList}\small\item\em Ask the system for the current working directory. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+chdir} (const char $\ast$path)
\begin{DoxyCompactList}\small\item\em Interact with the system to change the working directory. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+mkdir} (const char $\ast$path)
\begin{DoxyCompactList}\small\item\em Interact with the system to make a new directory. ~\newline
 \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+system} (const char $\ast$cmd)
\begin{DoxyCompactList}\small\item\em An improved ANSI-\/C "{}system"{} call. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+system\+Back} (const char $\ast$cmd)
\begin{DoxyCompactList}\small\item\em A background variant of the ANSI-\/C "{}system"{} call. ~\newline
 \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+system\+Kill} (const char $\ast$cmd)
\begin{DoxyCompactList}\small\item\em Something like a UNIX "{}killall"{} call. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+exec} (int argc, char $\ast$$\ast$argv)
\begin{DoxyCompactList}\small\item\em An improved UNIX "{}exec"{} call. This routine does not return except on error. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+sleep} (int nusecs)
\begin{DoxyCompactList}\small\item\em Implement a sleep function with microsecond resolution. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+io\+Tag} (void)
\begin{DoxyCompactList}\small\item\em Return my I/O tag. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+n\+Tags} (void)
\begin{DoxyCompactList}\small\item\em Return the total number of tags. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+set\+Io\+Tag} (int my\+Tag, int num\+Tags)
\begin{DoxyCompactList}\small\item\em Set my id. \end{DoxyCompactList}\item 
FILE $\ast$ \textbf{ Vnm\+\_\+open} (const int unit)
\begin{DoxyCompactList}\small\item\em Open an I/O console. \end{DoxyCompactList}\item 
int \textbf{ Vnm\+\_\+close} (const int unit)
\begin{DoxyCompactList}\small\item\em Close an I/O console. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+flush} (const int unit)
\begin{DoxyCompactList}\small\item\em Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+redirect} (const int flag)
\begin{DoxyCompactList}\small\item\em Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file\+: \$\{MCSH\+\_\+\+HOME\}/io.mc. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+print} (const int unit, const char $\ast$format,...)
\begin{DoxyCompactList}\small\item\em External interface to the console i/o routine. ~\newline
 We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+tprint} (const int unit, const char $\ast$format,...)
\begin{DoxyCompactList}\small\item\em Add our io\+Tag to Vnm\+\_\+print output. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+qsort} (int $\ast$u, int size)
\begin{DoxyCompactList}\small\item\em Front-\/end to quick sort integer array from [-\/large] to [+large]. ~\newline
 \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+qsort\+Ord} (int $\ast$u, int $\ast$ord, int size)
\begin{DoxyCompactList}\small\item\em Front-\/end to quick sort integer array from [-\/large] to [+large]. \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+dqsort} (double $\ast$u, int size)
\begin{DoxyCompactList}\small\item\em Front-\/end to quick sort integer array from [-\/large] to [+large]. ~\newline
 \end{DoxyCompactList}\item 
void \textbf{ Vnm\+\_\+dqsort\+Ord} (double $\ast$u, int $\ast$ord, int size)
\begin{DoxyCompactList}\small\item\em Front-\/end to quick sort integer array from [-\/large] to [+large]. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Header file for an ISO C [V]irtual [N]umerical [M]achine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
None 
\end{DoxyNote}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id}
\doxyref{vnm.\+h}{p.}{a00023},v 1.\+22 2010/08/12 05\+:40\+:36 fetk Exp 
\end{DoxyParagraph}


\begin{DoxyAttention}{Attention}
\begin{DoxyVerb}*
* MALOC = < Minimal Abstraction Layer for Object-oriented C >
* Copyright (C) 1994-- Michael Holst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 
*  \end{DoxyVerb}
 
\end{DoxyAttention}


\doxysubsection{Macro Definition Documentation}
\index{vnm.h@{vnm.h}!VPOW\_SAFE@{VPOW\_SAFE}}
\index{VPOW\_SAFE@{VPOW\_SAFE}!vnm.h@{vnm.h}}
\doxysubsubsection{VPOW\_SAFE}
{\footnotesize\ttfamily \label{a00023_ad7c91b8e4ceddff38851300876c7c9e7} 
\#define VPOW\+\_\+\+SAFE(\begin{DoxyParamCaption}\item[{}]{x}{, }\item[{}]{y}{}\end{DoxyParamCaption})~(\textbf{ Vnm\+\_\+powsafe}(x,y))}



A safe VPOW function (avoids division by zero) 

\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\index{vnm.h@{vnm.h}!VTIMERS@{VTIMERS}}
\index{VTIMERS@{VTIMERS}!vnm.h@{vnm.h}}
\doxysubsubsection{VTIMERS}
{\footnotesize\ttfamily \label{a00023_adff08ccefac6ec8e551662478f350e7f} 
\#define VTIMERS~100}



the maiximal timer constant 

\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}


\doxysubsection{Function Documentation}
\index{vnm.h@{vnm.h}!Vnm\_chdir@{Vnm\_chdir}}
\index{Vnm\_chdir@{Vnm\_chdir}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_chdir()}
{\footnotesize\ttfamily \label{a00023_aae7852bc441c93b9dd7969d8b7c4b515} 
int Vnm\+\_\+chdir (\begin{DoxyParamCaption}\item[{const char $\ast$}]{path}{}\end{DoxyParamCaption})}



Interact with the system to change the working directory. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Success enumeration 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em path} & Pointer to the path \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_close@{Vnm\_close}}
\index{Vnm\_close@{Vnm\_close}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_close()}
{\footnotesize\ttfamily \label{a00023_a0865f47c73cd78d4abcdc86027b3fbbd} 
int Vnm\+\_\+close (\begin{DoxyParamCaption}\item[{const int}]{unit}{}\end{DoxyParamCaption})}



Close an I/O console. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Success enumeration 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em unit} & index for the file unit \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_dqsort@{Vnm\_dqsort}}
\index{Vnm\_dqsort@{Vnm\_dqsort}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_dqsort()}
{\footnotesize\ttfamily \label{a00023_af5dd29bb1fb767ab5cd50a16115c90e2} 
void Vnm\+\_\+dqsort (\begin{DoxyParamCaption}\item[{double $\ast$}]{u}{, }\item[{int}]{size}{}\end{DoxyParamCaption})}



Front-\/end to quick sort integer array from [-\/large] to [+large]. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em u} & Pointer to quick sort integer array \\
\hline
{\em size} & size of the integer array \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_dqsortOrd@{Vnm\_dqsortOrd}}
\index{Vnm\_dqsortOrd@{Vnm\_dqsortOrd}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_dqsortOrd()}
{\footnotesize\ttfamily \label{a00023_a77193dca4dcddfd1ef609f2c50e39a45} 
void Vnm\+\_\+dqsort\+Ord (\begin{DoxyParamCaption}\item[{double $\ast$}]{u}{, }\item[{int $\ast$}]{ord}{, }\item[{int}]{size}{}\end{DoxyParamCaption})}



Front-\/end to quick sort integer array from [-\/large] to [+large]. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em u} & Pointer to quick sort integer array \\
\hline
{\em ord} & Pointer to reordered array \\
\hline
{\em size} & size of the integer array \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_epsmac@{Vnm\_epsmac}}
\index{Vnm\_epsmac@{Vnm\_epsmac}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_epsmac()}
{\footnotesize\ttfamily \label{a00023_ac0948dac8295ff4702a3d15b72920823} 
double Vnm\+\_\+epsmac (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Computes the unit roundoff of the machine in single ~\newline
 precision. This is defined as the smallest positive machine number u such that 1.\+0d0 + u .ne. 1.\+0d0 (in single precision). ~\newline
~\newline
 A safe hardcoded machine epsilon as alternative\+:~\newline
 double value; ~\newline
 value = 1.\+0e-\/9; ~\newline
 return value;. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the unit roundoff of the machine in single precision. 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_exec@{Vnm\_exec}}
\index{Vnm\_exec@{Vnm\_exec}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_exec()}
{\footnotesize\ttfamily \label{a00023_a754abd42c8c75dcc3a092fda5700c44b} 
int Vnm\+\_\+exec (\begin{DoxyParamCaption}\item[{int}]{argc}{, }\item[{char $\ast$$\ast$}]{argv}{}\end{DoxyParamCaption})}



An improved UNIX "{}exec"{} call. This routine does not return except on error. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
no return except on error 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em argc} & number of the command line arguments \\
\hline
{\em argv} & the command line arguments \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_flush@{Vnm\_flush}}
\index{Vnm\_flush@{Vnm\_flush}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_flush()}
{\footnotesize\ttfamily \label{a00023_a6eed22efc46e1bfbd34b54db20422cc6} 
void Vnm\+\_\+flush (\begin{DoxyParamCaption}\item[{const int}]{unit}{}\end{DoxyParamCaption})}



Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em unit} & index for the file unit \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_gentokens@{Vnm\_gentokens}}
\index{Vnm\_gentokens@{Vnm\_gentokens}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_gentokens()}
{\footnotesize\ttfamily \label{a00023_ac4ab27601589fe7256bf75c9b642fadd} 
int Vnm\+\_\+gentokens (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf}{, }\item[{char $\ast$$\ast$}]{argv}{, }\item[{const int}]{argvmax}{, }\item[{const char $\ast$}]{white}{, }\item[{const char $\ast$}]{comment}{}\end{DoxyParamCaption})}



Generate an [argv,argc] pair from a character string "{}buf"{} (assumed NULL-\/terminated) in which tokens are separated by whitespace "{}white"{} with possible comments "{}comment"{} occuring. THE INPUT STRING IS MODIFIED HERE! 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o)~\newline
~\newline
 Again, the input string "{}buf"{} IS MODIFIED; white space characters (defined in the input string "{}white"{}) are replaced by the NULL character \textquotesingle{}\textbackslash{}0\textquotesingle{}. The output "{}argv"{} is simply a list of pointers ~\newline
 to the start of the tokens in "{}buf"{}, which are NULL-\/terminated ~\newline
 after we replace the white space with NULLs. ~\newline
~\newline
 We follow convention and "{}\+NULL"{}-\/terminate "{}argv"{} by setting the pointer following the last token to "{}\+VNULL"{}. The return value is "{}argc"{}, the number of tokens found (not including the terminating NULL pointer). For safety you must pass in the maximal length of argv in the parameter "{}argvmax"{}.~\newline
~\newline
 If we encounter a token which begins with a comment character (defined in the input string "{}comment"{}), then we ignore the rest of the tokens in the input buffer "{}buf"{}. This is suitable ~\newline
 for parsing shell languages such as sh/ksh/bash which have comments that start with e.\+g. "{}\#"{} and continue until a newline.~\newline
~\newline
 We DO NOT use the C library function strtok in this routine. (There are some bad implementations of strtok around apparently; the internal state variables maintained by strtok can get very ~\newline
 messed up if you use strtok in multiple places in a code.) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
number of tokens 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em buf} & buffer containing message \\
\hline
{\em argv} & the command line arguments \\
\hline
{\em argvmax} & maximal number of the command line arguments \\
\hline
{\em white} & Pointer to the input string \\
\hline
{\em comment} & token which begins with a comment character \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_getcwd@{Vnm\_getcwd}}
\index{Vnm\_getcwd@{Vnm\_getcwd}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_getcwd()}
{\footnotesize\ttfamily \label{a00023_aebc09f21e8ddefb8f5d6a78ecbc5d28a} 
char $\ast$ Vnm\+\_\+getcwd (\begin{DoxyParamCaption}\item[{char $\ast$}]{path}{, }\item[{int}]{pathmax}{}\end{DoxyParamCaption})}



Ask the system for the current working directory. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o)~\newline
~\newline
 Consider it an error if we can\textquotesingle{}t return something useful; therefore we will VASSERT(path!=VNULL) before returning. ~\newline
~\newline
 Note that unlike Vnm\+\_\+gethome, a call to Vnm\+\_\+getcwd returns the current directory, possibly modified from call to call.~\newline
~\newline
 I.\+e., calls to Vnm\+\_\+chdir can change the current working ~\newline
 directory; Vnm\+\_\+getcwd returns the current directory, whatever that might be. 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the current working directory 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em path} & Pointer to the path \\
\hline
{\em pathmax} & index for the size of path \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_gethome@{Vnm\_gethome}}
\index{Vnm\_gethome@{Vnm\_gethome}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_gethome()}
{\footnotesize\ttfamily \label{a00023_abcd1ac36decebe11418b8b09b101599a} 
char $\ast$ Vnm\+\_\+gethome (\begin{DoxyParamCaption}\item[{char $\ast$}]{path}{, }\item[{int}]{pathmax}{}\end{DoxyParamCaption})}



Ask the system for the home directory. 

= \begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o)~\newline
~\newline
 The following preference order is used to set the home directory\+: ~\newline
~\newline
 MCSH\+\_\+\+HOME (the user must define this in his environment) ~\newline
 CWD (always defined as the current working directory) ~\newline
~\newline
 We consider it an error if we can\textquotesingle{}t return something useful; ~\newline
 therefore we will VASSERT(path!=VNULL) before returning.~\newline
~\newline
 We settle on a home directory the first time we are called, and then we simply return this fixed home directory forever. ~\newline
 In other words, the first call to Vnm\+\_\+gethome, regardless of ~\newline
 who makes the call, establishes the home directory for everyone else (as long as everyone goes through Vnm\+\_\+gethome!). 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the home directory 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em path} & Pointer to the path \\
\hline
{\em pathmax} & index for the size of path \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_gethost@{Vnm\_gethost}}
\index{Vnm\_gethost@{Vnm\_gethost}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_gethost()}
{\footnotesize\ttfamily \label{a00023_a8e55be911530a2908371d992add951de} 
char $\ast$ Vnm\+\_\+gethost (\begin{DoxyParamCaption}\item[{char $\ast$}]{host}{, }\item[{int}]{hostmax}{}\end{DoxyParamCaption})}



Ask the system for the hostname. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the hostname 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em host} & Pointer to the hostname. \\
\hline
{\em hostmax} & index for maximal size of host name \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_getos@{Vnm\_getos}}
\index{Vnm\_getos@{Vnm\_getos}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_getos()}
{\footnotesize\ttfamily \label{a00023_a170220f3c4c0b60d3b1f1fe80d29dc1e} 
char $\ast$ Vnm\+\_\+getos (\begin{DoxyParamCaption}\item[{char $\ast$}]{os}{, }\item[{int}]{osmax}{}\end{DoxyParamCaption})}



Ask the system for the operating system name. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the operating system name 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em os} & Pointer to the OS type \\
\hline
{\em osmax} & index for maximal size of OS name \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_getuser@{Vnm\_getuser}}
\index{Vnm\_getuser@{Vnm\_getuser}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_getuser()}
{\footnotesize\ttfamily \label{a00023_af30a9fcc50b34d0298b79a8d1594e348} 
char $\ast$ Vnm\+\_\+getuser (\begin{DoxyParamCaption}\item[{char $\ast$}]{user}{, }\item[{int}]{usermax}{}\end{DoxyParamCaption})}



Ask the system for the username. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the username of the system 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em user} & Pointer to the username of the system \\
\hline
{\em usermax} & index for maximal size of user name \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_ioTag@{Vnm\_ioTag}}
\index{Vnm\_ioTag@{Vnm\_ioTag}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_ioTag()}
{\footnotesize\ttfamily \label{a00023_a1f1c6ac80fc4f4cb4a8524d98d7d2458} 
int Vnm\+\_\+io\+Tag (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Return my I/O tag. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
my I/O tag. 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_jmpOk@{Vnm\_jmpOk}}
\index{Vnm\_jmpOk@{Vnm\_jmpOk}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_jmpOk()}
{\footnotesize\ttfamily \label{a00023_aaf928e6a4a6022b02a93fb0b33e3799b} 
int Vnm\+\_\+jmp\+Ok (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Signal and setjmp handling routine. Return the "{}ok-\/to-\/jump"{} flag. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
"{}ok-\/to-\/jump"{} flag. 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_jmpOkClear@{Vnm\_jmpOkClear}}
\index{Vnm\_jmpOkClear@{Vnm\_jmpOkClear}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_jmpOkClear()}
{\footnotesize\ttfamily \label{a00023_aa649e779bc3f411d7a0102b64c65b36b} 
void Vnm\+\_\+jmp\+Ok\+Clear (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Signal and setjmp handling routine. Clear the "{}okay-\/to-\/jump"{} flag. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_jmpOkSet@{Vnm\_jmpOkSet}}
\index{Vnm\_jmpOkSet@{Vnm\_jmpOkSet}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_jmpOkSet()}
{\footnotesize\ttfamily \label{a00023_a79c6b7377d7f62c87486388933211f06} 
void Vnm\+\_\+jmp\+Ok\+Set (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Signal and setjmp handling routine. Set the "{}okay-\/to-\/jump"{} flag. 

\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyAuthor}{Author}
Michael Holst
\end{DoxyAuthor}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_mkdir@{Vnm\_mkdir}}
\index{Vnm\_mkdir@{Vnm\_mkdir}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_mkdir()}
{\footnotesize\ttfamily \label{a00023_a02865e9071a5f335a5435cf50f1466cf} 
int Vnm\+\_\+mkdir (\begin{DoxyParamCaption}\item[{const char $\ast$}]{path}{}\end{DoxyParamCaption})}



Interact with the system to make a new directory. ~\newline
 

\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyReturn}{Returns}
Success enumeration 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em path} & Pointer to the path \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_nTags@{Vnm\_nTags}}
\index{Vnm\_nTags@{Vnm\_nTags}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_nTags()}
{\footnotesize\ttfamily \label{a00023_a595a95da823e215cf0241d3910065e32} 
int Vnm\+\_\+n\+Tags (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Return the total number of tags. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
total number of tags. 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_open@{Vnm\_open}}
\index{Vnm\_open@{Vnm\_open}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_open()}
{\footnotesize\ttfamily \label{a00023_a6fb34a7229dde9565794ca72bcf56317} 
FILE $\ast$ Vnm\+\_\+open (\begin{DoxyParamCaption}\item[{const int}]{unit}{}\end{DoxyParamCaption})}



Open an I/O console. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) \begin{DoxyVerb}We MUST NOT use VASSERT (or Vnm_print!) in this routine.   

The following codes are used:                                               

unit#      C output unit      
-------    -------------                                                

unit==0    garbage   -- Non-interactive i/o; lots of stuff                        
                        (can be redirected to ${MCSH_HOME/io.mc)

unit==1    stdout    -- standard output (Interactive I/O)            

unit==2    stderr    -- standard error (IMPORTANT interactive I/O)          

unit==3    history   -- History file ${MCSH_HOME}/hist.mcsh                       

unit==else /dev/null -- Error...                                
\end{DoxyVerb}
 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em unit} & index for the file unit \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_powsafe@{Vnm\_powsafe}}
\index{Vnm\_powsafe@{Vnm\_powsafe}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_powsafe()}
{\footnotesize\ttfamily \label{a00023_a332011becdeb7cbfbe3ec0e2ce8b9411} 
double Vnm\+\_\+powsafe (\begin{DoxyParamCaption}\item[{double}]{x}{, }\item[{double}]{y}{}\end{DoxyParamCaption})}



A safe VPOW function (avoids division by zero). ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
output value of a VPOW function 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em x} & input parameter \\
\hline
{\em y} & input parameter \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_print@{Vnm\_print}}
\index{Vnm\_print@{Vnm\_print}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_print()}
{\footnotesize\ttfamily \label{a00023_a2156e6285a0346c0c5d2f797cefa6370} 
void Vnm\+\_\+print (\begin{DoxyParamCaption}\item[{const int}]{unit}{, }\item[{const char $\ast$}]{format}{, }\item[{}]{...}{}\end{DoxyParamCaption})}



External interface to the console i/o routine. ~\newline
 We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em unit} & index for the file unit \\
\hline
{\em format} & Pointer to the print format \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_qsort@{Vnm\_qsort}}
\index{Vnm\_qsort@{Vnm\_qsort}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_qsort()}
{\footnotesize\ttfamily \label{a00023_ad979a4023c7e02c6ca2f4ce7694ef0f5} 
void Vnm\+\_\+qsort (\begin{DoxyParamCaption}\item[{int $\ast$}]{u}{, }\item[{int}]{size}{}\end{DoxyParamCaption})}



Front-\/end to quick sort integer array from [-\/large] to [+large]. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em u} & Pointer to quick sort integer array \\
\hline
{\em size} & size of the integer array \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_qsortOrd@{Vnm\_qsortOrd}}
\index{Vnm\_qsortOrd@{Vnm\_qsortOrd}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_qsortOrd()}
{\footnotesize\ttfamily \label{a00023_a4db1b2dcbc0e09e1cfdccc5ca65678a5} 
void Vnm\+\_\+qsort\+Ord (\begin{DoxyParamCaption}\item[{int $\ast$}]{u}{, }\item[{int $\ast$}]{ord}{, }\item[{int}]{size}{}\end{DoxyParamCaption})}



Front-\/end to quick sort integer array from [-\/large] to [+large]. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None $\ast$ 
\end{DoxyReturn}
\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}

\begin{DoxyParams}{Parameters}
{\em u} & Pointer to quick sort integer array \\
\hline
{\em ord} & Pointer to reordered array \\
\hline
{\em size} & size of the integer array \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_redirect@{Vnm\_redirect}}
\index{Vnm\_redirect@{Vnm\_redirect}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_redirect()}
{\footnotesize\ttfamily \label{a00023_ae485b8057ba4616289c3410593416b90} 
void Vnm\+\_\+redirect (\begin{DoxyParamCaption}\item[{const int}]{flag}{}\end{DoxyParamCaption})}



Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file\+: \$\{MCSH\+\_\+\+HOME\}/io.mc. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em flag} & index for the redirect flag \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_regHand@{Vnm\_regHand}}
\index{Vnm\_regHand@{Vnm\_regHand}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_regHand()}
{\footnotesize\ttfamily \label{a00023_af30e71d8139ce7a7604ddc9314323be6} 
void Vnm\+\_\+reg\+Hand (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Register the signal handler with the operating system. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_setIoTag@{Vnm\_setIoTag}}
\index{Vnm\_setIoTag@{Vnm\_setIoTag}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_setIoTag()}
{\footnotesize\ttfamily \label{a00023_a215f7126050010e46e44128be79d13c1} 
void Vnm\+\_\+set\+Io\+Tag (\begin{DoxyParamCaption}\item[{int}]{my\+Tag}{, }\item[{int}]{num\+Tags}{}\end{DoxyParamCaption})}



Set my id. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em my\+Tag} & index for the tag \\
\hline
{\em num\+Tags} & number of tags \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_sigHand@{Vnm\_sigHand}}
\index{Vnm\_sigHand@{Vnm\_sigHand}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_sigHand()}
{\footnotesize\ttfamily \label{a00023_a081eeccbff0977847b18b2a2e7e63278} 
void Vnm\+\_\+sig\+Hand (\begin{DoxyParamCaption}\item[{int}]{num}{}\end{DoxyParamCaption})}



Handle events such as SIGINT. We must have first been registered with "{}\+Vnm\+\_\+signal\+Init"{}. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_sigInt@{Vnm\_sigInt}}
\index{Vnm\_sigInt@{Vnm\_sigInt}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_sigInt()}
{\footnotesize\ttfamily \label{a00023_a73c595f310f0ee83eeca0b3c928ffcb5} 
int Vnm\+\_\+sig\+Int (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Signal and setjmp handling routine. Return the signal interrupt flag. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Signal interrupt flag. 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_sigIntClear@{Vnm\_sigIntClear}}
\index{Vnm\_sigIntClear@{Vnm\_sigIntClear}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_sigIntClear()}
{\footnotesize\ttfamily \label{a00023_a691fe8e58b2828b335221b4fa9109800} 
void Vnm\+\_\+sig\+Int\+Clear (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Signal and setjmp handling routine. Clear the signal interrupt flag. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_sigIntSet@{Vnm\_sigIntSet}}
\index{Vnm\_sigIntSet@{Vnm\_sigIntSet}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_sigIntSet()}
{\footnotesize\ttfamily \label{a00023_ae1b409d49983afa778821ea9e853a4ba} 
void Vnm\+\_\+sig\+Int\+Set (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Signal and setjmp handling routine. Set the signal interrupt flag. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_signalInit@{Vnm\_signalInit}}
\index{Vnm\_signalInit@{Vnm\_signalInit}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_signalInit()}
{\footnotesize\ttfamily \label{a00023_aa8f767bb6511f5fadfdef42ece76b84d} 
jmp\+\_\+buf $\ast$ Vnm\+\_\+signal\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Initialize the signal handling data structures. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
the signal handling data structures 
\end{DoxyReturn}
\index{vnm.h@{vnm.h}!Vnm\_sleep@{Vnm\_sleep}}
\index{Vnm\_sleep@{Vnm\_sleep}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_sleep()}
{\footnotesize\ttfamily \label{a00023_aa123e15d8c59cae72346c90790b35f01} 
void Vnm\+\_\+sleep (\begin{DoxyParamCaption}\item[{int}]{nusecs}{}\end{DoxyParamCaption})}



Implement a sleep function with microsecond resolution. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) ~\newline
 This is hacked out of the "{}sleep\+\_\+us"{} example in Rick Steven\textquotesingle{}s Advance Unix Programming book. 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em nusecs} & number of microseconds \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_system@{Vnm\_system}}
\index{Vnm\_system@{Vnm\_system}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_system()}
{\footnotesize\ttfamily \label{a00023_a753364893400079d0417c1cad8792b5f} 
int Vnm\+\_\+system (\begin{DoxyParamCaption}\item[{const char $\ast$}]{cmd}{}\end{DoxyParamCaption})}



An improved ANSI-\/C "{}system"{} call. 

\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyReturn}{Returns}
Success enumeration 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em cmd} & Pointer to the command \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_systemBack@{Vnm\_systemBack}}
\index{Vnm\_systemBack@{Vnm\_systemBack}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_systemBack()}
{\footnotesize\ttfamily \label{a00023_ac139e1ddf265e55cbb519ef26e9813cc} 
int Vnm\+\_\+system\+Back (\begin{DoxyParamCaption}\item[{const char $\ast$}]{cmd}{}\end{DoxyParamCaption})}



A background variant of the ANSI-\/C "{}system"{} call. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Success enumeration 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em cmd} & Pointer to the command \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_systemKill@{Vnm\_systemKill}}
\index{Vnm\_systemKill@{Vnm\_systemKill}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_systemKill()}
{\footnotesize\ttfamily \label{a00023_ace7e9147eb2c47be1eac5e37ac22ad4f} 
int Vnm\+\_\+system\+Kill (\begin{DoxyParamCaption}\item[{const char $\ast$}]{cmd}{}\end{DoxyParamCaption})}



Something like a UNIX "{}killall"{} call. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Success enumeration 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em cmd} & Pointer to the command \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_tprint@{Vnm\_tprint}}
\index{Vnm\_tprint@{Vnm\_tprint}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_tprint()}
{\footnotesize\ttfamily \label{a00023_ab1f04f03eecdd203e329831c8e6dc575} 
void Vnm\+\_\+tprint (\begin{DoxyParamCaption}\item[{const int}]{unit}{, }\item[{const char $\ast$}]{format}{, }\item[{}]{...}{}\end{DoxyParamCaption})}



Add our io\+Tag to Vnm\+\_\+print output. We MUST NOT use VASSERT (or Vnm\+\_\+print!) in this routine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) For a tag to be added, both of the following conditions must hold\+:~\newline
 \doxyref{Vnm\+\_\+io\+Tag()}{p.}{a00023_a1f1c6ac80fc4f4cb4a8524d98d7d2458} $>$= 0 (I.\+e., I must have been given a tag) ~\newline
 \doxyref{Vnm\+\_\+n\+Tags()}{p.}{a00023_a595a95da823e215cf0241d3910065e32} $>$ 1 (I must not be the only one given a tag) ~\newline

\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em unit} & index for the file unit \\
\hline
{\em format} & Pointer to the print format \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_tstart@{Vnm\_tstart}}
\index{Vnm\_tstart@{Vnm\_tstart}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_tstart()}
{\footnotesize\ttfamily \label{a00023_a7ca04016d2765ec38a8199f8284c8487} 
void Vnm\+\_\+tstart (\begin{DoxyParamCaption}\item[{int}]{timer}{, }\item[{const char $\ast$}]{name}{}\end{DoxyParamCaption})}



Starts the timer on the particular machine. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em timer} & index for the starting timer \\
\hline
{\em name} & Pointer to the object \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_tstop@{Vnm\_tstop}}
\index{Vnm\_tstop@{Vnm\_tstop}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_tstop()}
{\footnotesize\ttfamily \label{a00023_afb3fe75998e6b961f9da78c76ebfce49} 
void Vnm\+\_\+tstop (\begin{DoxyParamCaption}\item[{int}]{timer}{, }\item[{const char $\ast$}]{name}{}\end{DoxyParamCaption})}



Stops the timer on the particular machine. 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em timer} & index for the starting timer \\
\hline
{\em name} & Pointer to the object \\
\hline
\end{DoxyParams}
\index{vnm.h@{vnm.h}!Vnm\_typeChk@{Vnm\_typeChk}}
\index{Vnm\_typeChk@{Vnm\_typeChk}!vnm.h@{vnm.h}}
\doxysubsubsection{Vnm\_typeChk()}
{\footnotesize\ttfamily \label{a00023_aaeefb6c724be64a1a3af716ecca3bccc} 
void Vnm\+\_\+type\+Chk (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Check out the sizes of various datatypes. ~\newline
 

\begin{DoxyAuthor}{Author}
Michael Holst 
\end{DoxyAuthor}
\begin{DoxyNote}{Note}
Useful constants and functions (timers, epsilon, token generators, i/o) 
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
