Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Cats

Name: Anonymous 2011-09-26 2:54

Tell me about your cat(s), /prog/.

Name: Anonymous 2011-09-26 10:15

>>17
#include <stdio.h>
int main(int argc, char **argv) {
    int i = 0, c;
    FILE *f = stdin;
    if (argc == 1)
        goto no_arguments;
    while (i++ < argc) {
        f = fopen(argv[i], "rb");
        if (!f) {
            fprintf("cat: error opening %s", argv[i]);
            return 1;
        }
        no_arguments:
        while ((c = fgetc(f)) != EOF)
            putchar(c);
    }
    return 0;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List