From 597e2cbd13e2a88a105a17c5072d3cad488b164d Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Thu, 15 Apr 2004 00:29:03 +0000 Subject: [PATCH] (scm_string_trim, scm_string_trim_right, scm_string_trim_both): Cast to unsigned char for isspace. --- srfi/srfi-13.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srfi/srfi-13.c b/srfi/srfi-13.c index 99bc82c13..8cf53c28f 100644 --- a/srfi/srfi-13.c +++ b/srfi/srfi-13.c @@ -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--; }