summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--include/mailutils/sys/Makefile.am21
-rw-r--r--include/mailutils/sys/amd.h (renamed from libproto/include/amd.h)10
-rw-r--r--include/mailutils/sys/attribute.h (renamed from libproto/include/attribute0.h)10
-rw-r--r--include/mailutils/sys/auth.h (renamed from libproto/include/auth0.h)12
-rw-r--r--include/mailutils/sys/body.h (renamed from libproto/include/body0.h)10
-rw-r--r--include/mailutils/sys/debug.h (renamed from libproto/include/debug0.h)10
-rw-r--r--include/mailutils/sys/envelope.h (renamed from libproto/include/envelope0.h)10
-rw-r--r--include/mailutils/sys/folder.h (renamed from libproto/include/folder0.h)30
-rw-r--r--include/mailutils/sys/imap.h (renamed from libproto/include/imap0.h)95
-rw-r--r--include/mailutils/sys/iterator.h (renamed from libproto/include/iterator0.h)20
-rw-r--r--include/mailutils/sys/list.h (renamed from libproto/include/list0.h)26
-rw-r--r--include/mailutils/sys/mailbox.h (renamed from libproto/include/mailbox0.h)28
-rw-r--r--include/mailutils/sys/mailer.h (renamed from libproto/include/mailer0.h)30
-rw-r--r--include/mailutils/sys/monitor.h (renamed from libproto/include/monitor0.h)26
-rw-r--r--include/mailutils/sys/observer.h (renamed from libproto/include/observer0.h)22
-rw-r--r--include/mailutils/sys/property.h (renamed from libproto/include/property0.h)30
-rw-r--r--include/mailutils/sys/registrar.h (renamed from libproto/include/registrar0.h)76
-rw-r--r--include/mailutils/sys/url.h (renamed from libproto/include/url0.h)21
-rw-r--r--libproto/Makefile.am2
-rw-r--r--libproto/imap/Makefile.am2
-rw-r--r--libproto/imap/folder.c6
-rw-r--r--libproto/imap/mbox.c8
-rw-r--r--libproto/imap/url.c4
-rw-r--r--libproto/include/.gitignore2
-rw-r--r--libproto/include/Makefile.am39
-rw-r--r--libproto/include/stream0.h76
-rw-r--r--libproto/maildir/Makefile.am2
-rw-r--r--libproto/maildir/folder.c8
-rw-r--r--libproto/maildir/mbox.c6
-rw-r--r--libproto/mailer/Makefile.am2
-rw-r--r--libproto/mailer/mbox.c4
-rw-r--r--libproto/mailer/prog.c8
-rw-r--r--libproto/mailer/remote.c6
-rw-r--r--libproto/mailer/sendmail.c8
-rw-r--r--libproto/mailer/smtp.c8
-rw-r--r--libproto/mbox/Makefile.am2
-rw-r--r--libproto/mbox/folder.c4
-rw-r--r--libproto/mbox/mbox0.h4
-rw-r--r--libproto/mh/Makefile.am2
-rw-r--r--libproto/mh/folder.c10
-rw-r--r--libproto/mh/mbox.c6
-rw-r--r--libproto/nntp/Makefile.am2
-rw-r--r--libproto/nntp/folder.c6
-rw-r--r--libproto/nntp/mbox.c6
-rw-r--r--libproto/nntp/url.c2
-rw-r--r--libproto/pop/Makefile.am2
-rw-r--r--libproto/pop/folder.c8
-rw-r--r--libproto/pop/mbox.c8
-rw-r--r--libproto/pop/url.c4
-rw-r--r--mailbox/amd.c8
-rw-r--r--mailbox/assoc.c2
-rw-r--r--mailbox/attribute.c2
-rw-r--r--mailbox/auth.c2
-rw-r--r--mailbox/body.c2
-rw-r--r--mailbox/debug.c2
-rw-r--r--mailbox/envelope.c2
-rw-r--r--mailbox/folder.c2
-rw-r--r--mailbox/iterator.c4
-rw-r--r--mailbox/list.c4
-rw-r--r--mailbox/listlist.c4
-rw-r--r--mailbox/mailbox.c4
-rw-r--r--mailbox/mailer.c2
-rw-r--r--mailbox/mbx_default.c2
-rw-r--r--mailbox/mbxitr.c2
-rw-r--r--mailbox/monitor.c2
-rw-r--r--mailbox/mutil.c2
-rw-r--r--mailbox/observer.c2
-rw-r--r--mailbox/property.c2
-rw-r--r--mailbox/registrar.c2
-rw-r--r--mailbox/ticket.c2
-rw-r--r--mailbox/url.c2
-rw-r--r--mailbox/wicket.c4
73 files changed, 324 insertions, 485 deletions
diff --git a/configure.ac b/configure.ac
index 4a359a029..eb11d2069 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,7 +69,7 @@ AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a ../libmu_cfg/libmu_cfg.la
# header files. There are two exceptions, though. See NOTE before the
# AC_CONFIG_LINKS statements, below.
-AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include -I${top_builddir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/libproto/include')
+AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include -I${top_builddir}/include -I${top_srcdir}/mailbox')
AC_SUBST(MU_APP_COMMON_INCLUDES,'-I${srcdir} -I${top_srcdir}/include -I${top_srcdir}/lib -I${top_builddir}/lib -I${top_builddir} -I${top_builddir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/libmu_argp -I${top_srcdir}/libmu_cfg')
@@ -1350,7 +1350,6 @@ AC_CONFIG_FILES([
libproto/pop/Makefile
libproto/nntp/Makefile
libproto/imap/Makefile
- libproto/include/Makefile
maidag/Makefile
mail/Makefile
mail/testsuite/Makefile
diff --git a/include/mailutils/sys/Makefile.am b/include/mailutils/sys/Makefile.am
index bc813e9f1..e8f073ccf 100644
--- a/include/mailutils/sys/Makefile.am
+++ b/include/mailutils/sys/Makefile.am
@@ -19,25 +19,42 @@
sysincludedir=$(pkgincludedir)/sys
sysinclude_HEADERS = \
+ amd.h\
+ attribute.h\
+ auth.h\
+ body.h\
dbgstream.h\
+ debug.h\
+ envelope.h\
file_stream.h\
filter.h\
+ folder.h\
gsasl-stream.h\
header_stream.h\
header.h\
+ imap.h\
+ iterator.h\
iostream.h\
+ list.h\
+ mailbox.h\
+ mailer.h\
mapfile_stream.h\
memory_stream.h\
message_stream.h\
message.h\
mime.h\
+ monitor.h\
+ nntp.h\
+ observer.h\
+ pop3.h\
prog_stream.h\
+ property.h\
+ registrar.h\
socket_stream.h\
stdio_stream.h\
streamref.h\
streamtrans.h\
stream.h\
tls-stream.h\
- pop3.h\
- nntp.h\
+ url.h\
xscript-stream.h
diff --git a/libproto/include/amd.h b/include/mailutils/sys/amd.h
index f6434531c..b72c3c1ec 100644
--- a/libproto/include/amd.h
+++ b/include/mailutils/sys/amd.h
@@ -17,10 +17,12 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#define MAX_OPEN_STREAMS 16
+#ifndef _MAILUTILS_SYS_AMD_H
+# define _MAILUTILS_SYS_AMD_H
+# define MAX_OPEN_STREAMS 16
/* Notifications ADD_MESG. */
-#define DISPATCH_ADD_MSG(mbox,mhd,n) \
+# define DISPATCH_ADD_MSG(mbox,mhd,n) \
do \
{ \
int bailing = 0; \
@@ -42,7 +44,7 @@
mu_monitor_wrlock (mbox->monitor); \
} while (0);
-#define MU_AMD_SIZE_FILE_NAME ".mu-size"
+# define MU_AMD_SIZE_FILE_NAME ".mu-size"
struct _amd_data;
struct _amd_message
@@ -110,3 +112,5 @@ void amd_cleanup (void *arg);
struct _amd_message *_amd_get_message (struct _amd_data *amd, size_t msgno);
int amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg,
size_t *pret);
+
+#endif
diff --git a/libproto/include/attribute0.h b/include/mailutils/sys/attribute.h
index f379f7fef..83e1f112f 100644
--- a/libproto/include/attribute0.h
+++ b/include/mailutils/sys/attribute.h
@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _ATTRIBUTE0_H
-# define _ATTRIBUTE0_H
-
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+#ifndef _MAILUTILS_SYS_ATTRIBUTE_H
+# define _MAILUTILS_SYS_ATTRIBUTE_H
#include <mailutils/attribute.h>
@@ -46,4 +42,4 @@ struct _mu_attribute
}
#endif
-#endif /* _ATTRIBUTE0_H */
+#endif /* _MAILUTILS_SYS_ATTRIBUTE_H */
diff --git a/libproto/include/auth0.h b/include/mailutils/sys/auth.h
index 7868bad89..0a4308d3c 100644
--- a/libproto/include/auth0.h
+++ b/include/mailutils/sys/auth.h
@@ -17,16 +17,12 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _AUTH0_H
-#define _AUTH0_H
-
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+#ifndef _MAILUTILS_SYS_AUTH_H
+# define _MAILUTILS_SYS_AUTH_H
+#include <sys/types.h>
#include <mailutils/auth.h>
#include <mailutils/list.h>
-#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
@@ -67,4 +63,4 @@ struct _mu_wicket
}
#endif
-#endif /* _AUTH0_H */
+#endif /* _MAILUTILS_SYS_AUTH_H */
diff --git a/libproto/include/body0.h b/include/mailutils/sys/body.h
index 156793cfd..9c82a2a50 100644
--- a/libproto/include/body0.h
+++ b/include/mailutils/sys/body.h
@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _BODY0_H
-#define _BODY0_H
-
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+#ifndef _MAILUTILS_SYS_BODY_H
+# define _MAILUTILS_SYS_BODY_H
#include <mailutils/stream.h>
#include <mailutils/body.h>
@@ -50,4 +46,4 @@ struct _mu_body
}
#endif
-#endif /* _BODY0_H */
+#endif /* _MAILUTILS_SYS_BODY_H */
diff --git a/libproto/include/debug0.h b/include/mailutils/sys/debug.h
index 1b4fc4608..30ac95925 100644
--- a/libproto/include/debug0.h
+++ b/include/mailutils/sys/debug.h
@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _DEBUG0_H
-#define _DEBUG0_H
-
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+#ifndef _MAILUTILS_SYS_DEBUG_H
+# define _MAILUTILS_SYS_DEBUG_H
#include <mailutils/debug.h>
#include <mailutils/stream.h>
@@ -47,4 +43,4 @@ struct _mu_debug
}
#endif
-#endif /* _DEBUG0_H */
+#endif /* _MAILUTILS_SYS_DEBUG_H */
diff --git a/libproto/include/envelope0.h b/include/mailutils/sys/envelope.h
index 5e1cae40d..fe4689a38 100644
--- a/libproto/include/envelope0.h
+++ b/include/mailutils/sys/envelope.h
@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _ENVELOPE0_H
-#define _ENVELOPE0_H
-
-#ifdef DMALLOC
-#include <dmalloc.h>
-#endif
+#ifndef _MAILUTILS_SYS_ENVELOPE_H
+# define _MAILUTILS_SYS_ENVELOPE_H
#include <mailutils/envelope.h>
@@ -44,4 +40,4 @@ struct _mu_envelope
}
#endif
-#endif /* _ENVELOPE0_H */
+#endif /* _MAILUTILS_SYS_ENVELOPE_H */
diff --git a/libproto/include/folder0.h b/include/mailutils/sys/folder.h
index 060e6a365..912fb87fc 100644
--- a/libproto/include/folder0.h
+++ b/include/mailutils/sys/folder.h
@@ -17,25 +17,21 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _FOLDER0_H
-#define _FOLDER0_H
+#ifndef _MAILUTILS_SYS_FOLDER_H
+# define _MAILUTILS_SYS_FOLDER_H
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+# include <sys/types.h>
+# include <stdio.h>
-#include <sys/types.h>
-#include <stdio.h>
+# include <mailutils/monitor.h>
+# include <mailutils/folder.h>
-#include <mailutils/monitor.h>
-#include <mailutils/folder.h>
-
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
-#define MU_FOLDER_LIST 0
-#define MU_FOLDER_ENUM 1
+# define MU_FOLDER_LIST 0
+# define MU_FOLDER_ENUM 1
struct _mu_folder
{
@@ -70,8 +66,8 @@ struct _mu_folder
int (*_unsubscribe) (mu_folder_t, const char *);
};
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
-#endif /* _FOLDER0_H */
+#endif /* _MAILUTILS_SYS_FOLDER_H */
diff --git a/libproto/include/imap0.h b/include/mailutils/sys/imap.h
index 0b4ff3338..bbad6e573 100644
--- a/libproto/include/imap0.h
+++ b/include/mailutils/sys/imap.h
@@ -17,65 +17,60 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _IMAP0_H
-#define _IMAP0_H
+#ifndef _MAILUTILS_SYS_IMAP_H
+# define _MAILUTILS_SYS_IMAP_H
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+# include <mailutils/sys/folder.h>
+# include <mailutils/sys/mailbox.h>
+# include <mailutils/sys/registrar.h>
+# include <mailutils/sys/auth.h>
-#include <folder0.h>
-#include <mailbox0.h>
-#include <registrar0.h>
-#include <auth0.h>
-
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
-#define CLEAR_STATE(f_imap) \
+# define CLEAR_STATE(f_imap) \
f_imap->selected = NULL, f_imap->state = IMAP_NO_STATE
/* Clear the state and close the stream. */
-#define CHECK_ERROR_CLOSE(folder, f_imap, status) \
-do \
- { \
- if (status != 0) \
- { \
- mu_stream_close (folder->stream); \
- CLEAR_STATE (f_imap); \
- return status; \
- } \
- } \
-while (0)
+# define CHECK_ERROR_CLOSE(folder, f_imap, status) \
+ do \
+ { \
+ if (status != 0) \
+ { \
+ mu_stream_close (folder->stream); \
+ CLEAR_STATE (f_imap); \
+ return status; \
+ } \
+ } \
+ while (0)
/* Clear the state. */
-#define CHECK_ERROR(f_imap, status) \
-do \
- { \
- if (status != 0) \
- { \
- CLEAR_STATE (f_imap); \
- return status; \
- } \
- } \
+# define CHECK_ERROR(f_imap, status) \
+ do \
+ { \
+ if (status != 0) \
+ { \
+ CLEAR_STATE (f_imap); \
+ return status; \
+ } \
+ } \
while (0)
/* Clear the state for non recoverable error. */
-#define CHECK_EAGAIN(f_imap, status) \
-do \
- { \
- if (status != 0) \
- { \
- if (status != EAGAIN && status != EINPROGRESS && status != EINTR) \
- { \
- CLEAR_STATE (f_imap); \
- } \
- return status; \
- } \
- } \
-while (0)
-
+# define CHECK_EAGAIN(f_imap, status) \
+ do \
+ { \
+ if (status != 0) \
+ { \
+ if (status != EAGAIN && status != EINPROGRESS && status != EINTR) \
+ { \
+ CLEAR_STATE (f_imap); \
+ } \
+ return status; \
+ } \
+ } \
+ while (0)
struct _f_imap;
struct _m_imap;
@@ -234,8 +229,8 @@ int imap_parse (f_imap_t);
int imap_readline (f_imap_t);
char *section_name (msg_imap_t);
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
-#endif /* _IMAP0_H */
+#endif /* _MAILUTILS_SYS_IMAP_H */
diff --git a/libproto/include/iterator0.h b/include/mailutils/sys/iterator.h
index 8abbb8019..5b5475f31 100644
--- a/libproto/include/iterator0.h
+++ b/include/mailutils/sys/iterator.h
@@ -17,18 +17,14 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _ITERATOR0_H
-#define _ITERATOR0_H
+#ifndef _MAILUTILS_SYS_ITERATOR_H
+# define _MAILUTILS_SYS_ITERATOR_H
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+# include <mailutils/iterator.h>
-#include <mailutils/iterator.h>
-
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
struct _mu_iterator
{
@@ -46,8 +42,8 @@ struct _mu_iterator
int (*itrctl) (void *owner, enum mu_itrctl_req req, void *arg);
};
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
-#endif /* _ITERATOR0_H */
+#endif /* _MAILUTILS_SYS_ITERATOR_H */
diff --git a/libproto/include/list0.h b/include/mailutils/sys/list.h
index 3ac00fbaa..2e9f83a18 100644
--- a/libproto/include/list0.h
+++ b/include/mailutils/sys/list.h
@@ -17,22 +17,18 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _LIST0_H
-#define _LIST0_H
+#ifndef _MAILUTILS_SYS_LIST_H
+# define _MAILUTILS_SYS_LIST_H
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+# include <sys/types.h>
-#include <sys/types.h>
+# include <mailutils/list.h>
+# include <mailutils/monitor.h>
+# include <mailutils/iterator.h>
-#include <mailutils/list.h>
-#include <mailutils/monitor.h>
-#include <mailutils/iterator.h>
-
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
struct list_data
{
@@ -59,8 +55,8 @@ extern void _mu_list_insert_sublist (mu_list_t list,
size_t count,
int insert_before);
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
-#endif /* _LIST0_H */
+#endif /* _MAILUTILS_SYS_LIST_H */
diff --git a/libproto/include/mailbox0.h b/include/mailutils/sys/mailbox.h
index a052e43ab..12af8fe48 100644
--- a/libproto/include/mailbox0.h
+++ b/include/mailutils/sys/mailbox.h
@@ -17,23 +17,19 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifndef _MAILBOX0_H
-#define _MAILBOX0_H
+#ifndef _MAILUTILS_SYS_MAILBOX_H
+# define _MAILUTILS_SYS_MAILBOX_H
-#ifdef DMALLOC
-# include <dmalloc.h>
-#endif
+# include <sys/types.h>
+# include <stdio.h>
-#include <sys/types.h>
-#include <stdio.h>
+# include <mailutils/monitor.h>
+# include <mailutils/mailbox.h>
+# include <mailutils/iterator.h>
-#include <mailutils/monitor.h>
-#include <mailutils/mailbox.h>
-#include <mailutils/iterator.h>
-
-#ifdef __cplusplus
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
struct _mu_mailbox
{
@@ -80,8 +76,8 @@ struct _mu_mailbox
int (*_get_uidls) (mu_mailbox_t, mu_list_t);
};
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
-#endif /* _MAILBOX0_H */
+#endif /* _MAILUTILS_SYS_MAILBOX_H */
diff --git a/libproto/include/mailer0.h b/include/mailutils/sys/mailer.h
index 949bb1511..b9413a380 100644
--- a/libproto/include/mailer0.h
+++ b/include/mailutils/sys/mailer.h
@@ -17,26 +17,22 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */