summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-09 17:02:17 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-07-09 17:02:17 +0000
commit1ee1c4d4a33ebc90cb2797175bf11c0e90fda8b2 (patch)
tree6af5e6f444f92c83192dddf0f866b0ccc2721280 /src
parent7c3fd7cbecbbccf9278b419fc23bd8a25f924177 (diff)
downloadcoreutils-1ee1c4d4a33ebc90cb2797175bf11c0e90fda8b2.tar.xz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/sort.c10
1 files changed, 5 insertions, 5 deletions
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