break;
#endif /* USE_NNTP */
-#if defined USE_IMAP || defined USE_NNTP
+#if defined(USE_IMAP) || defined(USE_NNTP)
case OP_BROWSER_SUBSCRIBE:
case OP_BROWSER_UNSUBSCRIBE:
#endif
COLOR_LIST *p = ColorList;
int i;
-#if defined (USE_SLANG_CURSES)
+#ifdef USE_SLANG_CURSES
char fgc[SHORT_STRING], bgc[SHORT_STRING];
#endif
p->bg = bg;
p->fg = fg;
-#if defined (USE_SLANG_CURSES)
+#ifdef USE_SLANG_CURSES
if (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)
SLtt_set_color (i, NULL, get_color_name (fgc, sizeof (fgc), fg), get_color_name (bgc, sizeof (bgc), bg));
else
#endif
}
-#if defined CRYPT_BACKEND_CLASSIC_PGP || defined CRYPT_BACKEND_CLASSIC_SMIME || defined CRYPT_BACKEND_GPGME
+#if defined(CRYPT_BACKEND_CLASSIC_PGP) || defined(CRYPT_BACKEND_CLASSIC_SMIME) || defined(CRYPT_BACKEND_GPGME)
if (CRYPT_MOD_CALL_CHECK (PGP, init))
(CRYPT_MOD_CALL (PGP, init)) ();
# include <sys/types.h>
-# if HAVE_INTTYPES_H
+# ifdef HAVE_INTTYPES_H
# include <inttypes.h>
# else
-# if HAVE_STDINT_H
+# ifdef HAVE_STDINT_H
# include <stdint.h>
# endif
# endif
BEEP (); /* let the user know that nothing matched */
replace_part (state, 0, buf);
}
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
else if (flags & MUTT_NM_QUERY)
{
my_wcstombs (buf, buflen, state->wbuf, state->curpos);
{
int ret = -1;
-#if defined HAVE_GETADDRINFO || defined HAVE_GETADDRINFO_A
+#if defined(HAVE_GETADDRINFO) || defined(HAVE_GETADDRINFO_A)
char node[STRING];
if (gethostname(node, sizeof(node)))
return ret;
#if defined(USE_IMAP) || defined(USE_POP) || defined(USE_NNTP)
WHERE char *MessageCachedir;
#endif
-#if USE_HCACHE
+#ifdef USE_HCACHE
WHERE char *HeaderCache;
WHERE char *HeaderCacheBackend;
-#if HAVE_GDBM || HAVE_BDB
+#if defined(HAVE_GDBM) || defined(HAVE_BDB)
WHERE char *HeaderCachePageSize;
#endif /* HAVE_GDBM || HAVE_BDB */
#endif /* USE_HCACHE */
#endif
WHERE char *Signature;
WHERE char *SimpleSearch;
-#if USE_SMTP
+#ifdef USE_SMTP
WHERE char *SmtpAuthenticators INITVAL (NULL);
WHERE char *SmtpPass INITVAL (NULL);
WHERE char *SmtpUrl INITVAL (NULL);
#endif /* USE_SMTP */
WHERE char *Spoolfile;
WHERE char *SpamSep;
-#if defined(USE_SSL)
+#ifdef USE_SSL
WHERE char *SslCertFile INITVAL (NULL);
WHERE char *SslClientCert INITVAL (NULL);
WHERE char *SslEntropyFile INITVAL (NULL);
#include "config.h"
-#if !(HAVE_BDB || HAVE_GDBM || HAVE_KC || HAVE_LMDB || HAVE_QDBM || HAVE_TC)
+#if !(defined(HAVE_BDB) || defined(HAVE_GDBM) || defined(HAVE_KC) || defined(HAVE_LMDB) || defined(HAVE_QDBM) || defined(HAVE_TC))
#error "No hcache backend defined"
#endif
#include <errno.h>
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include "hcache.h"
/* Keep this list sorted as it is in configure.ac to avoid user surprise if no
* header_cache_backend is specified. */
const hcache_ops_t *hcache_ops[] = {
-#if defined(HAVE_TC)
+#ifdef HAVE_TC
&hcache_tokyocabinet_ops,
#endif
-#if defined(HAVE_KC)
+#ifdef HAVE_KC
&hcache_kyotocabinet_ops,
#endif
-#if defined(HAVE_QDBM)
+#ifdef HAVE_QDBM
&hcache_qdbm_ops,
#endif
-#if defined(HAVE_GDBM)
+#ifdef HAVE_GDBM
&hcache_gdbm_ops,
#endif
-#if defined(HAVE_BDB)
+#ifdef HAVE_BDB
&hcache_bdb_ops,
#endif
-#if defined(HAVE_LMDB)
+#ifdef HAVE_LMDB
&hcache_lmdb_ops,
#endif
NULL
#ifdef MIXMASTER
nh.chain = NULL;
#endif
-#if defined USE_POP || defined USE_IMAP
+#if defined(USE_POP) || defined(USE_IMAP)
nh.data = NULL;
#endif
#include "sort.h"
#include "browser.h"
#include "imap_private.h"
-#if defined(USE_SSL)
+#ifdef USE_SSL
# include "mutt_ssl.h"
#endif
#include "buffy.h"
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
idata->ctx->size -= h->content->length;
imap_cache_del (idata, h);
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_del (idata, HEADER_DATA(h)->uid);
#endif
}
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_close (idata);
#endif
if (ascii_strncasecmp ("* OK [CAPABILITY", idata->buf, 16)
&& imap_check_capabilities (idata))
goto bail;
-#if defined(USE_SSL)
+#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
if (!idata->conn->ssf && (option(OPTSSLFORCETLS) ||
mutt_bit_isset (idata->capabilities, STARTTLS)))
return 0;
-#if defined(USE_SSL)
+#ifdef USE_SSL
err_close_conn:
imap_close_connection (idata);
#endif
}
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
idata->hcache = imap_hcache_open (idata, NULL);
#endif
if (h->deleted)
{
imap_cache_del (idata, h);
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_del (idata, HEADER_DATA(h)->uid);
#endif
}
if (h->active && h->changed)
{
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_put (idata, h);
#endif
/* if the message has been rethreaded or attachments have been deleted
}
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_close (idata);
#endif
void imap_utf_encode (IMAP_DATA *idata, char **s);
void imap_utf_decode (IMAP_DATA *idata, char **s);
-#if USE_HCACHE
+#ifdef USE_HCACHE
/* typedef size_t (*hcache_keylen_t)(const char* fn); */
#define imap_hcache_keylen mutt_strlen
#endif /* USE_HCACHE */
#include "pgp.h"
#endif
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
progress_t progress;
int retval = -1;
-#if USE_HCACHE
+#ifdef USE_HCACHE
char buf[LONG_STRING];
void *uid_validity = NULL;
void *puidnext = NULL;
idata->reopen &= ~(IMAP_REOPEN_ALLOW|IMAP_NEWMAIL_PENDING);
idata->newMailCount = 0;
-#if USE_HCACHE
+#ifdef USE_HCACHE
idata->hcache = imap_hcache_open (idata, NULL);
if (idata->hcache && !msgbegin)
ctx->hdrs[idx]->content->length = h.content_length;
ctx->size += h.content_length;
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_put (idata, ctx->hdrs[idx]);
#endif /* USE_HCACHE */
if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK)))
{
imap_free_header_data (&h.data);
-#if USE_HCACHE
+#ifdef USE_HCACHE
imap_hcache_close (idata);
#endif
goto error_out_1;
(status->uidnext < maxuid + 1))
status->uidnext = maxuid + 1;
-#if USE_HCACHE
+#ifdef USE_HCACHE
mutt_hcache_store_raw (idata->hcache, "/UIDVALIDITY", 12,
&idata->uid_validity, sizeof (idata->uid_validity));
if (maxuid && idata->uidnext < maxuid + 1)
#include "group.h"
#include "version.h"
-#if defined(USE_SSL)
+#ifdef USE_SSL
#include "mutt_ssl.h"
#endif
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
#include "mutt_notmuch.h"
#endif
static void myvar_set (const char* var, const char* val);
static void myvar_del (const char* var);
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
/* List of tags found in last call to mutt_nm_query_complete(). */
static char **nm_tags;
#endif
return 0;
}
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
/* Fetch a list of all notmuch tags and insert them into the completion
* machinery.
** as read when you quit the newsgroup (catchup newsgroup).
*/
#endif
-#if defined(USE_SSL)
+#ifdef USE_SSL
{ "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" },
/*
** .pp
** agents tend to do with messages (in order to prevent tools from
** misinterpreting the line as a mbox message separator).
*/
-#if defined(USE_SSL_OPENSSL)
+#ifdef USE_SSL_OPENSSL
{ "entropy_file", DT_PATH, R_NONE, UL &SslEntropyFile, 0 },
/*
** .pp
** initially set this variable to the value of the environment
** variable \fC$$$MAIL\fP or \fC$$$MAILDIR\fP if either is defined.
*/
-#if defined(USE_SSL)
+#ifdef USE_SSL
#ifdef USE_SSL_GNUTLS
{ "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
/*
-D\t\tprint the value of all variables to stdout\n\
-D -S\t\tlike -D, but hide the value of sensitive variables\n\
-B\t\trun in batch mode (do not start the ncurses UI)"));
-#if DEBUG
+#ifdef DEBUG
puts (_(" -d <level>\tlog debugging output to ~/.muttdebug0"));
#endif
puts (_(
cbreak ();
noecho ();
nonl ();
-#if HAVE_TYPEAHEAD
+#ifdef HAVE_TYPEAHEAD
typeahead (-1); /* simulate smooth scrolling */
#endif
-#if HAVE_META
+#ifdef HAVE_META
meta (stdscr, true);
#endif
init_extended_keys();
#include <stddef.h>
#include <string.h>
-#if USE_UNLOCKED_IO
+#ifdef USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
#ifdef _LIBC
# include <endian.h>
-# if __BYTE_ORDER == __BIG_ENDIAN
+# if (__BYTE_ORDER == __BIG_ENDIAN)
# define WORDS_BIGENDIAN 1
# endif
/* We need to keep the namespace clean so define the MD5 function
#endif
#define BLOCKSIZE 4096
-#if BLOCKSIZE % 64 != 0
+#if ((BLOCKSIZE % 64) != 0)
# error "invalid BLOCKSIZE"
#endif
/* Process available complete blocks. */
if (len >= 64)
{
-#if !_STRING_ARCH_unaligned
+#if !defined(_STRING_ARCH_unaligned)
# define alignof(type) offsetof (struct { char c; type x; }, x)
# define UNALIGNED_P(p) (((size_t) p) % alignof (md5_uint32) != 0)
if (UNALIGNED_P (buffer))
#include <stdio.h>
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
-#if HAVE_STDINT_H || _LIBC
+#if defined(HAVE_STDINT_H) || defined(_LIBC)
# include <stdint.h>
#endif
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifndef __GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_MINOR__
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
# define __GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
# else
#endif
#ifndef __THROW
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# if defined(__cplusplus) && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# else
# define __THROW
#include "mx.h"
#include "copy.h"
#include "sort.h"
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
#include "mutt_curses.h"
#include <string.h>
#include <utime.h>
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
return r;
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
static size_t maildir_hcache_keylen (const char *fn)
{
const char * p = strrchr (fn, ':');
}
#endif
-#if HAVE_DIRENT_D_INO
+#ifdef HAVE_DIRENT_D_INO
static int md_cmp_inode (struct maildir *a, struct maildir *b)
{
return a->inode - b->inode;
*md = maildir_sort (*md, (size_t) -1, md_cmp_path);
}
-#if HAVE_DIRENT_D_INO
+#ifdef HAVE_DIRENT_D_INO
static struct maildir *skip_duplicates (struct maildir *p, struct maildir **last)
{
/*
struct maildir *p, *last = NULL;
char fn[_POSIX_PATH_MAX];
int count;
-#if HAVE_DIRENT_D_INO
+#ifdef HAVE_DIRENT_D_INO
int sort = 0;
#endif
-#if USE_HCACHE
+#ifdef USE_HCACHE
header_cache_t *hc = NULL;
void *data;
const char *key;
int ret;
#endif
-#if HAVE_DIRENT_D_INO
+#ifdef HAVE_DIRENT_D_INO
#define DO_SORT() do { \
if (!sort) \
{ \
#define DO_SORT() /* nothing */
#endif
-#if USE_HCACHE
+#ifdef USE_HCACHE
hc = mutt_hcache_open (HeaderCache, ctx->path, NULL);
#endif
snprintf (fn, sizeof (fn), "%s/%s", ctx->path, p->h->path);
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (option(OPTHCACHEVERIFY))
{
ret = stat(fn, &lastchanged);
if (maildir_parse_message (ctx->magic, fn, p->h->old, p->h))
{
p->header_parsed = 1;
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->magic == MUTT_MH)
{
key = p->h->path;
#endif
} else
mutt_free_header (&p->h);
-#if USE_HCACHE
+#ifdef USE_HCACHE
}
mutt_hcache_free(hc, &data);
#endif
last = p;
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
mutt_hcache_close (hc);
#endif
return (0);
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
int mh_sync_mailbox_message (CONTEXT * ctx, int msgno, header_cache_t *hc)
#else
int mh_sync_mailbox_message (CONTEXT * ctx, int msgno)
#endif
{
-#if USE_HCACHE
+#ifdef USE_HCACHE
const char *key;
size_t keylen;
#endif
if (ctx->magic == MUTT_MAILDIR
|| (option (OPTMHPURGE) && ctx->magic == MUTT_MH))
{
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (hc)
{
if (ctx->magic == MUTT_MH)
}
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (hc && h->changed)
{
if (ctx->magic == MUTT_MH)
static int mh_sync_mailbox (CONTEXT * ctx, int *index_hint)
{
int i, j;
-#if USE_HCACHE
+#ifdef USE_HCACHE
header_cache_t *hc = NULL;
#endif /* USE_HCACHE */
char msgbuf[STRING];
if (i != 0)
return i;
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->magic == MUTT_MAILDIR || ctx->magic == MUTT_MH)
hc = mutt_hcache_open(HeaderCache, ctx->path, NULL);
#endif /* USE_HCACHE */
if (!ctx->quiet)
mutt_progress_update (&progress, i, -1);
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (mh_sync_mailbox_message (ctx, i, hc) == -1)
goto err;
#else
#endif
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->magic == MUTT_MAILDIR || ctx->magic == MUTT_MH)
mutt_hcache_close (hc);
#endif /* USE_HCACHE */
return 0;
err:
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->magic == MUTT_MAILDIR || ctx->magic == MUTT_MH)
mutt_hcache_close (hc);
#endif /* USE_HCACHE */
#define MUTT_COMMAND (1<<6) /* do command completion */
#define MUTT_PATTERN (1<<7) /* pattern mode - only used for history classes */
#define MUTT_LABEL (1<<8) /* do label completion */
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
#define MUTT_NM_QUERY (1<<9) /* Notmuch query mode. */
#define MUTT_NM_TAG (1<<10) /* Notmuch tag +/- mode. */
#endif
OPT_QUIT,
OPT_REPLYTO,
OPT_RECALL,
-#if defined(USE_SSL)
+#ifdef USE_SSL
OPT_SSLSTARTTLS,
#endif
OPT_SUBJECT,
OPTIMAPPEEK,
OPTIMAPSERVERNOISE,
#endif
-#if defined(USE_SSL)
+#ifdef USE_SSL
# ifndef USE_SSL_GNUTLS
OPTSSLSYSTEMCERTS,
OPTSSLV2,
int refno; /* message number on server */
#endif
-#if defined USE_POP || defined USE_IMAP || defined USE_NNTP || defined USE_NOTMUCH
+#if defined(USE_POP) || defined(USE_IMAP) || defined(USE_NNTP) || defined(USE_NOTMUCH)
void *data; /* driver-specific data */
void (*free_cb)(struct header *); /* driver-specific data free function */
#endif
#else /* USE_SLANG_CURSES */
-#if HAVE_NCURSESW_NCURSES_H
+#ifdef HAVE_NCURSESW_NCURSES_H
# include <ncursesw/ncurses.h>
#elif HAVE_NCURSES_NCURSES_H
# include <ncurses/ncurses.h>
#define CENTERLINE(win,x,y) mutt_window_move(win, y, (win->cols-strlen(x))/2), addstr(x)
#define BEEP() do { if (option (OPTBEEP)) beep(); } while (0)
-#if ! (defined(USE_SLANG_CURSES) || defined(HAVE_CURS_SET))
+#if !(defined(USE_SLANG_CURSES) || defined(HAVE_CURS_SET))
#define curs_set(x)
#endif
* functions will properly set the background attributes all the way to the
* right column.
*/
-#if defined(HAVE_BKGDSET)
+#ifdef HAVE_BKGDSET
#define SETCOLOR(X) bkgdset(ColorDefs[X] | ' ')
#define ATTRSET(X) bkgdset(X | ' ')
#else
ctx->path = hd->folder;
ctx->magic = hd->magic;
-#if USE_HCACHE
+#ifdef USE_HCACHE
rc = mh_sync_mailbox_message(ctx, i, NULL);
#else
rc = mh_sync_mailbox_message(ctx, i);
#include "mutt.h"
#include "mutt_socket.h"
#include "mutt_tunnel.h"
-#if defined(USE_SSL)
+#ifdef USE_SSL
# include "mutt_ssl.h"
#endif
mutt_tunnel_socket_setup (conn);
else if (account->flags & MUTT_ACCT_SSL)
{
-#if defined(USE_SSL)
+#ifdef USE_SSL
if (mutt_ssl_socket_setup (conn) < 0)
{
mutt_socket_free (conn);
#include "mutt_socket.h"
-#if defined(USE_SSL)
+#ifdef USE_SSL
int mutt_ssl_starttls (CONNECTION* conn);
int mutt_ssl_socket_setup (CONNECTION *conn);
#endif
gnutls_x509_crt_deinit (clientcrt);
}
-#if HAVE_GNUTLS_PRIORITY_SET_DIRECT
+#ifdef HAVE_GNUTLS_PRIORITY_SET_DIRECT
static int tls_set_priority(tlssockdata *data)
{
size_t nproto = 4;
SslClientCert, GNUTLS_X509_FMT_PEM);
}
-#if HAVE_DECL_GNUTLS_VERIFY_DISABLE_TIME_CHECKS
+#ifdef HAVE_DECL_GNUTLS_VERIFY_DISABLE_TIME_CHECKS
/* disable checking certificate activation/expiration times
in gnutls, we do the checks ourselves */
gnutls_certificate_set_verify_flags(data->xcred, GNUTLS_VERIFY_DISABLE_TIME_CHECKS);
#ifdef MIXMASTER
mutt_free_list (&(*h)->chain);
#endif
-#if defined USE_POP || defined USE_IMAP || defined USE_NNTP || defined USE_NOTMUCH
+#if defined(USE_POP) || defined(USE_IMAP) || defined(USE_NNTP) || defined(USE_NOTMUCH)
if ((*h)->free_cb)
(*h)->free_cb(*h);
FREE (&(*h)->data);
return 0;
}
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
#include "mutt_notmuch.h"
#endif
#include "rfc2047.h"
#include "bcache.h"
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
#include "mutt_crypt.h"
#include "nntp.h"
-#if defined(USE_SSL)
+#ifdef USE_SSL
#include "mutt_ssl.h"
#endif
#include "smime.h"
#endif
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
posting ? _("Posting is ok.") : _("Posting is NOT ok."));
mutt_sleep (1);
-#if defined(USE_SSL)
+#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || option (OPTSSLFORCETLS)))
{
#include "mailbox.h"
#include "bcache.h"
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
#include "pop.h"
#include "mutt_crypt.h"
#include "bcache.h"
-#if USE_HCACHE
+#ifdef USE_HCACHE
#include "hcache.h"
#endif
{
if (!ctx->quiet)
mutt_progress_update (&progress, i + 1 - old_count, -1);
-#if USE_HCACHE
+#ifdef USE_HCACHE
if ((data = mutt_hcache_fetch (hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data))))
{
char *uidl = safe_strdup (ctx->hdrs[i]->data);
#endif
if ((ret = pop_read_header (pop_data, ctx->hdrs[i])) < 0)
break;
-#if USE_HCACHE
+#ifdef USE_HCACHE
else
{
mutt_hcache_store (hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data),
mx_update_context (ctx, i - old_count);
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
mutt_hcache_close (hc);
#endif
memset (ctx->rights, 0, sizeof (ctx->rights));
mutt_bit_set (ctx->rights, MUTT_ACL_SEEN);
mutt_bit_set (ctx->rights, MUTT_ACL_DELETE);
-#if USE_HCACHE
+#ifdef USE_HCACHE
/* flags are managed using header cache, so it only makes sense to
* enable them in that case */
mutt_bit_set (ctx->rights, MUTT_ACL_WRITE);
mutt_progress_init (&progress, _("Marking messages deleted..."),
MUTT_PROGRESS_MSG, WriteInc, ctx->deleted);
-#if USE_HCACHE
+#ifdef USE_HCACHE
hc = pop_hcache_open (pop_data, ctx->path);
#endif
if ((ret = pop_query (pop_data, buf, sizeof (buf))) == 0)
{
mutt_bcache_del (pop_data->bcache, ctx->hdrs[i]->data);
-#if USE_HCACHE
+#ifdef USE_HCACHE
mutt_hcache_delete (hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data));
#endif
}
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->hdrs[i]->changed)
{
mutt_hcache_store (hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data),
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
mutt_hcache_close (hc);
#endif
#include "mx.h"
#include "url.h"
#include "pop.h"
-#if defined(USE_SSL)
+#ifdef USE_SSL
# include "mutt_ssl.h"
#endif
return -2;
}
-#if defined(USE_SSL)
+#ifdef USE_SSL
/* Attempt STLS if available and desired. */
if (!pop_data->conn->ssf && (pop_data->cmd_stls || option(OPTSSLFORCETLS)))
{
int mutt_check_traditional_pgp (HEADER *, int *);
int mutt_command_complete (char *, size_t, int, int);
int mutt_var_value_complete (char *, size_t, int);
-#if USE_NOTMUCH
+#ifdef USE_NOTMUCH
int mutt_nm_query_complete (char *buffer, size_t len, int pos, int numtabs);
int mutt_nm_tag_complete (char *buffer, size_t len, int pos, int numtabs);
#endif
*/
void rfc3676_space_stuff (HEADER* hdr)
{
-#if DEBUG
+#ifdef DEBUG
int lc = 0;
size_t len = 0;
unsigned char c = '\0';
{
if (ascii_strncmp ("From ", buf, 5) == 0 || buf[0] == ' ') {
fputc (' ', out);
-#if DEBUG
+#ifdef DEBUG
lc++;
len = mutt_strlen (buf);
if (len > 0)
return mix_send_message (msg->chain, tempfile);
#endif
-#if USE_SMTP
+#ifdef USE_SMTP
#ifdef USE_NNTP
if (!option (OPTNEWSSEND))
#endif
/* next we close all open files */
close (0);
-#if defined(OPEN_MAX)
+#ifdef OPEN_MAX
for (fd = tempfile ? 1 : 3; fd < OPEN_MAX; fd++)
close (fd);
#elif defined(_POSIX_OPEN_MAX)
unlink(tempfile);
return -1;
}
-#if USE_SMTP
+#ifdef USE_SMTP
if (SmtpUrl)
ret = mutt_smtp_send (env_from, to, NULL, NULL, tempfile,
h->content->encoding == ENC8BIT);
{
curs_set (1);
endwin (); /* just to be safe */
-#if SYS_SIGLIST_DECLARED
+#ifdef SYS_SIGLIST_DECLARED
printf(_("%s... Exiting.\n"), sys_siglist[sig]);
#else
-#if (__sun__ && __svr4__)
+#if (defined(__sun__) && defined(__svr4__))
printf(_("Caught %s... Exiting.\n"), _sys_siglist[sig]);
#else
-#if (__alpha && __osf__)
+#if (defined(__alpha) && defined(__osf__))
printf(_("Caught %s... Exiting.\n"), __sys_siglist[sig]);
#else
printf(_("Caught signal %d... Exiting.\n"), sig);
switch (fork ())
{
case 0:
-#if defined(OPEN_MAX)
+#ifdef OPEN_MAX
for (fd = 0; fd < OPEN_MAX; fd++)
close (fd);
#elif defined(_POSIX_OPEN_MAX)