home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK4 / SAMPLES / IOSTUTOR / HSTREAM.H$ / HSTREAM
Encoding:
Text File  |  1991-11-25  |  601 b   |  23 lines

  1. // htream.h - HP LaserJet output stream header
  2. #include <fstream.h> // Accesses 'filebuf' class
  3. #include <string.h>
  4. #include <stdio.h> // for sprintf
  5.  
  6. class hstreambuf : public filebuf
  7. {
  8. public:
  9.     hstreambuf( int filed );
  10.     virtual int sync();
  11.     virtual int overflow( int ch );
  12.     ~hstreambuf();
  13. private:
  14.     int column, line, page;
  15.     char* buffer;
  16.     void convert( long cnt );
  17.     void newline( char*& pd, int& jj );
  18.     void heading( char*& pd, int& jj );
  19.     void pstring( char* ph, char*& pd, int& jj );
  20. };
  21. ostream& und( ostream& os );
  22. ostream& reg( ostream& os );
  23.