From adf24891cfd3491cd020865f0f9430229d74487a Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 2 Sep 2019 16:10:21 +0100 Subject: [PATCH] Set cbreak when starting From nodelay(3) Initially the terminal may or may not be in cbreak mode, as the mode is inherited; therefore, a program should call cbreak or nocbreak explicitly. Most interactive programs using curses set the cbreak mode. Note that cbreak overrides raw. [See curs_getch(3X) for a discussion of how these routines interact with echo and noecho.] This allows sl to function perfectly on NetBSD Curses. --- sl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sl.c b/sl.c index e549ac8c..78278d37 100644 --- a/sl.c +++ b/sl.c @@ -91,6 +91,7 @@ int main(int argc, char *argv[]) } initscr(); signal(SIGINT, SIG_IGN); + cbreak(); noecho(); curs_set(0); nodelay(stdscr, TRUE);