summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-28 21:56:08 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-28 21:56:08 -0800
commitfeb119992a6fbea3cedead04b1941b1fe114990b (patch)
tree6895db0c15c9fa5125b5e800fe82f9965b8b2a1d /src/main.c
parent9e9b74fe465d95f1d827de1825a18c39810c0816 (diff)
Renamed identifiers in public API:
cmark_doc_parser => cmark_parser cmark_new_doc_parser => cmark_parser_new cmark_free_doc_parser => cmark_parser_free cmark_finish => cmark_parser_finish cmark_process_line => cmark_parser_process_line cmark_node_destroy => cmark_node_free Closes #223.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index a7f18cb..bb4fd94 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,11 +34,11 @@ int main(int argc, char *argv[])
bool ast = false;
int *files;
char buffer[4096];
- cmark_doc_parser *parser;
+ cmark_parser *parser;
size_t offset;
cmark_node *document;
- parser = cmark_new_doc_parser();
+ parser = cmark_parser_new();
files = (int *)malloc(argc * sizeof(*files));
for (i = 1; i < argc; i++) {
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
start_timer();
while (fgets((char *)buffer, sizeof(buffer), fp)) {
offset = strlen((char *)buffer);
- cmark_process_line(parser, buffer, offset);
+ cmark_parser_process_line(parser, buffer, offset);
}
end_timer("processing lines");
@@ -87,14 +87,14 @@ int main(int argc, char *argv[])
while (fgets((char *)buffer, sizeof(buffer), stdin)) {
offset = strlen((char *)buffer);
- cmark_process_line(parser, buffer, offset);
+ cmark_parser_process_line(parser, buffer, offset);
}
}
start_timer();
- document = cmark_finish(parser);
+ document = cmark_parser_finish(parser);
end_timer("finishing document");
- cmark_free_doc_parser(parser);
+ cmark_parser_free(parser);
start_timer();
print_document(document, ast);