% This LaTeX file generated by cxref
% cxref program (c) Andrew M. Bishop 1995,96,97.

\markboth{File file.c}{File file.c}
\section{File file.c}
\label{file_file.c}

{\bf RCS Header: /home/amb/cxref/RCS/file.c 1.10 1997/05/17 15:06:01 amb Exp }

\smallskip

  C Cross Referencing \& Documentation tool. Version 1.4.

  Sets up the top level File structure.


\subsection*{Included Files}

\begin{cxreftabi}
{\stt \#include <stdlib.h>} &\\
\end{cxreftabi}

\medskip
\begin{cxreftabi}
{\stt \#include <stdio.h>} &\\
\end{cxreftabi}

\medskip
\begin{cxreftabi}
{\stt \#include <string.h>} &\\
\end{cxreftabi}

\medskip
\begin{cxreftabi}
{\stt \#include "memory.h"} &\cxreffile{memory.h}\\
\end{cxreftabi}

\medskip
\begin{cxreftabi}
{\stt \#include "datatype.h"} &\cxreffile{datatype.h}\\
\end{cxreftabi}

\medskip
\begin{cxreftabi}
{\stt \#include "cxref.h"} &\cxreffile{cxref.h}\\
\hspace*{0.2in}{\stt \#include "datatype.h"} &\cxreffile{datatype.h}\\
\end{cxreftabi}


\subsection*{Preprocessor definitions}

 To control the debugging in this file. 

\smallskip
{\stt \#define DEBUG 0}


\subsection{Variables}


\subsubsection{External Variables}

{\bf CurFile}
\label{var_CurFile_file.c}

 This contains the File that is currently being documented to allow the other functions access to it. 

\smallskip
{\stt extern File CurFile}

\smallskip
\begin{cxreftabiii}
Defined in:& cxref.c & \ & \cxrefvar{CurFile}{cxref.c}\\
\end{cxreftabiii}


\subsection{Functions}


\subsubsection{Global Function DeleteFile()}
\label{func_DeleteFile_file.c}

  Deletes a file structure.

\smallskip
{\stt void DeleteFile ( File file )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{File file} The file structure to be deleted.
\end{cxrefarglist}

\smallskip
  This is required to go through each of the elements in the File structure and delete each of them in turn.

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & DeleteDefineType() & preproc.c & \cxreffunc{DeleteDefineType}{preproc.c}\\
\ & DeleteFunctionType() & func.c & \cxreffunc{DeleteFunctionType}{func.c}\\
\ & DeleteIncludeType() & preproc.c & \cxreffunc{DeleteIncludeType}{preproc.c}\\
\cxreftabbreak{cxreftabiii}
\ & DeleteStringList() & slist.c & \cxreffunc{DeleteStringList}{slist.c}\\
\ & DeleteStringList2() & slist.c & \cxreffunc{DeleteStringList2}{slist.c}\\
\ & DeleteTypedefType() & type.c & \cxreffunc{DeleteTypedefType}{type.c}\\
\ & DeleteVariableType() & var.c & \cxreffunc{DeleteVariableType}{var.c}\\
\ & SafeFree() & memory.c & \cxreffunc{SafeFree}{memory.c}\\
Called by:\ & main() & cxref.c & \cxreffunc{main}{cxref.c}\\
\end{cxreftabiii}


\subsubsection{Global Function NewFile()}
\label{func_NewFile_file.c}

  Creates a new File structure.

\smallskip
{\stt File NewFile ( char* name )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{File NewFile} Returns the new file structure.
\cxrefargitem{char* name} The name of the file.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & NewStringList() & slist.c & \cxreffunc{NewStringList}{slist.c}\\
\ & NewStringList2() & slist.c & \cxreffunc{NewStringList2}{slist.c}\\
\ & SafeCalloc() & memory.c & \cxreffunc{SafeCalloc}{memory.c}\\
\cxreftabbreak{cxreftabiii}
\ & SafeMallocString() & memory.c & \cxreffunc{SafeMallocString}{memory.c}\\
Called by:\ & main() & cxref.c & \cxreffunc{main}{cxref.c}\\
\end{cxreftabiii}


\subsubsection{Global Function SeenFileComment()}
\label{func_SeenFileComment_file.c}

  Called when a file comment has been seen. Only the first of multiple comments in a file are used.

\smallskip
{\stt void SeenFileComment ( char* comment )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{char* comment} The comment for the file.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeMallocString() & memory.c & \cxreffunc{SafeMallocString}{memory.c}\\
Called by:\ & SeenComment() & comment.c & \cxreffunc{SeenComment}{comment.c}\\
Refs Var:\ & CurFile & cxref.c & \cxrefvar{CurFile}{cxref.c}\\
\cxreftabbreak{cxreftabiii}
\end{cxreftabiii}

