62 lines
1.7 KiB
C
62 lines
1.7 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"
|
|
|
|
/* Make sure foreign-function stubs interface to the C funs correctly: */
|
|
#include "select1.h"
|
|
|
|
s48_value df_select_copyback(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value mv_vec)
|
|
{
|
|
extern s48_value select_copyback(s48_value , s48_value , s48_value , s48_value , int *, int *, int *);
|
|
s48_value ret1 = S48_FALSE;
|
|
S48_DECLARE_GC_PROTECT(2);
|
|
s48_value r1;
|
|
int r2 = 0;
|
|
int r3 = 0;
|
|
int r4 = 0;
|
|
|
|
|
|
|
|
S48_GC_PROTECT_2(mv_vec,ret1);
|
|
r1 = select_copyback(g1, g2, g3, g4, &r2, &r3, &r4);
|
|
ret1 = r1;
|
|
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
|
|
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r3));
|
|
S48_VECTOR_SET(mv_vec,2,s48_enter_fixnum(r4));
|
|
S48_GC_UNPROTECT();
|
|
return ret1;
|
|
}
|
|
|
|
s48_value df_select_filter(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value mv_vec)
|
|
{
|
|
extern s48_value select_filter(s48_value , s48_value , s48_value , s48_value , int *, int *, int *);
|
|
s48_value ret1 = S48_FALSE;
|
|
S48_DECLARE_GC_PROTECT(2);
|
|
s48_value r1;
|
|
int r2 = 0;
|
|
int r3 = 0;
|
|
int r4 = 0;
|
|
|
|
|
|
|
|
S48_GC_PROTECT_2(mv_vec,ret1);
|
|
r1 = select_filter(g1, g2, g3, g4, &r2, &r3, &r4);
|
|
ret1 = r1;
|
|
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
|
|
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r3));
|
|
S48_VECTOR_SET(mv_vec,2,s48_enter_fixnum(r4));
|
|
S48_GC_UNPROTECT();
|
|
return ret1;
|
|
}
|
|
|
|
void s48_init_select(void)
|
|
{
|
|
S48_EXPORT_FUNCTION(df_select_copyback);
|
|
S48_EXPORT_FUNCTION(df_select_filter);
|
|
}
|