From e2f304d54c9d336deaaf14d3eff047847fc9084b 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/program@767 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_gfx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index 5841d50..38d188e 100644 --- a/src/rrd_gfx.c +++ b/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