/* ....[@@@..[@@@..............[@.................. MUD++ is a written from ....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and ....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++. ....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing ....[@......[@..[@@@@@..[@@@@@.................. development project. All ................................................ contributions are welcome. ....Copyright(C).1995.Melvin.Smith.............. Enjoy. ------------------------------------------------------------------------------ Melvin Smith (aka Fusion) msmith@falcon.mercer.peachnet.edu MUD++ development mailing list mudpp-list@spice.com ------------------------------------------------------------------------------ file.h */ #include <stdlib.h> #include <ctype.h> #include "io.h" #ifndef FILE_H #define FILE_H #define TERM_CHAR '~' // Implementation in file.cc class InFile : public IStream { private: char fname[256]; public: InFile() { strcpy( fname, "(filename unknown)" ); } InFile( const char *name ) : IStream( name ) { strcpy( fname, name ); } const char *getFileName() { return fname; } void error( const char * ); char *getstring( char *buf ); char *getword( char *buf ); int getnum(); unsigned long getlong(); void getbitfield( unsigned long * ); }; class OutFile : public OStream { protected: public: OutFile() { } OutFile( const char *name ) : OStream( name ) { } void putbitfield( const unsigned long *, int ); }; inline void OutFile::putbitfield( const unsigned long * field, int num ) { *this << num; for( int i = 0; i < num; i++ ) { *this << ' '; *this << field[i]; } } #endif