1
0
mirror of https://github.com/benhoyt/inih.git synced 2025-01-17 22:22:53 +08:00

Document INI_HANDLER_LINENO compile-time option

This commit is contained in:
Ben Hoyt 2016-12-29 11:01:10 -05:00
parent 30a85920d1
commit f5609c8eae

View File

@ -15,6 +15,7 @@ Download a release, browse the source, or read about [how to use inih in a DRY s
* **Stack vs heap:** By default, inih allocates its line buffer on the stack. To allocate on the heap using `malloc` instead, specify `-DINI_USE_STACK=0`.
* **Stop on first error:** By default, inih keeps parsing the rest of the file after an error. To stop parsing on the first error, add `-DINI_STOP_ON_FIRST_ERROR=1`.
* **Maximum line length:** The default maximum line length is 200 bytes. To override this, add something like `-DINI_MAX_LINE=1000`.
* **Report line numbers:** By default, the `ini_handler` callback doesn't receive the line number as a parameter. If you need that, add `-DINI_HANDLER_LINENO=1`.
## Simple example in C ##