Most Gnuwin32 ports work as well with CRLF as with LF, because in text mode, the read and write functions from msvcrt.dll convert CRLF internally to LF on reading and the other way around for writing. The only problem occurs when seek or tell functions are used. A solution seems only possible by letting the program first scan the input and then guess which of CRLF / LF was used on input. This requires a lot of programming and even then wrong choices are possible. So I doubt that an easy solution is possible. I think that diff is insensitive to CRLF / LF. As for patch, I've never succeeded in finding the exact cause of its breaking on patch files with LF.
Kees Zeelenberg ----- Original Message ----- From: "Lennart Borgman" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Saturday, December 23, 2006 3:24 AM Subject: [GnuWin32-Users] Handling of CRLF/LF in patch and diff > It sometimes happens that you receive patch files with a different line > formats than the file to patch. Other times you may want to compare two > files that have different line endings. I think that if you work on a > project that is crossplatform or if you happen to get the file or patch > via mail those situations can occur. > > Working crossplatform is of course one of the reasons for gnuwin32 to > exist. It would IMHO be very good if patch and diff could handle those > situations. Currently I have been thinking about different ways to fix > this when using patch and diff from inside Emacs, but I wonder whether > that is the way to go. Fixing the patch and diff programs themselves > seems better to me. > > Have someone on this list thought about this? Would it be difficult to > do? I would suggest adding a new argument option for this of course. > > > > BTW did someone see my little perl script for downloading of gnuwin32? : > > http://ourcomments.org/Emacs/DL/w32%20util/gnuwin32/ > > (The html doc is not quite up to date at the moment. And sometimes you > have a problem with the web pages from sourceforge. Other than that it > works I think.) > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > GnuWin32-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gnuwin32-users > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ GnuWin32-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gnuwin32-users
