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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 V(Socket_WriteList, 4) \ | 144 V(Socket_WriteList, 4) \ |
145 V(Stdin_ReadByte, 0) \ | 145 V(Stdin_ReadByte, 0) \ |
146 V(Stdin_GetEchoMode, 0) \ | 146 V(Stdin_GetEchoMode, 0) \ |
147 V(Stdin_SetEchoMode, 1) \ | 147 V(Stdin_SetEchoMode, 1) \ |
148 V(Stdin_GetLineMode, 0) \ | 148 V(Stdin_GetLineMode, 0) \ |
149 V(Stdin_SetLineMode, 1) \ | 149 V(Stdin_SetLineMode, 1) \ |
150 V(Stdin_AnsiSupported, 0) \ | 150 V(Stdin_AnsiSupported, 0) \ |
151 V(Stdout_GetTerminalSize, 1) \ | 151 V(Stdout_GetTerminalSize, 1) \ |
152 V(Stdout_AnsiSupported, 1) \ | 152 V(Stdout_AnsiSupported, 1) \ |
153 V(StringToSystemEncoding, 1) \ | 153 V(StringToSystemEncoding, 1) \ |
| 154 V(SynchronousSocket_Available, 1) \ |
| 155 V(SynchronousSocket_CloseSync, 1) \ |
| 156 V(SynchronousSocket_CreateConnectSync, 3) \ |
| 157 V(SynchronousSocket_GetPort, 1) \ |
| 158 V(SynchronousSocket_GetRemotePeer, 1) \ |
| 159 V(SynchronousSocket_LookupRequest, 2) \ |
| 160 V(SynchronousSocket_ShutdownRead, 1) \ |
| 161 V(SynchronousSocket_ShutdownWrite, 1) \ |
| 162 V(SynchronousSocket_Read, 2) \ |
| 163 V(SynchronousSocket_ReadList, 4) \ |
| 164 V(SynchronousSocket_WriteList, 4) \ |
154 V(SystemEncodingToString, 1) \ | 165 V(SystemEncodingToString, 1) \ |
155 V(X509_Subject, 1) \ | 166 V(X509_Subject, 1) \ |
156 V(X509_Issuer, 1) \ | 167 V(X509_Issuer, 1) \ |
157 V(X509_StartValidity, 1) \ | 168 V(X509_StartValidity, 1) \ |
158 V(X509_EndValidity, 1) | 169 V(X509_EndValidity, 1) |
159 | 170 |
160 IO_NATIVE_LIST(DECLARE_FUNCTION); | 171 IO_NATIVE_LIST(DECLARE_FUNCTION); |
161 | 172 |
162 static struct NativeEntries { | 173 static struct NativeEntries { |
163 const char* name_; | 174 const char* name_; |
(...skipping 29 matching lines...) Expand all Loading... |
193 struct NativeEntries* entry = &(IOEntries[i]); | 204 struct NativeEntries* entry = &(IOEntries[i]); |
194 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) { | 205 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) { |
195 return reinterpret_cast<const uint8_t*>(entry->name_); | 206 return reinterpret_cast<const uint8_t*>(entry->name_); |
196 } | 207 } |
197 } | 208 } |
198 return NULL; | 209 return NULL; |
199 } | 210 } |
200 | 211 |
201 } // namespace bin | 212 } // namespace bin |
202 } // namespace dart | 213 } // namespace dart |
OLD | NEW |