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

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     fsbdtr.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. // We assume that mode==0 means that we attached to an already-open file,
  23. // and should not now close it.  We do flush it in any case.
  24.  
  25. filebuf::~filebuf()
  26. {
  27.     if( mode )
  28.         close();
  29.     else
  30.         overflow(EOF);
  31. }
  32.  
  33. const int filebuf::openprot = P_default;
  34.