Logo Search packages:      
Sourcecode: inkscape version File versions

CRParser* cr_parser_new ( CRTknzr *  a_tknzr  ) 

Creates a new parser to parse data coming the input stream given in parameter.

Parameters:
a_input the input stream of the parser. Note that the newly created parser will ref a_input and unref it when parsing reaches the end of the input stream.
Returns:
the newly created instance of CRParser, or NULL if an error occured.

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

Referenced by cr_om_parser_parse_buf().

{
        enum CRStatus status = CR_OK;

        CRParser *result = (CRParser *)g_malloc0 (sizeof (CRParser));

        PRIVATE (result) = (CRParserPriv *)g_malloc0 (sizeof (CRParserPriv));

        if (a_tknzr) {
                status = cr_parser_set_tknzr (result, a_tknzr);
        }

        g_return_val_if_fail (status == CR_OK, NULL);

        return result;
}


Generated by  Doxygen 1.6.0   Back to index