DEBUG flags cleanup, some dead code removal

This commit is contained in:
2021-01-26 15:02:04 +01:00
parent c1d0085217
commit 157c64bd6e
7 changed files with 110 additions and 102 deletions

23
signal.c Normal file
View File

@@ -0,0 +1,23 @@
#include <stdio.h>
#include <signal.h>
int sigint_received=0;
static void stopall()
{
printf("SIGINT RECEIVED: aborting eval\n");
sigint_received=1;
}
int stopped()
{
return sigint_received;
}
void set_intr()
{
signal(SIGINT, stopall);
# ifdef DEBUG
printf("SIGINT armed.\n");
# endif
}