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

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     istdget.cpp                                              |*/
  4. /*|                                                              |*/
  5. /*|     Class istream                                            |*/
  6. /*|          signed char istream::do_get()                       |*/
  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. // get next char, not immediately available
  22.  
  23. signed char istream::do_get()
  24. {
  25.     int c = bp->sbumpc();
  26.     if( c == EOF )
  27.         setstate(ios::eofbit | ios::failbit);
  28.     else
  29.         ++gcount_;
  30.     return c;
  31. }
  32.  
  33.  
  34.