Logo Search packages:      
Sourcecode: inkscape version File versions

guchar cr_input_peek_byte2 ( CRInput a_this,
gulong  a_offset,
gboolean *  a_eof 
)

Same as cr_input_peek_byte() but with a simplified interface.

Parameters:
a_this the current byte input stream.
a_offset the offset of the byte to peek, starting from the current input position pointer.
a_eof out parameter. Is set to true is we reach end of stream. If set to NULL by the caller, this parameter is not taken in account.
Returns:
the read byte or 0 if something bad happened.

Definition at line 800 of file cr-input.c.

Referenced by cr_tknzr_peek_byte2().

{
        guchar result = 0;
        enum CRStatus status = CR_ERROR;

        g_return_val_if_fail (a_this && PRIVATE (a_this), 0);

        if (a_eof)
                *a_eof = FALSE;

        status = cr_input_peek_byte (a_this, CR_SEEK_CUR, a_offset, &result);

        if ((status == CR_END_OF_INPUT_ERROR)
            && a_eof)
                *a_eof = TRUE;

        return result;
}


Generated by  Doxygen 1.6.0   Back to index