|
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 - metrics - downloadIndex: T f
Length: 609 (0x261) Types: TextFile Names: »ffilter.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/LpPosters/ffilter.c«
/* * ffilter.c - simple FORTRAN (ANSI) to Unix print filter * input is from stdin; output to stdout */ #include <stdio.h> char s[136]; main() { while (fgets(s, 135, stdin) != NULL) { if (s[0] == '\0') continue; s[strlen(s)-1] = '\0'; /* remove trailing \n */ switch (s[0]) { case '\0': putchar('\n'); break; case ' ': printf("\n%s\r", &s[1]); break; case '+': printf("%s\r", &s[1]); break; case '0': printf("\n\n%s\r", &s[1]); break; case '1': printf("\f%s\r", &s[1]); break; default: printf("\n%s\r", &s[1]); break; } } }