\doxysection{include/sphinxbase/glist.h File Reference}
\label{glist_8h}\index{include/sphinxbase/glist.h@{include/sphinxbase/glist.h}}


Generic linked-\/lists maintenance.  


{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/sphinxbase\+\_\+export.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/prim\+\_\+type.\+h$>$}\newline
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ gnode\+\_\+s}
\begin{DoxyCompactList}\small\item\em A node in a generic list. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ gnode\+\_\+ptr}(g)~((g)-\/$>$data.\+ptr)
\begin{DoxyCompactList}\small\item\em Head of a list of gnodes. \end{DoxyCompactList}\item 
\#define \textbf{ gnode\+\_\+int32}(g)~((g)-\/$>$data.\+i)
\item 
\#define \textbf{ gnode\+\_\+uint32}(g)~((g)-\/$>$data.\+ui)
\item 
\#define \textbf{ gnode\+\_\+float32}(g)~((float32)(g)-\/$>$data.\+fl)
\item 
\#define \textbf{ gnode\+\_\+float64}(g)~((g)-\/$>$data.\+fl)
\item 
\#define \textbf{ gnode\+\_\+next}(g)~((g)-\/$>$next)
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\label{glist_8h_a1223ee307d0dccc8e9367066de6271b9} 
typedef struct \textbf{ gnode\+\_\+s} {\bfseries gnode\+\_\+t}
\begin{DoxyCompactList}\small\item\em A node in a generic list. \end{DoxyCompactList}\item 
typedef \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+t}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} \textbf{ glist\+\_\+add\+\_\+ptr} (\textbf{ glist\+\_\+t} g, void $\ast$ptr)
\begin{DoxyCompactList}\small\item\em Create and prepend a new list node, with the given user-\/defined data, at the HEAD of the given generic list. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} \textbf{ glist\+\_\+add\+\_\+int32} (\textbf{ glist\+\_\+t} g, int32 val)
\begin{DoxyCompactList}\small\item\em Create and prepend a new list node containing an integer. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} \textbf{ glist\+\_\+add\+\_\+uint32} (\textbf{ glist\+\_\+t} g, uint32 val)
\begin{DoxyCompactList}\small\item\em Create and prepend a new list node containing an unsigned integer. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} \textbf{ glist\+\_\+add\+\_\+float32} (\textbf{ glist\+\_\+t} g, float32 val)
\begin{DoxyCompactList}\small\item\em Create and prepend a new list node containing a single-\/precision float. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} \textbf{ glist\+\_\+add\+\_\+float64} (\textbf{ glist\+\_\+t} g, float64 val)
\begin{DoxyCompactList}\small\item\em Create and prepend a new list node containing a double-\/precision float. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+insert\+\_\+ptr} (\textbf{ gnode\+\_\+t} $\ast$gn, void $\ast$ptr)
\begin{DoxyCompactList}\small\item\em Create and insert a new list node, with the given user-\/defined data, after the given generic node gn. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+insert\+\_\+int32} (\textbf{ gnode\+\_\+t} $\ast$gn, int32 val)
\begin{DoxyCompactList}\small\item\em Create and insert a new list node containing an integer. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+insert\+\_\+uint32} (\textbf{ gnode\+\_\+t} $\ast$gn, uint32 val)
\begin{DoxyCompactList}\small\item\em Create and insert a new list node containing an unsigned integer. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+insert\+\_\+float32} (\textbf{ gnode\+\_\+t} $\ast$gn, float32 val)
\begin{DoxyCompactList}\small\item\em Create and insert a new list node containing a single-\/precision float. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+insert\+\_\+float64} (\textbf{ gnode\+\_\+t} $\ast$gn, float64 val)
\begin{DoxyCompactList}\small\item\em Create and insert a new list node containing a double-\/precision float. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} \textbf{ glist\+\_\+reverse} (\textbf{ glist\+\_\+t} g)
\begin{DoxyCompactList}\small\item\em Reverse the order of the given glist. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT int32 \textbf{ glist\+\_\+count} (\textbf{ glist\+\_\+t} g)
\begin{DoxyCompactList}\small\item\em Count the number of element in a given link list. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT void \textbf{ glist\+\_\+free} (\textbf{ glist\+\_\+t} g)
\begin{DoxyCompactList}\small\item\em Free the given generic list; user-\/defined data contained within is not automatically freed. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ gnode\+\_\+free} (\textbf{ gnode\+\_\+t} $\ast$gn, \textbf{ gnode\+\_\+t} $\ast$pred)
\begin{DoxyCompactList}\small\item\em Free the given node, gn, of a glist, pred being its predecessor in the list. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ \textbf{ glist\+\_\+tail} (\textbf{ glist\+\_\+t} g)
\begin{DoxyCompactList}\small\item\em Return the last node in the given list. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Generic linked-\/lists maintenance. 

