diff options
author | peter <peter@FreeBSD.org> | 2001-08-10 09:43:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-08-10 09:43:22 +0000 |
commit | c132709d1892a50d7915da8685face38ada32e4f (patch) | |
tree | 91ad9c2f4db08545ffa8883e62c900d4001de987 /contrib/cvs/diff | |
parent | e832f306d6c3f06dc0d801543a4302233e24e063 (diff) | |
parent | a037ef8f32200b26968e77344bcfb963251fa8b9 (diff) | |
download | FreeBSD-src-c132709d1892a50d7915da8685face38ada32e4f.zip FreeBSD-src-c132709d1892a50d7915da8685face38ada32e4f.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r81404,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/cvs/diff')
-rw-r--r-- | contrib/cvs/diff/ChangeLog | 67 | ||||
-rw-r--r-- | contrib/cvs/diff/Makefile.am | 24 | ||||
-rw-r--r-- | contrib/cvs/diff/Makefile.in | 369 | ||||
-rw-r--r-- | contrib/cvs/diff/analyze.c | 39 | ||||
-rw-r--r-- | contrib/cvs/diff/diff.c | 2 | ||||
-rw-r--r-- | contrib/cvs/diff/dir.c | 10 | ||||
-rw-r--r-- | contrib/cvs/diff/system.h | 13 |
7 files changed, 425 insertions, 99 deletions
diff --git a/contrib/cvs/diff/ChangeLog b/contrib/cvs/diff/ChangeLog index e3272e8..565bdb7 100644 --- a/contrib/cvs/diff/ChangeLog +++ b/contrib/cvs/diff/ChangeLog @@ -1,3 +1,70 @@ +2001-04-25 Derek Price <dprice@collab.net> + + * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400. + +2001-03-24 Noel Cragg <noel@shave.red-bean.com> + + * diff.c: fix typo in usage string. + +2001-03-20 Derek Price <derek.price@openavenue.com> + for Karl Tomlinson <k.tomlinson@auckland.ac.nz> + + * diff3.c (main): changed the common file of the two diffs to + OLDFILE for merges and edscripts so that the diffs are more likely + to contain the intended changes. Not changing the horizon-lines + arg for the second diff. If the two diffs have the same parameters + equal changes in each diff are more likely to appear the same. + + * analyze.c (shift_boundaries): undid Paul Eggert's patch to fix + the diff3 merge bug described in ccvs/doc/DIFFUTILS-2.7-BUG. The + patch is no longer necessary now that diff3 does its differences + differently. I think the hunk merges provide a better indication + of the area modified by the user now that the diffs are actually + done between the appropriate revisions. + +2001-03-15 Derek Price <derek.price@openavenue.com> + + * Makefile.am (INCLUDES): Add -I$(top_srcdir)/lib for platforms which + need the regex library there. + + * Makefile.in: Regenerated. + +2001-03-14 Derek Price <derek.price@openavenue.com> + + * .cvsignore: Added '.deps'. + + Pavel Roskin <proski@gnu.org> + + * Makefile.am: New file. + * Makefile.in: Regenerated. + +2001-02-22 Derek Price <derek.price@openavenue.com> + Pavel Roskin <proski@gnu.org> + + * Makefile.in: Don't define PR_PROGRAM - it's defined by configure. + Remove separate rule for util.c. + +2001-02-06 Derek Price <derek.price@openavenue.com> + Rex Jolliff <Rex_Jolliff@notes.ymp.gov> + Shawn Smith <Shawn_Smith@notes.ymp.gov> + + * dir.c: Replace opendir, closedir, & readdir calls with CVS_OPENDIR, + CVS_CLOSEDIR, & CVS_READDIR in support of changes to handle VMS DEC C + 5.7 {open,read,close}dir problems. Check today's entry in the vms + subdir for more. + * system.h: definitions of CVS_*DIR provided here. + +2000-12-21 Derek Price <derek.price@openavenue.com> + + * Makefile.in: Some changes to support Automake targets + +2000-10-26 Larry Jones <larry.jones@sdrc.com> + + * Makefile.in: Get PR_PROGRAM from autoconf instead of hard coding. + (Patch submitted by Urs Thuermann <urs@isnogud.escape.de>.) + Also add a dependency for util.o on Makefile since PR_PROGRAM gets + compiled in. + 2000-08-03 Larry Jones <larry.jones@sdrc.com> * diff3.c (read_diff): Use cvs_temp_name () instead of tmpnam () so diff --git a/contrib/cvs/diff/Makefile.am b/contrib/cvs/diff/Makefile.am new file mode 100644 index 0000000..38ed80e --- /dev/null +++ b/contrib/cvs/diff/Makefile.am @@ -0,0 +1,24 @@ +## Makefile.am for GNU DIFF +## Copyright (C) 2001 Free Software Foundation, Inc. +## +## This file is part of GNU DIFF. +## +## GNU DIFF is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## GNU DIFF is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +INCLUDES = -I$(top_srcdir)/lib + +noinst_LIBRARIES = libdiff.a + +libdiff_a_SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c \ + context.c ed.c normal.c ifdef.c util.c dir.c version.c diff.h \ + side.c system.h diffrun.h + +EXTRA_DIST = ChangeLog build_diff.com diagmeet.note libdiff.dsp diff --git a/contrib/cvs/diff/Makefile.in b/contrib/cvs/diff/Makefile.in index 31f4910..d9d1703 100644 --- a/contrib/cvs/diff/Makefile.in +++ b/contrib/cvs/diff/Makefile.in @@ -1,102 +1,327 @@ -# Makefile for GNU DIFF -# Copyright (C) 1988,1989,1991,1992,1993,1994,1997,1998 Free Software Foundation, Inc. -# -# This file is part of GNU DIFF. -# -# GNU DIFF is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU DIFF is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -#### Start of system configuration section. #### - -srcdir = @srcdir@ +# Makefile.in generated automatically by automake 1.4e from Makefile.am. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +SHELL = @SHELL@ + +srcdir = @srcdir@ top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -subdir = diff +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +AMTAR = @AMTAR@ +AWK = @AWK@ CC = @CC@ +CSH = @CSH@ +DEPDIR = @DEPDIR@ +ETAGS = @ETAGS@ +ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@ +KRB4 = @KRB4@ +LN_S = @LN_S@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PERL = @PERL@ +PR = @PR@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +ROFF = @ROFF@ +STRIP = @STRIP@ +TEXI2DVI = @TEXI2DVI@ +VERSION = @VERSION@ +YACC = @YACC@ +_am_include = @_am_include@ +_am_quote = @_am_quote@ +includeopt = @includeopt@ +install_sh = @install_sh@ + +INCLUDES = -I$(top_srcdir)/lib + +noinst_LIBRARIES = libdiff.a + +libdiff_a_SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c \ + context.c ed.c normal.c ifdef.c util.c dir.c version.c diff.h \ + side.c system.h diffrun.h + + +EXTRA_DIST = ChangeLog build_diff.com diagmeet.note libdiff.dsp +EXEEXT = +OBJEXT = o +subdir = diff +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) + +libdiff_a_AR = $(AR) cru +libdiff_a_LIBADD = +am_libdiff_a_OBJECTS = diff.$(OBJEXT) diff3.$(OBJEXT) analyze.$(OBJEXT) \ + cmpbuf.$(OBJEXT) io.$(OBJEXT) context.$(OBJEXT) ed.$(OBJEXT) \ + normal.$(OBJEXT) ifdef.$(OBJEXT) util.$(OBJEXT) dir.$(OBJEXT) \ + version.$(OBJEXT) side.$(OBJEXT) +libdiff_a_OBJECTS = $(am_libdiff_a_OBJECTS) AR = ar +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CFLAGS = @CFLAGS@ +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CPPFLAGS = @CPPFLAGS@ +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src DEFS = @DEFS@ -RANLIB = @RANLIB@ -CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +DIST_SOURCES = $(libdiff_a_SOURCES) +depcomp = $(SHELL) $(top_srcdir)/depcomp +@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/analyze.Po $(DEPDIR)/cmpbuf.Po \ +@AMDEP_TRUE@ $(DEPDIR)/context.Po $(DEPDIR)/diff.Po \ +@AMDEP_TRUE@ $(DEPDIR)/diff3.Po $(DEPDIR)/dir.Po $(DEPDIR)/ed.Po \ +@AMDEP_TRUE@ $(DEPDIR)/ifdef.Po $(DEPDIR)/io.Po \ +@AMDEP_TRUE@ $(DEPDIR)/normal.Po $(DEPDIR)/side.Po \ +@AMDEP_TRUE@ $(DEPDIR)/util.Po $(DEPDIR)/version.Po +DIST_COMMON = ChangeLog Makefile.am Makefile.in +SOURCES = $(libdiff_a_SOURCES) +OBJECTS = $(am_libdiff_a_OBJECTS) -prefix = @prefix@ -exec_prefix = @exec_prefix@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj + +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu diff/Makefile -PR_PROGRAM = /bin/pr +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status -#### End of system configuration section. #### +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -SHELL = /bin/sh +libdiff.a: $(libdiff_a_OBJECTS) $(libdiff_a_DEPENDENCIES) + -rm -f libdiff.a + $(libdiff_a_AR) libdiff.a $(libdiff_a_OBJECTS) $(libdiff_a_LIBADD) + $(RANLIB) libdiff.a -# The source files for all of the programs. -SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c \ - normal.c ifdef.c util.c dir.c version.c diff.h side.c system.h \ - diffrun.h -OBJECTS = diff.o diff3.o analyze.o cmpbuf.o dir.o io.o util.o \ - context.o ed.o ifdef.o normal.o side.o version.o -DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in diagmeet.note \ - libdiff.dsp .cvsignore +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core -all: libdiff.a +distclean-compile: + -rm -f *.tab.c -# $(top_srcdir)/lib is so we don't get the system-supplied headers for -# functions that we supply ourselves in lib. $(srcdir) is perhaps not -# necessary if we assume the unix compiler behavior whereby "" looks -# in the directory containing the .c file first. -# -I. is probably unnecessary (I don't think we generate any .h files). -# -I.. is for config.h. -COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \ - -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS) +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ + unique=`for i in $$list @CONFIG@; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || $(ETAGS) $(ETAGS_ARGS) $$tags $$unique $(LISP) + +GTAGS: + here=`CDPATH=: && cd $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $$here + +distclean-tags: + -rm -f TAGS ID + +@_am_include@ @_am_quote@$(DEPDIR)/analyze.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/cmpbuf.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/context.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/diff.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/diff3.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/dir.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/ed.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/ifdef.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/io.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/normal.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/side.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/util.Po@_am_quote@ +@_am_include@ @_am_quote@$(DEPDIR)/version.Po@_am_quote@ + +distclean-depend: + -rm -rf $(DEPDIR) + +CCDEPMODE = @CCDEPMODE@ .c.o: - $(COMPILE) $< + source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ + $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< -libdiff libdiff.a: $(OBJECTS) - $(AR) cr libdiff.a $(OBJECTS) - -$(RANLIB) libdiff.a +.c.obj: + source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ + $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c -o $@ `cygpath -w $<` -$(OBJECTS): diff.h diffrun.h system.h -analyze.o cmpbuf.o: cmpbuf.h -util.o: util.c - $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $< +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -install: all +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pR $$d/$$file $(distdir) \ + || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) installdirs: - @: nothing to do for installdirs -.PHONY: installdirs -TAGS: $(SOURCES) - etags $(SOURCES) +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am -clean: - rm -f *.o *.a core +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -mostlyclean: clean +installcheck: installcheck-am -distclean: clean - rm -f TAGS tags Makefile +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install -realclean: distclean +mostlyclean-generic: -Makefile: Makefile.in ../config.status - cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f Makefile.in +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-compile distclean-depend \ + distclean-generic distclean-tags + +dvi: + +dvi-am: + +info: + +info-am: + +install-data-am: + +install-exec-am: + +install-info: + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +.PHONY: all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES distclean distclean-compile \ + distclean-depend distclean-generic distclean-tags distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic tags \ + uninstall uninstall-am -dist-dir: - mkdir ${DISTDIR} - for i in ${DISTFILES}; do \ - ln $(srcdir)/$${i} ${DISTDIR}; \ - done -# Prevent GNU make v3 from overflowing arg limit on SysV. +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/contrib/cvs/diff/analyze.c b/contrib/cvs/diff/analyze.c index f292594..3262444 100644 --- a/contrib/cvs/diff/analyze.c +++ b/contrib/cvs/diff/analyze.c @@ -621,7 +621,9 @@ shift_boundaries (filevec) struct file_data filevec[]; { int f; - int inhibit_hunk_merge = horizon_lines != context; + + if (inhibit) + return; for (f = 0; f < 2; f++) { @@ -664,21 +666,18 @@ shift_boundaries (filevec) we can later determine whether the run has grown. */ runlength = i - start; - if (! inhibit_hunk_merge) - { - /* Move the changed region back, so long as the - previous unchanged line matches the last changed one. - This merges with previous changed regions. */ + /* Move the changed region back, so long as the + previous unchanged line matches the last changed one. + This merges with previous changed regions. */ - while (start && equivs[start - 1] == equivs[i - 1]) - { - changed[--start] = 1; - changed[--i] = 0; - while (changed[start - 1]) - start--; - while (other_changed[--j]) - continue; - } + while (start && equivs[start - 1] == equivs[i - 1]) + { + changed[--start] = 1; + changed[--i] = 0; + while (changed[start - 1]) + start--; + while (other_changed[--j]) + continue; } /* Set CORRESPONDING to the end of the changed run, at the last @@ -686,15 +685,13 @@ shift_boundaries (filevec) CORRESPONDING == I_END means no such point has been found. */ corresponding = other_changed[j - 1] ? i : i_end; - /* Shift the changed region forward, so long as the - first changed line matches the following unchanged one, - but if INHIBIT_HUNK_MERGE is 1 do not shift if - this would merge with another changed region. + /* Move the changed region forward, so long as the + first changed line matches the following unchanged one. + This merges with following changed regions. Do this second, so that if there are no merges, the changed region is moved forward as far as possible. */ - while (i != i_end && equivs[start] == equivs[i] - && ! (inhibit_hunk_merge & other_changed[j + 1])) + while (i != i_end && equivs[start] == equivs[i]) { changed[start++] = 0; changed[i++] = 1; diff --git a/contrib/cvs/diff/diff.c b/contrib/cvs/diff/diff.c index aa91913..ebd78ae 100644 --- a/contrib/cvs/diff/diff.c +++ b/contrib/cvs/diff/diff.c @@ -775,7 +775,7 @@ static char const * const option_help[] = { "-e --ed Output an ed script.", "-n --rcs Output an RCS format diff.", "-y --side-by-side Output in two columns.", -" -w NUM --width=NUM Output at most NUM (default 130) characters per line.", +" -W NUM --width=NUM Output at most NUM (default 130) characters per line.", " --left-column Output only the left column of common lines.", " --suppress-common-lines Do not output common lines.", "-DNAME --ifdef=NAME Output merged file to show `#ifdef NAME' diffs.", diff --git a/contrib/cvs/diff/dir.c b/contrib/cvs/diff/dir.c index fae74e8..da497dc 100644 --- a/contrib/cvs/diff/dir.c +++ b/contrib/cvs/diff/dir.c @@ -61,7 +61,7 @@ dir_sort (dir, dirdata) if (dir->desc != -1) { /* Open the directory and check for errors. */ - register DIR *reading = opendir (dir->name); + register DIR *reading = CVS_OPENDIR (dir->name); if (!reading) return -1; @@ -74,7 +74,7 @@ dir_sort (dir, dirdata) /* Read the directory entries, and insert the subfiles into the `data' table. */ - while ((errno = 0, (next = readdir (reading)) != 0)) + while ((errno = 0, (next = CVS_READDIR (reading)) != 0)) { char *d_name = next->d_name; size_t d_size = NAMLEN (next) + 1; @@ -96,14 +96,14 @@ dir_sort (dir, dirdata) if (errno) { int e = errno; - closedir (reading); + CVS_CLOSEDIR (reading); errno = e; return -1; } #if CLOSEDIR_VOID - closedir (reading); + CVS_CLOSEDIR (reading); #else - if (closedir (reading) != 0) + if (CVS_CLOSEDIR (reading) != 0) return -1; #endif } diff --git a/contrib/cvs/diff/system.h b/contrib/cvs/diff/system.h index 76bc163..f5037ec 100644 --- a/contrib/cvs/diff/system.h +++ b/contrib/cvs/diff/system.h @@ -269,3 +269,16 @@ extern int errno; *(q)++ = '\''; \ } #endif + +/* these come from CVS's lib/system.h, but I wasn't sure how to include that + * properly or even if I really should + */ +#ifndef CVS_OPENDIR +#define CVS_OPENDIR opendir +#endif +#ifndef CVS_READDIR +#define CVS_READDIR readdir +#endif +#ifndef CVS_CLOSEDIR +#define CVS_CLOSEDIR closedir +#endif |