Added -f option to the shell sample for compatibility with the other
authorchristian.plesner.hansen@gmail.com <christian.plesner.hansen@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Sep 2008 08:35:40 +0000 (08:35 +0000)
committerchristian.plesner.hansen@gmail.com <christian.plesner.hansen@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Sep 2008 08:35:40 +0000 (08:35 +0000)
engines.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

samples/shell.cc

index c5dc05170b11be1710fb06128e45a7ca0d30eb45..17adbdf525957ef724adcc3adc6fbcc3a8ee3270 100644 (file)
@@ -65,6 +65,10 @@ int main(int argc, char* argv[]) {
     const char* str = argv[i];
     if (strcmp(str, "--shell") == 0) {
       run_shell = true;
+    } else if (strcmp(str, "-f") == 0) {
+      // Ignore any -f flags for compatibility with the other stand-
+      // alone JavaScript engines.
+      continue;
     } else if (strncmp(str, "--", 2) == 0) {
       printf("Warning: unknown flag %s.\n", str);
     } else {