From 0cdbe6af2b105d5a300305ad8c7bda495b114104 Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 3 Mar 2006 23:10:14 +0000 Subject: [PATCH] make this compile even when HAVE_MBSTOWCS is not set git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@767 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_gfx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c index 5841d508..38d188ef 100644 --- a/program/src/rrd_gfx.c +++ b/program/src/rrd_gfx.c @@ -1062,7 +1062,7 @@ 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, ch; if (!p) return; #endif @@ -1071,7 +1071,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 +1081,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(" ", fp); /* non-breaking space in unicode */ else @@ -1747,7 +1747,7 @@ 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; + unsigned char *p = node->text, ch; if (!p) return; #endif -- 2.30.2