blob: 39de420b1818973f6a003627bd6df362c35e4031 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-af,v 1.1 2004/12/18 19:05:54 minskim Exp $
--- xstrtok.c.orig 2004-11-09 14:16:42.000000000 -0600
+++ xstrtok.c
@@ -55,7 +55,7 @@ xstrtok(XSTRTOK *xinfo)
/* special case for space delimiter */
if (*xinfo->delim == ' ')
- while (isspace(*scan))
+ while (isspace((unsigned char)*scan))
scan++;
/* are we finished with the line? */
@@ -85,7 +85,7 @@ xstrtok(XSTRTOK *xinfo)
for (dscan = xinfo->delim; *dscan != '\0';) /* increment is in body */
{
/* have we found a delimiter? */
- if ((*xinfo->delim == ' ' && isspace(*scan)) || *scan == *dscan++)
+ if ((*xinfo->delim == ' ' && isspace((unsigned char)*scan)) || *scan == *dscan++)
{
xinfo->scanpoint = scan + 1; /* point to next character */
*scan = '\0'; /* terminate the token */
@@ -112,7 +112,7 @@ xstrtok(XSTRTOK *xinfo)
for (dscan = xinfo->delim; *dscan != '\0';) /* increment is in body */
{
/* have we found a delimiter? */
- if ((*xinfo->delim == ' ' && isspace(*scan)) || *scan == *dscan++)
+ if ((*xinfo->delim == ' ' && isspace((unsigned char)*scan)) || *scan == *dscan++)
{
xinfo->scanpoint = scan + 1; /* point to next character */
*scan = '\0'; /* terminate the token */
|