scsh-0.6/scsh/rdelim.c

42 lines
1.1 KiB
C
Raw Normal View History

/* 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>
/* Make sure foreign-function stubs interface to the C funs correctly: */
#include "fdports1.h"
scheme_value df_read_delim(long nargs, scheme_value *args)
{
extern scheme_value read_delim(const char *, char *, int , int , int , int *);
scheme_value ret1;
scheme_value r1;
int r2;
cig_check_nargs(6, nargs, "read_delim");
r1 = read_delim(cig_string_body(args[5]), cig_string_body(args[4]), EXTRACT_FIXNUM(args[3]), EXTRACT_FIXNUM(args[2]), EXTRACT_FIXNUM(args[1]), &r2);
ret1 = r1;
VECTOR_REF(*args,0) = ENTER_FIXNUM(r2);
return ret1;
}
scheme_value df_skip_chars(long nargs, scheme_value *args)
{
extern scheme_value skip_chars(const char *, int , int *);
scheme_value ret1;
scheme_value r1;
int r2;
cig_check_nargs(3, nargs, "skip_chars");
r1 = skip_chars(cig_string_body(args[2]), EXTRACT_FIXNUM(args[1]), &r2);
ret1 = r1;
VECTOR_REF(*args,0) = ENTER_FIXNUM(r2);
return ret1;
}