Remove redundant mouse mask variable

This commit is contained in:
Arun Prakash Jana 2020-02-14 18:48:44 +05:30
parent e664b2d29f
commit 9b199b3253
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -1372,7 +1372,7 @@ static bool selsafe(void)
} }
/* Initialize curses mode */ /* Initialize curses mode */
static bool initcurses(mmask_t *oldmask) static bool initcurses(void *oldmask)
{ {
short i; short i;
char *colors = xgetenv(env_cfg[NNN_COLORS], "4444"); char *colors = xgetenv(env_cfg[NNN_COLORS], "4444");
@ -1399,9 +1399,9 @@ static bool initcurses(mmask_t *oldmask)
keypad(stdscr, TRUE); keypad(stdscr, TRUE);
#ifndef NOMOUSE #ifndef NOMOUSE
#if NCURSES_MOUSE_VERSION <= 1 #if NCURSES_MOUSE_VERSION <= 1
mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED, oldmask); mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED, (mmask_t *)oldmask);
#else #else
mousemask(BUTTON1_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED, oldmask); mousemask(BUTTON1_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED, (mmask_t *)oldmask);
#endif #endif
mouseinterval(0); mouseinterval(0);
#endif #endif
@ -6443,10 +6443,12 @@ static void cleanup(void)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
mmask_t mask;
char *arg = NULL; char *arg = NULL;
char *session = NULL; char *session = NULL;
int opt; int opt;
#ifndef NOMOUSE
mmask_t mask;
#endif
while ((opt = getopt(argc, argv, "aAb:cdeEgHKnop:QrRs:St:vVxh")) != -1) { while ((opt = getopt(argc, argv, "aAb:cdeEgHKnop:QrRs:St:vVxh")) != -1) {
switch (opt) { switch (opt) {
@ -6739,7 +6741,11 @@ int main(int argc, char *argv[])
read_history(g_buf); read_history(g_buf);
#endif #endif
#ifndef NOMOUSE
if (!initcurses(&mask)) if (!initcurses(&mask))
#else
if (!initcurses(NULL))
#endif
return _FAILURE; return _FAILURE;
opt = browse(initpath, session); opt = browse(initpath, session);