static int dotlock_file(const char *path, int retry)
{
- char lockfile[PATH_MAX];
+ char lockfile[_POSIX_PATH_MAX];
snprintf(lockfile, sizeof(lockfile), "%s.lock", path);
if (lockfile_create(lockfile, retry ? 1 : 0, 0)) {
static int undotlock_file (const char *path)
{
- char lockfile[PATH_MAX];
+ char lockfile[_POSIX_PATH_MAX];
snprintf(lockfile, sizeof(lockfile), "%s.lock", path);
return lockfile_remove(lockfile);
}
#endif
case OP_JUMP:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (isdigit (LastKey))
*/
case OP_MAIN_DELETE_PATTERN:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_MAIN_FETCH_MAIL:
-
CHECK_ATTACH;
pop_fetch_mail ();
menu->redraw = REDRAW_FULL;
break;
case OP_HELP:
-
mutt_help (MENU_MAIN);
menu->redraw = REDRAW_FULL;
break;
case OP_MAIN_LIMIT:
case OP_TOGGLE_READ:
-
CHECK_IN_MAILBOX;
menu->oldcurrent = (Context->vcount && menu->current >= 0
&& menu->current <
break;
case OP_QUIT:
-
closed = op;
if (attach_msg) {
done = 1;
case OP_SEARCH_REVERSE:
case OP_SEARCH_NEXT:
case OP_SEARCH_OPPOSITE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if ((menu->current = mutt_search_command (menu->current, op)) == -1)
case OP_SORT:
case OP_SORT_REVERSE:
-
if (mutt_select_sort ((op == OP_SORT_REVERSE)) == 0) {
if (Context && Context->msgcount) {
resort_index (menu);
break;
case OP_TAG:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (tag && !option (OPTAUTOTAG)) {
break;
case OP_MAIN_TAG_PATTERN:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
mutt_pattern_func (M_TAG, _("Tag messages matching: "));
break;
case OP_MAIN_UNDELETE_PATTERN:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_MAIN_UNTAG_PATTERN:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (mutt_pattern_func (M_UNTAG, _("Untag messages matching: ")) == 0)
break;
case OP_MAIN_SYNC_FOLDER:
-
if (Context && !Context->msgcount)
break;
continue;
case OP_EXIT:
-
closed = op;
if (menu->menu == MENU_MAIN && attach_msg) {
done = 1;
break;
case OP_EDIT_TYPE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
break;
case OP_MAIN_BREAK_THREAD:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_MAIN_LINK_THREADS:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_MAIN_NEXT_UNDELETED:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (menu->current >= Context->vcount - 1) {
break;
case OP_NEXT_ENTRY:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (menu->current >= Context->vcount - 1) {
break;
case OP_MAIN_PREV_UNDELETED:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (menu->current < 1) {
break;
case OP_PREV_ENTRY:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (menu->current < 1) {
case OP_MAIN_PREV_UNREAD:
case OP_MAIN_NEXT_NEW_THEN_UNREAD:
case OP_MAIN_PREV_NEW_THEN_UNREAD:
-
{
int first_unread = -1;
int first_new = -1;
break;
}
case OP_FLAG_MESSAGE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_TOGGLE_NEW:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_TOGGLE_WRITE:
-
CHECK_IN_MAILBOX;
if (mx_toggle_write (Context) == 0)
menu->redraw |= REDRAW_STATUS;
case OP_MAIN_NEXT_SUBTHREAD:
case OP_MAIN_PREV_THREAD:
case OP_MAIN_PREV_SUBTHREAD:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
switch (op) {
break;
case OP_MAIN_PARENT_MESSAGE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
case OP_MAIN_SET_FLAG:
case OP_MAIN_CLEAR_FLAG:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
*/
case OP_BOUNCE_MESSAGE:
-
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
break;
case OP_CREATE_ALIAS:
-
mutt_create_alias (Context
&& Context->vcount ? CURHDR->env : NULL, NULL);
MAYBE_REDRAW (menu->redraw);
case OP_PURGE_MESSAGE:
case OP_DELETE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
case OP_DELETE_THREAD:
case OP_DELETE_SUBTHREAD:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
#endif
case OP_DISPLAY_ADDRESS:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
mutt_display_address (CURHDR->env);
break;
case OP_ENTER_COMMAND:
-
CurrentMenu = MENU_MAIN;
mutt_enter_command ();
mutt_check_rescore (Context);
break;
case OP_EDIT_MESSAGE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
break;
case OP_FORWARD_MESSAGE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
break;
case OP_GROUP_REPLY:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_ATTACH;
break;
case OP_LIST_REPLY:
-
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
break;
case OP_MAIL:
-
CHECK_ATTACH;
ci_send_message (0, NULL, NULL, Context, NULL);
menu->redraw = REDRAW_FULL;
break;
case OP_RECALL_MESSAGE:
-
CHECK_ATTACH;
ci_send_message (SENDPOSTPONED, NULL, NULL, Context, NULL);
menu->redraw = REDRAW_FULL;
break;
case OP_RESEND:
-
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
case OP_POST:
case OP_FOLLOWUP:
case OP_FORWARD_TO_GROUP:
-
CHECK_ATTACH;
if ((op == OP_FOLLOWUP || op == OP_FORWARD_TO_GROUP) &&
Context && Context->msgcount == 0) {
#endif
case OP_REPLY:
-
CHECK_ATTACH;
CHECK_MSGCOUNT;
CHECK_VISIBLE;
break;
case OP_SHELL_ESCAPE:
-
mutt_shell_escape ();
MAYBE_REDRAW (menu->redraw);
break;
case OP_TAG_THREAD:
case OP_TAG_SUBTHREAD:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
rc = mutt_thread_set_flag (CURHDR, M_TAG, !CURHDR->tagged,
break;
case OP_UNDELETE:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
case OP_UNDELETE_THREAD:
case OP_UNDELETE_SUBTHREAD:
-
CHECK_MSGCOUNT;
CHECK_VISIBLE;
CHECK_READONLY;
case OP_SIDEBAR_PREV_NEW:
sidebar_scroll (op);
break;
+
default:
if (menu->menu == MENU_MAIN)
km_error_key (MENU_MAIN);