nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] patch: fix minor issue w/NOCONVERT


From: David Lawrence Ramsey
Subject: [Nano-devel] patch: fix minor issue w/NOCONVERT
Date: Thu, 13 Feb 2003 11:00:36 -0800 (PST)

http://pooka_regent.tripod.com/patches/nano/nanoconvert-patch.txt

When nano first reads in a line containing DOS or Mac newline
characters, it sets fileformat and converts the newline to a Unix
newline.  If a subsequent line has binary characters in it, NOCONVERT
is set there and no more of the line endings are converted.  This is
problematic, since NOCONVERT is supposed to signify that no line
endings were converted.  Therefore, the following patch makes nano only
set NOCONVERT if binary characters have been found and fileformat is
0.  This means that text files containing a few binary characters and
DOS or Mac newlines are now read properly.  (Try opening e.g. a copy of
GPL 2, with its embedded ^L's, saving it in DOS or Mac format, and
reopening it to see the difference in behavior.)


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!

_____________________________________________________________
Select your own custom email address for FREE! Get address@hidden w/No Ads, 
6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag




reply via email to

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