Code

allow DS names starting with the same letters as operators
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 21 May 2006 12:37:12 +0000 (12:37 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 21 May 2006 12:37:12 +0000 (12:37 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@828 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_rpncalc.c

index 3c6510f913d1a81418b07e6e8119b5c896b2b6b3..104ea8f2c593a88247a47cdbd0d047b9a399fb32 100644 (file)
@@ -274,9 +274,9 @@ rpn_parse(void *key_hash,const char *const expr_const,long (*lookup)(void *,char
        } 
        
 #define match_op(VV,VVV) \
-        else if (strncmp(expr, #VVV, strlen(#VVV))==0){ \
-           rpnp[steps].op = VV; \
-           expr+=strlen(#VVV); \
+        else if (strncmp(expr, #VVV, strlen(#VVV))==0 && ( expr[strlen(#VVV)] == ',' || expr[strlen(#VVV)] == '\0' )){ \
+            rpnp[steps].op = VV; \
+            expr+=strlen(#VVV); \
        }