*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-09-05 Marius Vollmer <mvo@zagadka.de>
2
3 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
4 New.
5 (sym_reader): New.
6 (scm_print_opts): Added "quote-keywordish-symbols" option.
7 (quote_keywordish_symbol): New, for evaluating the option.
8 (scm_print_symbol_name): Use it.
9 (scm_init_print): Initialize new option to sym_reader.
10
11 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
12
13 * eval.c (eval_letrec_inits): New.
14 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
15
16 2005-08-12 Marius Vollmer <mvo@zagadka.de>
17
18 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
19 Peter Gavin!
20
21 2005-08-06 Kevin Ryde <user42@zip.com.au>
22
23 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
24 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
25 scm_string_index, scm_string_index_right, scm_string_skip,
26 scm_string_skip_right, scm_string_count, scm_string_map,
27 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
28 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
29 procedures called in loops.
30
31 2005-08-02 Kevin Ryde <user42@zip.com.au>
32
33 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
34 avoid lots of copying where previoulsy growing by only 80 bytes at a
35 time.
36
37 2005-08-01 Marius Vollmer <mvo@zagadka.de>
38
39 * modules.h, modules.c (scm_eval_closure_module): Removed, we
40 already have scm_lookup_closure_module, which does the same thing.
41
42 2005-08-01 Marius Vollmer <mvo@zagadka.de>
43
44 New marking algorithm for weak hashtables that fixes the problem
45 that references from the non-weak value to the associated weak
46 key (for example) would prevent the entry from ever being dropped.
47
48 Guardians have been changed back to their original semantics and
49 are no longer greedy and no longer drop cycles.
50
51 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
52 hashtable and guardian machinery but call the relevant functions
53 directly.
54
55 * guardians.h, guardians.c, deprecated.h,
56 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
57 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
58 Deprecated and moved into deprecated.[ch].
59
60 * guardians.h, guardians.c: Mostly rewritten.
61 (scm_i_init_guardians_for_gc,
62 scm_i_identify_inaccessible_guardeds,
63 scm_i_mark_inaccessible_guardeds): New.
64 (scm_make_guardian): Removed greedy_p argument.
65
66 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
67 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
68 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
69 (scm_weaks_prehistory): Removed.
70 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
71 scm_i_mark_weak_vectors_non_weaks,
72 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
73 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
74 scm_scan_weak_vectors): Removed.
75
76 * hashtab.h (scm_i_scan_weak_hashtables): New.
77 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
78 SCM_WVECTF_NOSCAN.
79 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
80 t->n_items.
81 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
82 to latter. Do not scan the alists themselves, this is done by the
83 weak vector code now. Just update the element count.
84
85 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
86 to latter. The type is now only part of the cell word.
87 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
88
89 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
90
91 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
92
93 Some changes towards making it possible to run Guile on the EM64T
94 platform.
95
96 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
97 mallocating for (unsigned long *bounds).
98
99 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
100 scm_t_bits before storing them in the type word.
101
102 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
103 scm_t_bits to int.
104
105 2005-07-12 Kevin Ryde <user42@zip.com.au>
106
107 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
108 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
109 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
110 than scm_makfrom0str.
111 Reported by Ken Raeburn.
112
113 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
114 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
115 returning SCM_GC_CARD_BVEC.
116
117 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
118 rather than latin-1 acute accent, the latter may not print on all
119 terminals.
120
121 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
122 trailing deletions, so as to return a substring if those are the only
123 changes.
124
125 2005-07-10 Kevin Ryde <user42@zip.com.au>
126
127 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
128 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
129 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
130 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
131
132 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
133
134 * gc-card.c (scm_i_card_statistics): init tag.
135
136 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
137
138 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
139
140 * fports.c (s_scm_open_file): add the b flag for binary to the doc
141 string.
142
143 2005-06-25 Kevin Ryde <user42@zip.com.au>
144
145 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
146 last change, use plain copy-on-write substrings, the individual
147 descriptions in the srfi don't mention shared storage (only the
148 introduction does).
149
150 * strings.c (scm_take_locale_stringn): Use realloc to make room for
151 null-terminator, rather than mallocing a whole new block.
152 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
153
154 2005-06-12 Marius Vollmer <mvo@zagadka.de>
155
156 * ramap.c (scm_array_index_map_x): First test for real arrays,
157 then check for generalized vectors. This ensures that the
158 generalized vector case need only work with zero-origin ranges.
159 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
160 to access the target array, making these functions work with all
161 kinds of arrays, not just bit arrays.
162
163 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
164 gh_list.c, gh_predicates.c: Deprecated everything.
165
166 * environments.c (environment_default_folder,
167 environment_default_observer): Do not use gh_call3, gh_call1.
168
169 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
170
171 * modules.c (s_scm_eval_closure_module): new function. Return the
172 module inside an eval-closure.
173
174 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
175 table. This means that procedure properties are GC'd if the
176 procedure dies.
177
178 2005-06-11 Kevin Ryde <user42@zip.com.au>
179
180 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
181 charset cases, count chars kept and build a string in a second pass,
182 rather than using a cons cell for every char kept. Use a shared
183 substring when nothing removed (such sharing is allowed by the srfi).
184
185 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
186
187 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
188 string, so live object stats can be sorted with string<?.
189
190 2005-06-06 Marius Vollmer <mvo@zagadka.de>
191
192 * print.c (iprin1): When writing a string, collect all characters
193 that can be printed directly into one call to scm_lfwrite.
194 Previously, every character was output with its own call to
195 write(2) on unbuffered ports.
196
197 * eval.c (scm_eval_options_interface): Use
198 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
199 and SCM_CRITICAL_SECTION_END.
200
201 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
202 check for generalized vectors. This ensures that the generalized
203 vector case need only work with zero-origin ranges.
204
205 2005-06-06 Kevin Ryde <user42@zip.com.au>
206
207 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
208 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
209 matched.
210
211 2005-06-05 Marius Vollmer <mvo@zagadka.de>
212
213 * eval.c: Added comment on how to make case 1.1 of
214 r5rs_pitfall.test succeed.
215
216 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
217
218 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
219
220 * socket.c: Remove obsolete comment about socklen_t.
221 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
222
223 * numbers.h (isnan)[__MINGW32__]: Remove.
224
225 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
226 DEFAULT_INCLUDES when cross compiling.
227
228 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
229
230 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
231 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
232 from Jan's patch.)
233
234 2005-05-22 Marius Vollmer <mvo@zagadka.de>
235
236 * unif.c (scm_make_shared_array): Add old base to new base since
237 scm_array_handle_pos does not include the base.
238 (scm_aind): Likewise.
239
240 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
241 output port.
242
243 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
244
245 Mac OS X compile warning fixes, reported by Richard Todd.
246
247 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
248 that it is signed.
249
250 * strports.c (st_resize_port): Add unsigned char cast.
251 (scm_mkstrport): Make read/write_buf cast unsigned.
252
253 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
254
255 * rdelim.c (scm_read_line): Initialize slen.
256
257 * load.c (scm_search_path): Remove weird >=1, and add
258 parentheses to clarify conditions.
259
260 * hash.c (scm_hasher): Add const unsigned char cast.
261
262 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
263
264 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
265
266 Fix C99isms reported by Ludovic Courtès:
267
268 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
269 code.
270
271 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
272 of code.
273
274 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
275 of code.
276 (scm_i_card_statistics): Add block for declarations of tag_as_scm
277 and current.
278
279 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
280
281 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
282 compile warning reported by Werner Scheinast.
283
284 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
285
286 * list.h: remove scm_list()
287
288 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
289 SCM_DEBUG_CELL_ACCESSES
290 (FLUID_NEXT_LOC): idem.
291
292 2005-04-30 Kevin Ryde <user42@zip.com.au>
293
294 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
295 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
296 zero when re==0 and im<0. Reported by Jean Crepeau.
297
298 2005-04-25 Kevin Ryde <user42@zip.com.au>
299
300 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
301 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
302 few sensible uses (like filling with a random number generator say),
303 but has been allowed in the past and so should be kept.
304
305 2005-04-23 Kevin Ryde <user42@zip.com.au>
306
307 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
308 scm_hash_fn_remove_x.
309
310 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
311 the caller when cons* is reached through apply.
312
313 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
314 list is called using apply, under the debugging evaluator.
315 (scm_list): Remove.
316
317 * list.c, list.h (scm_make_list): New code, moving make-list from
318 boot-9.scm.
319
320 2005-04-14 Kevin Ryde <user42@zip.com.au>
321
322 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
323 converted from scheme code in boot-9.scm.
324
325 2005-04-11 Kevin Ryde <user42@zip.com.au>
326
327 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
328 Validate list argument, scm_string_append and scm_string_append_shared
329 don't do that to their rest argument (in a normal build).
330
331 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
332
333 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
334 closure can not be stored since it is no longer valid at GC time.
335 (make_hash_table): Initialize 'hash_fn' field.
336 (scm_i_rehash): Only store hash_fn in hash table when closre is
337 NULL.
338 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
339 non-NULL. Always use a NULL closure.
340 (scm_hash_fn_create_handle_x): Also rehash when table contains too
341 few entries.
342
343 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
344
345 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
346 argument; always use scm_delq_x. The delete_fn function works on
347 the handle, not the key, and it therefore makes no sense to make
348 it configurable. Changed all callers.
349 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
350 (scm_hash_clear): Accept plain vectors as hashtables.
351 (scm_delx_x): Removed.
352
353 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
354
355 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
356 compatibility with gcc -std=c99.
357
358 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
359
360 * async.h (scm_mask_ints): Removed left over reference to
361 scm_root.
362
363 * threads.c: Removed fprintf debug statements.
364
365 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
366
367 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
368
369 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
370
371 * debug.c (scm_make_memoized): Remove unnecessary critical
372 section, and simplify by using SCM_RETURN_NEWSMOB.
373
374 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
375
376 * strings.h (SCM_STRING_UCHARS): Added missing argument.
377
378 2005-03-18 Kevin Ryde <user42@zip.com.au>
379
380 * arbiters.c (FETCH_STORE) [generic C]: Should be
381 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
382
383 2005-03-13 Kevin Ryde <user42@zip.com.au>
384
385 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
386 srfi-60.
387
388 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
389 because OR-ing bits into a negative can reduce the value to an inum.
390
391 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
392 casting inum to double since that can lose precision.
393
394 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
395
396 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
397 (guilify_self_1): Initialize it.
398
399 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
400 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
401 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
402 field.
403 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
404 recursively.
405 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
406 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
407 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
408 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
409 scm_after_gc_c_hook here.
410 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
411 scm_after_gc_c_hook when a full GC has in fact been performed.
412 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
413
414 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
415 scm_gc_heap_lock.
416
417 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
418 scm_gc_running_p while the scm_i_sweep_mutex is locked.
419
420 * inline.h (scm_cell, scm_double_cell): Do not check
421 scm_gc_running_p, allocation during sweeping is OK.
422
423 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
424 not set scm_block_gc.
425
426 * init.c (scm_i_init_guile): Do not set scm_block_gc.
427
428 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
429 instead of scm_malloc. The latter can not be used during GC.
430
431 2005-03-09 Marius Vollmer <mvo@zagadka.de>
432
433 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
434 years.
435
436 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
437
438 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
439 scm_gc_running_p. Sweeping can happen in parallel with
440 allocation.
441
442 * inline.h: Updated comments for current threading implementation.
443
444 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
445 (scm_i_thread): Removed unused signal_asyncs field.
446 (threads_mark): Do not mark it.
447 (guilify_self_1): Do not initialize it. Do initialize
448 continuation_root field.
449 (do_thread_exit): Do not remove thread from all_threads list.
450 (on_thread_exit): Do it here, after leaving guile mode.
451 (sleep_level): Removed.
452 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
453 returning. Do not support recursive sleeps.
454 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
455 entry. Do not support recursive sleeps.
456
457 * fluids.c (ensure_state_size, ensure_all_state_sizes,
458 resize_all_states): Collapsed ensure_state_size and
459 ensure_all_state_sizes into one function named resize_all_states.
460 Allocate new vectors outside of single threaded region. Do only
461 simple things inside that region.
462 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
463 while adding to the global lists.
464
465
466 2005-03-08 Marius Vollmer <mvo@zagadka.de>
467
468 libltdl is no longer distributed. We expect it to be installed
469 already.
470
471 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
472 (libguile_la_LIBADD): Removed @LIBLTDL@.
473
474 2005-03-07 Marius Vollmer <mvo@zagadka.de>
475
476 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
477 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
478 they also block/unblock execution of asyncs and call
479 scm_async_click which is declared in async.h but threads.h can not
480 include async.h since async.h already includes threads.h.
481 (scm_i_critical_section_level): New, for checking mistakes in the
482 use of the SCM_CRITICAL_SECTION_* macros.
483 (scm_i_critical_section_mutex): Make it a recursive mutex so that
484 critical sections can be nested.
485
486 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
487 not zero.
488
489 * threads.h, threads.c (scm_frame_lock_mutex): New.
490 (scm_frame_critical_section): Take mutex as argument.
491 (framed_critical_section_mutex): New, used as default for above.
492 (scm_init_threads): Initialize it.
493 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
494 scm_i_critical_section_mutex; both are initialized statically.
495
496 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
497 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
498 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
499 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
500
501 * debug.c (scm_debug_options): Replace
502 SCM_CRITICAL_SECTION_START/END with a frame and
503 scm_frame_critical_section.
504
505 * continuations.c (scm_make_continuation): No longer a critical
506 section.
507 (scm_dynthrow): Abort when scm_i_critical_section_level is
508 not zero.
509
510 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
511
512 * threads.c (scm_try_mutex): Renamed argument for consistency.
513
514 * root.c (scm_call_with_dynamic_root): New docstring.
515
516 * eval.c: Define _GNU_SOURCE.
517
518 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
519
520 Big merge from the mvo-thread-cleanup branch. The main changes
521 are:
522
523 - The dynamic roots functionality has been split into dynamic
524 states and continuations barriers. Fluids have been
525 reimplemented and can now be garbage collected.
526
527 - Initialization of Guile now works in a multi-thread friendly
528 manner. Threads can freely enter and leave guile mode.
529
530 - Blocking on mutexes or condition variables or while selecting
531 can now be reliably interrupted via system asyncs.
532
533 - The low-level threading interface has been removed.
534
535 - Signals are delivered via a pipe to a dedicated 'signal delivery
536 thread'.
537
538 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
539
540 * throw.c (scm_handle_by_message): Exit only the current thread,
541 not the whole process.
542 (scm_handle_by_message_noexit): Exit when catching 'quit.
543
544 * scmsigs.c (take_signal, signal_delivery_thread,
545 start_signal_delivery_thread, ensure_signal_delivery_thread,
546 install_handler): Reimplemented signal delivery as explained in
547 the comments.
548
549 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
550 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
551 scm_i_sched_yield, scm_i_pthread_sigmask,
552 SCM_I_PTHREAD_MUTEX_INITIALIZER,
553 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
554 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
555 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
556 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
557 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
558 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
559 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
560 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
561 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
562 scm_i_pthread_key_create, scm_i_pthread_setspecific,
563 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
564 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
565 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
566 when using pthreads.
567 * null-threads.c, null-threads.h: Provide dummy definitions for
568 the above symbols when not using pthreads.
569
570 * modules.h, modules.c (scm_frame_current_module): New.
571
572 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
573 instead of scm_internal_dynamic_wind.
574
575 * init.h, init.c (restart_stack, start_stack): Removed.
576 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
577 (scm_boot_guile_1): Removed.
578 (scm_i_init_mutex): New.
579 (really_cleanup_for_exit, cleanup_for_exit): New.
580 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
581 Moved around some init funcs. Call
582 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
583 with atexit.
584
585 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
586 Use "!scm_is_eq" instead of "!=".
587
588 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
589 SCM_USE_COOP_THREADS): Removed.
590
591 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
592 maintained. Unlock scm_i_sweep_mutex before running
593 scm_after_gc_c_hook.
594 (scm_permanent_object): Allocate outside of critical section.
595 (cleanup): Removed.
596
597 * fluids.h, fluids.c: Reimplemented completely.
598 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
599 SCM_FAST_FLUID_SET): Reimplemented as functions.
600 (scm_is_fluid): New.
601 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
602 (scm_make_dynamic_state, scm_dynamic_state_p,
603 scm_is_dynamic_state, scm_current_dynamic_state,
604 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
605 scm_c_with_dynamic_state, scm_with_dynamic_state,
606 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
607
608 * feature.c (progargs_fluid): New.
609 (scm_program_arguments, scm_set_program_arguments): Use it instead
610 of scm_progargs.
611 (scm_init_feature): Allocate it. Also, only add "threads" feature
612 when SCM_USE_PTHREAD_THREADS is true.
613
614 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
615 scm_make_rec_mutex, with all the consequences.
616 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
617 scm_internal_dynamic_wind. Handle dynamic states as second
618 argument.
619
620 * threads.h, threads.c (scm_internal_select): Renamed to
621 scm_std_select and discouraged old name.
622 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
623 and scm_std_usleep.
624 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
625 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
626 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
627 SCM_THREAD_DATA): Removed.
628 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
629 (scm_i_thread): New.
630 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
631 Use scm_assert_smob_type.
632 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
633 scm_thread_self, scm_thread_yield, scm_mutex_init,
634 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
635 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
636 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
637 scm_cond_init, scm_cond_destroy, scm_cond_wait,
638 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
639 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
640 scm_thread_select): Removed. Replaced with scm_i_pthread
641 functions as appropriate.
642 (scm_in_guile, scm_outside_guile): Removed.
643 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
644 take a ticket.
645 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
646 New.
647 (scm_i_frame_single_threaded): New.
648 (scm_init_threads_default_dynamic_state): New.
649 (scm_i_create_thread): Removed.
650 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
651 (scm_make_recursive_mutex): New.
652 (scm_frame_critical_section): New.
653 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
654 latter, changed all uses.
655 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
656 scm_i_set_last_debug_frame): New, use them instead of scm_root
657 stuff.
658 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
659 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
660 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
661 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
662 (remqueue): Allow the removal of already removed cells. Indicate
663 whether a real removal has happened.
664 (scm_thread): Removed, replaced with scm_i_thread.
665 (make_thread, init_thread_creatant): Removed.
666 (cur_thread): Removed.
667 (block_self, unblock_from_queue): New.
668 (block, timed_block, unblock): Removed.
669 (guilify_self_1, guilify_self_2, do_thread_exit,
670 init_thread_key_once, init_thread_key,
671 scm_i_init_thread_for_guile, get_thread_stack_base,
672 scm_init_guile): New initialisation method.
673 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
674 thread creation.
675 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
676 "fair" to fat and implemented new semantics, including reliable
677 interruption.
678 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
679 (scm_threads_mark_stacks): Explicitly mark handle.
680 (scm_std_select): Allow interruption by also selecting on the
681 sleep_pipe.
682 (scm_i_thread_put_to_sleep): Handle recursive requests for
683 single-threadedness.
684 (scm_threads_prehistory, scm_init_threads): Put current thread
685 into guile mode via guileify_self_1 and guileify_self_2,
686 respectively.
687
688 * fluid.h (SCM_FLUIDP): Deprecated.
689
690 * coop-threads.c: Removed.
691
692 * continuations.h, continuations.c (scm_with_continuation_barrier,
693 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
694 New.
695
696 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
697 (async_mutex): New.
698 (scm_async_click): Protected with async_mutex. Do not deal with
699 signal_asyncs, which are gone. Set cdr of handled async cell to
700 #f.
701 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
702 current sleep.
703 (scm_system_async_mark_for_thread): Do not use scm_current_thread
704 since that might not work during early initialization.
705
706 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
707 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
708 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
709 and SCM_CRITICAL_SECTION_END.
710 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
711 SCM_CRITICAL_SECTION_START/END.
712
713 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
714 (libguile_la_SOURCES): Added null-threads.c
715 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
716 threads-plugin.c.
717 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
718
719 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
720 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
721 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
722 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
723 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
724 scm_make_root): Removed or deprecated. Replaced with references
725 to the current thread, dynamic state, continuation barrier, or
726 some fluid, as appropriate.
727 (root_mark, root_print): Removed.
728 (scm_internal_cwdr): Reimplemented guts with
729 scm_frame_current_dynamic_state and
730 scm_i_with_continuation_barrier.
731 (scm_dynamic_root): Return current continuation barrier.
732
733
734 2005-02-28 Marius Vollmer <mvo@zagadka.de>
735
736 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
737 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
738 cleanliness.
739 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
740 IP_DROP_MEMBERSHIP.
741 Thanks to Greg Troxel!
742
743 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
744
745 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
746 block.
747
748 2005-02-25 Marius Vollmer <mvo@zagadka.de>
749
750 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
751 so that no two weak alist vectors share a spine.
752 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
753 during GC before inserting the new alist cell.
754
755 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
756
757 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
758 the hashtable.
759 (scm_hash_fn_create_handle_x): Likewise.
760 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
761
762 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
763
764 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
765 the prototypical examples mentioned in the old reference manual.
766 Instead keep the old semantics of dispatching on type. (Yes, this
767 is extremely ugly, but the whole point of keeping the deprecated
768 interface is not to break old code.)
769
770 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
771
772 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
773 scm_i_array_dims.
774
775 2005-01-28 Kevin Ryde <user42@zip.com.au>
776
777 * numbers.c (scm_ash): Rewrite using shifts, much faster than
778 integer-expt and multiply/divide. Inexacts and fractions no longer
779 supported (they happened to work before for left shifts, but not
780 right). Don't really need inexacts and fractions, since ash is
781 documented as a "bitwise operation", and all the rest of those only
782 take exact integers.
783
784 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
785
786 * gc-card.c (scm_i_card_statistics): map structs, closures and
787 subrs to one tag.
788
789 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
790 (tag_table_to_type_alist): ignore unknown types.
791
792 * gc-segment.c (scm_i_all_segments_statistics): new function.
793 (scm_i_heap_segment_statistics): new function
794
795 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
796 statistics on the number of live objects of each type.
797
798 * gc-card.c (scm_i_tag_name): new function.
799 (scm_i_card_statistics): new function.
800
801 2005-01-24 Kevin Ryde <user42@zip.com.au>
802
803 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
804 POSIX and C99 don't document errno being set. Reported by Bruno
805 Haible.
806 (scm_flock): Update docstring from manual.
807
808 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
809 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
810 a 64-bit system.
811
812 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
813 sa_handler, needs to be a long on 64-bit systems where int is only 32
814 bits.
815
816 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
817
818 * environments.c (obarray_enter, obarray_replace): Call
819 SCM_HASHTABLE_INCREMENT when adding a new entry.
820
821 * objects.c: Include goops.h for the scm_class_of prototype.
822
823 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
824 sizes to be smaller than the maximum lengths of vectors.
825
826 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
827
828 * ports.c, smob.c: Include "libguile/goops.h".
829
830 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
831 scm_class_char, scm_class_pair, scm_class_procedure,
832 scm_class_string, scm_class_symbol,
833 scm_class_procedure_with_setter, scm_class_primitive_generic,
834 scm_class_vector, scm_class_null, scm_class_real,
835 scm_class_complex, scm_class_integer, scm_class_fraction,
836 scm_class_unknown, scm_port_class, scm_smob_class,
837 scm_no_applicable_method, scm_class_of): Moved from objects to
838 goops since they are only useable once goops has been loaded.
839 (scm_classes_initialized): Removed.
840 (scm_class_of): Do not check it.
841 (create_standard_classes): Do not set it.
842
843 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
844
845 * objects.h, objects.c (scm_classes_initialized): New.
846 (scm_class_of): Signal error when scm_classes_initialized is zero.
847 * goops.c (create_standard_classes): Set scm_classes_initialized
848 to one.
849
850 * random.c (scm_random_solid_sphere_x): Use
851 scm_c_generalized_vector_length instead of
852 scm_uniform_vector_length.
853
854 2005-01-16 Marius Vollmer <mvo@zagadka.de>
855
856 * script.c (scm_compile_shell_switches): Removed debugging output.
857
858 2005-01-15 Kevin Ryde <user42@zip.com.au>
859
860 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
861 docstrings from manual.
862 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
863
864 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
865
866 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
867 its value.
868
869 Implement u64 and s64 uniform numeric vectors with bignums when
870 scm_t_uint64 and scm_t_int64 are not available.
871
872 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
873 scm_array_handle_u64_elements,
874 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
875 scm_u64vector_writable_elements): Do not define when scm_t_uint64
876 is not available.
877 (scm_take_s64vector, scm_array_handle_s64_elements,
878 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
879 scm_s64vector_writable_elements): Likewise for scm_t_int64.
880 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
881 scm_t_int64/scm_t_uint64 are not available.
882 (uvec_mark): New, to mark the bignums.
883 (alloc_uvec): Initialize bignums.
884 (uvec_fast_ref): Return bignums directly.
885 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
886 assert_exact_integer): New.
887 (uvec_fast_set): Use them to validate the bignums.
888 (scm_init_srfi_4): Set mark function of smob when needed.
889 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
890 scm_int64_max.
891
892 Recognize 1.4 -e syntax.
893
894 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
895 (scm_compile_shell_switches): Use them to recognize and convert
896 1.4 "-e" syntax.
897
898 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
899
900 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
901 deprecated features that once were macros but are now functions
902 back into macros.
903
904 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
905
906 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
907 * deprecation.c (scm_issue_deprecation_warning,
908 scm_c_issue_deprecation_warning_fmt): Use it.
909 (mode): Removed.
910 (print_summary): New.
911 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
912 mode.
913
914 Deprecated SCM_ARRAY* macros.
915
916 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
917 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
918 version. Changed all uses.
919 (scm_tc16_array, scm_i_tc16_array,
920 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
921 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
922 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
923 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
924 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
925 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
926 SCM_ARRAY_V, SCM_I_ARRAY_V,
927 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
928 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
929 scm_t_array, scm_i_t_array): Likewise.
930 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
931 Moved from unif.h to unif.c.
932 (scm_c_array_rank): New.
933 (scm_array_rank): Reimplement using it.
934
935 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
936 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
937 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
938
939 2005-01-11 Marius Vollmer <mvo@zagadka.de>
940
941 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
942 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
943 scm_c_generalized_vector_ref and scm_cvref, and
944 scm_c_generalized_vector_set_x, respectively.
945 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
946 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
947
948 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
949 former to latter and made public. Changed all uses.
950 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
951 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
952 (scm_i_shap2ra): New internal version of scm_shap2ra.
953 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
954 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
955 (scm_ra_set_contp): Deprecated, changed all uses to
956 scm_i_ra_set_contp.
957 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
958
959 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
960
961 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
962 Trotts!
963
964 * unif.c (scm_list_to_typed_array): Allow the specification of the
965 upper bound as well. This is needed for empty arrays.
966 (l2ra): Give needed number of elements in error message.
967 (scm_i_print_array): Print length information for arrays that need
968 it.
969 (scm_i_read_array): Parse it.
970
971 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
972 scm_i_object_chars, scm_i_object_length): Brought back from the
973 dead.
974
975 2005-01-10 Marius Vollmer <mvo@zagadka.de>
976
977 * ramap.c: Replaced single-index uses of scm_array_set_x with
978 scm_c_generalized_vector_set_x.
979
980 * unif.c (scm_array_rank, scm_array_dimensions,
981 scm_shared_array_offset, scm_shared_array_increments,
982 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
983 to simplify code and make it more general.
984 (scm_shared_array_root): Work with all kinds of arrays, including
985 naked vectors.
986 (indices_to_pos): New.
987 (scm_make_shared_array): Use it instead of scm_aind; use handle
988 for oldra.
989
990 2005-01-10 Kevin Ryde <user42@zip.com.au>
991
992 * posix.c (scm_mkstemp): Update docstring from manual.
993
994 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
995
996 2005-01-09 Marius Vollmer <mvo@zagadka.de>
997
998 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
999 scm_i_uniform_vector_set_proc): New.
1000 (u8ref, u8set, s8ref, s8set, etc): New.
1001 (uvec_reffers, uvec_setters): New.
1002 (uvec_to_list): Use generic scm_array_handle_ref instead of
1003 uvec_fast_ref since scm_array_handle_ref should be faster now.
1004 (coerce_to_uvec, scm_c_uniform_vector_ref,
1005 scm_c_uniform_vector_set_x): Likewise.
1006
1007 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
1008 New.
1009 (scm_t_array_handle): Added ref, set, elements and
1010 writable_elements for fast inline operation of
1011 scm_array_handle_ref and scm_array_handle_set.
1012 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
1013 and replaced with inline code that simply calls the ref/set
1014 members of the handle.
1015 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
1016 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
1017 New.
1018 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
1019 and memoize_set.
1020 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
1021 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1022 scm_bit_invert_x): Correctly multiply index with increment in the
1023 general case.
1024
1025 * unif.c (scm_array_handle_set): Correctly execute only one
1026 alternative. D'Oh!
1027 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
1028 the array; this covers all cases with much simpler code.
1029
1030 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
1031 as well.
1032
1033 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1034
1035 * srfi-4.c (uvec_type): New.
1036 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
1037 scm_c_uniform_vector_x): Use it to get concrete type.
1038
1039 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
1040 fit the docs.
1041
1042 * unif.c (ra2l): Handle zero rank arrays.
1043 (scm_i_print_array): Print zero rank arrays specially.
1044 (tag_to_type): Return #t for an empty tag, not the empty symbol.
1045 (scm_i_read_array): Allow zero rank arrays.
1046
1047 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1048
1049 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
1050 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
1051 and SCM_SET_HASHTAB_BUCKET.
1052
1053 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
1054 Removed ref_stack field.
1055 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
1056 of a print state. Use them everywhere instead of ref_stack.
1057
1058 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
1059
1060 * srfi-4.c: Include deprecation.h.
1061
1062 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
1063 deprecated.c, eq.c
1064 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
1065 (scm_vector_elements, scm_vector_writable_elements,
1066 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
1067 unif.[hc].
1068 (SCM_SIMPLE_VECTOR_LOC): Removed.
1069 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
1070 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
1071 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
1072 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
1073 latter. Changed use in eq.c.
1074
1075 2005-01-07 Marius Vollmer <mvo@zagadka.de>
1076
1077 Make the uniform vector routines also deal with one dimensional
1078 arrays.
1079
1080 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
1081 SCM_SMOB_PREDICATE in this file.
1082 (is_uvec): Also recognize one-dimensional uniform numeric arrays
1083 of the right type.
1084 (scm_is_uniform_vector): Likewise.
1085 (uvec_fast_ref): Made BASE param const.
1086 (uvec_writable_elements, uvec_elements): New.
1087 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
1088 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
1089 scm_c_uniform_set_x): Use them to also deal with one-dimensional
1090 arrays.
1091 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
1092 argument convention.
1093 (scm_uniform_vector_to_list): Let uvec_to_list do all the
1094 checking.
1095 (scm_uniform_vector_length): Use uvec_length.
1096
1097 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1098
1099 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
1100 scm_c_uniform_vector_size): Removed.
1101 (scm_array_handle_uniform_element_size): New.
1102
1103
1104 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
1105 type of POS parameter to be signed, positions can be negative.
1106 (scm_array_handle_release): New, changed all uses of
1107 scm_t_array_handle to properly call it.
1108 (scm_vector_get_handle, scm_generalized_vector_get_handle):
1109 Renamed former to latter, changed all uses.
1110
1111 2005-01-05 Marius Vollmer <mvo@zagadka.de>
1112
1113 Updated bitvector routines to also use scm_t_array_handles.
1114
1115 * unif.h (scm_bitvector_elements,
1116 scm_bitvector_writable_elements): Use a scm_t_array_handle and
1117 deliver offset, length and increment to caller. Changed all uses.
1118 (scm_bitvector_release_elements,
1119 scm_frame_bitvector_release_elements,
1120 scm_bitvector_release_writable_elements,
1121 scm_frame_bitvector_release_writable_elements): Removed.
1122 (scm_array_handle_bit_elements,
1123 scm_array_handle_bit_writable_elements,
1124 scm_array_handle_bit_elements_offset): New.
1125 (scm_make_typed_array): The special value for non-initialized
1126 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
1127 was a valid value to fill bitvectors with, so it can't really be
1128 specialed out.
1129
1130 2005-01-04 Kevin Ryde <user42@zip.com.au>
1131
1132 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
1133 Reported by Bill Schottstaedt.
1134
1135 2005-01-02 Marius Vollmer <mvo@zagadka.de>
1136
1137 * sort.c (quicksort): Added INC parameter for non-contigous
1138 vectors.
1139 (quicksort1): New, for contigous vectors. Both functions are
1140 generated from the same code by including "quicksort.i.c".
1141 (scm_restricted_vector_sort_x): Call one of quicksort and
1142 quicksort1, depending on increment of vector.
1143 (scm_sort): Simply call scm_sort_x on a copy of the list or
1144 vector.
1145 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
1146 size_t, added inc parameter.
1147 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
1148 so that it doesn't leak.
1149 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
1150 list or vector.
1151
1152 * ramap.c (scm_array_map_x): Do not try to convert fill value
1153 before filling, any necessary conversion is done while storing.
1154
1155 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1156 doing it inline.
1157
1158 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1159 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1160 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1161
1162 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1163 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1164 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1165 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1166 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1167 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1168 vector elements API or simple vector API, as appropriate. Removed
1169 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1170 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1171
1172 * srfi-4.h, srfi-4.c,
1173 srfi-4.i.c (scm_array_handle_uniform_elements,
1174 scm_array_handle_uniform_writable_elements,
1175 scm_uniform_vector_elements,
1176 scm_uniform_vector_writable_elements):
1177 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1178 scm_t_array_handle, deliver length and increment.
1179 (scm_array_handle_<foo>_elements,
1180 scm_array_handle_<foo>_writable_elements): New.
1181
1182 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1183 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1184
1185 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1186 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1187 scm_array_handle_set, scm_array_handle_elements
1188 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1189 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1190 scm_dimensions_to_uniform_array): Deprecated for real.
1191 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1192 snarfing wont allow a mismatch between C and Scheme arglists.
1193 (scm_make_shared_array, scm_enclose_array): Correctly use
1194 scm_c_generalized_vector_length instead of
1195 scm_uniform_vector_length.
1196
1197 * validate.h (SCM_VALIDATE_VECTOR,
1198 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1199 of SCM_VECTORP.
1200
1201 * weaks.h, weaks.c: Use new internal weak vector API from
1202 vectors.h.
1203
1204 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1205 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1206 'extra' to being regular sources.
1207 (noinst_HEADERS): Added quicksort.i.c.
1208 * quicksort.i.c: New file.
1209
1210 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1211 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1212 and reimplemented. Replaced all uses with scm_vector_elements,
1213 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1214 appropriate.
1215 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1216 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1217 SCM_SIMPLE_VECTOR_LOC): New.
1218 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1219 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1220 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1221 Removed.
1222 (scm_vector_copy): New.
1223 (scm_vector_elements, scm_vector_writable_elements): Use
1224 scm_t_array_handle, deliver length and increment. Moved to
1225 unif.h. Changed all uses.
1226 (scm_vector_release_elements,
1227 scm_vector_release_writable_elements,
1228 (scm_frame_vector_release_elements,
1229 scm_frame_vector_release_writable_elements): Removed.
1230 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1231 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1232 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1233 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1234 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1235 weak vectors.
1236
1237 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1238
1239 No longer use creators to specify the type of an array. Creators
1240 expose the fact that arrays are wrapped around vectors, but that
1241 might change.
1242
1243 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1244 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1245 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1246 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1247 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1248 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1249 uvec_proc_vars): Removed.
1250 (scm_i_generalized_vector_creator): Removed.
1251 (scm_i_generalized_vector_type): New.
1252
1253 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1254 scm_make_typed_array, scm_array_type, scm_list_to_array,
1255 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1256 (scm_array_creator): Removed.
1257 (scm_array_p): Deprecated second PROT argument.
1258 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1259 Deprecated, reimplemented in terms of scm_make_typed_array and
1260 scm_list_to_typed_array.
1261 (scm_i_proc_make_vector, scm_i_proc_make_string,
1262 scm_i_proc_make_bitvector): Removed.
1263 (type_creator_table, init_type_creator_table, type_to_creator,
1264 make_typed_vector): New.
1265 (scm_i_convert_old_prototype): Removed.
1266 (prototype_to_type): New.
1267 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1268 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1269 minor added clarity.
1270 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1271 instead of scm_make_uve.
1272 (tag_creator_table, scm_i_tag_to_creator): Removed.
1273 (tag_to_type): New.
1274 (scm_i_read_array): Use scm_list_to_typed_array instead of
1275 scm_list_to_uniform_array.
1276
1277 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1278
1279 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1280 (scm_bitvector_writable_elements): New.
1281 (scm_bitvector_release, scm_bitvector_release_elements):
1282 Renamed former to latter. Added explicit call to
1283 scm_remember_upto_here_1.
1284 (scm_frame_bitvector_release,
1285 scm_frame_bitvector_release_elements): Renamed former to latter.
1286 (scm_bitvector_release_writable_elements,
1287 scm_bitvector_release_writable_elements): New.
1288 Changed all uses as required by the changes above.
1289
1290 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1291 scm_u8vector_elements, etc): Made return value "const".
1292 (scm_uniform_vector_writable_elements,
1293 scm_u8vector_writable_elements, etc): New.
1294 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1295 Renamed former to latter. Added explicit call to
1296 scm_remember_upto_here_1.
1297 (scm_frame_uniform_vector_release,
1298 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1299 (scm_uniform_vector_release_writable_elements,
1300 scm_frame_uniform_vector_release_writable_elements): New. Takes
1301 crown of longest identifier yet.
1302 Changed all uses as required by the changes above.
1303
1304 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1305 void.
1306 (scm_is_vector, scm_vector_p, scm_vector_length,
1307 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1308 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1309 scm_vector_move_left_x, scm_vector_move_right_x,
1310 scm_vector_fill_x): handle one-dimensional arrays.
1311 (scm_vector_elements, scm_vector_release_elements,
1312 scm_vector_frame_release_elements, scm_vector_writable_elements,
1313 scm_vector_release_writable_elements,
1314 scm_vector_frame_release_writable_elements): New.
1315 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1316 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1317
1318 * ramap.c (scm_ramapc, scm_raeql): Use
1319 scm_c_generalized_vector_length instead of
1320 scm_uniform_vector_length.
1321 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1322 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1323
1324 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1325
1326 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1327 member for relocating debug frames.
1328 (scm_make_continuation): Set it.
1329
1330 * stacks.c (read_frame, read_frames, scm_make_stack,
1331 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1332 of continuations instead of calculating the offset ourselves.
1333 Relocate 'vect' member of scm_t_debug_frame.
1334
1335 2004-12-16 Kevin Ryde <user42@zip.com.au>
1336
1337 * ramap.c (scm_array_map_x): Check for at least one source argument.
1338
1339 2004-12-14 Kevin Ryde <user42@zip.com.au>
1340
1341 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1342 the C code so for the final call to the predicate procedure is a tail
1343 call, per SRFI-13 spec.
1344
1345 2004-12-10 Kevin Ryde <user42@zip.com.au>
1346
1347 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1348 recent revision to the reference manual.
1349
1350 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1351 with "%", C99 says it's well-defined.
1352
1353 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1354 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1355 bother trying to fit scm_from_ulong, not really worth the trouble if
1356 addresses are more than 4 bytes usually.
1357
1358 2004-11-30 Kevin Ryde <user42@zip.com.au>
1359
1360 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1361 arm32. Reported by Greg Troxel.
1362
1363 2004-11-14 mvo <mvo@zagadka.de>
1364
1365 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1366
1367 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1368
1369 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1370
1371 Enclosed arrays are now their own smob. This has been done to
1372 make the code more explicit about them and to prepare for the time
1373 when generalized vectors include arbitrary one-dimensional
1374 arrays. (Uptonow, enclosed arrays have been recognized by their
1375 use of an array as their storage 'vector'. When all generalized
1376 vectors are allowed as storage, including one-dimensional arrays,
1377 this will no longer work.)
1378
1379 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1380 New.
1381 (exactly_one_third, singp): Removed.
1382 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1383 scm_shared_array_offset, scm_shared_array_increments): Handle
1384 enclosed arrays explicitely.
1385 (scm_array_rank): Likewise. Also, do not return zero for
1386 non-arrays, signal an error instead since arrays with rank zero do
1387 exist.
1388 (scm_i_make_ra): New, for specifying the tag of the new array.
1389 (scm_make_enclosed_array): Use it.
1390 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1391 (scm_make_shared_array): Use scm_c_generalized_vector_length
1392 instead of scm_uniform_vector_length.
1393 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1394 (scm_i_cvref): New, doing the job of scm_cvref.
1395 (scm_cvref): Use scm_i_cvref.
1396 (scm_array_ref): Do not accept non-arrays when no indices are
1397 given. Use scm_i_cvref to do the actual access.
1398 ("uniform-array-set1"): Do not register.
1399 (scm_array_set_x, scm_uniform_array_read_x,
1400 scm_uniform_array_write): Handle enclosed arrays explicitly.
1401 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1402 handle enclosed arrays.
1403 (scm_array_to_list): Handle enclosed arrays explicitly.
1404 (rapr1): Removed.
1405 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1406 enclosed arrays.
1407 (scm_i_print_enclosed_array): New.
1408 (tag_proto_table, tag_creator_table): Renamed former to latter.
1409 Added "a" and "b" for strings and bitvectors, resp.
1410 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1411 latter. Tag "a" is in the table now, no need to handle it as a
1412 legacy tag.
1413 (scm_raprin1): Just call scm_iprin1.
1414 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1415 explicitly.
1416 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1417 Use scm_i_print_array as printer for scm_tc16_array.
1418
1419 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1420
1421 * ramap.c (cind): Changed second arg to be pointer to long instead
1422 of uniform vector.
1423 (scm_ramapc): Allocate index vector with scm_malloc and not as
1424 uniform vector. Wrap it in a frame so that it gets properly freed.
1425 (scm_array_index_map_x): Likewise.
1426
1427 * unif.c: Changed all uses of scm_array_prototype to
1428 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1429 prototype is known.
1430 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1431 in terms of scm_uniform_vector_read_x and
1432 scm_uniform_vector_write, respectively. Strings and
1433 bitvector support has been dropped.
1434
1435 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1436 needed files directly. Include config.h, <unistd.h> and <io.h>
1437 when available.
1438 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1439
1440 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1441
1442 * gh_data.c (gh_uniform_vector_length): Properly use
1443 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1444
1445 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1446
1447 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1448 New.
1449 (scm_i_uniform_vector_creator): Removed.
1450 (scm_i_generalized_vector_creator): New.
1451 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1452 handle generalized vectors, only uniform numeric vectors.
1453 (alloc_uvec): Do length check here...
1454 (make_uvec): ...but not here.
1455 (coerce_to_uvec): Use new generalized vector functions to handle
1456 all kinds of vectors in one go.
1457
1458 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1459 remaining scm_tc7_unused tags to get a neatly ordered list.
1460
1461 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1462 longer handle scm_tc7_bvect bitvectors.
1463
1464 * ramap.c: Use the new generalized vector functions to handle all
1465 vector like things.
1466
1467 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1468 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1469 scm_generalized_vector_length, scm_generalized_vector_ref,
1470 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1471 scm_is_generalized_vector, scm_c_generalized_vector_length,
1472 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1473 New.
1474
1475 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1476 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1477 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1478 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1479 scm_c_bitvector_length, scm_c_bitvector_ref,
1480 scm_c_bitvector_set_x, scm_bitvector_elements,
1481 scm_bitvector_release, scm_frame_bitvector_release,
1482 scm_tc16_bitvector, bitvector_free, bitvector_print,
1483 bitvector_equalp, count_ones, find_first_one): New.
1484 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1485 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1486 using the new C API for bitvectors and maybe count_ones or
1487 find_first_one, as appropriate.
1488 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1489 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1490 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1491 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1492 new functions from above.
1493 (scm_i_proc_make_vector, scm_i_proc_make_string,
1494 scm_i_proc_make_bitvector): Made non-static for use in
1495 scm_i_generalized_vector_creator.
1496 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1497 (scm_make_uve): Validate that the created object is a generalized
1498 vector.
1499 (scm_i_legacy_tag): Removed.
1500 (scm_i_print_array): Do it here.
1501 (scm_raprin1): Only print enclosed arrays.
1502
1503 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1504
1505 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1506
1507 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1508 added portability.
1509
1510 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1511 for "space". Thanks to Bruce Korb!
1512
1513 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1514 only after dest has been set. Thanks to Hyper Division!
1515
1516 * gh_data.c (gh_uniform_vector_length): Use
1517 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1518
1519 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1520
1521 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1522 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1523 SCM_SET_UVECTOR_LENGTH): Removed.
1524
1525 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1526
1527 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1528 Thanks!
1529
1530 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1531 first and the second line of the SCM_DEFINE macro call, since old
1532 preprocessors cannot handle definitions that are split into two
1533 lines.
1534
1535 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1536 declarations.
1537
1538 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1539 scm_t_uint32 to fix the mismatch between the function declaration
1540 and definition.
1541
1542 * sort.c (quicksort): Don't use C99 variable declarations.
1543
1544 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1545 SCM_BOOL_F if no type matches.
1546
1547 * threads.c (thread_print): Cast a pointer to size_t when printing
1548 with scm_uintprint.
1549
1550 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1551 defined.
1552 (scm_array_prototype): Deprecated.
1553
1554 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1555
1556 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1557 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1558 more efficient access to the u32vector.
1559
1560 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1561 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1562 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1563
1564 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1565 instead of the old-style dvectors.
1566
1567 * gh_data.c: Use new-style uniform arrays in place of old-style
1568 ones.
1569
1570 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1571 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1572
1573 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1574 instead of old-sytle uvectors.
1575
1576 * convert.c, convert.i.c: Rewritten completely, using
1577 scm_any_to_u8vector, etc and other new-style uniform vector
1578 functions.
1579
1580 * random.c (scm_random_solid_sphere_x,
1581 scm_random_hollow_sphere_x): Do not validate vector argument, this
1582 is already done elsewhere.
1583
1584 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1585 scm_any_to_u8vector, etc): New.
1586 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1587 longer handle old-style uniform vectors.
1588
1589 * read.c (scm_lreadr): Bugfix: include the last bit in the
1590 bit vector.
1591
1592 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1593
1594 * unif.h, unif.c (scm_array_creator): New.
1595 (scm_i_get_old_prototype): New.
1596 (scm_array_prototype): use it to return old-style prototype, never
1597 return creators.
1598 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1599 arg of SCM_UNDEFINED. The latter is wrong.
1600
1601 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1602 (make_uve): Removed.
1603 (scm_i_proc_make_vector, scm_i_proc_make_string,
1604 scm_i_proc_make_u1vector): New.
1605 (scm_init_unif): Initialize them.
1606 (scm_i_convert_old_prototype): New.
1607 (scm_make_uve): Use it to get the creator procedure. Removed all
1608 old code that created old-style uniform vectors.
1609 (scm_array_p): Handle generic vectors.
1610 (scm_dimensions_to_uniform_array): Do not fill new array with
1611 prototype when that is a procedure.
1612 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1613 the NDIM argument.
1614 (scm_i_print_array): Print rank for shared or non-zero-origin
1615 vectors.
1616 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1617 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1618 which I do not understand yet.
1619 (scm_array_prototype): Explicitely handle generic vectors.
1620
1621 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1622 (iflo2str): Use icmplx2str for complex numbers.
1623
1624 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1625 scm_i_uniform_vector_prototype): Removed.
1626 (scm_i_uniform_vector_creator): New.
1627 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1628 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1629 Updated all tables and generic functions to support them.
1630 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1631 (scm_init_srfi_4): Initialize them.
1632
1633 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1634 sizeof(CTYPE) as explained in the comment.
1635
1636 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1637 following '#' that can start an array. Explicitely disambiguate
1638 'i' and 'e' between introducing numbers and uniform vectors. Do
1639 not call scm_i_read_homogenous_vector, since that is also handled
1640 by scm_i_read_array now.
1641
1642 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1643
1644 First cut at integrating uniform vectors from srfi-4 with the rest
1645 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1646 vector. The plan is to gradually replace one type after the other
1647 until none is left and then to consider general cleanups and
1648 optimizations.
1649
1650 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1651
1652 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1653 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1654 scm_uniform_vector_to_list, scm_is_uniform_vector,
1655 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1656 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1657 scm_uniform_vector_release): New.
1658 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1659 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1660 from unif.h, unif.c and extended to handle both the old and new
1661 uniform vectors.
1662
1663 * tags.h (scm_tc7_byvect): Commented out.
1664
1665 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1666 the former to the latter.
1667 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1668 srfi-4.h, srfi-4.c.
1669 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1670 (scm_array_p, scm_array_rank, scm_array_dimensions,
1671 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1672 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1673 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1674 vectors. Removed code for scm_tc7_byvect.
1675 (scm_dimensions_to_uniform_array): Fill array with 0 when
1676 prototype is #\nul.
1677 (scm_i_print_array_dimension, scm_i_legacy_tag,
1678 scm_i_print_array): New.
1679 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1680 for scm_tc7_byvect.
1681
1682 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1683 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1684 uniform vectors. Removed code for scm_tc7_byvect
1685
1686 * print.c (iprin1): Removed code for scm_tc7_byvect.
1687 * objects.c (scm_class_of): Likewise.
1688 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1689 * gc-card.c (scm_i_sweep_card): Likewise.
1690 * evalext.c (scm_self_evaluating_p): Likewise.
1691 * eq.c (scm_equal_p): Likewise.
1692
1693 * gh_data.c (gh_chars2byvect): Reimplemented with
1694 scm_make_s8vector.
1695 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1696
1697 * srfi-4.c (take_uvec): New.
1698 (alloc_uvec): Use it.
1699 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1700
1701 * random.c (vector_scale, vector_scale_x): Renamed former to the
1702 latter, since it modifies its argument.
1703 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1704 Do not use scm_universal_vector_length for non-uniform vectors.
1705 Use scm_f64vector_elements to access innards of uniform vectors.
1706
1707 * convert.i.c: Convert srfi-4 style uniform vectors when
1708 requested.
1709 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1710 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1711
1712 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1713
1714 * numbers.h, numbers.c (scm_i_print_double): New.
1715
1716 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1717 ../srfi/ but heavily modified.
1718 * Makefile.am: Add them in all the right places.
1719 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1720 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1721 '#u', and '#s'.
1722
1723 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1724 and made non-static. Changed all uses.
1725
1726 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1727
1728 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1729 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1730 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1731 scm_uintprint to print unsigned integers, raw heap words, and
1732 adresses, using a cast to scm_t_bits to turn pointers into
1733 integers.
1734
1735 * unif.c: Include "libguile/print.h".
1736
1737 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1738 scm_t_intmax values.
1739 (scm_uint2str): New, for scm_t_uintmax.
1740 (scm_iint2str): Argument type changed to scm_t_intmax,
1741 reimplemented in terms of scm_uint2str.
1742
1743 * print.c, print.h (scm_uintprint): New, for printing
1744 scm_t_uintmax values.
1745 (scm_intprint): Argument type changed to scm_t_intmax.
1746
1747 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1748 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1749 strategic places so that the loops can be interrupted.
1750
1751 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1752 "-I$(top_srcdir)/libguile-ltdl".
1753 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1754 "../libguile-ltdl/libguile-ltdl.a".
1755
1756 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1757 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1758 instead of <libguile-ltdl.h>.
1759
1760 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1761
1762 * sort.c (quicksort): Copy pivot out of the array while
1763 constructing the partitions; it could get overwritten otherwise.
1764 Because of the ultimate insertion sort, this bug did not cause
1765 quicksort to fail, it just put all the burdon on the insertion
1766 sort and was thus very slow. Thanks to Rolan Orre for reporting
1767 the slowness!
1768
1769 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1770
1771 * numbers.c (scm_i_range_error): New.
1772 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1773 scm_out_of_range.
1774
1775 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1776 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1777
1778 * unif.c (scm_array_p): When no prototype is given, explicitely
1779 test for allowable types, do not simply return true. Thanks to
1780 Roland Orre for reporting this!
1781
1782 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1783
1784 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1785 segment to scm_max_segment_size.
1786
1787 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1788
1789 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1790
1791 * inline.h (scm_double_cell): abort if GC running.
1792 (scm_cell): idem.
1793
1794 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1795
1796 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1797 pos == 0.
1798
1799 Keywords no longer store a 'dash symbol'. Instead, they store a
1800 symbol with their real name.
1801
1802 * keywords.h, keywords.c, deprecated.h, deprecated.c
1803 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1804 terms of scm_is_keyword and scm_keyword_dash_symbol.
1805
1806 * keywords.h, keywords.c, discouraged.h, discouraged.c
1807 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1808 scm_c_make_keyword): Discouraged.
1809
1810 * keywords.h, keywords.c (scm_symbol_to_keyword,
1811 scm_keyword_to_symbol): Implemented in C.
1812 (scm_is_keyword, scm_from_locale_keyword,
1813 scm_from_locale_keywordn): New.
1814
1815 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1816
1817 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1818 scm_from_locale_keyword instead of scm_c_make_keyword.
1819
1820 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1821 better error message.
1822
1823 * deprecated.c: Include discouraged.h and keywords.h.
1824
1825 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1826 reading '#:' or ':'. See NEWS for consequences.
1827
1828 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1829
1830 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1831 literals are now read-write again (until SCM_STRING_CHARS is
1832 removed).
1833
1834 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1835 strings with an error message that blames SCM_STRING_CHARS.
1836
1837 * options.c (change_option_setting): Use scm_car instead of
1838 explicit type check plus SCM_CAR.
1839
1840 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1841 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1842 (scm_iprin1): Use them instead of the previoulsy hardcoded
1843 strings.
1844 (scm_init_print): Initialize them.
1845
1846 * backtrace.c (display_frame_expr): Do not remove control
1847 characters from the final string. Print it directly using
1848 scm_display.
1849
1850 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1851 Thanks to Roland Orre!
1852
1853 2004-09-29 Kevin Ryde <user42@zip.com.au>
1854
1855 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1856 be whole original string in match struct, not offsetted substring.
1857
1858 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1859
1860 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1861
1862 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1863
1864 * Makefile.am (EXTRA_DIST): Added gettext.h.
1865
1866 * smob.c, smob.h (scm_assert_smob_type): New.
1867
1868 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1869 Include GUILE_CFLAGS.
1870 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1871 now.
1872 (libpath.h): Put GUILE_CFLAGS in the build-info.
1873
1874 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1875
1876 * print.h (scm_print_state): Added highlight_objects.
1877 * print.c (make_print_state, scm_free_print_state): Initialize it
1878 to SCM_EOL.
1879 (scm_iprin1): Wrap output in '{...}' when object is contained in
1880 highlight_objects.
1881
1882 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1883 scm_backtrace_with_highlights): New. Set highlight_objects of
1884 printstate.
1885
1886 * error.c (scm_error_scm): Document new meaning of data/rest
1887 argument for out-of-range and wrong-type-arg errors.
1888 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1889 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1890 exception so that it gets highlighted in the backtrace.
1891 Don't talk about "argument" when not giving a position.
1892
1893 * throw.c (handler_message): The rest argument is the fourth
1894 argument, not everything after the third. Call
1895 scm_display_backtrace_with_highlights, passing the rest argument
1896 when appropriate.
1897
1898 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1899
1900 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1901 <bruno@clisp.org>:
1902
1903 * i18n.c: Handle --disable-nls (thanks Bruno).
1904
1905 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1906 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1907
1908 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1909 LC categories.
1910 * posix.c (scm_setlocale): Use it.
1911
1912 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1913 scm_bind_textdomain_codeset): Make wrappers similar to C function
1914 they wrap.
1915
1916 * i18n.h: New file.
1917 * i18n.c: New file.
1918 * gettext.h: New file, taken from GNU gettext.
1919 * init.c: Include libguile/i18n.h.
1920 (scm_init_guile_1): Add call to scm_init_i18n().
1921 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1922 (DOT_X_FILES): Add i18n.x.
1923 (DOT_DOC_FILES): Add i18n.doc.
1924 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1925 (modinclude_HEADERS): Add i18n.h.
1926
1927 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1928
1929 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1930
1931 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1932 discouraged.h. Replaced all uses with scm_is_pair.
1933 (SCM_I_CONSP): New name for SCM_CONSP.
1934
1935 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1936 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1937 scm_cadr, etc): New.
1938 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1939 uses with scm_is_null.
1940
1941 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1942 instead of explicit code.
1943
1944 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1945
1946 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1947 Reworded logic a bit so that #f is returned immediately when s1 is
1948 too short to contain s2.
1949
1950 * regex-posix.c (scm_regexp_exec): Convert string to
1951 zero-terminated locale string before matching against it.
1952
1953 * strings.h, strings.c (scm_substring_read_only,
1954 scm_c_substring_read_only, scm_i_substring_read_only): New.
1955 (RO_STRING_TAG, IS_RO_STRING): New.
1956 (scm_i_string_writable_chars): Bail on read-only strings.
1957
1958 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1959 literals, thus making them read-only as specified by R5RS.
1960
1961 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1962
1963 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1964 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1965
1966 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1967
1968 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1969 numbers.c.
1970 (scm_to_mpz, scm_from_mpz): New.
1971 Thanks to Andreas Vögele!
1972
1973 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1974 just on a line of its own.
1975
1976 * srfi-13.c (scm_string_any, scm_string_every,
1977 scm_string_tabulate, string_upcase_x, string_down_case_x,
1978 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1979 size_t instead of int for indices into strings. Make sure that no
1980 over- or underflow occurs. Thanks to Andreas Vögele!
1981 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1982 indices, which can also be negative.
1983
1984 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1985
1986 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1987
1988 * threads.c (scm_threads_mark_stacks): Call
1989 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1990 only used once.
1991
1992 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1993
1994 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1995 Bugfix: when subtracting unsigned values, make sure that result
1996 does not wrap.
1997
1998 2004-09-09 Kevin Ryde <user42@zip.com.au>
1999
2000 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
2001 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
2002 by Andreas Vögele.
2003
2004 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2005
2006 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
2007
2008 * eq.c (real_eqv): Pretend that all NaNs are equal.
2009
2010 * numbers.c (scm_integer_expt): Do not accept inexact integers.
2011
2012 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2013
2014 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
2015 use size_t for some locals instead of int.
2016
2017 * read.c (scm_flush_ws): Detect "#!"-style comments here.
2018 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
2019 (skip_scsh_block_comment): Use scm_input_error instead of
2020 scm_misc_error in case of EOF.
2021
2022 2004-09-07 Kevin Ryde <user42@zip.com.au>
2023
2024 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
2025 Bug report by Bill Schottstaedt.
2026
2027 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
2028 column.
2029 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
2030
2031 * posix.c (scm_access): Update docstring per manual.
2032
2033 * posix.c (scm_nice): Correction to error detection. Reported by
2034 Matthias Koeppe.
2035
2036 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
2037 throw error before unlocking mutex with SCM_ALLOW_INTS.
2038
2039 2004-09-06 Kevin Ryde <user42@zip.com.au>
2040
2041 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
2042 available. This also gets around CLK_TCK being absent when
2043 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
2044
2045 2004-09-03 Stefan Jahn <stefan@lkcc.org>
2046
2047 * threads.c (scm_threads_mark_stacks): Fixed local variable
2048 definitions.
2049
2050 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
2051 local variable definitions.
2052
2053 * stime.c (_POSIX_C_SOURCE): Do not define this item on
2054 MinGW32 because it conflicts with its pthread headers.
2055 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
2056 (scm_strftime): Using scm_from_locale_string() instead of
2057 scm_makfrom0str().
2058
2059 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
2060 part.
2061
2062 * numbers.c (scm_init_numbers): Removed check_sanity() call
2063 inside GUILE_DEBUG. The function has been removed somewhen...
2064
2065 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
2066 MinGW32 because it conflicts with its pthread headers.
2067
2068 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2069
2070 * strings.c (SCM_STRINGP): Accept all strings.
2071 (SCM_STRING_CHARS): Reject shared substrings here.
2072
2073 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
2074 the Copyright years.
2075
2076 2004-08-27 Kevin Ryde <user42@zip.com.au>
2077
2078 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
2079 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
2080 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
2081
2082 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2083
2084 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
2085 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
2086 scm_i_symbol_is_interned, scm_i_mem2symbol,
2087 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
2088
2089 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2090
2091 * srfi-13.c: First cut at thread-safeness and proper use of
2092 scm_i_string_chars et al. Copious scm_remember_upto_heres have
2093 been inserted. Made sure that no internal string pointer is used
2094 across a SCM_TICK or a possible GC.
2095
2096 * script.c (scm_compile_shell_switches): Use
2097 scm_from_locale_string instead of scm_makfrom0str.
2098
2099 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
2100 always been.
2101
2102 2004-08-25 Marius Vollmer <mvo@zagadka.de>
2103
2104 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
2105 strop.c.
2106
2107 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
2108 * strop.h, strop.c: Removed, they are now empty.
2109 * Makefile.am: Updated for new and removed files.
2110
2111 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
2112 to scm_string_to_symbol.
2113
2114 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
2115 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
2116 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
2117 charset instead of libc functions.
2118
2119 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
2120 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
2121 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
2122 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
2123 instead of explicit code.
2124
2125 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
2126 "srfi-13.h" instead of "strop.h".
2127
2128 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
2129 scm_init_srfi_14. Do not call scm_init_strop.
2130
2131 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2132
2133 * numbers.c (scm_inf_p): Synced docstring back from manual.
2134
2135 2004-08-22 Marius Vollmer <mvo@zagadka.de>
2136
2137 * strings.c (get_str_buf_start): New helper function.
2138 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
2139 scm_i_string_char, scm_i_string_writable_chars): Use it.
2140 (scm_i_substring_copy): Make START argument optional for C
2141 callers, for upcoming SRFI-13 integration.
2142
2143 2004-08-21 Marius Vollmer <mvo@zagadka.de>
2144
2145 From Richard Todd, Thanks!
2146
2147 * script.c (scm_compile_shell_switches): added '-L' switch to add
2148 to the %load-path.
2149
2150 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2151
2152 * eval.c (unmemoize_exprs): When dropping internal body markers
2153 from the output during unmemoization, also drop those that are not
2154 immediately at the beginning of a body.
2155
2156 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2157
2158 * eval.c (scm_lookupcar1): Report "Variable used before given a
2159 value" insetad of an "Unbound" one for variables that are found
2160 but still contain SCM_UNDEFINED.
2161
2162 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2163 expects a null-terminated string in the locale encoding, but
2164 scm_i_string_writable_chars doesn't give that. Fixed by letting
2165 mkstemp modify a locale version of the tmpl argument and copying
2166 the result back into tmpl.
2167
2168 * strop.c (scm_substring_move_x): Store into str2, not str1.
2169
2170 2004-08-20 Kevin Ryde <user42@zip.com.au>
2171
2172 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2173 to modify the input string.
2174
2175 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2176
2177 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2178 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2179 scm_c_symbol_length.
2180
2181 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2182
2183 New string implementation, with copy-on-write strings and
2184 mutation-sharing substrings, and a new internal string API.
2185 Symbols can now share memory with strings.
2186
2187 * tags.h (scm_tc7_stringbuf): New tag.
2188
2189 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2190 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2191 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2192 uses.
2193 (scm_i_make_string, scm_c_make_string): New, to replace
2194 scm_allocate_string. Updated all uses.
2195 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2196 SCM_STRING_LENGTH): Deprecated.
2197 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2198 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2199 Discouraged. Replaced all uses with scm_from_locale_string or
2200 similar, as appropriate.
2201 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2202 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2203 scm_substring_shared, scm_substring_copy): New.
2204
2205 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2206 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2207 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2208 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2209 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2210 Deprecated.
2211 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2212 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2213 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2214 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2215 Updated all uses.
2216 (scm_gensym): Generate only the number suffix in the buffer, just
2217 string-append the prefix.
2218
2219 * error.c (scm_memory_error): Do not try to throw, just abort.
2220 Throwing will not work anyway.
2221
2222 * gh.h, gh-data.c (gh_set_substr): Made src const.
2223
2224 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2225 (scm_mode_bits): Use it.
2226 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2227 a vector normally and fill that instead of consing a list with a
2228 blocked GC.
2229
2230 * read.c (scm_i_casei_streq): New, for counted strings.
2231
2232 * threads.c (gc_section_count): Removed, thread-sleeping can not
2233 be nested.
2234 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2235 admin mutex so that we can be put to sleep by other threads while
2236 blocking on that mutex. Lock all the heap mutex of all threads,
2237 including ourselves.
2238 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2239 call scm_i_enter_guile.
2240 (scm_thread_mark_stacks): Expect all threads to be suspended.
2241
2242 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2243 scm_gc_mallocated, for now.
2244 (scm_init_storage): Initialize it.
2245 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2246
2247 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2248 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2249 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2250 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2251
2252 * strop.c (scm_string_copy): Use scm_c_substring to get a
2253 copy-on-write string.
2254
2255 2004-08-18 Kevin Ryde <user42@zip.com.au>
2256
2257 * arbiters.c (FETCH_STORE): New macro.
2258 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2259 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2260 scm_try_arbiter and scm_release_arbiter.
2261 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2262 for speed on i386, otherwise using mutex.
2263
2264 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2265 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2266 exact and inexact is #f.)
2267
2268 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2269 to get thread safety of scm_ttyname.
2270
2271 * ports.c (ttyname): Remove prototype, unused.
2272
2273 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2274 Reported by Michael Tuexen.
2275
2276 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2277
2278 * load.c (scm_init_load_path): Do not pass NULL to
2279 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2280 not set. Thanks to Bill Schottstaedt.
2281
2282 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2283
2284 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2285 locale strings instead of accessing their internals.
2286 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2287 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2288 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2289
2290 * simpos.c (scm_system): Convert SCM strings to locale strings
2291 instead of accessing their internals.
2292
2293 * script.c (scm_compile_shell_switches): Convert version to locale
2294 string before printing it.
2295
2296 * rdelim.c (scm_read_delimited_x): Avoid
2297 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2298 of scm_from_long for the returned number of read characters.
2299
2300 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2301 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2302
2303 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2304 Use them instead of SCM_SYSCALL when one or two strings need to be
2305 converted into locale strings.
2306 (my_rename): New, gathers platform dependent code for renaming.
2307 (scm_rename): Use it.
2308 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2309 strings instead of accessing their internals.
2310 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2311 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2312 SCM_STRING_LENGTH.
2313
2314 * extensions.c (load_extension): Convert lib and init to locale
2315 strings instead of accessing the internals directly.
2316 (scm_c_load_extension): Use scm_from_locale_string instead of
2317 scm_makfrom0str.
2318
2319 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2320 scm_fdes_to_port, but take mode bits directly instead of as a C
2321 string.
2322 (scm_i_fdes_to_port): Implement using above.
2323 (scm_open_file): Use scm_i_fdes_to_port together with
2324 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2325 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2326 with scm_i_mode_bits to avoid accessing internals of SCM string
2327 from C.
2328
2329 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2330 SCM string as argument.
2331
2332 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2333 bits directly instead of C string.
2334 (scm_void_port): Implement using above.
2335 (scm_sys_make_void_port): Use scm_i_void_port together with
2336 scm_i_mode_bits to avoid accessing internals of SCM string.
2337
2338 * strings.h, strings.c (scm_i_get_substring_spec): New.
2339
2340 * socket.c, rw.c, deprecated.h, validate.h
2341 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2342 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2343 scm_to_locale_string, etc.
2344 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2345 above, plus scm_i_get_substring_spec.
2346
2347 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2348 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2349 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2350 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2351 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2352 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2353 with more explicit scm_remember_upto_here_1, etc, or introduced
2354 them in the first place.
2355
2356 * posix.c (WITH_STRING): New helper macro. Use it where one
2357 locale string is needed for a short piece of code.
2358 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2359 when one locale string is needed.
2360 (scm_mkstemp): Convert tmpl to a locale string.
2361 (scm_putenv): Rewritten to use only C strings.
2362 (scm_setlocale, scm_crpt): Convert argument strings to locale
2363 strings.
2364
2365 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2366
2367 * load.c (scm_primitive_load_path): Do not check for absolute
2368 filenames when scm_sys_search_load_path returns false, which will
2369 return absolute filenames unchanged.
2370
2371 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2372
2373 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2374 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2375 of an alist. Thanks to Matthias Koeppe!
2376
2377 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2378
2379 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2380 Moved from string.h to deprecated.h.
2381
2382 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2383
2384 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2385 SCM_I_MAKE_STRING_TAG, changed all uses.
2386 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2387 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2388 respectively. For a short time, the old names are still there as
2389 aliases. Not all uses have been changed yet, but the ones in
2390 strings.c have.
2391 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2392 SCM_T_BITS_MAX.
2393 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2394 scm_take_locale_string, scm_take_locale_stringn,
2395 scm_to_locale_string, scm_to_locale_stringn,
2396 scm_to_locale_stringbuf): New.
2397 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2398 deprecated.[hc]. Implemented in terms of the new functions above.
2399 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2400 scm_makfrom0str): Reimplemented in terms of the new functions from
2401 above. They will be discouraged shortly.
2402 (scm_substring): Do not use scm_mem2string.
2403 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2404 to replace similar code from posix.c, simpos.c, and dynl.c.
2405 (scm_string_append): Use memcpy instead of explicit loop. Do not
2406 use register keyword. Use plain 'char' instead of 'unsigned
2407 char'.
2408
2409 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2410 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2411
2412 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2413 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2414 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2415 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2416
2417 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2418 string. This avoids a conversion round-trip.
2419
2420 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2421 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2422 SCM_I_STRING_LENGTH, respectively.
2423 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2424
2425 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2426 of a string, call scm_display on the string itself.
2427
2428 * dynwind.c, dynwind.h (scm_frame_free): New.
2429
2430 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2431 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2432 Replaced uses of SCM_STRING_CHARS with proper uses of
2433 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2434 Replaced scm_mem2string with scm_from_locale_string.
2435
2436 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2437 Removed, replaced all uses with scm_i_allocate_string_pointers.
2438
2439 * load.h, load.c (scm_internal_parse_path): Removed.
2440 (scm_parse_path): Use scm_string_split to do the work.
2441 (scm_init_load_path): Use scm_parse_path instead of
2442 scm_internal_parse_path.
2443 (scm_search_path): Rewritten string handling part of the code in
2444 terms of scm_to_locale_stringbuf and so that it is thread safe.
2445
2446 * error.c (scm_error_scm): Throw directly instead of calling
2447 scm_error, this avoids the back and forth conversion of SUBR and
2448 MESSAGE and also plugs a memory leak.
2449 (scm_error): Call scm_error_scm.
2450
2451 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2452 (display_header): Print FNAME when it is true, not
2453 merely when it is a string.
2454
2455 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2456 unceremoniously. They were unused by Guile itself, and external
2457 use should stop immediately.
2458
2459
2460 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2461
2462 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2463 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2464 deprecated versions installed in deprecated.h and deprecated.c.
2465 Changed all uses.
2466
2467 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2468
2469 * net_db.c (scm_resolv_error): don't cause an exception while
2470 trying to throw an exception -- call scm_misc_error with correct
2471 arguments. The previous arguments needed a format escape that
2472 wasn't in any of the format strings.
2473
2474 2004-08-06 Kevin Ryde <user42@zip.com.au>
2475
2476 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2477 so as not to depend on signedness of plain char. For byvect range
2478 check, throw out-of-range rather than wrong-type-arg.
2479
2480 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2481 signed byte range checks by using scm_to_schar and scm_from_schar,
2482 don't want to depend on signedness of C char.
2483
2484 2004-08-05 Kevin Ryde <user42@zip.com.au>
2485
2486 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2487 SCM_DEFER_INTS.
2488 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2489 guaranteed if multiple threads compete to unlock.
2490 Update docstrings per doc/ref/api-scheduling.texi.
2491
2492 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2493 stat on the filename, to be certain a file rename can't mean we get
2494 info on one filesystem object but open another. This fstat usage is
2495 similar to Emacs copy-file.
2496
2497 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2498
2499 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2500 SIGINT and SIGQUIT, since those values are ints.
2501
2502 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2503
2504 * num2integral.i.c, num2float.i.c: Removed.
2505 * Makefile.am (noinst_HEADERS): Updated.
2506
2507 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2508 scm_i_make_ratio and made static, replaced uses with scm_divide.
2509 (scm_complex_p): New, export as "complex?" to Scheme.
2510 (scm_number_p): Export as "number?" to Scheme.
2511 (scm_is_complex, scm_is_number): New.
2512 (scm_c_make_rectangular, scm_c_make_polar): New.
2513 (scm_make_rectangular, scm_make_polar): Use above.
2514 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2515 New.
2516 (scm_make_complex): Discouraged by moving to discouraged.h and
2517 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2518
2519 * discouraged.h, discouraged.c, numbers.c, numbers.h
2520 (scm_is_rational): New.
2521 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2522 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2523 Removed prototypes.
2524 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2525 Discouraged by moving to discouraged.h and discouraged.c.
2526 Replaced all uses with scm_from_double.
2527 (scm_num2float, scm_num2double): Discouraged by moving prototype
2528 to discouraged.h and rewriting in terms of scm_to_double.
2529 Replaced all uses with scm_to_double.
2530 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2531 explicit code.
2532 (scm_from_double): Do not implement in terms of scm_make_real, use
2533 explicit code.
2534
2535 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2536
2537 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2538
2539 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2540 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2541
2542 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2543 Renamed to SCM_I_* in order to avoid collisions with the versions
2544 defined in deprecated.h.
2545
2546 * discouraged.h, discouraged.c: New files.
2547
2548 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2549 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2550 deprecated to being discouraged by moving to discouraged.h.
2551
2552 * numbers.h, numbers.c, discouraged.h, discouraged.c
2553 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2554 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2555 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2556 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2557 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2558 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2559 discouraged.c and reimplementing in terms of scm_from_* and
2560 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2561 functions.
2562
2563 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2564 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2565 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2566 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2567 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2568 explicit code.
2569
2570 2004-08-02 Kevin Ryde <user42@zip.com.au>
2571
2572 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2573 and current usage and migration.
2574
2575 2004-07-31 Kevin Ryde <user42@zip.com.au>
2576
2577 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2578 it's not thread safe.
2579 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2580 advantage of this.
2581 * fports.c (scm_open_file): Use scm_strerror likewise.
2582 * filesys.c (scm_stat, scm_lstat): Ditto.
2583
2584 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2585 cannot be opened.
2586
2587 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2588 update, for thread safety.
2589 (gensym_counter): Move into scm_gensym which is its only user.
2590 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2591
2592 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2593
2594 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2595 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2596 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2597 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2598 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2599 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2600 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2601 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2602 defined in terms of scm_to_signed_integer, etc, but in terms of
2603 scm_to_int8, etc.
2604
2605 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2606
2607 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2608 no longer used.
2609
2610 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2611 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2612
2613 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2614 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2615 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2616 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2617 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2618 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2619 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2620
2621 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2622 the functions below.
2623
2624 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2625 conv-uinteger.i.c.
2626
2627 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2628 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2629 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2630 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2631 scm_from_uint64): Turned from macros into proper functions.
2632 (scm_to_signed_integer, scm_to_unsigned_integer,
2633 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2634 conv-integer.i.c and conv-uinteger.i.c, as well.
2635
2636 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2637 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2638 the limits. Those are always defined.
2639
2640 2004-07-29 Kevin Ryde <user42@zip.com.au>
2641
2642 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2643
2644 2004-07-28 Kevin Ryde <user42@zip.com.au>
2645
2646 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2647 safety.
2648
2649 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2650 consistency with other vector types and to get arg and func name into
2651 error message.
2652
2653 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2654
2655 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2656 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2657 scm_from_bool, respectively.
2658 (SCM_NINUMP): Added.
2659
2660 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2661 deprecated.h. Replaced all uses with scm_is_eq.
2662
2663 2004-07-24 Kevin Ryde <user42@zip.com.au>
2664
2665 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2666 * posix.c (scm_crypt): Use it to protect static data in crypt().
2667
2668 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2669
2670 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2671 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2672 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2673 versions to deprecated.h and deprecated.c. Changed all uses to
2674 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2675 scm_from_*, as appropriate.
2676
2677 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2678 the unexisting scm_cross_dynwind_binding_scope for inums on the
2679 windlist.
2680
2681 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2682
2683 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2684 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2685 byte-wise address to a SCM integer. Changed all uses.
2686 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2687 scm_to_ipv6 and added type and range checking, for converting from
2688 an IPv& byte-wise address to a SCM integer. Changed all uses.
2689 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2690 is now done by scm_to_ipv6.
2691
2692 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2693 not accept inexact integers.
2694
2695 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2696 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2697 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2698 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2699 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2700 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2701 fixnum/bignum distinction visible. Changed all uses to
2702 scm_to_size_t or similar.
2703
2704 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2705
2706 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2707
2708 2004-07-10 Kevin Ryde <user42@zip.com.au>
2709
2710 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2711 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2712 such a size causes divide-by-zeros in scm_hasher.
2713
2714 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2715 leak.
2716
2717 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2718
2719 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2720 Rewritten using the same logic as scm_to_signed_integer and
2721 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2722 use CHAR_BIT instead of hardcoding 8.
2723 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2724 SCM_I_LLONG_MIN etc. instead.
2725
2726 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2727 SCM_I_MAKINUM and changed all uses.
2728 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2729
2730 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2731 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2732 them by assuming twos-complement.
2733
2734 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2735
2736 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2737 configure now produces.
2738 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2739 definitions, giving the limits of the integer types defined by
2740 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2741 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2742
2743 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2744 SHORT_MIN.
2745 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2746 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2747 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2748 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2749 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2750 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2751 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2752 scm_from_uintmax): New.
2753
2754 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2755
2756 * tags.h (scm_is_eq): New.
2757
2758 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2759 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2760 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2761 scm_from_bool, and scm_is_bool, respectively.
2762
2763 * boolean.h (scm_is_bool): Fix bug in prototype.
2764 (scm_from_bool): The argument is "x" not "f", stupid.
2765
2766 * boolean.c (scm_is_bool): Fix typo.
2767
2768 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2769 scm_is_unsigned_integer, scm_to_signed_integer,
2770 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2771 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2772 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2773 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2774 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2775 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2776 New.
2777
2778 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2779
2780 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2781 scm_to_bool): New.
2782
2783 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2784
2785 * backtrace.c (display_expression, display_frame): Call
2786 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2787 single memoized expression.
2788
2789 * debug.c (memoized_print): Don't try to unmemoize the memoized
2790 object, since we can't know whether it holds a single expression
2791 or a body.
2792
2793 (scm_mem_to_proc): Removed check for lambda expression, since it
2794 was moot anyway. Whoever uses these functions for debugging
2795 purposes should know what they do: Creating invalid memoized code
2796 will cause crashes, independent of whether this check is present
2797 or not.
2798
2799 (scm_proc_to_mem): Take the closure's code as it is and don't
2800 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2801 memoized code should not be modified.
2802
2803 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2804 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2805 available as a guile internal function instead. However,
2806 scm_i_unmemoize_expr will only work on memoized objects that hold
2807 a single memoized expression. It won't work with bodies.
2808
2809 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2810 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2811 i. e. a list of expressions.
2812
2813 * eval.c (unmemoize_exprs): Drop internal body markers from the
2814 output during unmemoization.
2815
2816 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2817 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2818 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2819 as guile internal functions instead. scm_i_unmemoize_expr will
2820 only work on a single memoized expression, while
2821 scm_i_unmemocopy_body will only work on bodies.
2822
2823 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2824
2825 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2826
2827 (scm_cons_source, scm_primitive_eval): Prefer higher level
2828 predicate SCM_FALSEP over SCM_IMP.
2829
2830 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2831
2832 * script.c (scm_shell_usage): minor phrasing change.
2833
2834 * gc_os_dep.c: update ifdefery for macosx.
2835 (scm_get_stack_base): separate result initialization from
2836 declaration to slience warnings with macosx and hp-ux using gcc
2837 3.3. Thanks to Andreas Vögele.
2838
2839 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2840
2841 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2842
2843 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2844
2845 * list.[ch] (scm_i_finite_list_copy): New internal function to
2846 copy lists that are known to be finite (though not necessarily
2847 proper).
2848
2849 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2850 a closure's argument list like an expression of a body.
2851
2852 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2853 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2854 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2855 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2856 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2857 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2858 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2859 unmemoize_builtin_macro): New static functions and symbols.
2860
2861 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2862 now has a slightly different meaning: The memoized form that is
2863 receives as its argument is now interpreted as a sequence of
2864 expressions from a body.
2865
2866 (unmemocar, scm_unmemocar): Since the whole functionality of
2867 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2868 has its old content back and is deprecated, while unmemocar has
2869 been removed.
2870
2871 (SCM_BIT7): Removed.
2872
2873 (CEVAL): For unmemoizing a single expression, call
2874 unmemoize_expression instead of scm_unmemocopy, which now expects
2875 a sequence of body expressions. Eliminated unnecessary empty
2876 environment frame when executing let* forms. Eliminated
2877 unmemoization step from evaluator.
2878
2879 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2880
2881 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2882 macroexp and made static. Added new version of scm_macroexp that
2883 emits a deprecation warning and then calls macroexp.
2884 (scm_m_undefine): Issue deprecation warning.
2885
2886 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2887
2888 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2889 Modified to make set! work on symbols that represent syntactic
2890 keywords.
2891
2892 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2893
2894 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2895 compound expression as lvalue errors.
2896
2897 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2898
2899 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2900 WINDER_DATA to a SCM.
2901
2902 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2903
2904 * goops.c (compute_getters_n_setters, create_standard_classes,
2905 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2906 lambda expression rather than creating them with scm_closure.
2907
2908 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2909
2910 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2911 misplaced syntactic keywords. This will not work unless guile's
2912 defmacro feature is deprecated.
2913
2914 (scm_m_case): Fixed a bug that caused the list of labels to grow
2915 with every case form.
2916
2917 2004-05-19 Kevin Ryde <user42@zip.com.au>
2918
2919 * numbers.c (scm_round_number): For inum and big, just return x. For
2920 real, use scm_round for 2^54-1 etc problems covered there.
2921
2922 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2923 doesn't provide trunc. This was for when `truncate' was done as a
2924 scm_tc7_dsubr, no longer required.
2925
2926 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2927 to stack marking call, two parameters and no cast on t->base.
2928
2929 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2930
2931 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2932 processed hashtables back into the weak_hashtables list. Thanks
2933 to Bill Schottstaedt!
2934
2935 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2936
2937 * eval.c (unmemoize_quote): New static function.
2938
2939 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2940 representation of 'quote' and '@slot-ref' to an improper list.
2941 This reduces execution time, the number of cells used to hold the
2942 memoized code, and thus also reduces garbage collection time.
2943
2944 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2945
2946 (SCM_CEVAL): Changed macro handling to also work with macros that
2947 return improper lists. Added an assertion, that the code returned
2948 by a macro transformer will not lead to cycles in the memoized
2949 code.
2950
2951 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2952
2953 No functional change, just rearrangements of functions within the
2954 file.
2955
2956 * eval.c (scm_ilookup, scm_unbound_variable_key,
2957 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2958 the definitions used for execution, since that's where they will
2959 belong to later.
2960
2961 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2962
2963 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2964 throughout guile, has not been part of an official release yet,
2965 and the concept of sloppy predicates has never been a good idea.
2966
2967 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2968 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2969 Simplified.
2970
2971 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2972
2973 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2974 to make explicit what happens.
2975
2976 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2977
2978 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2979 explicit what happens.
2980
2981 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2982 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2983
2984 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2985
2986 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2987 is indeed a procedure when it isn't a number.
2988
2989 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2990
2991 Convert floating point numbers into strings with an arbitrary
2992 radix. Thanks to Richard Todd!
2993
2994 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2995 fit.
2996 (fx): Removed.
2997 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2998 number_chars): New, to support variable radices.
2999 (idbl2str): Use above instead of the old base-10 only tables.
3000 (iflo2str): Pass on new RADIX argument to idbl2str.
3001 (scm_number_to_string): Pass radix to iflo2str.
3002 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
3003 iflo2str.
3004 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
3005 possible radices.
3006
3007 2004-05-10 Kevin Ryde <user42@zip.com.au>
3008
3009 * numbers.c (scm_logbit_p): Correction to test above the end of an
3010 inum. Reported by Jan Konecny.
3011
3012 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3013
3014 * gc.h (scm_t_cell): Fields are now of type SCM instead of
3015 scm_t_bits. Updated all users.
3016 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
3017 duplicating the code.
3018 (SCM_CELL_OBJECT_LOC): New.
3019 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
3020 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
3021
3022 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
3023 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
3024 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
3025 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
3026 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
3027 SCM_SMOB_OBJECT_3_LOC): New.
3028 * smob.c (scm_i_set_smob_flags): New function.
3029
3030 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
3031 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
3032 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
3033 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
3034 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
3035 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
3036
3037 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
3038 taking the address of SCM_CELL_WORD_1, the latter being no longer
3039 an lvalue.
3040
3041 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
3042 of casting SCM_CELL_WORD_LOC.
3043
3044 2004-05-02 Kevin Ryde <user42@zip.com.au>
3045
3046 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
3047 --disable-deprecated. Reported by Andreas Vögele.
3048
3049 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
3050 particular on HP-UX). Reported by Andreas Vögele.
3051
3052 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
3053 code has support for. Fixes building with AIX cc, which is ansi but
3054 doesn't define __STDC__. Reported by Keith Crane.
3055 (var_start): Remove macro, this variation no longer required.
3056 (scm_list_n): Use va_start directly.
3057
3058 2004-05-01 Kevin Ryde <user42@zip.com.au>
3059
3060 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
3061 is now gone. Reported by Andreas Vögele.
3062
3063 2004-04-28 Kevin Ryde <user42@zip.com.au>
3064
3065 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
3066 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
3067 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
3068 subscript. Reported by Andreas Vögele.
3069 Also cast through unsigned char to avoid passing negatives to those
3070 macros if input contains 8-bit values.
3071
3072 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
3073 corrections to range check for signed numbers. Remove
3074 scm_remember_upto_here_1(num) from these checks, since num is used
3075 subsequently anyway.
3076
3077 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
3078 avoid warning from gcc 3.4. Reported by Hyperdivision.
3079
3080 * numbers.c (scm_bit_extract): Use min instead of MIN.
3081 (MIN): Remove, this conflicts with similar macro defined by limits.h
3082 on HP-UX. Reported by Andreas Vögele.
3083
3084 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
3085 particular on HP-UX). Reported by Andreas Vögele.
3086
3087 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
3088 Reported by Andreas Vögele.
3089
3090 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
3091 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
3092 by Andreas Vögele.
3093
3094 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3095
3096 * eval.c (s_macro_keyword): New static identifier.
3097
3098 (scm_m_define): Change order to first create binding and
3099 evaluating the expression afterwards.
3100
3101 (scm_m_set_x): Memoize complete set! expression. Only leave
3102 symbols if no binding exists at memoization time. Throw error if
3103 assigning to a syntactic keyword.
3104
3105 (lazy_memoize_variable): New function.
3106
3107 (CEVAL): When execution set!, perform lazy memoization if
3108 unmemoized symbol is detected.
3109
3110 * modules.c (module_variable): Return variables with unbound
3111 value.
3112
3113 * tags.h: Fix comment.
3114
3115 2004-04-25 Kevin Ryde <user42@zip.com.au>
3116
3117 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
3118 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
3119 in 8-bit locales, and ensures consistency with char-upper-case? and
3120 char-lower-case? which already use ctype.h.
3121 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
3122 Remove.
3123 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
3124
3125 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
3126 call. Reported by Hyperdivision.
3127
3128 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
3129 Reported by Hyperdivision.
3130
3131 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
3132 Hyperdivision.
3133
3134 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3135
3136 Hide the implementation of ilocs and isyms in eval.c.
3137
3138 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3139 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3140 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
3141 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
3142 eval.h to eval.c.
3143
3144 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
3145 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
3146 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
3147 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
3148 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
3149 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
3150 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
3151 renamed to ISYMNUM.
3152
3153 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
3154 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
3155 Extracted printing of ilocs and isyms to guile internal functions
3156 scm_i_print_iloc, scm_i_print_isym of eval.c.
3157
3158 2004-04-22 Kevin Ryde <user42@zip.com.au>
3159
3160 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3161
3162 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3163 rounding in x+0.5 when x is a big value already an integer. In
3164 certain hardware rounding cases x+0.5 can give an adjacent integer,
3165 leading to that as the result, when we really just wanted x itself.
3166
3167 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3168
3169 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3170
3171 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3172 added const qualifiers, cast intentionally unused expressions to
3173 void for emphasis, improved comment.
3174
3175 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3176
3177 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3178 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3179 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3180 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3181 Defined the tc8-tag for flags to be 0x04, which will mean that
3182 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3183 to the reduced number of bits and the simpler bit pattern for
3184 SCM_BOOL_F, certain machines may be able to use more efficient
3185 processor instructions to deal with SCM_BOOL_F.
3186
3187 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3188 never been defined in a released version, thus no need to
3189 deprecate them.
3190
3191 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3192 instead of tc9 tags.
3193
3194 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3195 of tc9 tags.
3196
3197 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3198 could have used this definition.
3199
3200 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3201 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3202 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3203 as isyms, as special isyms don't exist any more.
3204
3205 2004-04-18 Kevin Ryde <user42@zip.com.au>
3206
3207 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3208 safety.
3209
3210 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3211 explicit swapping code.
3212
3213 2004-04-15 Kevin Ryde <user42@zip.com.au>
3214
3215 * cpp_sig_symbols.in: Add SIGSYS.
3216
3217 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3218 recursion.
3219
3220 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3221 frac/big and frac/frac, use scm_less_p for exact comparison.
3222
3223 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3224 with big/inum.
3225
3226 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3227
3228 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3229
3230 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3231
3232 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3233 scm_c_{up,down}case.
3234 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3235 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3236
3237 2004-04-06 Kevin Ryde <user42@zip.com.au>
3238
3239 * numbers.c (scm_ash): Remove stray "}" in docstring.
3240
3241 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3242 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3243 calling mpz_cmp_ui in most cases.
3244
3245 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3246 for big == abs(most-negative-fixnum) special case.
3247 (abs_most_negative_fixnum): Remove, no longer used.
3248
3249 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3250 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3251 calling (sigaction NSIG).
3252
3253 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3254 and fork error cases to do this.
3255
3256 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3257
3258 * eval.c (CEVAL): Don't distinguish between short and long
3259 instructions when dispatching - just always dispatch on the
3260 instruction code, which is common for short and long instructions.
3261 Further, removed unnecessary goto statements and added comment.
3262
3263 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3264
3265 * eval.c (scm_unmemocopy): Don't distinguish between short and
3266 long instructions when dispatching - just always dispatch on the
3267 instruction code, which is common for short and long instructions.
3268 Further, removed unnecessary goto statements, fixed indentation
3269 and replaced SCM_IMP predicates by SCM_NULLP.
3270
3271 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3272
3273 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3274 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3275 'checkmacro'.
3276
3277 2004-03-31 Kevin Ryde <user42@zip.com.au>
3278
3279 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3280
3281 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3282
3283 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3284 SCM_DEBUGGINGP:
3285
3286 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3287 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3288 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3289 single interface that also matches the naming conventions.
3290 Probably scm_debug_mode_p should be part of the private interface
3291 anyway.
3292
3293 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3294 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3295 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3296 to scm_debug_mode_p.
3297
3298
3299 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3300
3301 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3302 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3303 from debug.h to eval.h.
3304
3305 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3306 more, just leave it with setting scm_debug_mode_p, which is
3307 equivalent for practical purposes.
3308
3309 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3310 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3311
3312 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3313
3314 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3315 static and renamed it to ceval throughout. Provide a new exported
3316 but deprecated function scm_ceval as a wrapper for backwards
3317 compatibility. The same is done for the deval/scm_deval pair of
3318 functions.
3319
3320 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3321 throughout. Defined CEVAL to ceval or deval, based on compilation
3322 phase.
3323
3324 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3325 to ceval and deval instead of calling *scm_ceval_ptr.
3326
3327 * eval.c (dispatching_eval): New deprecated static function.
3328
3329 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3330 to emulate its old behaviour as closely as possible.
3331
3332
3333 Change the evaluator such that only expressions for which pair? is
3334 true are passed to CEVAL, and such that all other expressions are
3335 evaluated outside of CEVAL:
3336
3337 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3338 expression that is assumed to be memoized already. All but
3339 expressions of the form '(<form> <form> ...)' are evaluated inline
3340 without calling an evaluator.
3341
3342 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3343 expressions of the form '(<form> <form> ...)' inline without
3344 calling an evaluator.
3345
3346 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3347 the special case of unmemoized symbols passed on the top level.
3348
3349 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3350 is known that the expression passed to CEVAL is of the form
3351 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3352 now it is known that the input expression of CEVAL is a pair.
3353
3354 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3355
3356 * eval.c (is_self_quoting_p): New static function.
3357
3358 (scm_m_quote): Use is_self_quoting_p.
3359
3360 (copy_tree): Corrected typo in comment.
3361
3362 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3363
3364 * eval.c (s_scm_copy_tree): idem.
3365
3366 * list.c (s_scm_filter): remove "pointer" from doc string.
3367
3368 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3369
3370 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3371
3372 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3373 (display_frame): idem.
3374 (display_backtrace_file_and_line): idem.
3375
3376 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3377 arguments.
3378
3379 2004-03-26 Kevin Ryde <user42@zip.com.au>
3380
3381 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3382
3383 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3384 big==0 since that never occurs.
3385
3386 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3387 scm_modular_expt, matching scheme level name `modulo-expt'.
3388
3389 * numbers.c (scm_modular_expt): Return a negative remainder for a
3390 negative divisor, the same as `modulo' does.
3391
3392 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3393
3394 * numbers.c, numbers.h (scm_modular_expt): New function.
3395
3396 2004-03-25 Kevin Ryde <user42@zip.com.au>
3397
3398 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3399 return inexact as required by r5rs.
3400
3401 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3402
3403 * eval.c: Separated some definitions relevant for execution from
3404 the memoization part of the file.
3405
3406 (copy_tree): New static function
3407
3408 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3409 structures are detected now and will lead to an exception instead
3410 of forcing guile to run in an endless loop, using up all the
3411 system's memory. Second, arrays in the cdr of an improper list
3412 are now copied. See the new test cases in eval.test.
3413
3414 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3415
3416 * posix.c (scm_gethostname): Make sure len is initialised before
3417 it is used. Restructured to (hopefully) represent possible
3418 configurations more clearly in the code. Added unwind handler.
3419
3420 2004-03-23 Kevin Ryde <user42@zip.com.au>
3421
3422 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3423 MAXHOSTNAMELEN when available.
3424
3425 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3426
3427 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3428 terminator. Rewritten the logic as a state machine, I must have
3429 been doing too much VHDL lately...
3430
3431 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3432 themselves. Thanks to Han-Wen Nienhuys!
3433
3434 * list.c: Changed docstrings so that they no longer talk about
3435 returning 'pointers' to something.
3436
3437 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3438
3439 * gc.c: remove set_debug_cell_accesses! when
3440 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3441 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3442 debugging conditionally.
3443
3444 2004-03-21 Kevin Ryde <user42@zip.com.au>
3445
3446 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3447
3448 2004-03-20 Kevin Ryde <user42@zip.com.au>
3449
3450 * posix.c (scm_gethostname): Preserve errno across free() call.
3451
3452 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3453
3454 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3455 free cells.
3456
3457 2004-03-14 Kevin Ryde <user42@zip.com.au>
3458
3459 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3460 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3461
3462 2004-03-07 Kevin Ryde <user42@zip.com.au>
3463
3464 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3465 than "GMT" always.
3466 (filltime): Make zname parameter "const".
3467
3468 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3469
3470 * threads.c, threads.h (scm_c_scm2thread): New function.
3471
3472 2004-02-29 Kevin Ryde <user42@zip.com.au>
3473
3474 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3475 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3476 particular don't assume "defined (__alpha__) && ! defined (linux)"
3477 means OSF. Remove "SCO" code, which was not really SCO specific and
3478 which John W. Eaton advises should be long past being needed.
3479
3480 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3481 error throw.
3482
3483 2004-02-24 Kevin Ryde <user42@zip.com.au>
3484
3485 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3486
3487 2004-02-22 Kevin Ryde <user42@zip.com.au>
3488
3489 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3490 complex, same as for two args. (Handle only inum, big, real, frac).
3491
3492 2004-02-21 Kevin Ryde <user42@zip.com.au>
3493
3494 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3495 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3496 Reported by Andreas Voegele.
3497
3498 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3499
3500 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3501 validation.
3502
3503 * read.c (scm_lreadparen): Removed.
3504 (scm_lreadparen1): Renamed scm_i_lreadparen.
3505
3506 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3507
3508 * list.c (scm_list_n): validate non-immediate arguments;
3509 this will catch forgotten a SCM_UNDEFINED.
3510
3511 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3512
3513 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3514 Thanks to Bill Schottstaedt!
3515
3516 * socket.h (scm_gethost): Removed prototype it is already in
3517 "net_db.h". Thanks to Bill Schottstaedt!
3518
3519 2004-02-18 Kevin Ryde <user42@zip.com.au>
3520
3521 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3522 order parameter to mpz_import, in fact with just one word there's no
3523 order to worry about at all.
3524
3525 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3526 and frac==complex, make an exact comparison rather than converting
3527 with fraction2double.
3528
3529 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3530 shared library, since environ is not directly available there.
3531
3532 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3533 standard.
3534
3535 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3536 errno EINVAL in case localtime and gmtime don't set it.
3537 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3538 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3539
3540 2004-02-16 Kevin Ryde <kevin@swox.se>
3541
3542 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3543 which were permitted in the past for these.
3544
3545 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3546 previous change to numbers.c.
3547
3548 * script.c (scm_shell_usage): Print bug-guile email address, as per
3549 GNU standard. Reported by Han-Wen Nienhuys.
3550
3551 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3552
3553 * unif.c (scm_make_uve): Removed local variable and simplified
3554 code in order to avoid compiler used uninitialized warnings.
3555
3556 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3557 scm_hash_map.
3558 (scm_hash_fold): Use scm_call_3 directly in the call to
3559 scm_internal_hash_fold instead of going via fold_proc (which is
3560 now removed).
3561 (scm_hash_for_each): Use a trampoline +
3562 scm_internal_hash_for_each_handle.
3563 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3564 functions.
3565
3566 2004-02-12 Kevin Ryde <user42@zip.com.au>
3567
3568 * ports.c (scm_port_line): In docstring, note first line is 0.
3569 (scm_set_port_line_x): In docstring, note first line is 0.
3570 (scm_port_column): In docstring, there's no default to current input
3571 port, and remove shared port-line @defun.
3572 (scm_set_port_column_x): In docstring, there's no default to current
3573 input port, note first column is 0, remove shared set-port-line!
3574 @defun.
3575
3576 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3577 convert args the same way that array-set! does.
3578
3579 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3580 for dvect.
3581 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3582 for "l" not "s", fix dvect to be false for singp(prot) since such a
3583 value is for fvect.
3584 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3585 (exactly_one_third): New variable.
3586 (scm_init_unif): Initialize it.
3587
3588 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3589
3590 * read.c (scm_read_opts): Change `escaped-parens' to
3591 `elisp-strings'.
3592
3593 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3594
3595 * read.c (scm_read_opts): New opts `elisp-vectors' and
3596 `escaped-parens'.
3597 (s_vector): New.
3598 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3599 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3600 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3601 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3602 `escaped-parens' option set.
3603 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3604 in tokens.
3605 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3606 (scm_lreadparen1): New.
3607
3608 * read.h: Remove conditionally compiled last arg to
3609 scm_lreadparen.
3610 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3611
3612 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3613
3614 * eval.c (m_expand_body): remove stray variable new_body.
3615
3616 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3617
3618 * eval.c (m_expand_body): Rewrite the expression in place (by
3619 overwriting FORMS) also when a letrec is constructed, not only
3620 when no definitions are found. Do not return rewritten expression
3621 to emphasize the in-place rewriting. Changed all users.
3622
3623 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3624
3625 * gc.c: add protected_object_count, a number that is dumped from
3626 gc_stats()
3627
3628 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3629
3630 * dynwind.h, dynwind.c (scm_frame_unwind,
3631 scm_frame_unwind_handler): Renamed and changed all uses.
3632 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3633
3634 2004-01-11 Kevin Ryde <user42@zip.com.au>
3635
3636 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3637 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3638 changes made to scheme-compound.texi.
3639
3640 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3641
3642 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3643 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3644
3645 * guile-snarf.in: Use mkdir to create a unique temporary directory
3646 that we can safely use. Thanks to Stefan Nordhausen!
3647
3648 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3649
3650 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3651 argument since it is always zero now. Changed all callers.
3652 Removed code for handling fluids.
3653
3654 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3655 the wind chain explicitely. Use scm_c_with_fluid for the common
3656 case of only one fluid.
3657 (scm_with_fluid): New.
3658 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3659
3660 * fluids.h, fluids.c (scm_frame_fluid): New.
3661 (scm_with_fluid): New.
3662 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3663
3664 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3665 do the unwinding directly. It is simple enough.
3666
3667 * dynwind.h, dynwind.c: Did the following renamings:
3668 scm_begin_frame -> scm_frame_begin,
3669 scm_end_frame -> scm_frame_end,
3670 scm_on_unwind -> scm_frame_unwind,
3671 scm_on_rewind -> scm_frame_rewind,
3672 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3673 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3674 Changed all uses.
3675
3676 * aync.h, async.c: Did the follwing renamings:
3677 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3678 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3679 Changed all uses.
3680
3681 * ports.h, ports.c: Did the follwing renamings:
3682 scm_with_current_input_port -> scm_frame_current_input_port,
3683 scm_with_current_output_port -> scm_frame_current_output_port,
3684 scm_with_current_error_port -> scm_frame_current_error_port.
3685 Changed all uses.
3686
3687 2004-01-07 Kevin Ryde <user42@zip.com.au>
3688
3689 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3690 Reported by Richard Todd.
3691
3692 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3693 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3694
3695 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3696 traversing the args list, fixes segv if an improper list is given.
3697 Reported by Rouben Rostamian.
3698
3699 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3700
3701 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3702 swap_data on stack, use a 'malloc obj'.
3703
3704 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3705 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3706 scm_i_... since they are internal. Changed all uses.
3707
3708 * dynwind.c (frame_print): Removed, use the default printer.
3709 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3710 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3711 to protect SCM values.
3712
3713 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3714 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3715 Changed all uses.
3716 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3717
3718 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3719
3720 * ports.h, ports.c (scm_with_current_input_port,
3721 scm_with_current_output_port, scm_with_current_error_port): New.
3722
3723 * async.h, async.c (scm_with_blocked_asyncs,
3724 scm_with_unblocked_asyncs): New.
3725
3726 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3727
3728 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3729 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3730 New.
3731 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3732 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3733 function when the outermost wind point has been reached. The
3734 latter is used to copy a continuation stack at the right time.
3735 scm_dowinds remains available.
3736 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3737 tc16_guard, guards_print): Removed.
3738 (scm_internal_dynamic_wind): Reimplemented using frames.
3739
3740 * continuations.c (copy_stack): New, do only the stack copying
3741 part of copy_stack_and_call.
3742 (copy_stack_and_call): Copy the stack after unwinding and before
3743 rewinding.
3744 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3745 copy_stack_and_call.
3746
3747 2004-01-04 Kevin Ryde <user42@zip.com.au>
3748
3749 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3750 can give bad results due to rounding.
3751
3752 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3753 setzone/restorezone protection for DOS.
3754
3755 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3756
3757 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3758 and scm_t_uintmax to be defined in scmconfig.h
3759
3760 2003-12-03 Kevin Ryde <user42@zip.com.au>
3761
3762 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3763
3764 * numbers.c (scm_make_ratio): Check for numerator equal to
3765 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3766 giving integer -1.
3767
3768 * numbers.c (scm_real_part): Return fraction unchanged rather than
3769 converting to flonum.
3770
3771 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3772
3773 * modules.c (module_variable): Fixed (and thus simplified) the
3774 definition of SCM_BOUND_THING_P to reflect the fact that since
3775 after the 1.4 series of guile, obarrays only hold variable
3776 objects.
3777
3778 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3779
3780 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3781
3782 From Paul Jarc:
3783
3784 * read.c (scm_lreadr): Signal an error for invalid escape
3785 sequences in strings. Code cleanups too.
3786
3787 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3788 writing control characters in strings.
3789
3790 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3791
3792 * ports.c (scm_drain_input): Bug fix: only access the port after
3793 checking that it indeed is one.
3794
3795 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3796
3797 * eval.c (s_bad_define): New static identifier.
3798
3799 (m_body): Fixed comment.
3800
3801 (scm_m_define): Don't generate memoized code for definitions that
3802 are not on the top level. As a consequence, no memoized code at
3803 all is generated for definitions any more: Top level definitions
3804 are executed immediately during memoization and internal
3805 definitions are handled separately in m_expand_body.
3806
3807 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3808 definitions. Consequently, there is no unmemoizing code any more
3809 that might modify the environment. Thus, the old scm_unmemocopy
3810 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3811
3812 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3813 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3814 over SCM_NIMP in places, where the argument is known to be part of
3815 a proper list.
3816
3817 2003-11-21 Kevin Ryde <user42@zip.com.au>
3818
3819 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3820 for bignums.
3821
3822 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3823 to share some shifting.
3824
3825 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3826 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3827 since gc does this.
3828
3829 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3830
3831 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3832 structure. Previously, not all cases with a negative denominator
3833 were covered.
3834
3835 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3836 scm_divide2real when forming the fractional part. This allows
3837 "#e1.2" to yield 6/5.
3838
3839 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3840 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3841 fractions were equal to each other regardless of value. Ooops.
3842
3843 * numbers.c (scm_rationalize): Return an inexact result when given
3844 inexact arguments.
3845
3846 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3847 non-numbers.
3848
3849 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3850
3851 Support for exact fractions from Bill Schottstaedt! Thanks!
3852
3853 * print.c (scm_iprin1): Handle fractions.
3854
3855 * objects.h (scm_class_fraction): New.
3856 * objects.c (scm_class_fraction): New.
3857 (scm_class_of): Handle fractions.
3858
3859 * hash.c (scm_hasher): Handle fractions.
3860
3861 * numbers.c: New code for handling fraction all over the place.
3862 (scm_odd_p, scm_even_p): Handle inexact integers.
3863 (scm_rational_p): New function, same as scm_real_p.
3864 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3865 New exact functions that replace the inexact 'dsubr'
3866 implementations.
3867 (scm_numerator, scm_denominator): New.
3868
3869 * numbers.h (SCM_NUMP): Recognize fractions.
3870 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3871 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3872 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3873 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3874 SCM_FRACTION_REDUCED): New.
3875 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3876 New prototypes.
3877 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3878 scm_rational_p): New prototypes.
3879 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3880 scm_i_print_fraction): New prototypes.
3881
3882 * goops.c (create_standard_classes): Create "<fraction>" class.
3883
3884 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3885
3886 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3887 case in the switch, but do nothing for now.
3888
3889 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3890 to doubles when calling 'dsubr' functions.
3891
3892 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3893
3894 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3895
3896 * gen-scmconfig.c (main): remove public definition of
3897 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3898 direct typedef of long_long and ulong_long inside deprecated block
3899 when appropriate.
3900
3901 * deprecated.h: move long_long and ulong_long definitions to
3902 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3903 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3904
3905 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3906
3907 * hash.c (scm_string_hash): New hashing algorithm that takes the
3908 complete string into account.
3909
3910 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3911 is a list. This allows (@ ...) to work with set!.
3912 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3913 SCM_ASSYNT.
3914
3915 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3916 the "-e" option instead of scm_str2symbol. This allows things
3917 like (@ ...) to be specified for the entry point.
3918
3919 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3920
3921 * eval.c (scm_m_letstar): Create memoized code in place to
3922 minimize consing.
3923
3924 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3925
3926 * eval.c (s_splicing): Commented and reformulated.
3927
3928 (lookup_global_symbol, lookup_symbol): New static functions.
3929
3930 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3931
3932 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3933 creating a temporary pair for scm_lookupcar.
3934
3935 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3936 created deprecated wrapper function scm_unmemocar.
3937
3938 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3939 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3940 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3941 undefineds, sym_three_question_marks): Moved around without
3942 modifications.
3943
3944 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3945
3946 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3947
3948 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3949 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3950 No further modifications.
3951
3952 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3953
3954 * eval.c (s_mixed_body_forms): New static identifier.
3955
3956 (canonicalize_define, scm_m_define): The check for a bad
3957 expression is performed in canonicalize_define now.
3958
3959 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3960 static helper functions for m_expand_body.
3961
3962 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3963 expand user defined macros. Fixed handling of the definition/
3964 expression boundary. Fixed handling of definitions grouped with
3965 'begin. Use canonicalize_define to expand definitions.
3966
3967 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3968
3969 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3970 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3971
3972 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3973 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3974 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3975 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3976 New macros from Paul Jarc. Thanks!
3977
3978 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3979 return NULL when the machine type is unknown. Previously,
3980 gc_os_dep.c would refuse to compile.
3981
3982 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3983
3984 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3985 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3986 scm_m_body to m_body.
3987
3988 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3989
3990 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3991 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3992 scm_m_expand_body to m_expand_body and made it static. Added
3993 deprecated wrapper scm_m_expand_body.
3994
3995 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3996 of scm_m_expand_body.
3997
3998 2003-11-09 Kevin Ryde <user42@zip.com.au>
3999
4000 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
4001 argument. Reported by Mike Gran.
4002
4003 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4004
4005 * eval.c (s_missing_body_expression): New static identifier.
4006
4007 (s_body): Removed.
4008
4009 (scm_m_expand_body): Fixed core dump when passing a body with
4010 defines, but without expressions (see additions to syntax.test).
4011 Use ASSERT_SYNTAX to signal syntax errors.
4012
4013 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4014
4015 * eval.c (canonicalize_define): New static helper function.
4016
4017 (memoize_define, canonicalize_define): Extract handling of
4018 function currying to canonicalize_define.
4019
4020 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4021
4022 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4023 Make sure that error checking in debug mode is not worse than in
4024 standard mode.
4025
4026 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4027
4028 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
4029 handled in scm_m_body any more, but rather in scm_m_lambda.
4030
4031 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
4032 scm_m_letrec, scm_m_expand_body): Check for validity is done by
4033 calling functions of scm_m_body.
4034
4035 (scm_m_lambda): Avoid unnecessary consing when creating the
4036 memoized code.
4037
4038 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4039
4040 * eval.c (s_expression): Added comment.
4041
4042 (s_empty_combination, error_unbound_variable): New static
4043 identifiers.
4044
4045 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
4046 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
4047 signal syntax errors.
4048
4049 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
4050 scheme objects.
4051
4052 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4053
4054 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
4055 Grouped together with unmemocopy, without modifications.
4056
4057 (build_binding_list, unmemocopy): Renamed names of list arguments
4058 and variables to reflect the actual order of the list elements.
4059
4060 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4061
4062 * eval.c (s_defun): New static identifier.
4063
4064 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
4065 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4066 when creating the memoized code.
4067
4068 2003-10-19 Kevin Ryde <user42@zip.com.au>
4069
4070 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
4071
4072 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
4073 in accordance with R5RS, which just mpz_get_d doesn't really give.
4074
4075 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4076
4077 * eval.c (s_bad_slot_number): New static identifier.
4078
4079 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
4080 signal syntax errors. Avoid unnecessary consing when creating the
4081 memoized code.
4082
4083 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4084
4085 * eval.c (scm_m_cont, scm_m_at_call_with_values,
4086 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
4087 errors. Avoid unnecessary consing when creating the memoized
4088 code.
4089
4090 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
4091 standard case. Make sure line and file information are copied to
4092 every created expression.
4093
4094 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4095
4096 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
4097 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4098 when creating the memoized code.
4099
4100 (scm_m_atbind): Reversed the order, in which the init expressions
4101 are stored and executed. The order of execution is now equal to
4102 the order in which the initializers of the let-forms are executed.
4103 Use check_bindings and transform_bindings.
4104
4105 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
4106 !SCM_NULLP. Added some comments.
4107
4108 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4109
4110 * eval.c: Sorted include files alphabetically.
4111
4112 (scm_m_begin): Added comment.
4113
4114 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4115 unnecessary consing when creating the memoized code.
4116
4117 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
4118 syntax errors. Be more specific about the kind of error that was
4119 detected.
4120
4121 (scm_m_quote, unmemocopy): As an optimization, vector constants
4122 are now inserted unquoted into the memoized code. During
4123 unmemoization the quotes are added again to provide syntactically
4124 correct code.
4125
4126 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4127
4128 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
4129 scm_m_expand_body, check_bindings): Extracted syntax checking of
4130 bindings to new static function check_bindings.
4131
4132 (scm_m_let, memoize_named_let): Extracted handling of named let to
4133 new static function memoize_named_let.
4134
4135 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
4136 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
4137 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
4138 unnecessary consing when creating the memoized code.
4139
4140 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4141
4142 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4143 static identifiers.
4144
4145 (s_clauses, s_formals, s_duplicate_formals): Removed.
4146
4147 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
4148 specific about the kind of error that was detected. Prepare for
4149 easier integration of changes for separated memoization.
4150
4151 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4152
4153 * eval.c (s_duplicate_binding): New static identifier.
4154
4155 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4156
4157 (scm_m_define): Added comment about how we check for duplicate
4158 formals.
4159
4160 (scm_m_do): Added check for duplicate bindings.
4161
4162 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4163 unnecessary consing when creating the memoized code.
4164
4165 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4166 scm_c_improper_memq to c_improper_memq, since it is not exported.
4167
4168 (transform_bindings): Call scm_c_memq rather than
4169 scm_c_improper_memq.
4170
4171 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4172
4173 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4174
4175 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4176 static identifiers.
4177
4178 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4179 specific about the kind of error that was detected. Avoid use of
4180 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4181 code, this way also making sure that file name, line number
4182 information etc. remain available.
4183
4184 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4185
4186 * eval.c (memoize_as_thunk_prototype): New static function.
4187
4188 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4189 Avoid unnecessary consing when creating the memoized code.
4190
4191 2003-10-12 Kevin Ryde <user42@zip.com.au>
4192
4193 * list.c (scm_append): Track argument number and use in error.
4194
4195 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4196
4197 * eval.c (s_missing_expression, s_bad_variable): New static
4198 identifiers.
4199
4200 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4201 R5RS terminology for the naming of variables. Be more specific
4202 about the kind of error that was detected. Make sure file name,
4203 line number etc. are added to all freshly created expressions.
4204 Avoid unnecessary consing when creating the memoized code.
4205
4206 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4207
4208 * eval.c (s_extra_expression, s_misplaced_else_clause,
4209 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4210
4211 (s_extra_case_clause): Removed.
4212
4213 (scm_m_case, scm_m_cond): If a clause appears after an else
4214 clause, report a misplaced else clause.
4215
4216 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4217 specific about the kind of error that was detected. Handle bound
4218 'else and '=>. Avoid unnecessary consing when creating the
4219 memoized code.
4220
4221 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4222 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4223 syntactic keyword '=>.
4224
4225 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4226
4227 * eval.c (scm_m_case): Allow empty lists of case labels.
4228
4229 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4230
4231 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4232
4233 * print.c (scm_isymnames): Add names for the new memoizer codes.
4234
4235 * eval.c (s_missing_clauses, s_bad_case_clause,
4236 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4237 literal_p): New static identifiers.
4238
4239 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4240 specific about the kind of error that was detected. Check for
4241 duplicate case labels. Handle bound 'else. Avoid unnecessary
4242 consing when creating the memoized code.
4243
4244 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4245 the syntactic keyword 'else.
4246
4247 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4248
4249 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4250 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4251
4252 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4253 unnecessary consing when creating the memoized code.
4254
4255 2003-10-09 Kevin Ryde <user42@zip.com.au>
4256
4257 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4258 cast gives for values bigger than a long, or for nan or inf.
4259
4260 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4261
4262 * smob.h (scm_make_smob_type): Made the declaration match the
4263 definition.
4264
4265 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4266
4267 * goops.c, objects.h, smob.c, smob.h: Make type names char
4268 const * instead of char *. Thanks to Paul Jarc!
4269
4270 2003-10-02 Kevin Ryde <user42@zip.com.au>
4271
4272 * strports.c (scm_call_with_output_string): scm_get_output_string
4273 rather than scm_strport_to_string, so as to guard against the port
4274 having been closed by the called procedure. Reported by Nic Ferrier.
4275
4276 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4277
4278 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4279
4280 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4281 tags.h to deprecated.h.
4282
4283 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4284
4285 This set of patches introduces a new tc7 code scm_tc7_number for
4286 numbers. Bignums, reals and complex numbers are turned from smobs
4287 into subtypes of scm_tc7_number.
4288
4289 * tags.h (scm_tc7_number): New.
4290
4291 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4292 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4293 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4294 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4295 (scm_class_of), print.c (scm_iprin1), smob.c
4296 (scm_smob_prehistory): Don't handle bignums, reals and complex
4297 numbers as subtypes of scm_tc7_smob any more.
4298
4299 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4300 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4301
4302 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4303
4304 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4305 sizeof (scm_t_complex) to determine the memory size of the
4306 malloc'd area for complex numbers.
4307
4308 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4309
4310 * numbers.c (scm_bigequal): Fixed.
4311
4312 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4313
4314 * stime.c (scm_current_time): 'time' does not set errno so don't
4315 use SCM_SYSERROR for reporting errors.
4316
4317 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4318
4319 This set of patches eliminates the dependency between the
4320 implementation of evaluator specific memoization codes and special
4321 constants like #f, '() etc. ('flags'), which are not evaluator
4322 specific. The goal is to remove definitions of evaluator
4323 memoization codes completely from the public interface. This will
4324 make it possible to experiment more freely with optimizations of
4325 guile's internal representation of memoized code.
4326
4327 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4328
4329 * print.c (iflagnames): New array, holding the printed names of
4330 guile's special constants ('flags').
4331
4332 (scm_isymnames): Now holds only the printed names of the
4333 memoization codes.
4334
4335 (scm_iprin1): Separate the handling of memoization codes and
4336 guile's special constants.
4337
4338 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4339 SCM_IFLAGNUM): new
4340
4341 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4342 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4343 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4344 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4345 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4346 values.
4347
4348 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4349
4350 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4351 tc9 macros and scm_tc9_flag.
4352
4353 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4354
4355 * posix.c (scm_setgroups): Check that the gid list is not too
4356 long. Thanks to Paul Jarc!
4357
4358 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4359
4360 * tags.h: Reduced the number of short instructions from 14 to 13.
4361 The typecode of the former 14th short instruction is now used to
4362 represent long instructions. Changed some comments to reflect
4363 this fact.
4364
4365 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4366 previously used by SCM_IM_DEFINE.
4367
4368 (SCM_IM_DEFINE): Turned into a long instruction.
4369
4370 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4371 instruction.
4372
4373 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4374 code that is separate from all instructions, one level of dispatch
4375 for long instructions can be eliminated.
4376
4377 * print.c (scm_isymnames): Removed some commented code.
4378
4379 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4380
4381 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4382 compiler on IA64.
4383
4384 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4385
4386 * modules.c (scm_module_reverse_lookup): Check that the obarray
4387 really is a hashtable and do nothing if not.
4388
4389 * inline.h: Use "extern inline" only with GCC. Use "static
4390 inline" else.
4391
4392 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4393
4394 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4395 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4396
4397 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4398 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4399 deprecated.h.
4400
4401 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4402
4403 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4404 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4405
4406 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4407 0.0==some_expression to some_expression==0.0. The latter is
4408 better readable. The former is preferred by some people, since it
4409 leads to a compiler error when confusing == with =. However, when
4410 using gcc, a warning will be issued if in an if-statement an
4411 assigment appears. Since many Guile developers are using gcc,
4412 such errors will not remain unnoticed anyway. We can therefore
4413 focus on better readability.
4414
4415 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4416
4417 * tags.h: Added description of Guile's type system. Removed some
4418 old and misleading comments.
4419
4420 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4421
4422 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4423 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4424
4425 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4426
4427 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4428
4429 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4430 respective SLOPPY macro.
4431
4432 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4433
4434 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4435 type string, not SCM_TYP7S.
4436
4437 2003-09-03 Kevin Ryde <user42@zip.com.au>
4438
4439 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4440 2s-complement.
4441
4442 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4443 current timezone requiring SCM_DEFER_INTS.
4444
4445 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4446
4447 * script.c (scm_compile_shell_switches): Make -s switch optional
4448 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4449 VanDevender for the patch!)
4450
4451 2003-08-30 Kevin Ryde <user42@zip.com.au>
4452
4453 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4454 and to have non-integer types rejected as per other logical funcs.
4455
4456 2003-08-28 Kevin Ryde <user42@zip.com.au>
4457
4458 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4459
4460 2003-08-23 Kevin Ryde <user42@zip.com.au>
4461
4462 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4463 thread safe, and could take a long time too.
4464
4465 2003-08-22 Kevin Ryde <user42@zip.com.au>
4466
4467 * numbers.c (scm_difference): Correction to bignum - negative inum.
4468
4469 2003-08-14 Kevin Ryde <user42@zip.com.au>
4470
4471 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4472 [__GNUC__]: Use volatile asm macros rather than a function call.
4473 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4474 macros while defining functions.
4475
4476 * simpos.c (getenv): Use <stdlib.h> for prototype.
4477 (scm_system): In docstring, refer to status:exit-val rather than
4478 "functions above".
4479
4480 2003-08-09 Kevin Ryde <user42@zip.com.au>
4481
4482 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4483 list set by source-properties! rather than an SRCPROPS object,
4484
4485 2003-07-29 Kevin Ryde <user42@zip.com.au>
4486
4487 * properties.c (scm_primitive_property_ref): In docstring, note
4488 parameters to not-found-proc, use hyphens rather than underscores for
4489 that parameter name.
4490 (scm_primitive_property_set_x): In docstring, VAL is the value
4491 parameter not CODE.
4492
4493 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4494
4495 * print.c (scm_print_symbol_name): handle more weird characters by
4496 escaping the symbol name properly. Thanks to Paul Jarc!
4497
4498 * posix.h (scm_setgroups): New prototype.
4499 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4500 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4501 Don't use SCM_WRITABLE_VELTS.
4502
4503 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4504 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4505 Matthias Koeppe!
4506
4507 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4508 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4509 compiles when SCM_C_INLINE is undefined.
4510
4511 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4512
4513 * __scm.h: Reformulated the architecture and compiler properties
4514 in terms of properties of scm_t_bits and SCM variables rather than
4515 in terms of c standard types. This is since it is not known which
4516 of the standard types scm_t_bits and SCM variables will be defined
4517 to.
4518
4519 2003-07-24 Kevin Ryde <user42@zip.com.au>
4520
4521 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4522 and real.
4523
4524 2003-07-18 Kevin Ryde <user42@zip.com.au>
4525
4526 * numbers.c (scm_product): In complex * bignum, correction to
4527 REAL/IMAG fetch, x is the complex, not y.
4528
4529 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4530
4531 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4532 scm_inf_p test as Scheme values.
4533 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4534 and a positive inum.
4535 Use GNU indentation style.
4536
4537 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4538
4539 * values.c (scm_values): Build lists of length 1 by using
4540 scm_list_1 instead of using scm_cons.
4541
4542 2003-07-10 Kevin Ryde <user42@zip.com.au>
4543
4544 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4545 * list.c (scm_list_n): Ditto.
4546
4547 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4548
4549 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4550
4551 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4552 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4553 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4554 the other using intptr_t.
4555
4556 2003-07-08 Kevin Ryde <user42@zip.com.au>
4557
4558 * numbers.c (scm_make_polar): Use sincos, when available.
4559 (scm_magnitude): Use hypot.
4560
4561 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4562 @footnote since it doesn't go through to guile-procedures.txt.
4563
4564 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4565 outside @var to quieten makeinfo, and use @code.
4566
4567 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4568
4569 * gc-malloc.c (decrease_mtrigger): new function
4570 (increase_mtrigger): new function, separate debug registering and
4571 mtrigger administration.
4572 (scm_gc_realloc): bugfix: do mtrigger administration before the
4573 actual realloc, for the realloc might invalidate a GC-d segment of
4574 memory. Thanks to Sam Hocevar for pointing this out.
4575 (scm_gc_realloc): use scm_malloc_reregister instead of
4576 unregistering and registering in sequence.
4577
4578 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4579
4580 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4581
4582 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4583
4584 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4585 clauses.
4586
4587 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4588
4589 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4590 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4591 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4592 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4593 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4594 the release_1_6 branch.
4595
4596 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4597
4598 * continuations.c: Redeclaration of getcontext() via the
4599 __asm__ ("getcontext") directive.
4600
4601 * continuations.h: Include <ucontext.h> instead of
4602 <sys/ucontext.h>.
4603
4604 2003-06-21 Kevin Ryde <user42@zip.com.au>
4605
4606 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4607 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4608 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4609 available.
4610 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4611 (isfinite): Remove, conflicts with C99 isfinite().
4612
4613 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4614
4615 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4616 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4617 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4618 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4619 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4620 the release_1_6 branch.
4621
4622 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4623
4624 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4625 to be functions instead of macros.
4626
4627 * threads.c: Conditionalized inclusion of <sys/time.h> and
4628 <unistd.h>.
4629 (scm_getspecific, scm_setspecific): Made these two function
4630 real part of the API.
4631
4632 * posix.c (s_scm_putenv): Added some code to make a
4633 (putenv "FOO="), i.e. setting an empty string, work also on
4634 Win32 systems. Thanks to Kevin Ryde for the proposal.
4635
4636 2003-06-12 Kevin Ryde <user42@zip.com.au>
4637
4638 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4639 freebsd to comment about need to use unsetenv.
4640
4641 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4642
4643 * ports.c (scm_peek_char): Safe the column of the port around the
4644 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4645
4646 2003-06-07 Kevin Ryde <user42@zip.com.au>
4647
4648 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4649 and friends required by scm_t_bits setups.
4650
4651 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4652
4653 * tags.h (scm_tc2_int): Added.
4654
4655 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4656 scm_tc2_int.
4657
4658 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4659 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4660
4661 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4662
4663 * eval.c: Partially undid my patch from 2003-05-31. This patch
4664 caused the segfault referenced in the previous changelog entry.
4665
4666 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4667
4668 * tags.h: Fixed comment about the immediate type code layout.
4669
4670 * eval.c: Fixed handling of non-special instructions. Without
4671 this patch, guile will segfault on (#\0) and similar instructions.
4672
4673 2003-06-05 Kevin Ryde <user42@zip.com.au>
4674
4675 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4676 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4677
4678 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4679 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4680
4681 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4682
4683 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4684 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4685 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4686 generalized it to apply not only to C level functions but also to
4687 scheme level functions.
4688
4689 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4690 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4691 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4692 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4693 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4694 respectively.
4695
4696 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4697 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4698 eval.h into eval.c and a copy is placed into deprecated.h.
4699
4700 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4701 into eval.c. This definition was not part of the API in any
4702 officially released version of guile and thus does not need to go
4703 through a phase of deprecation.
4704
4705 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4706
4707 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4708 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4709 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4710 definitions are make static and renamed from scm_s_xxx to s_xxx.
4711 In deprecated.c the original definitions are copied.
4712
4713 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4714 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4715 eval.h into eval.c and a copy (slightly modified to work in user
4716 code) is placed into deprecated.h.
4717
4718 * eval.c: Use the local static s_xxx definitions instead of the
4719 scm_s_xxx definitions throughout.
4720
4721 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4722
4723 This set of patches separates the representation of the cxr family
4724 of functions (car, cdr etc.) from the dsubr family of functions
4725 (i. e. functions that take a double precision floating point
4726 argument). Further, the algorithm for handling the cxr function
4727 is improved.
4728
4729 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4730 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4731 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4732 cosh, tanh), objects.c (scm_class_of), procprop.c
4733 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4734 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4735 typecode for the dsubr family of functions.
4736
4737 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4738 ramap_dsubr.
4739
4740 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4741 (scm_init_pairs): Make use of the (now usable) second cell element
4742 of a scm_tc7_cxr function to implement the cxr family of functions
4743 more efficiently.
4744
4745 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4746
4747 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4748 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4749 end of an if-else-if-sequence of checks.
4750
4751 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4752
4753 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4754 execution. Generalize apply_closure to apply_proc and use that
4755 for call-with-values.
4756
4757 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4758
4759 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4760 a non closure.
4761
4762 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4763
4764 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4765 appropriately for mingw32 hosts.
4766
4767 * numbers.h: Defining copysign(), isnan() and finite() to
4768 be prefixed by a single '_' for mingw32 hosts.
4769
4770 2003-05-30 Kevin Ryde <user42@zip.com.au>
4771
4772 * numbers.c (z_negative_one): New variable.
4773 (scm_init_numbers): Initialize it.
4774 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4775
4776 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4777
4778 * win32-dirent.c: Use malloc() instead of scm_malloc().
4779
4780 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4781 warning.
4782
4783 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4784 mingw32 build.
4785
4786 * modules.c (s_scm_module_import_interface): Renamed local
4787 variable interface to _interface. Seems like 'interface'
4788 is a special compiler directive for the mingw32 compiler.
4789
4790 * mkstemp.c: Provide prototype to avoid compiler warning.
4791
4792 * load.c (s_scm_search_path): Fixed absolute and relative
4793 path detections for native Windows platforms.
4794
4795 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4796 to build on mingw32).
4797
4798 * gc-freelist.c ("s_scm_map_free_list",
4799 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4800
4801 * fports.c (fport_fill_input): Disable use of
4802 fport_wait_for_input() on Win32 platforms.
4803
4804 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4805
4806 * Makefile.am: Modified some rules for cross compiling.
4807
4808 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4809
4810 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4811 proper function object and the correct number of arguments are now
4812 performed in the application part of SCM_CEVAL.
4813
4814 (scm_badformalsp): Removed.
4815
4816 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4817
4818 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4819
4820 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4821
4822 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4823 always being false by inserting preprocessor conditional. (Thanks
4824 to Bruce Korb.)
4825
4826 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4827 (void *) in order to avoid an aliasing warning; thanks to Bruce
4828 Korb.)
4829
4830 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4831
4832 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4833 SCM_STACK_PTR.
4834
4835 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4836 thread->base --> t->base.
4837
4838 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4839
4840 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4841
4842 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4843 scm_variable_set_name_hint, scm_builtin_variable,
4844 scm_internal_with_fluids, scm_make_gsubr,
4845 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4846 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4847 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4848 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4849 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4850 scm_make_subr_with_generic, scm_make_subr_opt,
4851 scm_call_catching_errors, scm_make_smob_type_mfpe,
4852 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4853 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4854 branch. Some have been slightly rewritten.
4855 (scm_i_object_chars, scm_i_object_length): New, to support
4856 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4857
4858 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4859
4860 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4861 names and inits in the memoized code of do.
4862
4863 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4864
4865 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4866 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4867 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4868 a compilation error if error-on-warning is enabled).
4869
4870 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4871
4872 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4873 removes preprocessor directives from the snarfage that might
4874 otherwise confuse us. These directives appear when compiling with
4875 "-g3", for example.
4876
4877 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4878
4879 * ChangeLog: add my surname
4880
4881 * srcprop.c (scm_finish_srcprop): use
4882 scm_gc_register_collectable_memory()
4883 (scm_make_srcprops): idem.
4884
4885 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4886
4887 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4888 wrap-around for scm_mtrigger
4889 (scm_gc_register_collectable_memory): abort on overflowing
4890 scm_mallocated().
4891
4892 2003-05-13 Kevin Ryde <user42@zip.com.au>
4893
4894 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4895 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4896
4897 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4898
4899 * backtrace.c (scm_display_error_message): Introduced fancy
4900 printing with max level 7 and length 10. (Purpose: avoid printing
4901 gigantic objects in error messages.)
4902
4903 * print.c, print.h (scm_i_port_with_print_state): New function.
4904
4905 * print.c (scm_iprin1, scm_printer_apply,
4906 scm_port_with_print_state): Use scm_i_port_with_print_state.
4907 (scm_simple_format): Modified not to destroy print states.
4908 (print_state_mutex): New mutex.
4909 (scm_make_print_state, scm_free_print_state, scm_prin1):
4910 Lock/unlock print_state_mutex.
4911
4912 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4913 Use current names in definitions.
4914
4915 2003-05-10 Kevin Ryde <user42@zip.com.au>
4916
4917 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4918
4919 * numbers.c (scm_integer_length): On negative bignums, adjust
4920 mpz_sizeinbase to account for it looking at absolute value where we
4921 want ones-complement.
4922
4923 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4924 since we're only using the ulong return value, and x might not fit.
4925
4926 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4927
4928 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4929 read. This will allow to make the definition in read.c static.
4930
4931 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4932
4933 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4934 from evalext to eval. This will allow to make some of the
4935 definitions in eval.c static.
4936
4937 2003-05-06 Kevin Ryde <user42@zip.com.au>
4938
4939 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4940 (scm_logcount): Use mpz_com, not mpz_neg.
4941
4942 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4943
4944 The purpose of this patch is to make guile's internal memoizers
4945 distinguishable from memoizing macros created on the scheme level
4946 or from user provided primitive memoizing macros. The reason is,
4947 that the internal memoizers are the only ones that are allowed to
4948 transform their scheme input into memoizer byte code, while all
4949 other memoizing macros may only transform scheme code into new
4950 scheme code.
4951
4952 To achieve this, a new macro type 'builtin-macro!' is introduced.
4953 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4954 this will change when the memoizer and executor are separated.
4955
4956 * macros.[ch] (scm_i_makbimacro): New.
4957
4958 * macros.h (SCM_BUILTIN_MACRO_P): New.
4959
4960 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4961
4962 * eval.c, goops.c: All of guile's primitive memoizing macros are
4963 primitive builtin-macros now.
4964
4965 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4966 builtin-macros are handled equally to memoizing macros.
4967
4968 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4969
4970 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4971 work around a bug in GCC 2.95.2 but is now a bug in itself.
4972
4973 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4974
4975 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4976 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4977 scm_tcs_symbols): New.
4978
4979 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4980
4981 * deprecated.h, deprecated.c (scm_protect_object,
4982 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4983 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4984 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4985 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4986 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4987 scm_ptob_descriptor, scm_port_rw_active,
4988 scm_close_all_ports_except): New.
4989
4990 * ports.c (scm_c_port_for_each): New function, mostly copied from
4991 scm_port_for_each.
4992 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4993 * ports.h (scm_c_port_for_each): New prototype.
4994
4995 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4996
4997 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4998 macro was introduced in anticipation of GOOPS method compilation
4999 code.)
5000
5001 * goops.c: Removed binding of @dispatch.
5002
5003 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5004
5005 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
5006 instructions that bind the macros on the scheme level back to
5007 goops.c in order to make sure again that the bindings go into the
5008 (oop goops) module and are not visible from the outside.
5009
5010 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5011
5012 * eval.c: Non functional change: Separated R5RS and non-R5RS
5013 macros into different sections of the file and ordered the
5014 memoizers alphabetically.
5015
5016 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5017
5018 * eval.c (scm_ilookup): Rewritten to improve readability.
5019
5020 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5021
5022 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5023 Partially reverted patch from 2003-04-23 in oder to find a better
5024 compromise between readability and debuggability.
5025
5026 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5027
5028 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
5029 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
5030 definitions of the special goops memoizers from goops.[ch] to
5031 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
5032 throughout guile.
5033
5034 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5035
5036 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
5037
5038 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
5039
5040 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
5041
5042 * ioext.c (scm_fdes_to_ports): Ditto.
5043
5044 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
5045 lock/unlock scm_i_port_table_mutex.
5046
5047 * strports.c (scm_mkstrport): Ditto.
5048
5049 * ports.c (scm_void_port, scm_port_for_each): Ditto.
5050
5051 * fports.c (scm_fdes_to_port): Ditto.
5052
5053 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5054
5055 This set of patches contains no functional changes, only debatable
5056 minor stylistic ones. Still, in order to prepare a patch between
5057 my local copy and the CVS version, I decided to submit the changes
5058 below. Then, the patch will hopefully only contain relevant
5059 modifications :-)
5060
5061 * eval.c (iqq): Added const specifier.
5062
5063 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5064 Use NULL instead of 0 to indicate that a pointer is returned.
5065 Removed some misleading 'fall through' comments.
5066
5067 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5068 Split up long expressions into smaller ones to be more debugging
5069 friendly.
5070
5071 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5072
5073 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
5074 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
5075 rather than casting to SCM.
5076
5077 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5078
5079 * sort.c, pairs.h: Removed unnecessary includes.
5080
5081 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5082
5083 * sort.c: Replaced hand-made trampline code by the new official
5084 mechanism from eval.c. This fixes a segfault in the new test file
5085 sort.test.
5086
5087 (quicksort, compare_function, scm_restricted_vector_sort_x,
5088 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
5089 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
5090 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
5091 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
5092 eval.c.
5093
5094 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
5095 cmp_fun_t): Removed.
5096
5097 (compare_function): Added.
5098
5099 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
5100 arithmetics with index arithmetics. Changed quicksort to work on
5101 an array of SCM values instead of an array of characters. Avoid
5102 bytewise copying of SCM elements. Avoid allocating memory on the
5103 stack with alloca. Fixed some comments.
5104
5105 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5106
5107 * eval.c (EXTEND_ENV): Eliminated.
5108
5109 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
5110 EXTEND_ENV.
5111
5112 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5113
5114 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
5115
5116 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
5117 compiling with SCM_DEBUG==1 by moving definition behind prototype.
5118
5119 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
5120 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
5121 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
5122 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
5123 functions such that they check if the object is a non-immediate.
5124 Further, renamed identifiers to use the scm_dbg_ prefix and made
5125 their inclusion into the lib dependent of the
5126 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
5127
5128 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5129
5130 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
5131 debug option.
5132
5133 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5134
5135 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
5136 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
5137 any calls to SCM_NCONSP any more.
5138
5139 * unif.c (l2ra): Eliminate redundant check.
5140
5141 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5142
5143 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
5144 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
5145 SCM_NNULLP. Now, guile itself does not include any calls to
5146 SCM_NNULLP any more.
5147
5148 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5149
5150 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
5151 scm_copy_tree): Place assignment expressions which are part of
5152 other expressions into an expression of their own.
5153
5154 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5155
5156 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5157 compare SCM values with !=.
5158
5159 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5160
5161 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5162 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5163 and definition of the memoizer for the generalized set! macro from
5164 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5165 define the macro object.
5166
5167 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5168 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5169 eval.c, it is made static and renamed to s_set_x.
5170
5171 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5172 over SCM_N<foo>.
5173
5174 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5175
5176 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5177 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5178 to undefineds and registered the object as a permanent object.
5179
5180 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5181 static in eval.c, renamed it to f_apply and registered the object
5182 as a permanent object.
5183
5184 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5185
5186 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5187 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5188
5189 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5190
5191 * numbers.c (scm_logtest): Fixed argument bug in the call to
5192 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5193
5194 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5195
5196 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5197 type errors that showed up when compiling with SCM_DEBUG defined.
5198
5199 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5200
5201 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5202 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5203 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5204 fix compile errors with --disable-deprecated.
5205
5206 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5207
5208 * numbers.c (scm_integer_expt): fix case where we were declaring
5209 vars in the middle of a statement block. Thanks to Thamer
5210 Al-Harbash.
5211
5212 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5213
5214 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5215 change.
5216
5217 * eq.c (scm_eqv_p): Turned into a primitive generic.
5218
5219 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5220
5221 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5222 Thanks to Boyd Gerber.
5223 Added check for __arm__ in addition to arm for LINUX and copied
5224 __s390__ defines from upstream libgc. Thanks to James Treacy for
5225 reporting the problems.
5226
5227 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5228
5229 * socket.c: use SCM_CHAR_BIT.
5230
5231 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5232
5233 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5234
5235 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5236
5237 * feature.c (scm_init_feature): Always add threads feature.
5238
5239 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5240
5241 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5242 scm_at_assert_bound_ref. (We don't want the unbound check. See
5243 oop/goops/active-slot.scm.)
5244
5245 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5246
5247 * tags.h: scm_t_intptr should have been intptr_t.
5248
5249 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5250
5251 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5252 test. Instead use
5253 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5254 as gc_os_dep.c suggests is appropriate.
5255
5256 * goops.c (prep_hashsets): make static to match prototype.
5257 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5258 Chin.
5259
5260 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5261 Albert Chin.
5262
5263 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5264 Klausner.
5265
5266 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5267
5268 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5269 indicated through extra fields in getters-n-setters.
5270 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5271 (Thanks to Andy Wingo.)
5272
5273 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5274
5275 * gc-segment.c: add comment
5276
5277 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5278
5279 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5280 clash.
5281
5282 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5283 and add regression test to standalone/.
5284
5285 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5286
5287 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5288 Thanks to Dale P. Smith.
5289
5290 * random.c: #include gmp.h.
5291 (scm_c_random_bignum): normalize result on return.
5292
5293 * init.c: #include gmp.h.
5294
5295 * numbers.h: remove the gmp.h #include (not needed now).
5296
5297 * posix.h: change occurences of "id" to something else so we don't
5298 cause trouble when included via objective-c (can't hurt, might
5299 help). Still have usage in debug.h, though.
5300
5301 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5302
5303 * random.c (scm_c_random_bignum): Don't generate a random number
5304 equal to m (the second argument of scm_c_random_bignum); only
5305 generate numbers in the range 0 <= r < m.
5306 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5307 scm_var_random_state.
5308
5309 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5310 clause.
5311
5312 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5313
5314 * modules.c (scm_module_import_interface): move declaration of
5315 uses before any code.
5316
5317 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5318
5319 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5320 not top_srcdir.
5321
5322 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5323 processing it in order to avoid an infinite loop.
5324
5325 * print.c (scm_prin1): Remember old state of pstate->writingp.
5326
5327 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5328
5329 * Changed license terms to the plain LGPL thru-out.
5330
5331 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5332
5333 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5334 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5335 rewrite to handle GMP bignums.
5336
5337
5338 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5339
5340 * ports.c (scm_getc): minor tweak.
5341
5342 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5343 rewrite to handle GMP bignums.
5344
5345 * numbers.c: rewrite *many* functions to handle GMP bignums.
5346
5347 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5348 handle GMP bignums.
5349
5350 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5351
5352 * init.c (check_config): remove SCM_BIGDIG conditionals.
5353 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5354
5355 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5356
5357 * eval.c: remove SCM_BIGDIG conditionals.
5358
5359 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5360
5361 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5362
5363 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5364 to Kevin Ryde.)
5365
5366 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5367
5368 * threads.h: fix various preprocessor usages of new public
5369 symbols to expect 0 or 1 values rather than 1 or undefined.
5370 i.e. change #ifdef to #if, etc.
5371
5372 * threads.c: fix various preprocessor usages of new public
5373 symbols to expect 0 or 1 values rather than 1 or undefined.
5374 i.e. change #ifdef to #if, etc.
5375
5376 * tags.h: fix various preprocessor usages of new public
5377 symbols to expect 0 or 1 values rather than 1 or undefined.
5378 i.e. change #ifdef to #if, etc.
5379
5380 * stacks.c: fix various preprocessor usages of new public
5381 symbols to expect 0 or 1 values rather than 1 or undefined.
5382 i.e. change #ifdef to #if, etc.
5383
5384 * stackchk.h: fix various preprocessor usages of new public
5385 symbols to expect 0 or 1 values rather than 1 or undefined.
5386 i.e. change #ifdef to #if, etc.
5387
5388 * stackchk.c: fix various preprocessor usages of new public
5389 symbols to expect 0 or 1 values rather than 1 or undefined.
5390 i.e. change #ifdef to #if, etc.
5391
5392 * sort.c: fix various preprocessor usages of new public
5393 symbols to expect 0 or 1 values rather than 1 or undefined.
5394 i.e. change #ifdef to #if, etc.
5395
5396 * read.c: fix various preprocessor usages of new public
5397 symbols to expect 0 or 1 values rather than 1 or undefined.
5398 i.e. change #ifdef to #if, etc.
5399
5400 * random.c: fix various preprocessor usages of new public
5401 symbols to expect 0 or 1 values rather than 1 or undefined.
5402 i.e. change #ifdef to #if, etc.
5403
5404 * print.c: fix various preprocessor usages of new public
5405 symbols to expect 0 or 1 values rather than 1 or undefined.
5406 i.e. change #ifdef to #if, etc.
5407
5408 * objects.c: fix various preprocessor usages of new public
5409 symbols to expect 0 or 1 values rather than 1 or undefined.
5410 i.e. change #ifdef to #if, etc.
5411
5412 * numbers.h: fix various preprocessor usages of new public
5413 symbols to expect 0 or 1 values rather than 1 or undefined.
5414 i.e. change #ifdef to #if, etc.
5415
5416 * null-threads.c: fix various preprocessor usages of new public
5417 symbols to expect 0 or 1 values rather than 1 or undefined.
5418 i.e. change #ifdef to #if, etc.
5419
5420 * lang.c: fix various preprocessor usages of new public
5421 symbols to expect 0 or 1 values rather than 1 or undefined.
5422 i.e. change #ifdef to #if, etc.
5423
5424 * lang.h: fix various preprocessor usages of new public
5425 symbols to expect 0 or 1 values rather than 1 or undefined.
5426 i.e. change #ifdef to #if, etc.
5427
5428 * iselect.h: fix various preprocessor usages of new public
5429 symbols to expect 0 or 1 values rather than 1 or undefined.
5430 i.e. change #ifdef to #if, etc.
5431
5432 * init.c: fix various preprocessor usages of new public
5433 symbols to expect 0 or 1 values rather than 1 or undefined.
5434 i.e. change #ifdef to #if, etc.
5435
5436 * gh_data.c: fix various preprocessor usages of new public
5437 symbols to expect 0 or 1 values rather than 1 or undefined.
5438 i.e. change #ifdef to #if, etc.
5439
5440 * gh.h: fix various preprocessor usages of new public
5441 symbols to expect 0 or 1 values rather than 1 or undefined.
5442 i.e. change #ifdef to #if, etc.
5443
5444 * gen-scmconfig.c: change most new public symbols to be defined to
5445 0 or 1 rather than being either 1 or undefined.
5446
5447 * gc_os_dep.c: fix various preprocessor usages of new public
5448 symbols to expect 0 or 1 values rather than 1 or undefined.
5449 i.e. change #ifdef to #if, etc.
5450 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5451
5452 * gc.h: fix various preprocessor usages of new public
5453 symbols to expect 0 or 1 values rather than 1 or undefined.
5454 i.e. change #ifdef to #if, etc.
5455
5456 * gc-card.c: fix various preprocessor usages of new public
5457 symbols to expect 0 or 1 values rather than 1 or undefined.
5458 i.e. change #ifdef to #if, etc.
5459
5460 * gc-mark.c: fix various preprocessor usages of new public
5461 symbols to expect 0 or 1 values rather than 1 or undefined.
5462 i.e. change #ifdef to #if, etc.
5463
5464 * feature.c: fix various preprocessor usages of new public
5465 symbols to expect 0 or 1 values rather than 1 or undefined.
5466 i.e. change #ifdef to #if, etc.
5467
5468 * evalext.c: fix various preprocessor usages of new public
5469 symbols to expect 0 or 1 values rather than 1 or undefined.
5470 i.e. change #ifdef to #if, etc.
5471
5472 * eval.h: fix various preprocessor usages of new public
5473 symbols to expect 0 or 1 values rather than 1 or undefined.
5474 i.e. change #ifdef to #if, etc.
5475
5476 * eval.c: fix various preprocessor usages of new public
5477 symbols to expect 0 or 1 values rather than 1 or undefined.
5478 i.e. change #ifdef to #if, etc.
5479
5480 * eq.c: fix various preprocessor usages of new public
5481 symbols to expect 0 or 1 values rather than 1 or undefined.
5482 i.e. change #ifdef to #if, etc.
5483
5484 * coop.c: fix various preprocessor usages of new public
5485 symbols to expect 0 or 1 values rather than 1 or undefined.
5486 i.e. change #ifdef to #if, etc.
5487
5488 * coop-threads.c: fix various preprocessor usages of new public
5489 symbols to expect 0 or 1 values rather than 1 or undefined.
5490 i.e. change #ifdef to #if, etc.
5491
5492 * coop-pthreads.c: fix various preprocessor usages of new public
5493 symbols to expect 0 or 1 values rather than 1 or undefined.
5494 i.e. change #ifdef to #if, etc.
5495
5496 * coop-defs.h: fix various preprocessor usages of new public
5497 symbols to expect 0 or 1 values rather than 1 or undefined.
5498 i.e. change #ifdef to #if, etc.
5499
5500 * convert.i.c: fix various preprocessor usages of new public
5501 symbols to expect 0 or 1 values rather than 1 or undefined.
5502 i.e. change #ifdef to #if, etc.
5503
5504 * continuations.c: fix various preprocessor usages of new public
5505 symbols to expect 0 or 1 values rather than 1 or undefined.
5506 i.e. change #ifdef to #if, etc.
5507
5508 * _scm.h: fix various preprocessor usages of new public symbols to
5509 expect 0 or 1 values rather than 1 or undefined. i.e. change
5510 #ifdef to #if, etc.
5511
5512 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5513
5514 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5515
5516 * deprecated.c, deprecated.h: New files, to collect deprecated
5517 things in one place.
5518 * Makefile.am: Added them in all the right places.
5519
5520 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5521 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5522 builds work.
5523 (DOT_X_FILES): Removed "iselect.x".
5524 (DOT_DOC_FILES): Removed "iselect.doc".
5525
5526 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5527
5528 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5529 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5530
5531 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5532
5533 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5534
5535 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5536 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5537
5538 * threads.h: replace usage of struct timespect with
5539 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5540 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5541 favor of scm_t_timespec from scmconfig.h.
5542
5543 * threads.c: move libguile/_scm.h include to the top so we pick up
5544 any critical defines like _GNU_SOURCE early. Replace usage of
5545 struct timespect with scm_t_timespec. Replace usage of
5546 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5547 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5548
5549 * threads-plugin.h: replace usage of struct timespect with
5550 scm_t_timespec.
5551
5552 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5553 usage of struct timespect with scm_t_timespec.
5554
5555 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5556 HAVE_INTTYPES_H handling to scmconfig.h. #include
5557 "libguile/__scm.h". Rework handling for scm_t_bits,
5558 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5559 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5560 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5561 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5562 SCM_HAVE_ARRAYS.
5563
5564 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5565
5566 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5567
5568 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5569
5570 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5571
5572 * stime.h: move handling of time related headers to scmconfig.h.
5573
5574 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5575
5576 * stacks.c: replace usage of STACK_GROWS_UP with
5577 SCM_STACK_GROWS_UP.
5578
5579 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5580 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5581
5582 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5583 of uint32 and HAVE_UINT_32 with scm_t_int32.
5584
5585 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5586
5587 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5588
5589 * script.c: #include <config.h> if HAVE_CONFIG_H.
5590
5591 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5592
5593 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5594
5595 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5596
5597 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5598
5599 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5600
5601 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5602
5603 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5604 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5605 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5606 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5607
5608 * ramap.c: replace usage of HAVE_LONG_LONGS with
5609 "SCM_SIZEOF_LONG_LONG != 0".
5610
5611 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5612 "libguile/scmconfig.h".
5613
5614 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5615
5616 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5617 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5618
5619 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5620
5621 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5622
5623 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5624
5625 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5626 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5627 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5628 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5629 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5630 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5631 "SCM_SIZEOF_LONG_LONG != 0".
5632
5633 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5634 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5635 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5636 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5637
5638 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5639
5640 * null-threads.h: replace usage of struct timespect with
5641 scm_t_timespec.
5642
5643 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5644
5645 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5646 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5647 scm_t_uint64 and rename usages.
5648
5649 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5650
5651 * load.c: #include <config.h> if HAVE_CONFIG_H.
5652
5653 * iselect.h: move handling of time related headers to scmconfig.h.
5654 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5655 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5656 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5657
5658 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5659 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5660 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5661
5662 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5663
5664 * inline.h: #include "libguile/__scm.h" at the top. Change code
5665 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5666 what to do instead of creating a new public #define. Rename usage
5667 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5668 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5669 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5670
5671 * inline.c: rearrange handling -- now we just #define
5672 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5673 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5674 appropriate, and we use that in inline.h along with the above
5675 define to determine how to respond.
5676
5677 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5678 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5679
5680 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5681
5682 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5683 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5684
5685 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5686
5687 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5688
5689 * gen-scmconfig.c: new file -- see comments in file for details.
5690
5691 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5692
5693 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5694 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5695
5696 * gc.h: replace usage of SIZEOF_LONG with
5697 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5698 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5699 since we handle that in scmconfig.h now.
5700
5701 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5702
5703 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5704 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5705 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5706
5707 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5708
5709 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5710 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5711
5712 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5713
5714 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5715
5716 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5717 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5718
5719 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5720
5721 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5722 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5723
5724 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5725 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5726 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5727 with "SCM_SIZEOF_LONG_LONG != 0".
5728
5729 * error.c: #include <config.h> if HAVE_CONFIG_H.
5730
5731 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5732 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5733 with "SCM_SIZEOF_LONG_LONG != 0".
5734
5735 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5736
5737 * coop.c: replace usage of struct timespect with scm_t_timespec.
5738 #include <config.h> if HAVE_CONFIG_H.
5739
5740 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5741 usage of struct timespect with scm_t_timespec. Replace usage of
5742 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5743
5744 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5745 usage of struct timespect with scm_t_timespec. Replace usage of
5746 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5747
5748 * coop-defs.h: move handling of time related headers to
5749 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5750 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5751 timespect with scm_t_timespec.
5752
5753 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5754
5755 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5756
5757 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5758 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5759
5760 * continuations.c: move libguile/_scm.h include to the top so we
5761 pick up any critical defines like _GNU_SOURCE early.
5762
5763 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5764
5765 * async.c: #include <config.h> if HAVE_CONFIG_H.
5766
5767 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5768
5769 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5770 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5771
5772 * __scm.h: move libguile/scmconfig.h include up to the top, so
5773 we're sure to pick up any critical defines like _GNU_SOURCE early.
5774 #include <limits.h> removed in favor of scmconfig.h inclusion when
5775 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5776 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5777 scmconfig.h inclusion when appropriate. Various Win32 related
5778 definitions removed in favor of scmconfig.h inclusion when
5779 appropriate.
5780 (HAVE_UINTPTR_T): definition removed (see NEWS).
5781 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5782 (HAVE_LONG_LONGS): definition removed (see NEWS).
5783 (HAVE_LONG_LONG): definition removed (see NEWS).
5784 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5785
5786 * Makefile.am: scmconfig.h is now generated by building and
5787 running gen-scmconfig.h and capturing its output. gen-scmconfig
5788 uses config.h and the configure.in generated gen-scmconfig.h to
5789 decide what to output. See gen-scmconfig.c for details.
5790 (noinst_PROGRAMS): add gen-scmconfig.
5791 (gen_scmconfig_SOURCES): new variable.
5792 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5793 cross-compiling right.
5794 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5795 (BUILT_SOURCES): add scmconfig.h.
5796
5797 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5798
5799 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5800 Adrian Bunk. Thanks!
5801
5802 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5803
5804 * goops.c (make_class_from_template): New fourth arg:
5805 applicablep.
5806 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5807 cpls.
5808
5809 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5810
5811 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5812 second arg: applicablep.
5813 (scm_i_inherit_applicable): New function.
5814
5815 * goops.c, goops.h (scm_class_applicable,
5816 scm_class_extended_accessor): New classes.
5817
5818 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5819
5820 * procs.c (scm_procedure_documentation): Removed redundant
5821 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5822 predicates.
5823
5824 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5825
5826 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5827
5828 * modules.c (scm_module_import_interface): New function.
5829
5830 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5831 scm_class_accessor.
5832 (scm_class_accessor): New class.
5833
5834 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5835
5836 * goops.c (scm_primitive_generic_generic): Enable primitive
5837 generic if not enabled.
5838 (scm_sys_goops_loaded): Setup unextended primitive generics.
5839
5840 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5841
5842 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5843 snarf macros.
5844
5845 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5846 testing example. All uses of SCM_GPROC should be converted.)
5847
5848 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5849 scm_assoc.
5850
5851 * eq.c (scm_equal_p): Turned into a primitive generic.
5852
5853 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5854
5855 * Makefile.am (scmconfig.h): new target -- generate file from
5856 ../config.h.
5857 (modinclude_HEADERS): remove version.h.
5858 (nodist_modinclude_HEADERS): add version.h.
5859
5860 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5861
5862 This fixes a serious GC bug, introduced during the latest
5863 reorganization of the GC, which disabled freeing of structs and
5864 GOOPS objects:
5865
5866 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5867 SCM_EOL.
5868 (scm_struct_prehistory): Move scm_free_structs to
5869 scm_before_mark_c_hook.
5870
5871 * gc-card.c (sweep_card): Check that we haven't swept structs on
5872 this card before. That can happen if scm_i_sweep_all_segments has
5873 been called from some other place than scm_igc.
5874
5875 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5876
5877 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5878 (since hash tables now adapt their size).
5879
5880 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5881 (current number of prehistory bindings; hashtable code will select
5882 a prime which is greater than this value).
5883
5884 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5885 (current number of initial symbols).
5886
5887 * properties.c (scm_init_properties): Don't specify size of
5888 scm_properties_whash.
5889
5890 * objprop.c (scm_init_objprop): Don't specify size of
5891 scm_object_whash.
5892
5893 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5894
5895 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5896
5897 The following changes introduce the use of resizable hash tables
5898 throughout Guile. It also renames the old *-hash-table* functions
5899 to *-alist-vector* and places them, together with the rest of the
5900 weak vector support, in the module (ice-9 weak-vector). We should
5901 probably introduce a new, better, API for weak references, for
5902 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5903 look like and are used like ordinary pairs.)
5904
5905 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5906 leaf_environment_fold, obarray_remove_all): Use hashtable
5907 accessors.
5908
5909 * gc.c (scm_init_storage): Moved hook initialization to
5910 scm_storage_prehistory.
5911 (scm_storage_prehistory): New function.
5912 (scm_igc): Added commentary about placement of
5913 scm_after_sweep_c_hook.
5914
5915 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5916 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5917 SCM_WVECT_WEAK_VALUE_P.
5918
5919 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5920 functions.
5921 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5922 Removed.
5923 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5924 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5925
5926 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5927 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5928
5929 * modules.c (module-reverse-lookup): Use hashtable accessors.
5930
5931 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5932
5933 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5934 scm_make_weak_value_alist_vector,
5935 scm_make_doubly_weak_alist_vector): New functions.
5936
5937 * weaks.c (scm_init_weaks_builtins): New function.
5938
5939 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5940 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5941 SCM_WVECT_NOSCAN_P): New macros.
5942
5943 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5944 and SCM_WVECT_WEAK_VALUE_P.
5945
5946 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5947 allocate_weak_vector and exported.
5948
5949 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5950
5951 * hashtab.c: Undid thread safety. (We decided that it's better to
5952 let the user explicitly protect the tables (or not) according what
5953 is suitable for the application.)
5954
5955 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5956
5957 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5958 thread safe and handle resizing tables.
5959 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5960 SCM_DEFER/ALLOW_INTS.
5961
5962 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5963
5964 * hashtab.c (scm_vector_to_hash_table,
5965 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5966 functions.
5967 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5968 safe and handle resizing tables.
5969
5970 * weaks.c (scm_make_weak_key_hash_table,
5971 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5972 Size argument made optional. Return resizable table if not
5973 specified.
5974
5975 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5976
5977 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5978 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5979
5980 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5981
5982 * debug.c (scm_procedure_source): Handle all objects for which
5983 procedure? is #t. (Thanks to Bill Schottstaedt.)
5984
5985 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5986
5987 * futures.c (mark_futures): Don't need to mark data of recycled
5988 futures.
5989 (scan_futures, cleanup_undead): Be smarter about marking
5990 futures---avoid unnecessary passes through future lists.
5991
5992 * futures.h, futures.c: New files; Introduced recycling of
5993 futures. For fine-grained threading this lifts performance to
5994 another level. We can now use parallelization in inner loops of
5995 Guile programs without impossible overhead.
5996
5997 * threads.h, threads.c: Moved futures to their own file.
5998
5999 * Makefile.am (libguile_la_SOURCES): Added futures.c.
6000 (DOT_X_FILES): Added futures.x.
6001 (DOT_DOC_FILES): Added futures.doc.
6002 (modinclude_HEADERS): Added futures.h.
6003
6004 * threads.c, threads.h (scm_i_create_thread): Renamed from
6005 create_thread and made global.
6006
6007 * futures.c (scm_make_future): New procedure.
6008
6009 * eval.c: #include "libguile/futures.h".
6010
6011 * init.c: #include "futures.h"
6012 (scm_init_guile_1): Call scm_init_futures.
6013
6014 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
6015
6016 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
6017
6018 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
6019 functions.
6020
6021 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
6022
6023 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6024
6025 * threads.c (create_thread): Don't unwind dynwind chain of parent
6026 thread before creation. Just start the new thread with an empty
6027 dynwind chain.
6028
6029 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6030
6031 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
6032
6033 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6034
6035 * threads.c (scm_timed_wait_condition_variable): Support timed
6036 waiting also for simple condition variables.
6037
6038 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
6039 of calling the procedure change-object-class.
6040
6041 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6042
6043 * ramap.c (scm_ramapc): Typo in error message.
6044
6045 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6046
6047 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
6048 slots with instance allocation.
6049
6050 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
6051 class.
6052 (scm_compute_applicable_methods): Use scm_generic_function_methods.
6053
6054 * goops.c (scm_generic_function_methods): Support extended
6055 generic functions.
6056
6057 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6058
6059 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
6060 Thanks to Neil for pointing this out!
6061
6062 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
6063
6064 * lang.h: Remove declarations matching definitions removed from
6065 lang.c (just below).
6066
6067 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
6068
6069 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
6070 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
6071 and already commented out.
6072
6073 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
6074 scm_lreadparen): Support reading vectors with Elisp syntax if
6075 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
6076 is not currently defined, and there isn't even a configure switch
6077 to enable it yet.)
6078
6079 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6080
6081 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
6082 builds work.
6083 (EXTRA_DIST): Added version.h.in.
6084
6085 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6086
6087 This change makes it possible for one thread to do lazy sweeping
6088 while other threads are running. Now only the mark phase need to
6089 have all threads asleep. We should look further into this issue.
6090 Presently, I've put the locking of scm_i_sweep_mutex at
6091 "conservative" places due to my current lack of knowledge about
6092 the garbage collector. Please feel free to restrict these regions
6093 further to allow for maximal parallelism!
6094
6095 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
6096
6097 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
6098 scm_gc_register_collectable_memory): Substitute locking of
6099 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
6100 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
6101 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
6102 the single-thread section (which now only contains the mark
6103 phase).
6104 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
6105 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
6106
6107 * threads.c (gc_section_mutex): Removed.
6108
6109 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6110
6111 * threads.c (create_thread): Clear parent field in root state in
6112 order not to unnecessarily remember dead threads.
6113
6114 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
6115 (scm_trampoline_1, scm_trampoline_2): Use them.
6116
6117 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6118
6119 Partial introduction of real plugin interface.
6120
6121 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
6122 (EXTRA_DIST): Added threads-plugin.c.
6123
6124 * threads-plugin.h, threads-plugin.c: New files.
6125
6126 * threads.h: #include "libguile/threads-plugin.h".
6127
6128 * threads.c: #include "libguile/threads-plugin.c".
6129
6130 * pthread-threads.c: Temporarily remove debugging functions.
6131
6132 * threads.c, threads.h (scm_yield): Added back.
6133
6134 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6135
6136 * threads.c (really_launch): Detach before unlocking
6137 thread_admin_mutex in order not to risk being joined.
6138 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
6139 thread_admin_mutex locked during GC.
6140
6141 * pthread-threads.c, pthread-threads.h: Improvements to debugging
6142 functions.
6143
6144 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6145
6146 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
6147 support for debugging mutex operations.
6148
6149 * threads.c (scm_thread): Removed filed joining_threads.
6150 (thread_print): Print thread number as well as address of thread
6151 structure.
6152 (scm_join_thread): Bugfix.
6153 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
6154 scm_timed_wait_condition_variable, scm_signal_condition_variable,
6155 scm_broadcast_condition_variable): Use the low-level API.
6156 (scm_all_threads): Return copy of thread list (to prevent
6157 unintended destruction).
6158 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6159
6160 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6161 pthread "native" recursive mutex support.
6162
6163 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6164
6165 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6166 Simply lock a thread C API recursive mutex.
6167 (SCM_NONREC_CRITICAL_SECTION_START,
6168 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6169 SCM_REC_CRITICAL_SECTION_END): Removed.
6170
6171 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6172 direct calls to scm_rec_mutex_lock / unlock around the three calls
6173 to scm_m_expand_body.
6174
6175 * eval.c, eval.h (promise_free): New function.
6176 (scm_force): Rewritten; Now thread-safe; Removed
6177 SCM_DEFER/ALLOW_INTS.
6178
6179 * pthread-threads.h: Added partially implemented plugin interface
6180 for recursive mutexes. These are, for now, only intended to be
6181 used internally within the Guile implementation.
6182
6183 * pthread-threads.c: New file.
6184
6185 * threads.c: Conditionally #include "pthread-threads.c".
6186
6187 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6188 thread-safe;
6189
6190 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6191 SCM_GLOBAL_REC_MUTEX): New macros.
6192
6193 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6194 macros---use mutexes instead.
6195
6196 * tags.h (SCM_IM_FUTURE): New tag.
6197
6198 * eval.c (scm_m_future): New primitive macro.
6199 (SCM_CEVAL): Support futures.
6200 (unmemocopy): Support unmemoization of futures.
6201
6202 * print.c (scm_isymnames): Name of future isym.
6203
6204 * version.c: Unmade some changes to my private copy that got
6205 committed by mistake.
6206
6207 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6208
6209 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6210 2002-12-10.
6211
6212 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6213
6214 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6215 logical place.
6216
6217 * threads.c (create_thread): Remember root object until the handle
6218 of the new thread is on all_threads list.
6219
6220 * root.c (scm_make_root): Moved copying of fluids until after
6221 creation of root handle so that the fluids are GC protected. Also
6222 removed the critical section.
6223
6224 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6225
6226 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6227
6228 * gc-malloc.c (malloc_mutex): New mutex.
6229 (scm_gc_malloc_prehistory): Initialize it.
6230 (scm_realloc): Serialize call to realloc
6231 (scm_calloc): Same for calloc.
6232 Thanks to Wolfgang Jaehrling!
6233 (Now we have to make sure all calls to malloc/realloc are made
6234 through scm_malloc.)
6235
6236 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6237
6238 * threads.c (really_launch): Release heap (to prevent deadlock).
6239 (create_thread): Release heap before locking thread admin mutex.
6240
6241 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6242
6243 * threads.c (scm_i_thread_invalidate_freelists): New
6244 function.
6245
6246 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6247
6248 * modules.c (scm_export): Inserted a return statement.
6249
6250 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6251
6252 * modules.c (scm_export): new function
6253
6254 * gc-card.c: add a note about malloc()/free() overhead.
6255
6256 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6257
6258 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6259 in srcdir.
6260
6261 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6262
6263 These changes remove scm_ints_disabled (which hasn't has any
6264 effect in Guile for quite some time).
6265
6266 * async.c, error.h (scm_ints_disabled): Removed.
6267
6268 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6269 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6270 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6271 (old_ints): Removed.
6272
6273 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6274 critical section.
6275 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6276 SCM_ALLOW_INTS.
6277
6278 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6279
6280 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6281 Removed accidental #if 0 around these functions.
6282
6283 These changes are the start of support for preemptive
6284 multithreading. Marius and I have agreed that I commit this code
6285 into the repository although it isn't thoroughly tested and surely
6286 introduces many bugs. The bugs should only be exposed when using
6287 threads, though. Signalling and error handling for threads is
6288 very likely broken. Work on making the implementation cleaner and
6289 more efficient is needed.
6290
6291 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6292 (SCM_NONREC_CRITICAL_SECTION_START,
6293 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6294 SCM_REC_CRITICAL_SECTION_END): New macros.
6295 (SCM_CRITICAL_SECTION_START/END): Defined here.
6296
6297 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6298 the three calls to scm_m_expand_body.
6299
6300 * gc.h: #include "libguile/pthread-threads.h";
6301 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6302
6303 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6304 scm_t_key;
6305
6306 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6307 access.
6308
6309 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6310
6311 * gc-freelist.c, threads.c (really_launch): Use
6312 SCM_FREELIST_CREATE.
6313
6314 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6315
6316 * gc.c (scm_i_expensive_validation_check, scm_gc,
6317 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6318 heap administration so that those pieces of code are executed
6319 single-threaded. We might consider rewriting these code sections
6320 in terms of a "call_gc_code_singly_threaded" construct instead of
6321 calling the pair of scm_i_thread_put_to_sleep () and
6322 scm_i_thread_wake_up (). Also, we would want to have as many of
6323 these sections eleminated.
6324
6325 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6326
6327 * inline.h: #include "libguile/threads.h"
6328
6329 * pthread-threads.h: Macros now conform more closely to the
6330 pthreads interface. Some of them now take a second argument.
6331
6332 * threads.c, threads.h: Many changes.
6333
6334 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6335
6336 * Makefile.am (version.h): Changed $^ --> $< in rule for
6337 version.h.
6338
6339 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6340
6341 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6342 (SCM_MINOR_VERSION): use @--@ substitution now.
6343 (SCM_MICRO_VERSION): use @--@ substitution now.
6344 (scm_effective_version): new function prototype.
6345
6346 * version.c (scm_effective_version): new function, also add
6347 effective-version.
6348
6349 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6350 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6351 SCM_LIBRARY_DIR.
6352 (version.h): generate this here rather than configure.in. This
6353 approach tracks source edits better (i.e. more immediately).
6354 Might be worth considering for other .in files too.
6355
6356 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6357
6358 Reorganized thread package selection. A thread package now only
6359 implements a small set of pthread like functions and Guile
6360 implements the rest on top of that. Guile's implementation is
6361 what the "coop-pthreads" package has been previously. Support for
6362 "coop" threads has been removed until I get time to add it again.
6363
6364 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6365 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6366 null-threads.c, coop-pthreads.c.
6367 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6368 pthread-threads.h.
6369
6370 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6371
6372 * threads.h: Do not include "libguile/coop-defs.h". Include
6373 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6374 (previously deprecated) C level thread API prototypes. They are
6375 now in the thread package specific headers, "null-threads.h" and
6376 "pthread-threads.h".
6377 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6378 New.
6379 (scm_threads_init): Removed.
6380 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6381 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6382 SCM_I_THREAD_SWITCH_COUNT): Define here.
6383 (scm_single_thread_p): Removed.
6384 (scm_call_with_new_thread): Take two args directly instead of list
6385 of two args.
6386 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6387 SCM_SET_THREAD_LOCAL_DATA): Define here.
6388
6389 * threads.c: Merged with "coop-pthreads.c".
6390
6391 * null-threads.h: Implement pthread-like API as a set of macros.
6392
6393 * pthread-threads.h: New, implement pthread-like API by deferring
6394 to pthread itself.
6395
6396 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6397 has been lost in the reorganization.
6398
6399 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6400
6401 The following change makes it possible to move procedure
6402 application dispatch outside inner loops. The motivation was
6403 clean implementation of efficient replacements of R5RS primitives
6404 in SRFI-1.
6405
6406 The semantics is clear: scm_trampoline_N returns an optimized
6407 version of scm_call_N (or NULL if the procedure isn't applicable
6408 on N args).
6409
6410 Applying the optimization to map and for-each increases efficiency
6411 noticeably. For example, (map abs ls) is 8 times faster than
6412 before.
6413
6414 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6415
6416 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6417
6418 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6419 (map, for-each): Handle also application on two args as a special
6420 case; Use trampolines.
6421
6422 Other changes:
6423
6424 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6425 (subr2oless): Removed.
6426 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6427 vector GC protected.
6428
6429 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6430 scm_out_of_range.
6431
6432 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6433
6434 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6435
6436 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6437
6438 * debug.c (scm_make_iloc): Added missing "return".
6439
6440 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6441
6442 * strports.c (scm_eval_string_in_module): Validate second arg to
6443 be a module. Thanks to Arno Peters!
6444
6445 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6446
6447 * .cvsignore: remove goops.c
6448
6449 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6450
6451 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6452 module_variable, scm_module_lookup_closure,
6453 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6454 scm_system_module_env_p): Don't compare SCM values with C
6455 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6456 over SCM_NFALSEP.
6457
6458 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6459
6460 * eval.h (SCM_MAKE_ILOC): New macro.
6461
6462 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6463 the iloc bitpattern here.
6464
6465 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6466
6467 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6468 part of the API, otherwise it's difficult to write Guile
6469 extensions using non-blocking I/O => moved #include
6470 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6471
6472 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6473 s_unlock_mutex.
6474
6475 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6476
6477 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6478 are defined in configure.in.
6479
6480 * threads.c: Removed SCM_API from function definitions. SCM_API
6481 is only for declarations.
6482
6483 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6484
6485 * coop-pthreads.h: Added support for thread specific data to the
6486 generic C API for the coop-pthreads case.
6487
6488 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6489 change.
6490 (scm_cond_broadcast): Added missing function.
6491
6492 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6493
6494 * coop.c (coop_next_runnable_thread): Removed, wich should have
6495 happened when GUILE_ISELECT was hard-wired.
6496
6497 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6498
6499 * Makefile.am (libguile_la_SOURCES): Added threads.c
6500 (DOT_DOC_FILES): Added threads.doc.
6501 (DOT_X_FILES): Added threads.x.
6502 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6503 (noinst_HEADERS): Added coop-pthreads.c.
6504 (modinclude_HEADERS): Added coop-pthreads.h.
6505
6506 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6507 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6508
6509 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6510 Thanks to Bill Schottstaedt!
6511
6512 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6513
6514 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6515 SCM_COPT_THREADS is defined.
6516 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6517 is defined.
6518
6519 * coop-pthreads.c: Some harmless renamings of internal stuff.
6520 (create_thread): New, generalized version of
6521 scm_call_with_new_thread.
6522 (scm_call_with_new_thread): Use it.
6523 (scm_spawn_thread): New, use create_thread.
6524
6525 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6526
6527 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6528 start testing it now.
6529
6530 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6531 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6532 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6533 is defined.
6534
6535 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6536
6537 * scmsigs.c (signal_cell_handlers, install_handler_data,
6538 scm_delq_spine_x, really_install_handler, install_handler): New
6539 scheme for triggering signal handlers, to simplify take_signal.
6540 (take_signal): Simplified, to avoid race conditions.
6541 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6542 hasn't exited yet.
6543
6544 * async.c (scm_async_click): Reset pending_asyncs, handle
6545 signal_asyncs. Don't set cdr of a non-signal async to #f.
6546 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6547 always. Set pending_asyncs.
6548 (scm_system_async_mark_for_thread): Check that thread has not
6549 exited.
6550 (scm_unmask_signals, decrease_block): Call scm_async_click after
6551 block_asyncs becomes zero.
6552
6553 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6554 active_asyncs.
6555
6556 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6557 fields.
6558 * root.c (root_mark): Mark them.
6559 (make_root): Initialize them.
6560
6561 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6562 USE_COOP_THREADS.
6563 (scm_internal_select): Define one version for USE_COOP_THREADS and
6564 one for USE_NULL_THREADS.
6565 (scm_init_iselect): Likewise.
6566
6567 * inline.h (scm_cell, scm_double_cell): Also allow
6568 USE_COPT_THREADS to not protect the slot initializers.
6569
6570 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6571 because threads need to be initialized before the stack, but
6572 gsubrs such as scm_timed_condition_variable_wait can only be
6573 created later.
6574
6575 * threads.h: Include "coop-pthreads.h" when requested.
6576 (scm_threads_make_mutex, scm_threads_lock_mutex,
6577 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6578 not implemented anyway.
6579 (scm_init_thread_procs, scm_try_mutex,
6580 scm_timed_condition_variable_wait,
6581 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6582 scm_thread_exited_p): New prototypes.
6583 (struct timespec): Define if not already defined.
6584 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6585 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6586 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6587 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6588 deprecated.
6589
6590 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6591 requested.
6592 (scm_thread_exited_p): New.
6593 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6594 registered procedures.
6595 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6596 Use the latter as the procedure for "wait-condition-variable",
6597 thus offering a optional timeout parameter to Scheme.
6598 (scm_wait_condition_variable): Implement in terms of
6599 scm_timed_wait_condition_variable.
6600 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6601 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6602 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6603 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6604 scm_make_mutex, etc, and deprecate.
6605 (scm_init_threads): Do not create smobs, leave this to
6606 scm_threads_init. Do not include "threads.x" file.
6607 (scm_init_thread_procs): New, include "threads.x" here.
6608
6609 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6610 scm_null_mutex_lock, scm_null_mutex_unlock,
6611 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6612 scm_null_condvar_wait, scm_null_condvar_signal,
6613 scm_null_condvar_destroy): Removed.
6614 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6615 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6616 scm_cond_destory): Do not define, they are now deprecated and
6617 handled by threads.{h,c}.
6618
6619 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6620 (scm_threads_init): Create smobs here, using the appropriate
6621 sizes.
6622 (block): Removed, now unused.
6623 (scm_c_thread_exited_p): New.
6624 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6625 scm_null_mutex_destroy, scm_null_condvar_init,
6626 scm_null_condvar_wait, scm_null_condvar_signal,
6627 scm_null_condvar_destroy): Removed and updated users to do their
6628 task directly.
6629 (scm_try_mutex, timeval_subtract,
6630 scm_timed_wait_condition_variable,
6631 scm_broadcast_condition_variable): New.
6632 (scm_wait_condition_variable): Removed.
6633
6634 * coop-defs.h (coop_m): Added 'level' field.
6635 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6636 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6637 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6638 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6639 define.
6640 (coop_condition_variable_broadcast): New.
6641
6642 * coop-threads.c (scm_threads_init): Create smobs here, using the
6643 appropriate sizes.
6644 (scm_c_thread_exited_p, scm_try_mutex,
6645 scm_timed_wait_condition_variable,
6646 scm_broadcast_condition_variable): New.
6647 (scm_wait_condition_variable): Removed.
6648
6649 * coop.c (coop_new_mutex_init): Initialize level.
6650 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6651 level.
6652 (coop_condition_variable_signal): Renamed to
6653 coop_condition_variable_broadcast and reimplemented in terms of
6654 that. Thus...
6655 (coop_condition_variable_broadcast): New.
6656
6657 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6658
6659 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6660
6661 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6662
6663 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6664 of system headers.
6665
6666 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6667 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6668 give better error messages. Thanks to Bill Schottstaedt!
6669
6670 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6671
6672 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6673 scm_definedp to scm_defined_p and deprecated scm_definedp.
6674
6675 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6676
6677 * async.h, async.c (scm_system_async): Fixed deprecation to work
6678 correctly when deprecated features are excluded.
6679
6680 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6681
6682 * async.c (scm_system_async_mark_for_thread): Validate thread
6683 argument.
6684
6685 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6686
6687 * feature.c (scm_init_feature): Don't add 'threads' for
6688 USE_NULL_THREADS.
6689
6690 * inline.h (scm_cell, scm_double_cell): Also allow
6691 USE_NULL_THREADS to not protect the slot initializers.
6692
6693 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6694 "USE_THREAD".
6695
6696 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6697 (modinclude_HEADERS): Added null-threads.h.
6698
6699 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6700 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6701 (scm_init_threads): Use generic type names scm_t_mutex and
6702 scm_t_cond instead of coop_m and coop_c.
6703
6704 * null-threads.c, null-threads.h: New files.
6705
6706 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6707
6708 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6709 This is to support makes that know about "$<" only in pattern
6710 rules, like Sun's make.
6711
6712 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6713
6714 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6715 substitution. Thanks to David Allouche!
6716
6717 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6718
6719 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6720 !SCM_ENABLE_DEPRECATED.
6721
6722 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6723
6724 * async.c (scm_system_async_mark_for_thread): Only call
6725 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6726 otherwise.
6727
6728 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6729 USE_THREADS is defined. Use scm_root otherwise.
6730 (scm_sigaction_for_thread): Ignore THREAD argument when
6731 USE_THREADS is not defined. Also, move THREAD argument defaulting
6732 out of HAVE_SIGACTION section, which was a bug.
6733
6734 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6735
6736 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6737 signal_handlers, not the closure that is used as the async.
6738 The closure is stored in signal_handler_cells, as previously.
6739
6740 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6741
6742 * root.h (scm_root_state): Added 'block_async' slot.
6743 (scm_active_asyncs): Removed abbrev.
6744 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6745
6746 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6747 abbrev.
6748
6749 * async.h (scm_call_with_blocked_asyncs,
6750 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6751 scm_c_call_with_unblocked_asyncs): New prototypes.
6752 (scm_mask_signals, scm_unmask_signals): Deprecated.
6753 (scm_mask_ints): Turned into a macro.
6754 * async.c (scm_mask_ints): Removed.
6755 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6756 this should not be necessary.
6757 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6758 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6759 deprecation warning and check for errornous use. Set block_asyncs
6760 instead of scm_mask_ints.
6761 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6762 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6763 scm_c_call_with_unblocked_asyncs): New.
6764
6765 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6766 Asyncs are enabled by default.
6767
6768 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6769
6770 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6771 6th element: an input waiting thunk.
6772 (sf_input_waiting): New.
6773
6774 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6775
6776 * root.c (root_mark): Mark active_asyncs slot.
6777
6778 * async.c (scm_async_click): Set the cdr of a executed handler
6779 cell to SCM_BOOL_F, not SCM_EOL.
6780 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6781 and only if the handler procedure is not already present.
6782 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6783 with SCM_BOOL_F.
6784 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6785
6786 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6787
6788 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6789
6790 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6791 scm_lt_dlopenext, and scm_lt_dlerror.
6792 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6793 and scm_lt_dlerror.
6794 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6795 and scm_lt_dlerror.
6796 (sysdep_dynl_init): switch to scm_lt_dlinit();
6797
6798 * Makefile.am (libguile_la_LIBADD): switch to use
6799 libguile-ltdl.la.
6800
6801 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6802
6803 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6804
6805 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6806 * scmsigs.c (got_signal): Removed.
6807 (signal_handler_cells, signal_handler_threads): New.
6808 (take_signal): Queue the cell of the signal for the specified
6809 thread. Reset the signal handler on systems that don't have
6810 sigaction.
6811 (sys_deliver_signals): Removed.
6812 (close_1): New.
6813 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6814 extended to also set the thread of a signal and allocate a cell
6815 for it. Keep the Scheme name "sigaction". Check that signum is
6816 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6817 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6818 (scm_init_scmsigs): Allocate signal_handler_cells and
6819 signal_handler_threads vectors.
6820
6821 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6822 that system asnycs and user asyncs are separated. Reimplemented
6823 system asyncs to work per-thread.
6824
6825 * gc.c (scm_init_gc): Do not use scm_system_async.
6826
6827 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6828 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6829 Removed prototypes.
6830 (scm_i_queue_async_cell): New.
6831
6832 * __scm.h (scm_asyncs_pending_p): Removed.
6833 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6834 scm_asyncs_pending_p.
6835
6836 * async.h (scm_system_async_mark_for_thread): New prototype.
6837
6838 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6839
6840 * root.h (scm_root_state): Added new "active_asyncs" slot.
6841 * root.c (scm_make_root): Initialize it to SCM_EOL.
6842
6843 * coop-defs.h (coop_t): Added new "handle" slot.
6844 * coop-threads.c (all_threads, scm_current_thread,
6845 scm_all_threads, scm_i_thread_root): New.
6846 (scm_threads_init): Add main thread to all_threads.
6847 (scheme_launch_thread): Remove thread from all_threads when it
6848 terminates.
6849 (scm_call_with_new_thread): Initialize handle slot of coop_t
6850 structure and add new thread to all_threads.
6851 (scm_spawn_thread): Likewise.
6852
6853 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6854 * threads.c (scm_current_thread, scm_all_threads): Register as
6855 primitives.
6856
6857 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6858
6859 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6860
6861 * script.c (scm_compile_shell_switches): Fix bad spelling of
6862 `explicitly' in comment.
6863
6864 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6865
6866 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6867 Refer to provided? in doc string rather than deprecated feature?.
6868
6869 2002-09-24 Gary Houston <ghouston@arglist.com>
6870
6871 * inline.h (scm_double_cell): prevent reordering of statements
6872 with any following code (for GCC 3 strict-aliasing).
6873 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6874 the earlier version of the reordering prevention.
6875
6876 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6877
6878 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6879
6880 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6881
6882 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6883 protection.
6884
6885 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6886
6887 * inline.h: include stdio.h
6888
6889 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6890
6891 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6892
6893 * gc-segment.c (scm_i_make_initial_segment): check user settings
6894 for sanity.
6895
6896 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6897 sanity.
6898
6899 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6900
6901 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6902
6903 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6904 these won't ever wrap around with high memory usage. Thanks to
6905 Sven Hartrumpf for finding this.
6906
6907 * gc-freelist.c: include <stdio.h>
6908
6909 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6910
6911 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6912
6913 * vectors.h (SCM_VECTOR_REF): New.
6914
6915 * snarf.h (SCM_DEFINE_PUBLIC): New.
6916
6917 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6918
6919 * socket.c (scm_addr_vector): Added size of address to arguments.
6920 Use it to avoid accessing a non-existent path in a sockaddr_un.
6921 Changed all callers.
6922
6923 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6924
6925 * gc.h: remove DOUBLECELL card flags.
6926
6927 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6928 scm_realloc().
6929
6930 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6931 init loop; handle this from scm_init_card_freelist()
6932
6933 * gc-card.c (scm_init_card_freelist): init bit vector here.
6934
6935 * numbers.c (scm_make_real): prevent reordering of statements
6936 num2float.i.c (FLOAT2NUM): idem
6937
6938 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6939
6940 * eval.h: prepend libguile/ to include path
6941
6942 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6943
6944 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6945 years. Thanks to Martin Grabmüller!
6946
6947 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6948
6949 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6950 unsigned numbers for computing minimum heap increment. This
6951 prevents weird results when a a negative minimum increment is
6952 computed.
6953
6954 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6955
6956 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6957 instead of the old tricks.
6958
6959 * guile-snarf.in: Do not expect the input file to be the first
6960 argument after the optional "-o" option, just pass everything to
6961 the pre-processor without extracting the input file name.
6962
6963 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6964
6965 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6966 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6967
6968 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6969
6970 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6971 Bill Schottstaedt for the bug report
6972
6973 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6974
6975 * print.c (scm_iprin1): Print primitives generics always as
6976 "primitive-generic" even when they have no primitive methods yet.
6977
6978 2002-08-17 Gary Houston <ghouston@arglist.com>
6979
6980 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6981 call.
6982
6983 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6984
6985 * ports.c (scm_add_to_port_table): small bugfix.
6986
6987 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6988 malloc.
6989
6990 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6991 only use SCM_MIN_HEAP_SEG_SIZE.
6992
6993 * ports.c (scm_add_to_port_table): add backwards compatibility
6994 function
6995
6996 * ports.h: use scm_i_ prefix for port table and port table size.
6997
6998 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6999
7000 * vports.c (scm_make_soft_port): Initialize pt variable.
7001
7002 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
7003
7004 * strports.h (scm_c_eval_string_in_module,
7005 scm_eval_string_in_module): New prototypes.
7006 * strports.c (scm_eval_string_in_module): New, but use
7007 "eval-string" as the Scheme name and make second parameter
7008 optional.
7009 (scm_eval_string): Implement using scm_eval_string_in_module.
7010 (scm_c_eval_string_in_module): New.
7011 Thanks to Ralf Mattes for the suggestion!
7012
7013 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7014
7015 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
7016 message and abort.
7017
7018 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
7019
7020 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
7021 stead of scm_t_port*. The function now takes a tag argument.
7022
7023 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7024
7025 * gc.h: add scm_debug_cells_gc_interval to public interface
7026
7027 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
7028
7029 * gc.c (scm_i_expensive_validation_check): separate expensive
7030 validation checks from cheap ones.
7031
7032 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7033
7034 * read.c (scm_input_error): new function: give meaningful error
7035 messages, and throw read-error
7036
7037 * gc-malloc.c (scm_calloc): add scm_calloc.
7038
7039 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7040
7041 * tags.h: remove GC bits documentation from the tags table.
7042
7043 * read.c (INPUT_ERROR): Prepare for file:line:column error
7044 messages for errors in scm_lreadr() and friends.
7045
7046 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7047
7048 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
7049 implementation).
7050 (scm_gc_calloc): new function
7051
7052 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7053
7054 * ports.c (scm_new_port_table_entry): init port entry to 0
7055 completely.
7056
7057 * ports.c (scm_new_port_table_entry): change function from
7058 scm_add_to_port_table. This prevents cells with null-pointers from
7059 being exposed to GC.
7060
7061 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
7062 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
7063
7064 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
7065 to gc-stats.
7066
7067 * numbers.c (big2str): return "0" for 0 iso. ""
7068
7069 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
7070 private-gc.h: new file
7071
7072 * gc.c: completely revised and cleaned up the GC. It now uses lazy
7073 sweeping. More documentation in workbook/newgc.text
7074
7075 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7076
7077 * random.c (rstate_free): Return zero.
7078
7079 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7080
7081 * environments.c (remove_key_from_alist): Removed.
7082
7083 (obarray_remove): Simplified.
7084
7085 2002-07-24 Stefan Jahn <stefan@lkcc.org>
7086
7087 * continuations.h: ia64: Include <signal.h> before
7088 <sys/ucontext.h>.
7089
7090 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7091
7092 * modules.c (scm_sym2var): Don't compare SCM values with ==.
7093
7094 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7095
7096 * goops.c (scm_compute_applicable_methods): use
7097 scm_remember_upto_here_1 iso scm_remember_upto_here
7098
7099 * macros.c: include deprecation.h
7100
7101 * vectors.c (scm_vector_move_right_x): remove side effect in
7102 macro arg.
7103 (scm_vector_move_left_x): idem.
7104
7105 * net_db.c, posix.c, socket.c: variable naming: change ans to
7106 result.
7107
7108 * sort.c (scm_merge_vector_x): accept vector as argument
7109 iso. SCM*. This is needed for full GC correctness.
7110
7111 * gc.h: undo previous undocumented changes related to #ifdef
7112 GENGC.
7113
7114 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7115
7116 * *.c: add space after commas everywhere.
7117
7118 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
7119 Document cases where SCM_WRITABLE_VELTS() is used.
7120
7121 * vectors.h (SCM_VELTS): prepare for write barrier, and let
7122 SCM_VELTS() return a const pointer
7123 (SCM_VECTOR_SET): add macro.
7124
7125 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7126
7127 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
7128 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
7129 Deprecated the special kind of built-in dynamic syntax transformer
7130 that was inaccurately named "macro". Note: The built-in syntax
7131 transformers that are named "mmacro" or "memoizing-macro" still
7132 exist, and it is these which come much closer to what one would
7133 call a macro.
7134
7135 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
7136
7137 * eval.c (unmemocopy): Fix for
7138 1001-local-eval-error-backtrace-segfaults (unmemoization crash
7139 with internal definitions and local-eval).
7140
7141 2002-07-12 Gary Houston <ghouston@arglist.com>
7142
7143 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
7144 defined. They don't do anything useful, especially since the
7145 only case where DYNAMIC_LINKING is undefined seems to be
7146 when --with-modules=no is given to configure, which is basically
7147 requesting that the "dynamic linking module" be omitted.
7148
7149 * Makefile.am (libguile_la_SOURCES): move dynl.c from
7150 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
7151
7152 * extensions.c (load_extension): check DYNAMIC_LINKING for
7153 scm_dynamic_call.
7154 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
7155 scm_init_dynamic_linking.
7156
7157 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7158
7159 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7160 check for Cygwin when including <winsock2.h>, this is already
7161 check for by configure. Thus, revert change from 2002-07-07.
7162
7163 2002-07-10 Gary Houston <ghouston@arglist.com>
7164
7165 * eq.c: include <string.h>
7166 * dynl.c: docstring editing.
7167
7168 2002-07-09 Gary Houston <ghouston@arglist.com>
7169
7170 * dynl.c (scm_dynamic_call): docstring editing.
7171
7172 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7173
7174 * gc_os_dep.c: HURD fixes.
7175
7176 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7177
7178 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7179
7180 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7181 this should be compiled for BUILD host.
7182 Override default rule for
7183 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7184 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7185 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7186
7187 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7188 <winsock2.h> on Cygwin even when we have it.
7189
7190 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7191
7192 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7193 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7194 the code. Full number of arguments checking of closures is
7195 mandatory now. However, the option to disable the checking has
7196 most probably not been used anyway.
7197
7198 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7199
7200 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7201 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7202 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7203 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7204 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7205 (scm_source_properties, scm_set_source_properties_x,
7206 scm_source_property): Removed compile time option SCM_RECKLESS to
7207 clean up the code. Full number of arguments checking of closures
7208 is mandatory now. However, the option to disable the checking has
7209 most probably not been used anyway.
7210
7211 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7212 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7213
7214 2002-06-30 Gary Houston <ghouston@arglist.com>
7215
7216 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7217 do anything useful. Added a comment about need for a mutex if
7218 pre-emptive threading is supported.
7219
7220 * posix.c (scm_convert_exec_args), dynl.c
7221 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7222 allocate_string_pointers. 2) simplified: don't reallocate the
7223 strings, just make an array of pointers 3) avoid memory leaks on
7224 error 4) let the procedure report errors in its own name.
7225 Consequences: 1) the procedures now assume that SCM strings are
7226 nul-terminated, which should always be the case. 2) Since strings
7227 are not reallocated, it's now possible for strings passed to
7228 dynamic-args-call to be mutated.
7229
7230 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7231
7232 * __scm.h, eval.c, eval.h: Removed compile time option
7233 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7234 variable positions during memoization is mandatory. However, the
7235 option to disable the caching has most probably not been used
7236 anyway.
7237
7238 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7239
7240 * print.c (scm_simple_format): Print missing part of format before
7241 ~% control. Thanks to Daniel Skarda!
7242
7243 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7244
7245 * mkstemp.c: Added exception notice to license statement.
7246
7247 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7248
7249 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7250 it is represented as a floating point value so that we can change
7251 its sign.
7252
7253 From John W. Eaton <jwe@bevo.che.wisc.edu>
7254
7255 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7256
7257 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7258
7259 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7260 in addition to `i386'. Thanks to Dale P. Smith.
7261
7262 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7263
7264 * eq.c (real_eqv): New.
7265 (scm_eqv_p): Use it when comparing reals and complexes.
7266
7267 * numbers.c: Include <string.h>, for strncmp.
7268 (mem2complex): Do not create negative NaNs.
7269 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7270 NaN.
7271 (scm_inexact_to_exact): Signal error when converting a NaN.
7272
7273 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7274
7275 * posix.c (scm_putenv): Handle removing variables explicitely by
7276 calling unsetenv.
7277
7278 From John W. Eaton.
7279
7280 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7281 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7282 and scm_nan.
7283 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7284 [SCO && ! HAVE_ISINF] (isinf): New function.
7285 (xisinf, xisnan): New functions.
7286 (IS_INF): Delete.
7287 (isfinite): Define in terms of xisinf.
7288 (scm_inf_p, scm_nan_p): New functions.
7289 (guile_Inf, guile_NaN): New file-scope vars.
7290 (guile_ieee_init): New function.
7291 (scm_inf, scm_nan): New functions.
7292 (idbl2str): Handle Inf and NaN. Remove funny label and
7293 corresponding gotos.
7294 (ALLOW_DIVIDE_BY_ZERO): New macro.
7295 (scm_divide): Allow division by zero to occur if
7296 ALLOW_DIVIDE_BY_ZERO is defined.
7297 Handle bignums and ints as special cases.
7298
7299 Additional stuff by me:
7300
7301 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7302 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7303 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7304 NaN. They will provide their own sign.
7305 (scm_divide): Only allow divides by inexact zeros. Dividing by
7306 exact zeros still signals an errors.
7307
7308 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7309
7310 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7311 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7312 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7313 Thanks to Andreas Rottmann.
7314
7315 2002-04-20 Gary Houston <ghouston@arglist.com>
7316
7317 * removal of unused fields in root state (thanks to Christopher
7318 Cramer for pointing out the disuse.)
7319 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7320 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7321
7322 * root.c (root_mark): don't mark them.
7323 (scm_make_root): don't set them to #f.
7324 * init.c (scm_init_standard_ports): don't initialise with the
7325 default ports.
7326
7327 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7328
7329 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7330 cpp_sig_symbols.c.
7331
7332 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7333
7334 * guile-snarf.in: Do not clean input file. This would write to
7335 the $(srcdir) during a VPATH build, which is not allowed. It also
7336 isn't needed since it only works when an output filename has been
7337 specified and in that case we don't need to clean the input file
7338 because the output file will already exist.
7339
7340 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7341
7342 * guile-snarf: Install the trap for removing $cleanfile only when
7343 the value of $cleanfile is actually known.
7344
7345 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7346
7347 * .cvsignore: add versiondat.h and *.c.clean.c.
7348
7349 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7350
7351 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7352 function, replaces macro SRCBRKP.
7353
7354 (SRCBRKP): Deprecated.
7355
7356 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7357 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7358 temporary variable.
7359
7360 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7361
7362 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7363 CHECK_EXIT and removed all references to them.
7364
7365 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7366
7367 * debug.h (scm_ready_p, debug_print): Removed declarations.
7368
7369 * eval.c (EVALCELLCAR): Removed.
7370
7371 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7372 operation from condition.
7373
7374 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7375
7376 * guile-snarf.in: When the output filename is "-", write to
7377 stdout. When no "-o" option is given, use "-" as the output
7378 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7379 output file on error when the output file name is not "-". Define
7380 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7381
7382 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7383
7384 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7385
7386 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7387 and the corresponding goto statements. Removed redundant code.
7388
7389 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7390
7391 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7392 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7393 Re-enabled handing of rpsubrs and asubrs.
7394
7395 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7396
7397 * eval.c (SIDEVAL): Removed.
7398
7399 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7400 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7401 argument checking order for set! to locals, variables and symbols.
7402 Improvements to control structure. Removed some uses of arg1 and
7403 arg2 as temporary variables.
7404
7405 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7406
7407 * guile-snarf.in: Remove "--compat=1.4" support.
7408 Add "-d" and "-D" support.
7409
7410 (deprecated_list): New var.
7411 (compat_mode_clean_xxx): Delete.
7412 (grep_deprecated): New func.
7413 ("main"): If "-d" or "-D", call `grep_deprecated'.
7414
7415 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7416
7417 * hooks.h: Change scm_t_c_hookype_t everywhere to
7418 scm_t_c_hook_type.
7419
7420 Docstring fixes:
7421
7422 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7423
7424 * ports.c (scm_sys_make_void_port): Use `@file'.
7425
7426 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7427 than `else'.
7428
7429 * macros.c (scm_makmacro): Don't say that the form replaces its
7430 source, because it doesn't.
7431 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7432
7433 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7434 scm_select, scm_basename), goops.c (scm_method_generic_function),
7435 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7436 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7437 spelling mistakes.
7438
7439 * debug.c (scm_debug_options), eval.c
7440 (scm_eval_options_interface), read.c (scm_read_options): Change
7441 incorrect @var in docstring to @code.
7442
7443 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7444
7445 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7446
7447 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7448 guile-snarf can remove trailing non-init code.
7449
7450 * guile-snarf.in (modern_snarf): Remove everything following and
7451 including "^:^" from the output.
7452
7453 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7454
7455 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7456
7457 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7458
7459 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7460
7461 * guile-snarf.in: Update copyright.
7462 Rewrite to internalize error handling.
7463 Add "--compat=1.4" handling.
7464 Add commentary.
7465
7466 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7467 (snarfcppopts): New var.
7468 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7469 (.c.doc): Use $(snarfcppopts).
7470
7471 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7472 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7473 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7474 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7475 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7476 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7477 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7478 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7479 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7480 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7481 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7482 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7483 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7484 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7485
7486 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7487
7488 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7489 The next step will be to remove the union 't' and simplify the
7490 code of SCM_CEVAL that way.
7491
7492 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7493
7494 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7495 rreadfds, rwritefds, rexceptfds): Made static.
7496
7497 * gc.c (terminating), fports.c (terminating): Renamed
7498 scm_i_terminating.
7499
7500 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7501
7502 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7503 potential overflow problems. Thanks to John W Eaton!
7504
7505 * strop.c (string_capitalize_x): Treat characters as unsigned so
7506 that 8-bit chars work. Thanks to David Pirotte!
7507
7508 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7509
7510 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7511 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7512 proc as temporary variables. Introduced temporary variables with
7513 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7514 by a more explicit predicate in some places.
7515
7516 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7517
7518 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7519 Added lots of comments regarding the implementation of #@dispatch.
7520 Changed intra-procedure communication to use t.arg1 instead of
7521 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7522 variables. Introduced temporary variables with hopefully
7523 descriptive names for clarification. Replaced SCM_N?IMP by a more
7524 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7525 of computing the expression explicitly. Eliminate now unused
7526 label nontoplevel_cdrxbegin.
7527
7528 * goops.h (SCM_INSTANCE_HASH): New macro.
7529
7530 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7531
7532 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7533
7534 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7535 "guile-snarf" moved back from `noinst_SCRIPTS'.
7536
7537 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7538
7539 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7540 exists when adding a source property other than those that are
7541 handled explicitly, add the new property to the SRCPROPS obj's
7542 plist.
7543
7544 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7545 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7546
7547 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7548 debug.status. It isn't needed, and it can overflow the bits
7549 reserved for it (which may lead to a segv or a GC abort).
7550
7551 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7552
7553 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7554 side-effecting operations from conditions and macro calls.
7555 Replaced SCM_N?IMP by a more explicit predicate in some places.
7556 Minimized the scope of some variables.
7557
7558 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7559
7560 * convert.i.c: Fixed int <-> long conversions which would have
7561 failed if their sizes were different.
7562
7563 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7564
7565 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7566 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7567 as temporary variables. Removed side-effecting operations from
7568 conditions and macro calls. Introduced temporary variables with
7569 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7570 by a more explicit predicate in some places. Removed code that
7571 was conditionally compiled if SICP was defined - which it never
7572 is.
7573
7574 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7575
7576 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7577 Removed some uses of t.arg1 and proc as temporary variables.
7578 Removed side-effecting operations from conditions and macro calls.
7579 Introduced temporary variables with hopefully descriptive names
7580 for clarification. Replaced SCM_N?IMP by a more explicit
7581 predicate in some places.
7582
7583 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7584
7585 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7586 explicit predicate in some places.
7587
7588 (CHECK_EQVISH): Removed.
7589
7590 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7591 variables. Removed side-effecting operations from conditions and
7592 macro calls. Introduced temporary variables for clarification.
7593 Sorted if-else-if check for the type of the last form in a list by
7594 frequency. Avoided some unnecessary tail-recursion calls.
7595
7596 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7597
7598 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7599 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7600 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7601 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7602 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7603 naming scheme for types.
7604
7605 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7606 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7607 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7608 (scm_make_environment), eval.c (scm_closure), fports.c
7609 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7610 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7611 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7612 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7613 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7614 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7615 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7616 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7617 scm_alloc_cell to scm_cell.
7618
7619 * environments.c (core_environments_observe), gc.c
7620 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7621 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7622 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7623 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7624 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7625 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7626 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7627 scm_double_cell.
7628
7629 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7630
7631 * convert.i.c, convert.c: Better range checking.
7632
7633 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7634
7635 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7636 Windows (MinGW).
7637
7638 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7639
7640 * Makefile.am: Update path to pre-inst-guile automake frag.
7641
7642 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7643
7644 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7645 features are excluded.
7646
7647 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7648
7649 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7650
7651 2002-02-25 Gary Houston <ghouston@arglist.com>
7652
7653 * convert.c: include <string.h> for convert_i.c.
7654
7655 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7656
7657 * .cvsignore: add stamp-h1.
7658
7659 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7660
7661 * unif.c (scm_array_to_list): Correct name, which had been
7662 accidentally changed to scm_t_arrayo_list!
7663
7664 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7665
7666 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7667 underflowing scm_mallocated.
7668
7669 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7670
7671 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7672 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7673 Reimplemented using the new scm_gc_malloc, etc., functions and
7674 deprecated.
7675
7676 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7677
7678 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7679 to `noinst_PROGRAMS'.
7680 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7681 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7682
7683 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7684
7685 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7686 non-zero is returned from a port or smob free function.
7687 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7688 scm_gc_register_collectable_memory,
7689 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7690 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7691
7692 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7693 debug-malloc.c, dynl.c, environments.c, environments.h,
7694 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7695 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7696 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7697 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7698 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7699 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7700 appropriate. Return zero from smob and port free functions.
7701
7702 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7703
7704 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7705 messages while the GC is running.
7706 (scm_c_issue_deprecation_warning_fmt): New.
7707
7708 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7709 it is pointing to the putback buffer.
7710
7711 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7712
7713 * gsubr.c (create_gsubr): On "too many args" error,
7714 also display arg count and name. Thanks to Bill Schottstaedt.
7715
7716 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7717
7718 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7719
7720 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7721 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7722 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7723
7724 * guile-snarf-docs-texi.in: Bye bye.
7725
7726 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7727
7728 * symbols.c (scm_make_symbol): Fix typo in docstring.
7729
7730 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7731 scm_make_symbol): New prototypes.
7732
7733 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7734
7735 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7736 (SCM_SYMBOL_INTERNED_P): New.
7737 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7738 SCM_MAKINUM since hash values can well be bignums.
7739 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7740 This signals a interned symbol.
7741 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7742 scm_make_symbol): New.
7743
7744 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7745
7746 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7747
7748 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7749 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7750 Thanks to Dave Love.
7751
7752 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7753
7754 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7755 This might help to make unintended clashes less likely.
7756 (scm_string_to_symbol): Protect the string until the symbols is
7757 created.
7758
7759 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7760
7761 * convert.c, convert.h, convert.i.c: New files containing C
7762 array to Scheme conversion helpers meant to be replacement
7763 functions for the deprecated gh interface.
7764
7765 * Makefile.am: Setup rules for new `convert.*' files.
7766
7767 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7768
7769 * symbols.c (scm_c_symbol2str): New function, replacement for
7770 `gh_scm2newsymbol()'.
7771
7772 * strings.c (scm_c_substring2str): New function. Proper
7773 replacement for `gh_get_substr()'.
7774
7775 * socket.c: Include `stdint.h' if available for the `uint32_t'
7776 declaration.
7777
7778 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7779 compiler warning).
7780
7781 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7782
7783 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7784
7785 Other changes unrelated to Elisp...
7786
7787 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7788 "if".
7789 (comments): Fix a few typos.
7790 (scm_for_each): Add parentheses around oddly unparenthesized
7791 if/while conditions.
7792
7793 * read.c (scm_read_opts): Add full stop at end of doc for
7794 `keywords' option.
7795
7796 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7797 instead of gh_symbol2scm.
7798
7799 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7800 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7801
7802 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7803 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7804
7805 First batch of changes for Elisp support...
7806
7807 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7808 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7809 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7810
7811 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7812 conditionalize compilation and initialization of Elisp support
7813 function.
7814
7815 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7816 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7817 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7818 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7819 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7820 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7821 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7822 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7823 options.c (change_option_setting, scm_options), posix.c
7824 (environ_list_to_c), print.c (scm_iprlist), throw.c
7825 (scm_exit_status), vectors.c (scm_vector), weaks.c
7826 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7827
7828 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7829 just SCM_FALSEP.
7830
7831 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7832 of just SCM_BOOLP.
7833
7834 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7835 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7836 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7837 (scm_m_atfop): Support function aliasing. Support both function
7838 args, which need transformation, and macro args, which do not.
7839 Add explanatory comments.
7840 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7841 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7842 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7843 SCM_NULLP || SCM_NILP instead of checks against (removed)
7844 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7845 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7846
7847 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7848 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7849 these, but I don't want to remove them yet, just in case.
7850 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7851 Elisp nil value.
7852
7853 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7854 against (removed) scm_lisp_nil.
7855 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7856 (SCM_NULL_OR_NIL_P): New.
7857
7858 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7859 SCM_VALIDATE_NULL.
7860
7861 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7862 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7863 value).
7864
7865 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7866 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7867 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7868 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7869
7870 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7871 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7872 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7873 Numbering shifted down accordingly.
7874 (SCM_ELISP_NIL): New IFLAG.
7875
7876 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7877
7878 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7879
7880 * eval.c: Removed outdated references to "everr". Improved some
7881 comments.
7882
7883 (scm_deval_args, deval_args): Renamed scm_deval_args to
7884 deval_args, since it is not part of the interface.
7885
7886 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7887 use references to debug.vect[0] before it exists. Add parentheses
7888 to switch statement.
7889
7890 * goops.h: Added local emacs variables.
7891
7892 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7893
7894 * eval.[ch] (scm_deval_args): Made static.
7895
7896 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7897 test.
7898
7899 * strings.c (scm_c_string2str): Clarified comment. Replaced
7900 THINKME by FIXME for uniformness. Removed question about whether
7901 arguments need to be protected from garbage collection: Arguments
7902 must be protected as any other variable.
7903
7904 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7905
7906 * procs.h (SCM_CLOSURE_BODY): New Macro.
7907
7908 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7909 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7910 get_slot_value, set_slot_value), procs.c
7911 (scm_procedure_documentation), sort.c (closureless), stacks.c
7912 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7913 SCM_CLOSURE_BODY.
7914
7915 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7916
7917 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7918
7919 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7920 use "cp" instead.
7921
7922 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7923
7924 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7925 everywhere.
7926
7927 * continuations.c (scm_make_continuation): Do not retain the
7928 throw_value when the continuation is invoked.
7929
7930 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7931
7932 * strings.c (scm_c_string2str): New function. Converts a
7933 given Scheme string into a C string. Also put in two
7934 THINKME's regarding the malloc policy for the missing converter
7935 routines.
7936
7937 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7938
7939 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7940 gh_symbol2scm.
7941
7942 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7943
7944 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7945 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7946
7947 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7948 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7949 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7950 macros.
7951
7952 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7953
7954 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7955 SCM_GC_CELL_* macros when accessing free cells.
7956
7957 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7958
7959 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7960 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7961 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7962 * strings.h (SCM_MAKE_STRING_TAG): New.
7963 * procs.h (SCM_MAKE_CCLO_TAG): New.
7964 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7965
7966 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7967 !SCM_ENABLE_DEPRECATED.
7968
7969 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7970 New.
7971
7972 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7973 signal handlers are allowed to divert the flow of control. Call
7974 scm_system_async_mark_from_signal_handler instead of
7975 scm_system_async_mark.
7976
7977
7978 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7979 scm_alloc_double_cell in their place.
7980
7981 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7982 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7983 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7984 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7985 scm_deprecated_newcell and scm_deprecated_newcell2.
7986
7987 gc.c (scm_tc16_allocated): Only define when including deprecated
7988 features.
7989 (scm_debug_newcell, scm_debug_newcell2): Removed.
7990 (scm_init_storage): Do not initialize scm_tc16_allocated.
7991 (scm_init_gc): Do it here.
7992 (allocated_mark): New, from old code.
7993 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7994
7995 * inline.c, inline.h: New files.
7996 * Makefile.am: Added them in all the right places.
7997
7998 * _scm.h: Include "libguile/inline.h".
7999
8000 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
8001 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
8002 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
8003 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
8004 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
8005 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
8006 scm_alloc_double_cell, respectively.
8007
8008 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
8009
8010 * modules.c (scm_c_use_module): Adapt to changes to
8011 `process-use-modules'.
8012
8013 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8014
8015 * numbers.c (scm_divide): Fix more division by zero errors.
8016
8017 2001-11-21 Gary Houston <ghouston@arglist.com>
8018
8019 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
8020 obsolete. autogen.sh says:
8021 invalid unused variable name: `OMIT_DEPENDENCIES'
8022
8023 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8024
8025 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
8026 reporting the bug.
8027
8028 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
8029
8030 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
8031 Thanks to Eric Gillespie, Jr!
8032
8033 2001-11-21 Stefan Jahn <stefan@lkcc.org>
8034
8035 * win32-socket.c (getservent, setservent, endservent,
8036 getprotoent, setprotoent, endprotoent): New functions.
8037 Appropriate replacements for M$-Windows.
8038
8039 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
8040 these definitions for GUILE_DEBUG.
8041
8042 * net_db.c: Include "win32-socket.h" if compiling with a native
8043 M$-Windows compiler. Include some pieces of code (protoent and
8044 servent interface) protected by HAVE_* macros when using a
8045 native M$-Windows compiler.
8046
8047 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
8048
8049 * modules.c (scm_c_export): Do nothing when the first argument is
8050 already the terminating NULL. Thanks to Han-Wen Nienhuys!
8051
8052 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
8053
8054 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
8055 also include `buildstamp'.
8056
8057 2001-11-18 Rob Browning <rlb@defaultvalue.org>
8058
8059 * version.c
8060 (s_scm_major_version): use SCM_MAJOR_VERSION.
8061 (s_scm_minor_version): use SCM_MINOR_VERSION.
8062 (s_scm_micro_version): use SCM_MICRO_VERSION.
8063 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
8064 SCM_MICRO_VERSION.
8065
8066 * version.h.in
8067 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
8068 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
8069 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
8070
8071 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
8072
8073 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8074 Rewrite docstrings without reference to substring-move-left/right,
8075 since the latter no longer exist.
8076
8077 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8078
8079 * eval.c: Removed bogus comment about acros.
8080
8081 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
8082 Minimize scope of local variable. Eliminate dependency on
8083 macro DEBUG_EXTENSIONS.
8084
8085 (s_splicing): New error message string.
8086
8087 (scm_m_body): Issue 'bad body' message rather than 'missing
8088 expression' message.
8089
8090 (scm_m_quote): Eliminate unnecessary copying.
8091
8092 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
8093 checking of the body to scm_m_body.
8094
8095 (scm_m_do): Move comment to function header. Rename arg1 to
8096 binding. Made the code a bit easier to read.
8097
8098 (evalcar): Removed.
8099
8100 (iqq): Added a comment. Changed the depth parameter to
8101 unsigned. Use size_t for vector lengths. Make sure vector object
8102 is gc protected as long as its contents are read. Add some syntax
8103 checks. Get rid of unnecessary SCM_IMP test. Clean up the
8104 control structure a bit.
8105
8106 (scm_m_delay): Added comment about the implementation of
8107 scm_m_delay.
8108
8109 (scm_m_define): Add comment about guile's currying define
8110 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
8111 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
8112
8113 (scm_m_letrec1): Removed. Part of the functionality is taken
8114 over by the new function 'transform_bindings'.
8115
8116 (transform_bindings): New function. Takes over some of the
8117 functionality of removed function 'scm_m_letrec1', namely to split
8118 a list of bindings into a reversed list of variables and a list of
8119 initializers.
8120
8121 (scm_m_letrec): Call 'transform_bindings'.
8122
8123 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
8124 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
8125 test. Use 'transform_bindings'. Fixed scoping error with named
8126 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
8127 Jerram for suggesting the fix). Cleaned up the control structure
8128 a bit.
8129
8130 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
8131 unnecessary consing. Eliminated unnecessary
8132 SCM_DEFER/ALLOW_INTS.
8133
8134 (SCM_CEVAL): Un-obfuscated some loops.
8135
8136 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
8137
8138 * gc.h (scm_unhash_name): Old declaration removed.
8139
8140 * eval.c (s_scm_eval): Change @var{primitive-eval} to
8141 @code{primitive-eval}.
8142
8143 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
8144 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
8145 Change @deffnx lines in docstrings to say {Scheme Procedure}
8146 rather than primitive or procedure.
8147
8148 * posix.c (scm_execl), filesys.c (scm_close), unif.c
8149 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
8150 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
8151 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
8152 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
8153 (scm_string_split, scm_string_ci_to_symbol), strings.c
8154 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
8155 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8156 Docstring fixes and improvements reflecting edits that have been
8157 made in the reference manual source.
8158
8159 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8160 scm_object_property, scm_set_object_property_x): Remove invalid
8161 @deffnx lines for corresponding procedure property primitives.
8162
8163 These changes add a @deffnx C function declaration and function
8164 index entries for each Guile primitive to the copy of the doc
8165 snarf output that is used for reference manual synchronization.
8166 Online help is unchanged.
8167
8168 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8169 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8170 name to SCM_SNARF_DOCS.
8171
8172 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8173 snarf-check-and-output-texi.
8174
8175 * Makefile.am (guile-procedures.texi): New rule.
8176 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8177 Changed so that the last stage of doc snarfing is now performed
8178 twice, once to produce guile-procedures.txt for online help, and
8179 once to produce guile.texi for reference manual synchronization.
8180
8181 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8182
8183 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8184 safely usable as a single statement followed by a ';', for example
8185 in an if statement.
8186
8187 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8188
8189 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8190
8191 * random.c (scm_random_solid_sphere_x,
8192 scm_random_hollow_sphere_x): Correct "shere" typos.
8193
8194 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8195
8196 * version.c (scm_version): Update docstring to include
8197 `micro-version'.
8198
8199 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8200
8201 * modules.c (scm_c_export): Call va_end after collecting the
8202 symbols.
8203
8204 * strop.h, strop.c (scm_substring_move_left_x,
8205 scm_substring_move_right_x): Removed.
8206
8207 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8208 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8209 configure does.
8210
8211 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8212
8213 * numbers.c: Document macros to define when including
8214 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8215 now rely on SIZEOF_ macros that have been figured out at
8216 configure time.
8217
8218 * num2integral.i.c: Adapt to new interface.
8219 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8220 target type by casting it and checking whether it is still the
8221 same. Do not try to handle bignums for integral types that are
8222 smaller than fixnums. When handling bignums, collect the
8223 magnituse first into a unsigned type, and correctly check for
8224 overflow.
8225 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8226 only -MIN_VALUE can still be negative of all negative numbers (in
8227 twos-complement).
8228
8229 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8230
8231 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8232 HAVE_LONG_LONG depending on whether their size is non-zero.
8233
8234 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8235
8236 * strop.c (scm_string_null_p): Docfix; nfc.
8237 Thanks to Scott Lenser.
8238
8239 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8240
8241 * extensions.c (scm_load_extension): Canonicalize docstring
8242 whitespace.
8243
8244 * unif.c (scm_uniform_array_write), ports.c
8245 (scm_current_output_port, scm_force_output), dynwind.c
8246 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8247 filesys.c (scm_open, scm_lstat), struct.c
8248 (scm_make_struct_layout), random.c (scm_random,
8249 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8250 (scm_i_index): Remove superfluous whitespace from end of docstring
8251 lines.
8252
8253 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8254 strings.c (scm_make_string), variable.c (scm_make_variable,
8255 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8256 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8257 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8258 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8259 newline at end of docstrings.
8260
8261 * modules.c (scm_set_current_module): Add missing newline to
8262 docstring.
8263
8264 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8265
8266 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8267 and makes them available through Guile. That is because the
8268 Winsock-API does not store its errors in `errno' and thus cannot
8269 return error messages via `strerror (errno)'.
8270
8271 * socket.c (scm_init_socket): Initialize `win32-socket' part
8272 here under M$-Windows.
8273
8274 * numbers.h: Added missing declaration of
8275 `scm_sys_check_number_conversions()'.
8276
8277 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8278 and use in `(strerror)' and `(system-error)'.
8279
8280 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8281 `win32-socket.[ch]' to extra source and header files.
8282
8283 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8284
8285 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8286 a call to turn-on-debugging when --debug has been given instead of
8287 turning it on directly. Also, handle new `--no-debug' option,
8288 which might suppress the call to turn-on-debugging.
8289
8290 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8291
8292 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8293
8294 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8295
8296 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8297 here (was at guile_LDADD) which describes the dependency
8298 correctly and allows a clean build on Win32.
8299
8300 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8301 into FOO.
8302
8303 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8304 import macros for external libraries (libcrypt, libqthreads,
8305 libreadline and libregex).
8306
8307 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8308
8309 * posix.c (flock): Added support for flock() in M$-Windows.
8310
8311 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8312 of __SCM_IMPORT__.
8313
8314 * fports.c (getflags): Differentiate reading and writing pipes
8315 descriptors.
8316
8317 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8318 M$-Windows.
8319
8320 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8321 conditionalized error code if `ETIMEDOUT' is not available.
8322 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8323 timeout'.
8324
8325 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8326 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8327 each inclusion of `num2integral.i.c'.
8328 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8329
8330 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8331
8332 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8333 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8334
8335 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8336
8337 * print.c (scm_iprin1): Mark print state as revealed when
8338 dispatching to generic write or display.
8339
8340 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8341
8342 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8343
8344 Support for native Win32. Thanks to Stefan Jahn!
8345
8346 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8347 and win32-dirent.h to extra source and header files. These
8348 include the uname() and the POSIX dirent interface implementation
8349 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8350 linkers which do not allow unresolved symbols inside shared
8351 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8352 dependency.
8353
8354 * __scm.h: Defined SCM_API. This macro gets prepended to all
8355 function and data definitions which should be exported or imported
8356 in the resulting dynamic link library in the Win32 port.
8357
8358 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8359 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8360 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8361 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8362 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8363 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8364 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8365 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8366 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8367 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8368 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8369 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8370 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8371 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8372 vports.h, weaks.h:
8373 Prefixed each each exported symbol with SCM_API.
8374
8375 * continuations.c: Added comment about the use of the extern
8376 declarations of {get,set}context() functions used in the ia64 port.
8377
8378 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8379 is meant to be a `unsigned long *'.
8380
8381 * filesys.c: Include `direct.h' if possible. Use local
8382 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8383 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8384 able to differentiate between sockets and other file descriptors.
8385 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8386 `scm_dirname()'.
8387
8388 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8389 statement block in `scm_fport_buffer_add()'.
8390 Some corrections in `getflags()'.
8391
8392 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8393
8394 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8395 build on Win32. Disable preloaded symbols on Win2 platforms.
8396
8397 * ioext.c, ports.c: Include `io.h' is possible.
8398
8399 * mkstemp.c: Include `process.h' is possible.
8400
8401 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8402 too.
8403 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8404
8405 * posix.c: Remove unnecessary dirent includes and defines. Include
8406 local `win32-uname.h' for MinGW. Extern declaration of
8407 `mkstemp()' for systems where it does not exists. Make
8408 `getlogin()' available on M$-Windows.
8409
8410 * scmsigs.c: Made `usleep()' avalable on MinGW.
8411
8412 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8413
8414 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8415
8416 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8417
8418 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8419
8420 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8421 Don't apply scm_uniform_vector_length on arrays.
8422
8423 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8424
8425 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8426 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8427 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8428 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8429 scm_list_<n> over scm_cons[2]?.
8430
8431 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8432 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8433 SCM_C[AD][AD]R instead of explicit form.
8434
8435 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8436 comparison parameters.
8437
8438 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8439 !SCM_NULLP instead of SCM_NIMP.
8440
8441 (scm_m_case): Don't copy the form. Renamed proc to clause and
8442 minimized its scope. Renamed x to clauses. Removed side
8443 effecting operation from macro call.
8444
8445 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8446 minimized its scope. Renamed x to clauses. Minimized the scope
8447 of variable 'len'. Make sure the else clause is treated specially
8448 even in case of '=>' occurences. Don't change the else to #t in
8449 order to be able to distinguish this case in the evaluator. Leave
8450 type checking of the recipient to the evaluator.
8451
8452 (scm_c_improper_memq): Made the comment somewhat clearer.
8453
8454 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8455 test for SCM_IM_LET at the place of the formal parameters.
8456 Simplified the formal parameter checking.
8457
8458 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8459 Renamed arg1 to binding and minimized its scope. Eliminated
8460 unnecessary consing.
8461
8462 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8463 variable 'len'.
8464
8465 (build_binding_list): New static function.
8466
8467 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8468 Further, split up the 'letrec' unmemoizing code to the
8469 corresponding parts for 'do', 'let' and 'letrec', adding comments
8470 to each form. Cleanup the handling of the do form (This removes
8471 some *real* code :-).
8472
8473 (SCM_CEVAL): Removed side effecting operation from macro call.
8474 Handle the 'else clause of the 'cond form specially - the symbol
8475 'else is not replaced with #t any more.
8476
8477 2001-10-14 Gary Houston <ghouston@arglist.com>
8478
8479 * version.c (scm_version): use sprintf instead of snprintf,
8480 for portability. thanks to Bill Schottstaedt.
8481
8482 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8483
8484 * read.c (scm_lreadr): When user-defined hash procedure returns
8485 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8486 an exception. (This prevents parsing of uniform vectors from
8487 interfering with parsing of numbers.)
8488
8489 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8490
8491 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8492 PTRDIFF_MIN. Thanks to Ken Raeburn.
8493
8494 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8495
8496 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8497
8498 * eval.c (scm_m_atbind): First try to find the variable without
8499 defining it locally; when it has not been found, define it
8500 locally.
8501
8502 * modules.c (module_variable): Pass over variables that exist but
8503 are unbound.
8504
8505 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8506
8507 * backtrace.c (display_backtrace_file_and_line): Only use
8508 scm_basename when POSIX support is compiled in. Thanks to Chris
8509 Cramer.
8510
8511 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8512
8513 * numbers.c (mem2uinteger): Return number read so far when coming
8514 across a hexdigit after having read a # or if not reading a hex
8515 value. This will enable the calling code to correctly handle
8516 forms like 1e2. (The background is, that the exponent markers d,
8517 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8518 providing this patch.
8519
8520 (mem2complex): Fix erroneous double-negation. Now, numbers like
8521 1-i will be read correctly.
8522
8523 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8524
8525 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8526
8527 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8528
8529 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8530
8531 * print.c (scm_print_state_vtable, print_state_pool):
8532 Initialize. These variables are now registered as gc roots.
8533
8534 (scm_current_pstate): Update documentation.
8535
8536 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8537 scm_prin1, scm_init_print): print_state_pool is registered as a
8538 gc root and thus does not need to be protected by a surrounding
8539 pair any more.
8540
8541 (make_print_state): The car of print_state_pool no longer holds
8542 the scm_print_state_vtable.
8543
8544 (scm_current_pstate, scm_make_print_state, print_circref,
8545 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8546 SCM_N<foo>.
8547
8548 (scm_prin1): When building lists, prefer scm_list_<n> over
8549 scm_cons[2]?.
8550
8551 (scm_iprlist): Removed a redundant SCM_IMP test.
8552
8553 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8554
8555 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8556
8557 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8558
8559 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8560 scm_list_<n> over scm_cons[2]?.
8561
8562 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8563
8564 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8565
8566 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8567 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8568 for some reason his patch didn't make it into the cvs.
8569
8570 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8571
8572 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8573 little bit - should even be somewhat more accurate now.
8574
8575 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8576
8577 * gc.c: support ia64 register backing store.
8578 (SCM_MARK_BACKING_STORE): new macro.
8579
8580 * continuations.h: support ia64 register backing store.
8581 (struct scm_t_contregs): add ia64 register backing store.
8582
8583 * continuations.c: support ia64 register backing store.
8584 (continuation_mark): mark ia64 register backing store.
8585 (continuation_free): free ia64 register backing store.
8586 (scm_make_continuation): capture ia64 register backing store.
8587 (copy_stack_and_call): copy ia64 register backing store.
8588
8589 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8590
8591 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8592 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8593 instead of SCM_NIMP to test for that case.
8594
8595 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8596 scm_t_bits instead of long.
8597
8598 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8599
8600 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8601 SCM_T_SIGNED_BITS_MIN): New.
8602 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8603 Use them to make these macros computable by the preprocessor.
8604
8605 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8606 whether the integral type fits in a fixnum, not the compiler.
8607 This removes a spurious compiler warning. Also, honor the
8608 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8609 needed for `long long's.
8610
8611 * numbers.c: Define NO_PREPRO_MAGOC when including
8612 num2integral.c.i for `long long' and `signed long long'.
8613
8614 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8615
8616 These changes fixes a race condition in the Guile coop - pthread
8617 compatibility code.
8618
8619 * coop.c (mother_awake_p): New variable.
8620 (coop_create): Set mother_awake_p before creating or signalling
8621 mother; wait until mother is going to sleep before returning.
8622 (mother): Reset mother_awake_p before going to sleep.
8623
8624 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8625
8626 * options.c (protected_objects, scm_init_options): The content of
8627 protected_objects is now protected from garbage collection using
8628 scm_gc_register_root instead of scm_permanent_object.
8629
8630 (get_option_setting): New static function that computes an option
8631 setting as it was formerly done in the function scm_options.
8632
8633 (get_documented_option_setting): New static function that
8634 returns option documentation as it was formerly done in the
8635 function scm_options. Note that documentation C strings are no
8636 longer precomputed into SCM objects. Instead, they are converted
8637 into SCM strings every time get_documented_option_setting is
8638 called.
8639
8640 (change_option_setting): New static functions that modifies the
8641 option setting as it was formerly done in the function
8642 scm_options. The function is now exception safe, i. e. won't
8643 cause a memory leak when interrupted. Further, only non-immediate
8644 option values are added to the protection list.
8645
8646 (scm_options): This function now has only the purpose to dispatch
8647 to to get_option_setting, get_documented_option_setting or
8648 change_option_setting, depending on the arguments given to
8649 scm_options.
8650
8651 (scm_init_opts): Don't convert documentation C strings into SCM
8652 strings. Further, don't protect any object values: They _must_
8653 be immediate values, otherwise there is no guarantee that they
8654 have not been collected before anyway.
8655
8656 * options.[ch] (scm_t_option): Made type unsigned, name into a
8657 constant char* and val into a scm_t_bits type.
8658
8659 (scm_options, scm_init_opts): The number of options is guaranteed
8660 to be larger or equal to zero. Thus, the type is changed to
8661 unsigned.
8662
8663 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8664
8665 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8666 testing an unsigned value for being >= 0.
8667
8668 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8669
8670 * numbers.h: Removed old comment about using SCM_CAR to access
8671 non-pair cells.
8672
8673 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8674 the return value is signed. Thanks to Brian Crowder for the bug
8675 report.
8676
8677 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8678 values. With this patch, SCM_SRS can be safely used for other
8679 types than scm_t_signed_bits. However, it should still better be
8680 an internal macro and thus be renamed to SCM_I_SRS.
8681
8682 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8683
8684 2001-10-03 Gary Houston <ghouston@arglist.com>
8685
8686 * continuations.h, unif.h: in the descriptions of the bit patterns
8687 of the heap cells, make bit 0 the least significant.
8688
8689 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8690
8691 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8692 Thanks to Golubev I. N.
8693
8694 2001-09-25 Gary Houston <ghouston@arglist.com>
8695
8696 * ports.c (scm_drain_input): extended the docstring. thanks to
8697 Alex Schroeder and Thien-Thi Nguyen.
8698
8699 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8700
8701 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8702 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8703 macros. (The NUM names might soon change.)
8704
8705 * numbers.h: Added missing declarations.
8706
8707 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8708
8709 * Makefile.am: Distribute num2float.i.c.
8710
8711 * num2float.i.c: New file, multiply included by numbers.c, used
8712 to "templatize" the float <-> num conversion routines.
8713
8714 * numbers.c: New functions: scm_num2float, scm_float2num,
8715 scm_num2double, scm_double2num.
8716
8717 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8718
8719 * .cvsignore: really add version.h
8720
8721 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8722 Otherwise it fails on the alpha. However, we might rather choose
8723 this size conditionally.
8724
8725 * numbers.c (scm_gcd): change "k" to a long from an int.
8726 Otherwise it fails on the alpha. However, we might rather choose
8727 this size conditionally.
8728
8729 * error.c (scm_wta): coerce char* to intptr_t before int
8730 assignment.
8731
8732 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8733 int.
8734
8735 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8736
8737 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8738
8739 * numbers.c (scm_integer_expt): Accept inexact integer in second
8740 argument. (Thanks to Bill Schottstaedt.)
8741
8742 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8743
8744 * .cvsignore: add version.h
8745
8746 * versiondat.h.in: removed (obsolete).
8747
8748 * version.h.in: renamed from version.h.
8749 (SCM_GUILE_MAJOR_VERSION): new public macro.
8750 (SCM_GUILE_MINOR_VERSION): new public macro.
8751 (SCM_GUILE_MICRO_VERSION): new public macro.
8752
8753 * version.h: renamed to version.h.in.
8754
8755 * version.c
8756 (scm_major_version): support integer *_VERSION macros.
8757 (scm_minor_version): support integer *_VERSION macros.
8758 (scm_micro_version): support integer *_VERSION macros.
8759 (scm_version): support integer *_VERSION macros.
8760
8761 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8762
8763 * error.c, error.h: Made error keys globally accessible.
8764 Applications might want to test for these or use them in a direct
8765 call to scm_error.
8766
8767 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8768 routines are passed an inexact. This change in behavior is
8769 motivated by concordance with R5RS: It is more common that a
8770 primitive doesn't want to accept an inexact for an exact.
8771
8772 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8773
8774 The following patch partially undoes my patch from 2001-06-30,
8775 where I added the function scm_gc_mark_cell_conservatively. The
8776 function is buggy, since it breaks guile during conservative
8777 marking if a pointer on the stack points directly into the list of
8778 free cells on the heap: With conservative cell marking this will
8779 cause the whole free list to be scanned and marked - boom!
8780
8781 * gc.c (allocated_mark, MARK, heap_segment,
8782 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8783 (scm_gc_mark_cell_conservatively): Remove function
8784 scm_gc_mark_cell_conservatively and update the corresponding
8785 comments and uses accordingly. Thanks to Christopher Cramer for
8786 the patch. (Minor corrections by me.)
8787
8788 2001-09-15 Gary Houston <ghouston@arglist.com>
8789
8790 * root.h (scm_root_state): removed the continuation_stack and
8791 continuation_stack_ptr members, which have no apparent purpose.
8792 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8793 removed.
8794
8795 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8796 (scm_igc): remove all references to contination_stack and
8797 continuation_stack_ptr, avoiding allocation of a vector and
8798 useless processing during gc.
8799
8800 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8801
8802 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8803
8804 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8805
8806 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8807
8808 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8809
8810 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8811 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8812
8813 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8814
8815 * guardians.c (mark_dependencies_in_tconc,
8816 whine_about_self_centered_zombies, scm_init_guardians): Register
8817 the static global variable `self_centered_zombies' via
8818 scm_gc_register_root, to make some cdr-ing unnecessary.
8819
8820 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8821
8822 * backtrace.c (display_backtrace_file,
8823 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8824 values, use SCM_FALSEP when comparing SCM values against #f.
8825 Thanks to Rob Browning for the bug report.
8826
8827 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8828
8829 * strings.[ch] (scm_str2string): New function.
8830
8831 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8832
8833 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8834 when computing nm, even if it's negative.
8835 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8836 (scm_must_realloc): Likewise.
8837
8838 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8839
8840 * numbers.c (scm_sys_check_number_conversions): new function,
8841 defined if Guile is compiled in debugging mode. currently checks
8842 `scm_num2ulong', should check much much more.
8843
8844 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8845 unsigned, ensure that it's positive. thanks to Martin Baulig!
8846
8847 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8848
8849 * __scm.h: Added new section about compile time selectable
8850 features.
8851
8852 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8853 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8854 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8855 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8856 Removed.
8857
8858 * deprecation.c (scm_include_deprecated_features): Simplified.
8859
8860 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8861 `SCM_IMP' instead of `!SCM_CELLP´.
8862
8863 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8864 Extract side-effecting operations from macros.
8865
8866 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8867 scm_top_level_lookup_closure_var and scm_system_transformer.
8868
8869 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8870
8871 (heap_segment): Use CELL_P instead of SCM_CELLP.
8872
8873 * init.c (start_stack): Don't initialize
8874 scm_top_level_lookup_closure_var and scm_system_transformer.
8875
8876 * modules.c (scm_set_current_module): Don't access
8877 scm_top_level_lookup_closure_var and scm_system_transformer.
8878
8879 (scm_sym2var): Don't call scm_variable_set_name_hint.
8880
8881 (scm_post_boot_init_modules): Removed deprecated initializations.
8882
8883 * print.c (scm_ipruk): Don't access cell contents of non cells.
8884
8885 * strings.c (scm_string_set_x): All strings are writable.
8886
8887 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8888 type. There is only one string type now.
8889
8890 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8891
8892 * tags.h: Remove comments about two different string types.
8893
8894 (SCM_CELLP, SCM_NCELLP): Deprecated.
8895
8896 * variable.c (make_variable): Remove code variant for vcells.
8897
8898 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8899 SCM_VARIABLE_LOC): Remove code variant for vcells.
8900
8901 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8902 SCM_ENABLE_DEPRECATED with the logic reversed.
8903
8904 * dynl.c (moddata, registered_mods), dynl.[ch]
8905 (scm_register_module_xxx, scm_registered_modules,
8906 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8907 (*top-level-lookup-closure*), eval.[ch]
8908 (scm_top_level_lookup_closure_var, scm_system_transformer,
8909 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8910 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8911 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8912 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8913 scm_unprotect_object), modules.c (root_module_lookup_closure,
8914 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8915 beautify_user_module_x_var, try_module_autoload_var,
8916 scm_module_full_name), modules.[ch] (scm_the_root_module,
8917 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8918 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8919 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8920 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8921 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8922 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8923 scm_make_shared_substring), tags.h (scm_tc7_substring,
8924 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8925 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8926 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8927 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8928 Removed.
8929
8930 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8931 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8932 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8933 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8934 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8935 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8936 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8937 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8938 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8939 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8940 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8941 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8942 (setzone, scm_strftime, scm_strptime), vports.c
8943 (scm_make_soft_port): Remove calls to
8944 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8945 gone, all strings are 0-terminated anyway.
8946
8947 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8948 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8949 double inclusion of the same headers to the SCM_<filename>_H
8950 format.
8951
8952 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8953 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8954 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8955 any more.
8956
8957 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8958 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8959 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8960 !SCM_<foo> over SCM_N<foo>.
8961
8962 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8963
8964 * Makefile.am: Remove references to symbols-deprecated.c.
8965
8966 * symbols.c (scm_init_symbols): Don't initialize deprecated
8967 symbol functions.
8968
8969 * symbols-deprecated.c: Removed.
8970
8971 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8972 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8973 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8974 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8975 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8976 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8977 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8978 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8979 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8980 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8981 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8982 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8983 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8984 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8985 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8986 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8987 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8988 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8989 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8990 scm_intern0, scm_sysintern, scm_sysintern0,
8991 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8992 scm_string_to_obarray_symbol, scm_intern_symbol,
8993 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8994 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8995 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8996 vectors.[ch] (scm_vector_set_length_x): Removed.
8997
8998 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8999 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
9000 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
9001 Renamed the macros that are defined to inhibit double inclusion of
9002 the same headers to the SCM_<filename>_H format.
9003
9004 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
9005 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
9006 SCM_N<foo>.
9007
9008 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9009
9010 * continuations.h (scm_contregs), debug.h (scm_debug_info,
9011 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
9012 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
9013 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9014 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
9015 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
9016 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
9017 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
9018 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
9019 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
9020 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
9021 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
9022
9023 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
9024 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
9025 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
9026 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
9027 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
9028 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
9029 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
9030 double inclusion of the same headers to the SCM_<filename>_H
9031 format.
9032
9033 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
9034 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
9035 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
9036 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
9037 !SCM_<foo> over SCM_N<foo>.
9038
9039 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9040
9041 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
9042 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
9043 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
9044 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
9045 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
9046 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
9047 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
9048 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
9049 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
9050 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
9051 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
9052 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
9053 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
9054 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
9055 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
9056 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
9057 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
9058 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
9059 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
9060 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
9061 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
9062 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
9063 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
9064 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
9065 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
9066 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
9067 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
9068 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
9069 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
9070 the macros that are defined to inhibit double inclusion of the
9071 same headers to the SCM_<filename>_H format.
9072
9073 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
9074
9075 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
9076 "scm_t_portable" with "scm_port_table" which was an artifact from
9077 the great "scm_*_t -> scm_t_" renaming.
9078
9079 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
9080
9081 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
9082 used; nfc. Thanks to Bill Schottstaedt.
9083
9084 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
9085 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
9086 Thanks to Chris Cramer.
9087
9088 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
9089
9090 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
9091
9092 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
9093 dynamic scope.
9094 * dynwind.h (scm_swap_bindings): Declare.
9095 * dynwind.c (scm_swap_bindings): Make non-static.
9096
9097 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
9098
9099 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
9100 doing exactly nothing about them). thanks Neil!
9101
9102 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
9103
9104 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
9105
9106 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
9107
9108 * gc.c: Fix omission bug: Add `heap_segment' forward decl
9109 (proto) in the case when either `GUILE_DEBUG' or
9110 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
9111
9112 (map_free_list): Fix typo: Ref `f' correctly.
9113
9114 Thanks to Chris Cramer.
9115
9116 2001-08-15 Rob Browning <rlb@defaultvalue.org>
9117
9118 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
9119 variables.
9120 (libpath.h): change libguileversion to libguileinterface.
9121
9122 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
9123
9124 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
9125 ChangeLog-2000. Thanks to Daniel Skarda!
9126
9127 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
9128
9129 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
9130 do it from the Makefile.
9131
9132 * Makefile.am: rearrange the snarfing slightly, so that .doc files
9133 are of a reasonable size.
9134
9135 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
9136
9137 * stacks.c (scm_make_stack): Improve docstring by explaining use
9138 of cutting args.
9139
9140 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
9141
9142 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
9143 scm_char_whitespace_p, scm_char_upper_case_p,
9144 scm_char_lower_case_p, scm_char_is_both_p): Do not require
9145 characters to fulfill isascii in addition to the primary
9146 predicate.
9147
9148 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9149
9150 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
9151 scm_istr2flo, scm_istring2number): Removed.
9152
9153 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
9154 SCM_SLOPPY_<foo>.
9155
9156 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9157 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9158 Added.
9159
9160 (scm_string_to_number): Use new number parser.
9161
9162 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9163 handles complex numbers.
9164
9165 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9166 SCM_<foo>_H.
9167
9168 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9169 SCM_N<pred>.
9170
9171 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9172
9173 (scm_i_mem2number): Added.
9174
9175 (scm_exact_to_inexact): Changed signature.
9176
9177 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9178 here instead of within scm_i_mem2number. Call scm_i_mem2number
9179 instead of scm_istr2int and scm_istring2number.
9180
9181 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9182
9183 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9184 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9185 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9186 !SCM_<pred> over SCM_N<pred>.
9187
9188 (scm_eval_body): Remove side effecting code from macro call.
9189
9190 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9191 SCM_NIMP test.
9192
9193 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9194
9195 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9196
9197 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9198
9199 Removed vcell slot from structs.
9200
9201 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9202 subsequent indices.
9203
9204 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9205 zero. Use scm_vtable_index_layout instead of "0" when accessing
9206 said slot.
9207 (scm_init_struct): Remove vcell slot layout code from
9208 required_vtable_fields.
9209
9210 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9211
9212 * goops.c (build_class_class_slots): Removed vcell slot
9213 definition.
9214
9215 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9216 Removed vcell slot layout code.
9217 (scm_si_vcell): Removed.
9218
9219 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9220
9221 "Glocs" have been removed.
9222
9223 * tags.h: Update tag system docs.
9224 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9225 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9226 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9227 or SCM_NCONSP, respectively.
9228
9229 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9230 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9231 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9232
9233 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9234 tell glocs from structs.
9235
9236 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9237
9238 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9239 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9240 instead of with glocs.
9241 (EVALCAR): Do not test for glocs.
9242 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9243 condition.
9244 (scm_unmemocar): Do not handle glocs.
9245 (scm_m_atfop): Memoize as a variable, not as a gloc.
9246 (scm_eval_args, scm_deval_args): Do not handle glocs.
9247 (scm_ceval, scm_deval): Likewise.
9248
9249 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9250 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9251 Removed.
9252
9253 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9254
9255 * dynwind.c (scm_swap_bindings): Likewise.
9256 (scm_dowinds): Updated to recognize lists of variables instead of
9257 lists of glocs.
9258
9259 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9260
9261
9262 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9263 where it is needed.
9264
9265 2001-07-25 Gary Houston <ghouston@arglist.com>
9266
9267 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9268 docstrings to reflect the n-ary implementation.
9269
9270 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9271
9272 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9273 value of a variable, not the plain "return" statement.
9274
9275 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9276
9277 * eval.c: Allow variables in memoized code (in addition to glocs).
9278 (scm_lookupcar): Handle variables in lost races. Replace symbol
9279 with variable directly, do not make a gloc.
9280 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9281 like glocs.
9282 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9283 the main switch.
9284
9285 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9286
9287 * variable.c (scm_i_variable_print): Use "value" instead of
9288 "binding" since a binding is the mapping between symbols and
9289 variables, not between variables and their values.
9290
9291 * tags.h (scm_tc7_variable): New.
9292 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9293 * print.c (scm_iprin1): Likewise.
9294
9295 * variable.h (scm_tc16_variable): Removed.
9296 (SCM_VARIABLEP): Test for new tc7 code.
9297 (scm_i_variable_print): New.
9298 * variable.c (scm_tc16_variable): Removed.
9299 (variable_print): Renamed to scm_i_variable_print and made
9300 non-static.
9301 (variable_equal_p): Removed.
9302 (make_variable): Construct a tc7 object instead of a smob.
9303 (scm_init_variable): Do not register smob.
9304
9305 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9306
9307 * tags.h: Include inttypes.h when we have it.
9308
9309 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9310
9311 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9312 is taken by the new SCM_IM_CALL_WITH_VALUES.
9313 * print.c (scm_isymnames): Update table accordingly.
9314
9315 2001-07-22 Gary Houston <ghouston@arglist.com>
9316
9317 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9318 SCM_MAKINUM to convert regoff_t value to SCM.
9319
9320 2001-07-21 Gary Houston <ghouston@arglist.com>
9321
9322 * scmsigs.c: include sys/time.h for itimer stuff.
9323
9324 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9325
9326 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9327
9328 * c-tokenize.lex: add option %nounput to quiet warning.
9329 Add prototype for yylex to quiet warning.
9330
9331 * scmconfig.h.in: add flags for setitimer and getitimer.
9332
9333 * scmsigs.h (scm_init_scmsigs): new prototype.
9334 (scm_init_scmsigs): new prototype.
9335
9336 * scmsigs.c (s_scm_setitimer): new function.
9337 (s_scm_setitimer): new function.
9338
9339 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9340
9341 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9342 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9343 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9344 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9345 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9346 guile-func-name-check.in, guile-snarf-docs-texi.in,
9347 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9348 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9349 objprop.c, objprop.h, options.c, options.h, random.h,
9350 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9351 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9352 version.c, version.h: Updated copyright notice.
9353
9354 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9355
9356 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9357 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9358 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9359 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9360 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9361 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9362 sym_environment, scm_sym_change_class): New static variables to
9363 hold predefined symbols.
9364
9365 (build_class_class_slots): Build the list using scm_list_n
9366 instead of cons. Also, slots are already created as lists, thus
9367 making a call to maplist unnecessary.
9368
9369 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9370 scm_class_direct_subclasses, scm_class_direct_methods,
9371 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9372 scm_method_procedure, create_standard_classes, purgatory): Use
9373 predefined symbols.
9374
9375 (build_slots_list, compute_getters_n_setters,
9376 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9377 get_slot_value_using_name, set_slot_value_using_name,
9378 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9379 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9380 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9381
9382 (scm_sys_prep_layout_x): Minimize variable scopes.
9383
9384 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9385 scm_sys_fast_slot_set_x): Fix signedness.
9386
9387 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9388 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9389 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9390 when converting to and from SCM values.
9391
9392 (scm_enable_primitive_generic_x): Add rest argument checking.
9393
9394 (map, filter_cpl, maplist, scm_sys_initialize_object,
9395 scm_sys_prep_layout_x, slot_definition_using_name,
9396 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9397 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9398 predicates over SCM_N?IMP tests.
9399
9400 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9401 checking.
9402
9403 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9404 alias.
9405
9406 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9407
9408 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9409
9410 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9411
9412 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9413
9414 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9415
9416 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9417
9418 * strings.c (s_scm_string): fix arg position in assert.
9419
9420 2001-07-11 Gary Houston <ghouston@arglist.com>
9421
9422 * strports.c (st_write): use memcpy, not strncpy. thanks to
9423 Dale P. Smith.
9424
9425 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9426
9427 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9428 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9429 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9430 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9431 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9432 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9433 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9434 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9435 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9436 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9437 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9438 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9439 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9440 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9441 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9442 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9443 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9444 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9445 weaks.c, weaks.h: Remove "face-lift" comment.
9446
9447 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9448
9449 * .cvsignore: add stamp-h.in.
9450
9451 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9452
9453 * hooks.c (scm_make_hook, scm_add_hook_x),
9454 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9455 value info to the docstrings.
9456
9457 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9458
9459 Some more compatibility patches for Windows.
9460
9461 * posix.c (getlogin): getlogin() implementation for Windows.
9462
9463 * backtrace.c, ioext.c: Include <stdio.h>.
9464
9465 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9466 exist.
9467
9468 * cpp_sig_symbols.in: Added SIGBREAK.
9469
9470 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9471
9472 * strports.c (scm_read_0str, scm_eval_0str): Call
9473 scm_c_read_string and scm_c_eval_string respectively, not
9474 themselves. Thanks to Dale P. Smith!
9475
9476 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9477
9478 * unif.c (scm_array_set_x): The variable args does not
9479 necessarily have to be a list. Further, got rid of a redundant
9480 SCM_NIMP test.
9481
9482 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9483
9484 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9485 last.
9486
9487 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9488 init_heap_seg): Fixed signedness.
9489
9490 (init_heap_seg): Replaced strange for-loop with a while loop.
9491
9492 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9493
9494 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9495
9496 The following patch adds conservative marking for the elements of
9497 free or allocated cells.
9498
9499 * gc.c (allocated_mark, heap_segment): New static functions.
9500
9501 (which_seg): Deleted, since the functionality is now provided by
9502 function heap_segment.
9503
9504 (map_free_list): Use heap_segment instead of which_seg.
9505
9506 (MARK): If cell debugging is disabled, mark free cells
9507 conservatively.
9508
9509 (scm_mark_locations, scm_cellp): Extracted the search for the
9510 heap segment of a SCM value into function heap_segment.
9511
9512 (scm_init_storage): Allocated cells must be marked
9513 conservatively.
9514
9515 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9516
9517 The following patch changes the representation of weak vectors to
9518 double cells instead of using an extension of the vector's
9519 allocated memory.
9520
9521 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9522 the result of SCM_WVECT_GC_CHAIN.
9523
9524 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9525
9526 * weaks.c (allocate_weak_vector): New static function. It does
9527 not patch any previously created vector object during the
9528 construction of a weak vector, and thus doesn't need to switch
9529 off interrupts during vector creation.
9530
9531 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9532 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9533 Use allocate_weak_vector to provide the new weak vector object.
9534
9535 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9536 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9537 now stored in the double cell.
9538
9539 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9540 Use SCM_WVECT_TYPE.
9541
9542 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9543 using an entry of the double cell.
9544
9545 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9546
9547 * stamp-h.in: bye bye
9548
9549 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9550
9551 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9552 scm_eval_0str.
9553
9554 * load.c, load.h (scm_c_primitive_load,
9555 scm_c_primitive_load_path): New.
9556
9557 * strports.c, strports.h (scm_c_read_string): Renamed from
9558 scm_read_0str. Also, added "const" qualifier to argument.
9559 (scm_c_eval_string): Renamed from scm_eval_0str.
9560 (scm_read_0str, scm_eval_0str): Deprecated.
9561
9562 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9563
9564 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9565 SCM_LIST1.
9566
9567 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9568
9569 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9570 scm_list_n): New functions.
9571 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9572 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9573 (lots of files): Use the new functions.
9574
9575 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9576
9577 * strings.c: #include "libguile/deprecation.h".
9578
9579 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9580
9581 * read.c (scm_lreadr): When reading a hash token, check for a
9582 user-defined hash procedure first, so that overriding the builtin
9583 hash characters is possible (this was needed for implementing
9584 SRFI-4's read synax `f32(...)').
9585
9586 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9587 because the latter is unsigned now and breaks comparisons like
9588 (n < (scm_t_signed_bits)MIN_VALUE).
9589
9590 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9591
9592 * eval.h, eval.c (scm_call_4): New function.
9593
9594 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9595 directly rather than dispatching to them via scm_ithrow and a lazy
9596 catch.
9597
9598 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9599 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9600 for trap handler procedures.
9601
9602 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9603 procedures not being #f.
9604
9605 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9606
9607 * Makefile.am (c-tokenize.c): add rule to generate it.
9608 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9609
9610 filter-doc-snarfage.c: remove.
9611
9612 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9613
9614 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9615
9616 The following set of changes makes compiling Guile under various
9617 Windows compilers easier. Compilation under GNU systems should
9618 not be affected at all.
9619
9620 Thanks to Stefan Jahn for all necessary information, patches and
9621 testing.
9622
9623 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9624 getpgrp, ttyname, primitive-fork and some header inclusion for
9625 Windows.
9626
9627 * random.c: Define M_PI, if not predefined and use __int64 for
9628 LONG64 under Windows.
9629
9630 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9631 Windows and conditionalize some signal names.
9632
9633 * socket.c (scm_getsockopt): Added missing comma.
9634 Include socket library header under Windows.
9635
9636 * stime.c (CLKTCK): Add cast to int, to make it compile under
9637 Windows.
9638
9639 * ports.c (truncate): New function, compiled only under Windows.
9640
9641 * net_db.c: Do not declare errno under Windows.
9642
9643 * iselect.h, inet_aton.c: Include socket library headers under
9644 Windows.
9645
9646 * guile.c (inner_main): Under Windows, initialize socket library
9647 and initialize gdb_interface data structures.
9648
9649 * gdb_interface.h: Under Windows, gdb_interface cannot be
9650 initialized statically. Initialize at runtime instead.
9651
9652 * fports.c (write_all): ssize_t -> size_t.
9653 (fport_print): Conditionalize call to ttyname().
9654 (getflags): New function, compiled only under Windows.
9655
9656 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9657 primitives chown, link, fcntl.
9658 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9659 as path seperator.
9660
9661 * backtrace.c: Include <io.h> under Windows.
9662
9663 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9664
9665 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9666 declaration.
9667
9668 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9669
9670 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9671 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9672 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9673 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9674 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9675 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9676 (scm_dynamic_wind, scm_dowinds), environments.c
9677 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9678 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9679 goops.c (GETVAR, purgatory, make_class_from_template,
9680 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9681 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9682 (scm_primitive_load), modules.c (scm_resolve_module,
9683 scm_c_define_module, scm_c_use_module, scm_c_export,
9684 module_variable, scm_eval_closure_lookup, scm_sym2var,
9685 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9686 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9687 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9688 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9689 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9690 (scm_object_to_string, scm_call_with_output_string,
9691 scm_call_with_input_string), throw.c (scm_body_thunk,
9692 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9693 scm_make_shared_array), vports.c (sf_flush, sf_write,
9694 sf_fill_input, sf_close): Use one of the above functions.
9695 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9696
9697 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9698
9699 * filesys.c (scm_close), ports.c (scm_close_port,
9700 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9701 instead of SCM_NEGATE_BOOL.
9702
9703 * filesys.c (scm_stat): Clean up type dispatch.
9704
9705 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9706 scm_output_port_p): Get rid of redundant IM type check.
9707
9708 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9709 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9710 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9711 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9712 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9713 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9714 scm_addr_vector), stime.c (scm_strftime), strings.c
9715 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9716 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9717 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9718 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9719 instead of scm_makfromstr.
9720
9721 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9722 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9723 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9724 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9725 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9726 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9727 !SCM_<pred> over SCM_N<pred>.
9728
9729 * strings.[ch] (scm_makfromstr): Deprecated.
9730
9731 (scm_mem2string): New function, replaces scm_makfromstr.
9732
9733 * strings.c (scm_substring), strop.c (string_copy,
9734 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9735 (scm_symbol_to_string): Fix gc problem.
9736
9737 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9738 SCM_<foo>_H.
9739
9740 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9741 warning about comparing signed and unsigned values. This fix is
9742 not optimal, since it won't work reliably if sizeof (c_start) >
9743 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9744 solution is to define this macro as an inline function, thus
9745 allowing to specifiy the types of c_start and c_end.
9746
9747 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9748
9749 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9750 scm_t_debug_frame*.
9751
9752 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9753 Rename <foo>H to SCM_<foo>_H.
9754
9755 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9756 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9757
9758 (narrow_stack): Make i unsigned. Don't use side-effecting
9759 operations in conditions.
9760
9761 (narrow_stack, scm_make_stack, scm_stack_id,
9762 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9763
9764 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9765 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9766 more.
9767
9768 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9769 signedness.
9770
9771 (scm_last_stack_frame): Remove bogus `;'.
9772
9773 * stacks.h (SCM_FRAMEP): Fix type check.
9774
9775 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9776
9777 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9778 c-tokenize.c when doing maintainer-clean.
9779
9780 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9781
9782 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9783 simplify.
9784
9785 * eval.c: all hash signs are in column 0.
9786
9787 * Makefile.am (guile_filter_doc_snarfage): build using
9788 c-tokenize.c, not filter-doc-snarfage.c.
9789 rearrange snarfing dependencies a bit.
9790
9791 * c-tokenize.lex: new file.
9792
9793 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9794
9795 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9796 scm_t_srcpropso_plist. See the big type renaming.
9797 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9798 Thanks to Seth Alves!
9799
9800 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9801 they aren't defined already.
9802
9803 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9804
9805 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9806 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9807 problem.
9808
9809 * backtrace.c (display_expression, scm_set_print_params_x,
9810 display_application, display_frame, scm_backtrace), numbers.c
9811 (scm_istring2number), objects.c (scm_class_of,
9812 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9813 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9814
9815 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9816 always positive.
9817
9818 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9819 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9820
9821 * objects.c (scm_class_of): Type fix.
9822
9823 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9824 eliminated goto.
9825
9826 * pairs.h (scm_error_pair_access): The function can return if
9827 called recursively.
9828
9829 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9830
9831 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9832
9833 * gdbint.c, init.c: Removed inclusion of tag.h.
9834
9835 * tag.h, tag.c: Removed files.
9836
9837 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9838
9839 2001-06-20 Gary Houston <ghouston@arglist.com>
9840
9841 * deprecation.c, extensions.c, rw.c: include string.h.
9842
9843 2001-06-19 Gary Houston <ghouston@arglist.com>
9844
9845 * filter-doc-snarfage.c (process): added ungetc in
9846 MULTILINE_COOKIE case since otherwise it fails when there's no
9847 space between the '(' and the quote of the following string
9848 (gcc 3.0).
9849
9850 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9851
9852 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9853
9854 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9855
9856 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9857 extension takes place.
9858 * strings.h (SCM_STRING_LENGTH): Likewise.
9859 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9860
9861 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9862 it.
9863
9864 * tags.h: Include <stdint.h> when we have it.
9865 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9866 available. Else use "unsigned long".
9867 (scm_signed_bits_t): New.
9868
9869 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9870 (SCM_INUM): Cast result to scm_signed_bits_t.
9871
9872 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9873
9874 * mkstemp.c: Update path to #include file scmconfig.h.
9875 Thanks to Golubev I. N.
9876
9877 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9878
9879 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9880
9881 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
9882 the macro definition.
9883
9884 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9885 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9886 instead of SCM_INST_TYPE.
9887
9888 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9889 the object is a struct before accessing its struct flags.
9890
9891 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9892
9893 2001-06-10 Gary Houston <ghouston@arglist.com>
9894
9895 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9896 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9897 work reliably anymore. try it from boot-9.scm instead.
9898
9899 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9900
9901 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9902 Thanks to Matthias Köppe!
9903
9904 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9905
9906 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9907 space-happy C preprocessors.
9908
9909 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9910 inside cookies. thanks to Matthias Köppe!
9911
9912 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9913
9914 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9915 keywords. Fix gc protection.
9916
9917 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9918 operations in macro calls.
9919
9920 * pairs.c (scm_error_pair_access): Avoid recursion.
9921
9922 Thanks to Matthias Koeppe for reporting the bugs that correspond
9923 to the following set of patches.
9924
9925 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9926 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9927 bitvector base address using SCM_BITVECTOR_BASE.
9928
9929 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9930 unsigned long*.
9931
9932 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9933
9934 * goops.c (SCM_CLASS_REDEF): Removed.
9935
9936 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9937 SCM_<foo>_H.
9938
9939 Thanks to Matthias Koeppe for reporting the bugs that correspond
9940 to the following set of patches.
9941
9942 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9943 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9944 scm_sys_allocate_instance, clear_method_cache,
9945 scm_sys_invalidate_method_cache_x, scm_make,
9946 create_standard_classes, scm_make_port_classes, scm_make_class,
9947 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9948
9949 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9950
9951 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9952
9953 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9954 UNARY_ELTS_CODE): Remove bogus break statement.
9955
9956 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9957 Don't access bit vectors elements as SCM objects.
9958
9959 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9960 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9961 Don't assign to an unpacked value.
9962
9963 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9964
9965 * __scm.h (SCM_NORETURN): Moved here from error.h.
9966
9967 (SCM_UNUSED): New macro.
9968
9969 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9970
9971 * backtrace.c (display_error_handler), continuations.c
9972 (continuation_print), debug.c (debugobj_print), dynwind.c
9973 (guards_print), environments.c (observer_print,
9974 core_environments_finalize, leaf_environment_cell,
9975 leaf_environment_print, eval_environment_print,
9976 eval_environment_observer, import_environment_define,
9977 import_environment_undefine, import_environment_print,
9978 import_environment_observer, export_environment_define,
9979 export_environment_undefine, export_environment_print,
9980 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9981 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9982 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9983 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9984 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9985 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9986 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9987 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9988 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9989 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9990 set_slot_value, test_slot_existence, scm_change_object_class,
9991 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9992 default_setter), guardians.c (guardian_print, guardian_gc_init,
9993 guardian_zombify, whine_about_self_centered_zombies), guile.c
9994 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9995 mallocs.c (malloc_print), numbers.c (scm_print_real,
9996 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9997 end_input_default, scm_port_print, fill_input_void_port,
9998 write_void_port), root.c (root_print), smob.c (scm_mark0,
9999 scm_free0, scm_smob_print, scm_smob_apply_1_error,
10000 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
10001 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
10002 (scm_struct_free_0, scm_struct_free_standard,
10003 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
10004 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
10005 scm_handle_by_throw, scm_ithrow), weaks.c
10006 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
10007 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
10008 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
10009
10010 * error.h (SCM_NORETURN): Moved to __scm.h.
10011
10012 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
10013 Renamed <foo>H to SCM_<foo>_H.
10014
10015 * gc.c (debug_cells_gc_interval): New static variable.
10016
10017 (scm_assert_cell_valid): If selected by the user, perform
10018 additional garbage collections.
10019
10020 (scm_set_debug_cell_accesses_x): Extended to let the user specify
10021 if additional garbage collections are desired.
10022
10023 (mark_gc_async): If additional garbage collections are selected
10024 by the user, don't call the after-gc-hook. Instead require the
10025 user to run the hook manually.
10026
10027 * pairs.c (scm_error_pair_access): New function. Only compiled
10028 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
10029
10030 * pairs.h (SCM_VALIDATE_PAIR): New macro.
10031
10032 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
10033 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
10034 is a real pair object. (Glocs are also accepted, but that may
10035 change.) If not, abort with an error message.
10036
10037 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10038
10039 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
10040
10041 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
10042 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
10043
10044 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
10045
10046 * extensions.c (scm_c_register_extension): Allow NULL as library
10047 name.
10048 (load_extension): Ignore NULL library names when comparing.
10049
10050 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
10051 non-pointers are being compared. Thanks to Alexander Klimov!
10052
10053 2001-06-04 Gary Houston <ghouston@arglist.com>
10054
10055 * rw.c (scm_write_string_partial): new procedure implementing
10056 write-string/partial in (ice-9 rw).
10057 * rw.h: declare scm_write_string_partial.
10058
10059 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
10060
10061 * keywords.c (keyword_print): Substract 1 from length of symbol
10062 name, accounting for the silly dash.
10063
10064 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
10065 Do not emit deprecation warning.
10066
10067 Added exception notice to all files.
10068
10069 * dynl.c: Include "deprecation.h".
10070
10071 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
10072
10073 * dynl.c (scm_register_module_xxx, scm_registered_modules,
10074 scm_clear_registered_modules): Deprecated.
10075
10076 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
10077
10078 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
10079 guile-snarf-docs-texi.
10080
10081 * fports.c: HAVE_ST_BLKSIZE changed to
10082 HAVE_STRUCT_STAT_ST_BLKSIZE.
10083 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
10084 HAVE_STRUCT_STAT_ST_BLKSIZE.
10085
10086 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
10087 HAVE_STRUCT_STAT_ST_RDEV.
10088 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
10089 HAVE_STRUCT_STAT_ST_BLKSIZE.
10090 (scm_stat2scm): HAVE_ST_BLOCKS changed to
10091 HAVE_STRUCT_STAT_ST_BLOCKS.
10092
10093 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
10094
10095 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
10096 of scm_eval_x to allow module changes between the forms in the
10097 string. Set/restore module using scm_c_call_with_current_module.
10098
10099 * mkstemp.c: New file, slightly modified from libiberties
10100 mkstemps.c.
10101
10102 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
10103
10104 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
10105 filter-doc-snarfage.c: new files.
10106
10107 * Makefile.am: add stuff to [build,] use and distribute
10108 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
10109
10110 * guile-snarf.in: grok the new snarf output.
10111
10112 * snarf.h: make the output both texttools- and `read'-friendly.
10113
10114 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
10115 guile-snarf-docs. (should also deprecate, I guess. maybe not).
10116
10117 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
10118
10119 * print.c (scm_simple_format): Support "~~" and "~%". Signal
10120 error for unsupported format controls and for superflous
10121 arguments. Thanks to Daniel Skarda!
10122
10123 * print.h, print.c (scm_print_symbol_name): Factored out of
10124 scm_iprin1.
10125 (scm_iprin1): Call it.
10126
10127 * keywords.c (keyword_print): Use scm_print_symbol_name so that
10128 weird names are printed correctly.
10129
10130 * print.c (scm_print_symbol_name): Symbols whose name starts with
10131 `#' or `:' or ends with `:' are considered weird.
10132
10133 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10134
10135 * numbers.c (scm_difference, scm_divide): Clarified comments for -
10136 and /.
10137
10138 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10139
10140 * debug.h: Removed prototype for scm_eval_string.
10141
10142 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10143
10144 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
10145 (make-string 2000 #\!))' in an older version).
10146
10147 Change strncpy to memcpy to allow embedded NUL characters in
10148 symbol prefix.
10149
10150 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
10151
10152 * hooks.c (scm_create_hook): deprecated.
10153 (make_hook): deleted.
10154 (scm_make_hook): all the hook creation code is now here.
10155
10156 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10157 a hook, make it permanent, and do a `scm_c_define' on it.
10158
10159 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10160
10161 * socket.c (s_scm_inet_pton): fix docstring quoting.
10162 (s_scm_inet_ntop): ditto.
10163
10164 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10165
10166 * hashtab.c (scm_internal_hash_fold): fix argument position in
10167 SCM_ASSERT.
10168
10169 * environments.c (s_scm_import_environment_set_imports_x): fix
10170 argument position in SCM_ASSERT.
10171
10172 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10173 (s_scm_make_iloc): ditto.
10174
10175 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10176
10177 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10178
10179 * eval.c (promise_print): Read the promise's value as an object.
10180
10181 (SCM_CEVAL): Don't perform side-effecting operations in macro
10182 parameters.
10183
10184 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10185 conditional expression.
10186
10187 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10188 initializer.
10189
10190 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10191 text, removed redundant computation of effective_length and fixed
10192 the overflow check.
10193
10194 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10195 values.
10196
10197 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10198
10199 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10200
10201 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10202 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10203
10204 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10205
10206 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10207 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10208 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10209 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10210
10211 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10212
10213 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10214
10215 * ramap.c (ramap_rp): Removed bogus `;'.
10216
10217 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10218 problem.
10219
10220 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10221 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10222 Read SCM objects rather than scm_bits_t values.
10223
10224 * tags.h (SCM_VOIDP_TEST): Removed.
10225
10226 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10227 value of 2 now corresponds to the former 1, the current 1
10228 corresponds to the former situation that SCM_VOIDP_TEST was
10229 defined.
10230
10231 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10232 If this appears to be not ANSI compliant, we will change it to
10233 typedef struct scm_unused_struct { } * SCM;
10234 Thanks to Han-Wen Nienhuys for the suggestion.
10235
10236 * unif.c (scm_array_set_x): Fix typing problem, and use
10237 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10238 dealing with uniform vectors.
10239
10240 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10241
10242 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10243 (scm_igc): mark from them, too (precisely, not conservatively!).
10244
10245 * root.h (scm_gc_registered_roots): new object in
10246 scm_sys_protects.
10247
10248 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10249 `scm_protect_object'. shouldn't call it at all, though, it seems.
10250
10251 * gc.c (scm_[un]protect_object): deprecated.
10252 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10253 (scm_gc_[un]register_root[s]): new.
10254
10255 * gc.h: add prototypes for scm_gc_[un]protect_object,
10256 scm_gc_[un]register_root[s].
10257
10258 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10259
10260 revert the controversial part of the 2001-05-24 changes.
10261
10262 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10263
10264 * modules.c (scm_env_module): Exported to Scheme.
10265
10266 * eval.c (scm_debug_opts): New option `show-file-name'.
10267
10268 * debug.h (SCM_SHOW_FILE_NAME): New.
10269
10270 * backtrace.c: Include "libguile/filesys.h".
10271 (sym_base, display_backtrace_get_file_line,
10272 display_backtrace_file, display_backtrace_file_and_line): New.
10273 (display_frame): Call display_backtrace_file_and_line if that is
10274 requested.
10275 (display_backtrace_body): Call scm_display_backtrace_file if
10276 requested.
10277
10278 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10279 Prototypes removed since there's no definition for these
10280 functions.
10281
10282 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10283
10284 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10285 Changed use of scm_array->scm_array_t and
10286 scm_array_dim->scm_array_dim_t to enable build with
10287 --disable-deprecated.
10288
10289 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10290
10291 The purpose of this set of changes is to regularize Guile's usage
10292 of ANSI C integral types, with the following ideas in mind:
10293
10294 - SCM does not nesessarily have to be long.
10295 - long is not nesessarily enough to store pointers.
10296 - long is not nesessarily the same size as int.
10297
10298 The changes are incomplete and possibly buggy. Please test on
10299 something exotic.
10300
10301 * validate.h
10302 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10303 new macros.
10304
10305 * unif.h: type renaming:
10306 scm_array -> scm_array_t
10307 scm_array_dim -> scm_array_dim_t
10308 the old names are deprecated, all in-Guile uses changed.
10309
10310 * tags.h (scm_ubits_t): new typedef, representing unsigned
10311 scm_bits_t.
10312
10313 * stacks.h: type renaming:
10314 scm_info_frame -> scm_info_frame_t
10315 scm_stack -> scm_stack_t
10316 the old names are deprecated, all in-Guile uses changed.
10317
10318 * srcprop.h: type renaming:
10319 scm_srcprops -> scm_srcprops_t
10320 scm_srcprops_chunk -> scm_srcprops_chunk_t
10321 the old names are deprecated, all in-Guile uses changed.
10322
10323 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10324 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10325 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10326 vectors.c, vports.c, weaks.c:
10327 various int/size_t -> size_t/scm_bits_t changes.
10328
10329 * random.h: type renaming:
10330 scm_rstate -> scm_rstate_t
10331 scm_rng -> scm_rng_t
10332 scm_i_rstate -> scm_i_rstate_t
10333 the old names are deprecated, all in-Guile uses changed.
10334
10335 * procs.h: type renaming:
10336 scm_subr_entry -> scm_subr_entry_t
10337 the old name is deprecated, all in-Guile uses changed.
10338
10339 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10340 type renaming:
10341 scm_option -> scm_option_t
10342 the old name is deprecated, all in-Guile uses changed.
10343
10344 * objects.c: various long -> scm_bits_t changes.
10345 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10346
10347 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10348 SCM_I_FIXNUM_BIT.
10349
10350 * num2integral.i.c: new file, multiply included by numbers.c, used
10351 to "templatize" the various integral <-> num conversion routines.
10352
10353 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10354 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10355 deprecated.
10356 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10357 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10358 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10359 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10360 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10361 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10362 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10363 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10364 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10365 scm_num2size): new functions.
10366
10367 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10368
10369 * load.c: change int -> size_t in various places (where the
10370 variable is used to store a string length).
10371 (search-path): call scm_done_free, not scm_done_malloc.
10372
10373 * list.c (scm_ilength): return a scm_bits_t, not long.
10374 some other {int,long} -> scm_bits_t changes.
10375
10376 * hashtab.c: various [u]int -> scm_bits_t changes.
10377 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10378 (scm_ihashx): n: uint -> scm_bits_t
10379 use scm_bits2num instead of scm_ulong2num.
10380
10381 * gsubr.c: various int -> scm_bits_t changes.
10382
10383 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10384
10385 * gh_data.c (gh_num2int): no loss of precision any more.
10386
10387 * gh.h (gh_str2scm): len: int -> size_t
10388 (gh_{get,set}_substr): start: int -> scm_bits_t,
10389 len: int -> size_t
10390 (gh_<num>2scm): n: int -> scm_bits_t
10391 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10392 (gh_length): return scm_bits_t, not unsigned long.
10393
10394 * gc.[hc]: various small changes relating to many things stopping
10395 being long and starting being scm_[u]bits_t instead.
10396 scm_mallocated should no longer wrap around.
10397
10398 * fports.h: type renaming:
10399 scm_fport -> scm_fport_t
10400 the old name is deprecated, all in-Guile uses changed.
10401
10402 * fports.c (fport_fill_input): count: int -> scm_bits_t
10403 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10404
10405 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10406 those prototypes, as the functions they prototype don't exist.
10407
10408 * fports.c (default_buffer_size): int -> size_t
10409 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10410 default_size: int -> size_t
10411 (scm_setvbuf): csize: int -> scm_bits_t
10412
10413 * fluids.c (n_fluids): int -> scm_bits_t
10414 (grow_fluids): old_length, i: int -> scm_bits_t
10415 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10416 scm_bits_t
10417 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10418
10419 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10420 the new and shiny SCM_NUM2INT.
10421
10422 * extensions.c: extension -> extension_t (and made a typedef).
10423
10424 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10425 there are no nasty surprises if/when the various deeply magic tag
10426 bits move somewhere else.
10427
10428 * eval.c: changed the locals used to store results of SCM_IFRAME,
10429 scm_ilength and such to be of type scm_bits_t (and not int/long).
10430 (iqq): depth, edepth: int -> scm_bits_t
10431 (scm_eval_stack): int -> scm_bits_t
10432 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10433 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10434 i: int -> scm_bits_t
10435
10436 * environments.c: changed the many calls to scm_ulong2num to
10437 scm_ubits2num.
10438 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10439
10440 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10441
10442 * debug.h: type renaming:
10443 scm_debug_info -> scm_debug_info_t
10444 scm_debug_frame -> scm_debug_frame_t
10445 the old names are deprecated, all in-Guile uses changed.
10446 (scm_debug_eframe_size): int -> scm_bits_t
10447
10448 * debug.c (scm_init_debug): use scm_c_define instead of the
10449 deprecated scm_define.
10450
10451 * continuations.h: type renaming:
10452 scm_contregs -> scm_contregs_t
10453 the old name is deprecated, all in-Guile uses changed.
10454 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10455 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10456
10457 * continuations.c (scm_make_continuation): change the type of
10458 stack_size from long to scm_bits_t.
10459
10460 * ports.h: type renaming:
10461 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10462 scm_port -> scm_port_t
10463 scm_ptob_descriptor -> scm_ptob_descriptor_t
10464 the old names are deprecated, all in-Guile uses changed.
10465 (scm_port_t.entry): int -> scm_bits_t.
10466 (scm_port_t.line_number): int -> long.
10467 (scm_port_t.putback_buf_size): int -> size_t.
10468
10469 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10470 global namespace and have little value beside that).
10471 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10472 SCM handle).
10473 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10474 exist (for size_t & ptrdiff_t).
10475 (scm_sizet): deprecated.
10476
10477 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10478
10479 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10480
10481 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10482 SCM_VARIABLE_INIT since that it what it used to be.
10483
10484 * deprecation.c (scm_include_deprecated_features): Make docstring
10485 ANSIsh. Thanks to Matthias Köppe!
10486
10487 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10488
10489 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10490 needed for weak-key hashtables.
10491
10492 * procs.c (scm_make_subr_with_generic): Add missing last argument
10493 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10494
10495 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10496 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10497
10498 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10499
10500 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10501
10502 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10503 `duplicate_string'. Do not use an indirect cell, store symbol
10504 directly in collision list of hash table.
10505 (duplicate_string): Removed.
10506
10507 * init.c (scm_init_guile_1): Call scm_init_extensions.
10508
10509 * Makefile.am: Add "extensions.c" and related files in all the
10510 right places.
10511
10512 * extensions.h, extension.c: New files.
10513
10514 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10515
10516 * modules.h (scm_system_module_env_p): Move out of deprecated
10517 section.
10518
10519 * rw.h (scm_init_rw): Added prototype.
10520
10521 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10522 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10523 New functions. They replace scm_make_gsubr and
10524 scm_make_gsubr_with_generic. The `make' variants only create the
10525 gsubr object, while the `define' variants also put it into the
10526 current module. Changed all callers.
10527 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10528
10529 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10530 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10531 functions. They replace scm_make_subr, scm_make_subr_opt and
10532 scm_make_subr_with_generic. The `make' variants only create the
10533 subr object, while the `define' variants also put it into the
10534 current module. Changed all callers.
10535 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10536 Deprecated.
10537
10538 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10539 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10540 the comments above.
10541
10542 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10543
10544 * throw.c (scm_lazy_catch): Slight docstring clarification.
10545
10546 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10547
10548 * throw.c: Lazy-catch handlers are no longer allowed to return.
10549 Fixed comments throughout.
10550 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10551 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10552 recognized as such.
10553
10554 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10555 refered to s_scm_minor_version previously.
10556
10557 * modules.h, modules.c: Moved around a lot of code so that
10558 deprecated features appear at the bottom.
10559 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10560 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10561 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10562 scm_load_scheme_module): Deprecated.
10563 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10564 environments corresponding to the root module.
10565 (convert_module_name, scm_c_resolve_module,
10566 scm_c_call_with_current_module, scm_c_define_module,
10567 scm_c_use_module, scm_c_export): New.
10568 (the_root_module): New static variant of scm_the_root_module. Use
10569 it everywhere instead of scm_the_root_module.
10570
10571 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10572 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10573 (scm_c_with_fluid): New.
10574 (scm_with_fluids): Use scm_c_with_fluids instead of
10575 scm_internal_with_fluids.
10576
10577 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10578 `scm_init_goops'. Do not explicitly create/switch modules.
10579 Return SCM_UNSPECIFIED.
10580 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10581 (scm_load_goops): Use scm_c_resolve_module instead of
10582 scm_resolve_module.
10583
10584 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10585 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10586 `scm_init_rw' prior to loading the startup files.
10587
10588 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10589 scm_init_rdelim. Do not explicitly create/switch modules.
10590 Return SCM_UNSPECIFIED.
10591 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10592 procedure.
10593
10594 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10595 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10596 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10597
10598 * script.c (scm_shell): Evaluate the compiled switches in the
10599 current module, not in the root module.
10600
10601 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10602
10603 * fluids.c (scm_c_with_fluids): Rename from
10604 scm_internal_with_fluids.
10605 (scm_internal_with_fluids): Deprecated.
10606 (scm_c_with_fluid): New.
10607
10608 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10609
10610 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10611
10612 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10613 accessed with SCM_C[AD]R.
10614
10615 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10616
10617 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10618
10619 * version.c (s_scm_major_version): doc fixes.
10620 (s_scm_minor_version): doc fixes.
10621 (s_scm_minor_version): new function.
10622
10623 * version.h (scm_init_version): new function.
10624
10625 * versiondat.h.in: add GUILE_MICRO_VERSION.
10626
10627 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10628
10629 * deprecation.c (scm_init_deprecation): Renamed
10630 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10631
10632 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10633
10634 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10635 dependent on cpp_cnvt.awk
10636
10637 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10638
10639 * script.c (scm_compile_shell_switches): New command line option
10640 `--use-srfi' for loading a list of SRFIs on startup.
10641 (scm_shell_usage): Added `--use-srfi' to help message.
10642
10643 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10644
10645 Merged from mvo-vcell-cleanup-1-branch.
10646
10647 The concept of vcells has been removed from Guile. With it,
10648 explicit obarrays and associated operations are gone. Use
10649 hashtables instead of obarrays.
10650
10651 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10652 result as variable instead of vcell. Glocs no longer point to a
10653 vcell but to a variable. Use scm_c_define instead of
10654 scm_sysintern and treat the result as a variable (which it is),
10655 not a vcell.
10656
10657 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10658 SCM_DEFVARIABLEP): Deprecated.
10659 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10660 (variable_print): Do not print name of variable.
10661 (variable_equalp): Compare values, not vcells.
10662 (anonymous_variable_sym): Removed.
10663 (make_vcell_variable): Removed.
10664 (make_variable): New, as replacement.
10665 (scm_make_variable, scm_make_undefined_variable): Do not take name
10666 hint parameter.
10667 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10668 error in that case.
10669 (scm_builtin_variable): Deprecated.
10670
10671 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10672 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10673 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10674 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10675 scm_string_to_obarray_symbol, scm_intern_symbol,
10676 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10677 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10678 Deprecated and moved to "symbols-deprecated.c".
10679 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10680 (scm_init_symbols): Call scm_init_symbols_deprecated.
10681 * symbols-deprecated.c: New file.
10682 * Makefile.am: Added symbols-deprecated.c and related files in all
10683 the right places.
10684
10685 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10686 SCM_GLOBAL_VCELL_INIT): Deprecated.
10687 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10688 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10689
10690 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10691 SCM_GLOC_SYM.
10692
10693 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10694 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10695 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10696 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10697 Changed according to the `throughout' comments.
10698
10699 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10700 to `int'.
10701 (scm_module_type): Removed.
10702 (the_root_module): Renamed to the_root_module_var. Now points to
10703 a variable instead of a vcell. Updated all uses.
10704 (scm_the_root_module): Return SCM_BOOL_F when module systems
10705 hasn't been booted yet.
10706 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10707 (scm_post_boot_init_modules): Made static.
10708 (scm_set_current_module): Call scm_post_boot_init_modules on first
10709 call.
10710 (make_modules_in, beautify_user_module_x, resolve_module,
10711 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10712 suffix. Now point to variables instead of vcells. Updated all
10713 uses.
10714 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10715 and return SCM_BOOL_F in that case.
10716 (scm_module_transformer): Likewise.
10717 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10718 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10719 (scm_eval_closure_lookup): Do not allow new definitions when
10720 `interface' flag is set.
10721 (scm_standard_interface_eval_closure): New.
10722 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10723 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10724 scm_c_lookup, scm_c_module_define, scm_c_define,
10725 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10726 scm_modules_prehistory): New.
10727 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10728 instead of scm_intern0.
10729
10730 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10731 symbol.
10732
10733 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10734 hashtable operations to maintain the keywords, not obarray ones.
10735
10736 * init.c (scm_load_startup_files): Do not call
10737 scm_post_boot_init_modules. This is done by
10738 scm_set_current_module now.
10739 (scm_init_guile_1): Call scm_modules_prehistory. Call
10740 scm_init_variable early on.
10741
10742 * goops.c (s_scm_sys_goops_loaded): Get
10743 var_compute_applicable_methods from scm_sym2var, not from a direct
10744 invocation of scm_goops_lookup_closure.
10745
10746 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10747
10748 * gc.c: Added simple debugging hack to mark phase of GC: When
10749 activated, do not tail-call scm_gc_mark. This gives nice
10750 backtraces.
10751 (scm_unhash_name): Removed.
10752
10753 * feature.c (features): Renamed to features_var. Now points to a
10754 variable instead of a vcell. Updated all uses.
10755
10756 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10757 `scm_current_module_lookup_closure' which will do the right thing
10758 when the module system hasn't been booted yet.
10759 (SCM_GLOC_SYM): Removed.
10760 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10761 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10762
10763 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10764 instead of with vcells. Do not overwrite `var' with the result of
10765 the lookup, use the new `real_var' instead. Remove `var2' in
10766 exchange (which was only used with threads).
10767 (sym_three_question_marks): New.
10768 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10769 `SCM_GLOC_SYM'.
10770 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10771 (scm_m_atfop): Expect the function definition to be a variable
10772 instead of a vcell.
10773 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10774 symbol instead.
10775 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10776 (scm_eval_args): Use more explicit code in the gloc branch of the
10777 atrocious struct ambiguity test. The optimizer will sort this
10778 out.
10779 (scm_deval_args): Likewise.
10780 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10781 remember the symbol instead. Added some comments where
10782 scm_tc3_cons_gloc really exclusively refers to structs.
10783 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10784 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10785 of scm_sysintern in general.
10786
10787 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10788 explicit magic.
10789
10790 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10791 pairs. Put the variable directly in the gloc.
10792 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10793 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10794
10795 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10796
10797 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10798 scm_the_last_stack_fluid_var. It now points to a variable instead
10799 of a vcell. Updated all uses.
10800 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10801 instead of a vcell. Updated all uses.
10802
10803 * _scm.h: Include "variables.h" and "modules.h" since almost
10804 everybody needs them now.
10805
10806 * root.h (scm_symhash, scm_symhash_vars): Removed.
10807 * gc.c (scm_init_storage): Do not initialize them.
10808
10809 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10810
10811 * eval.c (scm_init_eval): Initialize scm_undefineds and
10812 scm_listofnull.
10813
10814 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10815 like the SCM_NEWCELL macro counterparts.
10816
10817 (scm_init_storage, scm_init_gc): Moved initialization of
10818 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10819
10820 (scm_init_storage): Moved initialization of scm_undefineds and
10821 scm_listofnull to eval.c, initializion of scm_nullstr to
10822 strings.c, initializion of scm_nullvect to vectors.c.
10823
10824 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10825 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10826
10827 * init.c (scm_init_guile_1): Reordered some initializations and
10828 added dependcy information comments.
10829
10830 * load.c (scm_init_load): Use scm_nullstr.
10831
10832 * strings.c (scm_init_strings): Initialize scm_nullstr.
10833
10834 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10835
10836 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10837
10838 * values.c (print_values): Print as a unreadable object, not as
10839 multiple lines. Thanks to Matthias Köppe!
10840
10841 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10842
10843 * deprecation.c: Fixed copyright date.
10844
10845 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10846 DEPRECATION_H to SCM_DEPRECATION_H.
10847
10848 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10849
10850 * guile-doc-snarf.in: Update copyright.
10851 Fix relative path bug. Thanks to Sergey Poznyakoff.
10852
10853 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10854
10855 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10856 accept open ports. Thanks to Quetzalcoatl Bradley!
10857
10858 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10859
10860 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10861 has 779 primitives on startup.
10862
10863 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10864
10865 * eval.c (scm_i_eval): Copy expression before passing it to
10866 SCM_XEVAL. The copy operation was removed unintendedly during my
10867 change on 2001-03-25.
10868
10869 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10870
10871 from Matthias Köppe (thanks!):
10872
10873 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10874 portable.
10875
10876 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10877 docstring.
10878
10879 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10880
10881 * gc.c (scm_init_gc): Added FIXME comment.
10882
10883 * hooks.c: Since hooks don't have a name any more, it is not
10884 necessary to include objprop.h.
10885
10886 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10887
10888 (symbol_name, scm_make_hook_with_name): Removed.
10889
10890 (scm_create_hook): Don't set the hook's name property.
10891
10892 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10893
10894 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10895
10896 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10897
10898 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10899 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10900 FLOBUFLEN and define it unconditionally.
10901
10902 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10903
10904 * gh_data.c (gh_lookup): Call gh_module_lookup with
10905 `scm_current_module ()', not `#f'.
10906 (gh_module_lookup): Expect a module instead of an obarray as first
10907 argument and do lookup in that module.
10908
10909 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10910 arrays. The length of array is already determined differently and
10911 scm_uniform_vector_length does not work on arrays.
10912
10913 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10914
10915 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10916 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10917
10918 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10919 they are not used. Changed `wrong type' error into `wrong num
10920 args' error. Changed all callers.
10921
10922 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10923 arguments are supplied.
10924
10925 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10926
10927 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10928 describe `regexp/notbol' and `regexp/noteol' execution flags.
10929
10930 * strop.c (scm_substring_move_x): Doc fix; nfc.
10931
10932 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10933
10934 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10935 (scm_set_object_procedure_x): Use it to check argument. Fix
10936 docstring.
10937
10938 * evalext.c (scm_definedp): Fix docstring.
10939
10940 2001-05-05 Gary Houston <ghouston@arglist.com>
10941
10942 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10943 support.
10944
10945 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10946
10947 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10948 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10949 Change R4RS references to R5RS.
10950
10951 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10952 docstring source are correctly reproduced in the output (ii)
10953 we don't anymore get occasional trailing quotes. Also reorganized
10954 and commented the code a little.
10955
10956 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10957 fixes.
10958
10959 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10960
10961 * strop.c (scm_string_split): New procedure.
10962
10963 * strop.h (scm_string_split): Added prototype.
10964
10965 2001-05-04 Gary Houston <ghouston@arglist.com>
10966
10967 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10968 Dale P. Smith.
10969
10970 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10971
10972 * rw.c: Include "modules.h" and "strports.h".
10973
10974 * net_db.h (scm_gethost): Added prototype.
10975
10976 * deprecation.h, deprecation.c: New.
10977 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10978 (DOT_X_FILES): Added "deprecation.x".
10979 (modinclude_HEADERS): Added "deprecation.h".
10980
10981 * init.c: Include "deprecation.h".
10982 (scm_init_guile_1): Call scm_init_deprecation.
10983
10984 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10985
10986 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10987 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10988 New.
10989
10990 2001-04-29 Gary Houston <ghouston@arglist.com>
10991
10992 * rw.c: new file, implementing C part of module (ice-9 rw).
10993 (scm_read_string_x_partial): moved from ioext.c
10994 (scm_init_rw): new proc.
10995 * rw.h: new file.
10996 init.c: include rw.h and call scm_init_rw.
10997 Makefile.am: include rw.c and rw.h.
10998
10999 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
11000
11001 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
11002 know what's supposed to happen to it.
11003
11004 * list.h (scm_list_star): deprecation expired - removed.
11005
11006 * numbers.h (scm_dblproc): deprecation expired - removed.
11007 (SCM_UNEGFIXABLE): deprecation expired - removed.
11008 (SCM_FLOBUFLEN): deprecation expired - removed.
11009 (SCM_INEXP): deprecation expired - removed.
11010 (SCM_CPLXP): deprecation expired - removed.
11011 (SCM_REAL): deprecation expired - removed.
11012 (SCM_IMAG): deprecation expired - removed.
11013 (SCM_REALPART): deprecation expired - removed.
11014 (scm_makdbl): deprecation expired - removed.
11015 (SCM_SINGP): deprecation expired - removed.
11016 (SCM_NUM2DBL): deprecation expired - removed.
11017 (SCM_NO_BIGDIG): deprecation expired - removed.
11018
11019 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
11020 (scm_tc_dblr): deprecation expired - removed.
11021 (scm_tc_dblc): deprecation expired - removed.
11022 (scm_tc16_flo): deprecation expired - removed.
11023 (scm_tc_flo): deprecation expired - removed.
11024
11025 * tag.h (scm_tag): deprecation expired - removed.
11026
11027 * tag.c: (scm_tag): deprecation expired - removed.
11028
11029 * ioext.c: (scm_fseek): deprecation expired - removed.
11030
11031 * ioext.h (scm_fseek): deprecation expired - removed.
11032
11033 * gh_data.c (gh_int2scmb): deprecation expired - removed.
11034
11035 * gh.h (gh_int2scmb): deprecation expired - removed.
11036
11037 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
11038
11039 * stacks.c (scm_make_stack): Fix typo in docstring.
11040
11041 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
11042
11043 * error.c (scm_sysmissing): deprecation expired - removed.
11044
11045 * error.h (scm_sysmissing): deprecation expired - removed.
11046
11047 * gc.c
11048 (scm_init_gc): gc-thunk deprecation expired - removed.
11049 (scm_gc_vcell): deprecation expired - removed.
11050 (gc_async_thunk): scm_gc_vcell related code removed.
11051
11052 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
11053
11054 * strings.h
11055 (SCM_NSTRINGP): deprecation expired - removed.
11056 (SCM_NRWSTRINGP): deprecation expired - removed.
11057
11058 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
11059
11060 * chars.h
11061 (SCM_ICHRP): deprecation expired - removed.
11062 (SCM_ICHR): deprecation expired - removed.
11063 (SCM_MAKICHR): deprecation expired - removed.
11064
11065 * ports.h
11066 (SCM_INPORTP): deprecation expired - removed.
11067 (SCM_OUTPORTP): deprecation expired - removed.
11068
11069 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
11070
11071 * modules.c (scm_module_type): New.
11072 (scm_post_boot_init_modules): Initialize from Scheme value.
11073 (the_module, scm_current_module, scm_init_modules): the_module is
11074 now a C only fluid.
11075 (scm_current_module): Export to Scheme.
11076 (scm_set_current_module): Do not call out to Scheme, do all the
11077 work in C. Export procedure to Scheme. Only accept modules, `#f'
11078 is no longer valid as the current module. Only set
11079 scm_top_level_lookup_closure_var and scm_system_transformer when
11080 they are not deprecated.
11081 (scm_module_transformer, scm_current_module_transformer): New.
11082
11083 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
11084 scm_current_module_transformer, scm_module_transformer): New.
11085
11086 * gh_data.c: Removed FIXME comment about gh_lookup returning
11087 SCM_UNDEFINED. That's the right thing to do.
11088
11089 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
11090 into the conditionally compiled sections.
11091 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
11092 scm_current_module_transformer instead of scm_system_transformer.
11093 * init.c (start_stack): Move initialization of
11094 scm_system_transformer to the deprecated section.
11095
11096 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
11097
11098 * throw.c (scm_throw): Correct docstring.
11099
11100 2001-04-22 Gary Houston <ghouston@arglist.com>
11101
11102 * socket.c: attempted to improve the docstrings slightly.
11103
11104 * net_db.c: remove bogus "close" declaration.
11105 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
11106 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
11107 moved to socket.c.
11108 * net_db.h: declarations moved too.
11109
11110 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
11111 long.
11112 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
11113 (VALIDATE_INET6): new macro.
11114 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
11115 inet-pton and inet-ntop.
11116 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
11117 (scm_addr_vector): use ipv6_net_to_num.
11118
11119 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11120
11121 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
11122 smob number explicitly. Use SCM_TC2SMOBNUM instead.
11123
11124 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
11125 when compiled in debug mode.
11126
11127 (scm_gc_sweep): Only call smob's free function if it is defined.
11128
11129 * print.c (scm_iprin1): No need to check for validity of smob
11130 type or existence of print function.
11131
11132 * smob.[ch] (scm_smobs): Made into a fixed size global array.
11133 Resizing will not work well with preemptive threading.
11134
11135 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
11136
11137 (scm_make_smob_type): Extracted initialization of smob
11138 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
11139 of the critical section.
11140
11141 (scm_smob_prehistory): Initialize all smob descriptors. By
11142 default, don't assign a smob free function: Most smob types don't
11143 need one.
11144
11145 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
11146
11147 2001-04-21 Gary Houston <ghouston@arglist.com>
11148
11149 * socket.c (FLIP_NET_HOST_128): new macro.
11150 (scm_fill_sockaddr): use new macro.
11151 (scm_addr_vector): completed IPv6 address support. added const
11152 to the address parameter.
11153
11154 2001-04-20 Gary Houston <ghouston@arglist.com>
11155
11156 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11157 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11158 is defined.
11159 (scm_addr_vector): use a switch instead of multiple if statements.
11160 Add support for IPv6 (incomplete) .
11161 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11162
11163 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11164
11165 * struct.c (scm_free_structs): Only pairs may be accessed with
11166 SCM_C[AD]R.
11167
11168 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11169
11170 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11171
11172 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11173 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11174 parentheses in order to get the correct associativity.
11175
11176 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11177
11178 * unif.c (scm_array_to_list): Added missing handling of arrays of
11179 bytes. Thanks to Masao Uebayashi for the bug report.
11180
11181 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11182
11183 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11184 consistently.
11185
11186 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11187
11188 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11189
11190 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11191 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11192 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11193 SCM_CLOSURE_FORMALS.
11194
11195 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11196 (scm_i_procedure_arity): Prefer stronger predicates like
11197 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11198
11199 * macros.c (macro_print): Extracted macro printing code from
11200 print.c and simplified it.
11201
11202 (scm_macro_type): Use SCM_MACRO_TYPE;
11203
11204 (scm_init_macros): Use macro_print for printing macros.
11205
11206 * print.c (scm_print_opts): Improved option documentation.
11207
11208 (scm_iprin1): Extracted printing of macros to macros.c.
11209 Simplified printing of ordinary closures.
11210
11211 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11212 Martin Grabmueller for the bug report.
11213
11214 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11215
11216 This patch eliminates some further applications of SCM_C[AD]R to
11217 non pair cells.
11218
11219 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11220 never been applied to real pairs.
11221
11222 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11223
11224 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11225
11226 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11227 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11228 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11229
11230 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11231 Added.
11232
11233 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11234 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11235
11236 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11237 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11238 SCM_SET{AND,OR}_CAR.
11239
11240 2001-04-17 Gary Houston <ghouston@arglist.com>
11241
11242 * some initial support for IPv6:
11243
11244 * socket.c (scm_fill_sockaddr): improve the argument validation.
11245 don't allocate memory until all args are checked. instead of
11246 unconditional memset of soka, try setting sin_len to 0 if
11247 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11248 (scm_socket, scm_connect): extend docstrings for IPv6.
11249 (scm_init_socket): intern AF_INET6 and PF_INET6.
11250
11251 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11252
11253 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11254 matches SCM_DEFER_INTS at the beginning of the function.
11255
11256 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11257
11258 * gc.c (scm_igc): Unconditionally call
11259 SCM_CRITICAL_SECTION_START/END.
11260
11261 * fluids.c (next_fluid_num): Unconditionally call
11262 SCM_CRITICAL_SECTION_START/END.
11263 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11264
11265 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11266 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11267 Removed.
11268
11269 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11270 Defined as nothing for the case of !defined(USE_THREADS).
11271 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11272 Removed.
11273 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11274 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11275 LINE.
11276 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11277 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11278 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11279 SCM_CRITICAL_SECTION_START/END.
11280 (SCM_REALLOW_INTS: Bug fix. Don't call
11281 SCM_THREAD_SWITCHING_CODE.
11282 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11283 SCM_THREAD_SWITCHING_CODE directly.
11284 (SCM_ENTER_A_SECTION): Unconditionally use
11285 SCM_CRITICAL_SECTION_START/END. (was:
11286 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11287
11288 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11289
11290 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11291 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11292 allowed to explicitly set this macro via the CFLAGS variable
11293 during make.
11294
11295 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11296 (SCM_THREAD_CRITICAL_SECTION_START,
11297 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11298 SCM_THREAD_CRITICAL_SECTION_START/END to
11299 SCM_CRITICAL_SECTION_START/END.
11300
11301 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11302
11303 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11304 instead of bzero.
11305
11306 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11307 (MISSING_BZERO_DECL): Remove the declaration.
11308
11309 Thanks to NIIBE Yutaka.
11310
11311 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11312
11313 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11314 goops module should be registered in order to work for an
11315 application which uses libguile statically linked.)
11316
11317 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11318
11319 * numbers.[ch] (scm_num2long, scm_num2long_long,
11320 scm_num2ulong_long, scm_num2ulong): Argument position is an
11321 unsigned integer.
11322
11323 * environments.c (eval_environment_folder,
11324 import_environment_folder), gh_data.c (gh_scm2longs,
11325 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11326 for integers and pointers, respectively.
11327
11328 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11329 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11330 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11331 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11332
11333 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11334 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11335 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11336 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11337 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11338 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11339
11340 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11341
11342 * strings.c (scm_read_only_string_p): Update docstring to reflect
11343 current (non-)usage of "read only" strings.
11344 (scm_make_shared_substring): Clarify docstring by changing
11345 "semantics" to "arguments".
11346
11347 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11348
11349 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11350 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11351 improvements.
11352
11353 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11354
11355 The following changes make the documentation more consistent.
11356
11357 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11358 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11359 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11360 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11361 ... @end lisp.
11362
11363 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11364 (scm_array_dimensions, scm_make_shared_array),
11365 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11366 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11367 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11368 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11369 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11370 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11371 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11372 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11373 @example ... @end example to @lisp ... @end lisp.
11374
11375 * weaks.c (scm_weak_vector): Corrected docstring.
11376
11377 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11378 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11379 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11380 (scm_hashx_set_x, scm_hashx_get_handle),
11381 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11382 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11383 vectors.c (scm_vector_fill_x), strings.c
11384 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11385 objprop.c (scm_set_object_properties_x):
11386 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11387 strports.c (scm_call_with_input_string), ports.c
11388 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11389 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11390 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11391 (scm_make_weak_vector,scm_weak_vector_p),
11392 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11393 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11394 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11395 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11396 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11397 Made parameter names match documentation by renaming parameters
11398 and/or fixing docstrings.
11399
11400 * numbers.c (scm_ash): Corrected Texinfo markup.
11401
11402 * strop.c (scm_string_index, scm_string_rindex),
11403 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11404
11405 * vports.c (scm_make_soft_port), unif.c
11406 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11407 (scm_dimensions_to_uniform_array, scm_transpose_array),
11408 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11409 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11410 (scm_array_to_list, scm_list_to_uniform_array),
11411 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11412 (scm_open_input_string, scm_open_output_string),
11413 (scm_get_output_string), strop.c (scm_string_copy),
11414 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11415 (scm_get_internal_real_time, scm_times),
11416 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11417 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11418 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11419 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11420 simpos.c (scm_system), random.c (scm_random_uniform),
11421 (scm_random_normal, scm_random_exp), ramap.c
11422 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11423 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11424 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11425 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11426 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11427 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11428 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11429 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11430 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11431 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11432 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11433 (scm_integer_expt, scm_bit_extract, scm_logcount),
11434 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11435 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11436 (scm_interaction_environment), macros.c (scm_makacro),
11437 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11438 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11439 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11440 (scm_fluid_ref), filesys.c (scm_open_fdes),
11441 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11442 Docstring correction: `Returns' -> `Return'
11443
11444 * gc.c (scm_set_debug_cell_accesses_x):
11445 (s_scm_gc_set_debug_check_freelist_x):
11446 * fluids.c (scm_fluid_p): Added texinfo markup.
11447
11448 * error.c (scm_strerror): Made docstring more precise.
11449
11450 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11451 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11452 (scm_symbol_p, scm_symbol_to_string), strorder.c
11453 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11454 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11455 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11456 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11457 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11458
11459 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11460
11461 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11462 mode, as suggested by Michael Livshin.
11463
11464 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11465
11466 * backtrace.c (display_backtrace_body): since the `print_state'
11467 variable is not used (instead its data field is used directly as
11468 `pstate'), protect it from the hungry compiler optimizations.
11469 thanks to Bill Schottstaedt for the report.
11470
11471 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11472
11473 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11474 It is only defined and used if guile is compiled with
11475 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11476 let cells with a free_cell type tag be visible outside of the
11477 garbage collector when in debug mode.
11478
11479 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11480
11481 (scm_assert_cell_valid): Use a local static variable to avoid
11482 recursion.
11483
11484 (MARK): Only check for rogue cell pointers in debug mode. Use
11485 scm_cellp for this purpose and place all checks for rogue pointers
11486 into that function. Further, since due to conservative scanning
11487 we may encounter free cells during marking, don't use the standard
11488 cell type accessor macro to determine the cell type.
11489
11490 (scm_cellp): Check if the cell pointer actually points into a
11491 card header.
11492
11493 (scm_init_gc): Initalize scm_tc16_allocated.
11494
11495 * gc.h (GCH): Renamed to SCM_GC_H.
11496
11497 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11498 might be unnecessary, but I feel better this way :-)
11499
11500 (SCM_GC_CELL_TYPE): New macro.
11501
11502 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11503 in guile, and it is unlikely that they will be applied to real
11504 pairs anyway.
11505
11506 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11507
11508 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11509 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11510
11511 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11512 make sure that in debug mode no free cell will ever be visible
11513 outside of the garbage collector.
11514
11515 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11516
11517 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11518 values.
11519
11520 * async.c (scm_system_async), variable.c (scm_make_variable,
11521 scm_make_undefined_variable): Use scm_cons to create a pair.
11522
11523 * debug.c (scm_reverse_lookup): Perform proper type checking.
11524 Remove suspicious use of SCM_SLOPPY_CONSP.
11525
11526 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11527 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11528 the corresponding optimization.
11529
11530 * eval.c (iqq): Use proper type check.
11531
11532 (scm_m_expand_body): Remove redundant type checks.
11533
11534 (promise_print): Don't access promise cells as pairs.
11535
11536 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11537 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11538 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11539 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11540 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11541
11542 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11543 (scm_iprin1): Use new macro predicate and accessors.
11544
11545 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11546 in macros.h.
11547
11548 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11549 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11550 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11551 SCM_VARIABLE_H. Even the macros that are used to inhibit
11552 including a header file twice should be in the SCM_ namespace.
11553
11554 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11555 properties.c (scm_primitive_property_ref,
11556 scm_primitive_property_del_x): Prefer stronger predicates like
11557 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11558
11559 * gc.c (MARK): Use proper macros to access procedure-with-setter
11560 cell elements and closure cell elements.
11561
11562 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11563 access free cells as pairs.
11564
11565 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11566 no hashtab entry is found.
11567
11568 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11569 SCM_CLR_PORT_OPEN_FLAG.
11570
11571 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11572 use SCM_SET_C[AD]R for uninitialized cells.
11573
11574 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11575 If the hashtable has no slots, return #f instead of '(). This
11576 unifies the return value with most assoc-functions.
11577
11578 (scm_hash_fn_ref): Use proper type check.
11579
11580 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11581 Removed references to non-existing functions from documentation.
11582
11583 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11584 access keyword cell elements.
11585
11586 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11587 macros.
11588
11589 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11590
11591 * print.c (scm_iprlist): Added comment. Improved loop
11592 conditions.
11593
11594 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11595 pairs.
11596
11597 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11598
11599 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11600
11601 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11602 cells as pairs.
11603
11604 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11605 scm_variable_set_x): Use proper macros to access variable cell
11606 elements.
11607
11608 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11609
11610 * variable.h (SCM_VARVCELL): Don't access variable cells as
11611 pairs.
11612
11613 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11614 added FIXME comment, removed register specifier.
11615
11616 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11617
11618 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11619 * init.c (scm_init_guile_1): Don't init goopscore module.
11620
11621 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11622
11623 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11624
11625 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11626
11627 * strop.c (scm_string_to_list): Fixed docstring markup.
11628 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11629 (scm_string_downcase, scm_string_capitalize_x),
11630 (scm_string_capitalize): Rewrote and corrected docstrings.
11631 (scm_string_ci_to_symbol): Made docstring more explicit.
11632
11633 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11634
11635 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11636 eval.c can use it.
11637 (scm_call_with_values): Removed.
11638 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11639 so that it can be exported.
11640 (scm_call_with_values): Removed.
11641
11642 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11643 * eval.c: Include "libguile/values.h"
11644 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11645 New.
11646 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11647 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11648 New delcarations to support above change.
11649
11650 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11651 errors with last change.
11652
11653 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11654
11655 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11656 scm_i_eval): Moved the application of the system transformer from
11657 scm_i_eval to scm_primitive_eval.
11658
11659 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11660
11661 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11662
11663 * strop.c (scm_string_index): Fix docstring line break
11664 regression.
11665
11666 * list.c (scm_cons_star): Fix docstring typo.
11667
11668 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11669
11670 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11671 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11672 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11673 scm_make_string, scm_string_append), strports.c (st_resize_port,
11674 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11675 scm_makstr with calls to scm_allocate_string.
11676
11677 * strings.[ch] (scm_allocate_string): New function.
11678
11679 * strings.[ch] (scm_makstr): Deprecated.
11680
11681 2001-03-18 Gary Houston <ghouston@arglist.com>
11682
11683 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11684 NULL. rewrote the docstring.
11685 (scm_mkstemp): new procedure implementing "mkstemp!".
11686 * posix.h: declare scm_mkstemp.
11687
11688 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11689 normally it would be found in netdb.h.
11690
11691 2001-03-17 Gary Houston <ghouston@arglist.com>
11692
11693 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11694 warning when HAVE_ARRAYS is not defined. move len too.
11695
11696 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11697 (EXTRA_DOT_X_FILES): let configure set the value.
11698 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11699
11700 * gc.c (scm_must_malloc): changed the comment explaining when
11701 scm_must variants of malloc/free etc., should be used, based on
11702 explanation from Dirk Herrmann.
11703 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11704 string with procedure name. use scm_must_malloc instead of malloc.
11705 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11706 of malloc/free.
11707 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11708 scm_ungetc): use scm_must variants of malloc/realloc/free.
11709 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11710
11711 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11712
11713 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11714 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11715 scm_wrong_type_arg instead.
11716
11717 (SCM_WNA): Deprecated.
11718
11719 * error.[ch] (scm_wta): Deprecated.
11720
11721 * numbers.c (s_i_log): Minor comment fix.
11722
11723 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11724 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11725 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11726 wrong-num-args or misc errors.
11727
11728 * unif.c (scm_make_shared_array, scm_transpose_array,
11729 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11730 Validate the rest argument (note: this is only done when guile is
11731 built with SCM_DEBUG_REST_ARGUMENT=1)
11732
11733 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11734 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11735
11736 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11737 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11738
11739 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11740
11741 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11742 instead of scm_wrong_num_args.
11743
11744 * coop-threads.c: Don't include libguile/strings.h. (Was only
11745 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11746
11747 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11748 wrong-num-args errors.
11749
11750 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11751
11752 * error.[ch] (scm_error_num_args_subr): New function.
11753
11754 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11755
11756 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11757 (scm_length, scm_append, scm_reverse, scm_list_ref),
11758 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11759 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11760 (scm_delete1_x), gc.c (scm_map_free_list),
11761 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11762 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11763 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11764 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11765 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11766 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11767 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11768
11769 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11770 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11771 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11772 symbols.c (scm_symbol_interned_p), numbers.c
11773 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11774 markup.
11775
11776 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11777
11778 * snarf.h (SCM_CONST_LONG): Deprecated.
11779 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11780
11781 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11782
11783 * numbers.c (scm_num2ulong): Check that a bignum is positive
11784 before looking at the magnitude. Correctly check for overflow
11785 during conversion.
11786 (scm_num2long_long): Likewise.
11787 (scm_num2ulong_long): New.
11788 (ULONG_LONG_MAX): Define if not already defined.
11789 * numbers.h: (scm_num2ulong_long): New prototype.
11790
11791 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11792
11793 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11794
11795 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11796 (SCM_OPOUTSTRPORTP): New predicate macros.
11797 (scm_open_input_string, scm_open_output_string),
11798 (scm_get_output_string): New prototypes.
11799
11800 * strports.c (scm_open_input_string, scm_open_output_string),
11801 (scm_get_output_string): New procedures (SRFI-6 compliant).
11802 Made scm_tc16_strport non-static.
11803
11804 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11805
11806 * macros.h (SCM_ASSYNT): Removed unused object argument from
11807 signature.
11808
11809 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11810 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11811 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11812 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11813 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11814 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11815 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11816 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11817 scm_m_atdispatch): Removed unused object argument from call to
11818 SCM_ASSYNT.
11819
11820 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11821
11822 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11823 const int* to reflect that the input array of integers remains
11824 unchanged. Thanks to Brett Viren for the hint.
11825
11826 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11827
11828 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11829 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11830 in various places.
11831 (gh_scm2newstr, gh_symbol2newstr): Change call to
11832 scm_must_malloc() to malloc(), because user-free()able memory is
11833 allocated.
11834
11835 * gc.c: Added declaration of `scm_debug_check_freelist'.
11836
11837 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11838
11839 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11840
11841 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11842
11843 * strports.c (scm_object_to_string): New procedure.
11844 (scm_strprint_obj): Deprecated.
11845 * strports.h: Reflect the changes.
11846
11847 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11848
11849 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11850
11851 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11852 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11853 SCM_ASSYNT to check for correct argument types. Either use some
11854 SCM_VALIDATE_* macro or an explicit test.
11855
11856 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11857 misc-errors.
11858
11859 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11860 instead of calling scm_wta.
11861
11862 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11863
11864 * load.c (scm_primitive_load, scm_primitive_load_path),
11865 (scm_sys_search_load_path): Corrected docstrings (file ->
11866 filename).
11867
11868 * eval.c (scm_force): Added texinfo markup to docstring.
11869 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11870
11871 * debug-malloc.c: Reinserted #include <stdio.h>.
11872
11873 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11874
11875 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11876
11877 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11878 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11879 Use SCM_LISTn instead of scm_listify.
11880
11881 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11882
11883 * _scm.h: Removed #include <errno.h>.
11884
11885 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11886 errno variable (can be a macro on some systems, for example when
11887 using linux libc with threads).
11888
11889 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11890 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11891 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11892 #include <errno.h> in these 20 out of 100 files.
11893
11894 2001-03-10 Gary Houston <ghouston@arglist.com>
11895
11896 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11897 not already defined.
11898
11899 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11900
11901 * coop.c: Inserted #include <stdio.h>.
11902
11903 * iselect.c: Reinserted #include <stdio.h>.
11904
11905 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11906
11907 * posix.c: Replaced `#define' of __USE_XOPEN right before
11908 including unistd.h with a define of _GNU_SOURCE at the very top of
11909 the file.
11910
11911 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11912
11913 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11914 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11915 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11916 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11917 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11918 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11919 print.c, procprop.c, procs.c, properties.c, ramap.c,
11920 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11921 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11922 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11923 Remove #include <stdio.h>
11924 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11925
11926 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11927
11928 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11929
11930 * posix.c (scm_gethostname): Set initial name length to 256 for
11931 Solaris.
11932
11933 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11934
11935 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11936 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11937 (scm_sethostname, scm_gethostname): New prototypes.
11938
11939 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11940 <sys/file.h>, if present.
11941 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11942 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11943 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11944 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11945 (scm_sethostname, scm_gethostname): New procedures.
11946
11947 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11948
11949 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11950 not optional (ii) "recommend" spelling correction.
11951
11952 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11953
11954 * ramap.c (racp): Removed optimization which caused array copying
11955 to fail if the two arrays shared storage. Re-inserted the IVDEP
11956 macros removed in the change of 2000-03-09. (Don't really have a
11957 complete grasp of what they are for, but they seem to be necessary
11958 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11959
11960 * hash.c (scm_string_hash): Don't downcase characters.
11961
11962 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11963
11964 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11965 size from 277 --> 1009.
11966
11967 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11968 function.
11969
11970 * coop-threads.c: Fixed change of 2001-03-06.
11971
11972 * validate.h: Code formatting.
11973
11974 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11975
11976 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11977 (*.doc): Add dependency on guile-snarf.awk.in.
11978
11979 * guile-snarf.awk.in: Neglect spaces at the end of
11980 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11981 middle of docstrings. (To avoid the problem with gcc-2.96.)
11982
11983 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11984
11985 * coop-threads.c (scm_call_with_new_thread), load.c
11986 (scm_primitive_load, scm_sys_search_load_path), random.c
11987 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11988 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11989 (potentially) issue a scm-misc-error or wrong-num-args error
11990 message.
11991
11992 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11993 about the expected type with the wrong-type-arg error message.
11994
11995 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11996 a C level bug that can't be fixed from scheme anyway.
11997
11998 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11999
12000 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
12001 Duplicate bindings are OK in a let* since a let* is semantically
12002 equivalent to a nested set of let:s.
12003
12004 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12005
12006 * print.c (scm_print_options): Fixed texinfo in docstring.
12007
12008 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
12009 the underlying functions getservent, getprotoent or getnetent
12010 return NULL instead of signalling an error.
12011
12012 2001-03-04 Gary Houston <ghouston@arglist.com>
12013
12014 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
12015 taking an unexpectedly large filename for an AF_UNIX socket from
12016 bind/connect/sendto (thanks to Martin Grabmueller).
12017
12018 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
12019 former and adjusted the latter.
12020 (scm_socket, scm_socketpair): cosmetic changes.
12021 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
12022 size_t as socklen_t substitute. don't restrict args/return values
12023 to INUM: allow full range of int or size_t.
12024 (scm_fill_sockaddr): check arguments before allocating memory, to
12025 avoid leakage. use malloc, not scm_must_malloc.
12026 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
12027 substitute. free the sockaddr structure before throwing an error.
12028 (scm_init_add_buffer): procedure removed, together with its static
12029 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
12030 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
12031 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
12032 scm_sendto): use a local buffer instead of scm_addr_buffer.
12033 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
12034 not size_t.
12035 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
12036 call to detect whether recvfrom could be bothered to set the address.
12037 (scm_init_socket): don't call scm_init_addr_buffer.
12038
12039 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12040
12041 * debug.c (scm_procedure_source, scm_procedure_environment),
12042 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
12043 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
12044 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
12045 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
12046 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
12047 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
12048 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
12049 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
12050 scm_array_to_list, scm_array_prototype), validate.h
12051 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
12052 scm_misc_error or scm_wrong_type_arg instead.
12053
12054 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
12055
12056 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12057
12058 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
12059 (scm_sys_tag_body): Added.
12060
12061 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12062
12063 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
12064 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
12065 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
12066 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
12067 options.c (scm_options), ports.c (scm_remove_from_port_table),
12068 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
12069 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
12070 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
12071 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
12072 instead.
12073
12074 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12075
12076 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
12077
12078 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
12079
12080 * eval.c (scm_s_duplicate_bindings): New error message.
12081 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
12082
12083 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
12084
12085 * eval.h (SCM_EVALIM2): New macro. Use it when a
12086 immediate, literal constant should be evaluated.
12087 * eval.c (scm_s_duplicate_formals): New error message string.
12088 (scm_c_improper_memq): New function.
12089 (scm_m_lambda): Check for duplicate arguments.
12090 (scm_ceval, scm_deval): When executing a body: only cons a new
12091 toplevel environment frame when it is different from the
12092 existing one; use EVALCAR instead of SIDEVAL so that we can properly
12093 check for empty combinations; use SCM_EVALIM2 for the same reason
12094 in the non-toplevel loop.
12095 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
12096 New labels with the meaning of their non-"nontoplevel" partners,
12097 but they are used when it is known that the body is not evaluated at
12098 top-level.
12099 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
12100 reporting for empty combinations.
12101
12102 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
12103
12104 * Remove dump facilities.
12105 * dump.c, dump.h: Removed.
12106 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
12107 * init.c: Remove #include "libguile/dump.h".
12108 (scm_init_guile_1): Remove scm_init_dump.
12109 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
12110 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
12111 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
12112 (scm_set_smob_dump, scm_set_smob_undump): Removed.
12113
12114 * keywords.c: Remove #include "libguile/dump.h".
12115 (keyword_dump, keyword_undump): Removed.
12116 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
12117
12118 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12119
12120 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
12121 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
12122 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
12123 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
12124 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
12125 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
12126 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
12127 to @code{} as the texinfo manual recommends, converted the
12128 examples to use a @lisp{}-environment.
12129
12130 * strports.c (scm_eval_string): Cleaned up the docstring.
12131
12132 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
12133 markup.
12134
12135 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
12136 (scm_number_to_string, scm_string_to_number, scm_number_p)
12137 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
12138 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
12139 (scm_ash): Added texinfo markup and removed obsolete @refill.
12140 (scm_gr_p): Corrected comment.
12141 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
12142 docstring) comments.
12143 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
12144 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
12145 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
12146 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
12147 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
12148 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
12149 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
12150 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
12151
12152 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
12153
12154 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
12155 (Obviously nobody compiles with SCM_RECKLESS defined...)
12156
12157 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12158
12159 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12160
12161 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12162
12163 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12164
12165 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12166
12167 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12168 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12169 since use of `z' suggests that the arguments may be complex.
12170
12171 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12172 typos.
12173
12174 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12175
12176 * dump.c (scm_binary_write, scm_binary_read), eval.c
12177 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12178 scm_guardian_greedy_p, scm_make_guardian), fports.c
12179 (scm_file_port_p): Minor docstring fixes.
12180
12181 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12182
12183 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12184
12185 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12186 scm_i_eval.
12187 (make_class_from_template): Do not bother to set the current
12188 module around the call to DEFVAR, scm_eval takes care of that.
12189 (scm_init_goops): Make scm_module_goops and
12190 scm_goops_lookup_closure permanent objects.
12191
12192 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12193 top level, create a fresh top-level environment for each
12194 expression instead of mutating the exisint frame. This is
12195 important when that frame is closed over.
12196
12197 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12198 SCM_DIGSPERLONG instead of DIGSPERLONG.
12199
12200 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12201
12202 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12203 before applying arrow procedure in `cond' and before applying
12204 receiver procedure in call-with-current-continuation.
12205 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12206 macro. The argument is expanded more than one time.
12207
12208 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12209 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12210
12211 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12212
12213 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12214 notice and license.
12215
12216 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12217
12218 * variable.c (scm_make_variable, scm_make_undefined_variable)
12219 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12220 (scm_variable_bound_p), values.c (scm_values)
12221 (scm_call_with_values), unif.c (scm_bit_count)
12222 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12223 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12224 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12225 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12226 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12227 (scm_copy_random_state, scm_random), print.c (scm_newline)
12228 (scm_write_char, scm_simple_format), debug-malloc.c
12229 (scm_malloc_stats), environments.c (scm_environment_p)
12230 (scm_environment_bound_p, scm_environment_ref)
12231 (scm_environment_fold, scm_environment_define)
12232 (scm_environment_undefine, scm_environment_set_x)
12233 (scm_environment_cell, scm_environment_observe)
12234 (scm_environment_observe_weak, scm_environment_unobserve)
12235 (scm_make_eval_environment, scm_eval_environment_p)
12236 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12237 (scm_eval_environment_imported)
12238 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12239 (scm_import_environment_p, scm_import_environment_imports)
12240 (scm_import_environment_set_imports_x, scm_make_export_environment)
12241 (scm_export_environment_p, scm_export_environment_private)
12242 (scm_export_environment_set_private_x)
12243 (scm_export_environment_signature)
12244 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12245 Added texinfo markup.
12246
12247 * ports.c (scm_drain_input): Lowercased argument to @var.
12248 (scm_current_input_port, scm_current_output_port): Filled in
12249 missing explanation.
12250 (scm_current_load_port, scm_set_current_output_port)
12251 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12252 Added texinfo markup.
12253
12254 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12255 (scm_release_arbiter): Added texinfo markup to docstrings.
12256 Changed `Returns' to `Return'.
12257 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12258
12259 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12260
12261 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12262 by doubling them to `@@'.
12263
12264 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12265
12266 * numbers.c (scm_lognot), random.c (scm_random,
12267 scm_random_normal, scm_random_solid_sphere_x,
12268 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12269 scm_random_exp), dynwind.c
12270 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12271
12272 * goops.c (scm_sys_initialize_object, scm_instance_p,
12273 scm_class_name, scm_class_precedence_list, scm_class_slots,
12274 scm_class_environment, scm_generic_function_name,
12275 scm_generic_function_methods, scm_method_generic_function,
12276 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12277 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12278 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12279 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12280 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12281 scm_class_direct_supers, scm_class_direct_slots,
12282 scm_class_direct_subclasses, scm_class_direct_methods,
12283 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12284 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12285 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12286 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12287 scm_memoized_environment, scm_procedure_name,
12288 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12289 objects.c
12290 (scm_class_of, scm_entity_p, scm_operator_p,
12291 scm_set_object_procedure_x, scm_object_procedure,
12292 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12293 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12294 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12295 scm_hook_to_list), lang.c
12296 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12297 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12298 (scm_print_options, scm_port_with_print_state,
12299 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12300 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12301 scm_make_procedure_with_setter, scm_procedure), throw.c
12302 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12303 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12304 scm_stack_ref, scm_stack_length, scm_frame_p,
12305 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12306 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12307 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12308 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12309 (scm_dirname, scm_basename), dynwind.c
12310 (scm_wind_chain), read.c (scm_read_options, scm_read,
12311 scm_read_hash_extend), gc.c
12312 (scm_unhash_name), eval.c (scm_eval_options_interface,
12313 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12314 (scm_display_error, scm_set_print_params_x,
12315 scm_display_application, scm_display_backtrace, scm_backtrace),
12316 async.c (scm_async, scm_system_async, scm_async_mark,
12317 scm_system_async_mark, scm_run_asyncs, scm_noop,
12318 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12319 scm_mask_signals): Added docstrings.
12320
12321 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12322
12323 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12324 address of car/cdr. (Thanks to Dirk Herrmann)
12325 Use scm_sizet to obtain the length of strings.
12326 (Thanks to Matthias Koeppe)
12327
12328 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12329
12330 * symbols.c (scm_mem2symbol): Put a empty statement after the
12331 next_symbol label. This is mandated by ANSI, appearantly.
12332
12333 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12334
12335 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12336 sense to compile for a specific kernel version. Do not include
12337 <asm/signal.h> while defining __KERNEL__. This hack should no
12338 longer be needed and caused problems.
12339
12340 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12341
12342 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12343 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12344 can not deal with immediates.
12345
12346 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12347
12348 * list.c (scm_list_copy): Validate the first argument.
12349
12350 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12351
12352 Fix evaluator so that top-level expressions are correctly
12353 evaluated with respect to the module system.
12354
12355 * modules.h. modules.c (scm_current_module_lookup_closure): New
12356 function.
12357
12358 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12359 prototypes.
12360 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12361 names to better reflect their meaning.
12362
12363 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12364 evaluated at top-level and synronize lookup closure before
12365 executing every subform.
12366 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12367 (scm_eval_x, scm_eval): Reimplement in terms of
12368 scm_primitive_eval_x and scm_primitive_eval, respectively.
12369
12370 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12371
12372 * macros.c (scm_macro_name, scm_macro_transformer): Use
12373 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12374 Thanks!
12375
12376 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12377
12378 * dump.c (scm_store_bytes): Store data size before data.
12379 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12380 * dump.h (scm_restore_bytes): Updated.
12381
12382 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12383
12384 * dump.c: Use double cells for update schedule.
12385
12386 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12387
12388 * ports.c (scm_unread_char): Take an optional argument.
12389
12390 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12391
12392 * modules.h (scm_selected_module, scm_current_module): Renamed
12393 scm_selected_module to scm_current_module to synchronize Scheme
12394 and C names.
12395 (scm_select_module, scm_set_current_module): Likewise. Changed
12396 all uses.
12397
12398 * ports.c (scm_port_for_each): Make a snapshot of the port table
12399 before iterating over it. The table might change while the user
12400 code is running. With the snapshot, the user can depend on the
12401 fact that each port that existed at the start of the iteration is
12402 encountered exactly once. (ice-9 popen) depends on this.
12403
12404 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12405
12406 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12407
12408 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12409 range checking for the size parameter. Thanks to Martin
12410 Grabmueller for the hint.
12411
12412 (scm_makstr): Reordered string initialization to make interrupt
12413 deferring unnecessary.
12414
12415 * vectors.c (scm_make_vector): Fixed range checking.
12416
12417 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12418
12419 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12420
12421 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12422 checking of the size parameter for type correctness and valid
12423 range. Thanks to Rob Browning for reporting the problem. Instead
12424 of deferring interrupts, scm_remember_upto_here_1 is used.
12425
12426 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12427
12428 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12429 (scm_dump_cell_update): Removed.
12430 (scm_dump_update): Renamed from scm_dump_object_update.
12431 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12432 a pointer instead of returning a value.
12433 * keywords.c (keyword_undump): Updated.
12434
12435 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12436
12437 * dump.c, dump.h: Modified a lot.
12438 (SCM_DUMP_COOKIE): Version 0.1
12439 (scm_dump_mark): Removed.
12440 (scm_restore_cell_object, scm_store_cell_object): New functions.
12441
12442 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12443 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12444 New slots: dump, undump.
12445 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12446 Updated.
12447
12448 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12449 (keyword_undump): Renamed from keyword_alloc.
12450 (scm_init_keywords): Set keyword_dump and keyword_undump.
12451
12452 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12453
12454 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12455 the deprecated SCM_DOUBLE_CELLP.
12456
12457 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12458
12459 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12460
12461 * dump.c, dump.h: New files.
12462 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12463 * init.c: #include "libguile/dump.h".
12464 (scm_init_guile_1): Call scm_init_dump.
12465 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12466 dump_dealloc, dump_store, undump_alloc, undump_restore,
12467 undump_init.
12468 * smob.c (scm_make_smob_type): Init the new slots.
12469 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12470 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12471
12472 * keywords.c: #include "libguile/dump.h".
12473 (keyword_dealloc, keyword_alloc): New functions.
12474 (scm_init_keywords): Set smob_dump and smob_undump.
12475
12476 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12477
12478 * vectors.c (scm_c_make_vector): New function.
12479 * vectors.h (scm_c_make_vector): Declared.
12480 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12481 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12482 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12483 (scm_make_method_cache, scm_i_vector2list,
12484 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12485 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12486 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12487 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12488 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12489 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12490 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12491 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12492
12493 * hashtab.c (scm_c_make_hash_table): New function.
12494 * hashtab.h (scm_c_make_hash_table): Declared.
12495 * environments.c (scm_make_leaf_environment,
12496 scm_make_eval_environment), gc.c (scm_init_storage),
12497 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12498 Use scm_c_make_hash_table.
12499
12500 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12501
12502 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12503
12504 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12505
12506 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12507 end of docstring.
12508
12509 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12510 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12511 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12512 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12513 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12514 scm_source_property, scm_set_source_property_x), sort.c
12515 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12516 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12517 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12518 docstrings.
12519
12520 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12521
12522 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12523 really get that arg.
12524
12525 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12526
12527 * goops.c (s_scm_get_keyword): Bug fix.
12528
12529 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12530
12531 The following patch was sent by Martin Grabmueller. It makes sure
12532 that in case of parameter errors the correct function name is
12533 shown, and that parameter types are only checked once.
12534
12535 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12536 string_capitalize_x): New functions. Each one performs the core
12537 functionality of the corresponding scm_* function.
12538
12539 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12540 scm_string_downcase_x, scm_string_downcase,
12541 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12542 parameter checking wrappers of the above functions.
12543
12544 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12545
12546 * continuations.c, dynl.c, keywords.c, load.c: Include
12547 strings.h. Thanks to Bill Schottstaedt for the bug report.
12548
12549 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12550
12551 * backtrace.c (display_header): Make sure that line and column
12552 information is shown independent of whether the port the code was
12553 read from had an associated filename. Thanks to Martin
12554 Grabmueller for providing this patch.
12555
12556 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12557
12558 * fports.[ch] (scm_file_port_p): New primitive.
12559
12560 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12561
12562 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12563 These are now defined in fports.c, strports.c and vports.c.
12564
12565 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12566 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12567 tags.h).
12568
12569 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12570 (scm_make_sfptob): Made static. These return a type code now.
12571
12572 fports.c (scm_init_fports), strports.c (scm_init_strports),
12573 vports.c (scm_init_vports): Create the corresponding port types.
12574
12575 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12576 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12577
12578 * init.c (scm_init_guile_1): Make sure strports are initialized
12579 before gdbint.
12580
12581 * ports.[ch] (scm_make_port_type): Changed the return type to
12582 scm_bits_t.
12583
12584 * ports.c (scm_ports_prehistory): Don't create any port types
12585 here.
12586
12587 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12588 against scm_tc16_fport directly.
12589
12590 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12591
12592 * srcprop.c (scm_set_source_property_x): Fix to handle
12593 (set-source-property! <obj> 'copy <datum>) correctly.
12594
12595 2001-01-24 Gary Houston <ghouston@arglist.com>
12596
12597 * filesys.c (scm_link): docstring fix.
12598 * fports.h (scm_setfileno): obsolete declaration removed.
12599 * posix.c: bogus popen declaration removed.
12600
12601 * rdelim.c: new file, split from ioext.c.
12602 * rdelim.h: new file, split from ioext.h
12603 * Makefile.am: add rdelim.c and related files.
12604 * init.c: call scm_init_rdelim. include rdelim.h.
12605
12606 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12607
12608 This patch was sent by Martin Grabmueller and makes sure that
12609 parameter errors are reported correctly by the lexicographic
12610 ordering predicates.
12611
12612 * strorder.c (string_less_p, string_ci_less_p): New functions.
12613
12614 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12615 functionality into string_less_p, string_ci_less_p respectively.
12616 The remaining code is just a wrapper to do the parameter
12617 checking.
12618
12619 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12620 parameters and call string_less_p instead of scm_string_less_p.
12621
12622 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12623 Check the parameters and call string_less_ci_p instead of
12624 scm_string_ci_less_p.
12625
12626 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12627
12628 This patch modifies scm_display_error to perform parameter
12629 checking. Thanks to Neil Jerram for the bug report.
12630
12631 * backtrace.[ch] (scm_i_display_error): New function.
12632
12633 * backtrace.c (scm_display_error): Added parameter check and
12634 extracted the core functionality into function
12635 scm_i_display_error.
12636
12637 * throw.c (handler_message): Call scm_i_display_error to display
12638 the error message.
12639
12640 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12641
12642 * eval.c (SCM_APPLY): Added # args check for application of
12643 procedures with arity 3. (Thanks to Anders Holst.)
12644
12645 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12646
12647 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12648
12649 (SCM_OPDIRP): Deprecated.
12650
12651 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12652 SCM_OPN.
12653
12654 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12655 Instead, give an explicit error message in case the directory is
12656 closed.
12657
12658 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12659 instead of SCM_OPENP and SCM_CLOSEDP.
12660
12661 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12662
12663 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12664
12665 * eval.c (inner_eval, scm_eval): Move all real functionality into
12666 inner_eval. Avoid to copy the expression twice by inlining some
12667 code from scm_i_eval.
12668
12669 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12670
12671 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12672 now has to be the last clause, as required by R5RS. Thanks to
12673 Martin Grabmueller for the patch.
12674
12675 2001-01-18 Gary Houston <ghouston@arglist.com>
12676
12677 * ioext.c: further simplify scm_read_string_x_partial by defining
12678 a macro SCM_EBLOCK.
12679
12680 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12681
12682 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12683
12684 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12685
12686 * __scm.h: Added comment about architecture and compiler
12687 properties that are required by guile.
12688
12689 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12690 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12691
12692 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12693
12694 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12695
12696 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12697 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12698
12699 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12700
12701 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12702 to the names in limits.h.
12703
12704 * numbers.c (abs_most_negative_fixnum): Added.
12705
12706 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12707 fixnum-min) special case.
12708
12709 (scm_big_and): Fix for negative first parameter.
12710
12711 (scm_bit_extract): Fix for fixnum paramters.
12712 Thanks to Rob Browning for the bug report.
12713
12714 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12715
12716 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12717
12718 * symbols.c (scm_symbol_bound_p): Fixed comment.
12719 Thanks to Chris Cramer.
12720
12721 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12722
12723 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12724 Thanks to Bill Schottstaedt.
12725
12726 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12727
12728 from Matthias Köppe:
12729
12730 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12731 casts its result, so doesn't yield an lvalue per ANSI C.
12732
12733 * goops.c (s_scm_sys_set_object_setter_x): use
12734 SCM_SET_ENTITY_SETTER.
12735 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12736
12737 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12738 its result, so doesn't yield an lvalue per ANSI C.
12739 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12740 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12741 SCM_GC_SET_CARD_FLAGS.
12742 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12743
12744 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12745
12746 2001-01-08 Gary Houston <ghouston@arglist.com>
12747
12748 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12749 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12750 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12751 changes.
12752 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12753 for fdes. if current input port is used, check that it's a file
12754 port.
12755
12756 2001-01-06 Gary Houston <ghouston@arglist.com>
12757
12758 * ioext.c (scm_read_string_x_partial): new procedure, implements
12759 read-string!/partial.
12760 * ports.c (scm_take_from_input_buffers): new procedure used by
12761 scm_read_string_x_partial.
12762 (scm_drain_input): use scm_take_from_input_buffers.
12763
12764 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12765
12766 * validate.h (SCM_VALIDATE_NUMBER): New.
12767
12768 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12769
12770 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12771 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12772 SET_DESTROYED): new defines/macros.
12773 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12774 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12775 (guardian_print): print more info.
12776 (guardian_apply): check if the guardian is destroyed, and throw an
12777 error if so. take one more optional argument `throw_p'.
12778 (scm_guard): depending on the value of `throw_p', return a boolean
12779 result.
12780 (scm_get_one_zombie): remove redundant property test.
12781 (guardian_t): represent the various (currently 3, I hope nothing
12782 more gets added) boolean fields as bit flags.
12783 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12784 (scm_destroy_guardian_x): new procedure.
12785
12786 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12787 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12788
12789 2001-01-01 Gary Houston <ghouston@arglist.com>
12790
12791 * fports.c (fport_write): bugfix: handle short writes for
12792 unbuffered ports too. optimize the buffered case by minimizing
12793 the number of write/flush calls.
12794 (write_all): new helper procedure.
12795
12796 The ChangeLog continues in the file: "ChangeLog-2000"