drop extra 2006-02-06 heading
[bpt/guile.git] / libguile / ChangeLog
1 2006-04-16 Kevin Ryde <user42@zip.com.au>
2
3 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
4 (scm_readdir): Use readdir64.
5 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
6 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
7 and ftruncate take off_t not size_t.
8 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
9 available.
10
11 2006-04-06 Kevin Ryde <user42@zip.com.au>
12
13 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
14 instead of toggling it. Reported by Ludovic Courtès.
15
16 2006-03-26 Marius Vollmer <mvo@zagadka.de>
17
18 * threads.c (get_thread_stack_base): Use scm_get_stack_base
19 instead of accessing __libc_stack_end directly, and only do this
20 when pthread_attr_getstack is known not to work for the main
21 thread or when not using pthreads at all.
22
23 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
24 unknown instead of returning NULL.
25
26 2006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
27
28 * numbers.c (scm_i_mem2number): Renamed to
29 scm_c_locale_stringn_to_number.
30 * numbers.c, print.c, read.c: Updated callers.
31 * numbers.h: Update function declaration.
32
33 2006-03-11 Neil Jerram <neil@ossau.uklinux.net>
34
35 * unif.c (string_set): Don't return in a void function. (Reported
36 by Mike Gran.)
37
38 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
39 rather than void*, so we can do pointer arithmetic on it.
40 (Reported by Mike Gran.)
41 (s_scm_uniform_vector_write): Ditto.
42
43 2006-03-10 Neil Jerram <neil@ossau.uklinux.net>
44
45 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
46 oldra is not an array. (Reported by Steve Juranich.)
47
48 * threads.c (do_unlock): Renamed from "unlock", which is defined
49 in unistd.h on QNX. (Reported by Matt Kraai.)
50
51 2006-03-04 Kevin Ryde <user42@zip.com.au>
52
53 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
54 not SCM_CRITICAL_SECTION_START.
55
56 * eval.c, posix.c: Change comments from C++ to C style. Reported by
57 Mike Gran.
58
59 2006-02-28 Kevin Ryde <user42@zip.com.au>
60
61 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
62
63 2006-02-26 Kevin Ryde <user42@zip.com.au>
64
65 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
66 NAME_MAX is not available, which is so on Solaris 10. Report and help
67 by Bill Schottstaedt.
68
69 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
70 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
71 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
72 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
73 use "unsigned char", not signed char. This ensures comparisons are
74 the same as `char<?' etc, and is also the same as guile 1.6 did.
75 Reported by Sven Hartrumpf.
76
77 2006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
78
79 * random.c: Test for SCM_HAVE_T_UINT64 instead of
80 SCM_HAVE_T_INT64.
81 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
82 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
83 scm_t_int32.
84
85 2006-01-04 Ludovic Court<E8>s <ludovic.courtes@laas.fr>
86
87 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
88 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
89 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
90 Take into account SEG->SPAN when computing CELLS_SWEPT.
91 (scm_i_sweep_segment): Take one more argument, similarly.
92 (scm_i_sweep_all_segments): Likewise.
93 (scm_i_sweep_some_segments): Likewise.
94 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
95 refer to SCM_GC_CELLS_COLLECTED.
96
97 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
98 argument, an `scm_i_sweep_statistics' object.
99 Change the way DELTA is collected: don't take into account
100 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
101
102 * gc-malloc.c (scm_realloc): Pass an extra argument
103 to `scm_i_sweep_all_segments ()'.
104
105 * gc.c (gc_start_stats): Updated accordingly.
106 (gc_end_stats): Take an additional SWEEP_STATS argument.
107 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
108 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
109 Decrement SCM_CELLS_ALLOCATED.
110 (scm_i_gc): Likewise.
111
112 * private-gc.h (scm_i_sweep_*): Updated function
113 prototypes accordingly.
114 (scm_t_sweep_statistics): New type.
115 (scm_i_sweep_statistics_init): New macro.
116 (scm_i_sweep_statistics_sum): New macro
117
118 2006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
119
120 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
121 LEN. Without this, too much collectable memory gets unregistered,
122 which results in an underflow of SCM_MALLOCATED in
123 `decrease_mtrigger()'.
124
125 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
126 equal to SCM_MALLOCATED.
127
128 2006-02-13 Marius Vollmer <mvo@zagadka.de>
129
130 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
131 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
132 configured --without-threads.
133 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
134
135 2006-02-12 Marius Vollmer <mvo@zagadka.de>
136
137 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
138 filling when the fill parameter is omitted, as documented, but
139 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
140 can not store characters.
141
142 2006-02-09 Neil Jerram <neil@ossau.uklinux.net>
143
144 * socket.c (scm_c_make_socket_address): Pass address_size pointer
145 on to scm_fill_sockaddr call.
146
147 2006-02-04 Neil Jerram <neil@ossau.uklinux.net>
148
149 * throw.h (scm_c_catch, scm_c_with_throw_handler,
150 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
151
152 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
153 (struct pre_unwind_data): New, replaces struct lazy_catch.
154 (scm_c_catch): New, replaces scm_internal_catch as the primary
155 catch API for C code; adds pre-unwind handler support.
156 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
157 compatibility.
158 (tc16_pre_unwind_data, pre_unwind_data_print,
159 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
160 "lazy_catch" equivalents.
161 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
162 as the primary C API for a "lazy" catch.
163 (scm_internal_lazy_catch): Now just a wrapper for
164 scm_c_with_throw_handler, for back compatibility.
165 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
166 pre-unwind handler support.
167 (scm_catch): Now just a wrapper for
168 scm_catch_with_pre_unwind_handler, for back compatibility.
169 (scm_with_throw_handler): New.
170 (scm_lazy_catch): Update comment to say that the handler can
171 return, and what happens if it does.
172 (toggle_pre_unwind_running): New.
173 (scm_ithrow): When identifying the throw target, take running
174 flags into account. In general, change naming of things from
175 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
176 don't unwind the dynamic context first. Add dynwind framing to
177 manage the running flag of a throw handler. If a lazy catch or
178 throw handler returns, rethrow the same exception again. Add
179 pre-unwind support to the normal catch case (SCM_JMPBUFP).
180
181 * root.c (scm_internal_cwdr): Add NULL args to
182 scm_i_with_continuation_barrier call.
183
184 * dynwind.c: Change comment mentioning lazy-catch to mention
185 pre-unwind data and throw handler also.
186
187 * continuations.h (scm_i_with_continuation_barrier): Add
188 pre-unwind handler args.
189
190 * continuations.c (scm_i_with_continuation_barrier): Add
191 pre-unwind handler args, and pass on to scm_c_catch (changed from
192 scm_internal_catch).
193 (c_handler): Remove scm_handle_by_message_noexit call.
194 (scm_c_with_continuation_barrier): Call
195 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
196 as the pre-unwind handler.
197 (scm_handler): Remove scm_handle_by_message_noexit call.
198 (s_scm_with_continuation_barrier): Call
199 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
200 as the pre-unwind handler.
201
202 2006-02-04 Kevin Ryde <user42@zip.com.au>
203
204 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
205
206 2006-02-03 Kevin Ryde <user42@zip.com.au>
207
208 * list.c, list.h (scm_list): Restore this function for use from C.
209 It's a complete no-op but in theory might used by someone.
210
211 2006-01-30 Marius Vollmer <mvo@zagadka.de>
212
213 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
214 so that it gets unlocked in all cases.
215 (SCM_APPLY, CEVAL): Likewise.
216
217 2006-01-29 Marius Vollmer <mvo@zagadka.de>
218
219 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
220 scm_is_typed_array instead.
221
222 Renamed the "frames" that are related to dynamic-wind to "dynamic
223 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
224 Updated documentation.
225
226 Disabled "futures":
227
228 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
229 * eval.c, init.c: Comment out all 'future' related things.
230
231 2006-01-28 Marius Vollmer <mvo@zagadka.de>
232
233 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
234 to inline.h to make it inline.
235
236 2005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
237
238 * strings.c (scm_i_take_stringbufn): New.
239 (scm_i_c_take_symbol): New.
240 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
241
242 * strings.h (scm_i_c_take_symbol): New.
243 (scm_i_take_stringbufn): New.
244
245 * symbols.c (lookup_interned_symbol): New function.
246 (scm_i_c_mem2symbol): New function.
247 (scm_i_mem2symbol): Use `lookup_symbol ()'.
248 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
249 creating a new Scheme string.
250 (scm_from_locale_symboln): Likewise.
251 (scm_take_locale_symbol): New.
252 (scm_take_locale_symboln): New.
253
254 * symbols.h (scm_take_locale_symbol): New.
255 (scm_take_locale_symboln): New.
256
257 2006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
258
259 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
260 free_count.
261
262 2005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
263
264 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
265 upon error
266
267 2005-12-29 Neil Jerram <neil@ossau.uklinux.net>
268
269 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
270 the GC when allocated_fluids_len is zero.
271
272 2005-12-14 Neil Jerram <neil@ossau.uklinux.net>
273
274 * load.c (the_reader, the_reader_fluid_num): New.
275 (scm_primitive_load): Support custom reader.
276 (scm_init_load): Init the_reader and the_reader_fluid_num; export
277 the_reader as `current-reader'.
278
279 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
280 (rather than an uninitialized pointer on the stack).
281
282 2005-12-07 Marius Vollmer <mvo@zagadka.de>
283
284 Reported by Bruce Korb:
285
286 * init.c (invoke_main_func): Don't call exit here. Throws that
287 are only caught by scm_with_guile will bypass us and would cause
288 scm_boot_guile to return erroneously.
289 (scm_boot_guile): Expect scm_with_guile to return and call exit
290 here, passing it an appropriate exit code.
291
292 From Andy Wingo:
293
294 * script.c (scm_find_executable): Compile fix -- fgetc returns an
295 unsigned char cast to an int, or -1 for EOS.
296
297 2005-12-06 Marius Vollmer <mvo@zagadka.de>
298
299 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
300 non-const.
301 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
302
303 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
304 scm_enter_guile): Removed from public API. See comment at
305 scm_without_guile for the rationale.
306
307 * scmsigs.c (read_without_guile): New.
308 (signal_delivery_thread): Use it instead of
309 scm_leave_guile/read/scm_enter_guile.
310
311 From Stephen Compall:
312
313 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
314 (CEVAL): Evaluate SRFI 61 cond clauses.
315
316 2005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
317
318 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
319 This was typically hit when running `gc-live-object-stats' right
320 after starting Guile.
321
322 2005-11-30 Kevin Ryde <user42@zip.com.au>
323
324 * srfi-13.c (scm_string_append_shared): No copying if just one
325 non-empty string in args.
326
327 2005-11-26 Kevin Ryde <user42@zip.com.au>
328
329 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
330 by Ludovic Courtès.
331
332 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
333 "register".
334
335 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
336 scm_malloc returning NULL, it never does that.
337 * putenv.c (putenv): Likewise.
338
339 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
340 much too big to want to inline.
341
342 2005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
343
344 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
345 the value at its top. This fixes a reference leak.
346 (PUSH_REF): Perform `pstate->top++' after calling
347 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
348 effects.
349
350 2005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
351
352 * gc.c (scm_weak_vectors): Removed.
353
354 2005-11-12 Kevin Ryde <user42@zip.com.au>
355
356 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
357 by Ludovic Courtès.
358
359 2005-11-07 Marius Vollmer <mvo@zagadka.de>
360
361 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
362 SCM_CRITICAL_SECTION_START/END since the code inside the critical
363 section might exit non-locally.
364
365 2005-11-04 Neil Jerram <neil@ossau.uklinux.net>
366
367 * eval.c (sym_instead): New symbol.
368 (ENTER_APPLY): Remove optional use of a continuation when making
369 trap call.
370 (scm_debug_opts): Change doc for 'cheap option to make clear that
371 it is now obsolete.
372 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
373 making trap calls, and implement substitution of eval expressions
374 and return values using the values that the trap call handlers
375 return.
376
377 * debug.h (SCM_CHEAPTRAPS_P): Removed.
378
379 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
380
381 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
382 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
383 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
384 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
385 scm_c_make_socket_address): New functions.
386 * socket.h: Add prototypes.
387
388 2005-10-24 Kevin Ryde <user42@zip.com.au>
389
390 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
391 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
392 POSIX spec examples, the latter are not available on for instance
393 NetBSD.
394
395 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
396 posix.texi.
397
398 * stime.c (scm_strftime): Update docstring from posix.texi.
399
400 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
401
402 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
403
404 * null-threads.h, pthread-threads.h
405 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
406 (scm_i_pthread_mutexattr_recursive): New.
407
408 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
409 (scm_i_critical_section_mutex): Do not initialize statically.
410 (scm_threads_prehistory): Initialize
411 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
412 here.
413
414 * eval.c (source_mutex): Do not initialiaze statically.
415 (scm_init_eval): Do it here, using
416 scm_i_pthread_mutexattr_recursive.
417
418 2005-09-05 Marius Vollmer <mvo@zagadka.de>
419
420 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
421 New.
422 (sym_reader): New.
423 (scm_print_opts): Added "quote-keywordish-symbols" option.
424 (quote_keywordish_symbol): New, for evaluating the option.
425 (scm_print_symbol_name): Use it.
426 (scm_init_print): Initialize new option to sym_reader.
427
428 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
429
430 * eval.c (eval_letrec_inits): New.
431 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
432
433 2005-08-12 Marius Vollmer <mvo@zagadka.de>
434
435 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
436 Peter Gavin!
437
438 2005-08-12 Kevin Ryde <user42@zip.com.au>
439
440 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
441
442 2005-08-06 Kevin Ryde <user42@zip.com.au>
443
444 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
445 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
446 scm_string_index, scm_string_index_right, scm_string_skip,
447 scm_string_skip_right, scm_string_count, scm_string_map,
448 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
449 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
450 procedures called in loops.
451
452 2005-08-02 Kevin Ryde <user42@zip.com.au>
453
454 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
455 avoid lots of copying where previoulsy growing by only 80 bytes at a
456 time.
457
458 2005-08-01 Marius Vollmer <mvo@zagadka.de>
459
460 * modules.h, modules.c (scm_eval_closure_module): Removed, we
461 already have scm_lookup_closure_module, which does the same thing.
462
463 2005-08-01 Marius Vollmer <mvo@zagadka.de>
464
465 New marking algorithm for weak hashtables that fixes the problem
466 that references from the non-weak value to the associated weak
467 key (for example) would prevent the entry from ever being dropped.
468
469 Guardians have been changed back to their original semantics and
470 are no longer greedy and no longer drop cycles.
471
472 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
473 hashtable and guardian machinery but call the relevant functions
474 directly.
475
476 * guardians.h, guardians.c, deprecated.h,
477 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
478 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
479 Deprecated and moved into deprecated.[ch].
480
481 * guardians.h, guardians.c: Mostly rewritten.
482 (scm_i_init_guardians_for_gc,
483 scm_i_identify_inaccessible_guardeds,
484 scm_i_mark_inaccessible_guardeds): New.
485 (scm_make_guardian): Removed greedy_p argument.
486
487 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
488 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
489 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
490 (scm_weaks_prehistory): Removed.
491 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
492 scm_i_mark_weak_vectors_non_weaks,
493 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
494 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
495 scm_scan_weak_vectors): Removed.
496
497 * hashtab.h (scm_i_scan_weak_hashtables): New.
498 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
499 SCM_WVECTF_NOSCAN.
500 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
501 t->n_items.
502 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
503 to latter. Do not scan the alists themselves, this is done by the
504 weak vector code now. Just update the element count.
505
506 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
507 to latter. The type is now only part of the cell word.
508 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
509
510 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
511
512 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
513
514 Some changes towards making it possible to run Guile on the EM64T
515 platform.
516
517 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
518 mallocating for (unsigned long *bounds).
519
520 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
521 scm_t_bits before storing them in the type word.
522
523 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
524 scm_t_bits to int.
525
526 2005-07-12 Kevin Ryde <user42@zip.com.au>
527
528 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
529 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
530 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
531 than scm_makfrom0str.
532 Reported by Ken Raeburn.
533
534 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
535 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
536 returning SCM_GC_CARD_BVEC.
537
538 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
539 rather than latin-1 acute accent, the latter may not print on all
540 terminals.
541
542 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
543 trailing deletions, so as to return a substring if those are the only
544 changes.
545
546 2005-07-10 Kevin Ryde <user42@zip.com.au>
547
548 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
549 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
550 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
551 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
552
553 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
554
555 * gc-card.c (scm_i_card_statistics): init tag.
556
557 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
558
559 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
560
561 * fports.c (s_scm_open_file): add the b flag for binary to the doc
562 string.
563
564 2005-06-25 Kevin Ryde <user42@zip.com.au>
565
566 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
567 last change, use plain copy-on-write substrings, the individual
568 descriptions in the srfi don't mention shared storage (only the
569 introduction does).
570
571 * strings.c (scm_take_locale_stringn): Use realloc to make room for
572 null-terminator, rather than mallocing a whole new block.
573 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
574
575 2005-06-12 Marius Vollmer <mvo@zagadka.de>
576
577 * ramap.c (scm_array_index_map_x): First test for real arrays,
578 then check for generalized vectors. This ensures that the
579 generalized vector case need only work with zero-origin ranges.
580 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
581 to access the target array, making these functions work with all
582 kinds of arrays, not just bit arrays.
583
584 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
585 gh_list.c, gh_predicates.c: Deprecated everything.
586
587 * environments.c (environment_default_folder,
588 environment_default_observer): Do not use gh_call3, gh_call1.
589
590 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
591
592 * modules.c (s_scm_eval_closure_module): new function. Return the
593 module inside an eval-closure.
594
595 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
596 table. This means that procedure properties are GC'd if the
597 procedure dies.
598
599 2005-06-11 Kevin Ryde <user42@zip.com.au>
600
601 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
602 charset cases, count chars kept and build a string in a second pass,
603 rather than using a cons cell for every char kept. Use a shared
604 substring when nothing removed (such sharing is allowed by the srfi).
605
606 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
607
608 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
609 string, so live object stats can be sorted with string<?.
610
611 2005-06-06 Marius Vollmer <mvo@zagadka.de>
612
613 * print.c (iprin1): When writing a string, collect all characters
614 that can be printed directly into one call to scm_lfwrite.
615 Previously, every character was output with its own call to
616 write(2) on unbuffered ports.
617
618 * eval.c (scm_eval_options_interface): Use
619 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
620 and SCM_CRITICAL_SECTION_END.
621
622 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
623 check for generalized vectors. This ensures that the generalized
624 vector case need only work with zero-origin ranges.
625
626 2005-06-06 Kevin Ryde <user42@zip.com.au>
627
628 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
629 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
630 matched.
631
632 2005-06-05 Marius Vollmer <mvo@zagadka.de>
633
634 * eval.c: Added comment on how to make case 1.1 of
635 r5rs_pitfall.test succeed.
636
637 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
638
639 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
640
641 * socket.c: Remove obsolete comment about socklen_t.
642 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
643
644 * numbers.h (isnan)[__MINGW32__]: Remove.
645
646 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
647 DEFAULT_INCLUDES when cross compiling.
648
649 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
650
651 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
652 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
653 from Jan's patch.)
654
655 2005-05-22 Marius Vollmer <mvo@zagadka.de>
656
657 * unif.c (scm_make_shared_array): Add old base to new base since
658 scm_array_handle_pos does not include the base.
659 (scm_aind): Likewise.
660
661 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
662 output port.
663
664 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
665
666 Mac OS X compile warning fixes, reported by Richard Todd.
667
668 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
669 that it is signed.
670
671 * strports.c (st_resize_port): Add unsigned char cast.
672 (scm_mkstrport): Make read/write_buf cast unsigned.
673
674 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
675
676 * rdelim.c (scm_read_line): Initialize slen.
677
678 * load.c (scm_search_path): Remove weird >=1, and add
679 parentheses to clarify conditions.
680
681 * hash.c (scm_hasher): Add const unsigned char cast.
682
683 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
684
685 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
686
687 Fix C99isms reported by Ludovic Courtès:
688
689 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
690 code.
691
692 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
693 of code.
694
695 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
696 of code.
697 (scm_i_card_statistics): Add block for declarations of tag_as_scm
698 and current.
699
700 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
701
702 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
703 compile warning reported by Werner Scheinast.
704
705 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
706
707 * list.h: remove scm_list()
708
709 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
710 SCM_DEBUG_CELL_ACCESSES
711 (FLUID_NEXT_LOC): idem.
712
713 2005-04-30 Kevin Ryde <user42@zip.com.au>
714
715 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
716 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
717 zero when re==0 and im<0. Reported by Jean Crepeau.
718
719 2005-04-25 Kevin Ryde <user42@zip.com.au>
720
721 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
722 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
723 few sensible uses (like filling with a random number generator say),
724 but has been allowed in the past and so should be kept.
725
726 2005-04-23 Kevin Ryde <user42@zip.com.au>
727
728 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
729 scm_hash_fn_remove_x.
730
731 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
732 the caller when cons* is reached through apply.
733
734 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
735 list is called using apply, under the debugging evaluator.
736 (scm_list): Remove.
737
738 * list.c, list.h (scm_make_list): New code, moving make-list from
739 boot-9.scm.
740
741 2005-04-14 Kevin Ryde <user42@zip.com.au>
742
743 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
744 converted from scheme code in boot-9.scm.
745
746 2005-04-11 Kevin Ryde <user42@zip.com.au>
747
748 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
749 Validate list argument, scm_string_append and scm_string_append_shared
750 don't do that to their rest argument (in a normal build).
751
752 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
753
754 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
755 closure can not be stored since it is no longer valid at GC time.
756 (make_hash_table): Initialize 'hash_fn' field.
757 (scm_i_rehash): Only store hash_fn in hash table when closre is
758 NULL.
759 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
760 non-NULL. Always use a NULL closure.
761 (scm_hash_fn_create_handle_x): Also rehash when table contains too
762 few entries.
763
764 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
765
766 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
767 argument; always use scm_delq_x. The delete_fn function works on
768 the handle, not the key, and it therefore makes no sense to make
769 it configurable. Changed all callers.
770 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
771 (scm_hash_clear): Accept plain vectors as hashtables.
772 (scm_delx_x): Removed.
773
774 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
775
776 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
777 compatibility with gcc -std=c99.
778
779 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
780
781 * async.h (scm_mask_ints): Removed left over reference to
782 scm_root.
783
784 * threads.c: Removed fprintf debug statements.
785
786 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
787
788 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
789
790 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
791
792 * debug.c (scm_make_memoized): Remove unnecessary critical
793 section, and simplify by using SCM_RETURN_NEWSMOB.
794
795 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
796
797 * strings.h (SCM_STRING_UCHARS): Added missing argument.
798
799 2005-03-18 Kevin Ryde <user42@zip.com.au>
800
801 * arbiters.c (FETCH_STORE) [generic C]: Should be
802 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
803
804 2005-03-13 Kevin Ryde <user42@zip.com.au>
805
806 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
807 srfi-60.
808
809 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
810 because OR-ing bits into a negative can reduce the value to an inum.
811
812 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
813 casting inum to double since that can lose precision.
814
815 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
816
817 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
818 (guilify_self_1): Initialize it.
819
820 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
821 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
822 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
823 field.
824 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
825 recursively.
826 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
827 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
828 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
829 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
830 scm_after_gc_c_hook here.
831 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
832 scm_after_gc_c_hook when a full GC has in fact been performed.
833 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
834
835 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
836 scm_gc_heap_lock.
837
838 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
839 scm_gc_running_p while the scm_i_sweep_mutex is locked.
840
841 * inline.h (scm_cell, scm_double_cell): Do not check
842 scm_gc_running_p, allocation during sweeping is OK.
843
844 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
845 not set scm_block_gc.
846
847 * init.c (scm_i_init_guile): Do not set scm_block_gc.
848
849 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
850 instead of scm_malloc. The latter can not be used during GC.
851
852 2005-03-09 Marius Vollmer <mvo@zagadka.de>
853
854 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
855 years.
856
857 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
858
859 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
860 scm_gc_running_p. Sweeping can happen in parallel with
861 allocation.
862
863 * inline.h: Updated comments for current threading implementation.
864
865 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
866 (scm_i_thread): Removed unused signal_asyncs field.
867 (threads_mark): Do not mark it.
868 (guilify_self_1): Do not initialize it. Do initialize
869 continuation_root field.
870 (do_thread_exit): Do not remove thread from all_threads list.
871 (on_thread_exit): Do it here, after leaving guile mode.
872 (sleep_level): Removed.
873 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
874 returning. Do not support recursive sleeps.
875 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
876 entry. Do not support recursive sleeps.
877
878 * fluids.c (ensure_state_size, ensure_all_state_sizes,
879 resize_all_states): Collapsed ensure_state_size and
880 ensure_all_state_sizes into one function named resize_all_states.
881 Allocate new vectors outside of single threaded region. Do only
882 simple things inside that region.
883 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
884 while adding to the global lists.
885
886
887 2005-03-08 Marius Vollmer <mvo@zagadka.de>
888
889 libltdl is no longer distributed. We expect it to be installed
890 already.
891
892 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
893 (libguile_la_LIBADD): Removed @LIBLTDL@.
894
895 2005-03-07 Marius Vollmer <mvo@zagadka.de>
896
897 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
898 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
899 they also block/unblock execution of asyncs and call
900 scm_async_click which is declared in async.h but threads.h can not
901 include async.h since async.h already includes threads.h.
902 (scm_i_critical_section_level): New, for checking mistakes in the
903 use of the SCM_CRITICAL_SECTION_* macros.
904 (scm_i_critical_section_mutex): Make it a recursive mutex so that
905 critical sections can be nested.
906
907 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
908 not zero.
909
910 * threads.h, threads.c (scm_frame_lock_mutex): New.
911 (scm_frame_critical_section): Take mutex as argument.
912 (framed_critical_section_mutex): New, used as default for above.
913 (scm_init_threads): Initialize it.
914 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
915 scm_i_critical_section_mutex; both are initialized statically.
916
917 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
918 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
919 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
920 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
921
922 * debug.c (scm_debug_options): Replace
923 SCM_CRITICAL_SECTION_START/END with a frame and
924 scm_frame_critical_section.
925
926 * continuations.c (scm_make_continuation): No longer a critical
927 section.
928 (scm_dynthrow): Abort when scm_i_critical_section_level is
929 not zero.
930
931 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
932
933 * threads.c (scm_try_mutex): Renamed argument for consistency.
934
935 * root.c (scm_call_with_dynamic_root): New docstring.
936
937 * eval.c: Define _GNU_SOURCE.
938
939 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
940
941 Big merge from the mvo-thread-cleanup branch. The main changes
942 are:
943
944 - The dynamic roots functionality has been split into dynamic
945 states and continuations barriers. Fluids have been
946 reimplemented and can now be garbage collected.
947
948 - Initialization of Guile now works in a multi-thread friendly
949 manner. Threads can freely enter and leave guile mode.
950
951 - Blocking on mutexes or condition variables or while selecting
952 can now be reliably interrupted via system asyncs.
953
954 - The low-level threading interface has been removed.
955
956 - Signals are delivered via a pipe to a dedicated 'signal delivery
957 thread'.
958
959 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
960
961 * throw.c (scm_handle_by_message): Exit only the current thread,
962 not the whole process.
963 (scm_handle_by_message_noexit): Exit when catching 'quit.
964
965 * scmsigs.c (take_signal, signal_delivery_thread,
966 start_signal_delivery_thread, ensure_signal_delivery_thread,
967 install_handler): Reimplemented signal delivery as explained in
968 the comments.
969
970 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
971 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
972 scm_i_sched_yield, scm_i_pthread_sigmask,
973 SCM_I_PTHREAD_MUTEX_INITIALIZER,
974 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
975 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
976 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
977 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
978 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
979 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
980 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
981 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
982 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
983 scm_i_pthread_key_create, scm_i_pthread_setspecific,
984 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
985 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
986 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
987 when using pthreads.
988 * null-threads.c, null-threads.h: Provide dummy definitions for
989 the above symbols when not using pthreads.
990
991 * modules.h, modules.c (scm_frame_current_module): New.
992
993 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
994 instead of scm_internal_dynamic_wind.
995
996 * init.h, init.c (restart_stack, start_stack): Removed.
997 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
998 (scm_boot_guile_1): Removed.
999 (scm_i_init_mutex): New.
1000 (really_cleanup_for_exit, cleanup_for_exit): New.
1001 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
1002 Moved around some init funcs. Call
1003 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
1004 with atexit.
1005
1006 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
1007 Use "!scm_is_eq" instead of "!=".
1008
1009 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
1010 SCM_USE_COOP_THREADS): Removed.
1011
1012 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
1013 maintained. Unlock scm_i_sweep_mutex before running
1014 scm_after_gc_c_hook.
1015 (scm_permanent_object): Allocate outside of critical section.
1016 (cleanup): Removed.
1017
1018 * fluids.h, fluids.c: Reimplemented completely.
1019 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
1020 SCM_FAST_FLUID_SET): Reimplemented as functions.
1021 (scm_is_fluid): New.
1022 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
1023 (scm_make_dynamic_state, scm_dynamic_state_p,
1024 scm_is_dynamic_state, scm_current_dynamic_state,
1025 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
1026 scm_c_with_dynamic_state, scm_with_dynamic_state,
1027 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
1028
1029 * feature.c (progargs_fluid): New.
1030 (scm_program_arguments, scm_set_program_arguments): Use it instead
1031 of scm_progargs.
1032 (scm_init_feature): Allocate it. Also, only add "threads" feature
1033 when SCM_USE_PTHREAD_THREADS is true.
1034
1035 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
1036 scm_make_rec_mutex, with all the consequences.
1037 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
1038 scm_internal_dynamic_wind. Handle dynamic states as second
1039 argument.
1040
1041 * threads.h, threads.c (scm_internal_select): Renamed to
1042 scm_std_select and discouraged old name.
1043 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
1044 and scm_std_usleep.
1045 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
1046 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
1047 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
1048 SCM_THREAD_DATA): Removed.
1049 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
1050 (scm_i_thread): New.
1051 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1052 Use scm_assert_smob_type.
1053 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
1054 scm_thread_self, scm_thread_yield, scm_mutex_init,
1055 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
1056 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
1057 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
1058 scm_cond_init, scm_cond_destroy, scm_cond_wait,
1059 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
1060 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
1061 scm_thread_select): Removed. Replaced with scm_i_pthread
1062 functions as appropriate.
1063 (scm_in_guile, scm_outside_guile): Removed.
1064 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
1065 take a ticket.
1066 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
1067 New.
1068 (scm_i_frame_single_threaded): New.
1069 (scm_init_threads_default_dynamic_state): New.
1070 (scm_i_create_thread): Removed.
1071 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
1072 (scm_make_recursive_mutex): New.
1073 (scm_frame_critical_section): New.
1074 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
1075 latter, changed all uses.
1076 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
1077 scm_i_set_last_debug_frame): New, use them instead of scm_root
1078 stuff.
1079 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
1080 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
1081 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
1082 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
1083 (remqueue): Allow the removal of already removed cells. Indicate
1084 whether a real removal has happened.
1085 (scm_thread): Removed, replaced with scm_i_thread.
1086 (make_thread, init_thread_creatant): Removed.
1087 (cur_thread): Removed.
1088 (block_self, unblock_from_queue): New.
1089 (block, timed_block, unblock): Removed.
1090 (guilify_self_1, guilify_self_2, do_thread_exit,
1091 init_thread_key_once, init_thread_key,
1092 scm_i_init_thread_for_guile, get_thread_stack_base,
1093 scm_init_guile): New initialisation method.
1094 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
1095 thread creation.
1096 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
1097 "fair" to fat and implemented new semantics, including reliable
1098 interruption.
1099 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
1100 (scm_threads_mark_stacks): Explicitly mark handle.
1101 (scm_std_select): Allow interruption by also selecting on the
1102 sleep_pipe.
1103 (scm_i_thread_put_to_sleep): Handle recursive requests for
1104 single-threadedness.
1105 (scm_threads_prehistory, scm_init_threads): Put current thread
1106 into guile mode via guileify_self_1 and guileify_self_2,
1107 respectively.
1108
1109 * fluid.h (SCM_FLUIDP): Deprecated.
1110
1111 * coop-threads.c: Removed.
1112
1113 * continuations.h, continuations.c (scm_with_continuation_barrier,
1114 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
1115 New.
1116
1117 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
1118 (async_mutex): New.
1119 (scm_async_click): Protected with async_mutex. Do not deal with
1120 signal_asyncs, which are gone. Set cdr of handled async cell to
1121 #f.
1122 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
1123 current sleep.
1124 (scm_system_async_mark_for_thread): Do not use scm_current_thread
1125 since that might not work during early initialization.
1126
1127 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
1128 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
1129 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
1130 and SCM_CRITICAL_SECTION_END.
1131 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
1132 SCM_CRITICAL_SECTION_START/END.
1133
1134 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
1135 (libguile_la_SOURCES): Added null-threads.c
1136 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
1137 threads-plugin.c.
1138 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
1139
1140 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
1141 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
1142 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
1143 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
1144 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
1145 scm_make_root): Removed or deprecated. Replaced with references
1146 to the current thread, dynamic state, continuation barrier, or
1147 some fluid, as appropriate.
1148 (root_mark, root_print): Removed.
1149 (scm_internal_cwdr): Reimplemented guts with
1150 scm_frame_current_dynamic_state and
1151 scm_i_with_continuation_barrier.
1152 (scm_dynamic_root): Return current continuation barrier.
1153
1154
1155 2005-02-28 Marius Vollmer <mvo@zagadka.de>
1156
1157 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
1158 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
1159 cleanliness.
1160 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
1161 IP_DROP_MEMBERSHIP.
1162 Thanks to Greg Troxel!
1163
1164 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1165
1166 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
1167 block.
1168
1169 2005-02-25 Marius Vollmer <mvo@zagadka.de>
1170
1171 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
1172 so that no two weak alist vectors share a spine.
1173 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
1174 during GC before inserting the new alist cell.
1175
1176 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1177
1178 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
1179 the hashtable.
1180 (scm_hash_fn_create_handle_x): Likewise.
1181 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
1182
1183 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1184
1185 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
1186 the prototypical examples mentioned in the old reference manual.
1187 Instead keep the old semantics of dispatching on type. (Yes, this
1188 is extremely ugly, but the whole point of keeping the deprecated
1189 interface is not to break old code.)
1190
1191 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1192
1193 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
1194 scm_i_array_dims.
1195
1196 2005-01-28 Kevin Ryde <user42@zip.com.au>
1197
1198 * numbers.c (scm_ash): Rewrite using shifts, much faster than
1199 integer-expt and multiply/divide. Inexacts and fractions no longer
1200 supported (they happened to work before for left shifts, but not
1201 right). Don't really need inexacts and fractions, since ash is
1202 documented as a "bitwise operation", and all the rest of those only
1203 take exact integers.
1204
1205 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
1206
1207 * gc-card.c (scm_i_card_statistics): map structs, closures and
1208 subrs to one tag.
1209
1210 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
1211 (tag_table_to_type_alist): ignore unknown types.
1212
1213 * gc-segment.c (scm_i_all_segments_statistics): new function.
1214 (scm_i_heap_segment_statistics): new function
1215
1216 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
1217 statistics on the number of live objects of each type.
1218
1219 * gc-card.c (scm_i_tag_name): new function.
1220 (scm_i_card_statistics): new function.
1221
1222 2005-01-24 Kevin Ryde <user42@zip.com.au>
1223
1224 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
1225 POSIX and C99 don't document errno being set. Reported by Bruno
1226 Haible.
1227 (scm_flock): Update docstring from manual.
1228
1229 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
1230 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
1231 a 64-bit system.
1232
1233 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
1234 sa_handler, needs to be a long on 64-bit systems where int is only 32
1235 bits.
1236
1237 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1238
1239 * environments.c (obarray_enter, obarray_replace): Call
1240 SCM_HASHTABLE_INCREMENT when adding a new entry.
1241
1242 * objects.c: Include goops.h for the scm_class_of prototype.
1243
1244 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
1245 sizes to be smaller than the maximum lengths of vectors.
1246
1247 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1248
1249 * ports.c, smob.c: Include "libguile/goops.h".
1250
1251 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
1252 scm_class_char, scm_class_pair, scm_class_procedure,
1253 scm_class_string, scm_class_symbol,
1254 scm_class_procedure_with_setter, scm_class_primitive_generic,
1255 scm_class_vector, scm_class_null, scm_class_real,
1256 scm_class_complex, scm_class_integer, scm_class_fraction,
1257 scm_class_unknown, scm_port_class, scm_smob_class,
1258 scm_no_applicable_method, scm_class_of): Moved from objects to
1259 goops since they are only useable once goops has been loaded.
1260 (scm_classes_initialized): Removed.
1261 (scm_class_of): Do not check it.
1262 (create_standard_classes): Do not set it.
1263
1264 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1265
1266 * objects.h, objects.c (scm_classes_initialized): New.
1267 (scm_class_of): Signal error when scm_classes_initialized is zero.
1268 * goops.c (create_standard_classes): Set scm_classes_initialized
1269 to one.
1270
1271 * random.c (scm_random_solid_sphere_x): Use
1272 scm_c_generalized_vector_length instead of
1273 scm_uniform_vector_length.
1274
1275 2005-01-16 Marius Vollmer <mvo@zagadka.de>
1276
1277 * script.c (scm_compile_shell_switches): Removed debugging output.
1278
1279 2005-01-15 Kevin Ryde <user42@zip.com.au>
1280
1281 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
1282 docstrings from manual.
1283 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
1284
1285 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1286
1287 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
1288 its value.
1289
1290 Implement u64 and s64 uniform numeric vectors with bignums when
1291 scm_t_uint64 and scm_t_int64 are not available.
1292
1293 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
1294 scm_array_handle_u64_elements,
1295 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
1296 scm_u64vector_writable_elements): Do not define when scm_t_uint64
1297 is not available.
1298 (scm_take_s64vector, scm_array_handle_s64_elements,
1299 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
1300 scm_s64vector_writable_elements): Likewise for scm_t_int64.
1301 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
1302 scm_t_int64/scm_t_uint64 are not available.
1303 (uvec_mark): New, to mark the bignums.
1304 (alloc_uvec): Initialize bignums.
1305 (uvec_fast_ref): Return bignums directly.
1306 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
1307 assert_exact_integer): New.
1308 (uvec_fast_set): Use them to validate the bignums.
1309 (scm_init_srfi_4): Set mark function of smob when needed.
1310 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
1311 scm_int64_max.
1312
1313 Recognize 1.4 -e syntax.
1314
1315 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
1316 (scm_compile_shell_switches): Use them to recognize and convert
1317 1.4 "-e" syntax.
1318
1319 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1320
1321 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
1322 deprecated features that once were macros but are now functions
1323 back into macros.
1324
1325 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1326
1327 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
1328 * deprecation.c (scm_issue_deprecation_warning,
1329 scm_c_issue_deprecation_warning_fmt): Use it.
1330 (mode): Removed.
1331 (print_summary): New.
1332 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
1333 mode.
1334
1335 Deprecated SCM_ARRAY* macros.
1336
1337 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
1338 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
1339 version. Changed all uses.
1340 (scm_tc16_array, scm_i_tc16_array,
1341 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
1342 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
1343 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
1344 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
1345 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
1346 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
1347 SCM_ARRAY_V, SCM_I_ARRAY_V,
1348 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
1349 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
1350 scm_t_array, scm_i_t_array): Likewise.
1351 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
1352 Moved from unif.h to unif.c.
1353 (scm_c_array_rank): New.
1354 (scm_array_rank): Reimplement using it.
1355
1356 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
1357 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
1358 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
1359
1360 2005-01-11 Marius Vollmer <mvo@zagadka.de>
1361
1362 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
1363 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
1364 scm_c_generalized_vector_ref and scm_cvref, and
1365 scm_c_generalized_vector_set_x, respectively.
1366 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
1367 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
1368
1369 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
1370 former to latter and made public. Changed all uses.
1371 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
1372 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
1373 (scm_i_shap2ra): New internal version of scm_shap2ra.
1374 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
1375 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
1376 (scm_ra_set_contp): Deprecated, changed all uses to
1377 scm_i_ra_set_contp.
1378 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
1379
1380 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1381
1382 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
1383 Trotts!
1384
1385 * unif.c (scm_list_to_typed_array): Allow the specification of the
1386 upper bound as well. This is needed for empty arrays.
1387 (l2ra): Give needed number of elements in error message.
1388 (scm_i_print_array): Print length information for arrays that need
1389 it.
1390 (scm_i_read_array): Parse it.
1391
1392 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
1393 scm_i_object_chars, scm_i_object_length): Brought back from the
1394 dead.
1395
1396 2005-01-10 Marius Vollmer <mvo@zagadka.de>
1397
1398 * ramap.c: Replaced single-index uses of scm_array_set_x with
1399 scm_c_generalized_vector_set_x.
1400
1401 * unif.c (scm_array_rank, scm_array_dimensions,
1402 scm_shared_array_offset, scm_shared_array_increments,
1403 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
1404 to simplify code and make it more general.
1405 (scm_shared_array_root): Work with all kinds of arrays, including
1406 naked vectors.
1407 (indices_to_pos): New.
1408 (scm_make_shared_array): Use it instead of scm_aind; use handle
1409 for oldra.
1410
1411 2005-01-10 Kevin Ryde <user42@zip.com.au>
1412
1413 * posix.c (scm_mkstemp): Update docstring from manual.
1414
1415 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
1416
1417 2005-01-09 Marius Vollmer <mvo@zagadka.de>
1418
1419 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
1420 scm_i_uniform_vector_set_proc): New.
1421 (u8ref, u8set, s8ref, s8set, etc): New.
1422 (uvec_reffers, uvec_setters): New.
1423 (uvec_to_list): Use generic scm_array_handle_ref instead of
1424 uvec_fast_ref since scm_array_handle_ref should be faster now.
1425 (coerce_to_uvec, scm_c_uniform_vector_ref,
1426 scm_c_uniform_vector_set_x): Likewise.
1427
1428 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
1429 New.
1430 (scm_t_array_handle): Added ref, set, elements and
1431 writable_elements for fast inline operation of
1432 scm_array_handle_ref and scm_array_handle_set.
1433 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
1434 and replaced with inline code that simply calls the ref/set
1435 members of the handle.
1436 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
1437 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
1438 New.
1439 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
1440 and memoize_set.
1441 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
1442 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1443 scm_bit_invert_x): Correctly multiply index with increment in the
1444 general case.
1445
1446 * unif.c (scm_array_handle_set): Correctly execute only one
1447 alternative. D'Oh!
1448 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
1449 the array; this covers all cases with much simpler code.
1450
1451 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
1452 as well.
1453
1454 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1455
1456 * srfi-4.c (uvec_type): New.
1457 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
1458 scm_c_uniform_vector_x): Use it to get concrete type.
1459
1460 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
1461 fit the docs.
1462
1463 * unif.c (ra2l): Handle zero rank arrays.
1464 (scm_i_print_array): Print zero rank arrays specially.
1465 (tag_to_type): Return #t for an empty tag, not the empty symbol.
1466 (scm_i_read_array): Allow zero rank arrays.
1467
1468 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1469
1470 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
1471 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
1472 and SCM_SET_HASHTAB_BUCKET.
1473
1474 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
1475 Removed ref_stack field.
1476 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
1477 of a print state. Use them everywhere instead of ref_stack.
1478
1479 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
1480
1481 * srfi-4.c: Include deprecation.h.
1482
1483 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
1484 deprecated.c, eq.c
1485 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
1486 (scm_vector_elements, scm_vector_writable_elements,
1487 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
1488 unif.[hc].
1489 (SCM_SIMPLE_VECTOR_LOC): Removed.
1490 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
1491 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
1492 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
1493 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
1494 latter. Changed use in eq.c.
1495
1496 2005-01-07 Marius Vollmer <mvo@zagadka.de>
1497
1498 Make the uniform vector routines also deal with one dimensional
1499 arrays.
1500
1501 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
1502 SCM_SMOB_PREDICATE in this file.
1503 (is_uvec): Also recognize one-dimensional uniform numeric arrays
1504 of the right type.
1505 (scm_is_uniform_vector): Likewise.
1506 (uvec_fast_ref): Made BASE param const.
1507 (uvec_writable_elements, uvec_elements): New.
1508 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
1509 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
1510 scm_c_uniform_set_x): Use them to also deal with one-dimensional
1511 arrays.
1512 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
1513 argument convention.
1514 (scm_uniform_vector_to_list): Let uvec_to_list do all the
1515 checking.
1516 (scm_uniform_vector_length): Use uvec_length.
1517
1518 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1519
1520 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
1521 scm_c_uniform_vector_size): Removed.
1522 (scm_array_handle_uniform_element_size): New.
1523
1524
1525 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
1526 type of POS parameter to be signed, positions can be negative.
1527 (scm_array_handle_release): New, changed all uses of
1528 scm_t_array_handle to properly call it.
1529 (scm_vector_get_handle, scm_generalized_vector_get_handle):
1530 Renamed former to latter, changed all uses.
1531
1532 2005-01-05 Marius Vollmer <mvo@zagadka.de>
1533
1534 Updated bitvector routines to also use scm_t_array_handles.
1535
1536 * unif.h (scm_bitvector_elements,
1537 scm_bitvector_writable_elements): Use a scm_t_array_handle and
1538 deliver offset, length and increment to caller. Changed all uses.
1539 (scm_bitvector_release_elements,
1540 scm_frame_bitvector_release_elements,
1541 scm_bitvector_release_writable_elements,
1542 scm_frame_bitvector_release_writable_elements): Removed.
1543 (scm_array_handle_bit_elements,
1544 scm_array_handle_bit_writable_elements,
1545 scm_array_handle_bit_elements_offset): New.
1546 (scm_make_typed_array): The special value for non-initialized
1547 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
1548 was a valid value to fill bitvectors with, so it can't really be
1549 specialed out.
1550
1551 2005-01-04 Kevin Ryde <user42@zip.com.au>
1552
1553 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
1554 Reported by Bill Schottstaedt.
1555
1556 2005-01-02 Marius Vollmer <mvo@zagadka.de>
1557
1558 * sort.c (quicksort): Added INC parameter for non-contigous
1559 vectors.
1560 (quicksort1): New, for contigous vectors. Both functions are
1561 generated from the same code by including "quicksort.i.c".
1562 (scm_restricted_vector_sort_x): Call one of quicksort and
1563 quicksort1, depending on increment of vector.
1564 (scm_sort): Simply call scm_sort_x on a copy of the list or
1565 vector.
1566 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
1567 size_t, added inc parameter.
1568 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
1569 so that it doesn't leak.
1570 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
1571 list or vector.
1572
1573 * ramap.c (scm_array_map_x): Do not try to convert fill value
1574 before filling, any necessary conversion is done while storing.
1575
1576 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1577 doing it inline.
1578
1579 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1580 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1581 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1582
1583 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1584 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1585 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1586 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1587 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1588 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1589 vector elements API or simple vector API, as appropriate. Removed
1590 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1591 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1592
1593 * srfi-4.h, srfi-4.c,
1594 srfi-4.i.c (scm_array_handle_uniform_elements,
1595 scm_array_handle_uniform_writable_elements,
1596 scm_uniform_vector_elements,
1597 scm_uniform_vector_writable_elements):
1598 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1599 scm_t_array_handle, deliver length and increment.
1600 (scm_array_handle_<foo>_elements,
1601 scm_array_handle_<foo>_writable_elements): New.
1602
1603 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1604 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1605
1606 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1607 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1608 scm_array_handle_set, scm_array_handle_elements
1609 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1610 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1611 scm_dimensions_to_uniform_array): Deprecated for real.
1612 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1613 snarfing wont allow a mismatch between C and Scheme arglists.
1614 (scm_make_shared_array, scm_enclose_array): Correctly use
1615 scm_c_generalized_vector_length instead of
1616 scm_uniform_vector_length.
1617
1618 * validate.h (SCM_VALIDATE_VECTOR,
1619 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1620 of SCM_VECTORP.
1621
1622 * weaks.h, weaks.c: Use new internal weak vector API from
1623 vectors.h.
1624
1625 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1626 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1627 'extra' to being regular sources.
1628 (noinst_HEADERS): Added quicksort.i.c.
1629 * quicksort.i.c: New file.
1630
1631 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1632 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1633 and reimplemented. Replaced all uses with scm_vector_elements,
1634 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1635 appropriate.
1636 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1637 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1638 SCM_SIMPLE_VECTOR_LOC): New.
1639 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1640 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1641 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1642 Removed.
1643 (scm_vector_copy): New.
1644 (scm_vector_elements, scm_vector_writable_elements): Use
1645 scm_t_array_handle, deliver length and increment. Moved to
1646 unif.h. Changed all uses.
1647 (scm_vector_release_elements,
1648 scm_vector_release_writable_elements,
1649 (scm_frame_vector_release_elements,
1650 scm_frame_vector_release_writable_elements): Removed.
1651 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1652 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1653 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1654 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1655 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1656 weak vectors.
1657
1658 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1659
1660 No longer use creators to specify the type of an array. Creators
1661 expose the fact that arrays are wrapped around vectors, but that
1662 might change.
1663
1664 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1665 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1666 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1667 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1668 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1669 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1670 uvec_proc_vars): Removed.
1671 (scm_i_generalized_vector_creator): Removed.
1672 (scm_i_generalized_vector_type): New.
1673
1674 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1675 scm_make_typed_array, scm_array_type, scm_list_to_array,
1676 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1677 (scm_array_creator): Removed.
1678 (scm_array_p): Deprecated second PROT argument.
1679 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1680 Deprecated, reimplemented in terms of scm_make_typed_array and
1681 scm_list_to_typed_array.
1682 (scm_i_proc_make_vector, scm_i_proc_make_string,
1683 scm_i_proc_make_bitvector): Removed.
1684 (type_creator_table, init_type_creator_table, type_to_creator,
1685 make_typed_vector): New.
1686 (scm_i_convert_old_prototype): Removed.
1687 (prototype_to_type): New.
1688 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1689 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1690 minor added clarity.
1691 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1692 instead of scm_make_uve.
1693 (tag_creator_table, scm_i_tag_to_creator): Removed.
1694 (tag_to_type): New.
1695 (scm_i_read_array): Use scm_list_to_typed_array instead of
1696 scm_list_to_uniform_array.
1697
1698 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1699
1700 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1701 (scm_bitvector_writable_elements): New.
1702 (scm_bitvector_release, scm_bitvector_release_elements):
1703 Renamed former to latter. Added explicit call to
1704 scm_remember_upto_here_1.
1705 (scm_frame_bitvector_release,
1706 scm_frame_bitvector_release_elements): Renamed former to latter.
1707 (scm_bitvector_release_writable_elements,
1708 scm_bitvector_release_writable_elements): New.
1709 Changed all uses as required by the changes above.
1710
1711 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1712 scm_u8vector_elements, etc): Made return value "const".
1713 (scm_uniform_vector_writable_elements,
1714 scm_u8vector_writable_elements, etc): New.
1715 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1716 Renamed former to latter. Added explicit call to
1717 scm_remember_upto_here_1.
1718 (scm_frame_uniform_vector_release,
1719 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1720 (scm_uniform_vector_release_writable_elements,
1721 scm_frame_uniform_vector_release_writable_elements): New. Takes
1722 crown of longest identifier yet.
1723 Changed all uses as required by the changes above.
1724
1725 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1726 void.
1727 (scm_is_vector, scm_vector_p, scm_vector_length,
1728 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1729 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1730 scm_vector_move_left_x, scm_vector_move_right_x,
1731 scm_vector_fill_x): handle one-dimensional arrays.
1732 (scm_vector_elements, scm_vector_release_elements,
1733 scm_vector_frame_release_elements, scm_vector_writable_elements,
1734 scm_vector_release_writable_elements,
1735 scm_vector_frame_release_writable_elements): New.
1736 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1737 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1738
1739 * ramap.c (scm_ramapc, scm_raeql): Use
1740 scm_c_generalized_vector_length instead of
1741 scm_uniform_vector_length.
1742 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1743 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1744
1745 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1746
1747 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1748 member for relocating debug frames.
1749 (scm_make_continuation): Set it.
1750
1751 * stacks.c (read_frame, read_frames, scm_make_stack,
1752 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1753 of continuations instead of calculating the offset ourselves.
1754 Relocate 'vect' member of scm_t_debug_frame.
1755
1756 2004-12-16 Kevin Ryde <user42@zip.com.au>
1757
1758 * ramap.c (scm_array_map_x): Check for at least one source argument.
1759
1760 2004-12-14 Kevin Ryde <user42@zip.com.au>
1761
1762 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1763 the C code so for the final call to the predicate procedure is a tail
1764 call, per SRFI-13 spec.
1765
1766 2004-12-10 Kevin Ryde <user42@zip.com.au>
1767
1768 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1769 recent revision to the reference manual.
1770
1771 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1772 with "%", C99 says it's well-defined.
1773
1774 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1775 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1776 bother trying to fit scm_from_ulong, not really worth the trouble if
1777 addresses are more than 4 bytes usually.
1778
1779 2004-11-30 Kevin Ryde <user42@zip.com.au>
1780
1781 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1782 arm32. Reported by Greg Troxel.
1783
1784 2004-11-14 mvo <mvo@zagadka.de>
1785
1786 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1787
1788 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1789
1790 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1791
1792 Enclosed arrays are now their own smob. This has been done to
1793 make the code more explicit about them and to prepare for the time
1794 when generalized vectors include arbitrary one-dimensional
1795 arrays. (Uptonow, enclosed arrays have been recognized by their
1796 use of an array as their storage 'vector'. When all generalized
1797 vectors are allowed as storage, including one-dimensional arrays,
1798 this will no longer work.)
1799
1800 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1801 New.
1802 (exactly_one_third, singp): Removed.
1803 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1804 scm_shared_array_offset, scm_shared_array_increments): Handle
1805 enclosed arrays explicitely.
1806 (scm_array_rank): Likewise. Also, do not return zero for
1807 non-arrays, signal an error instead since arrays with rank zero do
1808 exist.
1809 (scm_i_make_ra): New, for specifying the tag of the new array.
1810 (scm_make_enclosed_array): Use it.
1811 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1812 (scm_make_shared_array): Use scm_c_generalized_vector_length
1813 instead of scm_uniform_vector_length.
1814 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1815 (scm_i_cvref): New, doing the job of scm_cvref.
1816 (scm_cvref): Use scm_i_cvref.
1817 (scm_array_ref): Do not accept non-arrays when no indices are
1818 given. Use scm_i_cvref to do the actual access.
1819 ("uniform-array-set1"): Do not register.
1820 (scm_array_set_x, scm_uniform_array_read_x,
1821 scm_uniform_array_write): Handle enclosed arrays explicitly.
1822 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1823 handle enclosed arrays.
1824 (scm_array_to_list): Handle enclosed arrays explicitly.
1825 (rapr1): Removed.
1826 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1827 enclosed arrays.
1828 (scm_i_print_enclosed_array): New.
1829 (tag_proto_table, tag_creator_table): Renamed former to latter.
1830 Added "a" and "b" for strings and bitvectors, resp.
1831 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1832 latter. Tag "a" is in the table now, no need to handle it as a
1833 legacy tag.
1834 (scm_raprin1): Just call scm_iprin1.
1835 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1836 explicitly.
1837 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1838 Use scm_i_print_array as printer for scm_tc16_array.
1839
1840 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1841
1842 * ramap.c (cind): Changed second arg to be pointer to long instead
1843 of uniform vector.
1844 (scm_ramapc): Allocate index vector with scm_malloc and not as
1845 uniform vector. Wrap it in a frame so that it gets properly freed.
1846 (scm_array_index_map_x): Likewise.
1847
1848 * unif.c: Changed all uses of scm_array_prototype to
1849 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1850 prototype is known.
1851 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1852 in terms of scm_uniform_vector_read_x and
1853 scm_uniform_vector_write, respectively. Strings and
1854 bitvector support has been dropped.
1855
1856 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1857 needed files directly. Include config.h, <unistd.h> and <io.h>
1858 when available.
1859 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1860
1861 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1862
1863 * gh_data.c (gh_uniform_vector_length): Properly use
1864 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1865
1866 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1867
1868 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1869 New.
1870 (scm_i_uniform_vector_creator): Removed.
1871 (scm_i_generalized_vector_creator): New.
1872 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1873 handle generalized vectors, only uniform numeric vectors.
1874 (alloc_uvec): Do length check here...
1875 (make_uvec): ...but not here.
1876 (coerce_to_uvec): Use new generalized vector functions to handle
1877 all kinds of vectors in one go.
1878
1879 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1880 remaining scm_tc7_unused tags to get a neatly ordered list.
1881
1882 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1883 longer handle scm_tc7_bvect bitvectors.
1884
1885 * ramap.c: Use the new generalized vector functions to handle all
1886 vector like things.
1887
1888 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1889 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1890 scm_generalized_vector_length, scm_generalized_vector_ref,
1891 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1892 scm_is_generalized_vector, scm_c_generalized_vector_length,
1893 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1894 New.
1895
1896 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1897 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1898 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1899 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1900 scm_c_bitvector_length, scm_c_bitvector_ref,
1901 scm_c_bitvector_set_x, scm_bitvector_elements,
1902 scm_bitvector_release, scm_frame_bitvector_release,
1903 scm_tc16_bitvector, bitvector_free, bitvector_print,
1904 bitvector_equalp, count_ones, find_first_one): New.
1905 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1906 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1907 using the new C API for bitvectors and maybe count_ones or
1908 find_first_one, as appropriate.
1909 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1910 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1911 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1912 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1913 new functions from above.
1914 (scm_i_proc_make_vector, scm_i_proc_make_string,
1915 scm_i_proc_make_bitvector): Made non-static for use in
1916 scm_i_generalized_vector_creator.
1917 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1918 (scm_make_uve): Validate that the created object is a generalized
1919 vector.
1920 (scm_i_legacy_tag): Removed.
1921 (scm_i_print_array): Do it here.
1922 (scm_raprin1): Only print enclosed arrays.
1923
1924 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1925
1926 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1927
1928 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1929 added portability.
1930
1931 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1932 for "space". Thanks to Bruce Korb!
1933
1934 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1935 only after dest has been set. Thanks to Hyper Division!
1936
1937 * gh_data.c (gh_uniform_vector_length): Use
1938 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1939
1940 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1941
1942 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1943 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1944 SCM_SET_UVECTOR_LENGTH): Removed.
1945
1946 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1947
1948 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1949 Thanks!
1950
1951 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1952 first and the second line of the SCM_DEFINE macro call, since old
1953 preprocessors cannot handle definitions that are split into two
1954 lines.
1955
1956 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1957 declarations.
1958
1959 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1960 scm_t_uint32 to fix the mismatch between the function declaration
1961 and definition.
1962
1963 * sort.c (quicksort): Don't use C99 variable declarations.
1964
1965 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1966 SCM_BOOL_F if no type matches.
1967
1968 * threads.c (thread_print): Cast a pointer to size_t when printing
1969 with scm_uintprint.
1970
1971 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1972 defined.
1973 (scm_array_prototype): Deprecated.
1974
1975 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1976
1977 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1978 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1979 more efficient access to the u32vector.
1980
1981 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1982 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1983 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1984
1985 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1986 instead of the old-style dvectors.
1987
1988 * gh_data.c: Use new-style uniform arrays in place of old-style
1989 ones.
1990
1991 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1992 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1993
1994 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1995 instead of old-sytle uvectors.
1996
1997 * convert.c, convert.i.c: Rewritten completely, using
1998 scm_any_to_u8vector, etc and other new-style uniform vector
1999 functions.
2000
2001 * random.c (scm_random_solid_sphere_x,
2002 scm_random_hollow_sphere_x): Do not validate vector argument, this
2003 is already done elsewhere.
2004
2005 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
2006 scm_any_to_u8vector, etc): New.
2007 (scm_uniform_element_size, scm_uniform_vector_length): Do no
2008 longer handle old-style uniform vectors.
2009
2010 * read.c (scm_lreadr): Bugfix: include the last bit in the
2011 bit vector.
2012
2013 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2014
2015 * unif.h, unif.c (scm_array_creator): New.
2016 (scm_i_get_old_prototype): New.
2017 (scm_array_prototype): use it to return old-style prototype, never
2018 return creators.
2019 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
2020 arg of SCM_UNDEFINED. The latter is wrong.
2021
2022 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
2023 (make_uve): Removed.
2024 (scm_i_proc_make_vector, scm_i_proc_make_string,
2025 scm_i_proc_make_u1vector): New.
2026 (scm_init_unif): Initialize them.
2027 (scm_i_convert_old_prototype): New.
2028 (scm_make_uve): Use it to get the creator procedure. Removed all
2029 old code that created old-style uniform vectors.
2030 (scm_array_p): Handle generic vectors.
2031 (scm_dimensions_to_uniform_array): Do not fill new array with
2032 prototype when that is a procedure.
2033 (scm_list_to_uniform_array): Also accept a list of lower bounds as
2034 the NDIM argument.
2035 (scm_i_print_array): Print rank for shared or non-zero-origin
2036 vectors.
2037 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
2038 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
2039 which I do not understand yet.
2040 (scm_array_prototype): Explicitely handle generic vectors.
2041
2042 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
2043 (iflo2str): Use icmplx2str for complex numbers.
2044
2045 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
2046 scm_i_uniform_vector_prototype): Removed.
2047 (scm_i_uniform_vector_creator): New.
2048 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
2049 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
2050 Updated all tables and generic functions to support them.
2051 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
2052 (scm_init_srfi_4): Initialize them.
2053
2054 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
2055 sizeof(CTYPE) as explained in the comment.
2056
2057 * read.c (scm_lreadr): Call scm_i_read_array for all characters
2058 following '#' that can start an array. Explicitely disambiguate
2059 'i' and 'e' between introducing numbers and uniform vectors. Do
2060 not call scm_i_read_homogenous_vector, since that is also handled
2061 by scm_i_read_array now.
2062
2063 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2064
2065 First cut at integrating uniform vectors from srfi-4 with the rest
2066 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
2067 vector. The plan is to gradually replace one type after the other
2068 until none is left and then to consider general cleanups and
2069 optimizations.
2070
2071 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
2072
2073 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
2074 scm_uniform_vector_ref, scm_uniform_vector_set_x,
2075 scm_uniform_vector_to_list, scm_is_uniform_vector,
2076 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
2077 scm_uniform_vector_elements, scm_uniform_vector_element_size,
2078 scm_uniform_vector_release): New.
2079 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
2080 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
2081 from unif.h, unif.c and extended to handle both the old and new
2082 uniform vectors.
2083
2084 * tags.h (scm_tc7_byvect): Commented out.
2085
2086 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
2087 the former to the latter.
2088 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
2089 srfi-4.h, srfi-4.c.
2090 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
2091 (scm_array_p, scm_array_rank, scm_array_dimensions,
2092 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
2093 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
2094 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
2095 vectors. Removed code for scm_tc7_byvect.
2096 (scm_dimensions_to_uniform_array): Fill array with 0 when
2097 prototype is #\nul.
2098 (scm_i_print_array_dimension, scm_i_legacy_tag,
2099 scm_i_print_array): New.
2100 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
2101 for scm_tc7_byvect.
2102
2103 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
2104 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
2105 uniform vectors. Removed code for scm_tc7_byvect
2106
2107 * print.c (iprin1): Removed code for scm_tc7_byvect.
2108 * objects.c (scm_class_of): Likewise.
2109 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
2110 * gc-card.c (scm_i_sweep_card): Likewise.
2111 * evalext.c (scm_self_evaluating_p): Likewise.
2112 * eq.c (scm_equal_p): Likewise.
2113
2114 * gh_data.c (gh_chars2byvect): Reimplemented with
2115 scm_make_s8vector.
2116 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
2117
2118 * srfi-4.c (take_uvec): New.
2119 (alloc_uvec): Use it.
2120 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2121
2122 * random.c (vector_scale, vector_scale_x): Renamed former to the
2123 latter, since it modifies its argument.
2124 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
2125 Do not use scm_universal_vector_length for non-uniform vectors.
2126 Use scm_f64vector_elements to access innards of uniform vectors.
2127
2128 * convert.i.c: Convert srfi-4 style uniform vectors when
2129 requested.
2130 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
2131 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
2132
2133 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2134
2135 * numbers.h, numbers.c (scm_i_print_double): New.
2136
2137 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
2138 ../srfi/ but heavily modified.
2139 * Makefile.am: Add them in all the right places.
2140 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
2141 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
2142 '#u', and '#s'.
2143
2144 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
2145 and made non-static. Changed all uses.
2146
2147 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2148
2149 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
2150 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
2151 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
2152 scm_uintprint to print unsigned integers, raw heap words, and
2153 adresses, using a cast to scm_t_bits to turn pointers into
2154 integers.
2155
2156 * unif.c: Include "libguile/print.h".
2157
2158 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
2159 scm_t_intmax values.
2160 (scm_uint2str): New, for scm_t_uintmax.
2161 (scm_iint2str): Argument type changed to scm_t_intmax,
2162 reimplemented in terms of scm_uint2str.
2163
2164 * print.c, print.h (scm_uintprint): New, for printing
2165 scm_t_uintmax values.
2166 (scm_intprint): Argument type changed to scm_t_intmax.
2167
2168 * sort.c (quicksort, scm_merge, scm_merge_list_x,
2169 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
2170 strategic places so that the loops can be interrupted.
2171
2172 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
2173 "-I$(top_srcdir)/libguile-ltdl".
2174 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
2175 "../libguile-ltdl/libguile-ltdl.a".
2176
2177 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
2178 all references to scm_lt_* with just lt_*. Include <ltdl.h>
2179 instead of <libguile-ltdl.h>.
2180
2181 2004-10-20 Marius Vollmer <mvo@zagadka.de>
2182
2183 * sort.c (quicksort): Copy pivot out of the array while
2184 constructing the partitions; it could get overwritten otherwise.
2185 Because of the ultimate insertion sort, this bug did not cause
2186 quicksort to fail, it just put all the burdon on the insertion
2187 sort and was thus very slow. Thanks to Rolan Orre for reporting
2188 the slowness!
2189
2190 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2191
2192 * numbers.c (scm_i_range_error): New.
2193 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
2194 scm_out_of_range.
2195
2196 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
2197 endpos. State inclusiveness/exclusiveness of bounds in docstring.
2198
2199 * unif.c (scm_array_p): When no prototype is given, explicitely
2200 test for allowable types, do not simply return true. Thanks to
2201 Roland Orre for reporting this!
2202
2203 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
2204
2205 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
2206 segment to scm_max_segment_size.
2207
2208 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
2209
2210 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
2211
2212 * inline.h (scm_double_cell): abort if GC running.
2213 (scm_cell): idem.
2214
2215 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2216
2217 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
2218 pos == 0.
2219
2220 Keywords no longer store a 'dash symbol'. Instead, they store a
2221 symbol with their real name.
2222
2223 * keywords.h, keywords.c, deprecated.h, deprecated.c
2224 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
2225 terms of scm_is_keyword and scm_keyword_dash_symbol.
2226
2227 * keywords.h, keywords.c, discouraged.h, discouraged.c
2228 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
2229 scm_c_make_keyword): Discouraged.
2230
2231 * keywords.h, keywords.c (scm_symbol_to_keyword,
2232 scm_keyword_to_symbol): Implemented in C.
2233 (scm_is_keyword, scm_from_locale_keyword,
2234 scm_from_locale_keywordn): New.
2235
2236 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
2237
2238 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
2239 scm_from_locale_keyword instead of scm_c_make_keyword.
2240
2241 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
2242 better error message.
2243
2244 * deprecated.c: Include discouraged.h and keywords.h.
2245
2246 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
2247 reading '#:' or ':'. See NEWS for consequences.
2248
2249 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2250
2251 * read.c (scm_lreadr): Revert change from 2004-09-22: string
2252 literals are now read-write again (until SCM_STRING_CHARS is
2253 removed).
2254
2255 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
2256 strings with an error message that blames SCM_STRING_CHARS.
2257
2258 * options.c (change_option_setting): Use scm_car instead of
2259 explicit type check plus SCM_CAR.
2260
2261 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
2262 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
2263 (scm_iprin1): Use them instead of the previoulsy hardcoded
2264 strings.
2265 (scm_init_print): Initialize them.
2266
2267 * backtrace.c (display_frame_expr): Do not remove control
2268 characters from the final string. Print it directly using
2269 scm_display.
2270
2271 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
2272 Thanks to Roland Orre!
2273
2274 2004-09-29 Kevin Ryde <user42@zip.com.au>
2275
2276 * regex-posix.c (scm_regexp_exec): Correction to last change, should
2277 be whole original string in match struct, not offsetted substring.
2278
2279 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
2280
2281 * gc.c (scm_gc_unprotect_object): abort if called during GC.
2282
2283 2004-09-24 Marius Vollmer <mvo@zagadka.de>
2284
2285 * Makefile.am (EXTRA_DIST): Added gettext.h.
2286
2287 * smob.c, smob.h (scm_assert_smob_type): New.
2288
2289 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
2290 Include GUILE_CFLAGS.
2291 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
2292 now.
2293 (libpath.h): Put GUILE_CFLAGS in the build-info.
2294
2295 2004-09-23 Marius Vollmer <mvo@zagadka.de>
2296
2297 * print.h (scm_print_state): Added highlight_objects.
2298 * print.c (make_print_state, scm_free_print_state): Initialize it
2299 to SCM_EOL.
2300 (scm_iprin1): Wrap output in '{...}' when object is contained in
2301 highlight_objects.
2302
2303 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
2304 scm_backtrace_with_highlights): New. Set highlight_objects of
2305 printstate.
2306
2307 * error.c (scm_error_scm): Document new meaning of data/rest
2308 argument for out-of-range and wrong-type-arg errors.
2309 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
2310 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
2311 exception so that it gets highlighted in the backtrace.
2312 Don't talk about "argument" when not giving a position.
2313
2314 * throw.c (handler_message): The rest argument is the fourth
2315 argument, not everything after the third. Call
2316 scm_display_backtrace_with_highlights, passing the rest argument
2317 when appropriate.
2318
2319 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2320
2321 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
2322 <bruno@clisp.org>:
2323
2324 * i18n.c: Handle --disable-nls (thanks Bruno).
2325
2326 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
2327 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
2328
2329 * i18n.c (scm_i_to_lc_category): New name and export. Support all
2330 LC categories.
2331 * posix.c (scm_setlocale): Use it.
2332
2333 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
2334 scm_bind_textdomain_codeset): Make wrappers similar to C function
2335 they wrap.
2336
2337 * i18n.h: New file.
2338 * i18n.c: New file.
2339 * gettext.h: New file, taken from GNU gettext.
2340 * init.c: Include libguile/i18n.h.
2341 (scm_init_guile_1): Add call to scm_init_i18n().
2342 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
2343 (DOT_X_FILES): Add i18n.x.
2344 (DOT_DOC_FILES): Add i18n.doc.
2345 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
2346 (modinclude_HEADERS): Add i18n.h.
2347
2348 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2349
2350 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
2351
2352 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
2353 discouraged.h. Replaced all uses with scm_is_pair.
2354 (SCM_I_CONSP): New name for SCM_CONSP.
2355
2356 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
2357 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
2358 scm_cadr, etc): New.
2359 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
2360 uses with scm_is_null.
2361
2362 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
2363 instead of explicit code.
2364
2365 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2366
2367 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2368 Reworded logic a bit so that #f is returned immediately when s1 is
2369 too short to contain s2.
2370
2371 * regex-posix.c (scm_regexp_exec): Convert string to
2372 zero-terminated locale string before matching against it.
2373
2374 * strings.h, strings.c (scm_substring_read_only,
2375 scm_c_substring_read_only, scm_i_substring_read_only): New.
2376 (RO_STRING_TAG, IS_RO_STRING): New.
2377 (scm_i_string_writable_chars): Bail on read-only strings.
2378
2379 * read.c (scm_lreadr): use scm_c_substring_read_only for string
2380 literals, thus making them read-only as specified by R5RS.
2381
2382 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2383
2384 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
2385 by testing for smobs before insisting on equal SCM_CELL_TYPES.
2386
2387 2004-09-21 Marius Vollmer <mvo@zagadka.de>
2388
2389 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
2390 numbers.c.
2391 (scm_to_mpz, scm_from_mpz): New.
2392 Thanks to Andreas Vögele!
2393
2394 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
2395 just on a line of its own.
2396
2397 * srfi-13.c (scm_string_any, scm_string_every,
2398 scm_string_tabulate, string_upcase_x, string_down_case_x,
2399 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
2400 size_t instead of int for indices into strings. Make sure that no
2401 over- or underflow occurs. Thanks to Andreas Vögele!
2402 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
2403 indices, which can also be negative.
2404
2405 2004-09-20 Marius Vollmer <mvo@zagadka.de>
2406
2407 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
2408
2409 * threads.c (scm_threads_mark_stacks): Call
2410 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
2411 only used once.
2412
2413 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
2414
2415 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2416 Bugfix: when subtracting unsigned values, make sure that result
2417 does not wrap.
2418
2419 2004-09-09 Kevin Ryde <user42@zip.com.au>
2420
2421 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
2422 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
2423 by Andreas Vögele.
2424
2425 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2426
2427 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
2428
2429 * eq.c (real_eqv): Pretend that all NaNs are equal.
2430
2431 * numbers.c (scm_integer_expt): Do not accept inexact integers.
2432
2433 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2434
2435 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
2436 use size_t for some locals instead of int.
2437
2438 * read.c (scm_flush_ws): Detect "#!"-style comments here.
2439 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
2440 (skip_scsh_block_comment): Use scm_input_error instead of
2441 scm_misc_error in case of EOF.
2442
2443 2004-09-07 Kevin Ryde <user42@zip.com.au>
2444
2445 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
2446 Bug report by Bill Schottstaedt.
2447
2448 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
2449 column.
2450 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
2451
2452 * posix.c (scm_access): Update docstring per manual.
2453
2454 * posix.c (scm_nice): Correction to error detection. Reported by
2455 Matthias Koeppe.
2456
2457 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
2458 throw error before unlocking mutex with SCM_ALLOW_INTS.
2459
2460 2004-09-06 Kevin Ryde <user42@zip.com.au>
2461
2462 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
2463 available. This also gets around CLK_TCK being absent when
2464 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
2465
2466 2004-09-03 Stefan Jahn <stefan@lkcc.org>
2467
2468 * threads.c (scm_threads_mark_stacks): Fixed local variable
2469 definitions.
2470
2471 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
2472 local variable definitions.
2473
2474 * stime.c (_POSIX_C_SOURCE): Do not define this item on
2475 MinGW32 because it conflicts with its pthread headers.
2476 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
2477 (scm_strftime): Using scm_from_locale_string() instead of
2478 scm_makfrom0str().
2479
2480 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
2481 part.
2482
2483 * numbers.c (scm_init_numbers): Removed check_sanity() call
2484 inside GUILE_DEBUG. The function has been removed somewhen...
2485
2486 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
2487 MinGW32 because it conflicts with its pthread headers.
2488
2489 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2490
2491 * strings.c (SCM_STRINGP): Accept all strings.
2492 (SCM_STRING_CHARS): Reject shared substrings here.
2493
2494 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
2495 the Copyright years.
2496
2497 2004-08-27 Kevin Ryde <user42@zip.com.au>
2498
2499 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
2500 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
2501 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
2502
2503 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2504
2505 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
2506 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
2507 scm_i_symbol_is_interned, scm_i_mem2symbol,
2508 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
2509
2510 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2511
2512 * srfi-13.c: First cut at thread-safeness and proper use of
2513 scm_i_string_chars et al. Copious scm_remember_upto_heres have
2514 been inserted. Made sure that no internal string pointer is used
2515 across a SCM_TICK or a possible GC.
2516
2517 * script.c (scm_compile_shell_switches): Use
2518 scm_from_locale_string instead of scm_makfrom0str.
2519
2520 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
2521 always been.
2522
2523 2004-08-25 Marius Vollmer <mvo@zagadka.de>
2524
2525 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
2526 strop.c.
2527
2528 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
2529 * strop.h, strop.c: Removed, they are now empty.
2530 * Makefile.am: Updated for new and removed files.
2531
2532 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
2533 to scm_string_to_symbol.
2534
2535 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
2536 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
2537 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
2538 charset instead of libc functions.
2539
2540 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
2541 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
2542 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
2543 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
2544 instead of explicit code.
2545
2546 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
2547 "srfi-13.h" instead of "strop.h".
2548
2549 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
2550 scm_init_srfi_14. Do not call scm_init_strop.
2551
2552 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2553
2554 * numbers.c (scm_inf_p): Synced docstring back from manual.
2555
2556 2004-08-22 Marius Vollmer <mvo@zagadka.de>
2557
2558 * strings.c (get_str_buf_start): New helper function.
2559 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
2560 scm_i_string_char, scm_i_string_writable_chars): Use it.
2561 (scm_i_substring_copy): Make START argument optional for C
2562 callers, for upcoming SRFI-13 integration.
2563
2564 2004-08-21 Marius Vollmer <mvo@zagadka.de>
2565
2566 From Richard Todd, Thanks!
2567
2568 * script.c (scm_compile_shell_switches): added '-L' switch to add
2569 to the %load-path.
2570
2571 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2572
2573 * eval.c (unmemoize_exprs): When dropping internal body markers
2574 from the output during unmemoization, also drop those that are not
2575 immediately at the beginning of a body.
2576
2577 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2578
2579 * eval.c (scm_lookupcar1): Report "Variable used before given a
2580 value" insetad of an "Unbound" one for variables that are found
2581 but still contain SCM_UNDEFINED.
2582
2583 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2584 expects a null-terminated string in the locale encoding, but
2585 scm_i_string_writable_chars doesn't give that. Fixed by letting
2586 mkstemp modify a locale version of the tmpl argument and copying
2587 the result back into tmpl.
2588
2589 * strop.c (scm_substring_move_x): Store into str2, not str1.
2590
2591 2004-08-20 Kevin Ryde <user42@zip.com.au>
2592
2593 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2594 to modify the input string.
2595
2596 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2597
2598 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2599 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2600 scm_c_symbol_length.
2601
2602 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2603
2604 New string implementation, with copy-on-write strings and
2605 mutation-sharing substrings, and a new internal string API.
2606 Symbols can now share memory with strings.
2607
2608 * tags.h (scm_tc7_stringbuf): New tag.
2609
2610 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2611 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2612 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2613 uses.
2614 (scm_i_make_string, scm_c_make_string): New, to replace
2615 scm_allocate_string. Updated all uses.
2616 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2617 SCM_STRING_LENGTH): Deprecated.
2618 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2619 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2620 Discouraged. Replaced all uses with scm_from_locale_string or
2621 similar, as appropriate.
2622 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2623 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2624 scm_substring_shared, scm_substring_copy): New.
2625
2626 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2627 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2628 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2629 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2630 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2631 Deprecated.
2632 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2633 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2634 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2635 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2636 Updated all uses.
2637 (scm_gensym): Generate only the number suffix in the buffer, just
2638 string-append the prefix.
2639
2640 * error.c (scm_memory_error): Do not try to throw, just abort.
2641 Throwing will not work anyway.
2642
2643 * gh.h, gh-data.c (gh_set_substr): Made src const.
2644
2645 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2646 (scm_mode_bits): Use it.
2647 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2648 a vector normally and fill that instead of consing a list with a
2649 blocked GC.
2650
2651 * read.c (scm_i_casei_streq): New, for counted strings.
2652
2653 * threads.c (gc_section_count): Removed, thread-sleeping can not
2654 be nested.
2655 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2656 admin mutex so that we can be put to sleep by other threads while
2657 blocking on that mutex. Lock all the heap mutex of all threads,
2658 including ourselves.
2659 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2660 call scm_i_enter_guile.
2661 (scm_thread_mark_stacks): Expect all threads to be suspended.
2662
2663 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2664 scm_gc_mallocated, for now.
2665 (scm_init_storage): Initialize it.
2666 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2667
2668 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2669 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2670 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2671 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2672
2673 * strop.c (scm_string_copy): Use scm_c_substring to get a
2674 copy-on-write string.
2675
2676 2004-08-18 Kevin Ryde <user42@zip.com.au>
2677
2678 * arbiters.c (FETCH_STORE): New macro.
2679 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2680 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2681 scm_try_arbiter and scm_release_arbiter.
2682 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2683 for speed on i386, otherwise using mutex.
2684
2685 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2686 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2687 exact and inexact is #f.)
2688
2689 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2690 to get thread safety of scm_ttyname.
2691
2692 * ports.c (ttyname): Remove prototype, unused.
2693
2694 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2695 Reported by Michael Tuexen.
2696
2697 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2698
2699 * load.c (scm_init_load_path): Do not pass NULL to
2700 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2701 not set. Thanks to Bill Schottstaedt.
2702
2703 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2704
2705 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2706 locale strings instead of accessing their internals.
2707 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2708 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2709 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2710
2711 * simpos.c (scm_system): Convert SCM strings to locale strings
2712 instead of accessing their internals.
2713
2714 * script.c (scm_compile_shell_switches): Convert version to locale
2715 string before printing it.
2716
2717 * rdelim.c (scm_read_delimited_x): Avoid
2718 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2719 of scm_from_long for the returned number of read characters.
2720
2721 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2722 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2723
2724 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2725 Use them instead of SCM_SYSCALL when one or two strings need to be
2726 converted into locale strings.
2727 (my_rename): New, gathers platform dependent code for renaming.
2728 (scm_rename): Use it.
2729 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2730 strings instead of accessing their internals.
2731 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2732 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2733 SCM_STRING_LENGTH.
2734
2735 * extensions.c (load_extension): Convert lib and init to locale
2736 strings instead of accessing the internals directly.
2737 (scm_c_load_extension): Use scm_from_locale_string instead of
2738 scm_makfrom0str.
2739
2740 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2741 scm_fdes_to_port, but take mode bits directly instead of as a C
2742 string.
2743 (scm_i_fdes_to_port): Implement using above.
2744 (scm_open_file): Use scm_i_fdes_to_port together with
2745 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2746 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2747 with scm_i_mode_bits to avoid accessing internals of SCM string
2748 from C.
2749
2750 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2751 SCM string as argument.
2752
2753 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2754 bits directly instead of C string.
2755 (scm_void_port): Implement using above.
2756 (scm_sys_make_void_port): Use scm_i_void_port together with
2757 scm_i_mode_bits to avoid accessing internals of SCM string.
2758
2759 * strings.h, strings.c (scm_i_get_substring_spec): New.
2760
2761 * socket.c, rw.c, deprecated.h, validate.h
2762 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2763 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2764 scm_to_locale_string, etc.
2765 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2766 above, plus scm_i_get_substring_spec.
2767
2768 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2769 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2770 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2771 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2772 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2773 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2774 with more explicit scm_remember_upto_here_1, etc, or introduced
2775 them in the first place.
2776
2777 * posix.c (WITH_STRING): New helper macro. Use it where one
2778 locale string is needed for a short piece of code.
2779 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2780 when one locale string is needed.
2781 (scm_mkstemp): Convert tmpl to a locale string.
2782 (scm_putenv): Rewritten to use only C strings.
2783 (scm_setlocale, scm_crpt): Convert argument strings to locale
2784 strings.
2785
2786 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2787
2788 * load.c (scm_primitive_load_path): Do not check for absolute
2789 filenames when scm_sys_search_load_path returns false, which will
2790 return absolute filenames unchanged.
2791
2792 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2793
2794 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2795 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2796 of an alist. Thanks to Matthias Koeppe!
2797
2798 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2799
2800 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2801 Moved from string.h to deprecated.h.
2802
2803 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2804
2805 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2806 SCM_I_MAKE_STRING_TAG, changed all uses.
2807 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2808 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2809 respectively. For a short time, the old names are still there as
2810 aliases. Not all uses have been changed yet, but the ones in
2811 strings.c have.
2812 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2813 SCM_T_BITS_MAX.
2814 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2815 scm_take_locale_string, scm_take_locale_stringn,
2816 scm_to_locale_string, scm_to_locale_stringn,
2817 scm_to_locale_stringbuf): New.
2818 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2819 deprecated.[hc]. Implemented in terms of the new functions above.
2820 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2821 scm_makfrom0str): Reimplemented in terms of the new functions from
2822 above. They will be discouraged shortly.
2823 (scm_substring): Do not use scm_mem2string.
2824 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2825 to replace similar code from posix.c, simpos.c, and dynl.c.
2826 (scm_string_append): Use memcpy instead of explicit loop. Do not
2827 use register keyword. Use plain 'char' instead of 'unsigned
2828 char'.
2829
2830 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2831 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2832
2833 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2834 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2835 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2836 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2837
2838 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2839 string. This avoids a conversion round-trip.
2840
2841 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2842 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2843 SCM_I_STRING_LENGTH, respectively.
2844 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2845
2846 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2847 of a string, call scm_display on the string itself.
2848
2849 * dynwind.c, dynwind.h (scm_frame_free): New.
2850
2851 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2852 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2853 Replaced uses of SCM_STRING_CHARS with proper uses of
2854 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2855 Replaced scm_mem2string with scm_from_locale_string.
2856
2857 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2858 Removed, replaced all uses with scm_i_allocate_string_pointers.
2859
2860 * load.h, load.c (scm_internal_parse_path): Removed.
2861 (scm_parse_path): Use scm_string_split to do the work.
2862 (scm_init_load_path): Use scm_parse_path instead of
2863 scm_internal_parse_path.
2864 (scm_search_path): Rewritten string handling part of the code in
2865 terms of scm_to_locale_stringbuf and so that it is thread safe.
2866
2867 * error.c (scm_error_scm): Throw directly instead of calling
2868 scm_error, this avoids the back and forth conversion of SUBR and
2869 MESSAGE and also plugs a memory leak.
2870 (scm_error): Call scm_error_scm.
2871
2872 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2873 (display_header): Print FNAME when it is true, not
2874 merely when it is a string.
2875
2876 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2877 unceremoniously. They were unused by Guile itself, and external
2878 use should stop immediately.
2879
2880
2881 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2882
2883 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2884 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2885 deprecated versions installed in deprecated.h and deprecated.c.
2886 Changed all uses.
2887
2888 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2889
2890 * net_db.c (scm_resolv_error): don't cause an exception while
2891 trying to throw an exception -- call scm_misc_error with correct
2892 arguments. The previous arguments needed a format escape that
2893 wasn't in any of the format strings.
2894
2895 2004-08-06 Kevin Ryde <user42@zip.com.au>
2896
2897 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2898 so as not to depend on signedness of plain char. For byvect range
2899 check, throw out-of-range rather than wrong-type-arg.
2900
2901 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2902 signed byte range checks by using scm_to_schar and scm_from_schar,
2903 don't want to depend on signedness of C char.
2904
2905 2004-08-05 Kevin Ryde <user42@zip.com.au>
2906
2907 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2908 SCM_DEFER_INTS.
2909 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2910 guaranteed if multiple threads compete to unlock.
2911 Update docstrings per doc/ref/api-scheduling.texi.
2912
2913 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2914 stat on the filename, to be certain a file rename can't mean we get
2915 info on one filesystem object but open another. This fstat usage is
2916 similar to Emacs copy-file.
2917
2918 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2919
2920 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2921 SIGINT and SIGQUIT, since those values are ints.
2922
2923 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2924
2925 * num2integral.i.c, num2float.i.c: Removed.
2926 * Makefile.am (noinst_HEADERS): Updated.
2927
2928 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2929 scm_i_make_ratio and made static, replaced uses with scm_divide.
2930 (scm_complex_p): New, export as "complex?" to Scheme.
2931 (scm_number_p): Export as "number?" to Scheme.
2932 (scm_is_complex, scm_is_number): New.
2933 (scm_c_make_rectangular, scm_c_make_polar): New.
2934 (scm_make_rectangular, scm_make_polar): Use above.
2935 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2936 New.
2937 (scm_make_complex): Discouraged by moving to discouraged.h and
2938 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2939
2940 * discouraged.h, discouraged.c, numbers.c, numbers.h
2941 (scm_is_rational): New.
2942 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2943 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2944 Removed prototypes.
2945 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2946 Discouraged by moving to discouraged.h and discouraged.c.
2947 Replaced all uses with scm_from_double.
2948 (scm_num2float, scm_num2double): Discouraged by moving prototype
2949 to discouraged.h and rewriting in terms of scm_to_double.
2950 Replaced all uses with scm_to_double.
2951 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2952 explicit code.
2953 (scm_from_double): Do not implement in terms of scm_make_real, use
2954 explicit code.
2955
2956 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2957
2958 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2959
2960 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2961 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2962
2963 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2964 Renamed to SCM_I_* in order to avoid collisions with the versions
2965 defined in deprecated.h.
2966
2967 * discouraged.h, discouraged.c: New files.
2968
2969 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2970 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2971 deprecated to being discouraged by moving to discouraged.h.
2972
2973 * numbers.h, numbers.c, discouraged.h, discouraged.c
2974 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2975 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2976 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2977 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2978 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2979 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2980 discouraged.c and reimplementing in terms of scm_from_* and
2981 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2982 functions.
2983
2984 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2985 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2986 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2987 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2988 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2989 explicit code.
2990
2991 2004-08-02 Kevin Ryde <user42@zip.com.au>
2992
2993 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2994 and current usage and migration.
2995
2996 2004-07-31 Kevin Ryde <user42@zip.com.au>
2997
2998 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2999 it's not thread safe.
3000 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
3001 advantage of this.
3002 * fports.c (scm_open_file): Use scm_strerror likewise.
3003 * filesys.c (scm_stat, scm_lstat): Ditto.
3004
3005 * filesys.c (scm_copy_file): Avoid fd leak when destination file
3006 cannot be opened.
3007
3008 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
3009 update, for thread safety.
3010 (gensym_counter): Move into scm_gensym which is its only user.
3011 (scm_init_symbols): No need to explicitly initialize gensym_counter.
3012
3013 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3014
3015 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
3016 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
3017 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
3018 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
3019 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
3020 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
3021 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
3022 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
3023 defined in terms of scm_to_signed_integer, etc, but in terms of
3024 scm_to_int8, etc.
3025
3026 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
3027
3028 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
3029 no longer used.
3030
3031 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
3032 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
3033
3034 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
3035 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
3036 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
3037 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
3038 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
3039 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
3040 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
3041
3042 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
3043 the functions below.
3044
3045 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
3046 conv-uinteger.i.c.
3047
3048 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
3049 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
3050 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
3051 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
3052 scm_from_uint64): Turned from macros into proper functions.
3053 (scm_to_signed_integer, scm_to_unsigned_integer,
3054 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
3055 conv-integer.i.c and conv-uinteger.i.c, as well.
3056
3057 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
3058 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
3059 the limits. Those are always defined.
3060
3061 2004-07-29 Kevin Ryde <user42@zip.com.au>
3062
3063 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
3064
3065 2004-07-28 Kevin Ryde <user42@zip.com.au>
3066
3067 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
3068 safety.
3069
3070 * unif.c (scm_array_set_x): For svect, use scm_num2short for
3071 consistency with other vector types and to get arg and func name into
3072 error message.
3073
3074 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3075
3076 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
3077 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
3078 scm_from_bool, respectively.
3079 (SCM_NINUMP): Added.
3080
3081 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
3082 deprecated.h. Replaced all uses with scm_is_eq.
3083
3084 2004-07-24 Kevin Ryde <user42@zip.com.au>
3085
3086 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
3087 * posix.c (scm_crypt): Use it to protect static data in crypt().
3088
3089 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3090
3091 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
3092 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
3093 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
3094 versions to deprecated.h and deprecated.c. Changed all uses to
3095 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
3096 scm_from_*, as appropriate.
3097
3098 * dynwind.c (scm_i_dowinds): Removed unused code that would call
3099 the unexisting scm_cross_dynwind_binding_scope for inums on the
3100 windlist.
3101
3102 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3103
3104 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
3105 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
3106 byte-wise address to a SCM integer. Changed all uses.
3107 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
3108 scm_to_ipv6 and added type and range checking, for converting from
3109 an IPv& byte-wise address to a SCM integer. Changed all uses.
3110 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
3111 is now done by scm_to_ipv6.
3112
3113 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
3114 not accept inexact integers.
3115
3116 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
3117 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
3118 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
3119 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
3120 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
3121 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
3122 fixnum/bignum distinction visible. Changed all uses to
3123 scm_to_size_t or similar.
3124
3125 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3126
3127 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
3128
3129 2004-07-10 Kevin Ryde <user42@zip.com.au>
3130
3131 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
3132 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
3133 such a size causes divide-by-zeros in scm_hasher.
3134
3135 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
3136 leak.
3137
3138 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3139
3140 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
3141 Rewritten using the same logic as scm_to_signed_integer and
3142 scm_to_unsigned_integer, respectively, which is better(tm). Also,
3143 use CHAR_BIT instead of hardcoding 8.
3144 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
3145 SCM_I_LLONG_MIN etc. instead.
3146
3147 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
3148 SCM_I_MAKINUM and changed all uses.
3149 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
3150
3151 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
3152 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
3153 them by assuming twos-complement.
3154
3155 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3156
3157 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
3158 configure now produces.
3159 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
3160 definitions, giving the limits of the integer types defined by
3161 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
3162 LLONG_MIN or LONG_LONG_MIN is hard to get at.
3163
3164 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
3165 SHORT_MIN.
3166 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
3167 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
3168 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
3169 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
3170 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
3171 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
3172 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
3173 scm_from_uintmax): New.
3174
3175 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3176
3177 * tags.h (scm_is_eq): New.
3178
3179 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
3180 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
3181 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
3182 scm_from_bool, and scm_is_bool, respectively.
3183
3184 * boolean.h (scm_is_bool): Fix bug in prototype.
3185 (scm_from_bool): The argument is "x" not "f", stupid.
3186
3187 * boolean.c (scm_is_bool): Fix typo.
3188
3189 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
3190 scm_is_unsigned_integer, scm_to_signed_integer,
3191 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
3192 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
3193 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
3194 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
3195 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
3196 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
3197 New.
3198
3199 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3200
3201 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
3202 scm_to_bool): New.
3203
3204 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3205
3206 * backtrace.c (display_expression, display_frame): Call
3207 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
3208 single memoized expression.
3209
3210 * debug.c (memoized_print): Don't try to unmemoize the memoized
3211 object, since we can't know whether it holds a single expression
3212 or a body.
3213
3214 (scm_mem_to_proc): Removed check for lambda expression, since it
3215 was moot anyway. Whoever uses these functions for debugging
3216 purposes should know what they do: Creating invalid memoized code
3217 will cause crashes, independent of whether this check is present
3218 or not.
3219
3220 (scm_proc_to_mem): Take the closure's code as it is and don't
3221 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
3222 memoized code should not be modified.
3223
3224 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
3225 scm_unmemoize from public use, but made scm_i_unmemoize_expr
3226 available as a guile internal function instead. However,
3227 scm_i_unmemoize_expr will only work on memoized objects that hold
3228 a single memoized expression. It won't work with bodies.
3229
3230 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
3231 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
3232 i. e. a list of expressions.
3233
3234 * eval.c (unmemoize_exprs): Drop internal body markers from the
3235 output during unmemoization.
3236
3237 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
3238 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
3239 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
3240 as guile internal functions instead. scm_i_unmemoize_expr will
3241 only work on a single memoized expression, while
3242 scm_i_unmemocopy_body will only work on bodies.
3243
3244 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3245
3246 * eval.c (unmemoize_exprs): Handle semi-memoized code.
3247
3248 (scm_cons_source, scm_primitive_eval): Prefer higher level
3249 predicate SCM_FALSEP over SCM_IMP.
3250
3251 2004-06-15 Rob Browning <rlb@defaultvalue.org>
3252
3253 * script.c (scm_shell_usage): minor phrasing change.
3254
3255 * gc_os_dep.c: update ifdefery for macosx.
3256 (scm_get_stack_base): separate result initialization from
3257 declaration to slience warnings with macosx and hp-ux using gcc
3258 3.3. Thanks to Andreas Vögele.
3259
3260 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
3261
3262 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
3263
3264 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3265
3266 * list.[ch] (scm_i_finite_list_copy): New internal function to
3267 copy lists that are known to be finite (though not necessarily
3268 proper).
3269
3270 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
3271 a closure's argument list like an expression of a body.
3272
3273 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
3274 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
3275 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
3276 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
3277 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
3278 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
3279 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
3280 unmemoize_builtin_macro): New static functions and symbols.
3281
3282 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
3283 now has a slightly different meaning: The memoized form that is
3284 receives as its argument is now interpreted as a sequence of
3285 expressions from a body.
3286
3287 (unmemocar, scm_unmemocar): Since the whole functionality of
3288 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
3289 has its old content back and is deprecated, while unmemocar has
3290 been removed.
3291
3292 (SCM_BIT7): Removed.
3293
3294 (CEVAL): For unmemoizing a single expression, call
3295 unmemoize_expression instead of scm_unmemocopy, which now expects
3296 a sequence of body expressions. Eliminated unnecessary empty
3297 environment frame when executing let* forms. Eliminated
3298 unmemoization step from evaluator.
3299
3300 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3301
3302 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
3303 macroexp and made static. Added new version of scm_macroexp that
3304 emits a deprecation warning and then calls macroexp.
3305 (scm_m_undefine): Issue deprecation warning.
3306
3307 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3308
3309 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
3310 Modified to make set! work on symbols that represent syntactic
3311 keywords.
3312
3313 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
3314
3315 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
3316 compound expression as lvalue errors.
3317
3318 2004-05-24 Marius Vollmer <mvo@zagadka.de>
3319
3320 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
3321 WINDER_DATA to a SCM.
3322
3323 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3324
3325 * goops.c (compute_getters_n_setters, create_standard_classes,
3326 scm_add_slot): Compute closures by calling scm_i_eval_x on a
3327 lambda expression rather than creating them with scm_closure.
3328
3329 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3330
3331 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
3332 misplaced syntactic keywords. This will not work unless guile's
3333 defmacro feature is deprecated.
3334
3335 (scm_m_case): Fixed a bug that caused the list of labels to grow
3336 with every case form.
3337
3338 2004-05-19 Kevin Ryde <user42@zip.com.au>
3339
3340 * numbers.c (scm_round_number): For inum and big, just return x. For
3341 real, use scm_round for 2^54-1 etc problems covered there.
3342
3343 * numbers.c (trunc): Remove #define to scm_truncate when the C library
3344 doesn't provide trunc. This was for when `truncate' was done as a
3345 scm_tc7_dsubr, no longer required.
3346
3347 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
3348 to stack marking call, two parameters and no cast on t->base.
3349
3350 2004-05-18 Marius Vollmer <mvo@zagadka.de>
3351
3352 * hashtab.c (rehash_after_gc): Bug fix: properly link the
3353 processed hashtables back into the weak_hashtables list. Thanks
3354 to Bill Schottstaedt!
3355
3356 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3357
3358 * eval.c (unmemoize_quote): New static function.
3359
3360 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
3361 representation of 'quote' and '@slot-ref' to an improper list.
3362 This reduces execution time, the number of cells used to hold the
3363 memoized code, and thus also reduces garbage collection time.
3364
3365 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
3366
3367 (SCM_CEVAL): Changed macro handling to also work with macros that
3368 return improper lists. Added an assertion, that the code returned
3369 by a macro transformer will not lead to cycles in the memoized
3370 code.
3371
3372 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3373
3374 No functional change, just rearrangements of functions within the
3375 file.
3376
3377 * eval.c (scm_ilookup, scm_unbound_variable_key,
3378 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
3379 the definitions used for execution, since that's where they will
3380 belong to later.
3381
3382 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3383
3384 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
3385 throughout guile, has not been part of an official release yet,
3386 and the concept of sloppy predicates has never been a good idea.
3387
3388 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
3389 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
3390 Simplified.
3391
3392 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3393
3394 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
3395 to make explicit what happens.
3396
3397 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3398
3399 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
3400 explicit what happens.
3401
3402 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
3403 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
3404
3405 2004-05-11 Marius Vollmer <mvo@zagadka.de>
3406
3407 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
3408 is indeed a procedure when it isn't a number.
3409
3410 2004-05-10 Marius Vollmer <mvo@zagadka.de>
3411
3412 Convert floating point numbers into strings with an arbitrary
3413 radix. Thanks to Richard Todd!
3414
3415 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
3416 fit.
3417 (fx): Removed.
3418 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
3419 number_chars): New, to support variable radices.
3420 (idbl2str): Use above instead of the old base-10 only tables.
3421 (iflo2str): Pass on new RADIX argument to idbl2str.
3422 (scm_number_to_string): Pass radix to iflo2str.
3423 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
3424 iflo2str.
3425 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
3426 possible radices.
3427
3428 2004-05-10 Kevin Ryde <user42@zip.com.au>
3429
3430 * numbers.c (scm_logbit_p): Correction to test above the end of an
3431 inum. Reported by Jan Konecny.
3432
3433 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3434
3435 * gc.h (scm_t_cell): Fields are now of type SCM instead of
3436 scm_t_bits. Updated all users.
3437 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
3438 duplicating the code.
3439 (SCM_CELL_OBJECT_LOC): New.
3440 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
3441 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
3442
3443 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
3444 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
3445 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
3446 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
3447 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
3448 SCM_SMOB_OBJECT_3_LOC): New.
3449 * smob.c (scm_i_set_smob_flags): New function.
3450
3451 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
3452 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
3453 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
3454 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
3455 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
3456 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
3457
3458 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
3459 taking the address of SCM_CELL_WORD_1, the latter being no longer
3460 an lvalue.
3461
3462 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
3463 of casting SCM_CELL_WORD_LOC.
3464
3465 2004-05-02 Kevin Ryde <user42@zip.com.au>
3466
3467 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
3468 --disable-deprecated. Reported by Andreas Vögele.
3469
3470 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
3471 particular on HP-UX). Reported by Andreas Vögele.
3472
3473 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
3474 code has support for. Fixes building with AIX cc, which is ansi but
3475 doesn't define __STDC__. Reported by Keith Crane.
3476 (var_start): Remove macro, this variation no longer required.
3477 (scm_list_n): Use va_start directly.
3478
3479 2004-05-01 Kevin Ryde <user42@zip.com.au>
3480
3481 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
3482 is now gone. Reported by Andreas Vögele.
3483
3484 2004-04-28 Kevin Ryde <user42@zip.com.au>
3485
3486 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
3487 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
3488 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
3489 subscript. Reported by Andreas Vögele.
3490 Also cast through unsigned char to avoid passing negatives to those
3491 macros if input contains 8-bit values.
3492
3493 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
3494 corrections to range check for signed numbers. Remove
3495 scm_remember_upto_here_1(num) from these checks, since num is used
3496 subsequently anyway.
3497
3498 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
3499 avoid warning from gcc 3.4. Reported by Hyperdivision.
3500
3501 * numbers.c (scm_bit_extract): Use min instead of MIN.
3502 (MIN): Remove, this conflicts with similar macro defined by limits.h
3503 on HP-UX. Reported by Andreas Vögele.
3504
3505 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
3506 particular on HP-UX). Reported by Andreas Vögele.
3507
3508 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
3509 Reported by Andreas Vögele.
3510
3511 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
3512 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
3513 by Andreas Vögele.
3514
3515 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3516
3517 * eval.c (s_macro_keyword): New static identifier.
3518
3519 (scm_m_define): Change order to first create binding and
3520 evaluating the expression afterwards.
3521
3522 (scm_m_set_x): Memoize complete set! expression. Only leave
3523 symbols if no binding exists at memoization time. Throw error if
3524 assigning to a syntactic keyword.
3525
3526 (lazy_memoize_variable): New function.
3527
3528 (CEVAL): When execution set!, perform lazy memoization if
3529 unmemoized symbol is detected.
3530
3531 * modules.c (module_variable): Return variables with unbound
3532 value.
3533
3534 * tags.h: Fix comment.
3535
3536 2004-04-25 Kevin Ryde <user42@zip.com.au>
3537
3538 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
3539 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
3540 in 8-bit locales, and ensures consistency with char-upper-case? and
3541 char-lower-case? which already use ctype.h.
3542 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
3543 Remove.
3544 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
3545
3546 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
3547 call. Reported by Hyperdivision.
3548
3549 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
3550 Reported by Hyperdivision.
3551
3552 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
3553 Hyperdivision.
3554
3555 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3556
3557 Hide the implementation of ilocs and isyms in eval.c.
3558
3559 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3560 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3561 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
3562 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
3563 eval.h to eval.c.
3564
3565 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
3566 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
3567 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
3568 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
3569 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
3570 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
3571 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
3572 renamed to ISYMNUM.
3573
3574 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
3575 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
3576 Extracted printing of ilocs and isyms to guile internal functions
3577 scm_i_print_iloc, scm_i_print_isym of eval.c.
3578
3579 2004-04-22 Kevin Ryde <user42@zip.com.au>
3580
3581 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3582
3583 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3584 rounding in x+0.5 when x is a big value already an integer. In
3585 certain hardware rounding cases x+0.5 can give an adjacent integer,
3586 leading to that as the result, when we really just wanted x itself.
3587
3588 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3589
3590 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3591
3592 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3593 added const qualifiers, cast intentionally unused expressions to
3594 void for emphasis, improved comment.
3595
3596 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3597
3598 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3599 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3600 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3601 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3602 Defined the tc8-tag for flags to be 0x04, which will mean that
3603 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3604 to the reduced number of bits and the simpler bit pattern for
3605 SCM_BOOL_F, certain machines may be able to use more efficient
3606 processor instructions to deal with SCM_BOOL_F.
3607
3608 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3609 never been defined in a released version, thus no need to
3610 deprecate them.
3611
3612 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3613 instead of tc9 tags.
3614
3615 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3616 of tc9 tags.
3617
3618 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3619 could have used this definition.
3620
3621 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3622 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3623 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3624 as isyms, as special isyms don't exist any more.
3625
3626 2004-04-18 Kevin Ryde <user42@zip.com.au>
3627
3628 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3629 safety.
3630
3631 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3632 explicit swapping code.
3633
3634 2004-04-15 Kevin Ryde <user42@zip.com.au>
3635
3636 * cpp_sig_symbols.in: Add SIGSYS.
3637
3638 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3639 recursion.
3640
3641 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3642 frac/big and frac/frac, use scm_less_p for exact comparison.
3643
3644 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3645 with big/inum.
3646
3647 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3648
3649 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3650
3651 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3652
3653 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3654 scm_c_{up,down}case.
3655 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3656 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3657
3658 2004-04-06 Kevin Ryde <user42@zip.com.au>
3659
3660 * numbers.c (scm_ash): Remove stray "}" in docstring.
3661
3662 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3663 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3664 calling mpz_cmp_ui in most cases.
3665
3666 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3667 for big == abs(most-negative-fixnum) special case.
3668 (abs_most_negative_fixnum): Remove, no longer used.
3669
3670 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3671 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3672 calling (sigaction NSIG).
3673
3674 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3675 and fork error cases to do this.
3676
3677 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3678
3679 * eval.c (CEVAL): Don't distinguish between short and long
3680 instructions when dispatching - just always dispatch on the
3681 instruction code, which is common for short and long instructions.
3682 Further, removed unnecessary goto statements and added comment.
3683
3684 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3685
3686 * eval.c (scm_unmemocopy): Don't distinguish between short and
3687 long instructions when dispatching - just always dispatch on the
3688 instruction code, which is common for short and long instructions.
3689 Further, removed unnecessary goto statements, fixed indentation
3690 and replaced SCM_IMP predicates by SCM_NULLP.
3691
3692 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3693
3694 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3695 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3696 'checkmacro'.
3697
3698 2004-03-31 Kevin Ryde <user42@zip.com.au>
3699
3700 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3701
3702 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3703
3704 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3705 SCM_DEBUGGINGP:
3706
3707 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3708 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3709 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3710 single interface that also matches the naming conventions.
3711 Probably scm_debug_mode_p should be part of the private interface
3712 anyway.
3713
3714 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3715 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3716 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3717 to scm_debug_mode_p.
3718
3719
3720 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3721
3722 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3723 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3724 from debug.h to eval.h.
3725
3726 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3727 more, just leave it with setting scm_debug_mode_p, which is
3728 equivalent for practical purposes.
3729
3730 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3731 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3732
3733 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3734
3735 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3736 static and renamed it to ceval throughout. Provide a new exported
3737 but deprecated function scm_ceval as a wrapper for backwards
3738 compatibility. The same is done for the deval/scm_deval pair of
3739 functions.
3740
3741 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3742 throughout. Defined CEVAL to ceval or deval, based on compilation
3743 phase.
3744
3745 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3746 to ceval and deval instead of calling *scm_ceval_ptr.
3747
3748 * eval.c (dispatching_eval): New deprecated static function.
3749
3750 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3751 to emulate its old behaviour as closely as possible.
3752
3753
3754 Change the evaluator such that only expressions for which pair? is
3755 true are passed to CEVAL, and such that all other expressions are
3756 evaluated outside of CEVAL:
3757
3758 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3759 expression that is assumed to be memoized already. All but
3760 expressions of the form '(<form> <form> ...)' are evaluated inline
3761 without calling an evaluator.
3762
3763 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3764 expressions of the form '(<form> <form> ...)' inline without
3765 calling an evaluator.
3766
3767 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3768 the special case of unmemoized symbols passed on the top level.
3769
3770 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3771 is known that the expression passed to CEVAL is of the form
3772 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3773 now it is known that the input expression of CEVAL is a pair.
3774
3775 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3776
3777 * eval.c (is_self_quoting_p): New static function.
3778
3779 (scm_m_quote): Use is_self_quoting_p.
3780
3781 (copy_tree): Corrected typo in comment.
3782
3783 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3784
3785 * eval.c (s_scm_copy_tree): idem.
3786
3787 * list.c (s_scm_filter): remove "pointer" from doc string.
3788
3789 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3790
3791 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3792
3793 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3794 (display_frame): idem.
3795 (display_backtrace_file_and_line): idem.
3796
3797 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3798 arguments.
3799
3800 2004-03-26 Kevin Ryde <user42@zip.com.au>
3801
3802 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3803
3804 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3805 big==0 since that never occurs.
3806
3807 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3808 scm_modular_expt, matching scheme level name `modulo-expt'.
3809
3810 * numbers.c (scm_modular_expt): Return a negative remainder for a
3811 negative divisor, the same as `modulo' does.
3812
3813 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3814
3815 * numbers.c, numbers.h (scm_modular_expt): New function.
3816
3817 2004-03-25 Kevin Ryde <user42@zip.com.au>
3818
3819 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3820 return inexact as required by r5rs.
3821
3822 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3823
3824 * eval.c: Separated some definitions relevant for execution from
3825 the memoization part of the file.
3826
3827 (copy_tree): New static function
3828
3829 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3830 structures are detected now and will lead to an exception instead
3831 of forcing guile to run in an endless loop, using up all the
3832 system's memory. Second, arrays in the cdr of an improper list
3833 are now copied. See the new test cases in eval.test.
3834
3835 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3836
3837 * posix.c (scm_gethostname): Make sure len is initialised before
3838 it is used. Restructured to (hopefully) represent possible
3839 configurations more clearly in the code. Added unwind handler.
3840
3841 2004-03-23 Kevin Ryde <user42@zip.com.au>
3842
3843 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3844 MAXHOSTNAMELEN when available.
3845
3846 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3847
3848 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3849 terminator. Rewritten the logic as a state machine, I must have
3850 been doing too much VHDL lately...
3851
3852 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3853 themselves. Thanks to Han-Wen Nienhuys!
3854
3855 * list.c: Changed docstrings so that they no longer talk about
3856 returning 'pointers' to something.
3857
3858 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3859
3860 * gc.c: remove set_debug_cell_accesses! when
3861 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3862 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3863 debugging conditionally.
3864
3865 2004-03-21 Kevin Ryde <user42@zip.com.au>
3866
3867 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3868
3869 2004-03-20 Kevin Ryde <user42@zip.com.au>
3870
3871 * posix.c (scm_gethostname): Preserve errno across free() call.
3872
3873 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3874
3875 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3876 free cells.
3877
3878 2004-03-14 Kevin Ryde <user42@zip.com.au>
3879
3880 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3881 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3882
3883 2004-03-07 Kevin Ryde <user42@zip.com.au>
3884
3885 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3886 than "GMT" always.
3887 (filltime): Make zname parameter "const".
3888
3889 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3890
3891 * threads.c, threads.h (scm_c_scm2thread): New function.
3892
3893 2004-02-29 Kevin Ryde <user42@zip.com.au>
3894
3895 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3896 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3897 particular don't assume "defined (__alpha__) && ! defined (linux)"
3898 means OSF. Remove "SCO" code, which was not really SCO specific and
3899 which John W. Eaton advises should be long past being needed.
3900
3901 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3902 error throw.
3903
3904 2004-02-24 Kevin Ryde <user42@zip.com.au>
3905
3906 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3907
3908 2004-02-22 Kevin Ryde <user42@zip.com.au>
3909
3910 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3911 complex, same as for two args. (Handle only inum, big, real, frac).
3912
3913 2004-02-21 Kevin Ryde <user42@zip.com.au>
3914
3915 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3916 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3917 Reported by Andreas Voegele.
3918
3919 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3920
3921 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3922 validation.
3923
3924 * read.c (scm_lreadparen): Removed.
3925 (scm_lreadparen1): Renamed scm_i_lreadparen.
3926
3927 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3928
3929 * list.c (scm_list_n): validate non-immediate arguments;
3930 this will catch forgotten a SCM_UNDEFINED.
3931
3932 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3933
3934 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3935 Thanks to Bill Schottstaedt!
3936
3937 * socket.h (scm_gethost): Removed prototype it is already in
3938 "net_db.h". Thanks to Bill Schottstaedt!
3939
3940 2004-02-18 Kevin Ryde <user42@zip.com.au>
3941
3942 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3943 order parameter to mpz_import, in fact with just one word there's no
3944 order to worry about at all.
3945
3946 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3947 and frac==complex, make an exact comparison rather than converting
3948 with fraction2double.
3949
3950 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3951 shared library, since environ is not directly available there.
3952
3953 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3954 standard.
3955
3956 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3957 errno EINVAL in case localtime and gmtime don't set it.
3958 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3959 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3960
3961 2004-02-16 Kevin Ryde <kevin@swox.se>
3962
3963 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3964 which were permitted in the past for these.
3965
3966 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3967 previous change to numbers.c.
3968
3969 * script.c (scm_shell_usage): Print bug-guile email address, as per
3970 GNU standard. Reported by Han-Wen Nienhuys.
3971
3972 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3973
3974 * unif.c (scm_make_uve): Removed local variable and simplified
3975 code in order to avoid compiler used uninitialized warnings.
3976
3977 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3978 scm_hash_map.
3979 (scm_hash_fold): Use scm_call_3 directly in the call to
3980 scm_internal_hash_fold instead of going via fold_proc (which is
3981 now removed).
3982 (scm_hash_for_each): Use a trampoline +
3983 scm_internal_hash_for_each_handle.
3984 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3985 functions.
3986
3987 2004-02-12 Kevin Ryde <user42@zip.com.au>
3988
3989 * ports.c (scm_port_line): In docstring, note first line is 0.
3990 (scm_set_port_line_x): In docstring, note first line is 0.
3991 (scm_port_column): In docstring, there's no default to current input
3992 port, and remove shared port-line @defun.
3993 (scm_set_port_column_x): In docstring, there's no default to current
3994 input port, note first column is 0, remove shared set-port-line!
3995 @defun.
3996
3997 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3998 convert args the same way that array-set! does.
3999
4000 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
4001 for dvect.
4002 (scm_array_p): Add missing "break"s in switch, fix llvect test look
4003 for "l" not "s", fix dvect to be false for singp(prot) since such a
4004 value is for fvect.
4005 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
4006 (exactly_one_third): New variable.
4007 (scm_init_unif): Initialize it.
4008
4009 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
4010
4011 * read.c (scm_read_opts): Change `escaped-parens' to
4012 `elisp-strings'.
4013
4014 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
4015
4016 * read.c (scm_read_opts): New opts `elisp-vectors' and
4017 `escaped-parens'.
4018 (s_vector): New.
4019 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
4020 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
4021 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
4022 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
4023 `escaped-parens' option set.
4024 (scm_read_token): If elisp vector syntax active, disallow [ and ]
4025 in tokens.
4026 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
4027 (scm_lreadparen1): New.
4028
4029 * read.h: Remove conditionally compiled last arg to
4030 scm_lreadparen.
4031 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
4032
4033 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
4034
4035 * eval.c (m_expand_body): remove stray variable new_body.
4036
4037 2004-01-22 Marius Vollmer <mvo@zagadka.de>
4038
4039 * eval.c (m_expand_body): Rewrite the expression in place (by
4040 overwriting FORMS) also when a letrec is constructed, not only
4041 when no definitions are found. Do not return rewritten expression
4042 to emphasize the in-place rewriting. Changed all users.
4043
4044 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
4045
4046 * gc.c: add protected_object_count, a number that is dumped from
4047 gc_stats()
4048
4049 2004-01-11 Marius Vollmer <mvo@zagadka.de>
4050
4051 * dynwind.h, dynwind.c (scm_frame_unwind,
4052 scm_frame_unwind_handler): Renamed and changed all uses.
4053 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
4054
4055 2004-01-11 Kevin Ryde <user42@zip.com.au>
4056
4057 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
4058 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
4059 changes made to scheme-compound.texi.
4060
4061 2004-01-10 Marius Vollmer <mvo@zagadka.de>
4062
4063 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
4064 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
4065
4066 * guile-snarf.in: Use mkdir to create a unique temporary directory
4067 that we can safely use. Thanks to Stefan Nordhausen!
4068
4069 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4070
4071 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
4072 argument since it is always zero now. Changed all callers.
4073 Removed code for handling fluids.
4074
4075 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
4076 the wind chain explicitely. Use scm_c_with_fluid for the common
4077 case of only one fluid.
4078 (scm_with_fluid): New.
4079 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
4080
4081 * fluids.h, fluids.c (scm_frame_fluid): New.
4082 (scm_with_fluid): New.
4083 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
4084
4085 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
4086 do the unwinding directly. It is simple enough.
4087
4088 * dynwind.h, dynwind.c: Did the following renamings:
4089 scm_begin_frame -> scm_frame_begin,
4090 scm_end_frame -> scm_frame_end,
4091 scm_on_unwind -> scm_frame_unwind,
4092 scm_on_rewind -> scm_frame_rewind,
4093 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
4094 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
4095 Changed all uses.
4096
4097 * aync.h, async.c: Did the follwing renamings:
4098 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
4099 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
4100 Changed all uses.
4101
4102 * ports.h, ports.c: Did the follwing renamings:
4103 scm_with_current_input_port -> scm_frame_current_input_port,
4104 scm_with_current_output_port -> scm_frame_current_output_port,
4105 scm_with_current_error_port -> scm_frame_current_error_port.
4106 Changed all uses.
4107
4108 2004-01-07 Kevin Ryde <user42@zip.com.au>
4109
4110 * numbers.c (s_bignum): Remove, not used since gmp bignums.
4111 Reported by Richard Todd.
4112
4113 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
4114 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
4115
4116 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
4117 traversing the args list, fixes segv if an improper list is given.
4118 Reported by Rouben Rostamian.
4119
4120 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4121
4122 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
4123 swap_data on stack, use a 'malloc obj'.
4124
4125 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
4126 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
4127 scm_i_... since they are internal. Changed all uses.
4128
4129 * dynwind.c (frame_print): Removed, use the default printer.
4130 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
4131 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
4132 to protect SCM values.
4133
4134 * dynwind.h (SCM_F_WIND_EXPLICITELY,
4135 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
4136 Changed all uses.
4137 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
4138
4139 2004-01-05 Marius Vollmer <mvo@zagadka.de>
4140
4141 * ports.h, ports.c (scm_with_current_input_port,
4142 scm_with_current_output_port, scm_with_current_error_port): New.
4143
4144 * async.h, async.c (scm_with_blocked_asyncs,
4145 scm_with_unblocked_asyncs): New.
4146
4147 2004-01-03 Marius Vollmer <mvo@zagadka.de>
4148
4149 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
4150 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
4151 New.
4152 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
4153 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
4154 function when the outermost wind point has been reached. The
4155 latter is used to copy a continuation stack at the right time.
4156 scm_dowinds remains available.
4157 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
4158 tc16_guard, guards_print): Removed.
4159 (scm_internal_dynamic_wind): Reimplemented using frames.
4160
4161 * continuations.c (copy_stack): New, do only the stack copying
4162 part of copy_stack_and_call.
4163 (copy_stack_and_call): Copy the stack after unwinding and before
4164 rewinding.
4165 (scm_dynthrow): Do not call scm_dowinds, this is now done by
4166 copy_stack_and_call.
4167
4168 2004-01-04 Kevin Ryde <user42@zip.com.au>
4169
4170 * numbers.c (scm_less_p): Don't convert frac to float for compares,
4171 can give bad results due to rounding.
4172
4173 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
4174 setzone/restorezone protection for DOS.
4175
4176 2003-12-26 Marius Vollmer <mvo@zagadka.de>
4177
4178 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
4179 and scm_t_uintmax to be defined in scmconfig.h
4180
4181 2003-12-03 Kevin Ryde <user42@zip.com.au>
4182
4183 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
4184
4185 * numbers.c (scm_make_ratio): Check for numerator equal to
4186 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
4187 giving integer -1.
4188
4189 * numbers.c (scm_real_part): Return fraction unchanged rather than
4190 converting to flonum.
4191
4192 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4193
4194 * modules.c (module_variable): Fixed (and thus simplified) the
4195 definition of SCM_BOUND_THING_P to reflect the fact that since
4196 after the 1.4 series of guile, obarrays only hold variable
4197 objects.
4198
4199 2003-11-30 Marius Vollmer <mvo@zagadka.de>
4200
4201 * numbers.c (scm_logand): It's "#b...", not "#\b...".
4202
4203 From Paul Jarc:
4204
4205 * read.c (scm_lreadr): Signal an error for invalid escape
4206 sequences in strings. Code cleanups too.
4207
4208 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
4209 writing control characters in strings.
4210
4211 2003-11-21 Marius Vollmer <mvo@zagadka.de>
4212
4213 * ports.c (scm_drain_input): Bug fix: only access the port after
4214 checking that it indeed is one.
4215
4216 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4217
4218 * eval.c (s_bad_define): New static identifier.
4219
4220 (m_body): Fixed comment.
4221
4222 (scm_m_define): Don't generate memoized code for definitions that
4223 are not on the top level. As a consequence, no memoized code at
4224 all is generated for definitions any more: Top level definitions
4225 are executed immediately during memoization and internal
4226 definitions are handled separately in m_expand_body.
4227
4228 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
4229 definitions. Consequently, there is no unmemoizing code any more
4230 that might modify the environment. Thus, the old scm_unmemocopy
4231 is removed and the old unmemocopy is renamed to scm_unmemocopy.
4232
4233 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
4234 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
4235 over SCM_NIMP in places, where the argument is known to be part of
4236 a proper list.
4237
4238 2003-11-21 Kevin Ryde <user42@zip.com.au>
4239
4240 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
4241 for bignums.
4242
4243 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
4244 to share some shifting.
4245
4246 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
4247 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
4248 since gc does this.
4249
4250 2003-11-19 Marius Vollmer <mvo@zagadka.de>
4251
4252 * numbers.c (scm_make_ratio): Rewritten to have a simpler
4253 structure. Previously, not all cases with a negative denominator
4254 were covered.
4255
4256 * numbers.c (mem2decimal_from_point): use scm_divide instead of
4257 scm_divide2real when forming the fractional part. This allows
4258 "#e1.2" to yield 6/5.
4259
4260 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
4261 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
4262 fractions were equal to each other regardless of value. Ooops.
4263
4264 * numbers.c (scm_rationalize): Return an inexact result when given
4265 inexact arguments.
4266
4267 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
4268 non-numbers.
4269
4270 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4271
4272 Support for exact fractions from Bill Schottstaedt! Thanks!
4273
4274 * print.c (scm_iprin1): Handle fractions.
4275
4276 * objects.h (scm_class_fraction): New.
4277 * objects.c (scm_class_fraction): New.
4278 (scm_class_of): Handle fractions.
4279
4280 * hash.c (scm_hasher): Handle fractions.
4281
4282 * numbers.c: New code for handling fraction all over the place.
4283 (scm_odd_p, scm_even_p): Handle inexact integers.
4284 (scm_rational_p): New function, same as scm_real_p.
4285 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
4286 New exact functions that replace the inexact 'dsubr'
4287 implementations.
4288 (scm_numerator, scm_denominator): New.
4289
4290 * numbers.h (SCM_NUMP): Recognize fractions.
4291 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
4292 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
4293 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
4294 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
4295 SCM_FRACTION_REDUCED): New.
4296 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
4297 New prototypes.
4298 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
4299 scm_rational_p): New prototypes.
4300 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
4301 scm_i_print_fraction): New prototypes.
4302
4303 * goops.c (create_standard_classes): Create "<fraction>" class.
4304
4305 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
4306
4307 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
4308 case in the switch, but do nothing for now.
4309
4310 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
4311 to doubles when calling 'dsubr' functions.
4312
4313 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
4314
4315 2003-11-18 Rob Browning <rlb@defaultvalue.org>
4316
4317 * gen-scmconfig.c (main): remove public definition of
4318 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
4319 direct typedef of long_long and ulong_long inside deprecated block
4320 when appropriate.
4321
4322 * deprecated.h: move long_long and ulong_long definitions to
4323 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
4324 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
4325
4326 2003-11-17 Marius Vollmer <mvo@zagadka.de>
4327
4328 * hash.c (scm_string_hash): New hashing algorithm that takes the
4329 complete string into account.
4330
4331 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
4332 is a list. This allows (@ ...) to work with set!.
4333 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
4334 SCM_ASSYNT.
4335
4336 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
4337 the "-e" option instead of scm_str2symbol. This allows things
4338 like (@ ...) to be specified for the entry point.
4339
4340 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4341
4342 * eval.c (scm_m_letstar): Create memoized code in place to
4343 minimize consing.
4344
4345 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4346
4347 * eval.c (s_splicing): Commented and reformulated.
4348
4349 (lookup_global_symbol, lookup_symbol): New static functions.
4350
4351 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
4352
4353 (try_macro_lookup, literal_p): Use lookup_symbol instead of
4354 creating a temporary pair for scm_lookupcar.
4355
4356 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
4357 created deprecated wrapper function scm_unmemocar.
4358
4359 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
4360 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
4361 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
4362 undefineds, sym_three_question_marks): Moved around without
4363 modifications.
4364
4365 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
4366
4367 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4368
4369 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
4370 m_expand_body, scm_m_expand_body): Grouped together with m_body.
4371 No further modifications.
4372
4373 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4374
4375 * eval.c (s_mixed_body_forms): New static identifier.
4376
4377 (canonicalize_define, scm_m_define): The check for a bad
4378 expression is performed in canonicalize_define now.
4379
4380 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
4381 static helper functions for m_expand_body.
4382
4383 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
4384 expand user defined macros. Fixed handling of the definition/
4385 expression boundary. Fixed handling of definitions grouped with
4386 'begin. Use canonicalize_define to expand definitions.
4387
4388 2003-11-13 Marius Vollmer <mvo@zagadka.de>
4389
4390 * read.c (scm_lreadr): detect EOF after backslash, and interpret
4391 \xNN hexadecimal sequences. From Paul Jarc, thanks!
4392
4393 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
4394 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
4395 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
4396 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
4397 New macros from Paul Jarc. Thanks!
4398
4399 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
4400 return NULL when the machine type is unknown. Previously,
4401 gc_os_dep.c would refuse to compile.
4402
4403 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4404
4405 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
4406 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
4407 scm_m_body to m_body.
4408
4409 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4410
4411 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
4412 public use of scm_m_expand_body in eval.h. In eval.c, renamed
4413 scm_m_expand_body to m_expand_body and made it static. Added
4414 deprecated wrapper scm_m_expand_body.
4415
4416 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
4417 of scm_m_expand_body.
4418
4419 2003-11-09 Kevin Ryde <user42@zip.com.au>
4420
4421 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
4422 argument. Reported by Mike Gran.
4423
4424 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4425
4426 * eval.c (s_missing_body_expression): New static identifier.
4427
4428 (s_body): Removed.
4429
4430 (scm_m_expand_body): Fixed core dump when passing a body with
4431 defines, but without expressions (see additions to syntax.test).
4432 Use ASSERT_SYNTAX to signal syntax errors.
4433
4434 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4435
4436 * eval.c (canonicalize_define): New static helper function.
4437
4438 (memoize_define, canonicalize_define): Extract handling of
4439 function currying to canonicalize_define.
4440
4441 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4442
4443 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4444 Make sure that error checking in debug mode is not worse than in
4445 standard mode.
4446
4447 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4448
4449 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
4450 handled in scm_m_body any more, but rather in scm_m_lambda.
4451
4452 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
4453 scm_m_letrec, scm_m_expand_body): Check for validity is done by
4454 calling functions of scm_m_body.
4455
4456 (scm_m_lambda): Avoid unnecessary consing when creating the
4457 memoized code.
4458
4459 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4460
4461 * eval.c (s_expression): Added comment.
4462
4463 (s_empty_combination, error_unbound_variable): New static
4464 identifiers.
4465
4466 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
4467 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
4468 signal syntax errors.
4469
4470 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
4471 scheme objects.
4472
4473 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4474
4475 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
4476 Grouped together with unmemocopy, without modifications.
4477
4478 (build_binding_list, unmemocopy): Renamed names of list arguments
4479 and variables to reflect the actual order of the list elements.
4480
4481 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4482
4483 * eval.c (s_defun): New static identifier.
4484
4485 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
4486 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4487 when creating the memoized code.
4488
4489 2003-10-19 Kevin Ryde <user42@zip.com.au>
4490
4491 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
4492
4493 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
4494 in accordance with R5RS, which just mpz_get_d doesn't really give.
4495
4496 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4497
4498 * eval.c (s_bad_slot_number): New static identifier.
4499
4500 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
4501 signal syntax errors. Avoid unnecessary consing when creating the
4502 memoized code.
4503
4504 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4505
4506 * eval.c (scm_m_cont, scm_m_at_call_with_values,
4507 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
4508 errors. Avoid unnecessary consing when creating the memoized
4509 code.
4510
4511 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
4512 standard case. Make sure line and file information are copied to
4513 every created expression.
4514
4515 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4516
4517 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
4518 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4519 when creating the memoized code.
4520
4521 (scm_m_atbind): Reversed the order, in which the init expressions
4522 are stored and executed. The order of execution is now equal to
4523 the order in which the initializers of the let-forms are executed.
4524 Use check_bindings and transform_bindings.
4525
4526 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
4527 !SCM_NULLP. Added some comments.
4528
4529 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4530
4531 * eval.c: Sorted include files alphabetically.
4532
4533 (scm_m_begin): Added comment.
4534
4535 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4536 unnecessary consing when creating the memoized code.
4537
4538 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
4539 syntax errors. Be more specific about the kind of error that was
4540 detected.
4541
4542 (scm_m_quote, unmemocopy): As an optimization, vector constants
4543 are now inserted unquoted into the memoized code. During
4544 unmemoization the quotes are added again to provide syntactically
4545 correct code.
4546
4547 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4548
4549 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
4550 scm_m_expand_body, check_bindings): Extracted syntax checking of
4551 bindings to new static function check_bindings.
4552
4553 (scm_m_let, memoize_named_let): Extracted handling of named let to
4554 new static function memoize_named_let.
4555
4556 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
4557 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
4558 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
4559 unnecessary consing when creating the memoized code.
4560
4561 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4562
4563 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4564 static identifiers.
4565
4566 (s_clauses, s_formals, s_duplicate_formals): Removed.
4567
4568 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
4569 specific about the kind of error that was detected. Prepare for
4570 easier integration of changes for separated memoization.
4571
4572 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4573
4574 * eval.c (s_duplicate_binding): New static identifier.
4575
4576 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4577
4578 (scm_m_define): Added comment about how we check for duplicate
4579 formals.
4580
4581 (scm_m_do): Added check for duplicate bindings.
4582
4583 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4584 unnecessary consing when creating the memoized code.
4585
4586 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4587 scm_c_improper_memq to c_improper_memq, since it is not exported.
4588
4589 (transform_bindings): Call scm_c_memq rather than
4590 scm_c_improper_memq.
4591
4592 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4593
4594 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4595
4596 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4597 static identifiers.
4598
4599 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4600 specific about the kind of error that was detected. Avoid use of
4601 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4602 code, this way also making sure that file name, line number
4603 information etc. remain available.
4604
4605 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4606
4607 * eval.c (memoize_as_thunk_prototype): New static function.
4608
4609 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4610 Avoid unnecessary consing when creating the memoized code.
4611
4612 2003-10-12 Kevin Ryde <user42@zip.com.au>
4613
4614 * list.c (scm_append): Track argument number and use in error.
4615
4616 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4617
4618 * eval.c (s_missing_expression, s_bad_variable): New static
4619 identifiers.
4620
4621 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4622 R5RS terminology for the naming of variables. Be more specific
4623 about the kind of error that was detected. Make sure file name,
4624 line number etc. are added to all freshly created expressions.
4625 Avoid unnecessary consing when creating the memoized code.
4626
4627 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4628
4629 * eval.c (s_extra_expression, s_misplaced_else_clause,
4630 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4631
4632 (s_extra_case_clause): Removed.
4633
4634 (scm_m_case, scm_m_cond): If a clause appears after an else
4635 clause, report a misplaced else clause.
4636
4637 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4638 specific about the kind of error that was detected. Handle bound
4639 'else and '=>. Avoid unnecessary consing when creating the
4640 memoized code.
4641
4642 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4643 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4644 syntactic keyword '=>.
4645
4646 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4647
4648 * eval.c (scm_m_case): Allow empty lists of case labels.
4649
4650 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4651
4652 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4653
4654 * print.c (scm_isymnames): Add names for the new memoizer codes.
4655
4656 * eval.c (s_missing_clauses, s_bad_case_clause,
4657 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4658 literal_p): New static identifiers.
4659
4660 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4661 specific about the kind of error that was detected. Check for
4662 duplicate case labels. Handle bound 'else. Avoid unnecessary
4663 consing when creating the memoized code.
4664
4665 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4666 the syntactic keyword 'else.
4667
4668 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4669
4670 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4671 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4672
4673 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4674 unnecessary consing when creating the memoized code.
4675
4676 2003-10-09 Kevin Ryde <user42@zip.com.au>
4677
4678 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4679 cast gives for values bigger than a long, or for nan or inf.
4680
4681 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4682
4683 * smob.h (scm_make_smob_type): Made the declaration match the
4684 definition.
4685
4686 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4687
4688 * goops.c, objects.h, smob.c, smob.h: Make type names char
4689 const * instead of char *. Thanks to Paul Jarc!
4690
4691 2003-10-02 Kevin Ryde <user42@zip.com.au>
4692
4693 * strports.c (scm_call_with_output_string): scm_get_output_string
4694 rather than scm_strport_to_string, so as to guard against the port
4695 having been closed by the called procedure. Reported by Nic Ferrier.
4696
4697 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4698
4699 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4700
4701 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4702 tags.h to deprecated.h.
4703
4704 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4705
4706 This set of patches introduces a new tc7 code scm_tc7_number for
4707 numbers. Bignums, reals and complex numbers are turned from smobs
4708 into subtypes of scm_tc7_number.
4709
4710 * tags.h (scm_tc7_number): New.
4711
4712 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4713 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4714 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4715 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4716 (scm_class_of), print.c (scm_iprin1), smob.c
4717 (scm_smob_prehistory): Don't handle bignums, reals and complex
4718 numbers as subtypes of scm_tc7_smob any more.
4719
4720 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4721 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4722
4723 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4724
4725 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4726 sizeof (scm_t_complex) to determine the memory size of the
4727 malloc'd area for complex numbers.
4728
4729 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4730
4731 * numbers.c (scm_bigequal): Fixed.
4732
4733 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4734
4735 * stime.c (scm_current_time): 'time' does not set errno so don't
4736 use SCM_SYSERROR for reporting errors.
4737
4738 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4739
4740 This set of patches eliminates the dependency between the
4741 implementation of evaluator specific memoization codes and special
4742 constants like #f, '() etc. ('flags'), which are not evaluator
4743 specific. The goal is to remove definitions of evaluator
4744 memoization codes completely from the public interface. This will
4745 make it possible to experiment more freely with optimizations of
4746 guile's internal representation of memoized code.
4747
4748 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4749
4750 * print.c (iflagnames): New array, holding the printed names of
4751 guile's special constants ('flags').
4752
4753 (scm_isymnames): Now holds only the printed names of the
4754 memoization codes.
4755
4756 (scm_iprin1): Separate the handling of memoization codes and
4757 guile's special constants.
4758
4759 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4760 SCM_IFLAGNUM): new
4761
4762 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4763 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4764 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4765 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4766 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4767 values.
4768
4769 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4770
4771 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4772 tc9 macros and scm_tc9_flag.
4773
4774 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4775
4776 * posix.c (scm_setgroups): Check that the gid list is not too
4777 long. Thanks to Paul Jarc!
4778
4779 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4780
4781 * tags.h: Reduced the number of short instructions from 14 to 13.
4782 The typecode of the former 14th short instruction is now used to
4783 represent long instructions. Changed some comments to reflect
4784 this fact.
4785
4786 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4787 previously used by SCM_IM_DEFINE.
4788
4789 (SCM_IM_DEFINE): Turned into a long instruction.
4790
4791 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4792 instruction.
4793
4794 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4795 code that is separate from all instructions, one level of dispatch
4796 for long instructions can be eliminated.
4797
4798 * print.c (scm_isymnames): Removed some commented code.
4799
4800 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4801
4802 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4803 compiler on IA64.
4804
4805 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4806
4807 * modules.c (scm_module_reverse_lookup): Check that the obarray
4808 really is a hashtable and do nothing if not.
4809
4810 * inline.h: Use "extern inline" only with GCC. Use "static
4811 inline" else.
4812
4813 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4814
4815 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4816 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4817
4818 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4819 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4820 deprecated.h.
4821
4822 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4823
4824 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4825 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4826
4827 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4828 0.0==some_expression to some_expression==0.0. The latter is
4829 better readable. The former is preferred by some people, since it
4830 leads to a compiler error when confusing == with =. However, when
4831 using gcc, a warning will be issued if in an if-statement an
4832 assigment appears. Since many Guile developers are using gcc,
4833 such errors will not remain unnoticed anyway. We can therefore
4834 focus on better readability.
4835
4836 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4837
4838 * tags.h: Added description of Guile's type system. Removed some
4839 old and misleading comments.
4840
4841 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4842
4843 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4844 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4845
4846 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4847
4848 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4849
4850 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4851 respective SLOPPY macro.
4852
4853 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4854
4855 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4856 type string, not SCM_TYP7S.
4857
4858 2003-09-03 Kevin Ryde <user42@zip.com.au>
4859
4860 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4861 2s-complement.
4862
4863 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4864 current timezone requiring SCM_DEFER_INTS.
4865
4866 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4867
4868 * script.c (scm_compile_shell_switches): Make -s switch optional
4869 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4870 VanDevender for the patch!)
4871
4872 2003-08-30 Kevin Ryde <user42@zip.com.au>
4873
4874 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4875 and to have non-integer types rejected as per other logical funcs.
4876
4877 2003-08-28 Kevin Ryde <user42@zip.com.au>
4878
4879 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4880
4881 2003-08-23 Kevin Ryde <user42@zip.com.au>
4882
4883 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4884 thread safe, and could take a long time too.
4885
4886 2003-08-22 Kevin Ryde <user42@zip.com.au>
4887
4888 * numbers.c (scm_difference): Correction to bignum - negative inum.
4889
4890 2003-08-14 Kevin Ryde <user42@zip.com.au>
4891
4892 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4893 [__GNUC__]: Use volatile asm macros rather than a function call.
4894 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4895 macros while defining functions.
4896
4897 * simpos.c (getenv): Use <stdlib.h> for prototype.
4898 (scm_system): In docstring, refer to status:exit-val rather than
4899 "functions above".
4900
4901 2003-08-09 Kevin Ryde <user42@zip.com.au>
4902
4903 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4904 list set by source-properties! rather than an SRCPROPS object,
4905
4906 2003-07-29 Kevin Ryde <user42@zip.com.au>
4907
4908 * properties.c (scm_primitive_property_ref): In docstring, note
4909 parameters to not-found-proc, use hyphens rather than underscores for
4910 that parameter name.
4911 (scm_primitive_property_set_x): In docstring, VAL is the value
4912 parameter not CODE.
4913
4914 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4915
4916 * print.c (scm_print_symbol_name): handle more weird characters by
4917 escaping the symbol name properly. Thanks to Paul Jarc!
4918
4919 * posix.h (scm_setgroups): New prototype.
4920 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4921 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4922 Don't use SCM_WRITABLE_VELTS.
4923
4924 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4925 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4926 Matthias Koeppe!
4927
4928 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4929 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4930 compiles when SCM_C_INLINE is undefined.
4931
4932 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4933
4934 * __scm.h: Reformulated the architecture and compiler properties
4935 in terms of properties of scm_t_bits and SCM variables rather than
4936 in terms of c standard types. This is since it is not known which
4937 of the standard types scm_t_bits and SCM variables will be defined
4938 to.
4939
4940 2003-07-24 Kevin Ryde <user42@zip.com.au>
4941
4942 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4943 and real.
4944
4945 2003-07-18 Kevin Ryde <user42@zip.com.au>
4946
4947 * numbers.c (scm_product): In complex * bignum, correction to
4948 REAL/IMAG fetch, x is the complex, not y.
4949
4950 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4951
4952 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4953 scm_inf_p test as Scheme values.
4954 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4955 and a positive inum.
4956 Use GNU indentation style.
4957
4958 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4959
4960 * values.c (scm_values): Build lists of length 1 by using
4961 scm_list_1 instead of using scm_cons.
4962
4963 2003-07-10 Kevin Ryde <user42@zip.com.au>
4964
4965 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4966 * list.c (scm_list_n): Ditto.
4967
4968 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4969
4970 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4971
4972 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4973 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4974 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4975 the other using intptr_t.
4976
4977 2003-07-08 Kevin Ryde <user42@zip.com.au>
4978
4979 * numbers.c (scm_make_polar): Use sincos, when available.
4980 (scm_magnitude): Use hypot.
4981
4982 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4983 @footnote since it doesn't go through to guile-procedures.txt.
4984
4985 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4986 outside @var to quieten makeinfo, and use @code.
4987
4988 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4989
4990 * gc-malloc.c (decrease_mtrigger): new function
4991 (increase_mtrigger): new function, separate debug registering and
4992 mtrigger administration.
4993 (scm_gc_realloc): bugfix: do mtrigger administration before the
4994 actual realloc, for the realloc might invalidate a GC-d segment of
4995 memory. Thanks to Sam Hocevar for pointing this out.
4996 (scm_gc_realloc): use scm_malloc_reregister instead of
4997 unregistering and registering in sequence.
4998
4999 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5000
5001 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
5002
5003 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5004
5005 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
5006 clauses.
5007
5008 2003-06-29 Marius Vollmer <mvo@zagadka.de>
5009
5010 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
5011 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
5012 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
5013 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
5014 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
5015 the release_1_6 branch.
5016
5017 2003-06-25 Stefan Jahn <stefan@lkcc.org>
5018
5019 * continuations.c: Redeclaration of getcontext() via the
5020 __asm__ ("getcontext") directive.
5021
5022 * continuations.h: Include <ucontext.h> instead of
5023 <sys/ucontext.h>.
5024
5025 2003-06-21 Kevin Ryde <user42@zip.com.au>
5026
5027 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
5028 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
5029 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
5030 available.
5031 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
5032 (isfinite): Remove, conflicts with C99 isfinite().
5033
5034 2003-06-19 Marius Vollmer <mvo@zagadka.de>
5035
5036 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
5037 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
5038 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
5039 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
5040 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
5041 the release_1_6 branch.
5042
5043 2003-06-14 Stefan Jahn <stefan@lkcc.org>
5044
5045 * threads.h: Redefined scm_getspecific() and scm_setspecific()
5046 to be functions instead of macros.
5047
5048 * threads.c: Conditionalized inclusion of <sys/time.h> and
5049 <unistd.h>.
5050 (scm_getspecific, scm_setspecific): Made these two function
5051 real part of the API.
5052
5053 * posix.c (s_scm_putenv): Added some code to make a
5054 (putenv "FOO="), i.e. setting an empty string, work also on
5055 Win32 systems. Thanks to Kevin Ryde for the proposal.
5056
5057 2003-06-12 Kevin Ryde <user42@zip.com.au>
5058
5059 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
5060 freebsd to comment about need to use unsetenv.
5061
5062 2003-06-02 Marius Vollmer <mvo@zagadka.de>
5063
5064 * ports.c (scm_peek_char): Safe the column of the port around the
5065 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
5066
5067 2003-06-07 Kevin Ryde <user42@zip.com.au>
5068
5069 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
5070 and friends required by scm_t_bits setups.
5071
5072 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5073
5074 * tags.h (scm_tc2_int): Added.
5075
5076 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
5077 scm_tc2_int.
5078
5079 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
5080 scm_tcs_closures): Hard coded values replaced by symbolic ones.
5081
5082 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5083
5084 * eval.c: Partially undid my patch from 2003-05-31. This patch
5085 caused the segfault referenced in the previous changelog entry.
5086
5087 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
5088
5089 * tags.h: Fixed comment about the immediate type code layout.
5090
5091 * eval.c: Fixed handling of non-special instructions. Without
5092 this patch, guile will segfault on (#\0) and similar instructions.
5093
5094 2003-06-05 Kevin Ryde <user42@zip.com.au>
5095
5096 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
5097 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
5098
5099 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
5100 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
5101
5102 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5103
5104 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
5105 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
5106 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
5107 generalized it to apply not only to C level functions but also to
5108 scheme level functions.
5109
5110 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
5111 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
5112 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
5113 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
5114 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
5115 respectively.
5116
5117 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
5118 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
5119 eval.h into eval.c and a copy is placed into deprecated.h.
5120
5121 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
5122 into eval.c. This definition was not part of the API in any
5123 officially released version of guile and thus does not need to go
5124 through a phase of deprecation.
5125
5126 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5127
5128 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
5129 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
5130 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
5131 definitions are make static and renamed from scm_s_xxx to s_xxx.
5132 In deprecated.c the original definitions are copied.
5133
5134 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
5135 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
5136 eval.h into eval.c and a copy (slightly modified to work in user
5137 code) is placed into deprecated.h.
5138
5139 * eval.c: Use the local static s_xxx definitions instead of the
5140 scm_s_xxx definitions throughout.
5141
5142 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5143
5144 This set of patches separates the representation of the cxr family
5145 of functions (car, cdr etc.) from the dsubr family of functions
5146 (i. e. functions that take a double precision floating point
5147 argument). Further, the algorithm for handling the cxr function
5148 is improved.
5149
5150 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
5151 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
5152 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
5153 cosh, tanh), objects.c (scm_class_of), procprop.c
5154 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
5155 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
5156 typecode for the dsubr family of functions.
5157
5158 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
5159 ramap_dsubr.
5160
5161 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
5162 (scm_init_pairs): Make use of the (now usable) second cell element
5163 of a scm_tc7_cxr function to implement the cxr family of functions
5164 more efficiently.
5165
5166 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
5167
5168 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
5169 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
5170 end of an if-else-if-sequence of checks.
5171
5172 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5173
5174 * eval.c (SCM_CEVAL): Improved readability of call-with-values
5175 execution. Generalize apply_closure to apply_proc and use that
5176 for call-with-values.
5177
5178 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5179
5180 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
5181 a non closure.
5182
5183 2003-05-30 Stefan Jahn <stefan@lkcc.org>
5184
5185 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
5186 appropriately for mingw32 hosts.
5187
5188 * numbers.h: Defining copysign(), isnan() and finite() to
5189 be prefixed by a single '_' for mingw32 hosts.
5190
5191 2003-05-30 Kevin Ryde <user42@zip.com.au>
5192
5193 * numbers.c (z_negative_one): New variable.
5194 (scm_init_numbers): Initialize it.
5195 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
5196
5197 2003-05-29 Stefan Jahn <stefan@lkcc.org>
5198
5199 * win32-dirent.c: Use malloc() instead of scm_malloc().
5200
5201 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
5202 warning.
5203
5204 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
5205 mingw32 build.
5206
5207 * modules.c (s_scm_module_import_interface): Renamed local
5208 variable interface to _interface. Seems like 'interface'
5209 is a special compiler directive for the mingw32 compiler.
5210
5211 * mkstemp.c: Provide prototype to avoid compiler warning.
5212
5213 * load.c (s_scm_search_path): Fixed absolute and relative
5214 path detections for native Windows platforms.
5215
5216 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
5217 to build on mingw32).
5218
5219 * gc-freelist.c ("s_scm_map_free_list",
5220 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
5221
5222 * fports.c (fport_fill_input): Disable use of
5223 fport_wait_for_input() on Win32 platforms.
5224
5225 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
5226
5227 * Makefile.am: Modified some rules for cross compiling.
5228
5229 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5230
5231 * eval.c (SCM_CEVAL): In case of an application, all checks for a
5232 proper function object and the correct number of arguments are now
5233 performed in the application part of SCM_CEVAL.
5234
5235 (scm_badformalsp): Removed.
5236
5237 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5238
5239 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
5240
5241 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5242
5243 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
5244 always being false by inserting preprocessor conditional. (Thanks
5245 to Bruce Korb.)
5246
5247 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
5248 (void *) in order to avoid an aliasing warning; thanks to Bruce
5249 Korb.)
5250
5251 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
5252
5253 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
5254 SCM_STACK_PTR.
5255
5256 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
5257 thread->base --> t->base.
5258
5259 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
5260
5261 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5262
5263 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
5264 scm_variable_set_name_hint, scm_builtin_variable,
5265 scm_internal_with_fluids, scm_make_gsubr,
5266 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
5267 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
5268 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
5269 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
5270 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
5271 scm_make_subr_with_generic, scm_make_subr_opt,
5272 scm_call_catching_errors, scm_make_smob_type_mfpe,
5273 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
5274 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
5275 branch. Some have been slightly rewritten.
5276 (scm_i_object_chars, scm_i_object_length): New, to support
5277 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
5278
5279 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
5280
5281 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
5282 names and inits in the memoized code of do.
5283
5284 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5285
5286 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
5287 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
5288 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
5289 a compilation error if error-on-warning is enabled).
5290
5291 2003-05-17 Marius Vollmer <mvo@zagadka.de>
5292
5293 * c-tokenize.lex: Gobble up complete lines after a '#'. This
5294 removes preprocessor directives from the snarfage that might
5295 otherwise confuse us. These directives appear when compiling with
5296 "-g3", for example.
5297
5298 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5299
5300 * ChangeLog: add my surname
5301
5302 * srcprop.c (scm_finish_srcprop): use
5303 scm_gc_register_collectable_memory()
5304 (scm_make_srcprops): idem.
5305
5306 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5307
5308 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
5309 wrap-around for scm_mtrigger
5310 (scm_gc_register_collectable_memory): abort on overflowing
5311 scm_mallocated().
5312
5313 2003-05-13 Kevin Ryde <user42@zip.com.au>
5314
5315 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
5316 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
5317
5318 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5319
5320 * backtrace.c (scm_display_error_message): Introduced fancy
5321 printing with max level 7 and length 10. (Purpose: avoid printing
5322 gigantic objects in error messages.)
5323
5324 * print.c, print.h (scm_i_port_with_print_state): New function.
5325
5326 * print.c (scm_iprin1, scm_printer_apply,
5327 scm_port_with_print_state): Use scm_i_port_with_print_state.
5328 (scm_simple_format): Modified not to destroy print states.
5329 (print_state_mutex): New mutex.
5330 (scm_make_print_state, scm_free_print_state, scm_prin1):
5331 Lock/unlock print_state_mutex.
5332
5333 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
5334 Use current names in definitions.
5335
5336 2003-05-10 Kevin Ryde <user42@zip.com.au>
5337
5338 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
5339
5340 * numbers.c (scm_integer_length): On negative bignums, adjust
5341 mpz_sizeinbase to account for it looking at absolute value where we
5342 want ones-complement.
5343
5344 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
5345 since we're only using the ulong return value, and x might not fit.
5346
5347 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5348
5349 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
5350 read. This will allow to make the definition in read.c static.
5351
5352 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5353
5354 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
5355 from evalext to eval. This will allow to make some of the
5356 definitions in eval.c static.
5357
5358 2003-05-06 Kevin Ryde <user42@zip.com.au>
5359
5360 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
5361 (scm_logcount): Use mpz_com, not mpz_neg.
5362
5363 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5364
5365 The purpose of this patch is to make guile's internal memoizers
5366 distinguishable from memoizing macros created on the scheme level
5367 or from user provided primitive memoizing macros. The reason is,
5368 that the internal memoizers are the only ones that are allowed to
5369 transform their scheme input into memoizer byte code, while all
5370 other memoizing macros may only transform scheme code into new
5371 scheme code.
5372
5373 To achieve this, a new macro type 'builtin-macro!' is introduced.
5374 Currently, 'builtin-macro!'s are handled as memoizing macros, but
5375 this will change when the memoizer and executor are separated.
5376
5377 * macros.[ch] (scm_i_makbimacro): New.
5378
5379 * macros.h (SCM_BUILTIN_MACRO_P): New.
5380
5381 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
5382
5383 * eval.c, goops.c: All of guile's primitive memoizing macros are
5384 primitive builtin-macros now.
5385
5386 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
5387 builtin-macros are handled equally to memoizing macros.
5388
5389 2003-05-04 Marius Vollmer <mvo@zagadka.de>
5390
5391 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
5392 work around a bug in GCC 2.95.2 but is now a bug in itself.
5393
5394 2003-05-02 Marius Vollmer <mvo@zagadka.de>
5395
5396 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
5397 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
5398 scm_tcs_symbols): New.
5399
5400 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5401
5402 * deprecated.h, deprecated.c (scm_protect_object,
5403 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
5404 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
5405 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
5406 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
5407 scm_ensure_user_module, scm_load_scheme_module, scm_port,
5408 scm_ptob_descriptor, scm_port_rw_active,
5409 scm_close_all_ports_except): New.
5410
5411 * ports.c (scm_c_port_for_each): New function, mostly copied from
5412 scm_port_for_each.
5413 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
5414 * ports.h (scm_c_port_for_each): New prototype.
5415
5416 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5417
5418 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
5419 macro was introduced in anticipation of GOOPS method compilation
5420 code.)
5421
5422 * goops.c: Removed binding of @dispatch.
5423
5424 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5425
5426 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
5427 instructions that bind the macros on the scheme level back to
5428 goops.c in order to make sure again that the bindings go into the
5429 (oop goops) module and are not visible from the outside.
5430
5431 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5432
5433 * eval.c: Non functional change: Separated R5RS and non-R5RS
5434 macros into different sections of the file and ordered the
5435 memoizers alphabetically.
5436
5437 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5438
5439 * eval.c (scm_ilookup): Rewritten to improve readability.
5440
5441 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5442
5443 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5444 Partially reverted patch from 2003-04-23 in oder to find a better
5445 compromise between readability and debuggability.
5446
5447 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5448
5449 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
5450 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
5451 definitions of the special goops memoizers from goops.[ch] to
5452 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
5453 throughout guile.
5454
5455 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5456
5457 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
5458
5459 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
5460
5461 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
5462
5463 * ioext.c (scm_fdes_to_ports): Ditto.
5464
5465 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
5466 lock/unlock scm_i_port_table_mutex.
5467
5468 * strports.c (scm_mkstrport): Ditto.
5469
5470 * ports.c (scm_void_port, scm_port_for_each): Ditto.
5471
5472 * fports.c (scm_fdes_to_port): Ditto.
5473
5474 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5475
5476 This set of patches contains no functional changes, only debatable
5477 minor stylistic ones. Still, in order to prepare a patch between
5478 my local copy and the CVS version, I decided to submit the changes
5479 below. Then, the patch will hopefully only contain relevant
5480 modifications :-)
5481
5482 * eval.c (iqq): Added const specifier.
5483
5484 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5485 Use NULL instead of 0 to indicate that a pointer is returned.
5486 Removed some misleading 'fall through' comments.
5487
5488 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5489 Split up long expressions into smaller ones to be more debugging
5490 friendly.
5491
5492 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5493
5494 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
5495 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
5496 rather than casting to SCM.
5497
5498 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5499
5500 * sort.c, pairs.h: Removed unnecessary includes.
5501
5502 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5503
5504 * sort.c: Replaced hand-made trampline code by the new official
5505 mechanism from eval.c. This fixes a segfault in the new test file
5506 sort.test.
5507
5508 (quicksort, compare_function, scm_restricted_vector_sort_x,
5509 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
5510 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
5511 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
5512 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
5513 eval.c.
5514
5515 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
5516 cmp_fun_t): Removed.
5517
5518 (compare_function): Added.
5519
5520 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
5521 arithmetics with index arithmetics. Changed quicksort to work on
5522 an array of SCM values instead of an array of characters. Avoid
5523 bytewise copying of SCM elements. Avoid allocating memory on the
5524 stack with alloca. Fixed some comments.
5525
5526 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5527
5528 * eval.c (EXTEND_ENV): Eliminated.
5529
5530 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
5531 EXTEND_ENV.
5532
5533 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5534
5535 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
5536
5537 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
5538 compiling with SCM_DEBUG==1 by moving definition behind prototype.
5539
5540 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
5541 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
5542 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
5543 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
5544 functions such that they check if the object is a non-immediate.
5545 Further, renamed identifiers to use the scm_dbg_ prefix and made
5546 their inclusion into the lib dependent of the
5547 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
5548
5549 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5550
5551 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
5552 debug option.
5553
5554 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5555
5556 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
5557 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
5558 any calls to SCM_NCONSP any more.
5559
5560 * unif.c (l2ra): Eliminate redundant check.
5561
5562 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5563
5564 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
5565 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
5566 SCM_NNULLP. Now, guile itself does not include any calls to
5567 SCM_NNULLP any more.
5568
5569 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5570
5571 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
5572 scm_copy_tree): Place assignment expressions which are part of
5573 other expressions into an expression of their own.
5574
5575 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5576
5577 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5578 compare SCM values with !=.
5579
5580 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5581
5582 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5583 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5584 and definition of the memoizer for the generalized set! macro from
5585 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5586 define the macro object.
5587
5588 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5589 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5590 eval.c, it is made static and renamed to s_set_x.
5591
5592 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5593 over SCM_N<foo>.
5594
5595 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5596
5597 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5598 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5599 to undefineds and registered the object as a permanent object.
5600
5601 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5602 static in eval.c, renamed it to f_apply and registered the object
5603 as a permanent object.
5604
5605 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5606
5607 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5608 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5609
5610 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5611
5612 * numbers.c (scm_logtest): Fixed argument bug in the call to
5613 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5614
5615 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5616
5617 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5618 type errors that showed up when compiling with SCM_DEBUG defined.
5619
5620 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5621
5622 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5623 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5624 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5625 fix compile errors with --disable-deprecated.
5626
5627 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5628
5629 * numbers.c (scm_integer_expt): fix case where we were declaring
5630 vars in the middle of a statement block. Thanks to Thamer
5631 Al-Harbash.
5632
5633 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5634
5635 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5636 change.
5637
5638 * eq.c (scm_eqv_p): Turned into a primitive generic.
5639
5640 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5641
5642 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5643 Thanks to Boyd Gerber.
5644 Added check for __arm__ in addition to arm for LINUX and copied
5645 __s390__ defines from upstream libgc. Thanks to James Treacy for
5646 reporting the problems.
5647
5648 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5649
5650 * socket.c: use SCM_CHAR_BIT.
5651
5652 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5653
5654 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5655
5656 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5657
5658 * feature.c (scm_init_feature): Always add threads feature.
5659
5660 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5661
5662 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5663 scm_at_assert_bound_ref. (We don't want the unbound check. See
5664 oop/goops/active-slot.scm.)
5665
5666 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5667
5668 * tags.h: scm_t_intptr should have been intptr_t.
5669
5670 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5671
5672 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5673 test. Instead use
5674 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5675 as gc_os_dep.c suggests is appropriate.
5676
5677 * goops.c (prep_hashsets): make static to match prototype.
5678 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5679 Chin.
5680
5681 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5682 Albert Chin.
5683
5684 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5685 Klausner.
5686
5687 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5688
5689 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5690 indicated through extra fields in getters-n-setters.
5691 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5692 (Thanks to Andy Wingo.)
5693
5694 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5695
5696 * gc-segment.c: add comment
5697
5698 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5699
5700 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5701 clash.
5702
5703 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5704 and add regression test to standalone/.
5705
5706 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5707
5708 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5709 Thanks to Dale P. Smith.
5710
5711 * random.c: #include gmp.h.
5712 (scm_c_random_bignum): normalize result on return.
5713
5714 * init.c: #include gmp.h.
5715
5716 * numbers.h: remove the gmp.h #include (not needed now).
5717
5718 * posix.h: change occurences of "id" to something else so we don't
5719 cause trouble when included via objective-c (can't hurt, might
5720 help). Still have usage in debug.h, though.
5721
5722 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5723
5724 * random.c (scm_c_random_bignum): Don't generate a random number
5725 equal to m (the second argument of scm_c_random_bignum); only
5726 generate numbers in the range 0 <= r < m.
5727 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5728 scm_var_random_state.
5729
5730 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5731 clause.
5732
5733 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5734
5735 * modules.c (scm_module_import_interface): move declaration of
5736 uses before any code.
5737
5738 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5739
5740 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5741 not top_srcdir.
5742
5743 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5744 processing it in order to avoid an infinite loop.
5745
5746 * print.c (scm_prin1): Remember old state of pstate->writingp.
5747
5748 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5749
5750 * Changed license terms to the plain LGPL thru-out.
5751
5752 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5753
5754 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5755 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5756 rewrite to handle GMP bignums.
5757
5758
5759 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5760
5761 * ports.c (scm_getc): minor tweak.
5762
5763 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5764 rewrite to handle GMP bignums.
5765
5766 * numbers.c: rewrite *many* functions to handle GMP bignums.
5767
5768 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5769 handle GMP bignums.
5770
5771 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5772
5773 * init.c (check_config): remove SCM_BIGDIG conditionals.
5774 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5775
5776 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5777
5778 * eval.c: remove SCM_BIGDIG conditionals.
5779
5780 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5781
5782 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5783
5784 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5785 to Kevin Ryde.)
5786
5787 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5788
5789 * threads.h: fix various preprocessor usages of new public
5790 symbols to expect 0 or 1 values rather than 1 or undefined.
5791 i.e. change #ifdef to #if, etc.
5792
5793 * threads.c: fix various preprocessor usages of new public
5794 symbols to expect 0 or 1 values rather than 1 or undefined.
5795 i.e. change #ifdef to #if, etc.
5796
5797 * tags.h: fix various preprocessor usages of new public
5798 symbols to expect 0 or 1 values rather than 1 or undefined.
5799 i.e. change #ifdef to #if, etc.
5800
5801 * stacks.c: fix various preprocessor usages of new public
5802 symbols to expect 0 or 1 values rather than 1 or undefined.
5803 i.e. change #ifdef to #if, etc.
5804
5805 * stackchk.h: fix various preprocessor usages of new public
5806 symbols to expect 0 or 1 values rather than 1 or undefined.
5807 i.e. change #ifdef to #if, etc.
5808
5809 * stackchk.c: fix various preprocessor usages of new public
5810 symbols to expect 0 or 1 values rather than 1 or undefined.
5811 i.e. change #ifdef to #if, etc.
5812
5813 * sort.c: fix various preprocessor usages of new public
5814 symbols to expect 0 or 1 values rather than 1 or undefined.
5815 i.e. change #ifdef to #if, etc.
5816
5817 * read.c: fix various preprocessor usages of new public
5818 symbols to expect 0 or 1 values rather than 1 or undefined.
5819 i.e. change #ifdef to #if, etc.
5820
5821 * random.c: fix various preprocessor usages of new public
5822 symbols to expect 0 or 1 values rather than 1 or undefined.
5823 i.e. change #ifdef to #if, etc.
5824
5825 * print.c: fix various preprocessor usages of new public
5826 symbols to expect 0 or 1 values rather than 1 or undefined.
5827 i.e. change #ifdef to #if, etc.
5828
5829 * objects.c: fix various preprocessor usages of new public
5830 symbols to expect 0 or 1 values rather than 1 or undefined.
5831 i.e. change #ifdef to #if, etc.
5832
5833 * numbers.h: fix various preprocessor usages of new public
5834 symbols to expect 0 or 1 values rather than 1 or undefined.
5835 i.e. change #ifdef to #if, etc.
5836
5837 * null-threads.c: fix various preprocessor usages of new public
5838 symbols to expect 0 or 1 values rather than 1 or undefined.
5839 i.e. change #ifdef to #if, etc.
5840
5841 * lang.c: fix various preprocessor usages of new public
5842 symbols to expect 0 or 1 values rather than 1 or undefined.
5843 i.e. change #ifdef to #if, etc.
5844
5845 * lang.h: fix various preprocessor usages of new public
5846 symbols to expect 0 or 1 values rather than 1 or undefined.
5847 i.e. change #ifdef to #if, etc.
5848
5849 * iselect.h: fix various preprocessor usages of new public
5850 symbols to expect 0 or 1 values rather than 1 or undefined.
5851 i.e. change #ifdef to #if, etc.
5852
5853 * init.c: fix various preprocessor usages of new public
5854 symbols to expect 0 or 1 values rather than 1 or undefined.
5855 i.e. change #ifdef to #if, etc.
5856
5857 * gh_data.c: fix various preprocessor usages of new public
5858 symbols to expect 0 or 1 values rather than 1 or undefined.
5859 i.e. change #ifdef to #if, etc.
5860
5861 * gh.h: fix various preprocessor usages of new public
5862 symbols to expect 0 or 1 values rather than 1 or undefined.
5863 i.e. change #ifdef to #if, etc.
5864
5865 * gen-scmconfig.c: change most new public symbols to be defined to
5866 0 or 1 rather than being either 1 or undefined.
5867
5868 * gc_os_dep.c: fix various preprocessor usages of new public
5869 symbols to expect 0 or 1 values rather than 1 or undefined.
5870 i.e. change #ifdef to #if, etc.
5871 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5872
5873 * gc.h: fix various preprocessor usages of new public
5874 symbols to expect 0 or 1 values rather than 1 or undefined.
5875 i.e. change #ifdef to #if, etc.
5876
5877 * gc-card.c: fix various preprocessor usages of new public
5878 symbols to expect 0 or 1 values rather than 1 or undefined.
5879 i.e. change #ifdef to #if, etc.
5880
5881 * gc-mark.c: fix various preprocessor usages of new public
5882 symbols to expect 0 or 1 values rather than 1 or undefined.
5883 i.e. change #ifdef to #if, etc.
5884
5885 * feature.c: fix various preprocessor usages of new public
5886 symbols to expect 0 or 1 values rather than 1 or undefined.
5887 i.e. change #ifdef to #if, etc.
5888
5889 * evalext.c: fix various preprocessor usages of new public
5890 symbols to expect 0 or 1 values rather than 1 or undefined.
5891 i.e. change #ifdef to #if, etc.
5892
5893 * eval.h: fix various preprocessor usages of new public
5894 symbols to expect 0 or 1 values rather than 1 or undefined.
5895 i.e. change #ifdef to #if, etc.
5896
5897 * eval.c: fix various preprocessor usages of new public
5898 symbols to expect 0 or 1 values rather than 1 or undefined.
5899 i.e. change #ifdef to #if, etc.
5900
5901 * eq.c: fix various preprocessor usages of new public
5902 symbols to expect 0 or 1 values rather than 1 or undefined.
5903 i.e. change #ifdef to #if, etc.
5904
5905 * coop.c: fix various preprocessor usages of new public
5906 symbols to expect 0 or 1 values rather than 1 or undefined.
5907 i.e. change #ifdef to #if, etc.
5908
5909 * coop-threads.c: fix various preprocessor usages of new public
5910 symbols to expect 0 or 1 values rather than 1 or undefined.
5911 i.e. change #ifdef to #if, etc.
5912
5913 * coop-pthreads.c: fix various preprocessor usages of new public
5914 symbols to expect 0 or 1 values rather than 1 or undefined.
5915 i.e. change #ifdef to #if, etc.
5916
5917 * coop-defs.h: fix various preprocessor usages of new public
5918 symbols to expect 0 or 1 values rather than 1 or undefined.
5919 i.e. change #ifdef to #if, etc.
5920
5921 * convert.i.c: fix various preprocessor usages of new public
5922 symbols to expect 0 or 1 values rather than 1 or undefined.
5923 i.e. change #ifdef to #if, etc.
5924
5925 * continuations.c: fix various preprocessor usages of new public
5926 symbols to expect 0 or 1 values rather than 1 or undefined.
5927 i.e. change #ifdef to #if, etc.
5928
5929 * _scm.h: fix various preprocessor usages of new public symbols to
5930 expect 0 or 1 values rather than 1 or undefined. i.e. change
5931 #ifdef to #if, etc.
5932
5933 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5934
5935 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5936
5937 * deprecated.c, deprecated.h: New files, to collect deprecated
5938 things in one place.
5939 * Makefile.am: Added them in all the right places.
5940
5941 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5942 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5943 builds work.
5944 (DOT_X_FILES): Removed "iselect.x".
5945 (DOT_DOC_FILES): Removed "iselect.doc".
5946
5947 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5948
5949 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5950 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5951
5952 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5953
5954 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5955
5956 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5957 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5958
5959 * threads.h: replace usage of struct timespect with
5960 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5961 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5962 favor of scm_t_timespec from scmconfig.h.
5963
5964 * threads.c: move libguile/_scm.h include to the top so we pick up
5965 any critical defines like _GNU_SOURCE early. Replace usage of
5966 struct timespect with scm_t_timespec. Replace usage of
5967 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5968 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5969
5970 * threads-plugin.h: replace usage of struct timespect with
5971 scm_t_timespec.
5972
5973 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5974 usage of struct timespect with scm_t_timespec.
5975
5976 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5977 HAVE_INTTYPES_H handling to scmconfig.h. #include
5978 "libguile/__scm.h". Rework handling for scm_t_bits,
5979 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5980 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5981 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5982 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5983 SCM_HAVE_ARRAYS.
5984
5985 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5986
5987 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5988
5989 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5990
5991 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5992
5993 * stime.h: move handling of time related headers to scmconfig.h.
5994
5995 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5996
5997 * stacks.c: replace usage of STACK_GROWS_UP with
5998 SCM_STACK_GROWS_UP.
5999
6000 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6001 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6002
6003 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6004 of uint32 and HAVE_UINT_32 with scm_t_int32.
6005
6006 * smob.c: #include <config.h> if HAVE_CONFIG_H.
6007
6008 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
6009
6010 * script.c: #include <config.h> if HAVE_CONFIG_H.
6011
6012 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
6013
6014 * scmconfig.h.top: new file -- preamble for scmconfig.h.
6015
6016 * rw.c: #include <config.h> if HAVE_CONFIG_H.
6017
6018 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
6019
6020 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6021
6022 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
6023
6024 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6025 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
6026 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
6027 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6028
6029 * ramap.c: replace usage of HAVE_LONG_LONGS with
6030 "SCM_SIZEOF_LONG_LONG != 0".
6031
6032 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
6033 "libguile/scmconfig.h".
6034
6035 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
6036
6037 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6038 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6039
6040 * posix.c: #include <config.h> if HAVE_CONFIG_H.
6041
6042 * ports.c: #include <config.h> if HAVE_CONFIG_H.
6043
6044 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6045
6046 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
6047 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
6048 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
6049 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
6050 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
6051 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
6052 "SCM_SIZEOF_LONG_LONG != 0".
6053
6054 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
6055 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
6056 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
6057 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
6058
6059 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
6060
6061 * null-threads.h: replace usage of struct timespect with
6062 scm_t_timespec.
6063
6064 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
6065
6066 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
6067 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
6068 scm_t_uint64 and rename usages.
6069
6070 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
6071
6072 * load.c: #include <config.h> if HAVE_CONFIG_H.
6073
6074 * iselect.h: move handling of time related headers to scmconfig.h.
6075 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
6076 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
6077 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
6078
6079 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6080 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6081 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6082
6083 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
6084
6085 * inline.h: #include "libguile/__scm.h" at the top. Change code
6086 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
6087 what to do instead of creating a new public #define. Rename usage
6088 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
6089 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
6090 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
6091
6092 * inline.c: rearrange handling -- now we just #define
6093 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
6094 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
6095 appropriate, and we use that in inline.h along with the above
6096 define to determine how to respond.
6097
6098 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6099 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6100
6101 * guile.c: #include <config.h> if HAVE_CONFIG_H.
6102
6103 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6104 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6105
6106 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6107
6108 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
6109
6110 * gen-scmconfig.c: new file -- see comments in file for details.
6111
6112 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
6113
6114 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
6115 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6116
6117 * gc.h: replace usage of SIZEOF_LONG with
6118 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
6119 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
6120 since we handle that in scmconfig.h now.
6121
6122 * gc.c: #include <config.h> if HAVE_CONFIG_H.
6123
6124 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6125 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
6126 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6127
6128 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
6129
6130 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6131 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6132
6133 * fports.c: #include <config.h> if HAVE_CONFIG_H.
6134
6135 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
6136
6137 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6138 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
6139
6140 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
6141
6142 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6143 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6144
6145 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
6146 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
6147 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
6148 with "SCM_SIZEOF_LONG_LONG != 0".
6149
6150 * error.c: #include <config.h> if HAVE_CONFIG_H.
6151
6152 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
6153 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
6154 with "SCM_SIZEOF_LONG_LONG != 0".
6155
6156 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
6157
6158 * coop.c: replace usage of struct timespect with scm_t_timespec.
6159 #include <config.h> if HAVE_CONFIG_H.
6160
6161 * coop-threads.c: #include "libguile/_scm.h" early. Replace
6162 usage of struct timespect with scm_t_timespec. Replace usage of
6163 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6164
6165 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
6166 usage of struct timespect with scm_t_timespec. Replace usage of
6167 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
6168
6169 * coop-defs.h: move handling of time related headers to
6170 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
6171 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
6172 timespect with scm_t_timespec.
6173
6174 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6175
6176 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6177
6178 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
6179 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
6180
6181 * continuations.c: move libguile/_scm.h include to the top so we
6182 pick up any critical defines like _GNU_SOURCE early.
6183
6184 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
6185
6186 * async.c: #include <config.h> if HAVE_CONFIG_H.
6187
6188 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
6189
6190 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
6191 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
6192
6193 * __scm.h: move libguile/scmconfig.h include up to the top, so
6194 we're sure to pick up any critical defines like _GNU_SOURCE early.
6195 #include <limits.h> removed in favor of scmconfig.h inclusion when
6196 appropriate. STDC_HEADERS based inclusion of stdlib.h,
6197 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
6198 scmconfig.h inclusion when appropriate. Various Win32 related
6199 definitions removed in favor of scmconfig.h inclusion when
6200 appropriate.
6201 (HAVE_UINTPTR_T): definition removed (see NEWS).
6202 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
6203 (HAVE_LONG_LONGS): definition removed (see NEWS).
6204 (HAVE_LONG_LONG): definition removed (see NEWS).
6205 (HAVE_PTRDIFF_T): definition removed (see NEWS).
6206
6207 * Makefile.am: scmconfig.h is now generated by building and
6208 running gen-scmconfig.h and capturing its output. gen-scmconfig
6209 uses config.h and the configure.in generated gen-scmconfig.h to
6210 decide what to output. See gen-scmconfig.c for details.
6211 (noinst_PROGRAMS): add gen-scmconfig.
6212 (gen_scmconfig_SOURCES): new variable.
6213 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
6214 cross-compiling right.
6215 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
6216 (BUILT_SOURCES): add scmconfig.h.
6217
6218 2003-03-19 Marius Vollmer <mvo@zagadka.de>
6219
6220 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
6221 Adrian Bunk. Thanks!
6222
6223 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6224
6225 * goops.c (make_class_from_template): New fourth arg:
6226 applicablep.
6227 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
6228 cpls.
6229
6230 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
6231
6232 * goops.c, objects.c, objects.h (scm_make_extended_class): New
6233 second arg: applicablep.
6234 (scm_i_inherit_applicable): New function.
6235
6236 * goops.c, goops.h (scm_class_applicable,
6237 scm_class_extended_accessor): New classes.
6238
6239 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6240
6241 * procs.c (scm_procedure_documentation): Removed redundant
6242 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
6243 predicates.
6244
6245 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6246
6247 * list.c, list.h (scm_filter, scm_filter_x): New functions.
6248
6249 * modules.c (scm_module_import_interface): New function.
6250
6251 * goops.c, goops.h (scm_class_accessor_method): Renamed from
6252 scm_class_accessor.
6253 (scm_class_accessor): New class.
6254
6255 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6256
6257 * goops.c (scm_primitive_generic_generic): Enable primitive
6258 generic if not enabled.
6259 (scm_sys_goops_loaded): Setup unextended primitive generics.
6260
6261 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
6262
6263 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
6264 snarf macros.
6265
6266 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
6267 testing example. All uses of SCM_GPROC should be converted.)
6268
6269 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
6270 scm_assoc.
6271
6272 * eq.c (scm_equal_p): Turned into a primitive generic.
6273
6274 2003-02-27 Rob Browning <rlb@defaultvalue.org>
6275
6276 * Makefile.am (scmconfig.h): new target -- generate file from
6277 ../config.h.
6278 (modinclude_HEADERS): remove version.h.
6279 (nodist_modinclude_HEADERS): add version.h.
6280
6281 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6282
6283 This fixes a serious GC bug, introduced during the latest
6284 reorganization of the GC, which disabled freeing of structs and
6285 GOOPS objects:
6286
6287 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
6288 SCM_EOL.
6289 (scm_struct_prehistory): Move scm_free_structs to
6290 scm_before_mark_c_hook.
6291
6292 * gc-card.c (sweep_card): Check that we haven't swept structs on
6293 this card before. That can happen if scm_i_sweep_all_segments has
6294 been called from some other place than scm_igc.
6295
6296 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6297
6298 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
6299 (since hash tables now adapt their size).
6300
6301 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
6302 (current number of prehistory bindings; hashtable code will select
6303 a prime which is greater than this value).
6304
6305 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
6306 (current number of initial symbols).
6307
6308 * properties.c (scm_init_properties): Don't specify size of
6309 scm_properties_whash.
6310
6311 * objprop.c (scm_init_objprop): Don't specify size of
6312 scm_object_whash.
6313
6314 * keywords.c (scm_init_keywords): Don't specify a hash table size.
6315
6316 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
6317
6318 The following changes introduce the use of resizable hash tables
6319 throughout Guile. It also renames the old *-hash-table* functions
6320 to *-alist-vector* and places them, together with the rest of the
6321 weak vector support, in the module (ice-9 weak-vector). We should
6322 probably introduce a new, better, API for weak references, for
6323 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
6324 look like and are used like ordinary pairs.)
6325
6326 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
6327 leaf_environment_fold, obarray_remove_all): Use hashtable
6328 accessors.
6329
6330 * gc.c (scm_init_storage): Moved hook initialization to
6331 scm_storage_prehistory.
6332 (scm_storage_prehistory): New function.
6333 (scm_igc): Added commentary about placement of
6334 scm_after_sweep_c_hook.
6335
6336 * gc-mark.c (scm_mark_all): Use hashtable accessors.
6337 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
6338 SCM_WVECT_WEAK_VALUE_P.
6339
6340 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
6341 functions.
6342 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
6343 Removed.
6344 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
6345 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
6346
6347 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
6348 calls to scm_storage_prehistory and scm_hashtab_prehistory.
6349
6350 * modules.c (module-reverse-lookup): Use hashtable accessors.
6351
6352 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
6353
6354 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
6355 scm_make_weak_value_alist_vector,
6356 scm_make_doubly_weak_alist_vector): New functions.
6357
6358 * weaks.c (scm_init_weaks_builtins): New function.
6359
6360 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
6361 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
6362 SCM_WVECT_NOSCAN_P): New macros.
6363
6364 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
6365 and SCM_WVECT_WEAK_VALUE_P.
6366
6367 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
6368 allocate_weak_vector and exported.
6369
6370 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6371
6372 * hashtab.c: Undid thread safety. (We decided that it's better to
6373 let the user explicitly protect the tables (or not) according what
6374 is suitable for the application.)
6375
6376 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6377
6378 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
6379 thread safe and handle resizing tables.
6380 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
6381 SCM_DEFER/ALLOW_INTS.
6382
6383 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6384
6385 * hashtab.c (scm_vector_to_hash_table,
6386 scm_c_make_resizing_hash_table, scm_make_hash_table): New
6387 functions.
6388 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
6389 safe and handle resizing tables.
6390
6391 * weaks.c (scm_make_weak_key_hash_table,
6392 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
6393 Size argument made optional. Return resizable table if not
6394 specified.
6395
6396 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6397
6398 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6399 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
6400
6401 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6402
6403 * debug.c (scm_procedure_source): Handle all objects for which
6404 procedure? is #t. (Thanks to Bill Schottstaedt.)
6405
6406 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6407
6408 * futures.c (mark_futures): Don't need to mark data of recycled
6409 futures.
6410 (scan_futures, cleanup_undead): Be smarter about marking
6411 futures---avoid unnecessary passes through future lists.
6412
6413 * futures.h, futures.c: New files; Introduced recycling of
6414 futures. For fine-grained threading this lifts performance to
6415 another level. We can now use parallelization in inner loops of
6416 Guile programs without impossible overhead.
6417
6418 * threads.h, threads.c: Moved futures to their own file.
6419
6420 * Makefile.am (libguile_la_SOURCES): Added futures.c.
6421 (DOT_X_FILES): Added futures.x.
6422 (DOT_DOC_FILES): Added futures.doc.
6423 (modinclude_HEADERS): Added futures.h.
6424
6425 * threads.c, threads.h (scm_i_create_thread): Renamed from
6426 create_thread and made global.
6427
6428 * futures.c (scm_make_future): New procedure.
6429
6430 * eval.c: #include "libguile/futures.h".
6431
6432 * init.c: #include "futures.h"
6433 (scm_init_guile_1): Call scm_init_futures.
6434
6435 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
6436
6437 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
6438
6439 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
6440 functions.
6441
6442 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
6443
6444 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6445
6446 * threads.c (create_thread): Don't unwind dynwind chain of parent
6447 thread before creation. Just start the new thread with an empty
6448 dynwind chain.
6449
6450 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6451
6452 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
6453
6454 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6455
6456 * threads.c (scm_timed_wait_condition_variable): Support timed
6457 waiting also for simple condition variables.
6458
6459 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
6460 of calling the procedure change-object-class.
6461
6462 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6463
6464 * ramap.c (scm_ramapc): Typo in error message.
6465
6466 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6467
6468 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
6469 slots with instance allocation.
6470
6471 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
6472 class.
6473 (scm_compute_applicable_methods): Use scm_generic_function_methods.
6474
6475 * goops.c (scm_generic_function_methods): Support extended
6476 generic functions.
6477
6478 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6479
6480 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
6481 Thanks to Neil for pointing this out!
6482
6483 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
6484
6485 * lang.h: Remove declarations matching definitions removed from
6486 lang.c (just below).
6487
6488 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
6489
6490 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
6491 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
6492 and already commented out.
6493
6494 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
6495 scm_lreadparen): Support reading vectors with Elisp syntax if
6496 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
6497 is not currently defined, and there isn't even a configure switch
6498 to enable it yet.)
6499
6500 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6501
6502 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
6503 builds work.
6504 (EXTRA_DIST): Added version.h.in.
6505
6506 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6507
6508 This change makes it possible for one thread to do lazy sweeping
6509 while other threads are running. Now only the mark phase need to
6510 have all threads asleep. We should look further into this issue.
6511 Presently, I've put the locking of scm_i_sweep_mutex at
6512 "conservative" places due to my current lack of knowledge about
6513 the garbage collector. Please feel free to restrict these regions
6514 further to allow for maximal parallelism!
6515
6516 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
6517
6518 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
6519 scm_gc_register_collectable_memory): Substitute locking of
6520 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
6521 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
6522 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
6523 the single-thread section (which now only contains the mark
6524 phase).
6525 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
6526 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
6527
6528 * threads.c (gc_section_mutex): Removed.
6529
6530 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6531
6532 * threads.c (create_thread): Clear parent field in root state in
6533 order not to unnecessarily remember dead threads.
6534
6535 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
6536 (scm_trampoline_1, scm_trampoline_2): Use them.
6537
6538 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6539
6540 Partial introduction of real plugin interface.
6541
6542 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
6543 (EXTRA_DIST): Added threads-plugin.c.
6544
6545 * threads-plugin.h, threads-plugin.c: New files.
6546
6547 * threads.h: #include "libguile/threads-plugin.h".
6548
6549 * threads.c: #include "libguile/threads-plugin.c".
6550
6551 * pthread-threads.c: Temporarily remove debugging functions.
6552
6553 * threads.c, threads.h (scm_yield): Added back.
6554
6555 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6556
6557 * threads.c (really_launch): Detach before unlocking
6558 thread_admin_mutex in order not to risk being joined.
6559 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
6560 thread_admin_mutex locked during GC.
6561
6562 * pthread-threads.c, pthread-threads.h: Improvements to debugging
6563 functions.
6564
6565 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6566
6567 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
6568 support for debugging mutex operations.
6569
6570 * threads.c (scm_thread): Removed filed joining_threads.
6571 (thread_print): Print thread number as well as address of thread
6572 structure.
6573 (scm_join_thread): Bugfix.
6574 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
6575 scm_timed_wait_condition_variable, scm_signal_condition_variable,
6576 scm_broadcast_condition_variable): Use the low-level API.
6577 (scm_all_threads): Return copy of thread list (to prevent
6578 unintended destruction).
6579 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6580
6581 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6582 pthread "native" recursive mutex support.
6583
6584 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6585
6586 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6587 Simply lock a thread C API recursive mutex.
6588 (SCM_NONREC_CRITICAL_SECTION_START,
6589 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6590 SCM_REC_CRITICAL_SECTION_END): Removed.
6591
6592 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6593 direct calls to scm_rec_mutex_lock / unlock around the three calls
6594 to scm_m_expand_body.
6595
6596 * eval.c, eval.h (promise_free): New function.
6597 (scm_force): Rewritten; Now thread-safe; Removed
6598 SCM_DEFER/ALLOW_INTS.
6599
6600 * pthread-threads.h: Added partially implemented plugin interface
6601 for recursive mutexes. These are, for now, only intended to be
6602 used internally within the Guile implementation.
6603
6604 * pthread-threads.c: New file.
6605
6606 * threads.c: Conditionally #include "pthread-threads.c".
6607
6608 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6609 thread-safe;
6610
6611 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6612 SCM_GLOBAL_REC_MUTEX): New macros.
6613
6614 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6615 macros---use mutexes instead.
6616
6617 * tags.h (SCM_IM_FUTURE): New tag.
6618
6619 * eval.c (scm_m_future): New primitive macro.
6620 (SCM_CEVAL): Support futures.
6621 (unmemocopy): Support unmemoization of futures.
6622
6623 * print.c (scm_isymnames): Name of future isym.
6624
6625 * version.c: Unmade some changes to my private copy that got
6626 committed by mistake.
6627
6628 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6629
6630 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6631 2002-12-10.
6632
6633 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6634
6635 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6636 logical place.
6637
6638 * threads.c (create_thread): Remember root object until the handle
6639 of the new thread is on all_threads list.
6640
6641 * root.c (scm_make_root): Moved copying of fluids until after
6642 creation of root handle so that the fluids are GC protected. Also
6643 removed the critical section.
6644
6645 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6646
6647 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6648
6649 * gc-malloc.c (malloc_mutex): New mutex.
6650 (scm_gc_malloc_prehistory): Initialize it.
6651 (scm_realloc): Serialize call to realloc
6652 (scm_calloc): Same for calloc.
6653 Thanks to Wolfgang Jaehrling!
6654 (Now we have to make sure all calls to malloc/realloc are made
6655 through scm_malloc.)
6656
6657 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6658
6659 * threads.c (really_launch): Release heap (to prevent deadlock).
6660 (create_thread): Release heap before locking thread admin mutex.
6661
6662 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6663
6664 * threads.c (scm_i_thread_invalidate_freelists): New
6665 function.
6666
6667 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6668
6669 * modules.c (scm_export): Inserted a return statement.
6670
6671 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6672
6673 * modules.c (scm_export): new function
6674
6675 * gc-card.c: add a note about malloc()/free() overhead.
6676
6677 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6678
6679 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6680 in srcdir.
6681
6682 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6683
6684 These changes remove scm_ints_disabled (which hasn't has any
6685 effect in Guile for quite some time).
6686
6687 * async.c, error.h (scm_ints_disabled): Removed.
6688
6689 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6690 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6691 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6692 (old_ints): Removed.
6693
6694 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6695 critical section.
6696 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6697 SCM_ALLOW_INTS.
6698
6699 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6700
6701 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6702 Removed accidental #if 0 around these functions.
6703
6704 These changes are the start of support for preemptive
6705 multithreading. Marius and I have agreed that I commit this code
6706 into the repository although it isn't thoroughly tested and surely
6707 introduces many bugs. The bugs should only be exposed when using
6708 threads, though. Signalling and error handling for threads is
6709 very likely broken. Work on making the implementation cleaner and
6710 more efficient is needed.
6711
6712 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6713 (SCM_NONREC_CRITICAL_SECTION_START,
6714 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6715 SCM_REC_CRITICAL_SECTION_END): New macros.
6716 (SCM_CRITICAL_SECTION_START/END): Defined here.
6717
6718 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6719 the three calls to scm_m_expand_body.
6720
6721 * gc.h: #include "libguile/pthread-threads.h";
6722 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6723
6724 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6725 scm_t_key;
6726
6727 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6728 access.
6729
6730 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6731
6732 * gc-freelist.c, threads.c (really_launch): Use
6733 SCM_FREELIST_CREATE.
6734
6735 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6736
6737 * gc.c (scm_i_expensive_validation_check, scm_gc,
6738 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6739 heap administration so that those pieces of code are executed
6740 single-threaded. We might consider rewriting these code sections
6741 in terms of a "call_gc_code_singly_threaded" construct instead of
6742 calling the pair of scm_i_thread_put_to_sleep () and
6743 scm_i_thread_wake_up (). Also, we would want to have as many of
6744 these sections eleminated.
6745
6746 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6747
6748 * inline.h: #include "libguile/threads.h"
6749
6750 * pthread-threads.h: Macros now conform more closely to the
6751 pthreads interface. Some of them now take a second argument.
6752
6753 * threads.c, threads.h: Many changes.
6754
6755 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6756
6757 * Makefile.am (version.h): Changed $^ --> $< in rule for
6758 version.h.
6759
6760 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6761
6762 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6763 (SCM_MINOR_VERSION): use @--@ substitution now.
6764 (SCM_MICRO_VERSION): use @--@ substitution now.
6765 (scm_effective_version): new function prototype.
6766
6767 * version.c (scm_effective_version): new function, also add
6768 effective-version.
6769
6770 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6771 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6772 SCM_LIBRARY_DIR.
6773 (version.h): generate this here rather than configure.in. This
6774 approach tracks source edits better (i.e. more immediately).
6775 Might be worth considering for other .in files too.
6776
6777 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6778
6779 Reorganized thread package selection. A thread package now only
6780 implements a small set of pthread like functions and Guile
6781 implements the rest on top of that. Guile's implementation is
6782 what the "coop-pthreads" package has been previously. Support for
6783 "coop" threads has been removed until I get time to add it again.
6784
6785 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6786 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6787 null-threads.c, coop-pthreads.c.
6788 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6789 pthread-threads.h.
6790
6791 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6792
6793 * threads.h: Do not include "libguile/coop-defs.h". Include
6794 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6795 (previously deprecated) C level thread API prototypes. They are
6796 now in the thread package specific headers, "null-threads.h" and
6797 "pthread-threads.h".
6798 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6799 New.
6800 (scm_threads_init): Removed.
6801 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6802 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6803 SCM_I_THREAD_SWITCH_COUNT): Define here.
6804 (scm_single_thread_p): Removed.
6805 (scm_call_with_new_thread): Take two args directly instead of list
6806 of two args.
6807 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6808 SCM_SET_THREAD_LOCAL_DATA): Define here.
6809
6810 * threads.c: Merged with "coop-pthreads.c".
6811
6812 * null-threads.h: Implement pthread-like API as a set of macros.
6813
6814 * pthread-threads.h: New, implement pthread-like API by deferring
6815 to pthread itself.
6816
6817 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6818 has been lost in the reorganization.
6819
6820 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6821
6822 The following change makes it possible to move procedure
6823 application dispatch outside inner loops. The motivation was
6824 clean implementation of efficient replacements of R5RS primitives
6825 in SRFI-1.
6826
6827 The semantics is clear: scm_trampoline_N returns an optimized
6828 version of scm_call_N (or NULL if the procedure isn't applicable
6829 on N args).
6830
6831 Applying the optimization to map and for-each increases efficiency
6832 noticeably. For example, (map abs ls) is 8 times faster than
6833 before.
6834
6835 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6836
6837 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6838
6839 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6840 (map, for-each): Handle also application on two args as a special
6841 case; Use trampolines.
6842
6843 Other changes:
6844
6845 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6846 (subr2oless): Removed.
6847 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6848 vector GC protected.
6849
6850 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6851 scm_out_of_range.
6852
6853 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6854
6855 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6856
6857 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6858
6859 * debug.c (scm_make_iloc): Added missing "return".
6860
6861 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6862
6863 * strports.c (scm_eval_string_in_module): Validate second arg to
6864 be a module. Thanks to Arno Peters!
6865
6866 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6867
6868 * .cvsignore: remove goops.c
6869
6870 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6871
6872 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6873 module_variable, scm_module_lookup_closure,
6874 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6875 scm_system_module_env_p): Don't compare SCM values with C
6876 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6877 over SCM_NFALSEP.
6878
6879 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6880
6881 * eval.h (SCM_MAKE_ILOC): New macro.
6882
6883 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6884 the iloc bitpattern here.
6885
6886 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6887
6888 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6889 part of the API, otherwise it's difficult to write Guile
6890 extensions using non-blocking I/O => moved #include
6891 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6892
6893 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6894 s_unlock_mutex.
6895
6896 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6897
6898 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6899 are defined in configure.in.
6900
6901 * threads.c: Removed SCM_API from function definitions. SCM_API
6902 is only for declarations.
6903
6904 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6905
6906 * coop-pthreads.h: Added support for thread specific data to the
6907 generic C API for the coop-pthreads case.
6908
6909 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6910 change.
6911 (scm_cond_broadcast): Added missing function.
6912
6913 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6914
6915 * coop.c (coop_next_runnable_thread): Removed, wich should have
6916 happened when GUILE_ISELECT was hard-wired.
6917
6918 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6919
6920 * Makefile.am (libguile_la_SOURCES): Added threads.c
6921 (DOT_DOC_FILES): Added threads.doc.
6922 (DOT_X_FILES): Added threads.x.
6923 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6924 (noinst_HEADERS): Added coop-pthreads.c.
6925 (modinclude_HEADERS): Added coop-pthreads.h.
6926
6927 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6928 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6929
6930 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6931 Thanks to Bill Schottstaedt!
6932
6933 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6934
6935 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6936 SCM_COPT_THREADS is defined.
6937 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6938 is defined.
6939
6940 * coop-pthreads.c: Some harmless renamings of internal stuff.
6941 (create_thread): New, generalized version of
6942 scm_call_with_new_thread.
6943 (scm_call_with_new_thread): Use it.
6944 (scm_spawn_thread): New, use create_thread.
6945
6946 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6947
6948 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6949 start testing it now.
6950
6951 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6952 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6953 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6954 is defined.
6955
6956 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6957
6958 * scmsigs.c (signal_cell_handlers, install_handler_data,
6959 scm_delq_spine_x, really_install_handler, install_handler): New
6960 scheme for triggering signal handlers, to simplify take_signal.
6961 (take_signal): Simplified, to avoid race conditions.
6962 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6963 hasn't exited yet.
6964
6965 * async.c (scm_async_click): Reset pending_asyncs, handle
6966 signal_asyncs. Don't set cdr of a non-signal async to #f.
6967 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6968 always. Set pending_asyncs.
6969 (scm_system_async_mark_for_thread): Check that thread has not
6970 exited.
6971 (scm_unmask_signals, decrease_block): Call scm_async_click after
6972 block_asyncs becomes zero.
6973
6974 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6975 active_asyncs.
6976
6977 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6978 fields.
6979 * root.c (root_mark): Mark them.
6980 (make_root): Initialize them.
6981
6982 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6983 USE_COOP_THREADS.
6984 (scm_internal_select): Define one version for USE_COOP_THREADS and
6985 one for USE_NULL_THREADS.
6986 (scm_init_iselect): Likewise.
6987
6988 * inline.h (scm_cell, scm_double_cell): Also allow
6989 USE_COPT_THREADS to not protect the slot initializers.
6990
6991 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6992 because threads need to be initialized before the stack, but
6993 gsubrs such as scm_timed_condition_variable_wait can only be
6994 created later.
6995
6996 * threads.h: Include "coop-pthreads.h" when requested.
6997 (scm_threads_make_mutex, scm_threads_lock_mutex,
6998 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6999 not implemented anyway.
7000 (scm_init_thread_procs, scm_try_mutex,
7001 scm_timed_condition_variable_wait,
7002 scm_broadcast_condition_variable, scm_c_thread_exited_p,
7003 scm_thread_exited_p): New prototypes.
7004 (struct timespec): Define if not already defined.
7005 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7006 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7007 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7008 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
7009 deprecated.
7010
7011 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
7012 requested.
7013 (scm_thread_exited_p): New.
7014 (scm_try_mutex, scm_broadcast_condition_variable): Newly
7015 registered procedures.
7016 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
7017 Use the latter as the procedure for "wait-condition-variable",
7018 thus offering a optional timeout parameter to Scheme.
7019 (scm_wait_condition_variable): Implement in terms of
7020 scm_timed_wait_condition_variable.
7021 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7022 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
7023 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7024 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
7025 scm_make_mutex, etc, and deprecate.
7026 (scm_init_threads): Do not create smobs, leave this to
7027 scm_threads_init. Do not include "threads.x" file.
7028 (scm_init_thread_procs): New, include "threads.x" here.
7029
7030 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
7031 scm_null_mutex_lock, scm_null_mutex_unlock,
7032 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
7033 scm_null_condvar_wait, scm_null_condvar_signal,
7034 scm_null_condvar_destroy): Removed.
7035 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
7036 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
7037 scm_cond_destory): Do not define, they are now deprecated and
7038 handled by threads.{h,c}.
7039
7040 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
7041 (scm_threads_init): Create smobs here, using the appropriate
7042 sizes.
7043 (block): Removed, now unused.
7044 (scm_c_thread_exited_p): New.
7045 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
7046 scm_null_mutex_destroy, scm_null_condvar_init,
7047 scm_null_condvar_wait, scm_null_condvar_signal,
7048 scm_null_condvar_destroy): Removed and updated users to do their
7049 task directly.
7050 (scm_try_mutex, timeval_subtract,
7051 scm_timed_wait_condition_variable,
7052 scm_broadcast_condition_variable): New.
7053 (scm_wait_condition_variable): Removed.
7054
7055 * coop-defs.h (coop_m): Added 'level' field.
7056 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
7057 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
7058 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
7059 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
7060 define.
7061 (coop_condition_variable_broadcast): New.
7062
7063 * coop-threads.c (scm_threads_init): Create smobs here, using the
7064 appropriate sizes.
7065 (scm_c_thread_exited_p, scm_try_mutex,
7066 scm_timed_wait_condition_variable,
7067 scm_broadcast_condition_variable): New.
7068 (scm_wait_condition_variable): Removed.
7069
7070 * coop.c (coop_new_mutex_init): Initialize level.
7071 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
7072 level.
7073 (coop_condition_variable_signal): Renamed to
7074 coop_condition_variable_broadcast and reimplemented in terms of
7075 that. Thus...
7076 (coop_condition_variable_broadcast): New.
7077
7078 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
7079
7080 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
7081
7082 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
7083
7084 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
7085 of system headers.
7086
7087 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
7088 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
7089 give better error messages. Thanks to Bill Schottstaedt!
7090
7091 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7092
7093 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
7094 scm_definedp to scm_defined_p and deprecated scm_definedp.
7095
7096 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
7097
7098 * async.h, async.c (scm_system_async): Fixed deprecation to work
7099 correctly when deprecated features are excluded.
7100
7101 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7102
7103 * async.c (scm_system_async_mark_for_thread): Validate thread
7104 argument.
7105
7106 * coop-threads.c (scm_i_thread_root): Do not validate argument.
7107
7108 * feature.c (scm_init_feature): Don't add 'threads' for
7109 USE_NULL_THREADS.
7110
7111 * inline.h (scm_cell, scm_double_cell): Also allow
7112 USE_NULL_THREADS to not protect the slot initializers.
7113
7114 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
7115 "USE_THREAD".
7116
7117 * Makefile.am (noinst_HEADERS): Added null-threads.c.
7118 (modinclude_HEADERS): Added null-threads.h.
7119
7120 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
7121 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
7122 (scm_init_threads): Use generic type names scm_t_mutex and
7123 scm_t_cond instead of coop_m and coop_c.
7124
7125 * null-threads.c, null-threads.h: New files.
7126
7127 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
7128
7129 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
7130 This is to support makes that know about "$<" only in pattern
7131 rules, like Sun's make.
7132
7133 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
7134
7135 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
7136 substitution. Thanks to David Allouche!
7137
7138 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7139
7140 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
7141 !SCM_ENABLE_DEPRECATED.
7142
7143 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7144
7145 * async.c (scm_system_async_mark_for_thread): Only call
7146 scm_i_thread_root when USE_THREADS is defined. Use scm_root
7147 otherwise.
7148
7149 * scmsigs.c (take_signal): Only call scm_i_thread_root when
7150 USE_THREADS is defined. Use scm_root otherwise.
7151 (scm_sigaction_for_thread): Ignore THREAD argument when
7152 USE_THREADS is not defined. Also, move THREAD argument defaulting
7153 out of HAVE_SIGACTION section, which was a bug.
7154
7155 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7156
7157 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
7158 signal_handlers, not the closure that is used as the async.
7159 The closure is stored in signal_handler_cells, as previously.
7160
7161 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
7162
7163 * root.h (scm_root_state): Added 'block_async' slot.
7164 (scm_active_asyncs): Removed abbrev.
7165 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
7166
7167 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
7168 abbrev.
7169
7170 * async.h (scm_call_with_blocked_asyncs,
7171 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
7172 scm_c_call_with_unblocked_asyncs): New prototypes.
7173 (scm_mask_signals, scm_unmask_signals): Deprecated.
7174 (scm_mask_ints): Turned into a macro.
7175 * async.c (scm_mask_ints): Removed.
7176 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
7177 this should not be necessary.
7178 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
7179 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
7180 deprecation warning and check for errornous use. Set block_asyncs
7181 instead of scm_mask_ints.
7182 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
7183 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
7184 scm_c_call_with_unblocked_asyncs): New.
7185
7186 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
7187 Asyncs are enabled by default.
7188
7189 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
7190
7191 * vports.c (scm_make_soft_port): Allow vector argument to carry a
7192 6th element: an input waiting thunk.
7193 (sf_input_waiting): New.
7194
7195 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
7196
7197 * root.c (root_mark): Mark active_asyncs slot.
7198
7199 * async.c (scm_async_click): Set the cdr of a executed handler
7200 cell to SCM_BOOL_F, not SCM_EOL.
7201 (scm_i_queue_async_cell): Queue the cell at the end of the list,
7202 and only if the handler procedure is not already present.
7203 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
7204 with SCM_BOOL_F.
7205 * scmsigs.c (scm_sigaction_for_thread): Likewise.
7206
7207 2002-10-04 Rob Browning <rlb@defaultvalue.org>
7208
7209 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
7210
7211 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
7212 scm_lt_dlopenext, and scm_lt_dlerror.
7213 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
7214 and scm_lt_dlerror.
7215 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
7216 and scm_lt_dlerror.
7217 (sysdep_dynl_init): switch to scm_lt_dlinit();
7218
7219 * Makefile.am (libguile_la_LIBADD): switch to use
7220 libguile-ltdl.la.
7221
7222 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
7223
7224 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
7225
7226 * scmsigs.h (scm_sigaction_for_thread): New prototype.
7227 * scmsigs.c (got_signal): Removed.
7228 (signal_handler_cells, signal_handler_threads): New.
7229 (take_signal): Queue the cell of the signal for the specified
7230 thread. Reset the signal handler on systems that don't have
7231 sigaction.
7232 (sys_deliver_signals): Removed.
7233 (close_1): New.
7234 (scm_sigaction_for_thread): Renamed from scm_sigaction and
7235 extended to also set the thread of a signal and allocate a cell
7236 for it. Keep the Scheme name "sigaction". Check that signum is
7237 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
7238 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
7239 (scm_init_scmsigs): Allocate signal_handler_cells and
7240 signal_handler_threads vectors.
7241
7242 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
7243 that system asnycs and user asyncs are separated. Reimplemented
7244 system asyncs to work per-thread.
7245
7246 * gc.c (scm_init_gc): Do not use scm_system_async.
7247
7248 * async.h (scm_asyncs_pending, scm_set_tick_rate,
7249 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
7250 Removed prototypes.
7251 (scm_i_queue_async_cell): New.
7252
7253 * __scm.h (scm_asyncs_pending_p): Removed.
7254 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
7255 scm_asyncs_pending_p.
7256
7257 * async.h (scm_system_async_mark_for_thread): New prototype.
7258
7259 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
7260
7261 * root.h (scm_root_state): Added new "active_asyncs" slot.
7262 * root.c (scm_make_root): Initialize it to SCM_EOL.
7263
7264 * coop-defs.h (coop_t): Added new "handle" slot.
7265 * coop-threads.c (all_threads, scm_current_thread,
7266 scm_all_threads, scm_i_thread_root): New.
7267 (scm_threads_init): Add main thread to all_threads.
7268 (scheme_launch_thread): Remove thread from all_threads when it
7269 terminates.
7270 (scm_call_with_new_thread): Initialize handle slot of coop_t
7271 structure and add new thread to all_threads.
7272 (scm_spawn_thread): Likewise.
7273
7274 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
7275 * threads.c (scm_current_thread, scm_all_threads): Register as
7276 primitives.
7277
7278 * dynl.c: Use scm_lt_ prefix for libltdl functions.
7279
7280 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
7281
7282 * script.c (scm_compile_shell_switches): Fix bad spelling of
7283 `explicitly' in comment.
7284
7285 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
7286
7287 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
7288 Refer to provided? in doc string rather than deprecated feature?.
7289
7290 2002-09-24 Gary Houston <ghouston@arglist.com>
7291
7292 * inline.h (scm_double_cell): prevent reordering of statements
7293 with any following code (for GCC 3 strict-aliasing).
7294 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
7295 the earlier version of the reordering prevention.
7296
7297 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7298
7299 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
7300
7301 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7302
7303 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
7304 protection.
7305
7306 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7307
7308 * inline.h: include stdio.h
7309
7310 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
7311
7312 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7313
7314 * gc-segment.c (scm_i_make_initial_segment): check user settings
7315 for sanity.
7316
7317 * gc-malloc.c (scm_gc_init_malloc): check user settings for
7318 sanity.
7319
7320 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
7321
7322 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
7323
7324 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
7325 these won't ever wrap around with high memory usage. Thanks to
7326 Sven Hartrumpf for finding this.
7327
7328 * gc-freelist.c: include <stdio.h>
7329
7330 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
7331
7332 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
7333
7334 * vectors.h (SCM_VECTOR_REF): New.
7335
7336 * snarf.h (SCM_DEFINE_PUBLIC): New.
7337
7338 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
7339
7340 * socket.c (scm_addr_vector): Added size of address to arguments.
7341 Use it to avoid accessing a non-existent path in a sockaddr_un.
7342 Changed all callers.
7343
7344 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7345
7346 * gc.h: remove DOUBLECELL card flags.
7347
7348 * gc-malloc.c (scm_calloc): try to use calloc() before calling
7349 scm_realloc().
7350
7351 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
7352 init loop; handle this from scm_init_card_freelist()
7353
7354 * gc-card.c (scm_init_card_freelist): init bit vector here.
7355
7356 * numbers.c (scm_make_real): prevent reordering of statements
7357 num2float.i.c (FLOAT2NUM): idem
7358
7359 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7360
7361 * eval.h: prepend libguile/ to include path
7362
7363 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
7364
7365 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
7366 years. Thanks to Martin Grabmüller!
7367
7368 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7369
7370 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
7371 unsigned numbers for computing minimum heap increment. This
7372 prevents weird results when a a negative minimum increment is
7373 computed.
7374
7375 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
7376
7377 * gc_os_dep.c: When we have __libc_stack_end, use that directly
7378 instead of the old tricks.
7379
7380 * guile-snarf.in: Do not expect the input file to be the first
7381 argument after the optional "-o" option, just pass everything to
7382 the pre-processor without extracting the input file name.
7383
7384 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7385
7386 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
7387 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
7388
7389 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7390
7391 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
7392 Bill Schottstaedt for the bug report
7393
7394 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
7395
7396 * print.c (scm_iprin1): Print primitives generics always as
7397 "primitive-generic" even when they have no primitive methods yet.
7398
7399 2002-08-17 Gary Houston <ghouston@arglist.com>
7400
7401 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
7402 call.
7403
7404 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7405
7406 * ports.c (scm_add_to_port_table): small bugfix.
7407
7408 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
7409 malloc.
7410
7411 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
7412 only use SCM_MIN_HEAP_SEG_SIZE.
7413
7414 * ports.c (scm_add_to_port_table): add backwards compatibility
7415 function
7416
7417 * ports.h: use scm_i_ prefix for port table and port table size.
7418
7419 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
7420
7421 * vports.c (scm_make_soft_port): Initialize pt variable.
7422
7423 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
7424
7425 * strports.h (scm_c_eval_string_in_module,
7426 scm_eval_string_in_module): New prototypes.
7427 * strports.c (scm_eval_string_in_module): New, but use
7428 "eval-string" as the Scheme name and make second parameter
7429 optional.
7430 (scm_eval_string): Implement using scm_eval_string_in_module.
7431 (scm_c_eval_string_in_module): New.
7432 Thanks to Ralf Mattes for the suggestion!
7433
7434 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7435
7436 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
7437 message and abort.
7438
7439 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
7440
7441 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
7442 stead of scm_t_port*. The function now takes a tag argument.
7443
7444 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7445
7446 * gc.h: add scm_debug_cells_gc_interval to public interface
7447
7448 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
7449
7450 * gc.c (scm_i_expensive_validation_check): separate expensive
7451 validation checks from cheap ones.
7452
7453 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7454
7455 * read.c (scm_input_error): new function: give meaningful error
7456 messages, and throw read-error
7457
7458 * gc-malloc.c (scm_calloc): add scm_calloc.
7459
7460 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7461
7462 * tags.h: remove GC bits documentation from the tags table.
7463
7464 * read.c (INPUT_ERROR): Prepare for file:line:column error
7465 messages for errors in scm_lreadr() and friends.
7466
7467 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7468
7469 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
7470 implementation).
7471 (scm_gc_calloc): new function
7472
7473 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7474
7475 * ports.c (scm_new_port_table_entry): init port entry to 0
7476 completely.
7477
7478 * ports.c (scm_new_port_table_entry): change function from
7479 scm_add_to_port_table. This prevents cells with null-pointers from
7480 being exposed to GC.
7481
7482 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
7483 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
7484
7485 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
7486 to gc-stats.
7487
7488 * numbers.c (big2str): return "0" for 0 iso. ""
7489
7490 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
7491 private-gc.h: new file
7492
7493 * gc.c: completely revised and cleaned up the GC. It now uses lazy
7494 sweeping. More documentation in workbook/newgc.text
7495
7496 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7497
7498 * random.c (rstate_free): Return zero.
7499
7500 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7501
7502 * environments.c (remove_key_from_alist): Removed.
7503
7504 (obarray_remove): Simplified.
7505
7506 2002-07-24 Stefan Jahn <stefan@lkcc.org>
7507
7508 * continuations.h: ia64: Include <signal.h> before
7509 <sys/ucontext.h>.
7510
7511 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7512
7513 * modules.c (scm_sym2var): Don't compare SCM values with ==.
7514
7515 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7516
7517 * goops.c (scm_compute_applicable_methods): use
7518 scm_remember_upto_here_1 iso scm_remember_upto_here
7519
7520 * macros.c: include deprecation.h
7521
7522 * vectors.c (scm_vector_move_right_x): remove side effect in
7523 macro arg.
7524 (scm_vector_move_left_x): idem.
7525
7526 * net_db.c, posix.c, socket.c: variable naming: change ans to
7527 result.
7528
7529 * sort.c (scm_merge_vector_x): accept vector as argument
7530 iso. SCM*. This is needed for full GC correctness.
7531
7532 * gc.h: undo previous undocumented changes related to #ifdef
7533 GENGC.
7534
7535 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7536
7537 * *.c: add space after commas everywhere.
7538
7539 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
7540 Document cases where SCM_WRITABLE_VELTS() is used.
7541
7542 * vectors.h (SCM_VELTS): prepare for write barrier, and let
7543 SCM_VELTS() return a const pointer
7544 (SCM_VECTOR_SET): add macro.
7545
7546 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7547
7548 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
7549 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
7550 Deprecated the special kind of built-in dynamic syntax transformer
7551 that was inaccurately named "macro". Note: The built-in syntax
7552 transformers that are named "mmacro" or "memoizing-macro" still
7553 exist, and it is these which come much closer to what one would
7554 call a macro.
7555
7556 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
7557
7558 * eval.c (unmemocopy): Fix for
7559 1001-local-eval-error-backtrace-segfaults (unmemoization crash
7560 with internal definitions and local-eval).
7561
7562 2002-07-12 Gary Houston <ghouston@arglist.com>
7563
7564 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
7565 defined. They don't do anything useful, especially since the
7566 only case where DYNAMIC_LINKING is undefined seems to be
7567 when --with-modules=no is given to configure, which is basically
7568 requesting that the "dynamic linking module" be omitted.
7569
7570 * Makefile.am (libguile_la_SOURCES): move dynl.c from
7571 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
7572
7573 * extensions.c (load_extension): check DYNAMIC_LINKING for
7574 scm_dynamic_call.
7575 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
7576 scm_init_dynamic_linking.
7577
7578 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7579
7580 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7581 check for Cygwin when including <winsock2.h>, this is already
7582 check for by configure. Thus, revert change from 2002-07-07.
7583
7584 2002-07-10 Gary Houston <ghouston@arglist.com>
7585
7586 * eq.c: include <string.h>
7587 * dynl.c: docstring editing.
7588
7589 2002-07-09 Gary Houston <ghouston@arglist.com>
7590
7591 * dynl.c (scm_dynamic_call): docstring editing.
7592
7593 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7594
7595 * gc_os_dep.c: HURD fixes.
7596
7597 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7598
7599 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7600
7601 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7602 this should be compiled for BUILD host.
7603 Override default rule for
7604 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7605 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7606 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7607
7608 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7609 <winsock2.h> on Cygwin even when we have it.
7610
7611 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7612
7613 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7614 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7615 the code. Full number of arguments checking of closures is
7616 mandatory now. However, the option to disable the checking has
7617 most probably not been used anyway.
7618
7619 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7620
7621 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7622 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7623 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7624 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7625 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7626 (scm_source_properties, scm_set_source_properties_x,
7627 scm_source_property): Removed compile time option SCM_RECKLESS to
7628 clean up the code. Full number of arguments checking of closures
7629 is mandatory now. However, the option to disable the checking has
7630 most probably not been used anyway.
7631
7632 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7633 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7634
7635 2002-06-30 Gary Houston <ghouston@arglist.com>
7636
7637 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7638 do anything useful. Added a comment about need for a mutex if
7639 pre-emptive threading is supported.
7640
7641 * posix.c (scm_convert_exec_args), dynl.c
7642 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7643 allocate_string_pointers. 2) simplified: don't reallocate the
7644 strings, just make an array of pointers 3) avoid memory leaks on
7645 error 4) let the procedure report errors in its own name.
7646 Consequences: 1) the procedures now assume that SCM strings are
7647 nul-terminated, which should always be the case. 2) Since strings
7648 are not reallocated, it's now possible for strings passed to
7649 dynamic-args-call to be mutated.
7650
7651 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7652
7653 * __scm.h, eval.c, eval.h: Removed compile time option
7654 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7655 variable positions during memoization is mandatory. However, the
7656 option to disable the caching has most probably not been used
7657 anyway.
7658
7659 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7660
7661 * print.c (scm_simple_format): Print missing part of format before
7662 ~% control. Thanks to Daniel Skarda!
7663
7664 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7665
7666 * mkstemp.c: Added exception notice to license statement.
7667
7668 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7669
7670 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7671 it is represented as a floating point value so that we can change
7672 its sign.
7673
7674 From John W. Eaton <jwe@bevo.che.wisc.edu>
7675
7676 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7677
7678 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7679
7680 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7681 in addition to `i386'. Thanks to Dale P. Smith.
7682
7683 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7684
7685 * eq.c (real_eqv): New.
7686 (scm_eqv_p): Use it when comparing reals and complexes.
7687
7688 * numbers.c: Include <string.h>, for strncmp.
7689 (mem2complex): Do not create negative NaNs.
7690 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7691 NaN.
7692 (scm_inexact_to_exact): Signal error when converting a NaN.
7693
7694 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7695
7696 * posix.c (scm_putenv): Handle removing variables explicitely by
7697 calling unsetenv.
7698
7699 From John W. Eaton.
7700
7701 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7702 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7703 and scm_nan.
7704 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7705 [SCO && ! HAVE_ISINF] (isinf): New function.
7706 (xisinf, xisnan): New functions.
7707 (IS_INF): Delete.
7708 (isfinite): Define in terms of xisinf.
7709 (scm_inf_p, scm_nan_p): New functions.
7710 (guile_Inf, guile_NaN): New file-scope vars.
7711 (guile_ieee_init): New function.
7712 (scm_inf, scm_nan): New functions.
7713 (idbl2str): Handle Inf and NaN. Remove funny label and
7714 corresponding gotos.
7715 (ALLOW_DIVIDE_BY_ZERO): New macro.
7716 (scm_divide): Allow division by zero to occur if
7717 ALLOW_DIVIDE_BY_ZERO is defined.
7718 Handle bignums and ints as special cases.
7719
7720 Additional stuff by me:
7721
7722 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7723 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7724 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7725 NaN. They will provide their own sign.
7726 (scm_divide): Only allow divides by inexact zeros. Dividing by
7727 exact zeros still signals an errors.
7728
7729 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7730
7731 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7732 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7733 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7734 Thanks to Andreas Rottmann.
7735
7736 2002-04-20 Gary Houston <ghouston@arglist.com>
7737
7738 * removal of unused fields in root state (thanks to Christopher
7739 Cramer for pointing out the disuse.)
7740 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7741 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7742
7743 * root.c (root_mark): don't mark them.
7744 (scm_make_root): don't set them to #f.
7745 * init.c (scm_init_standard_ports): don't initialise with the
7746 default ports.
7747
7748 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7749
7750 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7751 cpp_sig_symbols.c.
7752
7753 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7754
7755 * guile-snarf.in: Do not clean input file. This would write to
7756 the $(srcdir) during a VPATH build, which is not allowed. It also
7757 isn't needed since it only works when an output filename has been
7758 specified and in that case we don't need to clean the input file
7759 because the output file will already exist.
7760
7761 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7762
7763 * guile-snarf: Install the trap for removing $cleanfile only when
7764 the value of $cleanfile is actually known.
7765
7766 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7767
7768 * .cvsignore: add versiondat.h and *.c.clean.c.
7769
7770 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7771
7772 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7773 function, replaces macro SRCBRKP.
7774
7775 (SRCBRKP): Deprecated.
7776
7777 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7778 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7779 temporary variable.
7780
7781 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7782
7783 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7784 CHECK_EXIT and removed all references to them.
7785
7786 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7787
7788 * debug.h (scm_ready_p, debug_print): Removed declarations.
7789
7790 * eval.c (EVALCELLCAR): Removed.
7791
7792 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7793 operation from condition.
7794
7795 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7796
7797 * guile-snarf.in: When the output filename is "-", write to
7798 stdout. When no "-o" option is given, use "-" as the output
7799 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7800 output file on error when the output file name is not "-". Define
7801 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7802
7803 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7804
7805 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7806
7807 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7808 and the corresponding goto statements. Removed redundant code.
7809
7810 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7811
7812 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7813 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7814 Re-enabled handing of rpsubrs and asubrs.
7815
7816 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7817
7818 * eval.c (SIDEVAL): Removed.
7819
7820 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7821 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7822 argument checking order for set! to locals, variables and symbols.
7823 Improvements to control structure. Removed some uses of arg1 and
7824 arg2 as temporary variables.
7825
7826 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7827
7828 * guile-snarf.in: Remove "--compat=1.4" support.
7829 Add "-d" and "-D" support.
7830
7831 (deprecated_list): New var.
7832 (compat_mode_clean_xxx): Delete.
7833 (grep_deprecated): New func.
7834 ("main"): If "-d" or "-D", call `grep_deprecated'.
7835
7836 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7837
7838 * hooks.h: Change scm_t_c_hookype_t everywhere to
7839 scm_t_c_hook_type.
7840
7841 Docstring fixes:
7842
7843 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7844
7845 * ports.c (scm_sys_make_void_port): Use `@file'.
7846
7847 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7848 than `else'.
7849
7850 * macros.c (scm_makmacro): Don't say that the form replaces its
7851 source, because it doesn't.
7852 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7853
7854 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7855 scm_select, scm_basename), goops.c (scm_method_generic_function),
7856 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7857 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7858 spelling mistakes.
7859
7860 * debug.c (scm_debug_options), eval.c
7861 (scm_eval_options_interface), read.c (scm_read_options): Change
7862 incorrect @var in docstring to @code.
7863
7864 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7865
7866 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7867
7868 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7869 guile-snarf can remove trailing non-init code.
7870
7871 * guile-snarf.in (modern_snarf): Remove everything following and
7872 including "^:^" from the output.
7873
7874 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7875
7876 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7877
7878 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7879
7880 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7881
7882 * guile-snarf.in: Update copyright.
7883 Rewrite to internalize error handling.
7884 Add "--compat=1.4" handling.
7885 Add commentary.
7886
7887 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7888 (snarfcppopts): New var.
7889 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7890 (.c.doc): Use $(snarfcppopts).
7891
7892 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7893 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7894 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7895 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7896 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7897 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7898 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7899 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7900 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7901 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7902 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7903 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7904 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7905 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7906
7907 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7908
7909 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7910 The next step will be to remove the union 't' and simplify the
7911 code of SCM_CEVAL that way.
7912
7913 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7914
7915 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7916 rreadfds, rwritefds, rexceptfds): Made static.
7917
7918 * gc.c (terminating), fports.c (terminating): Renamed
7919 scm_i_terminating.
7920
7921 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7922
7923 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7924 potential overflow problems. Thanks to John W Eaton!
7925
7926 * strop.c (string_capitalize_x): Treat characters as unsigned so
7927 that 8-bit chars work. Thanks to David Pirotte!
7928
7929 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7930
7931 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7932 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7933 proc as temporary variables. Introduced temporary variables with
7934 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7935 by a more explicit predicate in some places.
7936
7937 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7938
7939 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7940 Added lots of comments regarding the implementation of #@dispatch.
7941 Changed intra-procedure communication to use t.arg1 instead of
7942 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7943 variables. Introduced temporary variables with hopefully
7944 descriptive names for clarification. Replaced SCM_N?IMP by a more
7945 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7946 of computing the expression explicitly. Eliminate now unused
7947 label nontoplevel_cdrxbegin.
7948
7949 * goops.h (SCM_INSTANCE_HASH): New macro.
7950
7951 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7952
7953 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7954
7955 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7956 "guile-snarf" moved back from `noinst_SCRIPTS'.
7957
7958 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7959
7960 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7961 exists when adding a source property other than those that are
7962 handled explicitly, add the new property to the SRCPROPS obj's
7963 plist.
7964
7965 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7966 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7967
7968 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7969 debug.status. It isn't needed, and it can overflow the bits
7970 reserved for it (which may lead to a segv or a GC abort).
7971
7972 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7973
7974 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7975 side-effecting operations from conditions and macro calls.
7976 Replaced SCM_N?IMP by a more explicit predicate in some places.
7977 Minimized the scope of some variables.
7978
7979 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7980
7981 * convert.i.c: Fixed int <-> long conversions which would have
7982 failed if their sizes were different.
7983
7984 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7985
7986 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7987 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7988 as temporary variables. Removed side-effecting operations from
7989 conditions and macro calls. Introduced temporary variables with
7990 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7991 by a more explicit predicate in some places. Removed code that
7992 was conditionally compiled if SICP was defined - which it never
7993 is.
7994
7995 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7996
7997 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7998 Removed some uses of t.arg1 and proc as temporary variables.
7999 Removed side-effecting operations from conditions and macro calls.
8000 Introduced temporary variables with hopefully descriptive names
8001 for clarification. Replaced SCM_N?IMP by a more explicit
8002 predicate in some places.
8003
8004 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8005
8006 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
8007 explicit predicate in some places.
8008
8009 (CHECK_EQVISH): Removed.
8010
8011 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
8012 variables. Removed side-effecting operations from conditions and
8013 macro calls. Introduced temporary variables for clarification.
8014 Sorted if-else-if check for the type of the last form in a list by
8015 frequency. Avoided some unnecessary tail-recursion calls.
8016
8017 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8018
8019 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
8020 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
8021 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
8022 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
8023 scm_cell and all its uses to scm_t_cell in accordance to Guile's
8024 naming scheme for types.
8025
8026 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
8027 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
8028 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
8029 (scm_make_environment), eval.c (scm_closure), fports.c
8030 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
8031 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
8032 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
8033 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
8034 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
8035 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
8036 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
8037 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
8038 scm_alloc_cell to scm_cell.
8039
8040 * environments.c (core_environments_observe), gc.c
8041 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
8042 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
8043 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
8044 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
8045 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
8046 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
8047 (allocate_weak_vector): Renamed scm_alloc_double_cell to
8048 scm_double_cell.
8049
8050 2002-02-27 Stefan Jahn <stefan@lkcc.org>
8051
8052 * convert.i.c, convert.c: Better range checking.
8053
8054 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
8055
8056 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
8057 Windows (MinGW).
8058
8059 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
8060
8061 * Makefile.am: Update path to pre-inst-guile automake frag.
8062
8063 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8064
8065 * gc.c (scm_gc_sweep): Make it compile even when deprecated
8066 features are excluded.
8067
8068 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8069
8070 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
8071
8072 2002-02-25 Gary Houston <ghouston@arglist.com>
8073
8074 * convert.c: include <string.h> for convert_i.c.
8075
8076 2002-02-24 Rob Browning <rlb@defaultvalue.org>
8077
8078 * .cvsignore: add stamp-h1.
8079
8080 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
8081
8082 * unif.c (scm_array_to_list): Correct name, which had been
8083 accidentally changed to scm_t_arrayo_list!
8084
8085 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
8086
8087 * gc.c (scm_gc_sweep): Print an error message when aborting due to
8088 underflowing scm_mallocated.
8089
8090 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8091
8092 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
8093 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
8094 Reimplemented using the new scm_gc_malloc, etc., functions and
8095 deprecated.
8096
8097 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
8098
8099 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
8100 to `noinst_PROGRAMS'.
8101 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
8102 (noinst_PROGRAMS, noinst_SCRIPTS): New.
8103
8104 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8105
8106 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
8107 non-zero is returned from a port or smob free function.
8108 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
8109 scm_gc_register_collectable_memory,
8110 scm_gc_unregister_collectable_memory, scm_gc_malloc,
8111 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
8112
8113 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
8114 debug-malloc.c, dynl.c, environments.c, environments.h,
8115 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
8116 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
8117 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
8118 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
8119 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
8120 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
8121 appropriate. Return zero from smob and port free functions.
8122
8123 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
8124
8125 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
8126 messages while the GC is running.
8127 (scm_c_issue_deprecation_warning_fmt): New.
8128
8129 * fports.c (scm_setvbuf): Reset read buffer to saved values when
8130 it is pointing to the putback buffer.
8131
8132 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8133
8134 * gsubr.c (create_gsubr): On "too many args" error,
8135 also display arg count and name. Thanks to Bill Schottstaedt.
8136
8137 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
8138
8139 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
8140
8141 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
8142 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
8143 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
8144
8145 * guile-snarf-docs-texi.in: Bye bye.
8146
8147 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8148
8149 * symbols.c (scm_make_symbol): Fix typo in docstring.
8150
8151 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
8152 scm_make_symbol): New prototypes.
8153
8154 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
8155
8156 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
8157 (SCM_SYMBOL_INTERNED_P): New.
8158 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
8159 SCM_MAKINUM since hash values can well be bignums.
8160 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
8161 This signals a interned symbol.
8162 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
8163 scm_make_symbol): New.
8164
8165 * print.c (scm_iprin1): Print uninterned symbols unreadably.
8166
8167 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
8168
8169 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
8170 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
8171 Thanks to Dave Love.
8172
8173 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
8174
8175 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
8176 This might help to make unintended clashes less likely.
8177 (scm_string_to_symbol): Protect the string until the symbols is
8178 created.
8179
8180 2002-01-31 Stefan Jahn <stefan@lkcc.org>
8181
8182 * convert.c, convert.h, convert.i.c: New files containing C
8183 array to Scheme conversion helpers meant to be replacement
8184 functions for the deprecated gh interface.
8185
8186 * Makefile.am: Setup rules for new `convert.*' files.
8187
8188 2002-01-28 Stefan Jahn <stefan@lkcc.org>
8189
8190 * symbols.c (scm_c_symbol2str): New function, replacement for
8191 `gh_scm2newsymbol()'.
8192
8193 * strings.c (scm_c_substring2str): New function. Proper
8194 replacement for `gh_get_substr()'.
8195
8196 * socket.c: Include `stdint.h' if available for the `uint32_t'
8197 declaration.
8198
8199 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
8200 compiler warning).
8201
8202 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
8203
8204 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
8205
8206 Other changes unrelated to Elisp...
8207
8208 * eval.c (scm_m_if): Use s_if rather than repeating string literal
8209 "if".
8210 (comments): Fix a few typos.
8211 (scm_for_each): Add parentheses around oddly unparenthesized
8212 if/while conditions.
8213
8214 * read.c (scm_read_opts): Add full stop at end of doc for
8215 `keywords' option.
8216
8217 * script.c (scm_compile_shell_switches): Use scm_str2symbol
8218 instead of gh_symbol2scm.
8219
8220 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
8221 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
8222
8223 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
8224 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
8225
8226 First batch of changes for Elisp support...
8227
8228 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
8229 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
8230 throw.c, vectors.c, weaks.c: Add #include for lang.h.
8231
8232 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
8233 conditionalize compilation and initialization of Elisp support
8234 function.
8235
8236 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
8237 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
8238 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
8239 filesys.c (fill_select_type, retrieve_select_type), fluids.c
8240 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
8241 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
8242 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
8243 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
8244 options.c (change_option_setting, scm_options), posix.c
8245 (environ_list_to_c), print.c (scm_iprlist), throw.c
8246 (scm_exit_status), vectors.c (scm_vector), weaks.c
8247 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
8248
8249 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
8250 just SCM_FALSEP.
8251
8252 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
8253 of just SCM_BOOLP.
8254
8255 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
8256 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
8257 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
8258 (scm_m_atfop): Support function aliasing. Support both function
8259 args, which need transformation, and macro args, which do not.
8260 Add explanatory comments.
8261 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
8262 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
8263 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
8264 SCM_NULLP || SCM_NILP instead of checks against (removed)
8265 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
8266 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
8267
8268 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
8269 scm_m_while, scm_nil_eq): Commented out; I don't think we need
8270 these, but I don't want to remove them yet, just in case.
8271 (scm_init_lang): Define `%nil' variable on Scheme level to hold
8272 Elisp nil value.
8273
8274 * lang.h (SCM_NILP): Test against Elisp nil value instead of
8275 against (removed) scm_lisp_nil.
8276 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
8277 (SCM_NULL_OR_NIL_P): New.
8278
8279 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
8280 SCM_VALIDATE_NULL.
8281
8282 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
8283 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
8284 value).
8285
8286 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
8287 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
8288 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
8289 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
8290
8291 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
8292 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
8293 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
8294 Numbering shifted down accordingly.
8295 (SCM_ELISP_NIL): New IFLAG.
8296
8297 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
8298
8299 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8300
8301 * eval.c: Removed outdated references to "everr". Improved some
8302 comments.
8303
8304 (scm_deval_args, deval_args): Renamed scm_deval_args to
8305 deval_args, since it is not part of the interface.
8306
8307 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
8308 use references to debug.vect[0] before it exists. Add parentheses
8309 to switch statement.
8310
8311 * goops.h: Added local emacs variables.
8312
8313 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8314
8315 * eval.[ch] (scm_deval_args): Made static.
8316
8317 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
8318 test.
8319
8320 * strings.c (scm_c_string2str): Clarified comment. Replaced
8321 THINKME by FIXME for uniformness. Removed question about whether
8322 arguments need to be protected from garbage collection: Arguments
8323 must be protected as any other variable.
8324
8325 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8326
8327 * procs.h (SCM_CLOSURE_BODY): New Macro.
8328
8329 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
8330 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
8331 get_slot_value, set_slot_value), procs.c
8332 (scm_procedure_documentation), sort.c (closureless), stacks.c
8333 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
8334 SCM_CLOSURE_BODY.
8335
8336 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
8337
8338 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
8339
8340 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
8341 use "cp" instead.
8342
8343 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
8344
8345 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
8346 everywhere.
8347
8348 * continuations.c (scm_make_continuation): Do not retain the
8349 throw_value when the continuation is invoked.
8350
8351 2001-12-08 Stefan Jahn <stefan@lkcc.org>
8352
8353 * strings.c (scm_c_string2str): New function. Converts a
8354 given Scheme string into a C string. Also put in two
8355 THINKME's regarding the malloc policy for the missing converter
8356 routines.
8357
8358 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
8359
8360 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
8361 gh_symbol2scm.
8362
8363 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8364
8365 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
8366 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
8367
8368 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
8369 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
8370 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
8371 macros.
8372
8373 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
8374
8375 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
8376 SCM_GC_CELL_* macros when accessing free cells.
8377
8378 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
8379
8380 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
8381 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
8382 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
8383 * strings.h (SCM_MAKE_STRING_TAG): New.
8384 * procs.h (SCM_MAKE_CCLO_TAG): New.
8385 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
8386
8387 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
8388 !SCM_ENABLE_DEPRECATED.
8389
8390 * async.c, async.h (scm_system_async_mark_from_signal_handler):
8391 New.
8392
8393 * scmsigs.c (scm_take_signal): Removed all code that assumes that
8394 signal handlers are allowed to divert the flow of control. Call
8395 scm_system_async_mark_from_signal_handler instead of
8396 scm_system_async_mark.
8397
8398
8399 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
8400 scm_alloc_double_cell in their place.
8401
8402 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
8403 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
8404 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8405 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
8406 scm_deprecated_newcell and scm_deprecated_newcell2.
8407
8408 gc.c (scm_tc16_allocated): Only define when including deprecated
8409 features.
8410 (scm_debug_newcell, scm_debug_newcell2): Removed.
8411 (scm_init_storage): Do not initialize scm_tc16_allocated.
8412 (scm_init_gc): Do it here.
8413 (allocated_mark): New, from old code.
8414 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8415
8416 * inline.c, inline.h: New files.
8417 * Makefile.am: Added them in all the right places.
8418
8419 * _scm.h: Include "libguile/inline.h".
8420
8421 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
8422 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
8423 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
8424 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
8425 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
8426 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
8427 scm_alloc_double_cell, respectively.
8428
8429 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
8430
8431 * modules.c (scm_c_use_module): Adapt to changes to
8432 `process-use-modules'.
8433
8434 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8435
8436 * numbers.c (scm_divide): Fix more division by zero errors.
8437
8438 2001-11-21 Gary Houston <ghouston@arglist.com>
8439
8440 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
8441 obsolete. autogen.sh says:
8442 invalid unused variable name: `OMIT_DEPENDENCIES'
8443
8444 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8445
8446 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
8447 reporting the bug.
8448
8449 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
8450
8451 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
8452 Thanks to Eric Gillespie, Jr!
8453
8454 2001-11-21 Stefan Jahn <stefan@lkcc.org>
8455
8456 * win32-socket.c (getservent, setservent, endservent,
8457 getprotoent, setprotoent, endprotoent): New functions.
8458 Appropriate replacements for M$-Windows.
8459
8460 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
8461 these definitions for GUILE_DEBUG.
8462
8463 * net_db.c: Include "win32-socket.h" if compiling with a native
8464 M$-Windows compiler. Include some pieces of code (protoent and
8465 servent interface) protected by HAVE_* macros when using a
8466 native M$-Windows compiler.
8467
8468 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
8469
8470 * modules.c (scm_c_export): Do nothing when the first argument is
8471 already the terminating NULL. Thanks to Han-Wen Nienhuys!
8472
8473 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
8474
8475 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
8476 also include `buildstamp'.
8477
8478 2001-11-18 Rob Browning <rlb@defaultvalue.org>
8479
8480 * version.c
8481 (s_scm_major_version): use SCM_MAJOR_VERSION.
8482 (s_scm_minor_version): use SCM_MINOR_VERSION.
8483 (s_scm_micro_version): use SCM_MICRO_VERSION.
8484 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
8485 SCM_MICRO_VERSION.
8486
8487 * version.h.in
8488 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
8489 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
8490 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
8491
8492 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
8493
8494 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8495 Rewrite docstrings without reference to substring-move-left/right,
8496 since the latter no longer exist.
8497
8498 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8499
8500 * eval.c: Removed bogus comment about acros.
8501
8502 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
8503 Minimize scope of local variable. Eliminate dependency on
8504 macro DEBUG_EXTENSIONS.
8505
8506 (s_splicing): New error message string.
8507
8508 (scm_m_body): Issue 'bad body' message rather than 'missing
8509 expression' message.
8510
8511 (scm_m_quote): Eliminate unnecessary copying.
8512
8513 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
8514 checking of the body to scm_m_body.
8515
8516 (scm_m_do): Move comment to function header. Rename arg1 to
8517 binding. Made the code a bit easier to read.
8518
8519 (evalcar): Removed.
8520
8521 (iqq): Added a comment. Changed the depth parameter to
8522 unsigned. Use size_t for vector lengths. Make sure vector object
8523 is gc protected as long as its contents are read. Add some syntax
8524 checks. Get rid of unnecessary SCM_IMP test. Clean up the
8525 control structure a bit.
8526
8527 (scm_m_delay): Added comment about the implementation of
8528 scm_m_delay.
8529
8530 (scm_m_define): Add comment about guile's currying define
8531 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
8532 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
8533
8534 (scm_m_letrec1): Removed. Part of the functionality is taken
8535 over by the new function 'transform_bindings'.
8536
8537 (transform_bindings): New function. Takes over some of the
8538 functionality of removed function 'scm_m_letrec1', namely to split
8539 a list of bindings into a reversed list of variables and a list of
8540 initializers.
8541
8542 (scm_m_letrec): Call 'transform_bindings'.
8543
8544 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
8545 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
8546 test. Use 'transform_bindings'. Fixed scoping error with named
8547 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
8548 Jerram for suggesting the fix). Cleaned up the control structure
8549 a bit.
8550
8551 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
8552 unnecessary consing. Eliminated unnecessary
8553 SCM_DEFER/ALLOW_INTS.
8554
8555 (SCM_CEVAL): Un-obfuscated some loops.
8556
8557 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
8558
8559 * gc.h (scm_unhash_name): Old declaration removed.
8560
8561 * eval.c (s_scm_eval): Change @var{primitive-eval} to
8562 @code{primitive-eval}.
8563
8564 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
8565 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
8566 Change @deffnx lines in docstrings to say {Scheme Procedure}
8567 rather than primitive or procedure.
8568
8569 * posix.c (scm_execl), filesys.c (scm_close), unif.c
8570 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
8571 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
8572 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
8573 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
8574 (scm_string_split, scm_string_ci_to_symbol), strings.c
8575 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
8576 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8577 Docstring fixes and improvements reflecting edits that have been
8578 made in the reference manual source.
8579
8580 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8581 scm_object_property, scm_set_object_property_x): Remove invalid
8582 @deffnx lines for corresponding procedure property primitives.
8583
8584 These changes add a @deffnx C function declaration and function
8585 index entries for each Guile primitive to the copy of the doc
8586 snarf output that is used for reference manual synchronization.
8587 Online help is unchanged.
8588
8589 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8590 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8591 name to SCM_SNARF_DOCS.
8592
8593 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8594 snarf-check-and-output-texi.
8595
8596 * Makefile.am (guile-procedures.texi): New rule.
8597 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8598 Changed so that the last stage of doc snarfing is now performed
8599 twice, once to produce guile-procedures.txt for online help, and
8600 once to produce guile.texi for reference manual synchronization.
8601
8602 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8603
8604 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8605 safely usable as a single statement followed by a ';', for example
8606 in an if statement.
8607
8608 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8609
8610 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8611
8612 * random.c (scm_random_solid_sphere_x,
8613 scm_random_hollow_sphere_x): Correct "shere" typos.
8614
8615 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8616
8617 * version.c (scm_version): Update docstring to include
8618 `micro-version'.
8619
8620 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8621
8622 * modules.c (scm_c_export): Call va_end after collecting the
8623 symbols.
8624
8625 * strop.h, strop.c (scm_substring_move_left_x,
8626 scm_substring_move_right_x): Removed.
8627
8628 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8629 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8630 configure does.
8631
8632 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8633
8634 * numbers.c: Document macros to define when including
8635 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8636 now rely on SIZEOF_ macros that have been figured out at
8637 configure time.
8638
8639 * num2integral.i.c: Adapt to new interface.
8640 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8641 target type by casting it and checking whether it is still the
8642 same. Do not try to handle bignums for integral types that are
8643 smaller than fixnums. When handling bignums, collect the
8644 magnituse first into a unsigned type, and correctly check for
8645 overflow.
8646 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8647 only -MIN_VALUE can still be negative of all negative numbers (in
8648 twos-complement).
8649
8650 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8651
8652 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8653 HAVE_LONG_LONG depending on whether their size is non-zero.
8654
8655 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8656
8657 * strop.c (scm_string_null_p): Docfix; nfc.
8658 Thanks to Scott Lenser.
8659
8660 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8661
8662 * extensions.c (scm_load_extension): Canonicalize docstring
8663 whitespace.
8664
8665 * unif.c (scm_uniform_array_write), ports.c
8666 (scm_current_output_port, scm_force_output), dynwind.c
8667 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8668 filesys.c (scm_open, scm_lstat), struct.c
8669 (scm_make_struct_layout), random.c (scm_random,
8670 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8671 (scm_i_index): Remove superfluous whitespace from end of docstring
8672 lines.
8673
8674 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8675 strings.c (scm_make_string), variable.c (scm_make_variable,
8676 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8677 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8678 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8679 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8680 newline at end of docstrings.
8681
8682 * modules.c (scm_set_current_module): Add missing newline to
8683 docstring.
8684
8685 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8686
8687 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8688 and makes them available through Guile. That is because the
8689 Winsock-API does not store its errors in `errno' and thus cannot
8690 return error messages via `strerror (errno)'.
8691
8692 * socket.c (scm_init_socket): Initialize `win32-socket' part
8693 here under M$-Windows.
8694
8695 * numbers.h: Added missing declaration of
8696 `scm_sys_check_number_conversions()'.
8697
8698 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8699 and use in `(strerror)' and `(system-error)'.
8700
8701 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8702 `win32-socket.[ch]' to extra source and header files.
8703
8704 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8705
8706 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8707 a call to turn-on-debugging when --debug has been given instead of
8708 turning it on directly. Also, handle new `--no-debug' option,
8709 which might suppress the call to turn-on-debugging.
8710
8711 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8712
8713 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8714
8715 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8716
8717 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8718 here (was at guile_LDADD) which describes the dependency
8719 correctly and allows a clean build on Win32.
8720
8721 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8722 into FOO.
8723
8724 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8725 import macros for external libraries (libcrypt, libqthreads,
8726 libreadline and libregex).
8727
8728 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8729
8730 * posix.c (flock): Added support for flock() in M$-Windows.
8731
8732 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8733 of __SCM_IMPORT__.
8734
8735 * fports.c (getflags): Differentiate reading and writing pipes
8736 descriptors.
8737
8738 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8739 M$-Windows.
8740
8741 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8742 conditionalized error code if `ETIMEDOUT' is not available.
8743 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8744 timeout'.
8745
8746 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8747 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8748 each inclusion of `num2integral.i.c'.
8749 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8750
8751 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8752
8753 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8754 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8755
8756 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8757
8758 * print.c (scm_iprin1): Mark print state as revealed when
8759 dispatching to generic write or display.
8760
8761 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8762
8763 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8764
8765 Support for native Win32. Thanks to Stefan Jahn!
8766
8767 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8768 and win32-dirent.h to extra source and header files. These
8769 include the uname() and the POSIX dirent interface implementation
8770 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8771 linkers which do not allow unresolved symbols inside shared
8772 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8773 dependency.
8774
8775 * __scm.h: Defined SCM_API. This macro gets prepended to all
8776 function and data definitions which should be exported or imported
8777 in the resulting dynamic link library in the Win32 port.
8778
8779 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8780 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8781 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8782 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8783 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8784 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8785 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8786 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8787 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8788 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8789 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8790 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8791 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8792 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8793 vports.h, weaks.h:
8794 Prefixed each each exported symbol with SCM_API.
8795
8796 * continuations.c: Added comment about the use of the extern
8797 declarations of {get,set}context() functions used in the ia64 port.
8798
8799 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8800 is meant to be a `unsigned long *'.
8801
8802 * filesys.c: Include `direct.h' if possible. Use local
8803 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8804 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8805 able to differentiate between sockets and other file descriptors.
8806 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8807 `scm_dirname()'.
8808
8809 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8810 statement block in `scm_fport_buffer_add()'.
8811 Some corrections in `getflags()'.
8812
8813 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8814
8815 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8816 build on Win32. Disable preloaded symbols on Win2 platforms.
8817
8818 * ioext.c, ports.c: Include `io.h' is possible.
8819
8820 * mkstemp.c: Include `process.h' is possible.
8821
8822 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8823 too.
8824 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8825
8826 * posix.c: Remove unnecessary dirent includes and defines. Include
8827 local `win32-uname.h' for MinGW. Extern declaration of
8828 `mkstemp()' for systems where it does not exists. Make
8829 `getlogin()' available on M$-Windows.
8830
8831 * scmsigs.c: Made `usleep()' avalable on MinGW.
8832
8833 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8834
8835 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8836
8837 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8838
8839 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8840
8841 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8842 Don't apply scm_uniform_vector_length on arrays.
8843
8844 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8845
8846 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8847 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8848 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8849 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8850 scm_list_<n> over scm_cons[2]?.
8851
8852 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8853 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8854 SCM_C[AD][AD]R instead of explicit form.
8855
8856 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8857 comparison parameters.
8858
8859 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8860 !SCM_NULLP instead of SCM_NIMP.
8861
8862 (scm_m_case): Don't copy the form. Renamed proc to clause and
8863 minimized its scope. Renamed x to clauses. Removed side
8864 effecting operation from macro call.
8865
8866 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8867 minimized its scope. Renamed x to clauses. Minimized the scope
8868 of variable 'len'. Make sure the else clause is treated specially
8869 even in case of '=>' occurences. Don't change the else to #t in
8870 order to be able to distinguish this case in the evaluator. Leave
8871 type checking of the recipient to the evaluator.
8872
8873 (scm_c_improper_memq): Made the comment somewhat clearer.
8874
8875 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8876 test for SCM_IM_LET at the place of the formal parameters.
8877 Simplified the formal parameter checking.
8878
8879 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8880 Renamed arg1 to binding and minimized its scope. Eliminated
8881 unnecessary consing.
8882
8883 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8884 variable 'len'.
8885
8886 (build_binding_list): New static function.
8887
8888 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8889 Further, split up the 'letrec' unmemoizing code to the
8890 corresponding parts for 'do', 'let' and 'letrec', adding comments
8891 to each form. Cleanup the handling of the do form (This removes
8892 some *real* code :-).
8893
8894 (SCM_CEVAL): Removed side effecting operation from macro call.
8895 Handle the 'else clause of the 'cond form specially - the symbol
8896 'else is not replaced with #t any more.
8897
8898 2001-10-14 Gary Houston <ghouston@arglist.com>
8899
8900 * version.c (scm_version): use sprintf instead of snprintf,
8901 for portability. thanks to Bill Schottstaedt.
8902
8903 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8904
8905 * read.c (scm_lreadr): When user-defined hash procedure returns
8906 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8907 an exception. (This prevents parsing of uniform vectors from
8908 interfering with parsing of numbers.)
8909
8910 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8911
8912 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8913 PTRDIFF_MIN. Thanks to Ken Raeburn.
8914
8915 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8916
8917 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8918
8919 * eval.c (scm_m_atbind): First try to find the variable without
8920 defining it locally; when it has not been found, define it
8921 locally.
8922
8923 * modules.c (module_variable): Pass over variables that exist but
8924 are unbound.
8925
8926 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8927
8928 * backtrace.c (display_backtrace_file_and_line): Only use
8929 scm_basename when POSIX support is compiled in. Thanks to Chris
8930 Cramer.
8931
8932 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8933
8934 * numbers.c (mem2uinteger): Return number read so far when coming
8935 across a hexdigit after having read a # or if not reading a hex
8936 value. This will enable the calling code to correctly handle
8937 forms like 1e2. (The background is, that the exponent markers d,
8938 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8939 providing this patch.
8940
8941 (mem2complex): Fix erroneous double-negation. Now, numbers like
8942 1-i will be read correctly.
8943
8944 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8945
8946 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8947
8948 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8949
8950 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8951
8952 * print.c (scm_print_state_vtable, print_state_pool):
8953 Initialize. These variables are now registered as gc roots.
8954
8955 (scm_current_pstate): Update documentation.
8956
8957 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8958 scm_prin1, scm_init_print): print_state_pool is registered as a
8959 gc root and thus does not need to be protected by a surrounding
8960 pair any more.
8961
8962 (make_print_state): The car of print_state_pool no longer holds
8963 the scm_print_state_vtable.
8964
8965 (scm_current_pstate, scm_make_print_state, print_circref,
8966 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8967 SCM_N<foo>.
8968
8969 (scm_prin1): When building lists, prefer scm_list_<n> over
8970 scm_cons[2]?.
8971
8972 (scm_iprlist): Removed a redundant SCM_IMP test.
8973
8974 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8975
8976 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8977
8978 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8979
8980 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8981 scm_list_<n> over scm_cons[2]?.
8982
8983 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8984
8985 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8986
8987 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8988 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8989 for some reason his patch didn't make it into the cvs.
8990
8991 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8992
8993 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8994 little bit - should even be somewhat more accurate now.
8995
8996 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8997
8998 * gc.c: support ia64 register backing store.
8999 (SCM_MARK_BACKING_STORE): new macro.
9000
9001 * continuations.h: support ia64 register backing store.
9002 (struct scm_t_contregs): add ia64 register backing store.
9003
9004 * continuations.c: support ia64 register backing store.
9005 (continuation_mark): mark ia64 register backing store.
9006 (continuation_free): free ia64 register backing store.
9007 (scm_make_continuation): capture ia64 register backing store.
9008 (copy_stack_and_call): copy ia64 register backing store.
9009
9010 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9011
9012 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
9013 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
9014 instead of SCM_NIMP to test for that case.
9015
9016 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
9017 scm_t_bits instead of long.
9018
9019 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9020
9021 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
9022 SCM_T_SIGNED_BITS_MIN): New.
9023 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
9024 Use them to make these macros computable by the preprocessor.
9025
9026 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
9027 whether the integral type fits in a fixnum, not the compiler.
9028 This removes a spurious compiler warning. Also, honor the
9029 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
9030 needed for `long long's.
9031
9032 * numbers.c: Define NO_PREPRO_MAGOC when including
9033 num2integral.c.i for `long long' and `signed long long'.
9034
9035 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
9036
9037 These changes fixes a race condition in the Guile coop - pthread
9038 compatibility code.
9039
9040 * coop.c (mother_awake_p): New variable.
9041 (coop_create): Set mother_awake_p before creating or signalling
9042 mother; wait until mother is going to sleep before returning.
9043 (mother): Reset mother_awake_p before going to sleep.
9044
9045 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9046
9047 * options.c (protected_objects, scm_init_options): The content of
9048 protected_objects is now protected from garbage collection using
9049 scm_gc_register_root instead of scm_permanent_object.
9050
9051 (get_option_setting): New static function that computes an option
9052 setting as it was formerly done in the function scm_options.
9053
9054 (get_documented_option_setting): New static function that
9055 returns option documentation as it was formerly done in the
9056 function scm_options. Note that documentation C strings are no
9057 longer precomputed into SCM objects. Instead, they are converted
9058 into SCM strings every time get_documented_option_setting is
9059 called.
9060
9061 (change_option_setting): New static functions that modifies the
9062 option setting as it was formerly done in the function
9063 scm_options. The function is now exception safe, i. e. won't
9064 cause a memory leak when interrupted. Further, only non-immediate
9065 option values are added to the protection list.
9066
9067 (scm_options): This function now has only the purpose to dispatch
9068 to to get_option_setting, get_documented_option_setting or
9069 change_option_setting, depending on the arguments given to
9070 scm_options.
9071
9072 (scm_init_opts): Don't convert documentation C strings into SCM
9073 strings. Further, don't protect any object values: They _must_
9074 be immediate values, otherwise there is no guarantee that they
9075 have not been collected before anyway.
9076
9077 * options.[ch] (scm_t_option): Made type unsigned, name into a
9078 constant char* and val into a scm_t_bits type.
9079
9080 (scm_options, scm_init_opts): The number of options is guaranteed
9081 to be larger or equal to zero. Thus, the type is changed to
9082 unsigned.
9083
9084 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9085
9086 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
9087 testing an unsigned value for being >= 0.
9088
9089 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9090
9091 * numbers.h: Removed old comment about using SCM_CAR to access
9092 non-pair cells.
9093
9094 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
9095 the return value is signed. Thanks to Brian Crowder for the bug
9096 report.
9097
9098 (SCM_SRS): Avoid unnecessary casting and don't unpack input
9099 values. With this patch, SCM_SRS can be safely used for other
9100 types than scm_t_signed_bits. However, it should still better be
9101 an internal macro and thus be renamed to SCM_I_SRS.
9102
9103 (SCM_MAKINUM, SCM_INUM): Use proper casting.
9104
9105 2001-10-03 Gary Houston <ghouston@arglist.com>
9106
9107 * continuations.h, unif.h: in the descriptions of the bit patterns
9108 of the heap cells, make bit 0 the least significant.
9109
9110 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
9111
9112 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
9113 Thanks to Golubev I. N.
9114
9115 2001-09-25 Gary Houston <ghouston@arglist.com>
9116
9117 * ports.c (scm_drain_input): extended the docstring. thanks to
9118 Alex Schroeder and Thien-Thi Nguyen.
9119
9120 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
9121
9122 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
9123 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
9124 macros. (The NUM names might soon change.)
9125
9126 * numbers.h: Added missing declarations.
9127
9128 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
9129
9130 * Makefile.am: Distribute num2float.i.c.
9131
9132 * num2float.i.c: New file, multiply included by numbers.c, used
9133 to "templatize" the float <-> num conversion routines.
9134
9135 * numbers.c: New functions: scm_num2float, scm_float2num,
9136 scm_num2double, scm_double2num.
9137
9138 2001-09-21 Rob Browning <rlb@defaultvalue.org>
9139
9140 * .cvsignore: really add version.h
9141
9142 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
9143 Otherwise it fails on the alpha. However, we might rather choose
9144 this size conditionally.
9145
9146 * numbers.c (scm_gcd): change "k" to a long from an int.
9147 Otherwise it fails on the alpha. However, we might rather choose
9148 this size conditionally.
9149
9150 * error.c (scm_wta): coerce char* to intptr_t before int
9151 assignment.
9152
9153 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
9154 int.
9155
9156 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
9157
9158 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
9159
9160 * numbers.c (scm_integer_expt): Accept inexact integer in second
9161 argument. (Thanks to Bill Schottstaedt.)
9162
9163 2001-09-20 Rob Browning <rlb@defaultvalue.org>
9164
9165 * .cvsignore: add version.h
9166
9167 * versiondat.h.in: removed (obsolete).
9168
9169 * version.h.in: renamed from version.h.
9170 (SCM_GUILE_MAJOR_VERSION): new public macro.
9171 (SCM_GUILE_MINOR_VERSION): new public macro.
9172 (SCM_GUILE_MICRO_VERSION): new public macro.
9173
9174 * version.h: renamed to version.h.in.
9175
9176 * version.c
9177 (scm_major_version): support integer *_VERSION macros.
9178 (scm_minor_version): support integer *_VERSION macros.
9179 (scm_micro_version): support integer *_VERSION macros.
9180 (scm_version): support integer *_VERSION macros.
9181
9182 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
9183
9184 * error.c, error.h: Made error keys globally accessible.
9185 Applications might want to test for these or use them in a direct
9186 call to scm_error.
9187
9188 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
9189 routines are passed an inexact. This change in behavior is
9190 motivated by concordance with R5RS: It is more common that a
9191 primitive doesn't want to accept an inexact for an exact.
9192
9193 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9194
9195 The following patch partially undoes my patch from 2001-06-30,
9196 where I added the function scm_gc_mark_cell_conservatively. The
9197 function is buggy, since it breaks guile during conservative
9198 marking if a pointer on the stack points directly into the list of
9199 free cells on the heap: With conservative cell marking this will
9200 cause the whole free list to be scanned and marked - boom!
9201
9202 * gc.c (allocated_mark, MARK, heap_segment,
9203 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
9204 (scm_gc_mark_cell_conservatively): Remove function
9205 scm_gc_mark_cell_conservatively and update the corresponding
9206 comments and uses accordingly. Thanks to Christopher Cramer for
9207 the patch. (Minor corrections by me.)
9208
9209 2001-09-15 Gary Houston <ghouston@arglist.com>
9210
9211 * root.h (scm_root_state): removed the continuation_stack and
9212 continuation_stack_ptr members, which have no apparent purpose.
9213 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
9214 removed.
9215
9216 * root.c (root_mark), init.c (restart_stack, start_stack), gc
9217 (scm_igc): remove all references to contination_stack and
9218 continuation_stack_ptr, avoiding allocation of a vector and
9219 useless processing during gc.
9220
9221 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9222
9223 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
9224
9225 (TCONC_IN): Make sure that the cell word 0 is initialized last.
9226
9227 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
9228
9229 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
9230
9231 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
9232 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
9233
9234 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9235
9236 * guardians.c (mark_dependencies_in_tconc,
9237 whine_about_self_centered_zombies, scm_init_guardians): Register
9238 the static global variable `self_centered_zombies' via
9239 scm_gc_register_root, to make some cdr-ing unnecessary.
9240
9241 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9242
9243 * backtrace.c (display_backtrace_file,
9244 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
9245 values, use SCM_FALSEP when comparing SCM values against #f.
9246 Thanks to Rob Browning for the bug report.
9247
9248 2001-09-12 Martin Baulig <martin@home-of-linux.org>
9249
9250 * strings.[ch] (scm_str2string): New function.
9251
9252 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
9253
9254 * gc.c (scm_done_free): Always subtract size from scm_mallocated
9255 when computing nm, even if it's negative.
9256 (scm_must_malloc): Abort on overflow of scm_mtrigger.
9257 (scm_must_realloc): Likewise.
9258
9259 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
9260
9261 * numbers.c (scm_sys_check_number_conversions): new function,
9262 defined if Guile is compiled in debugging mode. currently checks
9263 `scm_num2ulong', should check much much more.
9264
9265 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
9266 unsigned, ensure that it's positive. thanks to Martin Baulig!
9267
9268 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9269
9270 * __scm.h: Added new section about compile time selectable
9271 features.
9272
9273 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
9274 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
9275 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
9276 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
9277 Removed.
9278
9279 * deprecation.c (scm_include_deprecated_features): Simplified.
9280
9281 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9282 `SCM_IMP' instead of `!SCM_CELLP´.
9283
9284 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
9285 Extract side-effecting operations from macros.
9286
9287 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
9288 scm_top_level_lookup_closure_var and scm_system_transformer.
9289
9290 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
9291
9292 (heap_segment): Use CELL_P instead of SCM_CELLP.
9293
9294 * init.c (start_stack): Don't initialize
9295 scm_top_level_lookup_closure_var and scm_system_transformer.
9296
9297 * modules.c (scm_set_current_module): Don't access
9298 scm_top_level_lookup_closure_var and scm_system_transformer.
9299
9300 (scm_sym2var): Don't call scm_variable_set_name_hint.
9301
9302 (scm_post_boot_init_modules): Removed deprecated initializations.
9303
9304 * print.c (scm_ipruk): Don't access cell contents of non cells.
9305
9306 * strings.c (scm_string_set_x): All strings are writable.
9307
9308 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
9309 type. There is only one string type now.
9310
9311 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
9312
9313 * tags.h: Remove comments about two different string types.
9314
9315 (SCM_CELLP, SCM_NCELLP): Deprecated.
9316
9317 * variable.c (make_variable): Remove code variant for vcells.
9318
9319 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
9320 SCM_VARIABLE_LOC): Remove code variant for vcells.
9321
9322 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
9323 SCM_ENABLE_DEPRECATED with the logic reversed.
9324
9325 * dynl.c (moddata, registered_mods), dynl.[ch]
9326 (scm_register_module_xxx, scm_registered_modules,
9327 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
9328 (*top-level-lookup-closure*), eval.[ch]
9329 (scm_top_level_lookup_closure_var, scm_system_transformer,
9330 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
9331 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
9332 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
9333 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
9334 scm_unprotect_object), modules.c (root_module_lookup_closure,
9335 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
9336 beautify_user_module_x_var, try_module_autoload_var,
9337 scm_module_full_name), modules.[ch] (scm_the_root_module,
9338 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9339 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
9340 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
9341 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
9342 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
9343 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
9344 scm_make_shared_substring), tags.h (scm_tc7_substring,
9345 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
9346 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
9347 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
9348 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
9349 Removed.
9350
9351 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
9352 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
9353 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
9354 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
9355 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
9356 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9357 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
9358 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
9359 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
9360 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
9361 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
9362 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
9363 (setzone, scm_strftime, scm_strptime), vports.c
9364 (scm_make_soft_port): Remove calls to
9365 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
9366 gone, all strings are 0-terminated anyway.
9367
9368 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
9369 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
9370 double inclusion of the same headers to the SCM_<filename>_H
9371 format.
9372
9373 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
9374 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
9375 print.c (scm_iprin1): The type scm_tc7_substring does not exist
9376 any more.
9377
9378 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
9379 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
9380 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
9381 !SCM_<foo> over SCM_N<foo>.
9382
9383 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9384
9385 * Makefile.am: Remove references to symbols-deprecated.c.
9386
9387 * symbols.c (scm_init_symbols): Don't initialize deprecated
9388 symbol functions.
9389
9390 * symbols-deprecated.c: Removed.
9391
9392 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
9393 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
9394 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
9395 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
9396 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
9397 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
9398 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
9399 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
9400 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
9401 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
9402 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
9403 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
9404 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
9405 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
9406 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
9407 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
9408 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
9409 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
9410 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
9411 scm_intern0, scm_sysintern, scm_sysintern0,
9412 scm_sysintern0_no_module_lookup, scm_symbol_value0,
9413 scm_string_to_obarray_symbol, scm_intern_symbol,
9414 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
9415 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
9416 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
9417 vectors.[ch] (scm_vector_set_length_x): Removed.
9418
9419 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
9420 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
9421 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
9422 Renamed the macros that are defined to inhibit double inclusion of
9423 the same headers to the SCM_<filename>_H format.
9424
9425 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
9426 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
9427 SCM_N<foo>.
9428
9429 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9430
9431 * continuations.h (scm_contregs), debug.h (scm_debug_info,
9432 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
9433 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
9434 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9435 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
9436 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
9437 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
9438 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
9439 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
9440 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
9441 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
9442 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
9443
9444 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
9445 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
9446 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
9447 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
9448 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
9449 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
9450 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
9451 double inclusion of the same headers to the SCM_<filename>_H
9452 format.
9453
9454 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
9455 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
9456 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
9457 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
9458 !SCM_<foo> over SCM_N<foo>.
9459
9460 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9461
9462 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
9463 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
9464 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
9465 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
9466 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
9467 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
9468 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
9469 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
9470 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
9471 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
9472 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
9473 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
9474 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
9475 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
9476 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
9477 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
9478 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
9479 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
9480 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
9481 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
9482 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
9483 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
9484 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
9485 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
9486 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
9487 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
9488 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
9489 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
9490 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
9491 the macros that are defined to inhibit double inclusion of the
9492 same headers to the SCM_<filename>_H format.
9493
9494 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
9495
9496 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
9497 "scm_t_portable" with "scm_port_table" which was an artifact from
9498 the great "scm_*_t -> scm_t_" renaming.
9499
9500 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
9501
9502 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
9503 used; nfc. Thanks to Bill Schottstaedt.
9504
9505 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
9506 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
9507 Thanks to Chris Cramer.
9508
9509 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
9510
9511 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
9512
9513 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
9514 dynamic scope.
9515 * dynwind.h (scm_swap_bindings): Declare.
9516 * dynwind.c (scm_swap_bindings): Make non-static.
9517
9518 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
9519
9520 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
9521 doing exactly nothing about them). thanks Neil!
9522
9523 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
9524
9525 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
9526
9527 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
9528
9529 * gc.c: Fix omission bug: Add `heap_segment' forward decl
9530 (proto) in the case when either `GUILE_DEBUG' or
9531 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
9532
9533 (map_free_list): Fix typo: Ref `f' correctly.
9534
9535 Thanks to Chris Cramer.
9536
9537 2001-08-15 Rob Browning <rlb@defaultvalue.org>
9538
9539 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
9540 variables.
9541 (libpath.h): change libguileversion to libguileinterface.
9542
9543 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
9544
9545 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
9546 ChangeLog-2000. Thanks to Daniel Skarda!
9547
9548 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
9549
9550 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
9551 do it from the Makefile.
9552
9553 * Makefile.am: rearrange the snarfing slightly, so that .doc files
9554 are of a reasonable size.
9555
9556 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
9557
9558 * stacks.c (scm_make_stack): Improve docstring by explaining use
9559 of cutting args.
9560
9561 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
9562
9563 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
9564 scm_char_whitespace_p, scm_char_upper_case_p,
9565 scm_char_lower_case_p, scm_char_is_both_p): Do not require
9566 characters to fulfill isascii in addition to the primary
9567 predicate.
9568
9569 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9570
9571 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
9572 scm_istr2flo, scm_istring2number): Removed.
9573
9574 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
9575 SCM_SLOPPY_<foo>.
9576
9577 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9578 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9579 Added.
9580
9581 (scm_string_to_number): Use new number parser.
9582
9583 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9584 handles complex numbers.
9585
9586 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9587 SCM_<foo>_H.
9588
9589 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9590 SCM_N<pred>.
9591
9592 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9593
9594 (scm_i_mem2number): Added.
9595
9596 (scm_exact_to_inexact): Changed signature.
9597
9598 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9599 here instead of within scm_i_mem2number. Call scm_i_mem2number
9600 instead of scm_istr2int and scm_istring2number.
9601
9602 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9603
9604 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9605 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9606 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9607 !SCM_<pred> over SCM_N<pred>.
9608
9609 (scm_eval_body): Remove side effecting code from macro call.
9610
9611 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9612 SCM_NIMP test.
9613
9614 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9615
9616 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9617
9618 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9619
9620 Removed vcell slot from structs.
9621
9622 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9623 subsequent indices.
9624
9625 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9626 zero. Use scm_vtable_index_layout instead of "0" when accessing
9627 said slot.
9628 (scm_init_struct): Remove vcell slot layout code from
9629 required_vtable_fields.
9630
9631 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9632
9633 * goops.c (build_class_class_slots): Removed vcell slot
9634 definition.
9635
9636 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9637 Removed vcell slot layout code.
9638 (scm_si_vcell): Removed.
9639
9640 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9641
9642 "Glocs" have been removed.
9643
9644 * tags.h: Update tag system docs.
9645 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9646 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9647 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9648 or SCM_NCONSP, respectively.
9649
9650 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9651 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9652 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9653
9654 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9655 tell glocs from structs.
9656
9657 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9658
9659 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9660 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9661 instead of with glocs.
9662 (EVALCAR): Do not test for glocs.
9663 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9664 condition.
9665 (scm_unmemocar): Do not handle glocs.
9666 (scm_m_atfop): Memoize as a variable, not as a gloc.
9667 (scm_eval_args, scm_deval_args): Do not handle glocs.
9668 (scm_ceval, scm_deval): Likewise.
9669
9670 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9671 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9672 Removed.
9673
9674 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9675
9676 * dynwind.c (scm_swap_bindings): Likewise.
9677 (scm_dowinds): Updated to recognize lists of variables instead of
9678 lists of glocs.
9679
9680 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9681
9682
9683 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9684 where it is needed.
9685
9686 2001-07-25 Gary Houston <ghouston@arglist.com>
9687
9688 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9689 docstrings to reflect the n-ary implementation.
9690
9691 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9692
9693 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9694 value of a variable, not the plain "return" statement.
9695
9696 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9697
9698 * eval.c: Allow variables in memoized code (in addition to glocs).
9699 (scm_lookupcar): Handle variables in lost races. Replace symbol
9700 with variable directly, do not make a gloc.
9701 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9702 like glocs.
9703 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9704 the main switch.
9705
9706 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9707
9708 * variable.c (scm_i_variable_print): Use "value" instead of
9709 "binding" since a binding is the mapping between symbols and
9710 variables, not between variables and their values.
9711
9712 * tags.h (scm_tc7_variable): New.
9713 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9714 * print.c (scm_iprin1): Likewise.
9715
9716 * variable.h (scm_tc16_variable): Removed.
9717 (SCM_VARIABLEP): Test for new tc7 code.
9718 (scm_i_variable_print): New.
9719 * variable.c (scm_tc16_variable): Removed.
9720 (variable_print): Renamed to scm_i_variable_print and made
9721 non-static.
9722 (variable_equal_p): Removed.
9723 (make_variable): Construct a tc7 object instead of a smob.
9724 (scm_init_variable): Do not register smob.
9725
9726 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9727
9728 * tags.h: Include inttypes.h when we have it.
9729
9730 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9731
9732 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9733 is taken by the new SCM_IM_CALL_WITH_VALUES.
9734 * print.c (scm_isymnames): Update table accordingly.
9735
9736 2001-07-22 Gary Houston <ghouston@arglist.com>
9737
9738 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9739 SCM_MAKINUM to convert regoff_t value to SCM.
9740
9741 2001-07-21 Gary Houston <ghouston@arglist.com>
9742
9743 * scmsigs.c: include sys/time.h for itimer stuff.
9744
9745 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9746
9747 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9748
9749 * c-tokenize.lex: add option %nounput to quiet warning.
9750 Add prototype for yylex to quiet warning.
9751
9752 * scmconfig.h.in: add flags for setitimer and getitimer.
9753
9754 * scmsigs.h (scm_init_scmsigs): new prototype.
9755 (scm_init_scmsigs): new prototype.
9756
9757 * scmsigs.c (s_scm_setitimer): new function.
9758 (s_scm_setitimer): new function.
9759
9760 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9761
9762 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9763 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9764 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9765 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9766 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9767 guile-func-name-check.in, guile-snarf-docs-texi.in,
9768 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9769 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9770 objprop.c, objprop.h, options.c, options.h, random.h,
9771 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9772 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9773 version.c, version.h: Updated copyright notice.
9774
9775 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9776
9777 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9778 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9779 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9780 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9781 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9782 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9783 sym_environment, scm_sym_change_class): New static variables to
9784 hold predefined symbols.
9785
9786 (build_class_class_slots): Build the list using scm_list_n
9787 instead of cons. Also, slots are already created as lists, thus
9788 making a call to maplist unnecessary.
9789
9790 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9791 scm_class_direct_subclasses, scm_class_direct_methods,
9792 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9793 scm_method_procedure, create_standard_classes, purgatory): Use
9794 predefined symbols.
9795
9796 (build_slots_list, compute_getters_n_setters,
9797 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9798 get_slot_value_using_name, set_slot_value_using_name,
9799 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9800 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9801 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9802
9803 (scm_sys_prep_layout_x): Minimize variable scopes.
9804
9805 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9806 scm_sys_fast_slot_set_x): Fix signedness.
9807
9808 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9809 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9810 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9811 when converting to and from SCM values.
9812
9813 (scm_enable_primitive_generic_x): Add rest argument checking.
9814
9815 (map, filter_cpl, maplist, scm_sys_initialize_object,
9816 scm_sys_prep_layout_x, slot_definition_using_name,
9817 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9818 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9819 predicates over SCM_N?IMP tests.
9820
9821 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9822 checking.
9823
9824 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9825 alias.
9826
9827 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9828
9829 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9830
9831 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9832
9833 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9834
9835 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9836
9837 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9838
9839 * strings.c (s_scm_string): fix arg position in assert.
9840
9841 2001-07-11 Gary Houston <ghouston@arglist.com>
9842
9843 * strports.c (st_write): use memcpy, not strncpy. thanks to
9844 Dale P. Smith.
9845
9846 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9847
9848 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9849 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9850 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9851 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9852 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9853 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9854 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9855 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9856 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9857 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9858 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9859 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9860 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9861 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9862 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9863 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9864 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9865 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9866 weaks.c, weaks.h: Remove "face-lift" comment.
9867
9868 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9869
9870 * .cvsignore: add stamp-h.in.
9871
9872 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9873
9874 * hooks.c (scm_make_hook, scm_add_hook_x),
9875 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9876 value info to the docstrings.
9877
9878 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9879
9880 Some more compatibility patches for Windows.
9881
9882 * posix.c (getlogin): getlogin() implementation for Windows.
9883
9884 * backtrace.c, ioext.c: Include <stdio.h>.
9885
9886 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9887 exist.
9888
9889 * cpp_sig_symbols.in: Added SIGBREAK.
9890
9891 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9892
9893 * strports.c (scm_read_0str, scm_eval_0str): Call
9894 scm_c_read_string and scm_c_eval_string respectively, not
9895 themselves. Thanks to Dale P. Smith!
9896
9897 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9898
9899 * unif.c (scm_array_set_x): The variable args does not
9900 necessarily have to be a list. Further, got rid of a redundant
9901 SCM_NIMP test.
9902
9903 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9904
9905 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9906 last.
9907
9908 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9909 init_heap_seg): Fixed signedness.
9910
9911 (init_heap_seg): Replaced strange for-loop with a while loop.
9912
9913 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9914
9915 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9916
9917 The following patch adds conservative marking for the elements of
9918 free or allocated cells.
9919
9920 * gc.c (allocated_mark, heap_segment): New static functions.
9921
9922 (which_seg): Deleted, since the functionality is now provided by
9923 function heap_segment.
9924
9925 (map_free_list): Use heap_segment instead of which_seg.
9926
9927 (MARK): If cell debugging is disabled, mark free cells
9928 conservatively.
9929
9930 (scm_mark_locations, scm_cellp): Extracted the search for the
9931 heap segment of a SCM value into function heap_segment.
9932
9933 (scm_init_storage): Allocated cells must be marked
9934 conservatively.
9935
9936 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9937
9938 The following patch changes the representation of weak vectors to
9939 double cells instead of using an extension of the vector's
9940 allocated memory.
9941
9942 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9943 the result of SCM_WVECT_GC_CHAIN.
9944
9945 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9946
9947 * weaks.c (allocate_weak_vector): New static function. It does
9948 not patch any previously created vector object during the
9949 construction of a weak vector, and thus doesn't need to switch
9950 off interrupts during vector creation.
9951
9952 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9953 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9954 Use allocate_weak_vector to provide the new weak vector object.
9955
9956 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9957 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9958 now stored in the double cell.
9959
9960 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9961 Use SCM_WVECT_TYPE.
9962
9963 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9964 using an entry of the double cell.
9965
9966 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9967
9968 * stamp-h.in: bye bye
9969
9970 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9971
9972 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9973 scm_eval_0str.
9974
9975 * load.c, load.h (scm_c_primitive_load,
9976 scm_c_primitive_load_path): New.
9977
9978 * strports.c, strports.h (scm_c_read_string): Renamed from
9979 scm_read_0str. Also, added "const" qualifier to argument.
9980 (scm_c_eval_string): Renamed from scm_eval_0str.
9981 (scm_read_0str, scm_eval_0str): Deprecated.
9982
9983 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9984
9985 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9986 SCM_LIST1.
9987
9988 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9989
9990 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9991 scm_list_n): New functions.
9992 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9993 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9994 (lots of files): Use the new functions.
9995
9996 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9997
9998 * strings.c: #include "libguile/deprecation.h".
9999
10000 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10001
10002 * read.c (scm_lreadr): When reading a hash token, check for a
10003 user-defined hash procedure first, so that overriding the builtin
10004 hash characters is possible (this was needed for implementing
10005 SRFI-4's read synax `f32(...)').
10006
10007 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
10008 because the latter is unsigned now and breaks comparisons like
10009 (n < (scm_t_signed_bits)MIN_VALUE).
10010
10011 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
10012
10013 * eval.h, eval.c (scm_call_4): New function.
10014
10015 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
10016 directly rather than dispatching to them via scm_ithrow and a lazy
10017 catch.
10018
10019 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
10020 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
10021 for trap handler procedures.
10022
10023 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
10024 procedures not being #f.
10025
10026 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
10027
10028 * Makefile.am (c-tokenize.c): add rule to generate it.
10029 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
10030
10031 filter-doc-snarfage.c: remove.
10032
10033 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10034
10035 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
10036
10037 The following set of changes makes compiling Guile under various
10038 Windows compilers easier. Compilation under GNU systems should
10039 not be affected at all.
10040
10041 Thanks to Stefan Jahn for all necessary information, patches and
10042 testing.
10043
10044 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
10045 getpgrp, ttyname, primitive-fork and some header inclusion for
10046 Windows.
10047
10048 * random.c: Define M_PI, if not predefined and use __int64 for
10049 LONG64 under Windows.
10050
10051 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
10052 Windows and conditionalize some signal names.
10053
10054 * socket.c (scm_getsockopt): Added missing comma.
10055 Include socket library header under Windows.
10056
10057 * stime.c (CLKTCK): Add cast to int, to make it compile under
10058 Windows.
10059
10060 * ports.c (truncate): New function, compiled only under Windows.
10061
10062 * net_db.c: Do not declare errno under Windows.
10063
10064 * iselect.h, inet_aton.c: Include socket library headers under
10065 Windows.
10066
10067 * guile.c (inner_main): Under Windows, initialize socket library
10068 and initialize gdb_interface data structures.
10069
10070 * gdb_interface.h: Under Windows, gdb_interface cannot be
10071 initialized statically. Initialize at runtime instead.
10072
10073 * fports.c (write_all): ssize_t -> size_t.
10074 (fport_print): Conditionalize call to ttyname().
10075 (getflags): New function, compiled only under Windows.
10076
10077 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
10078 primitives chown, link, fcntl.
10079 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
10080 as path seperator.
10081
10082 * backtrace.c: Include <io.h> under Windows.
10083
10084 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
10085
10086 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
10087 declaration.
10088
10089 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
10090
10091 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10092 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
10093 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
10094 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
10095 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
10096 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
10097 (scm_dynamic_wind, scm_dowinds), environments.c
10098 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
10099 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
10100 goops.c (GETVAR, purgatory, make_class_from_template,
10101 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
10102 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
10103 (scm_primitive_load), modules.c (scm_resolve_module,
10104 scm_c_define_module, scm_c_use_module, scm_c_export,
10105 module_variable, scm_eval_closure_lookup, scm_sym2var,
10106 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
10107 ports.c (scm_port_for_each), print.c (scm_printer_apply),
10108 properties.c (scm_primitive_property_ref), ramap.c (ramap,
10109 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
10110 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
10111 (scm_object_to_string, scm_call_with_output_string,
10112 scm_call_with_input_string), throw.c (scm_body_thunk,
10113 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
10114 scm_make_shared_array), vports.c (sf_flush, sf_write,
10115 sf_fill_input, sf_close): Use one of the above functions.
10116 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
10117
10118 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10119
10120 * filesys.c (scm_close), ports.c (scm_close_port,
10121 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
10122 instead of SCM_NEGATE_BOOL.
10123
10124 * filesys.c (scm_stat): Clean up type dispatch.
10125
10126 * filesys.c (scm_stat), ports.c (scm_input_port_p,
10127 scm_output_port_p): Get rid of redundant IM type check.
10128
10129 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
10130 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
10131 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10132 scm_return_entry), numbers.c (scm_number_to_string), objects.c
10133 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
10134 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
10135 scm_addr_vector), stime.c (scm_strftime), strings.c
10136 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
10137 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
10138 scm_string_split), strports.c (scm_strport_to_string), symbols.c
10139 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
10140 instead of scm_makfromstr.
10141
10142 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
10143 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
10144 scm_read_hash_extend), stime.c (scm_strftime), strings.c
10145 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
10146 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
10147 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
10148 !SCM_<pred> over SCM_N<pred>.
10149
10150 * strings.[ch] (scm_makfromstr): Deprecated.
10151
10152 (scm_mem2string): New function, replaces scm_makfromstr.
10153
10154 * strings.c (scm_substring), strop.c (string_copy,
10155 scm_string_split), strports.c (scm_strport_to_string), symbols.c
10156 (scm_symbol_to_string): Fix gc problem.
10157
10158 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
10159 SCM_<foo>_H.
10160
10161 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
10162 warning about comparing signed and unsigned values. This fix is
10163 not optimal, since it won't work reliably if sizeof (c_start) >
10164 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
10165 solution is to define this macro as an inline function, thus
10166 allowing to specifiy the types of c_start and c_end.
10167
10168 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
10169
10170 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
10171 scm_t_debug_frame*.
10172
10173 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
10174 Rename <foo>H to SCM_<foo>_H.
10175
10176 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
10177 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
10178
10179 (narrow_stack): Make i unsigned. Don't use side-effecting
10180 operations in conditions.
10181
10182 (narrow_stack, scm_make_stack, scm_stack_id,
10183 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
10184
10185 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
10186 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
10187 more.
10188
10189 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
10190 signedness.
10191
10192 (scm_last_stack_frame): Remove bogus `;'.
10193
10194 * stacks.h (SCM_FRAMEP): Fix type check.
10195
10196 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
10197
10198 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
10199 c-tokenize.c when doing maintainer-clean.
10200
10201 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
10202
10203 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
10204 simplify.
10205
10206 * eval.c: all hash signs are in column 0.
10207
10208 * Makefile.am (guile_filter_doc_snarfage): build using
10209 c-tokenize.c, not filter-doc-snarfage.c.
10210 rearrange snarfing dependencies a bit.
10211
10212 * c-tokenize.lex: new file.
10213
10214 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
10215
10216 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
10217 scm_t_srcpropso_plist. See the big type renaming.
10218 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
10219 Thanks to Seth Alves!
10220
10221 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
10222 they aren't defined already.
10223
10224 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
10225
10226 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
10227 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
10228 problem.
10229
10230 * backtrace.c (display_expression, scm_set_print_params_x,
10231 display_application, display_frame, scm_backtrace), numbers.c
10232 (scm_istring2number), objects.c (scm_class_of,
10233 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
10234 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
10235
10236 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
10237 always positive.
10238
10239 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
10240 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
10241
10242 * objects.c (scm_class_of): Type fix.
10243
10244 (scm_mcache_lookup_cmethod): Improved comment, simplified,
10245 eliminated goto.
10246
10247 * pairs.h (scm_error_pair_access): The function can return if
10248 called recursively.
10249
10250 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10251
10252 * init.c (scm_init_guile_1): Removed initialization of tag.c.
10253
10254 * gdbint.c, init.c: Removed inclusion of tag.h.
10255
10256 * tag.h, tag.c: Removed files.
10257
10258 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
10259
10260 2001-06-20 Gary Houston <ghouston@arglist.com>
10261
10262 * deprecation.c, extensions.c, rw.c: include string.h.
10263
10264 2001-06-19 Gary Houston <ghouston@arglist.com>
10265
10266 * filter-doc-snarfage.c (process): added ungetc in
10267 MULTILINE_COOKIE case since otherwise it fails when there's no
10268 space between the '(' and the quote of the following string
10269 (gcc 3.0).
10270
10271 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10272
10273 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
10274
10275 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10276
10277 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
10278 extension takes place.
10279 * strings.h (SCM_STRING_LENGTH): Likewise.
10280 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
10281
10282 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
10283 it.
10284
10285 * tags.h: Include <stdint.h> when we have it.
10286 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
10287 available. Else use "unsigned long".
10288 (scm_signed_bits_t): New.
10289
10290 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
10291 (SCM_INUM): Cast result to scm_signed_bits_t.
10292
10293 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
10294
10295 * mkstemp.c: Update path to #include file scmconfig.h.
10296 Thanks to Golubev I. N.
10297
10298 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10299
10300 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
10301
10302 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
10303 the macro definition.
10304
10305 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
10306 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
10307 instead of SCM_INST_TYPE.
10308
10309 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
10310 the object is a struct before accessing its struct flags.
10311
10312 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
10313
10314 2001-06-10 Gary Houston <ghouston@arglist.com>
10315
10316 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
10317 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
10318 work reliably anymore. try it from boot-9.scm instead.
10319
10320 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
10321
10322 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
10323 Thanks to Matthias Köppe!
10324
10325 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
10326
10327 * snarf.h, filter-doc-snarfage.c: more changes to cope with
10328 space-happy C preprocessors.
10329
10330 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
10331 inside cookies. thanks to Matthias Köppe!
10332
10333 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10334
10335 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
10336 keywords. Fix gc protection.
10337
10338 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
10339 operations in macro calls.
10340
10341 * pairs.c (scm_error_pair_access): Avoid recursion.
10342
10343 Thanks to Matthias Koeppe for reporting the bugs that correspond
10344 to the following set of patches.
10345
10346 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
10347 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
10348 bitvector base address using SCM_BITVECTOR_BASE.
10349
10350 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
10351 unsigned long*.
10352
10353 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10354
10355 * goops.c (SCM_CLASS_REDEF): Removed.
10356
10357 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
10358 SCM_<foo>_H.
10359
10360 Thanks to Matthias Koeppe for reporting the bugs that correspond
10361 to the following set of patches.
10362
10363 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
10364 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
10365 scm_sys_allocate_instance, clear_method_cache,
10366 scm_sys_invalidate_method_cache_x, scm_make,
10367 create_standard_classes, scm_make_port_classes, scm_make_class,
10368 scm_add_slot): Use SCM_SET_SLOT to set slot values.
10369
10370 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
10371
10372 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
10373
10374 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
10375 UNARY_ELTS_CODE): Remove bogus break statement.
10376
10377 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
10378 Don't access bit vectors elements as SCM objects.
10379
10380 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
10381 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10382 Don't assign to an unpacked value.
10383
10384 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
10385
10386 * __scm.h (SCM_NORETURN): Moved here from error.h.
10387
10388 (SCM_UNUSED): New macro.
10389
10390 (SCM_DEBUG_PAIR_ACCESSES): New macro.
10391
10392 * backtrace.c (display_error_handler), continuations.c
10393 (continuation_print), debug.c (debugobj_print), dynwind.c
10394 (guards_print), environments.c (observer_print,
10395 core_environments_finalize, leaf_environment_cell,
10396 leaf_environment_print, eval_environment_print,
10397 eval_environment_observer, import_environment_define,
10398 import_environment_undefine, import_environment_print,
10399 import_environment_observer, export_environment_define,
10400 export_environment_undefine, export_environment_print,
10401 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
10402 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
10403 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
10404 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
10405 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
10406 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
10407 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
10408 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
10409 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
10410 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
10411 set_slot_value, test_slot_existence, scm_change_object_class,
10412 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
10413 default_setter), guardians.c (guardian_print, guardian_gc_init,
10414 guardian_zombify, whine_about_self_centered_zombies), guile.c
10415 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
10416 mallocs.c (malloc_print), numbers.c (scm_print_real,
10417 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
10418 end_input_default, scm_port_print, fill_input_void_port,
10419 write_void_port), root.c (root_print), smob.c (scm_mark0,
10420 scm_free0, scm_smob_print, scm_smob_apply_1_error,
10421 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
10422 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
10423 (scm_struct_free_0, scm_struct_free_standard,
10424 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
10425 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
10426 scm_handle_by_throw, scm_ithrow), weaks.c
10427 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
10428 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
10429 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
10430
10431 * error.h (SCM_NORETURN): Moved to __scm.h.
10432
10433 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
10434 Renamed <foo>H to SCM_<foo>_H.
10435
10436 * gc.c (debug_cells_gc_interval): New static variable.
10437
10438 (scm_assert_cell_valid): If selected by the user, perform
10439 additional garbage collections.
10440
10441 (scm_set_debug_cell_accesses_x): Extended to let the user specify
10442 if additional garbage collections are desired.
10443
10444 (mark_gc_async): If additional garbage collections are selected
10445 by the user, don't call the after-gc-hook. Instead require the
10446 user to run the hook manually.
10447
10448 * pairs.c (scm_error_pair_access): New function. Only compiled
10449 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
10450
10451 * pairs.h (SCM_VALIDATE_PAIR): New macro.
10452
10453 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
10454 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
10455 is a real pair object. (Glocs are also accepted, but that may
10456 change.) If not, abort with an error message.
10457
10458 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10459
10460 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
10461
10462 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
10463 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
10464
10465 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
10466
10467 * extensions.c (scm_c_register_extension): Allow NULL as library
10468 name.
10469 (load_extension): Ignore NULL library names when comparing.
10470
10471 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
10472 non-pointers are being compared. Thanks to Alexander Klimov!
10473
10474 2001-06-04 Gary Houston <ghouston@arglist.com>
10475
10476 * rw.c (scm_write_string_partial): new procedure implementing
10477 write-string/partial in (ice-9 rw).
10478 * rw.h: declare scm_write_string_partial.
10479
10480 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
10481
10482 * keywords.c (keyword_print): Substract 1 from length of symbol
10483 name, accounting for the silly dash.
10484
10485 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
10486 Do not emit deprecation warning.
10487
10488 Added exception notice to all files.
10489
10490 * dynl.c: Include "deprecation.h".
10491
10492 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
10493
10494 * dynl.c (scm_register_module_xxx, scm_registered_modules,
10495 scm_clear_registered_modules): Deprecated.
10496
10497 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
10498
10499 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
10500 guile-snarf-docs-texi.
10501
10502 * fports.c: HAVE_ST_BLKSIZE changed to
10503 HAVE_STRUCT_STAT_ST_BLKSIZE.
10504 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
10505 HAVE_STRUCT_STAT_ST_BLKSIZE.
10506
10507 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
10508 HAVE_STRUCT_STAT_ST_RDEV.
10509 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
10510 HAVE_STRUCT_STAT_ST_BLKSIZE.
10511 (scm_stat2scm): HAVE_ST_BLOCKS changed to
10512 HAVE_STRUCT_STAT_ST_BLOCKS.
10513
10514 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
10515
10516 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
10517 of scm_eval_x to allow module changes between the forms in the
10518 string. Set/restore module using scm_c_call_with_current_module.
10519
10520 * mkstemp.c: New file, slightly modified from libiberties
10521 mkstemps.c.
10522
10523 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
10524
10525 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
10526 filter-doc-snarfage.c: new files.
10527
10528 * Makefile.am: add stuff to [build,] use and distribute
10529 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
10530
10531 * guile-snarf.in: grok the new snarf output.
10532
10533 * snarf.h: make the output both texttools- and `read'-friendly.
10534
10535 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
10536 guile-snarf-docs. (should also deprecate, I guess. maybe not).
10537
10538 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
10539
10540 * print.c (scm_simple_format): Support "~~" and "~%". Signal
10541 error for unsupported format controls and for superflous
10542 arguments. Thanks to Daniel Skarda!
10543
10544 * print.h, print.c (scm_print_symbol_name): Factored out of
10545 scm_iprin1.
10546 (scm_iprin1): Call it.
10547
10548 * keywords.c (keyword_print): Use scm_print_symbol_name so that
10549 weird names are printed correctly.
10550
10551 * print.c (scm_print_symbol_name): Symbols whose name starts with
10552 `#' or `:' or ends with `:' are considered weird.
10553
10554 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10555
10556 * numbers.c (scm_difference, scm_divide): Clarified comments for -
10557 and /.
10558
10559 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10560
10561 * debug.h: Removed prototype for scm_eval_string.
10562
10563 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10564
10565 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
10566 (make-string 2000 #\!))' in an older version).
10567
10568 Change strncpy to memcpy to allow embedded NUL characters in
10569 symbol prefix.
10570
10571 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
10572
10573 * hooks.c (scm_create_hook): deprecated.
10574 (make_hook): deleted.
10575 (scm_make_hook): all the hook creation code is now here.
10576
10577 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10578 a hook, make it permanent, and do a `scm_c_define' on it.
10579
10580 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10581
10582 * socket.c (s_scm_inet_pton): fix docstring quoting.
10583 (s_scm_inet_ntop): ditto.
10584
10585 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10586
10587 * hashtab.c (scm_internal_hash_fold): fix argument position in
10588 SCM_ASSERT.
10589
10590 * environments.c (s_scm_import_environment_set_imports_x): fix
10591 argument position in SCM_ASSERT.
10592
10593 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10594 (s_scm_make_iloc): ditto.
10595
10596 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10597
10598 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10599
10600 * eval.c (promise_print): Read the promise's value as an object.
10601
10602 (SCM_CEVAL): Don't perform side-effecting operations in macro
10603 parameters.
10604
10605 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10606 conditional expression.
10607
10608 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10609 initializer.
10610
10611 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10612 text, removed redundant computation of effective_length and fixed
10613 the overflow check.
10614
10615 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10616 values.
10617
10618 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10619
10620 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10621
10622 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10623 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10624
10625 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10626
10627 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10628 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10629 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10630 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10631
10632 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10633
10634 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10635
10636 * ramap.c (ramap_rp): Removed bogus `;'.
10637
10638 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10639 problem.
10640
10641 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10642 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10643 Read SCM objects rather than scm_bits_t values.
10644
10645 * tags.h (SCM_VOIDP_TEST): Removed.
10646
10647 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10648 value of 2 now corresponds to the former 1, the current 1
10649 corresponds to the former situation that SCM_VOIDP_TEST was
10650 defined.
10651
10652 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10653 If this appears to be not ANSI compliant, we will change it to
10654 typedef struct scm_unused_struct { } * SCM;
10655 Thanks to Han-Wen Nienhuys for the suggestion.
10656
10657 * unif.c (scm_array_set_x): Fix typing problem, and use
10658 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10659 dealing with uniform vectors.
10660
10661 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10662
10663 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10664 (scm_igc): mark from them, too (precisely, not conservatively!).
10665
10666 * root.h (scm_gc_registered_roots): new object in
10667 scm_sys_protects.
10668
10669 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10670 `scm_protect_object'. shouldn't call it at all, though, it seems.
10671
10672 * gc.c (scm_[un]protect_object): deprecated.
10673 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10674 (scm_gc_[un]register_root[s]): new.
10675
10676 * gc.h: add prototypes for scm_gc_[un]protect_object,
10677 scm_gc_[un]register_root[s].
10678
10679 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10680
10681 revert the controversial part of the 2001-05-24 changes.
10682
10683 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10684
10685 * modules.c (scm_env_module): Exported to Scheme.
10686
10687 * eval.c (scm_debug_opts): New option `show-file-name'.
10688
10689 * debug.h (SCM_SHOW_FILE_NAME): New.
10690
10691 * backtrace.c: Include "libguile/filesys.h".
10692 (sym_base, display_backtrace_get_file_line,
10693 display_backtrace_file, display_backtrace_file_and_line): New.
10694 (display_frame): Call display_backtrace_file_and_line if that is
10695 requested.
10696 (display_backtrace_body): Call scm_display_backtrace_file if
10697 requested.
10698
10699 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10700 Prototypes removed since there's no definition for these
10701 functions.
10702
10703 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10704
10705 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10706 Changed use of scm_array->scm_array_t and
10707 scm_array_dim->scm_array_dim_t to enable build with
10708 --disable-deprecated.
10709
10710 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10711
10712 The purpose of this set of changes is to regularize Guile's usage
10713 of ANSI C integral types, with the following ideas in mind:
10714
10715 - SCM does not nesessarily have to be long.
10716 - long is not nesessarily enough to store pointers.
10717 - long is not nesessarily the same size as int.
10718
10719 The changes are incomplete and possibly buggy. Please test on
10720 something exotic.
10721
10722 * validate.h
10723 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10724 new macros.
10725
10726 * unif.h: type renaming:
10727 scm_array -> scm_array_t
10728 scm_array_dim -> scm_array_dim_t
10729 the old names are deprecated, all in-Guile uses changed.
10730
10731 * tags.h (scm_ubits_t): new typedef, representing unsigned
10732 scm_bits_t.
10733
10734 * stacks.h: type renaming:
10735 scm_info_frame -> scm_info_frame_t
10736 scm_stack -> scm_stack_t
10737 the old names are deprecated, all in-Guile uses changed.
10738
10739 * srcprop.h: type renaming:
10740 scm_srcprops -> scm_srcprops_t
10741 scm_srcprops_chunk -> scm_srcprops_chunk_t
10742 the old names are deprecated, all in-Guile uses changed.
10743
10744 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10745 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10746 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10747 vectors.c, vports.c, weaks.c:
10748 various int/size_t -> size_t/scm_bits_t changes.
10749
10750 * random.h: type renaming:
10751 scm_rstate -> scm_rstate_t
10752 scm_rng -> scm_rng_t
10753 scm_i_rstate -> scm_i_rstate_t
10754 the old names are deprecated, all in-Guile uses changed.
10755
10756 * procs.h: type renaming:
10757 scm_subr_entry -> scm_subr_entry_t
10758 the old name is deprecated, all in-Guile uses changed.
10759
10760 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10761 type renaming:
10762 scm_option -> scm_option_t
10763 the old name is deprecated, all in-Guile uses changed.
10764
10765 * objects.c: various long -> scm_bits_t changes.
10766 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10767
10768 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10769 SCM_I_FIXNUM_BIT.
10770
10771 * num2integral.i.c: new file, multiply included by numbers.c, used
10772 to "templatize" the various integral <-> num conversion routines.
10773
10774 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10775 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10776 deprecated.
10777 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10778 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10779 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10780 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10781 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10782 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10783 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10784 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10785 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10786 scm_num2size): new functions.
10787
10788 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10789
10790 * load.c: change int -> size_t in various places (where the
10791 variable is used to store a string length).
10792 (search-path): call scm_done_free, not scm_done_malloc.
10793
10794 * list.c (scm_ilength): return a scm_bits_t, not long.
10795 some other {int,long} -> scm_bits_t changes.
10796
10797 * hashtab.c: various [u]int -> scm_bits_t changes.
10798 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10799 (scm_ihashx): n: uint -> scm_bits_t
10800 use scm_bits2num instead of scm_ulong2num.
10801
10802 * gsubr.c: various int -> scm_bits_t changes.
10803
10804 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10805
10806 * gh_data.c (gh_num2int): no loss of precision any more.
10807
10808 * gh.h (gh_str2scm): len: int -> size_t
10809 (gh_{get,set}_substr): start: int -> scm_bits_t,
10810 len: int -> size_t
10811 (gh_<num>2scm): n: int -> scm_bits_t
10812 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10813 (gh_length): return scm_bits_t, not unsigned long.
10814
10815 * gc.[hc]: various small changes relating to many things stopping
10816 being long and starting being scm_[u]bits_t instead.
10817 scm_mallocated should no longer wrap around.
10818
10819 * fports.h: type renaming:
10820 scm_fport -> scm_fport_t
10821 the old name is deprecated, all in-Guile uses changed.
10822
10823 * fports.c (fport_fill_input): count: int -> scm_bits_t
10824 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10825
10826 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10827 those prototypes, as the functions they prototype don't exist.
10828
10829 * fports.c (default_buffer_size): int -> size_t
10830 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10831 default_size: int -> size_t
10832 (scm_setvbuf): csize: int -> scm_bits_t
10833
10834 * fluids.c (n_fluids): int -> scm_bits_t
10835 (grow_fluids): old_length, i: int -> scm_bits_t
10836 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10837 scm_bits_t
10838 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10839
10840 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10841 the new and shiny SCM_NUM2INT.
10842
10843 * extensions.c: extension -> extension_t (and made a typedef).
10844
10845 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10846 there are no nasty surprises if/when the various deeply magic tag
10847 bits move somewhere else.
10848
10849 * eval.c: changed the locals used to store results of SCM_IFRAME,
10850 scm_ilength and such to be of type scm_bits_t (and not int/long).
10851 (iqq): depth, edepth: int -> scm_bits_t
10852 (scm_eval_stack): int -> scm_bits_t
10853 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10854 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10855 i: int -> scm_bits_t
10856
10857 * environments.c: changed the many calls to scm_ulong2num to
10858 scm_ubits2num.
10859 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10860
10861 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10862
10863 * debug.h: type renaming:
10864 scm_debug_info -> scm_debug_info_t
10865 scm_debug_frame -> scm_debug_frame_t
10866 the old names are deprecated, all in-Guile uses changed.
10867 (scm_debug_eframe_size): int -> scm_bits_t
10868
10869 * debug.c (scm_init_debug): use scm_c_define instead of the
10870 deprecated scm_define.
10871
10872 * continuations.h: type renaming:
10873 scm_contregs -> scm_contregs_t
10874 the old name is deprecated, all in-Guile uses changed.
10875 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10876 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10877
10878 * continuations.c (scm_make_continuation): change the type of
10879 stack_size from long to scm_bits_t.
10880
10881 * ports.h: type renaming:
10882 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10883 scm_port -> scm_port_t
10884 scm_ptob_descriptor -> scm_ptob_descriptor_t
10885 the old names are deprecated, all in-Guile uses changed.
10886 (scm_port_t.entry): int -> scm_bits_t.
10887 (scm_port_t.line_number): int -> long.
10888 (scm_port_t.putback_buf_size): int -> size_t.
10889
10890 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10891 global namespace and have little value beside that).
10892 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10893 SCM handle).
10894 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10895 exist (for size_t & ptrdiff_t).
10896 (scm_sizet): deprecated.
10897
10898 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10899
10900 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10901
10902 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10903 SCM_VARIABLE_INIT since that it what it used to be.
10904
10905 * deprecation.c (scm_include_deprecated_features): Make docstring
10906 ANSIsh. Thanks to Matthias Köppe!
10907
10908 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10909
10910 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10911 needed for weak-key hashtables.
10912
10913 * procs.c (scm_make_subr_with_generic): Add missing last argument
10914 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10915
10916 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10917 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10918
10919 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10920
10921 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10922
10923 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10924 `duplicate_string'. Do not use an indirect cell, store symbol
10925 directly in collision list of hash table.
10926 (duplicate_string): Removed.
10927
10928 * init.c (scm_init_guile_1): Call scm_init_extensions.
10929
10930 * Makefile.am: Add "extensions.c" and related files in all the
10931 right places.
10932
10933 * extensions.h, extension.c: New files.
10934
10935 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10936
10937 * modules.h (scm_system_module_env_p): Move out of deprecated
10938 section.
10939
10940 * rw.h (scm_init_rw): Added prototype.
10941
10942 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10943 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10944 New functions. They replace scm_make_gsubr and
10945 scm_make_gsubr_with_generic. The `make' variants only create the
10946 gsubr object, while the `define' variants also put it into the
10947 current module. Changed all callers.
10948 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10949
10950 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10951 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10952 functions. They replace scm_make_subr, scm_make_subr_opt and
10953 scm_make_subr_with_generic. The `make' variants only create the
10954 subr object, while the `define' variants also put it into the
10955 current module. Changed all callers.
10956 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10957 Deprecated.
10958
10959 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10960 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10961 the comments above.
10962
10963 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10964
10965 * throw.c (scm_lazy_catch): Slight docstring clarification.
10966
10967 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10968
10969 * throw.c: Lazy-catch handlers are no longer allowed to return.
10970 Fixed comments throughout.
10971 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10972 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10973 recognized as such.
10974
10975 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10976 refered to s_scm_minor_version previously.
10977
10978 * modules.h, modules.c: Moved around a lot of code so that
10979 deprecated features appear at the bottom.
10980 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10981 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10982 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10983 scm_load_scheme_module): Deprecated.
10984 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10985 environments corresponding to the root module.
10986 (convert_module_name, scm_c_resolve_module,
10987 scm_c_call_with_current_module, scm_c_define_module,
10988 scm_c_use_module, scm_c_export): New.
10989 (the_root_module): New static variant of scm_the_root_module. Use
10990 it everywhere instead of scm_the_root_module.
10991
10992 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10993 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10994 (scm_c_with_fluid): New.
10995 (scm_with_fluids): Use scm_c_with_fluids instead of
10996 scm_internal_with_fluids.
10997
10998 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10999 `scm_init_goops'. Do not explicitly create/switch modules.
11000 Return SCM_UNSPECIFIED.
11001 (scm_init_goops): Only register `%init-goops-builtins' procedure.
11002 (scm_load_goops): Use scm_c_resolve_module instead of
11003 scm_resolve_module.
11004
11005 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
11006 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
11007 `scm_init_rw' prior to loading the startup files.
11008
11009 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
11010 scm_init_rdelim. Do not explicitly create/switch modules.
11011 Return SCM_UNSPECIFIED.
11012 (scm_init_rdelim): Only register `%init-rdelim-builtins'
11013 procedure.
11014
11015 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
11016 explicitly create/switch modules. Return SCM_UNSPECIFIED.
11017 (scm_init_rw): Only register `%init-rw-builtins' procedure.
11018
11019 * script.c (scm_shell): Evaluate the compiled switches in the
11020 current module, not in the root module.
11021
11022 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
11023
11024 * fluids.c (scm_c_with_fluids): Rename from
11025 scm_internal_with_fluids.
11026 (scm_internal_with_fluids): Deprecated.
11027 (scm_c_with_fluid): New.
11028
11029 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11030
11031 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
11032
11033 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
11034 accessed with SCM_C[AD]R.
11035
11036 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
11037
11038 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
11039
11040 * version.c (s_scm_major_version): doc fixes.
11041 (s_scm_minor_version): doc fixes.
11042 (s_scm_minor_version): new function.
11043
11044 * version.h (scm_init_version): new function.
11045
11046 * versiondat.h.in: add GUILE_MICRO_VERSION.
11047
11048 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11049
11050 * deprecation.c (scm_init_deprecation): Renamed
11051 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
11052
11053 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
11054
11055 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
11056 dependent on cpp_cnvt.awk
11057
11058 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11059
11060 * script.c (scm_compile_shell_switches): New command line option
11061 `--use-srfi' for loading a list of SRFIs on startup.
11062 (scm_shell_usage): Added `--use-srfi' to help message.
11063
11064 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11065
11066 Merged from mvo-vcell-cleanup-1-branch.
11067
11068 The concept of vcells has been removed from Guile. With it,
11069 explicit obarrays and associated operations are gone. Use
11070 hashtables instead of obarrays.
11071
11072 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
11073 result as variable instead of vcell. Glocs no longer point to a
11074 vcell but to a variable. Use scm_c_define instead of
11075 scm_sysintern and treat the result as a variable (which it is),
11076 not a vcell.
11077
11078 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
11079 SCM_DEFVARIABLEP): Deprecated.
11080 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
11081 (variable_print): Do not print name of variable.
11082 (variable_equalp): Compare values, not vcells.
11083 (anonymous_variable_sym): Removed.
11084 (make_vcell_variable): Removed.
11085 (make_variable): New, as replacement.
11086 (scm_make_variable, scm_make_undefined_variable): Do not take name
11087 hint parameter.
11088 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
11089 error in that case.
11090 (scm_builtin_variable): Deprecated.
11091
11092 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
11093 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
11094 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
11095 scm_sysintern, scm_sysintern0, scm_symbol_value0,
11096 scm_string_to_obarray_symbol, scm_intern_symbol,
11097 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
11098 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
11099 Deprecated and moved to "symbols-deprecated.c".
11100 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
11101 (scm_init_symbols): Call scm_init_symbols_deprecated.
11102 * symbols-deprecated.c: New file.
11103 * Makefile.am: Added symbols-deprecated.c and related files in all
11104 the right places.
11105
11106 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
11107 SCM_GLOBAL_VCELL_INIT): Deprecated.
11108 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
11109 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
11110
11111 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
11112 SCM_GLOC_SYM.
11113
11114 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
11115 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
11116 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
11117 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
11118 Changed according to the `throughout' comments.
11119
11120 * modules.h, modules.c (scm_module_system_booted_p): Changed type
11121 to `int'.
11122 (scm_module_type): Removed.
11123 (the_root_module): Renamed to the_root_module_var. Now points to
11124 a variable instead of a vcell. Updated all uses.
11125 (scm_the_root_module): Return SCM_BOOL_F when module systems
11126 hasn't been booted yet.
11127 (SCM_VALIDATE_STRUCT_TYPE): Removed.
11128 (scm_post_boot_init_modules): Made static.
11129 (scm_set_current_module): Call scm_post_boot_init_modules on first
11130 call.
11131 (make_modules_in, beautify_user_module_x, resolve_module,
11132 try_module_autoload, module_make_local_var_x): Tacked on "_var"
11133 suffix. Now point to variables instead of vcells. Updated all
11134 uses.
11135 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
11136 and return SCM_BOOL_F in that case.
11137 (scm_module_transformer): Likewise.
11138 (sym_module, scm_lookup_closure_module, scm_env_module): New.
11139 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
11140 (scm_eval_closure_lookup): Do not allow new definitions when
11141 `interface' flag is set.
11142 (scm_standard_interface_eval_closure): New.
11143 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
11144 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
11145 scm_c_lookup, scm_c_module_define, scm_c_define,
11146 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
11147 scm_modules_prehistory): New.
11148 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
11149 instead of scm_intern0.
11150
11151 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
11152 symbol.
11153
11154 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
11155 hashtable operations to maintain the keywords, not obarray ones.
11156
11157 * init.c (scm_load_startup_files): Do not call
11158 scm_post_boot_init_modules. This is done by
11159 scm_set_current_module now.
11160 (scm_init_guile_1): Call scm_modules_prehistory. Call
11161 scm_init_variable early on.
11162
11163 * goops.c (s_scm_sys_goops_loaded): Get
11164 var_compute_applicable_methods from scm_sym2var, not from a direct
11165 invocation of scm_goops_lookup_closure.
11166
11167 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
11168
11169 * gc.c: Added simple debugging hack to mark phase of GC: When
11170 activated, do not tail-call scm_gc_mark. This gives nice
11171 backtraces.
11172 (scm_unhash_name): Removed.
11173
11174 * feature.c (features): Renamed to features_var. Now points to a
11175 variable instead of a vcell. Updated all uses.
11176
11177 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
11178 `scm_current_module_lookup_closure' which will do the right thing
11179 when the module system hasn't been booted yet.
11180 (SCM_GLOC_SYM): Removed.
11181 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
11182 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
11183
11184 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
11185 instead of with vcells. Do not overwrite `var' with the result of
11186 the lookup, use the new `real_var' instead. Remove `var2' in
11187 exchange (which was only used with threads).
11188 (sym_three_question_marks): New.
11189 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
11190 `SCM_GLOC_SYM'.
11191 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
11192 (scm_m_atfop): Expect the function definition to be a variable
11193 instead of a vcell.
11194 (scm_macroexp): Do not use `unmemocar', explicitely remember the
11195 symbol instead.
11196 (scm_unmemocopy): Removed thoughts about anti-macro interface.
11197 (scm_eval_args): Use more explicit code in the gloc branch of the
11198 atrocious struct ambiguity test. The optimizer will sort this
11199 out.
11200 (scm_deval_args): Likewise.
11201 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
11202 remember the symbol instead. Added some comments where
11203 scm_tc3_cons_gloc really exclusively refers to structs.
11204 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
11205 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
11206 of scm_sysintern in general.
11207
11208 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
11209 explicit magic.
11210
11211 * debug.c (s_scm_make_gloc): Only allow proper variables, no
11212 pairs. Put the variable directly in the gloc.
11213 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
11214 (scm_init_debug): Use scm_c_define instead scm_sysintern.
11215
11216 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
11217
11218 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
11219 scm_the_last_stack_fluid_var. It now points to a variable instead
11220 of a vcell. Updated all uses.
11221 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
11222 instead of a vcell. Updated all uses.
11223
11224 * _scm.h: Include "variables.h" and "modules.h" since almost
11225 everybody needs them now.
11226
11227 * root.h (scm_symhash, scm_symhash_vars): Removed.
11228 * gc.c (scm_init_storage): Do not initialize them.
11229
11230 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11231
11232 * eval.c (scm_init_eval): Initialize scm_undefineds and
11233 scm_listofnull.
11234
11235 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
11236 like the SCM_NEWCELL macro counterparts.
11237
11238 (scm_init_storage, scm_init_gc): Moved initialization of
11239 scm_tc16_allocated from scm_init_gc to scm_init_storage.
11240
11241 (scm_init_storage): Moved initialization of scm_undefineds and
11242 scm_listofnull to eval.c, initializion of scm_nullstr to
11243 strings.c, initializion of scm_nullvect to vectors.c.
11244
11245 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
11246 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
11247
11248 * init.c (scm_init_guile_1): Reordered some initializations and
11249 added dependcy information comments.
11250
11251 * load.c (scm_init_load): Use scm_nullstr.
11252
11253 * strings.c (scm_init_strings): Initialize scm_nullstr.
11254
11255 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
11256
11257 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
11258
11259 * values.c (print_values): Print as a unreadable object, not as
11260 multiple lines. Thanks to Matthias Köppe!
11261
11262 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
11263
11264 * deprecation.c: Fixed copyright date.
11265
11266 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
11267 DEPRECATION_H to SCM_DEPRECATION_H.
11268
11269 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
11270
11271 * guile-doc-snarf.in: Update copyright.
11272 Fix relative path bug. Thanks to Sergey Poznyakoff.
11273
11274 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11275
11276 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
11277 accept open ports. Thanks to Quetzalcoatl Bradley!
11278
11279 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11280
11281 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
11282 has 779 primitives on startup.
11283
11284 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
11285
11286 * eval.c (scm_i_eval): Copy expression before passing it to
11287 SCM_XEVAL. The copy operation was removed unintendedly during my
11288 change on 2001-03-25.
11289
11290 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
11291
11292 from Matthias Köppe (thanks!):
11293
11294 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
11295 portable.
11296
11297 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
11298 docstring.
11299
11300 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11301
11302 * gc.c (scm_init_gc): Added FIXME comment.
11303
11304 * hooks.c: Since hooks don't have a name any more, it is not
11305 necessary to include objprop.h.
11306
11307 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
11308
11309 (symbol_name, scm_make_hook_with_name): Removed.
11310
11311 (scm_create_hook): Don't set the hook's name property.
11312
11313 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
11314
11315 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
11316
11317 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
11318
11319 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
11320 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
11321 FLOBUFLEN and define it unconditionally.
11322
11323 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
11324
11325 * gh_data.c (gh_lookup): Call gh_module_lookup with
11326 `scm_current_module ()', not `#f'.
11327 (gh_module_lookup): Expect a module instead of an obarray as first
11328 argument and do lookup in that module.
11329
11330 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
11331 arrays. The length of array is already determined differently and
11332 scm_uniform_vector_length does not work on arrays.
11333
11334 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
11335
11336 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
11337 as well. "SCM (*)(...)" does not work on RedHat 7.1.
11338
11339 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
11340 they are not used. Changed `wrong type' error into `wrong num
11341 args' error. Changed all callers.
11342
11343 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
11344 arguments are supplied.
11345
11346 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
11347
11348 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
11349 describe `regexp/notbol' and `regexp/noteol' execution flags.
11350
11351 * strop.c (scm_substring_move_x): Doc fix; nfc.
11352
11353 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
11354
11355 * objects.c, objects.h (scm_valid_object_procedure_p): New.
11356 (scm_set_object_procedure_x): Use it to check argument. Fix
11357 docstring.
11358
11359 * evalext.c (scm_definedp): Fix docstring.
11360
11361 2001-05-05 Gary Houston <ghouston@arglist.com>
11362
11363 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
11364 support.
11365
11366 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
11367
11368 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
11369 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
11370 Change R4RS references to R5RS.
11371
11372 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
11373 docstring source are correctly reproduced in the output (ii)
11374 we don't anymore get occasional trailing quotes. Also reorganized
11375 and commented the code a little.
11376
11377 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
11378 fixes.
11379
11380 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11381
11382 * strop.c (scm_string_split): New procedure.
11383
11384 * strop.h (scm_string_split): Added prototype.
11385
11386 2001-05-04 Gary Houston <ghouston@arglist.com>
11387
11388 * socket.c: define uint32_t if netdb.h doesn't. thanks to
11389 Dale P. Smith.
11390
11391 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
11392
11393 * rw.c: Include "modules.h" and "strports.h".
11394
11395 * net_db.h (scm_gethost): Added prototype.
11396
11397 * deprecation.h, deprecation.c: New.
11398 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
11399 (DOT_X_FILES): Added "deprecation.x".
11400 (modinclude_HEADERS): Added "deprecation.h".
11401
11402 * init.c: Include "deprecation.h".
11403 (scm_init_guile_1): Call scm_init_deprecation.
11404
11405 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
11406
11407 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
11408 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
11409 New.
11410
11411 2001-04-29 Gary Houston <ghouston@arglist.com>
11412
11413 * rw.c: new file, implementing C part of module (ice-9 rw).
11414 (scm_read_string_x_partial): moved from ioext.c
11415 (scm_init_rw): new proc.
11416 * rw.h: new file.
11417 init.c: include rw.h and call scm_init_rw.
11418 Makefile.am: include rw.c and rw.h.
11419
11420 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
11421
11422 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
11423 know what's supposed to happen to it.
11424
11425 * list.h (scm_list_star): deprecation expired - removed.
11426
11427 * numbers.h (scm_dblproc): deprecation expired - removed.
11428 (SCM_UNEGFIXABLE): deprecation expired - removed.
11429 (SCM_FLOBUFLEN): deprecation expired - removed.
11430 (SCM_INEXP): deprecation expired - removed.
11431 (SCM_CPLXP): deprecation expired - removed.
11432 (SCM_REAL): deprecation expired - removed.
11433 (SCM_IMAG): deprecation expired - removed.
11434 (SCM_REALPART): deprecation expired - removed.
11435 (scm_makdbl): deprecation expired - removed.
11436 (SCM_SINGP): deprecation expired - removed.
11437 (SCM_NUM2DBL): deprecation expired - removed.
11438 (SCM_NO_BIGDIG): deprecation expired - removed.
11439
11440 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
11441 (scm_tc_dblr): deprecation expired - removed.
11442 (scm_tc_dblc): deprecation expired - removed.
11443 (scm_tc16_flo): deprecation expired - removed.
11444 (scm_tc_flo): deprecation expired - removed.
11445
11446 * tag.h (scm_tag): deprecation expired - removed.
11447
11448 * tag.c: (scm_tag): deprecation expired - removed.
11449
11450 * ioext.c: (scm_fseek): deprecation expired - removed.
11451
11452 * ioext.h (scm_fseek): deprecation expired - removed.
11453
11454 * gh_data.c (gh_int2scmb): deprecation expired - removed.
11455
11456 * gh.h (gh_int2scmb): deprecation expired - removed.
11457
11458 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
11459
11460 * stacks.c (scm_make_stack): Fix typo in docstring.
11461
11462 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
11463
11464 * error.c (scm_sysmissing): deprecation expired - removed.
11465
11466 * error.h (scm_sysmissing): deprecation expired - removed.
11467
11468 * gc.c
11469 (scm_init_gc): gc-thunk deprecation expired - removed.
11470 (scm_gc_vcell): deprecation expired - removed.
11471 (gc_async_thunk): scm_gc_vcell related code removed.
11472
11473 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
11474
11475 * strings.h
11476 (SCM_NSTRINGP): deprecation expired - removed.
11477 (SCM_NRWSTRINGP): deprecation expired - removed.
11478
11479 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
11480
11481 * chars.h
11482 (SCM_ICHRP): deprecation expired - removed.
11483 (SCM_ICHR): deprecation expired - removed.
11484 (SCM_MAKICHR): deprecation expired - removed.
11485
11486 * ports.h
11487 (SCM_INPORTP): deprecation expired - removed.
11488 (SCM_OUTPORTP): deprecation expired - removed.
11489
11490 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
11491
11492 * modules.c (scm_module_type): New.
11493 (scm_post_boot_init_modules): Initialize from Scheme value.
11494 (the_module, scm_current_module, scm_init_modules): the_module is
11495 now a C only fluid.
11496 (scm_current_module): Export to Scheme.
11497 (scm_set_current_module): Do not call out to Scheme, do all the
11498 work in C. Export procedure to Scheme. Only accept modules, `#f'
11499 is no longer valid as the current module. Only set
11500 scm_top_level_lookup_closure_var and scm_system_transformer when
11501 they are not deprecated.
11502 (scm_module_transformer, scm_current_module_transformer): New.
11503
11504 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
11505 scm_current_module_transformer, scm_module_transformer): New.
11506
11507 * gh_data.c: Removed FIXME comment about gh_lookup returning
11508 SCM_UNDEFINED. That's the right thing to do.
11509
11510 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
11511 into the conditionally compiled sections.
11512 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
11513 scm_current_module_transformer instead of scm_system_transformer.
11514 * init.c (start_stack): Move initialization of
11515 scm_system_transformer to the deprecated section.
11516
11517 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
11518
11519 * throw.c (scm_throw): Correct docstring.
11520
11521 2001-04-22 Gary Houston <ghouston@arglist.com>
11522
11523 * socket.c: attempted to improve the docstrings slightly.
11524
11525 * net_db.c: remove bogus "close" declaration.
11526 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
11527 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
11528 moved to socket.c.
11529 * net_db.h: declarations moved too.
11530
11531 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
11532 long.
11533 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
11534 (VALIDATE_INET6): new macro.
11535 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
11536 inet-pton and inet-ntop.
11537 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
11538 (scm_addr_vector): use ipv6_net_to_num.
11539
11540 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11541
11542 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
11543 smob number explicitly. Use SCM_TC2SMOBNUM instead.
11544
11545 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
11546 when compiled in debug mode.
11547
11548 (scm_gc_sweep): Only call smob's free function if it is defined.
11549
11550 * print.c (scm_iprin1): No need to check for validity of smob
11551 type or existence of print function.
11552
11553 * smob.[ch] (scm_smobs): Made into a fixed size global array.
11554 Resizing will not work well with preemptive threading.
11555
11556 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
11557
11558 (scm_make_smob_type): Extracted initialization of smob
11559 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
11560 of the critical section.
11561
11562 (scm_smob_prehistory): Initialize all smob descriptors. By
11563 default, don't assign a smob free function: Most smob types don't
11564 need one.
11565
11566 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
11567
11568 2001-04-21 Gary Houston <ghouston@arglist.com>
11569
11570 * socket.c (FLIP_NET_HOST_128): new macro.
11571 (scm_fill_sockaddr): use new macro.
11572 (scm_addr_vector): completed IPv6 address support. added const
11573 to the address parameter.
11574
11575 2001-04-20 Gary Houston <ghouston@arglist.com>
11576
11577 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11578 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11579 is defined.
11580 (scm_addr_vector): use a switch instead of multiple if statements.
11581 Add support for IPv6 (incomplete) .
11582 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11583
11584 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11585
11586 * struct.c (scm_free_structs): Only pairs may be accessed with
11587 SCM_C[AD]R.
11588
11589 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11590
11591 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11592
11593 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11594 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11595 parentheses in order to get the correct associativity.
11596
11597 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11598
11599 * unif.c (scm_array_to_list): Added missing handling of arrays of
11600 bytes. Thanks to Masao Uebayashi for the bug report.
11601
11602 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11603
11604 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11605 consistently.
11606
11607 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11608
11609 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11610
11611 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11612 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11613 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11614 SCM_CLOSURE_FORMALS.
11615
11616 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11617 (scm_i_procedure_arity): Prefer stronger predicates like
11618 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11619
11620 * macros.c (macro_print): Extracted macro printing code from
11621 print.c and simplified it.
11622
11623 (scm_macro_type): Use SCM_MACRO_TYPE;
11624
11625 (scm_init_macros): Use macro_print for printing macros.
11626
11627 * print.c (scm_print_opts): Improved option documentation.
11628
11629 (scm_iprin1): Extracted printing of macros to macros.c.
11630 Simplified printing of ordinary closures.
11631
11632 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11633 Martin Grabmueller for the bug report.
11634
11635 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11636
11637 This patch eliminates some further applications of SCM_C[AD]R to
11638 non pair cells.
11639
11640 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11641 never been applied to real pairs.
11642
11643 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11644
11645 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11646
11647 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11648 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11649 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11650
11651 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11652 Added.
11653
11654 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11655 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11656
11657 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11658 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11659 SCM_SET{AND,OR}_CAR.
11660
11661 2001-04-17 Gary Houston <ghouston@arglist.com>
11662
11663 * some initial support for IPv6:
11664
11665 * socket.c (scm_fill_sockaddr): improve the argument validation.
11666 don't allocate memory until all args are checked. instead of
11667 unconditional memset of soka, try setting sin_len to 0 if
11668 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11669 (scm_socket, scm_connect): extend docstrings for IPv6.
11670 (scm_init_socket): intern AF_INET6 and PF_INET6.
11671
11672 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11673
11674 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11675 matches SCM_DEFER_INTS at the beginning of the function.
11676
11677 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11678
11679 * gc.c (scm_igc): Unconditionally call
11680 SCM_CRITICAL_SECTION_START/END.
11681
11682 * fluids.c (next_fluid_num): Unconditionally call
11683 SCM_CRITICAL_SECTION_START/END.
11684 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11685
11686 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11687 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11688 Removed.
11689
11690 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11691 Defined as nothing for the case of !defined(USE_THREADS).
11692 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11693 Removed.
11694 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11695 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11696 LINE.
11697 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11698 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11699 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11700 SCM_CRITICAL_SECTION_START/END.
11701 (SCM_REALLOW_INTS: Bug fix. Don't call
11702 SCM_THREAD_SWITCHING_CODE.
11703 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11704 SCM_THREAD_SWITCHING_CODE directly.
11705 (SCM_ENTER_A_SECTION): Unconditionally use
11706 SCM_CRITICAL_SECTION_START/END. (was:
11707 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11708
11709 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11710
11711 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11712 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11713 allowed to explicitly set this macro via the CFLAGS variable
11714 during make.
11715
11716 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11717 (SCM_THREAD_CRITICAL_SECTION_START,
11718 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11719 SCM_THREAD_CRITICAL_SECTION_START/END to
11720 SCM_CRITICAL_SECTION_START/END.
11721
11722 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11723
11724 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11725 instead of bzero.
11726
11727 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11728 (MISSING_BZERO_DECL): Remove the declaration.
11729
11730 Thanks to NIIBE Yutaka.
11731
11732 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11733
11734 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11735 goops module should be registered in order to work for an
11736 application which uses libguile statically linked.)
11737
11738 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11739
11740 * numbers.[ch] (scm_num2long, scm_num2long_long,
11741 scm_num2ulong_long, scm_num2ulong): Argument position is an
11742 unsigned integer.
11743
11744 * environments.c (eval_environment_folder,
11745 import_environment_folder), gh_data.c (gh_scm2longs,
11746 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11747 for integers and pointers, respectively.
11748
11749 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11750 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11751 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11752 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11753
11754 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11755 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11756 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11757 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11758 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11759 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11760
11761 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11762
11763 * strings.c (scm_read_only_string_p): Update docstring to reflect
11764 current (non-)usage of "read only" strings.
11765 (scm_make_shared_substring): Clarify docstring by changing
11766 "semantics" to "arguments".
11767
11768 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11769
11770 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11771 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11772 improvements.
11773
11774 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11775
11776 The following changes make the documentation more consistent.
11777
11778 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11779 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11780 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11781 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11782 ... @end lisp.
11783
11784 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11785 (scm_array_dimensions, scm_make_shared_array),
11786 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11787 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11788 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11789 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11790 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11791 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11792 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11793 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11794 @example ... @end example to @lisp ... @end lisp.
11795
11796 * weaks.c (scm_weak_vector): Corrected docstring.
11797
11798 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11799 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11800 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11801 (scm_hashx_set_x, scm_hashx_get_handle),
11802 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11803 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11804 vectors.c (scm_vector_fill_x), strings.c
11805 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11806 objprop.c (scm_set_object_properties_x):
11807 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11808 strports.c (scm_call_with_input_string), ports.c
11809 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11810 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11811 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11812 (scm_make_weak_vector,scm_weak_vector_p),
11813 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11814 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11815 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11816 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11817 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11818 Made parameter names match documentation by renaming parameters
11819 and/or fixing docstrings.
11820
11821 * numbers.c (scm_ash): Corrected Texinfo markup.
11822
11823 * strop.c (scm_string_index, scm_string_rindex),
11824 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11825
11826 * vports.c (scm_make_soft_port), unif.c
11827 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11828 (scm_dimensions_to_uniform_array, scm_transpose_array),
11829 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11830 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11831 (scm_array_to_list, scm_list_to_uniform_array),
11832 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11833 (scm_open_input_string, scm_open_output_string),
11834 (scm_get_output_string), strop.c (scm_string_copy),
11835 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11836 (scm_get_internal_real_time, scm_times),
11837 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11838 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11839 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11840 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11841 simpos.c (scm_system), random.c (scm_random_uniform),
11842 (scm_random_normal, scm_random_exp), ramap.c
11843 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11844 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11845 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11846 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11847 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11848 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11849 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11850 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11851 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11852 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11853 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11854 (scm_integer_expt, scm_bit_extract, scm_logcount),
11855 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11856 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11857 (scm_interaction_environment), macros.c (scm_makacro),
11858 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11859 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11860 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11861 (scm_fluid_ref), filesys.c (scm_open_fdes),
11862 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11863 Docstring correction: `Returns' -> `Return'
11864
11865 * gc.c (scm_set_debug_cell_accesses_x):
11866 (s_scm_gc_set_debug_check_freelist_x):
11867 * fluids.c (scm_fluid_p): Added texinfo markup.
11868
11869 * error.c (scm_strerror): Made docstring more precise.
11870
11871 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11872 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11873 (scm_symbol_p, scm_symbol_to_string), strorder.c
11874 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11875 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11876 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11877 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11878 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11879
11880 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11881
11882 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11883 mode, as suggested by Michael Livshin.
11884
11885 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11886
11887 * backtrace.c (display_backtrace_body): since the `print_state'
11888 variable is not used (instead its data field is used directly as
11889 `pstate'), protect it from the hungry compiler optimizations.
11890 thanks to Bill Schottstaedt for the report.
11891
11892 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11893
11894 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11895 It is only defined and used if guile is compiled with
11896 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11897 let cells with a free_cell type tag be visible outside of the
11898 garbage collector when in debug mode.
11899
11900 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11901
11902 (scm_assert_cell_valid): Use a local static variable to avoid
11903 recursion.
11904
11905 (MARK): Only check for rogue cell pointers in debug mode. Use
11906 scm_cellp for this purpose and place all checks for rogue pointers
11907 into that function. Further, since due to conservative scanning
11908 we may encounter free cells during marking, don't use the standard
11909 cell type accessor macro to determine the cell type.
11910
11911 (scm_cellp): Check if the cell pointer actually points into a
11912 card header.
11913
11914 (scm_init_gc): Initalize scm_tc16_allocated.
11915
11916 * gc.h (GCH): Renamed to SCM_GC_H.
11917
11918 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11919 might be unnecessary, but I feel better this way :-)
11920
11921 (SCM_GC_CELL_TYPE): New macro.
11922
11923 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11924 in guile, and it is unlikely that they will be applied to real
11925 pairs anyway.
11926
11927 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11928
11929 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11930 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11931
11932 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11933 make sure that in debug mode no free cell will ever be visible
11934 outside of the garbage collector.
11935
11936 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11937
11938 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11939 values.
11940
11941 * async.c (scm_system_async), variable.c (scm_make_variable,
11942 scm_make_undefined_variable): Use scm_cons to create a pair.
11943
11944 * debug.c (scm_reverse_lookup): Perform proper type checking.
11945 Remove suspicious use of SCM_SLOPPY_CONSP.
11946
11947 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11948 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11949 the corresponding optimization.
11950
11951 * eval.c (iqq): Use proper type check.
11952
11953 (scm_m_expand_body): Remove redundant type checks.
11954
11955 (promise_print): Don't access promise cells as pairs.
11956
11957 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11958 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11959 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11960 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11961 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11962
11963 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11964 (scm_iprin1): Use new macro predicate and accessors.
11965
11966 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11967 in macros.h.
11968
11969 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11970 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11971 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11972 SCM_VARIABLE_H. Even the macros that are used to inhibit
11973 including a header file twice should be in the SCM_ namespace.
11974
11975 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11976 properties.c (scm_primitive_property_ref,
11977 scm_primitive_property_del_x): Prefer stronger predicates like
11978 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11979
11980 * gc.c (MARK): Use proper macros to access procedure-with-setter
11981 cell elements and closure cell elements.
11982
11983 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11984 access free cells as pairs.
11985
11986 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11987 no hashtab entry is found.
11988
11989 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11990 SCM_CLR_PORT_OPEN_FLAG.
11991
11992 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11993 use SCM_SET_C[AD]R for uninitialized cells.
11994
11995 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11996 If the hashtable has no slots, return #f instead of '(). This
11997 unifies the return value with most assoc-functions.
11998
11999 (scm_hash_fn_ref): Use proper type check.
12000
12001 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
12002 Removed references to non-existing functions from documentation.
12003
12004 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
12005 access keyword cell elements.
12006
12007 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
12008 macros.
12009
12010 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
12011
12012 * print.c (scm_iprlist): Added comment. Improved loop
12013 conditions.
12014
12015 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
12016 pairs.
12017
12018 * smob.c (scm_markcdr): Don't access smob cells as pairs.
12019
12020 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
12021
12022 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
12023 cells as pairs.
12024
12025 * variable.c (variable_print, variable_equalp, scm_variable_ref,
12026 scm_variable_set_x): Use proper macros to access variable cell
12027 elements.
12028
12029 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
12030
12031 * variable.h (SCM_VARVCELL): Don't access variable cells as
12032 pairs.
12033
12034 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
12035 added FIXME comment, removed register specifier.
12036
12037 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
12038
12039 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
12040 * init.c (scm_init_guile_1): Don't init goopscore module.
12041
12042 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12043
12044 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
12045
12046 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12047
12048 * strop.c (scm_string_to_list): Fixed docstring markup.
12049 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
12050 (scm_string_downcase, scm_string_capitalize_x),
12051 (scm_string_capitalize): Rewrote and corrected docstrings.
12052 (scm_string_ci_to_symbol): Made docstring more explicit.
12053
12054 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
12055
12056 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
12057 eval.c can use it.
12058 (scm_call_with_values): Removed.
12059 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
12060 so that it can be exported.
12061 (scm_call_with_values): Removed.
12062
12063 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
12064 * eval.c: Include "libguile/values.h"
12065 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
12066 New.
12067 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
12068 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
12069 New delcarations to support above change.
12070
12071 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
12072 errors with last change.
12073
12074 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
12075
12076 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
12077 scm_i_eval): Moved the application of the system transformer from
12078 scm_i_eval to scm_primitive_eval.
12079
12080 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
12081
12082 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
12083
12084 * strop.c (scm_string_index): Fix docstring line break
12085 regression.
12086
12087 * list.c (scm_cons_star): Fix docstring typo.
12088
12089 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12090
12091 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
12092 (big2str), ports.c (scm_drain_input), read.c (scm_read,
12093 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
12094 scm_make_string, scm_string_append), strports.c (st_resize_port,
12095 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
12096 scm_makstr with calls to scm_allocate_string.
12097
12098 * strings.[ch] (scm_allocate_string): New function.
12099
12100 * strings.[ch] (scm_makstr): Deprecated.
12101
12102 2001-03-18 Gary Houston <ghouston@arglist.com>
12103
12104 * posix.c (scm_tmpnam): check that return value from tmpnam is not
12105 NULL. rewrote the docstring.
12106 (scm_mkstemp): new procedure implementing "mkstemp!".
12107 * posix.h: declare scm_mkstemp.
12108
12109 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
12110 normally it would be found in netdb.h.
12111
12112 2001-03-17 Gary Houston <ghouston@arglist.com>
12113
12114 * sort.c (scm_sort): move sortvec variable to avoid a compiler
12115 warning when HAVE_ARRAYS is not defined. move len too.
12116
12117 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
12118 (EXTRA_DOT_X_FILES): let configure set the value.
12119 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
12120
12121 * gc.c (scm_must_malloc): changed the comment explaining when
12122 scm_must variants of malloc/free etc., should be used, based on
12123 explanation from Dirk Herrmann.
12124 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
12125 string with procedure name. use scm_must_malloc instead of malloc.
12126 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
12127 of malloc/free.
12128 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
12129 scm_ungetc): use scm_must variants of malloc/realloc/free.
12130 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
12131
12132 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12133
12134 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12135 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
12136 scm_wrong_type_arg instead.
12137
12138 (SCM_WNA): Deprecated.
12139
12140 * error.[ch] (scm_wta): Deprecated.
12141
12142 * numbers.c (s_i_log): Minor comment fix.
12143
12144 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
12145 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
12146 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
12147 wrong-num-args or misc errors.
12148
12149 * unif.c (scm_make_shared_array, scm_transpose_array,
12150 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
12151 Validate the rest argument (note: this is only done when guile is
12152 built with SCM_DEBUG_REST_ARGUMENT=1)
12153
12154 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
12155 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
12156
12157 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
12158 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
12159
12160 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12161
12162 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
12163 instead of scm_wrong_num_args.
12164
12165 * coop-threads.c: Don't include libguile/strings.h. (Was only
12166 needed for former implementation of SCM_WRONG_NUM_ARGS.)
12167
12168 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
12169 wrong-num-args errors.
12170
12171 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12172
12173 * error.[ch] (scm_error_num_args_subr): New function.
12174
12175 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12176
12177 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
12178 (scm_length, scm_append, scm_reverse, scm_list_ref),
12179 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
12180 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
12181 (scm_delete1_x), gc.c (scm_map_free_list),
12182 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
12183 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
12184 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
12185 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
12186 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
12187 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
12188 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
12189
12190 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
12191 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12192 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
12193 symbols.c (scm_symbol_interned_p), numbers.c
12194 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
12195 markup.
12196
12197 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
12198
12199 * snarf.h (SCM_CONST_LONG): Deprecated.
12200 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
12201
12202 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12203
12204 * numbers.c (scm_num2ulong): Check that a bignum is positive
12205 before looking at the magnitude. Correctly check for overflow
12206 during conversion.
12207 (scm_num2long_long): Likewise.
12208 (scm_num2ulong_long): New.
12209 (ULONG_LONG_MAX): Define if not already defined.
12210 * numbers.h: (scm_num2ulong_long): New prototype.
12211
12212 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12213
12214 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
12215
12216 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
12217 (SCM_OPOUTSTRPORTP): New predicate macros.
12218 (scm_open_input_string, scm_open_output_string),
12219 (scm_get_output_string): New prototypes.
12220
12221 * strports.c (scm_open_input_string, scm_open_output_string),
12222 (scm_get_output_string): New procedures (SRFI-6 compliant).
12223 Made scm_tc16_strport non-static.
12224
12225 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12226
12227 * macros.h (SCM_ASSYNT): Removed unused object argument from
12228 signature.
12229
12230 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
12231 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
12232 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
12233 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
12234 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
12235 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
12236 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
12237 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
12238 scm_m_atdispatch): Removed unused object argument from call to
12239 SCM_ASSYNT.
12240
12241 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12242
12243 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
12244 const int* to reflect that the input array of integers remains
12245 unchanged. Thanks to Brett Viren for the hint.
12246
12247 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12248
12249 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
12250 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
12251 in various places.
12252 (gh_scm2newstr, gh_symbol2newstr): Change call to
12253 scm_must_malloc() to malloc(), because user-free()able memory is
12254 allocated.
12255
12256 * gc.c: Added declaration of `scm_debug_check_freelist'.
12257
12258 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12259
12260 * ports.c (scm_port_mode): Changed `mode' array size to 4.
12261
12262 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
12263
12264 * strports.c (scm_object_to_string): New procedure.
12265 (scm_strprint_obj): Deprecated.
12266 * strports.h: Reflect the changes.
12267
12268 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
12269
12270 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
12271
12272 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
12273 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
12274 SCM_ASSYNT to check for correct argument types. Either use some
12275 SCM_VALIDATE_* macro or an explicit test.
12276
12277 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
12278 misc-errors.
12279
12280 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
12281 instead of calling scm_wta.
12282
12283 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12284
12285 * load.c (scm_primitive_load, scm_primitive_load_path),
12286 (scm_sys_search_load_path): Corrected docstrings (file ->
12287 filename).
12288
12289 * eval.c (scm_force): Added texinfo markup to docstring.
12290 (scm_promise_p): Renamed parameter to `obj' to match docstring.
12291
12292 * debug-malloc.c: Reinserted #include <stdio.h>.
12293
12294 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
12295
12296 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
12297
12298 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
12299 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
12300 Use SCM_LISTn instead of scm_listify.
12301
12302 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12303
12304 * _scm.h: Removed #include <errno.h>.
12305
12306 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
12307 errno variable (can be a macro on some systems, for example when
12308 using linux libc with threads).
12309
12310 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
12311 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
12312 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
12313 #include <errno.h> in these 20 out of 100 files.
12314
12315 2001-03-10 Gary Houston <ghouston@arglist.com>
12316
12317 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
12318 not already defined.
12319
12320 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12321
12322 * coop.c: Inserted #include <stdio.h>.
12323
12324 * iselect.c: Reinserted #include <stdio.h>.
12325
12326 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
12327
12328 * posix.c: Replaced `#define' of __USE_XOPEN right before
12329 including unistd.h with a define of _GNU_SOURCE at the very top of
12330 the file.
12331
12332 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
12333
12334 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
12335 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
12336 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
12337 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
12338 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
12339 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
12340 print.c, procprop.c, procs.c, properties.c, ramap.c,
12341 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
12342 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
12343 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
12344 Remove #include <stdio.h>
12345 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
12346
12347 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
12348
12349 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12350
12351 * posix.c (scm_gethostname): Set initial name length to 256 for
12352 Solaris.
12353
12354 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12355
12356 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12357 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12358 (scm_sethostname, scm_gethostname): New prototypes.
12359
12360 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
12361 <sys/file.h>, if present.
12362 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
12363 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
12364 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12365 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12366 (scm_sethostname, scm_gethostname): New procedures.
12367
12368 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
12369
12370 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
12371 not optional (ii) "recommend" spelling correction.
12372
12373 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12374
12375 * ramap.c (racp): Removed optimization which caused array copying
12376 to fail if the two arrays shared storage. Re-inserted the IVDEP
12377 macros removed in the change of 2000-03-09. (Don't really have a
12378 complete grasp of what they are for, but they seem to be necessary
12379 on Crays. This needs testing!) Thanks to Miroslav Silovic.
12380
12381 * hash.c (scm_string_hash): Don't downcase characters.
12382
12383 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12384
12385 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
12386 size from 277 --> 1009.
12387
12388 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
12389 function.
12390
12391 * coop-threads.c: Fixed change of 2001-03-06.
12392
12393 * validate.h: Code formatting.
12394
12395 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
12396
12397 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
12398 (*.doc): Add dependency on guile-snarf.awk.in.
12399
12400 * guile-snarf.awk.in: Neglect spaces at the end of
12401 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
12402 middle of docstrings. (To avoid the problem with gcc-2.96.)
12403
12404 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
12405
12406 * coop-threads.c (scm_call_with_new_thread), load.c
12407 (scm_primitive_load, scm_sys_search_load_path), random.c
12408 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
12409 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
12410 (potentially) issue a scm-misc-error or wrong-num-args error
12411 message.
12412
12413 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
12414 about the expected type with the wrong-type-arg error message.
12415
12416 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
12417 a C level bug that can't be fixed from scheme anyway.
12418
12419 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12420
12421 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
12422 Duplicate bindings are OK in a let* since a let* is semantically
12423 equivalent to a nested set of let:s.
12424
12425 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12426
12427 * print.c (scm_print_options): Fixed texinfo in docstring.
12428
12429 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
12430 the underlying functions getservent, getprotoent or getnetent
12431 return NULL instead of signalling an error.
12432
12433 2001-03-04 Gary Houston <ghouston@arglist.com>
12434
12435 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
12436 taking an unexpectedly large filename for an AF_UNIX socket from
12437 bind/connect/sendto (thanks to Martin Grabmueller).
12438
12439 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
12440 former and adjusted the latter.
12441 (scm_socket, scm_socketpair): cosmetic changes.
12442 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
12443 size_t as socklen_t substitute. don't restrict args/return values
12444 to INUM: allow full range of int or size_t.
12445 (scm_fill_sockaddr): check arguments before allocating memory, to
12446 avoid leakage. use malloc, not scm_must_malloc.
12447 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
12448 substitute. free the sockaddr structure before throwing an error.
12449 (scm_init_add_buffer): procedure removed, together with its static
12450 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
12451 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
12452 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
12453 scm_sendto): use a local buffer instead of scm_addr_buffer.
12454 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
12455 not size_t.
12456 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
12457 call to detect whether recvfrom could be bothered to set the address.
12458 (scm_init_socket): don't call scm_init_addr_buffer.
12459
12460 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12461
12462 * debug.c (scm_procedure_source, scm_procedure_environment),
12463 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
12464 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
12465 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
12466 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
12467 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
12468 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
12469 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
12470 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
12471 scm_array_to_list, scm_array_prototype), validate.h
12472 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
12473 scm_misc_error or scm_wrong_type_arg instead.
12474
12475 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
12476
12477 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12478
12479 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
12480 (scm_sys_tag_body): Added.
12481
12482 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12483
12484 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
12485 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
12486 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
12487 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
12488 options.c (scm_options), ports.c (scm_remove_from_port_table),
12489 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
12490 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
12491 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
12492 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
12493 instead.
12494
12495 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12496
12497 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
12498
12499 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
12500
12501 * eval.c (scm_s_duplicate_bindings): New error message.
12502 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
12503
12504 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
12505
12506 * eval.h (SCM_EVALIM2): New macro. Use it when a
12507 immediate, literal constant should be evaluated.
12508 * eval.c (scm_s_duplicate_formals): New error message string.
12509 (scm_c_improper_memq): New function.
12510 (scm_m_lambda): Check for duplicate arguments.
12511 (scm_ceval, scm_deval): When executing a body: only cons a new
12512 toplevel environment frame when it is different from the
12513 existing one; use EVALCAR instead of SIDEVAL so that we can properly
12514 check for empty combinations; use SCM_EVALIM2 for the same reason
12515 in the non-toplevel loop.
12516 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
12517 New labels with the meaning of their non-"nontoplevel" partners,
12518 but they are used when it is known that the body is not evaluated at
12519 top-level.
12520 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
12521 reporting for empty combinations.
12522
12523 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
12524
12525 * Remove dump facilities.
12526 * dump.c, dump.h: Removed.
12527 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
12528 * init.c: Remove #include "libguile/dump.h".
12529 (scm_init_guile_1): Remove scm_init_dump.
12530 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
12531 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
12532 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
12533 (scm_set_smob_dump, scm_set_smob_undump): Removed.
12534
12535 * keywords.c: Remove #include "libguile/dump.h".
12536 (keyword_dump, keyword_undump): Removed.
12537 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
12538
12539 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12540
12541 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
12542 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
12543 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
12544 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
12545 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
12546 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
12547 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
12548 to @code{} as the texinfo manual recommends, converted the
12549 examples to use a @lisp{}-environment.
12550
12551 * strports.c (scm_eval_string): Cleaned up the docstring.
12552
12553 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
12554 markup.
12555
12556 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
12557 (scm_number_to_string, scm_string_to_number, scm_number_p)
12558 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
12559 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
12560 (scm_ash): Added texinfo markup and removed obsolete @refill.
12561 (scm_gr_p): Corrected comment.
12562 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
12563 docstring) comments.
12564 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
12565 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
12566 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
12567 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
12568 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
12569 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
12570 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
12571 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
12572
12573 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
12574
12575 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
12576 (Obviously nobody compiles with SCM_RECKLESS defined...)
12577
12578 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12579
12580 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12581
12582 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12583
12584 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12585
12586 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12587
12588 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12589 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12590 since use of `z' suggests that the arguments may be complex.
12591
12592 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12593 typos.
12594
12595 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12596
12597 * dump.c (scm_binary_write, scm_binary_read), eval.c
12598 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12599 scm_guardian_greedy_p, scm_make_guardian), fports.c
12600 (scm_file_port_p): Minor docstring fixes.
12601
12602 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12603
12604 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12605
12606 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12607 scm_i_eval.
12608 (make_class_from_template): Do not bother to set the current
12609 module around the call to DEFVAR, scm_eval takes care of that.
12610 (scm_init_goops): Make scm_module_goops and
12611 scm_goops_lookup_closure permanent objects.
12612
12613 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12614 top level, create a fresh top-level environment for each
12615 expression instead of mutating the exisint frame. This is
12616 important when that frame is closed over.
12617
12618 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12619 SCM_DIGSPERLONG instead of DIGSPERLONG.
12620
12621 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12622
12623 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12624 before applying arrow procedure in `cond' and before applying
12625 receiver procedure in call-with-current-continuation.
12626 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12627 macro. The argument is expanded more than one time.
12628
12629 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12630 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12631
12632 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12633
12634 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12635 notice and license.
12636
12637 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12638
12639 * variable.c (scm_make_variable, scm_make_undefined_variable)
12640 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12641 (scm_variable_bound_p), values.c (scm_values)
12642 (scm_call_with_values), unif.c (scm_bit_count)
12643 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12644 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12645 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12646 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12647 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12648 (scm_copy_random_state, scm_random), print.c (scm_newline)
12649 (scm_write_char, scm_simple_format), debug-malloc.c
12650 (scm_malloc_stats), environments.c (scm_environment_p)
12651 (scm_environment_bound_p, scm_environment_ref)
12652 (scm_environment_fold, scm_environment_define)
12653 (scm_environment_undefine, scm_environment_set_x)
12654 (scm_environment_cell, scm_environment_observe)
12655 (scm_environment_observe_weak, scm_environment_unobserve)
12656 (scm_make_eval_environment, scm_eval_environment_p)
12657 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12658 (scm_eval_environment_imported)
12659 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12660 (scm_import_environment_p, scm_import_environment_imports)
12661 (scm_import_environment_set_imports_x, scm_make_export_environment)
12662 (scm_export_environment_p, scm_export_environment_private)
12663 (scm_export_environment_set_private_x)
12664 (scm_export_environment_signature)
12665 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12666 Added texinfo markup.
12667
12668 * ports.c (scm_drain_input): Lowercased argument to @var.
12669 (scm_current_input_port, scm_current_output_port): Filled in
12670 missing explanation.
12671 (scm_current_load_port, scm_set_current_output_port)
12672 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12673 Added texinfo markup.
12674
12675 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12676 (scm_release_arbiter): Added texinfo markup to docstrings.
12677 Changed `Returns' to `Return'.
12678 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12679
12680 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12681
12682 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12683 by doubling them to `@@'.
12684
12685 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12686
12687 * numbers.c (scm_lognot), random.c (scm_random,
12688 scm_random_normal, scm_random_solid_sphere_x,
12689 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12690 scm_random_exp), dynwind.c
12691 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12692
12693 * goops.c (scm_sys_initialize_object, scm_instance_p,
12694 scm_class_name, scm_class_precedence_list, scm_class_slots,
12695 scm_class_environment, scm_generic_function_name,
12696 scm_generic_function_methods, scm_method_generic_function,
12697 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12698 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12699 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12700 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12701 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12702 scm_class_direct_supers, scm_class_direct_slots,
12703 scm_class_direct_subclasses, scm_class_direct_methods,
12704 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12705 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12706 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12707 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12708 scm_memoized_environment, scm_procedure_name,
12709 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12710 objects.c
12711 (scm_class_of, scm_entity_p, scm_operator_p,
12712 scm_set_object_procedure_x, scm_object_procedure,
12713 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12714 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12715 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12716 scm_hook_to_list), lang.c
12717 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12718 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12719 (scm_print_options, scm_port_with_print_state,
12720 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12721 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12722 scm_make_procedure_with_setter, scm_procedure), throw.c
12723 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12724 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12725 scm_stack_ref, scm_stack_length, scm_frame_p,
12726 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12727 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12728 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12729 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12730 (scm_dirname, scm_basename), dynwind.c
12731 (scm_wind_chain), read.c (scm_read_options, scm_read,
12732 scm_read_hash_extend), gc.c
12733 (scm_unhash_name), eval.c (scm_eval_options_interface,
12734 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12735 (scm_display_error, scm_set_print_params_x,
12736 scm_display_application, scm_display_backtrace, scm_backtrace),
12737 async.c (scm_async, scm_system_async, scm_async_mark,
12738 scm_system_async_mark, scm_run_asyncs, scm_noop,
12739 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12740 scm_mask_signals): Added docstrings.
12741
12742 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12743
12744 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12745 address of car/cdr. (Thanks to Dirk Herrmann)
12746 Use scm_sizet to obtain the length of strings.
12747 (Thanks to Matthias Koeppe)
12748
12749 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12750
12751 * symbols.c (scm_mem2symbol): Put a empty statement after the
12752 next_symbol label. This is mandated by ANSI, appearantly.
12753
12754 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12755
12756 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12757 sense to compile for a specific kernel version. Do not include
12758 <asm/signal.h> while defining __KERNEL__. This hack should no
12759 longer be needed and caused problems.
12760
12761 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12762
12763 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12764 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12765 can not deal with immediates.
12766
12767 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12768
12769 * list.c (scm_list_copy): Validate the first argument.
12770
12771 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12772
12773 Fix evaluator so that top-level expressions are correctly
12774 evaluated with respect to the module system.
12775
12776 * modules.h. modules.c (scm_current_module_lookup_closure): New
12777 function.
12778
12779 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12780 prototypes.
12781 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12782 names to better reflect their meaning.
12783
12784 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12785 evaluated at top-level and synronize lookup closure before
12786 executing every subform.
12787 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12788 (scm_eval_x, scm_eval): Reimplement in terms of
12789 scm_primitive_eval_x and scm_primitive_eval, respectively.
12790
12791 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12792
12793 * macros.c (scm_macro_name, scm_macro_transformer): Use
12794 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12795 Thanks!
12796
12797 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12798
12799 * dump.c (scm_store_bytes): Store data size before data.
12800 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12801 * dump.h (scm_restore_bytes): Updated.
12802
12803 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12804
12805 * dump.c: Use double cells for update schedule.
12806
12807 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12808
12809 * ports.c (scm_unread_char): Take an optional argument.
12810
12811 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12812
12813 * modules.h (scm_selected_module, scm_current_module): Renamed
12814 scm_selected_module to scm_current_module to synchronize Scheme
12815 and C names.
12816 (scm_select_module, scm_set_current_module): Likewise. Changed
12817 all uses.
12818
12819 * ports.c (scm_port_for_each): Make a snapshot of the port table
12820 before iterating over it. The table might change while the user
12821 code is running. With the snapshot, the user can depend on the
12822 fact that each port that existed at the start of the iteration is
12823 encountered exactly once. (ice-9 popen) depends on this.
12824
12825 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12826
12827 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12828
12829 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12830 range checking for the size parameter. Thanks to Martin
12831 Grabmueller for the hint.
12832
12833 (scm_makstr): Reordered string initialization to make interrupt
12834 deferring unnecessary.
12835
12836 * vectors.c (scm_make_vector): Fixed range checking.
12837
12838 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12839
12840 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12841
12842 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12843 checking of the size parameter for type correctness and valid
12844 range. Thanks to Rob Browning for reporting the problem. Instead
12845 of deferring interrupts, scm_remember_upto_here_1 is used.
12846
12847 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12848
12849 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12850 (scm_dump_cell_update): Removed.
12851 (scm_dump_update): Renamed from scm_dump_object_update.
12852 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12853 a pointer instead of returning a value.
12854 * keywords.c (keyword_undump): Updated.
12855
12856 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12857
12858 * dump.c, dump.h: Modified a lot.
12859 (SCM_DUMP_COOKIE): Version 0.1
12860 (scm_dump_mark): Removed.
12861 (scm_restore_cell_object, scm_store_cell_object): New functions.
12862
12863 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12864 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12865 New slots: dump, undump.
12866 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12867 Updated.
12868
12869 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12870 (keyword_undump): Renamed from keyword_alloc.
12871 (scm_init_keywords): Set keyword_dump and keyword_undump.
12872
12873 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12874
12875 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12876 the deprecated SCM_DOUBLE_CELLP.
12877
12878 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12879
12880 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12881
12882 * dump.c, dump.h: New files.
12883 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12884 * init.c: #include "libguile/dump.h".
12885 (scm_init_guile_1): Call scm_init_dump.
12886 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12887 dump_dealloc, dump_store, undump_alloc, undump_restore,
12888 undump_init.
12889 * smob.c (scm_make_smob_type): Init the new slots.
12890 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12891 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12892
12893 * keywords.c: #include "libguile/dump.h".
12894 (keyword_dealloc, keyword_alloc): New functions.
12895 (scm_init_keywords): Set smob_dump and smob_undump.
12896
12897 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12898
12899 * vectors.c (scm_c_make_vector): New function.
12900 * vectors.h (scm_c_make_vector): Declared.
12901 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12902 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12903 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12904 (scm_make_method_cache, scm_i_vector2list,
12905 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12906 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12907 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12908 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12909 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12910 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12911 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12912 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12913
12914 * hashtab.c (scm_c_make_hash_table): New function.
12915 * hashtab.h (scm_c_make_hash_table): Declared.
12916 * environments.c (scm_make_leaf_environment,
12917 scm_make_eval_environment), gc.c (scm_init_storage),
12918 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12919 Use scm_c_make_hash_table.
12920
12921 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12922
12923 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12924
12925 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12926
12927 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12928 end of docstring.
12929
12930 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12931 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12932 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12933 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12934 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12935 scm_source_property, scm_set_source_property_x), sort.c
12936 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12937 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12938 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12939 docstrings.
12940
12941 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12942
12943 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12944 really get that arg.
12945
12946 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12947
12948 * goops.c (s_scm_get_keyword): Bug fix.
12949
12950 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12951
12952 The following patch was sent by Martin Grabmueller. It makes sure
12953 that in case of parameter errors the correct function name is
12954 shown, and that parameter types are only checked once.
12955
12956 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12957 string_capitalize_x): New functions. Each one performs the core
12958 functionality of the corresponding scm_* function.
12959
12960 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12961 scm_string_downcase_x, scm_string_downcase,
12962 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12963 parameter checking wrappers of the above functions.
12964
12965 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12966
12967 * continuations.c, dynl.c, keywords.c, load.c: Include
12968 strings.h. Thanks to Bill Schottstaedt for the bug report.
12969
12970 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12971
12972 * backtrace.c (display_header): Make sure that line and column
12973 information is shown independent of whether the port the code was
12974 read from had an associated filename. Thanks to Martin
12975 Grabmueller for providing this patch.
12976
12977 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12978
12979 * fports.[ch] (scm_file_port_p): New primitive.
12980
12981 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12982
12983 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12984 These are now defined in fports.c, strports.c and vports.c.
12985
12986 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12987 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12988 tags.h).
12989
12990 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12991 (scm_make_sfptob): Made static. These return a type code now.
12992
12993 fports.c (scm_init_fports), strports.c (scm_init_strports),
12994 vports.c (scm_init_vports): Create the corresponding port types.
12995
12996 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12997 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12998
12999 * init.c (scm_init_guile_1): Make sure strports are initialized
13000 before gdbint.
13001
13002 * ports.[ch] (scm_make_port_type): Changed the return type to
13003 scm_bits_t.
13004
13005 * ports.c (scm_ports_prehistory): Don't create any port types
13006 here.
13007
13008 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
13009 against scm_tc16_fport directly.
13010
13011 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13012
13013 * srcprop.c (scm_set_source_property_x): Fix to handle
13014 (set-source-property! <obj> 'copy <datum>) correctly.
13015
13016 2001-01-24 Gary Houston <ghouston@arglist.com>
13017
13018 * filesys.c (scm_link): docstring fix.
13019 * fports.h (scm_setfileno): obsolete declaration removed.
13020 * posix.c: bogus popen declaration removed.
13021
13022 * rdelim.c: new file, split from ioext.c.
13023 * rdelim.h: new file, split from ioext.h
13024 * Makefile.am: add rdelim.c and related files.
13025 * init.c: call scm_init_rdelim. include rdelim.h.
13026
13027 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13028
13029 This patch was sent by Martin Grabmueller and makes sure that
13030 parameter errors are reported correctly by the lexicographic
13031 ordering predicates.
13032
13033 * strorder.c (string_less_p, string_ci_less_p): New functions.
13034
13035 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
13036 functionality into string_less_p, string_ci_less_p respectively.
13037 The remaining code is just a wrapper to do the parameter
13038 checking.
13039
13040 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
13041 parameters and call string_less_p instead of scm_string_less_p.
13042
13043 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
13044 Check the parameters and call string_less_ci_p instead of
13045 scm_string_ci_less_p.
13046
13047 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13048
13049 This patch modifies scm_display_error to perform parameter
13050 checking. Thanks to Neil Jerram for the bug report.
13051
13052 * backtrace.[ch] (scm_i_display_error): New function.
13053
13054 * backtrace.c (scm_display_error): Added parameter check and
13055 extracted the core functionality into function
13056 scm_i_display_error.
13057
13058 * throw.c (handler_message): Call scm_i_display_error to display
13059 the error message.
13060
13061 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13062
13063 * eval.c (SCM_APPLY): Added # args check for application of
13064 procedures with arity 3. (Thanks to Anders Holst.)
13065
13066 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
13067
13068 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
13069
13070 (SCM_OPDIRP): Deprecated.
13071
13072 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
13073 SCM_OPN.
13074
13075 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
13076 Instead, give an explicit error message in case the directory is
13077 closed.
13078
13079 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
13080 instead of SCM_OPENP and SCM_CLOSEDP.
13081
13082 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
13083
13084 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13085
13086 * eval.c (inner_eval, scm_eval): Move all real functionality into
13087 inner_eval. Avoid to copy the expression twice by inlining some
13088 code from scm_i_eval.
13089
13090 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
13091
13092 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
13093 now has to be the last clause, as required by R5RS. Thanks to
13094 Martin Grabmueller for the patch.
13095
13096 2001-01-18 Gary Houston <ghouston@arglist.com>
13097
13098 * ioext.c: further simplify scm_read_string_x_partial by defining
13099 a macro SCM_EBLOCK.
13100
13101 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
13102
13103 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
13104
13105 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
13106
13107 * __scm.h: Added comment about architecture and compiler
13108 properties that are required by guile.
13109
13110 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
13111 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
13112
13113 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
13114
13115 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
13116
13117 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
13118 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
13119
13120 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13121
13122 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
13123 to the names in limits.h.
13124
13125 * numbers.c (abs_most_negative_fixnum): Added.
13126
13127 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
13128 fixnum-min) special case.
13129
13130 (scm_big_and): Fix for negative first parameter.
13131
13132 (scm_bit_extract): Fix for fixnum paramters.
13133 Thanks to Rob Browning for the bug report.
13134
13135 (scm_init_numbers): Initialize abs_most_negative_fixnum.
13136
13137 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
13138
13139 * symbols.c (scm_symbol_bound_p): Fixed comment.
13140 Thanks to Chris Cramer.
13141
13142 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13143
13144 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
13145 Thanks to Bill Schottstaedt.
13146
13147 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
13148
13149 from Matthias Köppe:
13150
13151 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
13152 casts its result, so doesn't yield an lvalue per ANSI C.
13153
13154 * goops.c (s_scm_sys_set_object_setter_x): use
13155 SCM_SET_ENTITY_SETTER.
13156 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
13157
13158 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
13159 its result, so doesn't yield an lvalue per ANSI C.
13160 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
13161 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
13162 SCM_GC_SET_CARD_FLAGS.
13163 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
13164
13165 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
13166
13167 2001-01-08 Gary Houston <ghouston@arglist.com>
13168
13169 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
13170 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
13171 socket.c (scm_recvfrom): use the new macro, plus minor docstring
13172 changes.
13173 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
13174 for fdes. if current input port is used, check that it's a file
13175 port.
13176
13177 2001-01-06 Gary Houston <ghouston@arglist.com>
13178
13179 * ioext.c (scm_read_string_x_partial): new procedure, implements
13180 read-string!/partial.
13181 * ports.c (scm_take_from_input_buffers): new procedure used by
13182 scm_read_string_x_partial.
13183 (scm_drain_input): use scm_take_from_input_buffers.
13184
13185 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
13186
13187 * validate.h (SCM_VALIDATE_NUMBER): New.
13188
13189 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
13190
13191 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
13192 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
13193 SET_DESTROYED): new defines/macros.
13194 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
13195 (add_to_live_list): takes a `guardian_t *' now, not SCM.
13196 (guardian_print): print more info.
13197 (guardian_apply): check if the guardian is destroyed, and throw an
13198 error if so. take one more optional argument `throw_p'.
13199 (scm_guard): depending on the value of `throw_p', return a boolean
13200 result.
13201 (scm_get_one_zombie): remove redundant property test.
13202 (guardian_t): represent the various (currently 3, I hope nothing
13203 more gets added) boolean fields as bit flags.
13204 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
13205 (scm_destroy_guardian_x): new procedure.
13206
13207 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
13208 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
13209
13210 2001-01-01 Gary Houston <ghouston@arglist.com>
13211
13212 * fports.c (fport_write): bugfix: handle short writes for
13213 unbuffered ports too. optimize the buffered case by minimizing
13214 the number of write/flush calls.
13215 (write_all): new helper procedure.
13216
13217 The ChangeLog continues in the file: "ChangeLog-2000"