mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(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.
This commit is contained in:
1 parent
7c3fd7cbec
commit
1ee1c4d4a3
1 file changed
+5
-5
+5
-5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user