mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-22 07:09:18 +02:00
adding port-fold-case?
This commit is contained in:
parent
60aefea1f8
commit
769ef4725d
3 changed files with 6 additions and 0 deletions
|
@ -1167,6 +1167,7 @@ SEXP_API sexp sexp_make_output_port (sexp ctx, FILE* out, sexp name);
|
|||
SEXP_API sexp sexp_port_binaryp_op (sexp ctx sexp_api_params(self, n), sexp port);
|
||||
SEXP_API sexp sexp_port_openp_op (sexp ctx sexp_api_params(self, n), sexp port);
|
||||
#if SEXP_USE_FOLD_CASE_SYMS
|
||||
SEXP_API sexp sexp_get_port_fold_case (sexp ctx sexp_api_params(self, n), sexp in);
|
||||
SEXP_API sexp sexp_set_port_fold_case (sexp ctx sexp_api_params(self, n), sexp in, sexp x);
|
||||
#endif
|
||||
SEXP_API sexp sexp_make_input_string_port_op (sexp ctx sexp_api_params(self, n), sexp str);
|
||||
|
|
|
@ -195,6 +195,7 @@ _FN3OPT(_I(SEXP_STRING), _I(SEXP_STRING), _I(SEXP_FIXNUM), _I(SEXP_FIXNUM), "sub
|
|||
_FN3OPT(_I(SEXP_STRING), _I(SEXP_STRING), _I(SEXP_FIXNUM), _I(SEXP_FIXNUM), "substring", SEXP_FALSE, sexp_substring_op),
|
||||
#endif
|
||||
#if SEXP_USE_FOLD_CASE_SYMS
|
||||
_FN1(SEXP_VOID, _I(SEXP_IPORT), "port-fold-case?", 0, sexp_get_port_fold_case),
|
||||
_FN2(SEXP_VOID, _I(SEXP_IPORT), _I(SEXP_BOOLEAN), "set-port-fold-case!", 0, sexp_set_port_fold_case),
|
||||
#endif
|
||||
#if SEXP_USE_TYPE_DEFS
|
||||
|
|
4
sexp.c
4
sexp.c
|
@ -1347,6 +1347,10 @@ sexp sexp_port_openp_op (sexp ctx sexp_api_params(self, n), sexp port) {
|
|||
}
|
||||
|
||||
#if SEXP_USE_FOLD_CASE_SYMS
|
||||
sexp sexp_get_port_fold_case (sexp ctx sexp_api_params(self, n), sexp in) {
|
||||
sexp_assert_type(ctx, sexp_iportp, SEXP_IPORT, in);
|
||||
return sexp_make_boolean(sexp_port_fold_casep(in));
|
||||
}
|
||||
sexp sexp_set_port_fold_case (sexp ctx sexp_api_params(self, n), sexp in, sexp x) {
|
||||
sexp_assert_type(ctx, sexp_iportp, SEXP_IPORT, in);
|
||||
sexp_assert_type(ctx, sexp_booleanp, SEXP_BOOLEAN, x);
|
||||
|
|
Loading…
Add table
Reference in a new issue