diff options
-rw-r--r-- | man/man3/cmark.3 | 2 | ||||
-rw-r--r-- | src/blocks.c | 12 | ||||
-rw-r--r-- | src/cmark.h | 2 | ||||
-rw-r--r-- | src/main.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3 index f611786..418d333 100644 --- a/man/man3/cmark.3 +++ b/man/man3/cmark.3 @@ -212,7 +212,7 @@ cmark_node\ *cmark_parser_finish(cmark_parser\ *parser); -void\ cmark_parser_push(cmark_parser\ *parser,\ const\ char\ *buffer,\ size_t\ len); +void\ cmark_parser_feed(cmark_parser\ *parser,\ const\ char\ *buffer,\ size_t\ len); diff --git a/src/blocks.c b/src/blocks.c index dbfb21e..5d11710 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -19,7 +19,7 @@ #define peek_at(i, n) (i)->data[n] static void -S_parser_push(cmark_parser *parser, const unsigned char *buffer, size_t len, +S_parser_feed(cmark_parser *parser, const unsigned char *buffer, size_t len, bool eof); static void @@ -434,7 +434,7 @@ cmark_node *cmark_parse_file(FILE *f) while ((bytes = fread(buffer, 1, sizeof(buffer), f)) > 0) { bool eof = bytes < sizeof(buffer); - S_parser_push(parser, buffer, bytes, eof); + S_parser_feed(parser, buffer, bytes, eof); } document = cmark_parser_finish(parser); @@ -447,7 +447,7 @@ cmark_node *cmark_parse_document(const char *buffer, size_t len) cmark_parser *parser = cmark_parser_new(); cmark_node *document; - S_parser_push(parser, (const unsigned char *)buffer, len, true); + S_parser_feed(parser, (const unsigned char *)buffer, len, true); document = cmark_parser_finish(parser); cmark_parser_free(parser); @@ -455,13 +455,13 @@ cmark_node *cmark_parse_document(const char *buffer, size_t len) } void -cmark_parser_push(cmark_parser *parser, const char *buffer, size_t len) +cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len) { - S_parser_push(parser, (const unsigned char *)buffer, len, false); + S_parser_feed(parser, (const unsigned char *)buffer, len, false); } static void -S_parser_push(cmark_parser *parser, const unsigned char *buffer, size_t len, +S_parser_feed(cmark_parser *parser, const unsigned char *buffer, size_t len, bool eof) { const unsigned char *end = buffer + len; diff --git a/src/cmark.h b/src/cmark.h index d143230..2bf882a 100644 --- a/src/cmark.h +++ b/src/cmark.h @@ -226,7 +226,7 @@ cmark_node *cmark_parser_finish(cmark_parser *parser); /// CMARK_EXPORT -void cmark_parser_push(cmark_parser *parser, const char *buffer, size_t len); +void cmark_parser_feed(cmark_parser *parser, const char *buffer, size_t len); /// CMARK_EXPORT @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) start_timer(); while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) { - cmark_parser_push(parser, buffer, bytes); + cmark_parser_feed(parser, buffer, bytes); } end_timer("processing lines"); @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) */ while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0) { - cmark_parser_push(parser, buffer, bytes); + cmark_parser_feed(parser, buffer, bytes); } } |