|
|
|
|
Index: Makefile.in
|
|
|
|
|
--- Makefile.in.orig 2005-06-13 19:41:01 +0200
|
|
|
|
|
+++ Makefile.in 2007-01-06 14:18:07 +0100
|
|
|
|
|
@@ -113,7 +113,7 @@
|
|
|
|
|
|
|
|
|
|
bin_PROGRAMS = src/interdiff src/filterdiff src/rediff
|
|
|
|
|
bin_SCRIPTS = fixcvsdiff splitdiff editdiff recountdiff unwrapdiff dehtmldiff \
|
|
|
|
|
- espdiff
|
|
|
|
|
+ espdiff gendiff
|
|
|
|
|
|
|
|
|
|
man_MANS = doc/interdiff.1 doc/filterdiff.1 doc/fixcvsdiff.1 doc/rediff.1 \
|
|
|
|
|
doc/editdiff.1 doc/combinediff.1 doc/lsdiff.1 doc/splitdiff.1 \
|
|
|
|
|
@@ -513,6 +513,8 @@
|
|
|
|
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
|
|
|
espdiff: $(top_builddir)/config.status espdiff.in
|
|
|
|
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
|
|
|
+gendiff: $(top_builddir)/config.status gendiff.in
|
|
|
|
|
+ cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
|
|
|
patchutils.spec: $(top_builddir)/config.status patchutils.spec.in
|
|
|
|
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
|
|
|
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
|
|
|
|
Index: configure
|
|
|
|
|
--- configure.orig 2005-06-13 19:41:01 +0200
|
|
|
|
|
+++ configure 2007-01-06 14:19:46 +0100
|
|
|
|
|
@@ -4879,7 +4879,7 @@
|
|
|
|
|
_ACEOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- ac_config_files="$ac_config_files Makefile splitdiff editdiff fixcvsdiff recountdiff unwrapdiff dehtmldiff espdiff patchutils.spec"
|
|
|
|
|
+ ac_config_files="$ac_config_files Makefile splitdiff editdiff fixcvsdiff recountdiff unwrapdiff dehtmldiff espdiff patchutils.spec gendiff"
|
|
|
|
|
cat >confcache <<\_ACEOF
|
|
|
|
|
# This file is a shell script that caches the results of configure
|
|
|
|
|
# tests run on this system so they can be shared between configure
|
|
|
|
|
Index: gendiff.in
|
|
|
|
|
--- /dev/null 2007-01-06 14:19:19 +0100
|
|
|
|
|
+++ gendiff.in 2007-01-06 14:18:07 +0100
|
|
|
|
|
@@ -0,0 +1,18 @@
|
|
|
|
|
+#!/bin/bash
|
|
|
|
|
+if [ $# -ne 2 ]; then
|
|
|
|
|
+ echo "Usage: ${0##*/} DIRECTORY DIFF-SUFFIX" 1>&2
|
|
|
|
|
+ exit 1
|
|
|
|
|
+fi
|
|
|
|
|
+find "$1" \( -name "*$2" -o -name ".*$2" \) -print |\
|
|
|
|
|
+while read OP; do
|
|
|
|
|
+ NP="${OP%$2}"
|
|
|
|
|
+ NN="${NP##*/}"
|
|
|
|
|
+ U="-u"
|
|
|
|
|
+ if [ "$NN" = "ChangeLog" ]; then
|
|
|
|
|
+ U="-U0"
|
|
|
|
|
+ fi
|
|
|
|
|
+ case "${NN##*.}" in
|
|
|
|
|
+ c|cc|C|cpp) U="$U -p" ;;
|
|
|
|
|
+ esac
|
|
|
|
|
+ diff $U "$OP" "$NP"
|
|
|
|
|
+done
|
|
|
|
|
Index: src/diff.c
|
|
|
|
|
--- src/diff.c.orig 2005-02-27 00:45:20 +0100
|
|
|
|
|
+++ src/diff.c 2007-01-06 14:18:07 +0100
|
|
|
|
|
@@ -67,16 +67,20 @@
|
|
|
|
|
{
|
|
|
|
|
int *pathname_components;
|
|
|
|
|
int *basename_length;
|
|
|
|
|
+ int *is_dev_null;
|
|
|
|
|
int best_pn, best_bn, best_n, best = 0; /* shut gcc up */
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
pathname_components = xmalloc (sizeof (int *) * n);
|
|
|
|
|
basename_length = xmalloc (sizeof (int *) * n);
|
|
|
|
|
+ is_dev_null = xmalloc (sizeof (int *) * n);
|
|
|
|
|
|
|
|
|
|
best_pn = -1;
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
|
- if (!strcmp (names[i], "/dev/null"))
|
|
|
|
|
+ is_dev_null[i] = !strcmp (names[i], "/dev/null");
|
|
|
|
|
+ if (is_dev_null[i])
|
|
|
|
|
continue;
|
|
|
|
|
+
|
|
|
|
|
pathname_components[i] = num_pathname_components (names[i]);
|
|
|
|
|
if ((best_pn == -1) ||
|
|
|
|
|
(pathname_components[i] < best_pn))
|
|
|
|
|
@@ -87,7 +91,7 @@
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
|
char *p;
|
|
|
|
|
|
|
|
|
|
- if (!strcmp (names[i], "/dev/null"))
|
|
|
|
|
+ if (is_dev_null[i])
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (pathname_components[i] != best_pn)
|
|
|
|
|
@@ -109,6 +113,9 @@
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
|
int len;
|
|
|
|
|
|
|
|
|
|
+ if (is_dev_null[i])
|
|
|
|
|
+ continue;
|
|
|
|
|
+
|
|
|
|
|
if (basename_length[i] != best_bn)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
@@ -122,6 +129,7 @@
|
|
|
|
|
|
|
|
|
|
free (pathname_components);
|
|
|
|
|
free (basename_length);
|
|
|
|
|
+ free (is_dev_null);
|
|
|
|
|
return names[best];
|
|
|
|
|
}
|
|
|
|
|
|