Remove the obsolete RETSIGTYPE, replace by void

This commit is contained in:
Holger Vogt
2023-03-18 14:30:29 +01:00
parent c2fb32f98a
commit 5cb5d218c9
9 changed files with 27 additions and 31 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
# define SEEK_SET 0
#endif
static RETSIGTYPE sigchild(void);
static void sigchild(void);
struct proc {
int pr_pid; /* The pid of the spice job. */
@@ -163,7 +163,7 @@ com_jobs(wordlist *wl)
}
static RETSIGTYPE
static void
sigchild(void)
{
numchanged++;
+2 -2
View File
@@ -20,7 +20,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/sim.h" /* To get SV_VOLTAGE definition */
static RETSIGTYPE sig_matherr(void);
static void sig_matherr(void);
static struct dvec *apply_func(struct func *func, struct pnode *arg);
static struct dvec *ft_ternary(struct pnode *node);
static char *mkcname(char what, char *v1, char *v2);
@@ -33,7 +33,7 @@ static char *mkcname(char what, char *v1, char *v2);
static JMP_BUF matherrbuf;
static RETSIGTYPE
static void
sig_matherr(void)
{
fprintf(cp_err, "Error: argument out of range for math function\n");
+1 -1
View File
@@ -187,7 +187,7 @@ tryexec(char *name, char *argv[])
# endif
int pid, j;
RETSIGTYPE (*svint)(), (*svquit)(), (*svtstp)();
void (*svint)(), (*svquit)(), (*svtstp)();
pid = vfork();
if (pid == 0) {
+2 -2
View File
@@ -570,7 +570,7 @@ static int get_sysmem(struct sys_mem *memall)
static JMP_BUF env;
static RETSIGTYPE
static void
fault(void)
{
signal(SIGSEGV, (SIGNAL_FUNCTION) fault); /* SysV style */
@@ -586,7 +586,7 @@ baseaddr(void)
#else
char *low, *high, *at;
long x;
RETSIGTYPE (*orig_signal)();
void (*orig_signal)();
if (getenv("SPICE_NO_DATASEG_CHECK"))
return 0;
+9 -9
View File
@@ -70,7 +70,7 @@ ft_sigintr_cleanup(void)
/* invoke this function upon keyboard interrupt */
RETSIGTYPE
void
ft_sigintr(void)
{
static int interrupt_counter = 0;
@@ -103,7 +103,7 @@ ft_sigintr(void)
}
RETSIGTYPE
void
sigfloat(int code)
{
fperror("Error", code);
@@ -117,7 +117,7 @@ sigfloat(int code)
#ifdef SIGTSTP
RETSIGTYPE
void
sigstop(void)
{
gr_clean();
@@ -127,7 +127,7 @@ sigstop(void)
}
RETSIGTYPE
void
sigcont(void)
{
(void) signal(SIGTSTP, (SIGNAL_FUNCTION) sigstop);
@@ -141,7 +141,7 @@ sigcont(void)
/* Special (void) signal handlers. */
RETSIGTYPE
void
sigill(void)
{
fprintf(cp_err, "\ninternal error -- illegal instruction\n");
@@ -149,7 +149,7 @@ sigill(void)
}
RETSIGTYPE
void
sigbus(void)
{
fprintf(cp_err, "\ninternal error -- bus error\n");
@@ -157,7 +157,7 @@ sigbus(void)
}
RETSIGTYPE
void
sigsegv(void)
{
fprintf(cp_err, "\ninternal error -- segmentation violation\n");
@@ -167,7 +167,7 @@ sigsegv(void)
fatal();
}
RETSIGTYPE
void
sigsegvsh(void)
{
fprintf(cp_err, "\ninternal error -- segmentation violation\n");
@@ -175,7 +175,7 @@ sigsegvsh(void)
}
RETSIGTYPE
void
sig_sys(void)
{
fprintf(cp_err, "\ninternal error -- bad argument to system call\n");
+9 -9
View File
@@ -6,15 +6,15 @@
#ifndef ngspice_SIGNAL_HANDLER_H
#define ngspice_SIGNAL_HANDLER_H
RETSIGTYPE ft_sigintr(void);
RETSIGTYPE sigfloat(int code);
RETSIGTYPE sigstop(void);
RETSIGTYPE sigcont(void);
RETSIGTYPE sigill(void);
RETSIGTYPE sigbus(void);
RETSIGTYPE sigsegv(void);
RETSIGTYPE sigsegvsh(void);
RETSIGTYPE sig_sys(void);
void ft_sigintr(void);
void sigfloat(int code);
void sigstop(void);
void sigcont(void);
void sigill(void);
void sigbus(void);
void sigsegv(void);
void sigsegvsh(void);
void sig_sys(void);
extern JMP_BUF jbuf;
+2 -2
View File
@@ -101,7 +101,7 @@
#define HAS_TIME_H
#define HAS_RLIMIT_
#define void void
#ifndef SIGNAL_FUNCTION
# ifdef HAVE_SIGHANDLER_T
@@ -111,7 +111,7 @@
# elif HAVE___SIGHANDLER_T
# define SIGNAL_FUNCTION __sighandler_t
# else
# define SIGNAL_FUNCTION RETSIGTYPE (*)(int)
# define SIGNAL_FUNCTION void (*)(int)
# endif
#endif