CHECK_COUNT;
idx[menu->current]->content->unlink = !idx[menu->current]->content->unlink;
-#if 0
- /* OPTRESOLVE is otherwise ignored on this menu.
- * Where's the bug?
- */
-
- if (option (OPTRESOLVE) && menu->current + 1 < menu->max)
- menu->current++;
-# endif
menu->redraw = REDRAW_INDEX;
/* No send2hook since this doesn't change the message. */
break;
{
if (headers[x])
{
-#if 0
- if (flags & CH_DECODE)
- rfc2047_decode (&headers[x]);
-#endif
-
/* We couldn't do the prefixing when reading because RFC 2047
* decoding may have concatenated lines.
*/
if (key->disabled)
flags |= KEYFLAG_DISABLED;
-#if 0 /* DISABLED code */
- if (!flags)
- {
- /* Bug in gpg. Capabilities are not listed for secret
- keys. Try to deduce them from the algorithm. */
-
- switch (key->subkeys[0].pubkey_algo)
- {
- case GPGME_PK_RSA:
- flags |= KEYFLAG_CANENCRYPT;
- flags |= KEYFLAG_CANSIGN;
- break;
- case GPGME_PK_ELG_E:
- flags |= KEYFLAG_CANENCRYPT;
- break;
- case GPGME_PK_DSA:
- flags |= KEYFLAG_CANSIGN;
- break;
- }
- }
-#endif /* DISABLED code */
-
for (idx = 0, uid = key->uids; uid; idx++, uid = uid->next)
{
k = safe_calloc (1, sizeof *k);
int r;
int key_selected;
-#if 0
- *r_application = APPLICATION_PGP|APPLICATION_SMIME;
-#endif
-
for (p = adrlist; p ; p = p->next)
{
key_selected = 0;
}
else if (! oppenc_mode)
{
-#if 0
- k_info = crypt_getkeybystr (crypt_hook_val, KEYFLAG_CANENCRYPT,
- *r_application, &forced_valid);
-#else
k_info = crypt_getkeybystr (crypt_hook_val, KEYFLAG_CANENCRYPT,
app, &forced_valid);
-#endif
}
}
else if (r == MUTT_NO)
k_info = crypt_ask_for_key (buf, q->mailbox,
KEYFLAG_CANENCRYPT,
-#if 0
- *r_application,
-#else
app,
-#endif
&forced_valid);
}
keyID = crypt_fpr_or_lkeyid (k_info);
-#if 0
- if (k_info->flags & KEYFLAG_ISX509)
- *r_application &= ~APPLICATION_PGP;
- if (!(k_info->flags & KEYFLAG_ISX509))
- *r_application &= ~APPLICATION_SMIME;
-#endif
-
bypass_selection:
keylist_size += mutt_strlen (keyID) + 4 + 1;
safe_realloc (&keylist, keylist_size);
{
len++;
if (!ascii_strcasecmp ((t+len), "p7m"))
-#if 0
- return SMIMEENCRYPT;
-#else
/* Not sure if this is the correct thing to do, but
it's required for compatibility with Outlook */
return (SMIMESIGN|SMIMEOPAQUE);
-#endif
else if (!ascii_strcasecmp ((t+len), "p7s"))
return (SMIMESIGN|SMIMEOPAQUE);
}
mutt_clear_pager_position ();
menu->menu = MENU_MAIN;
menu->redraw = REDRAW_FULL;
-#if 0
- set_option (OPTWEED); /* turn header weeding back on. */
-#endif
}
if (done) break;
mutt_str_replace(&Spoolfile, VirtIncoming->path);
#endif
-#if 0
- set_option (OPTWEED); /* turn weeding on by default */
-#endif
-
FREE (&err.data);
}
puts (_("Error initializing terminal."));
exit (1);
}
-#if 1 /* USE_SLANG_CURSES - commenting out suggested in #455. */
/* slang requires the signal handlers to be set after initializing */
mutt_signal_init ();
-#endif
ci_start_color ();
keypad (stdscr, true);
cbreak ();
return mhs->flags[i];
}
-#if 0
-
-/* unused */
-
-static short mhs_unset (struct mh_sequences *mhs, int i, short f)
-{
- mhs_alloc (mhs, i);
- mhs->flags[i] &= ~f;
- return mhs->flags[i];
-}
-
-#endif
-
static int mh_read_token (char *t, int *first, int *last)
{
char *p;
OPTPGPCHECKEXIT,
OPTPGPLONGIDS,
OPTPGPAUTODEC,
-#if 0
- OPTPGPENCRYPTSELF,
-#endif
OPTPGPRETAINABLESIG,
OPTPGPSTRICTENC,
OPTFORWDECRYPT,
/* hold onto this for the life of mutt, in case we want to reconnect.
* The purist in me wants a mutt_exit hook. */
-#if 0
- X509_free (data->cert);
-#endif
SSL_free (data->ssl);
SSL_CTX_free (data->ctx);
FREE (&conn->sockdata);
}
}
*wptr = 0;
-
-#if 0
- if (flags & MUTT_FORMAT_MAKEPRINT)
- {
- /* Make sure that the string is printable by changing all non-printable
- chars to dots, or spaces for non-printable whitespace */
- for (cp = dest ; *cp ; cp++)
- if (!IsPrint (*cp) &&
- !((flags & MUTT_FORMAT_TREE) && (*cp <= MUTT_TREE_MAX)))
- *cp = isspace ((unsigned char) *cp) ? ' ' : '.';
- }
-#endif
}
/* This function allows the user to specify a command to read stdout from in
}
else if (mutt_strncmp ("\033[0m", raw, 4) == 0) /* a little hack... */
lineInfo[n].type = MT_COLOR_NORMAL;
-#if 0
- else if (mutt_strncmp ("[-- ", buf, 4) == 0)
- lineInfo[n].type = MT_COLOR_ATTACHMENT;
-#else
else if (check_attachment_marker ((char *) raw) == 0)
lineInfo[n].type = MT_COLOR_ATTACHMENT;
-#endif
else if (mutt_strcmp ("-- \n", buf) == 0 || mutt_strcmp ("-- \r\n", buf) == 0)
{
i = n + 1;
return (-1);
}
-#if 0
- /* If there are no RE metacharacters, use simple search anyway */
- if (!pat->stringmatch && !strpbrk (buf.data, "|[{.*+?^$"))
- pat->stringmatch = 1;
-#endif
-
if (pat->stringmatch)
{
pat->p.str = safe_strdup (buf.data);
b->filename = safe_strdup (pgpoutfile);
-#if 0
- /* The following is intended to give a clue to some completely brain-dead
- * "mail environments" which are typically used by large corporations.
- */
-
- b->d_filename = safe_strdup ("msg.pgp");
- b->use_disp = 1;
-
-#endif
-
b->disposition = DISPNONE;
b->unlink = 1;
}
}
-# if 0
- kp = pgp_principal_key (KeyTable[menu->current]->parent);
-# else
kp = KeyTable[menu->current]->parent;
-# endif
done = 1;
break;
}
}
-
-
-/* unused */
-
-#if 0
-
-static const char *hashalgbytype (unsigned char type)
-{
- switch (type)
- {
- case 1:
- return "MD5";
- case 2:
- return "SHA1";
- case 3:
- return "RIPE-MD/160";
- case 4:
- return "HAVAL";
- default:
- return "unknown";
- }
-}
-
-#endif
-
short pgp_canencrypt (unsigned char type)
{
switch (type)
}
}
-#if 0
-/*
- * The mutt_gettext () defined in gettext.c requires iconv,
- * so we do without charset conversion here.
- */
-static char *mutt_gettext (const char *message)
-{
- return (char *)message;
-}
-#endif
int recv)
{
ATTACHPTR **idx = *idxp;
-#if 0
- int old_optweed = option (OPTWEED);
- set_option (OPTWEED);
-#endif
do
{
}
while (op != OP_NULL);
-#if 0
- if (option (OPTWEED) != old_optweed)
- toggle_option (OPTWEED);
-#endif
return op;
}
* the use of alloca. So let's disable it for AIX.
*/
-#if 0
-
-/* AIX requires this to be the first thing in the file. */
-# if defined (_AIX) && !defined (REGEX_MALLOC)
-# pragma alloca
-# endif
-
-#endif
-
#undef _GNU_SOURCE
#define _GNU_SOURCE
#if HAVE_ALLOCA_H
#include <alloca.h>
#else /* not __GNUC__ or HAVE_ALLOCA_H */
-#if 0 /* It is a bad idea to declare alloca. We always cast the result. */
-#ifndef _AIX /* Already did AIX, up at the top. */
-char *alloca ();
-#endif /* not _AIX */
-#endif
#endif /* not HAVE_ALLOCA_H */
#endif /* not __GNUC__ */
: (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
== Sword)
-/* Disabled due to a compiler bug -- see comment at case wordbound */
-#if 0
-/* Test if the character before D and the one at D differ with respect
- to being word-constituent. */
-#define AT_WORD_BOUNDARY(d) \
- (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
- || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
-#endif
-
/* Free everything we malloc. */
#ifdef MATCH_MAY_ALLOCATE
#define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
= *p2 == (unsigned char) endline ? '\n' : p2[2];
#endif
-#if 0
- if ((re_opcode_t) p1[3] == exactn
- && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
- && (p2[2 + p1[5] / BYTEWIDTH]
- & (1 << (p1[5] % BYTEWIDTH)))))
-#else
if ((re_opcode_t) p1[3] == exactn
&& ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
&& (p2[2 + p1[4] / BYTEWIDTH]
& (1 << (p1[4] % BYTEWIDTH)))))
-#endif
{
p[-3] = (unsigned char) pop_failure_jump;
DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
break;
}
-#if 0
- /* The DEC Alpha C compiler 3.x generates incorrect code for the
- test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
- AT_WORD_BOUNDARY, so this code is disabled. Expanding the
- macro and introducing temporary variables works around the bug. */
-
- case wordbound:
- DEBUG_PRINT1 ("EXECUTING wordbound.\n");
- if (AT_WORD_BOUNDARY (d))
- break;
- goto fail;
-
- case notwordbound:
- DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
- if (AT_WORD_BOUNDARY (d))
- goto fail;
- break;
-#else
case wordbound:
{
boolean prevchar, thischar;
goto fail;
break;
}
-#endif
case wordbeg:
DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
{
ADDRESS *list;
char buf[256];
-# if 0
- char *str = "michael, Michael Elkins <me@mutt.org>, testing a really complex address: this example <@contains.a.source.route,@with.multiple.hosts:address@example.com>;, lothar@of.the.hillpeople (lothar)";
-# else
char *str = "a b c ";
-# endif
list = rfc822_parse_adrlist (NULL, str);
buf[0] = 0;
else if (b->type == TYPEAPPLICATION && ascii_strcasecmp (b->subtype, "pgp-keys") == 0)
b->encoding = ENC7BIT;
else
-#if 0
- if (info->lobin || info->hibin || info->binary || info->linemax > 990
- || info->cr || (/* option (OPTENCODEFROM) && */ info->from))
-#endif
{
/* Determine which encoding is smaller */
if (1.33 * (float)(info->lobin+info->hibin+info->ascii) <
else
b->encoding = ENCQUOTEDPRINTABLE;
}
-#if 0
- else
- b->encoding = ENC7BIT;
-#endif
}
void mutt_stamp_attachment(BODY *a)
* suffix.
*/
-#if 0
-
- if ((n = mutt_lookup_mime_type (buf, sizeof (buf), xbuf, sizeof (xbuf), path)) != TYPEOTHER
- || *xbuf != '\0')
- {
- att->type = n;
- att->subtype = safe_strdup (buf);
- att->xtype = safe_strdup (xbuf);
- }
-
-#else
-
mutt_lookup_mime_type (att, path);
-#endif
-
if ((info = mutt_get_content_info (path, att)) == NULL)
{
mutt_free_body (&att);
unsigned char finalcount[8];
unsigned char c;
-#if 0 /* untested "improvement" by DHR */
- /* Convert context->count to a sequence of bytes
- * in finalcount. Second element first, but
- * big-endian order within element.
- * But we do it all backwards.
- */
- unsigned char *fcp = &finalcount[8];
-
- for (i = 0; i < 2; i++)
- {
- uint32_t t = context->count[i];
- int j;
-
- for (j = 0; j < 4; t >>= 8, j++)
- *--fcp = (unsigned char) t
- }
-#else
for (i = 0; i < 8; i++) {
finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
>> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
}
-#endif
+
c = 0200;
SHA1Update(context, &c, 1);
while ((context->count[0] & 504) != 448) {
register const char *s = s1;
register const char *p = s2;
-#if 1
do {
if (!*p) {
return (char *) s1;;
s = ++s1;
}
} while (1);
-#else
- while (*p && *s) {
- if ((*p == *s)
- || (tolower(*((unsigned char *)p)) == tolower(*((unsigned char *)s)))
- ) {
- ++p;
- ++s;
- } else {
- p = s2;
- s = ++s1;
- }
- }
-
- return (*p) ? NULL : (char *) s1;
-#endif
}
#endif /* !HAVE_WC_FUNCS */
-#if 0 /* original */
-int wcswidth(const wchar_t *pwcs, size_t n)
-{
- int w, width = 0;
-
- for (;*pwcs && n-- > 0; pwcs++)
- if ((w = wcwidth(*pwcs)) < 0)
- return -1;
- else
- width += w;
-
- return width;
-}
-#endif