Hash :
db23a7ea
Author :
Date :
2024-09-25T17:19:41
string-buffer: Add more API. * lib/string-buffer.h: Include string-desc.h. (sb_append1, sb_append_desc): New declarations. (sb_append_c): Renamed from sb_append. (sb_contents, sb_contents_c, sb_dupfree): New declarations. (sb_dupfree_c): Renamed from sb_dupfree. * lib/string-buffer.c (sb_append1, sb_append_desc): New functions. (sb_append_c): Renamed from sb_append. (sb_contents, sb_contents_c, sb_dupfree): New functions. (sb_dupfree_c): Renamed from sb_dupfree. Optimize. * modules/string-buffer (Depends-on): Add string-desc. * tests/test-string-buffer.c (main): Use sb_append_c instead of sb_append. Use sb_dupfree_c instead of sb_dupfree. Test also sb_append1, sb_append_desc, sb_contents. * NEWS: Mention the changes.
Description:
A buffer that accumulates a string by piecewise concatenation.
Files:
lib/string-buffer.h
lib/string-buffer.c
lib/string-buffer-printf.c
Depends-on:
stdbool
attribute
string-desc
stdarg
vsnzprintf-posix
configure.ac:
Makefile.am:
lib_SOURCES += string-buffer.c string-buffer-printf.c
Include:
"string-buffer.h"
License:
LGPL
Maintainer:
all