Only insert at the head of the list. A convenient little linked-\/list package, but a double-\/edged sword\+: the user must keep track of the data type within the linked list elements. When it was first written, there was no selective deletions except to destroy the entire list. This is modified in later version.

(C++ would be good for this, but that\textquotesingle{}s a double-\/edged sword as well.) 

Definition in file \textbf{ glist.\+h}.



\doxysubsection{Macro Definition Documentation}
\label{glist_8h_aaf6a2bdc69642303426c20fc0bdfa5f6} 
\index{glist.h@{glist.h}!gnode\_float32@{gnode\_float32}}
\index{gnode\_float32@{gnode\_float32}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_float32}
{\footnotesize\ttfamily \#define gnode\+\_\+float32(\begin{DoxyParamCaption}\item[{}]{g }\end{DoxyParamCaption})~((float32)(g)-\/$>$data.\+fl)}



Definition at line \textbf{ 112} of file \textbf{ glist.\+h}.

\label{glist_8h_abfea8eee77afc1e3046ef33ae6c0f5b4} 
\index{glist.h@{glist.h}!gnode\_float64@{gnode\_float64}}
\index{gnode\_float64@{gnode\_float64}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_float64}
{\footnotesize\ttfamily \#define gnode\+\_\+float64(\begin{DoxyParamCaption}\item[{}]{g }\end{DoxyParamCaption})~((g)-\/$>$data.\+fl)}



Definition at line \textbf{ 113} of file \textbf{ glist.\+h}.

\label{glist_8h_a7daab0205c40d1b449529ee4cc54522b} 
\index{glist.h@{glist.h}!gnode\_int32@{gnode\_int32}}
\index{gnode\_int32@{gnode\_int32}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_int32}
{\footnotesize\ttfamily \#define gnode\+\_\+int32(\begin{DoxyParamCaption}\item[{}]{g }\end{DoxyParamCaption})~((g)-\/$>$data.\+i)}



Definition at line \textbf{ 110} of file \textbf{ glist.\+h}.

\label{glist_8h_a33fc794db097ba2a5a36eba12c418993} 
\index{glist.h@{glist.h}!gnode\_next@{gnode\_next}}
\index{gnode\_next@{gnode\_next}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_next}
{\footnotesize\ttfamily \#define gnode\+\_\+next(\begin{DoxyParamCaption}\item[{}]{g }\end{DoxyParamCaption})~((g)-\/$>$next)}



Definition at line \textbf{ 114} of file \textbf{ glist.\+h}.

\label{glist_8h_ace56682f14d84cc456c805d26fd86734} 
\index{glist.h@{glist.h}!gnode\_ptr@{gnode\_ptr}}
\index{gnode\_ptr@{gnode\_ptr}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_ptr}
{\footnotesize\ttfamily \#define gnode\+\_\+ptr(\begin{DoxyParamCaption}\item[{}]{g }\end{DoxyParamCaption})~((g)-\/$>$data.\+ptr)}



Head of a list of gnodes. 

Access macros, for convenience 

Definition at line \textbf{ 109} of file \textbf{ glist.\+h}.

\label{glist_8h_a3af0cc8d5d612e85fa433ac3edf42fd6} 
\index{glist.h@{glist.h}!gnode\_uint32@{gnode\_uint32}}
\index{gnode\_uint32@{gnode\_uint32}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_uint32}
{\footnotesize\ttfamily \#define gnode\+\_\+uint32(\begin{DoxyParamCaption}\item[{}]{g }\end{DoxyParamCaption})~((g)-\/$>$data.\+ui)}



Definition at line \textbf{ 111} of file \textbf{ glist.\+h}.



\doxysubsection{Typedef Documentation}
\label{glist_8h_a576a9ce77a5af8b912e75b32bce607f2} 
\index{glist.h@{glist.h}!glist\_t@{glist\_t}}
\index{glist\_t@{glist\_t}!glist.h@{glist.h}}
\doxysubsubsection{glist\_t}
{\footnotesize\ttfamily typedef \textbf{ gnode\+\_\+t}$\ast$ \textbf{ glist\+\_\+t}}



Definition at line \textbf{ 104} of file \textbf{ glist.\+h}.



\doxysubsection{Function Documentation}
\label{glist_8h_a4fc4db2fbebd7b659554227d411f6737} 
\index{glist.h@{glist.h}!glist\_add\_float32@{glist\_add\_float32}}
\index{glist\_add\_float32@{glist\_add\_float32}!glist.h@{glist.h}}
\doxysubsubsection{glist\_add\_float32()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} glist\+\_\+add\+\_\+float32 (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g,  }\item[{float32}]{val }\end{DoxyParamCaption})}



Create and prepend a new list node containing a single-\/precision float. 


\begin{DoxyParams}{Parameters}
{\em g} & a link list  \\
\hline
{\em val} & a float32 vlaue \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 110} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+add\+\_\+float32()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+add\+\_\+float32()}, and \textbf{ ngram\+\_\+model\+\_\+add\+\_\+class()}.

\label{glist_8h_a5bdd11639ef5846abb7ceb6caf059f4e} 
\index{glist.h@{glist.h}!glist\_add\_float64@{glist\_add\_float64}}
\index{glist\_add\_float64@{glist\_add\_float64}!glist.h@{glist.h}}
\doxysubsubsection{glist\_add\_float64()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} glist\+\_\+add\+\_\+float64 (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g,  }\item[{float64}]{val }\end{DoxyParamCaption})}



