Commit 8befda64 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

readd RETSIGTYPE return types for signal handlers, since any problems

with its being defined as the wrong type aren't nano's fault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3235 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 18 additions and 11 deletions
+18 -11
......@@ -120,6 +120,10 @@ CVS code -
- Adjust copyright notices in all source files to account for
Chris' reassigning the 2005-2006 copyright on nano to me.
Changes to do_credits(). (DLR)
- Readd RETSIGTYPE return types for signal handlers, since any
problems with its being defined as the wrong type aren't
nano's fault. Changes to handle_hupterm(), do_suspend(),
do_continue(), handle_sigwinch(), and cancel_command(). (DLR)
- browser.c:
do_browser()
- When setting the width of each file, use the "?" operator
......@@ -155,6 +159,9 @@ CVS code -
- If DISABLE_WRAPPING is defined, the code in DISABLE_ROOTWRAP
#ifdefs isn't included, so don't display
"--disable-wrapping-as-root" in that case. (DLR)
do_cont()
- Rename to do_continue(), and rename parameter s to signal, for
consistency. (DLR)
do_verbatim_input()
- Move to text.c, since it's an advanced text-based operation.
(DLR)
......
......@@ -963,19 +963,19 @@ void signal_init(void)
act.sa_handler = do_suspend;
sigaction(SIGTSTP, &act, NULL);
act.sa_handler = do_cont;
act.sa_handler = do_continue;
sigaction(SIGCONT, &act, NULL);
}
}
/* Handler for SIGHUP (hangup) and SIGTERM (terminate). */
void handle_hupterm(int signal)
RETSIGTYPE handle_hupterm(int signal)
{
die(_("Received SIGHUP or SIGTERM\n"));
}
/* Handler for SIGTSTP (suspend). */
void do_suspend(int signal)
RETSIGTYPE do_suspend(int signal)
{
endwin();
printf("\n\n\n\n\n%s\n", _("Use \"fg\" to return to nano"));
......@@ -995,7 +995,7 @@ void do_suspend(int signal)
}
/* Handler for SIGCONT (continue after suspend). */
void do_cont(int signal)
RETSIGTYPE do_continue(int signal)
{
#ifndef NANO_TINY
/* Perhaps the user resized the window while we slept. Handle it,
......@@ -1008,7 +1008,7 @@ void do_cont(int signal)
}
#ifndef NANO_TINY
void handle_sigwinch(int s)
RETSIGTYPE handle_sigwinch(int signal)
{
const char *tty = ttyname(0);
int fd, result = 0;
......
......@@ -401,11 +401,11 @@ int no_help(void);
void nano_disabled_msg(void);
void do_exit(void);
void signal_init(void);
void handle_hupterm(int signal);
void do_suspend(int signal);
void do_cont(int signal);
RETSIGTYPE handle_hupterm(int signal);
RETSIGTYPE do_suspend(int signal);
RETSIGTYPE do_continue(int signal);
#ifndef NANO_TINY
void handle_sigwinch(int s);
RETSIGTYPE handle_sigwinch(int signal);
void allow_pending_sigwinch(bool allow);
#endif
#ifndef NANO_TINY
......@@ -556,7 +556,7 @@ void do_backspace(void);
void do_tab(void);
void do_enter(void);
#ifndef NANO_TINY
void cancel_command(int signal);
RETSIGTYPE cancel_command(int signal);
bool execute_command(const char *command);
#endif
#ifndef DISABLE_WRAPPING
......
......@@ -247,7 +247,7 @@ void do_enter(void)
}
#ifndef NANO_TINY
void cancel_command(int signal)
RETSIGTYPE cancel_command(int signal)
{
if (kill(pid, SIGKILL) == -1)
nperror("kill");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment