aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-10-02 13:29:49 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-10-02 13:29:49 -0700
commitb9cb1e34c94a5461dcaf8bb76ca37d0e98016ffc (patch)
tree7f8b223eb0319eb80335990abd612c9d693e7b89
parent05e37166fce89a95561de1f5a95e52dd6e284333 (diff)
Moved some variables out of global scope that weren't needed there.
-rw-r--r--bb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bb.c b/bb.c
index 8f5414d..c65a1c7 100644
--- a/bb.c
+++ b/bb.c
@@ -12,9 +12,7 @@
static struct termios orig_termios, bb_termios;
static FILE *tty_out = NULL, *tty_in = NULL;
static int termwidth, termheight;
-static int mouse_x, mouse_y;
static char *cmdfilename = NULL;
-static struct timespec lastclick = {0, 0};
/*
* Use bb to browse a path.
@@ -76,7 +74,8 @@ void bb_browse(bb_t *bb, const char *path)
goto redraw;
}
- int key;
+ int key, mouse_x, mouse_y;
+ static struct timespec lastclick = {0, 0};
get_keyboard_input:
key = bgetkey(tty_in, &mouse_x, &mouse_y);
switch (key) {