Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_parser_parse_buf ( CRParser a_this,
const guchar *  a_buf,
gulong  a_len,
enum CREncoding  a_enc 

Parses a stylesheet from a buffer

a_this the current instance of CRparser
a_buf the input buffer
a_len the length of the input buffer
a_enc the encoding of the buffer
CR_OK upon successful completion, an error code otherwise.

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

References cr_parser_parse().

Referenced by cr_om_parser_parse_buf().

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

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

        tknzr = cr_tknzr_new_from_buf ((guchar*)a_buf, a_len, a_enc, FALSE);

        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