summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1472470)
raw | patch | inline | side by side (parent: 1472470)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 11 Nov 2003 19:46:21 +0000 (19:46 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 11 Nov 2003 19:46:21 +0000 (19:46 +0000) |
index 0c2f3f92af771ea2fead9d3cca953e729c2c748c..df93284f304b07c09b1553a773f4ab1013c2e06d 100644 (file)
--- a/program/src/parsetime.c
+++ b/program/src/parsetime.c
* It allso applies those m-guessing euristics.
*/
static char *
-plus_minus(struct time_value *ptv, int doop)
+plus_minus(struct rrd_time_value *ptv, int doop)
{
static int op = PLUS;
static int prev_multiplier = -1;
* tod() computes the time of day (TIME-OF-DAY-SPEC)
*/
static char *
-tod(struct time_value *ptv)
+tod(struct rrd_time_value *ptv)
{
int hour, minute = 0;
int tlen;
* assign_date() assigns a date, adjusting year as appropriate
*/
static char *
-assign_date(struct time_value *ptv, long mday, long mon, long year)
+assign_date(struct rrd_time_value *ptv, long mday, long mon, long year)
{
if (year > 138) {
if (year > 1970)
* day() picks apart DAY-SPEC-[12]
*/
static char *
-day(struct time_value *ptv)
+day(struct rrd_time_value *ptv)
{
long mday=0, wday, mon, year = ptv->tm.tm_year;
int tlen;
/*
* parsetime() is the external interface that takes tspec, parses
- * it and puts the result in the time_value structure *ptv.
+ * it and puts the result in the rrd_time_value structure *ptv.
* It can return either absolute times (these are ensured to be
* correct) or relative time references that are expected to be
* added to some absolute time value and then normalized by
* the pointer to the error message in the case of problems
*/
char *
-parsetime(char *tspec, struct time_value *ptv)
+parsetime(char *tspec, struct rrd_time_value *ptv)
{
time_t now = time(NULL);
int hr = 0;
} /* parsetime */
-int proc_start_end (struct time_value *start_tv,
- struct time_value *end_tv,
+int proc_start_end (struct rrd_time_value *start_tv,
+ struct rrd_time_value *end_tv,
time_t *start,
time_t *end){
if (start_tv->type == RELATIVE_TO_END_TIME && /* same as the line above */
diff --git a/program/src/rrd.h b/program/src/rrd.h
index a2478b26844ae52cc345f6a477d6ef5de2d04b69..b09e316d3ce502e945fe278c68553ee54e7a8e6e 100644 (file)
--- a/program/src/rrd.h
+++ b/program/src/rrd.h
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.6 2003/11/11 19:46:21 oetiker
+ * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+ *
* Revision 1.5 2003/04/25 18:35:08 jake
* Alternate update interface, updatev. Returns info about CDPs written to disk as result of update. Output format is similar to rrd_info, a hash of key-values.
*
#define TIME_OK NULL
-struct time_value {
+struct rrd_time_value {
timetype type;
long offset;
struct tm tm;
/* returns the current per-thread rrd_context */
struct rrd_context *rrd_get_context(void);
-char *parsetime(char *spec, struct time_value *ptv);
+char *parsetime(char *spec, struct rrd_time_value *ptv);
/* END parsetime.h */
-int proc_start_end (struct time_value *, struct time_value *, time_t *, time_t *);
+int proc_start_end (struct rrd_time_value *, struct rrd_time_value *, time_t *, time_t *);
/* HELPER FUNCTIONS */
void rrd_set_error(char *,...);
diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c
index a5237067eca806b5927117c17dac3acd13b9aba4..b49f5f52af25753aa457ede158bc7edb0f82fd28 100644 (file)
--- a/program/src/rrd_cgi.c
+++ b/program/src/rrd_cgi.c
* */
#define MAX_STRFTIME_SIZE 256
char* printstrftime(long argc, char **args){
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
char formatted[MAX_STRFTIME_SIZE];
struct tm *the_tm;
index a3bfafe9f9fde68481b34aa7275230beaabb082e..78f52d629636a6120b786bf7c086a9b333558de9 100644 (file)
--- a/program/src/rrd_create.c
+++ b/program/src/rrd_create.c
{
time_t last_up = time(NULL)-10;
unsigned long pdp_step = 300;
- struct time_value last_up_tv;
+ struct rrd_time_value last_up_tv;
char *parsetime_error = NULL;
long long_tmp;
int rc;
index d5c5709450a1febd6e3c7522a0d4f2e0e3de5260..1206644c78f683aa6e67d2586bae267cf68d1185 100644 (file)
--- a/program/src/rrd_fetch.c
+++ b/program/src/rrd_fetch.c
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.7 2003/11/11 19:46:21 oetiker
+ * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+ *
* Revision 1.6 2003/01/16 23:27:54 oetiker
* fix border condition in rra selection of rrd_fetch
* -- Stanislav Sinyagin <ssinyagin@yahoo.com>
time_t start_tmp=0, end_tmp=0;
enum cf_en cf_idx;
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
/* init start and end time */
index ef3c727135411d773f9054c3eea3ec8481a04518..ef7c9b6ba450f655f83e78fac9b2232f8021e2a6 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
char scan_gtm[12],scan_mtm[12],scan_ltm[12],col_nam[12];
time_t start_tmp=0,end_tmp=0;
long long_tmp;
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
gfx_color_t color;
parsetime("end-24h", &start_tv);
index a33a8ef8641000ed8fcd9634abc297e2523bc097..ef1e8e747bb2b6c18ef85dc656fbcdcea98ea388 100644 (file)
@@ -287,7 +287,7 @@ rrd_parse_def(char *line, unsigned int *eaten, graph_desc_t *gdp, image_desc_t *
int i=0;
char command[6]; /* step, start, end */
char tmpstr[256];
- struct time_value start_tv,end_tv;
+ struct rrd_time_value start_tv,end_tv;
time_t start_tmp=0,end_tmp=0;
char *parsetime_error=NULL;
index 44312bd0fef7b6af222a0d17b986a6f1977124c8..de708df7564ff9fab0f6c30f6e4686c0b71d3f2a 100644 (file)
--- a/program/src/rrd_update.c
+++ b/program/src/rrd_update.c
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.14 2003/11/11 19:46:21 oetiker
+ * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+ *
* Revision 1.13 2003/11/11 19:38:03 oetiker
* rrd files should NOT change size ever ... bulk update code wa buggy.
* -- David M. Grimes <dgrimes@navisite.com>
char *p;
char *parsetime_error = NULL;
enum {atstyle, normal} timesyntax;
- struct time_value ds_tv;
+ struct rrd_time_value ds_tv;
if (stepper == NULL){
rrd_set_error("failed duplication argv entry");
free(updvals);
index b943fe2ebe592c410c3d38bf93e11bd43338124c..488c24c3edbd057e005e2bf8c640544da6d9a549 100644 (file)
--- a/program/src/rrd_xport.c
+++ b/program/src/rrd_xport.c
time_t start_tmp=0,end_tmp=0;
char symname[100];
long scancount;
- struct time_value start_tv, end_tv;
+ struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
rrd_graph_init(&im);