1
0
Fork 0

Portability updates contributed by Bernie Bright.

This commit is contained in:
curt 1999-01-19 20:41:46 +00:00
parent 9b4fe7d92d
commit 8aec98017a
4 changed files with 36 additions and 17 deletions

View file

@ -35,20 +35,18 @@
#include <string> #include <string>
#include "Include/compiler.h" #include "Include/compiler.h"
FG_USING_STD(string); #ifdef FG_HAVE_STD_INCLUDES
# include <istream>
#else
# include <istream.h>
#endif
FG_USING_STD(string);
FG_USING_STD(istream);
// #ifdef FG_HAVE_STD_INCLUDES
// #include <istream>
// #else
// #include <istream.h>
// #endif
#include "zfstream.hxx" #include "zfstream.hxx"
// Input stream manipulator function type.
class fg_gzifstream;
typedef fg_gzifstream& (*IManipFunc)( fg_gzifstream& );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// Envelope class for gzifstream. // Envelope class for gzifstream.
@ -72,6 +70,8 @@ public:
void attach( int fd, ios_openmode io_mode = ios_in|ios_binary ); void attach( int fd, ios_openmode io_mode = ios_in|ios_binary );
void close() { gzbuf.close(); }
private: private:
// Not defined! // Not defined!
fg_gzifstream( const fg_gzifstream& ); fg_gzifstream( const fg_gzifstream& );
@ -92,6 +92,9 @@ istream& skipcomment( istream& in );
#endif /* _FGSTREAM_HXX */ #endif /* _FGSTREAM_HXX */
// $Log$ // $Log$
// Revision 1.6 1999/01/19 20:41:46 curt
// Portability updates contributed by Bernie Bright.
//
// Revision 1.5 1998/11/06 14:05:13 curt // Revision 1.5 1998/11/06 14:05:13 curt
// More portability improvements by Bernie Bright. // More portability improvements by Bernie Bright.
// //

View file

@ -25,11 +25,15 @@
#define STRUTILS_H #define STRUTILS_H
#include <string> #include <string>
// #include <cstdlib> #include "Include/compiler.h"
#include <stdlib.h>
#include "Include/fg_stl_config.h" #ifdef FG_HAVE_STD_INCLUDES
FG_USING_NAMESPACE(std); # include <cstdlib>
#else
# include <stdlib.h>
#endif
FG_USING_STD(string);
// Default characters to remove. // Default characters to remove.
extern const string whitespace; extern const string whitespace;
@ -60,6 +64,9 @@ atoi( const string& str )
#endif // STRUTILS_H #endif // STRUTILS_H
// $Log$ // $Log$
// Revision 1.4 1999/01/19 20:41:47 curt
// Portability updates contributed by Bernie Bright.
//
// Revision 1.3 1998/10/16 00:50:57 curt // Revision 1.3 1998/10/16 00:50:57 curt
// Remove leading _ from a couple defines. // Remove leading _ from a couple defines.
// //

View file

@ -25,8 +25,6 @@
#include <memory.h> #include <memory.h>
#include "zfstream.hxx" #include "zfstream.hxx"
const int gzfilebuf::page_size;
// //
// Construct a gzfilebuf object. // Construct a gzfilebuf object.
// Allocate memory for 'get' buffer and zero all buffer pointers. // Allocate memory for 'get' buffer and zero all buffer pointers.
@ -311,6 +309,9 @@ gzifstream::close()
#endif #endif
// $Log$ // $Log$
// Revision 1.3 1999/01/19 20:41:48 curt
// Portability updates contributed by Bernie Bright.
//
// Revision 1.2 1998/11/06 14:05:14 curt // Revision 1.2 1998/11/06 14:05:14 curt
// More portability improvements by Bernie Bright. // More portability improvements by Bernie Bright.
// //

View file

@ -44,6 +44,11 @@
# define ios_badbit ios_base::badbit # define ios_badbit ios_base::badbit
# define ios_failbit ios_base::failbit # define ios_failbit ios_base::failbit
FG_USING_STD(streambuf);
FG_USING_STD(ios_base);
FG_USING_STD(streampos);
FG_USING_STD(streamoff);
#else #else
# ifdef FG_HAVE_STREAMBUF # ifdef FG_HAVE_STREAMBUF
@ -125,7 +130,7 @@ private:
int ibuf_size; int ibuf_size;
char* ibuffer; char* ibuffer;
static const int page_size = 4096; enum { page_size = 4096 };
private: private:
// Not defined // Not defined
@ -147,6 +152,9 @@ struct gzifstream_base
#endif // _zfstream_hxx #endif // _zfstream_hxx
// $Log$ // $Log$
// Revision 1.7 1999/01/19 20:41:49 curt
// Portability updates contributed by Bernie Bright.
//
// Revision 1.6 1998/12/07 21:10:26 curt // Revision 1.6 1998/12/07 21:10:26 curt
// Portability improvements. // Portability improvements.
// //