31 lines
770 B
C
31 lines
770 B
C
/* This is an Scheme48/C interface file,
|
|
** automatically generated by cig.
|
|
*/
|
|
|
|
#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) ? ENTER_FIXNUM(errno) : SCHFALSE)
|
|
|
|
scheme_value df_db_open(long nargs, scheme_value *args)
|
|
{
|
|
extern int db_open(const char *, int , int , int , DB** *);
|
|
scheme_value ret1;
|
|
int r1;
|
|
DB** r2;
|
|
|
|
cig_check_nargs(5, nargs, "db_open");
|
|
r1 = db_open(cig_string_body(args[4]), EXTRACT_FIXNUM(args[3]), EXTRACT_FIXNUM(args[2]), EXTRACT_FIXNUM(args[1]), &r2);
|
|
ret1 = errno_or_false(r1);
|
|
AlienVal(VECTOR_REF(*args,0)) = (long) r2;
|
|
return ret1;
|
|
}
|
|
|