summary refs log tree commit diff
path: root/archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'archive.h')
-rw-r--r--archive.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/archive.h b/archive.h
index 911b7e4..c48d8e3 100644
--- a/archive.h
+++ b/archive.h
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 
 #include "imap.h"
@@ -100,6 +101,13 @@ struct BodyPart {
 	struct List location;
 };
 
+static inline bool bodyPartType(
+	const struct BodyPart *part, const char *type, const char *subtype
+) {
+	const char *partType = (part->multipart ? "multipart" : part->type);
+	return !strcasecmp(partType, type) && !strcasecmp(part->subtype, subtype);
+}
+
 static inline void bodyPartFree(struct BodyPart part) {
 	if (part.multipart) {
 		for (size_t i = 0; i < part.parts.len; ++i) {
d>2019-05-27Add FrontierJune McEnroe 2019-05-27Break nicks with ZWNJJune McEnroe 2019-05-26Add DawnJune McEnroe 2019-05-20Declare vasprintf(3) for GNUJune McEnroe 2019-05-20Fix comparison warning in ttpreJune McEnroe 2019-05-20Add AuthorityJune McEnroe 2019-05-19Specify precedence of unary versions of operatorsJune McEnroe 2019-05-18Add compound assignment operators to orderJune McEnroe 2019-05-15Support simple assignment in orderJune McEnroe 2019-05-15Implement sizeof in orderJune McEnroe 2019-05-15Add orderJune McEnroe 2019-05-12Add T suffix in bitJune McEnroe 2019-05-10Highlight yacc and lex files as CJune McEnroe 2019-05-10Use val instead of suboptargJune McEnroe 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe