X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mx.c;h=fde597c67fec215ea0fbbcd11de5680e8c09efda;hp=1d5a7507842a37844b137432693d920320cc6234;hb=98cf5779d8184a74541be1bc61d15c5f35efd310;hpb=bd5c6e968ae1f29f5819d1e39ec104cc632ad545 diff --git a/mx.c b/mx.c index 1d5a750..fde597c 100644 --- a/mx.c +++ b/mx.c @@ -58,7 +58,7 @@ static list2_t* MailboxFormats = NULL; * retry - should retry if unable to lock? */ -static int invoke_dotlock (const char *path, int dummy, int flags, int retry) +static int invoke_dotlock (const char *path, int flags, int retry) { char cmd[LONG_STRING + _POSIX_PATH_MAX]; char f[SHORT_STRING + _POSIX_PATH_MAX]; @@ -82,7 +82,7 @@ static int invoke_dotlock (const char *path, int dummy, int flags, int retry) return mutt_system (cmd); } -static int dotlock_file (const char *path, int fd, int retry) +static int dotlock_file (const char *path, int retry) { int r; int flags = DL_FL_USEPRIV | DL_FL_RETRY; @@ -91,7 +91,7 @@ static int dotlock_file (const char *path, int fd, int retry) retry = 1; retry_lock: - if ((r = invoke_dotlock (path, fd, flags, retry)) == DL_EX_EXIST) { + if ((r = invoke_dotlock (path, flags, retry)) == DL_EX_EXIST) { if (!option (OPTNOCURSES)) { char msg[LONG_STRING]; @@ -111,9 +111,9 @@ retry_lock: return (r == DL_EX_OK ? 0 : -1); } -static int undotlock_file (const char *path, int fd) +static int undotlock_file (const char *path) { - return (invoke_dotlock (path, fd, DL_FL_USEPRIV | DL_FL_UNLOCK, 0) == + return (invoke_dotlock (path, DL_FL_USEPRIV | DL_FL_UNLOCK, 0) == DL_EX_OK ? 0 : -1); } @@ -236,7 +236,7 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int time_out) #ifdef USE_DOTLOCK if (r == 0 && dot) - r = dotlock_file (path, fd, time_out); + r = dotlock_file (path, time_out); #endif /* USE_DOTLOCK */ if (r == -1) { @@ -274,13 +274,13 @@ int mx_unlock_file (const char *path, int fd, int dot) #ifdef USE_DOTLOCK if (dot) - undotlock_file (path, fd); + undotlock_file (path); #endif return 0; } -void mx_unlink_empty (const char *path) +static void mx_unlink_empty (const char *path) { int fd; @@ -297,7 +297,7 @@ void mx_unlink_empty (const char *path) } #ifdef USE_DOTLOCK - invoke_dotlock (path, fd, DL_FL_UNLINK, 1); + invoke_dotlock (path, DL_FL_UNLINK, 1); #else if (fstat (fd, &sb) == 0 && sb.st_size == 0) unlink (path); @@ -1368,7 +1368,7 @@ int mx_rebuild_cache (void) { if (magic != M_MAILDIR && magic != M_MH && magic != M_IMAP) continue; sidebar_set_current (b->path); - sidebar_draw (CurrentMenu); + sidebar_draw (); if ((ctx = mx_open_mailbox (b->path, M_READONLY | M_NOSORT | M_COUNT, NULL)) != NULL) @@ -1378,7 +1378,7 @@ int mx_rebuild_cache (void) { if (Context && Context->path) sidebar_set_current (Context->path); - sidebar_draw (CurrentMenu); + sidebar_draw (); return (0); #endif