aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-12-21 15:01:45 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-12-21 15:01:45 +0000
commit746ee39329954d5bca8d62736844bc17b1d0516c (patch)
tree68d5e307aceec48b0813e29f32314c41673c56fb /ui/gtk
parentbe733f30414ceb85304396d30b9648b6afe283e5 (diff)
Drop isprint.h use g_ascii_isprint() when this include hack was enabled.
svn path=/trunk/; revision=54327
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/bytes_view.c4
-rw-r--r--ui/gtk/export_sslkeys.c2
-rw-r--r--ui/gtk/follow_stream.c7
-rw-r--r--ui/gtk/packet_panes.c6
4 files changed, 6 insertions, 13 deletions
diff --git a/ui/gtk/bytes_view.c b/ui/gtk/bytes_view.c
index dfbbcbc316..35dcab2dad 100644
--- a/ui/gtk/bytes_view.c
+++ b/ui/gtk/bytes_view.c
@@ -36,8 +36,6 @@
#include <string.h>
-#include "../isprint.h"
-
#include <epan/charsets.h>
#include <epan/packet.h>
#include <epan/prefs.h>
@@ -753,7 +751,7 @@ _bytes_view_line_common(BytesView *bv, void *data, const int org_off, int xx, in
EBCDIC_to_ASCII1(pd[off]) :
pd[off];
- str[cur++] = isprint(c) ? c : '.';
+ str[cur++] = g_ascii_isprint(c) ? c : '.';
} else
str[cur++] = ' ';
diff --git a/ui/gtk/export_sslkeys.c b/ui/gtk/export_sslkeys.c
index ab3c38005a..a6a2e2f4cd 100644
--- a/ui/gtk/export_sslkeys.c
+++ b/ui/gtk/export_sslkeys.c
@@ -51,8 +51,6 @@
#include <epan/charsets.h>
#include <epan/prefs.h>
-#include "../isprint.h"
-
#include "ui/alert_box.h"
#include "ui/last_open_dir.h"
#include "ui/progress_dlg.h"
diff --git a/ui/gtk/follow_stream.c b/ui/gtk/follow_stream.c
index 04333115da..bf8614ab7d 100644
--- a/ui/gtk/follow_stream.c
+++ b/ui/gtk/follow_stream.c
@@ -39,7 +39,6 @@
#include <epan/prefs.h>
#include <epan/charsets.h>
-#include <../isprint.h>
#include <epan/print.h>
#include <ui/alert_box.h>
@@ -109,8 +108,8 @@ follow_add_to_gtk_text(char *buffer, size_t nchars, gboolean is_from_server,
GtkTextBuffer *buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
GtkTextIter iter;
- /* While our isprint() hack is in place, we
- * have to convert some chars to '.' in order
+ /*
+ * have to convert non printable ASCII chars to '.' in order
* to be able to see the data we *should* see
* in the GtkText widget.
*/
@@ -119,7 +118,7 @@ follow_add_to_gtk_text(char *buffer, size_t nchars, gboolean is_from_server,
for (i = 0; i < nchars; i++) {
if (buffer[i] == '\n' || buffer[i] == '\r')
continue;
- if (! isprint((guchar)buffer[i])) {
+ if (! g_ascii_isprint(buffer[i])) {
buffer[i] = '.';
}
}
diff --git a/ui/gtk/packet_panes.c b/ui/gtk/packet_panes.c
index 60c7494c55..9815124c44 100644
--- a/ui/gtk/packet_panes.c
+++ b/ui/gtk/packet_panes.c
@@ -52,8 +52,6 @@
#include <epan/prefs.h>
#include <wsutil/filesystem.h>
-#include "../isprint.h"
-
#include "ui/alert_box.h"
#include "ui/last_open_dir.h"
#include "ui/progress_dlg.h"
@@ -582,7 +580,7 @@ copy_hex_all_info(GString* copy_buffer, const guint8* data_p, int data_len, gboo
g_string_append_printf(hex_str," %02x",*data_p);
if(append_text) {
- g_string_append_printf(char_str,"%c",isprint(*data_p) ? *data_p : '.');
+ g_string_append_printf(char_str,"%c",g_ascii_isprint(*data_p) ? *data_p : '.');
}
++data_p;
@@ -628,7 +626,7 @@ copy_hex_bytes_text_only(GString* copy_buffer, const guint8* data_p, int data_le
gchar to_append;
/* Copy printable characters, newlines, and (horizontal) tabs. */
- if(isprint(*data_p)) {
+ if(g_ascii_isprint(*data_p)) {
to_append = *data_p;
} else if(*data_p==0x0a) {
to_append = '\n';