diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-08-15 21:08:49 +0300 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2016-08-15 21:08:49 +0300 |
commit | 028decf87dbd67e4f602fbe5f04db24cc6315573 (patch) | |
tree | 070dfe0cfa6604ed6371dd8e48af656f26ecb63a /src/eval.h | |
parent | 1dfe07df975a513a7761efe179425bfcd4804c71 (diff) |
added abs() function to expressions; added health.d/net.conf
Diffstat (limited to 'src/eval.h')
-rw-r--r-- | src/eval.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/eval.h b/src/eval.h index 0b174a2083..c1f049ce40 100644 --- a/src/eval.h +++ b/src/eval.h @@ -27,26 +27,27 @@ typedef struct eval_expression { struct rrdcalc *rrdcalc; } EVAL_EXPRESSION; -#define EVAL_VALUE_INVALID 0 -#define EVAL_VALUE_NUMBER 1 -#define EVAL_VALUE_VARIABLE 2 +#define EVAL_VALUE_INVALID 0 +#define EVAL_VALUE_NUMBER 1 +#define EVAL_VALUE_VARIABLE 2 #define EVAL_VALUE_EXPRESSION 3 -#define EVAL_ERROR_OK 0 +// parsing and evaluation +#define EVAL_ERROR_OK 0 // parsing errors -#define EVAL_ERROR_MISSING_CLOSE_SUBEXPRESSION 1 -#define EVAL_ERROR_UNKNOWN_OPERAND 2 -#define EVAL_ERROR_MISSING_OPERAND 3 -#define EVAL_ERROR_MISSING_OPERATOR 4 -#define EVAL_ERROR_REMAINING_GARBAGE 5 +#define EVAL_ERROR_MISSING_CLOSE_SUBEXPRESSION 1 +#define EVAL_ERROR_UNKNOWN_OPERAND 2 +#define EVAL_ERROR_MISSING_OPERAND 3 +#define EVAL_ERROR_MISSING_OPERATOR 4 +#define EVAL_ERROR_REMAINING_GARBAGE 5 // evaluation errors -#define EVAL_ERROR_INVALID_VALUE 11 -#define EVAL_ERROR_INVALID_NUMBER_OF_OPERANDS 12 -#define EVAL_ERROR_VALUE_IS_NAN 13 -#define EVAL_ERROR_VALUE_IS_INFINITE 14 -#define EVAL_ERROR_UNKNOWN_VARIABLE 15 +#define EVAL_ERROR_INVALID_VALUE 101 +#define EVAL_ERROR_INVALID_NUMBER_OF_OPERANDS 102 +#define EVAL_ERROR_VALUE_IS_NAN 103 +#define EVAL_ERROR_VALUE_IS_INFINITE 104 +#define EVAL_ERROR_UNKNOWN_VARIABLE 105 // parse the given string as an expression and return: // a pointer to an expression if it parsed OK |