diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-aim.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-giop.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ncp-sss.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-tds.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-usb.c | 7 | ||||
-rw-r--r-- | epan/print.c | 3 | ||||
-rw-r--r-- | epan/strutil.c | 15 |
8 files changed, 17 insertions, 28 deletions
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c index 5eed6a3739..7fb091ae22 100644 --- a/epan/dissectors/packet-aim.c +++ b/epan/dissectors/packet-aim.c @@ -32,8 +32,6 @@ #include <glib.h> -#include "isprint.h" - #include <epan/packet.h> #include <epan/strutil.h> @@ -576,9 +574,9 @@ aim_get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length) #ifdef STRIP_TAGS if( j == '<' ) bracket = TRUE; if( j == '>' ) bracket = FALSE; - if( (isprint(j) ) && (bracket == FALSE) && (j != '>')) + if( (g_ascii_isprint(j) ) && (bracket == FALSE) && (j != '>')) #else - if( isprint(j) ) + if( g_ascii_isprint(j) ) #endif { msg[i] = j; diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index e485ef85e1..4973ca81ab 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -94,7 +94,6 @@ #include <epan/expert.h> #include <epan/prefs.h> #include <ctype.h> -#include <isprint.h> #include "packet-dcerpc.h" #include "packet-dcom.h" @@ -1602,7 +1601,7 @@ dcom_tvb_get_nwstringz0(tvbuff_t *tvb, gint offset, guint32 inLength, gchar *psz /* is this character printable? */ /* XXX - there are probably more printable chars than isprint() */ - if(!isprint(u8Tmp1) || u8Tmp2 != 0) { + if(!g_ascii_isprint(u8Tmp1) || u8Tmp2 != 0) { *isPrintable = FALSE; } } diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index f1d1afdc72..544b20a69d 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -287,8 +287,6 @@ #include <glib.h> #include <math.h> -#include "isprint.h" - #include <epan/packet.h> #include <epan/exceptions.h> #include <epan/conversation.h> @@ -2082,7 +2080,7 @@ gchar *make_printable_string (const gchar *in, guint32 len) { memcpy(print_string, in, len); /* and make a copy of input data */ for (i=0; i < len; i++) { - if ( !isprint( (unsigned char)print_string[i] ) ) + if ( !g_ascii_isprint( (unsigned char)print_string[i] ) ) print_string[i] = '.'; } diff --git a/epan/dissectors/packet-ncp-sss.c b/epan/dissectors/packet-ncp-sss.c index 46afec012f..d6213ef699 100644 --- a/epan/dissectors/packet-ncp-sss.c +++ b/epan/dissectors/packet-ncp-sss.c @@ -31,7 +31,6 @@ #include <epan/strutil.h> #include "packet-ncp-int.h" #include "packet-ncp-sss.h" -#include "isprint.h" void proto_register_sss(void); @@ -456,7 +455,7 @@ sss_string(tvbuff_t* tvb, int hfinfo, proto_tree *sss_tree, int offset, gboolean } for ( i = 0; i < str_length; i++ ) { c_char = tvb_get_guint8(tvb, foffset); - if (isprint(c_char)) { + if (g_ascii_isprint(c_char)) { buffer[i] = c_char; } else { if (c_char) { diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index e53158213a..78f6902ff4 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -149,8 +149,6 @@ #include <string.h> #include <ctype.h> -#include "isprint.h" - #include <glib.h> #include <epan/packet.h> @@ -1250,7 +1248,7 @@ static char *data_to_string(void *data, guint col_type, guint col_size) case SYBVARCHAR: /* strncpy(result, (char *)data, col_size); */ for (i=0;i<col_size && i<(256-1);i++) - if (!isprint(((char *)data)[i])) result[i]='.'; + if (!g_ascii_isprint(((char *)data)[i])) result[i]='.'; else result[i]=((char *)data)[i]; result[i] = '\0'; break; diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index cb23e9dcdf..97f12808b4 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -27,7 +27,6 @@ #include "config.h" #include <ctype.h> -#include "isprint.h" #include <glib.h> #include <epan/packet.h> @@ -2563,7 +2562,7 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t type = tvb_get_guint8(tvb, 8); proto_tree_add_uint_format_value(tree, hf_usb_urb_type, tvb, 8, 1, type, "%s ('%c')", val_to_str(type, usb_urb_type_vals, "Unknown %d"), - isprint(type) ? type : '.'); + g_ascii_isprint(type) ? type : '.'); proto_tree_add_item(tree, hf_usb_transfer_type, tvb, 9, 1, ENC_BIG_ENDIAN); transfer_type = tvb_get_guint8(tvb, 9); @@ -2590,7 +2589,7 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_string(tree, hf_usb_setup_flag, tvb, 14, 1, "relevant (0)"); } else { proto_tree_add_string_format_value(tree, hf_usb_setup_flag, tvb, - 14, 1, flag, "not relevant ('%c')", isprint(flag[0]) ? flag[0]: '.'); + 14, 1, flag, "not relevant ('%c')", g_ascii_isprint(flag[0]) ? flag[0]: '.'); } flag[0] = tvb_get_guint8(tvb, 15); @@ -2599,7 +2598,7 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_string(tree, hf_usb_data_flag, tvb, 15, 1, "present (0)"); } else { proto_tree_add_string_format_value(tree, hf_usb_data_flag, tvb, - 15, 1, flag, "not present ('%c')", isprint(flag[0]) ? flag[0] : '.'); + 15, 1, flag, "not present ('%c')", g_ascii_isprint(flag[0]) ? flag[0] : '.'); } tvb_memcpy(tvb, (guint8 *)&val64, 16, 8); diff --git a/epan/print.c b/epan/print.c index f1952e3a65..6f889c90d1 100644 --- a/epan/print.c +++ b/epan/print.c @@ -43,7 +43,6 @@ #include <epan/packet-range.h> #include "print.h" -#include "isprint.h" #include "ps.h" #include "version_info.h" #include <wsutil/file_util.h> @@ -767,7 +766,7 @@ proto_tree_write_carrays(guint32 num, FILE *fh, epan_dissect_t *edt) for (i = 0; i < length; i++) { fprintf(fh, "0x%02x", *(cp + i)); - ascii[i % 8] = isprint(*(cp + i)) ? *(cp + i) : '.'; + ascii[i % 8] = g_ascii_isprint(*(cp + i)) ? *(cp + i) : '.'; if (i == (length - 1)) { guint rem; diff --git a/epan/strutil.c b/epan/strutil.c index a3e8710c0e..9d6ff84e32 100644 --- a/epan/strutil.c +++ b/epan/strutil.c @@ -30,7 +30,6 @@ #include <glib.h> #include "strutil.h" #include "emem.h" -#include <../isprint.h> #ifdef _WIN32 @@ -185,7 +184,7 @@ format_text(const guchar *string, size_t len) } c = *string++; - if (isprint(c)) { + if (g_ascii_isprint(c)) { fmtbuf[idx][column] = c; column++; } else { @@ -291,7 +290,7 @@ format_text_wsp(const guchar *string, size_t len) } c = *string++; - if (isprint(c)) { + if (g_ascii_isprint(c)) { fmtbuf[idx][column] = c; column++; } else if (isspace(c)) { @@ -400,7 +399,7 @@ format_text_chr(const guchar *string, const size_t len, const guchar chr) } c = *string++; - if (isprint(c)) + if (g_ascii_isprint(c)) { fmtbuf[idx][column] = c; column++; @@ -566,7 +565,7 @@ uri_str_to_bytes(const char *uri_str, GByteArray *bytes) { p = (const guchar *)uri_str; while (*p) { - if (! isascii(*p) || ! isprint(*p)) + if (! isascii(*p) || ! g_ascii_isprint(*p)) return FALSE; if (*p == '%') { p++; @@ -637,7 +636,7 @@ format_uri(const GByteArray *bytes, const gchar *reserved_chars) } c = bytes->data[column]; - if (!isascii(c) || !isprint(c) || c == '%') { + if (!isascii(c) || !g_ascii_isprint(c) || c == '%') { is_reserved = TRUE; } @@ -976,7 +975,7 @@ escape_string_len(const char *string) } /* Values that can't nicely be represented * in ASCII need to be escaped. */ - else if (!isprint((unsigned char)c)) { + else if (!g_ascii_isprint(c)) { /* c --> \xNN */ repr_len += 4; } @@ -1007,7 +1006,7 @@ escape_string(char *buf, const char *string) } /* Values that can't nicely be represented * in ASCII need to be escaped. */ - else if (!isprint((unsigned char)c)) { + else if (!g_ascii_isprint(c)) { /* c --> \xNN */ g_snprintf(hexbuf,sizeof(hexbuf), "%02x", (unsigned char) c); *bufp++ = '\\'; |