#endif
#ifdef USE_NNTP
if (OptNews)
- (state->entry)[state->entrylen].nd = (struct NntpData *) data;
+ (state->entry)[state->entrylen].nd = data;
#endif
(state->entrylen)++;
}
*/
static void snd_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct AttachCtx *actx = (struct AttachCtx *) menu->data;
+ struct AttachCtx *actx = menu->data;
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(AttachFormat),
attach_format_str, (unsigned long) (actx->idx[actx->v2r[num]]),
}
else
{
- new = (struct AttachPtr *) mutt_mem_calloc(1, sizeof(struct AttachPtr));
+ new = mutt_mem_calloc(1, sizeof(struct AttachPtr));
mutt_actx_add_attach(actx, new);
new->content = m;
m->aptr = new;
for (i = 0; i < numfiles; i++)
{
char *att = files[i];
- new = (struct AttachPtr *) mutt_mem_calloc(1, sizeof(struct AttachPtr));
+ new = mutt_mem_calloc(1, sizeof(struct AttachPtr));
new->unowned = 1;
new->content = mutt_make_file_attach(att);
if (new->content)
if (!message_is_tagged(Context, i))
continue;
- new = (struct AttachPtr *) mutt_mem_calloc(1, sizeof(struct AttachPtr));
+ new = mutt_mem_calloc(1, sizeof(struct AttachPtr));
new->content = mutt_make_message_attach(Context, Context->hdrs[i], true);
if (new->content)
update_idx(menu, actx, new);
mutt_error(_("Unknown Content-Type %s"), type);
continue;
}
- new = (struct AttachPtr *) mutt_mem_calloc(1, sizeof(struct AttachPtr));
+ new = mutt_mem_calloc(1, sizeof(struct AttachPtr));
/* Touch the file */
fp = mutt_file_fopen(fname, "w");
if (!fp)
if (!cs || !var || !cdef)
return; /* LCOV_EXCL_LINE */
- struct Address **a = (struct Address **) var;
+ struct Address **a = var;
if (!*a)
return;
if (!cs || !var || !cdef)
return; /* LCOV_EXCL_LINE */
- struct MbTable **m = (struct MbTable **) var;
+ struct MbTable **m = var;
if (!*m)
return;
if (!cs || !var || !cdef)
return; /* LCOV_EXCL_LINE */
- struct Regex **r = (struct Regex **) var;
+ struct Regex **r = var;
if (!*r)
return;
*/
static int mutt_sasl_cb_authname(void *context, int id, const char **result, unsigned int *len)
{
- struct Account *account = (struct Account *) context;
+ struct Account *account = context;
if (!result)
return SASL_FAIL;
*/
static int mutt_sasl_cb_pass(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret)
{
- struct Account *account = (struct Account *) context;
+ struct Account *account = context;
int len;
if (!account || !psecret)
*/
static int mutt_sasl_conn_open(struct Connection *conn)
{
- struct SaslData *sasldata = (struct SaslData *) conn->sockdata;
+ struct SaslData *sasldata = conn->sockdata;
conn->sockdata = sasldata->sockdata;
int rc = (sasldata->msasl_open)(conn);
conn->sockdata = sasldata;
*/
static int mutt_sasl_conn_close(struct Connection *conn)
{
- struct SaslData *sasldata = (struct SaslData *) conn->sockdata;
+ struct SaslData *sasldata = conn->sockdata;
/* restore connection's underlying methods */
conn->sockdata = sasldata->sockdata;
int rc;
unsigned int olen;
- struct SaslData *sasldata = (struct SaslData *) conn->sockdata;
+ struct SaslData *sasldata = conn->sockdata;
/* if we still have data in our read buffer, copy it into buf */
if (sasldata->blen > sasldata->bpos)
const char *pbuf = NULL;
unsigned int olen, plen;
- struct SaslData *sasldata = (struct SaslData *) conn->sockdata;
+ struct SaslData *sasldata = conn->sockdata;
conn->sockdata = sasldata->sockdata;
/* encode data, if necessary */
*/
static int ssl_passwd_cb(char *buf, int buflen, int rwflag, void *userdata)
{
- struct Account *account = (struct Account *) userdata;
+ struct Account *account = userdata;
if (mutt_account_getuser(account) < 0)
return 0;
*/
static int tunnel_socket_close(struct Connection *conn)
{
- struct TunnelData *tunnel = (struct TunnelData *) conn->sockdata;
+ struct TunnelData *tunnel = conn->sockdata;
int status;
close(tunnel->readfd);
*/
static int tunnel_socket_read(struct Connection *conn, char *buf, size_t len)
{
- struct TunnelData *tunnel = (struct TunnelData *) conn->sockdata;
+ struct TunnelData *tunnel = conn->sockdata;
int rc;
rc = read(tunnel->readfd, buf, len);
*/
static int tunnel_socket_write(struct Connection *conn, const char *buf, size_t len)
{
- struct TunnelData *tunnel = (struct TunnelData *) conn->sockdata;
+ struct TunnelData *tunnel = conn->sockdata;
int rc;
rc = write(tunnel->writefd, buf, len);
*/
static int tunnel_socket_poll(struct Connection *conn, time_t wait_secs)
{
- struct TunnelData *tunnel = (struct TunnelData *) conn->sockdata;
+ struct TunnelData *tunnel = conn->sockdata;
int ofd;
int rc;
unsigned int litlen;
if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST)
- list = (struct ImapList *) idata->cmddata;
+ list = idata->cmddata;
else
list = &lb;
{
if (mutt_str_atoui(s, &uid) < 0)
continue;
- h = (struct Header *) mutt_hash_int_find(idata->uid_hash, uid);
+ h = mutt_hash_int_find(idata->uid_hash, uid);
if (h)
h->matched = true;
}
*/
static bool compare_flags_for_copy(struct Header *h)
{
- struct ImapHeaderData *hd = (struct ImapHeaderData *) h->data;
+ struct ImapHeaderData *hd = h->data;
if (h->read != hd->read)
return true;
{
char *new = NULL;
char *checker = NULL;
- struct ImapData *idata = (struct ImapData *) ctx->data;
+ struct ImapData *idata = ctx->data;
/* Check for \* flags capability */
if (!imap_has_flag(&idata->flags, NULL))
*/
static inline struct MhData *mh_data(struct Context *ctx)
{
- return (struct MhData *) ctx->data;
+ return ctx->data;
}
/**
keylen = maildir_hcache_keylen(key);
}
void *data = mutt_hcache_fetch(hc, key, keylen);
- struct timeval *when = (struct timeval *) data;
+ struct timeval *when = data;
if (data && !ret && lastchanged.st_mtime <= when->tv_sec)
{
*/
static void crypt_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct CryptKeyInfo **key_table = (struct CryptKeyInfo **) menu->data;
+ struct CryptKeyInfo **key_table = menu->data;
struct CryptEntry entry;
entry.key = key_table[num];
*/
static void pgp_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct PgpUid **KeyTable = (struct PgpUid **) menu->data;
+ struct PgpUid **KeyTable = menu->data;
struct PgpEntry entry;
entry.uid = KeyTable[num];
*/
static void smime_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct SmimeKey **Table = (struct SmimeKey **) menu->data;
+ struct SmimeKey **Table = menu->data;
struct SmimeKey *this = Table[num];
char *truststate = NULL;
switch (this->trust)
if (Context && Context->mailbox->magic == MUTT_NNTP)
{
buf[0] = '\0';
- if (nntp_query((struct NntpData *) Context->data, buf, sizeof(buf)) < 0)
+ if (nntp_query(Context->data, buf, sizeof(buf)) < 0)
return -1;
}
}
if (newpath)
{
/* remember that file has been moved -- nm_mbox_sync() will update the DB */
- struct NmHdrData *hd = (struct NmHdrData *) h->data;
+ struct NmHdrData *hd = h->data;
if (hd)
{
static int fetch_uidl(char *line, void *data)
{
int i, index;
- struct Context *ctx = (struct Context *) data;
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct Context *ctx = data;
+ struct PopData *pop_data = ctx->data;
char *endp = NULL;
errno = 0;
*/
static int msg_cache_check(const char *id, struct BodyCache *bcache, void *data)
{
- struct Context *ctx = (struct Context *) data;
+ struct Context *ctx = data;
if (!ctx)
return -1;
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
if (!pop_data)
return -1;
*/
static int pop_fetch_headers(struct Context *ctx)
{
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
struct Progress progress;
#ifdef USE_HCACHE
*/
static int pop_mbox_close(struct Context *ctx)
{
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
if (!pop_data)
return 0;
char buf[LONG_STRING];
char path[PATH_MAX];
struct Progress progressbar;
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
struct PopCache *cache = NULL;
struct Header *h = ctx->hdrs[msgno];
unsigned short bcache = 1;
{
int i, j, ret = 0;
char buf[LONG_STRING];
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
struct Progress progress;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
static int pop_mbox_check(struct Context *ctx, int *index_hint)
{
int ret;
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
if ((pop_data->check_time + PopCheckinterval) > time(NULL))
return 0;
*/
static int fetch_capa(char *line, void *data)
{
- struct PopData *pop_data = (struct PopData *) data;
+ struct PopData *pop_data = data;
char *c = NULL;
if (mutt_str_strncasecmp(line, "SASL", 4) == 0)
*/
static int fetch_auth(char *line, void *data)
{
- struct PopData *pop_data = (struct PopData *) data;
+ struct PopData *pop_data = data;
if (!pop_data->auth_list)
{
*/
void pop_logout(struct Context *ctx)
{
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
if (pop_data->status == POP_CONNECTED)
{
static int check_uidl(char *line, void *data)
{
unsigned int index;
- struct Context *ctx = (struct Context *) data;
+ struct Context *ctx = data;
char *endp = NULL;
errno = 0;
*/
int pop_reconnect(struct Context *ctx)
{
- struct PopData *pop_data = (struct PopData *) ctx->data;
+ struct PopData *pop_data = ctx->data;
if (pop_data->status == POP_CONNECTED)
return 0;
*/
static void post_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct Context *ctx = (struct Context *) menu->data;
+ struct Context *ctx = menu->data;
mutt_make_string_flags(buf, buflen, NONULL(IndexFormat), ctx, ctx->hdrs[num],
MUTT_FORMAT_ARROWCURSOR);
*/
static int query_search(struct Menu *m, regex_t *re, int n)
{
- struct Entry *table = (struct Entry *) m->data;
+ struct Entry *table = m->data;
if (table[n].data->name && !regexec(re, table[n].data->name, 0, NULL, 0))
return 0;
*/
static void attach_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct AttachCtx *actx = (struct AttachCtx *) menu->data;
+ struct AttachCtx *actx = menu->data;
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(AttachFormat),
attach_format_str, (unsigned long) (actx->idx[actx->v2r[num]]),
*/
int mutt_tag_attach(struct Menu *menu, int n, int m)
{
- struct AttachCtx *actx = (struct AttachCtx *) menu->data;
+ struct AttachCtx *actx = menu->data;
struct Body *cur = actx->idx[actx->v2r[n]]->content;
bool ot = cur->tagged;
}
else
{
- new = (struct AttachPtr *) mutt_mem_calloc(1, sizeof(struct AttachPtr));
+ new = mutt_mem_calloc(1, sizeof(struct AttachPtr));
mutt_actx_add_attach(actx, new);
new->content = m;
*/
static void mix_entry(char *buf, size_t buflen, struct Menu *menu, int num)
{
- struct Remailer **type2_list = (struct Remailer **) menu->data;
+ struct Remailer **type2_list = menu->data;
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
NONULL(MixEntryFormat), mix_format_str,
(unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR);