read.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef SCM_READ_H
  2. #define SCM_READ_H
  3. /* Copyright 1995-1996,2000,2006,2008-2009,2018
  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_API SCM scm_read_options (SCM setting);
  34. SCM_API SCM scm_read (SCM port);
  35. SCM_API SCM scm_read_hash_extend (SCM chr, SCM proc);
  36. SCM_INTERNAL char *scm_i_scan_for_encoding (SCM port);
  37. SCM_API SCM scm_file_encoding (SCM port);
  38. SCM_INTERNAL void scm_i_input_error (const char *func, SCM port,
  39. const char *message, SCM arg)
  40. SCM_NORETURN;
  41. SCM_INTERNAL void scm_init_read (void);
  42. #endif /* SCM_READ_H */