From: Pierre Habouzit Date: Sun, 26 Nov 2006 21:58:49 +0000 (+0100) Subject: always build support for mixmaster. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=1d0ce70b85c36973b50e5783fe7b72941c81c0a9 always build support for mixmaster. Signed-off-by: Pierre Habouzit --- diff --git a/Makefile.am b/Makefile.am index 8bc2864..a695993 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ madmutt_SOURCES = $(BUILT_SOURCES) \ compose.c copy.c editmsg.c init.c keymap.c lib.c \ flags.c from.c handler.c headers.c help.c hook.c \ main.c muttlib.c mutt_idna.c pager.c pattern.c postpone.c recvattach.c recvcmd.c \ - score.c send.c sendlib.c sort.c state.c thread.c account.c + score.c send.c sendlib.c sort.c state.c thread.c account.c remailer.c madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \ -Llib-lib -llib -Llib-mime -lmime -Llib-crypt -lcrypt -Llib-mx -lmx \ @@ -60,7 +60,7 @@ EXTRA_madmutt_SOURCES = \ alias.h browser.h remailer.h state.h \ mutt_idna.h mutt_libesmtp.c state.h -EXTRA_DIST = config.rpath COPYRIGHT GPL OPS OPS.MIX TODO \ +EXTRA_DIST = config.rpath COPYRIGHT GPL OPS TODO \ configure account.h alias.h attach.h recvattach.h handler.h thread.h \ buffy.h charset.h copy.h dotlock.h functions.def gen_defs \ recvattach.h handler.h thread.h globals.h init.h keymap.h \ @@ -91,8 +91,6 @@ ACLOCAL_AMFLAGS = -I m4 LDADD = @LIBOBJS@ @LIBINTL@ -OPS=@OPS@ - charset.gperf: charset.def sh $< > $@ @@ -102,12 +100,9 @@ smime_keysng: $(srcdir)/smime_keys.pl Makefile: $(BUILT_SOURCES) -keymap_defs.h: $(OPS) +keymap_defs.h: OPS $(srcdir)/gen_defs $^ > keymap_defs.h -keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.MIX - $(srcdir)/gen_defs $^ > keymap_alldefs.h - version.h: echo "#define MUTT_REVISION \"git\"" > version.h diff --git a/OPS b/OPS index 156390e..c227b96 100644 --- a/OPS +++ b/OPS @@ -216,3 +216,10 @@ OP_DECRYPT_SAVE "make decrypted copy and delete" OP_DECRYPT_COPY "make decrypted copy" OP_FORGET_PASSPHRASE "wipe passphrase(s) from memory" OP_EXTRACT_KEYS "extract supported public keys" +OP_MIX_USE "Accept the chain constructed" +OP_MIX_APPEND "Append a remailer to the chain" +OP_MIX_INSERT "Insert a remailer into the chain" +OP_MIX_DELETE "Delete a remailer from the chain" +OP_MIX_CHAIN_PREV "Select the previous element of the chain" +OP_MIX_CHAIN_NEXT "Select the next element of the chain" +OP_COMPOSE_MIX "send the message through a mixmaster remailer chain" diff --git a/OPS.MIX b/OPS.MIX deleted file mode 100644 index 4988333..0000000 --- a/OPS.MIX +++ /dev/null @@ -1,7 +0,0 @@ -OP_MIX_USE "Accept the chain constructed" -OP_MIX_APPEND "Append a remailer to the chain" -OP_MIX_INSERT "Insert a remailer into the chain" -OP_MIX_DELETE "Delete a remailer from the chain" -OP_MIX_CHAIN_PREV "Select the previous element of the chain" -OP_MIX_CHAIN_NEXT "Select the next element of the chain" -OP_COMPOSE_MIX "send the message through a mixmaster remailer chain" diff --git a/compose.c b/compose.c index a604ca0..a21776e 100644 --- a/compose.c +++ b/compose.c @@ -30,10 +30,7 @@ #include "sort.h" #include "charset.h" #include "buffy.h" - -#ifdef MIXMASTER #include "remailer.h" -#endif #ifdef USE_NNTP #include @@ -53,10 +50,7 @@ enum { HDR_SUBJECT, HDR_REPLYTO, HDR_FCC, - -#ifdef MIXMASTER HDR_MIX, -#endif HDR_CRYPT, HDR_CRYPTINFO, @@ -86,12 +80,10 @@ static const char *Prompts[] = { "Bcc: ", "Subject: ", "Reply-To: ", - "Fcc: " + "Fcc: ", #ifdef USE_NNTP -#ifdef MIXMASTER - , "" -#endif - , "", "", "Newsgroups: ", "Followup-To: ", "X-Comment-To: " + "", + "", "", "Newsgroups: ", "Followup-To: ", "X-Comment-To: " #endif }; @@ -179,9 +171,6 @@ static void redraw_crypt_lines (HEADER * msg) } } - -#ifdef MIXMASTER - static void redraw_mix_line (string_list_t * chain) { int c; @@ -210,7 +199,6 @@ static void redraw_mix_line (string_list_t * chain) c += m_strlen(t) + 2; } } -#endif /* MIXMASTER */ static int check_attachments (ATTACHPTR ** idx, short idxlen) { @@ -280,10 +268,7 @@ static void draw_envelope (HEADER * msg, char *fcc) mutt_paddstr (W, fcc); redraw_crypt_lines (msg); - -#ifdef MIXMASTER redraw_mix_line (msg->chain); -#endif SETCOLOR (MT_COLOR_STATUS); mvaddstr (HDR_ATTACH - 1, SW, _("-- Attachments")); @@ -1038,11 +1023,8 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ break; } - -#ifdef MIXMASTER if (msg->chain && mix_check_message (msg) != 0) break; -#endif if (!fccSet && *fcc) { if ((i = query_quadoption (OPT_COPY, @@ -1339,15 +1321,10 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ mutt_message_hook (NULL, msg, M_SEND2HOOK); break; - -#ifdef MIXMASTER case OP_COMPOSE_MIX: - mix_make_chain (&msg->chain, &menu->redraw); mutt_message_hook (NULL, msg, M_SEND2HOOK); break; -#endif - } /* Draw formated compose status line */ diff --git a/configure.ac b/configure.ac index 1fcdb34..0685e44 100644 --- a/configure.ac +++ b/configure.ac @@ -62,8 +62,6 @@ ac_aux_path_sendmail=/usr/sbin:/usr/lib AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, $PATH:$ac_aux_path_sendmail) AC_DEFINE_UNQUOTED(SENDMAIL,"$ac_cv_path_SENDMAIL",[ Where to find sendmail on your system. ]) -OPS="\$(srcdir)/OPS" - dnl ---------------- gpgme ---------------- AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),[ @@ -77,16 +75,8 @@ AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--enable-gpgme], [Enable GPGME support]),[ fi ]) -dnl ---------------- mixmaster ---------------- - -AC_ARG_WITH(mixmaster, AC_HELP_STRING([--with-mixmaster[=PATH]], [Include Mixmaster support]), [ - MIXMASTER=${withval:-"mixmaster"} - OPS="$OPS \$(srcdir)/OPS.MIX" - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS remailer.o" - AC_DEFINE_UNQUOTED(MIXMASTER,"$MIXMASTER",[Where to find mixmaster on your system.]) -]) - -AC_SUBST([OPS]) +AC_PATH_PROG(MIXMASTER, mixmaster, mixmaster) +AC_DEFINE_UNQUOTED(MIXMASTER,"$MIXMASTER",[Where to find mixmaster on your system.]) AC_PATH_PROG(ISPELL, ispell, no) if test $ISPELL != no; then diff --git a/doconfig.sh b/doconfig.sh index a8645ee..4b598e0 100755 --- a/doconfig.sh +++ b/doconfig.sh @@ -1,6 +1,6 @@ ./autogen.sh ./configure -C --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ --with-sharedir=/usr/share/mutt-ng --with-docdir=/usr/share/doc/mutt-ng \ - --with-mailpath=/var/mail --enable-fcntl --with-mixmaster --with-sasl2 \ + --with-mailpath=/var/mail --enable-fcntl --with-sasl2 \ --with-idn --with-curses --enable-nntp --with-gss --with-gnutls \ --enable-gpgme --enable-hcache diff --git a/globals.h b/globals.h index a115c19..d2292e3 100644 --- a/globals.h +++ b/globals.h @@ -84,10 +84,8 @@ WHERE char *Preconnect INITVAL (NULL); WHERE char *Tunnel INITVAL (NULL); WHERE short NetInc; -#ifdef MIXMASTER WHERE char *Mixmaster; WHERE char *MixEntryFormat; -#endif WHERE char *OperatingSystem INITVAL (NULL); diff --git a/init.h b/init.h index 273b9df..10b2c8b 100644 --- a/init.h +++ b/init.h @@ -80,9 +80,6 @@ struct option_t { /* build complete documentation */ #ifdef _MAKEDOC -# ifndef MIXMASTER -# define MIXMASTER "mixmaster" -# endif # ifndef USE_SSL # define USE_SSL # endif @@ -1650,12 +1647,8 @@ struct option_t MuttVars[] = { */ #endif -#ifdef MIXMASTER {"mix_entry_format", DT_STR, R_NONE, UL &MixEntryFormat, "%4n %c %-16s %a"}, /* - ** .pp - ** Availability: Mixmaster - ** ** .pp ** This variable describes the format of a remailer line on the mixmaster ** chain selection screen. The following \fTprintf(3)\fP-like sequences are @@ -1670,16 +1663,12 @@ struct option_t MuttVars[] = { */ {"mixmaster", DT_PATH, R_NONE, UL &Mixmaster, MIXMASTER}, /* - ** .pp - ** Availability: Mixmaster - ** ** .pp ** This variable contains the path to the Mixmaster binary on your ** system. It is used with various sets of parameters to gather the ** list of known remailers, and to finally send a message through the ** mixmaster chain. */ -#endif {"move", DT_QUAD, R_NONE, OPT_MOVE, "ask-no" }, /* ** .pp diff --git a/keymap.c b/keymap.c index 3a2f922..2c5bebe 100644 --- a/keymap.c +++ b/keymap.c @@ -36,10 +36,7 @@ struct mapping_t Menus[] = { {"key_select_smime", MENU_KEY_SELECT_SMIME}, #endif -#ifdef MIXMASTER {"mix", MENU_MIX}, -#endif - {"query", MENU_QUERY}, {"generic", MENU_GENERIC}, {NULL, 0} @@ -510,13 +507,11 @@ void km_init (void) create_bindings (OpSmime, MENU_KEY_SELECT_SMIME); #endif -#ifdef MIXMASTER create_bindings (OpMix, MENU_MIX); km_bindkey ("", MENU_MIX, OP_GENERIC_SELECT_ENTRY); km_bindkey ("h", MENU_MIX, OP_MIX_CHAIN_PREV); km_bindkey ("l", MENU_MIX, OP_MIX_CHAIN_NEXT); -#endif /* bindings for the line editor */ create_bindings (OpEditor, MENU_EDITOR); @@ -733,11 +728,8 @@ struct binding_t *km_get_table (int menu) return OpSmime; #endif -#ifdef MIXMASTER case MENU_MIX: return OpMix; -#endif - } return NULL; } diff --git a/keymap.h b/keymap.h index 3065f01..9849304 100644 --- a/keymap.h +++ b/keymap.h @@ -62,10 +62,7 @@ enum { MENU_KEY_SELECT_SMIME, #endif -#ifdef MIXMASTER MENU_MIX, -#endif - MENU_MAX }; diff --git a/lib-mime/mime-types.h b/lib-mime/mime-types.h index 689f81b..6f8c4b7 100644 --- a/lib-mime/mime-types.h +++ b/lib-mime/mime-types.h @@ -332,9 +332,7 @@ see: crypt.h pgplib.h, smime.h */ short attach_total; -#ifdef MIXMASTER string_list_t *chain; -#endif int refno; /* message number on server */ void *data; /* driver-specific data */ diff --git a/lib-mime/mime.c b/lib-mime/mime.c index dc50d2d..9abea0b 100644 --- a/lib-mime/mime.c +++ b/lib-mime/mime.c @@ -201,9 +201,7 @@ void header_wipe(HEADER *h) p_delete(&h->maildir_flags); p_delete(&h->tree); p_delete(&h->path); -#ifdef MIXMASTER string_list_wipe(&h->chain); -#endif p_delete(&h->data); } diff --git a/lib-mx/hcache.c b/lib-mx/hcache.c index 3b617cb..a6aa68d 100644 --- a/lib-mx/hcache.c +++ b/lib-mx/hcache.c @@ -368,10 +368,8 @@ static int generate_crc32 () crc = crc32(crc, (unsigned char const *) "USE_POP", m_strlen("USE_POP")); -#ifdef MIXMASTER crc = crc32(crc, (unsigned char const *) "MIXMASTER", m_strlen("MIXMASTER")); -#endif crc = crc32(crc, (unsigned char const *) "USE_IMAP", m_strlen("USE_IMAP")); diff --git a/main.c b/main.c index 9e2ef37..2d2a789 100644 --- a/main.c +++ b/main.c @@ -370,11 +370,7 @@ static void show_version (void) printf (" +PKGDATADIR=\"%s\"\n", PKGDATADIR); printf (" +PKGDOCDIR=\"%s\"\n", PKGDOCDIR); printf (" +SYSCONFDIR=\"%s\"\n", SYSCONFDIR); -#ifdef MIXMASTER printf (" +MIXMASTER=\"%s\"\n\n", MIXMASTER); -#else - puts (" -MIXMASTER\n"); -#endif puts (_("MadMutt is based on Madmutt wich was based on Mutt before\n")); diff --git a/postpone.c b/postpone.c index 5fda6ce..62939a8 100644 --- a/postpone.c +++ b/postpone.c @@ -343,8 +343,6 @@ int mutt_get_postponed (CONTEXT * ctx, HEADER * hdr, HEADER ** cur, char *fcc, string_list_wipe(&tmp); tmp = next; } - -#ifdef MIXMASTER else if (m_strncmp("X-Mutt-Mix:", tmp->data, 11) == 0) { char *t; @@ -365,8 +363,6 @@ int mutt_get_postponed (CONTEXT * ctx, HEADER * hdr, HEADER ** cur, char *fcc, string_list_wipe(&tmp); tmp = next; } -#endif - else { last = tmp; tmp = tmp->next; diff --git a/remailer.c b/remailer.c index 2971a50..226953d 100644 --- a/remailer.c +++ b/remailer.c @@ -24,8 +24,6 @@ #define SW (option(OPTMBOXPANE)?SidebarWidth:0) -#ifdef MIXMASTER - #define MIX_CAP_COMPRESS (1 << 0) #define MIX_CAP_MIDDLEMAN (1 << 1) #define MIX_CAP_NEWSPOST (1 << 2) @@ -720,5 +718,3 @@ int mix_send_message (string_list_t * chain, const char *tempfile) return i; } - -#endif diff --git a/remailer.h b/remailer.h index cdefddc..9f93bdd 100644 --- a/remailer.h +++ b/remailer.h @@ -14,12 +14,8 @@ #ifndef _REMAILER_H #define _REMAILER_H -#ifdef MIXMASTER - int mix_send_message(string_list_t *, const char *); int mix_check_message(HEADER * msg); void mix_make_chain(string_list_t **, int *); -#endif /* MIXMASTER */ - #endif /* _REMAILER_H */ diff --git a/send.c b/send.c index ed87f4b..6bd7885 100644 --- a/send.c +++ b/send.c @@ -27,10 +27,7 @@ #include #endif -#ifdef MIXMASTER #include "remailer.h" -#endif - static void append_signature (FILE * f) { @@ -976,14 +973,8 @@ static int send_message (HEADER * msg) if (!tempfp) return -1; -#ifdef MIXMASTER mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0); -#endif -#ifndef MIXMASTER - mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, 0); -#endif - fputc ('\n', tempfp); /* tie off the header. */ if ((mutt_write_mime_body (msg->content, tempfp) == -1)) { @@ -998,10 +989,8 @@ static int send_message (HEADER * msg) return (-1); } -#ifdef MIXMASTER if (msg->chain) return mix_send_message (msg->chain, tempfile); -#endif i = mutt_invoke_mta (msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc, tempfile, diff --git a/sendlib.c b/sendlib.c index 8ca6dfc..4c5219e 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2217,11 +2217,9 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, fputc ('\n', msg->fp); } -#ifdef MIXMASTER /* (postponement) if the mail is to be sent through a mixmaster * chain, save that information */ - if (post && hdr->chain && hdr->chain) { string_list_t *p; @@ -2231,7 +2229,6 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, fputc ('\n', msg->fp); } -#endif if (tempfp) { char sasha[LONG_STRING];