* clear out some warnings by gcc 9.3.1.
[alpine.git] / pith / mailpart.h
blob24b8d050edc7e9df983d603d40251ccb4cc894c4
1 /*
2 * $Id: mailpart.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2020 Eduardo Chappa
6 * Copyright 2006-2008 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_MAILPART_INCLUDED
18 #define PITH_MAILPART_INCLUDED
21 #include "../pith/atttype.h"
22 #include "../pith/state.h"
25 #define MIME_MSG(t,s) ((t) == TYPEMESSAGE && (s) && !strucmp((s),"rfc822"))
27 #define MIME_DGST(t,s) ((t) == TYPEMULTIPART && (s) && !strucmp((s),"digest"))
29 /* Is this a message attachment? */
30 #define MIME_VCARD(t,s) ((((t) == TYPETEXT || (t) == TYPEAPPLICATION) \
31 && (s) && !strucmp((s),"DIRECTORY")) \
32 || ((t) == TYPETEXT \
33 && (s) && !strucmp((s),"X-VCARD")))
35 /* Is this a VCalendar type? */
36 #define MIME_VCALENDAR(t,s) ((t) == TYPETEXT && (s) && !strucmp((s),"CALENDAR"))
38 /* Is this a text/html attachment? */
39 #define TEXT_HTML(t,s) ((t) == TYPETEXT && (s) && !strucmp((s),"HTML"))
41 /* Is this a multipart signed? */
42 #define MIME_MULT_SIGNED(t,s) ((t) == TYPEMULTIPART && (s) && !strucmp((s),"signed"))
45 #define MIME_MSG_A(a) MIME_MSG((a)->body->type, (a)->body->subtype)
47 /* Is this a digest attachment? */
48 #define MIME_DGST_A(a) MIME_DGST((a)->body->type, (a)->body->subtype)
50 /* Is this a vCard attachment? */
51 #define MIME_VCARD_A(a) MIME_VCARD((a)->body->type, (a)->body->subtype)
53 /* Is this a VCalendar attachment? */
54 #define MIME_VCALENDAR_A(a) MIME_VCALENDAR((a)->body->type, (a)->body->subtype)
57 /* exported prototypes */
60 #endif /* PITH_MAILPART_INCLUDED */