Commit | Line | Data |
---|---|---|
0f2d19dd JB |
1 | /* classes: h_files */ |
2 | ||
0527e687 DH |
3 | #ifndef SCM_READ_H |
4 | #define SCM_READ_H | |
5 | ||
6 | /* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. | |
7 | * | |
73be1d9e MV |
8 | * This library is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU Lesser General Public | |
10 | * License as published by the Free Software Foundation; either | |
11 | * version 2.1 of the License, or (at your option) any later version. | |
0527e687 | 12 | * |
73be1d9e | 13 | * This library is distributed in the hope that it will be useful, |
0f2d19dd | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
73be1d9e MV |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 | * Lesser General Public License for more details. | |
0527e687 | 17 | * |
73be1d9e MV |
18 | * You should have received a copy of the GNU Lesser General Public |
19 | * License along with this library; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | */ | |
0527e687 | 22 | |
0f2d19dd JB |
23 | \f |
24 | ||
b4309c3c | 25 | #include "libguile/__scm.h" |
0f2d19dd | 26 | |
e56ea0ba | 27 | #include "libguile/options.h" |
0f2d19dd JB |
28 | \f |
29 | ||
30 | /* SCM_LINE_INCREMENTORS are the characters which cause the line count to | |
31 | * be incremented for the purposes of error reporting. This feature | |
32 | * is only used for scheme code loaded from files. | |
33 | * | |
34 | * SCM_WHITE_SPACES are other characters which should be treated like spaces | |
35 | * in programs. | |
36 | */ | |
37 | ||
38 | #define SCM_LINE_INCREMENTORS '\n' | |
39 | ||
40 | #ifdef MSDOS | |
41 | # define SCM_SINGLE_SPACES ' ':case '\r':case '\f': case 26 | |
42 | #else | |
43 | # define SCM_SINGLE_SPACES ' ':case '\r':case '\f' | |
44 | #endif | |
45 | ||
46 | #define SCM_WHITE_SPACES SCM_SINGLE_SPACES: case '\t' | |
47 | ||
33b001fd | 48 | SCM_API scm_t_option scm_read_opts[]; |
ba99801a | 49 | |
b7ff98dd MD |
50 | #define SCM_COPY_SOURCE_P scm_read_opts[0].val |
51 | #define SCM_RECORD_POSITIONS_P scm_read_opts[1].val | |
deca31e1 | 52 | #define SCM_CASE_INSENSITIVE_P scm_read_opts[2].val |
995685aa | 53 | #define SCM_KEYWORD_STYLE scm_read_opts[3].val |
16353acc NJ |
54 | #if SCM_ENABLE_ELISP |
55 | #define SCM_ELISP_VECTORS_P scm_read_opts[4].val | |
56 | #define SCM_ESCAPED_PARENS_P scm_read_opts[5].val | |
57 | #define SCM_N_READ_OPTIONS 6 | |
58 | #else | |
c7733771 | 59 | #define SCM_N_READ_OPTIONS 4 |
16353acc | 60 | #endif |
ba99801a | 61 | |
0f2d19dd JB |
62 | \f |
63 | ||
5bf6a6f0 DH |
64 | SCM_API SCM scm_sym_dot; |
65 | ||
33b001fd MV |
66 | SCM_API SCM scm_read_options (SCM setting); |
67 | SCM_API SCM scm_read (SCM port); | |
68 | SCM_API char * scm_grow_tok_buf (SCM * tok_buf); | |
69 | SCM_API int scm_flush_ws (SCM port, const char *eoferr); | |
70 | SCM_API int scm_casei_streq (char * s1, char * s2); | |
71 | SCM_API SCM scm_lreadr (SCM * tok_buf, SCM port, SCM *copy); | |
72 | SCM_API size_t scm_read_token (int ic, SCM * tok_buf, SCM port, int weird); | |
33b001fd MV |
73 | SCM_API SCM scm_lreadrecparen (SCM * tok_buf, SCM port, char *name, SCM *copy); |
74 | SCM_API SCM scm_read_hash_extend (SCM chr, SCM proc); | |
75 | SCM_API void scm_init_read (void); | |
0f2d19dd | 76 | |
0527e687 | 77 | #endif /* SCM_READ_H */ |
89e00824 ML |
78 | |
79 | /* | |
80 | Local Variables: | |
81 | c-file-style: "gnu" | |
82 | End: | |
83 | */ |