diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 15:30:09 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 15:30:09 +0100 |
commit | 3af80c2bbc25b22cd0f5d5c96b22bb0bb2db5b1a (patch) | |
tree | 153f104c01cc308271555044af92a94a5ab29a9b /strbuf.h | |
parent | Improve strbuf. (diff) | |
download | calp-3af80c2bbc25b22cd0f5d5c96b22bb0bb2db5b1a.tar.gz calp-3af80c2bbc25b22cd0f5d5c96b22bb0bb2db5b1a.tar.xz |
Remove SAFE_STR, making strbuf always safe.
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -21,10 +21,6 @@ typedef struct { } strbuf; /* - * TODO Check memmory allocation for last +1 byte for null. - */ - -/* * Init strbuf to size of 0 * Doesnt't call malloc. */ @@ -50,6 +46,7 @@ FREE_F(strbuf); * also see: strbuf_alloc_copy */ int strbuf_copy(strbuf* dest, strbuf* src); + int strbuf_cmp(strbuf* a, strbuf* b); int strbuf_c(strbuf* a, char* b); @@ -82,7 +79,7 @@ char* strbuf_cur(strbuf* s); int strbuf_reset(strbuf* s); /* - * Sets the length and seek ptr to 0, but doesn't touch the memmory. + * Sets the length and seek ptr to 0, but doesn't touch the memmory. */ int strbuf_soft_reset(strbuf* s); @@ -99,7 +96,7 @@ int strbuf_realloc_copy(strbuf* dest, strbuf* src); /* * Copies contents from src to dest, also allocating dest in the - * process. dest should not be initialized before this call. + * process. dest should not be initialized before this call. */ int strbuf_init_copy(strbuf* dest, strbuf* src); |