Browse Source

Remove the obsolete RETSIGTYPE, replace by void

pre-master-46
Holger Vogt 3 years ago
parent
commit
5cb5d218c9
  1. 1
      configure.ac
  2. 4
      src/frontend/aspice.c
  3. 4
      src/frontend/evaluate.c
  4. 2
      src/frontend/parser/unixcom.c
  5. 4
      src/frontend/resource.c
  6. 18
      src/frontend/signal_handler.c
  7. 18
      src/frontend/signal_handler.h
  8. 4
      src/include/ngspice/defines.h
  9. 3
      visualc/src/include/ngspice/config.h

1
configure.ac

@ -888,7 +888,6 @@ AM_CONDITIONAL([OLDAPPS], [test "x$enable_oldapps" = xyes])
# Check for a few typdefs: # Check for a few typdefs:
AC_TYPE_PID_T AC_TYPE_PID_T
AC_TYPE_SIGNAL
# sighandler_t is the type of the signal handler on GNU variants, # sighandler_t is the type of the signal handler on GNU variants,
# sig_t is the type of a signal handler on 4.4BSD's, # sig_t is the type of a signal handler on 4.4BSD's,

4
src/frontend/aspice.c

@ -52,7 +52,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
# define SEEK_SET 0 # define SEEK_SET 0
#endif #endif
static RETSIGTYPE sigchild(void);
static void sigchild(void);
struct proc { struct proc {
int pr_pid; /* The pid of the spice job. */ int pr_pid; /* The pid of the spice job. */
@ -163,7 +163,7 @@ com_jobs(wordlist *wl)
} }
static RETSIGTYPE
static void
sigchild(void) sigchild(void)
{ {
numchanged++; numchanged++;

4
src/frontend/evaluate.c

@ -20,7 +20,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/sim.h" /* To get SV_VOLTAGE definition */ #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 *apply_func(struct func *func, struct pnode *arg);
static struct dvec *ft_ternary(struct pnode *node); static struct dvec *ft_ternary(struct pnode *node);
static char *mkcname(char what, char *v1, char *v2); 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 JMP_BUF matherrbuf;
static RETSIGTYPE
static void
sig_matherr(void) sig_matherr(void)
{ {
fprintf(cp_err, "Error: argument out of range for math function\n"); fprintf(cp_err, "Error: argument out of range for math function\n");

2
src/frontend/parser/unixcom.c

@ -187,7 +187,7 @@ tryexec(char *name, char *argv[])
# endif # endif
int pid, j; int pid, j;
RETSIGTYPE (*svint)(), (*svquit)(), (*svtstp)();
void (*svint)(), (*svquit)(), (*svtstp)();
pid = vfork(); pid = vfork();
if (pid == 0) { if (pid == 0) {

4
src/frontend/resource.c

@ -570,7 +570,7 @@ static int get_sysmem(struct sys_mem *memall)
static JMP_BUF env; static JMP_BUF env;
static RETSIGTYPE
static void
fault(void) fault(void)
{ {
signal(SIGSEGV, (SIGNAL_FUNCTION) fault); /* SysV style */ signal(SIGSEGV, (SIGNAL_FUNCTION) fault); /* SysV style */
@ -586,7 +586,7 @@ baseaddr(void)
#else #else
char *low, *high, *at; char *low, *high, *at;
long x; long x;
RETSIGTYPE (*orig_signal)();
void (*orig_signal)();
if (getenv("SPICE_NO_DATASEG_CHECK")) if (getenv("SPICE_NO_DATASEG_CHECK"))
return 0; return 0;

18
src/frontend/signal_handler.c

@ -70,7 +70,7 @@ ft_sigintr_cleanup(void)
/* invoke this function upon keyboard interrupt */ /* invoke this function upon keyboard interrupt */
RETSIGTYPE
void
ft_sigintr(void) ft_sigintr(void)
{ {
static int interrupt_counter = 0; static int interrupt_counter = 0;
@ -103,7 +103,7 @@ ft_sigintr(void)
} }
RETSIGTYPE
void
sigfloat(int code) sigfloat(int code)
{ {
fperror("Error", code); fperror("Error", code);
@ -117,7 +117,7 @@ sigfloat(int code)
#ifdef SIGTSTP #ifdef SIGTSTP
RETSIGTYPE
void
sigstop(void) sigstop(void)
{ {
gr_clean(); gr_clean();
@ -127,7 +127,7 @@ sigstop(void)
} }
RETSIGTYPE
void
sigcont(void) sigcont(void)
{ {
(void) signal(SIGTSTP, (SIGNAL_FUNCTION) sigstop); (void) signal(SIGTSTP, (SIGNAL_FUNCTION) sigstop);
@ -141,7 +141,7 @@ sigcont(void)
/* Special (void) signal handlers. */ /* Special (void) signal handlers. */
RETSIGTYPE
void
sigill(void) sigill(void)
{ {
fprintf(cp_err, "\ninternal error -- illegal instruction\n"); fprintf(cp_err, "\ninternal error -- illegal instruction\n");
@ -149,7 +149,7 @@ sigill(void)
} }
RETSIGTYPE
void
sigbus(void) sigbus(void)
{ {
fprintf(cp_err, "\ninternal error -- bus error\n"); fprintf(cp_err, "\ninternal error -- bus error\n");
@ -157,7 +157,7 @@ sigbus(void)
} }
RETSIGTYPE
void
sigsegv(void) sigsegv(void)
{ {
fprintf(cp_err, "\ninternal error -- segmentation violation\n"); fprintf(cp_err, "\ninternal error -- segmentation violation\n");
@ -167,7 +167,7 @@ sigsegv(void)
fatal(); fatal();
} }
RETSIGTYPE
void
sigsegvsh(void) sigsegvsh(void)
{ {
fprintf(cp_err, "\ninternal error -- segmentation violation\n"); fprintf(cp_err, "\ninternal error -- segmentation violation\n");
@ -175,7 +175,7 @@ sigsegvsh(void)
} }
RETSIGTYPE
void
sig_sys(void) sig_sys(void)
{ {
fprintf(cp_err, "\ninternal error -- bad argument to system call\n"); fprintf(cp_err, "\ninternal error -- bad argument to system call\n");

18
src/frontend/signal_handler.h

@ -6,15 +6,15 @@
#ifndef ngspice_SIGNAL_HANDLER_H #ifndef ngspice_SIGNAL_HANDLER_H
#define 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; extern JMP_BUF jbuf;

4
src/include/ngspice/defines.h

@ -101,7 +101,7 @@
#define HAS_TIME_H #define HAS_TIME_H
#define HAS_RLIMIT_ #define HAS_RLIMIT_
#define void void
#ifndef SIGNAL_FUNCTION #ifndef SIGNAL_FUNCTION
# ifdef HAVE_SIGHANDLER_T # ifdef HAVE_SIGHANDLER_T
@ -111,7 +111,7 @@
# elif HAVE___SIGHANDLER_T # elif HAVE___SIGHANDLER_T
# define SIGNAL_FUNCTION __sighandler_t # define SIGNAL_FUNCTION __sighandler_t
# else # else
# define SIGNAL_FUNCTION RETSIGTYPE (*)(int)
# define SIGNAL_FUNCTION void (*)(int)
# endif # endif
#endif #endif

3
visualc/src/include/ngspice/config.h

@ -499,9 +499,6 @@
/* Define if you want to debug pole-zero analysis */ /* Define if you want to debug pole-zero analysis */
/* #undef PZDEBUG */ /* #undef PZDEBUG */
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the type of arg 1 for `select'. */ /* Define to the type of arg 1 for `select'. */
/* #undef SELECT_TYPE_ARG1 */ /* #undef SELECT_TYPE_ARG1 */

Loading…
Cancel
Save