Add missing doc files
[jabaws.git] / binaries / src / ViennaRNA / doc / latex / list_8h_source.tex
1 \hypertarget{list_8h}{\section{list.\-h}
2 \label{list_8h}\index{/home/asherstnev/\-Projects/\-Java.\-projects/jabaws/secure-\/git/develop/binaries/src/\-Vienna\-R\-N\-A/lib/list.\-h@{/home/asherstnev/\-Projects/\-Java.\-projects/jabaws/secure-\/git/develop/binaries/src/\-Vienna\-R\-N\-A/lib/list.\-h}}
3 }
4
5 \begin{DoxyCode}
6 00001 \textcolor{comment}{/*}
7 00002 \textcolor{comment}{  $Log: list.h,v $}
8 00003 \textcolor{comment}{  Revision 1.2  2000/10/10 08:50:01  ivo}
9 00004 \textcolor{comment}{  some annotation for lclint}
10 00005 \textcolor{comment}{}
11 00006 \textcolor{comment}{  Revision 1.1  1997/08/04 21:05:32  walter}
12 00007 \textcolor{comment}{  Initial revision}
13 00008 \textcolor{comment}{}
14 00009 \textcolor{comment}{*/}
15 00010 
16 00011 \textcolor{preprocessor}{#ifndef \_\_LIST\_H}
17 00012 \textcolor{preprocessor}{}\textcolor{preprocessor}{#define \_\_LIST\_H}
18 00013 \textcolor{preprocessor}{}
19 00014 \textcolor{comment}{/*---------------------- Macros and type definitions ----------------------*/}
20 00015 
21 \hypertarget{list_8h_source_l00016}{}\hyperlink{structLST__BUCKET}{00016} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\hyperlink{structLST__BUCKET}{LST\_BUCKET} \{
22 00017   \textcolor{keyword}{struct }\hyperlink{structLST__BUCKET}{LST\_BUCKET} *next;
23 00018 \}
24 00019 \hyperlink{structLST__BUCKET}{LST\_BUCKET};
25 00020 
26 \hypertarget{list_8h_source_l00021}{}\hyperlink{structLIST}{00021} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\{
27 00022   \textcolor{keywordtype}{int} count;      \textcolor{comment}{/* Number of elements currently in list */}
28 00023   \hyperlink{structLST__BUCKET}{LST\_BUCKET} *head;   \textcolor{comment}{/* Pointer to head element of list      */}
29 00024   \hyperlink{structLST__BUCKET}{LST\_BUCKET} *z;    \textcolor{comment}{/* Pointer to last node of list         */}
30 00025   \hyperlink{structLST__BUCKET}{LST\_BUCKET} hz[2];   \textcolor{comment}{/* Space for head and z nodes           */}
31 00026 \}
32 00027 \hyperlink{structLIST}{LIST};
33 00028 
34 00029 \textcolor{comment}{/* Return a pointer to the user space given the address of the header of}
35 00030 \textcolor{comment}{ * a node.}
36 00031 \textcolor{comment}{ */}
37 00032 
38 00033 \textcolor{preprocessor}{#define LST\_USERSPACE(h)  ((void*)((LST\_BUCKET*)(h) + 1))}
39 00034 \textcolor{preprocessor}{}
40 00035 \textcolor{comment}{/* Return a pointer to the header of a node, given the address of the}
41 00036 \textcolor{comment}{ * user space.}
42 00037 \textcolor{comment}{ */}
43 00038 
44 00039 \textcolor{preprocessor}{#define LST\_HEADER(n)   ((LST\_BUCKET*)(n) - 1)}
45 00040 \textcolor{preprocessor}{}
46 00041 \textcolor{comment}{/* Return a pointer to the user space of the list's head node. This user}
47 00042 \textcolor{comment}{ * space does not actually exist, but it is useful to be able to address}
48 00043 \textcolor{comment}{ * it to enable insertion at the start of the list.}
49 00044 \textcolor{comment}{ */}
50 00045 
51 00046 \textcolor{preprocessor}{#define LST\_HEAD(l)   LST\_USERSPACE((l)->head)}
52 00047 \textcolor{preprocessor}{}
53 00048 \textcolor{comment}{/* Determine if a list is empty}
54 00049 \textcolor{comment}{ */}
55 00050 
56 00051 \textcolor{preprocessor}{#define LST\_EMPTY(l)    ((l)->count == 0)}
57 00052 \textcolor{preprocessor}{}
58 00053 \textcolor{comment}{/*-------------------------- Function Prototypes --------------------------*/}
59 00054 
60 00055 \textcolor{comment}{/*@only@*/}\textcolor{comment}{/*@out@*/} \textcolor{keywordtype}{void} *lst\_newnode (\textcolor{keywordtype}{int} size);
61 00056 \textcolor{keywordtype}{void} lst\_freenode (\textcolor{comment}{/*@only@*/} \textcolor{keywordtype}{void} *node);
62 00057 \textcolor{comment}{/*@only@*/}\textcolor{comment}{/*@out@*/}  \hyperlink{structLIST}{LIST} *lst\_init (\textcolor{keywordtype}{void});
63 00058 \textcolor{keywordtype}{void} lst\_kill (\hyperlink{structLIST}{LIST} * l, \textcolor{keywordtype}{void} (*freeNode) ());
64 00059 \textcolor{keywordtype}{void} lst\_insertafter (\hyperlink{structLIST}{LIST} * l, \textcolor{comment}{/*@keep@*/} \textcolor{keywordtype}{void} *node, \textcolor{keywordtype}{void} *after);
65 00060 \textcolor{keywordtype}{void} *lst\_deletenext (\textcolor{comment}{/*@only@*/} \hyperlink{structLIST}{LIST} * l, \textcolor{keywordtype}{void} *node);
66 00061 \textcolor{comment}{/*@dependent@*/} \textcolor{keywordtype}{void} *lst\_first (\hyperlink{structLIST}{LIST} * l);
67 00062 \textcolor{comment}{/*@dependent@*/} \textcolor{keywordtype}{void} *lst\_next (\textcolor{keywordtype}{void} *prev);
68 00063 \textcolor{keywordtype}{void} lst\_mergesort (\hyperlink{structLIST}{LIST} * l, \textcolor{keywordtype}{int} (*cmp\_func) ());
69 00064 
70 00065 \textcolor{preprocessor}{#endif}
71 \end{DoxyCode}