Annotation of coherent/d/usr/src/examples/tolower.c, revision 1.1.1.1

1.1       root        1: #include <ctype.h>
                      2: #include <stdio.h>
                      3: 
                      4: main()
                      5: {
                      6:        FILE *fp;
                      7:        int ch;
                      8:        int filename[20];
                      9: 
                     10:        printf("Enter name of file to use: ");
                     11:        fflush(stdout);
                     12:        gets(filename);
                     13: 
                     14:        if ((fp = fopen(filename,"r")) != NULL)
                     15:        {
                     16:                while ((ch = fgetc(fp)) != EOF)
                     17:                        putchar(isupper(ch) ? tolower(ch) : toupper(ch));
                     18:        } else
                     19:                 printf("Cannot open %s.\n", filename);
                     20: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.