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

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     filename - istguchr.cpp                                  |*/
  4. /*|                                                              |*/
  5. /*|     Class istream                                            |*/
  6. /*|          istream& istream::get( unsigned char& )             |*/
  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. istream _FAR & istream::get(unsigned char _FAR & c)
  22. {
  23.     if( ipfx1() )
  24.         {
  25.         if( bp->in_avail() )
  26.             {
  27.             gcount_ = 1;
  28.             c = bp->sbumpc();
  29.             }
  30.         else
  31.             c = do_get();
  32.         }
  33.     else
  34.         setstate(ios::failbit);
  35.  
  36.     return *this;
  37. }
  38.  
  39.  
  40.