2003-05-01 06:21:33 -04:00
|
|
|
/* 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;
|
|
|
|
|
2003-06-25 04:26:06 -04:00
|
|
|
#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)
|
2003-05-01 06:21:33 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|