Create and prepend a new list node containing a double-\/precision float. 


\begin{DoxyParams}{Parameters}
{\em g} & a link list  \\
\hline
{\em val} & a float64 vlaue \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 122} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+add\+\_\+float64()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+add\+\_\+float64()}.

\label{glist_8h_a28adfcc24a784aaed1a0b3c4c4de4c42} 
\index{glist.h@{glist.h}!glist\_add\_int32@{glist\_add\_int32}}
\index{glist\_add\_int32@{glist\_add\_int32}!glist.h@{glist.h}}
\doxysubsubsection{glist\_add\_int32()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} glist\+\_\+add\+\_\+int32 (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g,  }\item[{int32}]{val }\end{DoxyParamCaption})}



Create and prepend a new list node containing an integer. 


\begin{DoxyParams}{Parameters}
{\em g} & a link list  \\
\hline
{\em val} & an integer value \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 86} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+add\+\_\+int32()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+add\+\_\+int32()}, and \textbf{ parse\+\_\+subvecs()}.

\label{glist_8h_a77a9c20b7df5a289477af405ab778377} 
\index{glist.h@{glist.h}!glist\_add\_ptr@{glist\_add\_ptr}}
\index{glist\_add\_ptr@{glist\_add\_ptr}!glist.h@{glist.h}}
\doxysubsubsection{glist\_add\_ptr()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} glist\+\_\+add\+\_\+ptr (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g,  }\item[{void $\ast$}]{ptr }\end{DoxyParamCaption})}



Create and prepend a new list node, with the given user-\/defined data, at the HEAD of the given generic list. 

Return the new list thus formed. g may be NULL to indicate an initially empty list. 
\begin{DoxyParams}{Parameters}
{\em g} & a link list  \\
\hline
{\em ptr} & a pointer \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 74} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+add\+\_\+ptr()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+add\+\_\+ptr()}, \textbf{ hash\+\_\+table\+\_\+tolist()}, \textbf{ jsgf\+\_\+grammar\+\_\+new()}, \textbf{ ngram\+\_\+model\+\_\+set\+\_\+read()}, and \textbf{ parse\+\_\+subvecs()}.

\label{glist_8h_aeb741d435322f34df5e5d3a99abf00de} 
\index{glist.h@{glist.h}!glist\_add\_uint32@{glist\_add\_uint32}}
\index{glist\_add\_uint32@{glist\_add\_uint32}!glist.h@{glist.h}}
\doxysubsubsection{glist\_add\_uint32()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} glist\+\_\+add\+\_\+uint32 (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g,  }\item[{uint32}]{val }\end{DoxyParamCaption})}



Create and prepend a new list node containing an unsigned integer. 


\begin{DoxyParams}{Parameters}
{\em g} & a link list  \\
\hline
{\em val} & an unsigned integer value \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 98} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+add\+\_\+uint32()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+add\+\_\+uint32()}.

\label{glist_8h_aeb046e39c540d2f5f792119ea0d24c48} 
\index{glist.h@{glist.h}!glist\_count@{glist\_count}}
\index{glist\_count@{glist\_count}!glist.h@{glist.h}}
\doxysubsubsection{glist\_count()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT int32 glist\+\_\+count (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g }\end{DoxyParamCaption})}



