[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH] btowc



From: Max Reitz <max@xxxxxxxxxx>

* btowc() nimmt ein int, kein wint_t

Signed-off-by: Max Reitz <max@xxxxxxxxxx>
---
 src/modules/include/wchar.h      |    9 +++++++++
 src/modules/lib/stdlibc/wctype.c |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/modules/include/wchar.h b/src/modules/include/wchar.h
index c458870..eca6348 100644
--- a/src/modules/include/wchar.h
+++ b/src/modules/include/wchar.h
@@ -600,6 +600,15 @@ wint_t putwchar(wchar_t wc);
  * @return Bei Erfolg > 0, im Fehlerfall -1
  */
 int fputws(const wchar_t* wcs, FILE* stream);
+
+/**
+ * Konvertiert ein Ein-Byte-Character in ein Wide-Character
+ *
+ * @param c Der Character
+ *
+ * @return Das konvertierte Zeichen, ansonsten WEOF
+ */
+wint_t btowc(int c);
 
 #endif //ifndef _WCHAR_H_
 
diff --git a/src/modules/lib/stdlibc/wctype.c b/src/modules/lib/stdlibc/wctype.c
index 8353776..0a7d25f 100644
--- a/src/modules/lib/stdlibc/wctype.c
+++ b/src/modules/lib/stdlibc/wctype.c
@@ -85,11 +85,11 @@ int iswctype(wint_t wc, wctype_t type)
 /**
  * Konvertiert ein Ein-Byte-Character in ein Wide-Character
  *
- * @param wc Der Character
+ * @param c Der Character
  *
  * @return Das konvertierte Zeichen, ansonsten WEOF
  **/
-wint_t btowc(wint_t wc)
+wint_t btowc(int c)
 {
     return (wc < 0 || wc > 127) ? WEOF : wc;
 }
-- 
1.6.3.3