1 // zlib input file stream wrapper.
3 // Written by Bernie Bright, 1998
5 // Copyright (C) 1998 Bernie Bright - bbright@c031.aone.net.au
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 // (Log is kept at end of this file)
28 # error This library requires C++
32 # include "Include/config.h"
37 #include "Include/compiler.h"
40 // #ifdef FG_HAVE_STD_INCLUDES
43 // #include <istream.h>
46 #include "zfstream.hxx"
48 // Input stream manipulator function type.
50 typedef fg_gzifstream& (*IManipFunc)( fg_gzifstream& );
52 //-----------------------------------------------------------------------------
54 // Envelope class for gzifstream.
56 class fg_gzifstream : private gzifstream_base, public istream
62 // Attempt to open a file with and without ".gz" extension.
63 fg_gzifstream( const string& name,
64 ios_openmode io_mode = ios_in | ios_binary );
67 fg_gzifstream( int fd, ios_openmode io_mode = ios_in|ios_binary );
69 // Attempt to open a file with and without ".gz" extension.
70 void open( const string& name,
71 ios_openmode io_mode = ios_in|ios_binary );
73 void attach( int fd, ios_openmode io_mode = ios_in|ios_binary );
77 fg_gzifstream( const fg_gzifstream& );
78 void operator= ( const fg_gzifstream& );
81 // istream manipulator that skips to end of line.
82 istream& skipeol( istream& in );
84 // istream manipulator that skips over white space.
85 istream& skipws( istream& in );
87 // istream manipulator that skips comments and white space.
88 // A comment starts with '#'.
89 istream& skipcomment( istream& in );
92 #endif /* _FGSTREAM_HXX */
95 // Revision 1.5 1998/11/06 14:05:13 curt
96 // More portability improvements by Bernie Bright.
98 // Revision 1.4 1998/10/16 00:50:56 curt
99 // Remove leading _ from a couple defines.
101 // Revision 1.3 1998/10/13 00:10:06 curt
102 // More portability changes to help with windoze compilation problems.
104 // Revision 1.2 1998/09/24 15:22:18 curt
105 // Additional enhancements.
107 // Revision 1.1 1998/09/01 19:06:29 curt