commit 0a1817e8934bed90b69eb5fb277597c14037d8bd
parent b18f1265ff451a888a5ae585964b451107c4aab2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 12 May 2020 11:09:23 +0200
tweaks: exclude an unneeded fragment of code from the tiny version
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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);