From: Paul Eggert Date: Sun, 9 Jul 2006 17:03:20 +0000 (+0000) Subject: (check_punctuation): Don't assume that isprint etc. return X-Git-Tag: v6.0~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=925076c5d6accb0058a49e7826bd944b20a48609;p=thirdparty%2Fcoreutils.git (check_punctuation): Don't assume that isprint etc. return booleans (needed for pre-C99 hosts). --- diff --git a/src/fmt.c b/src/fmt.c index 276f12cae4..9a6c1c0fd3 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -1,5 +1,5 @@ /* GNU fmt -- simple text formatter. - Copyright (C) 1994-2005 Free Software Foundation, Inc. + Copyright (C) 1994-2006 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 published by @@ -668,7 +668,7 @@ get_line (FILE *f, int c) *wptr++ = c; c = getc (f); } - while (c != EOF && !ISSPACE (c)); + while (c != EOF && !isspace (c)); in_column += word_limit->length = wptr - word_limit->text; check_punctuation (word_limit); @@ -756,7 +756,7 @@ check_punctuation (WORD *w) unsigned char fin = *finish; w->paren = isopen (*start); - w->punct = ISPUNCT (fin); + w->punct = !! ispunct (fin); while (start < finish && isclose (*finish)) finish--; w->period = isperiod (*finish);