Count the number of element in a given link list. 

\begin{DoxyReturn}{Returns}
the number of elements in the given glist\+\_\+t 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em g} & input link list \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 145} of file \textbf{ glist.\+c}.



References \textbf{ glist\+\_\+count()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+count()}, \textbf{ ngram\+\_\+model\+\_\+set\+\_\+read()}, and \textbf{ parse\+\_\+subvecs()}.

\label{glist_8h_a45380e15d2c33afc554fd60a8828580c} 
\index{glist.h@{glist.h}!glist\_free@{glist\_free}}
\index{glist\_free@{glist\_free}!glist.h@{glist.h}}
\doxysubsubsection{glist\_free()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT void glist\+\_\+free (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g }\end{DoxyParamCaption})}



Free the given generic list; user-\/defined data contained within is not automatically freed. 

The caller must have done that already. 

Definition at line \textbf{ 133} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+free()}, \textbf{ glist\+\_\+free()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ cmd\+\_\+ln\+\_\+free\+\_\+r()}, \textbf{ glist\+\_\+free()}, \textbf{ jsgf\+\_\+grammar\+\_\+free()}, \textbf{ listelem\+\_\+alloc\+\_\+free()}, \textbf{ ngram\+\_\+model\+\_\+add\+\_\+class()}, \textbf{ ngram\+\_\+model\+\_\+read\+\_\+classdef()}, \textbf{ ngram\+\_\+model\+\_\+set\+\_\+read()}, and \textbf{ parse\+\_\+subvecs()}.

\label{glist_8h_a2ef44165148eeda3587dbe7b1602ea9e} 
\index{glist.h@{glist.h}!glist\_insert\_float32@{glist\_insert\_float32}}
\index{glist\_insert\_float32@{glist\_insert\_float32}!glist.h@{glist.h}}
\doxysubsubsection{glist\_insert\_float32()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ glist\+\_\+insert\+\_\+float32 (\begin{DoxyParamCaption}\item[{\textbf{ gnode\+\_\+t} $\ast$}]{gn,  }\item[{float32}]{val }\end{DoxyParamCaption})}



Create and insert a new list node containing a single-\/precision float. 


\begin{DoxyParams}{Parameters}
{\em gn} & a generic node which a value will be inserted after it  \\
\hline
{\em val} & float32 inserted \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 230} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+insert\+\_\+float32()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+insert\+\_\+float32()}.

\label{glist_8h_a4c69c136c7f18f584693cc236d512941} 
\index{glist.h@{glist.h}!glist\_insert\_float64@{glist\_insert\_float64}}
\index{glist\_insert\_float64@{glist\_insert\_float64}!glist.h@{glist.h}}
\doxysubsubsection{glist\_insert\_float64()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ glist\+\_\+insert\+\_\+float64 (\begin{DoxyParamCaption}\item[{\textbf{ gnode\+\_\+t} $\ast$}]{gn,  }\item[{float64}]{val }\end{DoxyParamCaption})}



Create and insert a new list node containing a double-\/precision float. 


\begin{DoxyParams}{Parameters}
{\em gn} & a generic node which a value will be inserted after it  \\
\hline
{\em val} & float64 inserted \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 244} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+insert\+\_\+float64()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+insert\+\_\+float64()}.

\label{glist_8h_ad86f3c243a9bfd02938f42db0b76ca4c} 
\index{glist.h@{glist.h}!glist\_insert\_int32@{glist\_insert\_int32}}
\index{glist\_insert\_int32@{glist\_insert\_int32}!glist.h@{glist.h}}
\doxysubsubsection{glist\_insert\_int32()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ glist\+\_\+insert\+\_\+int32 (\begin{DoxyParamCaption}\item[{\textbf{ gnode\+\_\+t} $\ast$}]{gn,  }\item[{int32}]{val }\end{DoxyParamCaption})}



Create and insert a new list node containing an integer. 


\begin{DoxyParams}{Parameters}
{\em gn} & a generic node which a value will be inserted after it  \\
\hline
{\em val} & int32 inserted \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 201} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+insert\+\_\+int32()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+insert\+\_\+int32()}.

