	The MIME header

	Not all header lines of a MIME message are useful. The
	[[HeaderTp]] type contains all the headers that are parsed and
	a few extra strings that are extracted from other header
	lines. The [[MIME_header]] struct also holds the encoding and
	the character set.

<<*>>=
#include <config.h>
#include "ISOcharset.e"
#include "MIMEenc.e"

#define MAXLINELEN 512
EXPORTDEF(MAXLINELEN)

EXPORT typedef enum {
    Subject,
    Title,
    Expires,
    Sender,
    From,
    Newsgroups,
    Content_Type,
    Content_Length,
    Reply_To,
    References,
    Date,
    Lines,
    Base,					/* Artificial header */
    Author,					/* Inferred from From: */
    Mailing_List,				/* Inferred */
    Boundary,					/* From arg to ContentType */
    Location,
    EndOfHeaderTp,
} HeaderTp;

EXPORT typedef struct {
    char *head[EndOfHeaderTp];
    MIME_encoding content_transfer_encoding;
    ISO_charset charset;
} MIME_header;

EXPORT void free_header(MIME_header header)
{
    HeaderTp i;

    for (i = 0; i < EndOfHeaderTp; i++)
	dispose(header.head[i]);
}
