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

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     fsbctr1.cpp                                              |*/
  4. /*|                                                              |*/
  5. /*|     Class filebuf                                            |*/
  6. /*|          filebuf::filebuf()                                  |*/
  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 <fstream.h>
  21.  
  22. // make a closed filebuf
  23.  
  24. filebuf::filebuf()
  25. {
  26.     xfd = EOF;
  27.     mode = 0;
  28.     opened = 0;
  29.     last_seek = 0;
  30.     char* p = new char[B_size];
  31.     if( p )
  32.         {
  33.         setb(p, p+B_size, 1);   // ~streambuf() will delete buffer
  34.         setp(p+4, p+4);
  35.         setg(p, p+4, p+4);
  36.         }
  37. }
  38.  
  39.  
  40.