Mail Archives: cygwin/2005/03/04/12:36:05
------=_NextPart_000_0045_01C520E0.9F317970
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
----Original Message----
>From: Dave Korn
>Sent: 04 March 2005 17:27
> ----Original Message----
>> From: Dave Korn
>> Sent: 04 March 2005 17:14
>
>> UINT format;
>
>> if ((format = GetPriorityClipboardFormat (formatlist, 2)) <= 0)
>
>
> LOL!
Dunno why the compiler didn't warn. This seems to fix it ok. Attached as
well, in case of line wrap.
dk AT mace /usr/build/src> cat /dev/clipboard
dk AT mace /usr/build/src> echo $?
0
dk AT mace /usr/build/src>
Index: winsup/cygwin/fhandler_clipboard.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_clipboard.cc,v
retrieving revision 1.27
diff -p -u -r1.27 fhandler_clipboard.cc
--- winsup/cygwin/fhandler_clipboard.cc 1 Mar 2005 11:51:28 -0000 1.27
+++ winsup/cygwin/fhandler_clipboard.cc 4 Mar 2005 17:31:45 -0000
@@ -198,7 +198,7 @@ fhandler_dev_clipboard::read (void *ptr,
formatlist[0] = cygnativeformat;
formatlist[1] = current_codepage == ansi_cp ? CF_TEXT : CF_OEMTEXT;
OpenClipboard (0);
- if ((format = GetPriorityClipboardFormat (formatlist, 2)) <= 0)
+ if ((int)(format = GetPriorityClipboardFormat (formatlist, 2)) <= 0)
{
CloseClipboard ();
#if 0
cheers,
DaveK
--
Can't think of a witty .sigline today....
------=_NextPart_000_0045_01C520E0.9F317970
Content-Type: application/octet-stream;
name="fix-clip-bug.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="fix-clip-bug.diff"
Index: winsup/cygwin/fhandler_clipboard.cc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/src/src/winsup/cygwin/fhandler_clipboard.cc,v
retrieving revision 1.27
diff -p -u -r1.27 fhandler_clipboard.cc
--- winsup/cygwin/fhandler_clipboard.cc 1 Mar 2005 11:51:28 -0000 1.27
+++ winsup/cygwin/fhandler_clipboard.cc 4 Mar 2005 17:31:45 -0000
@@ -198,7 +198,7 @@ fhandler_dev_clipboard::read (void *ptr,
formatlist[0] =3D cygnativeformat;
formatlist[1] =3D current_codepage =3D=3D ansi_cp ? CF_TEXT : CF_OEM=
TEXT;
OpenClipboard (0);
- if ((format =3D GetPriorityClipboardFormat (formatlist, 2)) <=3D 0)
+ if ((int)(format =3D GetPriorityClipboardFormat (formatlist, 2)) <=
=3D 0)
{
CloseClipboard ();
#if 0
------=_NextPart_000_0045_01C520E0.9F317970
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------=_NextPart_000_0045_01C520E0.9F317970--
- Raw text -