summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-03-13 13:24:57 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-03-13 13:24:57 +0000
commit887e7b3b191eccce681c68947204abad634f8553 (patch)
tree6c51d979def5ddd95b0bea50200aac63c4d16b3c
parentbd6ec5dd54a5d42053f679ee852a02bdedf61d62 (diff)
downloadmailutils-887e7b3b191eccce681c68947204abad634f8553.tar.gz
mailutils-887e7b3b191eccce681c68947204abad634f8553.tar.bz2
Added to the repository
-rw-r--r--mailbox/imap/.cvsignore9
-rw-r--r--mailbox/imap/Makefile.am28
-rw-r--r--mailbox/maildir/.cvsignore9
-rw-r--r--mailbox/maildir/Makefile.am27
-rw-r--r--mailbox/mbox/.cvsignore9
-rw-r--r--mailbox/mbox/Makefile.am30
-rw-r--r--mailbox/mbox/mbox0.h148
-rw-r--r--mailbox/mh/.cvsignore9
-rw-r--r--mailbox/mh/Makefile.am28
-rw-r--r--mailbox/pop/.cvsignore9
-rw-r--r--mailbox/pop/Makefile.am28
11 files changed, 334 insertions, 0 deletions
diff --git a/mailbox/imap/.cvsignore b/mailbox/imap/.cvsignore
new file mode 100644
index 000000000..a34373989
--- /dev/null
+++ b/mailbox/imap/.cvsignore
@@ -0,0 +1,9 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+T
+_*
+.gdbinit
diff --git a/mailbox/imap/Makefile.am b/mailbox/imap/Makefile.am
new file mode 100644
index 000000000..b6f786b29
--- /dev/null
+++ b/mailbox/imap/Makefile.am
@@ -0,0 +1,28 @@
+## Process this file with GNU Automake to create Makefile.in
+
+## Copyright (C) 2003 Free Software Foundation, Inc.
+##
+## GNU Mailutils 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, 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.
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu @INTLINCS@
+
+noinst_LTLIBRARIES = libimap.la
+
+libimap_la_SOURCES = \
+ folder.c\
+ mbox.c\
+ url.c
+
diff --git a/mailbox/maildir/.cvsignore b/mailbox/maildir/.cvsignore
new file mode 100644
index 000000000..a34373989
--- /dev/null
+++ b/mailbox/maildir/.cvsignore
@@ -0,0 +1,9 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+T
+_*
+.gdbinit
diff --git a/mailbox/maildir/Makefile.am b/mailbox/maildir/Makefile.am
new file mode 100644
index 000000000..26c0456a9
--- /dev/null
+++ b/mailbox/maildir/Makefile.am
@@ -0,0 +1,27 @@
+## Process this file with GNU Automake to create Makefile.in
+
+## Copyright (C) 2003 Free Software Foundation, Inc.
+##
+## GNU Mailutils 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, 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.
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu @INTLINCS@
+
+noinst_LTLIBRARIES = libmaildir.la
+
+libmaildir_la_SOURCES = \
+ mbox.c
+
+
diff --git a/mailbox/mbox/.cvsignore b/mailbox/mbox/.cvsignore
new file mode 100644
index 000000000..a34373989
--- /dev/null
+++ b/mailbox/mbox/.cvsignore
@@ -0,0 +1,9 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+T
+_*
+.gdbinit
diff --git a/mailbox/mbox/Makefile.am b/mailbox/mbox/Makefile.am
new file mode 100644
index 000000000..0583554d0
--- /dev/null
+++ b/mailbox/mbox/Makefile.am
@@ -0,0 +1,30 @@
+## Process this file with GNU Automake to create Makefile.in
+
+## Copyright (C) 2003 Free Software Foundation, Inc.
+##
+## GNU Mailutils 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, 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.
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu @INTLINCS@
+
+noinst_LTLIBRARIES = libmbox.la
+
+libmbox_la_SOURCES = \
+ folder.c\
+ mbox.c\
+ mboxscan.c\
+ mbox0.h\
+ url.c
+
diff --git a/mailbox/mbox/mbox0.h b/mailbox/mbox/mbox0.h
new file mode 100644
index 000000000..c2cb2521d
--- /dev/null
+++ b/mailbox/mbox/mbox0.h
@@ -0,0 +1,148 @@
+/* GNU Mailutils -- a suite of utilities for electronic mail
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <signal.h>
+#include <time.h>
+#include <string.h>
+#include <ctype.h>
+#include <limits.h>
+#include <errno.h>
+
+#ifdef WITH_PTHREAD
+# ifdef HAVE_PTHREAD_H
+# define _XOPEN_SOURCE 500
+# include <pthread.h>
+# endif
+#endif
+
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+
+#include <mailbox0.h>
+#include <registrar0.h>
+
+#include <mailutils/address.h>
+#include <mailutils/attribute.h>
+#include <mailutils/body.h>
+#include <mailutils/debug.h>
+#include <mailutils/envelope.h>
+#include <mailutils/errno.h>
+#include <mailutils/error.h>
+#include <mailutils/header.h>
+#include <mailutils/locker.h>
+#include <mailutils/message.h>
+#include <mailutils/mutil.h>
+#include <mailutils/observer.h>
+#include <mailutils/property.h>
+#include <mailutils/stream.h>
+#include <mailutils/url.h>
+
+#define H_BCC 0
+#define H_CC 1
+#define H_CONTENT_LANGUAGE 2
+#define H_CONTENT_TRANSFER_ENCODING 3
+#define H_CONTENT_TYPE 4
+#define H_DATE 5
+#define H_FROM 6
+#define H_IN_REPLY_TO 7
+#define H_MESSAGE_ID 8
+#define H_REFERENCE 9
+#define H_REPLY_TO 10
+#define H_SENDER 11
+#define H_SUBJECT 12
+#define H_TO 13
+#define H_X_UIDL 14
+
+#define HDRSIZE 15
+
+struct _mbox_message;
+struct _mbox_data;
+
+typedef struct _mbox_data* mbox_data_t;
+typedef struct _mbox_message* mbox_message_t;
+
+/* Keep the file positions of where the headers and bodies start and end.
+ attr_flags is the "Status:" message. */
+struct _mbox_message
+{
+ /* Offset of the messages in the mailbox. */
+ off_t header_from;
+ off_t header_from_end;
+ off_t body;
+ off_t body_end;
+
+ /* Fast header retrieve, we save here the most common headers. This will
+ speed the header search. The entire headers are copied, when modified,
+ by the header_t object, we do not have to worry about updating them. */
+ char *fhdr[HDRSIZE];
+
+ size_t uid; /* IMAP uid. */
+
+ int attr_flags; /* The attr_flags contains the "Status:" attribute */
+
+ size_t header_lines;
+ size_t body_lines;
+
+ message_t message; /* A message attach to it. */
+ mbox_data_t mud; /* Back pointer. */
+};
+
+/* The umessages is an array of pointers that contains umessages_count of
+ mbox_message_t*; umessages[umessages_count]. We do it this way because
+ realloc() can move everything to a new memory region and invalidate all
+ the pointers. Thanks to <Dave Inglis> for pointing this out. The
+ messages_count is the count number of messages parsed so far. */
+struct _mbox_data
+{
+ mbox_message_t *umessages; /* Array. */
+ size_t umessages_count; /* How big is the umessages[]. */
+ size_t messages_count; /* How many valid entry in umessages[]. */
+ off_t size; /* Size of the mailbox. */
+ unsigned long uidvalidity;
+ size_t uidnext;
+ char *name;
+
+ /* The variables below are use to hold the state when appending messages. */
+ enum mbox_state
+ {
+ MBOX_NO_STATE = 0,
+ MBOX_STATE_APPEND_SENDER, MBOX_STATE_APPEND_DATE, MBOX_STATE_APPEND_HEADER,
+ MBOX_STATE_APPEND_ATTRIBUTE, MBOX_STATE_APPEND_UID, MBOX_STATE_APPEND_BODY,
+ MBOX_STATE_APPEND_MESSAGE
+ } state ;
+ char *sender;
+ char *date;
+ off_t off;
+ mailbox_t mailbox; /* Back pointer. */
+};
+
+int mbox_scan0 __P((mailbox_t mailbox, size_t msgno, size_t *pcount,
+ int do_notif));
+#ifdef WITH_PTHREAD
+void mbox_cleanup __P((void *arg));
+#endif
diff --git a/mailbox/mh/.cvsignore b/mailbox/mh/.cvsignore
new file mode 100644
index 000000000..a34373989
--- /dev/null
+++ b/mailbox/mh/.cvsignore
@@ -0,0 +1,9 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+T
+_*
+.gdbinit
diff --git a/mailbox/mh/Makefile.am b/mailbox/mh/Makefile.am
new file mode 100644
index 000000000..b982fe2f4
--- /dev/null
+++ b/mailbox/mh/Makefile.am
@@ -0,0 +1,28 @@
+## Process this file with GNU Automake to create Makefile.in
+
+## Copyright (C) 2003 Free Software Foundation, Inc.
+##
+## GNU Mailutils 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, 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.
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu @INTLINCS@
+
+noinst_LTLIBRARIES = libmh.la
+
+libmh_la_SOURCES = \
+ folder.c\
+ mbox.c\
+ url.c
+
diff --git a/mailbox/pop/.cvsignore b/mailbox/pop/.cvsignore
new file mode 100644
index 000000000..a34373989
--- /dev/null
+++ b/mailbox/pop/.cvsignore
@@ -0,0 +1,9 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+T
+_*
+.gdbinit
diff --git a/mailbox/pop/Makefile.am b/mailbox/pop/Makefile.am
new file mode 100644
index 000000000..28a8c66f1
--- /dev/null
+++ b/mailbox/pop/Makefile.am
@@ -0,0 +1,28 @@
+## Process this file with GNU Automake to create Makefile.in
+
+## Copyright (C) 2003 Free Software Foundation, Inc.
+##
+## GNU Mailutils 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, 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.
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu @INTLINCS@
+
+noinst_LTLIBRARIES = libpop.la
+
+libpop_la_SOURCES = \
+ folder.c\
+ mbox.c\
+ url.c
+

Return to:

Send suggestions and report system problems to the System administrator.