1999-09-14 09:32:05 -04:00
|
|
|
/* This is an Scheme48/C interface file,
|
1999-09-15 20:20:37 -04:00
|
|
|
** automatically generated by a hacked version of cig 3.0.
|
1999-09-23 19:02:54 -04:00
|
|
|
step 4
|
1999-09-14 09:32:05 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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"
|
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_sig2interrupt(s48_value g1)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
|
|
|
extern int sig2interrupt(int );
|
2000-10-19 04:37:34 -04:00
|
|
|
s48_value ret1 = S48_FALSE;
|
|
|
|
S48_DECLARE_GC_PROTECT(1);
|
1999-09-14 09:32:05 -04:00
|
|
|
int r1;
|
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
2000-10-19 04:37:34 -04:00
|
|
|
|
|
|
|
S48_GC_PROTECT_1(ret1);
|
1999-10-08 14:41:05 -04:00
|
|
|
r1 = sig2interrupt(s48_extract_integer(g1));
|
|
|
|
ret1 = s48_enter_integer(r1);
|
2000-10-19 04:37:34 -04:00
|
|
|
S48_GC_UNPROTECT();
|
1999-09-14 09:32:05 -04:00
|
|
|
return ret1;
|
1999-09-15 20:20:37 -04:00
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_do_default_sigaction(s48_value g1)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
|
|
|
extern void do_default_sigaction(int );
|
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
|
|
|
do_default_sigaction(s48_extract_fixnum(g1));
|
|
|
|
return S48_FALSE;
|
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_scsh_set_sig(s48_value g1, s48_value g2, s48_value g3, s48_value mv_vec)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
1999-09-15 20:20:37 -04:00
|
|
|
extern s48_value scsh_set_sig(int , int , int , int *, int *);
|
2000-10-19 04:37:34 -04:00
|
|
|
s48_value ret1 = S48_FALSE;
|
|
|
|
S48_DECLARE_GC_PROTECT(2);
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value r1;
|
2000-10-19 04:37:34 -04:00
|
|
|
int r2 = 0;
|
|
|
|
int r3 = 0;
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
2000-10-19 04:37:34 -04:00
|
|
|
|
|
|
|
S48_GC_PROTECT_2(mv_vec,ret1);
|
1999-09-15 20:20:37 -04:00
|
|
|
r1 = scsh_set_sig(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), &r2, &r3);
|
1999-09-14 09:32:05 -04:00
|
|
|
ret1 = r1;
|
1999-10-08 14:41:05 -04:00
|
|
|
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
|
|
|
|
S48_VECTOR_SET(mv_vec,1,s48_enter_integer(r3));
|
2000-10-19 04:37:34 -04:00
|
|
|
S48_GC_UNPROTECT();
|
1999-09-14 09:32:05 -04:00
|
|
|
return ret1;
|
1999-09-15 20:20:37 -04:00
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_scsh_get_sig(s48_value g1, s48_value mv_vec)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
1999-09-15 20:20:37 -04:00
|
|
|
extern s48_value scsh_get_sig(int , int *, int *);
|
2000-10-19 04:37:34 -04:00
|
|
|
s48_value ret1 = S48_FALSE;
|
|
|
|
S48_DECLARE_GC_PROTECT(2);
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value r1;
|
2000-10-19 04:37:34 -04:00
|
|
|
int r2 = 0;
|
|
|
|
int r3 = 0;
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
2000-10-19 04:37:34 -04:00
|
|
|
|
|
|
|
S48_GC_PROTECT_2(mv_vec,ret1);
|
1999-09-15 20:20:37 -04:00
|
|
|
r1 = scsh_get_sig(s48_extract_fixnum(g1), &r2, &r3);
|
1999-09-14 09:32:05 -04:00
|
|
|
ret1 = r1;
|
1999-10-08 14:41:05 -04:00
|
|
|
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
|
|
|
|
S48_VECTOR_SET(mv_vec,1,s48_enter_integer(r3));
|
2000-10-19 04:37:34 -04:00
|
|
|
S48_GC_UNPROTECT();
|
1999-09-14 09:32:05 -04:00
|
|
|
return ret1;
|
1999-09-15 20:20:37 -04:00
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_install_scsh_handlers(void)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
|
|
|
extern void install_scsh_handlers(void);
|
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
1999-09-14 09:32:05 -04:00
|
|
|
install_scsh_handlers();
|
1999-09-15 20:20:37 -04:00
|
|
|
return S48_FALSE;
|
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_get_int_handlers(void)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
1999-09-15 20:20:37 -04:00
|
|
|
extern s48_value get_int_handlers(void);
|
2000-10-19 04:37:34 -04:00
|
|
|
s48_value ret1 = S48_FALSE;
|
|
|
|
S48_DECLARE_GC_PROTECT(1);
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value r1;
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
2000-10-19 04:37:34 -04:00
|
|
|
|
|
|
|
S48_GC_PROTECT_1(ret1);
|
1999-09-14 09:32:05 -04:00
|
|
|
r1 = get_int_handlers();
|
|
|
|
ret1 = r1;
|
2000-10-19 04:37:34 -04:00
|
|
|
S48_GC_UNPROTECT();
|
1999-09-14 09:32:05 -04:00
|
|
|
return ret1;
|
1999-09-15 20:20:37 -04:00
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
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;
|
|
|
|
}
|