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 /vcal.c | |
parent | Add param field to content_line. (diff) | |
download | calp-f8cfe5e8806cfd84dc83714e495b58890ef4bb02.tar.gz calp-f8cfe5e8806cfd84dc83714e495b58890ef4bb02.tar.xz |
Add formatting macros.
Diffstat (limited to 'vcal.c')
-rw-r--r-- | vcal.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -141,3 +141,15 @@ int DEEP_COPY(vcomponent)(vcomponent* a, vcomponent* b) { ERR("Deep copy not implemented for vcomponent"); return -1; } + +FMT_F(vcomponent) { + return sprintf(buf, "vcomp (%p)", this); +} + +FMT_F(content_line) { + char str_a[100], str_b[100], str_c[100];; + FMT(strbuf)(&this->key, str_a); + FMT(LLIST(strbuf))(&this->params, str_b); + FMT(LLIST(strbuf))(&this->vals, str_c); + return sprintf(buf, "[[cl|%s] params := %s vals := %s]", str_a, str_b, str_c); +} |