- for (i = 1; i < argc; ++i) {
- const char *arg = argv[i];
-
- if (arg[0] != '-') {
- break;
- }
-
- if (!strcmp(arg, "--")) {
- i++;
- break;
- } else if (!strcmp(arg, "--help")) {
- usage();
- return 0;
- } else {
- std::cerr << "error: unknown option " << arg << "\n";
- usage();
- return 1;
- }
- }
-
- if (argc - i != 2) {
- std::cerr << "Error: diff requires exactly two trace files as arguments.\n";
- usage();