/*----------------------------------------------------------------------*/ /* Copyright (c) 1988-1989 */ /* by CompuServe Inc., Tucson, AZ. All Rights Reserved */ /* READGIF.C can be copied and distributed freely for any */ /* non-commercial purposes. READGIF.C can only be incorporated */ /* into commercial software with the permission of CompuServe Inc. */ /*----------------------------------------------------------------------*/ /* READGIF.C routines to access GIF file */ /* Procedures and Variables to read page data out of GIF file */ #include #include #include #include "readgif.h" static FILE *gif_file; extern void close_stream() { fclose( gif_file ); }/*close_stream */ extern short int next_GIF_byte( void ) { if ( feof( gif_file ) ) return -1; return (short int)(fgetc( gif_file )); } /* next_GIF_byte */ extern short int init_GIF_input( char filename[21] ) { gif_file = fopen( filename, "rb"); if ( gif_file == NULL ) { printf( "GIF file not found\n" ); return -1; }; return 0; } /*initialize_stream */