added tzset and setlocale to rrd_graph
[rrdtool.git] / src / rrd_graph.c
index 5f5ab27..c58326f 100644 (file)
 #include <io.h>
 #include <fcntl.h>
 #endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
 
 #include "rrd_graph.h"
 #include "rrd_graph_helper.h"
 
 
 #ifndef RRD_DEFAULT_FONT
+#ifdef WIN32
+#define RRD_DEFAULT_FONT "c:/winnt/fonts/COUR.TTF"
+#else
 #define RRD_DEFAULT_FONT "/usr/share/fonts/truetype/openoffice/ariosor.ttf" 
 /* #define RRD_DEFAULT_FONT "/usr/share/fonts/truetype/Arial.ttf" */
 #endif
+#endif
 
 
 text_prop_t text_prop[] = {   
@@ -183,6 +193,7 @@ enum gfx_if_en if_conv(char *string){
     
     conv_if(PNG,IF_PNG)
     conv_if(SVG,IF_SVG)
+    conv_if(EPS,IF_EPS)
 
     return (-1);
 }
@@ -2429,6 +2440,14 @@ rrd_graph(int argc, char **argv, char ***prdata, int *xsize, int *ysize)
 {
     image_desc_t   im;
 
+#ifdef HAVE_TZSET
+    tzset();
+#endif
+#ifdef HAVE_SETLOCALE
+    setlocale(LC_ALL,"");
+#endif
+            
+            
     rrd_graph_init(&im);
 
     rrd_graph_options(argc,argv,&im);