From 4d541ff929d0c320c382d6ebd6569c0c7faf8304 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Fri, 10 Apr 2020 14:20:35 -0400 Subject: Refactor main loop state machine --- imap.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'imap.h') diff --git a/imap.h b/imap.h index f9b3106..a7b4b64 100644 --- a/imap.h +++ b/imap.h @@ -99,6 +99,17 @@ struct Data { }; }; +static inline struct Data dataCheck(struct Data data, enum Type type) { + const char *Types[] = { "atom", "number", "string", "list" }; + if (data.type != type) { + errx( + EX_PROTOCOL, "expected %s, found %s", + Types[type], Types[data.type] + ); + } + return data; +} + static inline void listPush(struct List *list, struct Data data) { if (list->len == list->cap) { list->cap = (list->cap ? list->cap * 2 : 4); -- cgit 1.4.1 h'/> dontfiles
summary refs log tree commit diff
path: root/etc/psf/sans6x10.psf (unfollow)
Commit message (Expand)Author
2020-08-29Add tweets from retweetsJune McEnroe