delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/31/10:03:37

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <055001c0e9da$5f752930$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Dario Alcocer" <alcocer AT helixdigital DOT com>
Cc: <cygwin AT cygwin DOT com>
References: <03d901c0e9b8$3688c080$0200a8c0 AT lifelesswks> <15126 DOT 19989 DOT 908612 DOT 63323 AT coyote DOT priv DOT helixdigital DOT com>
Subject: Re: clipboard enhancement request-for-discussion
Date: Fri, 1 Jun 2001 00:02:46 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 31 May 2001 13:54:13.0813 (UTC) FILETIME=[2CF9FE50:01C0E9D9]

----- Original Message -----
From: "Dario Alcocer" <alcocer AT helixdigital DOT com>
To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
Cc: <cygwin AT cygwin DOT com>
Sent: Thursday, May 31, 2001 11:58 PM
Subject: Re: clipboard enhancement request-for-discussion


> >>>>> "Robert" == Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
writes:
>
>     Robert> I'm finding more and more often, that being able to
>     Robert> redirect things to /dev/clipboard isn't quite enough.
>
>     Robert> <-- snip -->
>
>     Robert> create a new device /dev/clipfile which when written to
>     Robert> places a "file" (specifically a CFSTR_FILEDESCRIPTOR
>     Robert> format object) on the clipboard, consisting of the
>     Robert> contents written to /dev/clipfile.
>
>     Robert> The upshot of that is that
>
>     Robert> ---
>     Robert> cvs diff -up foo > /dev/clipfile
>     Robert> [switch to some application that understands file copy and
>     Robert> paste - ie outlook]
>     Robert> shift-insert
>     Robert> ---
>
> Robert,
>
> I wonder: could be accomplished without having to add another device
> in Cygwin?  Could a separate program, say, 'fmtclip', format or
> process the input data such that it's in the right format for the
> clipboard?

Uhmm no. The WIN32 API call to place data on the clipboard changes. -
It's not a input data format issue :[.

It could be done via FCNTL calls I suppose. (change the behaviour of the
fd and then write). However the overhead in cygwin of another device
would be minimal: the extra device will be a userland visibility issue,
not an actual copy of the device handling code.

> The usage would be a little different than you proposed:
>
>     cvs diff -up foo | fmtclip --file-descriptor > /dev/clipboard
>
> Regardless of the final syntax that is used, your idea sounds like a
> good idea.

Performance wise, I suspect a single step is more efficient. Also it's
more flexible for non-redirect-friendly packages to provide a different
filename. (I know how often does that happen ;])

Thanks for the feedback.
Rob

>
> --
> Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
> alcocer AT helixdigital DOT com -- http://www.helixdigital.com
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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