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

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     stbsetb.cpp                                              |*/
  4. /*|                                                              |*/
  5. /*|     Class streambuf                                          |*/
  6. /*|          void streambuf::setb( char *, char *, int )         |*/
  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 <iostream.h>
  20.  
  21. void streambuf::setb(char* b, char* eb, int a)
  22. {
  23.     if( alloc_  &&  base_  &&  base_ != b )
  24.         delete base_;
  25.     base_ = b;
  26.     ebuf_ = ( b && eb && (eb >= b) ) ? eb : b;
  27.     unbuf_ = ! b;
  28.     alloc_ = a && b;
  29. }
  30.  
  31.  
  32.