First batch of changes from FailSafeC

This is all tiny stuff - allow overriding WIDENED_PROTOTYPES from the hints
file, missing NO_SIGNAL conditionals, remove a GCC-ism, conditional indentation,
void return in a non-void function.
This commit is contained in:
keni
2010-02-10 16:08:51 +00:00
parent 0c0d68a631
commit cbd2a516e1
7 changed files with 38 additions and 15 deletions

View File

@@ -162,10 +162,10 @@ dosuspend()
|| !check_user_string(sysopt.shellers)
){
Norep("Suspend command not available.");
return;
return 0;
}
#endif
# ifdef SIGTSTP
# if defined(SIGTSTP) && !defined(NO_SIGNAL)
if(signal(SIGTSTP, SIG_IGN) == SIG_DFL) {
suspend_nhwindows((char *)0);
# ifdef _M_UNIX

View File

@@ -183,7 +183,9 @@ char *argv[];
*/
u.uhp = 1; /* prevent RIP on early quits */
program_state.preserve_locks = 1;
#ifndef NO_SIGNAL
sethanguphandler((SIG_RET_TYPE)hangup);
#endif
process_options(argc, argv); /* command line options */
init_nhwindows(&argc, argv); /* now we can set up window system */
@@ -268,7 +270,9 @@ char *argv[];
const char *fq_save = fqname(SAVEF, SAVEPREFIX, 1);
(void) chmod(fq_save,0); /* disallow parallel restores */
#ifndef NO_SIGNAL
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
#endif
#ifdef NEWS
if(iflags.news) {
display_file(NEWS, FALSE);

View File

@@ -298,8 +298,10 @@ int wt;
return(0);
}
/* fork succeeded; wait for child to exit */
#ifndef NO_SIGNAL
(void) signal(SIGINT,SIG_IGN);
(void) signal(SIGQUIT,SIG_IGN);
#endif
(void) wait( (int *) 0);
#ifdef _M_UNIX
sco_mapoff();
@@ -307,9 +309,11 @@ int wt;
#ifdef __linux__
linux_mapoff();
#endif
#ifndef NO_SIGNAL
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
#ifdef WIZARD
# ifdef WIZARD
if(wizard) (void) signal(SIGQUIT,SIG_DFL);
# endif
#endif
if(wt) {
raw_print("");