]> granicus.if.org Git - neomutt/commitdiff
Fix some compiler warnings if compiling without system wide character functions
authorRocco Rutte <pdmef@gmx.net>
Mon, 5 May 2008 17:32:23 +0000 (19:32 +0200)
committerRocco Rutte <pdmef@gmx.net>
Mon, 5 May 2008 17:32:23 +0000 (19:32 +0200)
mbyte.c
mbyte.h

diff --git a/mbyte.c b/mbyte.c
index ab0703f60f596cbe7bc3ae6e9a55bb5a08e17a90..9bc6f5d3f24f668445820de4cf2fcd6a36234399 100644 (file)
--- a/mbyte.c
+++ b/mbyte.c
@@ -179,8 +179,8 @@ size_t mbrtowc_iconv (wchar_t *pwc, const char *s, size_t n,
   else
   {
     /* use the real input */
-    ib = s;
-    ibmax = s + n;
+    ib = (ICONV_CONST char*) s;
+    ibmax = (ICONV_CONST char*) s + n;
   }
 
   ob = bufo;
@@ -205,8 +205,8 @@ size_t mbrtowc_iconv (wchar_t *pwc, const char *s, size_t n,
       else if (k && ib > bufi + k && bufi + k + n > ibmax)
       {
        /* switch to using real input */
-       ib = s + (ib - bufi - k);
-       ibmax = s + n;
+       ib = (ICONV_CONST char*) s + (ib - bufi - k);
+       ibmax = (ICONV_CONST char*) s + n;
        k = 0;
        ++ibl;
       }
diff --git a/mbyte.h b/mbyte.h
index a9a97a201dee40ef91dceb436560eca88cab6920..5691fda5ce0b99491cbe40a92778369ce575456c 100644 (file)
--- a/mbyte.h
+++ b/mbyte.h
 #ifdef iswalnum
 # undef iswalnum
 #endif
+#ifdef iswalpha
+# undef iswalpha
+#endif
+#ifdef iswupper
+# undef iswupper
+#endif
 size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
 size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
 int iswprint (wint_t wc);
 int iswspace (wint_t wc);
 int iswalnum (wint_t wc);
+int iswalpha (wint_t wc);
+int iswupper (wint_t wc);
 wint_t towupper (wint_t wc);
 wint_t towlower (wint_t wc);
 int wcwidth (wchar_t wc);