* __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
[bpt/guile.git] / libguile / deprecated.h
1 /* This file contains definitions for deprecated features. When you
2 deprecate something, move it here when that is feasible.
3 */
4
5 #ifndef SCM_DEPRECATED_H
6 #define SCM_DEPRECATED_H
7
8 /* Copyright (C) 2003 Free Software Foundation, Inc.
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25 #include "libguile/__scm.h"
26 #include "libguile/strings.h"
27
28 #if (SCM_ENABLE_DEPRECATED == 1)
29
30 /* From eval.h: Macros for handling ilocs. These were deprecated in guile
31 * 1.7.0 on 2003-06-04. */
32 #define SCM_ILOC00 SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
33 #define SCM_IDINC (0x00100000L)
34 #define SCM_IDSTMSK (-SCM_IDINC)
35
36
37 /* From eval.h: Error messages of the evaluator. These were deprecated in
38 * guile 1.7.0 on 2003-06-02. */
39 SCM_API const char scm_s_expression[];
40 SCM_API const char scm_s_test[];
41 SCM_API const char scm_s_body[];
42 SCM_API const char scm_s_bindings[];
43 SCM_API const char scm_s_variable[];
44 SCM_API const char scm_s_clauses[];
45 SCM_API const char scm_s_formals[];
46
47
48 /* From eval.h: Helper macros for evaluation and application. These were
49 * deprecated in guile 1.7.0 on 2003-06-02. */
50 #define SCM_EVALIM2(x) \
51 ((SCM_EQ_P ((x), SCM_EOL) \
52 ? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
53 : 0), \
54 (x))
55 #define SCM_EVALIM(x, env) (SCM_ILOCP (x) \
56 ? *scm_ilookup ((x), env) \
57 : SCM_EVALIM2(x))
58 #define SCM_XEVAL(x, env) (SCM_IMP (x) \
59 ? SCM_EVALIM2(x) \
60 : (*scm_ceval_ptr) ((x), (env)))
61 #define SCM_XEVALCAR(x, env) (SCM_IMP (SCM_CAR (x)) \
62 ? SCM_EVALIM (SCM_CAR (x), env) \
63 : (SCM_SYMBOLP (SCM_CAR (x)) \
64 ? *scm_lookupcar (x, env, 1) \
65 : (*scm_ceval_ptr) (SCM_CAR (x), env)))
66
67
68 #define scm_substring_move_left_x scm_substring_move_x
69 #define scm_substring_move_right_x scm_substring_move_x
70
71 typedef long long long_long;
72 typedef unsigned long long ulong_long;
73
74 #define scm_sizet size_t
75
76 SCM_API SCM scm_wta (SCM arg, const char *pos, const char *s_subr);
77
78 #define SCM_WNA 8
79 #define SCM_OUTOFRANGE 10
80 #define SCM_NALLOC 11
81
82 SCM_API void scm_register_module_xxx (char *module_name, void *init_func);
83 SCM_API SCM scm_registered_modules (void);
84 SCM_API SCM scm_clear_registered_modules (void);
85
86 SCM_API SCM scm_protect_object (SCM obj);
87 SCM_API SCM scm_unprotect_object (SCM obj);
88
89 #define SCM_SETAND_CAR(x, y) \
90 (SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) & (y))))
91 #define SCM_SETOR_CAR(x, y)\
92 (SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) | (y))))
93 #define SCM_SETAND_CDR(x, y)\
94 (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) & (y))))
95 #define SCM_SETOR_CDR(x, y)\
96 (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y))))
97 #define SCM_FREEP(x) (SCM_FREE_CELL_P (x))
98 #define SCM_NFREEP(x) (!SCM_FREE_CELL_P (x))
99 #define SCM_GC8MARKP(x) SCM_GC_MARK_P (x)
100 #define SCM_SETGC8MARK(x) SCM_SET_GC_MARK (x)
101 #define SCM_CLRGC8MARK(x) SCM_CLEAR_GC_MARK (x)
102 #define SCM_GCTYP16(x) SCM_TYP16 (x)
103 #define SCM_GCCDR(x) SCM_CDR (x)
104 SCM_API void scm_remember (SCM * ptr);
105
106 SCM_API SCM scm_the_root_module (void);
107 SCM_API SCM scm_make_module (SCM name);
108 SCM_API SCM scm_ensure_user_module (SCM name);
109 SCM_API SCM scm_load_scheme_module (SCM name);
110
111 #define scm_port scm_t_port
112 #define scm_ptob_descriptor scm_t_ptob_descriptor
113 #define scm_port_rw_active scm_t_port_rw_active
114
115 SCM_API SCM scm_close_all_ports_except (SCM ports);
116
117 #define scm_rstate scm_t_rstate
118 #define scm_rng scm_t_rng
119
120 #define SCM_SLOPPY_CONSP(x) ((1 & SCM_CELL_TYPE (x)) == 0)
121 #define SCM_SLOPPY_NCONSP(x) (!SCM_SLOPPY_CONSP(x))
122
123 #define scm_tc7_ssymbol scm_tc7_symbol
124 #define scm_tc7_msymbol scm_tc7_symbol
125 #define scm_tcs_symbols scm_tc7_symbol
126
127 SCM_API SCM scm_makstr (size_t len, int);
128 SCM_API SCM scm_makfromstr (const char *src, size_t len, int);
129
130 SCM_API SCM scm_variable_set_name_hint (SCM var, SCM hint);
131 SCM_API SCM scm_builtin_variable (SCM name);
132
133 SCM_API SCM scm_internal_with_fluids (SCM fluids, SCM vals,
134 SCM (*cproc)(void *), void *cdata);
135
136 SCM_API SCM scm_make_gsubr (const char *name, int req, int opt, int rst,
137 SCM (*fcn)());
138 SCM_API SCM scm_make_gsubr_with_generic (const char *name,
139 int req,
140 int opt,
141 int rst,
142 SCM (*fcn)(),
143 SCM *gf);
144
145 extern SCM scm_create_hook (const char* name, int n_args);
146
147 #define SCM_LIST0 SCM_EOL
148 #define SCM_LIST1(e0) scm_cons ((e0), SCM_EOL)
149 #define SCM_LIST2(e0, e1) scm_cons2 ((e0), (e1), SCM_EOL)
150 #define SCM_LIST3(e0, e1, e2) scm_cons ((e0), SCM_LIST2 ((e1), (e2)))
151 #define SCM_LIST4(e0, e1, e2, e3)\
152 scm_cons2 ((e0), (e1), SCM_LIST2 ((e2), (e3)))
153 #define SCM_LIST5(e0, e1, e2, e3, e4)\
154 scm_cons ((e0), SCM_LIST4 ((e1), (e2), (e3), (e4)))
155 #define SCM_LIST6(e0, e1, e2, e3, e4, e5)\
156 scm_cons2 ((e0), (e1), SCM_LIST4 ((e2), (e3), (e4), (e5)))
157 #define SCM_LIST7(e0, e1, e2, e3, e4, e5, e6)\
158 scm_cons ((e0), SCM_LIST6 ((e1), (e2), (e3), (e4), (e5), (e6)))
159 #define SCM_LIST8(e0, e1, e2, e3, e4, e5, e6, e7)\
160 scm_cons2 ((e0), (e1), SCM_LIST6 ((e2), (e3), (e4), (e5), (e6), (e7)))
161 #define SCM_LIST9(e0, e1, e2, e3, e4, e5, e6, e7, e8)\
162 scm_cons ((e0),\
163 SCM_LIST8 ((e1), (e2), (e3), (e4), (e5), (e6), (e7), (e8)))
164
165 #define scm_listify scm_list_n
166
167 SCM_API SCM scm_sloppy_memq (SCM x, SCM lst);
168 SCM_API SCM scm_sloppy_memv (SCM x, SCM lst);
169 SCM_API SCM scm_sloppy_member (SCM x, SCM lst);
170
171 SCM_API SCM scm_read_and_eval_x (SCM port);
172
173 #define scm_subr_entry scm_t_subr_entry
174
175 #define SCM_SUBR_DOC(x) SCM_BOOL_F
176
177 SCM_API SCM scm_make_subr (const char *name, int type, SCM (*fcn) ());
178 SCM_API SCM scm_make_subr_with_generic (const char *name,
179 int type,
180 SCM (*fcn) (),
181 SCM *gf);
182 SCM_API SCM scm_make_subr_opt (const char *name,
183 int type,
184 SCM (*fcn) (),
185 int set);
186
187 SCM_API SCM scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(),
188 void * closure);
189
190 SCM_API long scm_make_smob_type_mfpe (char *name, size_t size,
191 SCM (*mark) (SCM),
192 size_t (*free) (SCM),
193 int (*print) (SCM, SCM,
194 scm_print_state*),
195 SCM (*equalp) (SCM, SCM));
196
197 SCM_API void scm_set_smob_mfpe (long tc,
198 SCM (*mark) (SCM),
199 size_t (*free) (SCM),
200 int (*print) (SCM, SCM, scm_print_state*),
201 SCM (*equalp) (SCM, SCM));
202
203 SCM_API SCM scm_strprint_obj (SCM obj);
204 SCM_API SCM scm_read_0str (char *expr);
205 SCM_API SCM scm_eval_0str (const char *expr);
206
207 SCM_API char *scm_i_object_chars (SCM);
208
209 #define SCM_CHARS(x) scm_i_object_chars(x)
210 #define SCM_UCHARS(x) ((unsigned char *)SCM_CHARS(x))
211
212 SCM_API long scm_i_object_length (SCM);
213
214 #define SCM_LENGTH(x) scm_i_object_length(x)
215
216 void scm_i_init_deprecated (void);
217
218 #endif
219
220 #endif /* SCM_DEPRECATED_H */
221
222 #if 0
223 /* TODO */
224
225 scm_strhash
226
227 scm_sym2vcell
228 scm_sym2ovcell_soft
229 scm_sym2ovcell
230
231 scm_intern_obarray_soft
232 scm_intern_obarray
233 scm_intern
234 scm_intern0
235
236 scm_sysintern
237 scm_sysintern0
238 scm_sysintern0_no_module_lookup
239
240 scm_symbol_value0
241 scm_string_to_obarray_symbol
242 scm_intern_symbol
243
244 scm_unintern_symbol
245 scm_symbol_binding
246 scm_symbol_interned_p
247
248 scm_symbol_bound_p
249 scm_symbol_set_x
250 scm_gentemp
251
252 scm_init_symbols_deprecated
253 scm_vector_set_length_x
254
255 SCM_OPDIRP
256
257 scm_fport
258 scm_option
259 SCM_CONST_LONG
260 SCM_VCELL
261 SCM_GLOBAL_VCELL
262
263 SCM_VCELL_INIT
264 SCM_GLOBAL_VCELL_INIT
265 scm_srcprops
266 scm_srcprops_chunk
267
268 scm_info_frame
269 scm_stack
270 scm_array
271 scm_array_dim
272 SCM_ARRAY_CONTIGUOUS
273
274 SCM_HUGE_LENGTH
275 SCM_FUNC_NAME
276 SCM_WTA
277 RETURN_SCM_WTA
278
279 SCM_VALIDATE_NUMBER_COPY
280 SCM_VALIDATE_NUMBER_DEF_COPY
281
282 SCM_VALIDATE_STRINGORSUBSTR
283 SCM_VALIDATE_ROSTRING
284
285 SCM_VALIDATE_ROSTRING_COPY
286 SCM_VALIDATE_NULLORROSTRING_COPY
287
288 SCM_VALIDATE_RWSTRING
289 SCM_VALIDATE_OPDIR
290 scm_small_istr2int
291
292 scm_istr2int
293 scm_istr2flo
294 scm_istring2number
295 scm_istr2int
296
297 scm_istr2flo
298 scm_istring2number
299 scm_vtable_index_vcell
300
301 SCM_ECONSP
302 SCM_NECONSP
303
304 scm_tc16_variable
305
306 #endif