mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
(scm_string_trim, scm_string_trim_right, scm_string_trim_both): Cast
to unsigned char for isspace.
This commit is contained in:
parent
3e50460304
commit
9ac10bbeb6
1 changed files with 5 additions and 5 deletions
|
@ -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 program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
|
@ -619,7 +619,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++;
|
||||
}
|
||||
|
@ -694,7 +694,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--;
|
||||
}
|
||||
|
@ -769,13 +769,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--;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue