Move the redefinition of "isprint()" to be used by dissectors when
[metze/wireshark/wip.git] / packet-radius.c
index f4b0ea0f689dde9f429941b5b6b6ed1e44aa2462..651da0821838ab643e53316ea86a2558153ccceb 100644 (file)
@@ -6,7 +6,7 @@
  *
  * RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
  *
- * $Id: packet-radius.c,v 1.104 2004/05/29 04:41:25 guy Exp $
+ * $Id: packet-radius.c,v 1.105 2004/07/09 23:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,6 +37,9 @@
 #include <ctype.h>
 #include <glib.h>
 #include <time.h>
+
+#include "isprint.h"
+
 #include <epan/packet.h>
 #include <epan/resolv.h>
 
@@ -2747,23 +2750,6 @@ find_radius_attr_info(guint32 attr_type, const radius_attr_info *table)
     return(NULL);
 }
 
-#if GLIB_MAJOR_VERSION >= 2
-/*
- * XXX - "isprint()" can return "true" for non-ASCII characters, but
- * those don't work with GTK+ 1.3 or later, as they take UTF-8 strings
- * as input.  Until we fix up Ethereal to properly handle non-ASCII
- * characters in all output (both GUI displays and text printouts)
- * in those versions of GTK+, we work around the problem by escaping
- * all characters that aren't printable ASCII.
- *
- * We don't know what version of GTK+ we're using, as dissectors don't
- * use any GTK+ stuff; we use GLib as a proxy for that, with GLib 2.x
- * implying GTK+ 1.3 or later (we don't support GLib 1.3[.x]).
- */
-#undef isprint
-#define isprint(c) (c >= 0x20 && c < 0x7f)
-#endif
-
 static void
 rdconvertbufftostr(gchar *dest, tvbuff_t *tvb, int offset, int length)
 {