diff options
author | peter <peter@FreeBSD.org> | 2000-10-02 06:33:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-10-02 06:33:59 +0000 |
commit | e0aa09eb3434450a9aec24a6f4b2694077991e45 (patch) | |
tree | 1034d2dbfc90e7d206ec12b655f538011f0538e6 /contrib/cvs/diff | |
parent | 991f1fafc7262d5e8dc1dd47c5863e0e2a351dff (diff) | |
parent | 590c411955d6975551ffeaf41d7faf4b26f836d1 (diff) | |
download | FreeBSD-src-e0aa09eb3434450a9aec24a6f4b2694077991e45.zip FreeBSD-src-e0aa09eb3434450a9aec24a6f4b2694077991e45.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r66525,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/cvs/diff')
-rw-r--r-- | contrib/cvs/diff/ChangeLog | 30 | ||||
-rw-r--r-- | contrib/cvs/diff/diff.c | 43 | ||||
-rw-r--r-- | contrib/cvs/diff/util.c | 2 |
3 files changed, 53 insertions, 22 deletions
diff --git a/contrib/cvs/diff/ChangeLog b/contrib/cvs/diff/ChangeLog index a435182..e3272e8 100644 --- a/contrib/cvs/diff/ChangeLog +++ b/contrib/cvs/diff/ChangeLog @@ -1,3 +1,33 @@ +2000-08-03 Larry Jones <larry.jones@sdrc.com> + + * diff3.c (read_diff): Use cvs_temp_name () instead of tmpnam () so + there's at least a chance of getting the file in the correct tmp dir. + +2000-07-10 Larry Jones <larry.jones@sdrc.com> + + * util.c (printf_output): Fix type clashes. + +2000-06-15 Larry Jones <larry.jones@sdrc.com> + + * diff3.c (diff3_run, make_3way_diff): Plug memory leaks. + +1999-12-29 Jim Kingdon <http://developer.redhat.com/> + + * diff.c (compare_files): Use explicit braces with if-if-else, per + GNU coding standards and gcc -Wall. + +1999-11-23 Larry Jones <larry.jones@sdrc.com> + + * diff3.c: Explicitly initialize zero_diff3 to placate neurotic + compilers that gripe about implicitly initialized const variables. + Reported by Eric Veum <sysv@yahoo.com>. + +1999-09-15 Larry Jones <larry.jones@sdrc.com> + + * diff.c (diff_run): Move the setjmp call before the options + processing since option errors can call fatal which in turn + calls longjmp. + 1999-05-06 Jim Kingdon <http://www.cyclic.com> * Makefile.in (DISTFILES): Remove libdiff.mak. diff --git a/contrib/cvs/diff/diff.c b/contrib/cvs/diff/diff.c index e5f7e42..aa91913 100644 --- a/contrib/cvs/diff/diff.c +++ b/contrib/cvs/diff/diff.c @@ -247,11 +247,21 @@ diff_run (argc, argv, out, callbacks_arg) /* Do our initializations. */ initialize_main (&argc, &argv); - - /* Decode the options. */ - optind_old = optind; optind = 0; + + /* Set the jump buffer, so that diff may abort execution without + terminating the process. */ + val = setjmp (diff_abort_buf); + if (val != 0) + { + optind = optind_old; + if (opened_file) + fclose (outfile); + return val; + } + + /* Decode the options. */ while ((c = getopt_long (argc, argv, "0123456789abBcC:dD:efF:hHiI:lL:nNpPqrsS:tTuU:vwW:x:X:y", longopts, 0)) != EOF) @@ -686,17 +696,6 @@ diff_run (argc, argv, out, callbacks_arg) } } - /* Set the jump buffer, so that diff may abort execution without - terminating the process. */ - val = setjmp (diff_abort_buf); - if (val != 0) - { - optind = optind_old; - if (opened_file) - fclose (outfile); - return val; - } - val = compare_files (0, argv[optind], 0, argv[optind + 1], 0); /* Print any messages that were saved up for last. */ @@ -1147,13 +1146,15 @@ compare_files (dir0, name0, dir1, name1, depth) failed = 1; } if (inf[1].desc == -2) - if (same_files) - inf[1].desc = inf[0].desc; - else if ((inf[1].desc = open (inf[1].name, O_RDONLY, 0)) < 0) - { - perror_with_name (inf[1].name); - failed = 1; - } + { + if (same_files) + inf[1].desc = inf[0].desc; + else if ((inf[1].desc = open (inf[1].name, O_RDONLY, 0)) < 0) + { + perror_with_name (inf[1].name); + failed = 1; + } + } #if HAVE_SETMODE if (binary_I_O) diff --git a/contrib/cvs/diff/util.c b/contrib/cvs/diff/util.c index c4d2d71..ff9cceb 100644 --- a/contrib/cvs/diff/util.c +++ b/contrib/cvs/diff/util.c @@ -366,7 +366,7 @@ printf_output (format, va_alist) char *str; int num; int ch; - unsigned char buf[100]; + char buf[100]; while ((q = strchr (p, '%')) != NULL) { |