1 $DragonFly: src/gnu/usr.bin/cvs/cvs/Attic/diff.c.patch,v 1.2 2005/03/13 11:43:07 corecode Exp $
2 --- /usr/src/contrib/cvs-1.12.11/src/diff.c 2005-01-05 22:17:43.000000000 +0100
3 +++ diff.c 2005-03-06 23:43:51.000000000 +0100
5 static char *diff_rev1, *diff_rev2;
6 /* Command line dates, from -D option. Malloc'd. */
7 static char *diff_date1, *diff_date2;
8 +static char *diff_join1, *diff_join2;
9 static char *use_rev1, *use_rev2;
10 static int have_rev1_label, have_rev2_label;
20 /* FIXME: This should really be allocating an argv to be passed to diff
24 while ((c = getopt_long (argc, argv,
25 - "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:",
26 + "+abcdefhij:lnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:",
27 longopts, &option_index)) != -1)
32 options = RCS_check_kflag (optarg);
37 + char *cpy = strdup(optarg);
39 + if ((ptr = strchr(optarg, ':')) != NULL)
41 + if (diff_rev2 != NULL || diff_date2 != NULL)
42 + error (1, 0, "no more than two revisions/dates can be specified");
43 + if (diff_rev1 != NULL || diff_date1 != NULL) {
46 + diff_date2 = ptr ? Make_Date(ptr) : NULL;
50 + diff_date1 = ptr ? Make_Date(ptr) : NULL;
55 if (diff_rev2 != NULL || diff_date2 != NULL)
58 send_option_string (opts);
59 if (options[0] != '\0')
63 + option_with_arg ("-j", diff_join1);
65 option_with_arg ("-r", diff_rev1);
67 + else if (diff_date1)
68 client_senddate (diff_date1);
71 + option_with_arg ("-j", diff_join2);
73 option_with_arg ("-r", diff_rev2);
75 + else if (diff_date2)
76 client_senddate (diff_date2);
81 send_to_server ("diff\012", 0);
82 err = get_responses_and_close ();
91 if (diff_rev1 != NULL)
92 tag_check_valid (diff_rev1, argc, argv, local, 0, "", false);
93 if (diff_rev2 != NULL)
95 ( diff_fileproc, diff_filesdoneproc, diff_dirproc,
96 diff_dirleaveproc, NULL, argc, argv, local,
97 which, 0, CVS_LOCK_READ, (char *) NULL, 1, (char *) NULL );
105 if (diff_date2 != NULL)
107 + if (diff_join1 != NULL)
109 + if (diff_join2 != NULL)