projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
warning fixes
[apps/madmutt.git]
/
init.c
diff --git
a/init.c
b/init.c
index
734f88e
..
c32e551
100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-53,15
+53,6
@@
#include <errno.h>
#include <sys/wait.h>
#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
*/
/*
* prototypes
*/
@@
-358,7
+349,7
@@
static int user_from_string (struct option_t* dst, const char* val,
static void quad_to_string (char* dst, size_t dstlen,
struct option_t* option) {
static void quad_to_string (char* dst, size_t dstlen,
struct option_t* option) {
- char *vals[] = { "no", "yes", "ask-no", "ask-yes" };
+ c
onst c
har *vals[] = { "no", "yes", "ask-no", "ask-yes" };
snprintf (dst, dstlen, "%s=%s", option->option,
vals[quadoption (option->data)]);
}
snprintf (dst, dstlen, "%s=%s", option->option,
vals[quadoption (option->data)]);
}
@@
-1224,7
+1215,7
@@
static int parse_unattach_list (BUFFER *buf, BUFFER *s, LIST **ldata, BUFFER *er
return 0;
}
return 0;
}
-static int print_attach_list (LIST *lp, char op, char *name) {
+static int print_attach_list (LIST *lp, char op, c
onst c
har *name) {
while (lp) {
printf("attachments %c%s %s/%s\n", op, name,
((ATTACH_MATCH *)lp->data)->major,
while (lp) {
printf("attachments %c%s %s/%s\n", op, name,
((ATTACH_MATCH *)lp->data)->major,
@@
-1607,7
+1598,7
@@
static void mutt_set_default (const char* name, void* p, unsigned long more) {
}
static struct option_t* add_option (const char* name, const char* init,
}
static struct option_t* add_option (const char* name, const char* init,
- short type, short dup) {
+ short type, short d
od
up) {
struct option_t* option = mem_calloc (1, sizeof (struct option_t));
debug_print (1, ("adding $%s\n", name));
struct option_t* option = mem_calloc (1, sizeof (struct option_t));
debug_print (1, ("adding $%s\n", name));
@@
-1615,7
+1606,7
@@
static struct option_t* add_option (const char* name, const char* init,
option->option = str_dup (name);
option->type = type;
if (init)
option->option = str_dup (name);
option->type = type;
if (init)
- option->init = dup ? str_dup (init) : (char*) init;
+ option->init = d
od
up ? str_dup (init) : (char*) init;
return (option);
}
return (option);
}
@@
-1819,6
+1810,15
@@
static const struct mapping_t* get_sortmap (struct option_t* option) {
return (map);
}
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)
{
static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
BUFFER * err)
{