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

Side by Side Diff: samples/total/src/Dartc.dart

Issue 8391009: Reroll r634 "Total now reads mortgage sample from server" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed blank line Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("total:dartc"); 5 #library("total:dartc");
6 6
7 /** 7 /**
8 * A simple wrapper around dartc. 8 * A simple wrapper around dartc.
9 * TODO: automatically determine the exec path to dartc 9 * TODO: automatically determine the exec path to dartc
10 * TODO: prevent ANSI colors from being exposed to the user 10 * TODO: prevent ANSI colors from being exposed to the user
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 StringBuffer messages = new StringBuffer(); 51 StringBuffer messages = new StringBuffer();
52 compiler.setExitHandler((int status) { 52 compiler.setExitHandler((int status) {
53 compiler.close(); 53 compiler.close();
54 callback(status, messages.toString()); 54 callback(status, messages.toString());
55 }); 55 });
56 56
57 compiler.start(); 57 compiler.start();
58 // TODO(rchandia) increase read size when stream handling works better 58 // TODO(rchandia) increase read size when stream handling works better
59 int BUFSIZE = 1; 59 int BUFSIZE = 1;
60 60
61 _readAll(false, compiler.stdoutStream, new List<int>(BUFSIZE), messages); 61 _readAll(false, compiler.stdout, new List<int>(BUFSIZE), messages);
62 _readAll(false, compiler.stderrStream, new List<int>(BUFSIZE), messages); 62 _readAll(false, compiler.stderr, new List<int>(BUFSIZE), messages);
63 } 63 }
64 } 64 }
65 65
66 void _readAll(bool fromCallback, InputStream input, List<int> buffer, StringBuff er output) { 66 void _readAll(bool fromCallback, InputStream input, List<int> buffer, StringBuff er output) {
67 if (fromCallback) { 67 if (fromCallback) {
68 output.add(new String.fromCharCodes(buffer)); 68 output.add(new String.fromCharCodes(buffer));
69 } 69 }
70 while (input.read(buffer, 0, buffer.length, () => _readAll(true, input, buffer , output))) { 70 while (input.read(buffer, 0, buffer.length, () => _readAll(true, input, buffer , output))) {
71 output.add(new String.fromCharCodes(buffer)); 71 output.add(new String.fromCharCodes(buffer));
72 } 72 }
73 } 73 }
74 74
OLDNEW
« no previous file with comments | « client/tests/client/samples/total/total_tests.dart ('k') | samples/total/src/GetSpreadsheet.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698