Commit | Line | Data |
---|---|---|
0359fc92 MD |
1 | /* classes: h_files */ |
2 | ||
3 | #ifndef COMPATH | |
4 | #define COMPATH | |
d3cf93bc | 5 | /* Copyright (C) 2001, 2002, 2006, 2008 Free Software Foundation, Inc. |
0359fc92 | 6 | * |
d3cf93bc NJ |
7 | * This library is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU Lesser General Public | |
9 | * License as published by the Free Software Foundation; either | |
10 | * version 2.1 of the License, or (at your option) any later version. | |
0359fc92 | 11 | * |
d3cf93bc NJ |
12 | * This library is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * Lesser General Public License for more details. | |
0359fc92 | 16 | * |
d3cf93bc NJ |
17 | * You should have received a copy of the GNU Lesser General Public |
18 | * License along with this library; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | */ | |
0359fc92 MD |
21 | \f |
22 | ||
23 | #ifndef SCM_GC8MARKP | |
24 | # define SCM_GC8MARKP(X) SCM_GC_MARK_P(X) | |
25 | # define SCM_SETGC8MARK(X) SCM_SET_GC_MARK(X) | |
26 | #endif | |
27 | ||
28 | #ifndef SCM_GC_MARK_P | |
29 | # define SCM_GC_MARK_P(X) SCM_GCMARKP(X) | |
30 | # define SCM_SET_GC_MARK(X) SCM_SETGCMARK(X) | |
31 | #endif | |
32 | ||
33 | #ifndef SCM_ARRAY_FLAG_CONTIGUOUS | |
34 | # define SCM_ARRAY_FLAG_CONTIGUOUS SCM_ARRAY_CONTIGUOUS | |
35 | #endif | |
36 | ||
37 | #ifndef HAVE_SCM_T_BITS | |
38 | typedef scm_bits_t scm_t_bits; | |
39 | typedef scm_array scm_t_array; | |
40 | typedef scm_array_dim scm_t_array_dim; | |
41 | typedef scm_mutex_t scm_t_mutex; | |
42 | typedef scm_cond_t scm_t_cond; | |
43 | typedef scm_key_t scm_t_key; | |
44 | typedef scm_catch_body_t scm_t_catch_body; | |
45 | typedef scm_catch_handler_t scm_t_catch_handler; | |
46 | typedef scm_rstate scm_t_rstate; | |
47 | typedef scm_port scm_t_port; | |
48 | typedef scm_fport scm_t_fport; | |
49 | #endif | |
50 | ||
51 | #ifndef SCM_VALIDATE_DOUBLE_COPY | |
52 | #define SCM_VALIDATE_DOUBLE_COPY SCM_VALIDATE_NUMBER_COPY | |
53 | #endif | |
54 | ||
55 | #ifndef HAVE_SCM_C_DEFINE_MODULE | |
56 | #define scm_c_define_module(NAME,INIT,DATA) \ | |
57 | scm_make_module (scm_read_0str ("(" NAME ")")) | |
58 | #endif | |
59 | ||
60 | #ifndef SCM_MAKE_CHAR | |
61 | #define SCM_MAKE_CHAR SCM_MAKICHR | |
62 | #define SCM_CHAR SCM_ICHR | |
63 | #define SCM_CHARP SCM_ICHRP | |
64 | #endif | |
65 | ||
66 | #ifndef SCM_ROSTRINGP | |
67 | #define SCM_ROSTRINGP(x) (SCM_STRINGP (x) || SCM_SYMBOLP (x)) | |
68 | #define SCM_RWSTRINGP(x) SCM_STRINGP (x) | |
69 | #define SCM_ROCHARS(x) \ | |
70 | (SCM_STRINGP (x) ? SCM_STRING_CHARS (x) : SCM_SYMBOL_CHARS (x)) | |
71 | #define SCM_ROLENGTH(x) \ | |
72 | (SCM_STRINGP (x) ? SCM_STRING_LENGTH (x) : SCM_SYMBOL_LENGTH (x)) | |
73 | #endif | |
74 | ||
75 | #ifndef SCM_STRING_COERCE_0TERMINATION_X | |
76 | #ifdef SCM_COERCE_SUBSTR | |
77 | #define SCM_STRING_COERCE_0TERMINATION_X SCM_COERCE_SUBSTR | |
78 | #else | |
79 | #define SCM_STRING_COERCE_0TERMINATION_X(x) (x) | |
80 | #endif | |
81 | #endif | |
82 | ||
83 | #ifndef HAVE_SCM_C_READ_STRING | |
84 | #define scm_c_read_string scm_read_0str | |
85 | #define scm_c_eval_string scm_eval_0str | |
86 | #define scm_str2symbol(X) SCM_CAR (scm_intern0 (X)) | |
87 | #define scm_mem2string(X, Y) scm_makfromstr ((X), (Y), 0) | |
88 | #endif | |
89 | ||
90 | #ifndef HAVE_SCM_MAKE_REAL | |
91 | #define scm_make_real(X) scm_makdbl ((X), 0.0) | |
92 | #endif | |
93 | ||
94 | #ifdef HAVE_SCM_NUM2DOUBLE | |
95 | #define scm_real2double scm_num2double | |
96 | #define SCM_REAL2DOUBLE SCM_NUM2DOUBLE | |
97 | #else | |
98 | #define scm_real2double(X, POS, WHERE) scm_num2dbl ((X), (WHERE)) | |
99 | #define SCM_REAL2DOUBLE(X, POS) scm_num2dbl ((X), FUNC_NAME) | |
100 | #endif | |
101 | ||
102 | #ifndef SCM_VALIDATE_DOUBLE_DEF_COPY | |
103 | #define SCM_VALIDATE_DOUBLE_DEF_COPY SCM_VALIDATE_NUMBER_DEF_COPY | |
104 | #endif | |
105 | ||
106 | #ifndef HAVE_SCM_GC_PROTECT_OBJECT | |
107 | #define scm_gc_protect_object scm_protect_object | |
108 | #endif | |
109 | ||
110 | #ifndef HAVE_SCM_C_DEFINE_GSUBR | |
111 | #define scm_c_define_gsubr scm_make_gsubr | |
112 | #endif | |
113 | ||
114 | #ifndef SCM_STRING_CHARS | |
115 | #define SCM_STRING_CHARS SCM_CHARS | |
116 | #define SCM_STRING_UCHARS SCM_UCHARS | |
117 | #define SCM_STRING_LENGTH SCM_LENGTH | |
118 | #endif | |
119 | ||
120 | #ifndef SCM_SUBSTRP | |
121 | #define SCM_SUBSTRP(X) 0 | |
122 | #endif | |
123 | ||
124 | #ifndef SCM_VECTOR_LENGTH | |
125 | #define SCM_VECTOR_LENGTH SCM_LENGTH | |
126 | #define SCM_UVECTOR_LENGTH SCM_LENGTH | |
127 | #endif | |
128 | ||
129 | #ifndef SCM_SET_VECTOR_LENGTH | |
130 | #define SCM_SET_VECTOR_LENGTH SCM_SETLENGTH | |
131 | #define SCM_SET_UVECTOR_LENGTH SCM_SETLENGTH | |
132 | #endif | |
133 | ||
134 | #ifndef SCM_VECTOR_BASE | |
135 | #define SCM_VECTOR_BASE SCM_CHARS | |
136 | #define SCM_UVECTOR_BASE SCM_CHARS | |
137 | #endif | |
138 | ||
139 | #ifndef SCM_SET_VECTOR_BASE | |
140 | #define SCM_SET_VECTOR_BASE SCM_SETCHARS | |
141 | #define SCM_SET_UVECTOR_BASE SCM_SETCHARS | |
142 | #endif | |
143 | ||
144 | #ifndef SCM_UVECTOR_MAX_LENGTH | |
145 | #define SCM_UVECTOR_MAX_LENGTH SCM_LENGTH_MAX | |
146 | #endif | |
147 | ||
148 | #ifndef HAVE_SCM_LIST_1 | |
149 | #define scm_list_1 SCM_LIST1 | |
150 | #define scm_list_2 SCM_LIST2 | |
151 | #define scm_list_3 SCM_LIST3 | |
152 | #define scm_list_4 SCM_LIST4 | |
153 | #define scm_list_5 SCM_LIST5 | |
154 | #define scm_list_n scm_listify | |
155 | #endif | |
156 | ||
157 | #ifndef SCM_SYMBOL_CHARS | |
158 | #define SCM_SYMBOL_CHARS SCM_CHARS | |
159 | #endif | |
160 | ||
161 | #endif /* COMPATH */ |