[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diffutils-2.7.9, diff with -y and -W options
From: |
Mitsuru Chinen |
Subject: |
diffutils-2.7.9, diff with -y and -W options |
Date: |
Tue, 12 Mar 2002 22:42:24 +0900 |
Dear diffutils maintainers,
It seems that `diff' command with -y and -W options in diffutils-2.7.9 outputs
error message wrongly.
[diffutils-2.7]
$ cat foo.c
1234567890
$ diff -y -W 10 foo.c foo.c
01234 01234
[diffutils-2.7.9]
$ diff -y -W 10 foo.c foo.c
diff: conflicting width options
I made a patch to fix this problem.
Thank you,
------
Mitsuru Chinen <address@hidden>
diff -upr diffutils-2.7.9.orig/src/diff.c diffutils-2.7.9/src/diff.c
--- diffutils-2.7.9.orig/src/diff.c Sun Mar 10 23:32:35 2002
+++ diffutils-2.7.9/src/diff.c Tue Mar 12 22:28:22 2002
@@ -253,6 +253,7 @@ main (int argc, char **argv)
lin ocontext = -1;
bool explicit_context = 0;
int width = 130;
+ bool def_width_flag = 0;
bool show_c_function = 0;
char const *from_file = 0;
char const *to_file = 0;
@@ -497,8 +498,9 @@ main (int argc, char **argv)
try_help ("invalid width `%s'", optarg);
if (width != numval)
{
- if (width)
+ if (def_width_flag)
fatal ("conflicting width options");
+ def_width_flag = 1;
width = numval;
}
break;
- diffutils-2.7.9, diff with -y and -W options,
Mitsuru Chinen <=