Got rid of type-casting into isFOO() and toFOO() functions by
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index a70c241..7e9fccf 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -885,3 +885,45 @@ int inet_pton(int af, const char *src, void *dst);
 #ifdef MAINTAINER_MODE
 const char *get_panic_action(void);
 #endif
+
+static inline int
+isDigit(const char *ptr)
+{
+       return isdigit(*(unsigned char *)ptr);
+}
+
+static inline int
+isPrint(const char *ptr)
+{
+       return isprint(*(unsigned char *)ptr);
+}
+
+static inline int
+isSpace(const char *ptr)
+{
+       return isspace(*(unsigned char *)ptr);
+}
+
+static inline int
+isLower(const char *ptr)
+{
+       return islower(*(unsigned char *)ptr);
+}
+
+static inline int
+isUpper(const char *ptr)
+{
+       return isupper(*(unsigned char *)ptr);
+}
+
+static inline int
+toLower(const char *ptr)
+{
+       return tolower(*(unsigned char *)ptr);
+}
+
+static inline int
+toUpper(const char *ptr)
+{
+       return toupper(*(unsigned char *)ptr);
+}