1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

(scm_string_trim, scm_string_trim_right, scm_string_trim_both):

Cast to unsigned char for isspace.
This commit is contained in:
Kevin Ryde 2004-04-15 00:29:03 +00:00
parent d46410989e
commit 597e2cbd13

View file

@ -1,6 +1,6 @@
/* srfi-13.c --- SRFI-13 procedures for Guile
*
* Copyright (C) 2001 Free Software Foundation, Inc.
* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -593,7 +593,7 @@ SCM_DEFINE (scm_string_trim, "string-trim", 1, 3, 0,
{
while (cstart < cend)
{
if (!isspace(cstr[cstart]))
if (!isspace((int) (unsigned char) cstr[cstart]))
break;
cstart++;
}
@ -668,7 +668,7 @@ SCM_DEFINE (scm_string_trim_right, "string-trim-right", 1, 3, 0,
{
while (cstart < cend)
{
if (!isspace(cstr[cend - 1]))
if (!isspace((int) (unsigned char) cstr[cend - 1]))
break;
cend--;
}
@ -743,13 +743,13 @@ SCM_DEFINE (scm_string_trim_both, "string-trim-both", 1, 3, 0,
{
while (cstart < cend)
{
if (!isspace(cstr[cstart]))
if (!isspace((int) (unsigned char) cstr[cstart]))
break;
cstart++;
}
while (cstart < cend)
{
if (!isspace(cstr[cend - 1]))
if (!isspace((int) (unsigned char) cstr[cend - 1]))
break;
cend--;
}