| 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..931e04f070c97f74859660061e6a9c45f64df3af 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);
|
| + static void SetLineMode(bool enabled);
|
| +
|
| + private:
|
| + DISALLOW_ALLOCATION();
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(Stdin);
|
| +};
|
|
|
| } // namespace bin
|
| } // namespace dart
|
| +
|
| +#endif // BIN_STDIN_H_
|
| +
|
|
|