files: alert about an unwritable file also in the tiny version

master
Benno Schulenberg 2016-09-11 21:40:50 +02:00
parent 1c2b35675e
commit dc76e84657
1 changed files with 4 additions and 1 deletions

View File

@ -915,9 +915,11 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
#ifndef NANO_TINY #ifndef NANO_TINY
if (undoable) if (undoable)
update_undo(INSERT); update_undo(INSERT);
#endif
if (!writable) if (!writable)
statusline(ALERT, "File '%s' is unwritable", filename); statusline(ALERT, "File '%s' is unwritable", filename);
#ifndef NANO_TINY
else if (format == 3) { else if (format == 3) {
/* TRANSLATORS: Keep the next four messages at most 78 characters. */ /* TRANSLATORS: Keep the next four messages at most 78 characters. */
statusline(HUSH, P_("Read %lu line (Converted from DOS and Mac format)", statusline(HUSH, P_("Read %lu line (Converted from DOS and Mac format)",
@ -933,8 +935,9 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
statusline(HUSH, P_("Read %lu line (Converted from DOS format)", statusline(HUSH, P_("Read %lu line (Converted from DOS format)",
"Read %lu lines (Converted from DOS format)", "Read %lu lines (Converted from DOS format)",
(unsigned long)num_lines), (unsigned long)num_lines); (unsigned long)num_lines), (unsigned long)num_lines);
} else }
#endif /* !NANO_TINY */ #endif /* !NANO_TINY */
else
statusline(HUSH, P_("Read %lu line", "Read %lu lines", statusline(HUSH, P_("Read %lu line", "Read %lu lines",
(unsigned long)num_lines), (unsigned long)num_lines); (unsigned long)num_lines), (unsigned long)num_lines);