diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-12-02 17:46:48 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-12-02 17:46:48 +0100 |
commit | b94257f73f6d8a16a7c6bdb61c1eb3291bbf6d6e (patch) | |
tree | 42cbc1f78ff52862b0555f8cf9facba1b7d05ff5 | |
parent | support for +, -, and q (diff) | |
download | read-quickly-b94257f73f6d8a16a7c6bdb61c1eb3291bbf6d6e.tar.gz read-quickly-b94257f73f6d8a16a7c6bdb61c1eb3291bbf6d6e.tar.bz2 read-quickly-b94257f73f6d8a16a7c6bdb61c1eb3291bbf6d6e.tar.xz |
support for down, right, and p
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/rq.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -211,6 +211,7 @@ static int display_file(int fd, int ttyfd, long rate) size_t size = 0; void *new; int saved_errno; + int timer_set = 1; char *s; char *end; char c; @@ -263,13 +264,17 @@ static int display_file(int fd, int ttyfd, long rate) SET_RATE; goto rewait; case 'p': /* P */ - ;/* TODO pause*/ - break; + if (timer_set) + memset(&interval, 0, sizeof(interval)); + else + SET_RATE; + setitimer(ITIMER_REAL, &interval, NULL); + timer_set ^= 1; + goto rewait; case 'q': /* Q */ goto done; case 'B': /* down */ case 'C': /* right */ - ;/* TODO next */ break; case 'A': /* up */ case 'D': /* left */ |