Skip to content

Commit

Permalink
Merge pull request #51 from mkustermann/cleanup
Browse files Browse the repository at this point in the history
Small cleanup: Mask out CSIZE bits setting CS8, remove duplicate ~ENABLE_ECHO_INPUT
  • Loading branch information
Tim Sneath authored Sep 28, 2022
2 parents c285a48 + 78bcf12 commit 0fa2843
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/ffi/unix/termlib_unix.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TermLibUnix implements TermLib {
..ref.c_iflag =
origTermIOS.c_iflag & ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON)
..ref.c_oflag = origTermIOS.c_oflag & ~OPOST
..ref.c_cflag = origTermIOS.c_cflag | CS8
..ref.c_cflag = (origTermIOS.c_cflag & ~CSIZE) | CS8
..ref.c_lflag = origTermIOS.c_lflag & ~(ECHO | ICANON | IEXTEN | ISIG)
..ref.c_cc = origTermIOS.c_cc
..ref.c_cc[VMIN] = 0 // VMIN -- return each byte, or 0 for timeout
Expand Down
1 change: 0 additions & 1 deletion lib/src/ffi/win/termlib_win.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class TermLibWindows implements TermLib {
@override
void enableRawMode() {
final dwMode = (~ENABLE_ECHO_INPUT) &
(~ENABLE_ECHO_INPUT) &
(~ENABLE_PROCESSED_INPUT) &
(~ENABLE_LINE_INPUT) &
(~ENABLE_WINDOW_INPUT);
Expand Down

0 comments on commit 0fa2843

Please sign in to comment.