]> diplodocus.org Git - nmh/blobdiff - sbr/read_switch.c
Escape literal leading full stop in man/new.man.
[nmh] / sbr / read_switch.c
index dcc14b787582d985ef45f2f15286d7f1816fc752..c700243b011388e5f16bf0c51ac85b20a4b9a394 100644 (file)
@@ -19,20 +19,20 @@ read_switch (const char *prompt, const struct swit *ansp)
     char ansbuf[BUFSIZ];
 
     for (;;) {
-       printf ("%s", prompt);
+       fputs(prompt, stdout);
        fflush (stdout);
        cp = ansbuf;
        while ((i = getchar ()) != '\n') {
            if (i == EOF)
                return 0;
            if (cp < &ansbuf[sizeof ansbuf - 1]) {
-               i = (isalpha(i) && isupper(i)) ? tolower(i) : i;
+               i = tolower(i);
                *cp++ = i;
            }
        }
        *cp = '\0';
        if (ansbuf[0] == '?' || cp == ansbuf) {
-           printf ("Options are:\n");
+           puts("Options are:");
            for (ap = ansp; ap->sw; ap++)
                printf ("  %s\n", ap->sw);
            continue;