I'm a little bit tired and some pis..off
There is a big mess between console applications, gui applications allocating a console, threads and whatever you can imagine of..
The project workspace contains a working copy of patch with many trials to make it work ... not perfectly damn it
, but at least in the same way ...
Does anybody understood why the I/O subsystem plays up this way around?
I have reinitialized all local static variables, global variables and the rest. I have reduced to minimum low level I/O, I have simplified it, but the various versions behaves differently from the first run
It seems that PellesC libraries have some problems too.
Anyway if during tests you get messages about existing temporary files just delete them. They are located in the temp directory of your system (usually C:\Documents and Settings\<current user>\Local Settings\Temp).
If someone find the problem or some explanation is welcome ...
P.S. The problem is not Patch itself, but when you use it in a gui multithreaded (especially multithreaded) environment, fopen, fclose, _open _close &CO messed up...
I Added the diffs.txt patch file.