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

Issue 246973002: Make Stdin:readLineSync not use Streams and fix special case when Windows & disabled lineMode. (Closed)

Created:
6 years, 8 months ago by Anders Johnsen
Modified:
6 years, 1 month ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make Stdin:readLineSync not use Streams and fix special case when Windows & disabled lineMode. On Windows, disabled lineMode will not send any \n only \r on newlines. BUG=http://code.google.com/p/dart/issues/detail?id=18283 R=lrn@google.com, sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=35253

Patch Set 1 #

Total comments: 16

Patch Set 2 : Rewrier #

Total comments: 6

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -67 lines) Patch
M sdk/lib/io/stdio.dart View 1 2 1 chunk +56 lines, -67 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Anders Johnsen
6 years, 8 months ago (2014-04-22 07:16:05 UTC) #1
Lasse Reichstein Nielsen
https://codereview.chromium.org/246973002/diff/1/sdk/lib/io/stdio.dart File sdk/lib/io/stdio.dart (right): https://codereview.chromium.org/246973002/diff/1/sdk/lib/io/stdio.dart#newcode51 sdk/lib/io/stdio.dart:51: bool retainNewlines: false}) { The retainNewlines parameter isn't documented. ...
6 years, 8 months ago (2014-04-22 08:07:01 UTC) #2
Søren Gjesse
lgtm, with Lasses comment addressed. https://codereview.chromium.org/246973002/diff/1/sdk/lib/io/stdio.dart File sdk/lib/io/stdio.dart (right): https://codereview.chromium.org/246973002/diff/1/sdk/lib/io/stdio.dart#newcode48 sdk/lib/io/stdio.dart:48: * is returned. Please ...
6 years, 8 months ago (2014-04-22 08:34:26 UTC) #3
Lasse Reichstein Nielsen
My simple solution is too simple. Here is a more complete version (still not tested). ...
6 years, 8 months ago (2014-04-22 08:40:20 UTC) #4
Anders Johnsen
PTAL https://codereview.chromium.org/246973002/diff/1/sdk/lib/io/stdio.dart File sdk/lib/io/stdio.dart (right): https://codereview.chromium.org/246973002/diff/1/sdk/lib/io/stdio.dart#newcode48 sdk/lib/io/stdio.dart:48: * is returned. On 2014/04/22 08:34:26, Søren Gjesse ...
6 years, 8 months ago (2014-04-22 10:45:42 UTC) #5
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/246973002/diff/20001/sdk/lib/io/stdio.dart File sdk/lib/io/stdio.dart (right): https://codereview.chromium.org/246973002/diff/20001/sdk/lib/io/stdio.dart#newcode49 sdk/lib/io/stdio.dart:49: * final newline. Default is `false`. Doesn't say ...
6 years, 8 months ago (2014-04-22 10:56:08 UTC) #6
Anders Johnsen
Committed patchset #3 manually as r35253 (presubmit successful).
6 years, 8 months ago (2014-04-22 11:04:44 UTC) #7
Anders Johnsen
6 years, 1 month ago (2014-11-13 16:21:06 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/246973002/diff/20001/sdk/lib/io/stdio.dart
File sdk/lib/io/stdio.dart (right):

https://codereview.chromium.org/246973002/diff/20001/sdk/lib/io/stdio.dart#ne...
sdk/lib/io/stdio.dart:49: * final newline. Default is `false`.
On 2014/04/22 10:56:08, Lasse Reichstein Nielsen wrote:
> Doesn't say what happens if retainNewlines is true. I think it's best to be
> explicit, even if it's only, ", otherwise it will contain the line
terminator."

Done.

https://codereview.chromium.org/246973002/diff/20001/sdk/lib/io/stdio.dart#ne...
sdk/lib/io/stdio.dart:51: * If end-of-file is reached after some data has
already been read, that data
On 2014/04/22 10:56:08, Lasse Reichstein Nielsen wrote:
> How about "after any bytes have been read from stdin". I prefer "any" to
"some",
> and it's not clear where it comes from or what the "data" is.
> "Returns `null` if no bytes preceeded the end of input."

Done.

https://codereview.chromium.org/246973002/diff/20001/sdk/lib/io/stdio.dart#ne...
sdk/lib/io/stdio.dart:88: outer:
On 2014/04/22 10:56:08, Lasse Reichstein Nielsen wrote:
> Indent label, and preferably put it on same line as the while.

Done.

Powered by Google App Engine
This is Rietveld 408576698