116 lines
2.6 KiB
C
116 lines
2.6 KiB
C
/* This is an Scheme48/C interface file,
|
|
** automatically generated by a hacked version of cig 3.0.
|
|
step 4
|
|
*/
|
|
|
|
#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 = S48_FALSE;
|
|
S48_DECLARE_GC_PROTECT(1);
|
|
int r1;
|
|
|
|
|
|
|
|
S48_GC_PROTECT_1(ret1);
|
|
r1 = sig2interrupt(s48_extract_integer(g1));
|
|
ret1 = s48_enter_integer(r1);
|
|
S48_GC_UNPROTECT();
|
|
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_FALSE;
|
|
S48_DECLARE_GC_PROTECT(2);
|
|
s48_value r1;
|
|
int r2 = 0;
|
|
int r3 = 0;
|
|
|
|
|
|
|
|
S48_GC_PROTECT_2(mv_vec,ret1);
|
|
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_integer(r2));
|
|
S48_VECTOR_SET(mv_vec,1,s48_enter_integer(r3));
|
|
S48_GC_UNPROTECT();
|
|
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_FALSE;
|
|
S48_DECLARE_GC_PROTECT(2);
|
|
s48_value r1;
|
|
int r2 = 0;
|
|
int r3 = 0;
|
|
|
|
|
|
|
|
S48_GC_PROTECT_2(mv_vec,ret1);
|
|
r1 = scsh_get_sig(s48_extract_fixnum(g1), &r2, &r3);
|
|
ret1 = r1;
|
|
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
|
|
S48_VECTOR_SET(mv_vec,1,s48_enter_integer(r3));
|
|
S48_GC_UNPROTECT();
|
|
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_FALSE;
|
|
S48_DECLARE_GC_PROTECT(1);
|
|
s48_value r1;
|
|
|
|
|
|
|
|
S48_GC_PROTECT_1(ret1);
|
|
r1 = get_int_handlers();
|
|
ret1 = r1;
|
|
S48_GC_UNPROTECT();
|
|
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;
|
|
}
|