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