aboutsummaryrefslogtreecommitdiff
path: root/vcal.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-02-10 00:47:02 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-02-10 00:53:24 +0100
commitf8cfe5e8806cfd84dc83714e495b58890ef4bb02 (patch)
treed154ea27de49e169817263d2a28f097e67760e22 /vcal.c
parentAdd param field to content_line. (diff)
downloadcalp-f8cfe5e8806cfd84dc83714e495b58890ef4bb02.tar.gz
calp-f8cfe5e8806cfd84dc83714e495b58890ef4bb02.tar.xz
Add formatting macros.
Diffstat (limited to 'vcal.c')
-rw-r--r--vcal.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcal.c b/vcal.c
index 3cb46b5f..b54a0370 100644
--- a/vcal.c
+++ b/vcal.c
@@ -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);
+}