Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1515)

Unified Diff: runtime/bin/stdin_macos.cc

Issue 102123010: Add getter for hasTerminal, terminalColumns and terminalLines on stdout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add include of thread.h and fix io_patch. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/stdin_linux.cc ('k') | runtime/bin/stdin_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/stdin_macos.cc
diff --git a/runtime/bin/stdin_macos.cc b/runtime/bin/stdin_macos.cc
deleted file mode 100644
index a8afb77ecefbc376f04a8899c12c303f6160fa93..0000000000000000000000000000000000000000
--- a/runtime/bin/stdin_macos.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_MACOS)
-
-#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_MACOS)
-
« no previous file with comments | « runtime/bin/stdin_linux.cc ('k') | runtime/bin/stdin_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698