read.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef SCM_READ_H
  2. #define SCM_READ_H
  3. /* Copyright 1995-1996,2000,2006,2008-2009,2018,2021
  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/options.h"
  18. /* SCM_LINE_INCREMENTORS are the characters which cause the line count to
  19. * be incremented for the purposes of error reporting. This feature
  20. * is only used for scheme code loaded from files.
  21. *
  22. * SCM_WHITE_SPACES are other characters which should be treated like spaces
  23. * in programs.
  24. */
  25. #define SCM_LINE_INCREMENTORS '\n'
  26. #ifdef MSDOS
  27. # define SCM_SINGLE_SPACES ' ':case '\r':case '\f': case 26
  28. #else
  29. # define SCM_SINGLE_SPACES ' ':case '\r':case '\f'
  30. #endif
  31. #define SCM_WHITE_SPACES SCM_SINGLE_SPACES: case '\t'
  32. SCM_API SCM scm_sym_dot;
  33. SCM_INTERNAL SCM scm_primitive_read (SCM port);
  34. SCM_API SCM scm_read_options (SCM setting);
  35. SCM_API SCM scm_read (SCM port);
  36. SCM_API SCM scm_read_hash_extend (SCM chr, SCM proc);
  37. SCM_INTERNAL char *scm_i_scan_for_encoding (SCM port);
  38. SCM_API SCM scm_file_encoding (SCM port);
  39. SCM_INTERNAL void scm_i_input_error (const char *func, SCM port,
  40. const char *message, SCM arg)
  41. SCM_NORETURN;
  42. SCM_INTERNAL void scm_init_read (void);
  43. #endif /* SCM_READ_H */