aboutsummaryrefslogtreecommitdiffstats
path: root/epan/strutil.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-12-29 21:57:19 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-12-29 21:57:19 +0000
commitd6e5083c7f1d3396b970b0d9990f78db5c9c4230 (patch)
tree689cf45037f33b9fcfdf1d1c159c21dea7987f35 /epan/strutil.h
parent32837914e6ee2961e663beb8711471c7f1400bff (diff)
gtk1 does not provide g_ascii_isxdigit so provide it through strutil.h instead
svn path=/trunk/; revision=20233
Diffstat (limited to 'epan/strutil.h')
-rw-r--r--epan/strutil.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/strutil.h b/epan/strutil.h
index fcbabeb023..4c21035557 100644
--- a/epan/strutil.h
+++ b/epan/strutil.h
@@ -160,12 +160,18 @@ char * convert_string_case(const char *string, gboolean case_insensitive);
gsize g_strlcat(gchar *dst, gchar *src, gsize size);
#endif
+#if GLIB_MAJOR_VERSION < 2
/* g_ascii_isprint() does not exist in GLib 1.2[.x].
* assume all codes >=0x20 and <0x80 are ASCII printables.
*/
-#if GLIB_MAJOR_VERSION < 2
#define g_ascii_isprint(c) \
(((c<0x20)||(c>=0x80))?FALSE:TRUE)
+/* g_ascii_isxdigit() does not exist in Glib 1.2 */
+#define g_ascii_isxdigit(c) \
+ ( ((c>='0')&&(c<='9'))?TRUE: \
+ ( ((c>='a')&&(c<='f'))?TRUE: \
+ (((c>='A')&&(c<='F'))?TRUE:FALSE) ) )
+
#endif
#endif /* __STRUTIL_H__ */