cmark_parser *cmark_parser_new(int options) { cmark_parser *parser = (cmark_parser *)malloc(sizeof(cmark_parser)); cmark_node *document = make_document(); cmark_strbuf *line = (cmark_strbuf *)malloc(sizeof(cmark_strbuf)); cmark_strbuf *buf = (cmark_strbuf *)malloc(sizeof(cmark_strbuf)); cmark_strbuf_init(line, 256); cmark_strbuf_init(buf, 0); parser->refmap = cmark_reference_map_new(); parser->root = document; parser->current = document; parser->line_number = 0; parser->offset = 0; parser->column = 0; parser->first_nonspace = 0; parser->first_nonspace_column = 0; parser->indent = 0; parser->blank = false; parser->curline = line; parser->last_line_length = 0; parser->linebuf = buf; parser->options = options; return parser; }
cmark_parser *cmark_parser_new() { cmark_parser *parser = (cmark_parser*)malloc(sizeof(cmark_parser)); cmark_node *document = make_document(); cmark_strbuf *line = (cmark_strbuf*)malloc(sizeof(cmark_strbuf)); cmark_strbuf *buf = (cmark_strbuf*)malloc(sizeof(cmark_strbuf)); cmark_strbuf_init(line, 256); cmark_strbuf_init(buf, 0); parser->refmap = cmark_reference_map_new(); parser->root = document; parser->current = document; parser->line_number = 0; parser->curline = line; parser->linebuf = buf; return parser; }