From da141063e3bf384c0f8484658dc1acf73a249349 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 25 May 2004 19:41:11 +0000 Subject: [PATCH] per DB's patch, make finish() accept and return void, since none of the calls to finish() set sigage to anything other than 0 or use its return value git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1766 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 8 +++++++- src/nano.c | 12 ++++++------ src/proto.h | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 350de8e6..5c7db957 100644 --- a/ChangeLog +++ b/ChangeLog @@ -80,9 +80,12 @@ CVS code - do_first_line(), do_last_line() - Move these functions here from winio.c. (DLR) - nano.c: - do_toggle(), finish() + finish() - Call blank_statusbar() and blank_bottombars() to blank out the statusbar and shortcut list in bottomwin. (DLR) + - Since all of the calls to finish() use 0 for the value of + sigage, and the return value of finish() is never used, make + it accept and return void. (David Benbennick) do_early_abort() - Removed, as it's no longer called anywhere. (David Benbennick) open_pipe() @@ -136,6 +139,9 @@ CVS code - SLsmg_reset_smg() and SLsmg_init_smg(), and then reinitialize all windows via window_init(). (DLR, adapted from code in Minimum Profit 3.3.0 and mutt 1.4.2.1, respectively) + do_toggle() + - Call blank_statusbar() and blank_bottombars() to blank out + the statusbar and shortcut list in bottomwin. (DLR) do_verbatim_input() - If PRESERVE is set, disable flow control characters before getting input and reenable them after getting input. (DLR) diff --git a/src/nano.c b/src/nano.c index 5e2db008..35e42603 100644 --- a/src/nano.c +++ b/src/nano.c @@ -72,8 +72,8 @@ static struct sigaction act; /* For all our fun signal handlers */ static sigjmp_buf jmpbuf; /* Used to return to mainloop after SIGWINCH */ #endif -/* What we do when we're all set to exit */ -RETSIGTYPE finish(int sigage) +/* What we do when we're all set to exit. */ +void finish(void) { if (!ISSET(NO_HELP)) blank_bottombars(); @@ -95,7 +95,7 @@ RETSIGTYPE finish(int sigage) thanks_for_all_the_fish(); #endif - exit(sigage); + exit(0); } /* Die (gracefully?) */ @@ -2704,7 +2704,7 @@ int do_exit(void) } else #endif - finish(0); + finish(); } if (ISSET(TEMP_OPT)) @@ -2726,7 +2726,7 @@ int do_exit(void) } else #endif - finish(0); + finish(); } } else if (i == 0) { @@ -2737,7 +2737,7 @@ int do_exit(void) } else #endif - finish(0); + finish(); } else statusbar(_("Cancelled")); diff --git a/src/proto.h b/src/proto.h index 83be0108..00e12be0 100644 --- a/src/proto.h +++ b/src/proto.h @@ -245,7 +245,7 @@ int do_left(void); int do_right(void); /* Public functions in nano.c */ -RETSIGTYPE finish(int sigage); +void finish(void); void die(const char *msg, ...); void die_save_file(const char *die_filename); void die_too_small(void); -- 2.39.5