aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-14 18:48:44 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-02-14 18:48:44 +0530
commit9b199b32535b6b28ea3845a975deac23465e5c16 (patch)
tree97b5b210e278f8934b1f2fd90f0dcfe56e684fa7 /src
parente664b2d29f67724789d3a4a083ef07c13bec8904 (diff)
downloadnnn-9b199b32535b6b28ea3845a975deac23465e5c16.tar.gz
Remove redundant mouse mask variable
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 1a85895..2285178 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1372,7 +1372,7 @@ static bool selsafe(void)
}
/* Initialize curses mode */
-static bool initcurses(mmask_t *oldmask)
+static bool initcurses(void *oldmask)
{
short i;
char *colors = xgetenv(env_cfg[NNN_COLORS], "4444");
@@ -1399,9 +1399,9 @@ static bool initcurses(mmask_t *oldmask)
keypad(stdscr, TRUE);
#ifndef NOMOUSE
#if NCURSES_MOUSE_VERSION <= 1
- mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED, oldmask);
+ mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED, (mmask_t *)oldmask);
#else
- mousemask(BUTTON1_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED, oldmask);
+ mousemask(BUTTON1_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED, (mmask_t *)oldmask);
#endif
mouseinterval(0);
#endif
@@ -6443,10 +6443,12 @@ static void cleanup(void)
int main(int argc, char *argv[])
{
- mmask_t mask;
char *arg = NULL;
char *session = NULL;
int opt;
+#ifndef NOMOUSE
+ mmask_t mask;
+#endif
while ((opt = getopt(argc, argv, "aAb:cdeEgHKnop:QrRs:St:vVxh")) != -1) {
switch (opt) {
@@ -6739,7 +6741,11 @@ int main(int argc, char *argv[])
read_history(g_buf);
#endif
+#ifndef NOMOUSE
if (!initcurses(&mask))
+#else
+ if (!initcurses(NULL))
+#endif
return _FAILURE;
opt = browse(initpath, session);