summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a3e9d61)
raw | patch | inline | side by side (parent: a3e9d61)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 13 Jul 2002 18:35:37 +0000 (18:35 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 13 Jul 2002 18:35:37 +0000 (18:35 +0000) |
added double include protection the rrd_graph.h and rrd_rpncalc.h
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@159 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@159 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_graph.h | patch | blob | history | |
src/rrd_rpncalc.c | patch | blob | history | |
src/rrd_rpncalc.h | patch | blob | history |
diff --git a/src/rrd_graph.h b/src/rrd_graph.h
index fa5e7ceac0135fac2f16e24b731346f525b593ba..0f9079a15c434d4b40f491ee4d7dab6e1baee2f2 100644 (file)
--- a/src/rrd_graph.h
+++ b/src/rrd_graph.h
+#ifndef _RRD_GRAPH_H
+#define _RRD_GRAPH_H
+
#include "rrd_tool.h"
#include "rrd_rpncalc.h"
#include "rrd_gfx.h"
int vdef_calc(image_desc_t *, int);
int vdef_percent_compar(const void *,const void *);
int graph_size_location(image_desc_t *, int, int);
+
+#endif
diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c
index 41d1ce3e4778690be5cddb57a7c32bbbf9f32aa4..8e64d8b200b58b61bde2402d94caa01e3d095ad3 100644 (file)
--- a/src/rrd_rpncalc.c
+++ b/src/rrd_rpncalc.c
#include "rrd_tool.h"
#include "rrd_rpncalc.h"
+#include "rrd_graph.h"
#include <limits.h>
short addop2str(enum op_en op, enum op_en op_type, char *op_str,
#undef match_op
- else if ((sscanf(expr,"%29[_A-Za-z0-9]%n",
+ else if ((sscanf(expr, DEF_NAM_FMT "%n",
vname,&pos) == 1)
&& ((rpnp[steps].ptr = (*lookup)(key_hash,vname)) != -1)){
rpnp[steps].op = OP_VARIABLE;
diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h
index ecf11c83d4519ae1dbb6929e988a7bcdda114af0..a4e7c65cd7c116100f8dcba97be1df95b9dc6193 100644 (file)
--- a/src/rrd_rpncalc.h
+++ b/src/rrd_rpncalc.h
****************************************************************************
* 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.
* This is because COMPUTE (CDEF) DS store OP nodes by number (name is not
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