#ifndef _INCLUDE_STREAM_H #define _INCLUDE_STREAM_H /* ** $VER: stream.h 10.1 (19.7.95) ** Includes Release 40.15 ** ** '(C) Copyright 1995 Haage & Partner Computer GmbH' ** All Rights Reserved */ #ifndef __cplusplus #error must be compiled in C++ mode. #pragma + #endif #ifndef EOF #define EOF (-1) #endif struct stream; typedef stream FILE; class form { struct tmpstr { tmpstr *link; char *dynamicstr; } *string; public: form(const char*, ...); ~form(); }; class ios { protected: FILE *file; unsigned char basefield; unsigned char GUESS, WHAT, FOR; public: ios(FILE *f=0); FILE *getstream(); operator void*(); enum open_mode { in=1, out=2, app=4 }; enum seek_dir { beg=-1, cur=0, end=1 }; }; ios &flush(ios&); ios &endl(ios&); ios &dec(ios&); ios &hex(ios&); ios &oct(ios&); class ostream: public virtual ios { protected: unsigned char Reserved; public: ostream(FILE *f=0); ostream &operator << (int); ostream &operator << (unsigned); ostream &operator << (long); ostream &operator << (unsigned long); ostream &operator << (long long); ostream &operator << (unsigned long long); ostream &operator << (char); ostream &operator << (unsigned char); ostream &operator << (signed char); ostream &operator << (const char *); ostream &operator << (float); ostream &operator << (double); ostream &operator << (long double); ostream &operator << (form &); ostream &operator << (const void*); ostream &operator << (ios&(*f)(ios&)); ostream &put(char); ostream &write(const char*, int); }; class istream : public virtual ios { protected: unsigned char errorflag; public: istream(FILE *f=0); istream &operator >> (char *); istream &operator >> (unsigned char *); istream &operator >> (char&); istream &operator >> (unsigned char&); istream &operator >> (signed char&); istream &operator >> (short&); istream &operator >> (unsigned short&); istream &operator >> (int&); istream &operator >> (unsigned &); istream &operator >> (long&); istream &operator >> (unsigned long&); istream &operator >> (long long&); istream &operator >> (unsigned long long&); istream &operator >> (float&); istream &operator >> (double&); istream &operator >> (long double&); istream &read(char *,int); istream &get(char &); istream &get(unsigned char &); int get(); istream &getline(char *buf, int len, char Delim = '\n'); istream &putback(char); int eof(); operator void*(); }; #define STREAM_MAXSTRING 80 extern ostream cout, cerr, clog; extern istream cin; extern "C" { void exit(int); } #endif