Fixed negative number issue
This commit is contained in:
36
src/ee.h
Normal file
36
src/ee.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
const int ERR_NS_OPERANDS = 1;
|
||||
const int ERR_NS_OPERATORS = 2;
|
||||
const int ERR_INVALID_INPUT = 4;
|
||||
const int ERR_INVALID_FACTORIAL = 8;
|
||||
|
||||
|
||||
struct EE_STACK_NODE {
|
||||
double datum;
|
||||
struct EE_STACK_NODE* tail;
|
||||
};
|
||||
typedef struct EE_STACK_NODE NODE;
|
||||
typedef struct EE_STACK_NODE* STACK;
|
||||
|
||||
void push(double,STACK*);
|
||||
void pop(STACK*);
|
||||
double peek(STACK*);
|
||||
|
||||
int isNum(const char*);
|
||||
int arrity(const char);
|
||||
|
||||
double evaluate(STACK*, char);
|
||||
double* operands(STACK*, int);
|
||||
double fact(int n);
|
||||
|
||||
void report(STACK*,char*);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user