From: Thomas Roessler Date: Thu, 10 Feb 2000 19:46:06 +0000 (+0000) Subject: PGP-cleanup patch from Roland Rosenfeld. Thanks! X-Git-Tag: mutt-1-1-4-rel~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb9eb06e28e5da139df43c818f3f428c8f1283f9;p=mutt PGP-cleanup patch from Roland Rosenfeld. Thanks! --- diff --git a/Makefile.am b/Makefile.am index b2789f1c..f4ef76f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -152,7 +152,7 @@ us-distdir: distdir dist-hook us-dist: us-distdir for file in $(distdir)-us/*.c $(distdir)-us/*.h ; do \ - $(srcdir)/reap.pl _PGPPATH < $$file | $(srcdir)/reap.pl MIXMASTER | $(srcdir)/reap.pl USE_SSL > $$file.n && rm $$file && mv $$file.n $$file ; \ + $(srcdir)/reap.pl HAVE_PGP < $$file | $(srcdir)/reap.pl MIXMASTER | $(srcdir)/reap.pl USE_SSL > $$file.n && rm $$file && mv $$file.n $$file ; \ done for file in $(non_us_sources) ; do \ echo "/* This file is only available in the international mutt version */" \ diff --git a/acconfig.h b/acconfig.h index 0b19d122..963f0880 100644 --- a/acconfig.h +++ b/acconfig.h @@ -14,9 +14,6 @@ /* Enable debugging info */ #define DEBUG -/* Does your version of PGP support the PGPPASSFD environment variable? */ -#define HAVE_PGPPASSFD - /* What is your domain name? */ #undef DOMAIN @@ -71,26 +68,8 @@ /* Where to find sendmail on your system */ #undef SENDMAIL -/* Where is PGP located on your system? */ -#undef _PGPPATH - -/* Where is PGP 2.* located on your system? */ -#undef _PGPV2PATH - -/* Where is PGP 5 located on your system? */ -#undef _PGPV3PATH - -/* Where is GNU Privacy Guard located on your system? */ -#undef _PGPGPGPATH - -/* Do we have PGP 2.*? */ -#undef HAVE_PGP2 - -/* Do we have PGP 5.0 or up? */ -#undef HAVE_PGP5 - -/* Do we have GPG? */ -#undef HAVE_GPG +/* Do you want PGP support (--enable-pgp)? */ +#undef HAVE_PGP /* Where to find ispell on your system? */ #undef ISPELL diff --git a/attach.c b/attach.c index 2e095729..fff84944 100644 --- a/attach.c +++ b/attach.c @@ -28,7 +28,7 @@ #include "copy.h" #include "mx.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -377,10 +377,10 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr, int unlink_tempfile = 0; is_message = mutt_is_message_type(a->type, a->subtype); -#ifdef _PGPPATH +#ifdef HAVE_PGP if (is_message && a->hdr && (a->hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase()) return (rc); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ use_mailcap = (flag == M_MAILCAP || (flag == M_REGULAR && mutt_needs_mailcap (a))); snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); diff --git a/commands.c b/commands.c index 481ae2ce..86eb5191 100644 --- a/commands.c +++ b/commands.c @@ -36,7 +36,7 @@ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -77,7 +77,7 @@ int mutt_display_message (HEADER *cur) mutt_parse_mime_message (Context, cur); -#ifdef _PGPPATH +#ifdef HAVE_PGP /* see if PGP is needed for this message. if so, we should exit curses */ if (cur->pgp) { @@ -139,7 +139,7 @@ int mutt_display_message (HEADER *cur) return (0); } -#ifdef _PGPPATH +#ifdef HAVE_PGP /* update PGP information for this message */ cur->pgp |= pgp_query (cur->content); #endif @@ -148,7 +148,7 @@ int mutt_display_message (HEADER *cur) { pager_t info; -#ifdef _PGPPATH +#ifdef HAVE_PGP if (cur->pgp & PGPGOODSIGN) mutt_message _("PGP signature successfully verified."); #endif @@ -277,7 +277,7 @@ int mutt_pipe_message (HEADER *h) -#ifdef _PGPPATH +#ifdef HAVE_PGP if (option (OPTPIPEDECODE)) { mutt_parse_mime_message (Context, h); @@ -299,7 +299,7 @@ int mutt_pipe_message (HEADER *h) -#ifdef _PGPPATH +#ifdef HAVE_PGP if(option(OPTPIPEDECODE)) { @@ -486,7 +486,7 @@ static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags, *cmflags = 0; *chflags = CH_UPDATE_LEN; -#ifdef _PGPPATH +#ifdef HAVE_PGP if (!decode && decrypt && (hdr->pgp & PGPENCRYPT)) { if (mutt_is_multipart_encrypted(hdr->content)) @@ -538,7 +538,7 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redraw) { int i, need_buffy_cleanup; -#ifdef _PGPPATH +#ifdef HAVE_PGP int need_passphrase = 0; #endif char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX]; @@ -559,7 +559,7 @@ int mutt_save_message (HEADER *h, int delete, if (h) { -#ifdef _PGPPATH +#ifdef HAVE_PGP need_passphrase = h->pgp & PGPENCRYPT; #endif mutt_default_save (buf, sizeof (buf), h); @@ -580,7 +580,7 @@ int mutt_save_message (HEADER *h, int delete, if (h) { mutt_default_save (buf, sizeof (buf), h); -#ifdef _PGPPATH +#ifdef HAVE_PGP need_passphrase |= h->pgp & PGPENCRYPT; #endif h = NULL; @@ -619,7 +619,7 @@ int mutt_save_message (HEADER *h, int delete, return (-1); } -#ifdef _PGPPATH +#ifdef HAVE_PGP if(need_passphrase && (decode || decrypt) && !pgp_valid_passphrase()) return -1; #endif @@ -697,7 +697,7 @@ static void print_msg (FILE *fp, CONTEXT *ctx, HEADER *h) chflags |= CH_WEED; } -#ifdef _PGPPATH +#ifdef HAVE_PGP if (h->pgp & PGPENCRYPT) { if (!pgp_valid_passphrase ()) @@ -793,13 +793,13 @@ void mutt_edit_content_type (HEADER *h, BODY *b) mutt_free_header (&b->hdr); } -#ifdef _PGPPATH +#ifdef HAVE_PGP if (h) { if (h->content == b) h->pgp = 0; h->pgp |= pgp_query (b); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ } diff --git a/compose.c b/compose.c index 73fe6338..bfe15027 100644 --- a/compose.c +++ b/compose.c @@ -57,7 +57,7 @@ enum HDR_MIX, #endif -#ifdef _PGPPATH +#ifdef HAVE_PGP HDR_PGP, HDR_PGPSIGINFO, #endif @@ -102,7 +102,7 @@ static void snd_entry (char *b, size_t blen, MUTTMENU *menu, int num) -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" static void redraw_pgp_lines (int pgp) @@ -201,7 +201,7 @@ static int pgp_send_menu (int bits, int *redraw) redraw_pgp_lines (bits); return (bits); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER @@ -293,9 +293,9 @@ static void draw_envelope (HEADER *msg, char *fcc) -#ifdef _PGPPATH +#ifdef HAVE_PGP redraw_pgp_lines (msg->pgp); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER redraw_mix_line (msg->chain); @@ -547,7 +547,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_COMPOSE_ATTACH_KEY: if (idxlen == idxmax) @@ -1157,7 +1157,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_COMPOSE_PGP_MENU: msg->pgp = pgp_send_menu (msg->pgp, &menu->redraw); @@ -1168,7 +1168,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ mutt_forget_passphrase (); break; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER diff --git a/configure.in b/configure.in index 97a62b75..eef1e1dd 100644 --- a/configure.in +++ b/configure.in @@ -64,35 +64,15 @@ if test -f $srcdir/EXPORTABLE ; then SUBVERSION="us" else SUBVERSION="i" - PGPPATH=no - AC_PATH_PROG(GPG, gpg, no) - if test $GPG != no ; then - AC_DEFINE_UNQUOTED(_PGPGPGPATH, "$GPG") - PGPPATH="$GPG" - AC_DEFINE(HAVE_GPG) - fi - - AC_PATH_PROG(PGPK, pgpk, no) - if test $PGPK != no ; then - PGPK=`echo $PGPK | sed 's,.$,,'` - AC_DEFINE_UNQUOTED(_PGPV3PATH, "$PGPK") - PGPPATH="$PGPK" - AC_DEFINE(HAVE_PGP5) - fi - - AC_PATH_PROG(PGP, pgp, no) - if test $PGP != no ; then - AC_DEFINE_UNQUOTED(_PGPV2PATH, "$PGP") - PGPPATH="$PGP" - AC_DEFINE(HAVE_PGP2) - fi - - if test $PGPPATH != no ; then - AC_DEFINE_UNQUOTED(_PGPPATH, "$PGPPATH") - fi + AC_ARG_ENABLE(pgp, [ --disable-pgp Disable PGP support], + [ if test x$enableval = xno ; then + HAVE_PGP=no + fi + ]) - if test $PGP != no || test $PGPK != no || test $GPG != no ; then + if test x$HAVE_PGP != xno ; then + AC_DEFINE(HAVE_PGP) PGPAUX_TARGET=pgpring AM_CONDITIONAL(NEEDS_PGPEWRAP, true) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o" diff --git a/copy.c b/copy.c index 83dd543b..775ec004 100644 --- a/copy.c +++ b/copy.c @@ -24,7 +24,7 @@ #include "parse.h" #include "mime.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -510,14 +510,14 @@ _mutt_copy_message (FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body, if (flags & M_CM_CHARCONV) s.flags |= M_CHARCONV; -#ifdef _PGPPATH +#ifdef HAVE_PGP if (flags & M_CM_VERIFY) s.flags |= M_VERIFY; #endif mutt_body_handler (body, &s); } -#ifdef _PGPPATH +#ifdef HAVE_PGP else if ((flags & M_CM_DECODE_PGP) && (hdr->pgp & PGPENCRYPT) && hdr->content->type == TYPEMULTIPART) { diff --git a/copy.h b/copy.h index a9e2af5b..45038f52 100644 --- a/copy.h +++ b/copy.h @@ -26,7 +26,7 @@ #define M_CM_CHARCONV (1<<6) /* perform character set conversions */ -#ifdef _PGPPATH +#ifdef HAVE_PGP #define M_CM_DECODE_PGP (1<<7) /* used for decoding PGP messages */ #define M_CM_VERIFY (1<<8) /* do signature verification */ #endif diff --git a/curs_main.c b/curs_main.c index f8e2b537..e2fea866 100644 --- a/curs_main.c +++ b/curs_main.c @@ -31,7 +31,7 @@ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -1108,24 +1108,24 @@ int mutt_index_menu (void) case OP_SAVE: case OP_DECODE_COPY: case OP_DECODE_SAVE: -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_DECRYPT_COPY: case OP_DECRYPT_SAVE: #endif CHECK_MSGCOUNT; if (mutt_save_message (tag ? NULL : CURHDR, -#ifdef _PGPPATH +#ifdef HAVE_PGP (op == OP_DECRYPT_SAVE) || #endif (op == OP_SAVE) || (op == OP_DECODE_SAVE), (op == OP_DECODE_SAVE) || (op == OP_DECODE_COPY), -#ifdef _PGPPATH +#ifdef HAVE_PGP (op == OP_DECRYPT_SAVE) || (op == OP_DECRYPT_COPY) || #endif 0, &menu->redraw) == 0 && (op == OP_SAVE || op == OP_DECODE_SAVE -#ifdef _PGPPATH +#ifdef HAVE_PGP || op == OP_DECRYPT_SAVE #endif )) @@ -1576,12 +1576,12 @@ int mutt_index_menu (void) -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_FORGET_PASSPHRASE: mutt_forget_passphrase (); break; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -1614,7 +1614,7 @@ int mutt_index_menu (void) -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_MAIL_KEY: CHECK_ATTACH; @@ -1629,7 +1629,7 @@ int mutt_index_menu (void) menu->redraw = REDRAW_FULL; break; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/functions.h b/functions.h index df62df78..7384930c 100644 --- a/functions.h +++ b/functions.h @@ -132,7 +132,7 @@ struct binding_t OpMain[] = { { "parent-message", OP_MAIN_PARENT_MESSAGE, "P" }, -#ifdef _PGPPATH +#ifdef HAVE_PGP { "extract-keys", OP_EXTRACT_KEYS, "\013" }, { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, { "mail-key", OP_MAIL_KEY, "\033k" }, @@ -219,7 +219,7 @@ struct binding_t OpPager[] = { -#ifdef _PGPPATH +#ifdef HAVE_PGP { "extract-keys", OP_EXTRACT_KEYS, "\013" }, { "forget-passphrase",OP_FORGET_PASSPHRASE, "\006" }, { "mail-key", OP_MAIL_KEY, "\033k" }, @@ -253,7 +253,7 @@ struct binding_t OpAttach[] = { -#ifdef _PGPPATH +#ifdef HAVE_PGP { "extract-keys", OP_EXTRACT_KEYS, "\013" }, #endif @@ -300,7 +300,7 @@ struct binding_t OpCompose[] = { { "send-message", OP_COMPOSE_SEND_MESSAGE, "y" }, { "pipe-entry", OP_PIPE, "|" }, -#ifdef _PGPPATH +#ifdef HAVE_PGP { "attach-key", OP_COMPOSE_ATTACH_KEY, "\033k" }, { "forget-passphrase",OP_FORGET_PASSPHRASE, "\006" }, { "pgp-menu", OP_COMPOSE_PGP_MENU, "p" }, @@ -370,13 +370,13 @@ struct binding_t OpEditor[] = { -#ifdef _PGPPATH +#ifdef HAVE_PGP struct binding_t OpPgp[] = { { "verify-key", OP_VERIFY_KEY, "c" }, { "view-name", OP_VIEW_ID, "%" }, { NULL, 0, NULL } }; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER diff --git a/globals.h b/globals.h index 4366f11c..81308c40 100644 --- a/globals.h +++ b/globals.h @@ -166,7 +166,7 @@ extern const char *Months[]; #include "mutt_regex.h" #include "buffy.h" #include "sort.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif #endif /* MAIN_C */ diff --git a/handler.c b/handler.c index 345020c6..91cc23d9 100644 --- a/handler.c +++ b/handler.c @@ -33,7 +33,7 @@ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -1011,7 +1011,7 @@ int mutt_can_decode (BODY *a) -#ifdef _PGPPATH +#ifdef HAVE_PGP if (mutt_strcasecmp (a->subtype, "signed") == 0 || mutt_strcasecmp (a->subtype, "encrypted") == 0) return (1); @@ -1033,7 +1033,7 @@ int mutt_can_decode (BODY *a) -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (a->type == TYPEAPPLICATION) { if (mutt_is_application_pgp(a)) @@ -1372,9 +1372,9 @@ void mutt_body_handler (BODY *b, STATE *s) -#ifdef _PGPPATH +#ifdef HAVE_PGP char *p; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -1383,7 +1383,7 @@ void mutt_body_handler (BODY *b, STATE *s) -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (mutt_strcasecmp ("signed", b->subtype) == 0) { p = mutt_get_parameter ("protocol", b->parameter); @@ -1406,7 +1406,7 @@ void mutt_body_handler (BODY *b, STATE *s) else if (mutt_strcasecmp ("application/pgp-encrypted", p) == 0) handler = pgp_encrypted_handler; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -1416,13 +1416,13 @@ void mutt_body_handler (BODY *b, STATE *s) -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (b->type == TYPEAPPLICATION) { if (mutt_is_application_pgp(b)) handler = pgp_application_pgp_handler; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/hdrline.c b/hdrline.c index 16eee14f..7e4213b4 100644 --- a/hdrline.c +++ b/hdrline.c @@ -21,7 +21,7 @@ #include "sort.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -613,7 +613,7 @@ hdr_format_str (char *dest, ch = ' '; -#ifdef _PGPPATH +#ifdef HAVE_PGP if (hdr->pgp & PGPGOODSIGN) ch = 'S'; else if (hdr->pgp & PGPENCRYPT) diff --git a/headers.c b/headers.c index 524f7315..5e50922c 100644 --- a/headers.c +++ b/headers.c @@ -18,7 +18,7 @@ #include "mutt.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -169,7 +169,7 @@ void mutt_edit_headers (const char *editor, -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (mutt_strncasecmp ("pgp:", cur->data, 4) == 0) { msg->pgp = mutt_parse_pgp_hdr (cur->data + 4, 0); diff --git a/hook.c b/hook.c index 2710576f..e9be2850 100644 --- a/hook.c +++ b/hook.c @@ -85,9 +85,9 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) pattern.data = safe_strdup (path); } else if (DefaultHook && !(data & M_CHARSETHOOK) -#ifdef _PGPPATH +#ifdef HAVE_PGP && !(data & M_PGPHOOK) -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ ) { char tmp[HUGE_STRING]; @@ -156,7 +156,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) if ((rc = REGCOMP (rx, pattern.data, ((data & (M_PGPHOOK|M_CHARSETHOOK)) ? REG_ICASE : 0))) != 0) #else if ((rc = REGCOMP (rx, pattern.data, (data & M_CHARSETHOOK) ? REG_ICASE : 0)) != 0) -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ { regerror (rc, rx, err->data, err->dsize); regfree (rx); @@ -348,9 +348,9 @@ char *mutt_charset_hook (const char *chs) return _mutt_string_hook (chs, M_CHARSETHOOK); } -#ifdef _PGPPATH +#ifdef HAVE_PGP char *mutt_pgp_hook (ADDRESS *adr) { return _mutt_string_hook (adr->mailbox, M_PGPHOOK); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/imap/message.c b/imap/message.c index ea6cc23e..9ab29f48 100644 --- a/imap/message.c +++ b/imap/message.c @@ -27,7 +27,7 @@ #include "message.h" #include "mx.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -387,9 +387,9 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno) ctx->hdrs[msgno]->content->offset; /* This needs to be done in case this is a multipart message */ -#ifdef _PGPPATH +#ifdef HAVE_PGP ctx->hdrs[msgno]->pgp = pgp_query (ctx->hdrs[msgno]->content); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ mutt_clear_error(); rewind (msg->fp); diff --git a/init.c b/init.c index 33d59cbd..8cfc5bc8 100644 --- a/init.c +++ b/init.c @@ -24,7 +24,7 @@ #include "keymap.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -1129,7 +1129,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) case DT_SORT_BROWSER: map = SortBrowserMethods; break; -#ifdef _PGPPATH +#ifdef HAVE_PGP case DT_SORT_KEYS: map = SortKeyMethods; break; @@ -1535,7 +1535,7 @@ int mutt_var_value_complete (char *buffer, size_t len, int pos) case DT_SORT_BROWSER: map = SortBrowserMethods; break; -#ifdef _PGPPATH +#ifdef HAVE_PGP case DT_SORT_KEYS: map = SortKeyMethods; break; diff --git a/init.h b/init.h index 8238d541..d9770adf 100644 --- a/init.h +++ b/init.h @@ -85,8 +85,8 @@ struct option_t # ifndef MIXMASTER # define MIXMASTER "mixmaster" # endif -# ifndef _PGPPATH -# define _PGPPATH +# ifndef HAVE_PGP +# define HAVE_PGP # endif # ifndef USE_POP # define USE_POP @@ -442,7 +442,7 @@ struct option_t MuttVars[] = { ** This variable controls whether or not attachments on outgoing messages ** are saved along with the main body of your message. */ -#ifdef _PGPPATH +#ifdef HAVE_PGP { "fcc_clear", DT_BOOL, R_NONE, OPTFCCCLEAR, 0 }, /* ** .pp @@ -1041,7 +1041,7 @@ struct option_t MuttVars[] = { */ -#ifdef _PGPPATH +#ifdef HAVE_PGP { "pgp_autosign", DT_BOOL, R_NONE, OPTPGPAUTOSIGN, 0 }, /* @@ -1313,7 +1313,7 @@ struct option_t MuttVars[] = { { "forw_decrypt", DT_SYN, R_NONE, UL "forward_decrypt", 0 }, /* */ -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef USE_SSL { "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, 0 }, @@ -2095,7 +2095,7 @@ const struct mapping_t SortAliasMethods[] = { { NULL } }; -#ifdef _PGPPATH +#ifdef HAVE_PGP const struct mapping_t SortKeyMethods[] = { { "address", SORT_ADDRESS }, { "date", SORT_DATE }, @@ -2103,7 +2103,7 @@ const struct mapping_t SortKeyMethods[] = { { "trust", SORT_TRUST }, { NULL } }; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ /* functions used to parse commands in a rc file */ @@ -2150,9 +2150,9 @@ struct command_t Commands[] = { { "mbox-hook", mutt_parse_hook, M_MBOXHOOK }, { "mono", mutt_parse_mono, 0 }, { "my_hdr", parse_my_hdr, 0 }, -#ifdef _PGPPATH +#ifdef HAVE_PGP { "pgp-hook", mutt_parse_hook, M_PGPHOOK }, -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ { "push", mutt_parse_push, 0 }, { "reset", parse_set, M_SET_RESET }, { "save-hook", mutt_parse_hook, M_SAVEHOOK }, diff --git a/keymap.c b/keymap.c index 96ff7873..397e5fc6 100644 --- a/keymap.c +++ b/keymap.c @@ -39,7 +39,7 @@ struct mapping_t Menus[] = { { "postpone", MENU_POST }, -#ifdef _PGPPATH +#ifdef HAVE_PGP { "pgp", MENU_PGP }, #endif @@ -529,7 +529,7 @@ void km_init (void) -#ifdef _PGPPATH +#ifdef HAVE_PGP create_bindings (OpPgp, MENU_PGP); #endif @@ -739,7 +739,7 @@ struct binding_t *km_get_table (int menu) -#ifdef _PGPPATH +#ifdef HAVE_PGP case MENU_PGP: return OpPgp; #endif diff --git a/keymap.h b/keymap.h index 34c1b5d7..7ec89973 100644 --- a/keymap.h +++ b/keymap.h @@ -61,7 +61,7 @@ enum MENU_QUERY, -#ifdef _PGPPATH +#ifdef HAVE_PGP MENU_PGP, #endif @@ -101,9 +101,9 @@ extern struct binding_t OpBrowser[]; extern struct binding_t OpEditor[]; extern struct binding_t OpQuery[]; -#ifdef _PGPPATH +#ifdef HAVE_PGP extern struct binding_t OpPgp[]; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER extern struct binding_t OpMix[]; diff --git a/main.c b/main.c index 1a9b03d5..cf1f97bf 100644 --- a/main.c +++ b/main.c @@ -72,7 +72,7 @@ fixes, and suggestions.\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\ "); -#ifdef _PGPPATH +#ifdef HAVE_PGP const char* ShaCopyright = N_("\n\ SHA1 implementation Copyright (C) 1995-1997 Eric A. Young \n\ @@ -237,22 +237,12 @@ static void show_version (void) "-HAVE_COLOR " #endif -#ifdef _PGPPATH - -#ifdef HAVE_PGP5 - "+HAVE_PGP5 " -#endif -#ifdef HAVE_PGP2 - "+HAVE_PGP2 " -#endif -#ifdef HAVE_GPG - "+HAVE_GPG " -#endif - "\n" +#ifdef HAVE_PGP + "+HAVE_PGP " +#else + "-HAVE_PGP " #endif - - #ifdef BUFFY_SIZE "+BUFFY_SIZE " #else @@ -285,22 +275,6 @@ static void show_version (void) puts ("-ISPELL"); #endif - - -#ifdef _PGPPATH - printf ("_PGPPATH=\"%s\"\n", _PGPPATH); -# ifdef _PGPV2PATH - printf ("_PGPV2PATH=\"%s\"\n", _PGPV2PATH); -# endif -# ifdef _PGPV3PATH - printf ("_PGPV3PATH=\"%s\"\n", _PGPV3PATH); -# endif -# ifdef _PGPGPGPATH - printf ("_PGPGPGPATH=\"%s\"\n", _PGPGPGPATH); -# endif -#endif - - puts(_(ReachingUs)); exit (0); @@ -492,7 +466,7 @@ int main (int argc, char **argv) default: printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate); puts (_(Copyright)); -#ifdef _PGPPATH +#ifdef HAVE_PGP puts(_(ShaCopyright)); #endif puts (_(ReachingUs)); diff --git a/mutt.h b/mutt.h index abf1ccf4..c04a7452 100644 --- a/mutt.h +++ b/mutt.h @@ -123,7 +123,7 @@ typedef enum #define M_FCCHOOK (1<<3) #define M_SAVEHOOK (1<<4) #define M_CHARSETHOOK (1<<5) -#ifdef _PGPPATH +#ifdef HAVE_PGP #define M_PGPHOOK (1<<6) #endif @@ -194,7 +194,7 @@ enum M_PERSONAL_RECIP, M_PERSONAL_FROM, M_ADDRESS, -#ifdef _PGPPATH +#ifdef HAVE_PGP M_PGP_SIGN, M_PGP_ENCRYPT, M_PGP_KEY, @@ -230,7 +230,7 @@ enum enum { -#ifdef _PGPPATH +#ifdef HAVE_PGP OPT_VERIFYSIG, /* verify PGP signatures */ OPT_PGPTRADITIONAL, /* create old-style PGP messages */ #endif @@ -351,7 +351,7 @@ enum /* PGP options */ -#ifdef _PGPPATH +#ifdef HAVE_PGP OPTPGPAUTOSIGN, OPTPGPAUTOENCRYPT, OPTPGPLONGIDS, @@ -391,7 +391,7 @@ enum * external program. */ -#ifdef _PGPPATH +#ifdef HAVE_PGP OPTPGPCHECKTRUST, /* (pseudo) used by pgp_select_key () */ OPTDONTHANDLEPGPKEYS, /* (pseudo) used to extract PGP keys */ #endif @@ -528,7 +528,7 @@ typedef struct body unsigned int deleted : 1; /* attachment marked for deletion */ unsigned int noconv : 1; /* don't do character set conversion */ -#ifdef _PGPPATH +#ifdef HAVE_PGP unsigned int goodsig : 1; /* good PGP signature */ #endif @@ -536,7 +536,7 @@ typedef struct body typedef struct header { -#ifdef _PGPPATH +#ifdef HAVE_PGP unsigned int pgp : 4; #endif @@ -689,7 +689,7 @@ typedef struct -#ifdef _PGPPATH +#ifdef HAVE_PGP #define M_VERIFY (1<<1) /* perform signature verification */ #endif diff --git a/muttlib.c b/muttlib.c index 2bc5b132..a1186283 100644 --- a/muttlib.c +++ b/muttlib.c @@ -23,7 +23,7 @@ #include "mailbox.h" #include "mx.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -433,12 +433,12 @@ int mutt_needs_mailcap (BODY *m) -#ifdef _PGPPATH +#ifdef HAVE_PGP case TYPEAPPLICATION: if(mutt_is_application_pgp(m)) return 0; break; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ case TYPEMULTIPART: @@ -463,13 +463,13 @@ int mutt_is_text_type (int t, char *s) -#ifdef _PGPPATH +#ifdef HAVE_PGP if (t == TYPEAPPLICATION) { if (!mutt_strcasecmp ("pgp-keys", s)) return 1; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/mx.c b/mx.c index d8b7bc0b..e562b1c5 100644 --- a/mx.c +++ b/mx.c @@ -26,7 +26,7 @@ #include "keymap.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -1412,10 +1412,10 @@ void mx_update_context (CONTEXT *ctx) -#ifdef _PGPPATH +#ifdef HAVE_PGP /* NOTE: this _must_ be done before the check for mailcap! */ h->pgp = pgp_query (h->content); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ if (!ctx->pattern) { diff --git a/pager.c b/pager.c index 25980b19..217c4f8f 100644 --- a/pager.c +++ b/pager.c @@ -28,7 +28,7 @@ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -2324,7 +2324,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) redraw = REDRAW_FULL; break; -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_DECRYPT_SAVE: #endif case OP_SAVE: @@ -2337,22 +2337,22 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) case OP_COPY_MESSAGE: case OP_DECODE_SAVE: case OP_DECODE_COPY: -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_DECRYPT_COPY: #endif CHECK_MODE(IsHeader (extra)); if (mutt_save_message (extra->hdr, -#ifdef _PGPPATH +#ifdef HAVE_PGP (ch == OP_DECRYPT_SAVE) || #endif (ch == OP_SAVE) || (ch == OP_DECODE_SAVE), (ch == OP_DECODE_SAVE) || (ch == OP_DECODE_COPY), -#ifdef _PGPPATH +#ifdef HAVE_PGP (ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY) || #endif 0, &redraw) == 0 && (ch == OP_SAVE || ch == OP_DECODE_SAVE -#ifdef _PGPPATH +#ifdef HAVE_PGP || ch == OP_DECRYPT_SAVE #endif )) @@ -2451,7 +2451,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_FORGET_PASSPHRASE: mutt_forget_passphrase (); break; @@ -2468,7 +2468,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) pgp_extract_keys_from_messages(extra->hdr); redraw = REDRAW_FULL; break; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/parse.c b/parse.c index cdaa577d..6098d0c2 100644 --- a/parse.c +++ b/parse.c @@ -24,9 +24,9 @@ #include "rfc2231.h" -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -842,9 +842,9 @@ void mutt_parse_mime_message (CONTEXT *ctx, HEADER *cur) mutt_parse_part (msg->fp, cur->content); -#ifdef _PGPPATH +#ifdef HAVE_PGP cur->pgp = pgp_query (cur->content); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ mx_close_message (&msg); diff --git a/pattern.c b/pattern.c index 3de223d3..300d3905 100644 --- a/pattern.c +++ b/pattern.c @@ -31,7 +31,7 @@ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -61,13 +61,13 @@ Flags[] = { 'E', M_EXPIRED, 0, NULL }, { 'f', M_FROM, 0, eat_regexp }, { 'F', M_FLAG, 0, NULL }, -#ifdef _PGPPATH +#ifdef HAVE_PGP { 'g', M_PGP_SIGN, 0, NULL }, { 'G', M_PGP_ENCRYPT, 0, NULL }, #endif { 'h', M_HEADER, M_FULL_MSG, eat_regexp }, { 'i', M_ID, 0, eat_regexp }, -#ifdef _PGPPATH +#ifdef HAVE_PGP { 'k', M_PGP_KEY, 0, NULL }, #endif { 'L', M_ADDRESS, 0, eat_regexp }, @@ -160,7 +160,7 @@ msg_search (CONTEXT *ctx, regex_t *rx, char *buf, size_t blen, int op, int msgno -#ifdef _PGPPATH +#ifdef HAVE_PGP if (h->pgp & PGPENCRYPT && !pgp_valid_passphrase()) { mx_close_message (&msg); @@ -871,7 +871,7 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, return (pat->not ^ match_user (pat->alladdr, h->env->from, NULL)); case M_COLLAPSED: return (pat->not ^ (h->collapsed && h->num_hidden > 1)); -#ifdef _PGPPATH +#ifdef HAVE_PGP case M_PGP_SIGN: return (pat->not ^ (h->pgp & PGPSIGN)); case M_PGP_ENCRYPT: diff --git a/pgp.c b/pgp.c index 5902d677..5aab0689 100644 --- a/pgp.c +++ b/pgp.c @@ -47,7 +47,7 @@ # include #endif -#ifdef _PGPPATH +#ifdef HAVE_PGP char PgpPass[STRING]; @@ -1594,4 +1594,4 @@ int pgp_protect (HEADER *msg, char *pgpkeylist) return (0); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/pgp.h b/pgp.h index 9e5df475..a6ae4a0c 100644 --- a/pgp.h +++ b/pgp.h @@ -17,7 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgplib.h" @@ -114,4 +114,4 @@ pid_t pgp_invoke_traditional (FILE **pgpin, FILE **pgpout, FILE **pgperr, void pgp_invoke_import (const char *fname); void pgp_invoke_getkeys (ADDRESS *); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/pgpkey.c b/pgpkey.c index c9b28df5..2046efab 100644 --- a/pgpkey.c +++ b/pgpkey.c @@ -37,7 +37,7 @@ #include -#ifdef _PGPPATH +#ifdef HAVE_PGP struct pgp_cache { @@ -940,4 +940,4 @@ pgp_key_t *pgp_getkeybystr (char *p, short abilities, pgp_ring_t keyring) -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/pgplib.h b/pgplib.h index 8af73ab6..5f041401 100644 --- a/pgplib.h +++ b/pgplib.h @@ -17,7 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef _PGPPATH +#ifdef HAVE_PGP #define PGPENCRYPT (1 << 0) #define PGPSIGN (1 << 1) @@ -95,4 +95,4 @@ void pgp_free_key (pgp_key_t **kpp); #define pgp_new_keyinfo() safe_calloc (sizeof (pgp_key_t), 1) -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/postpone.c b/postpone.c index 9df7dc37..848eda81 100644 --- a/postpone.c +++ b/postpone.c @@ -43,9 +43,9 @@ static struct mapping_t PostponeHelp[] = { -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ static short PostCount = 0; @@ -358,7 +358,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (mutt_strncmp ("Pgp:", tmp->data, 4) == 0 /* this is generated * by old mutt versions */ @@ -376,7 +376,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size mutt_free_list (&tmp); tmp = next; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER else if (mutt_strncmp ("X-Mutt-Mix:", tmp->data, 11) == 0) @@ -413,7 +413,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size -#ifdef _PGPPATH +#ifdef HAVE_PGP int mutt_parse_pgp_hdr (char *p, int set_signas) { @@ -490,7 +490,7 @@ int mutt_parse_pgp_hdr (char *p, int set_signas) return pgp; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr, short weed) @@ -537,7 +537,7 @@ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr, safe_free ((void **) &newhdr->env->message_id); safe_free ((void **) &newhdr->env->mail_followup_to); -#ifdef _PGPPATH +#ifdef HAVE_PGP /* decrypt pgp/mime encoded messages */ if ((hdr->pgp & PGPENCRYPT) && mutt_is_multipart_encrypted (newhdr->content)) diff --git a/protos.h b/protos.h index 94519d71..36c1fdc6 100644 --- a/protos.h +++ b/protos.h @@ -118,9 +118,9 @@ char *mutt_gen_msgid (void); char *mutt_get_name (ADDRESS *); char *mutt_get_parameter (const char *, PARAMETER *); char *mutt_get_send_charset (char *, size_t, BODY *, short); -#ifdef _PGPPATH +#ifdef HAVE_PGP char *mutt_pgp_hook (ADDRESS *); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ char *mutt_make_date (char *, size_t); const char *mutt_fqdn(short); diff --git a/recvattach.c b/recvattach.c index 01f82970..1a278a56 100644 --- a/recvattach.c +++ b/recvattach.c @@ -30,7 +30,7 @@ -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -119,7 +119,7 @@ ATTACHPTR **mutt_gen_attach_list (BODY *m, if (m->type == TYPEMULTIPART && m->parts && (compose || (parent_type == -1 && mutt_strcasecmp ("alternative", m->subtype))) -#ifdef _PGPPATH +#ifdef HAVE_PGP && !mutt_is_multipart_encrypted(m) #endif ) @@ -138,7 +138,7 @@ ATTACHPTR **mutt_gen_attach_list (BODY *m, /* We don't support multipart messages in the compose menu yet */ if (!compose && ((m->type == TYPEMULTIPART -#ifdef _PGPPATH +#ifdef HAVE_PGP && !mutt_is_multipart_encrypted (m) #endif ) @@ -775,7 +775,7 @@ void mutt_view_attachments (HEADER *hdr) -#ifdef _PGPPATH +#ifdef HAVE_PGP int pgp = 0; #endif @@ -800,7 +800,7 @@ void mutt_view_attachments (HEADER *hdr) -#ifdef _PGPPATH +#ifdef HAVE_PGP if((hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase()) { mx_close_message (&msg); @@ -817,7 +817,7 @@ void mutt_view_attachments (HEADER *hdr) pgp = 1; } else -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ { fp = msg->fp; cur = hdr->content; @@ -858,7 +858,7 @@ void mutt_view_attachments (HEADER *hdr) -#ifdef _PGPPATH +#ifdef HAVE_PGP case OP_EXTRACT_KEYS: pgp_extract_keys_from_attachment_list (fp, menu->tagprefix, menu->tagprefix ? cur : idx[menu->current]->content); @@ -893,7 +893,7 @@ void mutt_view_attachments (HEADER *hdr) -#ifdef _PGPPATH +#ifdef HAVE_PGP if (hdr->pgp) { mutt_message _( @@ -1026,13 +1026,13 @@ void mutt_view_attachments (HEADER *hdr) -#ifdef _PGPPATH +#ifdef HAVE_PGP if (pgp) { fclose (fp); mutt_free_body (&cur); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ diff --git a/send.c b/send.c index 4196fec8..1afafdab 100644 --- a/send.c +++ b/send.c @@ -34,7 +34,7 @@ #include #include -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" #endif @@ -335,13 +335,13 @@ static int include_forward (CONTEXT *ctx, HEADER *cur, FILE *out) int chflags = CH_DECODE, cmflags = 0; -#ifdef _PGPPATH +#ifdef HAVE_PGP if ((cur->pgp & PGPENCRYPT) && option (OPTFORWDECODE)) { /* make sure we have the user's passphrase before proceeding... */ pgp_valid_passphrase (); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ mutt_forward_intro (out, cur); @@ -389,7 +389,7 @@ static int include_reply (CONTEXT *ctx, HEADER *cur, FILE *out) int cmflags = M_CM_PREFIX | M_CM_DECODE | M_CM_CHARCONV; int chflags = CH_DECODE; -#ifdef _PGPPATH +#ifdef HAVE_PGP if (cur->pgp) { if (cur->pgp & PGPENCRYPT) @@ -398,7 +398,7 @@ static int include_reply (CONTEXT *ctx, HEADER *cur, FILE *out) pgp_valid_passphrase (); } } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ mutt_make_attribution (ctx, cur, out); @@ -769,7 +769,7 @@ generate_body (FILE *tempfp, /* stream for outgoing message */ -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (flags & SENDKEY) { BODY *tmp; @@ -953,7 +953,7 @@ ci_send_message (int flags, /* send mode */ BODY *pbody; int i, killfrom = 0; -#ifdef _PGPPATH +#ifdef HAVE_PGP BODY *save_content = NULL; BODY *clear_content = NULL; char *pgpkeylist = NULL; @@ -978,13 +978,13 @@ ci_send_message (int flags, /* send mode */ } -#ifdef _PGPPATH +#ifdef HAVE_PGP if (flags & SENDPOSTPONED) { signas = safe_strdup(PgpSignAs); signmic = safe_strdup(PgpSignMicalg); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ if (msg) { @@ -1125,7 +1125,7 @@ ci_send_message (int flags, /* send mode */ -#ifdef _PGPPATH +#ifdef HAVE_PGP if (! (flags & SENDMAILX)) { if (option (OPTPGPAUTOSIGN)) @@ -1139,7 +1139,7 @@ ci_send_message (int flags, /* send mode */ if (option (OPTPGPREPLYSIGNENCRYPTED) && cur && cur->pgp & PGPENCRYPT) msg->pgp |= PGPSIGN; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -1158,7 +1158,7 @@ ci_send_message (int flags, /* send mode */ -#ifdef _PGPPATH +#ifdef HAVE_PGP if (! (flags & SENDKEY) && tempfp) { @@ -1172,7 +1172,7 @@ ci_send_message (int flags, /* send mode */ -#ifdef _PGPPATH +#ifdef HAVE_PGP } @@ -1314,7 +1314,7 @@ main_loop: * in case of error. Ugh. */ -#ifdef _PGPPATH +#ifdef HAVE_PGP if (msg->pgp) { /* save the decrypted attachments */ @@ -1341,7 +1341,7 @@ main_loop: * - something else. In this case, it's the same as clear_content. */ -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ if (!option (OPTNOCURSES) && !(flags & SENDMAILX)) mutt_message _("Sending message..."); @@ -1371,12 +1371,12 @@ main_loop: if (*fcc && mutt_strcmp ("/dev/null", fcc) != 0) { BODY *tmpbody = msg->content; -#ifdef _PGPPATH +#ifdef HAVE_PGP BODY *save_sig = NULL; BODY *save_parts = NULL; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ -#ifdef _PGPPATH +#ifdef HAVE_PGP if (msg->pgp && option (OPTFCCCLEAR)) msg->content = clear_content; #endif @@ -1384,7 +1384,7 @@ main_loop: /* check to see if the user wants copies of all attachments */ if (!option (OPTFCCATTACH) && msg->content->type == TYPEMULTIPART) { -#ifdef _PGPPATH +#ifdef HAVE_PGP if (mutt_strcmp (msg->content->subtype, "encrypted") == 0 || mutt_strcmp (msg->content->subtype, "signed") == 0) { @@ -1414,19 +1414,19 @@ main_loop: } } else -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ msg->content = msg->content->parts; } -#ifdef _PGPPATH +#ifdef HAVE_PGP full_fcc: -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ if (msg->content) mutt_write_fcc (fcc, msg, NULL, 0, NULL); msg->content = tmpbody; -#ifdef _PGPPATH +#ifdef HAVE_PGP if (save_sig) { /* cleanup the second signature structures */ @@ -1444,7 +1444,7 @@ full_fcc: mutt_free_body (&save_content); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ } @@ -1452,7 +1452,7 @@ full_fcc: { if (!(flags & SENDBATCH)) { -#ifdef _PGPPATH +#ifdef HAVE_PGP if ((msg->pgp & PGPENCRYPT) || ((msg->pgp & PGPSIGN) && msg->content->type == TYPEAPPLICATION)) { @@ -1477,14 +1477,14 @@ full_fcc: else if (!option (OPTNOCURSES) && ! (flags & SENDMAILX)) mutt_message (i == 0 ? _("Mail sent.") : _("Sending in background.")); -#ifdef _PGPPATH +#ifdef HAVE_PGP if (msg->pgp & PGPENCRYPT) { /* cleanup structures from the first encryption */ mutt_free_body (&clear_content); FREE (&pgpkeylist); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ if (flags & SENDREPLY) { @@ -1505,7 +1505,7 @@ cleanup: -#ifdef _PGPPATH +#ifdef HAVE_PGP if (flags & SENDPOSTPONED) { @@ -1521,7 +1521,7 @@ cleanup: PgpSignMicalg = signmic; } } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ if (tempfp) fclose (tempfp); diff --git a/sendlib.c b/sendlib.c index e61b9396..b0ffdfff 100644 --- a/sendlib.c +++ b/sendlib.c @@ -104,9 +104,9 @@ sysexits_h[] = }; -#ifdef _PGPPATH +#ifdef HAVE_PGP #include "pgp.h" -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -472,14 +472,14 @@ int mutt_write_mime_body (BODY *a, FILE *f) -#ifdef _PGPPATH +#ifdef HAVE_PGP /* This is pretty gross, but it's the best solution for now... */ if (a->type == TYPEAPPLICATION && mutt_strcmp (a->subtype, "pgp-encrypted") == 0) { fputs ("Version: 1\n", f); return 0; } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ @@ -958,7 +958,7 @@ void mutt_update_encoding (BODY *a) if (a->type == TYPETEXT) mutt_set_body_charset(a, get_text_charset(a, info)); -#ifdef _PGPPATH +#ifdef HAVE_PGP /* save the info in case this message is signed. we will want to do Q-P * encoding if any lines begin with "From " so the signature won't be munged, * for example. @@ -979,15 +979,15 @@ BODY *mutt_make_message_attach (CONTEXT *ctx, HEADER *hdr, int attach_msg) BODY *body; FILE *fp; int cmflags, chflags; -#ifdef _PGPPATH +#ifdef HAVE_PGP int pgp = hdr->pgp; #endif -#ifdef _PGPPATH +#ifdef HAVE_PGP if ((option(OPTMIMEFORWDECODE) || option(OPTFORWDECRYPT)) && (hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase()) return (NULL); -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ mutt_mktemp (buffer); if ((fp = safe_fopen (buffer, "w+")) == NULL) @@ -1011,11 +1011,11 @@ BODY *mutt_make_message_attach (CONTEXT *ctx, HEADER *hdr, int attach_msg) { chflags |= CH_MIME | CH_TXTPLAIN; cmflags = M_CM_DECODE | M_CM_CHARCONV; -#ifdef _PGPPATH +#ifdef HAVE_PGP pgp &= ~PGPENCRYPT; #endif } -#ifdef _PGPPATH +#ifdef HAVE_PGP else if (option (OPTFORWDECRYPT) && (hdr->pgp & PGPENCRYPT)) @@ -1044,9 +1044,9 @@ BODY *mutt_make_message_attach (CONTEXT *ctx, HEADER *hdr, int attach_msg) body->hdr->offset = 0; /* we don't need the user headers here */ body->hdr->env = mutt_read_rfc822_header(fp, body->hdr, 0, 0); -#ifdef _PGPPATH +#ifdef HAVE_PGP body->hdr->pgp = pgp; -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ mutt_update_encoding (body); body->parts = body->hdr->content; @@ -1104,7 +1104,7 @@ BODY *mutt_make_file_attach (const char *path) if (att->type == TYPETEXT) mutt_set_body_charset(att, get_text_charset(att, info)); -#ifdef _PGPPATH +#ifdef HAVE_PGP /* * save the info in case this message is signed. we will want to do Q-P * encoding if any lines begin with "From " so the signature won't be munged, @@ -1986,7 +1986,7 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, -#ifdef _PGPPATH +#ifdef HAVE_PGP /* (postponment) if the mail is to be signed or encrypted, save this info */ if (post && (hdr->pgp & (PGPENCRYPT | PGPSIGN))) { @@ -2003,7 +2003,7 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, } fputc ('\n', msg->fp); } -#endif /* _PGPPATH */ +#endif /* HAVE_PGP */ #ifdef MIXMASTER /* (postponement) if the mail is to be sent through a mixmaster diff --git a/sort.h b/sort.h index ef221913..25a9e566 100644 --- a/sort.h +++ b/sort.h @@ -46,7 +46,7 @@ WHERE short BrowserSort INITVAL (SORT_SUBJECT); WHERE short Sort INITVAL (SORT_DATE); WHERE short SortAux INITVAL (SORT_DATE); /* auxiallary sorting method */ WHERE short SortAlias INITVAL (SORT_ALIAS); -#ifdef _PGPPATH +#ifdef HAVE_PGP WHERE short PgpSortKeys INITVAL (SORT_ADDRESS); #endif