diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-23 22:40:58 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-23 22:40:58 +0300 |
commit | ee21249aa2d16c92cf9e122892627e25f8280ead (patch) | |
tree | 35e27de0dcb10a32fe7dd91172afb2c1e64a1906 /src | |
parent | 29987adf34007c0fc60971db7746ea0815b0808a (diff) |
memview: make q key quit the program
Diffstat (limited to 'src')
-rw-r--r-- | src/memview.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/memview.c b/src/memview.c index 49a503b..07c50b1 100644 --- a/src/memview.c +++ b/src/memview.c @@ -717,6 +717,13 @@ out: } static void +q_quit(void *arg) +{ + (void)arg; + exit(EXIT_SUCCESS); +} + +static void goto_offset(void *arg) { (void)arg; @@ -913,6 +920,7 @@ main(int argc, char *argv[]) { .seq = { 0x1b, '[', 'B', 0 }, .fun = navigate, .arg = MOVE_DOWN }, { .seq = { 0x1b, '[', 'C', 0 }, .fun = navigate, .arg = MOVE_RIGHT }, { .seq = { 0x1b, '[', 'D', 0 }, .fun = navigate, .arg = MOVE_LEFT }, + { .seq = { 'q', 0 }, .fun = q_quit }, { .seq = { 'o', 0 }, .fun = goto_offset }, { .seq = { 'f', 0 }, .fun = follow }, { .seq = { 'w', 0 }, .fun = write_bytes }, |