From a5074c20c3873e4a1fbfea551b07bd1c867a9def Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sun, 5 Nov 2006 16:20:53 +0100 Subject: [PATCH] put some comments to make the header reading easier Signed-off-by: Pierre Habouzit --- lib-mime/mime-types.h | 55 ++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/lib-mime/mime-types.h b/lib-mime/mime-types.h index 3744cbc..9d4d70e 100644 --- a/lib-mime/mime-types.h +++ b/lib-mime/mime-types.h @@ -70,11 +70,9 @@ enum { DISPFORMDATA }; -typedef struct parameter { - char *attribute; - char *value; - struct parameter *next; -} PARAMETER; +/****************************************************************************/ +/* rfc822 addresses */ +/****************************************************************************/ typedef struct address_t { char *personal; /* real name of address */ @@ -83,6 +81,29 @@ typedef struct address_t { struct address_t *next; } address_t; +DO_INIT(address_t, address); +void address_wipe(address_t *); + +DO_NEW(address_t, address); +DO_DELETE(address_t, address); +DO_SLIST(address_t, address); + + +/****************************************************************************/ +/* rfc822 header parameters */ +/****************************************************************************/ + +typedef struct parameter { + char *attribute; + char *value; + struct parameter *next; +} PARAMETER; + + +/****************************************************************************/ +/* rfc822 envelopes */ +/****************************************************************************/ + typedef struct envelope_t { address_t *return_path; address_t *from; @@ -114,6 +135,11 @@ typedef struct envelope_t { unsigned int refs_changed:1; /* References changed to break thread */ } ENVELOPE; + +/****************************************************************************/ +/* rfc822 content-* */ +/****************************************************************************/ + /* Information that helps in determing the Content-* of an attachment */ typedef struct content { long hibin; /* 8-bit characters */ @@ -128,6 +154,11 @@ typedef struct content { unsigned int cr:1; /* has CR, even when in a CRLF pair */ } CONTENT; + +/****************************************************************************/ +/* rfc822 Bodies */ +/****************************************************************************/ + typedef struct body { char *xtype; /* content-type if x-unknown */ char *subtype; /* content-type subtype */ @@ -197,9 +228,13 @@ typedef struct body { unsigned int collapsed:1; /* used by recvattach */ unsigned int attach_qualifies:1; - } BODY; + +/****************************************************************************/ +/* rfc822 Headers */ +/****************************************************************************/ + typedef struct header { unsigned int security:11; /* bit 0-6: flags, bit 7,8: application. see: crypt.h pgplib.h, smime.h */ @@ -278,12 +313,4 @@ see: crypt.h pgplib.h, smime.h */ char *maildir_flags; /* unknown maildir flags */ } HEADER; -DO_INIT(address_t, address); -void address_wipe(address_t *); - -DO_NEW(address_t, address); -DO_DELETE(address_t, address); -DO_SLIST(address_t, address); - - #endif /* MUTT_LIB_MIME_MIME_TYPES_H */ -- 2.20.1