delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/08/12/01:22:09

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
Message-ID: <3994DFA7.E18CDE54@ece.gatech.edu>
Date: Sat, 12 Aug 2000 01:24:55 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: Clipboard from Cygwin (read-only)
References: <nZFGdDAMA1h5IwZi AT almide DOT demon DOT co DOT uk> <003b01bffc0a$6da278a0$3c5350d8 AT guinness> <200008012327 DOT TAA29658 AT envy DOT delorie DOT com> <398783D9 DOT E25355B6 AT ece DOT gatech DOT edu> <200008020225 DOT WAA31321 AT envy DOT delorie DOT com> <39887033 DOT 1D40E2BA AT ece DOT gatech DOT edu> <39947F5A DOT DC110FFD AT ece DOT gatech DOT edu>

Forgot to mention one thing.  To read from /dev/clipboard, you have to
call read() with a buffer large enough to hold the entire clipboard
message -- no buffering. If you call read() with a buffer too small, it
sets error to EINVAL.  For instance, cat.exe uses a buffer of 4000
bytes; if the contents of the clipboard are larger than that you get an
error. Cat, for instance, reports: "cat: write error: Permission denied"
when the clipboard is bigger than its 4000 byte buffer.

Yeah, this ought to allow buffered reads I suppose, but it's a work in
progress...

--Chuck

P.S. As Chris pointed out, I haven't yet done the copyright assignment
thing, so there will be a small delay while I take care of that. It's
such a shock to suddenly have to wait for real-world postal delays....

- Raw text -


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