gtk1 does not provide g_ascii_isxdigit so provide it through strutil.h instead
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 29 Dec 2006 21:57:19 +0000 (21:57 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 29 Dec 2006 21:57:19 +0000 (21:57 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20233 f5534014-38df-0310-8fa8-9805f1628bb7

epan/strutil.h

index fcbabeb02387697dc5266ee08ba084cb72f7cfa5..4c21035557bcfa4fcb3b6afadece69034d113126 100644 (file)
@@ -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__ */