\hypertarget{lists_8h}{
\section{libbroadway/include/lists.h File Reference}
\label{lists_8h}\index{libbroadway/include/lists.h@{libbroadway/include/lists.h}}
}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structlinked__node__t}{linked\_\-node\_\-t}
\end{DoxyCompactItemize}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{lists_8h_aeff264245eebfe310d0776832aa6bad1}{linked\_\-walk}(\hyperlink{structlist}{list}, condition)
\begin{DoxyCompactList}\small\item\em Walks a linked list. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structlinked__node__t}{linked\_\-node\_\-t} $\ast$ \hyperlink{lists_8h_a151e6270b84a588fe23e034279fa803d}{linked\_\-make} (size\_\-t size)
\begin{DoxyCompactList}\small\item\em Creates a list node. \item\end{DoxyCompactList}\item 
void $\ast$ \hyperlink{lists_8h_a58f870a931940975f893615f68b487da}{linked\_\-add\_\-first} (void $\ast$l, void $\ast$n)
\begin{DoxyCompactList}\small\item\em Adds a node to the beginning of a list. \item\end{DoxyCompactList}\item 
void $\ast$ \hyperlink{lists_8h_a5c63b1266f8e6c8bd0072b1f53b4b97d}{linked\_\-add\_\-last} (void $\ast$l, void $\ast$n)
\begin{DoxyCompactList}\small\item\em Adds a node to the end of a list. \item\end{DoxyCompactList}\item 
void $\ast$ \hyperlink{lists_8h_a46b6dc6f8212ca3731e94674f675b077}{linked\_\-add\_\-before} (void $\ast$l, void $\ast$n, void $\ast$node)
\begin{DoxyCompactList}\small\item\em Adds a node before another in a list. \item\end{DoxyCompactList}\item 
void $\ast$ \hyperlink{lists_8h_a10b09d8cd72c195d08946bbf1f3cf917}{linked\_\-add\_\-after} (void $\ast$l, void $\ast$n, void $\ast$node)
\begin{DoxyCompactList}\small\item\em Adds a node after another in a list. \item\end{DoxyCompactList}\item 
void \hyperlink{lists_8h_add75cfccc364c9bc532cf1740aeaa41d}{linked\_\-del} (void $\ast$l, void $\ast$node)
\begin{DoxyCompactList}\small\item\em Deletes a node from a list. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
An efficient and expandable double-\/linked list implementation for any usage. 

