s3:smbd/smb2_read improve debug message
[Samba/gebeck_regimport.git] / lib / ccan / str / debug.c
blob027915bc640cf091b9c9e2b58b00f68b80f1c583
1 #include "config.h"
2 #include <ccan/str/str_debug.h>
3 #include <assert.h>
4 #include <ctype.h>
5 #include <string.h>
7 #ifdef CCAN_STR_DEBUG
8 /* Because we mug the real ones with macros, we need our own wrappers. */
9 int str_isalnum(int i)
11 assert(i >= -1 && i < 256);
12 return isalnum(i);
15 int str_isalpha(int i)
17 assert(i >= -1 && i < 256);
18 return isalpha(i);
21 int str_isascii(int i)
23 assert(i >= -1 && i < 256);
24 return isascii(i);
27 #if HAVE_ISBLANK
28 int str_isblank(int i)
30 assert(i >= -1 && i < 256);
31 return isblank(i);
33 #endif
35 int str_iscntrl(int i)
37 assert(i >= -1 && i < 256);
38 return iscntrl(i);
41 int str_isdigit(int i)
43 assert(i >= -1 && i < 256);
44 return isdigit(i);
47 int str_isgraph(int i)
49 assert(i >= -1 && i < 256);
50 return isgraph(i);
53 int str_islower(int i)
55 assert(i >= -1 && i < 256);
56 return islower(i);
59 int str_isprint(int i)
61 assert(i >= -1 && i < 256);
62 return isprint(i);
65 int str_ispunct(int i)
67 assert(i >= -1 && i < 256);
68 return ispunct(i);
71 int str_isspace(int i)
73 assert(i >= -1 && i < 256);
74 return isspace(i);
77 int str_isupper(int i)
79 assert(i >= -1 && i < 256);
80 return isupper(i);
83 int str_isxdigit(int i)
85 assert(i >= -1 && i < 256);
86 return isxdigit(i);
89 #undef strstr
90 #undef strchr
91 #undef strrchr
93 char *str_strstr(const char *haystack, const char *needle)
95 return strstr(haystack, needle);
98 char *str_strchr(const char *haystack, int c)
100 return strchr(haystack, c);
103 char *str_strrchr(const char *haystack, int c)
105 return strrchr(haystack, c);
107 #endif