summaryrefslogtreecommitdiffstats
path: root/dstring.c
AgeCommit message (Collapse)Author
2022-01-18dstring: Set a minimum capacity to avoid reallocating for small stringsTavian Barnes
2020-12-02Give messages to unconditional assertion failuresTavian Barnes
2020-11-28dstring: New dstrdcat(), dstrcatf(), dstrvcatf() functionsTavian Barnes
2020-11-03dstring: New dstrvprintf() functionTavian Barnes
2020-10-13util: New BFS_FLEX_SIZEOF() macro for more precise flexible array allocationsTavian Barnes
See http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_282.htm for all the fun behind this.
2020-10-01dstring: Try to avoid calling vsnprintf() twice in dstrprintf()Tavian Barnes
2019-09-03dstring: New dstrndup() functionTavian Barnes
2019-05-23dstring: Add a printf()-style creation APITavian Barnes
2019-03-27dstring: Add a dstrdup() functionTavian Barnes
2019-02-09Add some documentation commentsTavian Barnes
2019-01-31dstring: Initialize freshly-allocated stringsTavian Barnes
Previously, a string allocated with dstralloc() had length 0 but no terminating NUL byte there. This was problematic if such a string was used without being modified. In particular, this was reproducible with bfs -ok by not typing any response to the prompt. In that case, uninitialized memory was being tested for a y/n response, with unpredictable results.
2017-07-27Re-license under the BSD Zero Clause LicenseTavian Barnes
2017-06-10printf: Fix embedded nul bytesTavian Barnes
Fixes #26.
2016-05-22dstring: Clean up the API a bit.Tavian Barnes
2016-04-13dstring: Split out the dynamic string logic.Tavian Barnes