You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
782 B
26 lines
782 B
#ifndef INPUTHANDLING_H
|
|
#define INPUTHANDLING_H
|
|
|
|
typedef enum{
|
|
opAdd, opSub, opDiv, opMult, opExp, opLog, opEmpty, opNotSupported, opResult
|
|
}op;
|
|
|
|
typedef struct {
|
|
op functionsType;
|
|
char* formular;
|
|
double inputNumbers[10];
|
|
int arrayLength;
|
|
void* children[10]; // all children structs which depends on this struct
|
|
void* parent; // the parent struct which this struct depends on
|
|
double result;
|
|
}calc_op;
|
|
|
|
extern void processInput(char* formStr, int len);
|
|
extern void showStruct(calc_op* formRef);
|
|
extern void deleteWhitespace(char* formStr, int len);
|
|
extern op detectFunctionOperator(char* formStr, int len);
|
|
extern char* getNumbers(char* formStr, int len, calc_op* formRef);
|
|
extern void showStruct(calc_op* formRef);
|
|
extern calc_op* getNextCalc();
|
|
|
|
#endif // INPUTHANDLING_H
|