// This program extracts text from any file #include #include void main( int argc, char **argv ) { FILE *stream; int i; int col = 0; if ( argc < 2 ) return; // Open file to read line from: if( (stream = fopen( argv[1], "rb" )) == NULL ) exit( 0 ); while( ( i = fgetc( stream ) ) != EOF ) { if ( ( i > 31 ) && ( i < 127 ) ) { printf( "%c", i ); col++; if ( col == 78 ) { col = 0; printf( "\n" ); } } } fclose( stream ); return; }