Пример #1
0
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;
}
Пример #2
0
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);
}
Пример #3
0
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;
}