- else if (!strcmp(argv[1], "-z"))
- line_termination = 0;
- else if (!strcmp(argv[1], "-R"))
- reverse_diff = 1;
- else if (!strncmp(argv[1], "-M", 2)) {
- diff_score_opt = diff_scoreopt_parse(argv[1]);
- detect_rename = generate_patch = 1;
- }
- else if (!strncmp(argv[1], "-C", 2)) {
- diff_score_opt = diff_scoreopt_parse(argv[1]);
- detect_rename = 2;
- generate_patch = 1;
+ else {
+ int diff_opt_cnt;
+ diff_opt_cnt = diff_opt_parse(&diff_options,
+ argv+1, argc-1);
+ if (diff_opt_cnt < 0)
+ usage(diff_files_usage);
+ else if (diff_opt_cnt) {
+ argv += diff_opt_cnt;
+ argc -= diff_opt_cnt;
+ continue;
+ }
+ else
+ usage(diff_files_usage);