nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 9c04d0c956cd429ea3064d0e46011908b59b6d60
parent c3e74f02c2521da9e7237277efb30e74ce3a17c0
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 21 Sep 2020 19:25:07 +0200

tweaks: remove an inconsistent newline from the end of an error message

There are eight other occurrences without the newline.
And an error message should not end in a newline anyway.

Diffstat:
Msrc/history.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/history.c b/src/history.c @@ -361,7 +361,7 @@ void save_history(void) histfile = fopen(histname, "wb"); if (histfile == NULL) { - jot_error(N_("Error writing %s: %s\n"), histname, strerror(errno)); + jot_error(N_("Error writing %s: %s"), histname, strerror(errno)); free(histname); return; } @@ -371,10 +371,10 @@ void save_history(void) if (!write_list(searchtop, histfile) || !write_list(replacetop, histfile) || !write_list(executetop, histfile)) - jot_error(N_("Error writing %s: %s\n"), histname, strerror(errno)); + jot_error(N_("Error writing %s: %s"), histname, strerror(errno)); if (fclose(histfile) == EOF) - jot_error(N_("Error writing %s: %s\n"), histname, strerror(errno)); + jot_error(N_("Error writing %s: %s"), histname, strerror(errno)); free(histname); } @@ -459,7 +459,7 @@ void save_poshistory(void) FILE *histfile = fopen(poshistname, "wb"); if (histfile == NULL) { - jot_error(N_("Error writing %s: %s\n"), poshistname, strerror(errno)); + jot_error(N_("Error writing %s: %s"), poshistname, strerror(errno)); return; } @@ -483,13 +483,13 @@ void save_poshistory(void) path_and_place[length - 1] = '\n'; if (fwrite(path_and_place, sizeof(char), length, histfile) < length) - jot_error(N_("Error writing %s: %s\n"), poshistname, strerror(errno)); + jot_error(N_("Error writing %s: %s"), poshistname, strerror(errno)); free(path_and_place); } if (fclose(histfile) == EOF) - jot_error(N_("Error writing %s: %s\n"), poshistname, strerror(errno)); + jot_error(N_("Error writing %s: %s"), poshistname, strerror(errno)); if (stat(poshistname, &fileinfo) == 0) latest_timestamp = fileinfo.st_mtime;