stack.c File Reference

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.

Detailed Description

this file will contain all required definitions and basic stack functions.

Author:
Anshul Gupta,Nikhil Jain
Date:
3/31/2010

Definition in file stack.c.


Function Documentation

void initialize ( Stack *  s  ) 

The function is used to initialize the top of the stack to NULL.

Returns:
Nothing
Parameters:
s The reference to the stack

Definition at line 83 of file stack.c.

Referenced by main().

int isempty ( Stack *  s  ) 

The function is used to check whether the stack is empty or not.

Returns:
TRUE if empty, FALSE otherwise
Parameters:
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.

Returns:
The element popped if sucessfull, FALSE otherwise
Parameters:
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.

Returns:
TRUE is the push was successfull, FALSE otherwise
Parameters:
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().

int top ( Stack *  s  ) 

The function is used to return top of the stack without popping it off.

Returns:
Top os the stack if successfull, FALSE otherwise
Parameters:
s The reference to the stack

Definition at line 48 of file stack.c.


Generated on Wed Apr 7 02:39:08 2010 for MultithreadedInternetDownloadManager by  doxygen 1.6.1