Logo Search packages:      
Sourcecode: inkscape version File versions

int Inkscape::IO::GzipInputStream::get (  )  [virtual]

Reads the next byte of data from the input stream. -1 if EOF

Reimplemented from Inkscape::IO::BasicInputStream.

Definition at line 107 of file gzipstream.cpp.

{
    int ch = -1;
    if (closed) {
        // leave return value -1
    }
    else if (!loaded && !load()) {
        closed=true;
    } else {
        loaded = true;

        int zerr = Z_OK;
        if ( outputBufPos >= outputBufLen ) {
            // time to read more, if we can
            zerr = fetchMore();
        }

        if ( outputBufPos < outputBufLen ) {
            ch = (int)outputBuf[outputBufPos++];
        }
    }

    return ch;
}


Generated by  Doxygen 1.6.0   Back to index