diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 00:47:02 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 00:53:24 +0100 |
commit | f8cfe5e8806cfd84dc83714e495b58890ef4bb02 (patch) | |
tree | d154ea27de49e169817263d2a28f097e67760e22 /strbuf.c | |
parent | Add param field to content_line. (diff) | |
download | calp-f8cfe5e8806cfd84dc83714e495b58890ef4bb02.tar.gz calp-f8cfe5e8806cfd84dc83714e495b58890ef4bb02.tar.xz |
Add formatting macros.
Diffstat (limited to 'strbuf.c')
-rw-r--r-- | strbuf.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,6 +1,7 @@ #include "strbuf.h" #include <string.h> +#include <stdio.h> #ifdef SAFE_STR #include "err.h" @@ -153,3 +154,12 @@ int strbuf_soft_reset(strbuf* s) { s->ptr = s->len = 0; return 0; } + +strbuf* RESOLVE(strbuf)(strbuf* dest, strbuf* new) { + if (dest == NULL) return new; + else return dest; +} + +FMT_F(strbuf) { + return sprintf(buf, "%s", this->mem); +} |