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

[tyndur-devel] [PATCH 1/6] libc: iscntrl und isprint als Funktionen



! libc: iscntrl und isprint muessen als Funktionen vorhanden sein

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/include/ctype.h |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/include/ctype.h b/src/include/ctype.h
index 51cb2f4..817bedb 100644
--- a/src/include/ctype.h
+++ b/src/include/ctype.h
@@ -29,8 +29,15 @@
 #ifndef _CTYPE_H_
 #define _CTYPE_H_
 
-#define isprint(c) ((c) >= (char) 0x20)
-#define iscntrl(c) ((c) < (char) 0x20)
+static inline int isprint(int c)
+{
+    return (c >= 0x20);
+}
+
+static inline int iscntrl(int c)
+{
+    return (c < 0x20);
+}
 
 static inline int isspace(int c)
 {
-- 
1.6.0.2