home *** CD-ROM | disk | FTP | other *** search
/ Software Collection (I) / TOOLS.iso / c01 / 9.img / IOSTRSR1.ZIP / ISTDIPFX.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.1 KB  |  42 lines

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     istdipfx.cpp                                             |*/
  4. /*|                                                              |*/
  5. /*|     Class istream                                            |*/
  6. /*|          int istream::ipfx( 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. // implementation of ipfx
  22. // flush tied stream if needed, skip whitespace if needed
  23.  
  24. int istream::ipfx(int need)
  25. {
  26.     gcount_ = 0;
  27.  
  28.     if( ! good() )
  29.         return 0;
  30.  
  31.     // flush tied stream if needed
  32.     if ( tie()  &&  (! need  ||  need > bp->in_avail()) )
  33.         tie()->flush();
  34.  
  35.     if( ! need  &&  (ispecial & skipping) )
  36.         eatwhite();
  37.  
  38.     return good();
  39. }
  40.  
  41.  
  42.