Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: Subject: RE: Seg Fault while using /dev/clipboard Date: Fri, 4 Mar 2005 17:35:56 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0045_01C520E0.9F317970" In-Reply-To: Message-ID: X-OriginalArrivalTime: 04 Mar 2005 17:35:56.0563 (UTC) FILETIME=[9F334E30:01C520E0] Note-from-DJ: This may be spam ------=_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--