cmark

My personal build of CMark ✏️

Commit
e7f6e01fd3a6ad6bbfdd76ea1f8c4eba718ae9b0
Parent
2f1e4e0edb581927b25aeba9972ed71b4605a2ba
Author
John MacFarlane <jgm@berkeley.edu>
Date

Renamed cmark_parser_push -> cmark_parser_feed.

Diffstat

4 files changed, 10 insertions, 10 deletions

Status File Name N° Changes Insertions Deletions
Modified man/man3/cmark.3 2 1 1
Modified src/blocks.c 12 6 6
Modified src/cmark.h 2 1 1
Modified src/main.c 4 2 2
diff --git 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
@@ -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
@@ -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
diff --git a/src/main.c b/src/main.c
@@ -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);
 		}
 	}