projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prepare for the release of rrdtool-1.3rc9
[rrdtool.git]
/
src
/
rrd_graph_helper.c
diff --git
a/src/rrd_graph_helper.c
b/src/rrd_graph_helper.c
index
cac3d7a
..
1a02247
100644
(file)
--- a/
src/rrd_graph_helper.c
+++ b/
src/rrd_graph_helper.c
@@
-1,5
+1,5
@@
/****************************************************************************
/****************************************************************************
- * RRDtool 1.
2.99907080300 Copyright by Tobi Oetiker, 1997-2007
+ * RRDtool 1.
3rc9 Copyright by Tobi Oetiker, 1997-2008
****************************************************************************
* rrd_graph_helper.c commandline parser functions
* this code initially written by Alex van den Bogaerdt
****************************************************************************
* rrd_graph_helper.c commandline parser functions
* this code initially written by Alex van den Bogaerdt
@@
-791,13
+791,14
@@
int rrd_parse_PVHLAST(
char csv[64];
char *pch;
float dsh;
char csv[64];
char *pch;
float dsh;
+ int count = 0;
+ char *saveptr;
strcpy(csv, tmpstr);
strcpy(csv, tmpstr);
- int count = 0;
- pch = strtok
(tmpstr, ","
);
+ pch = strtok
_r(tmpstr, ",", &saveptr
);
while (pch != NULL) {
while (pch != NULL) {
- pch = strtok
(NULL, ","
);
+ pch = strtok
_r(NULL, ",", &saveptr
);
count++;
}
dprintf("- %d dash value(s) found: ", count);
count++;
}
dprintf("- %d dash value(s) found: ", count);
@@
-805,7
+806,7
@@
int rrd_parse_PVHLAST(
gdp->dash = 1;
gdp->ndash = count;
gdp->p_dashes = (double *) malloc(sizeof(double) * count);
gdp->dash = 1;
gdp->ndash = count;
gdp->p_dashes = (double *) malloc(sizeof(double) * count);
- pch = strtok
(csv, ","
);
+ pch = strtok
_r(csv, ",", &saveptr
);
count = 0;
while (pch != NULL) {
if (sscanf(pch, "%f", &dsh)) {
count = 0;
while (pch != NULL) {
if (sscanf(pch, "%f", &dsh)) {
@@
-813,7
+814,7
@@
int rrd_parse_PVHLAST(
dprintf("%.1f ", gdp->p_dashes[count]);
count++;
}
dprintf("%.1f ", gdp->p_dashes[count]);
count++;
}
- pch = strtok
(NULL, ","
);
+ pch = strtok
_r(NULL, ",", &saveptr
);
}
dprintf("\n");
} else
}
dprintf("\n");
} else
@@
-888,7
+889,7
@@
int rrd_parse_def(
int i = 0;
char command[7]; /* step, start, end, reduce */
char tmpstr[256];
int i = 0;
char command[7]; /* step, start, end, reduce */
char tmpstr[256];
-
struct rrd_time_value
start_tv, end_tv;
+
rrd_time_value_t
start_tv, end_tv;
time_t start_tmp = 0, end_tmp = 0;
char *parsetime_error = NULL;
time_t start_tmp = 0, end_tmp = 0;
char *parsetime_error = NULL;
@@
-950,7
+951,7
@@
int rrd_parse_def(
} else if (!strcmp("start", command)) {
i = scan_for_col(&line[*eaten], 255, tmpstr);
(*eaten) += i;
} else if (!strcmp("start", command)) {
i = scan_for_col(&line[*eaten], 255, tmpstr);
(*eaten) += i;
- if ((parsetime_error = parsetime(tmpstr, &start_tv))) {
+ if ((parsetime_error =
rrd_
parsetime(tmpstr, &start_tv))) {
rrd_set_error("start time: %s", parsetime_error);
return 1;
}
rrd_set_error("start time: %s", parsetime_error);
return 1;
}
@@
-958,7
+959,7
@@
int rrd_parse_def(
} else if (!strcmp("end", command)) {
i = scan_for_col(&line[*eaten], 255, tmpstr);
(*eaten) += i;
} else if (!strcmp("end", command)) {
i = scan_for_col(&line[*eaten], 255, tmpstr);
(*eaten) += i;
- if ((parsetime_error = parsetime(tmpstr, &end_tv))) {
+ if ((parsetime_error =
rrd_
parsetime(tmpstr, &end_tv))) {
rrd_set_error("end time: %s", parsetime_error);
return 1;
}
rrd_set_error("end time: %s", parsetime_error);
return 1;
}
@@
-977,8
+978,8
@@
int rrd_parse_def(
}
(*eaten)++;
}
}
(*eaten)++;
}
- if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) {
- /* error string is set in parsetime.c */
+ if (
rrd_
proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) {
+ /* error string is set in
rrd_
parsetime.c */
return 1;
}
if (start_tmp < 3600 * 24 * 365 * 10) {
return 1;
}
if (start_tmp < 3600 * 24 * 365 * 10) {