Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_om_parser_simply_parse_buf ( const guchar *  a_buf,
gulong  a_len,
enum CREncoding  a_enc,
CRStyleSheet **  a_result 

The simpler way to parse an in memory css2 buffer.

a_buf the css2 in memory buffer.
a_len the length of the in memory buffer.
a_enc the encoding of the in memory buffer.
a_result out parameter. The resulting css2 style sheet.
CR_OK upon successfull completion, an error code otherwise.

Definition at line 879 of file cr-om-parser.c.

References cr_om_parser_destroy(), cr_om_parser_new(), cr_om_parser_parse_buf(), and cr_utils_trace_info.

        CROMParser *parser = NULL;
        enum CRStatus status = CR_OK;

        parser = cr_om_parser_new (NULL);
        if (!parser) {
                cr_utils_trace_info ("Could not create om parser");
                cr_utils_trace_info ("System possibly out of memory");
                return CR_ERROR;

        status = cr_om_parser_parse_buf (parser, a_buf, a_len,
                                         a_enc, a_result);

        if (parser) {
                cr_om_parser_destroy (parser);
                parser = NULL;

        return status;

Generated by  Doxygen 1.6.0   Back to index