file.h \
fileset.h \
frame_tvbuff.h \
- isprint.h \
register.h \
version_info.h \
ws_symbol_export.h
#include <glib.h>
-#include "isprint.h"
-
#include <epan/packet.h>
#include <epan/strutil.h>
#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;
#include <epan/expert.h>
#include <epan/prefs.h>
#include <ctype.h>
-#include <isprint.h>
#include "packet-dcerpc.h"
#include "packet-dcom.h"
/* 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;
}
}
#include <glib.h>
#include <math.h>
-#include "isprint.h"
-
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/conversation.h>
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] = '.';
}
#include <epan/strutil.h>
#include "packet-ncp-int.h"
#include "packet-ncp-sss.h"
-#include "isprint.h"
void proto_register_sss(void);
}
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) {
#include <string.h>
#include <ctype.h>
-#include "isprint.h"
-
#include <glib.h>
#include <epan/packet.h>
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;
#include "config.h"
#include <ctype.h>
-#include "isprint.h"
#include <glib.h>
#include <epan/packet.h>
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);
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);
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);
#include <epan/packet-range.h>
#include "print.h"
-#include "isprint.h"
#include "ps.h"
#include "version_info.h"
#include <wsutil/file_util.h>
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;
#include <glib.h>
#include "strutil.h"
#include "emem.h"
-#include <../isprint.h>
#ifdef _WIN32
}
c = *string++;
- if (isprint(c)) {
+ if (g_ascii_isprint(c)) {
fmtbuf[idx][column] = c;
column++;
} else {
}
c = *string++;
- if (isprint(c)) {
+ if (g_ascii_isprint(c)) {
fmtbuf[idx][column] = c;
column++;
} else if (isspace(c)) {
}
c = *string++;
- if (isprint(c))
+ if (g_ascii_isprint(c))
{
fmtbuf[idx][column] = c;
column++;
p = (const guchar *)uri_str;
while (*p) {
- if (! isascii(*p) || ! isprint(*p))
+ if (! isascii(*p) || ! g_ascii_isprint(*p))
return FALSE;
if (*p == '%') {
p++;
}
c = bytes->data[column];
- if (!isascii(c) || !isprint(c) || c == '%') {
+ if (!isascii(c) || !g_ascii_isprint(c) || c == '%') {
is_reserved = TRUE;
}
}
/* 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;
}
}
/* 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++ = '\\';
+++ /dev/null
-/* isprint.h
- * Temporary redefinition of "isprint()" to cope with GTK+ 1.3 and
- * later using UTF-8 strings
- *
- * $Id$
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __ISPRINT_H__
-#define __ISPRINT_H__
-
-/*
- * 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 Wireshark 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.
- */
-#undef isprint
-#define isprint(c) (((c) >= 0x20) && ((c) < 0x7f))
-
-#endif
#include <string.h>
-#include "../isprint.h"
-
#include <epan/charsets.h>
#include <epan/packet.h>
#include <epan/prefs.h>
EBCDIC_to_ASCII1(pd[off]) :
pd[off];
- str[cur++] = isprint(c) ? c : '.';
+ str[cur++] = g_ascii_isprint(c) ? c : '.';
} else
str[cur++] = ' ';
#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"
#include <epan/prefs.h>
#include <epan/charsets.h>
-#include <../isprint.h>
#include <epan/print.h>
#include <ui/alert_box.h>
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.
*/
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] = '.';
}
}
#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"
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;
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';