Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set cbreak when starting #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
rsmarples committed Sep 2, 2019
commit adf24891cfd3491cd020865f0f9430229d74487a
1 change: 1 addition & 0 deletions sl.c
Original file line number Diff line number Diff line change
@@ -91,6 +91,7 @@ int main(int argc, char *argv[])
}
initscr();
signal(SIGINT, SIG_IGN);
cbreak();
noecho();
curs_set(0);
nodelay(stdscr, TRUE);