File: stack_8c.tex

package info (click to toggle)
discover 2.1.2-10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,756 kB
  • sloc: sh: 7,862; ansic: 7,280; xml: 1,809; makefile: 679
file content (86 lines) | stat: -rw-r--r-- 4,331 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
\section{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/stack.c File Reference}
\label{stack_8c}\index{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/stack.c@{/home/pere/src/debiancvs/pkg-discover/discover/trunk/lib/stack.c}}
Stack routines for Discover. 

{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$assert.h$>$}\par
{\tt \#include $<$stdbool.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$discover/utils.h$>$}\par
{\tt \#include $<$discover/stack.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
discover\_\-xml\_\-stack $\ast$ {\bf discover\_\-xml\_\-stack\_\-new} ()
\item 
void {\bf discover\_\-xml\_\-stack\_\-destroy} (discover\_\-xml\_\-stack $\ast$stack)
\item 
void {\bf discover\_\-xml\_\-stack\_\-push} (discover\_\-xml\_\-stack $\ast$$\ast$stack, void $\ast$data)
\item 
void $\ast$ {\bf discover\_\-xml\_\-stack\_\-pop} (discover\_\-xml\_\-stack $\ast$$\ast$stack)
\item 
void $\ast$ {\bf discover\_\-xml\_\-stack\_\-get} (discover\_\-xml\_\-stack $\ast$stack)
\item 
void $\ast$ {\bf discover\_\-xml\_\-stack\_\-getbynum} (discover\_\-xml\_\-stack $\ast$stack, int i)
\end{CompactItemize}


\subsection{Detailed Description}
Stack routines for Discover. 

This is a generic stack routine that Discover uses. The stack is needed because there wasn't a good way to track the traversal depth through the XML data. These routines brought much sanity to the XML parsing process. They are generic enough that they can be used for any number of applications. 

Definition in file {\bf stack.c}.

\subsection{Function Documentation}
\index{stack.c@{stack.c}!discover_xml_stack_destroy@{discover\_\-xml\_\-stack\_\-destroy}}
\index{discover_xml_stack_destroy@{discover\_\-xml\_\-stack\_\-destroy}!stack.c@{stack.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-stack\_\-destroy (discover\_\-xml\_\-stack $\ast$ {\em stack})}\label{stack_8c_a1}


Routine responsible for destroying the stack base once we're done 

Definition at line 62 of file stack.c.

Referenced by discover\_\-xml\_\-stack\_\-pop().\index{stack.c@{stack.c}!discover_xml_stack_get@{discover\_\-xml\_\-stack\_\-get}}
\index{discover_xml_stack_get@{discover\_\-xml\_\-stack\_\-get}!stack.c@{stack.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ discover\_\-xml\_\-stack\_\-get (discover\_\-xml\_\-stack $\ast$ {\em stack})}\label{stack_8c_a4}


Return the top item without popping it. 

Definition at line 103 of file stack.c.\index{stack.c@{stack.c}!discover_xml_stack_getbynum@{discover\_\-xml\_\-stack\_\-getbynum}}
\index{discover_xml_stack_getbynum@{discover\_\-xml\_\-stack\_\-getbynum}!stack.c@{stack.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ discover\_\-xml\_\-stack\_\-getbynum (discover\_\-xml\_\-stack $\ast$ {\em stack}, int {\em i})}\label{stack_8c_a5}


Return the item at depth i on the stack. 

Definition at line 109 of file stack.c.\index{stack.c@{stack.c}!discover_xml_stack_new@{discover\_\-xml\_\-stack\_\-new}}
\index{discover_xml_stack_new@{discover\_\-xml\_\-stack\_\-new}!stack.c@{stack.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}discover\_\-xml\_\-stack$\ast$ discover\_\-xml\_\-stack\_\-new ()}\label{stack_8c_a0}


Routine responsible for creating the base of the stack 

Definition at line 48 of file stack.c.

Referenced by discover\_\-xml\_\-stack\_\-push().\index{stack.c@{stack.c}!discover_xml_stack_pop@{discover\_\-xml\_\-stack\_\-pop}}
\index{discover_xml_stack_pop@{discover\_\-xml\_\-stack\_\-pop}!stack.c@{stack.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ discover\_\-xml\_\-stack\_\-pop (discover\_\-xml\_\-stack $\ast$$\ast$ {\em stack})}\label{stack_8c_a3}


Pop an item from the stack. 

Definition at line 83 of file stack.c.

References discover\_\-xml\_\-stack\_\-destroy().\index{stack.c@{stack.c}!discover_xml_stack_push@{discover\_\-xml\_\-stack\_\-push}}
\index{discover_xml_stack_push@{discover\_\-xml\_\-stack\_\-push}!stack.c@{stack.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void discover\_\-xml\_\-stack\_\-push (discover\_\-xml\_\-stack $\ast$$\ast$ {\em stack}, void $\ast$ {\em data})}\label{stack_8c_a2}


Push an item onto the stack. 

Definition at line 69 of file stack.c.

References discover\_\-xml\_\-stack\_\-new().