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

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: Style cleanup. 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)) {
267 Log::PrintErr("Invalid option specification : '%s'\n", option); 267 return true;
268 } 268 }
269 return true;
270 } 269 }
271 i += 1; 270 i += 1;
272 name = main_options[i].option_name; 271 name = main_options[i].option_name;
273 } 272 }
274 return false; 273 return false;
275 } 274 }
276 275
277 276
278 // Convert all the arguments to UTF8. On Windows, the arguments are 277 // Convert all the arguments to UTF8. On Windows, the arguments are
279 // encoded in the current code page and not UTF8. 278 // encoded in the current code page and not UTF8.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 873
875 return Process::GlobalExitCode(); 874 return Process::GlobalExitCode();
876 } 875 }
877 876
878 } // namespace bin 877 } // namespace bin
879 } // namespace dart 878 } // namespace dart
880 879
881 int main(int argc, char** argv) { 880 int main(int argc, char** argv) {
882 return dart::bin::main(argc, argv); 881 return dart::bin::main(argc, argv);
883 } 882 }
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