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

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     stbalc.cpp                                               |*/
  4. /*|                                                              |*/
  5. /*|     Class streambuf                                          |*/
  6. /*|          int streambuf::doallocate()                         |*/
  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. int streambuf::doallocate()
  22. {
  23.     char *p = new char[StreambufSize];
  24.     if( ! p )
  25.         return EOF;
  26.     base_ = p;
  27.     ebuf_ = p + StreambufSize;
  28.     alloc_ = 1;
  29.     return 1;
  30. }
  31.  
  32.  
  33.