📄 list_8c.tex
字号:
\section{F:/Lab/XML/minixml/list.c File Reference}\label{list_8c}\index{F:/Lab/XML/minixml/list.c@{F:/Lab/XML/minixml/list.c}}C list implementation. {\tt \#include $<$memory.h$>$}\par{\tt \#include $<$stdlib.h$>$}\par{\tt \#include $<$assert.h$>$}\par{\tt \#include $<$stdio.h$>$}\par{\tt \#include \char`\"{}list.h\char`\"{}}\par\subsection*{Functions}\begin{CompactItemize}\item {\bf list\-Ptr} {\bf create\-List} ()\begin{CompactList}\small\item\em create a new list strut \item\end{CompactList}\item {\bf link\-Ptr} {\bf add\-Link} ({\bf list\-Ptr} {\bf list}, void $\ast$data)\begin{CompactList}\small\item\em create a new list strut \item\end{CompactList}\item void {\bf destroy\-List} ({\bf list\-Ptr} $\ast$list\-Ptr\-Ptr, {\bf free\-User\-Data} on\-Free\-Data)\begin{CompactList}\small\item\em destroy a list \item\end{CompactList}\end{CompactItemize}\subsection{Detailed Description}C list implementation. (C) 2007 GEC All rights reserved.\begin{Desc}\item[Author:]Deng Yangjun \end{Desc}\begin{Desc}\item[Date:]2006-1-28 \end{Desc}\subsection{Function Documentation}\index{list.c@{list.c}!addLink@{addLink}}\index{addLink@{addLink}!list.c@{list.c}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf link\-Ptr} add\-Link ({\bf list\-Ptr} {\em list}, void $\ast$ {\em data})}\label{list_8c_c957c98da6030a0a65f935448b446d55}create a new list strut \begin{Desc}\item[Parameters:]\begin{description}\item[{\em list}][in,out]list that will be add the new link \item[{\em data}][in]value of the new link \end{description}\end{Desc}\begin{Desc}\item[Returns:]the new link 's point, can't free it, please free it by destroy\-List or remove\-Link \end{Desc}\index{list.c@{list.c}!createList@{createList}}\index{createList@{createList}!list.c@{list.c}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf list\-Ptr} create\-List ()}\label{list_8c_05d3366e4e8eb7ff831ba4033d7e0d70}create a new list strut \begin{Desc}\item[Returns:]new list pointer, you MUST release it by destroy\-List(list\-Ptr list) \end{Desc}\index{list.c@{list.c}!destroyList@{destroyList}}\index{destroyList@{destroyList}!list.c@{list.c}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void destroy\-List ({\bf list\-Ptr} $\ast$ {\em list\-Ptr\-Ptr}, {\bf free\-User\-Data} {\em on\-Free\-Data})}\label{list_8c_47f7346a9121c80f3c2ee76307399a2b}destroy a list \begin{Desc}\item[Parameters:]\begin{description}\item[{\em list\-Ptr\-Ptr}][in,out] list that will be destroyed, after the function, the list's pointer will be NULL \item[{\em on\-Free\-Data}][in] register user data free hander function. when destroy link, it will be invoked. if you don't need to free user data, you can set it NULL \end{description}\end{Desc}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -