public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
To: Richard Bland <r.bland@espo.org>
Cc: cygwin@cygwin.com
Subject: Re: CRLF to LF Issue
Date: Thu, 26 Jun 2003 16:21:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.44.0306261116070.22307-100000@slinky.cs.nyu.edu> (raw)
In-Reply-To: <F668F8488B0EA74D89C887A74FB4116F2BA15F@Endor.internal.espo.org>

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


--
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/

  reply	other threads:[~2003-06-26 15:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-26 12:29 Richard Bland
2003-06-26 16:21 ` Igor Pechtchanski [this message]
2003-06-30 13:31 ` Corinna Vinschen
2003-06-26 16:42 Richard Bland
2003-06-26 20:09 John Vincent
2003-06-27 13:03 Richard Bland
2003-06-30 16:05 Richard Bland
2003-07-02 16:50 ` Hannu E K Nevalainen (garbage mail)
2003-07-08 14:12 Dean Scarff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.44.0306261116070.22307-100000@slinky.cs.nyu.edu \
    --to=pechtcha@cs.nyu.edu \
    --cc=cygwin@cygwin.com \
    --cc=r.bland@espo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).