This is the mail archive of the
cygwin-developers@sources.redhat.com
mailing list for the Cygwin project.
Re: Clipboard from Cygwin (read-only)
- To: cygwin-developers at sourceware dot cygnus dot com
- Subject: Re: Clipboard from Cygwin (read-only)
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Sat, 12 Aug 2000 01:24:55 -0400
- References: <nZFGdDAMA1h5IwZi@almide.demon.co.uk> <003b01bffc0a$6da278a0$3c5350d8@guinness> <200008012327.TAA29658@envy.delorie.com> <398783D9.E25355B6@ece.gatech.edu> <200008020225.WAA31321@envy.delorie.com> <39887033.1D40E2BA@ece.gatech.edu> <39947F5A.DC110FFD@ece.gatech.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....