@BUILD_RRDRESTORE_TRUE@am__append_2 = rrd_restore.c
@BUILD_LIBDBI_TRUE@am__append_3 = rrd_fetch_libdbi.c
-@BUILD_GETOPT_TRUE@am__append_4 = rrd_getopt.h
-@BUILD_GETOPT_TRUE@am__append_5 = rrd_getopt.c rrd_getopt1.c
-@BUILD_MULTITHREAD_TRUE@am__append_6 = librrd_th.la
+@BUILD_LIBRADOS_TRUE@am__append_4 = rrd_rados.c
+@BUILD_GETOPT_TRUE@am__append_5 = rrd_getopt.h
+@BUILD_GETOPT_TRUE@am__append_6 = rrd_getopt.c rrd_getopt1.c
+@BUILD_MULTITHREAD_TRUE@am__append_7 = librrd_th.la
bin_PROGRAMS = rrdtool$(EXEEXT) rrdupdate$(EXEEXT) $(am__EXEEXT_1) \
$(am__EXEEXT_2)
-@BUILD_RRDCGI_TRUE@am__append_7 = rrdcgi
-@BUILD_RRDCACHED_TRUE@am__append_8 = rrdcached
+@BUILD_RRDCGI_TRUE@am__append_8 = rrdcgi
+@BUILD_RRDCACHED_TRUE@am__append_9 = rrdcached
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/rrd_config.h.in $(srcdir)/librrd.sym.in.in \
rrd_hw_update.c rrd_diff.c rrd_format.c rrd_info.c rrd_error.c \
rrd_open.c rrd_client.c rrd_nan_inf.c rrd_rpncalc.c \
rrd_utils.c rrd_snprintf.c rrd_update.c rrd_modify.c \
- quicksort.c rrd_getopt.c rrd_getopt1.c rrd_version.c \
- rrd_last.c rrd_lastupdate.c rrd_first.c rrd_dump.c \
- rrd_flushcached.c rrd_fetch.c rrd_fetch_cb.c rrd_resize.c \
- rrd_tune.c rrd_graph.c rrd_graph_helper.c rrd_xport.c \
- rrd_gfx.c pngsize.c rrd_restore.c rrd_fetch_libdbi.c \
- rrd_thread_safe.c
-@BUILD_GETOPT_TRUE@am__objects_5 = librrd_th_la-rrd_getopt.lo \
+ quicksort.c rrd_rados.c rrd_getopt.c rrd_getopt1.c \
+ rrd_version.c rrd_last.c rrd_lastupdate.c rrd_first.c \
+ rrd_dump.c rrd_flushcached.c rrd_fetch.c rrd_fetch_cb.c \
+ rrd_resize.c rrd_tune.c rrd_graph.c rrd_graph_helper.c \
+ rrd_xport.c rrd_gfx.c pngsize.c rrd_restore.c \
+ rrd_fetch_libdbi.c rrd_thread_safe.c
+@BUILD_LIBRADOS_TRUE@am__objects_5 = librrd_th_la-rrd_rados.lo
+@BUILD_GETOPT_TRUE@am__objects_6 = librrd_th_la-rrd_getopt.lo \
@BUILD_GETOPT_TRUE@ librrd_th_la-rrd_getopt1.lo
-am__objects_6 = librrd_th_la-mutex.lo librrd_th_la-rrd_strtod.lo \
+am__objects_7 = librrd_th_la-mutex.lo librrd_th_la-rrd_strtod.lo \
librrd_th_la-rrd_create.lo librrd_th_la-hash_32.lo \
librrd_th_la-rrd_parsetime.lo librrd_th_la-rrd_hw.lo \
librrd_th_la-rrd_hw_math.lo librrd_th_la-rrd_hw_update.lo \
librrd_th_la-rrd_nan_inf.lo librrd_th_la-rrd_rpncalc.lo \
librrd_th_la-rrd_utils.lo librrd_th_la-rrd_snprintf.lo \
librrd_th_la-rrd_update.lo librrd_th_la-rrd_modify.lo \
- librrd_th_la-quicksort.lo $(am__objects_5)
-@BUILD_RRDGRAPH_TRUE@am__objects_7 = librrd_th_la-rrd_graph.lo \
+ librrd_th_la-quicksort.lo $(am__objects_5) $(am__objects_6)
+@BUILD_RRDGRAPH_TRUE@am__objects_8 = librrd_th_la-rrd_graph.lo \
@BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_graph_helper.lo \
@BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_xport.lo \
@BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_gfx.lo \
@BUILD_RRDGRAPH_TRUE@ librrd_th_la-pngsize.lo
-@BUILD_RRDRESTORE_TRUE@am__objects_8 = librrd_th_la-rrd_restore.lo
-@BUILD_LIBDBI_TRUE@am__objects_9 = librrd_th_la-rrd_fetch_libdbi.lo
-am__objects_10 = librrd_th_la-rrd_version.lo librrd_th_la-rrd_last.lo \
+@BUILD_RRDRESTORE_TRUE@am__objects_9 = librrd_th_la-rrd_restore.lo
+@BUILD_LIBDBI_TRUE@am__objects_10 = librrd_th_la-rrd_fetch_libdbi.lo
+am__objects_11 = librrd_th_la-rrd_version.lo librrd_th_la-rrd_last.lo \
librrd_th_la-rrd_lastupdate.lo librrd_th_la-rrd_first.lo \
librrd_th_la-rrd_dump.lo librrd_th_la-rrd_flushcached.lo \
librrd_th_la-rrd_fetch.lo librrd_th_la-rrd_fetch_cb.lo \
librrd_th_la-rrd_resize.lo librrd_th_la-rrd_tune.lo \
- $(am__objects_7) $(am__objects_8) $(am__objects_9)
-am_librrd_th_la_OBJECTS = $(am__objects_6) $(am__objects_10) \
+ $(am__objects_8) $(am__objects_9) $(am__objects_10)
+am_librrd_th_la_OBJECTS = $(am__objects_7) $(am__objects_11) \
librrd_th_la-rrd_thread_safe.lo
librrd_th_la_OBJECTS = $(am_librrd_th_la_OBJECTS)
librrd_th_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
rrd_hw_update.c rrd_diff.c rrd_format.c rrd_info.c rrd_error.c \
rrd_open.c rrd_client.c rrd_nan_inf.c rrd_rpncalc.c \
rrd_utils.c rrd_snprintf.c rrd_update.c rrd_modify.c \
- quicksort.c rrd_getopt.c rrd_getopt1.c rrd_not_thread_safe.c
-@BUILD_GETOPT_TRUE@am__objects_11 = rrd_getopt.lo rrd_getopt1.lo
-am__objects_12 = mutex.lo rrd_strtod.lo rrd_create.lo hash_32.lo \
+ quicksort.c rrd_rados.c rrd_getopt.c rrd_getopt1.c \
+ rrd_not_thread_safe.c
+@BUILD_LIBRADOS_TRUE@am__objects_12 = rrd_rados.lo
+@BUILD_GETOPT_TRUE@am__objects_13 = rrd_getopt.lo rrd_getopt1.lo
+am__objects_14 = mutex.lo rrd_strtod.lo rrd_create.lo hash_32.lo \
rrd_parsetime.lo rrd_hw.lo rrd_hw_math.lo rrd_hw_update.lo \
rrd_diff.lo rrd_format.lo rrd_info.lo rrd_error.lo rrd_open.lo \
rrd_client.lo rrd_nan_inf.lo rrd_rpncalc.lo rrd_utils.lo \
rrd_snprintf.lo rrd_update.lo rrd_modify.lo quicksort.lo \
- $(am__objects_11)
-am_librrdupd_la_OBJECTS = $(am__objects_12) rrd_not_thread_safe.lo
+ $(am__objects_12) $(am__objects_13)
+am_librrdupd_la_OBJECTS = $(am__objects_14) rrd_not_thread_safe.lo
librrdupd_la_OBJECTS = $(am_librrdupd_la_OBJECTS)
@BUILD_RRDCGI_TRUE@am__EXEEXT_1 = rrdcgi$(EXEEXT)
@BUILD_RRDCACHED_TRUE@am__EXEEXT_2 = rrdcached$(EXEEXT)
rrd_diff.c rrd_format.c rrd_info.c rrd_error.c rrd_open.c \
rrd_client.c rrd_nan_inf.c rrd_rpncalc.c rrd_utils.c \
rrd_snprintf.c rrd_update.c rrd_modify.c quicksort.c \
- $(am__append_5)
+ $(am__append_4) $(am__append_6)
RRD_C_FILES = rrd_version.c rrd_last.c rrd_lastupdate.c rrd_first.c \
rrd_dump.c rrd_flushcached.c rrd_fetch.c rrd_fetch_cb.c \
rrd_resize.c rrd_tune.c $(am__append_1) $(am__append_2) \
rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h rrd_hw_math.h \
rrd_hw_update.h rrd_restore.h rrd_create.h fnv.h rrd_graph.h \
rrd_is_thread_safe.h rrd_modify.h rrd_update.h rrd_config.h \
- quicksort.h $(am__append_4)
+ quicksort.h $(am__append_5)
noinst_LTLIBRARIES = librrdupd.la
-lib_LTLIBRARIES = librrd.la $(am__append_6)
+lib_LTLIBRARIES = librrd.la $(am__append_7)
librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c
librrdupd_la_LIBADD = $(CORE_LIBS)
librrd_la_SOURCES = $(RRD_C_FILES)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_nan_inf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_open.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_parsetime.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_rados.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_resize.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_restore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_rpncalc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_not_thread_safe.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_open.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_parsetime.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_rados.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_resize.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_restore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_rpncalc.Plo@am__quote@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-quicksort.lo `test -f 'quicksort.c' || echo '$(srcdir)/'`quicksort.c
+librrd_th_la-rrd_rados.lo: rrd_rados.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_rados.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_rados.Tpo -c -o librrd_th_la-rrd_rados.lo `test -f 'rrd_rados.c' || echo '$(srcdir)/'`rrd_rados.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_rados.Tpo $(DEPDIR)/librrd_th_la-rrd_rados.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rrd_rados.c' object='librrd_th_la-rrd_rados.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_rados.lo `test -f 'rrd_rados.c' || echo '$(srcdir)/'`rrd_rados.c
+
librrd_th_la-rrd_getopt.lo: rrd_getopt.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_getopt.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_getopt.Tpo -c -o librrd_th_la-rrd_getopt.lo `test -f 'rrd_getopt.c' || echo '$(srcdir)/'`rrd_getopt.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_getopt.Tpo $(DEPDIR)/librrd_th_la-rrd_getopt.Plo
char week_fmt[128] = "Week %V";
+/*
+ 0 double minsec; -- minimum sec per pix
+ 1 long length; -- number of secs on the image
+ 2 enum tmt_en gridtm; -- grid interval in what ?
+ 3 long gridst; -- how many whats per grid
+ 4 enum tmt_en mgridtm; -- label interval in what ?
+ 5 long mgridst; -- how many whats per label
+ 6 enum tmt_en labtm; -- label interval in what ?
+ 7 long labst; -- how many whats per label
+ 8 long precis; -- label precision -> label placement
+ 9 char *stst; -- strftime string
+*/
+
xlab_t xlab[] = {
- {0.0, 0, TMT_SECOND, 10, TMT_MINUTE, 1, TMT_MINUTE, 1, 0, "%H:%M"}
+ /* 0 1 2 3 4 5 6 7 8 9 */
+ {0.0, 0, TMT_SECOND, 1, TMT_SECOND, 5, TMT_SECOND, 10, 0, "%H:%M:%S"}
+ ,
+ {0.15, 0, TMT_SECOND, 5, TMT_SECOND, 15, TMT_SECOND, 30, 0, "%H:%M:%S"}
+ ,
+ {0.4, 0, TMT_SECOND, 10, TMT_MINUTE, 1, TMT_MINUTE, 1, 0, "%H:%M"}
,
- {0.6, 0, TMT_SECOND, 20, TMT_MINUTE, 1, TMT_MINUTE, 1, 0, "%H:%M"}
+ {0.7, 0, TMT_SECOND, 20, TMT_MINUTE, 1, TMT_MINUTE, 1, 0, "%H:%M"}
,
- {1.0, 0, TMT_SECOND, 30, TMT_MINUTE, 2, TMT_MINUTE, 2, 0, "%H:%M"}
+ {1.0, 0, TMT_SECOND, 30, TMT_MINUTE, 1, TMT_MINUTE, 2, 0, "%H:%M"}
,
{2.0, 0, TMT_MINUTE, 1, TMT_MINUTE, 5, TMT_MINUTE, 5, 0, "%H:%M"}
,
,
{10.0, 0, TMT_MINUTE, 5, TMT_MINUTE, 20, TMT_MINUTE, 20, 0, "%H:%M"}
,
- {30.0, 0, TMT_MINUTE, 10, TMT_HOUR, 1, TMT_HOUR, 1, 0, "%H:%M"}
+ {30.0, 0, TMT_MINUTE, 10, TMT_MINUTE, 30, TMT_HOUR, 1, 0, "%H:%M"}
+ ,
+ {60.0, 0, TMT_MINUTE, 30, TMT_HOUR, 1, TMT_HOUR, 2, 0, "%H:%M"}
+ ,
+ {60.0, 24 * 3600, TMT_MINUTE, 30, TMT_HOUR, 1, TMT_HOUR, 3, 0, "%a %H:%M"}
+ ,
+ {140.0, 0, TMT_HOUR, 1, TMT_HOUR, 2, TMT_HOUR, 4, 0, "%a %H:%M"}
+ ,
+ {180.0, 0, TMT_HOUR, 1, TMT_HOUR, 3, TMT_HOUR, 6, 0, "%a %H:%M"}
+ ,
+ {300.0, 0, TMT_HOUR, 2, TMT_HOUR,6, TMT_HOUR,12, 0, "%a %H:%M"}
+ ,
+ {600.0, 0, TMT_HOUR, 6, TMT_DAY, 1, TMT_DAY, 1, 24 * 3600, "%a %d %b"}
+ ,
+ {1200.0, 0, TMT_HOUR, 6, TMT_DAY, 1, TMT_DAY, 1, 24 * 3600, "%d %b"}
+ ,
+ {1800.0, 0, TMT_HOUR, 12, TMT_DAY, 1, TMT_DAY, 2, 24 * 3600, "%a %d %b"}
+ ,
+ {2400.0, 0, TMT_HOUR, 12, TMT_DAY, 1, TMT_DAY, 2, 24 * 3600, "%d %b"}
+ ,
+ {3600.0, 0, TMT_DAY, 1, TMT_WEEK, 1, TMT_WEEK, 1, 7 * 24 * 3600, week_fmt }
,
- {60.0, 0, TMT_MINUTE, 30, TMT_HOUR, 2, TMT_HOUR, 2, 0, "%H:%M"}
+ {12000.0 , 0, TMT_DAY, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, "%B %Y"}
,
- {60.0, 24 * 3600, TMT_MINUTE, 30, TMT_HOUR, 2, TMT_HOUR, 6, 0, "%a %H:%M"}
+ {18000.0 , 0, TMT_DAY, 2, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, "%B %Y"}
,
- {180.0, 0, TMT_HOUR, 1, TMT_HOUR, 6, TMT_HOUR, 6, 0, "%H:%M"}
+ {23000.0 , 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, "%b %Y"}
,
- {180.0, 24 * 3600, TMT_HOUR, 1, TMT_HOUR, 6, TMT_HOUR, 12, 0, "%a %H:%M"}
+ {32000.0 , 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, "%b '%g"}
,
- /*{300, 0, TMT_HOUR,3, TMT_HOUR,12, TMT_HOUR,12, 12*3600,"%a %p"}, this looks silly */
- {600.0, 0, TMT_HOUR, 6, TMT_DAY, 1, TMT_DAY, 1, 24 * 3600, "%a"}
+ {42000.0 , 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_MONTH, 2, 30 * 24 * 3600, "%B %Y"}
,
- {1200.0, 0, TMT_HOUR, 6, TMT_DAY, 1, TMT_DAY, 1, 24 * 3600, "%d"}
+ {52000.0 , 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_MONTH, 2, 30 * 24 * 3600, "%b %Y"}
,
- {1800.0, 0, TMT_HOUR, 12, TMT_DAY, 1, TMT_DAY, 2, 24 * 3600, "%a %d"}
+ {78000.0 , 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_MONTH, 2, 30 * 24 * 3600, "%b '%g"}
,
- {2400.0, 0, TMT_HOUR, 12, TMT_DAY, 1, TMT_DAY, 2, 24 * 3600, "%a"}
+ {84000.0 , 0, TMT_WEEK, 2, TMT_MONTH, 1, TMT_MONTH, 3, 30 * 24 * 3600, "%B %Y"}
,
- {3600.0, 0, TMT_DAY, 1, TMT_WEEK, 1, TMT_WEEK, 1, 7 * 24 * 3600, week_fmt}
+ {94000.0 , 0, TMT_WEEK, 2, TMT_MONTH, 1, TMT_MONTH, 3, 30 * 24 * 3600, "%b %Y"}
,
- {3.0 * 3600.0, 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_WEEK, 2, 7 * 24 * 3600, week_fmt}
+ {120000.0 , 0, TMT_WEEK, 2, TMT_MONTH, 1, TMT_MONTH, 3, 30 * 24 * 3600, "%b '%g"}
,
- {6.0 * 3600.0, 0, TMT_MONTH, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600,
- "%b"}
+ {130000.0 , 0, TMT_MONTH, 1, TMT_MONTH, 2, TMT_MONTH, 4, 0, "%Y-%m-%d"}
,
- {48.0 * 3600.0, 0, TMT_MONTH, 1, TMT_MONTH, 3, TMT_MONTH, 3, 30 * 24 * 3600,
- "%b"}
+ {142000.0 , 0, TMT_MONTH, 1, TMT_MONTH, 3, TMT_MONTH, 6, 0, "%Y-%m-%d"}
,
- {315360.0, 0, TMT_MONTH, 3, TMT_YEAR, 1, TMT_YEAR, 1, 365 * 24 * 3600, "%Y"}
+ {220000.0 , 0, TMT_MONTH, 1, TMT_MONTH, 6, TMT_MONTH, 12, 0, "%Y-%m-%d"}
,
- {(double)(10 * 24 * 3600), 0, TMT_YEAR, 1, TMT_YEAR, 1, TMT_YEAR, 1,
- 365 * 24 * 3600, "%y"}
+ {400000.0 , 0, TMT_MONTH, 2, TMT_MONTH, 12, TMT_MONTH, 12, 365*24*3600, "%Y"}
+ ,
+ {800000.0 , 0, TMT_MONTH, 4, TMT_MONTH, 12, TMT_MONTH, 24, 365*24*3600, "%Y"}
,
{-1.0, 0, TMT_MONTH, 0, TMT_MONTH, 0, TMT_MONTH, 0, 0, ""}
};
free(im->daemon_addr);
if (im->gdef_map){
- g_hash_table_destroy(im->gdef_map);
+ g_hash_table_destroy(im->gdef_map);
}
if (im->rrd_map){
g_hash_table_destroy(im->rrd_map);
}
-
+
for (i = 0; i < (unsigned) im->gdes_c; i++) {
if (im->gdes[i].data_first) {
im->gdes[i].data_first = 1;
/* must reduce to at least im->step
- otherwhise we end up with more data than we can handle in the
- chart and visibility of data will be random */
+ otherwhise we end up with more data than we can handle in the
+ chart and visibility of data will be random */
im->gdes[i].step = max(im->gdes[i].step,im->step);
if (ft_step < im->gdes[i].step) {
-
+
reduce_data(im->gdes[i].cf_reduce_set ? im->gdes[i].cf_reduce : im->gdes[i].cf,
ft_step,
&im->gdes[i].start,
}
} /* enumerate over time steps within a CDEF */
rpnp_freeextra(rpnp);
-
+
break;
default:
continue;
/* memory for the processed data */
for (i = 0; i < im->gdes_c; i++) {
if ((im->gdes[i].gf == GF_LINE)
- || (im->gdes[i].gf == GF_AREA)
+ || (im->gdes[i].gf == GF_AREA)
|| (im->gdes[i].gf == GF_TICK)
|| (im->gdes[i].gf == GF_GRAD)
) {
if (im->unitslength < len + 2)
im->unitslength = len + 2;
- snprintf(im->ygrid_scale.labfmt, sizeof im->ygrid_scale.labfmt,
+ snprintf(im->ygrid_scale.labfmt, sizeof im->ygrid_scale.labfmt,
"%%%d.%df%s", len,
-fractionals, (im->symbol != ' ' ? " %c" : ""));
} else {
scaledstep * (double) i);
}
} else {
- char sisym = (i == 0 ? ' ' : im->symbol);
+ char sisym = (i == 0 ? ' ' : im->symbol);
if (im->primary_axis_format == NULL || im->primary_axis_format[0] == '\0') {
if (im->extra_flags & ALTYGRID) {
snprintf(graph_label,sizeof graph_label,
/* shift the box up a bit */
Y0 -= boxV * 0.4;
- if (im->dynamic_labels && im->gdes[i].gf == GF_HRULE) { /* [-] */
+ if (im->dynamic_labels && im->gdes[i].gf == GF_HRULE) { /* [-] */
cairo_save(im->cr);
cairo_new_path(im->cr);
cairo_set_line_width(im->cr, 1.0);
image_desc_t *im)
{
int lazy = lazy_check(im);
- int cnt;
+ int cnt;
- /* imgformat XML or higher dispatch to xport
- * output format there is selected via graph_type
+ /* imgformat XML or higher dispatch to xport
+ * output format there is selected via graph_type
*/
if (im->imgformat >= IF_XML) {
return rrd_graph_xport(im);
break;
case GTYPE_XY:
return graph_paint_xy(im,lazy,cnt);
- break;
+ break;
}
/* final return with error*/
rrd_set_error("Graph type %i is not implemented",im->graph_type);
case GF_GRAD: {
rrd_value_t diffval = im->maxval - im->minval;
rrd_value_t maxlimit = im->maxval + 9 * diffval;
- rrd_value_t minlimit = im->minval - 9 * diffval;
+ rrd_value_t minlimit = im->minval - 9 * diffval;
for (ii = 0; ii < im->xsize; ii++) {
/* fix data points at oo and -oo */
if (isinf(im->gdes[i].p_data[ii])) {
if (im->gdes[i].gf != GF_GRAD) {
gfx_add_point(im, foreX[cntI], foreY[cntI]);
} else {
- gfx_add_rect_fadey(im,
+ gfx_add_rect_fadey(im,
lastx, foreY[0],
- foreX[cntI], foreY[cntI], lasty,
+ foreX[cntI], foreY[cntI], lasty,
im->gdes[i].col,
im->gdes[i].col2,
im->gdes[i].gradheight
}
idxI = -1;
drawem = 0;
- if (im->gdes[i].gf != GF_GRAD)
+ if (im->gdes[i].gf != GF_GRAD)
gfx_close_path(im);
}
if (drawem != 0) {
int graph_paint_xy(
image_desc_t UNUSED(*im), int UNUSED(lazy), int UNUSED(cnt))
{
- rrd_set_error("XY diagramm not implemented");
+ rrd_set_error("XY diagramm not implemented");
return -1;
}
im->gdes[im->gdes_c - 1].rrd[0] = '\0';
im->gdes[im->gdes_c - 1].ds = -1;
im->gdes[im->gdes_c - 1].cf_reduce = CF_AVERAGE;
- im->gdes[im->gdes_c - 1].cf_reduce_set = 0;
+ im->gdes[im->gdes_c - 1].cf_reduce_set = 0;
im->gdes[im->gdes_c - 1].cf = CF_AVERAGE;
im->gdes[im->gdes_c - 1].yrule = DNAN;
im->gdes[im->gdes_c - 1].xrule = 0;
im_free(&im);
return NULL;
}
-
+
/* Everything is now read and the actual work can start */
if (graph_paint(&im) == -1) {
rrd_info_free(im.grinfo);
#endif
im->gdef_map = g_hash_table_new_full(g_str_hash, g_str_equal,g_free,NULL);
//use of g_free() cause heap damage on windows. Key is allocated by malloc() in sprintf_alloc(), so free() must use
- im->rrd_map = g_hash_table_new_full(g_str_hash, g_str_equal,free,NULL);
+ im->rrd_map = g_hash_table_new_full(g_str_hash, g_str_equal,free,NULL);
im->graph_type = GTYPE_TIME;
im->base = 1000;
im->daemon_addr = NULL;
fontmap = pango_cairo_font_map_get_default();
}
+#ifdef HAVE_PANGO_FONT_MAP_CREATE_CONTEXT
+ context = pango_font_map_create_context((PangoFontMap*)fontmap);
+#else
context = pango_cairo_font_map_create_context((PangoCairoFontMap*)fontmap);
-
+#endif
pango_cairo_context_set_resolution(context, 100);
pango_cairo_update_context(im->cr,context);
"%[0-9.e+-]:%[0-9.e+-]",
double_str,
double_str2 ) != 2) {
- if ( rrd_strtodbl( double_str, 0, &(im->grid_dash_on),NULL) !=2
+ if ( rrd_strtodbl( double_str, 0, &(im->grid_dash_on),NULL) !=2
|| rrd_strtodbl( double_str2, 0, &(im->grid_dash_off), NULL) != 2 ){
rrd_set_error("expected grid-dash format float:float");
return;
}
}
- break;
+ break;
case 1009: /* enable dynamic labels */
im->dynamic_labels = 1;
- break;
+ break;
case 1010:
strncpy(week_fmt,optarg,sizeof week_fmt);
week_fmt[(sizeof week_fmt)-1]='\0';
#define OVECCOUNT 30 /* should be a multiple of 3 */
-static int bad_format_check(const char *pattern, char *fmt) {
+static int bad_format_check(const char *pattern, char *fmt) {
#ifdef HAVE_G_REGEX_NEW
GError *gerr = NULL;
GRegex *re = g_regex_new(pattern, G_REGEX_EXTENDED, 0, &gerr);
char *format)
{
int j, jj;
-
+
/* Handling based on
- ANSI C99 Specifications http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
- - Single UNIX Specification version 2 http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
+ - Single UNIX Specification version 2 http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
- POSIX:2001/Single UNIX Specification version 3 http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html
- POSIX:2008 Specifications http://www.opengroup.org/onlinepubs/9699919799/functions/strftime.html
- Specifications tells
+ Specifications tells
"If a conversion specifier is not one of the above, the behavior is undefined."
C99 tells