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

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

Issue 15724022: Require exact match of vm arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 }; 256 };
257 257
258 258
259 static bool ProcessMainOptions(const char* option) { 259 static bool ProcessMainOptions(const char* option) {
260 int i = 0; 260 int i = 0;
261 const char* name = main_options[0].option_name; 261 const char* name = main_options[0].option_name;
262 int option_length = strlen(option); 262 int option_length = strlen(option);
263 while (name != NULL) { 263 while (name != NULL) {
264 int length = strlen(name); 264 int length = strlen(name);
265 if ((option_length >= length) && (strncmp(option, name, length) == 0)) { 265 if ((option_length >= length) && (strncmp(option, name, length) == 0)) {
266 if (!main_options[i].process(option + length)) { 266 if (main_options[i].process(option + length)) return true;
Ivan Posva 2013/06/11 11:44:29 { return true; }
Anders Johnsen 2013/06/11 11:55:41 Done.
267 Log::PrintErr("Invalid option specification : '%s'\n", option);
268 }
269 return true;
270 } 267 }
271 i += 1; 268 i += 1;
272 name = main_options[i].option_name; 269 name = main_options[i].option_name;
273 } 270 }
274 return false; 271 return false;
275 } 272 }
276 273
277 274
278 // Convert all the arguments to UTF8. On Windows, the arguments are 275 // Convert all the arguments to UTF8. On Windows, the arguments are
279 // encoded in the current code page and not UTF8. 276 // encoded in the current code page and not UTF8.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 871
875 return Process::GlobalExitCode(); 872 return Process::GlobalExitCode();
876 } 873 }
877 874
878 } // namespace bin 875 } // namespace bin
879 } // namespace dart 876 } // namespace dart
880 877
881 int main(int argc, char** argv) { 878 int main(int argc, char** argv) {
882 return dart::bin::main(argc, argv); 879 return dart::bin::main(argc, argv);
883 } 880 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698