[arch-general] diff is going nuts
Hi, for some time past I often need to replace diff with meld, since diff is going nuts. Today I noticed the most ridiculous thing. Just the first line is different! [1] Nothing else is different, but the complete file is listed. Regards, Ralf [1] [rocketmouse@archlinux energyXT27]$ pacman -Q diffutils diffutils 3.3-2 [rocketmouse@archlinux energyXT27]$ pacman -Si diffutils | grep Ver Version : 3.3-2 [rocketmouse@archlinux energyXT27]$ diff jack.cpp.default jack.cpp 3c3 < // compile: g++ -shared -lasound -ljack jack.cpp -o /_path_to_energyXT2_/libaam.so ---
// compile: g++ -shared -lasound -ljack jack.cpp -o /lib64/libaam.so 12,35c12,35 < const int STREAM_INIT = 0; < const int STREAM_OPEN = 1; < const int STREAM_CLOSE = 2; < //const int STREAM_PLAY = 3; < //const int STREAM_STOP = 4; < const int STREAM_EXIT = 5; < const int STREAM_ABOUT = 6; < const int STREAM_AUDIO_COUNT = 7; < const int STREAM_AUDIO_NAME = 8; < const int STREAM_FRAMES = 9; < const int STREAM_RATE = 10; < const int STREAM_LATENCY = 17; < const int STREAM_RELOAD = 18; < const int MIDI_IN_COUNT = 30; < const int MIDI_IN_NAME = 31; < const int MIDI_IN_ENABLE = 32; < const int MIDI_IN_ENABLED = 33; < const int AUDIO_IN_COUNT = 40; < const int AUDIO_IN_NAME = 41; < const int AUDIO_IN_ENABLE = 42; < const int AUDIO_IN_ENABLED = 43; < const int AUDIO_OUT_COUNT = 50; < const int AUDIO_OUT_NAME = 51; < const int AUDIO_OUT_ENABLE = 52;
const int STREAM_INIT = 0; const int STREAM_OPEN = 1; const int STREAM_CLOSE = 2; //const int STREAM_PLAY = 3; //const int STREAM_STOP = 4; const int STREAM_EXIT = 5; const int STREAM_ABOUT = 6; const int STREAM_AUDIO_COUNT = 7; const int STREAM_AUDIO_NAME = 8; const int STREAM_FRAMES = 9; const int STREAM_RATE = 10; const int STREAM_LATENCY = 17; const int STREAM_RELOAD = 18; const int MIDI_IN_COUNT = 30; const int MIDI_IN_NAME = 31; const int MIDI_IN_ENABLE = 32; const int MIDI_IN_ENABLED = 33; const int AUDIO_IN_COUNT = 40; const int AUDIO_IN_NAME = 41; const int AUDIO_IN_ENABLE = 42; const int AUDIO_IN_ENABLED = 43; const int AUDIO_OUT_COUNT = 50; const int AUDIO_OUT_NAME = 51; const int AUDIO_OUT_ENABLE = 52; 42,44c42,44 < class CThread < { < public:
class CThread { public: 46,47c46,47 < pthread_t handle; < CThread();
pthread_t handle; CThread();
50c50 < virtual void execute() {}; ---
virtual void execute() {};
52,54c52,54 < < CThread :: CThread() < { ---
CThread :: CThread() {
57,62d56 [snip]
On Sun, Mar 22, 2015 at 2:45 PM, Ralf Mardorf <ralf.mardorf@rocketmail.com> wrote:
Hi,
for some time past I often need to replace diff with meld, since diff is going nuts.
Did you check with hexdump, in case you have MS-DOS newlines, different unicode spaces or other artifacts in the file? cheers! mar77i
There are lots of trailing whitespaces on those lines (looking at the raw email). Retry with "diff -w" to ignore whitespace diffs. 2015-03-22 14:47 GMT+01:00 Martti Kühne <mysatyre@gmail.com>:
On Sun, Mar 22, 2015 at 2:45 PM, Ralf Mardorf <ralf.mardorf@rocketmail.com> wrote:
Hi,
for some time past I often need to replace diff with meld, since diff is going nuts.
Did you check with hexdump, in case you have MS-DOS newlines, different unicode spaces or other artifacts in the file?
cheers! mar77i
Thank you Henrik and Martti, "diff -w jack.cpp.default jack.cpp" does the trick, so it was my fault. When using hexdump I noticed that not the complete file were listed by the diff without -w, I was mistaken. Comparison with hexdump shows that the edited file sometimes is different \n vs \r \n: 0000130 I T = 0 ; 0000140 \n c o n s t i n t S T R E 0000150 A M _ O P E N 0000140 = 0 ; \r 0000150 \n c o n s t i n t S T R E A 0000160 M _ O P E N Regards, Ralf
participants (3)
-
Henrik Danielsson
-
Martti Kühne
-
Ralf Mardorf