sexp sexp_make_custom_output_port (sexp ctx, sexp self, sexp write, sexp seek, sexp close) { sexp res = sexp_make_custom_port(ctx, self, "w", SEXP_FALSE, write, seek, close); #if SEXP_USE_STRING_STREAMS if (!sexp_exceptionp(res)) sexp_pointer_tag(res) = SEXP_OPORT; #endif return res; }
sexp sexp_make_custom_input_port (sexp ctx, sexp self, sexp read, sexp seek, sexp close) { return sexp_make_custom_port(ctx, self, "r", read, SEXP_FALSE, seek, close); }
static sexp sexp_make_custom_output_port (sexp ctx, sexp self, sexp write, sexp seek, sexp close) { sexp res = sexp_make_custom_port(ctx, self, "w", SEXP_FALSE, write, seek, close); sexp_pointer_tag(res) = SEXP_OPORT; return res; }