V5.94 ptx -i ignore-file doesn't appear to work

Eric Blake ebb9@byu.net
Tue Apr 11 12:34:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://cygwin.com/acronyms/#PPIOSPE - that way others can see the
resolution to this thread.

Reformatted your mail to avoid http://cygwin.com/acronyms/#TOFU

According to Graig McHendrie on 4/10/2006 7:08 AM:
> However, since I suspect line endings (even though all your directories
> are mounted binmode, which is good), copying and pasting from your email
> did not give me the same files that you were testing with (I was only
> able
> to reproduce Paul's output).  Please send the actual (short) problem
> files
> as an attachment, with line-endings preserved, so that I can more easily
> reproduce your situation.

> I wondered if it was something like that.  Here are the two files:
[snipped]
>
> Thanks,
> Graig
>

Indeed, both your files had CRLF endings, so ptx was using "a\r" as the
keyword instead of "a".  Upstream coreutils assumes that fopen(file, "r")
picks text mode, where in reality, on cygwin it picks the mode of the
underlying mount point.  Normally, if you use binary mounts, you should
use binary files (only LF line endings) so that tools that open files with
fopen(file, "r") don't have to deal with CR.  There exists a
cygwin-specific fopen(file, "rt") which can force text mode, but upstream
coreutils maintainers are reluctant to use it since it is not specified by
any standards body and is pretty much unique to cygwin.  If you insist on
text files with DOS endings, then it is easier to mount that directory
(but not your whole cygwin installation) as textmode.  Otherwise, d2u is a
great program for converting line endings to something expected by unix tools.

That said, I will probably patch coreutils ptx to force a text read of
files (ie. ignore \r in the keyword ignore list) when I next release an
update to coreutils - I have no problem maintaining cygwin-local patches
that the upstream maintainers will not accept.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
volunteer cygwin coreutils maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEO53Z84KuGfSFAYARAsB1AJ93u6ViI8uy0AdUT9C0vXQBhY0mYwCeKSJd
nYIEjJvOdUH19ZyvV9kER+I=
=OTQX
-----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/



More information about the Cygwin mailing list