Snapshot of the cig generated files.

This commit is contained in:
mainzelm 2001-01-01 17:55:36 +00:00
parent 68947a09f9
commit 843b443132
5 changed files with 49 additions and 521 deletions

View File

@ -68,155 +68,7 @@ s48_value df_shutdown(s48_value g1, s48_value g2)
return ret1;
}
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_FALSE;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2 = 0;
int r3 = 0;
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_scheme_getsockopt(s48_value g1, s48_value g2, s48_value g3, s48_value mv_vec)
{
extern int scheme_getsockopt(int , int , int );
s48_value ret1 = S48_FALSE;
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;
}
s48_value df_scheme_getsockopt_linger(s48_value g1, s48_value g2, s48_value g3, s48_value mv_vec)
{
extern int scheme_getsockopt_linger(int , int , int , int *);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2 = 0;
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;
}
s48_value df_scheme_getsockopt_timeout(s48_value g1, s48_value g2, s48_value g3, s48_value mv_vec)
{
extern int scheme_getsockopt_timeout(int , int , int , int *);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
int r1;
int r2 = 0;
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;
}
s48_value df_scheme_setsockopt(s48_value g1, s48_value g2, s48_value g3, s48_value g4)
{
extern int scheme_setsockopt(int , int , int , int );
s48_value ret1 = S48_FALSE;
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;
}
s48_value df_scheme_setsockopt_linger(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5)
{
extern int scheme_setsockopt_linger(int , int , int , int , int );
s48_value ret1 = S48_FALSE;
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;
}
s48_value df_scheme_setsockopt_timeout(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5)
{
extern int scheme_setsockopt_timeout(int , int , int , int , int );
s48_value ret1 = S48_FALSE;
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;
}
s48_value df_veclen(s48_value g1)
{
extern s48_value veclen(const long * );
s48_value ret1 = S48_FALSE;
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;
}
s48_value df_set_longvec_carriers(s48_value g1, s48_value g2)
{
extern void set_longvec_carriers(s48_value , long const * const * );
set_longvec_carriers(g1, (long const * const * )AlienVal(g2));
return S48_FALSE;
}
s48_value s48_init_network(void)
void s48_init_network(void)
{
S48_EXPORT_FUNCTION(df_socket);
S48_EXPORT_FUNCTION(scheme_bind);
@ -226,15 +78,15 @@ s48_value s48_init_network(void)
S48_EXPORT_FUNCTION(scheme_peer_name);
S48_EXPORT_FUNCTION(scheme_socket_name);
S48_EXPORT_FUNCTION(df_shutdown);
S48_EXPORT_FUNCTION(df_scheme_socket_pair);
S48_EXPORT_FUNCTION(scheme_socket_pair);
S48_EXPORT_FUNCTION(recv_substring);
S48_EXPORT_FUNCTION(send_substring);
S48_EXPORT_FUNCTION(df_scheme_getsockopt);
S48_EXPORT_FUNCTION(df_scheme_getsockopt_linger);
S48_EXPORT_FUNCTION(df_scheme_getsockopt_timeout);
S48_EXPORT_FUNCTION(df_scheme_setsockopt);
S48_EXPORT_FUNCTION(df_scheme_setsockopt_linger);
S48_EXPORT_FUNCTION(df_scheme_setsockopt_timeout);
S48_EXPORT_FUNCTION(scheme_getsockopt);
S48_EXPORT_FUNCTION(scheme_getsockopt_linger);
S48_EXPORT_FUNCTION(scheme_getsockopt_timeout);
S48_EXPORT_FUNCTION(scheme_setsockopt);
S48_EXPORT_FUNCTION(scheme_setsockopt_linger);
S48_EXPORT_FUNCTION(scheme_setsockopt_timeout);
S48_EXPORT_FUNCTION(scheme_host_address2host_info);
S48_EXPORT_FUNCTION(scheme_host_name2host_info);
S48_EXPORT_FUNCTION(scheme_net_address2net_info);
@ -243,8 +95,5 @@ s48_value s48_init_network(void)
S48_EXPORT_FUNCTION(scheme_serv_name2serv_info);
S48_EXPORT_FUNCTION(scheme_proto_num2proto_info);
S48_EXPORT_FUNCTION(scheme_proto_name2proto_info);
S48_EXPORT_FUNCTION(df_veclen);
S48_EXPORT_FUNCTION(df_set_longvec_carriers);
return S48_UNSPECIFIC;
}

