From: Tobias Oetiker Date: Thu, 18 Feb 2016 08:14:25 +0000 (+0100) Subject: re allow - in vnames since it seems to have worked for some in 1.4 X-Git-Tag: v1.6.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c72e75a9f2c3e764bf97b962414b3ff9858dbe7f;p=thirdparty%2Frrdtool-1.x.git re allow - in vnames since it seems to have worked for some in 1.4 --- diff --git a/doc/rrdgraph_data.pod b/doc/rrdgraph_data.pod index 3424bc23..4d5642c7 100644 --- a/doc/rrdgraph_data.pod +++ b/doc/rrdgraph_data.pod @@ -20,7 +20,7 @@ instructions use a language called B which is described in its own manual page. Variable names (I) must be made up strings of the following characters -C and a maximum length of 255 characters. +C and a maximum length of 255 characters. When picking variable names, make sure you do not choose a name that is already taken by an RPN operator. A safe bet it to use lowercase or diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index 98317c3f..cdadf4d7 100644 --- a/src/rrd_rpncalc.h +++ b/src/rrd_rpncalc.h @@ -48,7 +48,7 @@ typedef struct rpn_cdefds_t { } rpn_cdefds_t; #define MAX_VNAME_LEN 255 -#define DEF_NAM_FMT "%255[_A-Za-z0-9]" +#define DEF_NAM_FMT "%255[_A-Za-z0-9-]" /* limit imposed by sizeof(rpn_cdefs_t) and rrd.ds_def.par */ #define DS_CDEF_MAX_RPN_NODES (int)(sizeof(unival)*10 / sizeof(rpn_cdefds_t))