perf ui browser: Use libslang to read keys

Just another step in stopping the use of libnewt in perf.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-uy6s534uqxq8tenh6s3k8ocj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2011-10-20 16:59:15 -02:00
parent 29208e573a
commit cf9580036a
9 changed files with 125 additions and 64 deletions

View File

@ -118,7 +118,7 @@ static void hists__find_annotations(struct hists *self, int evidx,
int nr_events)
{
struct rb_node *nd = rb_first(&self->entries), *next;
int key = KEY_RIGHT;
int key = K_RIGHT;
while (nd) {
struct hist_entry *he = rb_entry(nd, struct hist_entry, rb_node);
@ -130,7 +130,7 @@ static void hists__find_annotations(struct hists *self, int evidx,
notes = symbol__annotation(he->ms.sym);
if (notes->src == NULL) {
find_next:
if (key == KEY_LEFT)
if (key == K_LEFT)
nd = rb_prev(nd);
else
nd = rb_next(nd);
@ -141,10 +141,10 @@ find_next:
key = hist_entry__tui_annotate(he, evidx, nr_events,
NULL, NULL, 0);
switch (key) {
case KEY_RIGHT:
case K_RIGHT:
next = rb_next(nd);
break;
case KEY_LEFT:
case K_LEFT:
next = rb_prev(nd);
break;
default: