scsh-0.6/scsh/db.c

37 lines
892 B
C
Raw Permalink Normal View History

/* This is an Scheme48/C interface file,
** automatically generated by a hacked version of cig 3.0.
*/
#include <stdio.h>
#include <stdlib.h> /* For malloc. */
#include "libcig.h"
#include <sys/types.h>
#include <limits.h>
#include "/usr/local/include/db.h"
extern int errno;
#define errno_or_false(x) (((x) == -1) ? s48_enter_fixnum(errno) : S48_FALSE)
s48_value df_db_open(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value mv_vec)
{
extern int db_open(const char *, int , int , int , DB** *);
s48_value ret1;
int r1;
DB** r2;
r1 = db_open(s48_extract_string(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), &r2);
ret1 = errno_or_false(r1);
SetAlienVal(S48_VECTOR_REF(mv_vec,0),(long) r2);
return ret1;
}
s48_value s48_init_db(void)
{
S48_EXPORT_FUNCTION(df_db_open);
return S48_UNSPECIFIC;
}