From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4219 invoked by alias); 17 Mar 2006 15:03:22 -0000 Received: (qmail 4208 invoked by uid 22791); 17 Mar 2006 15:03:21 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-01.spheriq.net (HELO fra-del-01.spheriq.net) (195.46.51.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Mar 2006 15:03:19 +0000 Received: from fra-out-01.spheriq.net (fra-out-01.spheriq.net [195.46.51.129]) by fra-del-01.spheriq.net with ESMTP id k2HF3Ai7032383 for ; Fri, 17 Mar 2006 15:03:10 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-01.spheriq.net with ESMTP id k2HF39sQ032144 for ; Fri, 17 Mar 2006 15:03:10 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id k2HF37hO017666 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 17 Mar 2006 15:03:08 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 73725DA51; Fri, 17 Mar 2006 15:03:06 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2F4F4474EE; Fri, 17 Mar 2006 15:06:15 +0000 (GMT) Received: from st.com (crx1177.cro.st.com [164.129.47.77]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CGZ39219 (AUTH "denis pilat"); Fri, 17 Mar 2006 16:02:15 +0100 (CET) Message-ID: <441ACF76.5010106@st.com> Date: Fri, 17 Mar 2006 19:12:00 -0000 From: Denis PILAT User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com, bash-maintainers@gnu.org Subject: Re: [patch-readline] history file generation on minGW host References: <44196BC6.4050503@st.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.2.01 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00227.txt.bz2 Eli Zaretskii wrote: >>Date: Thu, 16 Mar 2006 14:44:38 +0100 >>From: Denis PILAT >> >>On minGW host, history file are open in text mode, that's imply windows >>specific >>carriage return to be inserted ( \n -> \r\n conversion performed) and >>prevents windows history file to be compliant with linux one's. >>When using current history file for windows, "^M" appears at each end of >>line. >> >>This patch fixes this problem. >> >> > >Thanks. > >However, I think there's a better fix: teach readline to always remove >any CRs before an LF character, even on Posix platforms. That way, >even if the history file was edited by some Windows editor that >doesn't honor the end-of-line format, it can still be read on any OS. >And as a bonus, we might get a cleaner code, without ugly OS-dependent >#ifdef's. > >Unless Chet and others disagree, would you like to prepare a patch >along these lines? > Yes, good idea, I'll prepare that for next week. Denis > > >