unix/dos text question
Christopher Faylor
cgf@redhat.com
Thu Mar 22 16:41:00 GMT 2001
On Fri, Mar 23, 2001 at 11:18:21AM +1100, Robert Collins wrote:
>/dev/clipboard is a block/stream device... but it's pretty much
>guaranteed that there will be dos/unix mode issues:
>
>unix mode cygwin - the text when copied to (say) notepad will still be
>unix text. Likewise text copied from notepad to cygwin may have extra
>characters.
>
>dos mode cygwin - shouldn't have any surprises.
>
>Does the filehandler take care of that for me, or does the clipboard
>device need to be aware in some fashion? Ideally the clipboard gets the
>file data already translated :]
If you've implemented your own read method then the dos/unix line mode
stuff won't happen, unless you've implemented it, IIRC. Theoretically,
devices should be controlled by the CYGWIN=binmode setting. It would
be kind of cool to allow mounting of the device to control the mode
but I think this only works for disk files.
>The catch is that when writing the CF_TEXT format for windows
>applications to get from cygwin it should _always_ be dos mode IMO.
>(Cygwin apps will get the native format, which should be in whatever
>file mode the user is using).
>
>Pointers to routines are hereby solicted :]
I'd just trace things from _read() and see how it works. Or, write
a simple program to check it.
cgf
More information about the Cygwin-developers
mailing list