Esempio n. 1
0
  istream &istream::seekg( streamoff offset, ios::seekdir dir ) {

    __lock_it( __i_lock );
    if( ipfx( 1 ) ) {
        if( rdbuf()->seekoff( offset, dir, ios::in ) == EOF ) {
            setstate( ios::failbit );
        }
        isfx();
    }
    return( *this );
  }
Esempio n. 2
0
int istream::get() {
/******************/
// Extract a single character from the input stream.
// Don't set ios::failbit.

    int          c = EOF;

    __lock_it( __i_lock );
    if( ipfx( 1 ) ) {
        c = rdbuf()->sgetchar();
        if( c == EOF ) {
            setstate( ios::eofbit );
            __last_read_length = 0;
        } else {
            __last_read_length = 1;
        }
        isfx();
    } else {
        __last_read_length = 0;
    }
    return( c );
}