www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/03/22/19:44:04

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Thu, 22 Mar 2001 19:41:41 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: unix/dos text question
Message-ID: <20010322194141.D20261@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <EA18B9FA0FE4194AA2B4CDB91F73C0EF79AC AT itdomain002 DOT itdomain DOT net DOT au>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <EA18B9FA0FE4194AA2B4CDB91F73C0EF79AC@itdomain002.itdomain.net.au>; from robert.collins@itdomain.com.au on Fri, Mar 23, 2001 at 11:18:21AM +1100

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019