/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by Mike Parker.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#include "sig.h"

static int (*handlers[NSIGNALS])();

init_sig_handlers()
{
 int i;

 for (i=0;i<NSIGNALS;i++)
  { handlers[i] = 0;
  }
}

set_sig_handler(sig,handler)
int sig;
int (*handler)();
{
 if ((sig >= 0) && (sig < NSIGNALS))
  { handlers[sig] = handler;
  }
}

sendsig(sig)
int sig;
{
 if ((sig >= 0) && (sig < NSIGNALS) && handlers[sig])
  { ast(handlers[sig],sig);
  }
}
