aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-13 15:01:09 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-13 15:01:09 +0200
commit19ba414abc1fe8c76fb036ece992cd303e5e2ed2 (patch)
tree0ee5a009312d256709afb3713bedda72e32e31d4
parent5bc288f1aa5f4a0bfad14a2840a18bf86c48c57e (diff)
downloadmblaze-19ba414abc1fe8c76fb036ece992cd303e5e2ed2.tar.gz
blaze822: header cleanup
-rw-r--r--blaze822.c10
-rw-r--r--blaze822_priv.h6
2 files changed, 10 insertions, 6 deletions
diff --git a/blaze822.c b/blaze822.c
index ad10e64..4aab311 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -13,6 +13,9 @@
#include <errno.h>
#include <time.h>
+#include "blaze822.h"
+#include "blaze822_priv.h"
+
// WSP = SP / HTAB
#define iswsp(c) (((c) == ' ' || (c) == '\t'))
@@ -21,11 +24,6 @@
#define bufsiz 4096
-struct message {
- char *msg;
- char *end;
-};
-
static long
parse_posint(char **s, size_t minn, size_t maxn)
{
@@ -346,7 +344,7 @@ blaze822_free(struct message *mesg)
}
char *
-blaze822_hdr_(struct message *mesg, char *hdr, size_t hdrlen)
+blaze822_hdr_(struct message *mesg, const char *hdr, size_t hdrlen)
{
char *v;
diff --git a/blaze822_priv.h b/blaze822_priv.h
new file mode 100644
index 0000000..946b9b0
--- /dev/null
+++ b/blaze822_priv.h
@@ -0,0 +1,6 @@
+struct message {
+ char *msg;
+ char *end;
+ char *body;
+ char *bodyend;
+};