-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 10/4/2005 2:11 AM: > On Oct 1 21:34, Eric Blake wrote: > >>I've uploaded a test version of coreutils, 5.90-1. [...] >> cat's --binary or -B option has been removed. It existed only on >> MS-DOS-like platforms, and didn't work as documented there. > > > How is that supposed to work in future? Cat is a texttool so it > seems not to be safe to let the --binary option go.
In the upstream sources, --binary was unquestionably broken, among a maze of #ifdefs and attempted support for DJGPP. There was a cygwin-specific patch to try to rectify it applied in 5.2.1 which I forward ported to 5.3.0, but I have not analyzed it closely enough to see if it still made sense in every situation. But on a quick inspection, it looks to me like the only time --binary made any difference was with the -n, -s, or -E options. In 5.90, the upstream sources removed DJGPP support, and have no ifdefs, so it is easier to follow. Also, it always uses binary mode unless -n, - -s, or -E is specified. The argument against binary in those three modes is that a line containing just CR-LF is no longer an empty line when read in binary mode, combined with the fact that those three options munge the output according to whether the line is empty or not. Furthermore, neither -n, -s, nor -E are required by POSIX, so they have no requirements that they have to operate in a binary mode. Therefore, having a --binary option makes no sense, at least in the upstream maintainer's viewpoint. If anyone really ever did use `cat -s --binary' to purposefully make -s read input in binary, then speak up now. It would only make a difference if you cat a file that resides on a text mount. I doubt that it was well-used, but if so, then the argument can still be made that upstream should not have removed the option; and I can still see about maintaining a cygwin-specific patch that restores a rudimentary --binary option even if upstream stays by their decision to no longer maintain a --binary option. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDQnr284KuGfSFAYARAmJGAKCJ61WQYZt/Af+h32XpDWrtYBQg9QCfUhQU lPTzcy+Q06TvNWWR1Z/CdRU= =9j5l -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/