gtk1 does not provide g_ascii_isxdigit so provide it through strutil.h instead

svn path=/trunk/; revision=20233
This commit is contained in:
Ronnie Sahlberg 2006-12-29 21:57:19 +00:00
parent 32837914e6
commit d6e5083c7f
1 changed files with 7 additions and 1 deletions

View 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__ */