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

\markboth{File slist.c}{File slist.c}
\section{File slist.c}
\label{file_slist.c}

{\bf RCS Header: /home/amb/cxref/RCS/slist.c 1.3 1997/05/11 15:23:11 amb Exp }

\smallskip

  C Cross Referencing \& Documentation tool. Version 1.4.

  Handle lists of strings.


\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}

 Control the debugging information from this file. 

\smallskip
{\stt \#define DEBUG 0}


\subsection{Functions}


\subsubsection{Global Function AddToStringList()}
\label{func_AddToStringList_slist.c}

  Add a string to the string list, the list stores a Malloced copy of str.

\smallskip
{\stt void AddToStringList ( StringList sl, char* str, int alphalist, int uniqlist )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{StringList sl} The string list to add to.
\cxrefargitem{char* str} The string to add.
\cxrefargitem{int alphalist} If true then the list is sorted into alphabetical order.
\cxrefargitem{int uniqlist} If true then duplicated entries are not allowed to be added.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeMalloc() & memory.c & \cxreffunc{SafeMalloc}{memory.c}\\
\ & SafeMallocString() & memory.c & \cxreffunc{SafeMallocString}{memory.c}\\
\ & SafeRealloc() & memory.c & \cxreffunc{SafeRealloc}{memory.c}\\
\cxreftabbreak{cxreftabiii}
\ & \cxreftabiiispan{ strcmp()} &\\
Called by:\ & CreateAppendix() & xref.c & \cxreffunc{CreateAppendix}{xref.c}\\
\ & CrossReference() & xref.c & \cxreffunc{CrossReference}{xref.c}\\
\ & SeenFunctionProto() & func.c & \cxreffunc{SeenFunctionProto}{func.c}\\
\end{cxreftabiii}


\subsubsection{Global Function AddToStringList2()}
\label{func_AddToStringList2_slist.c}

  Add a pair of strings to the string list 2, the list stores a Malloced copy of the arguments.

\smallskip
{\stt void AddToStringList2 ( StringList2 sl, char* str1, char* str2, int alphalist, int uniqlist )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{StringList2 sl} The string list 2 to add to.
\cxrefargitem{char* str1} The first string to add.
\cxrefargitem{char* str2} The second string to add.
\cxrefargitem{int alphalist} If true then the list is sorted into alphabetical order of the first string, then second string.
\cxrefargitem{int uniqlist} If true then duplicated entries of the first string are not allowed to be added.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeMalloc() & memory.c & \cxreffunc{SafeMalloc}{memory.c}\\
\ & SafeMallocString() & memory.c & \cxreffunc{SafeMallocString}{memory.c}\\
\ & SafeRealloc() & memory.c & \cxreffunc{SafeRealloc}{memory.c}\\
\cxreftabbreak{cxreftabiii}
\ & \cxreftabiiispan{ strcmp()} &\\
Called by:\ & CheckFunctionVariableRef() & func.c & \cxreffunc{CheckFunctionVariableRef}{func.c}\\
\ & CreateAppendix() & xref.c & \cxreffunc{CreateAppendix}{xref.c}\\
\ & SeenDefineFunctionArg() & preproc.c & \cxreffunc{SeenDefineFunctionArg}{preproc.c}\\
\ & SeenFunctionArg() & func.c & \cxreffunc{SeenFunctionArg}{func.c}\\
\ & SeenFunctionCall() & func.c & \cxreffunc{SeenFunctionCall}{func.c}\\
\ & SeenFunctionProto() & func.c & \cxreffunc{SeenFunctionProto}{func.c}\\
\ & SeenScopeVariable() & var.c & \cxreffunc{SeenScopeVariable}{var.c}\\
\ & SeenTypedefName() & type.c & \cxreffunc{SeenTypedefName}{type.c}\\
\cxreftabbreak{cxreftabiii}
\ & check\_for\_called() & xref.c & \cxreffunc{check_for_called}{xref.c}\\
\ & check\_for\_var() & xref.c & \cxreffunc{check_for_var}{xref.c}\\
\ & check\_for\_var\_func() & xref.c & \cxreffunc{check_for_var_func}{xref.c}\\
\end{cxreftabiii}


\subsubsection{Global Function DeleteStringList()}
\label{func_DeleteStringList_slist.c}

  Delete a string list.

\smallskip
{\stt void DeleteStringList ( StringList sl )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{StringList sl} The string list to delete.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeFree() & memory.c & \cxreffunc{SafeFree}{memory.c}\\
Called by:\ & DeleteFile() & file.c & \cxreffunc{DeleteFile}{file.c}\\
\ & DeleteFunctionType() & func.c & \cxreffunc{DeleteFunctionType}{func.c}\\
\cxreftabbreak{cxreftabiii}
\ & main() & cxref.c & \cxreffunc{main}{cxref.c}\\
\end{cxreftabiii}


\subsubsection{Global Function DeleteStringList2()}
\label{func_DeleteStringList2_slist.c}

  Delete a string list 2.

\smallskip
{\stt void DeleteStringList2 ( StringList2 sl )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{StringList2 sl} The string list 2 to delete.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeFree() & memory.c & \cxreffunc{SafeFree}{memory.c}\\
Called by:\ & DeleteDefineType() & preproc.c & \cxreffunc{DeleteDefineType}{preproc.c}\\
\ & DeleteFile() & file.c & \cxreffunc{DeleteFile}{file.c}\\
\cxreftabbreak{cxreftabiii}
\ & DeleteFunctionType() & func.c & \cxreffunc{DeleteFunctionType}{func.c}\\
\ & DeleteVariableType() & var.c & \cxreffunc{DeleteVariableType}{var.c}\\
\ & DownScope() & var.c & \cxreffunc{DownScope}{var.c}\\
\ & ResetFunctionAnalyser() & func.c & \cxreffunc{ResetFunctionAnalyser}{func.c}\\
\ & ResetTypeAnalyser() & type.c & \cxreffunc{ResetTypeAnalyser}{type.c}\\
\ & ResetVariableAnalyser() & var.c & \cxreffunc{ResetVariableAnalyser}{var.c}\\
\ & main() & cxref.c & \cxreffunc{main}{cxref.c}\\
\end{cxreftabiii}


\subsubsection{Global Function NewStringList()}
\label{func_NewStringList_slist.c}

  Called to initialise a new string list.

\smallskip
{\stt StringList NewStringList ( void )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{StringList NewStringList} Returns an initialised string list.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeCalloc() & memory.c & \cxreffunc{SafeCalloc}{memory.c}\\
Called by:\ & NewFile() & file.c & \cxreffunc{NewFile}{file.c}\\
\ & NewFunctionType() & func.c & \cxreffunc{NewFunctionType}{func.c}\\
\cxreftabbreak{cxreftabiii}
\ & main() & cxref.c & \cxreffunc{main}{cxref.c}\\
\end{cxreftabiii}


\subsubsection{Global Function NewStringList2()}
\label{func_NewStringList2_slist.c}

  Called to initialise a new string list 2.

\smallskip
{\stt StringList2 NewStringList2 ( void )}

\smallskip
\begin{cxrefarglist}
\cxrefargitem{StringList2 NewStringList2} Returns an initialised string list 2.
\end{cxrefarglist}

\smallskip
\begin{cxreftabiii}
Prototype:& cxref.h & \ & \cxreffile{cxref.h}\\
Calls:\ & SafeCalloc() & memory.c & \cxreffunc{SafeCalloc}{memory.c}\\
Called by:\ & NewDefineType() & preproc.c & \cxreffunc{NewDefineType}{preproc.c}\\
\ & NewFile() & file.c & \cxreffunc{NewFile}{file.c}\\
\cxreftabbreak{cxreftabiii}
\ & NewFunctionType() & func.c & \cxreffunc{NewFunctionType}{func.c}\\
\ & NewVariableType() & var.c & \cxreffunc{NewVariableType}{var.c}\\
\ & SeenFunctionProto() & func.c & \cxreffunc{SeenFunctionProto}{func.c}\\
\ & SeenTypedefName() & type.c & \cxreffunc{SeenTypedefName}{type.c}\\
\ & UpScope() & var.c & \cxreffunc{UpScope}{var.c}\\
\ & main() & cxref.c & \cxreffunc{main}{cxref.c}\\
\end{cxreftabiii}

