From cf9580036a830f9e95f32dbcedfc57ea1697f120 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 20 Oct 2011 16:59:15 -0200 Subject: perf ui browser: Use libslang to read keys Just another step in stopping the use of libnewt in perf. Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-uy6s534uqxq8tenh6s3k8ocj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/ui/setup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/perf/util/ui/setup.c') diff --git a/tools/perf/util/ui/setup.c b/tools/perf/util/ui/setup.c index 5111f1ae0447..1e6ba06980c4 100644 --- a/tools/perf/util/ui/setup.c +++ b/tools/perf/util/ui/setup.c @@ -18,6 +18,18 @@ static void newt_suspend(void *d __used) newtResume(); } +static int ui__init(void) +{ + int err = SLkp_init(); + + if (err < 0) + goto out; + + SLkp_define_keysym((char *)"^(kB)", SL_KEY_UNTAB); +out: + return err; +} + static void ui__exit(void) { SLtt_set_cursor_visibility(1); @@ -44,6 +56,7 @@ void setup_browser(bool fallback_to_pager) use_browser = 1; newtInit(); + ui__init(); newtSetSuspendCallback(newt_suspend, NULL); ui_helpline__init(); ui_browser__init(); -- cgit v1.2.3-59-g8ed1b