Mercurial > sos > sos
view include/stack.h @ 99:2a0aa3efc228
The shell script will now theroretically load the program into memory, will not run it.
The shell script loads a program into memory and displays the address but as
of now does not jump to it (though it does display the address it would jump to)
Added a memset function
Added a python script (credit for its writing to Jeff) that sets up a filesystem
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Sat, 14 May 2011 19:40:18 -0400 |
parents | c1ad124f2aaf |
children |
line wrap: on
line source
#ifndef __STACK_H #define __STACK_H typedef double eltType; struct STACKELT { eltType elt; struct STACKELT *next; }; typedef struct STACKELT StackElt; struct STACK { StackElt* top; unsigned int size; }; typedef struct STACK Stack; short pop(Stack *stack, eltType *value); //pop returns 0 on success and -1 on failure. If the function call is //successful, *value will be the value removed from the stack void push(Stack *stack, eltType val); Stack* stack_init(); void stack_destroy(Stack *stack); #endif //__STACK_H