View File

@ -6,52 +6,4 @@ step 4
#include <stdio.h>
#include <stdlib.h> /* For malloc. */
#include "libcig.h"
#include <sys/types.h>
/* Make sure foreign-function stubs interface to the C funs correctly: */
#include "fdports1.h"
s48_value df_read_delim(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5, s48_value mv_vec)
{
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;
}
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;
}
s48_value s48_init_rdelim(void)
{
S48_EXPORT_FUNCTION(df_read_delim);
S48_EXPORT_FUNCTION(df_skip_chars);
return S48_UNSPECIFIC;
}
void s48_init_rdelim(){}

View File

@ -13,12 +13,12 @@ step 4
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_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
int r4;
int r2 = 0;
int r3 = 0;
int r4 = 0;
@ -35,12 +35,12 @@ s48_value df_select_copyback(s48_value g1, s48_value g2, s48_value g3, s48_value
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_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
int r4;
int r2 = 0;
int r3 = 0;
int r4 = 0;

View File

@ -29,186 +29,6 @@ extern int errno;
#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)
#define False_on_zero(x) ((x) ? s48_enter_fixnum(x) : S48_FALSE)
s48_value df_scheme_exec(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_exec(const char *, s48_value , s48_value );
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_exec(s48_extract_string(g1), g2, g3);
ret1 = s48_enter_fixnum(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_chdir(s48_value g1)
{
extern int chdir(const char *);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = chdir(s48_extract_string(g1));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_scheme_cwd(s48_value mv_vec)
{
extern int scheme_cwd(const char **);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
int r1;
const char *r2 = 0;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = scheme_cwd(&r2);
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
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_getgid(void)
{
extern gid_t getgid(void);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
gid_t r1;
S48_GC_PROTECT_1(ret1);
r1 = getgid();
ret1 = s48_enter_fixnum(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_getegid(void)
{
extern gid_t getegid(void);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
gid_t r1;
S48_GC_PROTECT_1(ret1);
r1 = getegid();
ret1 = s48_enter_fixnum(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_setgid(s48_value g1)
{
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = setgid(s48_extract_fixnum(g1));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_num_supp_groups(s48_value mv_vec)
{
extern int num_supp_groups(void);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
int r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = num_supp_groups();
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_get_groups(s48_value g1, s48_value mv_vec)
{
extern int get_groups(s48_value );
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
int r1;
S48_GC_PROTECT_2(mv_vec,ret1);
r1 = get_groups(g1);
ret1 = errno_or_false(r1);
S48_VECTOR_SET(mv_vec,0,s48_enter_fixnum(r1));
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_getuid(void)
{
extern uid_t getuid(void);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
uid_t r1;
S48_GC_PROTECT_1(ret1);
r1 = getuid();
ret1 = s48_enter_fixnum(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_geteuid(void)
{
extern uid_t geteuid(void);
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
uid_t r1;
S48_GC_PROTECT_1(ret1);
r1 = geteuid();
ret1 = s48_enter_fixnum(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_setuid(s48_value g1)
{
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = setuid(s48_extract_fixnum(g1));
ret1 = errno_or_false(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_getpid(void)
{
extern pid_t getpid(void);
@ -538,38 +358,6 @@ s48_value df_scm_utime_now(s48_value g1)
return ret1;
}
s48_value df_scheme_stat(s48_value g1, s48_value g2, s48_value g3)
{
extern int scheme_stat(const char *, s48_value , int );
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_stat(s48_extract_string(g1), g2, EXTRACT_BOOLEAN(g3));
ret1 = False_on_zero(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_scheme_fstat(s48_value g1, s48_value g2)
{
extern int scheme_fstat(int , s48_value );
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(1);
int r1;
S48_GC_PROTECT_1(ret1);
r1 = scheme_fstat(s48_extract_integer(g1), g2);
ret1 = False_on_zero(r1);
S48_GC_UNPROTECT();
return ret1;
}
s48_value df_symlink(s48_value g1, s48_value g2)
{
@ -1024,21 +812,22 @@ s48_value df_errno_msg(s48_value g1, s48_value mv_vec)
s48_value s48_init_syscalls(void)
{
S48_EXPORT_FUNCTION(df_scheme_exec);
S48_EXPORT_FUNCTION(scheme_exec);
S48_EXPORT_FUNCTION(scsh_exit);
S48_EXPORT_FUNCTION(scsh__exit);
S48_EXPORT_FUNCTION(scsh_fork);
S48_EXPORT_FUNCTION(wait_pid);
S48_EXPORT_FUNCTION(df_chdir);
S48_EXPORT_FUNCTION(df_scheme_cwd);
S48_EXPORT_FUNCTION(df_getgid);
S48_EXPORT_FUNCTION(df_getegid);
S48_EXPORT_FUNCTION(df_setgid);
S48_EXPORT_FUNCTION(df_num_supp_groups);
S48_EXPORT_FUNCTION(df_get_groups);
S48_EXPORT_FUNCTION(df_getuid);
S48_EXPORT_FUNCTION(df_geteuid);
S48_EXPORT_FUNCTION(df_setuid);
S48_EXPORT_FUNCTION(scsh_chdir);
S48_EXPORT_FUNCTION(scheme_cwd);
S48_EXPORT_FUNCTION(scsh_getgid);
S48_EXPORT_FUNCTION(scsh_getegid);
S48_EXPORT_FUNCTION(scsh_setgid);
S48_EXPORT_FUNCTION(scsh_setegid);
S48_EXPORT_FUNCTION(get_groups);
S48_EXPORT_FUNCTION(scsh_getuid);
S48_EXPORT_FUNCTION(scsh_geteuid);
S48_EXPORT_FUNCTION(scsh_setuid);
S48_EXPORT_FUNCTION(scsh_seteuid);
S48_EXPORT_FUNCTION(df_getpid);
S48_EXPORT_FUNCTION(df_getppid);
S48_EXPORT_FUNCTION(df_getpgrp);
@ -1060,8 +849,8 @@ s48_value s48_init_syscalls(void)
S48_EXPORT_FUNCTION(df_rmdir);
S48_EXPORT_FUNCTION(df_scm_utime);
S48_EXPORT_FUNCTION(df_scm_utime_now);
S48_EXPORT_FUNCTION(df_scheme_stat);
S48_EXPORT_FUNCTION(df_scheme_fstat);
S48_EXPORT_FUNCTION(scheme_stat);
S48_EXPORT_FUNCTION(scheme_fstat);
S48_EXPORT_FUNCTION(df_symlink);
S48_EXPORT_FUNCTION(df_truncate);
S48_EXPORT_FUNCTION(df_ftruncate);

View File

@ -8,83 +8,23 @@ step 4
#include "libcig.h"
#include "time1.h"
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;
int r4;
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;
}
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;
}
s48_value df_date2time(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5, s48_value g6, s48_value g7, s48_value g8, s48_value g9, s48_value mv_vec)
{
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;
}
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_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
int r2;
int r3;
int r4;
int r5;
int r6;
int r7;
const char *r8;
int r9;
int r10;
int r11;
int r12;
int r2 = 0;
int r3 = 0;
int r4 = 0;
int r5 = 0;
int r6 = 0;
int r7 = 0;
const char *r8 = 0;
int r9 = 0;
int r10 = 0;
int r11 = 0;
int r12 = 0;
@ -109,10 +49,10 @@ s48_value df_time2date(s48_value g1, s48_value g2, s48_value mv_vec)
s48_value df_format_date(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value g5, s48_value g6, s48_value g7, s48_value g8, s48_value g9, s48_value g10, s48_value g11, s48_value mv_vec)
{
extern s48_value format_date(const char *, int , int , int , int , int , int , s48_value , int , int , int , const char **);
s48_value ret1;
s48_value ret1 = S48_FALSE;
S48_DECLARE_GC_PROTECT(2);
s48_value r1;
const char *r2;
const char *r2 = 0;
@ -124,13 +64,11 @@ s48_value df_format_date(s48_value g1, s48_value g2, s48_value g3, s48_value g4,
return ret1;
}
s48_value s48_init_time(void)
void s48_init_time(void)
{
S48_EXPORT_FUNCTION(df_time_plus_ticks);
S48_EXPORT_FUNCTION(df_scheme_time);
S48_EXPORT_FUNCTION(df_date2time);
S48_EXPORT_FUNCTION(time_plus_ticks);
S48_EXPORT_FUNCTION(scheme_time);
S48_EXPORT_FUNCTION(date2time);
S48_EXPORT_FUNCTION(df_time2date);
S48_EXPORT_FUNCTION(df_format_date);
return S48_UNSPECIFIC;
}