scsh-0.6/scsh/sighandlers.c

100 lines
2.2 KiB
C

/* This is an Scheme48/C interface file,
** automatically generated by a hacked version of cig 3.0.
step 3
*/
#include <stdio.h>
#include <stdlib.h> /* For malloc. */
#include "libcig.h"
extern int errno;
/* Make sure foreign-function stubs interface to the C funs correctly: */
#include "sighandlers1.h"
s48_value df_sig2interrupt(s48_value g1)
{
extern int sig2interrupt(int );
s48_value ret1;
int r1;
r1 = sig2interrupt(s48_extract_fixnum(g1));
ret1 = s48_enter_fixnum(r1);
return ret1;
}
s48_value df_do_default_sigaction(s48_value g1)
{
extern void do_default_sigaction(int );
do_default_sigaction(s48_extract_fixnum(g1));
return S48_FALSE;
}
s48_value df_scsh_set_sig(s48_value g1, s48_value g2, s48_value g3, s48_value mv_vec)
{
extern s48_value scsh_set_sig(int , int , int , int *, int *);
s48_value ret1;
s48_value r1;
int r2;
int r3;
r1 = scsh_set_sig(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), &r2, &r3);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r3));
return ret1;
}
s48_value df_scsh_get_sig(s48_value g1, s48_value mv_vec)
{
extern s48_value scsh_get_sig(int , int *, int *);
s48_value ret1;
s48_value r1;
int r2;
int r3;
r1 = scsh_get_sig(s48_extract_fixnum(g1), &r2, &r3);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r3));
return ret1;
}
s48_value df_install_scsh_handlers(void)
{
extern void install_scsh_handlers(void);
install_scsh_handlers();
return S48_FALSE;
}
s48_value df_get_int_handlers(void)
{
extern s48_value get_int_handlers(void);
s48_value ret1;
s48_value r1;
r1 = get_int_handlers();
ret1 = r1;
return ret1;
}
s48_value s48_init_sighandlers(void)
{
S48_EXPORT_FUNCTION(df_sig2interrupt);
S48_EXPORT_FUNCTION(df_do_default_sigaction);
S48_EXPORT_FUNCTION(df_scsh_set_sig);
S48_EXPORT_FUNCTION(df_scsh_get_sig);
S48_EXPORT_FUNCTION(df_install_scsh_handlers);
S48_EXPORT_FUNCTION(df_get_int_handlers);
return S48_UNSPECIFIC;
}