]> granicus.if.org Git - mutt/commitdiff
PGP-cleanup patch from Roland Rosenfeld. Thanks!
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 10 Feb 2000 19:46:06 +0000 (19:46 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 10 Feb 2000 19:46:06 +0000 (19:46 +0000)
37 files changed:
Makefile.am
acconfig.h
attach.c
commands.c
compose.c
configure.in
copy.c
copy.h
curs_main.c
functions.h
globals.h
handler.c
hdrline.c
headers.c
hook.c
imap/message.c
init.c
init.h
keymap.c
keymap.h
main.c
mutt.h
muttlib.c
mx.c
pager.c
parse.c
pattern.c
pgp.c
pgp.h
pgpkey.c
pgplib.h
postpone.c
protos.h
recvattach.c
send.c
sendlib.c
sort.h

index b2789f1cc68edd2adb530fa28e56692b27958364..f4ef76f77eec7fa800a363c57c6b8320719d9171 100644 (file)
@@ -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 */" \
index 0b19d122d0e198aa16af3b0455ebb551f25f4c3d..963f0880c368a4cf8eb8c60a04cb091e64b7e2c0 100644 (file)
@@ -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
 
 /* 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
index 2e095729e28e2efc7b38c4ba47a81f88e8d76151..fff84944c9f36d8e9a5a804e2dd2e6e64a65e5bc 100644 (file)
--- 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);
index 481ae2ce5ce10b6f3ac09265429fbdc779161926..86eb51913e6e379f48f067918443effcac5d6f20 100644 (file)
@@ -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 */
 
 }
index 73fe63383d45ea366dcc00ca2e82cbacfd375a37..bfe150272afc141747ddeb1c74d6833e7733daee 100644 (file)
--- 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
index 97a62b75334fe9b8cdb6c0c8e1d0c11a91f14d9c..eef1e1dd7f844f5a12e72023198ae1bb1a3a5fe4 100644 (file)
@@ -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 83dd543b0a9f04b4399d2c7c0421e1ac3cd52a40..775ec0046ac0c71ec3debbf1398586e4ca34c1d5 100644 (file)
--- 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 a9e2af5b3a5962e589e783eb883e7785168d7b15..45038f5249b69d803f226ce680cb782b5fcf3187 100644 (file)
--- 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
index f8e2b5371c2a2a34073fe4e484af23bd37774a9d..e2fea86612d3cee493466b0d86886624bd237e0d 100644 (file)
@@ -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 */
 
 
 
index df62df785c98d2656fbffb47e765b12a0fc519f9..7384930ce5af4e6dbb2ab44e43f66fc78e5c96b8 100644 (file)
@@ -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
index 4366f11cf43d7dd47a3e092c04a0191dda231e3e..81308c4090bf3dc75171779eda4eefbe71d75afe 100644 (file)
--- 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 */
index 345020c6323ea0a8024f4f286a92364d033d1d6d..91cc23d9db2df7a9797c80e3092f8409dbf28993 100644 (file)
--- 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 */
 
 
 
index 16eee14f2f92ed4c7180ceefde4d1beaa9a058c3..7e4213b49f9cfb41e1c5e183bfcd69f66e66aca1 100644 (file)
--- 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)
index 524f7315a7ccb2bbd23cd8bc7d8a598dc5c1a9fb..5e50922c18fa84784e39493baf9e4736501d6885 100644 (file)
--- 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 2710576fe2e5cfb0499b0a06b92e586c04c0ed92..e9be28507dd557a4d3f0adb58a95ec0a9b4577ea 100644 (file)
--- 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 */
index ea6cc23e2f6a70999e77547b5cc9c24a70d3410c..9ab29f48e762dd49929ded55f9230e41c15c3310 100644 (file)
@@ -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 33d59cbd75d64c7fb897ac252e241c5ad60795d5..8cfc5bc88c4220a298358dc70a552a089b54fcaf 100644 (file)
--- 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 8238d54130ced8b1f015b4680db5c9ff4ce722cd..d9770adfe3369b3fdb532828f79538000feb6c84 100644 (file)
--- 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 },
index 96ff7873281843ea788b0c653a5677112830a849..397e5fc6bccea3dafca9c383124d0082b7f4f222 100644 (file)
--- 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
index 34c1b5d7931a327b45f1b806ccd0ffb7204bfec0..7ec899730ca5b60e82ce4cffd7484d1183c39602 100644 (file)
--- 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 1a9b03d5825ad6ed0c1e1773f2ae101925df6de5..cf1f97bf3d8ba45e75a584147fa8e0db85716768 100644 (file)
--- 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 <eay@cryptsoft.com>\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 abf1ccf465c0d25aa42da9244c8da0fdae1c46da..c04a7452b1b710de60dc881766a403bbcef704c8 100644 (file)
--- 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
 
index 2bc5b132094b9ee64317db1a00165c8e97eb2c5c..a1186283506e6ae72981a8aa25e107de03987c41 100644 (file)
--- 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 d8b7bc0b7fa42ec691749cb513916eb2d6f72d51..e562b1c5f9a04d26cd5c7a0b920f3c79f6c80eee 100644 (file)
--- 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 25980b192da6c236c4d6df8b5f1ee9443accb57b..217c4f8f5c4fef1e94aef0fb6eb00b9e485e73cb 100644 (file)
--- 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 cdaa577d93bb421092e310cd004ee53c682ffa40..6098d0c2df44cf848bc2988652482d8248a1ee81 100644 (file)
--- 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);
index 3de223d347c1c842ba7366d3fe45b4a2c602c165..300d3905e3b01da7b9dcd1c75880d6e68e885cce 100644 (file)
--- 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 5902d6771c2cedf2f4e132377a980ffb1e98e6ac..5aab0689a54fde13d03d80e05dbd74ee912b1f75 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -47,7 +47,7 @@
 # include <sys/resource.h>
 #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 9e5df475b6622e1b78f0e3b7fccc449d89d9bbfd..a6ae4a0c02e323ff58287e06e902c90ac1466b71 100644 (file)
--- 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 */
index c9b28df5ab4f93a86bd4ccd7218b75c69f6cde7c..2046efabd2d7e3e7cc237ce4017e3e7726f98725 100644 (file)
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -37,7 +37,7 @@
 
 #include <locale.h>
 
-#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 */
index 8af73ab668ffa2858d2be9dc758ba8498fa7788e..5f041401d72e2f2ede0160685649fae847c010f4 100644 (file)
--- 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 */
index 9df7dc379c125f8e595a487fed25e2ea00a36c27..848eda81cbcf20033a8af70d186a66a195006950 100644 (file)
@@ -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))
index 94519d71fe714952c58eedc6bf888d1784ad27b3..36c1fdc68143f4f079615a525866ef7d0dea8bf2 100644 (file)
--- 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);
index 01f829705a1fd24754b5d0e163be868544575b5a..1a278a5683e0d444b2e75df1afaa903326ac7c9c 100644 (file)
@@ -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 4196fec8cdedf5b2efe0a43a05dc29725f35bb9f..1afafdab0d6b876774ef00fe679a7dae3eb871d5 100644 (file)
--- a/send.c
+++ b/send.c
@@ -34,7 +34,7 @@
 #include <sys/wait.h>
 #include <dirent.h>
 
-#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);
index e61b93969783727ab3560a4409273e191e2af91f..b0ffdfff9b300a7269e7f46da5d35620d8fccf9f 100644 (file)
--- 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 ef2219137e53bb6377a421738a9072a6f47507cb..25a9e566419639ecaebca5746dd623c0b387ba8b 100644 (file)
--- 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