| Index: runtime/bin/stdio_patch.dart
|
| diff --git a/runtime/bin/stdio_patch.dart b/runtime/bin/stdio_patch.dart
|
| index e537dc87212029c4cb756032c4949d545cdb1897..3efd7d02675ab9efee6982954a3bc69a92858795 100644
|
| --- a/runtime/bin/stdio_patch.dart
|
| +++ b/runtime/bin/stdio_patch.dart
|
| @@ -83,11 +83,20 @@
|
| }
|
| }
|
|
|
| + @patch bool get ansiSupported {
|
| + var result = _ansiSupported();
|
| + if (result is OSError) {
|
| + throw new StdinException("Error determining ANSI support", result);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| static _echoMode() native "Stdin_GetEchoMode";
|
| static _setEchoMode(bool enabled) native "Stdin_SetEchoMode";
|
| static _lineMode() native "Stdin_GetLineMode";
|
| static _setLineMode(bool enabled) native "Stdin_SetLineMode";
|
| static _readByte() native "Stdin_ReadByte";
|
| + static _ansiSupported() native "Stdin_AnsiSupported";
|
| }
|
|
|
| @patch class Stdout {
|
| @@ -112,6 +121,16 @@
|
| }
|
|
|
| static _getTerminalSize(int fd) native "Stdout_GetTerminalSize";
|
| +
|
| + @patch static bool _ansiSupported(int fd) {
|
| + var result = _getAnsiSupported(fd);
|
| + if (result is! bool) {
|
| + throw new StdoutException("Error determining ANSI support", result);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + static _getAnsiSupported(int fd) native "Stdout_AnsiSupported";
|
| }
|
|
|
|
|
|
|