X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_rpncalc.h;h=04262720a3e590c0a7ffa44747479214729eb13d;hb=361a0fd38d7adf95847508f54c0bde9b3f98662e;hp=ecf11c83d4519ae1dbb6929e988a7bcdda114af0;hpb=5966e9538f3f6130df0577772368ae3906a1ec48;p=rrdtool.git diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index ecf11c8..0426272 100644 --- a/src/rrd_rpncalc.h +++ b/src/rrd_rpncalc.h @@ -1,10 +1,12 @@ /**************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.2.8 Copyright by Tobi Oetiker, 1997-2005 **************************************************************************** * rrd_rpncalc.h RPN calculator functions ****************************************************************************/ +#ifndef _RRD_RPNCALC_H +#define _RRD_RPNCALC_H -/* WARNING: if new operators are added, they MUST be added after OP_END. +/* WARNING: if new operators are added, they MUST be added at the very end of the list. * This is because COMPUTE (CDEF) DS store OP nodes by number (name is not * an option due to limited par array size). OP nodes must have the same * numeric values, otherwise the stored numbers will mean something different. */ @@ -13,7 +15,8 @@ enum op_en {OP_NUMBER=0,OP_VARIABLE,OP_INF,OP_PREV,OP_NEGINF, OP_DIV,OP_SIN, OP_DUP, OP_EXC, OP_POP, OP_COS,OP_LOG,OP_EXP,OP_LT,OP_LE,OP_GT,OP_GE,OP_EQ,OP_IF, OP_MIN,OP_MAX,OP_LIMIT, OP_FLOOR, OP_CEIL, - OP_UN,OP_END,OP_LTIME,OP_NE,OP_ISINF,OP_PREV_OTHER}; + OP_UN,OP_END,OP_LTIME,OP_NE,OP_ISINF,OP_PREV_OTHER,OP_COUNT, + OP_ATAN,OP_SQRT,OP_SORT,OP_REV,OP_TREND}; typedef struct rpnp_t { enum op_en op; @@ -50,3 +53,5 @@ rpnp_t * rpn_expand(rpn_cdefds_t *rpnc); void rpn_compact2str(rpn_cdefds_t *rpnc,ds_def_t *ds_def,char **str); rpnp_t * rpn_parse(void *key_hash,char *expr, long (*lookup)(void *,char *)); short rpn_calc(rpnp_t *rpnp, rpnstack_t *rpnstack, long data_idx, rrd_value_t *output, int output_idx); + +#endif