rb@cc.ic.ac.uk (Robin Becker) (09/04/90)
Hi, I submitted the recent CBIP GNUdiff for MSDOS. I also sent the patches out on gnu.utils.bug. I am willing to post the actual sources there too. My patches are apparently too complex and cause some problems when I try to apply using L Wall's patch prg. J Thiel has also pointed out a bug in the version I sent to CBIP. This concerns the use of control+Z as an eof marker. These problems do not occur with a version for MSDOS/OS2 posted recently by K. Uwe Rommel. I have now got this latter version and find that there are bugs or features in this one too. The problem comes from MSDOS's over supply of line terminators. In my version files are read in binary mode and this allows easy and correct checking of both binary and text files except in certain cases involving CTL+Z at the end of the file. Rommel's version reads in text mode and may give incorrect answers on binary files differing in length and or CRLF pairs. This version basically ignores anything after CTLZ and maps all CRLF's to LF. There's no easy way to say what the correct behaviour should be for a program like diff when files contain CTLZ and differ in say line terminators. Any ideas welcome Robin Becker If God had meant us to use MSDOS he would've given us the extra head nobody seems to want.
rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) (09/05/90)
In article <1990Sep4.120256.10979@cc.ic.ac.uk> rb@cc.ic.ac.uk (Robin Becker) writes: >Hi, I submitted the recent CBIP GNUdiff for MSDOS. I also sent the >patches out on gnu.utils.bug. I am willing to post the actual sources >there too. My patches are apparently too complex and cause some >problems when I try to apply using L Wall's patch prg. J Thiel has When diff'ing non-existent files, plain GNU diff attempts to get the file's time into a string using ctime() which results in "(null)" printed when running under MS C and no linefeed after this line. This may cause problems to patch. >the use of control+Z as an eof marker. These problems do not occur >with a version for MSDOS/OS2 posted recently by K. Uwe Rommel. I have >now got this latter version and find that there are bugs or features >in this one too. The problem comes from MSDOS's over supply of Main problem is still the file size limit. Your version also has it but you earlier fail on memory shortage (DOS!) while the OS/2 version does not. I fixed it for files up to 3000 lines but somtimes generated diffs are not correct for such big files but I am tired of fixing this problem... But all other features, even formatted diffs (using PR) are implemented. >except in certain cases involving CTL+Z at the end of the file. Rommel's >version reads in text mode and may give incorrect answers on binary >files differing in length and or CRLF pairs. This version basically >ignores anything after CTLZ and maps all CRLF's to LF. I wanted to make as little changes as possible to get it running correctly because when getting the next plain version the work would be more to adapt the patches. Also, I almost never compare binary files, only source files, so I decided not to support binary files. >There's no easy way to say what the correct behaviour should be for >a program like diff when files contain CTLZ and differ in say line >terminators. Does anyone use GNU diff for binary comparisons? > Robin Becker Kai Uwe Rommel -- /* Kai Uwe Rommel * Munich * rommel@lan.informatik.tu-muenchen.dbp.de */