scsh-0.6/scsh/select.c

62 lines
1.7 KiB
C
Raw Permalink Normal View History

/* 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 *);
2001-01-01 12:55:36 -05:00
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
2001-01-01 12:55:36 -05:00
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 *);
2001-01-01 12:55:36 -05:00
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
2001-01-01 12:55:36 -05:00
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;
}
2001-01-09 10:57:06 -05:00
void s48_init_select(void)
{
S48_EXPORT_FUNCTION(df_select_copyback);
S48_EXPORT_FUNCTION(df_select_filter);
}