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-d3aeb78583b8master
parent
0d29555a13
commit
da141063e3
|
@ -80,9 +80,12 @@ CVS code -
|
||||||
do_first_line(), do_last_line()
|
do_first_line(), do_last_line()
|
||||||
- Move these functions here from winio.c. (DLR)
|
- Move these functions here from winio.c. (DLR)
|
||||||
- nano.c:
|
- nano.c:
|
||||||
do_toggle(), finish()
|
finish()
|
||||||
- Call blank_statusbar() and blank_bottombars() to blank out
|
- Call blank_statusbar() and blank_bottombars() to blank out
|
||||||
the statusbar and shortcut list in bottomwin. (DLR)
|
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()
|
do_early_abort()
|
||||||
- Removed, as it's no longer called anywhere. (David Benbennick)
|
- Removed, as it's no longer called anywhere. (David Benbennick)
|
||||||
open_pipe()
|
open_pipe()
|
||||||
|
@ -136,6 +139,9 @@ CVS code -
|
||||||
SLsmg_reset_smg() and SLsmg_init_smg(), and then reinitialize
|
SLsmg_reset_smg() and SLsmg_init_smg(), and then reinitialize
|
||||||
all windows via window_init(). (DLR, adapted from code in
|
all windows via window_init(). (DLR, adapted from code in
|
||||||
Minimum Profit 3.3.0 and mutt 1.4.2.1, respectively)
|
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()
|
do_verbatim_input()
|
||||||
- If PRESERVE is set, disable flow control characters before
|
- If PRESERVE is set, disable flow control characters before
|
||||||
getting input and reenable them after getting input. (DLR)
|
getting input and reenable them after getting input. (DLR)
|
||||||
|
|
12
src/nano.c
12
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 */
|
static sigjmp_buf jmpbuf; /* Used to return to mainloop after SIGWINCH */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* What we do when we're all set to exit */
|
/* What we do when we're all set to exit. */
|
||||||
RETSIGTYPE finish(int sigage)
|
void finish(void)
|
||||||
{
|
{
|
||||||
if (!ISSET(NO_HELP))
|
if (!ISSET(NO_HELP))
|
||||||
blank_bottombars();
|
blank_bottombars();
|
||||||
|
@ -95,7 +95,7 @@ RETSIGTYPE finish(int sigage)
|
||||||
thanks_for_all_the_fish();
|
thanks_for_all_the_fish();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
exit(sigage);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Die (gracefully?) */
|
/* Die (gracefully?) */
|
||||||
|
@ -2704,7 +2704,7 @@ int do_exit(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
finish(0);
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ISSET(TEMP_OPT))
|
if (ISSET(TEMP_OPT))
|
||||||
|
@ -2726,7 +2726,7 @@ int do_exit(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
finish(0);
|
finish();
|
||||||
}
|
}
|
||||||
} else if (i == 0) {
|
} else if (i == 0) {
|
||||||
|
|
||||||
|
@ -2737,7 +2737,7 @@ int do_exit(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
finish(0);
|
finish();
|
||||||
} else
|
} else
|
||||||
statusbar(_("Cancelled"));
|
statusbar(_("Cancelled"));
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@ int do_left(void);
|
||||||
int do_right(void);
|
int do_right(void);
|
||||||
|
|
||||||
/* Public functions in nano.c */
|
/* Public functions in nano.c */
|
||||||
RETSIGTYPE finish(int sigage);
|
void finish(void);
|
||||||
void die(const char *msg, ...);
|
void die(const char *msg, ...);
|
||||||
void die_save_file(const char *die_filename);
|
void die_save_file(const char *die_filename);
|
||||||
void die_too_small(void);
|
void die_too_small(void);
|
||||||
|
|
Loading…
Reference in New Issue