home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / INCLUDE / STDIOSTR.H < prev    next >
Text File  |  1993-09-17  |  4KB  |  88 lines

  1. #pragma info( none )
  2. #ifndef __CHKHDR__
  3.    #pragma info( none )
  4. #endif
  5. #pragma info( restore )
  6.  
  7. #ifndef __stdstream_h
  8.    #define __stdstream_h
  9.  
  10.    /********************************************************************/
  11.    /*  <stdiostr.h> header file                                        */
  12.    /*                                                                  */
  13.    /*  Licensed Materials - Property of IBM                            */
  14.    /*                                                                  */
  15.    /*  IBM C/C++ Tools Version 2.01                                    */
  16.    /*  Copyright (C) International Business Machines Corp., 1991, 1993.*/
  17.    /*  All rights reserved                                             */
  18.    /*                                                                  */
  19.    /*                                                                  */
  20.    /*                                                                  */
  21.    /*  Licensed Materials - Property of USL                            */
  22.    /*                                                                  */
  23.    /*  Standard Class Library Version 3.0                              */
  24.    /*  Copyright (C) Unix System Laboratories Inc. 1991.               */
  25.    /*  All rights reserved                                             */
  26.    /*                                                                  */
  27.    /********************************************************************/
  28.  
  29.    /**************************************************************************/
  30.    /*  C++ source for the C++ Language System, Release 3.0.  This product    */
  31.    /*  is a new release of the original cfront developed in the computer     */
  32.    /*  science research center of AT&T Bell Laboratories.                    */
  33.    /*                                                                        */
  34.    /*  Copyright (c) 1991 AT&T and UNIX System Laboratories, Inc.            */
  35.    /*  Copyright (c) 1984, 1989, 1990 AT&T.  All Rights Reserved.            */
  36.    /*                                                                        */
  37.    /*  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of AT&T and UNIX System   */
  38.    /*  Laboratories, Inc.  The copyright notice above does not evidence      */
  39.    /*  any actual or intended publication of such source code.               */
  40.    /*                                                                        */
  41.    /*  UNIX is a registered trademark of UNIX System Laboratories, Inc.      */
  42.    /*                                                                        */
  43.    /*  ident "@(#)ctrans:incl-master/const-headers/stdiostream.h     1.4"    */
  44.    /**************************************************************************/
  45.  
  46.    #include <iostream.h>
  47.    #include <stdio.h>
  48.  
  49.    #pragma pack(4)
  50.  
  51.    class stdiobuf : public streambuf {
  52.            /*** stdiobuf is obsolete, should be avoided ***/
  53.    public: // Virtuals
  54.            virtual int     overflow(int=EOF);
  55.            virtual int     underflow();
  56.            virtual int     sync() ;
  57.            virtual streampos
  58.                            seekoff(streamoff,ios::seek_dir,int) ;
  59.            virtual int     pbackfail(int c);
  60.    public:
  61.                            stdiobuf(FILE* f) ;
  62.            FILE*           stdiofile() { return fp ; }
  63.            virtual         ~stdiobuf() ;
  64.    private:
  65.            FILE*           fp ;
  66.            int             last_op ;
  67.            char            buf[2];
  68.    };
  69.  
  70.    class stdiostream : public ios {
  71.    public:
  72.                            stdiostream(FILE*) ;
  73.                            ~stdiostream() ;
  74.            stdiobuf*       rdbuf() ;
  75.    private:
  76.            stdiobuf        buf ;
  77.    };
  78.  
  79.    #pragma pack()
  80.  
  81. #endif
  82.  
  83. #pragma info( none )
  84. #ifndef __CHKHDR__
  85.    #pragma info( restore )
  86. #endif
  87. #pragma info( restore )
  88.