aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/follow_dlg.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2001-04-10 12:07:40 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2001-04-10 12:07:40 +0000
commit2a2b4bb6b45f2591ad3e8f18392a92967f4be33d (patch)
tree4f94876aa27d63a2ce4d21b43bcc9e31c9f15c7c /gtk/follow_dlg.c
parent61f7a8eb4b9095da1fd7470262e0743694c86fc4 (diff)
Check in isprint() hack for Win32 so that Ethereal is usably while
we figure out what the real bug is. Fix set_last_open_dir() to use G_DIR_SEPARATOR and G_DIR_SEPARATOR_S for cross-platform compatibility. svn path=/trunk/; revision=3281
Diffstat (limited to 'gtk/follow_dlg.c')
-rw-r--r--gtk/follow_dlg.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c
index eb5c3fd005..cc4a8ccfd8 100644
--- a/gtk/follow_dlg.c
+++ b/gtk/follow_dlg.c
@@ -1,6 +1,6 @@
/* follow_dlg.c
*
- * $Id: follow_dlg.c,v 1.12 2001/04/02 09:41:56 guy Exp $
+ * $Id: follow_dlg.c,v 1.13 2001/04/10 12:07:39 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -639,6 +639,24 @@ follow_add_to_gtk_text(char *buffer, int nchars, gboolean is_server,
GtkWidget *text = arg;
GdkColor fg, bg;
+#ifdef _WIN32
+ /* While our isprint() hack is in place, we
+ * have to use convert some chars to '.' in order
+ * to be able to see the data we *should* see
+ * in the GtkText widget.
+ */
+ int i;
+
+ for (i = 0; i < nchars; i++) {
+ if (buffer[i] == 0x0a || buffer[i] == 0x0d) {
+ continue;
+ }
+ else if (! isprint(buffer[i])) {
+ buffer[i] = '.';
+ }
+ }
+#endif
+
if (is_server) {
color_t_to_gdkcolor(&fg, &prefs.st_server_fg);
color_t_to_gdkcolor(&bg, &prefs.st_server_bg);