Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com From: Chris Faylor Date: Mon, 24 Apr 2000 15:04:24 -0400 To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: hybrid text/binary mount Message-ID: <20000424150424.A1421@cygnus.com> Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com Mail-Followup-To: cgf AT cygnus DOT com, cygwin-developers AT sourceware DOT cygnus DOT com References: <200004241831 DOT OAA05979 AT envy DOT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.12i In-Reply-To: <200004241831.OAA05979@envy.delorie.com>; from dj@delorie.com on Mon, Apr 24, 2000 at 02:31:19PM -0400 On Mon, Apr 24, 2000 at 02:31:19PM -0400, DJ Delorie wrote: >Hey, I've got an idea. How about a mount mode where files opened for >reading do CR/LF conversion *if* they look like text files (i.e. no >binary characters, all CR/LF are part of CR/LF pair), and files open >for writing always write files in binary mode. That's amazing. I have been thinking about the same thing for several days. I have started to type this in several time but always hit a wall when I realized that given the nature of this mailing list, either no one would respond or somewone will respond with a twenty page treatise on the way they think it should be done with no hint of an effort to volunteer to do the actual work. I was thinking that if a file had any characters whose ASCII code was < ' ' or >= DEL before the first \n, then the file would be considered binary. Otherwise, the file would be text. You could apply this heuristic to both input and output. This might catch a majority of the cases where people really want binary code but it is so non-deterministic that it might make problems harder to track down. I was thinking of a CYGWIN=autobinmode and a mount '-a' option. cgf