Chromium Code Reviews| Index: runtime/bin/stdin.h |
| diff --git a/runtime/bin/stdin.cc b/runtime/bin/stdin.h |
| similarity index 51% |
| copy from runtime/bin/stdin.cc |
| copy to runtime/bin/stdin.h |
| index 6dba2130ad8e9526c2fe8b4092ebf565038e828c..6fb67fe0091f77655848862377257cf18b9511ce 100644 |
| --- a/runtime/bin/stdin.cc |
| +++ b/runtime/bin/stdin.h |
| @@ -2,30 +2,31 @@ |
| // 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. |
| +#ifndef BIN_STDIN_H_ |
| +#define BIN_STDIN_H_ |
| + |
| #include "bin/builtin.h" |
| -#include "bin/dartutils.h" |
| -#include "bin/thread.h" |
| #include "bin/utils.h" |
| #include "platform/globals.h" |
| -#include "platform/thread.h" |
| -#include "platform/utils.h" |
| - |
| -#include "include/dart_api.h" |
| namespace dart { |
| namespace bin { |
| -void FUNCTION_NAME(Stdin_ReadByte)(Dart_NativeArguments args) { |
| - Dart_EnterScope(); |
| - int c = getchar(); |
| - if (c == EOF) { |
| - c = -1; |
| - } |
| - Dart_SetReturnValue(args, Dart_NewInteger(c)); |
| - Dart_ExitScope(); |
| -} |
| +class Stdin { |
| + public: |
| + static int ReadByte(); |
| + static void setEchoMode(bool enabled); |
|
Søren Gjesse
2013/07/24 12:18:49
Uppercase S
Anders Johnsen
2013/07/24 12:57:49
Done.
|
| + static void setLineMode(bool enabled); |
|
Søren Gjesse
2013/07/24 12:18:49
Ditto.
Anders Johnsen
2013/07/24 12:57:49
Done.
|
| + |
| + private: |
| + DISALLOW_ALLOCATION(); |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(Stdin); |
| +}; |
| } // namespace bin |
| } // namespace dart |
| + |
| +#endif // BIN_STDIN_H_ |
| + |