From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1698 invoked by alias); 27 Jun 2003 10:18:51 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1691 invoked from network); 27 Jun 2003 10:18:49 -0000 Received: from unknown (HELO lccmail2.leics.gov.uk) (217.206.30.4) by sources.redhat.com with SMTP; 27 Jun 2003 10:18:49 -0000 Received: from lccntex1.leics.gov.uk (unverified) by lccmail2.leics.gov.uk (Content Technologies SMTPRS 4.2.10) with ESMTP id for ; Fri, 27 Jun 2003 11:13:35 +0100 Received: from endor.internal.espo.org (10.23.16.4 [10.23.16.4]) by lccntex1.leics.gov.uk with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id NJW9BQH8; Fri, 27 Jun 2003 11:13:35 +0100 Received: by Endor with Internet Mail Service (5.5.2653.19) id ; Fri, 27 Jun 2003 11:14:46 +0100 Message-ID: From: Richard Bland To: cygwin@cygwin.com Subject: RE: CRLF to LF Issue Date: Fri, 27 Jun 2003 13:03:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2003-06/txt/msg01277.txt.bz2 Hmm, OK. I've tried this again booting off a Knoppix Linux CD and the diff / patch over the CRLF files on the FDD worked fine, applying the patch and preserving the CRLF. This does seem to be something weird with the way Cygwin is dealing with the files. Thanks, Rich -----Original Message----- From: Richard Bland [mailto:r.bland@espo.org] Sent: 26 June 2003 17:17 To: cygwin@cygwin.com Subject: RE: CRLF to LF Issue All, Sorry, no joy - same outcome Here's my mount : drb398@net251 / $ mount C:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system (binmode) C:\cygwin\bin on /usr/bin type system (binmode) C:\cygwin\lib on /usr/lib type system (binmode) C:\cygwin on / type system (binmode) a: on /mnt/foo type system (textmode) c: on /cygdrive/c type user (binmode,noumount) I've used the a: drive as the location for patching, just to keep it separate from other mounts. I recreated the patch file using diff on the textmode mount point, just to be sure. My patch file and the target source code files were all under /mnt/foo (a:). I used 'mount -t a:/ /mnt/foo' for the mount. Thanks Rich -----Original Message----- From: Igor Pechtchanski [mailto:pechtcha@cs.nyu.edu] Sent: 26 June 2003 16:19 To: Richard Bland Cc: cygwin@cygwin.com Subject: Re: CRLF to LF Issue On Thu, 26 Jun 2003, Richard Bland wrote: > Hi All, > > I'm trying to use the 'patch' utility to modify some source code files > created in MS-Windows Notepad. The source code is designed to ONLY be > used in MS-Windows, so I'm not interested in porting between > Unix/MS-Windows. The source code files are line terminated with a CR > and LF, in the normal MS-DOS fashion. If I use 'patch' to apply a > patch file to this source code, the CRLF pair become a single LF for > every line in the file. The patch file may only apply to one or two > lines and was generated using 'diff -Nur' on this platform. Obviously, > I want to retain my CRLF pair instead of it being converted to a > single LF. > > I've checked the FAQ and some of the mailing list archives, but cannot > find anything part from references to 'Text and Binary modes' in the > user guide. I've tried setting the CYGWIN environment variable to > binmode and nobinmode and I've tried the commands within the Cygwin > shell as well as a regular MS-DOS prompt. The commands are being run > on the local NTFS partition. > > Version Numbers > --------------- > Microsoft Windows XP [Version 5.1.2600] > uname -a : CYGWIN_NT-5.1 net251 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 > unknown unknown Cygwin Patch : 2.5.8 > > TIA > Rich Rich, The "binmode" setting in the CYGWIN environment variable only affects writes to pipes. For disk writes, Cygwin consults the mount table. Check your mounts (using the "mount" command), and make sure the directory that contains the input/output file of "patch" is mounted in text mode. If it isn't, use the "mount" command again to re-mount it. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@cs.nyu.edu ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton Note: ESPO currently uses Microsoft Office 2000/XP. Please make sure that files you send can be read in this format. This message is intended only for the named addressee(s) and may contain confidential and/or privileged information. If you are not the named addressee you should not disseminate, copy, disclose, modify or distribute this e-mail unless authorised to do so by the sender. If you have received this message in error then please notify m.geary@espo.org and delete the message and any attachments accompanying it immediately. You are also advised that the views and opinions expressed in this e-mail message and any attachments are the author's own, and may not reflect the views and opinions of ESPO. -- 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/ Note: ESPO currently uses Microsoft Office 2000/XP. Please make sure that files you send can be read in this format. This message is intended only for the named addressee(s) and may contain confidential and/or privileged information. If you are not the named addressee you should not disseminate, copy, disclose, modify or distribute this e-mail unless authorised to do so by the sender. If you have received this message in error then please notify m.geary@espo.org and delete the message and any attachments accompanying it immediately. You are also advised that the views and opinions expressed in this e-mail message and any attachments are the author's own, and may not reflect the views and opinions of ESPO. -- 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/