signal now deals with void functions

This commit is contained in:
ceriel 1993-11-17 16:38:52 +00:00
parent 82f89c97a6
commit cf151967a5
7 changed files with 13 additions and 13 deletions

View file

@ -9,7 +9,7 @@ char *prompt;
struct sgttyb tty, ttysave;
static char pwdbuf[9];
int fd;
int (*savesig)();
void (*savesig)();
if ((fd = open("/dev/tty", 0)) < 0) fd = 0;
savesig = signal(SIGINT, SIG_IGN);

View file

@ -40,8 +40,8 @@ pclose(iop)
{
int fd = fileno(iop);
int status, wret;
int (*intsave)() = signal(SIGINT, SIG_IGN);
int (*quitsave)() = signal(SIGQUIT, SIG_IGN);
void (*intsave)() = signal(SIGINT, SIG_IGN);
void (*quitsave)() = signal(SIGQUIT, SIG_IGN);
fclose(iop);
while ((wret = wait(&status)) != -1) {

View file

@ -5,7 +5,7 @@ system(str)
char *str;
{
int pid, exitstatus, waitval;
int (*sigint)(), (*sigquit)();
void (*sigint)(), (*sigquit)();
int i;
if ((pid = fork()) < 0) return -1; /* How do we distinguish this

View file

@ -2,7 +2,7 @@
#include "f2c.h"
#define PAUSESIG 15
static waitpause()
static void waitpause()
{
return;
}

View file

@ -1,6 +1,6 @@
#include "f2c.h"
typedef int (*sig_type)();
typedef void (*sig_type)();
extern sig_type signal();
integer signal_(sigp, procp)

View file

@ -86,7 +86,7 @@ void chan_out(v, c) long v; register chan *c;
}
#ifndef __BSD4_2
static int timeout();
static void timeout();
#endif
int chan_any(c) register chan *c;
@ -170,7 +170,7 @@ int chan_any(c) register chan *c;
* timeout() to prevent it from getting lost.
*/
static int timeout(sig)
static void timeout(sig)
{
signal(SIGALRM, timeout);
alarm(1);

View file

@ -1,11 +1,11 @@
static long masks[32];
static long flags[32];
int (*
void (*
signal(sig,handler))()
int (*handler)();
void (*handler)();
{
struct {
int (*sv_handler)();
void (*sv_handler)();
long sv_mask;
long sv_flags;
} v, ov;
@ -13,13 +13,13 @@ signal(sig,handler))()
v.sv_handler = handler;
v.sv_mask = masks[sig];
v.sv_flags = flags[sig];
if (sigvec(sig,&v, &ov) < 0) return (int (*)()) -1;
if (sigvec(sig,&v, &ov) < 0) return (void (*)()) -1;
if (v.sv_mask != ov.sv_mask || v.sv_flags != ov.sv_flags) {
v.sv_mask = ov.sv_mask;
masks[sig] = ov.sv_mask;
v.sv_flags = ov.sv_flags;
flags[sig] = ov.sv_flags;
if (sigvec(sig,&v,(char *) 0) < 0) return (int (*)()) -1;
if (sigvec(sig,&v,(char *) 0) < 0) return (void (*)()) -1;
}
return ov.sv_handler;
}