summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-12-03 22:50:09 +0000
committernicm <nicm@openbsd.org>2009-12-03 22:50:09 +0000
commit197ec97c8443d9515f7229a99d8cf5b485aa116b (patch)
tree82c19c9b632b9376bb8ab52e8dcaf1e4525abe49 /usr.bin/tmux/tty-keys.c
parentStop the IdleHold timer when going to idle state. This makes it a bit (diff)
downloadwireguard-openbsd-197ec97c8443d9515f7229a99d8cf5b485aa116b.tar.xz
wireguard-openbsd-197ec97c8443d9515f7229a99d8cf5b485aa116b.zip
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying colours...
Diffstat (limited to 'usr.bin/tmux/tty-keys.c')
-rw-r--r--usr.bin/tmux/tty-keys.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index f96493a23f1..9f2abbfb807 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.26 2009/12/01 07:59:40 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.27 2009/12/03 22:50:10 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -35,7 +35,7 @@ void tty_keys_add1(struct tty_key **, const char *, int);
void tty_keys_add(struct tty *, const char *, int);
void tty_keys_free1(struct tty_key *);
struct tty_key *tty_keys_find1(
- struct tty_key *, const char *, size_t, size_t *);
+ struct tty_key *, const char *, size_t, size_t *);
struct tty_key *tty_keys_find(struct tty *, const char *, size_t, size_t *);
void tty_keys_callback(int, short, void *);
int tty_keys_mouse(
@@ -50,7 +50,7 @@ struct tty_key_ent {
#define TTYKEY_RAW 0x1
};
-/*
+/*
* Default key tables. Those flagged with TTYKEY_RAW are inserted directly,
* otherwise they are looked up in terminfo(5).
*/
@@ -319,7 +319,7 @@ tty_keys_add1(struct tty_key **tkp, const char *s, int key)
/* Use the child tree for the next character. */
tkp = &tk->next;
- } else {
+ } else {
if (*s < tk->ch)
tkp = &tk->left;
else if (*s > tk->ch)
@@ -374,7 +374,7 @@ tty_keys_free1(struct tty_key *tk)
if (tk->right != NULL)
tty_keys_free1(tk->right);
xfree(tk);
-
+
}
/* Lookup a key in the tree. */
@@ -523,11 +523,11 @@ start_timer:
/* Start the timer and wait for expiry or more data. */
tv.tv_sec = 0;
tv.tv_usec = ESCAPE_PERIOD * 1000L;
-
+
evtimer_del(&tty->key_timer);
evtimer_set(&tty->key_timer, tty_keys_callback, tty);
evtimer_add(&tty->key_timer, &tv);
-
+
tty->flags |= TTY_ESCAPE;
return (0);
@@ -548,7 +548,7 @@ found_key:
goto handle_key;
handle_key:
- evtimer_del(&tty->key_timer);
+ evtimer_del(&tty->key_timer);
tty->key_callback(key, &mouse, tty->key_data);
@@ -570,7 +570,7 @@ tty_keys_callback(unused int fd, unused short events, void *data)
;
}
-/*
+/*
* Handle mouse key input. Returns 0 for success, -1 for failure, 1 for partial
* (probably a mouse sequence but need more data).
*/
@@ -593,7 +593,7 @@ tty_keys_mouse(const char *buf, size_t len, size_t *size, struct mouse_event *m)
return (-1);
if (len == 2)
return (1);
-
+
if (buf[2] != 'M')
return (-1);
if (len == 3)