summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2008-05-05 19:32:23 +0200
committerRocco Rutte <pdmef@gmx.net>2008-05-05 19:32:23 +0200
commit60c75a960a6f48086918cee55c8c043b5d0eb1a3 (patch)
tree3fa448be9c09a681ba9fa0a20c0bab2637d129ae
parentdbae6e1e3925284f501dfbd53f71c685453da7fb (diff)
Fix some compiler warnings if compiling without system wide character functions
-rw-r--r--mbyte.c8
-rw-r--r--mbyte.h8
2 files changed, 12 insertions, 4 deletions
diff --git a/mbyte.c b/mbyte.c
index ab0703f6..9bc6f5d3 100644
--- 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 a9a97a20..5691fda5 100644
--- a/mbyte.h
+++ b/mbyte.h
@@ -20,11 +20,19 @@
#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);