*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2
3 * environments.c (obarray_enter, obarray_replace): Call
4 SCM_HASHTABLE_INCREMENT when adding a new entry.
5
6 * objects.c: Include goops.h for the scm_class_of prototype.
7
8 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
9 sizes to be smaller than the maximum lengths of vectors.
10
11 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12
13 * ports.c, smob.c: Include "libguile/goops.h".
14
15 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
16 scm_class_char, scm_class_pair, scm_class_procedure,
17 scm_class_string, scm_class_symbol,
18 scm_class_procedure_with_setter, scm_class_primitive_generic,
19 scm_class_vector, scm_class_null, scm_class_real,
20 scm_class_complex, scm_class_integer, scm_class_fraction,
21 scm_class_unknown, scm_port_class, scm_smob_class,
22 scm_no_applicable_method, scm_class_of): Moved from objects to
23 goops since they are only useable once goops has been loaded.
24 (scm_classes_initialized): Removed.
25 (scm_class_of): Do not check it.
26 (create_standard_classes): Do not set it.
27
28 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
29
30 * objects.h, objects.c (scm_classes_initialized): New.
31 (scm_class_of): Signal error when scm_classes_initialized is zero.
32 * goops.c (create_standard_classes): Set scm_classes_initialized
33 to one.
34
35 * random.c (scm_random_solid_sphere_x): Use
36 scm_c_generalized_vector_length instead of
37 scm_uniform_vector_length.
38
39 2005-01-16 Marius Vollmer <mvo@zagadka.de>
40
41 * script.c (scm_compile_shell_switches): Removed debugging output.
42
43 2005-01-15 Kevin Ryde <user42@zip.com.au>
44
45 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
46 docstrings from manual.
47 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
48
49 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
50
51 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
52 its value.
53
54 Implement u64 and s64 uniform numeric vectors with bignums when
55 scm_t_uint64 and scm_t_int64 are not available.
56
57 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
58 scm_array_handle_u64_elements,
59 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
60 scm_u64vector_writable_elements): Do not define when scm_t_uint64
61 is not available.
62 (scm_take_s64vector, scm_array_handle_s64_elements,
63 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
64 scm_s64vector_writable_elements): Likewise for scm_t_int64.
65 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
66 scm_t_int64/scm_t_uint64 are not available.
67 (uvec_mark): New, to mark the bignums.
68 (alloc_uvec): Initialize bignums.
69 (uvec_fast_ref): Return bignums directly.
70 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
71 assert_exact_integer): New.
72 (uvec_fast_set): Use them to validate the bignums.
73 (scm_init_srfi_4): Set mark function of smob when needed.
74 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
75 scm_int64_max.
76
77 Recognize 1.4 -e syntax.
78
79 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
80 (scm_compile_shell_switches): Use them to recognize and convert
81 1.4 "-e" syntax.
82
83 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
84
85 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
86 deprecated features that once were macros but are now functions
87 back into macros.
88
89 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
90
91 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
92 * deprecation.c (scm_issue_deprecation_warning,
93 scm_c_issue_deprecation_warning_fmt): Use it.
94 (mode): Removed.
95 (print_summary): New.
96 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
97 mode.
98
99 Deprecated SCM_ARRAY* macros.
100
101 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
102 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
103 version. Changed all uses.
104 (scm_tc16_array, scm_i_tc16_array,
105 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
106 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
107 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
108 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
109 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
110 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
111 SCM_ARRAY_V, SCM_I_ARRAY_V,
112 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
113 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
114 scm_t_array, scm_i_t_array): Likewise.
115 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
116 Moved from unif.h to unif.c.
117 (scm_c_array_rank): New.
118 (scm_array_rank): Reimplement using it.
119
120 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
121 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
122 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
123
124 2005-01-11 Marius Vollmer <mvo@zagadka.de>
125
126 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
127 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
128 scm_c_generalized_vector_ref and scm_cvref, and
129 scm_c_generalized_vector_set_x, respectively.
130 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
131 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
132
133 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
134 former to latter and made public. Changed all uses.
135 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
136 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
137 (scm_i_shap2ra): New internal version of scm_shap2ra.
138 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
139 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
140 (scm_ra_set_contp): Deprecated, changed all uses to
141 scm_i_ra_set_contp.
142 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
143
144 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
145
146 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
147 Trotts!
148
149 * unif.c (scm_list_to_typed_array): Allow the specification of the
150 upper bound as well. This is needed for empty arrays.
151 (l2ra): Give needed number of elements in error message.
152 (scm_i_print_array): Print length information for arrays that need
153 it.
154 (scm_i_read_array): Parse it.
155
156 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
157 scm_i_object_chars, scm_i_object_length): Brought back from the
158 dead.
159
160 2005-01-10 Marius Vollmer <mvo@zagadka.de>
161
162 * ramap.c: Replaced single-index uses of scm_array_set_x with
163 scm_c_generalized_vector_set_x.
164
165 * unif.c (scm_array_rank, scm_array_dimensions,
166 scm_shared_array_offset, scm_shared_array_increments,
167 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
168 to simplify code and make it more general.
169 (scm_shared_array_root): Work with all kinds of arrays, including
170 naked vectors.
171 (indices_to_pos): New.
172 (scm_make_shared_array): Use it instead of scm_aind; use handle
173 for oldra.
174
175 2005-01-10 Kevin Ryde <user42@zip.com.au>
176
177 * posix.c (scm_mkstemp): Update docstring from manual.
178
179 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
180
181 2005-01-09 Marius Vollmer <mvo@zagadka.de>
182
183 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
184 scm_i_uniform_vector_set_proc): New.
185 (u8ref, u8set, s8ref, s8set, etc): New.
186 (uvec_reffers, uvec_setters): New.
187 (uvec_to_list): Use generic scm_array_handle_ref instead of
188 uvec_fast_ref since scm_array_handle_ref should be faster now.
189 (coerce_to_uvec, scm_c_uniform_vector_ref,
190 scm_c_uniform_vector_set_x): Likewise.
191
192 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
193 New.
194 (scm_t_array_handle): Added ref, set, elements and
195 writable_elements for fast inline operation of
196 scm_array_handle_ref and scm_array_handle_set.
197 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
198 and replaced with inline code that simply calls the ref/set
199 members of the handle.
200 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
201 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
202 New.
203 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
204 and memoize_set.
205 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
206 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
207 scm_bit_invert_x): Correctly multiply index with increment in the
208 general case.
209
210 * unif.c (scm_array_handle_set): Correctly execute only one
211 alternative. D'Oh!
212 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
213 the array; this covers all cases with much simpler code.
214
215 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
216 as well.
217
218 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
219
220 * srfi-4.c (uvec_type): New.
221 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
222 scm_c_uniform_vector_x): Use it to get concrete type.
223
224 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
225 fit the docs.
226
227 * unif.c (ra2l): Handle zero rank arrays.
228 (scm_i_print_array): Print zero rank arrays specially.
229 (tag_to_type): Return #t for an empty tag, not the empty symbol.
230 (scm_i_read_array): Allow zero rank arrays.
231
232 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
233
234 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
235 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
236 and SCM_SET_HASHTAB_BUCKET.
237
238 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
239 Removed ref_stack field.
240 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
241 of a print state. Use them everywhere instead of ref_stack.
242
243 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
244
245 * srfi-4.c: Include deprecation.h.
246
247 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
248 deprecated.c, eq.c
249 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
250 (scm_vector_elements, scm_vector_writable_elements,
251 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
252 unif.[hc].
253 (SCM_SIMPLE_VECTOR_LOC): Removed.
254 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
255 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
256 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
257 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
258 latter. Changed use in eq.c.
259
260 2005-01-07 Marius Vollmer <mvo@zagadka.de>
261
262 Make the uniform vector routines also deal with one dimensional
263 arrays.
264
265 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
266 SCM_SMOB_PREDICATE in this file.
267 (is_uvec): Also recognize one-dimensional uniform numeric arrays
268 of the right type.
269 (scm_is_uniform_vector): Likewise.
270 (uvec_fast_ref): Made BASE param const.
271 (uvec_writable_elements, uvec_elements): New.
272 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
273 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
274 scm_c_uniform_set_x): Use them to also deal with one-dimensional
275 arrays.
276 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
277 argument convention.
278 (scm_uniform_vector_to_list): Let uvec_to_list do all the
279 checking.
280 (scm_uniform_vector_length): Use uvec_length.
281
282 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
283
284 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
285 scm_c_uniform_vector_size): Removed.
286 (scm_array_handle_uniform_element_size): New.
287
288
289 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
290 type of POS parameter to be signed, positions can be negative.
291 (scm_array_handle_release): New, changed all uses of
292 scm_t_array_handle to properly call it.
293 (scm_vector_get_handle, scm_generalized_vector_get_handle):
294 Renamed former to latter, changed all uses.
295
296 2005-01-05 Marius Vollmer <mvo@zagadka.de>
297
298 Updated bitvector routines to also use scm_t_array_handles.
299
300 * unif.h (scm_bitvector_elements,
301 scm_bitvector_writable_elements): Use a scm_t_array_handle and
302 deliver offset, length and increment to caller. Changed all uses.
303 (scm_bitvector_release_elements,
304 scm_frame_bitvector_release_elements,
305 scm_bitvector_release_writable_elements,
306 scm_frame_bitvector_release_writable_elements): Removed.
307 (scm_array_handle_bit_elements,
308 scm_array_handle_bit_writable_elements,
309 scm_array_handle_bit_elements_offset): New.
310 (scm_make_typed_array): The special value for non-initialized
311 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
312 was a valid value to fill bitvectors with, so it can't really be
313 specialed out.
314
315 2005-01-04 Kevin Ryde <user42@zip.com.au>
316
317 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
318 Reported by Bill Schottstaedt.
319
320 2005-01-02 Marius Vollmer <mvo@zagadka.de>
321
322 * sort.c (quicksort): Added INC parameter for non-contigous
323 vectors.
324 (quicksort1): New, for contigous vectors. Both functions are
325 generated from the same code by including "quicksort.i.c".
326 (scm_restricted_vector_sort_x): Call one of quicksort and
327 quicksort1, depending on increment of vector.
328 (scm_sort): Simply call scm_sort_x on a copy of the list or
329 vector.
330 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
331 size_t, added inc parameter.
332 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
333 so that it doesn't leak.
334 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
335 list or vector.
336
337 * ramap.c (scm_array_map_x): Do not try to convert fill value
338 before filling, any necessary conversion is done while storing.
339
340 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
341 doing it inline.
342
343 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
344 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
345 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
346
347 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
348 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
349 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
350 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
351 objects.c, ports.c, posix.c, print.c, random.c, read.c,
352 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
353 vector elements API or simple vector API, as appropriate. Removed
354 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
355 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
356
357 * srfi-4.h, srfi-4.c,
358 srfi-4.i.c (scm_array_handle_uniform_elements,
359 scm_array_handle_uniform_writable_elements,
360 scm_uniform_vector_elements,
361 scm_uniform_vector_writable_elements):
362 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
363 scm_t_array_handle, deliver length and increment.
364 (scm_array_handle_<foo>_elements,
365 scm_array_handle_<foo>_writable_elements): New.
366
367 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
368 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
369
370 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
371 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
372 scm_array_handle_set, scm_array_handle_elements
373 scm_array_handle_writable_elements, scm_vector_get_handle): New.
374 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
375 scm_dimensions_to_uniform_array): Deprecated for real.
376 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
377 snarfing wont allow a mismatch between C and Scheme arglists.
378 (scm_make_shared_array, scm_enclose_array): Correctly use
379 scm_c_generalized_vector_length instead of
380 scm_uniform_vector_length.
381
382 * validate.h (SCM_VALIDATE_VECTOR,
383 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
384 of SCM_VECTORP.
385
386 * weaks.h, weaks.c: Use new internal weak vector API from
387 vectors.h.
388
389 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
390 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
391 'extra' to being regular sources.
392 (noinst_HEADERS): Added quicksort.i.c.
393 * quicksort.i.c: New file.
394
395 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
396 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
397 and reimplemented. Replaced all uses with scm_vector_elements,
398 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
399 appropriate.
400 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
401 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
402 SCM_SIMPLE_VECTOR_LOC): New.
403 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
404 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
405 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
406 Removed.
407 (scm_vector_copy): New.
408 (scm_vector_elements, scm_vector_writable_elements): Use
409 scm_t_array_handle, deliver length and increment. Moved to
410 unif.h. Changed all uses.
411 (scm_vector_release_elements,
412 scm_vector_release_writable_elements,
413 (scm_frame_vector_release_elements,
414 scm_frame_vector_release_writable_elements): Removed.
415 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
416 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
417 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
418 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
419 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
420 weak vectors.
421
422 2004-12-29 Marius Vollmer <mvo@zagadka.de>
423
424 No longer use creators to specify the type of an array. Creators
425 expose the fact that arrays are wrapped around vectors, but that
426 might change.
427
428 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
429 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
430 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
431 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
432 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
433 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
434 uvec_proc_vars): Removed.
435 (scm_i_generalized_vector_creator): Removed.
436 (scm_i_generalized_vector_type): New.
437
438 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
439 scm_make_typed_array, scm_array_type, scm_list_to_array,
440 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
441 (scm_array_creator): Removed.
442 (scm_array_p): Deprecated second PROT argument.
443 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
444 Deprecated, reimplemented in terms of scm_make_typed_array and
445 scm_list_to_typed_array.
446 (scm_i_proc_make_vector, scm_i_proc_make_string,
447 scm_i_proc_make_bitvector): Removed.
448 (type_creator_table, init_type_creator_table, type_to_creator,
449 make_typed_vector): New.
450 (scm_i_convert_old_prototype): Removed.
451 (prototype_to_type): New.
452 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
453 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
454 minor added clarity.
455 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
456 instead of scm_make_uve.
457 (tag_creator_table, scm_i_tag_to_creator): Removed.
458 (tag_to_type): New.
459 (scm_i_read_array): Use scm_list_to_typed_array instead of
460 scm_list_to_uniform_array.
461
462 2004-12-27 Marius Vollmer <mvo@zagadka.de>
463
464 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
465 (scm_bitvector_writable_elements): New.
466 (scm_bitvector_release, scm_bitvector_release_elements):
467 Renamed former to latter. Added explicit call to
468 scm_remember_upto_here_1.
469 (scm_frame_bitvector_release,
470 scm_frame_bitvector_release_elements): Renamed former to latter.
471 (scm_bitvector_release_writable_elements,
472 scm_bitvector_release_writable_elements): New.
473 Changed all uses as required by the changes above.
474
475 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
476 scm_u8vector_elements, etc): Made return value "const".
477 (scm_uniform_vector_writable_elements,
478 scm_u8vector_writable_elements, etc): New.
479 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
480 Renamed former to latter. Added explicit call to
481 scm_remember_upto_here_1.
482 (scm_frame_uniform_vector_release,
483 scm_frame_uniform_vector_release_elements): Renamed former to latter.
484 (scm_uniform_vector_release_writable_elements,
485 scm_frame_uniform_vector_release_writable_elements): New. Takes
486 crown of longest identifier yet.
487 Changed all uses as required by the changes above.
488
489 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
490 void.
491 (scm_is_vector, scm_vector_p, scm_vector_length,
492 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
493 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
494 scm_vector_move_left_x, scm_vector_move_right_x,
495 scm_vector_fill_x): handle one-dimensional arrays.
496 (scm_vector_elements, scm_vector_release_elements,
497 scm_vector_frame_release_elements, scm_vector_writable_elements,
498 scm_vector_release_writable_elements,
499 scm_vector_frame_release_writable_elements): New.
500 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
501 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
502
503 * ramap.c (scm_ramapc, scm_raeql): Use
504 scm_c_generalized_vector_length instead of
505 scm_uniform_vector_length.
506 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
507 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
508
509 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
510
511 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
512 member for relocating debug frames.
513 (scm_make_continuation): Set it.
514
515 * stacks.c (read_frame, read_frames, scm_make_stack,
516 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
517 of continuations instead of calculating the offset ourselves.
518 Relocate 'vect' member of scm_t_debug_frame.
519
520 2004-12-16 Kevin Ryde <user42@zip.com.au>
521
522 * ramap.c (scm_array_map_x): Check for at least one source argument.
523
524 2004-12-14 Kevin Ryde <user42@zip.com.au>
525
526 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
527 the C code so for the final call to the predicate procedure is a tail
528 call, per SRFI-13 spec.
529
530 2004-12-10 Kevin Ryde <user42@zip.com.au>
531
532 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
533 recent revision to the reference manual.
534
535 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
536 with "%", C99 says it's well-defined.
537
538 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
539 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
540 bother trying to fit scm_from_ulong, not really worth the trouble if
541 addresses are more than 4 bytes usually.
542
543 2004-11-30 Kevin Ryde <user42@zip.com.au>
544
545 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
546 arm32. Reported by Greg Troxel.
547
548 2004-11-14 mvo <mvo@zagadka.de>
549
550 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
551
552 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
553
554 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
555
556 Enclosed arrays are now their own smob. This has been done to
557 make the code more explicit about them and to prepare for the time
558 when generalized vectors include arbitrary one-dimensional
559 arrays. (Uptonow, enclosed arrays have been recognized by their
560 use of an array as their storage 'vector'. When all generalized
561 vectors are allowed as storage, including one-dimensional arrays,
562 this will no longer work.)
563
564 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
565 New.
566 (exactly_one_third, singp): Removed.
567 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
568 scm_shared_array_offset, scm_shared_array_increments): Handle
569 enclosed arrays explicitely.
570 (scm_array_rank): Likewise. Also, do not return zero for
571 non-arrays, signal an error instead since arrays with rank zero do
572 exist.
573 (scm_i_make_ra): New, for specifying the tag of the new array.
574 (scm_make_enclosed_array): Use it.
575 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
576 (scm_make_shared_array): Use scm_c_generalized_vector_length
577 instead of scm_uniform_vector_length.
578 (scm_array_in_bounds_p): Rewritten to be much cleaner.
579 (scm_i_cvref): New, doing the job of scm_cvref.
580 (scm_cvref): Use scm_i_cvref.
581 (scm_array_ref): Do not accept non-arrays when no indices are
582 given. Use scm_i_cvref to do the actual access.
583 ("uniform-array-set1"): Do not register.
584 (scm_array_set_x, scm_uniform_array_read_x,
585 scm_uniform_array_write): Handle enclosed arrays explicitly.
586 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
587 handle enclosed arrays.
588 (scm_array_to_list): Handle enclosed arrays explicitly.
589 (rapr1): Removed.
590 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
591 enclosed arrays.
592 (scm_i_print_enclosed_array): New.
593 (tag_proto_table, tag_creator_table): Renamed former to latter.
594 Added "a" and "b" for strings and bitvectors, resp.
595 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
596 latter. Tag "a" is in the table now, no need to handle it as a
597 legacy tag.
598 (scm_raprin1): Just call scm_iprin1.
599 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
600 explicitly.
601 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
602 Use scm_i_print_array as printer for scm_tc16_array.
603
604 2004-11-10 Marius Vollmer <mvo@zagadka.de>
605
606 * ramap.c (cind): Changed second arg to be pointer to long instead
607 of uniform vector.
608 (scm_ramapc): Allocate index vector with scm_malloc and not as
609 uniform vector. Wrap it in a frame so that it gets properly freed.
610 (scm_array_index_map_x): Likewise.
611
612 * unif.c: Changed all uses of scm_array_prototype to
613 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
614 prototype is known.
615 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
616 in terms of scm_uniform_vector_read_x and
617 scm_uniform_vector_write, respectively. Strings and
618 bitvector support has been dropped.
619
620 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
621 needed files directly. Include config.h, <unistd.h> and <io.h>
622 when available.
623 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
624
625 2004-11-09 Marius Vollmer <mvo@zagadka.de>
626
627 * gh_data.c (gh_uniform_vector_length): Properly use
628 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
629
630 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
631
632 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
633 New.
634 (scm_i_uniform_vector_creator): Removed.
635 (scm_i_generalized_vector_creator): New.
636 (scm_uniform_vector_length, scm_uniform_element_size): Do not
637 handle generalized vectors, only uniform numeric vectors.
638 (alloc_uvec): Do length check here...
639 (make_uvec): ...but not here.
640 (coerce_to_uvec): Use new generalized vector functions to handle
641 all kinds of vectors in one go.
642
643 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
644 remaining scm_tc7_unused tags to get a neatly ordered list.
645
646 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
647 longer handle scm_tc7_bvect bitvectors.
648
649 * ramap.c: Use the new generalized vector functions to handle all
650 vector like things.
651
652 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
653 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
654 scm_generalized_vector_length, scm_generalized_vector_ref,
655 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
656 scm_is_generalized_vector, scm_c_generalized_vector_length,
657 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
658 New.
659
660 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
661 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
662 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
663 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
664 scm_c_bitvector_length, scm_c_bitvector_ref,
665 scm_c_bitvector_set_x, scm_bitvector_elements,
666 scm_bitvector_release, scm_frame_bitvector_release,
667 scm_tc16_bitvector, bitvector_free, bitvector_print,
668 bitvector_equalp, count_ones, find_first_one): New.
669 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
670 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
671 using the new C API for bitvectors and maybe count_ones or
672 find_first_one, as appropriate.
673 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
674 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
675 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
676 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
677 new functions from above.
678 (scm_i_proc_make_vector, scm_i_proc_make_string,
679 scm_i_proc_make_bitvector): Made non-static for use in
680 scm_i_generalized_vector_creator.
681 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
682 (scm_make_uve): Validate that the created object is a generalized
683 vector.
684 (scm_i_legacy_tag): Removed.
685 (scm_i_print_array): Do it here.
686 (scm_raprin1): Only print enclosed arrays.
687
688 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
689
690 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
691
692 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
693 added portability.
694
695 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
696 for "space". Thanks to Bruce Korb!
697
698 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
699 only after dest has been set. Thanks to Hyper Division!
700
701 * gh_data.c (gh_uniform_vector_length): Use
702 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
703
704 2004-11-03 Marius Vollmer <mvo@zagadka.de>
705
706 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
707 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
708 SCM_SET_UVECTOR_LENGTH): Removed.
709
710 2004-11-02 Marius Vollmer <mvo@zagadka.de>
711
712 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
713 Thanks!
714
715 * backtrace.c (scm_display_backtrace_with_highlights): Join the
716 first and the second line of the SCM_DEFINE macro call, since old
717 preprocessors cannot handle definitions that are split into two
718 lines.
719
720 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
721 declarations.
722
723 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
724 scm_t_uint32 to fix the mismatch between the function declaration
725 and definition.
726
727 * sort.c (quicksort): Don't use C99 variable declarations.
728
729 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
730 SCM_BOOL_F if no type matches.
731
732 * threads.c (thread_print): Cast a pointer to size_t when printing
733 with scm_uintprint.
734
735 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
736 defined.
737 (scm_array_prototype): Deprecated.
738
739 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
740
741 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
742 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
743 more efficient access to the u32vector.
744
745 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
746 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
747 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
748
749 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
750 instead of the old-style dvectors.
751
752 * gh_data.c: Use new-style uniform arrays in place of old-style
753 ones.
754
755 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
756 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
757
758 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
759 instead of old-sytle uvectors.
760
761 * convert.c, convert.i.c: Rewritten completely, using
762 scm_any_to_u8vector, etc and other new-style uniform vector
763 functions.
764
765 * random.c (scm_random_solid_sphere_x,
766 scm_random_hollow_sphere_x): Do not validate vector argument, this
767 is already done elsewhere.
768
769 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
770 scm_any_to_u8vector, etc): New.
771 (scm_uniform_element_size, scm_uniform_vector_length): Do no
772 longer handle old-style uniform vectors.
773
774 * read.c (scm_lreadr): Bugfix: include the last bit in the
775 bit vector.
776
777 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
778
779 * unif.h, unif.c (scm_array_creator): New.
780 (scm_i_get_old_prototype): New.
781 (scm_array_prototype): use it to return old-style prototype, never
782 return creators.
783 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
784 arg of SCM_UNDEFINED. The latter is wrong.
785
786 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
787 (make_uve): Removed.
788 (scm_i_proc_make_vector, scm_i_proc_make_string,
789 scm_i_proc_make_u1vector): New.
790 (scm_init_unif): Initialize them.
791 (scm_i_convert_old_prototype): New.
792 (scm_make_uve): Use it to get the creator procedure. Removed all
793 old code that created old-style uniform vectors.
794 (scm_array_p): Handle generic vectors.
795 (scm_dimensions_to_uniform_array): Do not fill new array with
796 prototype when that is a procedure.
797 (scm_list_to_uniform_array): Also accept a list of lower bounds as
798 the NDIM argument.
799 (scm_i_print_array): Print rank for shared or non-zero-origin
800 vectors.
801 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
802 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
803 which I do not understand yet.
804 (scm_array_prototype): Explicitely handle generic vectors.
805
806 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
807 (iflo2str): Use icmplx2str for complex numbers.
808
809 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
810 scm_i_uniform_vector_prototype): Removed.
811 (scm_i_uniform_vector_creator): New.
812 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
813 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
814 Updated all tables and generic functions to support them.
815 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
816 (scm_init_srfi_4): Initialize them.
817
818 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
819 sizeof(CTYPE) as explained in the comment.
820
821 * read.c (scm_lreadr): Call scm_i_read_array for all characters
822 following '#' that can start an array. Explicitely disambiguate
823 'i' and 'e' between introducing numbers and uniform vectors. Do
824 not call scm_i_read_homogenous_vector, since that is also handled
825 by scm_i_read_array now.
826
827 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
828
829 First cut at integrating uniform vectors from srfi-4 with the rest
830 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
831 vector. The plan is to gradually replace one type after the other
832 until none is left and then to consider general cleanups and
833 optimizations.
834
835 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
836
837 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
838 scm_uniform_vector_ref, scm_uniform_vector_set_x,
839 scm_uniform_vector_to_list, scm_is_uniform_vector,
840 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
841 scm_uniform_vector_elements, scm_uniform_vector_element_size,
842 scm_uniform_vector_release): New.
843 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
844 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
845 from unif.h, unif.c and extended to handle both the old and new
846 uniform vectors.
847
848 * tags.h (scm_tc7_byvect): Commented out.
849
850 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
851 the former to the latter.
852 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
853 srfi-4.h, srfi-4.c.
854 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
855 (scm_array_p, scm_array_rank, scm_array_dimensions,
856 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
857 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
858 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
859 vectors. Removed code for scm_tc7_byvect.
860 (scm_dimensions_to_uniform_array): Fill array with 0 when
861 prototype is #\nul.
862 (scm_i_print_array_dimension, scm_i_legacy_tag,
863 scm_i_print_array): New.
864 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
865 for scm_tc7_byvect.
866
867 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
868 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
869 uniform vectors. Removed code for scm_tc7_byvect
870
871 * print.c (iprin1): Removed code for scm_tc7_byvect.
872 * objects.c (scm_class_of): Likewise.
873 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
874 * gc-card.c (scm_i_sweep_card): Likewise.
875 * evalext.c (scm_self_evaluating_p): Likewise.
876 * eq.c (scm_equal_p): Likewise.
877
878 * gh_data.c (gh_chars2byvect): Reimplemented with
879 scm_make_s8vector.
880 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
881
882 * srfi-4.c (take_uvec): New.
883 (alloc_uvec): Use it.
884 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
885
886 * random.c (vector_scale, vector_scale_x): Renamed former to the
887 latter, since it modifies its argument.
888 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
889 Do not use scm_universal_vector_length for non-uniform vectors.
890 Use scm_f64vector_elements to access innards of uniform vectors.
891
892 * convert.i.c: Convert srfi-4 style uniform vectors when
893 requested.
894 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
895 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
896
897 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
898
899 * numbers.h, numbers.c (scm_i_print_double): New.
900
901 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
902 ../srfi/ but heavily modified.
903 * Makefile.am: Add them in all the right places.
904 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
905 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
906 '#u', and '#s'.
907
908 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
909 and made non-static. Changed all uses.
910
911 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
912
913 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
914 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
915 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
916 scm_uintprint to print unsigned integers, raw heap words, and
917 adresses, using a cast to scm_t_bits to turn pointers into
918 integers.
919
920 * unif.c: Include "libguile/print.h".
921
922 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
923 scm_t_intmax values.
924 (scm_uint2str): New, for scm_t_uintmax.
925 (scm_iint2str): Argument type changed to scm_t_intmax,
926 reimplemented in terms of scm_uint2str.
927
928 * print.c, print.h (scm_uintprint): New, for printing
929 scm_t_uintmax values.
930 (scm_intprint): Argument type changed to scm_t_intmax.
931
932 * sort.c (quicksort, scm_merge, scm_merge_list_x,
933 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
934 strategic places so that the loops can be interrupted.
935
936 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
937 "-I$(top_srcdir)/libguile-ltdl".
938 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
939 "../libguile-ltdl/libguile-ltdl.a".
940
941 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
942 all references to scm_lt_* with just lt_*. Include <ltdl.h>
943 instead of <libguile-ltdl.h>.
944
945 2004-10-20 Marius Vollmer <mvo@zagadka.de>
946
947 * sort.c (quicksort): Copy pivot out of the array while
948 constructing the partitions; it could get overwritten otherwise.
949 Because of the ultimate insertion sort, this bug did not cause
950 quicksort to fail, it just put all the burdon on the insertion
951 sort and was thus very slow. Thanks to Rolan Orre for reporting
952 the slowness!
953
954 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
955
956 * numbers.c (scm_i_range_error): New.
957 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
958 scm_out_of_range.
959
960 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
961 endpos. State inclusiveness/exclusiveness of bounds in docstring.
962
963 * unif.c (scm_array_p): When no prototype is given, explicitely
964 test for allowable types, do not simply return true. Thanks to
965 Roland Orre for reporting this!
966
967 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
968
969 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
970 segment to scm_max_segment_size.
971
972 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
973
974 * inline.h (scm_double_cell): abort if GC running.
975 (scm_cell): idem.
976
977 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
978
979 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
980 pos == 0.
981
982 Keywords no longer store a 'dash symbol'. Instead, they store a
983 symbol with their real name.
984
985 * keywords.h, keywords.c, deprecated.h, deprecated.c
986 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
987 terms of scm_is_keyword and scm_keyword_dash_symbol.
988
989 * keywords.h, keywords.c, discouraged.h, discouraged.c
990 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
991 scm_c_make_keyword): Discouraged.
992
993 * keywords.h, keywords.c (scm_symbol_to_keyword,
994 scm_keyword_to_symbol): Implemented in C.
995 (scm_is_keyword, scm_from_locale_keyword,
996 scm_from_locale_keywordn): New.
997
998 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
999
1000 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1001 scm_from_locale_keyword instead of scm_c_make_keyword.
1002
1003 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1004 better error message.
1005
1006 * deprecated.c: Include discouraged.h and keywords.h.
1007
1008 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1009 reading '#:' or ':'. See NEWS for consequences.
1010
1011 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1012
1013 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1014 literals are now read-write again (until SCM_STRING_CHARS is
1015 removed).
1016
1017 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1018 strings with an error message that blames SCM_STRING_CHARS.
1019
1020 * options.c (change_option_setting): Use scm_car instead of
1021 explicit type check plus SCM_CAR.
1022
1023 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1024 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1025 (scm_iprin1): Use them instead of the previoulsy hardcoded
1026 strings.
1027 (scm_init_print): Initialize them.
1028
1029 * backtrace.c (display_frame_expr): Do not remove control
1030 characters from the final string. Print it directly using
1031 scm_display.
1032
1033 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1034 Thanks to Roland Orre!
1035
1036 2004-09-29 Kevin Ryde <user42@zip.com.au>
1037
1038 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1039 be whole original string in match struct, not offsetted substring.
1040
1041 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1042
1043 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1044
1045 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1046
1047 * Makefile.am (EXTRA_DIST): Added gettext.h.
1048
1049 * smob.c, smob.h (scm_assert_smob_type): New.
1050
1051 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1052 Include GUILE_CFLAGS.
1053 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1054 now.
1055 (libpath.h): Put GUILE_CFLAGS in the build-info.
1056
1057 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1058
1059 * print.h (scm_print_state): Added highlight_objects.
1060 * print.c (make_print_state, scm_free_print_state): Initialize it
1061 to SCM_EOL.
1062 (scm_iprin1): Wrap output in '{...}' when object is contained in
1063 highlight_objects.
1064
1065 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1066 scm_backtrace_with_highlights): New. Set highlight_objects of
1067 printstate.
1068
1069 * error.c (scm_error_scm): Document new meaning of data/rest
1070 argument for out-of-range and wrong-type-arg errors.
1071 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1072 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1073 exception so that it gets highlighted in the backtrace.
1074 Don't talk about "argument" when not giving a position.
1075
1076 * throw.c (handler_message): The rest argument is the fourth
1077 argument, not everything after the third. Call
1078 scm_display_backtrace_with_highlights, passing the rest argument
1079 when appropriate.
1080
1081 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1082
1083 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1084 <bruno@clisp.org>:
1085
1086 * i18n.c: Handle --disable-nls (thanks Bruno).
1087
1088 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1089 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1090
1091 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1092 LC categories.
1093 * posix.c (scm_setlocale): Use it.
1094
1095 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1096 scm_bind_textdomain_codeset): Make wrappers similar to C function
1097 they wrap.
1098
1099 * i18n.h: New file.
1100 * i18n.c: New file.
1101 * gettext.h: New file, taken from GNU gettext.
1102 * init.c: Include libguile/i18n.h.
1103 (scm_init_guile_1): Add call to scm_init_i18n().
1104 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1105 (DOT_X_FILES): Add i18n.x.
1106 (DOT_DOC_FILES): Add i18n.doc.
1107 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1108 (modinclude_HEADERS): Add i18n.h.
1109
1110 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1111
1112 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1113
1114 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1115 discouraged.h. Replaced all uses with scm_is_pair.
1116 (SCM_I_CONSP): New name for SCM_CONSP.
1117
1118 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1119 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1120 scm_cadr, etc): New.
1121 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1122 uses with scm_is_null.
1123
1124 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1125 instead of explicit code.
1126
1127 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1128
1129 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1130 Reworded logic a bit so that #f is returned immediately when s1 is
1131 too short to contain s2.
1132
1133 * regex-posix.c (scm_regexp_exec): Convert string to
1134 zero-terminated locale string before matching against it.
1135
1136 * strings.h, strings.c (scm_substring_read_only,
1137 scm_c_substring_read_only, scm_i_substring_read_only): New.
1138 (RO_STRING_TAG, IS_RO_STRING): New.
1139 (scm_i_string_writable_chars): Bail on read-only strings.
1140
1141 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1142 literals, thus making them read-only as specified by R5RS.
1143
1144 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1145
1146 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1147 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1148
1149 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1150
1151 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1152 numbers.c.
1153 (scm_to_mpz, scm_from_mpz): New.
1154 Thanks to Andreas Vögele!
1155
1156 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1157 just on a line of its own.
1158
1159 * srfi-13.c (scm_string_any, scm_string_every,
1160 scm_string_tabulate, string_upcase_x, string_down_case_x,
1161 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1162 size_t instead of int for indices into strings. Make sure that no
1163 over- or underflow occurs. Thanks to Andreas Vögele!
1164 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1165 indices, which can also be negative.
1166
1167 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1168
1169 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1170
1171 * threads.c (scm_threads_mark_stacks): Call
1172 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1173 only used once.
1174
1175 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1176
1177 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1178 Bugfix: when subtracting unsigned values, make sure that result
1179 does not wrap.
1180
1181 2004-09-09 Kevin Ryde <user42@zip.com.au>
1182
1183 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1184 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1185 by Andreas Vögele.
1186
1187 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1188
1189 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1190
1191 * eq.c (real_eqv): Pretend that all NaNs are equal.
1192
1193 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1194
1195 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1196
1197 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1198 use size_t for some locals instead of int.
1199
1200 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1201 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1202 (skip_scsh_block_comment): Use scm_input_error instead of
1203 scm_misc_error in case of EOF.
1204
1205 2004-09-07 Kevin Ryde <user42@zip.com.au>
1206
1207 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1208 Bug report by Bill Schottstaedt.
1209
1210 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1211 column.
1212 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1213
1214 * posix.c (scm_access): Update docstring per manual.
1215
1216 * posix.c (scm_nice): Correction to error detection. Reported by
1217 Matthias Koeppe.
1218
1219 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1220 throw error before unlocking mutex with SCM_ALLOW_INTS.
1221
1222 2004-09-06 Kevin Ryde <user42@zip.com.au>
1223
1224 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1225 available. This also gets around CLK_TCK being absent when
1226 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1227
1228 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1229
1230 * threads.c (scm_threads_mark_stacks): Fixed local variable
1231 definitions.
1232
1233 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1234 local variable definitions.
1235
1236 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1237 MinGW32 because it conflicts with its pthread headers.
1238 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1239 (scm_strftime): Using scm_from_locale_string() instead of
1240 scm_makfrom0str().
1241
1242 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1243 part.
1244
1245 * numbers.c (scm_init_numbers): Removed check_sanity() call
1246 inside GUILE_DEBUG. The function has been removed somewhen...
1247
1248 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1249 MinGW32 because it conflicts with its pthread headers.
1250
1251 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1252
1253 * strings.c (SCM_STRINGP): Accept all strings.
1254 (SCM_STRING_CHARS): Reject shared substrings here.
1255
1256 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1257 the Copyright years.
1258
1259 2004-08-27 Kevin Ryde <user42@zip.com.au>
1260
1261 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1262 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1263 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1264
1265 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1266
1267 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1268 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1269 scm_i_symbol_is_interned, scm_i_mem2symbol,
1270 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1271
1272 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1273
1274 * srfi-13.c: First cut at thread-safeness and proper use of
1275 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1276 been inserted. Made sure that no internal string pointer is used
1277 across a SCM_TICK or a possible GC.
1278
1279 * script.c (scm_compile_shell_switches): Use
1280 scm_from_locale_string instead of scm_makfrom0str.
1281
1282 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1283 always been.
1284
1285 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1286
1287 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1288 strop.c.
1289
1290 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1291 * strop.h, strop.c: Removed, they are now empty.
1292 * Makefile.am: Updated for new and removed files.
1293
1294 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1295 to scm_string_to_symbol.
1296
1297 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1298 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1299 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1300 charset instead of libc functions.
1301
1302 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1303 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1304 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1305 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1306 instead of explicit code.
1307
1308 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1309 "srfi-13.h" instead of "strop.h".
1310
1311 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1312 scm_init_srfi_14. Do not call scm_init_strop.
1313
1314 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1315
1316 * numbers.c (scm_inf_p): Synced docstring back from manual.
1317
1318 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1319
1320 * strings.c (get_str_buf_start): New helper function.
1321 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1322 scm_i_string_char, scm_i_string_writable_chars): Use it.
1323 (scm_i_substring_copy): Make START argument optional for C
1324 callers, for upcoming SRFI-13 integration.
1325
1326 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1327
1328 From Richard Todd, Thanks!
1329
1330 * script.c (scm_compile_shell_switches): added '-L' switch to add
1331 to the %load-path.
1332
1333 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1334
1335 * eval.c (unmemoize_exprs): When dropping internal body markers
1336 from the output during unmemoization, also drop those that are not
1337 immediately at the beginning of a body.
1338
1339 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1340
1341 * eval.c (scm_lookupcar1): Report "Variable used before given a
1342 value" insetad of an "Unbound" one for variables that are found
1343 but still contain SCM_UNDEFINED.
1344
1345 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
1346 expects a null-terminated string in the locale encoding, but
1347 scm_i_string_writable_chars doesn't give that. Fixed by letting
1348 mkstemp modify a locale version of the tmpl argument and copying
1349 the result back into tmpl.
1350
1351 * strop.c (scm_substring_move_x): Store into str2, not str1.
1352
1353 2004-08-20 Kevin Ryde <user42@zip.com.au>
1354
1355 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
1356 to modify the input string.
1357
1358 2004-08-19 Marius Vollmer <mvo@zagadka.de>
1359
1360 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
1361 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
1362 scm_c_symbol_length.
1363
1364 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1365
1366 New string implementation, with copy-on-write strings and
1367 mutation-sharing substrings, and a new internal string API.
1368 Symbols can now share memory with strings.
1369
1370 * tags.h (scm_tc7_stringbuf): New tag.
1371
1372 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
1373 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
1374 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
1375 uses.
1376 (scm_i_make_string, scm_c_make_string): New, to replace
1377 scm_allocate_string. Updated all uses.
1378 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
1379 SCM_STRING_LENGTH): Deprecated.
1380 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
1381 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
1382 Discouraged. Replaced all uses with scm_from_locale_string or
1383 similar, as appropriate.
1384 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
1385 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
1386 scm_substring_shared, scm_substring_copy): New.
1387
1388 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
1389 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
1390 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
1391 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
1392 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
1393 Deprecated.
1394 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
1395 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
1396 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
1397 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
1398 Updated all uses.
1399 (scm_gensym): Generate only the number suffix in the buffer, just
1400 string-append the prefix.
1401
1402 * error.c (scm_memory_error): Do not try to throw, just abort.
1403 Throwing will not work anyway.
1404
1405 * gh.h, gh-data.c (gh_set_substr): Made src const.
1406
1407 * ports.c (scm_i_mode_bits_n): New, for counted strings.
1408 (scm_mode_bits): Use it.
1409 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
1410 a vector normally and fill that instead of consing a list with a
1411 blocked GC.
1412
1413 * read.c (scm_i_casei_streq): New, for counted strings.
1414
1415 * threads.c (gc_section_count): Removed, thread-sleeping can not
1416 be nested.
1417 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
1418 admin mutex so that we can be put to sleep by other threads while
1419 blocking on that mutex. Lock all the heap mutex of all threads,
1420 including ourselves.
1421 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
1422 call scm_i_enter_guile.
1423 (scm_thread_mark_stacks): Expect all threads to be suspended.
1424
1425 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
1426 scm_gc_mallocated, for now.
1427 (scm_init_storage): Initialize it.
1428 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
1429
1430 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
1431 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
1432 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
1433 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
1434
1435 * strop.c (scm_string_copy): Use scm_c_substring to get a
1436 copy-on-write string.
1437
1438 2004-08-18 Kevin Ryde <user42@zip.com.au>
1439
1440 * arbiters.c (FETCH_STORE): New macro.
1441 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
1442 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
1443 scm_try_arbiter and scm_release_arbiter.
1444 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
1445 for speed on i386, otherwise using mutex.
1446
1447 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
1448 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
1449 exact and inexact is #f.)
1450
1451 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
1452 to get thread safety of scm_ttyname.
1453
1454 * ports.c (ttyname): Remove prototype, unused.
1455
1456 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1457 Reported by Michael Tuexen.
1458
1459 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1460
1461 * load.c (scm_init_load_path): Do not pass NULL to
1462 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
1463 not set. Thanks to Bill Schottstaedt.
1464
1465 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1466
1467 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
1468 locale strings instead of accessing their internals.
1469 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
1470 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
1471 SCM_STRING_CHARS and SCM_STRING_LENGTH.
1472
1473 * simpos.c (scm_system): Convert SCM strings to locale strings
1474 instead of accessing their internals.
1475
1476 * script.c (scm_compile_shell_switches): Convert version to locale
1477 string before printing it.
1478
1479 * rdelim.c (scm_read_delimited_x): Avoid
1480 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
1481 of scm_from_long for the returned number of read characters.
1482
1483 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
1484 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1485
1486 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
1487 Use them instead of SCM_SYSCALL when one or two strings need to be
1488 converted into locale strings.
1489 (my_rename): New, gathers platform dependent code for renaming.
1490 (scm_rename): Use it.
1491 (scm_readlink, scm_copy_file): Convert SCM strings to locale
1492 strings instead of accessing their internals.
1493 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
1494 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
1495 SCM_STRING_LENGTH.
1496
1497 * extensions.c (load_extension): Convert lib and init to locale
1498 strings instead of accessing the internals directly.
1499 (scm_c_load_extension): Use scm_from_locale_string instead of
1500 scm_makfrom0str.
1501
1502 * fports.h, fports.c (scm_i_fdes_to_port): New, like
1503 scm_fdes_to_port, but take mode bits directly instead of as a C
1504 string.
1505 (scm_i_fdes_to_port): Implement using above.
1506 (scm_open_file): Use scm_i_fdes_to_port together with
1507 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1508 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
1509 with scm_i_mode_bits to avoid accessing internals of SCM string
1510 from C.
1511
1512 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
1513 SCM string as argument.
1514
1515 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
1516 bits directly instead of C string.
1517 (scm_void_port): Implement using above.
1518 (scm_sys_make_void_port): Use scm_i_void_port together with
1519 scm_i_mode_bits to avoid accessing internals of SCM string.
1520
1521 * strings.h, strings.c (scm_i_get_substring_spec): New.
1522
1523 * socket.c, rw.c, deprecated.h, validate.h
1524 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
1525 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
1526 scm_to_locale_string, etc.
1527 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
1528 above, plus scm_i_get_substring_spec.
1529
1530 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
1531 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
1532 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
1533 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
1534 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
1535 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
1536 with more explicit scm_remember_upto_here_1, etc, or introduced
1537 them in the first place.
1538
1539 * posix.c (WITH_STRING): New helper macro. Use it where one
1540 locale string is needed for a short piece of code.
1541 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
1542 when one locale string is needed.
1543 (scm_mkstemp): Convert tmpl to a locale string.
1544 (scm_putenv): Rewritten to use only C strings.
1545 (scm_setlocale, scm_crpt): Convert argument strings to locale
1546 strings.
1547
1548 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1549
1550 * load.c (scm_primitive_load_path): Do not check for absolute
1551 filenames when scm_sys_search_load_path returns false, which will
1552 return absolute filenames unchanged.
1553
1554 2004-08-11 Marius Vollmer <mvo@zagadka.de>
1555
1556 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
1557 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
1558 of an alist. Thanks to Matthias Koeppe!
1559
1560 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1561
1562 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
1563 Moved from string.h to deprecated.h.
1564
1565 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
1566
1567 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
1568 SCM_I_MAKE_STRING_TAG, changed all uses.
1569 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
1570 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
1571 respectively. For a short time, the old names are still there as
1572 aliases. Not all uses have been changed yet, but the ones in
1573 strings.c have.
1574 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
1575 SCM_T_BITS_MAX.
1576 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
1577 scm_take_locale_string, scm_take_locale_stringn,
1578 scm_to_locale_string, scm_to_locale_stringn,
1579 scm_to_locale_stringbuf): New.
1580 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
1581 deprecated.[hc]. Implemented in terms of the new functions above.
1582 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
1583 scm_makfrom0str): Reimplemented in terms of the new functions from
1584 above. They will be discouraged shortly.
1585 (scm_substring): Do not use scm_mem2string.
1586 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
1587 to replace similar code from posix.c, simpos.c, and dynl.c.
1588 (scm_string_append): Use memcpy instead of explicit loop. Do not
1589 use register keyword. Use plain 'char' instead of 'unsigned
1590 char'.
1591
1592 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
1593 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
1594
1595 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
1596 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1597 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
1598 not as a pointer. Use scm_remember_upto_here_1 to protect it.
1599
1600 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
1601 string. This avoids a conversion round-trip.
1602
1603 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
1604 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1605 SCM_I_STRING_LENGTH, respectively.
1606 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
1607
1608 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
1609 of a string, call scm_display on the string itself.
1610
1611 * dynwind.c, dynwind.h (scm_frame_free): New.
1612
1613 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
1614 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
1615 Replaced uses of SCM_STRING_CHARS with proper uses of
1616 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
1617 Replaced scm_mem2string with scm_from_locale_string.
1618
1619 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
1620 Removed, replaced all uses with scm_i_allocate_string_pointers.
1621
1622 * load.h, load.c (scm_internal_parse_path): Removed.
1623 (scm_parse_path): Use scm_string_split to do the work.
1624 (scm_init_load_path): Use scm_parse_path instead of
1625 scm_internal_parse_path.
1626 (scm_search_path): Rewritten string handling part of the code in
1627 terms of scm_to_locale_stringbuf and so that it is thread safe.
1628
1629 * error.c (scm_error_scm): Throw directly instead of calling
1630 scm_error, this avoids the back and forth conversion of SUBR and
1631 MESSAGE and also plugs a memory leak.
1632 (scm_error): Call scm_error_scm.
1633
1634 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
1635 (display_header): Print FNAME when it is true, not
1636 merely when it is a string.
1637
1638 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
1639 unceremoniously. They were unused by Guile itself, and external
1640 use should stop immediately.
1641
1642
1643 2004-08-10 Marius Vollmer <mvo@zagadka.de>
1644
1645 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
1646 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
1647 deprecated versions installed in deprecated.h and deprecated.c.
1648 Changed all uses.
1649
1650 2004-08-06 Rob Browning <rlb@defaultvalue.org>
1651
1652 * net_db.c (scm_resolv_error): don't cause an exception while
1653 trying to throw an exception -- call scm_misc_error with correct
1654 arguments. The previous arguments needed a format escape that
1655 wasn't in any of the format strings.
1656
1657 2004-08-06 Kevin Ryde <user42@zip.com.au>
1658
1659 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
1660 so as not to depend on signedness of plain char. For byvect range
1661 check, throw out-of-range rather than wrong-type-arg.
1662
1663 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
1664 signed byte range checks by using scm_to_schar and scm_from_schar,
1665 don't want to depend on signedness of C char.
1666
1667 2004-08-05 Kevin Ryde <user42@zip.com.au>
1668
1669 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
1670 SCM_DEFER_INTS.
1671 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
1672 guaranteed if multiple threads compete to unlock.
1673 Update docstrings per doc/ref/api-scheduling.texi.
1674
1675 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
1676 stat on the filename, to be certain a file rename can't mean we get
1677 info on one filesystem object but open another. This fstat usage is
1678 similar to Emacs copy-file.
1679
1680 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
1681
1682 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
1683 SIGINT and SIGQUIT, since those values are ints.
1684
1685 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1686
1687 * num2integral.i.c, num2float.i.c: Removed.
1688 * Makefile.am (noinst_HEADERS): Updated.
1689
1690 * numbers.h. numbers.c (scm_make_ratio): Renamed to
1691 scm_i_make_ratio and made static, replaced uses with scm_divide.
1692 (scm_complex_p): New, export as "complex?" to Scheme.
1693 (scm_number_p): Export as "number?" to Scheme.
1694 (scm_is_complex, scm_is_number): New.
1695 (scm_c_make_rectangular, scm_c_make_polar): New.
1696 (scm_make_rectangular, scm_make_polar): Use above.
1697 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
1698 New.
1699 (scm_make_complex): Discouraged by moving to discouraged.h and
1700 discouraged.c. Replaced all uses with scm_c_make_rectangular.
1701
1702 * discouraged.h, discouraged.c, numbers.c, numbers.h
1703 (scm_is_rational): New.
1704 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
1705 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
1706 Removed prototypes.
1707 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
1708 Discouraged by moving to discouraged.h and discouraged.c.
1709 Replaced all uses with scm_from_double.
1710 (scm_num2float, scm_num2double): Discouraged by moving prototype
1711 to discouraged.h and rewriting in terms of scm_to_double.
1712 Replaced all uses with scm_to_double.
1713 (scm_to_double): Do not implement in terms of scm_num2dbl, use
1714 explicit code.
1715 (scm_from_double): Do not implement in terms of scm_make_real, use
1716 explicit code.
1717
1718 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1719
1720 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
1721
1722 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
1723 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
1724
1725 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
1726 Renamed to SCM_I_* in order to avoid collisions with the versions
1727 defined in deprecated.h.
1728
1729 * discouraged.h, discouraged.c: New files.
1730
1731 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
1732 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
1733 deprecated to being discouraged by moving to discouraged.h.
1734
1735 * numbers.h, numbers.c, discouraged.h, discouraged.c
1736 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
1737 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
1738 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
1739 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
1740 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
1741 scm_num2ulong_long): Discouraged by moving to discouraged.h and
1742 discouraged.c and reimplementing in terms of scm_from_* and
1743 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
1744 functions.
1745
1746 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
1747 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
1748 scm_i_size2big, scm_i_ptrdiff2big): Removed.
1749 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
1750 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
1751 explicit code.
1752
1753 2004-08-02 Kevin Ryde <user42@zip.com.au>
1754
1755 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
1756 and current usage and migration.
1757
1758 2004-07-31 Kevin Ryde <user42@zip.com.au>
1759
1760 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
1761 it's not thread safe.
1762 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
1763 advantage of this.
1764 * fports.c (scm_open_file): Use scm_strerror likewise.
1765 * filesys.c (scm_stat, scm_lstat): Ditto.
1766
1767 * filesys.c (scm_copy_file): Avoid fd leak when destination file
1768 cannot be opened.
1769
1770 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
1771 update, for thread safety.
1772 (gensym_counter): Move into scm_gensym which is its only user.
1773 (scm_init_symbols): No need to explicitly initialize gensym_counter.
1774
1775 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1776
1777 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
1778 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
1779 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
1780 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
1781 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
1782 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
1783 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
1784 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
1785 defined in terms of scm_to_signed_integer, etc, but in terms of
1786 scm_to_int8, etc.
1787
1788 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
1789
1790 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
1791 no longer used.
1792
1793 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
1794 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
1795
1796 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
1797 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
1798 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
1799 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
1800 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
1801 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
1802 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
1803
1804 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
1805 the functions below.
1806
1807 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
1808 conv-uinteger.i.c.
1809
1810 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
1811 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
1812 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
1813 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
1814 scm_from_uint64): Turned from macros into proper functions.
1815 (scm_to_signed_integer, scm_to_unsigned_integer,
1816 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
1817 conv-integer.i.c and conv-uinteger.i.c, as well.
1818
1819 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
1820 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
1821 the limits. Those are always defined.
1822
1823 2004-07-29 Kevin Ryde <user42@zip.com.au>
1824
1825 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
1826
1827 2004-07-28 Kevin Ryde <user42@zip.com.au>
1828
1829 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
1830 safety.
1831
1832 * unif.c (scm_array_set_x): For svect, use scm_num2short for
1833 consistency with other vector types and to get arg and func name into
1834 error message.
1835
1836 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1837
1838 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
1839 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
1840 scm_from_bool, respectively.
1841 (SCM_NINUMP): Added.
1842
1843 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
1844 deprecated.h. Replaced all uses with scm_is_eq.
1845
1846 2004-07-24 Kevin Ryde <user42@zip.com.au>
1847
1848 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
1849 * posix.c (scm_crypt): Use it to protect static data in crypt().
1850
1851 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1852
1853 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
1854 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
1855 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
1856 versions to deprecated.h and deprecated.c. Changed all uses to
1857 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
1858 scm_from_*, as appropriate.
1859
1860 * dynwind.c (scm_i_dowinds): Removed unused code that would call
1861 the unexisting scm_cross_dynwind_binding_scope for inums on the
1862 windlist.
1863
1864 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1865
1866 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
1867 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
1868 byte-wise address to a SCM integer. Changed all uses.
1869 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
1870 scm_to_ipv6 and added type and range checking, for converting from
1871 an IPv& byte-wise address to a SCM integer. Changed all uses.
1872 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
1873 is now done by scm_to_ipv6.
1874
1875 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
1876 not accept inexact integers.
1877
1878 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
1879 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
1880 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
1881 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
1882 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
1883 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
1884 fixnum/bignum distinction visible. Changed all uses to
1885 scm_to_size_t or similar.
1886
1887 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1888
1889 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
1890
1891 2004-07-10 Kevin Ryde <user42@zip.com.au>
1892
1893 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
1894 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
1895 such a size causes divide-by-zeros in scm_hasher.
1896
1897 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
1898 leak.
1899
1900 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1901
1902 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
1903 Rewritten using the same logic as scm_to_signed_integer and
1904 scm_to_unsigned_integer, respectively, which is better(tm). Also,
1905 use CHAR_BIT instead of hardcoding 8.
1906 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
1907 SCM_I_LLONG_MIN etc. instead.
1908
1909 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
1910 SCM_I_MAKINUM and changed all uses.
1911 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
1912
1913 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
1914 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
1915 them by assuming twos-complement.
1916
1917 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1918
1919 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
1920 configure now produces.
1921 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
1922 definitions, giving the limits of the integer types defined by
1923 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
1924 LLONG_MIN or LONG_LONG_MIN is hard to get at.
1925
1926 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
1927 SHORT_MIN.
1928 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
1929 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
1930 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
1931 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
1932 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
1933 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
1934 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
1935 scm_from_uintmax): New.
1936
1937 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1938
1939 * tags.h (scm_is_eq): New.
1940
1941 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
1942 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
1943 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
1944 scm_from_bool, and scm_is_bool, respectively.
1945
1946 * boolean.h (scm_is_bool): Fix bug in prototype.
1947 (scm_from_bool): The argument is "x" not "f", stupid.
1948
1949 * boolean.c (scm_is_bool): Fix typo.
1950
1951 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
1952 scm_is_unsigned_integer, scm_to_signed_integer,
1953 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
1954 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
1955 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
1956 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
1957 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
1958 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
1959 New.
1960
1961 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1962
1963 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
1964 scm_to_bool): New.
1965
1966 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1967
1968 * backtrace.c (display_expression, display_frame): Call
1969 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
1970 single memoized expression.
1971
1972 * debug.c (memoized_print): Don't try to unmemoize the memoized
1973 object, since we can't know whether it holds a single expression
1974 or a body.
1975
1976 (scm_mem_to_proc): Removed check for lambda expression, since it
1977 was moot anyway. Whoever uses these functions for debugging
1978 purposes should know what they do: Creating invalid memoized code
1979 will cause crashes, independent of whether this check is present
1980 or not.
1981
1982 (scm_proc_to_mem): Take the closure's code as it is and don't
1983 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
1984 memoized code should not be modified.
1985
1986 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
1987 scm_unmemoize from public use, but made scm_i_unmemoize_expr
1988 available as a guile internal function instead. However,
1989 scm_i_unmemoize_expr will only work on memoized objects that hold
1990 a single memoized expression. It won't work with bodies.
1991
1992 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
1993 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
1994 i. e. a list of expressions.
1995
1996 * eval.c (unmemoize_exprs): Drop internal body markers from the
1997 output during unmemoization.
1998
1999 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2000 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2001 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2002 as guile internal functions instead. scm_i_unmemoize_expr will
2003 only work on a single memoized expression, while
2004 scm_i_unmemocopy_body will only work on bodies.
2005
2006 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2007
2008 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2009
2010 (scm_cons_source, scm_primitive_eval): Prefer higher level
2011 predicate SCM_FALSEP over SCM_IMP.
2012
2013 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2014
2015 * script.c (scm_shell_usage): minor phrasing change.
2016
2017 * gc_os_dep.c: update ifdefery for macosx.
2018 (scm_get_stack_base): separate result initialization from
2019 declaration to slience warnings with macosx and hp-ux using gcc
2020 3.3. Thanks to Andreas Vögele.
2021
2022 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2023
2024 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2025
2026 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2027
2028 * list.[ch] (scm_i_finite_list_copy): New internal function to
2029 copy lists that are known to be finite (though not necessarily
2030 proper).
2031
2032 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2033 a closure's argument list like an expression of a body.
2034
2035 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2036 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2037 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2038 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2039 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2040 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2041 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2042 unmemoize_builtin_macro): New static functions and symbols.
2043
2044 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2045 now has a slightly different meaning: The memoized form that is
2046 receives as its argument is now interpreted as a sequence of
2047 expressions from a body.
2048
2049 (unmemocar, scm_unmemocar): Since the whole functionality of
2050 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2051 has its old content back and is deprecated, while unmemocar has
2052 been removed.
2053
2054 (SCM_BIT7): Removed.
2055
2056 (CEVAL): For unmemoizing a single expression, call
2057 unmemoize_expression instead of scm_unmemocopy, which now expects
2058 a sequence of body expressions. Eliminated unnecessary empty
2059 environment frame when executing let* forms. Eliminated
2060 unmemoization step from evaluator.
2061
2062 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2063
2064 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2065 macroexp and made static. Added new version of scm_macroexp that
2066 emits a deprecation warning and then calls macroexp.
2067 (scm_m_undefine): Issue deprecation warning.
2068
2069 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2070
2071 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2072 Modified to make set! work on symbols that represent syntactic
2073 keywords.
2074
2075 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2076
2077 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2078 compound expression as lvalue errors.
2079
2080 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2081
2082 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2083 WINDER_DATA to a SCM.
2084
2085 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2086
2087 * goops.c (compute_getters_n_setters, create_standard_classes,
2088 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2089 lambda expression rather than creating them with scm_closure.
2090
2091 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2092
2093 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2094 misplaced syntactic keywords. This will not work unless guile's
2095 defmacro feature is deprecated.
2096
2097 (scm_m_case): Fixed a bug that caused the list of labels to grow
2098 with every case form.
2099
2100 2004-05-19 Kevin Ryde <user42@zip.com.au>
2101
2102 * numbers.c (scm_round_number): For inum and big, just return x. For
2103 real, use scm_round for 2^54-1 etc problems covered there.
2104
2105 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2106 doesn't provide trunc. This was for when `truncate' was done as a
2107 scm_tc7_dsubr, no longer required.
2108
2109 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2110 to stack marking call, two parameters and no cast on t->base.
2111
2112 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2113
2114 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2115 processed hashtables back into the weak_hashtables list. Thanks
2116 to Bill Schottstaedt!
2117
2118 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2119
2120 * eval.c (unmemoize_quote): New static function.
2121
2122 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2123 representation of 'quote' and '@slot-ref' to an improper list.
2124 This reduces execution time, the number of cells used to hold the
2125 memoized code, and thus also reduces garbage collection time.
2126
2127 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2128
2129 (SCM_CEVAL): Changed macro handling to also work with macros that
2130 return improper lists. Added an assertion, that the code returned
2131 by a macro transformer will not lead to cycles in the memoized
2132 code.
2133
2134 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2135
2136 No functional change, just rearrangements of functions within the
2137 file.
2138
2139 * eval.c (scm_ilookup, scm_unbound_variable_key,
2140 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2141 the definitions used for execution, since that's where they will
2142 belong to later.
2143
2144 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2145
2146 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2147 throughout guile, has not been part of an official release yet,
2148 and the concept of sloppy predicates has never been a good idea.
2149
2150 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2151 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2152 Simplified.
2153
2154 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2155
2156 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2157 to make explicit what happens.
2158
2159 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2160
2161 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2162 explicit what happens.
2163
2164 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2165 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2166
2167 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2168
2169 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2170 is indeed a procedure when it isn't a number.
2171
2172 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2173
2174 Convert floating point numbers into strings with an arbitrary
2175 radix. Thanks to Richard Todd!
2176
2177 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2178 fit.
2179 (fx): Removed.
2180 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2181 number_chars): New, to support variable radices.
2182 (idbl2str): Use above instead of the old base-10 only tables.
2183 (iflo2str): Pass on new RADIX argument to idbl2str.
2184 (scm_number_to_string): Pass radix to iflo2str.
2185 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2186 iflo2str.
2187 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2188 possible radices.
2189
2190 2004-05-10 Kevin Ryde <user42@zip.com.au>
2191
2192 * numbers.c (scm_logbit_p): Correction to test above the end of an
2193 inum. Reported by Jan Konecny.
2194
2195 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2196
2197 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2198 scm_t_bits. Updated all users.
2199 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2200 duplicating the code.
2201 (SCM_CELL_OBJECT_LOC): New.
2202 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2203 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2204
2205 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2206 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2207 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2208 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2209 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2210 SCM_SMOB_OBJECT_3_LOC): New.
2211 * smob.c (scm_i_set_smob_flags): New function.
2212
2213 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2214 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2215 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2216 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2217 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2218 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2219
2220 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2221 taking the address of SCM_CELL_WORD_1, the latter being no longer
2222 an lvalue.
2223
2224 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2225 of casting SCM_CELL_WORD_LOC.
2226
2227 2004-05-02 Kevin Ryde <user42@zip.com.au>
2228
2229 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2230 --disable-deprecated. Reported by Andreas Vögele.
2231
2232 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2233 particular on HP-UX). Reported by Andreas Vögele.
2234
2235 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2236 code has support for. Fixes building with AIX cc, which is ansi but
2237 doesn't define __STDC__. Reported by Keith Crane.
2238 (var_start): Remove macro, this variation no longer required.
2239 (scm_list_n): Use va_start directly.
2240
2241 2004-05-01 Kevin Ryde <user42@zip.com.au>
2242
2243 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2244 is now gone. Reported by Andreas Vögele.
2245
2246 2004-04-28 Kevin Ryde <user42@zip.com.au>
2247
2248 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2249 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2250 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2251 subscript. Reported by Andreas Vögele.
2252 Also cast through unsigned char to avoid passing negatives to those
2253 macros if input contains 8-bit values.
2254
2255 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2256 corrections to range check for signed numbers. Remove
2257 scm_remember_upto_here_1(num) from these checks, since num is used
2258 subsequently anyway.
2259
2260 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2261 avoid warning from gcc 3.4. Reported by Hyperdivision.
2262
2263 * numbers.c (scm_bit_extract): Use min instead of MIN.
2264 (MIN): Remove, this conflicts with similar macro defined by limits.h
2265 on HP-UX. Reported by Andreas Vögele.
2266
2267 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2268 particular on HP-UX). Reported by Andreas Vögele.
2269
2270 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2271 Reported by Andreas Vögele.
2272
2273 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2274 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2275 by Andreas Vögele.
2276
2277 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2278
2279 * eval.c (s_macro_keyword): New static identifier.
2280
2281 (scm_m_define): Change order to first create binding and
2282 evaluating the expression afterwards.
2283
2284 (scm_m_set_x): Memoize complete set! expression. Only leave
2285 symbols if no binding exists at memoization time. Throw error if
2286 assigning to a syntactic keyword.
2287
2288 (lazy_memoize_variable): New function.
2289
2290 (CEVAL): When execution set!, perform lazy memoization if
2291 unmemoized symbol is detected.
2292
2293 * modules.c (module_variable): Return variables with unbound
2294 value.
2295
2296 * tags.h: Fix comment.
2297
2298 2004-04-25 Kevin Ryde <user42@zip.com.au>
2299
2300 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2301 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2302 in 8-bit locales, and ensures consistency with char-upper-case? and
2303 char-lower-case? which already use ctype.h.
2304 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2305 Remove.
2306 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2307
2308 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2309 call. Reported by Hyperdivision.
2310
2311 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2312 Reported by Hyperdivision.
2313
2314 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2315 Hyperdivision.
2316
2317 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2318
2319 Hide the implementation of ilocs and isyms in eval.c.
2320
2321 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2322 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2323 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2324 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2325 eval.h to eval.c.
2326
2327 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2328 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2329 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2330 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2331 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2332 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2333 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2334 renamed to ISYMNUM.
2335
2336 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2337 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2338 Extracted printing of ilocs and isyms to guile internal functions
2339 scm_i_print_iloc, scm_i_print_isym of eval.c.
2340
2341 2004-04-22 Kevin Ryde <user42@zip.com.au>
2342
2343 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
2344
2345 * numbers.c (scm_round): Test for x already an integer, to avoid bad
2346 rounding in x+0.5 when x is a big value already an integer. In
2347 certain hardware rounding cases x+0.5 can give an adjacent integer,
2348 leading to that as the result, when we really just wanted x itself.
2349
2350 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2351
2352 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
2353
2354 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
2355 added const qualifiers, cast intentionally unused expressions to
2356 void for emphasis, improved comment.
2357
2358 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2359
2360 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
2361 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
2362 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
2363 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
2364 Defined the tc8-tag for flags to be 0x04, which will mean that
2365 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
2366 to the reduced number of bits and the simpler bit pattern for
2367 SCM_BOOL_F, certain machines may be able to use more efficient
2368 processor instructions to deal with SCM_BOOL_F.
2369
2370 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
2371 never been defined in a released version, thus no need to
2372 deprecate them.
2373
2374 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
2375 instead of tc9 tags.
2376
2377 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
2378 of tc9 tags.
2379
2380 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
2381 could have used this definition.
2382
2383 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
2384 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
2385 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
2386 as isyms, as special isyms don't exist any more.
2387
2388 2004-04-18 Kevin Ryde <user42@zip.com.au>
2389
2390 * filesys.c (scm_readdir): Use readdir_r when available, for thread
2391 safety.
2392
2393 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
2394 explicit swapping code.
2395
2396 2004-04-15 Kevin Ryde <user42@zip.com.au>
2397
2398 * cpp_sig_symbols.in: Add SIGSYS.
2399
2400 * list.c (scm_append_x): Use iterative style, to avoid non-tail
2401 recursion.
2402
2403 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
2404 frac/big and frac/frac, use scm_less_p for exact comparison.
2405
2406 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
2407 with big/inum.
2408
2409 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
2410
2411 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
2412
2413 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
2414
2415 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
2416 scm_c_{up,down}case.
2417 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
2418 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2419
2420 2004-04-06 Kevin Ryde <user42@zip.com.au>
2421
2422 * numbers.c (scm_ash): Remove stray "}" in docstring.
2423
2424 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
2425 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
2426 calling mpz_cmp_ui in most cases.
2427
2428 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
2429 for big == abs(most-negative-fixnum) special case.
2430 (abs_most_negative_fixnum): Remove, no longer used.
2431
2432 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
2433 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
2434 calling (sigaction NSIG).
2435
2436 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
2437 and fork error cases to do this.
2438
2439 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2440
2441 * eval.c (CEVAL): Don't distinguish between short and long
2442 instructions when dispatching - just always dispatch on the
2443 instruction code, which is common for short and long instructions.
2444 Further, removed unnecessary goto statements and added comment.
2445
2446 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2447
2448 * eval.c (scm_unmemocopy): Don't distinguish between short and
2449 long instructions when dispatching - just always dispatch on the
2450 instruction code, which is common for short and long instructions.
2451 Further, removed unnecessary goto statements, fixed indentation
2452 and replaced SCM_IMP predicates by SCM_NULLP.
2453
2454 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2455
2456 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
2457 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
2458 'checkmacro'.
2459
2460 2004-03-31 Kevin Ryde <user42@zip.com.au>
2461
2462 * simpos.c: Include <signal.h> for SIG_IGN and friends.
2463
2464 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2465
2466 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
2467 SCM_DEBUGGINGP:
2468
2469 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
2470 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
2471 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
2472 single interface that also matches the naming conventions.
2473 Probably scm_debug_mode_p should be part of the private interface
2474 anyway.
2475
2476 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
2477 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
2478 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
2479 to scm_debug_mode_p.
2480
2481
2482 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
2483
2484 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
2485 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
2486 from debug.h to eval.h.
2487
2488 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
2489 more, just leave it with setting scm_debug_mode_p, which is
2490 equivalent for practical purposes.
2491
2492 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
2493 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
2494
2495 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
2496
2497 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
2498 static and renamed it to ceval throughout. Provide a new exported
2499 but deprecated function scm_ceval as a wrapper for backwards
2500 compatibility. The same is done for the deval/scm_deval pair of
2501 functions.
2502
2503 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
2504 throughout. Defined CEVAL to ceval or deval, based on compilation
2505 phase.
2506
2507 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
2508 to ceval and deval instead of calling *scm_ceval_ptr.
2509
2510 * eval.c (dispatching_eval): New deprecated static function.
2511
2512 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
2513 to emulate its old behaviour as closely as possible.
2514
2515
2516 Change the evaluator such that only expressions for which pair? is
2517 true are passed to CEVAL, and such that all other expressions are
2518 evaluated outside of CEVAL:
2519
2520 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
2521 expression that is assumed to be memoized already. All but
2522 expressions of the form '(<form> <form> ...)' are evaluated inline
2523 without calling an evaluator.
2524
2525 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
2526 expressions of the form '(<form> <form> ...)' inline without
2527 calling an evaluator.
2528
2529 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
2530 the special case of unmemoized symbols passed on the top level.
2531
2532 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
2533 is known that the expression passed to CEVAL is of the form
2534 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
2535 now it is known that the input expression of CEVAL is a pair.
2536
2537 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2538
2539 * eval.c (is_self_quoting_p): New static function.
2540
2541 (scm_m_quote): Use is_self_quoting_p.
2542
2543 (copy_tree): Corrected typo in comment.
2544
2545 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
2546
2547 * eval.c (s_scm_copy_tree): idem.
2548
2549 * list.c (s_scm_filter): remove "pointer" from doc string.
2550
2551 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
2552
2553 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
2554
2555 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
2556 (display_frame): idem.
2557 (display_backtrace_file_and_line): idem.
2558
2559 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
2560 arguments.
2561
2562 2004-03-26 Kevin Ryde <user42@zip.com.au>
2563
2564 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
2565
2566 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
2567 big==0 since that never occurs.
2568
2569 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
2570 scm_modular_expt, matching scheme level name `modulo-expt'.
2571
2572 * numbers.c (scm_modular_expt): Return a negative remainder for a
2573 negative divisor, the same as `modulo' does.
2574
2575 2004-03-26 Eric Hanchrow <offby1@blarg.net>
2576
2577 * numbers.c, numbers.h (scm_modular_expt): New function.
2578
2579 2004-03-25 Kevin Ryde <user42@zip.com.au>
2580
2581 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
2582 return inexact as required by r5rs.
2583
2584 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2585
2586 * eval.c: Separated some definitions relevant for execution from
2587 the memoization part of the file.
2588
2589 (copy_tree): New static function
2590
2591 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
2592 structures are detected now and will lead to an exception instead
2593 of forcing guile to run in an endless loop, using up all the
2594 system's memory. Second, arrays in the cdr of an improper list
2595 are now copied. See the new test cases in eval.test.
2596
2597 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2598
2599 * posix.c (scm_gethostname): Make sure len is initialised before
2600 it is used. Restructured to (hopefully) represent possible
2601 configurations more clearly in the code. Added unwind handler.
2602
2603 2004-03-23 Kevin Ryde <user42@zip.com.au>
2604
2605 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
2606 MAXHOSTNAMELEN when available.
2607
2608 2004-03-21 Marius Vollmer <mvo@zagadka.de>
2609
2610 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
2611 terminator. Rewritten the logic as a state machine, I must have
2612 been doing too much VHDL lately...
2613
2614 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
2615 themselves. Thanks to Han-Wen Nienhuys!
2616
2617 * list.c: Changed docstrings so that they no longer talk about
2618 returning 'pointers' to something.
2619
2620 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
2621
2622 * gc.c: remove set_debug_cell_accesses! when
2623 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
2624 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
2625 debugging conditionally.
2626
2627 2004-03-21 Kevin Ryde <user42@zip.com.au>
2628
2629 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
2630
2631 2004-03-20 Kevin Ryde <user42@zip.com.au>
2632
2633 * posix.c (scm_gethostname): Preserve errno across free() call.
2634
2635 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
2636
2637 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
2638 free cells.
2639
2640 2004-03-14 Kevin Ryde <user42@zip.com.au>
2641
2642 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
2643 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
2644
2645 2004-03-07 Kevin Ryde <user42@zip.com.au>
2646
2647 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
2648 than "GMT" always.
2649 (filltime): Make zname parameter "const".
2650
2651 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
2652
2653 * threads.c, threads.h (scm_c_scm2thread): New function.
2654
2655 2004-02-29 Kevin Ryde <user42@zip.com.au>
2656
2657 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
2658 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
2659 particular don't assume "defined (__alpha__) && ! defined (linux)"
2660 means OSF. Remove "SCO" code, which was not really SCO specific and
2661 which John W. Eaton advises should be long past being needed.
2662
2663 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
2664 error throw.
2665
2666 2004-02-24 Kevin Ryde <user42@zip.com.au>
2667
2668 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
2669
2670 2004-02-22 Kevin Ryde <user42@zip.com.au>
2671
2672 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
2673 complex, same as for two args. (Handle only inum, big, real, frac).
2674
2675 2004-02-21 Kevin Ryde <user42@zip.com.au>
2676
2677 * posix.c (scm_crypt): Use new HAVE_CRYPT.
2678 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
2679 Reported by Andreas Voegele.
2680
2681 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
2682
2683 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
2684 validation.
2685
2686 * read.c (scm_lreadparen): Removed.
2687 (scm_lreadparen1): Renamed scm_i_lreadparen.
2688
2689 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
2690
2691 * list.c (scm_list_n): validate non-immediate arguments;
2692 this will catch forgotten a SCM_UNDEFINED.
2693
2694 2004-02-18 Marius Vollmer <mvo@zagadka.de>
2695
2696 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
2697 Thanks to Bill Schottstaedt!
2698
2699 * socket.h (scm_gethost): Removed prototype it is already in
2700 "net_db.h". Thanks to Bill Schottstaedt!
2701
2702 2004-02-18 Kevin Ryde <user42@zip.com.au>
2703
2704 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
2705 order parameter to mpz_import, in fact with just one word there's no
2706 order to worry about at all.
2707
2708 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
2709 and frac==complex, make an exact comparison rather than converting
2710 with fraction2double.
2711
2712 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
2713 shared library, since environ is not directly available there.
2714
2715 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
2716 standard.
2717
2718 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
2719 errno EINVAL in case localtime and gmtime don't set it.
2720 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
2721 SCM_SYSERROR, since mktime and strptime generally don't set errno.
2722
2723 2004-02-16 Kevin Ryde <kevin@swox.se>
2724
2725 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
2726 which were permitted in the past for these.
2727
2728 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
2729 previous change to numbers.c.
2730
2731 * script.c (scm_shell_usage): Print bug-guile email address, as per
2732 GNU standard. Reported by Han-Wen Nienhuys.
2733
2734 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2735
2736 * unif.c (scm_make_uve): Removed local variable and simplified
2737 code in order to avoid compiler used uninitialized warnings.
2738
2739 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
2740 scm_hash_map.
2741 (scm_hash_fold): Use scm_call_3 directly in the call to
2742 scm_internal_hash_fold instead of going via fold_proc (which is
2743 now removed).
2744 (scm_hash_for_each): Use a trampoline +
2745 scm_internal_hash_for_each_handle.
2746 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
2747 functions.
2748
2749 2004-02-12 Kevin Ryde <user42@zip.com.au>
2750
2751 * ports.c (scm_port_line): In docstring, note first line is 0.
2752 (scm_set_port_line_x): In docstring, note first line is 0.
2753 (scm_port_column): In docstring, there's no default to current input
2754 port, and remove shared port-line @defun.
2755 (scm_set_port_column_x): In docstring, there's no default to current
2756 input port, note first column is 0, remove shared set-port-line!
2757 @defun.
2758
2759 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
2760 convert args the same way that array-set! does.
2761
2762 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
2763 for dvect.
2764 (scm_array_p): Add missing "break"s in switch, fix llvect test look
2765 for "l" not "s", fix dvect to be false for singp(prot) since such a
2766 value is for fvect.
2767 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
2768 (exactly_one_third): New variable.
2769 (scm_init_unif): Initialize it.
2770
2771 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
2772
2773 * read.c (scm_read_opts): Change `escaped-parens' to
2774 `elisp-strings'.
2775
2776 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
2777
2778 * read.c (scm_read_opts): New opts `elisp-vectors' and
2779 `escaped-parens'.
2780 (s_vector): New.
2781 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
2782 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
2783 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
2784 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
2785 `escaped-parens' option set.
2786 (scm_read_token): If elisp vector syntax active, disallow [ and ]
2787 in tokens.
2788 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
2789 (scm_lreadparen1): New.
2790
2791 * read.h: Remove conditionally compiled last arg to
2792 scm_lreadparen.
2793 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
2794
2795 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
2796
2797 * eval.c (m_expand_body): remove stray variable new_body.
2798
2799 2004-01-22 Marius Vollmer <mvo@zagadka.de>
2800
2801 * eval.c (m_expand_body): Rewrite the expression in place (by
2802 overwriting FORMS) also when a letrec is constructed, not only
2803 when no definitions are found. Do not return rewritten expression
2804 to emphasize the in-place rewriting. Changed all users.
2805
2806 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
2807
2808 * gc.c: add protected_object_count, a number that is dumped from
2809 gc_stats()
2810
2811 2004-01-11 Marius Vollmer <mvo@zagadka.de>
2812
2813 * dynwind.h, dynwind.c (scm_frame_unwind,
2814 scm_frame_unwind_handler): Renamed and changed all uses.
2815 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
2816
2817 2004-01-11 Kevin Ryde <user42@zip.com.au>
2818
2819 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
2820 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
2821 changes made to scheme-compound.texi.
2822
2823 2004-01-10 Marius Vollmer <mvo@zagadka.de>
2824
2825 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
2826 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
2827
2828 * guile-snarf.in: Use mkdir to create a unique temporary directory
2829 that we can safely use. Thanks to Stefan Nordhausen!
2830
2831 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2832
2833 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
2834 argument since it is always zero now. Changed all callers.
2835 Removed code for handling fluids.
2836
2837 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
2838 the wind chain explicitely. Use scm_c_with_fluid for the common
2839 case of only one fluid.
2840 (scm_with_fluid): New.
2841 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
2842
2843 * fluids.h, fluids.c (scm_frame_fluid): New.
2844 (scm_with_fluid): New.
2845 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
2846
2847 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
2848 do the unwinding directly. It is simple enough.
2849
2850 * dynwind.h, dynwind.c: Did the following renamings:
2851 scm_begin_frame -> scm_frame_begin,
2852 scm_end_frame -> scm_frame_end,
2853 scm_on_unwind -> scm_frame_unwind,
2854 scm_on_rewind -> scm_frame_rewind,
2855 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
2856 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
2857 Changed all uses.
2858
2859 * aync.h, async.c: Did the follwing renamings:
2860 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
2861 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
2862 Changed all uses.
2863
2864 * ports.h, ports.c: Did the follwing renamings:
2865 scm_with_current_input_port -> scm_frame_current_input_port,
2866 scm_with_current_output_port -> scm_frame_current_output_port,
2867 scm_with_current_error_port -> scm_frame_current_error_port.
2868 Changed all uses.
2869
2870 2004-01-07 Kevin Ryde <user42@zip.com.au>
2871
2872 * numbers.c (s_bignum): Remove, not used since gmp bignums.
2873 Reported by Richard Todd.
2874
2875 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
2876 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
2877
2878 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
2879 traversing the args list, fixes segv if an improper list is given.
2880 Reported by Rouben Rostamian.
2881
2882 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2883
2884 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
2885 swap_data on stack, use a 'malloc obj'.
2886
2887 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
2888 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
2889 scm_i_... since they are internal. Changed all uses.
2890
2891 * dynwind.c (frame_print): Removed, use the default printer.
2892 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
2893 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
2894 to protect SCM values.
2895
2896 * dynwind.h (SCM_F_WIND_EXPLICITELY,
2897 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
2898 Changed all uses.
2899 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
2900
2901 2004-01-05 Marius Vollmer <mvo@zagadka.de>
2902
2903 * ports.h, ports.c (scm_with_current_input_port,
2904 scm_with_current_output_port, scm_with_current_error_port): New.
2905
2906 * async.h, async.c (scm_with_blocked_asyncs,
2907 scm_with_unblocked_asyncs): New.
2908
2909 2004-01-03 Marius Vollmer <mvo@zagadka.de>
2910
2911 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
2912 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
2913 New.
2914 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
2915 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
2916 function when the outermost wind point has been reached. The
2917 latter is used to copy a continuation stack at the right time.
2918 scm_dowinds remains available.
2919 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
2920 tc16_guard, guards_print): Removed.
2921 (scm_internal_dynamic_wind): Reimplemented using frames.
2922
2923 * continuations.c (copy_stack): New, do only the stack copying
2924 part of copy_stack_and_call.
2925 (copy_stack_and_call): Copy the stack after unwinding and before
2926 rewinding.
2927 (scm_dynthrow): Do not call scm_dowinds, this is now done by
2928 copy_stack_and_call.
2929
2930 2004-01-04 Kevin Ryde <user42@zip.com.au>
2931
2932 * numbers.c (scm_less_p): Don't convert frac to float for compares,
2933 can give bad results due to rounding.
2934
2935 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
2936 setzone/restorezone protection for DOS.
2937
2938 2003-12-26 Marius Vollmer <mvo@zagadka.de>
2939
2940 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
2941 and scm_t_uintmax to be defined in scmconfig.h
2942
2943 2003-12-03 Kevin Ryde <user42@zip.com.au>
2944
2945 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
2946
2947 * numbers.c (scm_make_ratio): Check for numerator equal to
2948 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
2949 giving integer -1.
2950
2951 * numbers.c (scm_real_part): Return fraction unchanged rather than
2952 converting to flonum.
2953
2954 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2955
2956 * modules.c (module_variable): Fixed (and thus simplified) the
2957 definition of SCM_BOUND_THING_P to reflect the fact that since
2958 after the 1.4 series of guile, obarrays only hold variable
2959 objects.
2960
2961 2003-11-30 Marius Vollmer <mvo@zagadka.de>
2962
2963 * numbers.c (scm_logand): It's "#b...", not "#\b...".
2964
2965 From Paul Jarc:
2966
2967 * read.c (scm_lreadr): Signal an error for invalid escape
2968 sequences in strings. Code cleanups too.
2969
2970 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
2971 writing control characters in strings.
2972
2973 2003-11-21 Marius Vollmer <mvo@zagadka.de>
2974
2975 * ports.c (scm_drain_input): Bug fix: only access the port after
2976 checking that it indeed is one.
2977
2978 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
2979
2980 * eval.c (s_bad_define): New static identifier.
2981
2982 (m_body): Fixed comment.
2983
2984 (scm_m_define): Don't generate memoized code for definitions that
2985 are not on the top level. As a consequence, no memoized code at
2986 all is generated for definitions any more: Top level definitions
2987 are executed immediately during memoization and internal
2988 definitions are handled separately in m_expand_body.
2989
2990 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
2991 definitions. Consequently, there is no unmemoizing code any more
2992 that might modify the environment. Thus, the old scm_unmemocopy
2993 is removed and the old unmemocopy is renamed to scm_unmemocopy.
2994
2995 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
2996 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
2997 over SCM_NIMP in places, where the argument is known to be part of
2998 a proper list.
2999
3000 2003-11-21 Kevin Ryde <user42@zip.com.au>
3001
3002 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3003 for bignums.
3004
3005 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3006 to share some shifting.
3007
3008 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3009 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3010 since gc does this.
3011
3012 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3013
3014 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3015 structure. Previously, not all cases with a negative denominator
3016 were covered.
3017
3018 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3019 scm_divide2real when forming the fractional part. This allows
3020 "#e1.2" to yield 6/5.
3021
3022 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3023 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3024 fractions were equal to each other regardless of value. Ooops.
3025
3026 * numbers.c (scm_rationalize): Return an inexact result when given
3027 inexact arguments.
3028
3029 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3030 non-numbers.
3031
3032 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3033
3034 Support for exact fractions from Bill Schottstaedt! Thanks!
3035
3036 * print.c (scm_iprin1): Handle fractions.
3037
3038 * objects.h (scm_class_fraction): New.
3039 * objects.c (scm_class_fraction): New.
3040 (scm_class_of): Handle fractions.
3041
3042 * hash.c (scm_hasher): Handle fractions.
3043
3044 * numbers.c: New code for handling fraction all over the place.
3045 (scm_odd_p, scm_even_p): Handle inexact integers.
3046 (scm_rational_p): New function, same as scm_real_p.
3047 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3048 New exact functions that replace the inexact 'dsubr'
3049 implementations.
3050 (scm_numerator, scm_denominator): New.
3051
3052 * numbers.h (SCM_NUMP): Recognize fractions.
3053 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3054 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3055 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3056 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3057 SCM_FRACTION_REDUCED): New.
3058 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3059 New prototypes.
3060 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3061 scm_rational_p): New prototypes.
3062 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3063 scm_i_print_fraction): New prototypes.
3064
3065 * goops.c (create_standard_classes): Create "<fraction>" class.
3066
3067 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3068
3069 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3070 case in the switch, but do nothing for now.
3071
3072 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3073 to doubles when calling 'dsubr' functions.
3074
3075 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3076
3077 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3078
3079 * gen-scmconfig.c (main): remove public definition of
3080 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3081 direct typedef of long_long and ulong_long inside deprecated block
3082 when appropriate.
3083
3084 * deprecated.h: move long_long and ulong_long definitions to
3085 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3086 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3087
3088 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3089
3090 * hash.c (scm_string_hash): New hashing algorithm that takes the
3091 complete string into account.
3092
3093 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3094 is a list. This allows (@ ...) to work with set!.
3095 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3096 SCM_ASSYNT.
3097
3098 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3099 the "-e" option instead of scm_str2symbol. This allows things
3100 like (@ ...) to be specified for the entry point.
3101
3102 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3103
3104 * eval.c (scm_m_letstar): Create memoized code in place to
3105 minimize consing.
3106
3107 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3108
3109 * eval.c (s_splicing): Commented and reformulated.
3110
3111 (lookup_global_symbol, lookup_symbol): New static functions.
3112
3113 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3114
3115 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3116 creating a temporary pair for scm_lookupcar.
3117
3118 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3119 created deprecated wrapper function scm_unmemocar.
3120
3121 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3122 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3123 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3124 undefineds, sym_three_question_marks): Moved around without
3125 modifications.
3126
3127 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3128
3129 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3130
3131 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3132 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3133 No further modifications.
3134
3135 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3136
3137 * eval.c (s_mixed_body_forms): New static identifier.
3138
3139 (canonicalize_define, scm_m_define): The check for a bad
3140 expression is performed in canonicalize_define now.
3141
3142 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3143 static helper functions for m_expand_body.
3144
3145 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3146 expand user defined macros. Fixed handling of the definition/
3147 expression boundary. Fixed handling of definitions grouped with
3148 'begin. Use canonicalize_define to expand definitions.
3149
3150 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3151
3152 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3153 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3154
3155 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3156 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3157 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3158 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3159 New macros from Paul Jarc. Thanks!
3160
3161 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3162 return NULL when the machine type is unknown. Previously,
3163 gc_os_dep.c would refuse to compile.
3164
3165 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3166
3167 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3168 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3169 scm_m_body to m_body.
3170
3171 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3172
3173 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3174 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3175 scm_m_expand_body to m_expand_body and made it static. Added
3176 deprecated wrapper scm_m_expand_body.
3177
3178 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3179 of scm_m_expand_body.
3180
3181 2003-11-09 Kevin Ryde <user42@zip.com.au>
3182
3183 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3184 argument. Reported by Mike Gran.
3185
3186 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3187
3188 * eval.c (s_missing_body_expression): New static identifier.
3189
3190 (s_body): Removed.
3191
3192 (scm_m_expand_body): Fixed core dump when passing a body with
3193 defines, but without expressions (see additions to syntax.test).
3194 Use ASSERT_SYNTAX to signal syntax errors.
3195
3196 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3197
3198 * eval.c (canonicalize_define): New static helper function.
3199
3200 (memoize_define, canonicalize_define): Extract handling of
3201 function currying to canonicalize_define.
3202
3203 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3204
3205 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3206 Make sure that error checking in debug mode is not worse than in
3207 standard mode.
3208
3209 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3210
3211 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3212 handled in scm_m_body any more, but rather in scm_m_lambda.
3213
3214 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3215 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3216 calling functions of scm_m_body.
3217
3218 (scm_m_lambda): Avoid unnecessary consing when creating the
3219 memoized code.
3220
3221 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3222
3223 * eval.c (s_expression): Added comment.
3224
3225 (s_empty_combination, error_unbound_variable): New static
3226 identifiers.
3227
3228 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3229 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3230 signal syntax errors.
3231
3232 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3233 scheme objects.
3234
3235 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3236
3237 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3238 Grouped together with unmemocopy, without modifications.
3239
3240 (build_binding_list, unmemocopy): Renamed names of list arguments
3241 and variables to reflect the actual order of the list elements.
3242
3243 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3244
3245 * eval.c (s_defun): New static identifier.
3246
3247 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3248 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3249 when creating the memoized code.
3250
3251 2003-10-19 Kevin Ryde <user42@zip.com.au>
3252
3253 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3254
3255 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3256 in accordance with R5RS, which just mpz_get_d doesn't really give.
3257
3258 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3259
3260 * eval.c (s_bad_slot_number): New static identifier.
3261
3262 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3263 signal syntax errors. Avoid unnecessary consing when creating the
3264 memoized code.
3265
3266 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3267
3268 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3269 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3270 errors. Avoid unnecessary consing when creating the memoized
3271 code.
3272
3273 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3274 standard case. Make sure line and file information are copied to
3275 every created expression.
3276
3277 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3278
3279 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3280 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3281 when creating the memoized code.
3282
3283 (scm_m_atbind): Reversed the order, in which the init expressions
3284 are stored and executed. The order of execution is now equal to
3285 the order in which the initializers of the let-forms are executed.
3286 Use check_bindings and transform_bindings.
3287
3288 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3289 !SCM_NULLP. Added some comments.
3290
3291 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3292
3293 * eval.c: Sorted include files alphabetically.
3294
3295 (scm_m_begin): Added comment.
3296
3297 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3298 unnecessary consing when creating the memoized code.
3299
3300 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3301 syntax errors. Be more specific about the kind of error that was
3302 detected.
3303
3304 (scm_m_quote, unmemocopy): As an optimization, vector constants
3305 are now inserted unquoted into the memoized code. During
3306 unmemoization the quotes are added again to provide syntactically
3307 correct code.
3308
3309 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3310
3311 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3312 scm_m_expand_body, check_bindings): Extracted syntax checking of
3313 bindings to new static function check_bindings.
3314
3315 (scm_m_let, memoize_named_let): Extracted handling of named let to
3316 new static function memoize_named_let.
3317
3318 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3319 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3320 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3321 unnecessary consing when creating the memoized code.
3322
3323 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3324
3325 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3326 static identifiers.
3327
3328 (s_clauses, s_formals, s_duplicate_formals): Removed.
3329
3330 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3331 specific about the kind of error that was detected. Prepare for
3332 easier integration of changes for separated memoization.
3333
3334 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3335
3336 * eval.c (s_duplicate_binding): New static identifier.
3337
3338 (scm_m_case): Call scm_c_memq instead of implementing it inline.
3339
3340 (scm_m_define): Added comment about how we check for duplicate
3341 formals.
3342
3343 (scm_m_do): Added check for duplicate bindings.
3344
3345 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3346 unnecessary consing when creating the memoized code.
3347
3348 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
3349 scm_c_improper_memq to c_improper_memq, since it is not exported.
3350
3351 (transform_bindings): Call scm_c_memq rather than
3352 scm_c_improper_memq.
3353
3354 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
3355
3356 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3357
3358 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
3359 static identifiers.
3360
3361 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
3362 specific about the kind of error that was detected. Avoid use of
3363 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
3364 code, this way also making sure that file name, line number
3365 information etc. remain available.
3366
3367 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3368
3369 * eval.c (memoize_as_thunk_prototype): New static function.
3370
3371 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
3372 Avoid unnecessary consing when creating the memoized code.
3373
3374 2003-10-12 Kevin Ryde <user42@zip.com.au>
3375
3376 * list.c (scm_append): Track argument number and use in error.
3377
3378 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3379
3380 * eval.c (s_missing_expression, s_bad_variable): New static
3381 identifiers.
3382
3383 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
3384 R5RS terminology for the naming of variables. Be more specific
3385 about the kind of error that was detected. Make sure file name,
3386 line number etc. are added to all freshly created expressions.
3387 Avoid unnecessary consing when creating the memoized code.
3388
3389 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3390
3391 * eval.c (s_extra_expression, s_misplaced_else_clause,
3392 s_bad_cond_clause, s_missing_recipient): New static identifiers.
3393
3394 (s_extra_case_clause): Removed.
3395
3396 (scm_m_case, scm_m_cond): If a clause appears after an else
3397 clause, report a misplaced else clause.
3398
3399 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
3400 specific about the kind of error that was detected. Handle bound
3401 'else and '=>. Avoid unnecessary consing when creating the
3402 memoized code.
3403
3404 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3405 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
3406 syntactic keyword '=>.
3407
3408 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3409
3410 * eval.c (scm_m_case): Allow empty lists of case labels.
3411
3412 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3413
3414 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
3415
3416 * print.c (scm_isymnames): Add names for the new memoizer codes.
3417
3418 * eval.c (s_missing_clauses, s_bad_case_clause,
3419 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
3420 literal_p): New static identifiers.
3421
3422 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
3423 specific about the kind of error that was detected. Check for
3424 duplicate case labels. Handle bound 'else. Avoid unnecessary
3425 consing when creating the memoized code.
3426
3427 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3428 the syntactic keyword 'else.
3429
3430 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3431
3432 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
3433 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
3434
3435 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3436 unnecessary consing when creating the memoized code.
3437
3438 2003-10-09 Kevin Ryde <user42@zip.com.au>
3439
3440 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
3441 cast gives for values bigger than a long, or for nan or inf.
3442
3443 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3444
3445 * smob.h (scm_make_smob_type): Made the declaration match the
3446 definition.
3447
3448 2003-10-07 Marius Vollmer <mvo@zagadka.de>
3449
3450 * goops.c, objects.h, smob.c, smob.h: Make type names char
3451 const * instead of char *. Thanks to Paul Jarc!
3452
3453 2003-10-02 Kevin Ryde <user42@zip.com.au>
3454
3455 * strports.c (scm_call_with_output_string): scm_get_output_string
3456 rather than scm_strport_to_string, so as to guard against the port
3457 having been closed by the called procedure. Reported by Nic Ferrier.
3458
3459 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3460
3461 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
3462
3463 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
3464 tags.h to deprecated.h.
3465
3466 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3467
3468 This set of patches introduces a new tc7 code scm_tc7_number for
3469 numbers. Bignums, reals and complex numbers are turned from smobs
3470 into subtypes of scm_tc7_number.
3471
3472 * tags.h (scm_tc7_number): New.
3473
3474 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
3475 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
3476 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
3477 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
3478 (scm_class_of), print.c (scm_iprin1), smob.c
3479 (scm_smob_prehistory): Don't handle bignums, reals and complex
3480 numbers as subtypes of scm_tc7_smob any more.
3481
3482 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
3483 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
3484
3485 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3486
3487 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
3488 sizeof (scm_t_complex) to determine the memory size of the
3489 malloc'd area for complex numbers.
3490
3491 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3492
3493 * numbers.c (scm_bigequal): Fixed.
3494
3495 2003-09-16 Marius Vollmer <mvo@zagadka.de>
3496
3497 * stime.c (scm_current_time): 'time' does not set errno so don't
3498 use SCM_SYSERROR for reporting errors.
3499
3500 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3501
3502 This set of patches eliminates the dependency between the
3503 implementation of evaluator specific memoization codes and special
3504 constants like #f, '() etc. ('flags'), which are not evaluator
3505 specific. The goal is to remove definitions of evaluator
3506 memoization codes completely from the public interface. This will
3507 make it possible to experiment more freely with optimizations of
3508 guile's internal representation of memoized code.
3509
3510 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
3511
3512 * print.c (iflagnames): New array, holding the printed names of
3513 guile's special constants ('flags').
3514
3515 (scm_isymnames): Now holds only the printed names of the
3516 memoization codes.
3517
3518 (scm_iprin1): Separate the handling of memoization codes and
3519 guile's special constants.
3520
3521 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
3522 SCM_IFLAGNUM): new
3523
3524 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
3525 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
3526 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
3527 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
3528 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
3529 values.
3530
3531 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
3532
3533 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
3534 tc9 macros and scm_tc9_flag.
3535
3536 2003-09-15 Marius Vollmer <mvo@zagadka.de>
3537
3538 * posix.c (scm_setgroups): Check that the gid list is not too
3539 long. Thanks to Paul Jarc!
3540
3541 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
3542
3543 * tags.h: Reduced the number of short instructions from 14 to 13.
3544 The typecode of the former 14th short instruction is now used to
3545 represent long instructions. Changed some comments to reflect
3546 this fact.
3547
3548 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
3549 previously used by SCM_IM_DEFINE.
3550
3551 (SCM_IM_DEFINE): Turned into a long instruction.
3552
3553 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
3554 instruction.
3555
3556 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
3557 code that is separate from all instructions, one level of dispatch
3558 for long instructions can be eliminated.
3559
3560 * print.c (scm_isymnames): Removed some commented code.
3561
3562 2003-09-12 Marius Vollmer <mvo@zagadka.de>
3563
3564 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
3565 compiler on IA64.
3566
3567 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
3568
3569 * modules.c (scm_module_reverse_lookup): Check that the obarray
3570 really is a hashtable and do nothing if not.
3571
3572 * inline.h: Use "extern inline" only with GCC. Use "static
3573 inline" else.
3574
3575 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3576
3577 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
3578 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3579
3580 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
3581 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
3582 deprecated.h.
3583
3584 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3585
3586 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
3587 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3588
3589 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
3590 0.0==some_expression to some_expression==0.0. The latter is
3591 better readable. The former is preferred by some people, since it
3592 leads to a compiler error when confusing == with =. However, when
3593 using gcc, a warning will be issued if in an if-statement an
3594 assigment appears. Since many Guile developers are using gcc,
3595 such errors will not remain unnoticed anyway. We can therefore
3596 focus on better readability.
3597
3598 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3599
3600 * tags.h: Added description of Guile's type system. Removed some
3601 old and misleading comments.
3602
3603 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3604
3605 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
3606 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3607
3608 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3609
3610 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
3611
3612 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
3613 respective SLOPPY macro.
3614
3615 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3616
3617 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
3618 type string, not SCM_TYP7S.
3619
3620 2003-09-03 Kevin Ryde <user42@zip.com.au>
3621
3622 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
3623 2s-complement.
3624
3625 * stime.c (scm_strptime): Add comment about glibc strptime %s and
3626 current timezone requiring SCM_DEFER_INTS.
3627
3628 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
3629
3630 * script.c (scm_compile_shell_switches): Make -s switch optional
3631 if file to be loaded does not begin with a `-'. (Thanks to Aaron
3632 VanDevender for the patch!)
3633
3634 2003-08-30 Kevin Ryde <user42@zip.com.au>
3635
3636 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
3637 and to have non-integer types rejected as per other logical funcs.
3638
3639 2003-08-28 Kevin Ryde <user42@zip.com.au>
3640
3641 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
3642
3643 2003-08-23 Kevin Ryde <user42@zip.com.au>
3644
3645 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
3646 thread safe, and could take a long time too.
3647
3648 2003-08-22 Kevin Ryde <user42@zip.com.au>
3649
3650 * numbers.c (scm_difference): Correction to bignum - negative inum.
3651
3652 2003-08-14 Kevin Ryde <user42@zip.com.au>
3653
3654 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
3655 [__GNUC__]: Use volatile asm macros rather than a function call.
3656 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
3657 macros while defining functions.
3658
3659 * simpos.c (getenv): Use <stdlib.h> for prototype.
3660 (scm_system): In docstring, refer to status:exit-val rather than
3661 "functions above".
3662
3663 2003-08-09 Kevin Ryde <user42@zip.com.au>
3664
3665 * srcprop.c (scm_source_properties): Return plist from hash if it's a
3666 list set by source-properties! rather than an SRCPROPS object,
3667
3668 2003-07-29 Kevin Ryde <user42@zip.com.au>
3669
3670 * properties.c (scm_primitive_property_ref): In docstring, note
3671 parameters to not-found-proc, use hyphens rather than underscores for
3672 that parameter name.
3673 (scm_primitive_property_set_x): In docstring, VAL is the value
3674 parameter not CODE.
3675
3676 2003-07-27 Marius Vollmer <mvo@zagadka.de>
3677
3678 * print.c (scm_print_symbol_name): handle more weird characters by
3679 escaping the symbol name properly. Thanks to Paul Jarc!
3680
3681 * posix.h (scm_setgroups): New prototype.
3682 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
3683 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
3684 Don't use SCM_WRITABLE_VELTS.
3685
3686 * gc.h (SCM_GC_SET_CELL_BVEC): New.
3687 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
3688 Matthias Koeppe!
3689
3690 * __scm.h (SCM_C_INLINE_KEYWORD): New.
3691 * numbers.c: Use it in place of SCM_C_INLINE so that the code
3692 compiles when SCM_C_INLINE is undefined.
3693
3694 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
3695
3696 * __scm.h: Reformulated the architecture and compiler properties
3697 in terms of properties of scm_t_bits and SCM variables rather than
3698 in terms of c standard types. This is since it is not known which
3699 of the standard types scm_t_bits and SCM variables will be defined
3700 to.
3701
3702 2003-07-24 Kevin Ryde <user42@zip.com.au>
3703
3704 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
3705 and real.
3706
3707 2003-07-18 Kevin Ryde <user42@zip.com.au>
3708
3709 * numbers.c (scm_product): In complex * bignum, correction to
3710 REAL/IMAG fetch, x is the complex, not y.
3711
3712 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3713
3714 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
3715 scm_inf_p test as Scheme values.
3716 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
3717 and a positive inum.
3718 Use GNU indentation style.
3719
3720 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3721
3722 * values.c (scm_values): Build lists of length 1 by using
3723 scm_list_1 instead of using scm_cons.
3724
3725 2003-07-10 Kevin Ryde <user42@zip.com.au>
3726
3727 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
3728 * list.c (scm_list_n): Ditto.
3729
3730 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
3731
3732 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
3733
3734 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
3735 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
3736 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
3737 the other using intptr_t.
3738
3739 2003-07-08 Kevin Ryde <user42@zip.com.au>
3740
3741 * numbers.c (scm_make_polar): Use sincos, when available.
3742 (scm_magnitude): Use hypot.
3743
3744 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
3745 @footnote since it doesn't go through to guile-procedures.txt.
3746
3747 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
3748 outside @var to quieten makeinfo, and use @code.
3749
3750 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3751
3752 * gc-malloc.c (decrease_mtrigger): new function
3753 (increase_mtrigger): new function, separate debug registering and
3754 mtrigger administration.
3755 (scm_gc_realloc): bugfix: do mtrigger administration before the
3756 actual realloc, for the realloc might invalidate a GC-d segment of
3757 memory. Thanks to Sam Hocevar for pointing this out.
3758 (scm_gc_realloc): use scm_malloc_reregister instead of
3759 unregistering and registering in sequence.
3760
3761 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3762
3763 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
3764
3765 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3766
3767 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
3768 clauses.
3769
3770 2003-06-29 Marius Vollmer <mvo@zagadka.de>
3771
3772 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
3773 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
3774 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
3775 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
3776 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
3777 the release_1_6 branch.
3778
3779 2003-06-25 Stefan Jahn <stefan@lkcc.org>
3780
3781 * continuations.c: Redeclaration of getcontext() via the
3782 __asm__ ("getcontext") directive.
3783
3784 * continuations.h: Include <ucontext.h> instead of
3785 <sys/ucontext.h>.
3786
3787 2003-06-21 Kevin Ryde <user42@zip.com.au>
3788
3789 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
3790 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
3791 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
3792 available.
3793 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
3794 (isfinite): Remove, conflicts with C99 isfinite().
3795
3796 2003-06-19 Marius Vollmer <mvo@zagadka.de>
3797
3798 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
3799 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
3800 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
3801 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
3802 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
3803 the release_1_6 branch.
3804
3805 2003-06-14 Stefan Jahn <stefan@lkcc.org>
3806
3807 * threads.h: Redefined scm_getspecific() and scm_setspecific()
3808 to be functions instead of macros.
3809
3810 * threads.c: Conditionalized inclusion of <sys/time.h> and
3811 <unistd.h>.
3812 (scm_getspecific, scm_setspecific): Made these two function
3813 real part of the API.
3814
3815 * posix.c (s_scm_putenv): Added some code to make a
3816 (putenv "FOO="), i.e. setting an empty string, work also on
3817 Win32 systems. Thanks to Kevin Ryde for the proposal.
3818
3819 2003-06-12 Kevin Ryde <user42@zip.com.au>
3820
3821 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
3822 freebsd to comment about need to use unsetenv.
3823
3824 2003-06-02 Marius Vollmer <mvo@zagadka.de>
3825
3826 * ports.c (scm_peek_char): Safe the column of the port around the
3827 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
3828
3829 2003-06-07 Kevin Ryde <user42@zip.com.au>
3830
3831 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
3832 and friends required by scm_t_bits setups.
3833
3834 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3835
3836 * tags.h (scm_tc2_int): Added.
3837
3838 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
3839 scm_tc2_int.
3840
3841 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
3842 scm_tcs_closures): Hard coded values replaced by symbolic ones.
3843
3844 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
3845
3846 * eval.c: Partially undid my patch from 2003-05-31. This patch
3847 caused the segfault referenced in the previous changelog entry.
3848
3849 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
3850
3851 * tags.h: Fixed comment about the immediate type code layout.
3852
3853 * eval.c: Fixed handling of non-special instructions. Without
3854 this patch, guile will segfault on (#\0) and similar instructions.
3855
3856 2003-06-05 Kevin Ryde <user42@zip.com.au>
3857
3858 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
3859 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
3860
3861 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
3862 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
3863
3864 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3865
3866 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
3867 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
3868 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
3869 generalized it to apply not only to C level functions but also to
3870 scheme level functions.
3871
3872 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
3873 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
3874 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
3875 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
3876 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
3877 respectively.
3878
3879 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
3880 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
3881 eval.h into eval.c and a copy is placed into deprecated.h.
3882
3883 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
3884 into eval.c. This definition was not part of the API in any
3885 officially released version of guile and thus does not need to go
3886 through a phase of deprecation.
3887
3888 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3889
3890 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
3891 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
3892 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
3893 definitions are make static and renamed from scm_s_xxx to s_xxx.
3894 In deprecated.c the original definitions are copied.
3895
3896 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
3897 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
3898 eval.h into eval.c and a copy (slightly modified to work in user
3899 code) is placed into deprecated.h.
3900
3901 * eval.c: Use the local static s_xxx definitions instead of the
3902 scm_s_xxx definitions throughout.
3903
3904 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3905
3906 This set of patches separates the representation of the cxr family
3907 of functions (car, cdr etc.) from the dsubr family of functions
3908 (i. e. functions that take a double precision floating point
3909 argument). Further, the algorithm for handling the cxr function
3910 is improved.
3911
3912 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
3913 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
3914 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
3915 cosh, tanh), objects.c (scm_class_of), procprop.c
3916 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
3917 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
3918 typecode for the dsubr family of functions.
3919
3920 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
3921 ramap_dsubr.
3922
3923 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
3924 (scm_init_pairs): Make use of the (now usable) second cell element
3925 of a scm_tc7_cxr function to implement the cxr family of functions
3926 more efficiently.
3927
3928 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3929
3930 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
3931 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
3932 end of an if-else-if-sequence of checks.
3933
3934 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3935
3936 * eval.c (SCM_CEVAL): Improved readability of call-with-values
3937 execution. Generalize apply_closure to apply_proc and use that
3938 for call-with-values.
3939
3940 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3941
3942 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
3943 a non closure.
3944
3945 2003-05-30 Stefan Jahn <stefan@lkcc.org>
3946
3947 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
3948 appropriately for mingw32 hosts.
3949
3950 * numbers.h: Defining copysign(), isnan() and finite() to
3951 be prefixed by a single '_' for mingw32 hosts.
3952
3953 2003-05-30 Kevin Ryde <user42@zip.com.au>
3954
3955 * numbers.c (z_negative_one): New variable.
3956 (scm_init_numbers): Initialize it.
3957 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
3958
3959 2003-05-29 Stefan Jahn <stefan@lkcc.org>
3960
3961 * win32-dirent.c: Use malloc() instead of scm_malloc().
3962
3963 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
3964 warning.
3965
3966 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
3967 mingw32 build.
3968
3969 * modules.c (s_scm_module_import_interface): Renamed local
3970 variable interface to _interface. Seems like 'interface'
3971 is a special compiler directive for the mingw32 compiler.
3972
3973 * mkstemp.c: Provide prototype to avoid compiler warning.
3974
3975 * load.c (s_scm_search_path): Fixed absolute and relative
3976 path detections for native Windows platforms.
3977
3978 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
3979 to build on mingw32).
3980
3981 * gc-freelist.c ("s_scm_map_free_list",
3982 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
3983
3984 * fports.c (fport_fill_input): Disable use of
3985 fport_wait_for_input() on Win32 platforms.
3986
3987 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
3988
3989 * Makefile.am: Modified some rules for cross compiling.
3990
3991 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3992
3993 * eval.c (SCM_CEVAL): In case of an application, all checks for a
3994 proper function object and the correct number of arguments are now
3995 performed in the application part of SCM_CEVAL.
3996
3997 (scm_badformalsp): Removed.
3998
3999 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4000
4001 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4002
4003 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4004
4005 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4006 always being false by inserting preprocessor conditional. (Thanks
4007 to Bruce Korb.)
4008
4009 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4010 (void *) in order to avoid an aliasing warning; thanks to Bruce
4011 Korb.)
4012
4013 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4014
4015 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4016 SCM_STACK_PTR.
4017
4018 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4019 thread->base --> t->base.
4020
4021 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4022
4023 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4024
4025 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4026 scm_variable_set_name_hint, scm_builtin_variable,
4027 scm_internal_with_fluids, scm_make_gsubr,
4028 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4029 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4030 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4031 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4032 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4033 scm_make_subr_with_generic, scm_make_subr_opt,
4034 scm_call_catching_errors, scm_make_smob_type_mfpe,
4035 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4036 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4037 branch. Some have been slightly rewritten.
4038 (scm_i_object_chars, scm_i_object_length): New, to support
4039 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4040
4041 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4042
4043 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4044 names and inits in the memoized code of do.
4045
4046 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4047
4048 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4049 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4050 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4051 a compilation error if error-on-warning is enabled).
4052
4053 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4054
4055 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4056 removes preprocessor directives from the snarfage that might
4057 otherwise confuse us. These directives appear when compiling with
4058 "-g3", for example.
4059
4060 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4061
4062 * ChangeLog: add my surname
4063
4064 * srcprop.c (scm_finish_srcprop): use
4065 scm_gc_register_collectable_memory()
4066 (scm_make_srcprops): idem.
4067
4068 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4069
4070 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4071 wrap-around for scm_mtrigger
4072 (scm_gc_register_collectable_memory): abort on overflowing
4073 scm_mallocated().
4074
4075 2003-05-13 Kevin Ryde <user42@zip.com.au>
4076
4077 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4078 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4079
4080 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4081
4082 * backtrace.c (scm_display_error_message): Introduced fancy
4083 printing with max level 7 and length 10. (Purpose: avoid printing
4084 gigantic objects in error messages.)
4085
4086 * print.c, print.h (scm_i_port_with_print_state): New function.
4087
4088 * print.c (scm_iprin1, scm_printer_apply,
4089 scm_port_with_print_state): Use scm_i_port_with_print_state.
4090 (scm_simple_format): Modified not to destroy print states.
4091 (print_state_mutex): New mutex.
4092 (scm_make_print_state, scm_free_print_state, scm_prin1):
4093 Lock/unlock print_state_mutex.
4094
4095 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4096 Use current names in definitions.
4097
4098 2003-05-10 Kevin Ryde <user42@zip.com.au>
4099
4100 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4101
4102 * numbers.c (scm_integer_length): On negative bignums, adjust
4103 mpz_sizeinbase to account for it looking at absolute value where we
4104 want ones-complement.
4105
4106 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4107 since we're only using the ulong return value, and x might not fit.
4108
4109 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4110
4111 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4112 read. This will allow to make the definition in read.c static.
4113
4114 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4115
4116 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4117 from evalext to eval. This will allow to make some of the
4118 definitions in eval.c static.
4119
4120 2003-05-06 Kevin Ryde <user42@zip.com.au>
4121
4122 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4123 (scm_logcount): Use mpz_com, not mpz_neg.
4124
4125 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4126
4127 The purpose of this patch is to make guile's internal memoizers
4128 distinguishable from memoizing macros created on the scheme level
4129 or from user provided primitive memoizing macros. The reason is,
4130 that the internal memoizers are the only ones that are allowed to
4131 transform their scheme input into memoizer byte code, while all
4132 other memoizing macros may only transform scheme code into new
4133 scheme code.
4134
4135 To achieve this, a new macro type 'builtin-macro!' is introduced.
4136 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4137 this will change when the memoizer and executor are separated.
4138
4139 * macros.[ch] (scm_i_makbimacro): New.
4140
4141 * macros.h (SCM_BUILTIN_MACRO_P): New.
4142
4143 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4144
4145 * eval.c, goops.c: All of guile's primitive memoizing macros are
4146 primitive builtin-macros now.
4147
4148 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4149 builtin-macros are handled equally to memoizing macros.
4150
4151 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4152
4153 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4154 work around a bug in GCC 2.95.2 but is now a bug in itself.
4155
4156 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4157
4158 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4159 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4160 scm_tcs_symbols): New.
4161
4162 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4163
4164 * deprecated.h, deprecated.c (scm_protect_object,
4165 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4166 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4167 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4168 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4169 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4170 scm_ptob_descriptor, scm_port_rw_active,
4171 scm_close_all_ports_except): New.
4172
4173 * ports.c (scm_c_port_for_each): New function, mostly copied from
4174 scm_port_for_each.
4175 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4176 * ports.h (scm_c_port_for_each): New prototype.
4177
4178 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4179
4180 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4181 macro was introduced in anticipation of GOOPS method compilation
4182 code.)
4183
4184 * goops.c: Removed binding of @dispatch.
4185
4186 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4187
4188 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4189 instructions that bind the macros on the scheme level back to
4190 goops.c in order to make sure again that the bindings go into the
4191 (oop goops) module and are not visible from the outside.
4192
4193 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4194
4195 * eval.c: Non functional change: Separated R5RS and non-R5RS
4196 macros into different sections of the file and ordered the
4197 memoizers alphabetically.
4198
4199 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4200
4201 * eval.c (scm_ilookup): Rewritten to improve readability.
4202
4203 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4204
4205 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4206 Partially reverted patch from 2003-04-23 in oder to find a better
4207 compromise between readability and debuggability.
4208
4209 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4210
4211 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4212 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4213 definitions of the special goops memoizers from goops.[ch] to
4214 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4215 throughout guile.
4216
4217 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4218
4219 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4220
4221 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4222
4223 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4224
4225 * ioext.c (scm_fdes_to_ports): Ditto.
4226
4227 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4228 lock/unlock scm_i_port_table_mutex.
4229
4230 * strports.c (scm_mkstrport): Ditto.
4231
4232 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4233
4234 * fports.c (scm_fdes_to_port): Ditto.
4235
4236 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4237
4238 This set of patches contains no functional changes, only debatable
4239 minor stylistic ones. Still, in order to prepare a patch between
4240 my local copy and the CVS version, I decided to submit the changes
4241 below. Then, the patch will hopefully only contain relevant
4242 modifications :-)
4243
4244 * eval.c (iqq): Added const specifier.
4245
4246 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4247 Use NULL instead of 0 to indicate that a pointer is returned.
4248 Removed some misleading 'fall through' comments.
4249
4250 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4251 Split up long expressions into smaller ones to be more debugging
4252 friendly.
4253
4254 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4255
4256 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4257 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4258 rather than casting to SCM.
4259
4260 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4261
4262 * sort.c, pairs.h: Removed unnecessary includes.
4263
4264 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4265
4266 * sort.c: Replaced hand-made trampline code by the new official
4267 mechanism from eval.c. This fixes a segfault in the new test file
4268 sort.test.
4269
4270 (quicksort, compare_function, scm_restricted_vector_sort_x,
4271 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4272 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4273 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4274 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4275 eval.c.
4276
4277 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4278 cmp_fun_t): Removed.
4279
4280 (compare_function): Added.
4281
4282 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4283 arithmetics with index arithmetics. Changed quicksort to work on
4284 an array of SCM values instead of an array of characters. Avoid
4285 bytewise copying of SCM elements. Avoid allocating memory on the
4286 stack with alloca. Fixed some comments.
4287
4288 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4289
4290 * eval.c (EXTEND_ENV): Eliminated.
4291
4292 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4293 EXTEND_ENV.
4294
4295 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4296
4297 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4298
4299 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4300 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4301
4302 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4303 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4304 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4305 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4306 functions such that they check if the object is a non-immediate.
4307 Further, renamed identifiers to use the scm_dbg_ prefix and made
4308 their inclusion into the lib dependent of the
4309 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4310
4311 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4312
4313 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4314 debug option.
4315
4316 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4317
4318 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4319 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4320 any calls to SCM_NCONSP any more.
4321
4322 * unif.c (l2ra): Eliminate redundant check.
4323
4324 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4325
4326 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4327 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4328 SCM_NNULLP. Now, guile itself does not include any calls to
4329 SCM_NNULLP any more.
4330
4331 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4332
4333 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4334 scm_copy_tree): Place assignment expressions which are part of
4335 other expressions into an expression of their own.
4336
4337 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4338
4339 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
4340 compare SCM values with !=.
4341
4342 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4343
4344 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
4345 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
4346 and definition of the memoizer for the generalized set! macro from
4347 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
4348 define the macro object.
4349
4350 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
4351 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
4352 eval.c, it is made static and renamed to s_set_x.
4353
4354 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
4355 over SCM_N<foo>.
4356
4357 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4358
4359 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
4360 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
4361 to undefineds and registered the object as a permanent object.
4362
4363 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
4364 static in eval.c, renamed it to f_apply and registered the object
4365 as a permanent object.
4366
4367 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4368
4369 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4370 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
4371
4372 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4373
4374 * numbers.c (scm_logtest): Fixed argument bug in the call to
4375 mpz_and, which showed up when compiling with SCM_DEBUG defined.
4376
4377 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4378
4379 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4380 type errors that showed up when compiling with SCM_DEBUG defined.
4381
4382 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4383
4384 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
4385 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
4386 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
4387 fix compile errors with --disable-deprecated.
4388
4389 2003-04-17 Rob Browning <rlb@defaultvalue.org>
4390
4391 * numbers.c (scm_integer_expt): fix case where we were declaring
4392 vars in the middle of a statement block. Thanks to Thamer
4393 Al-Harbash.
4394
4395 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4396
4397 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
4398 change.
4399
4400 * eq.c (scm_eqv_p): Turned into a primitive generic.
4401
4402 2003-04-16 Rob Browning <rlb@defaultvalue.org>
4403
4404 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
4405 Thanks to Boyd Gerber.
4406 Added check for __arm__ in addition to arm for LINUX and copied
4407 __s390__ defines from upstream libgc. Thanks to James Treacy for
4408 reporting the problems.
4409
4410 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
4411
4412 * socket.c: use SCM_CHAR_BIT.
4413
4414 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
4415
4416 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
4417
4418 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4419
4420 * feature.c (scm_init_feature): Always add threads feature.
4421
4422 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4423
4424 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
4425 scm_at_assert_bound_ref. (We don't want the unbound check. See
4426 oop/goops/active-slot.scm.)
4427
4428 2003-04-14 Rob Browning <rlb@defaultvalue.org>
4429
4430 * tags.h: scm_t_intptr should have been intptr_t.
4431
4432 2003-04-13 Rob Browning <rlb@defaultvalue.org>
4433
4434 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
4435 test. Instead use
4436 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
4437 as gc_os_dep.c suggests is appropriate.
4438
4439 * goops.c (prep_hashsets): make static to match prototype.
4440 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
4441 Chin.
4442
4443 * c-tokenize.lex: remove trailing comma from enum. Thanks to
4444 Albert Chin.
4445
4446 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
4447 Klausner.
4448
4449 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4450
4451 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
4452 indicated through extra fields in getters-n-setters.
4453 (scm_add_slot): Adapted to new format of getters_n_setters slot.
4454 (Thanks to Andy Wingo.)
4455
4456 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4457
4458 * gc-segment.c: add comment
4459
4460 2003-04-07 Rob Browning <rlb@defaultvalue.org>
4461
4462 * debug.h: change "id" arg name to "info_id" to avoid objective-c
4463 clash.
4464
4465 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
4466 and add regression test to standalone/.
4467
4468 2003-04-06 Rob Browning <rlb@defaultvalue.org>
4469
4470 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
4471 Thanks to Dale P. Smith.
4472
4473 * random.c: #include gmp.h.
4474 (scm_c_random_bignum): normalize result on return.
4475
4476 * init.c: #include gmp.h.
4477
4478 * numbers.h: remove the gmp.h #include (not needed now).
4479
4480 * posix.h: change occurences of "id" to something else so we don't
4481 cause trouble when included via objective-c (can't hurt, might
4482 help). Still have usage in debug.h, though.
4483
4484 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4485
4486 * random.c (scm_c_random_bignum): Don't generate a random number
4487 equal to m (the second argument of scm_c_random_bignum); only
4488 generate numbers in the range 0 <= r < m.
4489 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
4490 scm_var_random_state.
4491
4492 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
4493 clause.
4494
4495 2003-04-05 Rob Browning <rlb@defaultvalue.org>
4496
4497 * modules.c (scm_module_import_interface): move declaration of
4498 uses before any code.
4499
4500 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4501
4502 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
4503 not top_srcdir.
4504
4505 * hashtab.c (rehash_after_gc): Clear to_rehash list before
4506 processing it in order to avoid an infinite loop.
4507
4508 * print.c (scm_prin1): Remember old state of pstate->writingp.
4509
4510 2003-04-05 Marius Vollmer <mvo@zagadka.de>
4511
4512 * Changed license terms to the plain LGPL thru-out.
4513
4514 2003-04-04 Rob Browning <rlb@defaultvalue.org>
4515
4516 * socket.c (FLIPCPY_NET_HOST_128): new macro.
4517 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
4518 rewrite to handle GMP bignums.
4519
4520
4521 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
4522
4523 * ports.c (scm_getc): minor tweak.
4524
4525 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
4526 rewrite to handle GMP bignums.
4527
4528 * numbers.c: rewrite *many* functions to handle GMP bignums.
4529
4530 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
4531 handle GMP bignums.
4532
4533 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
4534
4535 * init.c (check_config): remove SCM_BIGDIG conditionals.
4536 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
4537
4538 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
4539
4540 * eval.c: remove SCM_BIGDIG conditionals.
4541
4542 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
4543
4544 2003-03-31 Rob Browning <rlb@defaultvalue.org>
4545
4546 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
4547 to Kevin Ryde.)
4548
4549 2003-03-27 Rob Browning <rlb@defaultvalue.org>
4550
4551 * threads.h: fix various preprocessor usages of new public
4552 symbols to expect 0 or 1 values rather than 1 or undefined.
4553 i.e. change #ifdef to #if, etc.
4554
4555 * threads.c: fix various preprocessor usages of new public
4556 symbols to expect 0 or 1 values rather than 1 or undefined.
4557 i.e. change #ifdef to #if, etc.
4558
4559 * tags.h: fix various preprocessor usages of new public
4560 symbols to expect 0 or 1 values rather than 1 or undefined.
4561 i.e. change #ifdef to #if, etc.
4562
4563 * stacks.c: fix various preprocessor usages of new public
4564 symbols to expect 0 or 1 values rather than 1 or undefined.
4565 i.e. change #ifdef to #if, etc.
4566
4567 * stackchk.h: fix various preprocessor usages of new public
4568 symbols to expect 0 or 1 values rather than 1 or undefined.
4569 i.e. change #ifdef to #if, etc.
4570
4571 * stackchk.c: fix various preprocessor usages of new public
4572 symbols to expect 0 or 1 values rather than 1 or undefined.
4573 i.e. change #ifdef to #if, etc.
4574
4575 * sort.c: fix various preprocessor usages of new public
4576 symbols to expect 0 or 1 values rather than 1 or undefined.
4577 i.e. change #ifdef to #if, etc.
4578
4579 * read.c: fix various preprocessor usages of new public
4580 symbols to expect 0 or 1 values rather than 1 or undefined.
4581 i.e. change #ifdef to #if, etc.
4582
4583 * random.c: fix various preprocessor usages of new public
4584 symbols to expect 0 or 1 values rather than 1 or undefined.
4585 i.e. change #ifdef to #if, etc.
4586
4587 * print.c: fix various preprocessor usages of new public
4588 symbols to expect 0 or 1 values rather than 1 or undefined.
4589 i.e. change #ifdef to #if, etc.
4590
4591 * objects.c: fix various preprocessor usages of new public
4592 symbols to expect 0 or 1 values rather than 1 or undefined.
4593 i.e. change #ifdef to #if, etc.
4594
4595 * numbers.h: fix various preprocessor usages of new public
4596 symbols to expect 0 or 1 values rather than 1 or undefined.
4597 i.e. change #ifdef to #if, etc.
4598
4599 * null-threads.c: fix various preprocessor usages of new public
4600 symbols to expect 0 or 1 values rather than 1 or undefined.
4601 i.e. change #ifdef to #if, etc.
4602
4603 * lang.c: fix various preprocessor usages of new public
4604 symbols to expect 0 or 1 values rather than 1 or undefined.
4605 i.e. change #ifdef to #if, etc.
4606
4607 * lang.h: fix various preprocessor usages of new public
4608 symbols to expect 0 or 1 values rather than 1 or undefined.
4609 i.e. change #ifdef to #if, etc.
4610
4611 * iselect.h: fix various preprocessor usages of new public
4612 symbols to expect 0 or 1 values rather than 1 or undefined.
4613 i.e. change #ifdef to #if, etc.
4614
4615 * init.c: fix various preprocessor usages of new public
4616 symbols to expect 0 or 1 values rather than 1 or undefined.
4617 i.e. change #ifdef to #if, etc.
4618
4619 * gh_data.c: fix various preprocessor usages of new public
4620 symbols to expect 0 or 1 values rather than 1 or undefined.
4621 i.e. change #ifdef to #if, etc.
4622
4623 * gh.h: fix various preprocessor usages of new public
4624 symbols to expect 0 or 1 values rather than 1 or undefined.
4625 i.e. change #ifdef to #if, etc.
4626
4627 * gen-scmconfig.c: change most new public symbols to be defined to
4628 0 or 1 rather than being either 1 or undefined.
4629
4630 * gc_os_dep.c: fix various preprocessor usages of new public
4631 symbols to expect 0 or 1 values rather than 1 or undefined.
4632 i.e. change #ifdef to #if, etc.
4633 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
4634
4635 * gc.h: fix various preprocessor usages of new public
4636 symbols to expect 0 or 1 values rather than 1 or undefined.
4637 i.e. change #ifdef to #if, etc.
4638
4639 * gc-card.c: fix various preprocessor usages of new public
4640 symbols to expect 0 or 1 values rather than 1 or undefined.
4641 i.e. change #ifdef to #if, etc.
4642
4643 * gc-mark.c: fix various preprocessor usages of new public
4644 symbols to expect 0 or 1 values rather than 1 or undefined.
4645 i.e. change #ifdef to #if, etc.
4646
4647 * feature.c: fix various preprocessor usages of new public
4648 symbols to expect 0 or 1 values rather than 1 or undefined.
4649 i.e. change #ifdef to #if, etc.
4650
4651 * evalext.c: fix various preprocessor usages of new public
4652 symbols to expect 0 or 1 values rather than 1 or undefined.
4653 i.e. change #ifdef to #if, etc.
4654
4655 * eval.h: fix various preprocessor usages of new public
4656 symbols to expect 0 or 1 values rather than 1 or undefined.
4657 i.e. change #ifdef to #if, etc.
4658
4659 * eval.c: fix various preprocessor usages of new public
4660 symbols to expect 0 or 1 values rather than 1 or undefined.
4661 i.e. change #ifdef to #if, etc.
4662
4663 * eq.c: fix various preprocessor usages of new public
4664 symbols to expect 0 or 1 values rather than 1 or undefined.
4665 i.e. change #ifdef to #if, etc.
4666
4667 * coop.c: fix various preprocessor usages of new public
4668 symbols to expect 0 or 1 values rather than 1 or undefined.
4669 i.e. change #ifdef to #if, etc.
4670
4671 * coop-threads.c: fix various preprocessor usages of new public
4672 symbols to expect 0 or 1 values rather than 1 or undefined.
4673 i.e. change #ifdef to #if, etc.
4674
4675 * coop-pthreads.c: fix various preprocessor usages of new public
4676 symbols to expect 0 or 1 values rather than 1 or undefined.
4677 i.e. change #ifdef to #if, etc.
4678
4679 * coop-defs.h: fix various preprocessor usages of new public
4680 symbols to expect 0 or 1 values rather than 1 or undefined.
4681 i.e. change #ifdef to #if, etc.
4682
4683 * convert.i.c: fix various preprocessor usages of new public
4684 symbols to expect 0 or 1 values rather than 1 or undefined.
4685 i.e. change #ifdef to #if, etc.
4686
4687 * continuations.c: fix various preprocessor usages of new public
4688 symbols to expect 0 or 1 values rather than 1 or undefined.
4689 i.e. change #ifdef to #if, etc.
4690
4691 * _scm.h: fix various preprocessor usages of new public symbols to
4692 expect 0 or 1 values rather than 1 or undefined. i.e. change
4693 #ifdef to #if, etc.
4694
4695 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4696
4697 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
4698
4699 * deprecated.c, deprecated.h: New files, to collect deprecated
4700 things in one place.
4701 * Makefile.am: Added them in all the right places.
4702
4703 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
4704 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
4705 builds work.
4706 (DOT_X_FILES): Removed "iselect.x".
4707 (DOT_DOC_FILES): Removed "iselect.doc".
4708
4709 2003-03-25 Rob Browning <rlb@defaultvalue.org>
4710
4711 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
4712 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
4713
4714 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
4715
4716 * vports.c: #include <config.h> if HAVE_CONFIG_H.
4717
4718 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
4719 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
4720
4721 * threads.h: replace usage of struct timespect with
4722 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
4723 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
4724 favor of scm_t_timespec from scmconfig.h.
4725
4726 * threads.c: move libguile/_scm.h include to the top so we pick up
4727 any critical defines like _GNU_SOURCE early. Replace usage of
4728 struct timespect with scm_t_timespec. Replace usage of
4729 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
4730 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
4731
4732 * threads-plugin.h: replace usage of struct timespect with
4733 scm_t_timespec.
4734
4735 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
4736 usage of struct timespect with scm_t_timespec.
4737
4738 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
4739 HAVE_INTTYPES_H handling to scmconfig.h. #include
4740 "libguile/__scm.h". Rework handling for scm_t_bits,
4741 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
4742 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
4743 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
4744 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
4745 SCM_HAVE_ARRAYS.
4746
4747 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
4748
4749 * struct.c: #include <config.h> if HAVE_CONFIG_H.
4750
4751 * strports.c: #include <config.h> if HAVE_CONFIG_H.
4752
4753 * strop.c: #include <config.h> if HAVE_CONFIG_H.
4754
4755 * stime.h: move handling of time related headers to scmconfig.h.
4756
4757 * stime.c: #include <config.h> if HAVE_CONFIG_H.
4758
4759 * stacks.c: replace usage of STACK_GROWS_UP with
4760 SCM_STACK_GROWS_UP.
4761
4762 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
4763 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4764
4765 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
4766 of uint32 and HAVE_UINT_32 with scm_t_int32.
4767
4768 * smob.c: #include <config.h> if HAVE_CONFIG_H.
4769
4770 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
4771
4772 * script.c: #include <config.h> if HAVE_CONFIG_H.
4773
4774 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
4775
4776 * scmconfig.h.top: new file -- preamble for scmconfig.h.
4777
4778 * rw.c: #include <config.h> if HAVE_CONFIG_H.
4779
4780 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
4781
4782 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4783
4784 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
4785
4786 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
4787 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
4788 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
4789 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4790
4791 * ramap.c: replace usage of HAVE_LONG_LONGS with
4792 "SCM_SIZEOF_LONG_LONG != 0".
4793
4794 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
4795 "libguile/scmconfig.h".
4796
4797 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
4798
4799 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4800 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
4801
4802 * posix.c: #include <config.h> if HAVE_CONFIG_H.
4803
4804 * ports.c: #include <config.h> if HAVE_CONFIG_H.
4805
4806 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4807
4808 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
4809 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
4810 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
4811 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
4812 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
4813 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
4814 "SCM_SIZEOF_LONG_LONG != 0".
4815
4816 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
4817 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
4818 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
4819 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
4820
4821 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
4822
4823 * null-threads.h: replace usage of struct timespect with
4824 scm_t_timespec.
4825
4826 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
4827
4828 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
4829 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
4830 scm_t_uint64 and rename usages.
4831
4832 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
4833
4834 * load.c: #include <config.h> if HAVE_CONFIG_H.
4835
4836 * iselect.h: move handling of time related headers to scmconfig.h.
4837 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
4838 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
4839 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
4840
4841 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
4842 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
4843 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
4844
4845 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
4846
4847 * inline.h: #include "libguile/__scm.h" at the top. Change code
4848 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
4849 what to do instead of creating a new public #define. Rename usage
4850 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
4851 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
4852 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
4853
4854 * inline.c: rearrange handling -- now we just #define
4855 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
4856 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
4857 appropriate, and we use that in inline.h along with the above
4858 define to determine how to respond.
4859
4860 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
4861 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4862
4863 * guile.c: #include <config.h> if HAVE_CONFIG_H.
4864
4865 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
4866 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4867
4868 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4869
4870 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
4871
4872 * gen-scmconfig.c: new file -- see comments in file for details.
4873
4874 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
4875
4876 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
4877 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
4878
4879 * gc.h: replace usage of SIZEOF_LONG with
4880 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
4881 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
4882 since we handle that in scmconfig.h now.
4883
4884 * gc.c: #include <config.h> if HAVE_CONFIG_H.
4885
4886 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
4887 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
4888 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
4889
4890 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
4891
4892 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4893 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
4894
4895 * fports.c: #include <config.h> if HAVE_CONFIG_H.
4896
4897 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
4898
4899 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
4900 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
4901
4902 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
4903
4904 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4905 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
4906
4907 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
4908 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
4909 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
4910 with "SCM_SIZEOF_LONG_LONG != 0".
4911
4912 * error.c: #include <config.h> if HAVE_CONFIG_H.
4913
4914 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
4915 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
4916 with "SCM_SIZEOF_LONG_LONG != 0".
4917
4918 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
4919
4920 * coop.c: replace usage of struct timespect with scm_t_timespec.
4921 #include <config.h> if HAVE_CONFIG_H.
4922
4923 * coop-threads.c: #include "libguile/_scm.h" early. Replace
4924 usage of struct timespect with scm_t_timespec. Replace usage of
4925 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
4926
4927 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
4928 usage of struct timespect with scm_t_timespec. Replace usage of
4929 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
4930
4931 * coop-defs.h: move handling of time related headers to
4932 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
4933 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
4934 timespect with scm_t_timespec.
4935
4936 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4937
4938 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4939
4940 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
4941 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
4942
4943 * continuations.c: move libguile/_scm.h include to the top so we
4944 pick up any critical defines like _GNU_SOURCE early.
4945
4946 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
4947
4948 * async.c: #include <config.h> if HAVE_CONFIG_H.
4949
4950 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
4951
4952 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
4953 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
4954
4955 * __scm.h: move libguile/scmconfig.h include up to the top, so
4956 we're sure to pick up any critical defines like _GNU_SOURCE early.
4957 #include <limits.h> removed in favor of scmconfig.h inclusion when
4958 appropriate. STDC_HEADERS based inclusion of stdlib.h,
4959 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
4960 scmconfig.h inclusion when appropriate. Various Win32 related
4961 definitions removed in favor of scmconfig.h inclusion when
4962 appropriate.
4963 (HAVE_UINTPTR_T): definition removed (see NEWS).
4964 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
4965 (HAVE_LONG_LONGS): definition removed (see NEWS).
4966 (HAVE_LONG_LONG): definition removed (see NEWS).
4967 (HAVE_PTRDIFF_T): definition removed (see NEWS).
4968
4969 * Makefile.am: scmconfig.h is now generated by building and
4970 running gen-scmconfig.h and capturing its output. gen-scmconfig
4971 uses config.h and the configure.in generated gen-scmconfig.h to
4972 decide what to output. See gen-scmconfig.c for details.
4973 (noinst_PROGRAMS): add gen-scmconfig.
4974 (gen_scmconfig_SOURCES): new variable.
4975 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
4976 cross-compiling right.
4977 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
4978 (BUILT_SOURCES): add scmconfig.h.
4979
4980 2003-03-19 Marius Vollmer <mvo@zagadka.de>
4981
4982 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
4983 Adrian Bunk. Thanks!
4984
4985 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4986
4987 * goops.c (make_class_from_template): New fourth arg:
4988 applicablep.
4989 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
4990 cpls.
4991
4992 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
4993
4994 * goops.c, objects.c, objects.h (scm_make_extended_class): New
4995 second arg: applicablep.
4996 (scm_i_inherit_applicable): New function.
4997
4998 * goops.c, goops.h (scm_class_applicable,
4999 scm_class_extended_accessor): New classes.
5000
5001 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5002
5003 * procs.c (scm_procedure_documentation): Removed redundant
5004 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5005 predicates.
5006
5007 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5008
5009 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5010
5011 * modules.c (scm_module_import_interface): New function.
5012
5013 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5014 scm_class_accessor.
5015 (scm_class_accessor): New class.
5016
5017 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5018
5019 * goops.c (scm_primitive_generic_generic): Enable primitive
5020 generic if not enabled.
5021 (scm_sys_goops_loaded): Setup unextended primitive generics.
5022
5023 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5024
5025 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5026 snarf macros.
5027
5028 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5029 testing example. All uses of SCM_GPROC should be converted.)
5030
5031 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5032 scm_assoc.
5033
5034 * eq.c (scm_equal_p): Turned into a primitive generic.
5035
5036 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5037
5038 * Makefile.am (scmconfig.h): new target -- generate file from
5039 ../config.h.
5040 (modinclude_HEADERS): remove version.h.
5041 (nodist_modinclude_HEADERS): add version.h.
5042
5043 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5044
5045 This fixes a serious GC bug, introduced during the latest
5046 reorganization of the GC, which disabled freeing of structs and
5047 GOOPS objects:
5048
5049 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5050 SCM_EOL.
5051 (scm_struct_prehistory): Move scm_free_structs to
5052 scm_before_mark_c_hook.
5053
5054 * gc-card.c (sweep_card): Check that we haven't swept structs on
5055 this card before. That can happen if scm_i_sweep_all_segments has
5056 been called from some other place than scm_igc.
5057
5058 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5059
5060 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5061 (since hash tables now adapt their size).
5062
5063 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5064 (current number of prehistory bindings; hashtable code will select
5065 a prime which is greater than this value).
5066
5067 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5068 (current number of initial symbols).
5069
5070 * properties.c (scm_init_properties): Don't specify size of
5071 scm_properties_whash.
5072
5073 * objprop.c (scm_init_objprop): Don't specify size of
5074 scm_object_whash.
5075
5076 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5077
5078 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5079
5080 The following changes introduce the use of resizable hash tables
5081 throughout Guile. It also renames the old *-hash-table* functions
5082 to *-alist-vector* and places them, together with the rest of the
5083 weak vector support, in the module (ice-9 weak-vector). We should
5084 probably introduce a new, better, API for weak references, for
5085 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5086 look like and are used like ordinary pairs.)
5087
5088 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5089 leaf_environment_fold, obarray_remove_all): Use hashtable
5090 accessors.
5091
5092 * gc.c (scm_init_storage): Moved hook initialization to
5093 scm_storage_prehistory.
5094 (scm_storage_prehistory): New function.
5095 (scm_igc): Added commentary about placement of
5096 scm_after_sweep_c_hook.
5097
5098 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5099 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5100 SCM_WVECT_WEAK_VALUE_P.
5101
5102 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5103 functions.
5104 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5105 Removed.
5106 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5107 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5108
5109 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5110 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5111
5112 * modules.c (module-reverse-lookup): Use hashtable accessors.
5113
5114 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5115
5116 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5117 scm_make_weak_value_alist_vector,
5118 scm_make_doubly_weak_alist_vector): New functions.
5119
5120 * weaks.c (scm_init_weaks_builtins): New function.
5121
5122 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5123 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5124 SCM_WVECT_NOSCAN_P): New macros.
5125
5126 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5127 and SCM_WVECT_WEAK_VALUE_P.
5128
5129 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5130 allocate_weak_vector and exported.
5131
5132 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5133
5134 * hashtab.c: Undid thread safety. (We decided that it's better to
5135 let the user explicitly protect the tables (or not) according what
5136 is suitable for the application.)
5137
5138 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5139
5140 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5141 thread safe and handle resizing tables.
5142 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5143 SCM_DEFER/ALLOW_INTS.
5144
5145 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5146
5147 * hashtab.c (scm_vector_to_hash_table,
5148 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5149 functions.
5150 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5151 safe and handle resizing tables.
5152
5153 * weaks.c (scm_make_weak_key_hash_table,
5154 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5155 Size argument made optional. Return resizable table if not
5156 specified.
5157
5158 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5159
5160 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5161 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5162
5163 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5164
5165 * debug.c (scm_procedure_source): Handle all objects for which
5166 procedure? is #t. (Thanks to Bill Schottstaedt.)
5167
5168 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5169
5170 * futures.c (mark_futures): Don't need to mark data of recycled
5171 futures.
5172 (scan_futures, cleanup_undead): Be smarter about marking
5173 futures---avoid unnecessary passes through future lists.
5174
5175 * futures.h, futures.c: New files; Introduced recycling of
5176 futures. For fine-grained threading this lifts performance to
5177 another level. We can now use parallelization in inner loops of
5178 Guile programs without impossible overhead.
5179
5180 * threads.h, threads.c: Moved futures to their own file.
5181
5182 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5183 (DOT_X_FILES): Added futures.x.
5184 (DOT_DOC_FILES): Added futures.doc.
5185 (modinclude_HEADERS): Added futures.h.
5186
5187 * threads.c, threads.h (scm_i_create_thread): Renamed from
5188 create_thread and made global.
5189
5190 * futures.c (scm_make_future): New procedure.
5191
5192 * eval.c: #include "libguile/futures.h".
5193
5194 * init.c: #include "futures.h"
5195 (scm_init_guile_1): Call scm_init_futures.
5196
5197 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5198
5199 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5200
5201 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5202 functions.
5203
5204 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5205
5206 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5207
5208 * threads.c (create_thread): Don't unwind dynwind chain of parent
5209 thread before creation. Just start the new thread with an empty
5210 dynwind chain.
5211
5212 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5213
5214 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5215
5216 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5217
5218 * threads.c (scm_timed_wait_condition_variable): Support timed
5219 waiting also for simple condition variables.
5220
5221 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5222 of calling the procedure change-object-class.
5223
5224 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5225
5226 * ramap.c (scm_ramapc): Typo in error message.
5227
5228 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5229
5230 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5231 slots with instance allocation.
5232
5233 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5234 class.
5235 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5236
5237 * goops.c (scm_generic_function_methods): Support extended
5238 generic functions.
5239
5240 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5241
5242 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5243 Thanks to Neil for pointing this out!
5244
5245 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5246
5247 * lang.h: Remove declarations matching definitions removed from
5248 lang.c (just below).
5249
5250 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5251
5252 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5253 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5254 and already commented out.
5255
5256 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5257 scm_lreadparen): Support reading vectors with Elisp syntax if
5258 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5259 is not currently defined, and there isn't even a configure switch
5260 to enable it yet.)
5261
5262 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5263
5264 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5265 builds work.
5266 (EXTRA_DIST): Added version.h.in.
5267
5268 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5269
5270 This change makes it possible for one thread to do lazy sweeping
5271 while other threads are running. Now only the mark phase need to
5272 have all threads asleep. We should look further into this issue.
5273 Presently, I've put the locking of scm_i_sweep_mutex at
5274 "conservative" places due to my current lack of knowledge about
5275 the garbage collector. Please feel free to restrict these regions
5276 further to allow for maximal parallelism!
5277
5278 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5279
5280 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5281 scm_gc_register_collectable_memory): Substitute locking of
5282 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5283 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5284 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5285 the single-thread section (which now only contains the mark
5286 phase).
5287 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5288 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5289
5290 * threads.c (gc_section_mutex): Removed.
5291
5292 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5293
5294 * threads.c (create_thread): Clear parent field in root state in
5295 order not to unnecessarily remember dead threads.
5296
5297 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5298 (scm_trampoline_1, scm_trampoline_2): Use them.
5299
5300 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5301
5302 Partial introduction of real plugin interface.
5303
5304 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5305 (EXTRA_DIST): Added threads-plugin.c.
5306
5307 * threads-plugin.h, threads-plugin.c: New files.
5308
5309 * threads.h: #include "libguile/threads-plugin.h".
5310
5311 * threads.c: #include "libguile/threads-plugin.c".
5312
5313 * pthread-threads.c: Temporarily remove debugging functions.
5314
5315 * threads.c, threads.h (scm_yield): Added back.
5316
5317 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5318
5319 * threads.c (really_launch): Detach before unlocking
5320 thread_admin_mutex in order not to risk being joined.
5321 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5322 thread_admin_mutex locked during GC.
5323
5324 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5325 functions.
5326
5327 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5328
5329 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5330 support for debugging mutex operations.
5331
5332 * threads.c (scm_thread): Removed filed joining_threads.
5333 (thread_print): Print thread number as well as address of thread
5334 structure.
5335 (scm_join_thread): Bugfix.
5336 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5337 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5338 scm_broadcast_condition_variable): Use the low-level API.
5339 (scm_all_threads): Return copy of thread list (to prevent
5340 unintended destruction).
5341 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
5342
5343 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
5344 pthread "native" recursive mutex support.
5345
5346 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5347
5348 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
5349 Simply lock a thread C API recursive mutex.
5350 (SCM_NONREC_CRITICAL_SECTION_START,
5351 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5352 SCM_REC_CRITICAL_SECTION_END): Removed.
5353
5354 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
5355 direct calls to scm_rec_mutex_lock / unlock around the three calls
5356 to scm_m_expand_body.
5357
5358 * eval.c, eval.h (promise_free): New function.
5359 (scm_force): Rewritten; Now thread-safe; Removed
5360 SCM_DEFER/ALLOW_INTS.
5361
5362 * pthread-threads.h: Added partially implemented plugin interface
5363 for recursive mutexes. These are, for now, only intended to be
5364 used internally within the Guile implementation.
5365
5366 * pthread-threads.c: New file.
5367
5368 * threads.c: Conditionally #include "pthread-threads.c".
5369
5370 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
5371 thread-safe;
5372
5373 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
5374 SCM_GLOBAL_REC_MUTEX): New macros.
5375
5376 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
5377 macros---use mutexes instead.
5378
5379 * tags.h (SCM_IM_FUTURE): New tag.
5380
5381 * eval.c (scm_m_future): New primitive macro.
5382 (SCM_CEVAL): Support futures.
5383 (unmemocopy): Support unmemoization of futures.
5384
5385 * print.c (scm_isymnames): Name of future isym.
5386
5387 * version.c: Unmade some changes to my private copy that got
5388 committed by mistake.
5389
5390 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5391
5392 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
5393 2002-12-10.
5394
5395 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
5396
5397 * gc.c (scm_gc_sweep): Call it here instead, which is a more
5398 logical place.
5399
5400 * threads.c (create_thread): Remember root object until the handle
5401 of the new thread is on all_threads list.
5402
5403 * root.c (scm_make_root): Moved copying of fluids until after
5404 creation of root handle so that the fluids are GC protected. Also
5405 removed the critical section.
5406
5407 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5408
5409 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
5410
5411 * gc-malloc.c (malloc_mutex): New mutex.
5412 (scm_gc_malloc_prehistory): Initialize it.
5413 (scm_realloc): Serialize call to realloc
5414 (scm_calloc): Same for calloc.
5415 Thanks to Wolfgang Jaehrling!
5416 (Now we have to make sure all calls to malloc/realloc are made
5417 through scm_malloc.)
5418
5419 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
5420
5421 * threads.c (really_launch): Release heap (to prevent deadlock).
5422 (create_thread): Release heap before locking thread admin mutex.
5423
5424 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5425
5426 * threads.c (scm_i_thread_invalidate_freelists): New
5427 function.
5428
5429 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
5430
5431 * modules.c (scm_export): Inserted a return statement.
5432
5433 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5434
5435 * modules.c (scm_export): new function
5436
5437 * gc-card.c: add a note about malloc()/free() overhead.
5438
5439 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5440
5441 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
5442 in srcdir.
5443
5444 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5445
5446 These changes remove scm_ints_disabled (which hasn't has any
5447 effect in Guile for quite some time).
5448
5449 * async.c, error.h (scm_ints_disabled): Removed.
5450
5451 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
5452 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
5453 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
5454 (old_ints): Removed.
5455
5456 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
5457 critical section.
5458 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
5459 SCM_ALLOW_INTS.
5460
5461 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5462
5463 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
5464 Removed accidental #if 0 around these functions.
5465
5466 These changes are the start of support for preemptive
5467 multithreading. Marius and I have agreed that I commit this code
5468 into the repository although it isn't thoroughly tested and surely
5469 introduces many bugs. The bugs should only be exposed when using
5470 threads, though. Signalling and error handling for threads is
5471 very likely broken. Work on making the implementation cleaner and
5472 more efficient is needed.
5473
5474 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
5475 (SCM_NONREC_CRITICAL_SECTION_START,
5476 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5477 SCM_REC_CRITICAL_SECTION_END): New macros.
5478 (SCM_CRITICAL_SECTION_START/END): Defined here.
5479
5480 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
5481 the three calls to scm_m_expand_body.
5482
5483 * gc.h: #include "libguile/pthread-threads.h";
5484 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
5485
5486 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
5487 scm_t_key;
5488
5489 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
5490 access.
5491
5492 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
5493
5494 * gc-freelist.c, threads.c (really_launch): Use
5495 SCM_FREELIST_CREATE.
5496
5497 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
5498
5499 * gc.c (scm_i_expensive_validation_check, scm_gc,
5500 scm_gc_for_newcell): Put threads to sleep before doing GC-related
5501 heap administration so that those pieces of code are executed
5502 single-threaded. We might consider rewriting these code sections
5503 in terms of a "call_gc_code_singly_threaded" construct instead of
5504 calling the pair of scm_i_thread_put_to_sleep () and
5505 scm_i_thread_wake_up (). Also, we would want to have as many of
5506 these sections eleminated.
5507
5508 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
5509
5510 * inline.h: #include "libguile/threads.h"
5511
5512 * pthread-threads.h: Macros now conform more closely to the
5513 pthreads interface. Some of them now take a second argument.
5514
5515 * threads.c, threads.h: Many changes.
5516
5517 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5518
5519 * Makefile.am (version.h): Changed $^ --> $< in rule for
5520 version.h.
5521
5522 2002-12-08 Rob Browning <rlb@defaultvalue.org>
5523
5524 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
5525 (SCM_MINOR_VERSION): use @--@ substitution now.
5526 (SCM_MICRO_VERSION): use @--@ substitution now.
5527 (scm_effective_version): new function prototype.
5528
5529 * version.c (scm_effective_version): new function, also add
5530 effective-version.
5531
5532 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
5533 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
5534 SCM_LIBRARY_DIR.
5535 (version.h): generate this here rather than configure.in. This
5536 approach tracks source edits better (i.e. more immediately).
5537 Might be worth considering for other .in files too.
5538
5539 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
5540
5541 Reorganized thread package selection. A thread package now only
5542 implements a small set of pthread like functions and Guile
5543 implements the rest on top of that. Guile's implementation is
5544 what the "coop-pthreads" package has been previously. Support for
5545 "coop" threads has been removed until I get time to add it again.
5546
5547 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
5548 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
5549 null-threads.c, coop-pthreads.c.
5550 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
5551 pthread-threads.h.
5552
5553 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
5554
5555 * threads.h: Do not include "libguile/coop-defs.h". Include
5556 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
5557 (previously deprecated) C level thread API prototypes. They are
5558 now in the thread package specific headers, "null-threads.h" and
5559 "pthread-threads.h".
5560 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
5561 New.
5562 (scm_threads_init): Removed.
5563 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
5564 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
5565 SCM_I_THREAD_SWITCH_COUNT): Define here.
5566 (scm_single_thread_p): Removed.
5567 (scm_call_with_new_thread): Take two args directly instead of list
5568 of two args.
5569 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
5570 SCM_SET_THREAD_LOCAL_DATA): Define here.
5571
5572 * threads.c: Merged with "coop-pthreads.c".
5573
5574 * null-threads.h: Implement pthread-like API as a set of macros.
5575
5576 * pthread-threads.h: New, implement pthread-like API by deferring
5577 to pthread itself.
5578
5579 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
5580 has been lost in the reorganization.
5581
5582 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
5583
5584 The following change makes it possible to move procedure
5585 application dispatch outside inner loops. The motivation was
5586 clean implementation of efficient replacements of R5RS primitives
5587 in SRFI-1.
5588
5589 The semantics is clear: scm_trampoline_N returns an optimized
5590 version of scm_call_N (or NULL if the procedure isn't applicable
5591 on N args).
5592
5593 Applying the optimization to map and for-each increases efficiency
5594 noticeably. For example, (map abs ls) is 8 times faster than
5595 before.
5596
5597 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
5598
5599 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
5600
5601 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
5602 (map, for-each): Handle also application on two args as a special
5603 case; Use trampolines.
5604
5605 Other changes:
5606
5607 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
5608 (subr2oless): Removed.
5609 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
5610 vector GC protected.
5611
5612 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
5613 scm_out_of_range.
5614
5615 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5616
5617 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
5618
5619 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
5620
5621 * debug.c (scm_make_iloc): Added missing "return".
5622
5623 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
5624
5625 * strports.c (scm_eval_string_in_module): Validate second arg to
5626 be a module. Thanks to Arno Peters!
5627
5628 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5629
5630 * .cvsignore: remove goops.c
5631
5632 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5633
5634 * modules.c (scm_env_top_level, scm_lookup_closure_module,
5635 module_variable, scm_module_lookup_closure,
5636 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
5637 scm_system_module_env_p): Don't compare SCM values with C
5638 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
5639 over SCM_NFALSEP.
5640
5641 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5642
5643 * eval.h (SCM_MAKE_ILOC): New macro.
5644
5645 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
5646 the iloc bitpattern here.
5647
5648 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
5649
5650 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
5651 part of the API, otherwise it's difficult to write Guile
5652 extensions using non-blocking I/O => moved #include
5653 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
5654
5655 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
5656 s_unlock_mutex.
5657
5658 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
5659
5660 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
5661 are defined in configure.in.
5662
5663 * threads.c: Removed SCM_API from function definitions. SCM_API
5664 is only for declarations.
5665
5666 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
5667
5668 * coop-pthreads.h: Added support for thread specific data to the
5669 generic C API for the coop-pthreads case.
5670
5671 * threads.c, threads.h (scm_cond_init): Undo unintentional API
5672 change.
5673 (scm_cond_broadcast): Added missing function.
5674
5675 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5676
5677 * coop.c (coop_next_runnable_thread): Removed, wich should have
5678 happened when GUILE_ISELECT was hard-wired.
5679
5680 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
5681
5682 * Makefile.am (libguile_la_SOURCES): Added threads.c
5683 (DOT_DOC_FILES): Added threads.doc.
5684 (DOT_X_FILES): Added threads.x.
5685 (EXTRA_libguile_la_SOURCES): Removed threads.c.
5686 (noinst_HEADERS): Added coop-pthreads.c.
5687 (modinclude_HEADERS): Added coop-pthreads.h.
5688
5689 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
5690 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
5691
5692 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
5693 Thanks to Bill Schottstaedt!
5694
5695 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
5696
5697 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
5698 SCM_COPT_THREADS is defined.
5699 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
5700 is defined.
5701
5702 * coop-pthreads.c: Some harmless renamings of internal stuff.
5703 (create_thread): New, generalized version of
5704 scm_call_with_new_thread.
5705 (scm_call_with_new_thread): Use it.
5706 (scm_spawn_thread): New, use create_thread.
5707
5708 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
5709
5710 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
5711 start testing it now.
5712
5713 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
5714 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
5715 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
5716 is defined.
5717
5718 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
5719
5720 * scmsigs.c (signal_cell_handlers, install_handler_data,
5721 scm_delq_spine_x, really_install_handler, install_handler): New
5722 scheme for triggering signal handlers, to simplify take_signal.
5723 (take_signal): Simplified, to avoid race conditions.
5724 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
5725 hasn't exited yet.
5726
5727 * async.c (scm_async_click): Reset pending_asyncs, handle
5728 signal_asyncs. Don't set cdr of a non-signal async to #f.
5729 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
5730 always. Set pending_asyncs.
5731 (scm_system_async_mark_for_thread): Check that thread has not
5732 exited.
5733 (scm_unmask_signals, decrease_block): Call scm_async_click after
5734 block_asyncs becomes zero.
5735
5736 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
5737 active_asyncs.
5738
5739 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
5740 fields.
5741 * root.c (root_mark): Mark them.
5742 (make_root): Initialize them.
5743
5744 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
5745 USE_COOP_THREADS.
5746 (scm_internal_select): Define one version for USE_COOP_THREADS and
5747 one for USE_NULL_THREADS.
5748 (scm_init_iselect): Likewise.
5749
5750 * inline.h (scm_cell, scm_double_cell): Also allow
5751 USE_COPT_THREADS to not protect the slot initializers.
5752
5753 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
5754 because threads need to be initialized before the stack, but
5755 gsubrs such as scm_timed_condition_variable_wait can only be
5756 created later.
5757
5758 * threads.h: Include "coop-pthreads.h" when requested.
5759 (scm_threads_make_mutex, scm_threads_lock_mutex,
5760 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
5761 not implemented anyway.
5762 (scm_init_thread_procs, scm_try_mutex,
5763 scm_timed_condition_variable_wait,
5764 scm_broadcast_condition_variable, scm_c_thread_exited_p,
5765 scm_thread_exited_p): New prototypes.
5766 (struct timespec): Define if not already defined.
5767 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
5768 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
5769 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
5770 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
5771 deprecated.
5772
5773 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
5774 requested.
5775 (scm_thread_exited_p): New.
5776 (scm_try_mutex, scm_broadcast_condition_variable): Newly
5777 registered procedures.
5778 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
5779 Use the latter as the procedure for "wait-condition-variable",
5780 thus offering a optional timeout parameter to Scheme.
5781 (scm_wait_condition_variable): Implement in terms of
5782 scm_timed_wait_condition_variable.
5783 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
5784 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
5785 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
5786 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
5787 scm_make_mutex, etc, and deprecate.
5788 (scm_init_threads): Do not create smobs, leave this to
5789 scm_threads_init. Do not include "threads.x" file.
5790 (scm_init_thread_procs): New, include "threads.x" here.
5791
5792 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
5793 scm_null_mutex_lock, scm_null_mutex_unlock,
5794 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
5795 scm_null_condvar_wait, scm_null_condvar_signal,
5796 scm_null_condvar_destroy): Removed.
5797 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
5798 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
5799 scm_cond_destory): Do not define, they are now deprecated and
5800 handled by threads.{h,c}.
5801
5802 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
5803 (scm_threads_init): Create smobs here, using the appropriate
5804 sizes.
5805 (block): Removed, now unused.
5806 (scm_c_thread_exited_p): New.
5807 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
5808 scm_null_mutex_destroy, scm_null_condvar_init,
5809 scm_null_condvar_wait, scm_null_condvar_signal,
5810 scm_null_condvar_destroy): Removed and updated users to do their
5811 task directly.
5812 (scm_try_mutex, timeval_subtract,
5813 scm_timed_wait_condition_variable,
5814 scm_broadcast_condition_variable): New.
5815 (scm_wait_condition_variable): Removed.
5816
5817 * coop-defs.h (coop_m): Added 'level' field.
5818 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
5819 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
5820 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
5821 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
5822 define.
5823 (coop_condition_variable_broadcast): New.
5824
5825 * coop-threads.c (scm_threads_init): Create smobs here, using the
5826 appropriate sizes.
5827 (scm_c_thread_exited_p, scm_try_mutex,
5828 scm_timed_wait_condition_variable,
5829 scm_broadcast_condition_variable): New.
5830 (scm_wait_condition_variable): Removed.
5831
5832 * coop.c (coop_new_mutex_init): Initialize level.
5833 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
5834 level.
5835 (coop_condition_variable_signal): Renamed to
5836 coop_condition_variable_broadcast and reimplemented in terms of
5837 that. Thus...
5838 (coop_condition_variable_broadcast): New.
5839
5840 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
5841
5842 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
5843
5844 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
5845
5846 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
5847 of system headers.
5848
5849 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
5850 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
5851 give better error messages. Thanks to Bill Schottstaedt!
5852
5853 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
5854
5855 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
5856 scm_definedp to scm_defined_p and deprecated scm_definedp.
5857
5858 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
5859
5860 * async.h, async.c (scm_system_async): Fixed deprecation to work
5861 correctly when deprecated features are excluded.
5862
5863 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5864
5865 * async.c (scm_system_async_mark_for_thread): Validate thread
5866 argument.
5867
5868 * coop-threads.c (scm_i_thread_root): Do not validate argument.
5869
5870 * feature.c (scm_init_feature): Don't add 'threads' for
5871 USE_NULL_THREADS.
5872
5873 * inline.h (scm_cell, scm_double_cell): Also allow
5874 USE_NULL_THREADS to not protect the slot initializers.
5875
5876 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
5877 "USE_THREAD".
5878
5879 * Makefile.am (noinst_HEADERS): Added null-threads.c.
5880 (modinclude_HEADERS): Added null-threads.h.
5881
5882 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
5883 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
5884 (scm_init_threads): Use generic type names scm_t_mutex and
5885 scm_t_cond instead of coop_m and coop_c.
5886
5887 * null-threads.c, null-threads.h: New files.
5888
5889 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
5890
5891 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
5892 This is to support makes that know about "$<" only in pattern
5893 rules, like Sun's make.
5894
5895 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
5896
5897 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
5898 substitution. Thanks to David Allouche!
5899
5900 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
5901
5902 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
5903 !SCM_ENABLE_DEPRECATED.
5904
5905 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5906
5907 * async.c (scm_system_async_mark_for_thread): Only call
5908 scm_i_thread_root when USE_THREADS is defined. Use scm_root
5909 otherwise.
5910
5911 * scmsigs.c (take_signal): Only call scm_i_thread_root when
5912 USE_THREADS is defined. Use scm_root otherwise.
5913 (scm_sigaction_for_thread): Ignore THREAD argument when
5914 USE_THREADS is not defined. Also, move THREAD argument defaulting
5915 out of HAVE_SIGACTION section, which was a bug.
5916
5917 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5918
5919 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
5920 signal_handlers, not the closure that is used as the async.
5921 The closure is stored in signal_handler_cells, as previously.
5922
5923 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
5924
5925 * root.h (scm_root_state): Added 'block_async' slot.
5926 (scm_active_asyncs): Removed abbrev.
5927 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
5928
5929 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
5930 abbrev.
5931
5932 * async.h (scm_call_with_blocked_asyncs,
5933 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
5934 scm_c_call_with_unblocked_asyncs): New prototypes.
5935 (scm_mask_signals, scm_unmask_signals): Deprecated.
5936 (scm_mask_ints): Turned into a macro.
5937 * async.c (scm_mask_ints): Removed.
5938 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
5939 this should not be necessary.
5940 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
5941 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
5942 deprecation warning and check for errornous use. Set block_asyncs
5943 instead of scm_mask_ints.
5944 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
5945 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
5946 scm_c_call_with_unblocked_asyncs): New.
5947
5948 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
5949 Asyncs are enabled by default.
5950
5951 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
5952
5953 * vports.c (scm_make_soft_port): Allow vector argument to carry a
5954 6th element: an input waiting thunk.
5955 (sf_input_waiting): New.
5956
5957 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
5958
5959 * root.c (root_mark): Mark active_asyncs slot.
5960
5961 * async.c (scm_async_click): Set the cdr of a executed handler
5962 cell to SCM_BOOL_F, not SCM_EOL.
5963 (scm_i_queue_async_cell): Queue the cell at the end of the list,
5964 and only if the handler procedure is not already present.
5965 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
5966 with SCM_BOOL_F.
5967 * scmsigs.c (scm_sigaction_for_thread): Likewise.
5968
5969 2002-10-04 Rob Browning <rlb@defaultvalue.org>
5970
5971 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
5972
5973 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
5974 scm_lt_dlopenext, and scm_lt_dlerror.
5975 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
5976 and scm_lt_dlerror.
5977 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
5978 and scm_lt_dlerror.
5979 (sysdep_dynl_init): switch to scm_lt_dlinit();
5980
5981 * Makefile.am (libguile_la_LIBADD): switch to use
5982 libguile-ltdl.la.
5983
5984 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
5985
5986 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
5987
5988 * scmsigs.h (scm_sigaction_for_thread): New prototype.
5989 * scmsigs.c (got_signal): Removed.
5990 (signal_handler_cells, signal_handler_threads): New.
5991 (take_signal): Queue the cell of the signal for the specified
5992 thread. Reset the signal handler on systems that don't have
5993 sigaction.
5994 (sys_deliver_signals): Removed.
5995 (close_1): New.
5996 (scm_sigaction_for_thread): Renamed from scm_sigaction and
5997 extended to also set the thread of a signal and allocate a cell
5998 for it. Keep the Scheme name "sigaction". Check that signum is
5999 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6000 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6001 (scm_init_scmsigs): Allocate signal_handler_cells and
6002 signal_handler_threads vectors.
6003
6004 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6005 that system asnycs and user asyncs are separated. Reimplemented
6006 system asyncs to work per-thread.
6007
6008 * gc.c (scm_init_gc): Do not use scm_system_async.
6009
6010 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6011 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6012 Removed prototypes.
6013 (scm_i_queue_async_cell): New.
6014
6015 * __scm.h (scm_asyncs_pending_p): Removed.
6016 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6017 scm_asyncs_pending_p.
6018
6019 * async.h (scm_system_async_mark_for_thread): New prototype.
6020
6021 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6022
6023 * root.h (scm_root_state): Added new "active_asyncs" slot.
6024 * root.c (scm_make_root): Initialize it to SCM_EOL.
6025
6026 * coop-defs.h (coop_t): Added new "handle" slot.
6027 * coop-threads.c (all_threads, scm_current_thread,
6028 scm_all_threads, scm_i_thread_root): New.
6029 (scm_threads_init): Add main thread to all_threads.
6030 (scheme_launch_thread): Remove thread from all_threads when it
6031 terminates.
6032 (scm_call_with_new_thread): Initialize handle slot of coop_t
6033 structure and add new thread to all_threads.
6034 (scm_spawn_thread): Likewise.
6035
6036 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6037 * threads.c (scm_current_thread, scm_all_threads): Register as
6038 primitives.
6039
6040 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6041
6042 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6043
6044 * script.c (scm_compile_shell_switches): Fix bad spelling of
6045 `explicitly' in comment.
6046
6047 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6048
6049 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6050 Refer to provided? in doc string rather than deprecated feature?.
6051
6052 2002-09-24 Gary Houston <ghouston@arglist.com>
6053
6054 * inline.h (scm_double_cell): prevent reordering of statements
6055 with any following code (for GCC 3 strict-aliasing).
6056 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6057 the earlier version of the reordering prevention.
6058
6059 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6060
6061 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6062
6063 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6064
6065 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6066 protection.
6067
6068 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6069
6070 * inline.h: include stdio.h
6071
6072 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6073
6074 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6075
6076 * gc-segment.c (scm_i_make_initial_segment): check user settings
6077 for sanity.
6078
6079 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6080 sanity.
6081
6082 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6083
6084 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6085
6086 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6087 these won't ever wrap around with high memory usage. Thanks to
6088 Sven Hartrumpf for finding this.
6089
6090 * gc-freelist.c: include <stdio.h>
6091
6092 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6093
6094 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6095
6096 * vectors.h (SCM_VECTOR_REF): New.
6097
6098 * snarf.h (SCM_DEFINE_PUBLIC): New.
6099
6100 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6101
6102 * socket.c (scm_addr_vector): Added size of address to arguments.
6103 Use it to avoid accessing a non-existent path in a sockaddr_un.
6104 Changed all callers.
6105
6106 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6107
6108 * gc.h: remove DOUBLECELL card flags.
6109
6110 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6111 scm_realloc().
6112
6113 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6114 init loop; handle this from scm_init_card_freelist()
6115
6116 * gc-card.c (scm_init_card_freelist): init bit vector here.
6117
6118 * numbers.c (scm_make_real): prevent reordering of statements
6119 num2float.i.c (FLOAT2NUM): idem
6120
6121 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6122
6123 * eval.h: prepend libguile/ to include path
6124
6125 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6126
6127 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6128 years. Thanks to Martin Grabmüller!
6129
6130 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6131
6132 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6133 unsigned numbers for computing minimum heap increment. This
6134 prevents weird results when a a negative minimum increment is
6135 computed.
6136
6137 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6138
6139 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6140 instead of the old tricks.
6141
6142 * guile-snarf.in: Do not expect the input file to be the first
6143 argument after the optional "-o" option, just pass everything to
6144 the pre-processor without extracting the input file name.
6145
6146 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6147
6148 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6149 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6150
6151 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6152
6153 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6154 Bill Schottstaedt for the bug report
6155
6156 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6157
6158 * print.c (scm_iprin1): Print primitives generics always as
6159 "primitive-generic" even when they have no primitive methods yet.
6160
6161 2002-08-17 Gary Houston <ghouston@arglist.com>
6162
6163 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6164 call.
6165
6166 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6167
6168 * ports.c (scm_add_to_port_table): small bugfix.
6169
6170 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6171 malloc.
6172
6173 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6174 only use SCM_MIN_HEAP_SEG_SIZE.
6175
6176 * ports.c (scm_add_to_port_table): add backwards compatibility
6177 function
6178
6179 * ports.h: use scm_i_ prefix for port table and port table size.
6180
6181 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6182
6183 * vports.c (scm_make_soft_port): Initialize pt variable.
6184
6185 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6186
6187 * strports.h (scm_c_eval_string_in_module,
6188 scm_eval_string_in_module): New prototypes.
6189 * strports.c (scm_eval_string_in_module): New, but use
6190 "eval-string" as the Scheme name and make second parameter
6191 optional.
6192 (scm_eval_string): Implement using scm_eval_string_in_module.
6193 (scm_c_eval_string_in_module): New.
6194 Thanks to Ralf Mattes for the suggestion!
6195
6196 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6197
6198 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6199 message and abort.
6200
6201 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6202
6203 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6204 stead of scm_t_port*. The function now takes a tag argument.
6205
6206 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6207
6208 * gc.h: add scm_debug_cells_gc_interval to public interface
6209
6210 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6211
6212 * gc.c (scm_i_expensive_validation_check): separate expensive
6213 validation checks from cheap ones.
6214
6215 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6216
6217 * read.c (scm_input_error): new function: give meaningful error
6218 messages, and throw read-error
6219
6220 * gc-malloc.c (scm_calloc): add scm_calloc.
6221
6222 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6223
6224 * tags.h: remove GC bits documentation from the tags table.
6225
6226 * read.c (INPUT_ERROR): Prepare for file:line:column error
6227 messages for errors in scm_lreadr() and friends.
6228
6229 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6230
6231 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6232 implementation).
6233 (scm_gc_calloc): new function
6234
6235 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6236
6237 * ports.c (scm_new_port_table_entry): init port entry to 0
6238 completely.
6239
6240 * ports.c (scm_new_port_table_entry): change function from
6241 scm_add_to_port_table. This prevents cells with null-pointers from
6242 being exposed to GC.
6243
6244 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6245 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6246
6247 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6248 to gc-stats.
6249
6250 * numbers.c (big2str): return "0" for 0 iso. ""
6251
6252 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6253 private-gc.h: new file
6254
6255 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6256 sweeping. More documentation in workbook/newgc.text
6257
6258 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6259
6260 * random.c (rstate_free): Return zero.
6261
6262 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6263
6264 * environments.c (remove_key_from_alist): Removed.
6265
6266 (obarray_remove): Simplified.
6267
6268 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6269
6270 * continuations.h: ia64: Include <signal.h> before
6271 <sys/ucontext.h>.
6272
6273 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6274
6275 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6276
6277 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6278
6279 * goops.c (scm_compute_applicable_methods): use
6280 scm_remember_upto_here_1 iso scm_remember_upto_here
6281
6282 * macros.c: include deprecation.h
6283
6284 * vectors.c (scm_vector_move_right_x): remove side effect in
6285 macro arg.
6286 (scm_vector_move_left_x): idem.
6287
6288 * net_db.c, posix.c, socket.c: variable naming: change ans to
6289 result.
6290
6291 * sort.c (scm_merge_vector_x): accept vector as argument
6292 iso. SCM*. This is needed for full GC correctness.
6293
6294 * gc.h: undo previous undocumented changes related to #ifdef
6295 GENGC.
6296
6297 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6298
6299 * *.c: add space after commas everywhere.
6300
6301 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6302 Document cases where SCM_WRITABLE_VELTS() is used.
6303
6304 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6305 SCM_VELTS() return a const pointer
6306 (SCM_VECTOR_SET): add macro.
6307
6308 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6309
6310 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6311 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6312 Deprecated the special kind of built-in dynamic syntax transformer
6313 that was inaccurately named "macro". Note: The built-in syntax
6314 transformers that are named "mmacro" or "memoizing-macro" still
6315 exist, and it is these which come much closer to what one would
6316 call a macro.
6317
6318 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6319
6320 * eval.c (unmemocopy): Fix for
6321 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6322 with internal definitions and local-eval).
6323
6324 2002-07-12 Gary Houston <ghouston@arglist.com>
6325
6326 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6327 defined. They don't do anything useful, especially since the
6328 only case where DYNAMIC_LINKING is undefined seems to be
6329 when --with-modules=no is given to configure, which is basically
6330 requesting that the "dynamic linking module" be omitted.
6331
6332 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6333 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6334
6335 * extensions.c (load_extension): check DYNAMIC_LINKING for
6336 scm_dynamic_call.
6337 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6338 scm_init_dynamic_linking.
6339
6340 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
6341
6342 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
6343 check for Cygwin when including <winsock2.h>, this is already
6344 check for by configure. Thus, revert change from 2002-07-07.
6345
6346 2002-07-10 Gary Houston <ghouston@arglist.com>
6347
6348 * eq.c: include <string.h>
6349 * dynl.c: docstring editing.
6350
6351 2002-07-09 Gary Houston <ghouston@arglist.com>
6352
6353 * dynl.c (scm_dynamic_call): docstring editing.
6354
6355 2002-07-08 Rob Browning <rlb@defaultvalue.org>
6356
6357 * gc_os_dep.c: HURD fixes.
6358
6359 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
6360
6361 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
6362
6363 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
6364 this should be compiled for BUILD host.
6365 Override default rule for
6366 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
6367 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
6368 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
6369
6370 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
6371 <winsock2.h> on Cygwin even when we have it.
6372
6373 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6374
6375 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
6376 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
6377 the code. Full number of arguments checking of closures is
6378 mandatory now. However, the option to disable the checking has
6379 most probably not been used anyway.
6380
6381 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6382
6383 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
6384 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
6385 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
6386 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
6387 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
6388 (scm_source_properties, scm_set_source_properties_x,
6389 scm_source_property): Removed compile time option SCM_RECKLESS to
6390 clean up the code. Full number of arguments checking of closures
6391 is mandatory now. However, the option to disable the checking has
6392 most probably not been used anyway.
6393
6394 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
6395 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
6396
6397 2002-06-30 Gary Houston <ghouston@arglist.com>
6398
6399 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
6400 do anything useful. Added a comment about need for a mutex if
6401 pre-emptive threading is supported.
6402
6403 * posix.c (scm_convert_exec_args), dynl.c
6404 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
6405 allocate_string_pointers. 2) simplified: don't reallocate the
6406 strings, just make an array of pointers 3) avoid memory leaks on
6407 error 4) let the procedure report errors in its own name.
6408 Consequences: 1) the procedures now assume that SCM strings are
6409 nul-terminated, which should always be the case. 2) Since strings
6410 are not reallocated, it's now possible for strings passed to
6411 dynamic-args-call to be mutated.
6412
6413 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6414
6415 * __scm.h, eval.c, eval.h: Removed compile time option
6416 MEMOIZE_LOCALS to clean up the code. Now, caching of local
6417 variable positions during memoization is mandatory. However, the
6418 option to disable the caching has most probably not been used
6419 anyway.
6420
6421 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
6422
6423 * print.c (scm_simple_format): Print missing part of format before
6424 ~% control. Thanks to Daniel Skarda!
6425
6426 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
6427
6428 * mkstemp.c: Added exception notice to license statement.
6429
6430 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
6431
6432 * numbers.c (mem2ureal): When returning an inexact zero, make sure
6433 it is represented as a floating point value so that we can change
6434 its sign.
6435
6436 From John W. Eaton <jwe@bevo.che.wisc.edu>
6437
6438 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
6439
6440 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
6441
6442 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
6443 in addition to `i386'. Thanks to Dale P. Smith.
6444
6445 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
6446
6447 * eq.c (real_eqv): New.
6448 (scm_eqv_p): Use it when comparing reals and complexes.
6449
6450 * numbers.c: Include <string.h>, for strncmp.
6451 (mem2complex): Do not create negative NaNs.
6452 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
6453 NaN.
6454 (scm_inexact_to_exact): Signal error when converting a NaN.
6455
6456 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
6457
6458 * posix.c (scm_putenv): Handle removing variables explicitely by
6459 calling unsetenv.
6460
6461 From John W. Eaton.
6462
6463 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
6464 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
6465 and scm_nan.
6466 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
6467 [SCO && ! HAVE_ISINF] (isinf): New function.
6468 (xisinf, xisnan): New functions.
6469 (IS_INF): Delete.
6470 (isfinite): Define in terms of xisinf.
6471 (scm_inf_p, scm_nan_p): New functions.
6472 (guile_Inf, guile_NaN): New file-scope vars.
6473 (guile_ieee_init): New function.
6474 (scm_inf, scm_nan): New functions.
6475 (idbl2str): Handle Inf and NaN. Remove funny label and
6476 corresponding gotos.
6477 (ALLOW_DIVIDE_BY_ZERO): New macro.
6478 (scm_divide): Allow division by zero to occur if
6479 ALLOW_DIVIDE_BY_ZERO is defined.
6480 Handle bignums and ints as special cases.
6481
6482 Additional stuff by me:
6483
6484 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
6485 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
6486 (iflo2str): Don't output a '+' for negative numbers or for Inf and
6487 NaN. They will provide their own sign.
6488 (scm_divide): Only allow divides by inexact zeros. Dividing by
6489 exact zeros still signals an errors.
6490
6491 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
6492
6493 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
6494 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
6495 (scm_slot_exists_p): Rename from scm_slots_exists_p.
6496 Thanks to Andreas Rottmann.
6497
6498 2002-04-20 Gary Houston <ghouston@arglist.com>
6499
6500 * removal of unused fields in root state (thanks to Christopher
6501 Cramer for pointing out the disuse.)
6502 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
6503 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
6504
6505 * root.c (root_mark): don't mark them.
6506 (scm_make_root): don't set them to #f.
6507 * init.c (scm_init_standard_ports): don't initialise with the
6508 default ports.
6509
6510 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
6511
6512 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
6513 cpp_sig_symbols.c.
6514
6515 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
6516
6517 * guile-snarf.in: Do not clean input file. This would write to
6518 the $(srcdir) during a VPATH build, which is not allowed. It also
6519 isn't needed since it only works when an output filename has been
6520 specified and in that case we don't need to clean the input file
6521 because the output file will already exist.
6522
6523 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
6524
6525 * guile-snarf: Install the trap for removing $cleanfile only when
6526 the value of $cleanfile is actually known.
6527
6528 2002-04-10 Rob Browning <rlb@defaultvalue.org>
6529
6530 * .cvsignore: add versiondat.h and *.c.clean.c.
6531
6532 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
6533
6534 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
6535 function, replaces macro SRCBRKP.
6536
6537 (SRCBRKP): Deprecated.
6538
6539 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
6540 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
6541 temporary variable.
6542
6543 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6544
6545 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
6546 CHECK_EXIT and removed all references to them.
6547
6548 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6549
6550 * debug.h (scm_ready_p, debug_print): Removed declarations.
6551
6552 * eval.c (EVALCELLCAR): Removed.
6553
6554 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
6555 operation from condition.
6556
6557 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
6558
6559 * guile-snarf.in: When the output filename is "-", write to
6560 stdout. When no "-o" option is given, use "-" as the output
6561 filename (i.e., stdout). Only 'clean' the inputfile or remove the
6562 output file on error when the output file name is not "-". Define
6563 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
6564
6565 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
6566
6567 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6568
6569 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
6570 and the corresponding goto statements. Removed redundant code.
6571
6572 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6573
6574 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
6575 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
6576 Re-enabled handing of rpsubrs and asubrs.
6577
6578 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6579
6580 * eval.c (SIDEVAL): Removed.
6581
6582 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
6583 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
6584 argument checking order for set! to locals, variables and symbols.
6585 Improvements to control structure. Removed some uses of arg1 and
6586 arg2 as temporary variables.
6587
6588 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
6589
6590 * guile-snarf.in: Remove "--compat=1.4" support.
6591 Add "-d" and "-D" support.
6592
6593 (deprecated_list): New var.
6594 (compat_mode_clean_xxx): Delete.
6595 (grep_deprecated): New func.
6596 ("main"): If "-d" or "-D", call `grep_deprecated'.
6597
6598 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
6599
6600 * hooks.h: Change scm_t_c_hookype_t everywhere to
6601 scm_t_c_hook_type.
6602
6603 Docstring fixes:
6604
6605 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
6606
6607 * ports.c (scm_sys_make_void_port): Use `@file'.
6608
6609 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
6610 than `else'.
6611
6612 * macros.c (scm_makmacro): Don't say that the form replaces its
6613 source, because it doesn't.
6614 (scm_makmmacro): Clarify difference between this and scm_makmacro.
6615
6616 * backtrace.c (scm_display_error), filesys.c (scm_umask,
6617 scm_select, scm_basename), goops.c (scm_method_generic_function),
6618 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
6619 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
6620 spelling mistakes.
6621
6622 * debug.c (scm_debug_options), eval.c
6623 (scm_eval_options_interface), read.c (scm_read_options): Change
6624 incorrect @var in docstring to @code.
6625
6626 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
6627
6628 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
6629
6630 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
6631 guile-snarf can remove trailing non-init code.
6632
6633 * guile-snarf.in (modern_snarf): Remove everything following and
6634 including "^:^" from the output.
6635
6636 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
6637
6638 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
6639
6640 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
6641
6642 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
6643
6644 * guile-snarf.in: Update copyright.
6645 Rewrite to internalize error handling.
6646 Add "--compat=1.4" handling.
6647 Add commentary.
6648
6649 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
6650 (snarfcppopts): New var.
6651 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
6652 (.c.doc): Use $(snarfcppopts).
6653
6654 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
6655 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
6656 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
6657 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
6658 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
6659 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
6660 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
6661 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
6662 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
6663 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
6664 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
6665 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
6666 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
6667 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
6668
6669 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6670
6671 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
6672 The next step will be to remove the union 't' and simplify the
6673 code of SCM_CEVAL that way.
6674
6675 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
6676
6677 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
6678 rreadfds, rwritefds, rexceptfds): Made static.
6679
6680 * gc.c (terminating), fports.c (terminating): Renamed
6681 scm_i_terminating.
6682
6683 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
6684
6685 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
6686 potential overflow problems. Thanks to John W Eaton!
6687
6688 * strop.c (string_capitalize_x): Treat characters as unsigned so
6689 that 8-bit chars work. Thanks to David Pirotte!
6690
6691 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
6692
6693 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
6694 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
6695 proc as temporary variables. Introduced temporary variables with
6696 hopefully descriptive names for clarification. Replaced SCM_N?IMP
6697 by a more explicit predicate in some places.
6698
6699 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
6700
6701 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
6702 Added lots of comments regarding the implementation of #@dispatch.
6703 Changed intra-procedure communication to use t.arg1 instead of
6704 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
6705 variables. Introduced temporary variables with hopefully
6706 descriptive names for clarification. Replaced SCM_N?IMP by a more
6707 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
6708 of computing the expression explicitly. Eliminate now unused
6709 label nontoplevel_cdrxbegin.
6710
6711 * goops.h (SCM_INSTANCE_HASH): New macro.
6712
6713 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
6714
6715 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
6716
6717 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
6718 "guile-snarf" moved back from `noinst_SCRIPTS'.
6719
6720 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
6721
6722 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
6723 exists when adding a source property other than those that are
6724 handled explicitly, add the new property to the SRCPROPS obj's
6725 plist.
6726
6727 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
6728 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
6729
6730 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
6731 debug.status. It isn't needed, and it can overflow the bits
6732 reserved for it (which may lead to a segv or a GC abort).
6733
6734 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6735
6736 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
6737 side-effecting operations from conditions and macro calls.
6738 Replaced SCM_N?IMP by a more explicit predicate in some places.
6739 Minimized the scope of some variables.
6740
6741 2002-03-02 Stefan Jahn <stefan@lkcc.org>
6742
6743 * convert.i.c: Fixed int <-> long conversions which would have
6744 failed if their sizes were different.
6745
6746 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6747
6748 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
6749 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
6750 as temporary variables. Removed side-effecting operations from
6751 conditions and macro calls. Introduced temporary variables with
6752 hopefully descriptive names for clarification. Replaced SCM_N?IMP
6753 by a more explicit predicate in some places. Removed code that
6754 was conditionally compiled if SICP was defined - which it never
6755 is.
6756
6757 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6758
6759 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
6760 Removed some uses of t.arg1 and proc as temporary variables.
6761 Removed side-effecting operations from conditions and macro calls.
6762 Introduced temporary variables with hopefully descriptive names
6763 for clarification. Replaced SCM_N?IMP by a more explicit
6764 predicate in some places.
6765
6766 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6767
6768 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
6769 explicit predicate in some places.
6770
6771 (CHECK_EQVISH): Removed.
6772
6773 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
6774 variables. Removed side-effecting operations from conditions and
6775 macro calls. Introduced temporary variables for clarification.
6776 Sorted if-else-if check for the type of the last form in a list by
6777 frequency. Avoided some unnecessary tail-recursion calls.
6778
6779 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6780
6781 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
6782 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
6783 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
6784 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
6785 scm_cell and all its uses to scm_t_cell in accordance to Guile's
6786 naming scheme for types.
6787
6788 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
6789 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
6790 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
6791 (scm_make_environment), eval.c (scm_closure), fports.c
6792 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
6793 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
6794 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
6795 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
6796 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
6797 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
6798 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
6799 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
6800 scm_alloc_cell to scm_cell.
6801
6802 * environments.c (core_environments_observe), gc.c
6803 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
6804 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
6805 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
6806 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
6807 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
6808 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
6809 (allocate_weak_vector): Renamed scm_alloc_double_cell to
6810 scm_double_cell.
6811
6812 2002-02-27 Stefan Jahn <stefan@lkcc.org>
6813
6814 * convert.i.c, convert.c: Better range checking.
6815
6816 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
6817
6818 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
6819 Windows (MinGW).
6820
6821 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
6822
6823 * Makefile.am: Update path to pre-inst-guile automake frag.
6824
6825 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6826
6827 * gc.c (scm_gc_sweep): Make it compile even when deprecated
6828 features are excluded.
6829
6830 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6831
6832 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
6833
6834 2002-02-25 Gary Houston <ghouston@arglist.com>
6835
6836 * convert.c: include <string.h> for convert_i.c.
6837
6838 2002-02-24 Rob Browning <rlb@defaultvalue.org>
6839
6840 * .cvsignore: add stamp-h1.
6841
6842 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
6843
6844 * unif.c (scm_array_to_list): Correct name, which had been
6845 accidentally changed to scm_t_arrayo_list!
6846
6847 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
6848
6849 * gc.c (scm_gc_sweep): Print an error message when aborting due to
6850 underflowing scm_mallocated.
6851
6852 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6853
6854 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
6855 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
6856 Reimplemented using the new scm_gc_malloc, etc., functions and
6857 deprecated.
6858
6859 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
6860
6861 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
6862 to `noinst_PROGRAMS'.
6863 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
6864 (noinst_PROGRAMS, noinst_SCRIPTS): New.
6865
6866 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6867
6868 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
6869 non-zero is returned from a port or smob free function.
6870 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
6871 scm_gc_register_collectable_memory,
6872 scm_gc_unregister_collectable_memory, scm_gc_malloc,
6873 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
6874
6875 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
6876 debug-malloc.c, dynl.c, environments.c, environments.h,
6877 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
6878 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
6879 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
6880 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
6881 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
6882 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
6883 appropriate. Return zero from smob and port free functions.
6884
6885 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
6886
6887 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
6888 messages while the GC is running.
6889 (scm_c_issue_deprecation_warning_fmt): New.
6890
6891 * fports.c (scm_setvbuf): Reset read buffer to saved values when
6892 it is pointing to the putback buffer.
6893
6894 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
6895
6896 * gsubr.c (create_gsubr): On "too many args" error,
6897 also display arg count and name. Thanks to Bill Schottstaedt.
6898
6899 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
6900
6901 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
6902
6903 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
6904 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
6905 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
6906
6907 * guile-snarf-docs-texi.in: Bye bye.
6908
6909 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6910
6911 * symbols.c (scm_make_symbol): Fix typo in docstring.
6912
6913 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
6914 scm_make_symbol): New prototypes.
6915
6916 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
6917
6918 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
6919 (SCM_SYMBOL_INTERNED_P): New.
6920 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
6921 SCM_MAKINUM since hash values can well be bignums.
6922 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
6923 This signals a interned symbol.
6924 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
6925 scm_make_symbol): New.
6926
6927 * print.c (scm_iprin1): Print uninterned symbols unreadably.
6928
6929 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
6930
6931 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
6932 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
6933 Thanks to Dave Love.
6934
6935 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
6936
6937 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
6938 This might help to make unintended clashes less likely.
6939 (scm_string_to_symbol): Protect the string until the symbols is
6940 created.
6941
6942 2002-01-31 Stefan Jahn <stefan@lkcc.org>
6943
6944 * convert.c, convert.h, convert.i.c: New files containing C
6945 array to Scheme conversion helpers meant to be replacement
6946 functions for the deprecated gh interface.
6947
6948 * Makefile.am: Setup rules for new `convert.*' files.
6949
6950 2002-01-28 Stefan Jahn <stefan@lkcc.org>
6951
6952 * symbols.c (scm_c_symbol2str): New function, replacement for
6953 `gh_scm2newsymbol()'.
6954
6955 * strings.c (scm_c_substring2str): New function. Proper
6956 replacement for `gh_get_substr()'.
6957
6958 * socket.c: Include `stdint.h' if available for the `uint32_t'
6959 declaration.
6960
6961 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
6962 compiler warning).
6963
6964 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
6965
6966 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
6967
6968 Other changes unrelated to Elisp...
6969
6970 * eval.c (scm_m_if): Use s_if rather than repeating string literal
6971 "if".
6972 (comments): Fix a few typos.
6973 (scm_for_each): Add parentheses around oddly unparenthesized
6974 if/while conditions.
6975
6976 * read.c (scm_read_opts): Add full stop at end of doc for
6977 `keywords' option.
6978
6979 * script.c (scm_compile_shell_switches): Use scm_str2symbol
6980 instead of gh_symbol2scm.
6981
6982 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
6983 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
6984
6985 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
6986 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
6987
6988 First batch of changes for Elisp support...
6989
6990 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
6991 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
6992 throw.c, vectors.c, weaks.c: Add #include for lang.h.
6993
6994 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
6995 conditionalize compilation and initialization of Elisp support
6996 function.
6997
6998 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
6999 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7000 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7001 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7002 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7003 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7004 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7005 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7006 options.c (change_option_setting, scm_options), posix.c
7007 (environ_list_to_c), print.c (scm_iprlist), throw.c
7008 (scm_exit_status), vectors.c (scm_vector), weaks.c
7009 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7010
7011 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7012 just SCM_FALSEP.
7013
7014 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7015 of just SCM_BOOLP.
7016
7017 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7018 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7019 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7020 (scm_m_atfop): Support function aliasing. Support both function
7021 args, which need transformation, and macro args, which do not.
7022 Add explanatory comments.
7023 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7024 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7025 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7026 SCM_NULLP || SCM_NILP instead of checks against (removed)
7027 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7028 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7029
7030 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7031 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7032 these, but I don't want to remove them yet, just in case.
7033 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7034 Elisp nil value.
7035
7036 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7037 against (removed) scm_lisp_nil.
7038 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7039 (SCM_NULL_OR_NIL_P): New.
7040
7041 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7042 SCM_VALIDATE_NULL.
7043
7044 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7045 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7046 value).
7047
7048 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7049 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7050 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7051 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7052
7053 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7054 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7055 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7056 Numbering shifted down accordingly.
7057 (SCM_ELISP_NIL): New IFLAG.
7058
7059 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7060
7061 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7062
7063 * eval.c: Removed outdated references to "everr". Improved some
7064 comments.
7065
7066 (scm_deval_args, deval_args): Renamed scm_deval_args to
7067 deval_args, since it is not part of the interface.
7068
7069 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7070 use references to debug.vect[0] before it exists. Add parentheses
7071 to switch statement.
7072
7073 * goops.h: Added local emacs variables.
7074
7075 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7076
7077 * eval.[ch] (scm_deval_args): Made static.
7078
7079 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7080 test.
7081
7082 * strings.c (scm_c_string2str): Clarified comment. Replaced
7083 THINKME by FIXME for uniformness. Removed question about whether
7084 arguments need to be protected from garbage collection: Arguments
7085 must be protected as any other variable.
7086
7087 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7088
7089 * procs.h (SCM_CLOSURE_BODY): New Macro.
7090
7091 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7092 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7093 get_slot_value, set_slot_value), procs.c
7094 (scm_procedure_documentation), sort.c (closureless), stacks.c
7095 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7096 SCM_CLOSURE_BODY.
7097
7098 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7099
7100 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7101
7102 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7103 use "cp" instead.
7104
7105 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7106
7107 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7108 everywhere.
7109
7110 * continuations.c (scm_make_continuation): Do not retain the
7111 throw_value when the continuation is invoked.
7112
7113 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7114
7115 * strings.c (scm_c_string2str): New function. Converts a
7116 given Scheme string into a C string. Also put in two
7117 THINKME's regarding the malloc policy for the missing converter
7118 routines.
7119
7120 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7121
7122 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7123 gh_symbol2scm.
7124
7125 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7126
7127 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7128 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7129
7130 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7131 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7132 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7133 macros.
7134
7135 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7136
7137 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7138 SCM_GC_CELL_* macros when accessing free cells.
7139
7140 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7141
7142 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7143 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7144 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7145 * strings.h (SCM_MAKE_STRING_TAG): New.
7146 * procs.h (SCM_MAKE_CCLO_TAG): New.
7147 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7148
7149 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7150 !SCM_ENABLE_DEPRECATED.
7151
7152 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7153 New.
7154
7155 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7156 signal handlers are allowed to divert the flow of control. Call
7157 scm_system_async_mark_from_signal_handler instead of
7158 scm_system_async_mark.
7159
7160
7161 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7162 scm_alloc_double_cell in their place.
7163
7164 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7165 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7166 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7167 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7168 scm_deprecated_newcell and scm_deprecated_newcell2.
7169
7170 gc.c (scm_tc16_allocated): Only define when including deprecated
7171 features.
7172 (scm_debug_newcell, scm_debug_newcell2): Removed.
7173 (scm_init_storage): Do not initialize scm_tc16_allocated.
7174 (scm_init_gc): Do it here.
7175 (allocated_mark): New, from old code.
7176 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7177
7178 * inline.c, inline.h: New files.
7179 * Makefile.am: Added them in all the right places.
7180
7181 * _scm.h: Include "libguile/inline.h".
7182
7183 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7184 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7185 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7186 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7187 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7188 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7189 scm_alloc_double_cell, respectively.
7190
7191 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7192
7193 * modules.c (scm_c_use_module): Adapt to changes to
7194 `process-use-modules'.
7195
7196 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7197
7198 * numbers.c (scm_divide): Fix more division by zero errors.
7199
7200 2001-11-21 Gary Houston <ghouston@arglist.com>
7201
7202 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7203 obsolete. autogen.sh says:
7204 invalid unused variable name: `OMIT_DEPENDENCIES'
7205
7206 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7207
7208 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7209 reporting the bug.
7210
7211 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7212
7213 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7214 Thanks to Eric Gillespie, Jr!
7215
7216 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7217
7218 * win32-socket.c (getservent, setservent, endservent,
7219 getprotoent, setprotoent, endprotoent): New functions.
7220 Appropriate replacements for M$-Windows.
7221
7222 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7223 these definitions for GUILE_DEBUG.
7224
7225 * net_db.c: Include "win32-socket.h" if compiling with a native
7226 M$-Windows compiler. Include some pieces of code (protoent and
7227 servent interface) protected by HAVE_* macros when using a
7228 native M$-Windows compiler.
7229
7230 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7231
7232 * modules.c (scm_c_export): Do nothing when the first argument is
7233 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7234
7235 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7236
7237 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7238 also include `buildstamp'.
7239
7240 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7241
7242 * version.c
7243 (s_scm_major_version): use SCM_MAJOR_VERSION.
7244 (s_scm_minor_version): use SCM_MINOR_VERSION.
7245 (s_scm_micro_version): use SCM_MICRO_VERSION.
7246 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7247 SCM_MICRO_VERSION.
7248
7249 * version.h.in
7250 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7251 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7252 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7253
7254 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7255
7256 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7257 Rewrite docstrings without reference to substring-move-left/right,
7258 since the latter no longer exist.
7259
7260 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7261
7262 * eval.c: Removed bogus comment about acros.
7263
7264 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7265 Minimize scope of local variable. Eliminate dependency on
7266 macro DEBUG_EXTENSIONS.
7267
7268 (s_splicing): New error message string.
7269
7270 (scm_m_body): Issue 'bad body' message rather than 'missing
7271 expression' message.
7272
7273 (scm_m_quote): Eliminate unnecessary copying.
7274
7275 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7276 checking of the body to scm_m_body.
7277
7278 (scm_m_do): Move comment to function header. Rename arg1 to
7279 binding. Made the code a bit easier to read.
7280
7281 (evalcar): Removed.
7282
7283 (iqq): Added a comment. Changed the depth parameter to
7284 unsigned. Use size_t for vector lengths. Make sure vector object
7285 is gc protected as long as its contents are read. Add some syntax
7286 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7287 control structure a bit.
7288
7289 (scm_m_delay): Added comment about the implementation of
7290 scm_m_delay.
7291
7292 (scm_m_define): Add comment about guile's currying define
7293 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7294 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7295
7296 (scm_m_letrec1): Removed. Part of the functionality is taken
7297 over by the new function 'transform_bindings'.
7298
7299 (transform_bindings): New function. Takes over some of the
7300 functionality of removed function 'scm_m_letrec1', namely to split
7301 a list of bindings into a reversed list of variables and a list of
7302 initializers.
7303
7304 (scm_m_letrec): Call 'transform_bindings'.
7305
7306 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7307 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7308 test. Use 'transform_bindings'. Fixed scoping error with named
7309 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7310 Jerram for suggesting the fix). Cleaned up the control structure
7311 a bit.
7312
7313 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7314 unnecessary consing. Eliminated unnecessary
7315 SCM_DEFER/ALLOW_INTS.
7316
7317 (SCM_CEVAL): Un-obfuscated some loops.
7318
7319 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7320
7321 * gc.h (scm_unhash_name): Old declaration removed.
7322
7323 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7324 @code{primitive-eval}.
7325
7326 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7327 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7328 Change @deffnx lines in docstrings to say {Scheme Procedure}
7329 rather than primitive or procedure.
7330
7331 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7332 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7333 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7334 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7335 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7336 (scm_string_split, scm_string_ci_to_symbol), strings.c
7337 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7338 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
7339 Docstring fixes and improvements reflecting edits that have been
7340 made in the reference manual source.
7341
7342 * objprop.c (scm_object_properties, scm_set_object_properties_x,
7343 scm_object_property, scm_set_object_property_x): Remove invalid
7344 @deffnx lines for corresponding procedure property primitives.
7345
7346 These changes add a @deffnx C function declaration and function
7347 index entries for each Guile primitive to the copy of the doc
7348 snarf output that is used for reference manual synchronization.
7349 Online help is unchanged.
7350
7351 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
7352 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
7353 name to SCM_SNARF_DOCS.
7354
7355 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
7356 snarf-check-and-output-texi.
7357
7358 * Makefile.am (guile-procedures.texi): New rule.
7359 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
7360 Changed so that the last stage of doc snarfing is now performed
7361 twice, once to produce guile-procedures.txt for online help, and
7362 once to produce guile.texi for reference manual synchronization.
7363
7364 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7365
7366 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
7367 safely usable as a single statement followed by a ';', for example
7368 in an if statement.
7369
7370 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
7371
7372 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
7373
7374 * random.c (scm_random_solid_sphere_x,
7375 scm_random_hollow_sphere_x): Correct "shere" typos.
7376
7377 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
7378
7379 * version.c (scm_version): Update docstring to include
7380 `micro-version'.
7381
7382 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
7383
7384 * modules.c (scm_c_export): Call va_end after collecting the
7385 symbols.
7386
7387 * strop.h, strop.c (scm_substring_move_left_x,
7388 scm_substring_move_right_x): Removed.
7389
7390 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
7391 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
7392 configure does.
7393
7394 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
7395
7396 * numbers.c: Document macros to define when including
7397 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
7398 now rely on SIZEOF_ macros that have been figured out at
7399 configure time.
7400
7401 * num2integral.i.c: Adapt to new interface.
7402 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
7403 target type by casting it and checking whether it is still the
7404 same. Do not try to handle bignums for integral types that are
7405 smaller than fixnums. When handling bignums, collect the
7406 magnituse first into a unsigned type, and correctly check for
7407 overflow.
7408 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
7409 only -MIN_VALUE can still be negative of all negative numbers (in
7410 twos-complement).
7411
7412 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
7413
7414 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
7415 HAVE_LONG_LONG depending on whether their size is non-zero.
7416
7417 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
7418
7419 * strop.c (scm_string_null_p): Docfix; nfc.
7420 Thanks to Scott Lenser.
7421
7422 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
7423
7424 * extensions.c (scm_load_extension): Canonicalize docstring
7425 whitespace.
7426
7427 * unif.c (scm_uniform_array_write), ports.c
7428 (scm_current_output_port, scm_force_output), dynwind.c
7429 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
7430 filesys.c (scm_open, scm_lstat), struct.c
7431 (scm_make_struct_layout), random.c (scm_random,
7432 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
7433 (scm_i_index): Remove superfluous whitespace from end of docstring
7434 lines.
7435
7436 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
7437 strings.c (scm_make_string), variable.c (scm_make_variable,
7438 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
7439 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
7440 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
7441 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
7442 newline at end of docstrings.
7443
7444 * modules.c (scm_set_current_module): Add missing newline to
7445 docstring.
7446
7447 2001-11-07 Stefan Jahn <stefan@lkcc.org>
7448
7449 * win32-socket.[ch]: New files. Defines Winsock-API error codes
7450 and makes them available through Guile. That is because the
7451 Winsock-API does not store its errors in `errno' and thus cannot
7452 return error messages via `strerror (errno)'.
7453
7454 * socket.c (scm_init_socket): Initialize `win32-socket' part
7455 here under M$-Windows.
7456
7457 * numbers.h: Added missing declaration of
7458 `scm_sys_check_number_conversions()'.
7459
7460 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
7461 and use in `(strerror)' and `(system-error)'.
7462
7463 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
7464 `win32-socket.[ch]' to extra source and header files.
7465
7466 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
7467
7468 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
7469 a call to turn-on-debugging when --debug has been given instead of
7470 turning it on directly. Also, handle new `--no-debug' option,
7471 which might suppress the call to turn-on-debugging.
7472
7473 2001-11-05 Stefan Jahn <stefan@lkcc.org>
7474
7475 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
7476
7477 2001-11-04 Stefan Jahn <stefan@lkcc.org>
7478
7479 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
7480 here (was at guile_LDADD) which describes the dependency
7481 correctly and allows a clean build on Win32.
7482
7483 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
7484 into FOO.
7485
7486 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
7487 import macros for external libraries (libcrypt, libqthreads,
7488 libreadline and libregex).
7489
7490 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
7491
7492 * posix.c (flock): Added support for flock() in M$-Windows.
7493
7494 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
7495 of __SCM_IMPORT__.
7496
7497 * fports.c (getflags): Differentiate reading and writing pipes
7498 descriptors.
7499
7500 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
7501 M$-Windows.
7502
7503 * coop.c (coop_condition_variable_timed_wait_mutex): Use
7504 conditionalized error code if `ETIMEDOUT' is not available.
7505 (scm_thread_usleep): Remove bogus declaration of `struct timeval
7506 timeout'.
7507
7508 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
7509 belongs. That is because NO_PREPRO_MAGIC gets undefined after
7510 each inclusion of `num2integral.i.c'.
7511 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
7512
7513 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7514
7515 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
7516 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
7517
7518 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
7519
7520 * print.c (scm_iprin1): Mark print state as revealed when
7521 dispatching to generic write or display.
7522
7523 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
7524
7525 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7526
7527 Support for native Win32. Thanks to Stefan Jahn!
7528
7529 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
7530 and win32-dirent.h to extra source and header files. These
7531 include the uname() and the POSIX dirent interface implementation
7532 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
7533 linkers which do not allow unresolved symbols inside shared
7534 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
7535 dependency.
7536
7537 * __scm.h: Defined SCM_API. This macro gets prepended to all
7538 function and data definitions which should be exported or imported
7539 in the resulting dynamic link library in the Win32 port.
7540
7541 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
7542 chars.h, continuations.h, coop-defs.h, coop-threads.h,
7543 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
7544 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
7545 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
7546 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
7547 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
7548 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
7549 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
7550 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
7551 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
7552 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
7553 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
7554 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
7555 vports.h, weaks.h:
7556 Prefixed each each exported symbol with SCM_API.
7557
7558 * continuations.c: Added comment about the use of the extern
7559 declarations of {get,set}context() functions used in the ia64 port.
7560
7561 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
7562 is meant to be a `unsigned long *'.
7563
7564 * filesys.c: Include `direct.h' if possible. Use local
7565 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
7566 macros for M$-Windows. Implementation of `fstat_Win32()' which is
7567 able to differentiate between sockets and other file descriptors.
7568 Use this function as wrapper in `scm_fstat()'. Fixed typo in
7569 `scm_dirname()'.
7570
7571 * fports.c: Include `io.h' is possible. Put `*fp' into referring
7572 statement block in `scm_fport_buffer_add()'.
7573 Some corrections in `getflags()'.
7574
7575 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
7576
7577 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
7578 build on Win32. Disable preloaded symbols on Win2 platforms.
7579
7580 * ioext.c, ports.c: Include `io.h' is possible.
7581
7582 * mkstemp.c: Include `process.h' is possible.
7583
7584 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
7585 too.
7586 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
7587
7588 * posix.c: Remove unnecessary dirent includes and defines. Include
7589 local `win32-uname.h' for MinGW. Extern declaration of
7590 `mkstemp()' for systems where it does not exists. Make
7591 `getlogin()' available on M$-Windows.
7592
7593 * scmsigs.c: Made `usleep()' avalable on MinGW.
7594
7595 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
7596
7597 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
7598
7599 * win32-uname.c: Include "win32-uname.h", not "uname.h".
7600
7601 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
7602
7603 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
7604 Don't apply scm_uniform_vector_length on arrays.
7605
7606 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7607
7608 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
7609 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
7610 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
7611 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
7612 scm_list_<n> over scm_cons[2]?.
7613
7614 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
7615 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
7616 SCM_C[AD][AD]R instead of explicit form.
7617
7618 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
7619 comparison parameters.
7620
7621 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
7622 !SCM_NULLP instead of SCM_NIMP.
7623
7624 (scm_m_case): Don't copy the form. Renamed proc to clause and
7625 minimized its scope. Renamed x to clauses. Removed side
7626 effecting operation from macro call.
7627
7628 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
7629 minimized its scope. Renamed x to clauses. Minimized the scope
7630 of variable 'len'. Make sure the else clause is treated specially
7631 even in case of '=>' occurences. Don't change the else to #t in
7632 order to be able to distinguish this case in the evaluator. Leave
7633 type checking of the recipient to the evaluator.
7634
7635 (scm_c_improper_memq): Made the comment somewhat clearer.
7636
7637 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
7638 test for SCM_IM_LET at the place of the formal parameters.
7639 Simplified the formal parameter checking.
7640
7641 (scm_m_letstar): Added Comment. Renamed proc to bindings.
7642 Renamed arg1 to binding and minimized its scope. Eliminated
7643 unnecessary consing.
7644
7645 (scm_m_do): Renamed proc to bindings. Minimized the scope of
7646 variable 'len'.
7647
7648 (build_binding_list): New static function.
7649
7650 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
7651 Further, split up the 'letrec' unmemoizing code to the
7652 corresponding parts for 'do', 'let' and 'letrec', adding comments
7653 to each form. Cleanup the handling of the do form (This removes
7654 some *real* code :-).
7655
7656 (SCM_CEVAL): Removed side effecting operation from macro call.
7657 Handle the 'else clause of the 'cond form specially - the symbol
7658 'else is not replaced with #t any more.
7659
7660 2001-10-14 Gary Houston <ghouston@arglist.com>
7661
7662 * version.c (scm_version): use sprintf instead of snprintf,
7663 for portability. thanks to Bill Schottstaedt.
7664
7665 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
7666
7667 * read.c (scm_lreadr): When user-defined hash procedure returns
7668 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
7669 an exception. (This prevents parsing of uniform vectors from
7670 interfering with parsing of numbers.)
7671
7672 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
7673
7674 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
7675 PTRDIFF_MIN. Thanks to Ken Raeburn.
7676
7677 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
7678
7679 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
7680
7681 * eval.c (scm_m_atbind): First try to find the variable without
7682 defining it locally; when it has not been found, define it
7683 locally.
7684
7685 * modules.c (module_variable): Pass over variables that exist but
7686 are unbound.
7687
7688 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
7689
7690 * backtrace.c (display_backtrace_file_and_line): Only use
7691 scm_basename when POSIX support is compiled in. Thanks to Chris
7692 Cramer.
7693
7694 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7695
7696 * numbers.c (mem2uinteger): Return number read so far when coming
7697 across a hexdigit after having read a # or if not reading a hex
7698 value. This will enable the calling code to correctly handle
7699 forms like 1e2. (The background is, that the exponent markers d,
7700 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
7701 providing this patch.
7702
7703 (mem2complex): Fix erroneous double-negation. Now, numbers like
7704 1-i will be read correctly.
7705
7706 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
7707
7708 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
7709
7710 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
7711
7712 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
7713
7714 * print.c (scm_print_state_vtable, print_state_pool):
7715 Initialize. These variables are now registered as gc roots.
7716
7717 (scm_current_pstate): Update documentation.
7718
7719 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
7720 scm_prin1, scm_init_print): print_state_pool is registered as a
7721 gc root and thus does not need to be protected by a surrounding
7722 pair any more.
7723
7724 (make_print_state): The car of print_state_pool no longer holds
7725 the scm_print_state_vtable.
7726
7727 (scm_current_pstate, scm_make_print_state, print_circref,
7728 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
7729 SCM_N<foo>.
7730
7731 (scm_prin1): When building lists, prefer scm_list_<n> over
7732 scm_cons[2]?.
7733
7734 (scm_iprlist): Removed a redundant SCM_IMP test.
7735
7736 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
7737
7738 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
7739
7740 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
7741
7742 (scm_memcons, scm_mem_to_proc): When building lists, prefer
7743 scm_list_<n> over scm_cons[2]?.
7744
7745 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
7746
7747 (scm_procedure_name): Use SCM_CADR instead of explicit form.
7748
7749 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
7750 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
7751 for some reason his patch didn't make it into the cvs.
7752
7753 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7754
7755 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
7756 little bit - should even be somewhat more accurate now.
7757
7758 2001-10-08 Rob Browning <rlb@defaultvalue.org>
7759
7760 * gc.c: support ia64 register backing store.
7761 (SCM_MARK_BACKING_STORE): new macro.
7762
7763 * continuations.h: support ia64 register backing store.
7764 (struct scm_t_contregs): add ia64 register backing store.
7765
7766 * continuations.c: support ia64 register backing store.
7767 (continuation_mark): mark ia64 register backing store.
7768 (continuation_free): free ia64 register backing store.
7769 (scm_make_continuation): capture ia64 register backing store.
7770 (copy_stack_and_call): copy ia64 register backing store.
7771
7772 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
7773
7774 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
7775 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
7776 instead of SCM_NIMP to test for that case.
7777
7778 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
7779 scm_t_bits instead of long.
7780
7781 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
7782
7783 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7784 SCM_T_SIGNED_BITS_MIN): New.
7785 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
7786 Use them to make these macros computable by the preprocessor.
7787
7788 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
7789 whether the integral type fits in a fixnum, not the compiler.
7790 This removes a spurious compiler warning. Also, honor the
7791 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
7792 needed for `long long's.
7793
7794 * numbers.c: Define NO_PREPRO_MAGOC when including
7795 num2integral.c.i for `long long' and `signed long long'.
7796
7797 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
7798
7799 These changes fixes a race condition in the Guile coop - pthread
7800 compatibility code.
7801
7802 * coop.c (mother_awake_p): New variable.
7803 (coop_create): Set mother_awake_p before creating or signalling
7804 mother; wait until mother is going to sleep before returning.
7805 (mother): Reset mother_awake_p before going to sleep.
7806
7807 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
7808
7809 * options.c (protected_objects, scm_init_options): The content of
7810 protected_objects is now protected from garbage collection using
7811 scm_gc_register_root instead of scm_permanent_object.
7812
7813 (get_option_setting): New static function that computes an option
7814 setting as it was formerly done in the function scm_options.
7815
7816 (get_documented_option_setting): New static function that
7817 returns option documentation as it was formerly done in the
7818 function scm_options. Note that documentation C strings are no
7819 longer precomputed into SCM objects. Instead, they are converted
7820 into SCM strings every time get_documented_option_setting is
7821 called.
7822
7823 (change_option_setting): New static functions that modifies the
7824 option setting as it was formerly done in the function
7825 scm_options. The function is now exception safe, i. e. won't
7826 cause a memory leak when interrupted. Further, only non-immediate
7827 option values are added to the protection list.
7828
7829 (scm_options): This function now has only the purpose to dispatch
7830 to to get_option_setting, get_documented_option_setting or
7831 change_option_setting, depending on the arguments given to
7832 scm_options.
7833
7834 (scm_init_opts): Don't convert documentation C strings into SCM
7835 strings. Further, don't protect any object values: They _must_
7836 be immediate values, otherwise there is no guarantee that they
7837 have not been collected before anyway.
7838
7839 * options.[ch] (scm_t_option): Made type unsigned, name into a
7840 constant char* and val into a scm_t_bits type.
7841
7842 (scm_options, scm_init_opts): The number of options is guaranteed
7843 to be larger or equal to zero. Thus, the type is changed to
7844 unsigned.
7845
7846 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
7847
7848 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
7849 testing an unsigned value for being >= 0.
7850
7851 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
7852
7853 * numbers.h: Removed old comment about using SCM_CAR to access
7854 non-pair cells.
7855
7856 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
7857 the return value is signed. Thanks to Brian Crowder for the bug
7858 report.
7859
7860 (SCM_SRS): Avoid unnecessary casting and don't unpack input
7861 values. With this patch, SCM_SRS can be safely used for other
7862 types than scm_t_signed_bits. However, it should still better be
7863 an internal macro and thus be renamed to SCM_I_SRS.
7864
7865 (SCM_MAKINUM, SCM_INUM): Use proper casting.
7866
7867 2001-10-03 Gary Houston <ghouston@arglist.com>
7868
7869 * continuations.h, unif.h: in the descriptions of the bit patterns
7870 of the heap cells, make bit 0 the least significant.
7871
7872 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
7873
7874 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
7875 Thanks to Golubev I. N.
7876
7877 2001-09-25 Gary Houston <ghouston@arglist.com>
7878
7879 * ports.c (scm_drain_input): extended the docstring. thanks to
7880 Alex Schroeder and Thien-Thi Nguyen.
7881
7882 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
7883
7884 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
7885 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
7886 macros. (The NUM names might soon change.)
7887
7888 * numbers.h: Added missing declarations.
7889
7890 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
7891
7892 * Makefile.am: Distribute num2float.i.c.
7893
7894 * num2float.i.c: New file, multiply included by numbers.c, used
7895 to "templatize" the float <-> num conversion routines.
7896
7897 * numbers.c: New functions: scm_num2float, scm_float2num,
7898 scm_num2double, scm_double2num.
7899
7900 2001-09-21 Rob Browning <rlb@defaultvalue.org>
7901
7902 * .cvsignore: really add version.h
7903
7904 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
7905 Otherwise it fails on the alpha. However, we might rather choose
7906 this size conditionally.
7907
7908 * numbers.c (scm_gcd): change "k" to a long from an int.
7909 Otherwise it fails on the alpha. However, we might rather choose
7910 this size conditionally.
7911
7912 * error.c (scm_wta): coerce char* to intptr_t before int
7913 assignment.
7914
7915 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
7916 int.
7917
7918 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
7919
7920 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
7921
7922 * numbers.c (scm_integer_expt): Accept inexact integer in second
7923 argument. (Thanks to Bill Schottstaedt.)
7924
7925 2001-09-20 Rob Browning <rlb@defaultvalue.org>
7926
7927 * .cvsignore: add version.h
7928
7929 * versiondat.h.in: removed (obsolete).
7930
7931 * version.h.in: renamed from version.h.
7932 (SCM_GUILE_MAJOR_VERSION): new public macro.
7933 (SCM_GUILE_MINOR_VERSION): new public macro.
7934 (SCM_GUILE_MICRO_VERSION): new public macro.
7935
7936 * version.h: renamed to version.h.in.
7937
7938 * version.c
7939 (scm_major_version): support integer *_VERSION macros.
7940 (scm_minor_version): support integer *_VERSION macros.
7941 (scm_micro_version): support integer *_VERSION macros.
7942 (scm_version): support integer *_VERSION macros.
7943
7944 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
7945
7946 * error.c, error.h: Made error keys globally accessible.
7947 Applications might want to test for these or use them in a direct
7948 call to scm_error.
7949
7950 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
7951 routines are passed an inexact. This change in behavior is
7952 motivated by concordance with R5RS: It is more common that a
7953 primitive doesn't want to accept an inexact for an exact.
7954
7955 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7956
7957 The following patch partially undoes my patch from 2001-06-30,
7958 where I added the function scm_gc_mark_cell_conservatively. The
7959 function is buggy, since it breaks guile during conservative
7960 marking if a pointer on the stack points directly into the list of
7961 free cells on the heap: With conservative cell marking this will
7962 cause the whole free list to be scanned and marked - boom!
7963
7964 * gc.c (allocated_mark, MARK, heap_segment,
7965 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
7966 (scm_gc_mark_cell_conservatively): Remove function
7967 scm_gc_mark_cell_conservatively and update the corresponding
7968 comments and uses accordingly. Thanks to Christopher Cramer for
7969 the patch. (Minor corrections by me.)
7970
7971 2001-09-15 Gary Houston <ghouston@arglist.com>
7972
7973 * root.h (scm_root_state): removed the continuation_stack and
7974 continuation_stack_ptr members, which have no apparent purpose.
7975 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
7976 removed.
7977
7978 * root.c (root_mark), init.c (restart_stack, start_stack), gc
7979 (scm_igc): remove all references to contination_stack and
7980 continuation_stack_ptr, avoiding allocation of a vector and
7981 useless processing during gc.
7982
7983 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7984
7985 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
7986
7987 (TCONC_IN): Make sure that the cell word 0 is initialized last.
7988
7989 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
7990
7991 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
7992
7993 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
7994 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
7995
7996 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7997
7998 * guardians.c (mark_dependencies_in_tconc,
7999 whine_about_self_centered_zombies, scm_init_guardians): Register
8000 the static global variable `self_centered_zombies' via
8001 scm_gc_register_root, to make some cdr-ing unnecessary.
8002
8003 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8004
8005 * backtrace.c (display_backtrace_file,
8006 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8007 values, use SCM_FALSEP when comparing SCM values against #f.
8008 Thanks to Rob Browning for the bug report.
8009
8010 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8011
8012 * strings.[ch] (scm_str2string): New function.
8013
8014 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8015
8016 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8017 when computing nm, even if it's negative.
8018 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8019 (scm_must_realloc): Likewise.
8020
8021 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8022
8023 * numbers.c (scm_sys_check_number_conversions): new function,
8024 defined if Guile is compiled in debugging mode. currently checks
8025 `scm_num2ulong', should check much much more.
8026
8027 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8028 unsigned, ensure that it's positive. thanks to Martin Baulig!
8029
8030 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8031
8032 * __scm.h: Added new section about compile time selectable
8033 features.
8034
8035 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8036 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8037 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8038 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8039 Removed.
8040
8041 * deprecation.c (scm_include_deprecated_features): Simplified.
8042
8043 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8044 `SCM_IMP´ instead of `!SCM_CELLP´.
8045
8046 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8047 Extract side-effecting operations from macros.
8048
8049 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8050 scm_top_level_lookup_closure_var and scm_system_transformer.
8051
8052 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8053
8054 (heap_segment): Use CELL_P instead of SCM_CELLP.
8055
8056 * init.c (start_stack): Don't initialize
8057 scm_top_level_lookup_closure_var and scm_system_transformer.
8058
8059 * modules.c (scm_set_current_module): Don't access
8060 scm_top_level_lookup_closure_var and scm_system_transformer.
8061
8062 (scm_sym2var): Don't call scm_variable_set_name_hint.
8063
8064 (scm_post_boot_init_modules): Removed deprecated initializations.
8065
8066 * print.c (scm_ipruk): Don't access cell contents of non cells.
8067
8068 * strings.c (scm_string_set_x): All strings are writable.
8069
8070 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8071 type. There is only one string type now.
8072
8073 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8074
8075 * tags.h: Remove comments about two different string types.
8076
8077 (SCM_CELLP, SCM_NCELLP): Deprecated.
8078
8079 * variable.c (make_variable): Remove code variant for vcells.
8080
8081 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8082 SCM_VARIABLE_LOC): Remove code variant for vcells.
8083
8084 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8085 SCM_ENABLE_DEPRECATED with the logic reversed.
8086
8087 * dynl.c (moddata, registered_mods), dynl.[ch]
8088 (scm_register_module_xxx, scm_registered_modules,
8089 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8090 (*top-level-lookup-closure*), eval.[ch]
8091 (scm_top_level_lookup_closure_var, scm_system_transformer,
8092 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8093 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8094 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8095 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8096 scm_unprotect_object), modules.c (root_module_lookup_closure,
8097 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8098 beautify_user_module_x_var, try_module_autoload_var,
8099 scm_module_full_name), modules.[ch] (scm_the_root_module,
8100 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8101 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8102 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8103 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8104 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8105 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8106 scm_make_shared_substring), tags.h (scm_tc7_substring,
8107 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8108 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8109 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8110 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8111 Removed.
8112
8113 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8114 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8115 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8116 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8117 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8118 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8119 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8120 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8121 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8122 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8123 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8124 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8125 (setzone, scm_strftime, scm_strptime), vports.c
8126 (scm_make_soft_port): Remove calls to
8127 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8128 gone, all strings are 0-terminated anyway.
8129
8130 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8131 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8132 double inclusion of the same headers to the SCM_<filename>_H
8133 format.
8134
8135 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8136 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8137 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8138 any more.
8139
8140 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8141 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8142 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8143 !SCM_<foo> over SCM_N<foo>.
8144
8145 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8146
8147 * Makefile.am: Remove references to symbols-deprecated.c.
8148
8149 * symbols.c (scm_init_symbols): Don't initialize deprecated
8150 symbol functions.
8151
8152 * symbols-deprecated.c: Removed.
8153
8154 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8155 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8156 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8157 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8158 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8159 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8160 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8161 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8162 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8163 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8164 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8165 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8166 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8167 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8168 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8169 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8170 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8171 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8172 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8173 scm_intern0, scm_sysintern, scm_sysintern0,
8174 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8175 scm_string_to_obarray_symbol, scm_intern_symbol,
8176 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8177 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8178 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8179 vectors.[ch] (scm_vector_set_length_x): Removed.
8180
8181 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8182 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8183 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8184 Renamed the macros that are defined to inhibit double inclusion of
8185 the same headers to the SCM_<filename>_H format.
8186
8187 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8188 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8189 SCM_N<foo>.
8190
8191 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8192
8193 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8194 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8195 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8196 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8197 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8198 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8199 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8200 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8201 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8202 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8203 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8204 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8205
8206 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8207 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8208 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8209 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8210 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8211 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8212 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8213 double inclusion of the same headers to the SCM_<filename>_H
8214 format.
8215
8216 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8217 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8218 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8219 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8220 !SCM_<foo> over SCM_N<foo>.
8221
8222 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8223
8224 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8225 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8226 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8227 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8228 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8229 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8230 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8231 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8232 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8233 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8234 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8235 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8236 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8237 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8238 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8239 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8240 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8241 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8242 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8243 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8244 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8245 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8246 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8247 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8248 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8249 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8250 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8251 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8252 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8253 the macros that are defined to inhibit double inclusion of the
8254 same headers to the SCM_<filename>_H format.
8255
8256 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8257
8258 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8259 "scm_t_portable" with "scm_port_table" which was an artifact from
8260 the great "scm_*_t -> scm_t_" renaming.
8261
8262 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8263
8264 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8265 used; nfc. Thanks to Bill Schottstaedt.
8266
8267 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8268 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8269 Thanks to Chris Cramer.
8270
8271 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8272
8273 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8274
8275 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8276 dynamic scope.
8277 * dynwind.h (scm_swap_bindings): Declare.
8278 * dynwind.c (scm_swap_bindings): Make non-static.
8279
8280 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8281
8282 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8283 doing exactly nothing about them). thanks Neil!
8284
8285 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8286
8287 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8288
8289 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8290
8291 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8292 (proto) in the case when either `GUILE_DEBUG' or
8293 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8294
8295 (map_free_list): Fix typo: Ref `f' correctly.
8296
8297 Thanks to Chris Cramer.
8298
8299 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8300
8301 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8302 variables.
8303 (libpath.h): change libguileversion to libguileinterface.
8304
8305 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8306
8307 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8308 ChangeLog-2000. Thanks to Daniel Skarda!
8309
8310 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8311
8312 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8313 do it from the Makefile.
8314
8315 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8316 are of a reasonable size.
8317
8318 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8319
8320 * stacks.c (scm_make_stack): Improve docstring by explaining use
8321 of cutting args.
8322
8323 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8324
8325 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8326 scm_char_whitespace_p, scm_char_upper_case_p,
8327 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8328 characters to fulfill isascii in addition to the primary
8329 predicate.
8330
8331 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8332
8333 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8334 scm_istr2flo, scm_istring2number): Removed.
8335
8336 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8337 SCM_SLOPPY_<foo>.
8338
8339 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
8340 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
8341 Added.
8342
8343 (scm_string_to_number): Use new number parser.
8344
8345 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
8346 handles complex numbers.
8347
8348 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
8349 SCM_<foo>_H.
8350
8351 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
8352 SCM_N<pred>.
8353
8354 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
8355
8356 (scm_i_mem2number): Added.
8357
8358 (scm_exact_to_inexact): Changed signature.
8359
8360 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
8361 here instead of within scm_i_mem2number. Call scm_i_mem2number
8362 instead of scm_istr2int and scm_istring2number.
8363
8364 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8365
8366 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
8367 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
8368 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
8369 !SCM_<pred> over SCM_N<pred>.
8370
8371 (scm_eval_body): Remove side effecting code from macro call.
8372
8373 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
8374 SCM_NIMP test.
8375
8376 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8377
8378 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
8379
8380 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
8381
8382 Removed vcell slot from structs.
8383
8384 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
8385 subsequent indices.
8386
8387 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
8388 zero. Use scm_vtable_index_layout instead of "0" when accessing
8389 said slot.
8390 (scm_init_struct): Remove vcell slot layout code from
8391 required_vtable_fields.
8392
8393 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
8394
8395 * goops.c (build_class_class_slots): Removed vcell slot
8396 definition.
8397
8398 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
8399 Removed vcell slot layout code.
8400 (scm_si_vcell): Removed.
8401
8402 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8403
8404 "Glocs" have been removed.
8405
8406 * tags.h: Update tag system docs.
8407 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
8408 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
8409 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
8410 or SCM_NCONSP, respectively.
8411
8412 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
8413 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
8414 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
8415
8416 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
8417 tell glocs from structs.
8418
8419 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
8420
8421 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
8422 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
8423 instead of with glocs.
8424 (EVALCAR): Do not test for glocs.
8425 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
8426 condition.
8427 (scm_unmemocar): Do not handle glocs.
8428 (scm_m_atfop): Memoize as a variable, not as a gloc.
8429 (scm_eval_args, scm_deval_args): Do not handle glocs.
8430 (scm_ceval, scm_deval): Likewise.
8431
8432 * eval.h (SCM_XEVALCAR): Do not test for glocs.
8433 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
8434 Removed.
8435
8436 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
8437
8438 * dynwind.c (scm_swap_bindings): Likewise.
8439 (scm_dowinds): Updated to recognize lists of variables instead of
8440 lists of glocs.
8441
8442 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
8443
8444
8445 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
8446 where it is needed.
8447
8448 2001-07-25 Gary Houston <ghouston@arglist.com>
8449
8450 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
8451 docstrings to reflect the n-ary implementation.
8452
8453 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8454
8455 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
8456 value of a variable, not the plain "return" statement.
8457
8458 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
8459
8460 * eval.c: Allow variables in memoized code (in addition to glocs).
8461 (scm_lookupcar): Handle variables in lost races. Replace symbol
8462 with variable directly, do not make a gloc.
8463 (scm_unmemocar): Rewrite variables using a reverse lookup, just
8464 like glocs.
8465 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
8466 the main switch.
8467
8468 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8469
8470 * variable.c (scm_i_variable_print): Use "value" instead of
8471 "binding" since a binding is the mapping between symbols and
8472 variables, not between variables and their values.
8473
8474 * tags.h (scm_tc7_variable): New.
8475 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
8476 * print.c (scm_iprin1): Likewise.
8477
8478 * variable.h (scm_tc16_variable): Removed.
8479 (SCM_VARIABLEP): Test for new tc7 code.
8480 (scm_i_variable_print): New.
8481 * variable.c (scm_tc16_variable): Removed.
8482 (variable_print): Renamed to scm_i_variable_print and made
8483 non-static.
8484 (variable_equal_p): Removed.
8485 (make_variable): Construct a tc7 object instead of a smob.
8486 (scm_init_variable): Do not register smob.
8487
8488 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
8489
8490 * tags.h: Include inttypes.h when we have it.
8491
8492 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
8493
8494 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
8495 is taken by the new SCM_IM_CALL_WITH_VALUES.
8496 * print.c (scm_isymnames): Update table accordingly.
8497
8498 2001-07-22 Gary Houston <ghouston@arglist.com>
8499
8500 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
8501 SCM_MAKINUM to convert regoff_t value to SCM.
8502
8503 2001-07-21 Gary Houston <ghouston@arglist.com>
8504
8505 * scmsigs.c: include sys/time.h for itimer stuff.
8506
8507 2001-07-19 Rob Browning <rlb@defaultvalue.org>
8508
8509 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
8510
8511 * c-tokenize.lex: add option %nounput to quiet warning.
8512 Add prototype for yylex to quiet warning.
8513
8514 * scmconfig.h.in: add flags for setitimer and getitimer.
8515
8516 * scmsigs.h (scm_init_scmsigs): new prototype.
8517 (scm_init_scmsigs): new prototype.
8518
8519 * scmsigs.c (s_scm_setitimer): new function.
8520 (s_scm_setitimer): new function.
8521
8522 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8523
8524 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
8525 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
8526 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
8527 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
8528 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
8529 guile-func-name-check.in, guile-snarf-docs-texi.in,
8530 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
8531 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
8532 objprop.c, objprop.h, options.c, options.h, random.h,
8533 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
8534 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
8535 version.c, version.h: Updated copyright notice.
8536
8537 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8538
8539 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
8540 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
8541 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
8542 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
8543 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
8544 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
8545 sym_environment, scm_sym_change_class): New static variables to
8546 hold predefined symbols.
8547
8548 (build_class_class_slots): Build the list using scm_list_n
8549 instead of cons. Also, slots are already created as lists, thus
8550 making a call to maplist unnecessary.
8551
8552 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
8553 scm_class_direct_subclasses, scm_class_direct_methods,
8554 scm_class_precedence_list, scm_class_slots, scm_class_environment,
8555 scm_method_procedure, create_standard_classes, purgatory): Use
8556 predefined symbols.
8557
8558 (build_slots_list, compute_getters_n_setters,
8559 scm_sys_initialize_object, scm_sys_inherit_magic_x,
8560 get_slot_value_using_name, set_slot_value_using_name,
8561 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
8562 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
8563 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
8564
8565 (scm_sys_prep_layout_x): Minimize variable scopes.
8566
8567 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
8568 scm_sys_fast_slot_set_x): Fix signedness.
8569
8570 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
8571 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
8572 scm_memoize_method, scm_wrap_object): Use packing and unpacking
8573 when converting to and from SCM values.
8574
8575 (scm_enable_primitive_generic_x): Add rest argument checking.
8576
8577 (map, filter_cpl, maplist, scm_sys_initialize_object,
8578 scm_sys_prep_layout_x, slot_definition_using_name,
8579 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
8580 call_memoize_method, scm_make, scm_make_class): Prefer explicit
8581 predicates over SCM_N?IMP tests.
8582
8583 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
8584 checking.
8585
8586 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
8587 alias.
8588
8589 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8590
8591 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
8592
8593 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
8594
8595 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
8596
8597 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
8598
8599 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
8600
8601 * strings.c (s_scm_string): fix arg position in assert.
8602
8603 2001-07-11 Gary Houston <ghouston@arglist.com>
8604
8605 * strports.c (st_write): use memcpy, not strncpy. thanks to
8606 Dale P. Smith.
8607
8608 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
8609
8610 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
8611 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
8612 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
8613 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
8614 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
8615 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8616 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
8617 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
8618 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
8619 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
8620 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
8621 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
8622 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
8623 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
8624 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
8625 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
8626 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
8627 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
8628 weaks.c, weaks.h: Remove "face-lift" comment.
8629
8630 2001-07-08 Rob Browning <rlb@defaultvalue.org>
8631
8632 * .cvsignore: add stamp-h.in.
8633
8634 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8635
8636 * hooks.c (scm_make_hook, scm_add_hook_x),
8637 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
8638 value info to the docstrings.
8639
8640 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8641
8642 Some more compatibility patches for Windows.
8643
8644 * posix.c (getlogin): getlogin() implementation for Windows.
8645
8646 * backtrace.c, ioext.c: Include <stdio.h>.
8647
8648 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
8649 exist.
8650
8651 * cpp_sig_symbols.in: Added SIGBREAK.
8652
8653 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
8654
8655 * strports.c (scm_read_0str, scm_eval_0str): Call
8656 scm_c_read_string and scm_c_eval_string respectively, not
8657 themselves. Thanks to Dale P. Smith!
8658
8659 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8660
8661 * unif.c (scm_array_set_x): The variable args does not
8662 necessarily have to be a list. Further, got rid of a redundant
8663 SCM_NIMP test.
8664
8665 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8666
8667 * list.c (SCM_I_CONS): Make sure the cell type is initialized
8668 last.
8669
8670 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
8671 init_heap_seg): Fixed signedness.
8672
8673 (init_heap_seg): Replaced strange for-loop with a while loop.
8674
8675 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
8676
8677 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
8678
8679 The following patch adds conservative marking for the elements of
8680 free or allocated cells.
8681
8682 * gc.c (allocated_mark, heap_segment): New static functions.
8683
8684 (which_seg): Deleted, since the functionality is now provided by
8685 function heap_segment.
8686
8687 (map_free_list): Use heap_segment instead of which_seg.
8688
8689 (MARK): If cell debugging is disabled, mark free cells
8690 conservatively.
8691
8692 (scm_mark_locations, scm_cellp): Extracted the search for the
8693 heap segment of a SCM value into function heap_segment.
8694
8695 (scm_init_storage): Allocated cells must be marked
8696 conservatively.
8697
8698 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
8699
8700 The following patch changes the representation of weak vectors to
8701 double cells instead of using an extension of the vector's
8702 allocated memory.
8703
8704 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
8705 the result of SCM_WVECT_GC_CHAIN.
8706
8707 (scm_gc_sweep): Weak vectors don't have extra fields any more.
8708
8709 * weaks.c (allocate_weak_vector): New static function. It does
8710 not patch any previously created vector object during the
8711 construction of a weak vector, and thus doesn't need to switch
8712 off interrupts during vector creation.
8713
8714 (scm_make_weak_vector, scm_make_weak_key_hash_table,
8715 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
8716 Use allocate_weak_vector to provide the new weak vector object.
8717
8718 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
8719 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
8720 now stored in the double cell.
8721
8722 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
8723 Use SCM_WVECT_TYPE.
8724
8725 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
8726 using an entry of the double cell.
8727
8728 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
8729
8730 * stamp-h.in: bye bye
8731
8732 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
8733
8734 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
8735 scm_eval_0str.
8736
8737 * load.c, load.h (scm_c_primitive_load,
8738 scm_c_primitive_load_path): New.
8739
8740 * strports.c, strports.h (scm_c_read_string): Renamed from
8741 scm_read_0str. Also, added "const" qualifier to argument.
8742 (scm_c_eval_string): Renamed from scm_eval_0str.
8743 (scm_read_0str, scm_eval_0str): Deprecated.
8744
8745 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8746
8747 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
8748 SCM_LIST1.
8749
8750 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
8751
8752 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
8753 scm_list_n): New functions.
8754 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
8755 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
8756 (lots of files): Use the new functions.
8757
8758 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
8759
8760 * strings.c: #include "libguile/deprecation.h".
8761
8762 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8763
8764 * read.c (scm_lreadr): When reading a hash token, check for a
8765 user-defined hash procedure first, so that overriding the builtin
8766 hash characters is possible (this was needed for implementing
8767 SRFI-4's read synax `f32(...)').
8768
8769 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
8770 because the latter is unsigned now and breaks comparisons like
8771 (n < (scm_t_signed_bits)MIN_VALUE).
8772
8773 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
8774
8775 * eval.h, eval.c (scm_call_4): New function.
8776
8777 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
8778 directly rather than dispatching to them via scm_ithrow and a lazy
8779 catch.
8780
8781 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
8782 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
8783 for trap handler procedures.
8784
8785 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
8786 procedures not being #f.
8787
8788 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
8789
8790 * Makefile.am (c-tokenize.c): add rule to generate it.
8791 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
8792
8793 filter-doc-snarfage.c: remove.
8794
8795 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8796
8797 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
8798
8799 The following set of changes makes compiling Guile under various
8800 Windows compilers easier. Compilation under GNU systems should
8801 not be affected at all.
8802
8803 Thanks to Stefan Jahn for all necessary information, patches and
8804 testing.
8805
8806 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
8807 getpgrp, ttyname, primitive-fork and some header inclusion for
8808 Windows.
8809
8810 * random.c: Define M_PI, if not predefined and use __int64 for
8811 LONG64 under Windows.
8812
8813 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
8814 Windows and conditionalize some signal names.
8815
8816 * socket.c (scm_getsockopt): Added missing comma.
8817 Include socket library header under Windows.
8818
8819 * stime.c (CLKTCK): Add cast to int, to make it compile under
8820 Windows.
8821
8822 * ports.c (truncate): New function, compiled only under Windows.
8823
8824 * net_db.c: Do not declare errno under Windows.
8825
8826 * iselect.h, inet_aton.c: Include socket library headers under
8827 Windows.
8828
8829 * guile.c (inner_main): Under Windows, initialize socket library
8830 and initialize gdb_interface data structures.
8831
8832 * gdb_interface.h: Under Windows, gdb_interface cannot be
8833 initialized statically. Initialize at runtime instead.
8834
8835 * fports.c (write_all): ssize_t -> size_t.
8836 (fport_print): Conditionalize call to ttyname().
8837 (getflags): New function, compiled only under Windows.
8838
8839 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
8840 primitives chown, link, fcntl.
8841 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
8842 as path seperator.
8843
8844 * backtrace.c: Include <io.h> under Windows.
8845
8846 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
8847
8848 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
8849 declaration.
8850
8851 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
8852
8853 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
8854 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
8855 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
8856 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
8857 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
8858 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
8859 (scm_dynamic_wind, scm_dowinds), environments.c
8860 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
8861 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
8862 goops.c (GETVAR, purgatory, make_class_from_template,
8863 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
8864 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
8865 (scm_primitive_load), modules.c (scm_resolve_module,
8866 scm_c_define_module, scm_c_use_module, scm_c_export,
8867 module_variable, scm_eval_closure_lookup, scm_sym2var,
8868 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8869 ports.c (scm_port_for_each), print.c (scm_printer_apply),
8870 properties.c (scm_primitive_property_ref), ramap.c (ramap,
8871 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
8872 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
8873 (scm_object_to_string, scm_call_with_output_string,
8874 scm_call_with_input_string), throw.c (scm_body_thunk,
8875 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
8876 scm_make_shared_array), vports.c (sf_flush, sf_write,
8877 sf_fill_input, sf_close): Use one of the above functions.
8878 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
8879
8880 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8881
8882 * filesys.c (scm_close), ports.c (scm_close_port,
8883 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
8884 instead of SCM_NEGATE_BOOL.
8885
8886 * filesys.c (scm_stat): Clean up type dispatch.
8887
8888 * filesys.c (scm_stat), ports.c (scm_input_port_p,
8889 scm_output_port_p): Get rid of redundant IM type check.
8890
8891 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
8892 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
8893 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8894 scm_return_entry), numbers.c (scm_number_to_string), objects.c
8895 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
8896 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
8897 scm_addr_vector), stime.c (scm_strftime), strings.c
8898 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
8899 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
8900 scm_string_split), strports.c (scm_strport_to_string), symbols.c
8901 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
8902 instead of scm_makfromstr.
8903
8904 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
8905 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
8906 scm_read_hash_extend), stime.c (scm_strftime), strings.c
8907 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
8908 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
8909 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
8910 !SCM_<pred> over SCM_N<pred>.
8911
8912 * strings.[ch] (scm_makfromstr): Deprecated.
8913
8914 (scm_mem2string): New function, replaces scm_makfromstr.
8915
8916 * strings.c (scm_substring), strop.c (string_copy,
8917 scm_string_split), strports.c (scm_strport_to_string), symbols.c
8918 (scm_symbol_to_string): Fix gc problem.
8919
8920 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
8921 SCM_<foo>_H.
8922
8923 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
8924 warning about comparing signed and unsigned values. This fix is
8925 not optimal, since it won't work reliably if sizeof (c_start) >
8926 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
8927 solution is to define this macro as an inline function, thus
8928 allowing to specifiy the types of c_start and c_end.
8929
8930 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8931
8932 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
8933 scm_t_debug_frame*.
8934
8935 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
8936 Rename <foo>H to SCM_<foo>_H.
8937
8938 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
8939 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
8940
8941 (narrow_stack): Make i unsigned. Don't use side-effecting
8942 operations in conditions.
8943
8944 (narrow_stack, scm_make_stack, scm_stack_id,
8945 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
8946
8947 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
8948 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
8949 more.
8950
8951 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
8952 signedness.
8953
8954 (scm_last_stack_frame): Remove bogus `;´.
8955
8956 * stacks.h (SCM_FRAMEP): Fix type check.
8957
8958 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
8959
8960 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
8961 c-tokenize.c when doing maintainer-clean.
8962
8963 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
8964
8965 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
8966 simplify.
8967
8968 * eval.c: all hash signs are in column 0.
8969
8970 * Makefile.am (guile_filter_doc_snarfage): build using
8971 c-tokenize.c, not filter-doc-snarfage.c.
8972 rearrange snarfing dependencies a bit.
8973
8974 * c-tokenize.lex: new file.
8975
8976 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
8977
8978 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
8979 scm_t_srcpropso_plist. See the big type renaming.
8980 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
8981 Thanks to Seth Alves!
8982
8983 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
8984 they aren't defined already.
8985
8986 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8987
8988 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
8989 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
8990 problem.
8991
8992 * backtrace.c (display_expression, scm_set_print_params_x,
8993 display_application, display_frame, scm_backtrace), numbers.c
8994 (scm_istring2number), objects.c (scm_class_of,
8995 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
8996 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
8997
8998 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
8999 always positive.
9000
9001 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9002 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9003
9004 * objects.c (scm_class_of): Type fix.
9005
9006 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9007 eliminated goto.
9008
9009 * pairs.h (scm_error_pair_access): The function can return if
9010 called recursively.
9011
9012 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9013
9014 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9015
9016 * gdbint.c, init.c: Removed inclusion of tag.h.
9017
9018 * tag.h, tag.c: Removed files.
9019
9020 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9021
9022 2001-06-20 Gary Houston <ghouston@arglist.com>
9023
9024 * deprecation.c, extensions.c, rw.c: include string.h.
9025
9026 2001-06-19 Gary Houston <ghouston@arglist.com>
9027
9028 * filter-doc-snarfage.c (process): added ungetc in
9029 MULTILINE_COOKIE case since otherwise it fails when there's no
9030 space between the '(' and the quote of the following string
9031 (gcc 3.0).
9032
9033 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9034
9035 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9036
9037 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9038
9039 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9040 extension takes place.
9041 * strings.h (SCM_STRING_LENGTH): Likewise.
9042 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9043
9044 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9045 it.
9046
9047 * tags.h: Include <stdint.h> when we have it.
9048 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9049 available. Else use "unsigned long".
9050 (scm_signed_bits_t): New.
9051
9052 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9053 (SCM_INUM): Cast result to scm_signed_bits_t.
9054
9055 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9056
9057 * mkstemp.c: Update path to #include file scmconfig.h.
9058 Thanks to Golubev I. N.
9059
9060 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9061
9062 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9063
9064 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9065 the macro definition.
9066
9067 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9068 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9069 instead of SCM_INST_TYPE.
9070
9071 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9072 the object is a struct before accessing its struct flags.
9073
9074 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9075
9076 2001-06-10 Gary Houston <ghouston@arglist.com>
9077
9078 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9079 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9080 work reliably anymore. try it from boot-9.scm instead.
9081
9082 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9083
9084 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9085 Thanks to Matthias Köppe!
9086
9087 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9088
9089 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9090 space-happy C preprocessors.
9091
9092 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9093 inside cookies. thanks to Matthias Köppe!
9094
9095 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9096
9097 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9098 keywords. Fix gc protection.
9099
9100 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9101 operations in macro calls.
9102
9103 * pairs.c (scm_error_pair_access): Avoid recursion.
9104
9105 Thanks to Matthias Koeppe for reporting the bugs that correspond
9106 to the following set of patches.
9107
9108 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9109 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9110 bitvector base address using SCM_BITVECTOR_BASE.
9111
9112 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9113 unsigned long*.
9114
9115 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9116
9117 * goops.c (SCM_CLASS_REDEF): Removed.
9118
9119 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9120 SCM_<foo>_H.
9121
9122 Thanks to Matthias Koeppe for reporting the bugs that correspond
9123 to the following set of patches.
9124
9125 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9126 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9127 scm_sys_allocate_instance, clear_method_cache,
9128 scm_sys_invalidate_method_cache_x, scm_make,
9129 create_standard_classes, scm_make_port_classes, scm_make_class,
9130 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9131
9132 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9133
9134 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9135
9136 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9137 UNARY_ELTS_CODE): Remove bogus break statement.
9138
9139 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9140 Don't access bit vectors elements as SCM objects.
9141
9142 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9143 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9144 Don't assign to an unpacked value.
9145
9146 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9147
9148 * __scm.h (SCM_NORETURN): Moved here from error.h.
9149
9150 (SCM_UNUSED): New macro.
9151
9152 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9153
9154 * backtrace.c (display_error_handler), continuations.c
9155 (continuation_print), debug.c (debugobj_print), dynwind.c
9156 (guards_print), environments.c (observer_print,
9157 core_environments_finalize, leaf_environment_cell,
9158 leaf_environment_print, eval_environment_print,
9159 eval_environment_observer, import_environment_define,
9160 import_environment_undefine, import_environment_print,
9161 import_environment_observer, export_environment_define,
9162 export_environment_undefine, export_environment_print,
9163 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9164 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9165 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9166 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9167 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9168 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9169 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9170 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9171 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9172 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9173 set_slot_value, test_slot_existence, scm_change_object_class,
9174 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9175 default_setter), guardians.c (guardian_print, guardian_gc_init,
9176 guardian_zombify, whine_about_self_centered_zombies), guile.c
9177 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9178 mallocs.c (malloc_print), numbers.c (scm_print_real,
9179 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9180 end_input_default, scm_port_print, fill_input_void_port,
9181 write_void_port), root.c (root_print), smob.c (scm_mark0,
9182 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9183 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9184 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9185 (scm_struct_free_0, scm_struct_free_standard,
9186 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9187 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9188 scm_handle_by_throw, scm_ithrow), weaks.c
9189 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9190 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9191 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9192
9193 * error.h (SCM_NORETURN): Moved to __scm.h.
9194
9195 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9196 Renamed <foo>H to SCM_<foo>_H.
9197
9198 * gc.c (debug_cells_gc_interval): New static variable.
9199
9200 (scm_assert_cell_valid): If selected by the user, perform
9201 additional garbage collections.
9202
9203 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9204 if additional garbage collections are desired.
9205
9206 (mark_gc_async): If additional garbage collections are selected
9207 by the user, don't call the after-gc-hook. Instead require the
9208 user to run the hook manually.
9209
9210 * pairs.c (scm_error_pair_access): New function. Only compiled
9211 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9212
9213 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9214
9215 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9216 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9217 is a real pair object. (Glocs are also accepted, but that may
9218 change.) If not, abort with an error message.
9219
9220 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9221
9222 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9223
9224 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9225 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9226
9227 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9228
9229 * extensions.c (scm_c_register_extension): Allow NULL as library
9230 name.
9231 (load_extension): Ignore NULL library names when comparing.
9232
9233 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9234 non-pointers are being compared. Thanks to Alexander Klimov!
9235
9236 2001-06-04 Gary Houston <ghouston@arglist.com>
9237
9238 * rw.c (scm_write_string_partial): new procedure implementing
9239 write-string/partial in (ice-9 rw).
9240 * rw.h: declare scm_write_string_partial.
9241
9242 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9243
9244 * keywords.c (keyword_print): Substract 1 from length of symbol
9245 name, accounting for the silly dash.
9246
9247 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9248 Do not emit deprecation warning.
9249
9250 Added exception notice to all files.
9251
9252 * dynl.c: Include "deprecation.h".
9253
9254 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9255
9256 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9257 scm_clear_registered_modules): Deprecated.
9258
9259 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9260
9261 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9262 guile-snarf-docs-texi.
9263
9264 * fports.c: HAVE_ST_BLKSIZE changed to
9265 HAVE_STRUCT_STAT_ST_BLKSIZE.
9266 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9267 HAVE_STRUCT_STAT_ST_BLKSIZE.
9268
9269 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9270 HAVE_STRUCT_STAT_ST_RDEV.
9271 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9272 HAVE_STRUCT_STAT_ST_BLKSIZE.
9273 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9274 HAVE_STRUCT_STAT_ST_BLOCKS.
9275
9276 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9277
9278 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9279 of scm_eval_x to allow module changes between the forms in the
9280 string. Set/restore module using scm_c_call_with_current_module.
9281
9282 * mkstemp.c: New file, slightly modified from libiberties
9283 mkstemps.c.
9284
9285 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9286
9287 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9288 filter-doc-snarfage.c: new files.
9289
9290 * Makefile.am: add stuff to [build,] use and distribute
9291 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9292
9293 * guile-snarf.in: grok the new snarf output.
9294
9295 * snarf.h: make the output both texttools- and `read'-friendly.
9296
9297 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9298 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9299
9300 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9301
9302 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9303 error for unsupported format controls and for superflous
9304 arguments. Thanks to Daniel Skarda!
9305
9306 * print.h, print.c (scm_print_symbol_name): Factored out of
9307 scm_iprin1.
9308 (scm_iprin1): Call it.
9309
9310 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9311 weird names are printed correctly.
9312
9313 * print.c (scm_print_symbol_name): Symbols whose name starts with
9314 `#' or `:' or ends with `:' are considered weird.
9315
9316 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9317
9318 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9319 and /.
9320
9321 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9322
9323 * debug.h: Removed prototype for scm_eval_string.
9324
9325 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9326
9327 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9328 (make-string 2000 #\!))' in an older version).
9329
9330 Change strncpy to memcpy to allow embedded NUL characters in
9331 symbol prefix.
9332
9333 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9334
9335 * hooks.c (scm_create_hook): deprecated.
9336 (make_hook): deleted.
9337 (scm_make_hook): all the hook creation code is now here.
9338
9339 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
9340 a hook, make it permanent, and do a `scm_c_define' on it.
9341
9342 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
9343
9344 * socket.c (s_scm_inet_pton): fix docstring quoting.
9345 (s_scm_inet_ntop): ditto.
9346
9347 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
9348
9349 * hashtab.c (scm_internal_hash_fold): fix argument position in
9350 SCM_ASSERT.
9351
9352 * environments.c (s_scm_import_environment_set_imports_x): fix
9353 argument position in SCM_ASSERT.
9354
9355 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
9356 (s_scm_make_iloc): ditto.
9357
9358 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9359
9360 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
9361
9362 * eval.c (promise_print): Read the promise's value as an object.
9363
9364 (SCM_CEVAL): Don't perform side-effecting operations in macro
9365 parameters.
9366
9367 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
9368 conditional expression.
9369
9370 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
9371 initializer.
9372
9373 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
9374 text, removed redundant computation of effective_length and fixed
9375 the overflow check.
9376
9377 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
9378 values.
9379
9380 (wrap_init): Don't use SCM_C[AD]R for non pairs.
9381
9382 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
9383
9384 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
9385 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
9386
9387 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
9388
9389 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
9390 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
9391 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
9392 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
9393
9394 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
9395
9396 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
9397
9398 * ramap.c (ramap_rp): Removed bogus `;´.
9399
9400 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
9401 problem.
9402
9403 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
9404 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
9405 Read SCM objects rather than scm_bits_t values.
9406
9407 * tags.h (SCM_VOIDP_TEST): Removed.
9408
9409 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
9410 value of 2 now corresponds to the former 1, the current 1
9411 corresponds to the former situation that SCM_VOIDP_TEST was
9412 defined.
9413
9414 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
9415 If this appears to be not ANSI compliant, we will change it to
9416 typedef struct scm_unused_struct { } * SCM;
9417 Thanks to Han-Wen Nienhuys for the suggestion.
9418
9419 * unif.c (scm_array_set_x): Fix typing problem, and use
9420 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
9421 dealing with uniform vectors.
9422
9423 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
9424
9425 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
9426 (scm_igc): mark from them, too (precisely, not conservatively!).
9427
9428 * root.h (scm_gc_registered_roots): new object in
9429 scm_sys_protects.
9430
9431 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
9432 `scm_protect_object'. shouldn't call it at all, though, it seems.
9433
9434 * gc.c (scm_[un]protect_object): deprecated.
9435 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
9436 (scm_gc_[un]register_root[s]): new.
9437
9438 * gc.h: add prototypes for scm_gc_[un]protect_object,
9439 scm_gc_[un]register_root[s].
9440
9441 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
9442
9443 revert the controversial part of the 2001-05-24 changes.
9444
9445 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
9446
9447 * modules.c (scm_env_module): Exported to Scheme.
9448
9449 * eval.c (scm_debug_opts): New option `show-file-name'.
9450
9451 * debug.h (SCM_SHOW_FILE_NAME): New.
9452
9453 * backtrace.c: Include "libguile/filesys.h".
9454 (sym_base, display_backtrace_get_file_line,
9455 display_backtrace_file, display_backtrace_file_and_line): New.
9456 (display_frame): Call display_backtrace_file_and_line if that is
9457 requested.
9458 (display_backtrace_body): Call scm_display_backtrace_file if
9459 requested.
9460
9461 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
9462 Prototypes removed since there's no definition for these
9463 functions.
9464
9465 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9466
9467 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
9468 Changed use of scm_array->scm_array_t and
9469 scm_array_dim->scm_array_dim_t to enable build with
9470 --disable-deprecated.
9471
9472 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
9473
9474 The purpose of this set of changes is to regularize Guile's usage
9475 of ANSI C integral types, with the following ideas in mind:
9476
9477 - SCM does not nesessarily have to be long.
9478 - long is not nesessarily enough to store pointers.
9479 - long is not nesessarily the same size as int.
9480
9481 The changes are incomplete and possibly buggy. Please test on
9482 something exotic.
9483
9484 * validate.h
9485 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
9486 new macros.
9487
9488 * unif.h: type renaming:
9489 scm_array -> scm_array_t
9490 scm_array_dim -> scm_array_dim_t
9491 the old names are deprecated, all in-Guile uses changed.
9492
9493 * tags.h (scm_ubits_t): new typedef, representing unsigned
9494 scm_bits_t.
9495
9496 * stacks.h: type renaming:
9497 scm_info_frame -> scm_info_frame_t
9498 scm_stack -> scm_stack_t
9499 the old names are deprecated, all in-Guile uses changed.
9500
9501 * srcprop.h: type renaming:
9502 scm_srcprops -> scm_srcprops_t
9503 scm_srcprops_chunk -> scm_srcprops_chunk_t
9504 the old names are deprecated, all in-Guile uses changed.
9505
9506 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
9507 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
9508 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
9509 vectors.c, vports.c, weaks.c:
9510 various int/size_t -> size_t/scm_bits_t changes.
9511
9512 * random.h: type renaming:
9513 scm_rstate -> scm_rstate_t
9514 scm_rng -> scm_rng_t
9515 scm_i_rstate -> scm_i_rstate_t
9516 the old names are deprecated, all in-Guile uses changed.
9517
9518 * procs.h: type renaming:
9519 scm_subr_entry -> scm_subr_entry_t
9520 the old name is deprecated, all in-Guile uses changed.
9521
9522 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
9523 type renaming:
9524 scm_option -> scm_option_t
9525 the old name is deprecated, all in-Guile uses changed.
9526
9527 * objects.c: various long -> scm_bits_t changes.
9528 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
9529
9530 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
9531 SCM_I_FIXNUM_BIT.
9532
9533 * num2integral.i.c: new file, multiply included by numbers.c, used
9534 to "templatize" the various integral <-> num conversion routines.
9535
9536 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
9537 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
9538 deprecated.
9539 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
9540 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
9541 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
9542 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
9543 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
9544 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
9545 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
9546 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
9547 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
9548 scm_num2size): new functions.
9549
9550 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
9551
9552 * load.c: change int -> size_t in various places (where the
9553 variable is used to store a string length).
9554 (search-path): call scm_done_free, not scm_done_malloc.
9555
9556 * list.c (scm_ilength): return a scm_bits_t, not long.
9557 some other {int,long} -> scm_bits_t changes.
9558
9559 * hashtab.c: various [u]int -> scm_bits_t changes.
9560 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
9561 (scm_ihashx): n: uint -> scm_bits_t
9562 use scm_bits2num instead of scm_ulong2num.
9563
9564 * gsubr.c: various int -> scm_bits_t changes.
9565
9566 * goops.[hc]: various {int,long} -> scm_bits_t changes.
9567
9568 * gh_data.c (gh_num2int): no loss of precision any more.
9569
9570 * gh.h (gh_str2scm): len: int -> size_t
9571 (gh_{get,set}_substr): start: int -> scm_bits_t,
9572 len: int -> size_t
9573 (gh_<num>2scm): n: int -> scm_bits_t
9574 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
9575 (gh_length): return scm_bits_t, not unsigned long.
9576
9577 * gc.[hc]: various small changes relating to many things stopping
9578 being long and starting being scm_[u]bits_t instead.
9579 scm_mallocated should no longer wrap around.
9580
9581 * fports.h: type renaming:
9582 scm_fport -> scm_fport_t
9583 the old name is deprecated, all in-Guile uses changed.
9584
9585 * fports.c (fport_fill_input): count: int -> scm_bits_t
9586 (fport_flush): init_size, remaining, count: int -> scm_bits_t
9587
9588 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
9589 those prototypes, as the functions they prototype don't exist.
9590
9591 * fports.c (default_buffer_size): int -> size_t
9592 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
9593 default_size: int -> size_t
9594 (scm_setvbuf): csize: int -> scm_bits_t
9595
9596 * fluids.c (n_fluids): int -> scm_bits_t
9597 (grow_fluids): old_length, i: int -> scm_bits_t
9598 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
9599 scm_bits_t
9600 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
9601
9602 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
9603 the new and shiny SCM_NUM2INT.
9604
9605 * extensions.c: extension -> extension_t (and made a typedef).
9606
9607 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
9608 there are no nasty surprises if/when the various deeply magic tag
9609 bits move somewhere else.
9610
9611 * eval.c: changed the locals used to store results of SCM_IFRAME,
9612 scm_ilength and such to be of type scm_bits_t (and not int/long).
9613 (iqq): depth, edepth: int -> scm_bits_t
9614 (scm_eval_stack): int -> scm_bits_t
9615 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
9616 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
9617 i: int -> scm_bits_t
9618
9619 * environments.c: changed the many calls to scm_ulong2num to
9620 scm_ubits2num.
9621 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
9622
9623 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
9624
9625 * debug.h: type renaming:
9626 scm_debug_info -> scm_debug_info_t
9627 scm_debug_frame -> scm_debug_frame_t
9628 the old names are deprecated, all in-Guile uses changed.
9629 (scm_debug_eframe_size): int -> scm_bits_t
9630
9631 * debug.c (scm_init_debug): use scm_c_define instead of the
9632 deprecated scm_define.
9633
9634 * continuations.h: type renaming:
9635 scm_contregs -> scm_contregs_t
9636 the old name is deprecated, all in-Guile uses changed.
9637 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
9638 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
9639
9640 * continuations.c (scm_make_continuation): change the type of
9641 stack_size from long to scm_bits_t.
9642
9643 * ports.h: type renaming:
9644 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
9645 scm_port -> scm_port_t
9646 scm_ptob_descriptor -> scm_ptob_descriptor_t
9647 the old names are deprecated, all in-Guile uses changed.
9648 (scm_port_t.entry): int -> scm_bits_t.
9649 (scm_port_t.line_number): int -> long.
9650 (scm_port_t.putback_buf_size): int -> size_t.
9651
9652 * __scm.h (long_long, ulong_long): deprecated (they pollute the
9653 global namespace and have little value beside that).
9654 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
9655 SCM handle).
9656 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
9657 exist (for size_t & ptrdiff_t).
9658 (scm_sizet): deprecated.
9659
9660 * Makefile.am (noinst_HEADERS): add num2integral.i.c
9661
9662 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
9663
9664 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
9665 SCM_VARIABLE_INIT since that it what it used to be.
9666
9667 * deprecation.c (scm_include_deprecated_features): Make docstring
9668 ANSIsh. Thanks to Matthias Köppe!
9669
9670 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
9671
9672 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
9673 needed for weak-key hashtables.
9674
9675 * procs.c (scm_make_subr_with_generic): Add missing last argument
9676 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
9677
9678 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
9679 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
9680
9681 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
9682
9683 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
9684
9685 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
9686 `duplicate_string'. Do not use an indirect cell, store symbol
9687 directly in collision list of hash table.
9688 (duplicate_string): Removed.
9689
9690 * init.c (scm_init_guile_1): Call scm_init_extensions.
9691
9692 * Makefile.am: Add "extensions.c" and related files in all the
9693 right places.
9694
9695 * extensions.h, extension.c: New files.
9696
9697 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
9698
9699 * modules.h (scm_system_module_env_p): Move out of deprecated
9700 section.
9701
9702 * rw.h (scm_init_rw): Added prototype.
9703
9704 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
9705 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
9706 New functions. They replace scm_make_gsubr and
9707 scm_make_gsubr_with_generic. The `make' variants only create the
9708 gsubr object, while the `define' variants also put it into the
9709 current module. Changed all callers.
9710 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
9711
9712 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
9713 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
9714 functions. They replace scm_make_subr, scm_make_subr_opt and
9715 scm_make_subr_with_generic. The `make' variants only create the
9716 subr object, while the `define' variants also put it into the
9717 current module. Changed all callers.
9718 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
9719 Deprecated.
9720
9721 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
9722 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
9723 the comments above.
9724
9725 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
9726
9727 * throw.c (scm_lazy_catch): Slight docstring clarification.
9728
9729 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
9730
9731 * throw.c: Lazy-catch handlers are no longer allowed to return.
9732 Fixed comments throughout.
9733 (scm_ithrow): Signal an error when a lazy-catch handler returns.
9734 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
9735 recognized as such.
9736
9737 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
9738 refered to s_scm_minor_version previously.
9739
9740 * modules.h, modules.c: Moved around a lot of code so that
9741 deprecated features appear at the bottom.
9742 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
9743 module_prefix, make_modules_in_var, beautify_user_module_x_var,
9744 scm_the_root_module, scm_make_module, scm_ensure_user_module,
9745 scm_load_scheme_module): Deprecated.
9746 (scm_system_module_env_p): Return SCM_BOOL_T directly for
9747 environments corresponding to the root module.
9748 (convert_module_name, scm_c_resolve_module,
9749 scm_c_call_with_current_module, scm_c_define_module,
9750 scm_c_use_module, scm_c_export): New.
9751 (the_root_module): New static variant of scm_the_root_module. Use
9752 it everywhere instead of scm_the_root_module.
9753
9754 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
9755 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
9756 (scm_c_with_fluid): New.
9757 (scm_with_fluids): Use scm_c_with_fluids instead of
9758 scm_internal_with_fluids.
9759
9760 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
9761 `scm_init_goops'. Do not explicitly create/switch modules.
9762 Return SCM_UNSPECIFIED.
9763 (scm_init_goops): Only register `%init-goops-builtins' procedure.
9764 (scm_load_goops): Use scm_c_resolve_module instead of
9765 scm_resolve_module.
9766
9767 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
9768 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
9769 `scm_init_rw' prior to loading the startup files.
9770
9771 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
9772 scm_init_rdelim. Do not explicitly create/switch modules.
9773 Return SCM_UNSPECIFIED.
9774 (scm_init_rdelim): Only register `%init-rdelim-builtins'
9775 procedure.
9776
9777 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
9778 explicitly create/switch modules. Return SCM_UNSPECIFIED.
9779 (scm_init_rw): Only register `%init-rw-builtins' procedure.
9780
9781 * script.c (scm_shell): Evaluate the compiled switches in the
9782 current module, not in the root module.
9783
9784 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
9785
9786 * fluids.c (scm_c_with_fluids): Rename from
9787 scm_internal_with_fluids.
9788 (scm_internal_with_fluids): Deprecated.
9789 (scm_c_with_fluid): New.
9790
9791 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9792
9793 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
9794
9795 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
9796 accessed with SCM_C[AD]R.
9797
9798 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
9799
9800 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
9801
9802 * version.c (s_scm_major_version): doc fixes.
9803 (s_scm_minor_version): doc fixes.
9804 (s_scm_minor_version): new function.
9805
9806 * version.h (scm_init_version): new function.
9807
9808 * versiondat.h.in: add GUILE_MICRO_VERSION.
9809
9810 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9811
9812 * deprecation.c (scm_init_deprecation): Renamed
9813 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
9814
9815 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
9816
9817 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
9818 dependent on cpp_cnvt.awk
9819
9820 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9821
9822 * script.c (scm_compile_shell_switches): New command line option
9823 `--use-srfi' for loading a list of SRFIs on startup.
9824 (scm_shell_usage): Added `--use-srfi' to help message.
9825
9826 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
9827
9828 Merged from mvo-vcell-cleanup-1-branch.
9829
9830 The concept of vcells has been removed from Guile. With it,
9831 explicit obarrays and associated operations are gone. Use
9832 hashtables instead of obarrays.
9833
9834 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
9835 result as variable instead of vcell. Glocs no longer point to a
9836 vcell but to a variable. Use scm_c_define instead of
9837 scm_sysintern and treat the result as a variable (which it is),
9838 not a vcell.
9839
9840 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
9841 SCM_DEFVARIABLEP): Deprecated.
9842 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
9843 (variable_print): Do not print name of variable.
9844 (variable_equalp): Compare values, not vcells.
9845 (anonymous_variable_sym): Removed.
9846 (make_vcell_variable): Removed.
9847 (make_variable): New, as replacement.
9848 (scm_make_variable, scm_make_undefined_variable): Do not take name
9849 hint parameter.
9850 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
9851 error in that case.
9852 (scm_builtin_variable): Deprecated.
9853
9854 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
9855 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
9856 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
9857 scm_sysintern, scm_sysintern0, scm_symbol_value0,
9858 scm_string_to_obarray_symbol, scm_intern_symbol,
9859 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
9860 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
9861 Deprecated and moved to "symbols-deprecated.c".
9862 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
9863 (scm_init_symbols): Call scm_init_symbols_deprecated.
9864 * symbols-deprecated.c: New file.
9865 * Makefile.am: Added symbols-deprecated.c and related files in all
9866 the right places.
9867
9868 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9869 SCM_GLOBAL_VCELL_INIT): Deprecated.
9870 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
9871 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
9872
9873 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
9874 SCM_GLOC_SYM.
9875
9876 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
9877 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
9878 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
9879 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
9880 Changed according to the `throughout' comments.
9881
9882 * modules.h, modules.c (scm_module_system_booted_p): Changed type
9883 to `int'.
9884 (scm_module_type): Removed.
9885 (the_root_module): Renamed to the_root_module_var. Now points to
9886 a variable instead of a vcell. Updated all uses.
9887 (scm_the_root_module): Return SCM_BOOL_F when module systems
9888 hasn't been booted yet.
9889 (SCM_VALIDATE_STRUCT_TYPE): Removed.
9890 (scm_post_boot_init_modules): Made static.
9891 (scm_set_current_module): Call scm_post_boot_init_modules on first
9892 call.
9893 (make_modules_in, beautify_user_module_x, resolve_module,
9894 try_module_autoload, module_make_local_var_x): Tacked on "_var"
9895 suffix. Now point to variables instead of vcells. Updated all
9896 uses.
9897 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
9898 and return SCM_BOOL_F in that case.
9899 (scm_module_transformer): Likewise.
9900 (sym_module, scm_lookup_closure_module, scm_env_module): New.
9901 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
9902 (scm_eval_closure_lookup): Do not allow new definitions when
9903 `interface' flag is set.
9904 (scm_standard_interface_eval_closure): New.
9905 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
9906 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
9907 scm_c_lookup, scm_c_module_define, scm_c_define,
9908 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
9909 scm_modules_prehistory): New.
9910 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
9911 instead of scm_intern0.
9912
9913 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
9914 symbol.
9915
9916 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
9917 hashtable operations to maintain the keywords, not obarray ones.
9918
9919 * init.c (scm_load_startup_files): Do not call
9920 scm_post_boot_init_modules. This is done by
9921 scm_set_current_module now.
9922 (scm_init_guile_1): Call scm_modules_prehistory. Call
9923 scm_init_variable early on.
9924
9925 * goops.c (s_scm_sys_goops_loaded): Get
9926 var_compute_applicable_methods from scm_sym2var, not from a direct
9927 invocation of scm_goops_lookup_closure.
9928
9929 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
9930
9931 * gc.c: Added simple debugging hack to mark phase of GC: When
9932 activated, do not tail-call scm_gc_mark. This gives nice
9933 backtraces.
9934 (scm_unhash_name): Removed.
9935
9936 * feature.c (features): Renamed to features_var. Now points to a
9937 variable instead of a vcell. Updated all uses.
9938
9939 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
9940 `scm_current_module_lookup_closure' which will do the right thing
9941 when the module system hasn't been booted yet.
9942 (SCM_GLOC_SYM): Removed.
9943 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
9944 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
9945
9946 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
9947 instead of with vcells. Do not overwrite `var' with the result of
9948 the lookup, use the new `real_var' instead. Remove `var2' in
9949 exchange (which was only used with threads).
9950 (sym_three_question_marks): New.
9951 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
9952 `SCM_GLOC_SYM'.
9953 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
9954 (scm_m_atfop): Expect the function definition to be a variable
9955 instead of a vcell.
9956 (scm_macroexp): Do not use `unmemocar', explicitely remember the
9957 symbol instead.
9958 (scm_unmemocopy): Removed thoughts about anti-macro interface.
9959 (scm_eval_args): Use more explicit code in the gloc branch of the
9960 atrocious struct ambiguity test. The optimizer will sort this
9961 out.
9962 (scm_deval_args): Likewise.
9963 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
9964 remember the symbol instead. Added some comments where
9965 scm_tc3_cons_gloc really exclusively refers to structs.
9966 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
9967 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
9968 of scm_sysintern in general.
9969
9970 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
9971 explicit magic.
9972
9973 * debug.c (s_scm_make_gloc): Only allow proper variables, no
9974 pairs. Put the variable directly in the gloc.
9975 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
9976 (scm_init_debug): Use scm_c_define instead scm_sysintern.
9977
9978 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
9979
9980 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
9981 scm_the_last_stack_fluid_var. It now points to a variable instead
9982 of a vcell. Updated all uses.
9983 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
9984 instead of a vcell. Updated all uses.
9985
9986 * _scm.h: Include "variables.h" and "modules.h" since almost
9987 everybody needs them now.
9988
9989 * root.h (scm_symhash, scm_symhash_vars): Removed.
9990 * gc.c (scm_init_storage): Do not initialize them.
9991
9992 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9993
9994 * eval.c (scm_init_eval): Initialize scm_undefineds and
9995 scm_listofnull.
9996
9997 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
9998 like the SCM_NEWCELL macro counterparts.
9999
10000 (scm_init_storage, scm_init_gc): Moved initialization of
10001 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10002
10003 (scm_init_storage): Moved initialization of scm_undefineds and
10004 scm_listofnull to eval.c, initializion of scm_nullstr to
10005 strings.c, initializion of scm_nullvect to vectors.c.
10006
10007 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10008 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10009
10010 * init.c (scm_init_guile_1): Reordered some initializations and
10011 added dependcy information comments.
10012
10013 * load.c (scm_init_load): Use scm_nullstr.
10014
10015 * strings.c (scm_init_strings): Initialize scm_nullstr.
10016
10017 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10018
10019 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10020
10021 * values.c (print_values): Print as a unreadable object, not as
10022 multiple lines. Thanks to Matthias Köppe!
10023
10024 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10025
10026 * deprecation.c: Fixed copyright date.
10027
10028 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10029 DEPRECATION_H to SCM_DEPRECATION_H.
10030
10031 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10032
10033 * guile-doc-snarf.in: Update copyright.
10034 Fix relative path bug. Thanks to Sergey Poznyakoff.
10035
10036 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10037
10038 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10039 accept open ports. Thanks to Quetzalcoatl Bradley!
10040
10041 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10042
10043 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10044 has 779 primitives on startup.
10045
10046 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10047
10048 * eval.c (scm_i_eval): Copy expression before passing it to
10049 SCM_XEVAL. The copy operation was removed unintendedly during my
10050 change on 2001-03-25.
10051
10052 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10053
10054 from Matthias Köppe (thanks!):
10055
10056 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10057 portable.
10058
10059 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10060 docstring.
10061
10062 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10063
10064 * gc.c (scm_init_gc): Added FIXME comment.
10065
10066 * hooks.c: Since hooks don't have a name any more, it is not
10067 necessary to include objprop.h.
10068
10069 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10070
10071 (symbol_name, scm_make_hook_with_name): Removed.
10072
10073 (scm_create_hook): Don't set the hook's name property.
10074
10075 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10076
10077 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10078
10079 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10080
10081 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10082 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10083 FLOBUFLEN and define it unconditionally.
10084
10085 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10086
10087 * gh_data.c (gh_lookup): Call gh_module_lookup with
10088 `scm_current_module ()', not `#f'.
10089 (gh_module_lookup): Expect a module instead of an obarray as first
10090 argument and do lookup in that module.
10091
10092 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10093 arrays. The length of array is already determined differently and
10094 scm_uniform_vector_length does not work on arrays.
10095
10096 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10097
10098 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10099 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10100
10101 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10102 they are not used. Changed `wrong type' error into `wrong num
10103 args' error. Changed all callers.
10104
10105 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10106 arguments are supplied.
10107
10108 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10109
10110 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10111 describe `regexp/notbol' and `regexp/noteol' execution flags.
10112
10113 * strop.c (scm_substring_move_x): Doc fix; nfc.
10114
10115 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10116
10117 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10118 (scm_set_object_procedure_x): Use it to check argument. Fix
10119 docstring.
10120
10121 * evalext.c (scm_definedp): Fix docstring.
10122
10123 2001-05-05 Gary Houston <ghouston@arglist.com>
10124
10125 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10126 support.
10127
10128 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10129
10130 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10131 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10132 Change R4RS references to R5RS.
10133
10134 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10135 docstring source are correctly reproduced in the output (ii)
10136 we don't anymore get occasional trailing quotes. Also reorganized
10137 and commented the code a little.
10138
10139 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10140 fixes.
10141
10142 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10143
10144 * strop.c (scm_string_split): New procedure.
10145
10146 * strop.h (scm_string_split): Added prototype.
10147
10148 2001-05-04 Gary Houston <ghouston@arglist.com>
10149
10150 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10151 Dale P. Smith.
10152
10153 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10154
10155 * rw.c: Include "modules.h" and "strports.h".
10156
10157 * net_db.h (scm_gethost): Added prototype.
10158
10159 * deprecation.h, deprecation.c: New.
10160 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10161 (DOT_X_FILES): Added "deprecation.x".
10162 (modinclude_HEADERS): Added "deprecation.h".
10163
10164 * init.c: Include "deprecation.h".
10165 (scm_init_guile_1): Call scm_init_deprecation.
10166
10167 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10168
10169 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10170 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10171 New.
10172
10173 2001-04-29 Gary Houston <ghouston@arglist.com>
10174
10175 * rw.c: new file, implementing C part of module (ice-9 rw).
10176 (scm_read_string_x_partial): moved from ioext.c
10177 (scm_init_rw): new proc.
10178 * rw.h: new file.
10179 init.c: include rw.h and call scm_init_rw.
10180 Makefile.am: include rw.c and rw.h.
10181
10182 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10183
10184 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10185 know what's supposed to happen to it.
10186
10187 * list.h (scm_list_star): deprecation expired - removed.
10188
10189 * numbers.h (scm_dblproc): deprecation expired - removed.
10190 (SCM_UNEGFIXABLE): deprecation expired - removed.
10191 (SCM_FLOBUFLEN): deprecation expired - removed.
10192 (SCM_INEXP): deprecation expired - removed.
10193 (SCM_CPLXP): deprecation expired - removed.
10194 (SCM_REAL): deprecation expired - removed.
10195 (SCM_IMAG): deprecation expired - removed.
10196 (SCM_REALPART): deprecation expired - removed.
10197 (scm_makdbl): deprecation expired - removed.
10198 (SCM_SINGP): deprecation expired - removed.
10199 (SCM_NUM2DBL): deprecation expired - removed.
10200 (SCM_NO_BIGDIG): deprecation expired - removed.
10201
10202 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10203 (scm_tc_dblr): deprecation expired - removed.
10204 (scm_tc_dblc): deprecation expired - removed.
10205 (scm_tc16_flo): deprecation expired - removed.
10206 (scm_tc_flo): deprecation expired - removed.
10207
10208 * tag.h (scm_tag): deprecation expired - removed.
10209
10210 * tag.c: (scm_tag): deprecation expired - removed.
10211
10212 * ioext.c: (scm_fseek): deprecation expired - removed.
10213
10214 * ioext.h (scm_fseek): deprecation expired - removed.
10215
10216 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10217
10218 * gh.h (gh_int2scmb): deprecation expired - removed.
10219
10220 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10221
10222 * stacks.c (scm_make_stack): Fix typo in docstring.
10223
10224 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10225
10226 * error.c (scm_sysmissing): deprecation expired - removed.
10227
10228 * error.h (scm_sysmissing): deprecation expired - removed.
10229
10230 * gc.c
10231 (scm_init_gc): gc-thunk deprecation expired - removed.
10232 (scm_gc_vcell): deprecation expired - removed.
10233 (gc_async_thunk): scm_gc_vcell related code removed.
10234
10235 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10236
10237 * strings.h
10238 (SCM_NSTRINGP): deprecation expired - removed.
10239 (SCM_NRWSTRINGP): deprecation expired - removed.
10240
10241 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10242
10243 * chars.h
10244 (SCM_ICHRP): deprecation expired - removed.
10245 (SCM_ICHR): deprecation expired - removed.
10246 (SCM_MAKICHR): deprecation expired - removed.
10247
10248 * ports.h
10249 (SCM_INPORTP): deprecation expired - removed.
10250 (SCM_OUTPORTP): deprecation expired - removed.
10251
10252 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10253
10254 * modules.c (scm_module_type): New.
10255 (scm_post_boot_init_modules): Initialize from Scheme value.
10256 (the_module, scm_current_module, scm_init_modules): the_module is
10257 now a C only fluid.
10258 (scm_current_module): Export to Scheme.
10259 (scm_set_current_module): Do not call out to Scheme, do all the
10260 work in C. Export procedure to Scheme. Only accept modules, `#f'
10261 is no longer valid as the current module. Only set
10262 scm_top_level_lookup_closure_var and scm_system_transformer when
10263 they are not deprecated.
10264 (scm_module_transformer, scm_current_module_transformer): New.
10265
10266 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10267 scm_current_module_transformer, scm_module_transformer): New.
10268
10269 * gh_data.c: Removed FIXME comment about gh_lookup returning
10270 SCM_UNDEFINED. That's the right thing to do.
10271
10272 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10273 into the conditionally compiled sections.
10274 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10275 scm_current_module_transformer instead of scm_system_transformer.
10276 * init.c (start_stack): Move initialization of
10277 scm_system_transformer to the deprecated section.
10278
10279 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10280
10281 * throw.c (scm_throw): Correct docstring.
10282
10283 2001-04-22 Gary Houston <ghouston@arglist.com>
10284
10285 * socket.c: attempted to improve the docstrings slightly.
10286
10287 * net_db.c: remove bogus "close" declaration.
10288 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10289 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10290 moved to socket.c.
10291 * net_db.h: declarations moved too.
10292
10293 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10294 long.
10295 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10296 (VALIDATE_INET6): new macro.
10297 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10298 inet-pton and inet-ntop.
10299 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10300 (scm_addr_vector): use ipv6_net_to_num.
10301
10302 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10303
10304 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10305 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10306
10307 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10308 when compiled in debug mode.
10309
10310 (scm_gc_sweep): Only call smob's free function if it is defined.
10311
10312 * print.c (scm_iprin1): No need to check for validity of smob
10313 type or existence of print function.
10314
10315 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10316 Resizing will not work well with preemptive threading.
10317
10318 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10319
10320 (scm_make_smob_type): Extracted initialization of smob
10321 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10322 of the critical section.
10323
10324 (scm_smob_prehistory): Initialize all smob descriptors. By
10325 default, don't assign a smob free function: Most smob types don't
10326 need one.
10327
10328 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10329
10330 2001-04-21 Gary Houston <ghouston@arglist.com>
10331
10332 * socket.c (FLIP_NET_HOST_128): new macro.
10333 (scm_fill_sockaddr): use new macro.
10334 (scm_addr_vector): completed IPv6 address support. added const
10335 to the address parameter.
10336
10337 2001-04-20 Gary Houston <ghouston@arglist.com>
10338
10339 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
10340 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
10341 is defined.
10342 (scm_addr_vector): use a switch instead of multiple if statements.
10343 Add support for IPv6 (incomplete) .
10344 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
10345
10346 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
10347
10348 * struct.c (scm_free_structs): Only pairs may be accessed with
10349 SCM_C[AD]R.
10350
10351 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10352
10353 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
10354
10355 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10356 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
10357 parentheses in order to get the correct associativity.
10358
10359 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10360
10361 * unif.c (scm_array_to_list): Added missing handling of arrays of
10362 bytes. Thanks to Masao Uebayashi for the bug report.
10363
10364 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10365
10366 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
10367 consistently.
10368
10369 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10370
10371 * procs.h (SCM_CLOSURE_FORMALS): New macro.
10372
10373 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
10374 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
10375 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
10376 SCM_CLOSURE_FORMALS.
10377
10378 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
10379 (scm_i_procedure_arity): Prefer stronger predicates like
10380 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10381
10382 * macros.c (macro_print): Extracted macro printing code from
10383 print.c and simplified it.
10384
10385 (scm_macro_type): Use SCM_MACRO_TYPE;
10386
10387 (scm_init_macros): Use macro_print for printing macros.
10388
10389 * print.c (scm_print_opts): Improved option documentation.
10390
10391 (scm_iprin1): Extracted printing of macros to macros.c.
10392 Simplified printing of ordinary closures.
10393
10394 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
10395 Martin Grabmueller for the bug report.
10396
10397 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10398
10399 This patch eliminates some further applications of SCM_C[AD]R to
10400 non pair cells.
10401
10402 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
10403 never been applied to real pairs.
10404
10405 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
10406
10407 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
10408
10409 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
10410 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
10411 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
10412
10413 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
10414 Added.
10415
10416 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
10417 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
10418
10419 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
10420 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
10421 SCM_SET{AND,OR}_CAR.
10422
10423 2001-04-17 Gary Houston <ghouston@arglist.com>
10424
10425 * some initial support for IPv6:
10426
10427 * socket.c (scm_fill_sockaddr): improve the argument validation.
10428 don't allocate memory until all args are checked. instead of
10429 unconditional memset of soka, try setting sin_len to 0 if
10430 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
10431 (scm_socket, scm_connect): extend docstrings for IPv6.
10432 (scm_init_socket): intern AF_INET6 and PF_INET6.
10433
10434 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
10435
10436 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
10437 matches SCM_DEFER_INTS at the beginning of the function.
10438
10439 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
10440
10441 * gc.c (scm_igc): Unconditionally call
10442 SCM_CRITICAL_SECTION_START/END.
10443
10444 * fluids.c (next_fluid_num): Unconditionally call
10445 SCM_CRITICAL_SECTION_START/END.
10446 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
10447
10448 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
10449 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
10450 Removed.
10451
10452 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
10453 Defined as nothing for the case of !defined(USE_THREADS).
10454 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
10455 Removed.
10456 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
10457 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
10458 LINE.
10459 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
10460 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
10461 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
10462 SCM_CRITICAL_SECTION_START/END.
10463 (SCM_REALLOW_INTS: Bug fix. Don't call
10464 SCM_THREAD_SWITCHING_CODE.
10465 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
10466 SCM_THREAD_SWITCHING_CODE directly.
10467 (SCM_ENTER_A_SECTION): Unconditionally use
10468 SCM_CRITICAL_SECTION_START/END. (was:
10469 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
10470
10471 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10472
10473 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
10474 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
10475 allowed to explicitly set this macro via the CFLAGS variable
10476 during make.
10477
10478 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
10479 (SCM_THREAD_CRITICAL_SECTION_START,
10480 SCM_THREAD_CRITICAL_SECTION_END): Renamed
10481 SCM_THREAD_CRITICAL_SECTION_START/END to
10482 SCM_CRITICAL_SECTION_START/END.
10483
10484 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
10485
10486 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
10487 instead of bzero.
10488
10489 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
10490 (MISSING_BZERO_DECL): Remove the declaration.
10491
10492 Thanks to NIIBE Yutaka.
10493
10494 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10495
10496 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
10497 goops module should be registered in order to work for an
10498 application which uses libguile statically linked.)
10499
10500 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
10501
10502 * numbers.[ch] (scm_num2long, scm_num2long_long,
10503 scm_num2ulong_long, scm_num2ulong): Argument position is an
10504 unsigned integer.
10505
10506 * environments.c (eval_environment_folder,
10507 import_environment_folder), gh_data.c (gh_scm2longs,
10508 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
10509 for integers and pointers, respectively.
10510
10511 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
10512 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
10513 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
10514 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
10515
10516 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
10517 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
10518 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
10519 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
10520 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
10521 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
10522
10523 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
10524
10525 * strings.c (scm_read_only_string_p): Update docstring to reflect
10526 current (non-)usage of "read only" strings.
10527 (scm_make_shared_substring): Clarify docstring by changing
10528 "semantics" to "arguments".
10529
10530 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10531
10532 * hooks.c (scm_make_hook, scm_make_hook_with_name),
10533 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
10534 improvements.
10535
10536 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10537
10538 The following changes make the documentation more consistent.
10539
10540 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
10541 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
10542 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
10543 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
10544 ... @end lisp.
10545
10546 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
10547 (scm_array_dimensions, scm_make_shared_array),
10548 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
10549 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
10550 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
10551 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
10552 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
10553 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
10554 macros.c (scm_makmmacro), list.c (scm_append), environments.c
10555 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
10556 @example ... @end example to @lisp ... @end lisp.
10557
10558 * weaks.c (scm_weak_vector): Corrected docstring.
10559
10560 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
10561 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
10562 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
10563 (scm_hashx_set_x, scm_hashx_get_handle),
10564 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
10565 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
10566 vectors.c (scm_vector_fill_x), strings.c
10567 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
10568 objprop.c (scm_set_object_properties_x):
10569 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
10570 strports.c (scm_call_with_input_string), ports.c
10571 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
10572 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
10573 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
10574 (scm_make_weak_vector,scm_weak_vector_p),
10575 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
10576 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
10577 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
10578 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
10579 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
10580 Made parameter names match documentation by renaming parameters
10581 and/or fixing docstrings.
10582
10583 * numbers.c (scm_ash): Corrected Texinfo markup.
10584
10585 * strop.c (scm_string_index, scm_string_rindex),
10586 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
10587
10588 * vports.c (scm_make_soft_port), unif.c
10589 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
10590 (scm_dimensions_to_uniform_array, scm_transpose_array),
10591 (scm_array_in_bounds_p, scm_uniform_vector_ref),
10592 (scm_bit_count, scm_bit_position, scm_bit_count_star),
10593 (scm_array_to_list, scm_list_to_uniform_array),
10594 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
10595 (scm_open_input_string, scm_open_output_string),
10596 (scm_get_output_string), strop.c (scm_string_copy),
10597 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
10598 (scm_get_internal_real_time, scm_times),
10599 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
10600 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
10601 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
10602 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
10603 simpos.c (scm_system), random.c (scm_random_uniform),
10604 (scm_random_normal, scm_random_exp), ramap.c
10605 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
10606 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
10607 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
10608 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
10609 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
10610 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
10611 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
10612 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
10613 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
10614 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
10615 (scm_logand, scm_logior, scm_logxor, scm_lognot),
10616 (scm_integer_expt, scm_bit_extract, scm_logcount),
10617 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
10618 net_db.c (scm_inet_netof, scm_lnaof), modules.c
10619 (scm_interaction_environment), macros.c (scm_makacro),
10620 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
10621 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
10622 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
10623 (scm_fluid_ref), filesys.c (scm_open_fdes),
10624 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
10625 Docstring correction: `Returns' -> `Return'
10626
10627 * gc.c (scm_set_debug_cell_accesses_x):
10628 (s_scm_gc_set_debug_check_freelist_x):
10629 * fluids.c (scm_fluid_p): Added texinfo markup.
10630
10631 * error.c (scm_strerror): Made docstring more precise.
10632
10633 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
10634 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
10635 (scm_symbol_p, scm_symbol_to_string), strorder.c
10636 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
10637 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
10638 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
10639 (scm_string_ci_geq_p), strop.c (scm_string_copy),
10640 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
10641
10642 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
10643
10644 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
10645 mode, as suggested by Michael Livshin.
10646
10647 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
10648
10649 * backtrace.c (display_backtrace_body): since the `print_state'
10650 variable is not used (instead its data field is used directly as
10651 `pstate'), protect it from the hungry compiler optimizations.
10652 thanks to Bill Schottstaedt for the report.
10653
10654 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10655
10656 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
10657 It is only defined and used if guile is compiled with
10658 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
10659 let cells with a free_cell type tag be visible outside of the
10660 garbage collector when in debug mode.
10661
10662 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
10663
10664 (scm_assert_cell_valid): Use a local static variable to avoid
10665 recursion.
10666
10667 (MARK): Only check for rogue cell pointers in debug mode. Use
10668 scm_cellp for this purpose and place all checks for rogue pointers
10669 into that function. Further, since due to conservative scanning
10670 we may encounter free cells during marking, don't use the standard
10671 cell type accessor macro to determine the cell type.
10672
10673 (scm_cellp): Check if the cell pointer actually points into a
10674 card header.
10675
10676 (scm_init_gc): Initalize scm_tc16_allocated.
10677
10678 * gc.h (GCH): Renamed to SCM_GC_H.
10679
10680 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
10681 might be unnecessary, but I feel better this way :-)
10682
10683 (SCM_GC_CELL_TYPE): New macro.
10684
10685 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
10686 in guile, and it is unlikely that they will be applied to real
10687 pairs anyway.
10688
10689 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
10690
10691 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
10692 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
10693
10694 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
10695 make sure that in debug mode no free cell will ever be visible
10696 outside of the garbage collector.
10697
10698 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10699
10700 * async.c (scm_asyncs_pending): Don't use != to compare SCM
10701 values.
10702
10703 * async.c (scm_system_async), variable.c (scm_make_variable,
10704 scm_make_undefined_variable): Use scm_cons to create a pair.
10705
10706 * debug.c (scm_reverse_lookup): Perform proper type checking.
10707 Remove suspicious use of SCM_SLOPPY_CONSP.
10708
10709 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
10710 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
10711 the corresponding optimization.
10712
10713 * eval.c (iqq): Use proper type check.
10714
10715 (scm_m_expand_body): Remove redundant type checks.
10716
10717 (promise_print): Don't access promise cells as pairs.
10718
10719 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
10720 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
10721 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
10722 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
10723 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
10724
10725 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
10726 (scm_iprin1): Use new macro predicate and accessors.
10727
10728 * eval.h (scm_tc16_macro): Removed declaration. It is declared
10729 in macros.h.
10730
10731 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
10732 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
10733 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
10734 SCM_VARIABLE_H. Even the macros that are used to inhibit
10735 including a header file twice should be in the SCM_ namespace.
10736
10737 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
10738 properties.c (scm_primitive_property_ref,
10739 scm_primitive_property_del_x): Prefer stronger predicates like
10740 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10741
10742 * gc.c (MARK): Use proper macros to access procedure-with-setter
10743 cell elements and closure cell elements.
10744
10745 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
10746 access free cells as pairs.
10747
10748 (scm_unprotect_object): scm_hashq_get_handle returns #f if
10749 no hashtab entry is found.
10750
10751 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
10752 SCM_CLR_PORT_OPEN_FLAG.
10753
10754 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
10755 use SCM_SET_C[AD]R for uninitialized cells.
10756
10757 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
10758 If the hashtable has no slots, return #f instead of '(). This
10759 unifies the return value with most assoc-functions.
10760
10761 (scm_hash_fn_ref): Use proper type check.
10762
10763 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
10764 Removed references to non-existing functions from documentation.
10765
10766 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
10767 access keyword cell elements.
10768
10769 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
10770 macros.
10771
10772 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
10773
10774 * print.c (scm_iprlist): Added comment. Improved loop
10775 conditions.
10776
10777 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
10778 pairs.
10779
10780 * smob.c (scm_markcdr): Don't access smob cells as pairs.
10781
10782 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
10783
10784 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
10785 cells as pairs.
10786
10787 * variable.c (variable_print, variable_equalp, scm_variable_ref,
10788 scm_variable_set_x): Use proper macros to access variable cell
10789 elements.
10790
10791 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
10792
10793 * variable.h (SCM_VARVCELL): Don't access variable cells as
10794 pairs.
10795
10796 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
10797 added FIXME comment, removed register specifier.
10798
10799 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
10800
10801 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
10802 * init.c (scm_init_guile_1): Don't init goopscore module.
10803
10804 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
10805
10806 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
10807
10808 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10809
10810 * strop.c (scm_string_to_list): Fixed docstring markup.
10811 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
10812 (scm_string_downcase, scm_string_capitalize_x),
10813 (scm_string_capitalize): Rewrote and corrected docstrings.
10814 (scm_string_ci_to_symbol): Made docstring more explicit.
10815
10816 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
10817
10818 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
10819 eval.c can use it.
10820 (scm_call_with_values): Removed.
10821 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
10822 so that it can be exported.
10823 (scm_call_with_values): Removed.
10824
10825 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
10826 * eval.c: Include "libguile/values.h"
10827 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
10828 New.
10829 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
10830 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
10831 New delcarations to support above change.
10832
10833 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
10834 errors with last change.
10835
10836 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
10837
10838 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
10839 scm_i_eval): Moved the application of the system transformer from
10840 scm_i_eval to scm_primitive_eval.
10841
10842 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
10843
10844 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
10845
10846 * strop.c (scm_string_index): Fix docstring line break
10847 regression.
10848
10849 * list.c (scm_cons_star): Fix docstring typo.
10850
10851 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
10852
10853 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
10854 (big2str), ports.c (scm_drain_input), read.c (scm_read,
10855 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
10856 scm_make_string, scm_string_append), strports.c (st_resize_port,
10857 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
10858 scm_makstr with calls to scm_allocate_string.
10859
10860 * strings.[ch] (scm_allocate_string): New function.
10861
10862 * strings.[ch] (scm_makstr): Deprecated.
10863
10864 2001-03-18 Gary Houston <ghouston@arglist.com>
10865
10866 * posix.c (scm_tmpnam): check that return value from tmpnam is not
10867 NULL. rewrote the docstring.
10868 (scm_mkstemp): new procedure implementing "mkstemp!".
10869 * posix.h: declare scm_mkstemp.
10870
10871 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
10872 normally it would be found in netdb.h.
10873
10874 2001-03-17 Gary Houston <ghouston@arglist.com>
10875
10876 * sort.c (scm_sort): move sortvec variable to avoid a compiler
10877 warning when HAVE_ARRAYS is not defined. move len too.
10878
10879 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
10880 (EXTRA_DOT_X_FILES): let configure set the value.
10881 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
10882
10883 * gc.c (scm_must_malloc): changed the comment explaining when
10884 scm_must variants of malloc/free etc., should be used, based on
10885 explanation from Dirk Herrmann.
10886 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
10887 string with procedure name. use scm_must_malloc instead of malloc.
10888 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
10889 of malloc/free.
10890 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
10891 scm_ungetc): use scm_must variants of malloc/realloc/free.
10892 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
10893
10894 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10895
10896 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10897 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
10898 scm_wrong_type_arg instead.
10899
10900 (SCM_WNA): Deprecated.
10901
10902 * error.[ch] (scm_wta): Deprecated.
10903
10904 * numbers.c (s_i_log): Minor comment fix.
10905
10906 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
10907 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
10908 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
10909 wrong-num-args or misc errors.
10910
10911 * unif.c (scm_make_shared_array, scm_transpose_array,
10912 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
10913 Validate the rest argument (note: this is only done when guile is
10914 built with SCM_DEBUG_REST_ARGUMENT=1)
10915
10916 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
10917 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
10918
10919 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
10920 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
10921
10922 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10923
10924 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
10925 instead of scm_wrong_num_args.
10926
10927 * coop-threads.c: Don't include libguile/strings.h. (Was only
10928 needed for former implementation of SCM_WRONG_NUM_ARGS.)
10929
10930 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
10931 wrong-num-args errors.
10932
10933 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10934
10935 * error.[ch] (scm_error_num_args_subr): New function.
10936
10937 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10938
10939 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
10940 (scm_length, scm_append, scm_reverse, scm_list_ref),
10941 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
10942 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
10943 (scm_delete1_x), gc.c (scm_map_free_list),
10944 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
10945 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
10946 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
10947 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
10948 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
10949 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
10950 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
10951
10952 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
10953 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
10954 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
10955 symbols.c (scm_symbol_interned_p), numbers.c
10956 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
10957 markup.
10958
10959 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
10960
10961 * snarf.h (SCM_CONST_LONG): Deprecated.
10962 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
10963
10964 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10965
10966 * numbers.c (scm_num2ulong): Check that a bignum is positive
10967 before looking at the magnitude. Correctly check for overflow
10968 during conversion.
10969 (scm_num2long_long): Likewise.
10970 (scm_num2ulong_long): New.
10971 (ULONG_LONG_MAX): Define if not already defined.
10972 * numbers.h: (scm_num2ulong_long): New prototype.
10973
10974 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10975
10976 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
10977
10978 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
10979 (SCM_OPOUTSTRPORTP): New predicate macros.
10980 (scm_open_input_string, scm_open_output_string),
10981 (scm_get_output_string): New prototypes.
10982
10983 * strports.c (scm_open_input_string, scm_open_output_string),
10984 (scm_get_output_string): New procedures (SRFI-6 compliant).
10985 Made scm_tc16_strport non-static.
10986
10987 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10988
10989 * macros.h (SCM_ASSYNT): Removed unused object argument from
10990 signature.
10991
10992 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
10993 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
10994 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
10995 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
10996 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
10997 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
10998 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
10999 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11000 scm_m_atdispatch): Removed unused object argument from call to
11001 SCM_ASSYNT.
11002
11003 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11004
11005 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11006 const int* to reflect that the input array of integers remains
11007 unchanged. Thanks to Brett Viren for the hint.
11008
11009 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11010
11011 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11012 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11013 in various places.
11014 (gh_scm2newstr, gh_symbol2newstr): Change call to
11015 scm_must_malloc() to malloc(), because user-free()able memory is
11016 allocated.
11017
11018 * gc.c: Added declaration of `scm_debug_check_freelist'.
11019
11020 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11021
11022 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11023
11024 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11025
11026 * strports.c (scm_object_to_string): New procedure.
11027 (scm_strprint_obj): Deprecated.
11028 * strports.h: Reflect the changes.
11029
11030 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11031
11032 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11033
11034 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11035 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11036 SCM_ASSYNT to check for correct argument types. Either use some
11037 SCM_VALIDATE_* macro or an explicit test.
11038
11039 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11040 misc-errors.
11041
11042 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11043 instead of calling scm_wta.
11044
11045 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11046
11047 * load.c (scm_primitive_load, scm_primitive_load_path),
11048 (scm_sys_search_load_path): Corrected docstrings (file ->
11049 filename).
11050
11051 * eval.c (scm_force): Added texinfo markup to docstring.
11052 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11053
11054 * debug-malloc.c: Reinserted #include <stdio.h>.
11055
11056 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11057
11058 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11059
11060 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11061 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11062 Use SCM_LISTn instead of scm_listify.
11063
11064 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11065
11066 * _scm.h: Removed #include <errno.h>.
11067
11068 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11069 errno variable (can be a macro on some systems, for example when
11070 using linux libc with threads).
11071
11072 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11073 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11074 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11075 #include <errno.h> in these 20 out of 100 files.
11076
11077 2001-03-10 Gary Houston <ghouston@arglist.com>
11078
11079 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11080 not already defined.
11081
11082 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11083
11084 * coop.c: Inserted #include <stdio.h>.
11085
11086 * iselect.c: Reinserted #include <stdio.h>.
11087
11088 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11089
11090 * posix.c: Replaced `#define' of __USE_XOPEN right before
11091 including unistd.h with a define of _GNU_SOURCE at the very top of
11092 the file.
11093
11094 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11095
11096 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11097 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11098 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11099 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11100 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11101 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11102 print.c, procprop.c, procs.c, properties.c, ramap.c,
11103 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11104 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11105 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11106 Remove #include <stdio.h>
11107 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11108
11109 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11110
11111 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11112
11113 * posix.c (scm_gethostname): Set initial name length to 256 for
11114 Solaris.
11115
11116 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11117
11118 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11119 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11120 (scm_sethostname, scm_gethostname): New prototypes.
11121
11122 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11123 <sys/file.h>, if present.
11124 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11125 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11126 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11127 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11128 (scm_sethostname, scm_gethostname): New procedures.
11129
11130 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11131
11132 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11133 not optional (ii) "recommend" spelling correction.
11134
11135 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11136
11137 * ramap.c (racp): Removed optimization which caused array copying
11138 to fail if the two arrays shared storage. Re-inserted the IVDEP
11139 macros removed in the change of 2000-03-09. (Don't really have a
11140 complete grasp of what they are for, but they seem to be necessary
11141 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11142
11143 * hash.c (scm_string_hash): Don't downcase characters.
11144
11145 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11146
11147 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11148 size from 277 --> 1009.
11149
11150 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11151 function.
11152
11153 * coop-threads.c: Fixed change of 2001-03-06.
11154
11155 * validate.h: Code formatting.
11156
11157 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11158
11159 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11160 (*.doc): Add dependency on guile-snarf.awk.in.
11161
11162 * guile-snarf.awk.in: Neglect spaces at the end of
11163 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11164 middle of docstrings. (To avoid the problem with gcc-2.96.)
11165
11166 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11167
11168 * coop-threads.c (scm_call_with_new_thread), load.c
11169 (scm_primitive_load, scm_sys_search_load_path), random.c
11170 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11171 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11172 (potentially) issue a scm-misc-error or wrong-num-args error
11173 message.
11174
11175 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11176 about the expected type with the wrong-type-arg error message.
11177
11178 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11179 a C level bug that can't be fixed from scheme anyway.
11180
11181 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11182
11183 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11184 Duplicate bindings are OK in a let* since a let* is semantically
11185 equivalent to a nested set of let:s.
11186
11187 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11188
11189 * print.c (scm_print_options): Fixed texinfo in docstring.
11190
11191 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11192 the underlying functions getservent, getprotoent or getnetent
11193 return NULL instead of signalling an error.
11194
11195 2001-03-04 Gary Houston <ghouston@arglist.com>
11196
11197 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11198 taking an unexpectedly large filename for an AF_UNIX socket from
11199 bind/connect/sendto (thanks to Martin Grabmueller).
11200
11201 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11202 former and adjusted the latter.
11203 (scm_socket, scm_socketpair): cosmetic changes.
11204 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11205 size_t as socklen_t substitute. don't restrict args/return values
11206 to INUM: allow full range of int or size_t.
11207 (scm_fill_sockaddr): check arguments before allocating memory, to
11208 avoid leakage. use malloc, not scm_must_malloc.
11209 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11210 substitute. free the sockaddr structure before throwing an error.
11211 (scm_init_add_buffer): procedure removed, together with its static
11212 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11213 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11214 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11215 scm_sendto): use a local buffer instead of scm_addr_buffer.
11216 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11217 not size_t.
11218 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11219 call to detect whether recvfrom could be bothered to set the address.
11220 (scm_init_socket): don't call scm_init_addr_buffer.
11221
11222 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11223
11224 * debug.c (scm_procedure_source, scm_procedure_environment),
11225 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11226 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11227 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11228 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11229 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11230 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11231 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11232 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11233 scm_array_to_list, scm_array_prototype), validate.h
11234 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11235 scm_misc_error or scm_wrong_type_arg instead.
11236
11237 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11238
11239 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11240
11241 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11242 (scm_sys_tag_body): Added.
11243
11244 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11245
11246 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11247 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11248 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11249 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11250 options.c (scm_options), ports.c (scm_remove_from_port_table),
11251 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11252 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11253 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11254 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11255 instead.
11256
11257 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11258
11259 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11260
11261 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11262
11263 * eval.c (scm_s_duplicate_bindings): New error message.
11264 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11265
11266 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11267
11268 * eval.h (SCM_EVALIM2): New macro. Use it when a
11269 immediate, literal constant should be evaluated.
11270 * eval.c (scm_s_duplicate_formals): New error message string.
11271 (scm_c_improper_memq): New function.
11272 (scm_m_lambda): Check for duplicate arguments.
11273 (scm_ceval, scm_deval): When executing a body: only cons a new
11274 toplevel environment frame when it is different from the
11275 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11276 check for empty combinations; use SCM_EVALIM2 for the same reason
11277 in the non-toplevel loop.
11278 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11279 New labels with the meaning of their non-"nontoplevel" partners,
11280 but they are used when it is known that the body is not evaluated at
11281 top-level.
11282 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11283 reporting for empty combinations.
11284
11285 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11286
11287 * Remove dump facilities.
11288 * dump.c, dump.h: Removed.
11289 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11290 * init.c: Remove #include "libguile/dump.h".
11291 (scm_init_guile_1): Remove scm_init_dump.
11292 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11293 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11294 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11295 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11296
11297 * keywords.c: Remove #include "libguile/dump.h".
11298 (keyword_dump, keyword_undump): Removed.
11299 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11300
11301 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11302
11303 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11304 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11305 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11306 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11307 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11308 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11309 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11310 to @code{} as the texinfo manual recommends, converted the
11311 examples to use a @lisp{}-environment.
11312
11313 * strports.c (scm_eval_string): Cleaned up the docstring.
11314
11315 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11316 markup.
11317
11318 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11319 (scm_number_to_string, scm_string_to_number, scm_number_p)
11320 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11321 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11322 (scm_ash): Added texinfo markup and removed obsolete @refill.
11323 (scm_gr_p): Corrected comment.
11324 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11325 docstring) comments.
11326 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11327 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11328 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11329 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11330 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11331 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11332 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11333 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11334
11335 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11336
11337 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11338 (Obviously nobody compiles with SCM_RECKLESS defined...)
11339
11340 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
11341
11342 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11343
11344 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
11345
11346 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
11347
11348 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
11349
11350 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
11351 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
11352 since use of `z' suggests that the arguments may be complex.
11353
11354 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
11355 typos.
11356
11357 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
11358
11359 * dump.c (scm_binary_write, scm_binary_read), eval.c
11360 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
11361 scm_guardian_greedy_p, scm_make_guardian), fports.c
11362 (scm_file_port_p): Minor docstring fixes.
11363
11364 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
11365
11366 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
11367
11368 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
11369 scm_i_eval.
11370 (make_class_from_template): Do not bother to set the current
11371 module around the call to DEFVAR, scm_eval takes care of that.
11372 (scm_init_goops): Make scm_module_goops and
11373 scm_goops_lookup_closure permanent objects.
11374
11375 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
11376 top level, create a fresh top-level environment for each
11377 expression instead of mutating the exisint frame. This is
11378 important when that frame is closed over.
11379
11380 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
11381 SCM_DIGSPERLONG instead of DIGSPERLONG.
11382
11383 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
11384
11385 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
11386 before applying arrow procedure in `cond' and before applying
11387 receiver procedure in call-with-current-continuation.
11388 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
11389 macro. The argument is expanded more than one time.
11390
11391 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
11392 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
11393
11394 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
11395
11396 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
11397 notice and license.
11398
11399 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11400
11401 * variable.c (scm_make_variable, scm_make_undefined_variable)
11402 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
11403 (scm_variable_bound_p), values.c (scm_values)
11404 (scm_call_with_values), unif.c (scm_bit_count)
11405 (scm_bit_set_star_x), symbols.c (scm_gentemp)
11406 (scm_gensym), strings.c (scm_string_p, scm_make_string)
11407 (scm_read_only_string_p, scm_string_length, scm_string_ref)
11408 (scm_string_set_x, scm_substring, scm_string_append), stime.c
11409 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
11410 (scm_copy_random_state, scm_random), print.c (scm_newline)
11411 (scm_write_char, scm_simple_format), debug-malloc.c
11412 (scm_malloc_stats), environments.c (scm_environment_p)
11413 (scm_environment_bound_p, scm_environment_ref)
11414 (scm_environment_fold, scm_environment_define)
11415 (scm_environment_undefine, scm_environment_set_x)
11416 (scm_environment_cell, scm_environment_observe)
11417 (scm_environment_observe_weak, scm_environment_unobserve)
11418 (scm_make_eval_environment, scm_eval_environment_p)
11419 (scm_eval_environment_set_local_x, scm_eval_environment_local)
11420 (scm_eval_environment_imported)
11421 (scm_eval_environment_set_imported_x, scm_make_import_environment)
11422 (scm_import_environment_p, scm_import_environment_imports)
11423 (scm_import_environment_set_imports_x, scm_make_export_environment)
11424 (scm_export_environment_p, scm_export_environment_private)
11425 (scm_export_environment_set_private_x)
11426 (scm_export_environment_signature)
11427 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
11428 Added texinfo markup.
11429
11430 * ports.c (scm_drain_input): Lowercased argument to @var.
11431 (scm_current_input_port, scm_current_output_port): Filled in
11432 missing explanation.
11433 (scm_current_load_port, scm_set_current_output_port)
11434 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
11435 Added texinfo markup.
11436
11437 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
11438 (scm_release_arbiter): Added texinfo markup to docstrings.
11439 Changed `Returns' to `Return'.
11440 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
11441
11442 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
11443
11444 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
11445 by doubling them to `@@'.
11446
11447 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11448
11449 * numbers.c (scm_lognot), random.c (scm_random,
11450 scm_random_normal, scm_random_solid_sphere_x,
11451 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
11452 scm_random_exp), dynwind.c
11453 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
11454
11455 * goops.c (scm_sys_initialize_object, scm_instance_p,
11456 scm_class_name, scm_class_precedence_list, scm_class_slots,
11457 scm_class_environment, scm_generic_function_name,
11458 scm_generic_function_methods, scm_method_generic_function,
11459 scm_method_specializers, scm_method_procedure, scm_make_unbound,
11460 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
11461 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
11462 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
11463 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
11464 scm_class_direct_supers, scm_class_direct_slots,
11465 scm_class_direct_subclasses, scm_class_direct_methods,
11466 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
11467 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
11468 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
11469 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
11470 scm_memoized_environment, scm_procedure_name,
11471 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
11472 objects.c
11473 (scm_class_of, scm_entity_p, scm_operator_p,
11474 scm_set_object_procedure_x, scm_object_procedure,
11475 scm_make_class_object), hooks.c (scm_make_hook_with_name,
11476 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
11477 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
11478 scm_hook_to_list), lang.c
11479 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
11480 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
11481 (scm_print_options, scm_port_with_print_state,
11482 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
11483 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
11484 scm_make_procedure_with_setter, scm_procedure), throw.c
11485 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
11486 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
11487 scm_stack_ref, scm_stack_length, scm_frame_p,
11488 scm_last_stack_frame, scm_frame_number, scm_frame_source,
11489 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
11490 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
11491 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
11492 (scm_dirname, scm_basename), dynwind.c
11493 (scm_wind_chain), read.c (scm_read_options, scm_read,
11494 scm_read_hash_extend), gc.c
11495 (scm_unhash_name), eval.c (scm_eval_options_interface,
11496 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
11497 (scm_display_error, scm_set_print_params_x,
11498 scm_display_application, scm_display_backtrace, scm_backtrace),
11499 async.c (scm_async, scm_system_async, scm_async_mark,
11500 scm_system_async_mark, scm_run_asyncs, scm_noop,
11501 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
11502 scm_mask_signals): Added docstrings.
11503
11504 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
11505
11506 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
11507 address of car/cdr. (Thanks to Dirk Herrmann)
11508 Use scm_sizet to obtain the length of strings.
11509 (Thanks to Matthias Koeppe)
11510
11511 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
11512
11513 * symbols.c (scm_mem2symbol): Put a empty statement after the
11514 next_symbol label. This is mandated by ANSI, appearantly.
11515
11516 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11517
11518 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
11519 sense to compile for a specific kernel version. Do not include
11520 <asm/signal.h> while defining __KERNEL__. This hack should no
11521 longer be needed and caused problems.
11522
11523 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
11524
11525 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
11526 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
11527 can not deal with immediates.
11528
11529 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
11530
11531 * list.c (scm_list_copy): Validate the first argument.
11532
11533 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
11534
11535 Fix evaluator so that top-level expressions are correctly
11536 evaluated with respect to the module system.
11537
11538 * modules.h. modules.c (scm_current_module_lookup_closure): New
11539 function.
11540
11541 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
11542 prototypes.
11543 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
11544 names to better reflect their meaning.
11545
11546 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
11547 evaluated at top-level and synronize lookup closure before
11548 executing every subform.
11549 (scm_primitve_eval_x, scm_primitive_eval): New functions.
11550 (scm_eval_x, scm_eval): Reimplement in terms of
11551 scm_primitive_eval_x and scm_primitive_eval, respectively.
11552
11553 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
11554
11555 * macros.c (scm_macro_name, scm_macro_transformer): Use
11556 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
11557 Thanks!
11558
11559 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
11560
11561 * dump.c (scm_store_bytes): Store data size before data.
11562 (scm_restore_bytes): Restore data size. Takes a pointer to size.
11563 * dump.h (scm_restore_bytes): Updated.
11564
11565 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
11566
11567 * dump.c: Use double cells for update schedule.
11568
11569 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
11570
11571 * ports.c (scm_unread_char): Take an optional argument.
11572
11573 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11574
11575 * modules.h (scm_selected_module, scm_current_module): Renamed
11576 scm_selected_module to scm_current_module to synchronize Scheme
11577 and C names.
11578 (scm_select_module, scm_set_current_module): Likewise. Changed
11579 all uses.
11580
11581 * ports.c (scm_port_for_each): Make a snapshot of the port table
11582 before iterating over it. The table might change while the user
11583 code is running. With the snapshot, the user can depend on the
11584 fact that each port that existed at the start of the iteration is
11585 encountered exactly once. (ice-9 popen) depends on this.
11586
11587 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11588
11589 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
11590
11591 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
11592 range checking for the size parameter. Thanks to Martin
11593 Grabmueller for the hint.
11594
11595 (scm_makstr): Reordered string initialization to make interrupt
11596 deferring unnecessary.
11597
11598 * vectors.c (scm_make_vector): Fixed range checking.
11599
11600 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11601
11602 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
11603
11604 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
11605 checking of the size parameter for type correctness and valid
11606 range. Thanks to Rob Browning for reporting the problem. Instead
11607 of deferring interrupts, scm_remember_upto_here_1 is used.
11608
11609 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11610
11611 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
11612 (scm_dump_cell_update): Removed.
11613 (scm_dump_update): Renamed from scm_dump_object_update.
11614 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
11615 a pointer instead of returning a value.
11616 * keywords.c (keyword_undump): Updated.
11617
11618 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11619
11620 * dump.c, dump.h: Modified a lot.
11621 (SCM_DUMP_COOKIE): Version 0.1
11622 (scm_dump_mark): Removed.
11623 (scm_restore_cell_object, scm_store_cell_object): New functions.
11624
11625 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
11626 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
11627 New slots: dump, undump.
11628 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
11629 Updated.
11630
11631 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
11632 (keyword_undump): Renamed from keyword_alloc.
11633 (scm_init_keywords): Set keyword_dump and keyword_undump.
11634
11635 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
11636
11637 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
11638 the deprecated SCM_DOUBLE_CELLP.
11639
11640 * tags.h (SCM_DOUBLE_CELLP): deprecated.
11641
11642 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
11643
11644 * dump.c, dump.h: New files.
11645 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
11646 * init.c: #include "libguile/dump.h".
11647 (scm_init_guile_1): Call scm_init_dump.
11648 * smob.h (scm_smob_descriptor): New slots: dump_mark,
11649 dump_dealloc, dump_store, undump_alloc, undump_restore,
11650 undump_init.
11651 * smob.c (scm_make_smob_type): Init the new slots.
11652 (scm_set_smob_dump, scm_set_smob_undump): New functions.
11653 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
11654
11655 * keywords.c: #include "libguile/dump.h".
11656 (keyword_dealloc, keyword_alloc): New functions.
11657 (scm_init_keywords): Set smob_dump and smob_undump.
11658
11659 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
11660
11661 * vectors.c (scm_c_make_vector): New function.
11662 * vectors.h (scm_c_make_vector): Declared.
11663 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
11664 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
11665 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
11666 (scm_make_method_cache, scm_i_vector2list,
11667 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
11668 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
11669 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
11670 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
11671 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
11672 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
11673 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
11674 (scm_vector, scm_make_vector): Use scm_c_make_vector.
11675
11676 * hashtab.c (scm_c_make_hash_table): New function.
11677 * hashtab.h (scm_c_make_hash_table): Declared.
11678 * environments.c (scm_make_leaf_environment,
11679 scm_make_eval_environment), gc.c (scm_init_storage),
11680 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
11681 Use scm_c_make_hash_table.
11682
11683 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11684
11685 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
11686
11687 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11688
11689 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
11690 end of docstring.
11691
11692 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
11693 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
11694 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
11695 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11696 srcprop.c (scm_source_properties, scm_set_source_properties_x,
11697 scm_source_property, scm_set_source_property_x), sort.c
11698 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
11699 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
11700 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
11701 docstrings.
11702
11703 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11704
11705 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
11706 really get that arg.
11707
11708 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
11709
11710 * goops.c (s_scm_get_keyword): Bug fix.
11711
11712 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11713
11714 The following patch was sent by Martin Grabmueller. It makes sure
11715 that in case of parameter errors the correct function name is
11716 shown, and that parameter types are only checked once.
11717
11718 * strop.c (string_copy, string_upcase_x, string_downcase_x,
11719 string_capitalize_x): New functions. Each one performs the core
11720 functionality of the corresponding scm_* function.
11721
11722 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
11723 scm_string_downcase_x, scm_string_downcase,
11724 scm_string_capitalize_x, scm_string_capitalize): Reduced to
11725 parameter checking wrappers of the above functions.
11726
11727 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11728
11729 * continuations.c, dynl.c, keywords.c, load.c: Include
11730 strings.h. Thanks to Bill Schottstaedt for the bug report.
11731
11732 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11733
11734 * backtrace.c (display_header): Make sure that line and column
11735 information is shown independent of whether the port the code was
11736 read from had an associated filename. Thanks to Martin
11737 Grabmueller for providing this patch.
11738
11739 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11740
11741 * fports.[ch] (scm_file_port_p): New primitive.
11742
11743 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11744
11745 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
11746 These are now defined in fports.c, strports.c and vports.c.
11747
11748 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
11749 vports.c (scm_tc16_sfport): Made variables (were macros defined in
11750 tags.h).
11751
11752 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
11753 (scm_make_sfptob): Made static. These return a type code now.
11754
11755 fports.c (scm_init_fports), strports.c (scm_init_strports),
11756 vports.c (scm_init_vports): Create the corresponding port types.
11757
11758 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
11759 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
11760
11761 * init.c (scm_init_guile_1): Make sure strports are initialized
11762 before gdbint.
11763
11764 * ports.[ch] (scm_make_port_type): Changed the return type to
11765 scm_bits_t.
11766
11767 * ports.c (scm_ports_prehistory): Don't create any port types
11768 here.
11769
11770 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
11771 against scm_tc16_fport directly.
11772
11773 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11774
11775 * srcprop.c (scm_set_source_property_x): Fix to handle
11776 (set-source-property! <obj> 'copy <datum>) correctly.
11777
11778 2001-01-24 Gary Houston <ghouston@arglist.com>
11779
11780 * filesys.c (scm_link): docstring fix.
11781 * fports.h (scm_setfileno): obsolete declaration removed.
11782 * posix.c: bogus popen declaration removed.
11783
11784 * rdelim.c: new file, split from ioext.c.
11785 * rdelim.h: new file, split from ioext.h
11786 * Makefile.am: add rdelim.c and related files.
11787 * init.c: call scm_init_rdelim. include rdelim.h.
11788
11789 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
11790
11791 This patch was sent by Martin Grabmueller and makes sure that
11792 parameter errors are reported correctly by the lexicographic
11793 ordering predicates.
11794
11795 * strorder.c (string_less_p, string_ci_less_p): New functions.
11796
11797 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
11798 functionality into string_less_p, string_ci_less_p respectively.
11799 The remaining code is just a wrapper to do the parameter
11800 checking.
11801
11802 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
11803 parameters and call string_less_p instead of scm_string_less_p.
11804
11805 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
11806 Check the parameters and call string_less_ci_p instead of
11807 scm_string_ci_less_p.
11808
11809 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
11810
11811 This patch modifies scm_display_error to perform parameter
11812 checking. Thanks to Neil Jerram for the bug report.
11813
11814 * backtrace.[ch] (scm_i_display_error): New function.
11815
11816 * backtrace.c (scm_display_error): Added parameter check and
11817 extracted the core functionality into function
11818 scm_i_display_error.
11819
11820 * throw.c (handler_message): Call scm_i_display_error to display
11821 the error message.
11822
11823 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11824
11825 * eval.c (SCM_APPLY): Added # args check for application of
11826 procedures with arity 3. (Thanks to Anders Holst.)
11827
11828 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
11829
11830 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
11831
11832 (SCM_OPDIRP): Deprecated.
11833
11834 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
11835 SCM_OPN.
11836
11837 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
11838 Instead, give an explicit error message in case the directory is
11839 closed.
11840
11841 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
11842 instead of SCM_OPENP and SCM_CLOSEDP.
11843
11844 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
11845
11846 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11847
11848 * eval.c (inner_eval, scm_eval): Move all real functionality into
11849 inner_eval. Avoid to copy the expression twice by inlining some
11850 code from scm_i_eval.
11851
11852 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11853
11854 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
11855 now has to be the last clause, as required by R5RS. Thanks to
11856 Martin Grabmueller for the patch.
11857
11858 2001-01-18 Gary Houston <ghouston@arglist.com>
11859
11860 * ioext.c: further simplify scm_read_string_x_partial by defining
11861 a macro SCM_EBLOCK.
11862
11863 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
11864
11865 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
11866
11867 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
11868
11869 * __scm.h: Added comment about architecture and compiler
11870 properties that are required by guile.
11871
11872 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
11873 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
11874
11875 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
11876
11877 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
11878
11879 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
11880 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
11881
11882 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11883
11884 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
11885 to the names in limits.h.
11886
11887 * numbers.c (abs_most_negative_fixnum): Added.
11888
11889 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
11890 fixnum-min) special case.
11891
11892 (scm_big_and): Fix for negative first parameter.
11893
11894 (scm_bit_extract): Fix for fixnum paramters.
11895 Thanks to Rob Browning for the bug report.
11896
11897 (scm_init_numbers): Initialize abs_most_negative_fixnum.
11898
11899 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11900
11901 * symbols.c (scm_symbol_bound_p): Fixed comment.
11902 Thanks to Chris Cramer.
11903
11904 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11905
11906 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
11907 Thanks to Bill Schottstaedt.
11908
11909 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
11910
11911 from Matthias Köppe:
11912
11913 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
11914 casts its result, so doesn't yield an lvalue per ANSI C.
11915
11916 * goops.c (s_scm_sys_set_object_setter_x): use
11917 SCM_SET_ENTITY_SETTER.
11918 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
11919
11920 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
11921 its result, so doesn't yield an lvalue per ANSI C.
11922 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
11923 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
11924 SCM_GC_SET_CARD_FLAGS.
11925 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
11926
11927 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
11928
11929 2001-01-08 Gary Houston <ghouston@arglist.com>
11930
11931 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
11932 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
11933 socket.c (scm_recvfrom): use the new macro, plus minor docstring
11934 changes.
11935 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
11936 for fdes. if current input port is used, check that it's a file
11937 port.
11938
11939 2001-01-06 Gary Houston <ghouston@arglist.com>
11940
11941 * ioext.c (scm_read_string_x_partial): new procedure, implements
11942 read-string!/partial.
11943 * ports.c (scm_take_from_input_buffers): new procedure used by
11944 scm_read_string_x_partial.
11945 (scm_drain_input): use scm_take_from_input_buffers.
11946
11947 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
11948
11949 * validate.h (SCM_VALIDATE_NUMBER): New.
11950
11951 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
11952
11953 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
11954 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
11955 SET_DESTROYED): new defines/macros.
11956 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
11957 (add_to_live_list): takes a `guardian_t *' now, not SCM.
11958 (guardian_print): print more info.
11959 (guardian_apply): check if the guardian is destroyed, and throw an
11960 error if so. take one more optional argument `throw_p'.
11961 (scm_guard): depending on the value of `throw_p', return a boolean
11962 result.
11963 (scm_get_one_zombie): remove redundant property test.
11964 (guardian_t): represent the various (currently 3, I hope nothing
11965 more gets added) boolean fields as bit flags.
11966 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
11967 (scm_destroy_guardian_x): new procedure.
11968
11969 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
11970 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
11971
11972 2001-01-01 Gary Houston <ghouston@arglist.com>
11973
11974 * fports.c (fport_write): bugfix: handle short writes for
11975 unbuffered ports too. optimize the buffered case by minimizing
11976 the number of write/flush calls.
11977 (write_all): new helper procedure.
11978
11979 The ChangeLog continues in the file: "ChangeLog-2000"