this file will contain all required definitions and basic stack functions. More...
#include "stack.h"
#include <stdio.h>
#include <malloc.h>
Go to the source code of this file.
Classes | |
struct | node |
The structure used for stack. More... | |
Functions | |
int | push (Stack *s, int elt) |
The function is used to push some value on to the stack. | |
int | top (Stack *s) |
The function is used to return top of the stack without popping it off. | |
int | isempty (Stack *s) |
The function is used to check whether the stack is empty or not. | |
void | initialize (Stack *s) |
The function is used to initialize the top of the stack to NULL. | |
int | pop (Stack *s) |
The function is used to pop some value off the stack. |
this file will contain all required definitions and basic stack functions.
Definition in file stack.c.
void initialize | ( | Stack * | s | ) |
int isempty | ( | Stack * | s | ) |
The function is used to check whether the stack is empty or not.
s | The reference to the stack |
Definition at line 67 of file stack.c.
Referenced by buttonclicked().
int pop | ( | Stack * | s | ) |
The function is used to pop some value off the stack.
s | The reference to the stack |
Definition at line 95 of file stack.c.
References node::data, and temp.
Referenced by buttonclicked().
int push | ( | Stack * | s, | |
int | elt | |||
) |
The function is used to push some value on to the stack.
s | The reference to the stack | |
elt | The element to be pushed |
Definition at line 32 of file stack.c.
Referenced by buttonclicked(), main(), and threadHandler().