aboutsummaryrefslogtreecommitdiff
path: root/blaze822.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-16 19:44:21 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-16 19:44:21 +0200
commit963380c9f1d7e0b94ed6af420f107e13c09fb231 (patch)
treea6d61216492feb41faae3d6858119744c2cec71f /blaze822.c
parent9853ddb91a91c1fb9cbec49e8d964c0f1dd628e4 (diff)
downloadmblaze-963380c9f1d7e0b94ed6af420f107e13c09fb231.tar.gz
blaze822: add blaze822_chdr to search for a header passed as C string
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/blaze822.c b/blaze822.c
index 6f6542a..14df0eb 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -441,6 +441,15 @@ blaze822_hdr_(struct message *mesg, const char *hdr, size_t hdrlen)
return v;
}
+char *
+blaze822_chdr(struct message *mesg, const char *chdr)
+{
+ char hdr[256];
+ size_t l = snprintf(hdr, sizeof hdr, "%c%s:", 0, chdr);
+
+ return blaze822_hdr_(mesg, hdr, l);
+}
+
int
blaze822_loop(int argc, char *argv[], void (*cb)(char *))
{