\subsection{Define Documentation}
\hypertarget{lists_8h_aeff264245eebfe310d0776832aa6bad1}{
\index{lists.h@{lists.h}!linked\_\-walk@{linked\_\-walk}}
\index{linked\_\-walk@{linked\_\-walk}!lists.h@{lists.h}}
\subsubsection[{linked\_\-walk}]{\setlength{\rightskip}{0pt plus 5cm}\#define linked\_\-walk({\bf list}, \/  condition)}}
\label{lists_8h_aeff264245eebfe310d0776832aa6bad1}
{\bfseries Value:}
\begin{DoxyCode}
do { \
        if((list) == NULL) { walk = NULL; break; } \
        for(walk = (list); (walk->next != NULL) && (condition); walk = walk->next
      ); \
        if(!(condition)) walk = NULL; /* Our condition never happened, so we have
       no result */ \
} while(0)
\end{DoxyCode}


Walks a linked list. 

Walks a linked list, checking for a condition, and saving the result in walk. 
\begin{DoxyParams}{Parameters}
\item[{\em list}]the list to walk. \item[{\em condition}]the condition to check each node for. Use walk as the node name. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A node named walk must be existant in the function this is called from. The node that matches the condition will be stored in walk, or NULL if no matching node could be found. 
\end{DoxyReturn}


\subsection{Function Documentation}
\hypertarget{lists_8h_a10b09d8cd72c195d08946bbf1f3cf917}{
\index{lists.h@{lists.h}!linked\_\-add\_\-after@{linked\_\-add\_\-after}}
\index{linked\_\-add\_\-after@{linked\_\-add\_\-after}!lists.h@{lists.h}}
\subsubsection[{linked\_\-add\_\-after}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ linked\_\-add\_\-after (void $\ast$ {\em l}, \/  void $\ast$ {\em n}, \/  void $\ast$ {\em node})}}
\label{lists_8h_a10b09d8cd72c195d08946bbf1f3cf917}


Adds a node after another in a list. 


\begin{DoxyParams}{Parameters}
\item[{\em l}]the list for the node to be added to. \item[{\em n}]the node to be added to the list. \item[{\em node}]the node of which n should come before. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The added node. 
\end{DoxyReturn}
\hypertarget{lists_8h_a46b6dc6f8212ca3731e94674f675b077}{
\index{lists.h@{lists.h}!linked\_\-add\_\-before@{linked\_\-add\_\-before}}
\index{linked\_\-add\_\-before@{linked\_\-add\_\-before}!lists.h@{lists.h}}
\subsubsection[{linked\_\-add\_\-before}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ linked\_\-add\_\-before (void $\ast$ {\em l}, \/  void $\ast$ {\em n}, \/  void $\ast$ {\em node})}}
\label{lists_8h_a46b6dc6f8212ca3731e94674f675b077}


Adds a node before another in a list. 


\begin{DoxyParams}{Parameters}
\item[{\em l}]the list for the node to be added to. \item[{\em n}]the node to be added to the list. \item[{\em node}]the node of which n should come after. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The added node. 
\end{DoxyReturn}
\hypertarget{lists_8h_a58f870a931940975f893615f68b487da}{
\index{lists.h@{lists.h}!linked\_\-add\_\-first@{linked\_\-add\_\-first}}
\index{linked\_\-add\_\-first@{linked\_\-add\_\-first}!lists.h@{lists.h}}
\subsubsection[{linked\_\-add\_\-first}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ linked\_\-add\_\-first (void $\ast$ {\em l}, \/  void $\ast$ {\em n})}}
\label{lists_8h_a58f870a931940975f893615f68b487da}


Adds a node to the beginning of a list. 


\begin{DoxyParams}{Parameters}
\item[{\em l}]the list for the node to be added to. \item[{\em n}]the node to be added to the list. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The added node. 
\end{DoxyReturn}
\hypertarget{lists_8h_a5c63b1266f8e6c8bd0072b1f53b4b97d}{
\index{lists.h@{lists.h}!linked\_\-add\_\-last@{linked\_\-add\_\-last}}
\index{linked\_\-add\_\-last@{linked\_\-add\_\-last}!lists.h@{lists.h}}
\subsubsection[{linked\_\-add\_\-last}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ linked\_\-add\_\-last (void $\ast$ {\em l}, \/  void $\ast$ {\em n})}}
\label{lists_8h_a5c63b1266f8e6c8bd0072b1f53b4b97d}


Adds a node to the end of a list. 


\begin{DoxyParams}{Parameters}
\item[{\em l}]the list for the node to be added to. \item[{\em n}]the node to be added to the list. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The added node. 
\end{DoxyReturn}
\hypertarget{lists_8h_add75cfccc364c9bc532cf1740aeaa41d}{
\index{lists.h@{lists.h}!linked\_\-del@{linked\_\-del}}
\index{linked\_\-del@{linked\_\-del}!lists.h@{lists.h}}
\subsubsection[{linked\_\-del}]{\setlength{\rightskip}{0pt plus 5cm}void linked\_\-del (void $\ast$ {\em l}, \/  void $\ast$ {\em node})}}
\label{lists_8h_add75cfccc364c9bc532cf1740aeaa41d}


Deletes a node from a list. 


\begin{DoxyParams}{Parameters}
\item[{\em l}]the list for the node to be added to. \item[{\em node}]the node to be removed from the list. \end{DoxyParams}
\hypertarget{lists_8h_a151e6270b84a588fe23e034279fa803d}{
\index{lists.h@{lists.h}!linked\_\-make@{linked\_\-make}}
\index{linked\_\-make@{linked\_\-make}!lists.h@{lists.h}}
\subsubsection[{linked\_\-make}]{\setlength{\rightskip}{0pt plus 5cm}{\bf linked\_\-node\_\-t}$\ast$ linked\_\-make (size\_\-t {\em size})}}
\label{lists_8h_a151e6270b84a588fe23e034279fa803d}


Creates a list node. 

Allocates a piece of memory with a specified size, and returns it as a node. 
\begin{DoxyParams}{Parameters}
\item[{\em size}]the size of the nodes data (something like the size of your node might be a good idea). \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A linked\_\-node with the memory size specified. 
\end{DoxyReturn}
