[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: carriage return line endings vs. literal ^M in status.m4

From: Jim Meyering
Subject: Re: carriage return line endings vs. literal ^M in status.m4
Date: Sat, 05 Apr 2008 14:45:45 +0200

Eric Blake <address@hidden> wrote:
> | +dnl See if CR is the EOL marker.  If not, remove any EOL-related
> | +dnl ^M bytes and escape any remaining ones.  If so, just use mv.
> If CR is _not_ the EOL marker, then how would CR appear at the end of the
> line?  Where are we doing input into $tmp/subs1.awk that could create a
> spurious CR if the platform does not use CR?  And if CR is not EOL, then
> do we really need to escape intermediate CR rather than treating it as a
> literal character?

Before writing the patch, I wondered about that too, and did a little
archaeology, but didn't find any good rationale, though I didn't look
very hard.

> And according to this patch, if CR _is_ the EOL marker, then just using mv
> works.  So why not use mv unconditionally?

Assuming the existing CR-conversion code (not just for EOL markers) was
necessary, I thought it best to minimize changes for the common EOL==NL case.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]