summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-07-01 14:46:23 -0500
committerRob Landley <rob@landley.net>2015-07-01 14:46:23 -0500
commit56217bb175cdf9506b9b7970edd313c1fef8e122 (patch)
treead05322516cccd2cd8c81ee89d9bafb9122013b2
parent5ea916753b300cf6c4a3d40d28d09e82a2544f86 (diff)
downloadtoybox-56217bb175cdf9506b9b7970edd313c1fef8e122.tar.gz
toybox-56217bb175cdf9506b9b7970edd313c1fef8e122.tar.bz2
toybox-56217bb175cdf9506b9b7970edd313c1fef8e122.zip
Fix top.c build.
Broken by recent lib.h additions.
-rw-r--r--toys/pending/top.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/toys/pending/top.c b/toys/pending/top.c
index 700baba..fd7e879 100644
--- a/toys/pending/top.c
+++ b/toys/pending/top.c
@@ -60,11 +60,6 @@ struct cpu_info {
unsigned long long total;
};
-enum CODE{
- KEY_UP = 0x100, KEY_DOWN, KEY_HOME,
- KEY_END, KEY_PAGEUP, KEY_PAGEDN,
-};
-
struct keycode_map_s {
char *key;
int code;
@@ -208,8 +203,8 @@ static int get_key_code(char *ch, int i)
};
static struct keycode_map_s type3[] = {
- {"[1~", KEY_HOME}, {"[4~", KEY_END}, {"[5~", KEY_PAGEUP},
- {"[6~", KEY_PAGEDN}, {"[7~", KEY_HOME}, {"[8~", KEY_END},
+ {"[1~", KEY_HOME}, {"[4~", KEY_END}, {"[5~", KEY_PGUP},
+ {"[6~", KEY_PGDN}, {"[7~", KEY_HOME}, {"[8~", KEY_END},
{NULL, 0}
};
struct keycode_map_s *table, *keytable[3] = {type2, type3, NULL};
@@ -833,10 +828,10 @@ void top_main(void )
case KEY_END:
TT.scroll_offset = TT.num_new_procs - TT.rows/2;
break;
- case KEY_PAGEUP:
+ case KEY_PGUP:
TT.scroll_offset -= TT.rows/2;
break;
- case KEY_PAGEDN:
+ case KEY_PGDN:
TT.scroll_offset += TT.rows/2;
break;
}