1 # $DragonFly: src/gnu/usr.bin/cvs/cvs/Attic/diff.c.patch,v 1.1 2004/05/20 02:27:56 dillon Exp $
3 ===================================================================
4 RCS file: /cvs/src/contrib/cvs/src/diff.c,v
5 retrieving revision 1.1.1.2
6 retrieving revision 1.5
7 diff -u -r1.1.1.2 -r1.5
8 --- src/diff.c 20 Jan 2004 05:37:23 -0000 1.1.1.2
9 +++ src/diff.c 22 Jan 2004 16:47:12 -0000 1.5
11 static char *diff_rev1, *diff_rev2;
12 /* Command line dates, from -D option. Malloc'd. */
13 static char *diff_date1, *diff_date2;
14 +static char *diff_join1, *diff_join2;
15 static char *use_rev1, *use_rev2;
16 static int have_rev1_label, have_rev2_label;
26 /* FIXME: This should really be allocating an argv to be passed to diff
30 while ((c = getopt_long (argc, argv,
31 - "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:",
32 + "+abcdefhij:lnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:",
33 longopts, &option_index)) != -1)
38 options = RCS_check_kflag (optarg);
43 + char *cpy = strdup(optarg);
45 + if ((ptr = strchr(optarg, ':')) != NULL)
47 + if (diff_rev2 != NULL || diff_date2 != NULL)
48 + error (1, 0, "no more than two revisions/dates can be specified");
49 + if (diff_rev1 != NULL || diff_date1 != NULL) {
52 + diff_date2 = ptr ? Make_Date(ptr) : NULL;
56 + diff_date1 = ptr ? Make_Date(ptr) : NULL;
61 if (diff_rev2 != NULL || diff_date2 != NULL)
64 send_option_string (opts);
65 if (options[0] != '\0')
69 + option_with_arg ("-j", diff_join1);
71 option_with_arg ("-r", diff_rev1);
73 + else if (diff_date1)
74 client_senddate (diff_date1);
77 + option_with_arg ("-j", diff_join2);
79 option_with_arg ("-r", diff_rev2);
81 + else if (diff_date2)
82 client_senddate (diff_date2);
87 send_to_server ("diff\012", 0);
88 err = get_responses_and_close ();
97 if (diff_rev1 != NULL)
98 tag_check_valid (diff_rev1, argc, argv, local, 0, "");
99 if (diff_rev2 != NULL)
101 ( diff_fileproc, diff_filesdoneproc, diff_dirproc,
102 diff_dirleaveproc, NULL, argc, argv, local,
103 which, 0, CVS_LOCK_READ, (char *) NULL, 1, (char *) NULL );
111 if (diff_date2 != NULL)
113 + if (diff_join1 != NULL)
115 + if (diff_join2 != NULL)