summaryrefslogtreecommitdiff
path: root/man/man3
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-03-26 12:18:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-03-26 12:18:05 -0700
commite2b08df1099f43e618596aa60a0ce38589f20287 (patch)
tree06aba68ec57d7bd1ba79ef5d543ffa8ec7687591 /man/man3
parent565f01476b463149bbc04ed6a2f7362f884481d1 (diff)
parent03a6547b8cea55c8917214a363cadda5b7cffd31 (diff)
Merge pull request #116 from nwellnhof/win-eol-fix
Open files in binary mode
Diffstat (limited to 'man/man3')
-rw-r--r--man/man3/cmark.32
1 files changed, 1 insertions, 1 deletions
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
index 523a3d4..283b9cc 100644
--- a/man/man3/cmark.3
+++ b/man/man3/cmark.3
@@ -543,7 +543,7 @@ Streaming interface:
.nf
\f[C]
cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
-FILE *fp = fopen("myfile.md", "r");
+FILE *fp = fopen("myfile.md", "rb");
while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
cmark_parser_feed(parser, buffer, bytes);
if (bytes < sizeof(buffer)) {