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);
{
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) {
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
#include "f2c.h"
#define PAUSESIG 15
-static waitpause()
+static void waitpause()
{
return;
}
#include "f2c.h"
-typedef int (*sig_type)();
+typedef void (*sig_type)();
extern sig_type signal();
integer signal_(sigp, procp)
}
\f
#ifndef __BSD4_2
-static int timeout();
+static void timeout();
#endif
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);
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;
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;
}