view include/operations.h @ 3:0aa0ad9e1cc3

Converted to work with doubles instead of ints (and other changes) Yeah, I really should have done this in seperate commits... My mistake in operations.h was fixed, the name table is now defined in operations.c All operations have been modified to start with op_ so I can identify the functions easier Functions ftoa and atof were defined (their functions are kind of obvious) Functions ftoa and itoa now return the location of the string they create iPrint was removed, it was useless The function append was created, it appends two strings
author Jonathan Pevarnek <pevarnj@gmail.com>
date Tue, 01 Mar 2011 23:33:51 -0500
parents b6182f00de82
children 90cd3d9a6ca3
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];

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