From 1ee1c4d4a33ebc90cb2797175bf11c0e90fda8b2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 9 Jul 2006 17:02:17 +0000 Subject: (inittables): Use toupper rather than islower followed by toupper; it's simpler and typically faster now that we assume at least C89 semantics. Similarly for tolower. --- src/sort.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sort.c b/src/sort.c index a266bd557..4bb1149ef 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1,5 +1,5 @@ /* sort - sort lines of text (with all kinds of options). - Copyright (C) 1988, 1991-2005 Free Software Foundation, Inc. + Copyright (C) 1988, 1991-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 @@ -580,10 +580,10 @@ inittables (void) for (i = 0; i < UCHAR_LIM; ++i) { - blanks[i] = !!ISBLANK (i); - nonprinting[i] = !ISPRINT (i); - nondictionary[i] = !ISALNUM (i) && !ISBLANK (i); - fold_toupper[i] = (ISLOWER (i) ? toupper (i) : i); + blanks[i] = !! isblank (i); + nonprinting[i] = ! isprint (i); + nondictionary[i] = ! isalnum (i) && ! isblank (i); + fold_toupper[i] = toupper (i); } #if HAVE_NL_LANGINFO -- cgit v1.2.3-54-g00ecf