{N_("Undel"), OP_UNDELETE},
{N_("Select"), OP_GENERIC_SELECT_ENTRY},
{N_("Help"), OP_HELP},
- {NULL}
+ {NULL, OP_NULL}
};
ADDRESS *mutt_lookup_alias (const char *s)
}
}
-ADDRESS *mutt_get_address (ENVELOPE * env, char **pfxp)
+ADDRESS *mutt_get_address (ENVELOPE * env, const char **pfxp)
{
ADDRESS *adr;
- char *pfx = NULL;
+ const char *pfx = NULL;
if (mutt_addr_is_user (env->from)) {
if (env->to && !mutt_is_mail_list (env->to)) {
void mutt_create_alias (ENVELOPE *, ADDRESS *);
int mutt_check_alias_name (const char *, char *);
-ADDRESS *mutt_get_address (ENVELOPE *, char **);
+ADDRESS *mutt_get_address (ENVELOPE *, const char **);
ADDRESS *mutt_lookup_alias (const char *s);
ADDRESS *mutt_expand_aliases (ADDRESS *);
void mutt_expand_aliases_env (ENVELOPE *);
*/
static struct {
- char *key;
- char *pref;
+ const char *key;
+ const char *pref;
} PreferredMIMENames[] = {
{
"ansi_x3.4-1968", "us-ascii"}, {
#endif
#ifndef HAVE_ICONV
-#define ICONV_CONST /**/
+#define ICONV_CONST const
iconv_t iconv_open (const char *, const char *);
size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
int iconv_close (iconv_t);
#define SW (option(OPTMBOXPANE)?SidebarWidth:0)
#define W (COLS - HDR_XOFFSET - SW)
-static char *Prompts[] = {
+static const char *Prompts[] = {
"From: ",
"To: ",
"Cc: ",
{N_("Attach file"), OP_COMPOSE_ATTACH_FILE},
{N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION},
{N_("Help"), OP_HELP},
- {NULL}
+ {NULL, OP_NULL}
};
#ifdef USE_NNTP
{N_("Attach file"), OP_COMPOSE_ATTACH_FILE},
{N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION},
{N_("Help"), OP_HELP},
- {NULL}
+ {NULL, OP_NULL}
};
#endif
static void redraw_mix_line (LIST * chain)
{
int c;
- char *t;
+ const char *t;
mvaddstr (HDR_MIX, SW, " Mix: ");
return (ch == ctrl ('G') ? err : ret);
}
-int _mutt_get_field ( /* const */ char *field, char *buf, size_t buflen,
+int _mutt_get_field ( const char *field, char *buf, size_t buflen,
int complete, int multiple, char ***files, int *numfiles)
{
int ret;
WHERE char *MailcapPath;
WHERE char *Maildir;
-#if USE_HCACHE
+#ifdef USE_HCACHE
WHERE char *HeaderCache;
#if HAVE_GDBM || HAVE_DB4
WHERE char *HeaderCachePageSize;
WHERE short SmimeTimeout;
WHERE char *SmimeCertificates;
WHERE char *SmimeKeys;
-WHERE char *SmimeCryptAlg;
WHERE char *SmimeCALocation;
WHERE char *SmimeVerifyCommand;
WHERE char *SmimeVerifyOpaqueCommand;
((msgno + 1) >= fetchlast)));
if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK))) {
- imap_free_header_data ((void **) &h.data);
+ imap_free_header_data ((void *)&h.data);
fclose (fp);
#if USE_HCACHE
mutt_hcache_close (hc);
#include <errno.h>
#include <sys/wait.h>
-#define CHECK_PAGER \
- if ((CurrentMenu == MENU_PAGER) && \
- (!option || (option->flags & R_RESORT))) \
- { \
- snprintf (err->data, err->dsize, \
- _("Not available in this menu.")); \
- return (-1); \
- } else
-
/*
* prototypes
*/
static void quad_to_string (char* dst, size_t dstlen,
struct option_t* option) {
- char *vals[] = { "no", "yes", "ask-no", "ask-yes" };
+ const char *vals[] = { "no", "yes", "ask-no", "ask-yes" };
snprintf (dst, dstlen, "%s=%s", option->option,
vals[quadoption (option->data)]);
}
return 0;
}
-static int print_attach_list (LIST *lp, char op, char *name) {
+static int print_attach_list (LIST *lp, char op, const char *name) {
while (lp) {
printf("attachments %c%s %s/%s\n", op, name,
((ATTACH_MATCH *)lp->data)->major,
}
static struct option_t* add_option (const char* name, const char* init,
- short type, short dup) {
+ short type, short dodup) {
struct option_t* option = mem_calloc (1, sizeof (struct option_t));
debug_print (1, ("adding $%s\n", name));
option->option = str_dup (name);
option->type = type;
if (init)
- option->init = dup ? str_dup (init) : (char*) init;
+ option->init = dodup ? str_dup (init) : (char*) init;
return (option);
}
return (map);
}
+#define CHECK_PAGER \
+ if ((CurrentMenu == MENU_PAGER) && \
+ (!option || (option->flags & R_RESORT))) \
+ { \
+ snprintf (err->data, err->dsize, \
+ _("Not available in this menu.")); \
+ return (-1); \
+ }
+
static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
BUFFER * err)
{
#define R_RESORT_BOTH (R_RESORT|R_RESORT_SUB)
struct option_t {
- char *option;
+ const char *option;
short type;
short flags;
unsigned long data;
- char* init;
+ const char *init;
};
#define UL (unsigned long)
# endif
#endif
-struct option_t MuttVars[] = {
+struct option_t const MuttVars[] = {
/*++*/
{"abort_noattach", DT_QUAD, R_NONE, OPT_ATTACH, "no" },
/*
static int parse_unalternates (BUFFER *, BUFFER *, unsigned long, BUFFER *);
struct command_t {
- char *name;
+ const char *name;
int (*func) (BUFFER *, BUFFER *, unsigned long, BUFFER *);
unsigned long data;
- unsigned long data1;
};
struct command_t Commands[] = {
#define FOREVER while (1)
-# ifndef _EXTLIB_C
-extern void (*mutt_error) (const char *, ...);
-# endif
void mutt_exit (int);
/* Exit values used in send_msg() */
#define MAPPING_H
struct mapping_t {
- char *name;
+ const char *name;
int value;
};
OPTFORCENAME,
OPTFORWDECODE,
OPTFORWQUOTE,
-#if USE_HCACHE
+#ifdef USE_HCACHE
OPTHCACHEVERIFY,
#if HAVE_QDBM
OPTHCACHECOMPRESS,
nntp_add_to_list (news, data);
}
else
- mem_free ((void **) &data->entries);
+ mem_free (&data->entries);
data->rc = 1;
data->entries = mem_calloc (x * 2, sizeof (NEWSRC_ENTRY));
int _mutt_enter_fname (const char *, char *, size_t, int *, int, int,
char ***, int *);
#define mutt_get_field(A,B,C,D) _mutt_get_field(A,B,C,D,0,NULL,NULL)
-int _mutt_get_field (char *, char *, size_t, int, int, char ***, int *);
+int _mutt_get_field (const char *, char *, size_t, int, int, char ***, int *);
int mutt_get_field_unbuffered (char *, char *, size_t, int);
int mutt_get_hook_type (const char *);
int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t);
ADDRESS *rfc822_append (ADDRESS ** a, ADDRESS * b);
void rfc822_write_address (char *, size_t, ADDRESS *, int);
void rfc822_write_address_single (char *, size_t, ADDRESS *, int);
-void rfc822_free_address (ADDRESS ** addr);
void rfc822_cat (char *, size_t, const char *, const char *);
extern int RFC822Error;