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

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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 { NULL, NULL } 255 { NULL, NULL }
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) {
Ivan Posva 2013/06/11 09:55:49 Please keep the parens. How will this match "--sn
Anders Johnsen 2013/06/11 10:44:32 Done. I see, updated.
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 Log::PrintErr("Invalid option specification : '%s'\n", option);
268 } 268 }
269 return true; 269 return true;
270 } 270 }
271 i += 1; 271 i += 1;
272 name = main_options[i].option_name; 272 name = main_options[i].option_name;
273 } 273 }
274 return false; 274 return false;
275 } 275 }
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 874
875 return Process::GlobalExitCode(); 875 return Process::GlobalExitCode();
876 } 876 }
877 877
878 } // namespace bin 878 } // namespace bin
879 } // namespace dart 879 } // namespace dart
880 880
881 int main(int argc, char** argv) { 881 int main(int argc, char** argv) {
882 return dart::bin::main(argc, argv); 882 return dart::bin::main(argc, argv);
883 } 883 }
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