projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed indentation ... gnu indent results are not realy beautifl. I might switch...
[rrdtool.git]
/
src
/
rrd_graph_helper.c
diff --git
a/src/rrd_graph_helper.c
b/src/rrd_graph_helper.c
index
44f2c17
..
d570e58
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.
3.1 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
@@
-795,10
+795,10
@@
int rrd_parse_PVHLAST(
char *saveptr;
strcpy(csv, tmpstr);
char *saveptr;
strcpy(csv, tmpstr);
-
- pch = strtok_r(tmpstr, ",",&saveptr);
+
+ pch = strtok_r(tmpstr, ",",
&saveptr);
while (pch != NULL) {
while (pch != NULL) {
- pch = strtok_r(NULL, ",",&saveptr);
+ pch = strtok_r(NULL, ",",
&saveptr);
count++;
}
dprintf("- %d dash value(s) found: ", count);
count++;
}
dprintf("- %d dash value(s) found: ", count);
@@
-806,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_r(csv, ",",&saveptr);
+ 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)) {
@@
-814,7
+814,7
@@
int rrd_parse_PVHLAST(
dprintf("%.1f ", gdp->p_dashes[count]);
count++;
}
dprintf("%.1f ", gdp->p_dashes[count]);
count++;
}
- pch = strtok_r(NULL, ",",&saveptr);
+ pch = strtok_r(NULL, ",",
&saveptr);
}
dprintf("\n");
} else
}
dprintf("\n");
} else
@@
-889,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;
@@
-951,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;
}
@@
-959,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;
}
@@
-978,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) {