/* This file, hw1.c, is a shell for the purpose of testing adjust(str, col). */ /* September, 1990 by Ronald E. Jacobs */ #include #define BUFSIZE 128 main() { FILE *fp; char str[BUFSIZE]; int fcstat; fp = fopen ("stdin", "a"); /* open stdin for reading only */ if (fp == NULL){ /* check for error */ printf("null pointer returned by fopen()"); } gets(str); adjust (str, 33); fcstat = fclose(fp); if(fcstat == EOF){ printf("EOF returned by fclose"); } }