C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
stack Struct Reference

stack struct defn More...

#include <stack.h>

Data Fields

char * name
 Stack instance name. More...
 
int count
 Total elems present in stack. More...
 
int max_size
 Max Size of stack. More...
 
int top
 Stack Top. More...
 
e_stacktype type
 Stack Type. More...
 
t_gendata
 
f_gen2 push
 stack operations More...
 
f_gen pop
 routine to pop element into stack More...
 
f_genidx peek
 routine to peek elements in stack More...
 
f_full full
 routine to check if stack is full More...
 
f_empty empty
 routine to check if stack is empty More...
 
f_len len
 routine to get len of stack More...
 
f_print print
 routine to print stack contents More...
 
f_vgen destroy
 routine to destroy stack contents More...
 
f_free free
 routies for operating on data More...
 
f_print print_data
 

Detailed Description

stack struct defn

Definition at line 19 of file stack.h.

Field Documentation

◆ count

int count

Total elems present in stack.

Definition at line 22 of file stack.h.

◆ data

t_gen* data

Ptr to link List or array based on type of stack

Definition at line 27 of file stack.h.

◆ destroy

f_vgen destroy

routine to destroy stack contents

Definition at line 36 of file stack.h.

◆ empty

f_empty empty

routine to check if stack is empty

Definition at line 33 of file stack.h.

◆ free

f_free free

routies for operating on data

Definition at line 39 of file stack.h.

◆ full

f_full full

routine to check if stack is full

Definition at line 32 of file stack.h.

◆ len

f_len len

routine to get len of stack

Definition at line 34 of file stack.h.

◆ max_size

int max_size

Max Size of stack.

Definition at line 23 of file stack.h.

◆ name

char* name

Stack instance name.

Definition at line 21 of file stack.h.

◆ peek

f_genidx peek

routine to peek elements in stack

Definition at line 31 of file stack.h.

◆ pop

f_gen pop

routine to pop element into stack

Definition at line 30 of file stack.h.

◆ print

f_print print

routine to print stack contents

Definition at line 35 of file stack.h.

◆ print_data

f_print print_data

Definition at line 40 of file stack.h.

◆ push

f_gen2 push

stack operations

routine to push element into stack

Definition at line 29 of file stack.h.

◆ top

int top

Stack Top.

Definition at line 24 of file stack.h.

◆ type

Stack Type.

See also
types of stack

Definition at line 25 of file stack.h.


The documentation for this struct was generated from the following file: