]> git.ozlabs.org Git - ccan/blobdiff - ccan/str/str_debug.h
str: provide checks for ctype.h char functions, and strstr and strchr functions.
[ccan] / ccan / str / str_debug.h
diff --git a/ccan/str/str_debug.h b/ccan/str/str_debug.h
new file mode 100644 (file)
index 0000000..4545cca
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef CCAN_STR_DEBUG_H
+#define CCAN_STR_DEBUG_H
+
+/* #define CCAN_STR_DEBUG 1 */
+
+#ifdef CCAN_STR_DEBUG
+/* Because we mug the real ones with macros, we need our own wrappers. */
+int str_isalnum(int i);
+int str_isalpha(int i);
+int str_isascii(int i);
+int str_isblank(int i);
+int str_iscntrl(int i);
+int str_isdigit(int i);
+int str_isgraph(int i);
+int str_islower(int i);
+int str_isprint(int i);
+int str_ispunct(int i);
+int str_isspace(int i);
+int str_isupper(int i);
+int str_isxdigit(int i);
+
+char *str_strstr(const char *haystack, const char *needle);
+char *str_strchr(const char *s, int c);
+char *str_strrchr(const char *s, int c);
+#endif /* CCAN_STR_DEBUG */
+
+#endif /* CCAN_STR_DEBUG_H */