main.c mbox.c mbyte.c menu.c mh.c muttlib.c mutt_idna.c mx.c \
pager.c parse.c pattern.c postpone.c \
query.c \
- recvattach.c recvcmd.c rfc822.c rfc1524.c rfc2047.c rfc3676.c \
+ recvattach.c recvcmd.c rfc1524.c rfc2047.c rfc3676.c \
score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
thread.c \
url.c utf8.c \
mime.h mutt.h mutt_curses.h mutt_menu.h \
mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
mbox.h mh.h mx.h pager.h pgp.h protos.h rfc1524.h rfc2047.h \
- rfc822.h rfc3676.h \
+ rfc3676.h \
sort.h mime.types autogen.sh \
_regex.h OPS.MIX remailer.c remailer.h browser.h state.h \
mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttngrc.head Muttngrc \
#ifndef _MUTT_ALIAS_H
#define _MUTT_ALIAS_H
-#include "rfc822.h"
+#include <lib-mime/mime.h>
typedef struct alias {
struct alias *self; /* XXX - ugly hack */
noinst_LIBRARIES = libmime.a
-libmime_a_SOURCES = mime.h mime.c rfc2231.c
+libmime_a_SOURCES = mime.h mime.c rfc822.c rfc2231.c
noinst_HEADERS = mime.h
#ifndef MUTT_LIB_MIME_MIME_H
#define MUTT_LIB_MIME_MIME_H
+#include <stdlib.h>
+
/* Content-Type */
enum {
TYPEOTHER,
#define TYPE(X) ((X->type == TYPEOTHER) && (X->xtype != NULL) ? X->xtype : BodyTypes[(X->type)])
#define ENCODING(X) BodyEncodings[(X)]
+/****************************************************************************/
+/* RFC 822 */
+/* Standard for ARPA Internet Text Messages */
+/****************************************************************************/
+
+/* possible values for RFC822Error */
+enum {
+ ERR_MEMORY = 1,
+ ERR_MISMATCH_PAREN,
+ ERR_MISMATCH_QUOTE,
+ ERR_BAD_ROUTE,
+ ERR_BAD_ROUTE_ADDR,
+ ERR_BAD_ADDR_SPEC
+};
+
+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;
+
+void rfc822_free_address(ADDRESS **);
+void rfc822_qualify(ADDRESS *, const char *);
+ADDRESS *rfc822_parse_adrlist(ADDRESS *, const char *s);
+ADDRESS *rfc822_cpy_adr(ADDRESS * addr);
+ADDRESS *rfc822_cpy_adr_real(ADDRESS * addr);
+ADDRESS *rfc822_append(ADDRESS ** a, ADDRESS * b);
+void rfc822_write_address(char *, size_t, ADDRESS *, int);
+void rfc822_write_address_single(char *, size_t, ADDRESS *, int);
+void rfc822_cat(char *, size_t, const char *, const char *);
+
+extern int RFC822Error;
+extern const char *RFC822Errors[];
+extern const char RFC822Specials[];
+
+#define rfc822_error(x) RFC822Errors[x]
+#define rfc822_new_address() calloc(1,sizeof(ADDRESS))
+
/****************************************************************************/
/* RFC 2231 */
/* MIME Parameter Value and Encoded Word Extensions: */
+/*
+ * 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>
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
-#include "mutt.h"
#include "mutt_idna.h"
#include <lib-mime/mime.h>
-#include "rfc822.h"
#include "charset.h"
#include "lib/rx.h"
#ifndef _MUTT_IDNA_H
# define _MUTT_IDNA_H
-#include "rfc822.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <lib-mime/mime.h>
#include "charset.h"
#ifdef HAVE_LIBIDN
#include "sort.h"
#include "mx.h"
#include "nntp.h"
-#include "rfc822.h"
#include "rfc1524.h"
#include "rfc2047.h"
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-mime/mime.h>
+
#include "mutt.h"
#include "mutt_curses.h"
#include "mutt_idna.h"
#include "pgp.h"
-#include "rfc822.h"
#include "lib/debug.h"
#define CONTINUATION_BYTE(c) (((c) & 0xc0) == 0x80)
-extern char RFC822Specials[];
-
typedef size_t (*encoder_t) (char *, const char *, size_t,
const char *);
+++ /dev/null
-/*
- * 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,
- * please see the file GPL in the top level source directory.
- */
-
-#ifndef rfc822_h
-#define rfc822_h
-
-/* possible values for RFC822Error */
-enum {
- ERR_MEMORY = 1,
- ERR_MISMATCH_PAREN,
- ERR_MISMATCH_QUOTE,
- ERR_BAD_ROUTE,
- ERR_BAD_ROUTE_ADDR,
- ERR_BAD_ADDR_SPEC
-};
-
-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;
-
-void rfc822_free_address (ADDRESS **);
-void rfc822_qualify (ADDRESS *, const char *);
-ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s);
-ADDRESS *rfc822_cpy_adr (ADDRESS * addr);
-ADDRESS *rfc822_cpy_adr_real (ADDRESS * addr);
-ADDRESS *rfc822_append (ADDRESS ** a, ADDRESS * b);
-void rfc822_write_address (char *, size_t, ADDRESS *, int);
-void rfc822_write_address_single (char *, size_t, ADDRESS *, int);
-void rfc822_cat (char *, size_t, const char *, const char *);
-
-extern int RFC822Error;
-extern const char *RFC822Errors[];
-
-#define rfc822_error(x) RFC822Errors[x]
-#define rfc822_new_address() calloc(1,sizeof(ADDRESS))
-
-#endif /* rfc822_h */
#include <assert.h>
#endif
-extern char RFC822Specials[];
-
#define DISPOSITION(X) X==DISPATTACH?"attachment":"inline"
static char MsgIdPfx = 'A';