home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 8.ddi / IOSTRSR1.ZIP / SDBCTR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.0 KB  |  36 lines

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     sdbctr.cpp                                               |*/
  4. /*|                                                              |*/
  5. /*|     Class stdiobuf                                           |*/
  6. /*|          stdiobuf::stdiobuf( FILE* )                         |*/
  7. /*|                                                              |*/
  8. /*[]------------------------------------------------------------[]*/
  9.  
  10. /*
  11.  *      C/C++ Run Time Library - Version 5.0
  12.  *
  13.  *      Copyright (c) 1990, 1992 by Borland International
  14.  *      All Rights Reserved.
  15.  *
  16.  */
  17.  
  18. #include <ioconfig.h>
  19. #include <filesys.h>
  20. #include <stdiostr.h>
  21.  
  22.  
  23. stdiobuf::stdiobuf(FILE* f)
  24. {
  25.     sio = f;
  26.     char  *p = new char [B_size];
  27.     if( p )
  28.         {
  29.         setb(p, p+B_size+4, 1); // ~streambuf() will delete it
  30.         setp(p+4, p+4);
  31.         setg(p, p+4, p+4);
  32.         }
  33. }
  34.  
  35.  
  36.