Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_input_get_parsing_location ( CRInput a_this,
CRParsingLocation *  a_loc 
)

Gets the current parsing location. The Parsing location is a public datastructure that represents the current line/column/byte offset/ in the input stream.

Parameters:
a_this the current instance of CRInput
a_loc the set parsing location.
Returns:
CR_OK upon successful completion, an error code otherwise.

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

{
        g_return_val_if_fail (a_this 
                              && PRIVATE (a_this)
                              && a_loc, 
                              CR_BAD_PARAM_ERROR) ;

        a_loc->line = PRIVATE (a_this)->line ;
        a_loc->column = PRIVATE (a_this)->col ;
        if (PRIVATE (a_this)->next_byte_index) {
                a_loc->byte_offset = PRIVATE (a_this)->next_byte_index - 1 ;
        } else {
                a_loc->byte_offset = PRIVATE (a_this)->next_byte_index  ;
        }
        return CR_OK ;
}


Generated by  Doxygen 1.6.0   Back to index