#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <utils.h>
#include "stack.h"
Go to the source code of this file.
Functions | |
discover_xml_stack * | discover_xml_stack_new () |
void | discover_xml_stack_destroy (discover_xml_stack *stack) |
void | discover_xml_stack_push (discover_xml_stack **stack, void *data) |
void * | discover_xml_stack_pop (discover_xml_stack **stack) |
void * | discover_xml_stack_get (discover_xml_stack *stack) |
void * | discover_xml_stack_getbynum (discover_xml_stack *stack, int i) |
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 stack.c.
|
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(). |
|
Return the top item without popping it. |
|
Return the item at depth i on the stack. |
|
Routine responsible for creating the base of the stack Definition at line 48 of file stack.c. Referenced by discover_xml_stack_push(). |
|
Pop an item from the stack. Definition at line 83 of file stack.c. References discover_xml_stack_destroy(). |
|
Push an item onto the stack. Definition at line 69 of file stack.c. References discover_xml_stack_new(). |