aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-10-08 00:44:33 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-10-08 00:44:33 +0100
commit10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6 (patch)
tree2885db0d3e1fbe0213156717c29803ad6ed18860 /termkey.c
parentac6cae29bb1384fa5afb7dbe16c556328b880b6a (diff)
downloadtermo-10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6.tar.gz
termo-10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6.tar.xz
termo-10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6.zip
Pass an explicit 'force' parameter into driver's getkey rather than relying on non-zero waittime
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/termkey.c b/termkey.c
index 98726fd..a5f73db 100644
--- a/termkey.c
+++ b/termkey.c
@@ -363,19 +363,12 @@ static termkey_result getkey_simple(termkey_t *tk, termkey_key *key)
termkey_result termkey_getkey(termkey_t *tk, termkey_key *key)
{
- return (*tk->driver.getkey)(tk, key);
+ return (*tk->driver.getkey)(tk, key, 0);
}
termkey_result termkey_getkey_force(termkey_t *tk, termkey_key *key)
{
- int old_waittime = tk->waittime;
- tk->waittime = 0;
-
- termkey_result ret = termkey_getkey(tk, key);
-
- tk->waittime = old_waittime;
-
- return ret;
+ return (*tk->driver.getkey)(tk, key, 1);
}
termkey_result termkey_waitkey(termkey_t *tk, termkey_key *key)