return (v);
default:
- v = mutt_yesorno(prompt, (v == M_ASKYES));
- CLEARLINE(main_w, LINES - 1);
- return (v);
+ return mutt_yesorno(prompt, (v == M_ASKYES));
}
}
return (v);
default:
- v = mutt_yesorno (prompt, (v == M_ASKYES));
- CLEARLINE(main_w, LINES - 1);
- return (v);
+ return mutt_yesorno(prompt, (v == M_ASKYES));
}
-
- /* not reached */
}
/* always wise to do what someone else did before */
return;
mutt_option_value(ptr->option, buf, sizeof(buf));
- if (m_strlen(ptr->init) == 0 && buf && *buf)
+ if (m_strlen(ptr->init) == 0 && *buf)
ptr->init = m_strdup(buf);
}
p_delete(&init);
}
- if (ptr->flags & R_INDEX)
- set_option (OPTFORCEREDRAWINDEX);
- if (ptr->flags & R_PAGER)
- set_option (OPTFORCEREDRAWPAGER);
- if (ptr->flags & R_RESORT_SUB)
- set_option (OPTSORTSUBTHREADS);
- if (ptr->flags & R_RESORT)
- set_option (OPTNEEDRESORT);
- if (ptr->flags & R_RESORT_INIT)
- set_option (OPTRESORTINIT);
- if (ptr->flags & R_TREE)
- set_option (OPTREDRAWTREE);
+ set_option (OPTFORCEREDRAWINDEX);
+ set_option (OPTFORCEREDRAWPAGER);
+ set_option (OPTSORTSUBTHREADS);
+ set_option (OPTNEEDRESORT);
+ set_option (OPTRESORTINIT);
+ set_option (OPTREDRAWTREE);
}
static int check_num (const char* option, unsigned long p,
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)
{
set_option (OPTREDRAWTREE);
return (0);
} else {
- CHECK_PAGER;
mutt_restore_default (NULL, option, 1);
}
}
return 0;
}
- CHECK_PAGER;
if (unset)
unset_option (option->data);
else if (inv)
/* XXX maybe we need to get unset into handlers? */
if (DTYPE (option->type) == DT_STR || DTYPE (option->type) == DT_PATH) {
if (unset) {
- CHECK_PAGER;
p_delete((void **)(void *)&option->data);
break;
}
break;
}
- CHECK_PAGER;
s->dptr++;
mutt_extract_token (tmp, s, 0);
if (!FuncTable[DTYPE (option->type)].opt_fromstr
}
if (*s->dptr == '=') {
- CHECK_PAGER;
s->dptr++;
mutt_extract_token (tmp, s, 0);
if (ascii_strcasecmp ("yes", tmp->data) == 0)
break;
}
- if (option->flags & R_INDEX)
- set_option (OPTFORCEREDRAWINDEX);
- if (option->flags & R_PAGER)
- set_option (OPTFORCEREDRAWPAGER);
- if (option->flags & R_RESORT_SUB)
- set_option (OPTSORTSUBTHREADS);
- if (option->flags & R_RESORT)
- set_option (OPTNEEDRESORT);
- if (option->flags & R_RESORT_INIT)
- set_option (OPTRESORTINIT);
- if (option->flags & R_TREE)
- set_option (OPTREDRAWTREE);
+ set_option (OPTFORCEREDRAWINDEX);
+ set_option (OPTFORCEREDRAWPAGER);
+ set_option (OPTSORTSUBTHREADS);
+ set_option (OPTNEEDRESORT);
+ set_option (OPTRESORTINIT);
+ set_option (OPTREDRAWTREE);
}
return (r);
}
Realname = m_strdup(rnbuf);
}
-#ifdef USE_NNTP
- {
- FILE *f;
- char *q;
-
- if ((f = safe_fopen (SYSCONFDIR "/nntpserver", "r"))) {
- buffer[0] = '\0';
- fgets (buffer, sizeof(buffer), f);
- p = vskipspaces(buffer);
- q = (char*)p;
- while (*q && !isspace(*q))
- q++;
- *q = '\0';
- NewsServer = m_strdup(p);
- m_fclose(&f);
- }
- }
- if ((p = getenv ("NNTPSERVER")))
- NewsServer = m_strdup(p);
-#endif
-
if ((p = getenv("MAIL") ?: getenv("MAILDIR"))) {
Spoolfile = m_strdup(p);
} else {
hash_map (ConfigOptions, mutt_restore_default, 0);
CurrentMenu = MENU_MAIN;
-
-#ifdef HAVE_GETSID
- /* Unset suspend by default if we're the session leader */
- if (getsid (0) == getpid ())
- unset_option (OPTSUSPEND);
-#endif
-
mutt_init_history ();
if (!Muttrc) {
}
}
-int mutt_get_hook_type (const char *name)
-{
- struct command_t *c;
-
- for (c = Commands; c->name; c++)
- if (c->func == mutt_parse_hook && ascii_strcasecmp (c->name, name) == 0)
- return c->data;
- return 0;
-}
-