|
@ -6,6 +6,7 @@ |
|
|
|
|
|
|
|
|
char formulaBuffer[1000]; |
|
|
char formulaBuffer[1000]; |
|
|
calc_op* mainCalc = NULL; |
|
|
calc_op* mainCalc = NULL; |
|
|
|
|
|
calc_op* currentCalc = NULL; |
|
|
|
|
|
|
|
|
void processInput(char* formStr, int len) { |
|
|
void processInput(char* formStr, int len) { |
|
|
deleteWhitespace(formStr, len); |
|
|
deleteWhitespace(formStr, len); |
|
@ -23,6 +24,14 @@ void processInput(char* formStr, int len) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
calc_op* getNextCalc(){ |
|
|
|
|
|
if (currentCalc != NULL){ |
|
|
|
|
|
free(currentCalc); |
|
|
|
|
|
} |
|
|
|
|
|
currentCalc = mainCalc; // get ext calculation |
|
|
|
|
|
return currentCalc; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//Leerzeichen löschen |
|
|
//Leerzeichen löschen |
|
|
void deleteWhitespace(char* formStr, int len){ |
|
|
void deleteWhitespace(char* formStr, int len){ |
|
|
for(int stringPos=0; stringPos < len; stringPos++){ |
|
|
for(int stringPos=0; stringPos < len; stringPos++){ |
|
|