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

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

diff bug?


From: Ged Haywood
Subject: diff bug?
Date: Tue, 5 Aug 2003 11:23:09 +0100 (BST)

Hi there,

I get output that doesn't show certain differences when I use the following:

$ diff --version
diff (GNU diffutils) 2.8.1
------------------------------------------------------------------------------------------
$ diff ./jlabels.cpp 
/local/hdc1/home/ged_demountable/src/ccvs/sos-5.001/jlabels.cpp
[snip]
1290,1295c1290,1291
<         twoDates td = toggleBit( SPC.flag2bits, mask, fF );
<         if( td.beg && td.end )
<         {
<           SPC.flagBitDateRangeStart[c] = td.beg;
<           SPC.flagBitDateRangeEnd[c] = td.end;
<         }
---
>         SPC.flagBitDateRangeStart[c] = td.beg;
>         SPC.flagBitDateRangeEnd[c] = td.end;
------------------------------------------------------------------------------------------
There are differences not shown - I added some curly braces in the first file.
When I use a context diff I can see the differences, but they still aren't 
highlighted:
------------------------------------------------------------------------------------------
$ diff -C3 ./jlabels.cpp 
/local/hdc1/home/ged_demountable/src/ccvs/sos-5.001/jlabels.cpp
*** ./jlabels.cpp       Mon Aug  4 14:45:44 2003
--- /local/hdc1/home/ged_demountable/src/ccvs/sos-5.001/jlabels.cpp     Sun Feb 
 9 17:14:20 2003
***************
[snip]
***************
*** 1286,1298 ****
        case '4': c++; case '3': c++; case '2': c++; case '1': c++;
          c--;
          mask <<= c;
        {
!         twoDates td = toggleBit( SPC.flag2bits, mask, fF );
!         if( td.beg && td.end )
!         {
!           SPC.flagBitDateRangeStart[c] = td.beg;
!           SPC.flagBitDateRangeEnd[c] = td.end;
!         }
        }
        break;
  #endif
--- 1284,1294 ----
        case '4': c++; case '3': c++; case '2': c++; case '1': c++;
          c--;
          mask <<= c;
+       twoDates td = toggleBit( SPC.flag2bits, mask, fF );
+       if( td.beg && td.end )
        {
!         SPC.flagBitDateRangeStart[c] = td.beg;
!         SPC.flagBitDateRangeEnd[c] = td.end;
        }
        break;
  #endif
------------------------------------------------------------------------------------------

Is this a bug or am I reading it wrong?  BTW I've removed some ^M
characters from the output (I'm porting the code from DOS...:)

73,
Ged.





reply via email to

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