summaryrefslogtreecommitdiff
path: root/buffer.c
AgeCommit message (Collapse)Author
2017-04-18buffer: simplify buffer_content0Marc André Tanner
2017-02-20buffer: fix integer overflow issueMarc André Tanner
2017-02-20buffer: add buffer_growMarc André Tanner
2017-02-20buffer: rename buffer_grow to buffer_reserveMarc André Tanner
2017-01-07buffer: make sure mem{cpy,move} are called with valid argumentsMarc André Tanner
2017-01-07buffer: fix buffer_move bugMarc André Tanner
Capacity also needs to be reset.
2017-01-07buffer: remove redundant functionMarc André Tanner
For some reason we ended up with two identical functions: buffer_{clear,terminate}.
2016-12-31buffer: implement buffer_moveMarc André Tanner
2016-12-22buffer: make default buffer size overridable via C pre-processorMarc André Tanner
2016-12-20buffer: implement buffer_capacity utility functionMarc André Tanner
2016-12-20buffer: implement buffer_appendf to append formatted contentMarc André Tanner
2016-12-20buffer: fix error case in buffer_append0Marc André Tanner
Do not change buffer length when failing to append.
2016-10-05Fix various issues reported by coverity scanMarc André Tanner
2016-08-20buffer: add buffer_remove implementationMarc André Tanner
2016-05-18buffer: implement buffer_{v,}printf functionsMarc André Tanner
2016-05-18buffer: add utility function to NUL terminate bufferMarc André Tanner
2016-04-03buffer: add buffer_content0 utility functionMarc André Tanner
2016-04-03buffer: add buffer_content utility functionMarc André Tanner
2016-04-03buffer: add buffer_length utility functionMarc André Tanner
2016-02-25vis: ignore trailing NUL byte of register content by defaultMarc André Tanner
This is handy when editing registers used for macros.
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner
Both registers are currently treated identically. The actual system integration is performed by two shell scripts vis-copy and vis-paste.
2015-11-20buffer: tweak memory allocation strategyMarc André Tanner
Do not simply double the requested size. Instead take the maximum of - the requested size - double the current buffer size This will use less memory for large register operations (e.g. deleting the whole file).
2015-11-19buffer: add some comments to clarify allocation strategyMarc André Tanner
Closes #116
2015-11-03buffer: add buffer_insert to insert data at an arbitrary positionMarc André Tanner
Use it to implement buffer_{pre,ap}pend.
2015-10-05buffer: add functions to prepend data to an existing bufferMarc André Tanner
2015-09-15buffer: add buffer_put0 to store a NUL terminated stringMarc André Tanner
2015-09-15buffer: add buffer_append0 to append NUL terminated stringsMarc André Tanner
2015-05-16Cleanup general purpose buffer APIMarc André Tanner
Introduce buffer_init to initialize a stack allocated buffer. Rename buffer_{alloc,free} functions because they do something different than the usual convention. They operate on the underlying buffer data but do not allocate/free an actual Buffer struct.
2015-03-31Check return value of reallocMarc André Tanner
2015-01-02Constify buffer APIMarc André Tanner
2014-12-18Macro supportMarc André Tanner
At some point this should be optimized further at the moment there is some 20 byte overhead for each entered key.