\doxysection{listelem\+\_\+alloc.\+h}
\label{listelem__alloc_8h_source}\index{include/sphinxbase/listelem\_alloc.h@{include/sphinxbase/listelem\_alloc.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*\ -\/*-\/\ c-\/basic-\/offset:\ 4;\ indent-\/tabs-\/mode:\ nil\ -\/*-\/\ */}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*\ ====================================================================}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Copyright\ (c)\ 1999-\/2004\ Carnegie\ Mellon\ University.\ \ All\ rights}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ Redistribution\ and\ use\ in\ source\ and\ binary\ forms,\ with\ or\ without}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ modification,\ are\ permitted\ provided\ that\ the\ following\ conditions}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ are\ met:}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ 1.\ Redistributions\ of\ source\ code\ must\ retain\ the\ above\ copyright}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer.\ }}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ 2.\ Redistributions\ in\ binary\ form\ must\ reproduce\ the\ above\ copyright}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer\ in}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ \ \ the\ documentation\ and/or\ other\ materials\ provided\ with\ the}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ \ \ distribution.}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ This\ work\ was\ supported\ in\ part\ by\ funding\ from\ the\ Defense\ Advanced\ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ Research\ Projects\ Agency\ and\ the\ National\ Science\ Foundation\ of\ the\ }}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ United\ States\ of\ America,\ and\ the\ CMU\ Sphinx\ Speech\ Consortium.}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ THIS\ SOFTWARE\ IS\ PROVIDED\ BY\ CARNEGIE\ MELLON\ UNIVERSITY\ \`{}\`{}AS\ IS''\ AND\ }}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ ANY\ EXPRESSED\ OR\ IMPLIED\ WARRANTIES,\ INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ }}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *\ THE\ IMPLIED\ WARRANTIES\ OF\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ A\ PARTICULAR}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ PURPOSE\ ARE\ DISCLAIMED.\ \ IN\ NO\ EVENT\ SHALL\ CARNEGIE\ MELLON\ UNIVERSITY}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ *\ NOR\ ITS\ EMPLOYEES\ BE\ LIABLE\ FOR\ ANY\ DIRECT,\ INDIRECT,\ INCIDENTAL,}}
\DoxyCodeLine{00027\ \textcolor{comment}{\ *\ SPECIAL,\ EXEMPLARY,\ OR\ CONSEQUENTIAL\ DAMAGES\ (INCLUDING,\ BUT\ NOT\ }}
\DoxyCodeLine{00028\ \textcolor{comment}{\ *\ LIMITED\ TO,\ PROCUREMENT\ OF\ SUBSTITUTE\ GOODS\ OR\ SERVICES;\ LOSS\ OF\ USE,\ }}
\DoxyCodeLine{00029\ \textcolor{comment}{\ *\ DATA,\ OR\ PROFITS;\ OR\ BUSINESS\ INTERRUPTION)\ HOWEVER\ CAUSED\ AND\ ON\ ANY\ }}
\DoxyCodeLine{00030\ \textcolor{comment}{\ *\ THEORY\ OF\ LIABILITY,\ WHETHER\ IN\ CONTRACT,\ STRICT\ LIABILITY,\ OR\ TORT\ }}
\DoxyCodeLine{00031\ \textcolor{comment}{\ *\ (INCLUDING\ NEGLIGENCE\ OR\ OTHERWISE)\ ARISING\ IN\ ANY\ WAY\ OUT\ OF\ THE\ USE\ }}
\DoxyCodeLine{00032\ \textcolor{comment}{\ *\ OF\ THIS\ SOFTWARE,\ EVEN\ IF\ ADVISED\ OF\ THE\ POSSIBILITY\ OF\ SUCH\ DAMAGE.}}
\DoxyCodeLine{00033\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *\ ====================================================================}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00036\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#ifndef\ \_\_LISTELEM\_ALLOC\_H\_\_}}
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\#define\ \_\_LISTELEM\_ALLOC\_H\_\_}}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00046\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#if\ 0}}
\DoxyCodeLine{00049\ \textcolor{comment}{/*\ Fool\ Emacs.\ */}}
\DoxyCodeLine{00050\ \}}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#ifdef\ S60}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#include\ <types.h>}}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00058\ \textcolor{comment}{/*\ Win32/WinCE\ DLL\ gunk\ */}}
\DoxyCodeLine{00059\ \textcolor{preprocessor}{\#include\ <sphinxbase/sphinxbase\_export.h>}}
\DoxyCodeLine{00060\ \textcolor{preprocessor}{\#include\ <sphinxbase/prim\_type.h>}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00065\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }listelem\_alloc\_s\ listelem\_alloc\_t;}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00070\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00071\ listelem\_alloc\_t\ *\ listelem\_alloc\_init(\textcolor{keywordtype}{size\_t}\ elemsize);}
\DoxyCodeLine{00072\ }
\DoxyCodeLine{00076\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00077\ \textcolor{keywordtype}{void}\ listelem\_alloc\_free(listelem\_alloc\_t\ *le);}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00080\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00081\ \textcolor{keywordtype}{void}\ *\_\_listelem\_malloc\_\_(listelem\_alloc\_t\ *le,\ \textcolor{keywordtype}{char}\ *file,\ \textcolor{keywordtype}{int}\ line);}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00086\ \textcolor{preprocessor}{\#define\ listelem\_malloc(le)\ \ \ \ \ \_\_listelem\_malloc\_\_((le),\_\_FILE\_\_,\_\_LINE\_\_)}}
\DoxyCodeLine{00087\ }
\DoxyCodeLine{00088\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00089\ \textcolor{keywordtype}{void}\ *\_\_listelem\_malloc\_id\_\_(listelem\_alloc\_t\ *le,\ \textcolor{keywordtype}{char}\ *file,\ \textcolor{keywordtype}{int}\ line,}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ *out\_id);}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#define\ listelem\_malloc\_id(le,\ oid)\ \ \ \ \ \_\_listelem\_malloc\_id\_\_((le),\_\_FILE\_\_,\_\_LINE\_\_,(oid))}}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00100\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00101\ \textcolor{keywordtype}{void}\ *listelem\_get\_item(listelem\_alloc\_t\ *le,\ int32\ \textcolor{keywordtype}{id});}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00106\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00107\ \textcolor{keywordtype}{void}\ \_\_listelem\_free\_\_(listelem\_alloc\_t\ *le,\ \textcolor{keywordtype}{void}\ *elem,\ \textcolor{keywordtype}{char}\ *file,\ \textcolor{keywordtype}{int}\ line);}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00112\ \textcolor{preprocessor}{\#define\ listelem\_free(le,el)\ \ \ \ \_\_listelem\_free\_\_((le),(el),\_\_FILE\_\_,\_\_LINE\_\_)}}
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00117\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00118\ \textcolor{keywordtype}{void}\ listelem\_stats(listelem\_alloc\_t\ *le);}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00122\ \}}
\DoxyCodeLine{00123\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
