prepare for the release of rrdtool-1.2.14
[rrdtool.git] / src / rrd_gfx.c
index 5841d50..205dbe7 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.2.12  Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.14  Copyright by Tobi Oetiker, 1997-2006
  ****************************************************************************
  * rrd_gfx.c  graphics wrapper for rrdtool
   **************************************************************************/
@@ -1062,7 +1062,9 @@ static void svg_write_text(FILE *fp, const char *text)
        text_count = mbstowcs(cstr, "Enc-Err", 6);
     p = cstr;
 #else
-    const unsigned char *p = text, ch;
+    unsigned char *p = text;
+    unsigned char *cstr;
+    char ch;
     if (!p)
        return;
 #endif
@@ -1071,7 +1073,7 @@ static void svg_write_text(FILE *fp, const char *text)
     ch = afm_fix_osx_charset(ch); /* unsafe macro */
     switch (ch) {
     case 0:
-#ifdef HAVE_MBSTOWCS     
+#ifdef HAVE_MBSTOWCS
     free(cstr);
 #endif
     return;
@@ -1081,7 +1083,7 @@ static void svg_write_text(FILE *fp, const char *text)
     case '"': fputs(""", fp); break;
     default:
         if (ch == 32) {
-#ifdef HAVE_MBSTOWCS     
+#ifdef HAVE_MBSTOWCS
             if (p <= cstr + 1 || !*p || *p == 32)
                 fputs("&#160;", fp); /* non-breaking space in unicode */
             else
@@ -1747,7 +1749,8 @@ static void eps_write_text(eps_state *state, gfx_node_t *node)
        text_count = mbstowcs(cstr, "Enc-Err", 6);
     p = cstr;
 #else
-    const unsigned char *p = node->text, ch;
+    const unsigned char *p = node->text;
+    unsigned char ch;
     if (!p)
        return;
 #endif