Commit a083d7f1 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: rename a variable to be more distinct and greppable

No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
...@@ -32,8 +32,8 @@ volatile sig_atomic_t the_window_resized = FALSE; ...@@ -32,8 +32,8 @@ volatile sig_atomic_t the_window_resized = FALSE;
#endif #endif
#ifdef __linux__ #ifdef __linux__
bool console; bool on_a_vt;
/* Whether we're running on a Linux VC (TRUE) or under X (FALSE). */ /* Whether we're running on a Linux VT or on something else. */
#endif #endif
bool meta_key; bool meta_key;
......
...@@ -1994,7 +1994,7 @@ int main(int argc, char **argv) ...@@ -1994,7 +1994,7 @@ int main(int argc, char **argv)
struct vt_stat dummy; struct vt_stat dummy;
/* Check whether we're running on a Linux console. */ /* Check whether we're running on a Linux console. */
console = (ioctl(0, VT_GETSTATE, &dummy) == 0); on_a_vt = (ioctl(0, VT_GETSTATE, &dummy) == 0);
#endif #endif
/* Back up the terminal settings so that they can be restored. */ /* Back up the terminal settings so that they can be restored. */
......
...@@ -30,7 +30,7 @@ extern volatile sig_atomic_t the_window_resized; ...@@ -30,7 +30,7 @@ extern volatile sig_atomic_t the_window_resized;
#endif #endif
#ifdef __linux__ #ifdef __linux__
extern bool console; extern bool on_a_vt;
#endif #endif
extern bool meta_key; extern bool meta_key;
......
...@@ -573,7 +573,7 @@ int parse_kbinput(WINDOW *win) ...@@ -573,7 +573,7 @@ int parse_kbinput(WINDOW *win)
* Shift/Ctrl/Alt are being held together with them. */ * Shift/Ctrl/Alt are being held together with them. */
unsigned char modifiers = 6; unsigned char modifiers = 6;
if (console && ioctl(0, TIOCLINUX, &modifiers) >= 0) { if (on_a_vt && ioctl(0, TIOCLINUX, &modifiers) >= 0) {
#ifndef NANO_TINY #ifndef NANO_TINY
/* Is Shift being held? */ /* Is Shift being held? */
if (modifiers & 0x01) { if (modifiers & 0x01) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment