CVS code
- General:
- Translation updates (see po/ChangeLog for details).
+- files.c:
+ read_file()
+ - If the file we're loading has already been detected as a DOS
+ or Mac formatted file, don't turn on NOCONVERT if we find
+ binary chars in it. This is because if it's detected as
+ DOS/Mac format, at least one line has already been converted,
+ so setting NOCONVERT (which is supposed to signal that none
+ of the file should be converted) makes no sense. (DLR)
- nanorc.5:
- Fix formatting error and update copyright year (Jordi).
- Several enhancements (David Benbennick).
input = (char)input_int;
#ifndef NANO_SMALL
/* If the file has binary chars in it, don't stupidly
- assume it's a DOS or Mac formatted file! */
- if (!ISSET(NO_CONVERT) && is_cntrl_char((int)input) != 0
- && input != '\t' && input != '\r' && input != '\n')
+ assume it's a DOS or Mac formatted file if it hasn't been
+ detected as one already! */
+ if (fileformat == 0 && !ISSET(NO_CONVERT)
+ && is_cntrl_char((int)input) != 0 && input != '\t'
+ && input != '\r' && input != '\n')
SET(NO_CONVERT);
#endif