|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T c ┃
Length: 539 (0x21b) Types: TextFile Names: »cat.c«
└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen └─ ⟦this⟧ »cph85dist/stat/src/cat.c«
/* very simple versoin of cat for systems without cat */ #include <stdio.h> main (argc, argv) char **argv; { FILE *ioptr; while (--argc) { ++argv; if (*argv[0] == '-' && *argv[1] == '\0') copyout (stdin); else { ioptr = fopen (*argv, "r"); if (ioptr == NULL) { fprintf (stderr, "cat: can't open '%s'\n", *argv); exit (1); } copyout (ioptr); fclose (ioptr); } } exit (0); } copyout (ioptr) register FILE *ioptr; { register int C; while ((C = getc (ioptr)) != EOF) putchar (C); }