X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Finclude%2Futils%2Fstrbuf.h;h=96b4f86bee3aa8937899a9af08314f9fa5866860;hb=edba65afec8c547fb6c02346eda68595ce9a5839;hp=af4a9ccd0251326386bb5ed2d946f6d5b55ecf66;hpb=9fb079db93a6964c160439d851270b3433db59f5;p=sysdb.git diff --git a/src/include/utils/strbuf.h b/src/include/utils/strbuf.h index af4a9cc..96b4f86 100644 --- a/src/include/utils/strbuf.h +++ b/src/include/utils/strbuf.h @@ -37,6 +37,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -138,10 +139,17 @@ sdb_strbuf_chomp(sdb_strbuf_t *strbuf); /* * sdb_strbuf_skip: - * Removes the first 'n' bytes from the buffer. + * Removes 'n' bytes from the buffer starting at offset 'offset'. */ void -sdb_strbuf_skip(sdb_strbuf_t *strbuf, size_t n); +sdb_strbuf_skip(sdb_strbuf_t *strbuf, size_t offset, size_t n); + +/* + * sdb_strbuf_clear: + * Clear the buffer but do not deallocate memory. + */ +void +sdb_strbuf_clear(sdb_strbuf_t *strbuf); /* * sdb_strbuf_string: