bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

diff-bug


From: Lukas Cerman
Subject: diff-bug
Date: Wed, 18 Feb 2004 21:09:28 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016

Hi!

I discovered a weird bug in diff output -- some common lines are reported different, and are included in just following difference.

See sixth difference in file diff-2.8.1-b produced by comparing files worker1.cpp and worker2.cpp (diff -b worker1.cpp worker2.cpp):

132,136c183,906
<   char number[50];
<   CQuadWord size;
<   DWORD err;
< if (SxxGetFileSize(file, fileName, size, err)) NumberToStr(number, size);
<   else number[0] = 0;  // chyba - velikost neznama
---
>   char number[50];
>   CQuadWord size;
>   DWORD err;
> if (SxxGetFileSize(file, fileName, size, err)) NumberToStr(number, size);
>   else number[0] = 0;  // chyba - velikost neznama
>
>   sprintf(buffer, "%s, %s, %s", number, date, time);
> }

First five lines are obviously the same. Different -- but also incorrect -- output is done by command `diff worker1.cpp worker2.cpp', which I saved in file diff-2.8.1.

I've also tried it with version 2.7, without option -b it worked fine!! Using option -b it produced the same output as version 2.8.1.

Here is, what my diff says 'bout itself:

~$ diff --version
diff (GNU diffutils) 2.8.1
Copyright (C) 2002 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Written by Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.

Hope it helpes, sincerely
Lukas

Attachment: diff.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]