Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_parser_parse_file ( CRParser a_this,
const guchar *  a_file_uri,
enum CREncoding  a_enc 
)

Parses a the given in parameter.

Parameters:
a_this a pointer to the current instance of CRParser.
a_file_uri the uri to the file to load. For the time being, only local files are supported.
Returns:
CR_OK upon successfull completion, an error code otherwise.

Definition at line 2915 of file cr-parser.c.

References cr_parser_parse().

Referenced by cr_om_parser_parse_file().

{
        enum CRStatus status = CR_ERROR;
        CRTknzr *tknzr = NULL;

        g_return_val_if_fail (a_this && PRIVATE (a_this)
                              && a_file_uri, CR_BAD_PARAM_ERROR);

        tknzr = cr_tknzr_new_from_uri (a_file_uri, a_enc);

        g_return_val_if_fail (tknzr != NULL, CR_ERROR);

        status = cr_parser_set_tknzr (a_this, tknzr);
        g_return_val_if_fail (status == CR_OK, CR_ERROR);

        status = cr_parser_parse (a_this);

        return status;
}


Generated by  Doxygen 1.6.0   Back to index