#include #include char *dyngets(char *, int, FILE *); void filedump(FILE *f) { char *in; int i = 0; while((in = dyngets(NULL, 20, f)) != NULL){ i += 1; printf("%4d; length %3d: \"%s\"", 20 * i, (int)strlen(in), in); } } int main(int argc, char *argv[]) { int i; FILE *fp; for(i = 1; i < argc; i++){ if ((fp = fopen(argv[i], "r")) != NULL){ filedump(fp); fclose(fp); } else perror(argv[i]); } return(0); }