(scm_makstr, scm_makfromstr, scm_variable_set_name_hint,
[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 #define scm_substring_move_left_x scm_substring_move_x
31 #define scm_substring_move_right_x scm_substring_move_x
32
33 typedef long long long_long;
34 typedef unsigned long long ulong_long;
35
36 #define scm_sizet size_t
37
38 SCM_API SCM scm_wta (SCM arg, const char *pos, const char *s_subr);
39
40 #define SCM_WNA 8
41 #define SCM_OUTOFRANGE 10
42 #define SCM_NALLOC 11
43
44 SCM_API void scm_register_module_xxx (char *module_name, void *init_func);
45 SCM_API SCM scm_registered_modules (void);
46 SCM_API SCM scm_clear_registered_modules (void);
47
48 SCM_API SCM scm_protect_object (SCM obj);
49 SCM_API SCM scm_unprotect_object (SCM obj);
50
51 #define SCM_SETAND_CAR(x, y) \
52 (SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) & (y))))
53 #define SCM_SETOR_CAR(x, y)\
54 (SCM_SETCAR ((x), SCM_PACK (SCM_UNPACK (SCM_CAR (x)) | (y))))
55 #define SCM_SETAND_CDR(x, y)\
56 (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) & (y))))
57 #define SCM_SETOR_CDR(x, y)\
58 (SCM_SETCDR ((x), SCM_PACK (SCM_UNPACK (SCM_CDR (x)) | (y))))
59 #define SCM_FREEP(x) (SCM_FREE_CELL_P (x))
60 #define SCM_NFREEP(x) (!SCM_FREE_CELL_P (x))
61 #define SCM_GC8MARKP(x) SCM_GC_MARK_P (x)
62 #define SCM_SETGC8MARK(x) SCM_SET_GC_MARK (x)
63 #define SCM_CLRGC8MARK(x) SCM_CLEAR_GC_MARK (x)
64 #define SCM_GCTYP16(x) SCM_TYP16 (x)
65 #define SCM_GCCDR(x) SCM_CDR (x)
66 SCM_API void scm_remember (SCM * ptr);
67
68 SCM_API SCM scm_the_root_module (void);
69 SCM_API SCM scm_make_module (SCM name);
70 SCM_API SCM scm_ensure_user_module (SCM name);
71 SCM_API SCM scm_load_scheme_module (SCM name);
72
73 #define scm_port scm_t_port
74 #define scm_ptob_descriptor scm_t_ptob_descriptor
75 #define scm_port_rw_active scm_t_port_rw_active
76
77 SCM_API SCM scm_close_all_ports_except (SCM ports);
78
79 #define scm_rstate scm_t_rstate
80 #define scm_rng scm_t_rng
81
82 #define SCM_SLOPPY_CONSP(x) ((1 & SCM_CELL_TYPE (x)) == 0)
83 #define SCM_SLOPPY_NCONSP(x) (!SCM_SLOPPY_CONSP(x))
84
85 #define scm_tc7_ssymbol scm_tc7_symbol
86 #define scm_tc7_msymbol scm_tc7_symbol
87 #define scm_tcs_symbols scm_tc7_symbol
88
89 SCM_API SCM scm_makstr (size_t len, int);
90 SCM_API SCM scm_makfromstr (const char *src, size_t len, int);
91
92 SCM_API SCM scm_variable_set_name_hint (SCM var, SCM hint);
93 SCM_API SCM scm_builtin_variable (SCM name);
94
95 SCM_API SCM scm_internal_with_fluids (SCM fluids, SCM vals,
96 SCM (*cproc)(void *), void *cdata);
97
98 SCM_API SCM scm_make_gsubr (const char *name, int req, int opt, int rst,
99 SCM (*fcn)());
100 SCM_API SCM scm_make_gsubr_with_generic (const char *name,
101 int req,
102 int opt,
103 int rst,
104 SCM (*fcn)(),
105 SCM *gf);
106
107 extern SCM scm_create_hook (const char* name, int n_args);
108
109 #define SCM_LIST0 SCM_EOL
110 #define SCM_LIST1(e0) scm_cons ((e0), SCM_EOL)
111 #define SCM_LIST2(e0, e1) scm_cons2 ((e0), (e1), SCM_EOL)
112 #define SCM_LIST3(e0, e1, e2) scm_cons ((e0), SCM_LIST2 ((e1), (e2)))
113 #define SCM_LIST4(e0, e1, e2, e3)\
114 scm_cons2 ((e0), (e1), SCM_LIST2 ((e2), (e3)))
115 #define SCM_LIST5(e0, e1, e2, e3, e4)\
116 scm_cons ((e0), SCM_LIST4 ((e1), (e2), (e3), (e4)))
117 #define SCM_LIST6(e0, e1, e2, e3, e4, e5)\
118 scm_cons2 ((e0), (e1), SCM_LIST4 ((e2), (e3), (e4), (e5)))
119 #define SCM_LIST7(e0, e1, e2, e3, e4, e5, e6)\
120 scm_cons ((e0), SCM_LIST6 ((e1), (e2), (e3), (e4), (e5), (e6)))
121 #define SCM_LIST8(e0, e1, e2, e3, e4, e5, e6, e7)\
122 scm_cons2 ((e0), (e1), SCM_LIST6 ((e2), (e3), (e4), (e5), (e6), (e7)))
123 #define SCM_LIST9(e0, e1, e2, e3, e4, e5, e6, e7, e8)\
124 scm_cons ((e0),\
125 SCM_LIST8 ((e1), (e2), (e3), (e4), (e5), (e6), (e7), (e8)))
126
127 #define scm_listify scm_list_n
128
129 SCM_API SCM scm_sloppy_memq (SCM x, SCM lst);
130 SCM_API SCM scm_sloppy_memv (SCM x, SCM lst);
131 SCM_API SCM scm_sloppy_member (SCM x, SCM lst);
132
133 SCM_API SCM scm_read_and_eval_x (SCM port);
134
135 void scm_i_init_deprecated (void);
136
137 #endif
138
139 #endif /* SCM_DEPRECATED_H */
140
141 #if 0
142 /* TODO */
143
144 scm_mkbig
145 scm_big2inum
146 scm_adjbig
147 scm_normbig
148
149 scm_copybig
150 scm_2ulong2big
151 scm_dbl2big
152 scm_big2dbl
153 SCM_FIXNUM_BIT
154
155 scm_subr_entry
156 SCM_SUBR_DOC
157 scm_make_subr_opt
158 scm_make_subr
159
160 scm_make_subr_with_generic
161
162 scm_call_catching_errors
163 scm_make_smob_type_mfpe
164 scm_set_smob_mfpe
165
166 scm_strprint_obj
167 scm_read_0str
168 scm_eval_0str
169 SCM_CHARS
170 SCM_UCHARS
171
172 SCM_SETCHARS
173 SCM_SLOPPY_SUBSTRP
174 SCM_SUBSTR_STR
175 SCM_SUBSTR_OFFSET
176
177 SCM_LENGTH_MAX
178 SCM_LENGTH
179 SCM_SETLENGTH
180 SCM_ROSTRINGP
181 SCM_ROLENGTH
182
183 SCM_ROCHARS
184 SCM_ROUCHARS
185 SCM_SUBSTRP
186 SCM_COERCE_SUBSTR
187 scm_strhash
188
189 scm_sym2vcell
190 scm_sym2ovcell_soft
191 scm_sym2ovcell
192
193 scm_intern_obarray_soft
194 scm_intern_obarray
195 scm_intern
196 scm_intern0
197
198 scm_sysintern
199 scm_sysintern0
200 scm_sysintern0_no_module_lookup
201
202 scm_symbol_value0
203 scm_string_to_obarray_symbol
204 scm_intern_symbol
205
206 scm_unintern_symbol
207 scm_symbol_binding
208 scm_symbol_interned_p
209
210 scm_symbol_bound_p
211 scm_symbol_set_x
212 scm_gentemp
213
214 scm_init_symbols_deprecated
215 scm_vector_set_length_x
216
217 SCM_OPDIRP
218
219 scm_fport
220 scm_option
221 SCM_CONST_LONG
222 SCM_VCELL
223 SCM_GLOBAL_VCELL
224
225 SCM_VCELL_INIT
226 SCM_GLOBAL_VCELL_INIT
227 scm_srcprops
228 scm_srcprops_chunk
229
230 scm_info_frame
231 scm_stack
232 scm_array
233 scm_array_dim
234 SCM_ARRAY_CONTIGUOUS
235
236 SCM_HUGE_LENGTH
237 SCM_FUNC_NAME
238 SCM_WTA
239 RETURN_SCM_WTA
240
241 SCM_VALIDATE_NUMBER_COPY
242 SCM_VALIDATE_NUMBER_DEF_COPY
243
244 SCM_VALIDATE_STRINGORSUBSTR
245 SCM_VALIDATE_ROSTRING
246
247 SCM_VALIDATE_ROSTRING_COPY
248 SCM_VALIDATE_NULLORROSTRING_COPY
249
250 SCM_VALIDATE_RWSTRING
251 SCM_VALIDATE_OPDIR
252 scm_small_istr2int
253
254 scm_istr2int
255 scm_istr2flo
256 scm_istring2number
257 scm_istr2int
258
259 scm_istr2flo
260 scm_istring2number
261 scm_vtable_index_vcell
262
263 SCM_ECONSP
264 SCM_NECONSP
265
266 scm_tc16_variable
267
268 #endif