From 78653936498babc06894526bd1fde36fc672f9ed Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 27 Oct 2020 19:47:07 -0400 Subject: Refactor IMAP struct --- imap.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'imap.h') diff --git a/imap.h b/imap.h index 186cc55..7cd52e6 100644 --- a/imap.h +++ b/imap.h @@ -160,7 +160,16 @@ static inline void respFree(struct Resp resp) { } extern bool imapVerbose; -void imapOpen(FILE **read, FILE **write, const char *host, const char *port); -struct Resp imapResp(FILE *imapRead); + +struct IMAP { + FILE *r; + FILE *w; + size_t cap; + char *buf; + char *ptr; +}; + +struct IMAP imapOpen(const char *host, const char *port); +struct Resp imapResp(struct IMAP *imap); #endif /* IMAP_H */ -- cgit 1.4.1