aboutsummaryrefslogtreecommitdiff
path: root/src/ini.c
Commit message (Collapse)AuthorAgeFilesLines
* Stop iteration on matchJoseph Hunkeler2024-04-151-0/+3
|
* Add ini_has_key() and expose ini_section_search() functionJoseph Hunkeler2024-04-151-9/+53
| | | | * ini_section_search now has three matching modes _EXACT, _BEGINS, and _SUBSTR
* Add ini_setval() functionJoseph Hunkeler2024-04-151-0/+18
|
* Fix invalid read on operatorJoseph Hunkeler2024-04-121-1/+5
| | | | * If no data exists beyond the operator, set the value to an empty string
* Fix size of data array in sectionJoseph Hunkeler2024-04-121-4/+4
| | | | * Fix realloc error handler
* Changes to ini_write() behavior:Joseph Hunkeler2024-04-021-7/+20
| | | | | | * Caller can choose to dump raw unmodified key/value pairs, or render all values through the template engine * Fixes spurious line feeds injected into the output stream * Uses LINE_SEP instead of "\n"
* Lock output behind DEBUG defineJoseph Hunkeler2024-04-021-0/+9
|
* Close handleJoseph Hunkeler2024-03-251-0/+1
|
* Fix up section->data reallocJoseph Hunkeler2024-03-241-4/+17
| | | | * Add error handling
* Duplicate keys and values instead of copying their pointers.Joseph Hunkeler2024-03-221-15/+31
| | | | * ini_open uses the stack instead of malloc
* Fix size of realloc'd dataJoseph Hunkeler2024-03-221-6/+12
| | | | * Fix up error handling for relloc'd data
* Move collapse_whitespace to utils.c / utils.hJoseph Hunkeler2024-03-221-11/+0
|
* Replace ini_show with ini_writeJoseph Hunkeler2024-03-141-4/+23
| | | | * One can still display the ini configuration by using ini_show(iniptr, stdout);
* Use do/while in guard_* macros to make them behave more like functionsJoseph Hunkeler2024-03-101-11/+11
|
* Fixes several memory leaksJoseph Hunkeler2024-02-261-1/+0
|
* * Fix segmentation fault in ini_data_get() when section_name is not foundJoseph Hunkeler2024-01-301-25/+25
| | | | | | * Rename ini_section_record() to ini_section_create() * Remove unnecessary trigger from unquote() * Rename long_data to multiline_data to visually clarify what's going on
* guard_free() all pointersJoseph Hunkeler2023-12-101-14/+11
|
* Remove trailing whitespace from key nameJoseph Hunkeler2023-12-101-2/+4
|
* Fix segfault when section is not presentJoseph Hunkeler2023-12-101-0/+4
|
* Fix segfault on invalid section nameJoseph Hunkeler2023-12-101-0/+7
|
* Bugfix: Test for a comment first, then act accordingly, instead of testing ↵Joseph Hunkeler2023-11-211-3/+3
| | | | only when a variable is being read
* Fixes:Joseph Hunkeler2023-11-201-47/+53
| | | | | | | | | * ini_section_record() returns status now * Reading long data variables (multi-line arrays) behaves consistently Refactor: * ini_data_record() is now ini_data_append()
* Implements slightly improved error handlingJoseph Hunkeler2023-11-201-8/+17
| | | | | | | * Return status from conda_ and delivery_ functions * Caller prints meaningful error, and handles it * Enable warnings during compilation * Squelch format-truncation warning -- those strings are extremely unlikely to overflow (famous last words)
* Replaces BUFSIZ with OMC_BUFSIZJoseph Hunkeler2023-11-201-4/+4
|
* Rebrand for the last timeJoseph Hunkeler2023-11-201-1/+1
| | | | | * Shorten OHMYCAL to OMC * Rename ohmycal.h to omc.h
* Only truncate value when length is greater than zeroJoseph Hunkeler2023-10-311-67/+6
| | | | * Remove unused code/comments
* Initial commitJoseph Hunkeler2023-10-261-0/+409