| Index: runtime/bin/stdin_macos.cc
|
| diff --git a/runtime/bin/stdin_macos.cc b/runtime/bin/stdin_macos.cc
|
| index 0bea869609749e059a7a639eae818fcdab9d67f7..a8afb77ecefbc376f04a8899c12c303f6160fa93 100644
|
| --- a/runtime/bin/stdin_macos.cc
|
| +++ b/runtime/bin/stdin_macos.cc
|
| @@ -25,6 +25,13 @@ int Stdin::ReadByte() {
|
| }
|
|
|
|
|
| +bool Stdin::GetEchoMode() {
|
| + struct termios term;
|
| + tcgetattr(fileno(stdin), &term);
|
| + return (term.c_lflag & ECHO) != 0;
|
| +}
|
| +
|
| +
|
| void Stdin::SetEchoMode(bool enabled) {
|
| struct termios term;
|
| tcgetattr(fileno(stdin), &term);
|
| @@ -37,6 +44,13 @@ void Stdin::SetEchoMode(bool enabled) {
|
| }
|
|
|
|
|
| +bool Stdin::GetLineMode() {
|
| + struct termios term;
|
| + tcgetattr(fileno(stdin), &term);
|
| + return (term.c_lflag & ICANON) != 0;
|
| +}
|
| +
|
| +
|
| void Stdin::SetLineMode(bool enabled) {
|
| struct termios term;
|
| tcgetattr(fileno(stdin), &term);
|
|
|