Index: runtime/bin/stdin_linux.cc |
diff --git a/runtime/bin/stdin_linux.cc b/runtime/bin/stdin_linux.cc |
deleted file mode 100644 |
index c64610aed7283c00b59b4f3609b29f14312a20cd..0000000000000000000000000000000000000000 |
--- a/runtime/bin/stdin_linux.cc |
+++ /dev/null |
@@ -1,69 +0,0 @@ |
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-#include "platform/globals.h" |
-#if defined(TARGET_OS_LINUX) |
- |
-#include <termios.h> // NOLINT |
- |
-#include "bin/stdin.h" |
-#include "bin/fdutils.h" |
- |
- |
-namespace dart { |
-namespace bin { |
- |
-int Stdin::ReadByte() { |
- FDUtils::SetBlocking(fileno(stdin)); |
- int c = getchar(); |
- if (c == EOF) { |
- c = -1; |
- } |
- FDUtils::SetNonBlocking(fileno(stdin)); |
- return c; |
-} |
- |
- |
-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); |
- if (enabled) { |
- term.c_lflag |= ECHO|ECHONL; |
- } else { |
- term.c_lflag &= ~(ECHO|ECHONL); |
- } |
- tcsetattr(fileno(stdin), TCSANOW, &term); |
-} |
- |
- |
-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); |
- if (enabled) { |
- term.c_lflag |= ICANON; |
- } else { |
- term.c_lflag &= ~(ICANON); |
- } |
- tcsetattr(fileno(stdin), TCSANOW, &term); |
-} |
- |
-} // namespace bin |
-} // namespace dart |
- |
-#endif // defined(TARGET_OS_LINUX) |
- |