aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/vms.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-17 13:37:11 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-17 20:37:42 +0000
commit5bfde7c6386b56db80fec85e2ca7dc1d271b461c (patch)
tree7a1e391e46bf9720719ed81ea504b193a66901a8 /wiretap/vms.c
parent35a9b9813879fff308c838f8a4351abfeafa8a4a (diff)
Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars (which we weren't doing before). Change-Id: I70f3d993c9a8fbf870901f12b430d733968c3fa8 Reviewed-on: https://code.wireshark.org/review/4781 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/vms.c')
-rw-r--r--wiretap/vms.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/wiretap/vms.c b/wiretap/vms.c
index 6a1c5fb6a2..f3d14a4c23 100644
--- a/wiretap/vms.c
+++ b/wiretap/vms.c
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
/* This module reads the output of the various VMS TCPIP trace utilities
* such as TCPIPTRACE, TCPTRACE and UCX$TRACE
@@ -301,12 +300,12 @@ isdumpline( gchar *line )
{
int i, j;
- while (*line && !isalnum((guchar)*line))
+ while (*line && !g_ascii_isalnum(*line))
line++;
for (j=0; j<4; j++) {
for (i=0; i<8; i++, line++)
- if (! isxdigit((guchar)*line))
+ if (! g_ascii_isxdigit(*line))
return FALSE;
for (i=0; i<3; i++, line++)
@@ -314,7 +313,7 @@ isdumpline( gchar *line )
return FALSE;
}
- return isspace((guchar)*line);
+ return g_ascii_isspace(*line);
}
/* Parses a packet record. */
@@ -380,7 +379,7 @@ parse_vms_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gch
}
if ( (! pkt_len) && (p = strstr(line, "Length"))) {
p += sizeof("Length ");
- while (*p && ! isdigit((guchar)*p))
+ while (*p && ! g_ascii_isdigit(*p))
p++;
if ( !*p ) {
@@ -432,7 +431,7 @@ parse_vms_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gch
}
line[VMS_LINE_LENGTH] = '\0';
}
- while (line[offset] && !isxdigit((guchar)line[offset]))
+ while (line[offset] && !g_ascii_isxdigit(line[offset]))
offset++;
}
if (!parse_single_hex_dump_line(line, pd, i,