1999-09-14 09:32:05 -04:00
|
|
|
/* This is an Scheme48/C interface file,
|
1999-09-15 20:20:37 -04:00
|
|
|
** automatically generated by a hacked version of cig 3.0.
|
1999-09-14 09:32:05 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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:44:08 -04:00
|
|
|
#define errno_or_false(x) (((x) == -1) ? s48_enter_integer(errno) : S48_FALSE)
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value df_db_open(s48_value g1, s48_value g2, s48_value g3, s48_value g4, s48_value mv_vec)
|
1999-09-14 09:32:05 -04:00
|
|
|
{
|
|
|
|
extern int db_open(const char *, int , int , int , DB** *);
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value ret1;
|
1999-09-14 09:32:05 -04:00
|
|
|
int r1;
|
|
|
|
DB** r2;
|
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
|
|
|
|
r1 = db_open(s48_extract_string(g1), s48_extract_fixnum(g2), s48_extract_fixnum(g3), s48_extract_fixnum(g4), &r2);
|
1999-09-14 09:32:05 -04:00
|
|
|
ret1 = errno_or_false(r1);
|
1999-09-15 20:20:37 -04:00
|
|
|
SetAlienVal(S48_VECTOR_REF(mv_vec,0),(long) r2);
|
1999-09-14 09:32:05 -04:00
|
|
|
return ret1;
|
1999-09-15 20:20:37 -04:00
|
|
|
}
|
1999-09-14 09:32:05 -04:00
|
|
|
|
1999-09-15 20:20:37 -04:00
|
|
|
s48_value s48_init_db(void)
|
|
|
|
{
|
|
|
|
S48_EXPORT_FUNCTION(df_db_open);
|
|
|
|
|
|
|
|
return S48_UNSPECIFIC;
|
|
|
|
}
|