| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bin/io_natives.h" | 5 #include "bin/io_natives.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "bin/builtin.h" | 10 #include "bin/builtin.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 V(Socket_GetOption, 3) \ | 72 V(Socket_GetOption, 3) \ |
| 73 V(Socket_SetOption, 4) \ | 73 V(Socket_SetOption, 4) \ |
| 74 V(Socket_JoinMulticast, 4) \ | 74 V(Socket_JoinMulticast, 4) \ |
| 75 V(Socket_LeaveMulticast, 4) \ | 75 V(Socket_LeaveMulticast, 4) \ |
| 76 V(Socket_SetSocketId, 2) \ | 76 V(Socket_SetSocketId, 2) \ |
| 77 V(Stdin_ReadByte, 1) \ | 77 V(Stdin_ReadByte, 1) \ |
| 78 V(Stdin_GetEchoMode, 0) \ | 78 V(Stdin_GetEchoMode, 0) \ |
| 79 V(Stdin_SetEchoMode, 1) \ | 79 V(Stdin_SetEchoMode, 1) \ |
| 80 V(Stdin_GetLineMode, 0) \ | 80 V(Stdin_GetLineMode, 0) \ |
| 81 V(Stdin_SetLineMode, 1) \ | 81 V(Stdin_SetLineMode, 1) \ |
| 82 V(Stdout_GetTerminalSize, 0) \ |
| 82 V(StringToSystemEncoding, 1) \ | 83 V(StringToSystemEncoding, 1) \ |
| 83 V(SystemEncodingToString, 1) | 84 V(SystemEncodingToString, 1) |
| 84 | 85 |
| 85 | 86 |
| 86 IO_NATIVE_LIST(DECLARE_FUNCTION); | 87 IO_NATIVE_LIST(DECLARE_FUNCTION); |
| 87 | 88 |
| 88 static struct NativeEntries { | 89 static struct NativeEntries { |
| 89 const char* name_; | 90 const char* name_; |
| 90 Dart_NativeFunction function_; | 91 Dart_NativeFunction function_; |
| 91 int argument_count_; | 92 int argument_count_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 106 if (!strcmp(function_name, entry->name_) && | 107 if (!strcmp(function_name, entry->name_) && |
| 107 (entry->argument_count_ == argument_count)) { | 108 (entry->argument_count_ == argument_count)) { |
| 108 return reinterpret_cast<Dart_NativeFunction>(entry->function_); | 109 return reinterpret_cast<Dart_NativeFunction>(entry->function_); |
| 109 } | 110 } |
| 110 } | 111 } |
| 111 return NULL; | 112 return NULL; |
| 112 } | 113 } |
| 113 | 114 |
| 114 } // namespace bin | 115 } // namespace bin |
| 115 } // namespace dart | 116 } // namespace dart |
| OLD | NEW |