]> diplodocus.org Git - nmh/blobdiff - sbr/read_switch.c
putcomp(): Use local to avoid repeating tautological ternary.
[nmh] / sbr / read_switch.c
index 4599a41c03d2f091dfff0d2257b04d53d0715d89..bb24dd4c770fcfca4553601bb0b46d7bbdea8ef5 100644 (file)
@@ -13,9 +13,9 @@
 int
 read_switch (const char *prompt, const struct swit *ansp)
 {
-    register int i;
-    register char *cp;
-    register const struct swit *ap;
+    int i;
+    char *cp;
+    const struct swit *ap;
     char ansbuf[BUFSIZ];
 
     for (;;) {
@@ -26,7 +26,7 @@ read_switch (const char *prompt, const struct swit *ansp)
            if (i == EOF)
                return 0;
            if (cp < &ansbuf[sizeof ansbuf - 1]) {
-               i = (isalpha(i) && isupper(i)) ? tolower(i) : i;
+               i = tolower(i);
                *cp++ = i;
            }
        }