r6rs-ports.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef SCM_R6RS_PORTS_H
  2. #define SCM_R6RS_PORTS_H
  3. /* Copyright 2009-2011,2013,2018-2019,2023
  4. Free Software Foundation, Inc.
  5. This file is part of Guile.
  6. Guile is free software: you can redistribute it and/or modify it
  7. under the terms of the GNU Lesser General Public License as published
  8. by the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Guile is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  13. License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with Guile. If not, see
  16. <https://www.gnu.org/licenses/>. */
  17. #include "libguile/scm.h"
  18. /* R6RS I/O Ports. */
  19. SCM_API SCM scm_eof_object (void);
  20. SCM_API SCM scm_open_bytevector_input_port (SCM, SCM);
  21. SCM_API SCM scm_get_u8 (SCM);
  22. SCM_API SCM scm_lookahead_u8 (SCM);
  23. SCM_API SCM scm_get_bytevector_n (SCM, SCM);
  24. SCM_API SCM scm_get_bytevector_n_x (SCM, SCM, SCM, SCM);
  25. SCM_API SCM scm_get_bytevector_some (SCM);
  26. SCM_API SCM scm_get_bytevector_all (SCM);
  27. SCM_API SCM scm_put_u8 (SCM, SCM);
  28. SCM_API SCM scm_put_bytevector (SCM, SCM, SCM, SCM);
  29. SCM_API SCM scm_open_bytevector_output_port (SCM);
  30. SCM_API SCM scm_make_custom_binary_input_port (SCM, SCM, SCM, SCM, SCM);
  31. SCM_API SCM scm_make_custom_binary_output_port (SCM, SCM, SCM, SCM, SCM);
  32. SCM_API SCM scm_make_custom_binary_input_output_port (SCM, SCM, SCM,
  33. SCM, SCM, SCM);
  34. SCM_API SCM scm_get_string_n_x (SCM, SCM, SCM, SCM);
  35. SCM_API void scm_init_r6rs_ports (void);
  36. SCM_INTERNAL void scm_register_r6rs_ports (void);
  37. /* Guile extensions, not in R6RS. */
  38. SCM_API SCM scm_unget_bytevector (SCM, SCM, SCM, SCM);
  39. SCM_API SCM scm_get_bytevector_some_x (SCM, SCM, SCM, SCM);
  40. #endif /* SCM_R6RS_PORTS_H */