view include/operations.h @ 4:90cd3d9a6ca3

Moved function array declaration, modified the ftoa function so it does not return trailing 0s Also added a return value to sGet though that seems to break some things... The errors for this were very odd, see TODO notes in std.c and init.c
author Jonathan Pevarnek <pevarnj@gmail.com>
date Wed, 02 Mar 2011 00:37:32 -0500
parents 0aa0ad9e1cc3
children 8676cf44c307
line wrap: on
line source

#ifndef __OPERATIONS_H
#define __OPERATIONS_H

#include <std.h>
#include <stack.h>

enum Operation {PRINT, ADD, SUB, MULT, DIV, DUP, MAXOP};
extern const char operationNames[MAXOP][10];
extern void (*operation[MAXOP])(struct Stack*);

void op_print(struct Stack *stack);
void op_add(struct Stack *stack);
void op_sub(struct Stack *stack);
void op_mult(struct Stack *stack);
void op_div(struct Stack *stack);
void op_dup(struct Stack *stack);

#endif //__OPERATIONS_H