/*
* Copyright notice from original mutt:
+ * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
* Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
*
* This file is part of mutt-ng, see http://www.muttng.org/.
#include <stdlib.h>
#include <lib-lib/mem.h>
+#include <lib-lib/buffer.h>
#include <lib-lib/list.h>
/* Content-Type */
struct parameter *next;
} PARAMETER;
+typedef struct address_t {
+ char *personal; /* real name of address */
+ char *mailbox; /* mailbox and host address */
+ int group; /* group mailbox? */
+ struct address_t *next;
+} address_t;
+
+typedef struct envelope_t {
+ address_t *return_path;
+ address_t *from;
+ address_t *to;
+ address_t *cc;
+ address_t *bcc;
+ address_t *sender;
+ address_t *reply_to;
+ address_t *mail_followup_to;
+ char *list_post; /* this stores a mailto URL, or nothing */
+ char *subject;
+ char *real_subj; /* offset of the real subject */
+ char *message_id;
+ char *supersedes;
+ char *date;
+ char *x_label;
+ char *organization;
+#ifdef USE_NNTP
+ char *newsgroups;
+ char *xref;
+ char *followup_to;
+ char *x_comment_to;
+#endif
+ BUFFER *spam;
+ LIST *references; /* message references (in reverse order) */
+ LIST *in_reply_to; /* in-reply-to header content */
+ LIST *userhdrs; /* user defined headers */
+ unsigned int irt_changed:1; /* In-Reply-To changed to link/break threads */
+ unsigned int refs_changed:1; /* References changed to break thread */
+} ENVELOPE;
+
+
+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);
+
+
extern const char MimeSpecials[];
extern const char *BodyTypes[];
extern const char *BodyEncodings[];
/* Standard for ARPA Internet Text Messages */
/****************************************************************************/
-typedef struct address_t {
- char *personal; /* real name of address */
- char *mailbox; /* mailbox and host address */
- int group; /* group mailbox? */
- 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);
-
-
address_t *address_dup(address_t *addr);
address_t *address_list_dup(address_t *addr);
void rfc822_qualify(address_t *, const char *);
ssize_t rfc822_write_address_single(char *, ssize_t, address_t *, int);
ssize_t rfc822_strcpy(char *, ssize_t, const char *, const char *);
-extern int RFC822Error;
extern const char RFC822Specials[];
-#define rfc822_error(x) RFC822Errors[x]
+/****************************************************************************/
+/* RFC 2047 */
+/* MIME (Multipurpose Internet Mail Extensions) Part Three: */
+/* Message Header Extensions for Non-ASCII Text */
+/****************************************************************************/
+
+char *mutt_choose_charset(const char *fromcode, const char *charsets,
+ char *u, size_t ulen, char **d, size_t *dlen);
+
+void _rfc2047_encode_string(char **, int, int);
+void rfc2047_encode_adrlist(address_t *, const char *);
+
+#define rfc2047_encode_string(a) _rfc2047_encode_string (a, 0, 32);
+
+void rfc2047_decode(char **);
+void rfc2047_decode_adrlist(address_t *);
+void rfc2047_decode_envelope(ENVELOPE* e);
/****************************************************************************/
/* RFC 2231 */
void mutt_init (int, LIST *);
-typedef struct envelope {
- address_t *return_path;
- address_t *from;
- address_t *to;
- address_t *cc;
- address_t *bcc;
- address_t *sender;
- address_t *reply_to;
- address_t *mail_followup_to;
- char *list_post; /* this stores a mailto URL, or nothing */
- char *subject;
- char *real_subj; /* offset of the real subject */
- char *message_id;
- char *supersedes;
- char *date;
- char *x_label;
- char *organization;
-#ifdef USE_NNTP
- char *newsgroups;
- char *xref;
- char *followup_to;
- char *x_comment_to;
-#endif
- BUFFER *spam;
- LIST *references; /* message references (in reverse order) */
- LIST *in_reply_to; /* in-reply-to header content */
- LIST *userhdrs; /* user defined headers */
- unsigned int irt_changed:1; /* In-Reply-To changed to link/break threads */
- unsigned int refs_changed:1; /* References changed to break thread */
-} ENVELOPE;
-
/* Information that helps in determing the Content-* of an attachment */
typedef struct content {
long hibin; /* 8-bit characters */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Copyright © 2006 Pierre Habouzit
+ */
+
/*
* Copyright notice from original mutt:
* Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
#include "mutt.h"
#include "charset.h"
-#include "rfc2047.h"
#include "thread.h"
-
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
/*
* Copyright notice from original mutt:
- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
*
* This file is part of mutt-ng, see http://www.muttng.org/.
* It's licensed under the GNU General Public License,
#include "mutt.h"
-char *mutt_choose_charset (const char *fromcode, const char *charsets,
- char *u, size_t ulen, char **d, size_t * dlen);
-
-void _rfc2047_encode_string (char **, int, int);
-void rfc2047_encode_adrlist (address_t *, const char *);
-
-#define rfc2047_encode_string(a) _rfc2047_encode_string (a, 0, 32);
-
-void rfc2047_decode (char **);
-void rfc2047_decode_adrlist (address_t *);
-
-void rfc2047_decode_envelope (ENVELOPE* e);