Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: runtime/bin/io_natives.cc

Issue 19627004: Add echo and line modes to Stdin. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing files. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 V(Socket_Read, 2) \ 59 V(Socket_Read, 2) \
60 V(Socket_WriteList, 4) \ 60 V(Socket_WriteList, 4) \
61 V(Socket_GetPort, 1) \ 61 V(Socket_GetPort, 1) \
62 V(Socket_GetRemotePeer, 1) \ 62 V(Socket_GetRemotePeer, 1) \
63 V(Socket_GetError, 1) \ 63 V(Socket_GetError, 1) \
64 V(Socket_GetStdioHandle, 2) \ 64 V(Socket_GetStdioHandle, 2) \
65 V(Socket_NewServicePort, 0) \ 65 V(Socket_NewServicePort, 0) \
66 V(Socket_GetType, 1) \ 66 V(Socket_GetType, 1) \
67 V(Socket_SetOption, 3) \ 67 V(Socket_SetOption, 3) \
68 V(Stdin_ReadByte, 1) \ 68 V(Stdin_ReadByte, 1) \
69 V(Stdin_SetEchoMode, 2) \
70 V(Stdin_SetLineMode, 2) \
69 V(StringToSystemEncoding, 1) \ 71 V(StringToSystemEncoding, 1) \
70 V(SystemEncodingToString, 1) 72 V(SystemEncodingToString, 1)
71 73
72 74
73 IO_NATIVE_LIST(DECLARE_FUNCTION); 75 IO_NATIVE_LIST(DECLARE_FUNCTION);
74 76
75 static struct NativeEntries { 77 static struct NativeEntries {
76 const char* name_; 78 const char* name_;
77 Dart_NativeFunction function_; 79 Dart_NativeFunction function_;
78 int argument_count_; 80 int argument_count_;
(...skipping 14 matching lines...) Expand all
93 if (!strcmp(function_name, entry->name_) && 95 if (!strcmp(function_name, entry->name_) &&
94 (entry->argument_count_ == argument_count)) { 96 (entry->argument_count_ == argument_count)) {
95 return reinterpret_cast<Dart_NativeFunction>(entry->function_); 97 return reinterpret_cast<Dart_NativeFunction>(entry->function_);
96 } 98 }
97 } 99 }
98 return NULL; 100 return NULL;
99 } 101 }
100 102
101 } // namespace bin 103 } // namespace bin
102 } // namespace dart 104 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/io_impl_sources.gypi ('k') | runtime/bin/stdin.h » ('j') | runtime/bin/stdin.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698