moved most of the POP-specific code to a pop subdirectory, similar to the IMAP code.
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@202
e385b8ad-14ed-0310-8656-
cc95a2468c6d
IMAP_INCLUDES = -I$(top_srcdir)/imap
endif
IMAP_INCLUDES = -I$(top_srcdir)/imap
endif
-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
+if BUILD_POP
+POP_SUBDIR = pop
+POP_INCLUDES = -I$(top_srcdir)/pop
+endif
+
+SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) $(POP_SUBDIR)
bin_SCRIPTS = muttngbug fleang
bin_SCRIPTS = muttngbug fleang
muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c md5c.c \
url.c ascii.c mutt_idna.c sidebar.c hcache.c crypt-mod.c crypt-mod.h
muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c md5c.c \
url.c ascii.c mutt_idna.c sidebar.c hcache.c crypt-mod.c crypt-mod.h
-muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \
+muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(LIBPOP) $(MUTTLIBS) \
-muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAPDEPS) \
+muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAPDEPS) $(LIBPOPDEPS) \
$(INTLDEPS)
makedoc_SOURCES = makedoc.c
$(INTLDEPS)
makedoc_SOURCES = makedoc.c
-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
-DHAVE_CONFIG_H=1
-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
-DHAVE_CONFIG_H=1
-INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
+INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(POP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
CPPFLAGS=@CPPFLAGS@ -I$(includedir)
EXTRA_muttng_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
CPPFLAGS=@CPPFLAGS@ -I$(includedir)
EXTRA_muttng_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
- mutt_tunnel.c pop.c pop_auth.c pop_lib.c smime.c pgp.c pgpinvoke.c pgpkey.c \
+ mutt_tunnel.c smime.c pgp.c pgpinvoke.c pgpkey.c \
pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \
browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c \
pgppacket.c mutt_idna.h nntp.c newsrc.c mutt_libesmtp.c \
pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \
browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c \
pgppacket.c mutt_idna.h nntp.c newsrc.c mutt_libesmtp.c \
globals.h hash.h history.h init.h keymap.h mutt_crypt.h \
mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
globals.h hash.h history.h init.h keymap.h mutt_crypt.h \
mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
- mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h \
+ mx.h pager.h pgp.h protos.h reldate.h rfc1524.h rfc2047.h \
rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare \
nntp.h ChangeLog.nntp \
_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare \
nntp.h ChangeLog.nntp \
_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
AC_ARG_ENABLE(pop, AC_HELP_STRING([--enable-pop], [Enable POP3 support]),
[ if test x$enableval = xyes ; then
AC_DEFINE(USE_POP,1,[ Define if you want support for the POP3 protocol. ])
AC_ARG_ENABLE(pop, AC_HELP_STRING([--enable-pop], [Enable POP3 support]),
[ if test x$enableval = xyes ; then
AC_DEFINE(USE_POP,1,[ Define if you want support for the POP3 protocol. ])
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o"
+ LIBPOP="-Lpop -lpop"
+ LIBPOPDEPS="\$(top_srcdir)/pop/pop.h pop/libpop.a"
need_socket="yes"
need_pop="yes"
need_md5="yes"
fi
])
need_socket="yes"
need_pop="yes"
need_md5="yes"
fi
])
+AM_CONDITIONAL(BUILD_POP, test x$need_pop = xyes)
AC_ARG_ENABLE(imap, AC_HELP_STRING([--enable-imap], [Enable IMAP support]),
[ if test x$enableval = xyes ; then
AC_ARG_ENABLE(imap, AC_HELP_STRING([--enable-imap], [Enable IMAP support]),
[ if test x$enableval = xyes ; then
AC_SUBST(MUTT_LIB_OBJECTS)
AC_SUBST(LIBIMAP)
AC_SUBST(LIBIMAPDEPS)
AC_SUBST(MUTT_LIB_OBJECTS)
AC_SUBST(LIBIMAP)
AC_SUBST(LIBIMAPDEPS)
+AC_SUBST(LIBPOP)
+AC_SUBST(LIBPOPDEPS)
po/Makefile.in doc/Makefile contrib/Makefile
muttbug.sh
imap/Makefile
po/Makefile.in doc/Makefile contrib/Makefile
muttbug.sh
imap/Makefile
Muttngrc.head
doc/instdoc.sh)
Muttngrc.head
doc/instdoc.sh)
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+AR=@AR@
+
+AUTOMAKE_OPTIONS = foreign
+
+INCLUDES = -I$(top_srcdir) -I../intl
+
+noinst_LIBRARIES = libpop.a
+noinst_HEADERS = pop.h
+
+libpop_a_SOURCES = pop.c pop_auth.c pop_lib.c pop.h
- url = p = safe_calloc (mutt_strlen (PopHost) + 7, sizeof (char));
+ url = p = safe_calloc (strlen (PopHost) + 7, sizeof (char));
if (url_check_scheme (PopHost) == U_UNKNOWN) {
strcpy (url, "pop://"); /* __STRCPY_CHECKED__ */
p = strchr (url, '\0');
if (url_check_scheme (PopHost) == U_UNKNOWN) {
strcpy (url, "pop://"); /* __STRCPY_CHECKED__ */
p = strchr (url, '\0');
mutt_message _("Authenticating (SASL)...");
snprintf (buf, sizeof (buf), "AUTH %s", mech);
mutt_message _("Authenticating (SASL)...");
snprintf (buf, sizeof (buf), "AUTH %s", mech);
- olen = mutt_strlen (buf);
/* looping protocol */
FOREVER {
/* looping protocol */
FOREVER {
#ifdef USE_SASL2
if (!mutt_strncmp (inbuf, "+ ", 2)
#ifdef USE_SASL2
if (!mutt_strncmp (inbuf, "+ ", 2)
- && sasl_decode64 (inbuf, mutt_strlen (inbuf), buf, LONG_STRING - 1,
+ && sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING - 1,
&len) != SASL_OK)
#else
if (!mutt_strncmp (inbuf, "+ ", 2)
&len) != SASL_OK)
#else
if (!mutt_strncmp (inbuf, "+ ", 2)
- && sasl_decode64 (inbuf, mutt_strlen (inbuf), buf, &len) != SASL_OK)
+ && sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
/* Compute the authentication hash to send to the server */
MD5Init (&mdContext);
MD5Update (&mdContext, (unsigned char *) pop_data->timestamp,
/* Compute the authentication hash to send to the server */
MD5Init (&mdContext);
MD5Update (&mdContext, (unsigned char *) pop_data->timestamp,
- mutt_strlen (pop_data->timestamp));
+ strlen (pop_data->timestamp));
MD5Update (&mdContext, (unsigned char *) pop_data->conn->account.pass,
MD5Update (&mdContext, (unsigned char *) pop_data->conn->account.pass,
- mutt_strlen (pop_data->conn->account.pass));
+ strlen (pop_data->conn->account.pass));
MD5Final (digest, &mdContext);
for (i = 0; i < sizeof (digest); i++)
MD5Final (digest, &mdContext);
for (i = 0; i < sizeof (digest); i++)
- strfcpy (t, c, sizeof (pop_data->err_msg) - mutt_strlen (pop_data->err_msg));
+ strfcpy (t, c, sizeof (pop_data->err_msg) - strlen (pop_data->err_msg));
mutt_remove_trailing_ws (pop_data->err_msg);
}
mutt_remove_trailing_ws (pop_data->err_msg);
}
POP_DATA *pop_data = (POP_DATA *) data;
if (!pop_data->auth_list) {
POP_DATA *pop_data = (POP_DATA *) data;
if (!pop_data->auth_list) {
- pop_data->auth_list = safe_malloc (mutt_strlen (line) + 1);
+ pop_data->auth_list = safe_malloc (strlen (line) + 1);
*pop_data->auth_list = '\0';
}
else {
safe_realloc (&pop_data->auth_list,
*pop_data->auth_list = '\0';
}
else {
safe_realloc (&pop_data->auth_list,
- mutt_strlen (pop_data->auth_list) + mutt_strlen (line) + 2);
+ strlen (pop_data->auth_list) + strlen (line) + 2);
strcat (pop_data->auth_list, " "); /* __STRCAT_CHECKED__ */
}
strcat (pop_data->auth_list, line); /* __STRCAT_CHECKED__ */
strcat (pop_data->auth_list, " "); /* __STRCAT_CHECKED__ */
}
strcat (pop_data->auth_list, line); /* __STRCAT_CHECKED__ */
strfcpy (inbuf + lenbuf, p, sizeof (buf));
if (chunk >= sizeof (buf)) {
strfcpy (inbuf + lenbuf, p, sizeof (buf));
if (chunk >= sizeof (buf)) {
- lenbuf += mutt_strlen (p);
if (syntax & RE_NO_BK_PARENS)
goto normal_backslash;
if (syntax & RE_NO_BK_PARENS)
goto normal_backslash;
- if (COMPILE_STACK_EMPTY)
- if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ if (COMPILE_STACK_EMPTY) {
+ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) {
FREE_STACK_RETURN (REG_ERPAREN);
FREE_STACK_RETURN (REG_ERPAREN);
handle_close:
if (fixup_alt_jump) { /* Push a dummy failure point at the end of the
handle_close:
if (fixup_alt_jump) { /* Push a dummy failure point at the end of the
}
/* See similar code for backslashed left paren above. */
}
/* See similar code for backslashed left paren above. */
- if (COMPILE_STACK_EMPTY)
- if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ if (COMPILE_STACK_EMPTY) {
+ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) {
FREE_STACK_RETURN (REG_ERPAREN);
FREE_STACK_RETURN (REG_ERPAREN);
/* Since we just checked for an empty stack above, this
``can't happen''. */
/* Since we just checked for an empty stack above, this
``can't happen''. */