delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/21/10:05:17

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_TD
X-Spam-Check-By: sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding :x-gm-message-state; bh=kcJW91l5s7oghTvSLHRc4WYzWkj50Fzx458fQy6pXWk=; b=bXZiSTEJ11JQNJKX+ACszi538DvX8YTN68GTQpcsCUt+wBfbROuAYHAXAlryAEEBYJ tDuJbrio36wQk9YE0y0BtZvH07kUePdWZOb4bDgc8B4fTxQorllQn4NqcCZUzkpGVJ9M Bji2Qo2AKuVUutmH1efzQxE1jMpWmn7UcmuitFOiJuoKnZCICvowgRbv6HC4If+CO5pV IxiyvcRDZ6R1UrNYzYNLsFYk92rbrWQ4ZoTCM1vhiH3sx89SmsYXuRf8zqItUFO3OVvt kCrb1s+ZM3gTVT0VOCtcteqDo1Xs/n3O8U+tBKQiftl+I2HNaEIcrRraVQ/wOK2ic/p3 Cj6Q==
MIME-Version: 1.0
In-Reply-To: <B7EEF3066CD1D24081DBFF5E9F5E68D4C17C1D97@EXCNLDCM06.europe.unity>
References: <B7EEF3066CD1D24081DBFF5E9F5E68D4C17C1696 AT EXCNLDCM06 DOT europe DOT unity> <CAD+0NRC-noW0-LxEjO_sCtP7SKdSWbaPoJU3zTwOs-pOMknkLg AT mail DOT gmail DOT com> <B7EEF3066CD1D24081DBFF5E9F5E68D4C17C1D97 AT EXCNLDCM06 DOT europe DOT unity>
From: Richard Gribble <richard AT gandalfwizard DOT us>
Date: Thu, 21 Jun 2012 10:04:06 -0400
Message-ID: <CAD+0NRDUJBpKZG1=FjrAg6Pu0Gu87h58OU-RT_3XiDkYBhZ3Aw@mail.gmail.com>
Subject: Re: RCS file corruption.
To: cygwin AT cygwin DOT com
X-Gm-Message-State: ALoCoQlvg4K69l/0jIToCEY+uFz4h47Iyy+F9HsbCS+tK/h5S/MdDma1Gk2cpP0BoaIbidEbjUGR
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q5LE5DVG010478

On Thu, Jun 21, 2012 at 5:05 AM, Wagemans, Peter <peter DOT wagemans AT kpn DOT com> wrote:
>
>
> Richard Gribble wrote:
>
> > I have experienced this problem several times.  In my case it seemed
> > to be a problem between 'Unix' and 'DOS' files.  In each case, I
> > have been able to fix it by editing the RCS file using vim and
> > deleting all the extraneous carriage returns
>
> RCS should be able to handle carriage returns without problems and
> indeed, my Linux build of the same code works correctly on the example
> files.
>
> In this case at some point the RCS code copies the work file content
> to the new RCS file as the latest version and unexpectedly gets an EOF
> after exactly 65536 bytes.
>
> [The file copy loop is the code under "/* Copy the file.  */" in
> putdftext in rcsgen.c in the GNU rcs 5.8.1 code. At the lowest level
> in the RCS code the EOF comes from the getc(stream) in the
> GETBYTE_BODY macro used in the function fro_try_getbyte in b-fro.c.]
>
> But you may be on to something with the carriage returns. In my
> example file there is a carriage return linefeed pair just on the 64kB
> boundary:
>
> Output from od -t x1z -Ad:
>
> 0065520 78 20 78 78 20 78 78 78 78 78 78 78 78 78 2e 0d  >x xx xxxxxxxxx..<
> 0065536 0a 0d 0a 2a 2a 2a 2a 2a 2a 20 78 78 78 78 78 78  >...****** xxxxxx<
>
> Perhaps this is not a coincidence. It makes me wonder whether some
> underlying layer is seeing the carriage return at the end of the
> buffer, looks ahead for a linefeed (data that is not available in the
> current buffer) and causes the EOF in some way.
>
> How can we find out why getc is incorrectly returning EOF in this
> situation?
>
> Regards,
>
> Peter Wagemans
>
>

One thing I may have failed to mention is that (anecdotaly - I didn't
take copious notes) the problem usually appeared when I had lines with
two "^M"s at the end.  I suspect this happens because sometimes I edit
the files on my Linux box and sometimes on my Windows box.


Later,

Richard.


>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019