These files are generated by cig with GC_PROTECT-support

This commit is contained in:
marting 1999-11-04 16:00:28 +00:00
parent 68138a2b58
commit 88b21d81b5
7 changed files with 560 additions and 34 deletions

View File

@ -22,11 +22,15 @@ s48_value df_set_lock(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s4
{
extern int set_lock(int , int , int , int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
r1 = set_lock(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5), s48_extract_fixnum(g6));
S48_GC_PROTECT_1(ret1);
r1 = set_lock(s48_extract_integer(g1), s48_extract_integer(g2), s48_extract_integer(g3), s48_extract_integer(g4), s48_extract_integer(g5), s48_extract_integer(g6));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -34,6 +38,7 @@ s48_value df_get_lock(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s4
{
extern int get_lock(int , int , int , int , int , int , int *, int *, int *, int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2;
int r3;
@ -42,13 +47,16 @@ s48_value df_get_lock(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s4
int r6;
r1 = get_lock(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5), s48_extract_fixnum(g6), &r2, &r3, &r4, &r5, &r6);
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = get_lock(s48_extract_integer(g1), s48_extract_integer(g2), s48_extract_integer(g3), s48_extract_integer(g4), s48_extract_integer(g5), s48_extract_integer(g6), &r2, &r3, &r4, &r5, &r6);
ret1 = errno_or_false(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_VECTOR_SET(mv_vec,3,s48_enter_fixnum(r5));
S48_VECTOR_SET(mv_vec,4,s48_enter_fixnum(r6));
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
S48_VECTOR_SET(mv_vec,1,s48_enter_integer(r3));
S48_VECTOR_SET(mv_vec,2,s48_enter_integer(r4));
S48_VECTOR_SET(mv_vec,3,s48_enter_integer(r5));
S48_VECTOR_SET(mv_vec,4,s48_enter_integer(r6));
S48_GC_UNPROTECT();
return ret1;
}

View File

@ -23,12 +23,16 @@ s48_value df_socket(s48_value g1, s48_value g2, s48_value g3, s48_value mv_vec)
{
extern int socket(int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = socket(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3));
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
@ -36,11 +40,15 @@ s48_value df_scheme_bind(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_bind(int , int , s48_value );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_bind(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3);
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -48,11 +56,15 @@ s48_value df_scheme_connect(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_connect(int , int , s48_value );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_connect(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3);
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -60,11 +72,15 @@ s48_value df_listen(s48_value g1, s48_value g2)
{
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = listen(s48_extract_fixnum(g1), s48_extract_fixnum(g2));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -72,12 +88,16 @@ s48_value df_scheme_accept(s48_value g1, s48_value g2, s48_value g3, s48_value m
{
extern int scheme_accept(int , int , s48_value );
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_accept(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
@ -85,11 +105,15 @@ s48_value df_scheme_peer_name(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_peer_name(int , int , s48_value );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_peer_name(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3);
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -97,11 +121,15 @@ s48_value df_scheme_socket_name(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_socket_name(int , int , s48_value );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_socket_name(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3);
ret1 = False_on_zero(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -109,11 +137,15 @@ s48_value df_shutdown(s48_value g1, s48_value g2)
{
extern int shutdown(int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = shutdown(s48_extract_fixnum(g1), s48_extract_fixnum(g2));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -121,41 +153,53 @@ s48_value df_scheme_socket_pair(s48_value g1, s48_value mv_vec)
{
extern int scheme_socket_pair(int , int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2;
int r3;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_socket_pair(s48_extract_fixnum(g1), &r2, &r3);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r3));
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_recv_substring(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5, s48_value g6, s48_value mv_vec)
{
extern int recv_substring(int , int , s48_value , int , int , s48_value );
extern ssize_t recv_substring(int , int , s48_value , size_t , size_t , s48_value );
s48_value ret1;
int r1;
S48_DECLARE_GC_PROTECT(2);
ssize_t r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = recv_substring(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3, s48_extract_fixnum(g4), s48_extract_fixnum(g5), g6);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_send_substring(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5, s48_value g6, s48_value g7, s48_value mv_vec)
{
extern int send_substring(int , int , s48_value , int , int , int , s48_value );
extern ssize_t send_substring(int , int , s48_value , size_t , size_t , int , s48_value );
s48_value ret1;
int r1;
S48_DECLARE_GC_PROTECT(2);
ssize_t r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = send_substring(s48_extract_fixnum(g1), s48_extract_fixnum(g2), g3, s48_extract_fixnum(g4), s48_extract_fixnum(g5), s48_extract_fixnum(g6), g7);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
@ -163,12 +207,16 @@ s48_value df_scheme_getsockopt(s48_value g1, s48_value g2, s48_value g3, s48_val
{
extern int scheme_getsockopt(int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_getsockopt(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3));
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
@ -176,14 +224,18 @@ s48_value df_scheme_getsockopt_linger(s48_value g1, s48_value g2, s48_value g3,
{
extern int scheme_getsockopt_linger(int , int , int , int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_getsockopt_linger(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), &r2);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r2));
S48_GC_UNPROTECT();
return ret1;
}
@ -191,14 +243,18 @@ s48_value df_scheme_getsockopt_timeout(s48_value g1, s48_value g2, s48_value g3,
{
extern int scheme_getsockopt_timeout(int , int , int , int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_getsockopt_timeout(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), &r2);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_VECTOR_SET(mv_vec,1,s48_enter_fixnum(r2));
S48_GC_UNPROTECT();
return ret1;
}
@ -206,11 +262,15 @@ s48_value df_scheme_setsockopt(s48_value g1, s48_value g2, s48_value g3, s48_val
{
extern int scheme_setsockopt(int , int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_setsockopt(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -218,11 +278,15 @@ s48_value df_scheme_setsockopt_linger(s48_value g1, s48_value g2, s48_value g3,
{
extern int scheme_setsockopt_linger(int , int , int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_setsockopt_linger(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -230,11 +294,15 @@ s48_value df_scheme_setsockopt_timeout(s48_value g1, s48_value g2, s48_value g3,
{
extern int scheme_setsockopt_timeout(int , int , int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_setsockopt_timeout(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -242,17 +310,21 @@ s48_value df_scheme_host_address2host_info(s48_value g1, s48_value mv_vec)
{
extern int scheme_host_address2host_info(s48_value , char **, char** *, char** *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
char** r4;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_host_address2host_info(g1, &r2, &r3, &r4);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
SetAlienVal(S48_VECTOR_REF(mv_vec,2),(long) r4);//simple-assign
S48_GC_UNPROTECT();
return ret1;
}
@ -260,17 +332,21 @@ s48_value df_scheme_host_name2host_info(s48_value g1, s48_value mv_vec)
{
extern int scheme_host_name2host_info(const char *, char **, char** *, char** *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
char** r4;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_host_name2host_info(s48_extract_string(g1), &r2, &r3, &r4);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
SetAlienVal(S48_VECTOR_REF(mv_vec,2),(long) r4);//simple-assign
S48_GC_UNPROTECT();
return ret1;
}
@ -278,15 +354,19 @@ s48_value df_scheme_net_address2net_info(s48_value g1, s48_value g2, s48_value m
{
extern int scheme_net_address2net_info(s48_value , s48_value , char **, char** *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_net_address2net_info(g1, g2, &r2, &r3);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
S48_GC_UNPROTECT();
return ret1;
}
@ -294,15 +374,19 @@ s48_value df_scheme_net_name2net_info(s48_value g1, s48_value g2, s48_value mv_v
{
extern int scheme_net_name2net_info(const char *, s48_value , char **, char** *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_net_name2net_info(s48_extract_string(g1), g2, &r2, &r3);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
S48_GC_UNPROTECT();
return ret1;
}
@ -310,6 +394,7 @@ s48_value df_scheme_serv_port2serv_info(s48_value g1, s48_value g2, s48_value mv
{
extern int scheme_serv_port2serv_info(int , const char *, char **, char** *, int *, char **);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
@ -317,12 +402,15 @@ s48_value df_scheme_serv_port2serv_info(s48_value g1, s48_value g2, s48_value mv
char *r5;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_serv_port2serv_info(s48_extract_fixnum(g1), s48_extract_string(g2), &r2, &r3, &r4, &r5);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
S48_VECTOR_SET(mv_vec,2,s48_enter_fixnum(r4));
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,3)),(long) r5); S48_SET_CDR(S48_VECTOR_REF(mv_vec,3),strlen_or_false(r5));//str-and-len
S48_GC_UNPROTECT();
return ret1;
}
@ -330,6 +418,7 @@ s48_value df_scheme_serv_name2serv_info(s48_value g1, s48_value g2, s48_value mv
{
extern int scheme_serv_name2serv_info(const char *, const char *, char **, char** *, int *, char **);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
@ -337,12 +426,15 @@ s48_value df_scheme_serv_name2serv_info(s48_value g1, s48_value g2, s48_value mv
char *r5;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_serv_name2serv_info(s48_extract_string(g1), s48_extract_string(g2), &r2, &r3, &r4, &r5);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
S48_VECTOR_SET(mv_vec,2,s48_enter_fixnum(r4));
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,3)),(long) r5); S48_SET_CDR(S48_VECTOR_REF(mv_vec,3),strlen_or_false(r5));//str-and-len
S48_GC_UNPROTECT();
return ret1;
}
@ -350,17 +442,21 @@ s48_value df_scheme_proto_num2proto_info(s48_value g1, s48_value mv_vec)
{
extern int scheme_proto_num2proto_info(int , char **, char** *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
int r4;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_proto_num2proto_info(s48_extract_fixnum(g1), &r2, &r3, &r4);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
S48_VECTOR_SET(mv_vec,2,s48_enter_fixnum(r4));
S48_GC_UNPROTECT();
return ret1;
}
@ -368,17 +464,21 @@ s48_value df_scheme_proto_name2proto_info(s48_value g1, s48_value mv_vec)
{
extern int scheme_proto_name2proto_info(const char *, char **, char** *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
char *r2;
char** r3;
int r4;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_proto_name2proto_info(s48_extract_string(g1), &r2, &r3, &r4);
ret1 = False_on_zero(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
SetAlienVal(S48_VECTOR_REF(mv_vec,1),(long) r3);//simple-assign
S48_VECTOR_SET(mv_vec,2,s48_enter_fixnum(r4));
S48_GC_UNPROTECT();
return ret1;
}
@ -386,11 +486,15 @@ s48_value df_veclen(s48_value g1)
{
extern s48_value veclen(const long * );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
s48_value r1;
S48_GC_PROTECT_1(ret1);
r1 = veclen((const long * )AlienVal(g1));
ret1 = r1;
S48_GC_UNPROTECT();
return ret1;
}

View File

@ -16,13 +16,17 @@ s48_value df_read_delim(s48_value g1, s48_value g2, s48_value g3, s48_value g4,
{
extern s48_value read_delim(const char *, char *, int , int , int , int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = read_delim(s48_extract_string(g1), s48_extract_string(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5), &r2);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
S48_GC_UNPROTECT();
return ret1;
}
@ -30,13 +34,17 @@ s48_value df_skip_chars(s48_value g1, s48_value g2, s48_value mv_vec)
{
extern s48_value skip_chars(const char *, int , int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = skip_chars(s48_extract_string(g1), s48_extract_fixnum(g2), &r2);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
S48_GC_UNPROTECT();
return ret1;
}

View File

@ -14,17 +14,21 @@ s48_value df_select_copyback(s48_value g1, s48_value g2, s48_value g3, s48_value
{
extern s48_value select_copyback(s48_value , s48_value , s48_value , s48_value , int *, int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
int r4;
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;
}
@ -32,17 +36,21 @@ s48_value df_select_filter(s48_value g1, s48_value g2, s48_value g3, s48_value g
{
extern s48_value select_filter(s48_value , s48_value , s48_value , s48_value , int *, int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
int r4;
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;
}

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ s48_value df_time_plus_ticks(s48_value mv_vec)
{
extern s48_value time_plus_ticks(int *, int *, int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
@ -19,12 +20,15 @@ s48_value df_time_plus_ticks(s48_value mv_vec)
int r5;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = time_plus_ticks(&r2, &r3, &r4, &r5);
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_VECTOR_SET(mv_vec,3,s48_enter_fixnum(r5));
S48_GC_UNPROTECT();
return ret1;
}
@ -32,13 +36,17 @@ s48_value df_scheme_time(s48_value mv_vec)
{
extern s48_value scheme_time(time_t *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
time_t r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_time(&r2);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
S48_GC_UNPROTECT();
return ret1;
}
@ -46,13 +54,17 @@ s48_value df_date2time(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s
{
extern s48_value date2time(int , int , int , int , int , int , s48_value , s48_value , int , time_t *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
time_t r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = date2time(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5), s48_extract_fixnum(g6), g7, g8, EXTRACT_BOOLEAN(g9), &r2);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
S48_GC_UNPROTECT();
return ret1;
}
@ -60,6 +72,7 @@ s48_value df_time2date(s48_value g1, s48_value g2, s48_value mv_vec)
{
extern s48_value time2date(time_t , s48_value , int *, int *, int *, int *, int *, int *, const char **, int *, int *, int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
@ -74,6 +87,8 @@ s48_value df_time2date(s48_value g1, s48_value g2, s48_value mv_vec)
int r12;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = time2date(s48_extract_integer(g1), g2, &r2, &r3, &r4, &r5, &r6, &r7, &r8, &r9, &r10, &r11, &r12);
ret1 = r1;
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r2));
@ -87,6 +102,7 @@ s48_value df_time2date(s48_value g1, s48_value g2, s48_value mv_vec)
S48_VECTOR_SET(mv_vec,8,ENTER_BOOLEAN(r10));
S48_VECTOR_SET(mv_vec,9,s48_enter_fixnum(r11));
S48_VECTOR_SET(mv_vec,10,s48_enter_fixnum(r12));
S48_GC_UNPROTECT();
return ret1;
}
@ -94,13 +110,17 @@ s48_value df_format_date(s48_value g1, s48_value g2, s48_value g3, s48_value g4,
{
extern s48_value format_date(const char *, int , int , int , int , int , int , s48_value , int , int , int , const char **);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
const char *r2;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = format_date(s48_extract_string(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), s48_extract_fixnum(g5), s48_extract_fixnum(g6), s48_extract_fixnum(g7), g8, EXTRACT_BOOLEAN(g9), s48_extract_fixnum(g10), s48_extract_fixnum(g11), &r2);
ret1 = r1;
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r2); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r2));//str-and-len
S48_GC_UNPROTECT();
return ret1;
}

View File

@ -23,6 +23,7 @@ s48_value df_scheme_tcgetattr(s48_value g1, s48_value g2, s48_value mv_vec)
{
extern int scheme_tcgetattr(int , char *, int *, int *, int *, int *, int *, int *);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2;
int r3;
@ -32,6 +33,8 @@ s48_value df_scheme_tcgetattr(s48_value g1, s48_value g2, s48_value mv_vec)
int r7;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_tcgetattr(s48_extract_fixnum(g1), s48_extract_string(g2), &r2, &r3, &r4, &r5, &r6, &r7);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r2));
@ -40,6 +43,7 @@ s48_value df_scheme_tcgetattr(s48_value g1, s48_value g2, s48_value mv_vec)
S48_VECTOR_SET(mv_vec,3,s48_enter_integer(r5));
S48_VECTOR_SET(mv_vec,4,s48_enter_fixnum(r6));
S48_VECTOR_SET(mv_vec,5,s48_enter_fixnum(r7));
S48_GC_UNPROTECT();
return ret1;
}
@ -47,11 +51,15 @@ s48_value df_scheme_tcgetattrB(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_tcgetattrB(int , char *, s48_value );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_tcgetattrB(s48_extract_fixnum(g1), s48_extract_string(g2), g3);
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -59,11 +67,15 @@ s48_value df_scheme_tcsetattr(s48_value g1, s48_value g2, s48_value g3, s48_valu
{
extern int scheme_tcsetattr(int , int , const char *, int , int , int , int , int , int , int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_tcsetattr(s48_extract_fixnum(g1), s48_extract_fixnum(g2), s48_extract_string(g3), s48_extract_integer(g4), s48_extract_integer(g5), s48_extract_integer(g6), s48_extract_integer(g7), s48_extract_fixnum(g8), s48_extract_fixnum(g9), s48_extract_fixnum(g10), s48_extract_fixnum(g11));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -71,11 +83,15 @@ s48_value df_tcsendbreak(s48_value g1, s48_value g2)
{
extern int tcsendbreak(int , int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = tcsendbreak(s48_extract_integer(g1), s48_extract_integer(g2));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -83,11 +99,15 @@ s48_value df_tcdrain(s48_value g1)
{
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = tcdrain(s48_extract_integer(g1));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -95,11 +115,15 @@ s48_value df_tcflush(s48_value g1, s48_value g2)
{
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = tcflush(s48_extract_integer(g1), s48_extract_integer(g2));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -107,11 +131,15 @@ s48_value df_tcflow(s48_value g1, s48_value g2)
{
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = tcflow(s48_extract_integer(g1), s48_extract_integer(g2));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -119,11 +147,15 @@ s48_value df_tcsetpgrp(s48_value g1, s48_value g2)
{
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = tcsetpgrp(s48_extract_fixnum(g1), s48_extract_fixnum(g2));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -131,12 +163,16 @@ s48_value df_tcgetpgrp(s48_value g1, s48_value mv_vec)
{
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
pid_t r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = tcgetpgrp(s48_extract_fixnum(g1));
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
@ -144,12 +180,16 @@ s48_value df_open_ctty(s48_value g1, s48_value g2, s48_value mv_vec)
{
extern int open_ctty(const char *, int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
int r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = open_ctty(s48_extract_string(g1), s48_extract_fixnum(g2));
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_integer(r1));
S48_GC_UNPROTECT();
return ret1;
}
@ -157,11 +197,15 @@ s48_value df_isatty(s48_value g1)
{
extern int isatty(int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = isatty(s48_extract_integer(g1));
ret1 = ENTER_BOOLEAN(r1);
S48_GC_UNPROTECT();
return ret1;
}
@ -169,12 +213,16 @@ s48_value df_ttyname(s48_value g1, s48_value mv_vec)
{
extern char *ttyname(int );
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
char *r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = ttyname(s48_extract_integer(g1));
ret1 = errno_on_zero_or_false(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r1); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r1));//str-and-len
S48_GC_UNPROTECT();
return ret1;
}
@ -182,12 +230,16 @@ s48_value df_scm_ctermid(s48_value mv_vec)
{
extern char *scm_ctermid(void);
s48_value ret1;
S48_DECLARE_GC_PROTECT(2);
char *r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scm_ctermid();
ret1 = errno_on_zero_or_false(r1);
SetAlienVal(S48_CAR(S48_VECTOR_REF(mv_vec,0)),(long) r1); S48_SET_CDR(S48_VECTOR_REF(mv_vec,0),strlen_or_false(r1));//str-and-len
S48_GC_UNPROTECT();
return ret1;
}