summaryrefslogtreecommitdiffstats
path: root/examples/c4cat.c
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2019-03-20 13:55:01 +0100
committerMarkus Mittendrein <git@maxmitti.tk>2019-03-20 13:55:01 +0100
commit789ccf3365bc03a66abf5b36bb4c0098c9c5957a (patch)
treeb72fad0c8e0b67d334b8e4e29e3cb3ed94284ffe /examples/c4cat.c
parent32b339a155ebd2be47d0f6636031df92e0a5f7a0 (diff)
downloadcc4group-789ccf3365bc03a66abf5b36bb4c0098c9c5957a.tar.gz
cc4group-789ccf3365bc03a66abf5b36bb4c0098c9c5957a.zip
Much documentation (I consider it to be quite complete)
Diffstat (limited to 'examples/c4cat.c')
-rw-r--r--examples/c4cat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/c4cat.c b/examples/c4cat.c
index ee0ed9b..322ff70 100644
--- a/examples/c4cat.c
+++ b/examples/c4cat.c
@@ -7,6 +7,7 @@
#include <unistd.h>
#include "cc4group.h"
+// the internal platform-header is used for the mmap below
#include "platform/platform.h"
bool catNormalFile(const char* const path, const off_t size)
@@ -18,6 +19,7 @@ bool catNormalFile(const char* const path, const off_t size)
return false;
}
+ // don't worry about this (and the unmap), it is just another way of reading the file more conveniently
void* mappedFile = cc4group_mmap(NULL, size, PROT_READ, MAP_PRIVATE, file, 0);
if(close(file) == -1)