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

Side by Side Diff: sdk/lib/io/stdio.dart

Issue 20908002: Fix readLineSync to work in checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | tests/standalone/io/stdin_sync_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of dart.io; 5 part of dart.io;
6 6
7 const int _STDIO_HANDLE_TYPE_TERMINAL = 0; 7 const int _STDIO_HANDLE_TYPE_TERMINAL = 0;
8 const int _STDIO_HANDLE_TYPE_PIPE = 1; 8 const int _STDIO_HANDLE_TYPE_PIPE = 1;
9 const int _STDIO_HANDLE_TYPE_FILE = 2; 9 const int _STDIO_HANDLE_TYPE_FILE = 2;
10 const int _STDIO_HANDLE_TYPE_SOCKET = 3; 10 const int _STDIO_HANDLE_TYPE_SOCKET = 3;
(...skipping 11 matching lines...) Expand all
22 bool cancelOnError}) { 22 bool cancelOnError}) {
23 return _stream.listen( 23 return _stream.listen(
24 onData, 24 onData,
25 onError: onError, 25 onError: onError,
26 onDone: onDone, 26 onDone: onDone,
27 cancelOnError: cancelOnError); 27 cancelOnError: cancelOnError);
28 } 28 }
29 } 29 }
30 30
31 31
32 class _StdinEventSink { 32 class _StdinEventSink implements EventSink<String> {
33 Function add; 33 Function add;
34 Function addError; 34 Function addError;
35 Function close; 35 Function close;
36 _StdinEventSink(this.add, this.addError, this.close); 36 _StdinEventSink(this.add, this.addError, this.close);
37 } 37 }
38 38
39 /** 39 /**
40 * [Stdin] allows both synchronous and asynchronous reads from the standard 40 * [Stdin] allows both synchronous and asynchronous reads from the standard
41 * input stream. 41 * input stream.
42 * 42 *
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 return StdioType.OTHER; 214 return StdioType.OTHER;
215 } 215 }
216 216
217 217
218 class _StdIOUtils { 218 class _StdIOUtils {
219 external static IOSink _getStdioOutputStream(int fd); 219 external static IOSink _getStdioOutputStream(int fd);
220 external static Stdin _getStdioInputStream(); 220 external static Stdin _getStdioInputStream();
221 external static int _socketType(nativeSocket); 221 external static int _socketType(nativeSocket);
222 } 222 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/io/stdin_sync_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698