From 0a1817e8934bed90b69eb5fb277597c14037d8bd Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 12 May 2020 11:09:23 +0200 Subject: [PATCH] tweaks: exclude an unneeded fragment of code from the tiny version --- src/files.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 8f3b7983..d532eba2 100644 --- a/src/files.c +++ b/src/files.c @@ -759,9 +759,9 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable) if (len == 0) bottomline->data = copy_of(""); else { +#ifndef NANO_TINY bool mac_line_needs_newline = FALSE; -#ifndef NANO_TINY /* If the final character is '\r', and file conversion isn't disabled, * set format to Mac if we currently think the file is a *nix file, or * to DOS-and-Mac if we currently think it is a DOS file. */ @@ -779,11 +779,13 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable) bottomline->data = encode_data(buf, len); num_lines++; +#ifndef NANO_TINY if (mac_line_needs_newline) { bottomline->next = make_new_node(bottomline); bottomline = bottomline->next; bottomline->data = copy_of(""); } +#endif } free(buf);