It's nice and simple, the error checker for the PRINT stuff which is
[rrdtool.git] / src / rrd_graph.c
index 9b46311..55f6cee 100644 (file)
@@ -6,6 +6,9 @@
 
 
 #include <sys/stat.h>
+
+#include "rrd_tool.h"
+
 #ifdef WIN32
 #include <io.h>
 #include <fcntl.h>
@@ -19,8 +22,6 @@
 #include <locale.h>
 #endif
 
-#include "rrd_tool.h"
-
 #include "rrd_graph.h"
 #include "rrd_graph_helper.h"
 
@@ -194,6 +195,7 @@ enum gfx_if_en if_conv(char *string){
     conv_if(PNG,IF_PNG)
     conv_if(SVG,IF_SVG)
     conv_if(EPS,IF_EPS)
+    conv_if(PDF,IF_PDF)
 
     return (-1);
 }
@@ -3256,6 +3258,9 @@ int bad_format(char *fmt) {
                                ptr++;
                                n++;
                                if (*ptr == '\0') return 1;
+                               else if (*ptr == ' ') ptr++;
+                               else if (*ptr == '-') ptr++;
+                               else if (*ptr == '+') ptr++;                            
                                if (*ptr == 'e' || *ptr == 'f') { 
                                        ptr++; 
                                        } else { return 1; }