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

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

unix.superglobalmegacorp.com

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