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

Unified Diff: runtime/bin/stdin_win.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_macos.cc ('k') | runtime/bin/stdio.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/stdin_win.cc
diff --git a/runtime/bin/stdin_win.cc b/runtime/bin/stdin_win.cc
deleted file mode 100644
index 44e517de7a87d4440c80cb63dd06f14c77968a02..0000000000000000000000000000000000000000
--- a/runtime/bin/stdin_win.cc
+++ /dev/null
@@ -1,70 +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_WINDOWS)
-
-#include "bin/stdin.h"
-
-
-namespace dart {
-namespace bin {
-
-int Stdin::ReadByte() {
- HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
- uint8_t buffer[1];
- DWORD read = 0;
- int c = -1;
- if (ReadFile(h, buffer, 1, &read, NULL) && read == 1) {
- c = buffer[0];
- }
- return c;
-}
-
-
-bool Stdin::GetEchoMode() {
- HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
- DWORD mode;
- if (!GetConsoleMode(h, &mode)) return false;
- return (mode & ENABLE_ECHO_INPUT) != 0;
-}
-
-
-void Stdin::SetEchoMode(bool enabled) {
- HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
- DWORD mode;
- if (!GetConsoleMode(h, &mode)) return;
- if (enabled) {
- mode |= ENABLE_ECHO_INPUT;
- } else {
- mode &= ~ENABLE_ECHO_INPUT;
- }
- SetConsoleMode(h, mode);
-}
-
-
-bool Stdin::GetLineMode() {
- HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
- DWORD mode;
- if (!GetConsoleMode(h, &mode)) return false;
- return (mode & ENABLE_LINE_INPUT) != 0;
-}
-
-
-void Stdin::SetLineMode(bool enabled) {
- HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
- DWORD mode;
- if (!GetConsoleMode(h, &mode)) return;
- if (enabled) {
- mode |= ENABLE_LINE_INPUT;
- } else {
- mode &= ~ENABLE_LINE_INPUT;
- }
- SetConsoleMode(h, mode);
-}
-
-} // namespace bin
-} // namespace dart
-
-#endif // defined(TARGET_OS_WINDOWS)
« no previous file with comments | « runtime/bin/stdin_macos.cc ('k') | runtime/bin/stdio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698