scsh-0.5/scsh/db.c

30 lines
770 B
C
Raw Permalink Normal View History

1995-10-13 23:34:21 -04:00
/* This is an Scheme48/C interface file,
** automatically generated by cig.
*/
#include <errno.h>
1995-10-13 23:34:21 -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"
#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;
}