# HG changeset patch # User Mike Becker # Date 1740840548 -3600 # Node ID 29e1c48d1a6c1d5adaaefd2a3b4e829a6688bc3c # Parent 781bd188f1c07bbf7de96864141da67b3b4ad94a add one more sentence to the example for properties source and sink diff -r 781bd188f1c0 -r 29e1c48d1a6c docs/Writerside/topics/properties.h.md --- a/docs/Writerside/topics/properties.h.md Sat Mar 01 15:02:57 2025 +0100 +++ b/docs/Writerside/topics/properties.h.md Sat Mar 01 15:49:08 2025 +0100 @@ -214,6 +214,7 @@ ``` You can create your own sources and sinks by initializing the respective structures. + For a source, only the `read_func` is mandatory, the other two functions are optional and used for initialization and cleanup, if required. The file source created by `cxPropertiesFileSource()`, for example, uses the `read_init_func` to allocate, and the `read_clean_func` to free the read buffer, respectively. @@ -221,6 +222,7 @@ Since the default map sink created by `cxPropertiesMapSink()` stores `char*` pointers into a map, the following example uses a different sink, which stores them as `cxmutstr` values, automatically freeing them when the map gets destroyed. +And instead of reading the data from a file with `fread()`, it uses `mmap()` to map the file into memory for reading. ```C #include