\label{glist_8h_a29a6ce9b66599d89ebdbba7f6226983b} 
\index{glist.h@{glist.h}!glist\_insert\_ptr@{glist\_insert\_ptr}}
\index{glist\_insert\_ptr@{glist\_insert\_ptr}!glist.h@{glist.h}}
\doxysubsubsection{glist\_insert\_ptr()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ glist\+\_\+insert\+\_\+ptr (\begin{DoxyParamCaption}\item[{\textbf{ gnode\+\_\+t} $\ast$}]{gn,  }\item[{void $\ast$}]{ptr }\end{DoxyParamCaption})}



Create and insert a new list node, with the given user-\/defined data, after the given generic node gn. 

gn cannot be NULL. Return ptr to the newly created gnode\+\_\+t. 
\begin{DoxyParams}{Parameters}
{\em gn} & a generic node which ptr will be inserted after it  \\
\hline
{\em ptr} & pointer inserted \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 187} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+insert\+\_\+ptr()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+insert\+\_\+ptr()}.

\label{glist_8h_a254c4cf6a654e3787d0c5c8fffbcbbe3} 
\index{glist.h@{glist.h}!glist\_insert\_uint32@{glist\_insert\_uint32}}
\index{glist\_insert\_uint32@{glist\_insert\_uint32}!glist.h@{glist.h}}
\doxysubsubsection{glist\_insert\_uint32()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ glist\+\_\+insert\+\_\+uint32 (\begin{DoxyParamCaption}\item[{\textbf{ gnode\+\_\+t} $\ast$}]{gn,  }\item[{uint32}]{val }\end{DoxyParamCaption})}



Create and insert a new list node containing an unsigned integer. 


\begin{DoxyParams}{Parameters}
{\em gn} & a generic node which a value will be inserted after it  \\
\hline
{\em val} & uint32 inserted \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 215} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+calloc}, \textbf{ glist\+\_\+insert\+\_\+uint32()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+insert\+\_\+uint32()}.

\label{glist_8h_a399a2a093c6c4ce1012762e4c25c8185} 
\index{glist.h@{glist.h}!glist\_reverse@{glist\_reverse}}
\index{glist\_reverse@{glist\_reverse}!glist.h@{glist.h}}
\doxysubsubsection{glist\_reverse()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ glist\+\_\+t} glist\+\_\+reverse (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g }\end{DoxyParamCaption})}



Reverse the order of the given glist. 

(glist\+\_\+add() adds to the head; one might ultimately want the reverse of that.) NOTE\+: The list is reversed "{}in place"{}; i.\+e., no new memory is allocated. \begin{DoxyReturn}{Returns}
\+: The head of the new list. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em g} & input link list \\
\hline
\end{DoxyParams}


Definition at line \textbf{ 169} of file \textbf{ glist.\+c}.



References \textbf{ glist\+\_\+reverse()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+reverse()}, \textbf{ jsgf\+\_\+grammar\+\_\+new()}, \textbf{ ngram\+\_\+model\+\_\+add\+\_\+class()}, and \textbf{ ngram\+\_\+model\+\_\+set\+\_\+read()}.

\label{glist_8h_a9db020929a879f19f1b61672d7978e43} 
\index{glist.h@{glist.h}!glist\_tail@{glist\_tail}}
\index{glist\_tail@{glist\_tail}!glist.h@{glist.h}}
\doxysubsubsection{glist\_tail()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ glist\+\_\+tail (\begin{DoxyParamCaption}\item[{\textbf{ glist\+\_\+t}}]{g }\end{DoxyParamCaption})}



Return the last node in the given list. 



Definition at line \textbf{ 156} of file \textbf{ glist.\+c}.



References \textbf{ glist\+\_\+tail()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ glist\+\_\+tail()}.

\label{glist_8h_a98615f622c826b64431c0f7720c2c230} 
\index{glist.h@{glist.h}!gnode\_free@{gnode\_free}}
\index{gnode\_free@{gnode\_free}!glist.h@{glist.h}}
\doxysubsubsection{gnode\_free()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ gnode\+\_\+t} $\ast$ gnode\+\_\+free (\begin{DoxyParamCaption}\item[{\textbf{ gnode\+\_\+t} $\ast$}]{gn,  }\item[{\textbf{ gnode\+\_\+t} $\ast$}]{pred }\end{DoxyParamCaption})}



Free the given node, gn, of a glist, pred being its predecessor in the list. 

Return ptr to the next node in the list after the freed node. 

Definition at line \textbf{ 257} of file \textbf{ glist.\+c}.



References \textbf{ ckd\+\_\+free()}, \textbf{ gnode\+\_\+free()}, and \textbf{ gnode\+\_\+s\+::next}.



Referenced by \textbf{ gnode\+\_\+free()}.

