view include/operations.h @ 7:089efc170bb0

Added operations log and exp since I have the code for them already...
author Jonathan Pevarnek <pevarnj@gmail.com>
date Sun, 06 Mar 2011 01:55:09 -0500
parents 8676cf44c307
children 25b2b501a5fa
line wrap: on
line source

#ifndef __OPERATIONS_H
#define __OPERATIONS_H

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

enum Operation {PRINT, ADD, SUB, MULT, DIV, POW, DUP, DROP, LOG, EXP, 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_pow(struct Stack *stack);
void op_dup(struct Stack *stack);
void op_drop(struct Stack *stack);
void op_log(struct Stack *stack);
void op_exp(struct Stack *stack);

#endif //__OPERATIONS_H