From 746ee39329954d5bca8d62736844bc17b1d0516c Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Sat, 21 Dec 2013 15:01:45 +0000 Subject: Drop isprint.h use g_ascii_isprint() when this include hack was enabled. svn path=/trunk/; revision=54327 --- epan/strutil.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'epan/strutil.c') 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 #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++ = '\\'; -- cgit v1.2.1