From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: srfi-13 string-trim isspace on char Date: Tue, 06 Apr 2004 11:25:20 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <871xn1kidb.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1081214837 21614 80.91.224.253 (6 Apr 2004 01:27:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Apr 2004 01:27:17 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Apr 06 03:27:09 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BAfMr-00084m-00 for ; Tue, 06 Apr 2004 03:27:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BAfMg-00053L-G3 for guile-devel@m.gmane.org; Mon, 05 Apr 2004 21:26:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BAfMZ-00050J-P3 for guile-devel@gnu.org; Mon, 05 Apr 2004 21:26:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BAfM3-0004Xz-MM for guile-devel@gnu.org; Mon, 05 Apr 2004 21:26:50 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BAfM3-0004Xi-Ey for guile-devel@gnu.org; Mon, 05 Apr 2004 21:26:19 -0400 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by mx20.gnu.org with esmtp (Exim 4.30) id 1BAfLO-0006kB-Ig for guile-devel@gnu.org; Mon, 05 Apr 2004 21:25:38 -0400 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i361PW5v024871 for ; Tue, 6 Apr 2004 11:25:32 +1000 Original-Received: from localhost (ppp2108.dyn.pacific.net.au [61.8.33.8]) by mailproxy2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i361PVsf013088 for ; Tue, 6 Apr 2004 11:25:31 +1000 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1BAfL9-0002m2-00; Tue, 06 Apr 2004 11:25:23 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3585 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3585 --=-=-= * srfi-13.c (scm_string_trim, scm_string_trim_right, scm_string_trim_both): Cast to unsigned char for isspace. glibc works with negative char values, but c99 doesn't allow them. On solaris 7, isspace is an array lookup and a char as an index provokes a warning from gcc (3.3 at least). This would probably be for the 1.6 branch too. --=-=-= Content-Disposition: inline; filename=srfi-13.c.isspace.diff --- srfi-13.c.~1.19.~ 2003-04-07 08:05:29.000000000 +1000 +++ srfi-13.c 2004-04-06 11:21:46.000000000 +1000 @@ -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 @@ { while (cstart < cend) { - if (!isspace(cstr[cstart])) + if (!isspace((int) (unsigned char) cstr[cstart])) break; cstart++; } @@ -668,7 +668,7 @@ { while (cstart < cend) { - if (!isspace(cstr[cend - 1])) + if (!isspace((int) (unsigned char) cstr[cend - 1])) break; cend--; } @@ -743,13 +743,13 @@ { 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--; } --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--