summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-09 17:01:38 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-07-09 17:01:38 +0000
commit7c3fd7cbecbbccf9278b419fc23bd8a25f924177 (patch)
tree450de3a28b670d63ffdea069ef1fa536dcae5668
parentd740f0506685b862b7e76eb7174690e3adce4a38 (diff)
downloadcoreutils-7c3fd7cbecbbccf9278b419fc23bd8a25f924177.tar.xz
(apply_translations): 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.
-rw-r--r--src/dd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dd.c b/src/dd.c
index 9dc824422..276ed7472 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -977,15 +977,13 @@ apply_translations (void)
if (conversions_mask & C_UCASE)
{
for (i = 0; i < 256; i++)
- if (ISLOWER (trans_table[i]))
- trans_table[i] = TOUPPER (trans_table[i]);
+ trans_table[i] = toupper (trans_table[i]);
translation_needed = true;
}
else if (conversions_mask & C_LCASE)
{
for (i = 0; i < 256; i++)
- if (ISUPPER (trans_table[i]))
- trans_table[i] = TOLOWER (trans_table[i]);
+ trans_table[i] = tolower (trans_table[i]);
translation_needed = true;
}