/* Fonctions Exp développés par DarkBatcher pour DOS 9. http://dos9.franceserv.fr/ */ #ifndef CONSOLE_EXP_H_INCLUDE #define CONSOLE_EXP_H_INCLUDE typedef struct EXPSTART EXPSTART; typedef struct EXPSTART* LPEXPSTART; typedef struct EXPRESSION EXPRESSION; typedef struct EXPRESSION* LPEXPRESSION; struct EXPSTART { int iHigherPriorite; int tblLenght; LPEXPRESSION lpeStart; }; struct EXPRESSION { union { int iValue; double dValue; }; char cOpperation; unsigned int iPriorite; LPEXPRESSION lpeNext; }; /* enumeration des operation */ enum { EXPRESSION_INTEGERS,EXPRESSION_FLOATS }; /* constantes pour Expression Load */ #define LASTOPERATION_OPERATOR 0x01 #define LASTOPERATION_OPENINGPARENT 0x02 #define LASTOPERATION_CLOSINGPARENT 0x04 #define LASTOPERATION_DIGIT 0x08 #define LASTOPERATION_NULL_CHAR 0x10 /* constante de masque pour les chiffres */ #define MASQUE_NUMBERS 0x0F int ExpressionLoad(LPEXPSTART lpesStart,char* ptrExpression, char mode); int ExpressionCalculate(LPEXPSTART lpesExpression, char mode, double* ptrdResult, int* ptriResult); int ExpressionDelete(LPEXPSTART lpesExpression); #endif