From 0e120d8153a28f825a74d0c976c9d2f208e9e267 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 27 May 2015 15:57:38 -0700 Subject: 1486 - repl: hitting enter now working --- termbox/termbox.c | 5 +++++ termbox/termbox.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'termbox') diff --git a/termbox/termbox.c b/termbox/termbox.c index 80aeb3a9..0e4d5a9f 100644 --- a/termbox/termbox.c +++ b/termbox/termbox.c @@ -153,6 +153,11 @@ void tb_shutdown(void) termw = termh = -1; } +int tb_is_active(void) +{ + return termw != -1; +} + void tb_present(void) { int x,y,w,i; diff --git a/termbox/termbox.h b/termbox/termbox.h index 0bd55be9..ac31230a 100644 --- a/termbox/termbox.h +++ b/termbox/termbox.h @@ -44,6 +44,8 @@ int tb_init(void); /* Restore terminal mode. */ void tb_shutdown(void); +int tb_is_active(void); + /* Size of the screen. Return negative values before tb_init() or after * tb_shutdown() */ int tb_width(void); -- cgit 1.4.1-2-gfad0