diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-11 01:34:40 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-15 20:03:43 +0100 |
commit | 60c7d789ce21cb77bdf9dd2c8cb22e86232d903f (patch) | |
tree | 45a2995340c1f2c2891369eb3ec5e2c6aae7b87c /strbuf.c | |
parent | Replace key_val type with templatized PAIR(T, V). (diff) | |
download | calp-60c7d789ce21cb77bdf9dd2c8cb22e86232d903f.tar.gz calp-60c7d789ce21cb77bdf9dd2c8cb22e86232d903f.tar.xz |
Rewrote content_line, and how parameters are stored.
Diffstat (limited to '')
-rw-r--r-- | strbuf.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -81,7 +81,7 @@ int strbuf_cmp(strbuf* a, strbuf* b) { b == NULL || b->alloc == 0) { ERR("a or b not alloced"); - return -1; + // return -1; } return strncmp(a->mem, b->mem, a->len); @@ -132,3 +132,7 @@ strbuf* RESOLVE(strbuf)(strbuf* dest, strbuf* new) { FMT_F(strbuf) { return sprintf(buf, "%s", this->mem); } + +int SIZE(strbuf)(strbuf* this) { + return this->len; +} |