*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
2
3 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
4 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
5 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
6 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
7 scm_c_make_socket_address): New functions.
8 * socket.h: Add prototypes.
9
10 2005-10-24 Kevin Ryde <user42@zip.com.au>
11
12 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
13 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
14 POSIX spec examples, the latter are not available on for instance
15 NetBSD.
16
17 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
18 posix.texi.
19
20 * stime.c (scm_strftime): Update docstring from posix.texi.
21
22 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
23
24 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
25
26 * null-threads.h, pthread-threads.h
27 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
28 (scm_i_pthread_mutexattr_recursive): New.
29
30 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
31 (scm_i_critical_section_mutex): Do not initialize statically.
32 (scm_threads_prehistory): Initialize
33 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
34 here.
35
36 * eval.c (source_mutex): Do not initialiaze statically.
37 (scm_init_eval): Do it here, using
38 scm_i_pthread_mutexattr_recursive.
39
40 2005-09-05 Marius Vollmer <mvo@zagadka.de>
41
42 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
43 New.
44 (sym_reader): New.
45 (scm_print_opts): Added "quote-keywordish-symbols" option.
46 (quote_keywordish_symbol): New, for evaluating the option.
47 (scm_print_symbol_name): Use it.
48 (scm_init_print): Initialize new option to sym_reader.
49
50 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
51
52 * eval.c (eval_letrec_inits): New.
53 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
54
55 2005-08-12 Marius Vollmer <mvo@zagadka.de>
56
57 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
58 Peter Gavin!
59
60 2005-08-12 Kevin Ryde <user42@zip.com.au>
61
62 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
63
64 2005-08-06 Kevin Ryde <user42@zip.com.au>
65
66 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
67 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
68 scm_string_index, scm_string_index_right, scm_string_skip,
69 scm_string_skip_right, scm_string_count, scm_string_map,
70 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
71 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
72 procedures called in loops.
73
74 2005-08-02 Kevin Ryde <user42@zip.com.au>
75
76 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
77 avoid lots of copying where previoulsy growing by only 80 bytes at a
78 time.
79
80 2005-08-01 Marius Vollmer <mvo@zagadka.de>
81
82 * modules.h, modules.c (scm_eval_closure_module): Removed, we
83 already have scm_lookup_closure_module, which does the same thing.
84
85 2005-08-01 Marius Vollmer <mvo@zagadka.de>
86
87 New marking algorithm for weak hashtables that fixes the problem
88 that references from the non-weak value to the associated weak
89 key (for example) would prevent the entry from ever being dropped.
90
91 Guardians have been changed back to their original semantics and
92 are no longer greedy and no longer drop cycles.
93
94 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
95 hashtable and guardian machinery but call the relevant functions
96 directly.
97
98 * guardians.h, guardians.c, deprecated.h,
99 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
100 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
101 Deprecated and moved into deprecated.[ch].
102
103 * guardians.h, guardians.c: Mostly rewritten.
104 (scm_i_init_guardians_for_gc,
105 scm_i_identify_inaccessible_guardeds,
106 scm_i_mark_inaccessible_guardeds): New.
107 (scm_make_guardian): Removed greedy_p argument.
108
109 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
110 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
111 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
112 (scm_weaks_prehistory): Removed.
113 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
114 scm_i_mark_weak_vectors_non_weaks,
115 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
116 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
117 scm_scan_weak_vectors): Removed.
118
119 * hashtab.h (scm_i_scan_weak_hashtables): New.
120 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
121 SCM_WVECTF_NOSCAN.
122 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
123 t->n_items.
124 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
125 to latter. Do not scan the alists themselves, this is done by the
126 weak vector code now. Just update the element count.
127
128 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
129 to latter. The type is now only part of the cell word.
130 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
131
132 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
133
134 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
135
136 Some changes towards making it possible to run Guile on the EM64T
137 platform.
138
139 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
140 mallocating for (unsigned long *bounds).
141
142 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
143 scm_t_bits before storing them in the type word.
144
145 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
146 scm_t_bits to int.
147
148 2005-07-12 Kevin Ryde <user42@zip.com.au>
149
150 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
151 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
152 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
153 than scm_makfrom0str.
154 Reported by Ken Raeburn.
155
156 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
157 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
158 returning SCM_GC_CARD_BVEC.
159
160 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
161 rather than latin-1 acute accent, the latter may not print on all
162 terminals.
163
164 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
165 trailing deletions, so as to return a substring if those are the only
166 changes.
167
168 2005-07-10 Kevin Ryde <user42@zip.com.au>
169
170 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
171 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
172 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
173 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
174
175 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
176
177 * gc-card.c (scm_i_card_statistics): init tag.
178
179 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
180
181 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
182
183 * fports.c (s_scm_open_file): add the b flag for binary to the doc
184 string.
185
186 2005-06-25 Kevin Ryde <user42@zip.com.au>
187
188 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
189 last change, use plain copy-on-write substrings, the individual
190 descriptions in the srfi don't mention shared storage (only the
191 introduction does).
192
193 * strings.c (scm_take_locale_stringn): Use realloc to make room for
194 null-terminator, rather than mallocing a whole new block.
195 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
196
197 2005-06-12 Marius Vollmer <mvo@zagadka.de>
198
199 * ramap.c (scm_array_index_map_x): First test for real arrays,
200 then check for generalized vectors. This ensures that the
201 generalized vector case need only work with zero-origin ranges.
202 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
203 to access the target array, making these functions work with all
204 kinds of arrays, not just bit arrays.
205
206 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
207 gh_list.c, gh_predicates.c: Deprecated everything.
208
209 * environments.c (environment_default_folder,
210 environment_default_observer): Do not use gh_call3, gh_call1.
211
212 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
213
214 * modules.c (s_scm_eval_closure_module): new function. Return the
215 module inside an eval-closure.
216
217 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
218 table. This means that procedure properties are GC'd if the
219 procedure dies.
220
221 2005-06-11 Kevin Ryde <user42@zip.com.au>
222
223 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
224 charset cases, count chars kept and build a string in a second pass,
225 rather than using a cons cell for every char kept. Use a shared
226 substring when nothing removed (such sharing is allowed by the srfi).
227
228 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
229
230 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
231 string, so live object stats can be sorted with string<?.
232
233 2005-06-06 Marius Vollmer <mvo@zagadka.de>
234
235 * print.c (iprin1): When writing a string, collect all characters
236 that can be printed directly into one call to scm_lfwrite.
237 Previously, every character was output with its own call to
238 write(2) on unbuffered ports.
239
240 * eval.c (scm_eval_options_interface): Use
241 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
242 and SCM_CRITICAL_SECTION_END.
243
244 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
245 check for generalized vectors. This ensures that the generalized
246 vector case need only work with zero-origin ranges.
247
248 2005-06-06 Kevin Ryde <user42@zip.com.au>
249
250 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
251 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
252 matched.
253
254 2005-06-05 Marius Vollmer <mvo@zagadka.de>
255
256 * eval.c: Added comment on how to make case 1.1 of
257 r5rs_pitfall.test succeed.
258
259 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
260
261 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
262
263 * socket.c: Remove obsolete comment about socklen_t.
264 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
265
266 * numbers.h (isnan)[__MINGW32__]: Remove.
267
268 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
269 DEFAULT_INCLUDES when cross compiling.
270
271 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
272
273 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
274 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
275 from Jan's patch.)
276
277 2005-05-22 Marius Vollmer <mvo@zagadka.de>
278
279 * unif.c (scm_make_shared_array): Add old base to new base since
280 scm_array_handle_pos does not include the base.
281 (scm_aind): Likewise.
282
283 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
284 output port.
285
286 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
287
288 Mac OS X compile warning fixes, reported by Richard Todd.
289
290 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
291 that it is signed.
292
293 * strports.c (st_resize_port): Add unsigned char cast.
294 (scm_mkstrport): Make read/write_buf cast unsigned.
295
296 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
297
298 * rdelim.c (scm_read_line): Initialize slen.
299
300 * load.c (scm_search_path): Remove weird >=1, and add
301 parentheses to clarify conditions.
302
303 * hash.c (scm_hasher): Add const unsigned char cast.
304
305 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
306
307 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
308
309 Fix C99isms reported by Ludovic Courtès:
310
311 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
312 code.
313
314 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
315 of code.
316
317 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
318 of code.
319 (scm_i_card_statistics): Add block for declarations of tag_as_scm
320 and current.
321
322 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
323
324 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
325 compile warning reported by Werner Scheinast.
326
327 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
328
329 * list.h: remove scm_list()
330
331 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
332 SCM_DEBUG_CELL_ACCESSES
333 (FLUID_NEXT_LOC): idem.
334
335 2005-04-30 Kevin Ryde <user42@zip.com.au>
336
337 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
338 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
339 zero when re==0 and im<0. Reported by Jean Crepeau.
340
341 2005-04-25 Kevin Ryde <user42@zip.com.au>
342
343 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
344 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
345 few sensible uses (like filling with a random number generator say),
346 but has been allowed in the past and so should be kept.
347
348 2005-04-23 Kevin Ryde <user42@zip.com.au>
349
350 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
351 scm_hash_fn_remove_x.
352
353 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
354 the caller when cons* is reached through apply.
355
356 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
357 list is called using apply, under the debugging evaluator.
358 (scm_list): Remove.
359
360 * list.c, list.h (scm_make_list): New code, moving make-list from
361 boot-9.scm.
362
363 2005-04-14 Kevin Ryde <user42@zip.com.au>
364
365 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
366 converted from scheme code in boot-9.scm.
367
368 2005-04-11 Kevin Ryde <user42@zip.com.au>
369
370 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
371 Validate list argument, scm_string_append and scm_string_append_shared
372 don't do that to their rest argument (in a normal build).
373
374 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
375
376 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
377 closure can not be stored since it is no longer valid at GC time.
378 (make_hash_table): Initialize 'hash_fn' field.
379 (scm_i_rehash): Only store hash_fn in hash table when closre is
380 NULL.
381 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
382 non-NULL. Always use a NULL closure.
383 (scm_hash_fn_create_handle_x): Also rehash when table contains too
384 few entries.
385
386 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
387
388 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
389 argument; always use scm_delq_x. The delete_fn function works on
390 the handle, not the key, and it therefore makes no sense to make
391 it configurable. Changed all callers.
392 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
393 (scm_hash_clear): Accept plain vectors as hashtables.
394 (scm_delx_x): Removed.
395
396 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
397
398 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
399 compatibility with gcc -std=c99.
400
401 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
402
403 * async.h (scm_mask_ints): Removed left over reference to
404 scm_root.
405
406 * threads.c: Removed fprintf debug statements.
407
408 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
409
410 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
411
412 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
413
414 * debug.c (scm_make_memoized): Remove unnecessary critical
415 section, and simplify by using SCM_RETURN_NEWSMOB.
416
417 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
418
419 * strings.h (SCM_STRING_UCHARS): Added missing argument.
420
421 2005-03-18 Kevin Ryde <user42@zip.com.au>
422
423 * arbiters.c (FETCH_STORE) [generic C]: Should be
424 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
425
426 2005-03-13 Kevin Ryde <user42@zip.com.au>
427
428 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
429 srfi-60.
430
431 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
432 because OR-ing bits into a negative can reduce the value to an inum.
433
434 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
435 casting inum to double since that can lose precision.
436
437 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
438
439 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
440 (guilify_self_1): Initialize it.
441
442 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
443 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
444 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
445 field.
446 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
447 recursively.
448 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
449 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
450 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
451 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
452 scm_after_gc_c_hook here.
453 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
454 scm_after_gc_c_hook when a full GC has in fact been performed.
455 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
456
457 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
458 scm_gc_heap_lock.
459
460 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
461 scm_gc_running_p while the scm_i_sweep_mutex is locked.
462
463 * inline.h (scm_cell, scm_double_cell): Do not check
464 scm_gc_running_p, allocation during sweeping is OK.
465
466 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
467 not set scm_block_gc.
468
469 * init.c (scm_i_init_guile): Do not set scm_block_gc.
470
471 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
472 instead of scm_malloc. The latter can not be used during GC.
473
474 2005-03-09 Marius Vollmer <mvo@zagadka.de>
475
476 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
477 years.
478
479 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
480
481 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
482 scm_gc_running_p. Sweeping can happen in parallel with
483 allocation.
484
485 * inline.h: Updated comments for current threading implementation.
486
487 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
488 (scm_i_thread): Removed unused signal_asyncs field.
489 (threads_mark): Do not mark it.
490 (guilify_self_1): Do not initialize it. Do initialize
491 continuation_root field.
492 (do_thread_exit): Do not remove thread from all_threads list.
493 (on_thread_exit): Do it here, after leaving guile mode.
494 (sleep_level): Removed.
495 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
496 returning. Do not support recursive sleeps.
497 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
498 entry. Do not support recursive sleeps.
499
500 * fluids.c (ensure_state_size, ensure_all_state_sizes,
501 resize_all_states): Collapsed ensure_state_size and
502 ensure_all_state_sizes into one function named resize_all_states.
503 Allocate new vectors outside of single threaded region. Do only
504 simple things inside that region.
505 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
506 while adding to the global lists.
507
508
509 2005-03-08 Marius Vollmer <mvo@zagadka.de>
510
511 libltdl is no longer distributed. We expect it to be installed
512 already.
513
514 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
515 (libguile_la_LIBADD): Removed @LIBLTDL@.
516
517 2005-03-07 Marius Vollmer <mvo@zagadka.de>
518
519 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
520 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
521 they also block/unblock execution of asyncs and call
522 scm_async_click which is declared in async.h but threads.h can not
523 include async.h since async.h already includes threads.h.
524 (scm_i_critical_section_level): New, for checking mistakes in the
525 use of the SCM_CRITICAL_SECTION_* macros.
526 (scm_i_critical_section_mutex): Make it a recursive mutex so that
527 critical sections can be nested.
528
529 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
530 not zero.
531
532 * threads.h, threads.c (scm_frame_lock_mutex): New.
533 (scm_frame_critical_section): Take mutex as argument.
534 (framed_critical_section_mutex): New, used as default for above.
535 (scm_init_threads): Initialize it.
536 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
537 scm_i_critical_section_mutex; both are initialized statically.
538
539 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
540 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
541 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
542 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
543
544 * debug.c (scm_debug_options): Replace
545 SCM_CRITICAL_SECTION_START/END with a frame and
546 scm_frame_critical_section.
547
548 * continuations.c (scm_make_continuation): No longer a critical
549 section.
550 (scm_dynthrow): Abort when scm_i_critical_section_level is
551 not zero.
552
553 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
554
555 * threads.c (scm_try_mutex): Renamed argument for consistency.
556
557 * root.c (scm_call_with_dynamic_root): New docstring.
558
559 * eval.c: Define _GNU_SOURCE.
560
561 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
562
563 Big merge from the mvo-thread-cleanup branch. The main changes
564 are:
565
566 - The dynamic roots functionality has been split into dynamic
567 states and continuations barriers. Fluids have been
568 reimplemented and can now be garbage collected.
569
570 - Initialization of Guile now works in a multi-thread friendly
571 manner. Threads can freely enter and leave guile mode.
572
573 - Blocking on mutexes or condition variables or while selecting
574 can now be reliably interrupted via system asyncs.
575
576 - The low-level threading interface has been removed.
577
578 - Signals are delivered via a pipe to a dedicated 'signal delivery
579 thread'.
580
581 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
582
583 * throw.c (scm_handle_by_message): Exit only the current thread,
584 not the whole process.
585 (scm_handle_by_message_noexit): Exit when catching 'quit.
586
587 * scmsigs.c (take_signal, signal_delivery_thread,
588 start_signal_delivery_thread, ensure_signal_delivery_thread,
589 install_handler): Reimplemented signal delivery as explained in
590 the comments.
591
592 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
593 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
594 scm_i_sched_yield, scm_i_pthread_sigmask,
595 SCM_I_PTHREAD_MUTEX_INITIALIZER,
596 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
597 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
598 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
599 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
600 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
601 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
602 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
603 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
604 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
605 scm_i_pthread_key_create, scm_i_pthread_setspecific,
606 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
607 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
608 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
609 when using pthreads.
610 * null-threads.c, null-threads.h: Provide dummy definitions for
611 the above symbols when not using pthreads.
612
613 * modules.h, modules.c (scm_frame_current_module): New.
614
615 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
616 instead of scm_internal_dynamic_wind.
617
618 * init.h, init.c (restart_stack, start_stack): Removed.
619 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
620 (scm_boot_guile_1): Removed.
621 (scm_i_init_mutex): New.
622 (really_cleanup_for_exit, cleanup_for_exit): New.
623 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
624 Moved around some init funcs. Call
625 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
626 with atexit.
627
628 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
629 Use "!scm_is_eq" instead of "!=".
630
631 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
632 SCM_USE_COOP_THREADS): Removed.
633
634 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
635 maintained. Unlock scm_i_sweep_mutex before running
636 scm_after_gc_c_hook.
637 (scm_permanent_object): Allocate outside of critical section.
638 (cleanup): Removed.
639
640 * fluids.h, fluids.c: Reimplemented completely.
641 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
642 SCM_FAST_FLUID_SET): Reimplemented as functions.
643 (scm_is_fluid): New.
644 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
645 (scm_make_dynamic_state, scm_dynamic_state_p,
646 scm_is_dynamic_state, scm_current_dynamic_state,
647 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
648 scm_c_with_dynamic_state, scm_with_dynamic_state,
649 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
650
651 * feature.c (progargs_fluid): New.
652 (scm_program_arguments, scm_set_program_arguments): Use it instead
653 of scm_progargs.
654 (scm_init_feature): Allocate it. Also, only add "threads" feature
655 when SCM_USE_PTHREAD_THREADS is true.
656
657 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
658 scm_make_rec_mutex, with all the consequences.
659 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
660 scm_internal_dynamic_wind. Handle dynamic states as second
661 argument.
662
663 * threads.h, threads.c (scm_internal_select): Renamed to
664 scm_std_select and discouraged old name.
665 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
666 and scm_std_usleep.
667 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
668 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
669 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
670 SCM_THREAD_DATA): Removed.
671 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
672 (scm_i_thread): New.
673 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
674 Use scm_assert_smob_type.
675 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
676 scm_thread_self, scm_thread_yield, scm_mutex_init,
677 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
678 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
679 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
680 scm_cond_init, scm_cond_destroy, scm_cond_wait,
681 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
682 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
683 scm_thread_select): Removed. Replaced with scm_i_pthread
684 functions as appropriate.
685 (scm_in_guile, scm_outside_guile): Removed.
686 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
687 take a ticket.
688 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
689 New.
690 (scm_i_frame_single_threaded): New.
691 (scm_init_threads_default_dynamic_state): New.
692 (scm_i_create_thread): Removed.
693 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
694 (scm_make_recursive_mutex): New.
695 (scm_frame_critical_section): New.
696 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
697 latter, changed all uses.
698 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
699 scm_i_set_last_debug_frame): New, use them instead of scm_root
700 stuff.
701 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
702 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
703 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
704 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
705 (remqueue): Allow the removal of already removed cells. Indicate
706 whether a real removal has happened.
707 (scm_thread): Removed, replaced with scm_i_thread.
708 (make_thread, init_thread_creatant): Removed.
709 (cur_thread): Removed.
710 (block_self, unblock_from_queue): New.
711 (block, timed_block, unblock): Removed.
712 (guilify_self_1, guilify_self_2, do_thread_exit,
713 init_thread_key_once, init_thread_key,
714 scm_i_init_thread_for_guile, get_thread_stack_base,
715 scm_init_guile): New initialisation method.
716 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
717 thread creation.
718 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
719 "fair" to fat and implemented new semantics, including reliable
720 interruption.
721 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
722 (scm_threads_mark_stacks): Explicitly mark handle.
723 (scm_std_select): Allow interruption by also selecting on the
724 sleep_pipe.
725 (scm_i_thread_put_to_sleep): Handle recursive requests for
726 single-threadedness.
727 (scm_threads_prehistory, scm_init_threads): Put current thread
728 into guile mode via guileify_self_1 and guileify_self_2,
729 respectively.
730
731 * fluid.h (SCM_FLUIDP): Deprecated.
732
733 * coop-threads.c: Removed.
734
735 * continuations.h, continuations.c (scm_with_continuation_barrier,
736 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
737 New.
738
739 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
740 (async_mutex): New.
741 (scm_async_click): Protected with async_mutex. Do not deal with
742 signal_asyncs, which are gone. Set cdr of handled async cell to
743 #f.
744 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
745 current sleep.
746 (scm_system_async_mark_for_thread): Do not use scm_current_thread
747 since that might not work during early initialization.
748
749 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
750 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
751 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
752 and SCM_CRITICAL_SECTION_END.
753 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
754 SCM_CRITICAL_SECTION_START/END.
755
756 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
757 (libguile_la_SOURCES): Added null-threads.c
758 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
759 threads-plugin.c.
760 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
761
762 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
763 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
764 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
765 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
766 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
767 scm_make_root): Removed or deprecated. Replaced with references
768 to the current thread, dynamic state, continuation barrier, or
769 some fluid, as appropriate.
770 (root_mark, root_print): Removed.
771 (scm_internal_cwdr): Reimplemented guts with
772 scm_frame_current_dynamic_state and
773 scm_i_with_continuation_barrier.
774 (scm_dynamic_root): Return current continuation barrier.
775
776
777 2005-02-28 Marius Vollmer <mvo@zagadka.de>
778
779 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
780 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
781 cleanliness.
782 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
783 IP_DROP_MEMBERSHIP.
784 Thanks to Greg Troxel!
785
786 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
787
788 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
789 block.
790
791 2005-02-25 Marius Vollmer <mvo@zagadka.de>
792
793 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
794 so that no two weak alist vectors share a spine.
795 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
796 during GC before inserting the new alist cell.
797
798 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
799
800 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
801 the hashtable.
802 (scm_hash_fn_create_handle_x): Likewise.
803 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
804
805 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
806
807 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
808 the prototypical examples mentioned in the old reference manual.
809 Instead keep the old semantics of dispatching on type. (Yes, this
810 is extremely ugly, but the whole point of keeping the deprecated
811 interface is not to break old code.)
812
813 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
814
815 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
816 scm_i_array_dims.
817
818 2005-01-28 Kevin Ryde <user42@zip.com.au>
819
820 * numbers.c (scm_ash): Rewrite using shifts, much faster than
821 integer-expt and multiply/divide. Inexacts and fractions no longer
822 supported (they happened to work before for left shifts, but not
823 right). Don't really need inexacts and fractions, since ash is
824 documented as a "bitwise operation", and all the rest of those only
825 take exact integers.
826
827 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
828
829 * gc-card.c (scm_i_card_statistics): map structs, closures and
830 subrs to one tag.
831
832 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
833 (tag_table_to_type_alist): ignore unknown types.
834
835 * gc-segment.c (scm_i_all_segments_statistics): new function.
836 (scm_i_heap_segment_statistics): new function
837
838 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
839 statistics on the number of live objects of each type.
840
841 * gc-card.c (scm_i_tag_name): new function.
842 (scm_i_card_statistics): new function.
843
844 2005-01-24 Kevin Ryde <user42@zip.com.au>
845
846 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
847 POSIX and C99 don't document errno being set. Reported by Bruno
848 Haible.
849 (scm_flock): Update docstring from manual.
850
851 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
852 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
853 a 64-bit system.
854
855 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
856 sa_handler, needs to be a long on 64-bit systems where int is only 32
857 bits.
858
859 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
860
861 * environments.c (obarray_enter, obarray_replace): Call
862 SCM_HASHTABLE_INCREMENT when adding a new entry.
863
864 * objects.c: Include goops.h for the scm_class_of prototype.
865
866 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
867 sizes to be smaller than the maximum lengths of vectors.
868
869 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
870
871 * ports.c, smob.c: Include "libguile/goops.h".
872
873 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
874 scm_class_char, scm_class_pair, scm_class_procedure,
875 scm_class_string, scm_class_symbol,
876 scm_class_procedure_with_setter, scm_class_primitive_generic,
877 scm_class_vector, scm_class_null, scm_class_real,
878 scm_class_complex, scm_class_integer, scm_class_fraction,
879 scm_class_unknown, scm_port_class, scm_smob_class,
880 scm_no_applicable_method, scm_class_of): Moved from objects to
881 goops since they are only useable once goops has been loaded.
882 (scm_classes_initialized): Removed.
883 (scm_class_of): Do not check it.
884 (create_standard_classes): Do not set it.
885
886 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
887
888 * objects.h, objects.c (scm_classes_initialized): New.
889 (scm_class_of): Signal error when scm_classes_initialized is zero.
890 * goops.c (create_standard_classes): Set scm_classes_initialized
891 to one.
892
893 * random.c (scm_random_solid_sphere_x): Use
894 scm_c_generalized_vector_length instead of
895 scm_uniform_vector_length.
896
897 2005-01-16 Marius Vollmer <mvo@zagadka.de>
898
899 * script.c (scm_compile_shell_switches): Removed debugging output.
900
901 2005-01-15 Kevin Ryde <user42@zip.com.au>
902
903 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
904 docstrings from manual.
905 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
906
907 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
908
909 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
910 its value.
911
912 Implement u64 and s64 uniform numeric vectors with bignums when
913 scm_t_uint64 and scm_t_int64 are not available.
914
915 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
916 scm_array_handle_u64_elements,
917 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
918 scm_u64vector_writable_elements): Do not define when scm_t_uint64
919 is not available.
920 (scm_take_s64vector, scm_array_handle_s64_elements,
921 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
922 scm_s64vector_writable_elements): Likewise for scm_t_int64.
923 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
924 scm_t_int64/scm_t_uint64 are not available.
925 (uvec_mark): New, to mark the bignums.
926 (alloc_uvec): Initialize bignums.
927 (uvec_fast_ref): Return bignums directly.
928 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
929 assert_exact_integer): New.
930 (uvec_fast_set): Use them to validate the bignums.
931 (scm_init_srfi_4): Set mark function of smob when needed.
932 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
933 scm_int64_max.
934
935 Recognize 1.4 -e syntax.
936
937 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
938 (scm_compile_shell_switches): Use them to recognize and convert
939 1.4 "-e" syntax.
940
941 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
942
943 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
944 deprecated features that once were macros but are now functions
945 back into macros.
946
947 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
948
949 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
950 * deprecation.c (scm_issue_deprecation_warning,
951 scm_c_issue_deprecation_warning_fmt): Use it.
952 (mode): Removed.
953 (print_summary): New.
954 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
955 mode.
956
957 Deprecated SCM_ARRAY* macros.
958
959 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
960 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
961 version. Changed all uses.
962 (scm_tc16_array, scm_i_tc16_array,
963 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
964 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
965 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
966 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
967 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
968 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
969 SCM_ARRAY_V, SCM_I_ARRAY_V,
970 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
971 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
972 scm_t_array, scm_i_t_array): Likewise.
973 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
974 Moved from unif.h to unif.c.
975 (scm_c_array_rank): New.
976 (scm_array_rank): Reimplement using it.
977
978 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
979 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
980 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
981
982 2005-01-11 Marius Vollmer <mvo@zagadka.de>
983
984 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
985 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
986 scm_c_generalized_vector_ref and scm_cvref, and
987 scm_c_generalized_vector_set_x, respectively.
988 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
989 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
990
991 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
992 former to latter and made public. Changed all uses.
993 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
994 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
995 (scm_i_shap2ra): New internal version of scm_shap2ra.
996 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
997 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
998 (scm_ra_set_contp): Deprecated, changed all uses to
999 scm_i_ra_set_contp.
1000 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
1001
1002 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1003
1004 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
1005 Trotts!
1006
1007 * unif.c (scm_list_to_typed_array): Allow the specification of the
1008 upper bound as well. This is needed for empty arrays.
1009 (l2ra): Give needed number of elements in error message.
1010 (scm_i_print_array): Print length information for arrays that need
1011 it.
1012 (scm_i_read_array): Parse it.
1013
1014 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
1015 scm_i_object_chars, scm_i_object_length): Brought back from the
1016 dead.
1017
1018 2005-01-10 Marius Vollmer <mvo@zagadka.de>
1019
1020 * ramap.c: Replaced single-index uses of scm_array_set_x with
1021 scm_c_generalized_vector_set_x.
1022
1023 * unif.c (scm_array_rank, scm_array_dimensions,
1024 scm_shared_array_offset, scm_shared_array_increments,
1025 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
1026 to simplify code and make it more general.
1027 (scm_shared_array_root): Work with all kinds of arrays, including
1028 naked vectors.
1029 (indices_to_pos): New.
1030 (scm_make_shared_array): Use it instead of scm_aind; use handle
1031 for oldra.
1032
1033 2005-01-10 Kevin Ryde <user42@zip.com.au>
1034
1035 * posix.c (scm_mkstemp): Update docstring from manual.
1036
1037 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
1038
1039 2005-01-09 Marius Vollmer <mvo@zagadka.de>
1040
1041 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
1042 scm_i_uniform_vector_set_proc): New.
1043 (u8ref, u8set, s8ref, s8set, etc): New.
1044 (uvec_reffers, uvec_setters): New.
1045 (uvec_to_list): Use generic scm_array_handle_ref instead of
1046 uvec_fast_ref since scm_array_handle_ref should be faster now.
1047 (coerce_to_uvec, scm_c_uniform_vector_ref,
1048 scm_c_uniform_vector_set_x): Likewise.
1049
1050 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
1051 New.
1052 (scm_t_array_handle): Added ref, set, elements and
1053 writable_elements for fast inline operation of
1054 scm_array_handle_ref and scm_array_handle_set.
1055 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
1056 and replaced with inline code that simply calls the ref/set
1057 members of the handle.
1058 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
1059 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
1060 New.
1061 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
1062 and memoize_set.
1063 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
1064 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1065 scm_bit_invert_x): Correctly multiply index with increment in the
1066 general case.
1067
1068 * unif.c (scm_array_handle_set): Correctly execute only one
1069 alternative. D'Oh!
1070 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
1071 the array; this covers all cases with much simpler code.
1072
1073 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
1074 as well.
1075
1076 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1077
1078 * srfi-4.c (uvec_type): New.
1079 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
1080 scm_c_uniform_vector_x): Use it to get concrete type.
1081
1082 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
1083 fit the docs.
1084
1085 * unif.c (ra2l): Handle zero rank arrays.
1086 (scm_i_print_array): Print zero rank arrays specially.
1087 (tag_to_type): Return #t for an empty tag, not the empty symbol.
1088 (scm_i_read_array): Allow zero rank arrays.
1089
1090 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1091
1092 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
1093 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
1094 and SCM_SET_HASHTAB_BUCKET.
1095
1096 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
1097 Removed ref_stack field.
1098 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
1099 of a print state. Use them everywhere instead of ref_stack.
1100
1101 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
1102
1103 * srfi-4.c: Include deprecation.h.
1104
1105 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
1106 deprecated.c, eq.c
1107 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
1108 (scm_vector_elements, scm_vector_writable_elements,
1109 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
1110 unif.[hc].
1111 (SCM_SIMPLE_VECTOR_LOC): Removed.
1112 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
1113 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
1114 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
1115 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
1116 latter. Changed use in eq.c.
1117
1118 2005-01-07 Marius Vollmer <mvo@zagadka.de>
1119
1120 Make the uniform vector routines also deal with one dimensional
1121 arrays.
1122
1123 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
1124 SCM_SMOB_PREDICATE in this file.
1125 (is_uvec): Also recognize one-dimensional uniform numeric arrays
1126 of the right type.
1127 (scm_is_uniform_vector): Likewise.
1128 (uvec_fast_ref): Made BASE param const.
1129 (uvec_writable_elements, uvec_elements): New.
1130 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
1131 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
1132 scm_c_uniform_set_x): Use them to also deal with one-dimensional
1133 arrays.
1134 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
1135 argument convention.
1136 (scm_uniform_vector_to_list): Let uvec_to_list do all the
1137 checking.
1138 (scm_uniform_vector_length): Use uvec_length.
1139
1140 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1141
1142 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
1143 scm_c_uniform_vector_size): Removed.
1144 (scm_array_handle_uniform_element_size): New.
1145
1146
1147 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
1148 type of POS parameter to be signed, positions can be negative.
1149 (scm_array_handle_release): New, changed all uses of
1150 scm_t_array_handle to properly call it.
1151 (scm_vector_get_handle, scm_generalized_vector_get_handle):
1152 Renamed former to latter, changed all uses.
1153
1154 2005-01-05 Marius Vollmer <mvo@zagadka.de>
1155
1156 Updated bitvector routines to also use scm_t_array_handles.
1157
1158 * unif.h (scm_bitvector_elements,
1159 scm_bitvector_writable_elements): Use a scm_t_array_handle and
1160 deliver offset, length and increment to caller. Changed all uses.
1161 (scm_bitvector_release_elements,
1162 scm_frame_bitvector_release_elements,
1163 scm_bitvector_release_writable_elements,
1164 scm_frame_bitvector_release_writable_elements): Removed.
1165 (scm_array_handle_bit_elements,
1166 scm_array_handle_bit_writable_elements,
1167 scm_array_handle_bit_elements_offset): New.
1168 (scm_make_typed_array): The special value for non-initialized
1169 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
1170 was a valid value to fill bitvectors with, so it can't really be
1171 specialed out.
1172
1173 2005-01-04 Kevin Ryde <user42@zip.com.au>
1174
1175 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
1176 Reported by Bill Schottstaedt.
1177
1178 2005-01-02 Marius Vollmer <mvo@zagadka.de>
1179
1180 * sort.c (quicksort): Added INC parameter for non-contigous
1181 vectors.
1182 (quicksort1): New, for contigous vectors. Both functions are
1183 generated from the same code by including "quicksort.i.c".
1184 (scm_restricted_vector_sort_x): Call one of quicksort and
1185 quicksort1, depending on increment of vector.
1186 (scm_sort): Simply call scm_sort_x on a copy of the list or
1187 vector.
1188 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
1189 size_t, added inc parameter.
1190 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
1191 so that it doesn't leak.
1192 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
1193 list or vector.
1194
1195 * ramap.c (scm_array_map_x): Do not try to convert fill value
1196 before filling, any necessary conversion is done while storing.
1197
1198 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1199 doing it inline.
1200
1201 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1202 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1203 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1204
1205 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1206 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1207 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1208 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1209 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1210 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1211 vector elements API or simple vector API, as appropriate. Removed
1212 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1213 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1214
1215 * srfi-4.h, srfi-4.c,
1216 srfi-4.i.c (scm_array_handle_uniform_elements,
1217 scm_array_handle_uniform_writable_elements,
1218 scm_uniform_vector_elements,
1219 scm_uniform_vector_writable_elements):
1220 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1221 scm_t_array_handle, deliver length and increment.
1222 (scm_array_handle_<foo>_elements,
1223 scm_array_handle_<foo>_writable_elements): New.
1224
1225 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1226 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1227
1228 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1229 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1230 scm_array_handle_set, scm_array_handle_elements
1231 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1232 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1233 scm_dimensions_to_uniform_array): Deprecated for real.
1234 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1235 snarfing wont allow a mismatch between C and Scheme arglists.
1236 (scm_make_shared_array, scm_enclose_array): Correctly use
1237 scm_c_generalized_vector_length instead of
1238 scm_uniform_vector_length.
1239
1240 * validate.h (SCM_VALIDATE_VECTOR,
1241 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1242 of SCM_VECTORP.
1243
1244 * weaks.h, weaks.c: Use new internal weak vector API from
1245 vectors.h.
1246
1247 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1248 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1249 'extra' to being regular sources.
1250 (noinst_HEADERS): Added quicksort.i.c.
1251 * quicksort.i.c: New file.
1252
1253 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1254 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1255 and reimplemented. Replaced all uses with scm_vector_elements,
1256 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1257 appropriate.
1258 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1259 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1260 SCM_SIMPLE_VECTOR_LOC): New.
1261 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1262 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1263 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1264 Removed.
1265 (scm_vector_copy): New.
1266 (scm_vector_elements, scm_vector_writable_elements): Use
1267 scm_t_array_handle, deliver length and increment. Moved to
1268 unif.h. Changed all uses.
1269 (scm_vector_release_elements,
1270 scm_vector_release_writable_elements,
1271 (scm_frame_vector_release_elements,
1272 scm_frame_vector_release_writable_elements): Removed.
1273 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1274 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1275 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1276 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1277 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1278 weak vectors.
1279
1280 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1281
1282 No longer use creators to specify the type of an array. Creators
1283 expose the fact that arrays are wrapped around vectors, but that
1284 might change.
1285
1286 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1287 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1288 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1289 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1290 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1291 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1292 uvec_proc_vars): Removed.
1293 (scm_i_generalized_vector_creator): Removed.
1294 (scm_i_generalized_vector_type): New.
1295
1296 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1297 scm_make_typed_array, scm_array_type, scm_list_to_array,
1298 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1299 (scm_array_creator): Removed.
1300 (scm_array_p): Deprecated second PROT argument.
1301 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1302 Deprecated, reimplemented in terms of scm_make_typed_array and
1303 scm_list_to_typed_array.
1304 (scm_i_proc_make_vector, scm_i_proc_make_string,
1305 scm_i_proc_make_bitvector): Removed.
1306 (type_creator_table, init_type_creator_table, type_to_creator,
1307 make_typed_vector): New.
1308 (scm_i_convert_old_prototype): Removed.
1309 (prototype_to_type): New.
1310 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1311 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1312 minor added clarity.
1313 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1314 instead of scm_make_uve.
1315 (tag_creator_table, scm_i_tag_to_creator): Removed.
1316 (tag_to_type): New.
1317 (scm_i_read_array): Use scm_list_to_typed_array instead of
1318 scm_list_to_uniform_array.
1319
1320 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1321
1322 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1323 (scm_bitvector_writable_elements): New.
1324 (scm_bitvector_release, scm_bitvector_release_elements):
1325 Renamed former to latter. Added explicit call to
1326 scm_remember_upto_here_1.
1327 (scm_frame_bitvector_release,
1328 scm_frame_bitvector_release_elements): Renamed former to latter.
1329 (scm_bitvector_release_writable_elements,
1330 scm_bitvector_release_writable_elements): New.
1331 Changed all uses as required by the changes above.
1332
1333 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1334 scm_u8vector_elements, etc): Made return value "const".
1335 (scm_uniform_vector_writable_elements,
1336 scm_u8vector_writable_elements, etc): New.
1337 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1338 Renamed former to latter. Added explicit call to
1339 scm_remember_upto_here_1.
1340 (scm_frame_uniform_vector_release,
1341 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1342 (scm_uniform_vector_release_writable_elements,
1343 scm_frame_uniform_vector_release_writable_elements): New. Takes
1344 crown of longest identifier yet.
1345 Changed all uses as required by the changes above.
1346
1347 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1348 void.
1349 (scm_is_vector, scm_vector_p, scm_vector_length,
1350 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1351 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1352 scm_vector_move_left_x, scm_vector_move_right_x,
1353 scm_vector_fill_x): handle one-dimensional arrays.
1354 (scm_vector_elements, scm_vector_release_elements,
1355 scm_vector_frame_release_elements, scm_vector_writable_elements,
1356 scm_vector_release_writable_elements,
1357 scm_vector_frame_release_writable_elements): New.
1358 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1359 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1360
1361 * ramap.c (scm_ramapc, scm_raeql): Use
1362 scm_c_generalized_vector_length instead of
1363 scm_uniform_vector_length.
1364 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1365 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1366
1367 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1368
1369 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1370 member for relocating debug frames.
1371 (scm_make_continuation): Set it.
1372
1373 * stacks.c (read_frame, read_frames, scm_make_stack,
1374 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1375 of continuations instead of calculating the offset ourselves.
1376 Relocate 'vect' member of scm_t_debug_frame.
1377
1378 2004-12-16 Kevin Ryde <user42@zip.com.au>
1379
1380 * ramap.c (scm_array_map_x): Check for at least one source argument.
1381
1382 2004-12-14 Kevin Ryde <user42@zip.com.au>
1383
1384 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1385 the C code so for the final call to the predicate procedure is a tail
1386 call, per SRFI-13 spec.
1387
1388 2004-12-10 Kevin Ryde <user42@zip.com.au>
1389
1390 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1391 recent revision to the reference manual.
1392
1393 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1394 with "%", C99 says it's well-defined.
1395
1396 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1397 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1398 bother trying to fit scm_from_ulong, not really worth the trouble if
1399 addresses are more than 4 bytes usually.
1400
1401 2004-11-30 Kevin Ryde <user42@zip.com.au>
1402
1403 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1404 arm32. Reported by Greg Troxel.
1405
1406 2004-11-14 mvo <mvo@zagadka.de>
1407
1408 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1409
1410 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1411
1412 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1413
1414 Enclosed arrays are now their own smob. This has been done to
1415 make the code more explicit about them and to prepare for the time
1416 when generalized vectors include arbitrary one-dimensional
1417 arrays. (Uptonow, enclosed arrays have been recognized by their
1418 use of an array as their storage 'vector'. When all generalized
1419 vectors are allowed as storage, including one-dimensional arrays,
1420 this will no longer work.)
1421
1422 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1423 New.
1424 (exactly_one_third, singp): Removed.
1425 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1426 scm_shared_array_offset, scm_shared_array_increments): Handle
1427 enclosed arrays explicitely.
1428 (scm_array_rank): Likewise. Also, do not return zero for
1429 non-arrays, signal an error instead since arrays with rank zero do
1430 exist.
1431 (scm_i_make_ra): New, for specifying the tag of the new array.
1432 (scm_make_enclosed_array): Use it.
1433 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1434 (scm_make_shared_array): Use scm_c_generalized_vector_length
1435 instead of scm_uniform_vector_length.
1436 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1437 (scm_i_cvref): New, doing the job of scm_cvref.
1438 (scm_cvref): Use scm_i_cvref.
1439 (scm_array_ref): Do not accept non-arrays when no indices are
1440 given. Use scm_i_cvref to do the actual access.
1441 ("uniform-array-set1"): Do not register.
1442 (scm_array_set_x, scm_uniform_array_read_x,
1443 scm_uniform_array_write): Handle enclosed arrays explicitly.
1444 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1445 handle enclosed arrays.
1446 (scm_array_to_list): Handle enclosed arrays explicitly.
1447 (rapr1): Removed.
1448 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1449 enclosed arrays.
1450 (scm_i_print_enclosed_array): New.
1451 (tag_proto_table, tag_creator_table): Renamed former to latter.
1452 Added "a" and "b" for strings and bitvectors, resp.
1453 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1454 latter. Tag "a" is in the table now, no need to handle it as a
1455 legacy tag.
1456 (scm_raprin1): Just call scm_iprin1.
1457 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1458 explicitly.
1459 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1460 Use scm_i_print_array as printer for scm_tc16_array.
1461
1462 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1463
1464 * ramap.c (cind): Changed second arg to be pointer to long instead
1465 of uniform vector.
1466 (scm_ramapc): Allocate index vector with scm_malloc and not as
1467 uniform vector. Wrap it in a frame so that it gets properly freed.
1468 (scm_array_index_map_x): Likewise.
1469
1470 * unif.c: Changed all uses of scm_array_prototype to
1471 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1472 prototype is known.
1473 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1474 in terms of scm_uniform_vector_read_x and
1475 scm_uniform_vector_write, respectively. Strings and
1476 bitvector support has been dropped.
1477
1478 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1479 needed files directly. Include config.h, <unistd.h> and <io.h>
1480 when available.
1481 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1482
1483 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1484
1485 * gh_data.c (gh_uniform_vector_length): Properly use
1486 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1487
1488 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1489
1490 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1491 New.
1492 (scm_i_uniform_vector_creator): Removed.
1493 (scm_i_generalized_vector_creator): New.
1494 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1495 handle generalized vectors, only uniform numeric vectors.
1496 (alloc_uvec): Do length check here...
1497 (make_uvec): ...but not here.
1498 (coerce_to_uvec): Use new generalized vector functions to handle
1499 all kinds of vectors in one go.
1500
1501 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1502 remaining scm_tc7_unused tags to get a neatly ordered list.
1503
1504 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1505 longer handle scm_tc7_bvect bitvectors.
1506
1507 * ramap.c: Use the new generalized vector functions to handle all
1508 vector like things.
1509
1510 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1511 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1512 scm_generalized_vector_length, scm_generalized_vector_ref,
1513 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1514 scm_is_generalized_vector, scm_c_generalized_vector_length,
1515 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1516 New.
1517
1518 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1519 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1520 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1521 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1522 scm_c_bitvector_length, scm_c_bitvector_ref,
1523 scm_c_bitvector_set_x, scm_bitvector_elements,
1524 scm_bitvector_release, scm_frame_bitvector_release,
1525 scm_tc16_bitvector, bitvector_free, bitvector_print,
1526 bitvector_equalp, count_ones, find_first_one): New.
1527 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1528 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1529 using the new C API for bitvectors and maybe count_ones or
1530 find_first_one, as appropriate.
1531 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1532 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1533 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1534 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1535 new functions from above.
1536 (scm_i_proc_make_vector, scm_i_proc_make_string,
1537 scm_i_proc_make_bitvector): Made non-static for use in
1538 scm_i_generalized_vector_creator.
1539 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1540 (scm_make_uve): Validate that the created object is a generalized
1541 vector.
1542 (scm_i_legacy_tag): Removed.
1543 (scm_i_print_array): Do it here.
1544 (scm_raprin1): Only print enclosed arrays.
1545
1546 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1547
1548 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1549
1550 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1551 added portability.
1552
1553 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1554 for "space". Thanks to Bruce Korb!
1555
1556 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1557 only after dest has been set. Thanks to Hyper Division!
1558
1559 * gh_data.c (gh_uniform_vector_length): Use
1560 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1561
1562 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1563
1564 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1565 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1566 SCM_SET_UVECTOR_LENGTH): Removed.
1567
1568 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1569
1570 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1571 Thanks!
1572
1573 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1574 first and the second line of the SCM_DEFINE macro call, since old
1575 preprocessors cannot handle definitions that are split into two
1576 lines.
1577
1578 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1579 declarations.
1580
1581 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1582 scm_t_uint32 to fix the mismatch between the function declaration
1583 and definition.
1584
1585 * sort.c (quicksort): Don't use C99 variable declarations.
1586
1587 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1588 SCM_BOOL_F if no type matches.
1589
1590 * threads.c (thread_print): Cast a pointer to size_t when printing
1591 with scm_uintprint.
1592
1593 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1594 defined.
1595 (scm_array_prototype): Deprecated.
1596
1597 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1598
1599 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1600 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1601 more efficient access to the u32vector.
1602
1603 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1604 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1605 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1606
1607 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1608 instead of the old-style dvectors.
1609
1610 * gh_data.c: Use new-style uniform arrays in place of old-style
1611 ones.
1612
1613 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1614 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1615
1616 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1617 instead of old-sytle uvectors.
1618
1619 * convert.c, convert.i.c: Rewritten completely, using
1620 scm_any_to_u8vector, etc and other new-style uniform vector
1621 functions.
1622
1623 * random.c (scm_random_solid_sphere_x,
1624 scm_random_hollow_sphere_x): Do not validate vector argument, this
1625 is already done elsewhere.
1626
1627 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1628 scm_any_to_u8vector, etc): New.
1629 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1630 longer handle old-style uniform vectors.
1631
1632 * read.c (scm_lreadr): Bugfix: include the last bit in the
1633 bit vector.
1634
1635 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1636
1637 * unif.h, unif.c (scm_array_creator): New.
1638 (scm_i_get_old_prototype): New.
1639 (scm_array_prototype): use it to return old-style prototype, never
1640 return creators.
1641 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1642 arg of SCM_UNDEFINED. The latter is wrong.
1643
1644 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1645 (make_uve): Removed.
1646 (scm_i_proc_make_vector, scm_i_proc_make_string,
1647 scm_i_proc_make_u1vector): New.
1648 (scm_init_unif): Initialize them.
1649 (scm_i_convert_old_prototype): New.
1650 (scm_make_uve): Use it to get the creator procedure. Removed all
1651 old code that created old-style uniform vectors.
1652 (scm_array_p): Handle generic vectors.
1653 (scm_dimensions_to_uniform_array): Do not fill new array with
1654 prototype when that is a procedure.
1655 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1656 the NDIM argument.
1657 (scm_i_print_array): Print rank for shared or non-zero-origin
1658 vectors.
1659 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1660 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1661 which I do not understand yet.
1662 (scm_array_prototype): Explicitely handle generic vectors.
1663
1664 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1665 (iflo2str): Use icmplx2str for complex numbers.
1666
1667 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1668 scm_i_uniform_vector_prototype): Removed.
1669 (scm_i_uniform_vector_creator): New.
1670 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1671 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1672 Updated all tables and generic functions to support them.
1673 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1674 (scm_init_srfi_4): Initialize them.
1675
1676 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1677 sizeof(CTYPE) as explained in the comment.
1678
1679 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1680 following '#' that can start an array. Explicitely disambiguate
1681 'i' and 'e' between introducing numbers and uniform vectors. Do
1682 not call scm_i_read_homogenous_vector, since that is also handled
1683 by scm_i_read_array now.
1684
1685 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1686
1687 First cut at integrating uniform vectors from srfi-4 with the rest
1688 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1689 vector. The plan is to gradually replace one type after the other
1690 until none is left and then to consider general cleanups and
1691 optimizations.
1692
1693 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1694
1695 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1696 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1697 scm_uniform_vector_to_list, scm_is_uniform_vector,
1698 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1699 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1700 scm_uniform_vector_release): New.
1701 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1702 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1703 from unif.h, unif.c and extended to handle both the old and new
1704 uniform vectors.
1705
1706 * tags.h (scm_tc7_byvect): Commented out.
1707
1708 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1709 the former to the latter.
1710 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1711 srfi-4.h, srfi-4.c.
1712 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1713 (scm_array_p, scm_array_rank, scm_array_dimensions,
1714 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1715 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1716 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1717 vectors. Removed code for scm_tc7_byvect.
1718 (scm_dimensions_to_uniform_array): Fill array with 0 when
1719 prototype is #\nul.
1720 (scm_i_print_array_dimension, scm_i_legacy_tag,
1721 scm_i_print_array): New.
1722 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1723 for scm_tc7_byvect.
1724
1725 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1726 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1727 uniform vectors. Removed code for scm_tc7_byvect
1728
1729 * print.c (iprin1): Removed code for scm_tc7_byvect.
1730 * objects.c (scm_class_of): Likewise.
1731 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1732 * gc-card.c (scm_i_sweep_card): Likewise.
1733 * evalext.c (scm_self_evaluating_p): Likewise.
1734 * eq.c (scm_equal_p): Likewise.
1735
1736 * gh_data.c (gh_chars2byvect): Reimplemented with
1737 scm_make_s8vector.
1738 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1739
1740 * srfi-4.c (take_uvec): New.
1741 (alloc_uvec): Use it.
1742 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1743
1744 * random.c (vector_scale, vector_scale_x): Renamed former to the
1745 latter, since it modifies its argument.
1746 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1747 Do not use scm_universal_vector_length for non-uniform vectors.
1748 Use scm_f64vector_elements to access innards of uniform vectors.
1749
1750 * convert.i.c: Convert srfi-4 style uniform vectors when
1751 requested.
1752 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1753 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1754
1755 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1756
1757 * numbers.h, numbers.c (scm_i_print_double): New.
1758
1759 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1760 ../srfi/ but heavily modified.
1761 * Makefile.am: Add them in all the right places.
1762 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1763 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1764 '#u', and '#s'.
1765
1766 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1767 and made non-static. Changed all uses.
1768
1769 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1770
1771 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1772 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1773 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1774 scm_uintprint to print unsigned integers, raw heap words, and
1775 adresses, using a cast to scm_t_bits to turn pointers into
1776 integers.
1777
1778 * unif.c: Include "libguile/print.h".
1779
1780 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1781 scm_t_intmax values.
1782 (scm_uint2str): New, for scm_t_uintmax.
1783 (scm_iint2str): Argument type changed to scm_t_intmax,
1784 reimplemented in terms of scm_uint2str.
1785
1786 * print.c, print.h (scm_uintprint): New, for printing
1787 scm_t_uintmax values.
1788 (scm_intprint): Argument type changed to scm_t_intmax.
1789
1790 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1791 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1792 strategic places so that the loops can be interrupted.
1793
1794 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1795 "-I$(top_srcdir)/libguile-ltdl".
1796 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1797 "../libguile-ltdl/libguile-ltdl.a".
1798
1799 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1800 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1801 instead of <libguile-ltdl.h>.
1802
1803 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1804
1805 * sort.c (quicksort): Copy pivot out of the array while
1806 constructing the partitions; it could get overwritten otherwise.
1807 Because of the ultimate insertion sort, this bug did not cause
1808 quicksort to fail, it just put all the burdon on the insertion
1809 sort and was thus very slow. Thanks to Rolan Orre for reporting
1810 the slowness!
1811
1812 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1813
1814 * numbers.c (scm_i_range_error): New.
1815 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1816 scm_out_of_range.
1817
1818 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1819 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1820
1821 * unif.c (scm_array_p): When no prototype is given, explicitely
1822 test for allowable types, do not simply return true. Thanks to
1823 Roland Orre for reporting this!
1824
1825 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1826
1827 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1828 segment to scm_max_segment_size.
1829
1830 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1831
1832 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1833
1834 * inline.h (scm_double_cell): abort if GC running.
1835 (scm_cell): idem.
1836
1837 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1838
1839 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1840 pos == 0.
1841
1842 Keywords no longer store a 'dash symbol'. Instead, they store a
1843 symbol with their real name.
1844
1845 * keywords.h, keywords.c, deprecated.h, deprecated.c
1846 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1847 terms of scm_is_keyword and scm_keyword_dash_symbol.
1848
1849 * keywords.h, keywords.c, discouraged.h, discouraged.c
1850 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1851 scm_c_make_keyword): Discouraged.
1852
1853 * keywords.h, keywords.c (scm_symbol_to_keyword,
1854 scm_keyword_to_symbol): Implemented in C.
1855 (scm_is_keyword, scm_from_locale_keyword,
1856 scm_from_locale_keywordn): New.
1857
1858 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1859
1860 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1861 scm_from_locale_keyword instead of scm_c_make_keyword.
1862
1863 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1864 better error message.
1865
1866 * deprecated.c: Include discouraged.h and keywords.h.
1867
1868 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1869 reading '#:' or ':'. See NEWS for consequences.
1870
1871 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1872
1873 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1874 literals are now read-write again (until SCM_STRING_CHARS is
1875 removed).
1876
1877 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1878 strings with an error message that blames SCM_STRING_CHARS.
1879
1880 * options.c (change_option_setting): Use scm_car instead of
1881 explicit type check plus SCM_CAR.
1882
1883 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1884 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1885 (scm_iprin1): Use them instead of the previoulsy hardcoded
1886 strings.
1887 (scm_init_print): Initialize them.
1888
1889 * backtrace.c (display_frame_expr): Do not remove control
1890 characters from the final string. Print it directly using
1891 scm_display.
1892
1893 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1894 Thanks to Roland Orre!
1895
1896 2004-09-29 Kevin Ryde <user42@zip.com.au>
1897
1898 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1899 be whole original string in match struct, not offsetted substring.
1900
1901 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1902
1903 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1904
1905 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1906
1907 * Makefile.am (EXTRA_DIST): Added gettext.h.
1908
1909 * smob.c, smob.h (scm_assert_smob_type): New.
1910
1911 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1912 Include GUILE_CFLAGS.
1913 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1914 now.
1915 (libpath.h): Put GUILE_CFLAGS in the build-info.
1916
1917 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1918
1919 * print.h (scm_print_state): Added highlight_objects.
1920 * print.c (make_print_state, scm_free_print_state): Initialize it
1921 to SCM_EOL.
1922 (scm_iprin1): Wrap output in '{...}' when object is contained in
1923 highlight_objects.
1924
1925 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1926 scm_backtrace_with_highlights): New. Set highlight_objects of
1927 printstate.
1928
1929 * error.c (scm_error_scm): Document new meaning of data/rest
1930 argument for out-of-range and wrong-type-arg errors.
1931 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1932 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1933 exception so that it gets highlighted in the backtrace.
1934 Don't talk about "argument" when not giving a position.
1935
1936 * throw.c (handler_message): The rest argument is the fourth
1937 argument, not everything after the third. Call
1938 scm_display_backtrace_with_highlights, passing the rest argument
1939 when appropriate.
1940
1941 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1942
1943 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1944 <bruno@clisp.org>:
1945
1946 * i18n.c: Handle --disable-nls (thanks Bruno).
1947
1948 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1949 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1950
1951 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1952 LC categories.
1953 * posix.c (scm_setlocale): Use it.
1954
1955 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1956 scm_bind_textdomain_codeset): Make wrappers similar to C function
1957 they wrap.
1958
1959 * i18n.h: New file.
1960 * i18n.c: New file.
1961 * gettext.h: New file, taken from GNU gettext.
1962 * init.c: Include libguile/i18n.h.
1963 (scm_init_guile_1): Add call to scm_init_i18n().
1964 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1965 (DOT_X_FILES): Add i18n.x.
1966 (DOT_DOC_FILES): Add i18n.doc.
1967 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1968 (modinclude_HEADERS): Add i18n.h.
1969
1970 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1971
1972 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1973
1974 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1975 discouraged.h. Replaced all uses with scm_is_pair.
1976 (SCM_I_CONSP): New name for SCM_CONSP.
1977
1978 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1979 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1980 scm_cadr, etc): New.
1981 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1982 uses with scm_is_null.
1983
1984 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1985 instead of explicit code.
1986
1987 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1988
1989 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1990 Reworded logic a bit so that #f is returned immediately when s1 is
1991 too short to contain s2.
1992
1993 * regex-posix.c (scm_regexp_exec): Convert string to
1994 zero-terminated locale string before matching against it.
1995
1996 * strings.h, strings.c (scm_substring_read_only,
1997 scm_c_substring_read_only, scm_i_substring_read_only): New.
1998 (RO_STRING_TAG, IS_RO_STRING): New.
1999 (scm_i_string_writable_chars): Bail on read-only strings.
2000
2001 * read.c (scm_lreadr): use scm_c_substring_read_only for string
2002 literals, thus making them read-only as specified by R5RS.
2003
2004 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2005
2006 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
2007 by testing for smobs before insisting on equal SCM_CELL_TYPES.
2008
2009 2004-09-21 Marius Vollmer <mvo@zagadka.de>
2010
2011 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
2012 numbers.c.
2013 (scm_to_mpz, scm_from_mpz): New.
2014 Thanks to Andreas Vögele!
2015
2016 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
2017 just on a line of its own.
2018
2019 * srfi-13.c (scm_string_any, scm_string_every,
2020 scm_string_tabulate, string_upcase_x, string_down_case_x,
2021 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
2022 size_t instead of int for indices into strings. Make sure that no
2023 over- or underflow occurs. Thanks to Andreas Vögele!
2024 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
2025 indices, which can also be negative.
2026
2027 2004-09-20 Marius Vollmer <mvo@zagadka.de>
2028
2029 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
2030
2031 * threads.c (scm_threads_mark_stacks): Call
2032 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
2033 only used once.
2034
2035 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
2036
2037 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2038 Bugfix: when subtracting unsigned values, make sure that result
2039 does not wrap.
2040
2041 2004-09-09 Kevin Ryde <user42@zip.com.au>
2042
2043 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
2044 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
2045 by Andreas Vögele.
2046
2047 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2048
2049 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
2050
2051 * eq.c (real_eqv): Pretend that all NaNs are equal.
2052
2053 * numbers.c (scm_integer_expt): Do not accept inexact integers.
2054
2055 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2056
2057 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
2058 use size_t for some locals instead of int.
2059
2060 * read.c (scm_flush_ws): Detect "#!"-style comments here.
2061 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
2062 (skip_scsh_block_comment): Use scm_input_error instead of
2063 scm_misc_error in case of EOF.
2064
2065 2004-09-07 Kevin Ryde <user42@zip.com.au>
2066
2067 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
2068 Bug report by Bill Schottstaedt.
2069
2070 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
2071 column.
2072 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
2073
2074 * posix.c (scm_access): Update docstring per manual.
2075
2076 * posix.c (scm_nice): Correction to error detection. Reported by
2077 Matthias Koeppe.
2078
2079 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
2080 throw error before unlocking mutex with SCM_ALLOW_INTS.
2081
2082 2004-09-06 Kevin Ryde <user42@zip.com.au>
2083
2084 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
2085 available. This also gets around CLK_TCK being absent when
2086 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
2087
2088 2004-09-03 Stefan Jahn <stefan@lkcc.org>
2089
2090 * threads.c (scm_threads_mark_stacks): Fixed local variable
2091 definitions.
2092
2093 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
2094 local variable definitions.
2095
2096 * stime.c (_POSIX_C_SOURCE): Do not define this item on
2097 MinGW32 because it conflicts with its pthread headers.
2098 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
2099 (scm_strftime): Using scm_from_locale_string() instead of
2100 scm_makfrom0str().
2101
2102 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
2103 part.
2104
2105 * numbers.c (scm_init_numbers): Removed check_sanity() call
2106 inside GUILE_DEBUG. The function has been removed somewhen...
2107
2108 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
2109 MinGW32 because it conflicts with its pthread headers.
2110
2111 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2112
2113 * strings.c (SCM_STRINGP): Accept all strings.
2114 (SCM_STRING_CHARS): Reject shared substrings here.
2115
2116 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
2117 the Copyright years.
2118
2119 2004-08-27 Kevin Ryde <user42@zip.com.au>
2120
2121 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
2122 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
2123 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
2124
2125 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2126
2127 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
2128 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
2129 scm_i_symbol_is_interned, scm_i_mem2symbol,
2130 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
2131
2132 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2133
2134 * srfi-13.c: First cut at thread-safeness and proper use of
2135 scm_i_string_chars et al. Copious scm_remember_upto_heres have
2136 been inserted. Made sure that no internal string pointer is used
2137 across a SCM_TICK or a possible GC.
2138
2139 * script.c (scm_compile_shell_switches): Use
2140 scm_from_locale_string instead of scm_makfrom0str.
2141
2142 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
2143 always been.
2144
2145 2004-08-25 Marius Vollmer <mvo@zagadka.de>
2146
2147 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
2148 strop.c.
2149
2150 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
2151 * strop.h, strop.c: Removed, they are now empty.
2152 * Makefile.am: Updated for new and removed files.
2153
2154 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
2155 to scm_string_to_symbol.
2156
2157 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
2158 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
2159 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
2160 charset instead of libc functions.
2161
2162 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
2163 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
2164 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
2165 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
2166 instead of explicit code.
2167
2168 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
2169 "srfi-13.h" instead of "strop.h".
2170
2171 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
2172 scm_init_srfi_14. Do not call scm_init_strop.
2173
2174 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2175
2176 * numbers.c (scm_inf_p): Synced docstring back from manual.
2177
2178 2004-08-22 Marius Vollmer <mvo@zagadka.de>
2179
2180 * strings.c (get_str_buf_start): New helper function.
2181 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
2182 scm_i_string_char, scm_i_string_writable_chars): Use it.
2183 (scm_i_substring_copy): Make START argument optional for C
2184 callers, for upcoming SRFI-13 integration.
2185
2186 2004-08-21 Marius Vollmer <mvo@zagadka.de>
2187
2188 From Richard Todd, Thanks!
2189
2190 * script.c (scm_compile_shell_switches): added '-L' switch to add
2191 to the %load-path.
2192
2193 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2194
2195 * eval.c (unmemoize_exprs): When dropping internal body markers
2196 from the output during unmemoization, also drop those that are not
2197 immediately at the beginning of a body.
2198
2199 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2200
2201 * eval.c (scm_lookupcar1): Report "Variable used before given a
2202 value" insetad of an "Unbound" one for variables that are found
2203 but still contain SCM_UNDEFINED.
2204
2205 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2206 expects a null-terminated string in the locale encoding, but
2207 scm_i_string_writable_chars doesn't give that. Fixed by letting
2208 mkstemp modify a locale version of the tmpl argument and copying
2209 the result back into tmpl.
2210
2211 * strop.c (scm_substring_move_x): Store into str2, not str1.
2212
2213 2004-08-20 Kevin Ryde <user42@zip.com.au>
2214
2215 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2216 to modify the input string.
2217
2218 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2219
2220 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2221 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2222 scm_c_symbol_length.
2223
2224 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2225
2226 New string implementation, with copy-on-write strings and
2227 mutation-sharing substrings, and a new internal string API.
2228 Symbols can now share memory with strings.
2229
2230 * tags.h (scm_tc7_stringbuf): New tag.
2231
2232 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2233 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2234 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2235 uses.
2236 (scm_i_make_string, scm_c_make_string): New, to replace
2237 scm_allocate_string. Updated all uses.
2238 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2239 SCM_STRING_LENGTH): Deprecated.
2240 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2241 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2242 Discouraged. Replaced all uses with scm_from_locale_string or
2243 similar, as appropriate.
2244 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2245 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2246 scm_substring_shared, scm_substring_copy): New.
2247
2248 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2249 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2250 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2251 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2252 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2253 Deprecated.
2254 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2255 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2256 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2257 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2258 Updated all uses.
2259 (scm_gensym): Generate only the number suffix in the buffer, just
2260 string-append the prefix.
2261
2262 * error.c (scm_memory_error): Do not try to throw, just abort.
2263 Throwing will not work anyway.
2264
2265 * gh.h, gh-data.c (gh_set_substr): Made src const.
2266
2267 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2268 (scm_mode_bits): Use it.
2269 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2270 a vector normally and fill that instead of consing a list with a
2271 blocked GC.
2272
2273 * read.c (scm_i_casei_streq): New, for counted strings.
2274
2275 * threads.c (gc_section_count): Removed, thread-sleeping can not
2276 be nested.
2277 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2278 admin mutex so that we can be put to sleep by other threads while
2279 blocking on that mutex. Lock all the heap mutex of all threads,
2280 including ourselves.
2281 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2282 call scm_i_enter_guile.
2283 (scm_thread_mark_stacks): Expect all threads to be suspended.
2284
2285 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2286 scm_gc_mallocated, for now.
2287 (scm_init_storage): Initialize it.
2288 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2289
2290 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2291 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2292 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2293 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2294
2295 * strop.c (scm_string_copy): Use scm_c_substring to get a
2296 copy-on-write string.
2297
2298 2004-08-18 Kevin Ryde <user42@zip.com.au>
2299
2300 * arbiters.c (FETCH_STORE): New macro.
2301 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2302 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2303 scm_try_arbiter and scm_release_arbiter.
2304 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2305 for speed on i386, otherwise using mutex.
2306
2307 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2308 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2309 exact and inexact is #f.)
2310
2311 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2312 to get thread safety of scm_ttyname.
2313
2314 * ports.c (ttyname): Remove prototype, unused.
2315
2316 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2317 Reported by Michael Tuexen.
2318
2319 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2320
2321 * load.c (scm_init_load_path): Do not pass NULL to
2322 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2323 not set. Thanks to Bill Schottstaedt.
2324
2325 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2326
2327 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2328 locale strings instead of accessing their internals.
2329 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2330 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2331 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2332
2333 * simpos.c (scm_system): Convert SCM strings to locale strings
2334 instead of accessing their internals.
2335
2336 * script.c (scm_compile_shell_switches): Convert version to locale
2337 string before printing it.
2338
2339 * rdelim.c (scm_read_delimited_x): Avoid
2340 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2341 of scm_from_long for the returned number of read characters.
2342
2343 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2344 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2345
2346 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2347 Use them instead of SCM_SYSCALL when one or two strings need to be
2348 converted into locale strings.
2349 (my_rename): New, gathers platform dependent code for renaming.
2350 (scm_rename): Use it.
2351 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2352 strings instead of accessing their internals.
2353 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2354 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2355 SCM_STRING_LENGTH.
2356
2357 * extensions.c (load_extension): Convert lib and init to locale
2358 strings instead of accessing the internals directly.
2359 (scm_c_load_extension): Use scm_from_locale_string instead of
2360 scm_makfrom0str.
2361
2362 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2363 scm_fdes_to_port, but take mode bits directly instead of as a C
2364 string.
2365 (scm_i_fdes_to_port): Implement using above.
2366 (scm_open_file): Use scm_i_fdes_to_port together with
2367 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2368 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2369 with scm_i_mode_bits to avoid accessing internals of SCM string
2370 from C.
2371
2372 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2373 SCM string as argument.
2374
2375 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2376 bits directly instead of C string.
2377 (scm_void_port): Implement using above.
2378 (scm_sys_make_void_port): Use scm_i_void_port together with
2379 scm_i_mode_bits to avoid accessing internals of SCM string.
2380
2381 * strings.h, strings.c (scm_i_get_substring_spec): New.
2382
2383 * socket.c, rw.c, deprecated.h, validate.h
2384 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2385 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2386 scm_to_locale_string, etc.
2387 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2388 above, plus scm_i_get_substring_spec.
2389
2390 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2391 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2392 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2393 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2394 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2395 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2396 with more explicit scm_remember_upto_here_1, etc, or introduced
2397 them in the first place.
2398
2399 * posix.c (WITH_STRING): New helper macro. Use it where one
2400 locale string is needed for a short piece of code.
2401 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2402 when one locale string is needed.
2403 (scm_mkstemp): Convert tmpl to a locale string.
2404 (scm_putenv): Rewritten to use only C strings.
2405 (scm_setlocale, scm_crpt): Convert argument strings to locale
2406 strings.
2407
2408 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2409
2410 * load.c (scm_primitive_load_path): Do not check for absolute
2411 filenames when scm_sys_search_load_path returns false, which will
2412 return absolute filenames unchanged.
2413
2414 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2415
2416 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2417 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2418 of an alist. Thanks to Matthias Koeppe!
2419
2420 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2421
2422 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2423 Moved from string.h to deprecated.h.
2424
2425 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2426
2427 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2428 SCM_I_MAKE_STRING_TAG, changed all uses.
2429 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2430 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2431 respectively. For a short time, the old names are still there as
2432 aliases. Not all uses have been changed yet, but the ones in
2433 strings.c have.
2434 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2435 SCM_T_BITS_MAX.
2436 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2437 scm_take_locale_string, scm_take_locale_stringn,
2438 scm_to_locale_string, scm_to_locale_stringn,
2439 scm_to_locale_stringbuf): New.
2440 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2441 deprecated.[hc]. Implemented in terms of the new functions above.
2442 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2443 scm_makfrom0str): Reimplemented in terms of the new functions from
2444 above. They will be discouraged shortly.
2445 (scm_substring): Do not use scm_mem2string.
2446 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2447 to replace similar code from posix.c, simpos.c, and dynl.c.
2448 (scm_string_append): Use memcpy instead of explicit loop. Do not
2449 use register keyword. Use plain 'char' instead of 'unsigned
2450 char'.
2451
2452 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2453 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2454
2455 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2456 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2457 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2458 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2459
2460 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2461 string. This avoids a conversion round-trip.
2462
2463 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2464 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2465 SCM_I_STRING_LENGTH, respectively.
2466 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2467
2468 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2469 of a string, call scm_display on the string itself.
2470
2471 * dynwind.c, dynwind.h (scm_frame_free): New.
2472
2473 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2474 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2475 Replaced uses of SCM_STRING_CHARS with proper uses of
2476 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2477 Replaced scm_mem2string with scm_from_locale_string.
2478
2479 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2480 Removed, replaced all uses with scm_i_allocate_string_pointers.
2481
2482 * load.h, load.c (scm_internal_parse_path): Removed.
2483 (scm_parse_path): Use scm_string_split to do the work.
2484 (scm_init_load_path): Use scm_parse_path instead of
2485 scm_internal_parse_path.
2486 (scm_search_path): Rewritten string handling part of the code in
2487 terms of scm_to_locale_stringbuf and so that it is thread safe.
2488
2489 * error.c (scm_error_scm): Throw directly instead of calling
2490 scm_error, this avoids the back and forth conversion of SUBR and
2491 MESSAGE and also plugs a memory leak.
2492 (scm_error): Call scm_error_scm.
2493
2494 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2495 (display_header): Print FNAME when it is true, not
2496 merely when it is a string.
2497
2498 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2499 unceremoniously. They were unused by Guile itself, and external
2500 use should stop immediately.
2501
2502
2503 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2504
2505 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2506 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2507 deprecated versions installed in deprecated.h and deprecated.c.
2508 Changed all uses.
2509
2510 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2511
2512 * net_db.c (scm_resolv_error): don't cause an exception while
2513 trying to throw an exception -- call scm_misc_error with correct
2514 arguments. The previous arguments needed a format escape that
2515 wasn't in any of the format strings.
2516
2517 2004-08-06 Kevin Ryde <user42@zip.com.au>
2518
2519 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2520 so as not to depend on signedness of plain char. For byvect range
2521 check, throw out-of-range rather than wrong-type-arg.
2522
2523 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2524 signed byte range checks by using scm_to_schar and scm_from_schar,
2525 don't want to depend on signedness of C char.
2526
2527 2004-08-05 Kevin Ryde <user42@zip.com.au>
2528
2529 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2530 SCM_DEFER_INTS.
2531 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2532 guaranteed if multiple threads compete to unlock.
2533 Update docstrings per doc/ref/api-scheduling.texi.
2534
2535 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2536 stat on the filename, to be certain a file rename can't mean we get
2537 info on one filesystem object but open another. This fstat usage is
2538 similar to Emacs copy-file.
2539
2540 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2541
2542 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2543 SIGINT and SIGQUIT, since those values are ints.
2544
2545 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2546
2547 * num2integral.i.c, num2float.i.c: Removed.
2548 * Makefile.am (noinst_HEADERS): Updated.
2549
2550 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2551 scm_i_make_ratio and made static, replaced uses with scm_divide.
2552 (scm_complex_p): New, export as "complex?" to Scheme.
2553 (scm_number_p): Export as "number?" to Scheme.
2554 (scm_is_complex, scm_is_number): New.
2555 (scm_c_make_rectangular, scm_c_make_polar): New.
2556 (scm_make_rectangular, scm_make_polar): Use above.
2557 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2558 New.
2559 (scm_make_complex): Discouraged by moving to discouraged.h and
2560 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2561
2562 * discouraged.h, discouraged.c, numbers.c, numbers.h
2563 (scm_is_rational): New.
2564 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2565 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2566 Removed prototypes.
2567 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2568 Discouraged by moving to discouraged.h and discouraged.c.
2569 Replaced all uses with scm_from_double.
2570 (scm_num2float, scm_num2double): Discouraged by moving prototype
2571 to discouraged.h and rewriting in terms of scm_to_double.
2572 Replaced all uses with scm_to_double.
2573 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2574 explicit code.
2575 (scm_from_double): Do not implement in terms of scm_make_real, use
2576 explicit code.
2577
2578 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2579
2580 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2581
2582 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2583 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2584
2585 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2586 Renamed to SCM_I_* in order to avoid collisions with the versions
2587 defined in deprecated.h.
2588
2589 * discouraged.h, discouraged.c: New files.
2590
2591 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2592 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2593 deprecated to being discouraged by moving to discouraged.h.
2594
2595 * numbers.h, numbers.c, discouraged.h, discouraged.c
2596 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2597 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2598 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2599 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2600 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2601 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2602 discouraged.c and reimplementing in terms of scm_from_* and
2603 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2604 functions.
2605
2606 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2607 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2608 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2609 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2610 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2611 explicit code.
2612
2613 2004-08-02 Kevin Ryde <user42@zip.com.au>
2614
2615 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2616 and current usage and migration.
2617
2618 2004-07-31 Kevin Ryde <user42@zip.com.au>
2619
2620 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2621 it's not thread safe.
2622 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2623 advantage of this.
2624 * fports.c (scm_open_file): Use scm_strerror likewise.
2625 * filesys.c (scm_stat, scm_lstat): Ditto.
2626
2627 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2628 cannot be opened.
2629
2630 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2631 update, for thread safety.
2632 (gensym_counter): Move into scm_gensym which is its only user.
2633 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2634
2635 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2636
2637 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2638 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2639 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2640 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2641 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2642 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2643 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2644 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2645 defined in terms of scm_to_signed_integer, etc, but in terms of
2646 scm_to_int8, etc.
2647
2648 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2649
2650 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2651 no longer used.
2652
2653 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2654 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2655
2656 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2657 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2658 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2659 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2660 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2661 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2662 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2663
2664 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2665 the functions below.
2666
2667 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2668 conv-uinteger.i.c.
2669
2670 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2671 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2672 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2673 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2674 scm_from_uint64): Turned from macros into proper functions.
2675 (scm_to_signed_integer, scm_to_unsigned_integer,
2676 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2677 conv-integer.i.c and conv-uinteger.i.c, as well.
2678
2679 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2680 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2681 the limits. Those are always defined.
2682
2683 2004-07-29 Kevin Ryde <user42@zip.com.au>
2684
2685 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2686
2687 2004-07-28 Kevin Ryde <user42@zip.com.au>
2688
2689 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2690 safety.
2691
2692 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2693 consistency with other vector types and to get arg and func name into
2694 error message.
2695
2696 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2697
2698 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2699 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2700 scm_from_bool, respectively.
2701 (SCM_NINUMP): Added.
2702
2703 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2704 deprecated.h. Replaced all uses with scm_is_eq.
2705
2706 2004-07-24 Kevin Ryde <user42@zip.com.au>
2707
2708 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2709 * posix.c (scm_crypt): Use it to protect static data in crypt().
2710
2711 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2712
2713 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2714 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2715 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2716 versions to deprecated.h and deprecated.c. Changed all uses to
2717 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2718 scm_from_*, as appropriate.
2719
2720 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2721 the unexisting scm_cross_dynwind_binding_scope for inums on the
2722 windlist.
2723
2724 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2725
2726 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2727 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2728 byte-wise address to a SCM integer. Changed all uses.
2729 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2730 scm_to_ipv6 and added type and range checking, for converting from
2731 an IPv& byte-wise address to a SCM integer. Changed all uses.
2732 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2733 is now done by scm_to_ipv6.
2734
2735 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2736 not accept inexact integers.
2737
2738 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2739 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2740 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2741 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2742 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2743 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2744 fixnum/bignum distinction visible. Changed all uses to
2745 scm_to_size_t or similar.
2746
2747 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2748
2749 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2750
2751 2004-07-10 Kevin Ryde <user42@zip.com.au>
2752
2753 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2754 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2755 such a size causes divide-by-zeros in scm_hasher.
2756
2757 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2758 leak.
2759
2760 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2761
2762 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2763 Rewritten using the same logic as scm_to_signed_integer and
2764 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2765 use CHAR_BIT instead of hardcoding 8.
2766 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2767 SCM_I_LLONG_MIN etc. instead.
2768
2769 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2770 SCM_I_MAKINUM and changed all uses.
2771 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2772
2773 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2774 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2775 them by assuming twos-complement.
2776
2777 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2778
2779 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2780 configure now produces.
2781 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2782 definitions, giving the limits of the integer types defined by
2783 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2784 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2785
2786 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2787 SHORT_MIN.
2788 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2789 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2790 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2791 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2792 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2793 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2794 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2795 scm_from_uintmax): New.
2796
2797 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2798
2799 * tags.h (scm_is_eq): New.
2800
2801 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2802 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2803 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2804 scm_from_bool, and scm_is_bool, respectively.
2805
2806 * boolean.h (scm_is_bool): Fix bug in prototype.
2807 (scm_from_bool): The argument is "x" not "f", stupid.
2808
2809 * boolean.c (scm_is_bool): Fix typo.
2810
2811 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2812 scm_is_unsigned_integer, scm_to_signed_integer,
2813 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2814 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2815 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2816 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2817 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2818 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2819 New.
2820
2821 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2822
2823 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2824 scm_to_bool): New.
2825
2826 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2827
2828 * backtrace.c (display_expression, display_frame): Call
2829 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2830 single memoized expression.
2831
2832 * debug.c (memoized_print): Don't try to unmemoize the memoized
2833 object, since we can't know whether it holds a single expression
2834 or a body.
2835
2836 (scm_mem_to_proc): Removed check for lambda expression, since it
2837 was moot anyway. Whoever uses these functions for debugging
2838 purposes should know what they do: Creating invalid memoized code
2839 will cause crashes, independent of whether this check is present
2840 or not.
2841
2842 (scm_proc_to_mem): Take the closure's code as it is and don't
2843 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2844 memoized code should not be modified.
2845
2846 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2847 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2848 available as a guile internal function instead. However,
2849 scm_i_unmemoize_expr will only work on memoized objects that hold
2850 a single memoized expression. It won't work with bodies.
2851
2852 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2853 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2854 i. e. a list of expressions.
2855
2856 * eval.c (unmemoize_exprs): Drop internal body markers from the
2857 output during unmemoization.
2858
2859 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2860 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2861 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2862 as guile internal functions instead. scm_i_unmemoize_expr will
2863 only work on a single memoized expression, while
2864 scm_i_unmemocopy_body will only work on bodies.
2865
2866 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2867
2868 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2869
2870 (scm_cons_source, scm_primitive_eval): Prefer higher level
2871 predicate SCM_FALSEP over SCM_IMP.
2872
2873 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2874
2875 * script.c (scm_shell_usage): minor phrasing change.
2876
2877 * gc_os_dep.c: update ifdefery for macosx.
2878 (scm_get_stack_base): separate result initialization from
2879 declaration to slience warnings with macosx and hp-ux using gcc
2880 3.3. Thanks to Andreas Vögele.
2881
2882 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2883
2884 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2885
2886 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2887
2888 * list.[ch] (scm_i_finite_list_copy): New internal function to
2889 copy lists that are known to be finite (though not necessarily
2890 proper).
2891
2892 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2893 a closure's argument list like an expression of a body.
2894
2895 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2896 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2897 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2898 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2899 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2900 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2901 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2902 unmemoize_builtin_macro): New static functions and symbols.
2903
2904 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2905 now has a slightly different meaning: The memoized form that is
2906 receives as its argument is now interpreted as a sequence of
2907 expressions from a body.
2908
2909 (unmemocar, scm_unmemocar): Since the whole functionality of
2910 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2911 has its old content back and is deprecated, while unmemocar has
2912 been removed.
2913
2914 (SCM_BIT7): Removed.
2915
2916 (CEVAL): For unmemoizing a single expression, call
2917 unmemoize_expression instead of scm_unmemocopy, which now expects
2918 a sequence of body expressions. Eliminated unnecessary empty
2919 environment frame when executing let* forms. Eliminated
2920 unmemoization step from evaluator.
2921
2922 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2923
2924 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2925 macroexp and made static. Added new version of scm_macroexp that
2926 emits a deprecation warning and then calls macroexp.
2927 (scm_m_undefine): Issue deprecation warning.
2928
2929 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2930
2931 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2932 Modified to make set! work on symbols that represent syntactic
2933 keywords.
2934
2935 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2936
2937 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2938 compound expression as lvalue errors.
2939
2940 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2941
2942 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2943 WINDER_DATA to a SCM.
2944
2945 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2946
2947 * goops.c (compute_getters_n_setters, create_standard_classes,
2948 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2949 lambda expression rather than creating them with scm_closure.
2950
2951 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2952
2953 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2954 misplaced syntactic keywords. This will not work unless guile's
2955 defmacro feature is deprecated.
2956
2957 (scm_m_case): Fixed a bug that caused the list of labels to grow
2958 with every case form.
2959
2960 2004-05-19 Kevin Ryde <user42@zip.com.au>
2961
2962 * numbers.c (scm_round_number): For inum and big, just return x. For
2963 real, use scm_round for 2^54-1 etc problems covered there.
2964
2965 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2966 doesn't provide trunc. This was for when `truncate' was done as a
2967 scm_tc7_dsubr, no longer required.
2968
2969 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2970 to stack marking call, two parameters and no cast on t->base.
2971
2972 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2973
2974 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2975 processed hashtables back into the weak_hashtables list. Thanks
2976 to Bill Schottstaedt!
2977
2978 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2979
2980 * eval.c (unmemoize_quote): New static function.
2981
2982 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2983 representation of 'quote' and '@slot-ref' to an improper list.
2984 This reduces execution time, the number of cells used to hold the
2985 memoized code, and thus also reduces garbage collection time.
2986
2987 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2988
2989 (SCM_CEVAL): Changed macro handling to also work with macros that
2990 return improper lists. Added an assertion, that the code returned
2991 by a macro transformer will not lead to cycles in the memoized
2992 code.
2993
2994 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2995
2996 No functional change, just rearrangements of functions within the
2997 file.
2998
2999 * eval.c (scm_ilookup, scm_unbound_variable_key,
3000 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
3001 the definitions used for execution, since that's where they will
3002 belong to later.
3003
3004 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3005
3006 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
3007 throughout guile, has not been part of an official release yet,
3008 and the concept of sloppy predicates has never been a good idea.
3009
3010 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
3011 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
3012 Simplified.
3013
3014 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3015
3016 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
3017 to make explicit what happens.
3018
3019 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3020
3021 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
3022 explicit what happens.
3023
3024 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
3025 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
3026
3027 2004-05-11 Marius Vollmer <mvo@zagadka.de>
3028
3029 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
3030 is indeed a procedure when it isn't a number.
3031
3032 2004-05-10 Marius Vollmer <mvo@zagadka.de>
3033
3034 Convert floating point numbers into strings with an arbitrary
3035 radix. Thanks to Richard Todd!
3036
3037 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
3038 fit.
3039 (fx): Removed.
3040 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
3041 number_chars): New, to support variable radices.
3042 (idbl2str): Use above instead of the old base-10 only tables.
3043 (iflo2str): Pass on new RADIX argument to idbl2str.
3044 (scm_number_to_string): Pass radix to iflo2str.
3045 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
3046 iflo2str.
3047 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
3048 possible radices.
3049
3050 2004-05-10 Kevin Ryde <user42@zip.com.au>
3051
3052 * numbers.c (scm_logbit_p): Correction to test above the end of an
3053 inum. Reported by Jan Konecny.
3054
3055 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3056
3057 * gc.h (scm_t_cell): Fields are now of type SCM instead of
3058 scm_t_bits. Updated all users.
3059 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
3060 duplicating the code.
3061 (SCM_CELL_OBJECT_LOC): New.
3062 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
3063 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
3064
3065 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
3066 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
3067 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
3068 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
3069 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
3070 SCM_SMOB_OBJECT_3_LOC): New.
3071 * smob.c (scm_i_set_smob_flags): New function.
3072
3073 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
3074 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
3075 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
3076 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
3077 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
3078 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
3079
3080 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
3081 taking the address of SCM_CELL_WORD_1, the latter being no longer
3082 an lvalue.
3083
3084 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
3085 of casting SCM_CELL_WORD_LOC.
3086
3087 2004-05-02 Kevin Ryde <user42@zip.com.au>
3088
3089 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
3090 --disable-deprecated. Reported by Andreas Vögele.
3091
3092 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
3093 particular on HP-UX). Reported by Andreas Vögele.
3094
3095 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
3096 code has support for. Fixes building with AIX cc, which is ansi but
3097 doesn't define __STDC__. Reported by Keith Crane.
3098 (var_start): Remove macro, this variation no longer required.
3099 (scm_list_n): Use va_start directly.
3100
3101 2004-05-01 Kevin Ryde <user42@zip.com.au>
3102
3103 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
3104 is now gone. Reported by Andreas Vögele.
3105
3106 2004-04-28 Kevin Ryde <user42@zip.com.au>
3107
3108 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
3109 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
3110 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
3111 subscript. Reported by Andreas Vögele.
3112 Also cast through unsigned char to avoid passing negatives to those
3113 macros if input contains 8-bit values.
3114
3115 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
3116 corrections to range check for signed numbers. Remove
3117 scm_remember_upto_here_1(num) from these checks, since num is used
3118 subsequently anyway.
3119
3120 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
3121 avoid warning from gcc 3.4. Reported by Hyperdivision.
3122
3123 * numbers.c (scm_bit_extract): Use min instead of MIN.
3124 (MIN): Remove, this conflicts with similar macro defined by limits.h
3125 on HP-UX. Reported by Andreas Vögele.
3126
3127 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
3128 particular on HP-UX). Reported by Andreas Vögele.
3129
3130 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
3131 Reported by Andreas Vögele.
3132
3133 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
3134 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
3135 by Andreas Vögele.
3136
3137 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3138
3139 * eval.c (s_macro_keyword): New static identifier.
3140
3141 (scm_m_define): Change order to first create binding and
3142 evaluating the expression afterwards.
3143
3144 (scm_m_set_x): Memoize complete set! expression. Only leave
3145 symbols if no binding exists at memoization time. Throw error if
3146 assigning to a syntactic keyword.
3147
3148 (lazy_memoize_variable): New function.
3149
3150 (CEVAL): When execution set!, perform lazy memoization if
3151 unmemoized symbol is detected.
3152
3153 * modules.c (module_variable): Return variables with unbound
3154 value.
3155
3156 * tags.h: Fix comment.
3157
3158 2004-04-25 Kevin Ryde <user42@zip.com.au>
3159
3160 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
3161 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
3162 in 8-bit locales, and ensures consistency with char-upper-case? and
3163 char-lower-case? which already use ctype.h.
3164 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
3165 Remove.
3166 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
3167
3168 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
3169 call. Reported by Hyperdivision.
3170
3171 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
3172 Reported by Hyperdivision.
3173
3174 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
3175 Hyperdivision.
3176
3177 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3178
3179 Hide the implementation of ilocs and isyms in eval.c.
3180
3181 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3182 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3183 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
3184 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
3185 eval.h to eval.c.
3186
3187 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
3188 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
3189 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
3190 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
3191 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
3192 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
3193 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
3194 renamed to ISYMNUM.
3195
3196 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
3197 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
3198 Extracted printing of ilocs and isyms to guile internal functions
3199 scm_i_print_iloc, scm_i_print_isym of eval.c.
3200
3201 2004-04-22 Kevin Ryde <user42@zip.com.au>
3202
3203 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3204
3205 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3206 rounding in x+0.5 when x is a big value already an integer. In
3207 certain hardware rounding cases x+0.5 can give an adjacent integer,
3208 leading to that as the result, when we really just wanted x itself.
3209
3210 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3211
3212 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3213
3214 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3215 added const qualifiers, cast intentionally unused expressions to
3216 void for emphasis, improved comment.
3217
3218 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3219
3220 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3221 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3222 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3223 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3224 Defined the tc8-tag for flags to be 0x04, which will mean that
3225 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3226 to the reduced number of bits and the simpler bit pattern for
3227 SCM_BOOL_F, certain machines may be able to use more efficient
3228 processor instructions to deal with SCM_BOOL_F.
3229
3230 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3231 never been defined in a released version, thus no need to
3232 deprecate them.
3233
3234 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3235 instead of tc9 tags.
3236
3237 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3238 of tc9 tags.
3239
3240 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3241 could have used this definition.
3242
3243 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3244 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3245 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3246 as isyms, as special isyms don't exist any more.
3247
3248 2004-04-18 Kevin Ryde <user42@zip.com.au>
3249
3250 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3251 safety.
3252
3253 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3254 explicit swapping code.
3255
3256 2004-04-15 Kevin Ryde <user42@zip.com.au>
3257
3258 * cpp_sig_symbols.in: Add SIGSYS.
3259
3260 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3261 recursion.
3262
3263 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3264 frac/big and frac/frac, use scm_less_p for exact comparison.
3265
3266 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3267 with big/inum.
3268
3269 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3270
3271 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3272
3273 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3274
3275 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3276 scm_c_{up,down}case.
3277 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3278 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3279
3280 2004-04-06 Kevin Ryde <user42@zip.com.au>
3281
3282 * numbers.c (scm_ash): Remove stray "}" in docstring.
3283
3284 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3285 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3286 calling mpz_cmp_ui in most cases.
3287
3288 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3289 for big == abs(most-negative-fixnum) special case.
3290 (abs_most_negative_fixnum): Remove, no longer used.
3291
3292 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3293 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3294 calling (sigaction NSIG).
3295
3296 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3297 and fork error cases to do this.
3298
3299 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3300
3301 * eval.c (CEVAL): Don't distinguish between short and long
3302 instructions when dispatching - just always dispatch on the
3303 instruction code, which is common for short and long instructions.
3304 Further, removed unnecessary goto statements and added comment.
3305
3306 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3307
3308 * eval.c (scm_unmemocopy): Don't distinguish between short and
3309 long instructions when dispatching - just always dispatch on the
3310 instruction code, which is common for short and long instructions.
3311 Further, removed unnecessary goto statements, fixed indentation
3312 and replaced SCM_IMP predicates by SCM_NULLP.
3313
3314 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3315
3316 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3317 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3318 'checkmacro'.
3319
3320 2004-03-31 Kevin Ryde <user42@zip.com.au>
3321
3322 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3323
3324 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3325
3326 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3327 SCM_DEBUGGINGP:
3328
3329 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3330 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3331 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3332 single interface that also matches the naming conventions.
3333 Probably scm_debug_mode_p should be part of the private interface
3334 anyway.
3335
3336 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3337 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3338 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3339 to scm_debug_mode_p.
3340
3341
3342 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3343
3344 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3345 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3346 from debug.h to eval.h.
3347
3348 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3349 more, just leave it with setting scm_debug_mode_p, which is
3350 equivalent for practical purposes.
3351
3352 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3353 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3354
3355 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3356
3357 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3358 static and renamed it to ceval throughout. Provide a new exported
3359 but deprecated function scm_ceval as a wrapper for backwards
3360 compatibility. The same is done for the deval/scm_deval pair of
3361 functions.
3362
3363 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3364 throughout. Defined CEVAL to ceval or deval, based on compilation
3365 phase.
3366
3367 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3368 to ceval and deval instead of calling *scm_ceval_ptr.
3369
3370 * eval.c (dispatching_eval): New deprecated static function.
3371
3372 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3373 to emulate its old behaviour as closely as possible.
3374
3375
3376 Change the evaluator such that only expressions for which pair? is
3377 true are passed to CEVAL, and such that all other expressions are
3378 evaluated outside of CEVAL:
3379
3380 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3381 expression that is assumed to be memoized already. All but
3382 expressions of the form '(<form> <form> ...)' are evaluated inline
3383 without calling an evaluator.
3384
3385 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3386 expressions of the form '(<form> <form> ...)' inline without
3387 calling an evaluator.
3388
3389 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3390 the special case of unmemoized symbols passed on the top level.
3391
3392 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3393 is known that the expression passed to CEVAL is of the form
3394 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3395 now it is known that the input expression of CEVAL is a pair.
3396
3397 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3398
3399 * eval.c (is_self_quoting_p): New static function.
3400
3401 (scm_m_quote): Use is_self_quoting_p.
3402
3403 (copy_tree): Corrected typo in comment.
3404
3405 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3406
3407 * eval.c (s_scm_copy_tree): idem.
3408
3409 * list.c (s_scm_filter): remove "pointer" from doc string.
3410
3411 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3412
3413 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3414
3415 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3416 (display_frame): idem.
3417 (display_backtrace_file_and_line): idem.
3418
3419 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3420 arguments.
3421
3422 2004-03-26 Kevin Ryde <user42@zip.com.au>
3423
3424 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3425
3426 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3427 big==0 since that never occurs.
3428
3429 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3430 scm_modular_expt, matching scheme level name `modulo-expt'.
3431
3432 * numbers.c (scm_modular_expt): Return a negative remainder for a
3433 negative divisor, the same as `modulo' does.
3434
3435 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3436
3437 * numbers.c, numbers.h (scm_modular_expt): New function.
3438
3439 2004-03-25 Kevin Ryde <user42@zip.com.au>
3440
3441 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3442 return inexact as required by r5rs.
3443
3444 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3445
3446 * eval.c: Separated some definitions relevant for execution from
3447 the memoization part of the file.
3448
3449 (copy_tree): New static function
3450
3451 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3452 structures are detected now and will lead to an exception instead
3453 of forcing guile to run in an endless loop, using up all the
3454 system's memory. Second, arrays in the cdr of an improper list
3455 are now copied. See the new test cases in eval.test.
3456
3457 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3458
3459 * posix.c (scm_gethostname): Make sure len is initialised before
3460 it is used. Restructured to (hopefully) represent possible
3461 configurations more clearly in the code. Added unwind handler.
3462
3463 2004-03-23 Kevin Ryde <user42@zip.com.au>
3464
3465 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3466 MAXHOSTNAMELEN when available.
3467
3468 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3469
3470 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3471 terminator. Rewritten the logic as a state machine, I must have
3472 been doing too much VHDL lately...
3473
3474 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3475 themselves. Thanks to Han-Wen Nienhuys!
3476
3477 * list.c: Changed docstrings so that they no longer talk about
3478 returning 'pointers' to something.
3479
3480 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3481
3482 * gc.c: remove set_debug_cell_accesses! when
3483 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3484 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3485 debugging conditionally.
3486
3487 2004-03-21 Kevin Ryde <user42@zip.com.au>
3488
3489 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3490
3491 2004-03-20 Kevin Ryde <user42@zip.com.au>
3492
3493 * posix.c (scm_gethostname): Preserve errno across free() call.
3494
3495 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3496
3497 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3498 free cells.
3499
3500 2004-03-14 Kevin Ryde <user42@zip.com.au>
3501
3502 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3503 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3504
3505 2004-03-07 Kevin Ryde <user42@zip.com.au>
3506
3507 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3508 than "GMT" always.
3509 (filltime): Make zname parameter "const".
3510
3511 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3512
3513 * threads.c, threads.h (scm_c_scm2thread): New function.
3514
3515 2004-02-29 Kevin Ryde <user42@zip.com.au>
3516
3517 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3518 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3519 particular don't assume "defined (__alpha__) && ! defined (linux)"
3520 means OSF. Remove "SCO" code, which was not really SCO specific and
3521 which John W. Eaton advises should be long past being needed.
3522
3523 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3524 error throw.
3525
3526 2004-02-24 Kevin Ryde <user42@zip.com.au>
3527
3528 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3529
3530 2004-02-22 Kevin Ryde <user42@zip.com.au>
3531
3532 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3533 complex, same as for two args. (Handle only inum, big, real, frac).
3534
3535 2004-02-21 Kevin Ryde <user42@zip.com.au>
3536
3537 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3538 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3539 Reported by Andreas Voegele.
3540
3541 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3542
3543 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3544 validation.
3545
3546 * read.c (scm_lreadparen): Removed.
3547 (scm_lreadparen1): Renamed scm_i_lreadparen.
3548
3549 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3550
3551 * list.c (scm_list_n): validate non-immediate arguments;
3552 this will catch forgotten a SCM_UNDEFINED.
3553
3554 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3555
3556 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3557 Thanks to Bill Schottstaedt!
3558
3559 * socket.h (scm_gethost): Removed prototype it is already in
3560 "net_db.h". Thanks to Bill Schottstaedt!
3561
3562 2004-02-18 Kevin Ryde <user42@zip.com.au>
3563
3564 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3565 order parameter to mpz_import, in fact with just one word there's no
3566 order to worry about at all.
3567
3568 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3569 and frac==complex, make an exact comparison rather than converting
3570 with fraction2double.
3571
3572 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3573 shared library, since environ is not directly available there.
3574
3575 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3576 standard.
3577
3578 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3579 errno EINVAL in case localtime and gmtime don't set it.
3580 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3581 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3582
3583 2004-02-16 Kevin Ryde <kevin@swox.se>
3584
3585 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3586 which were permitted in the past for these.
3587
3588 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3589 previous change to numbers.c.
3590
3591 * script.c (scm_shell_usage): Print bug-guile email address, as per
3592 GNU standard. Reported by Han-Wen Nienhuys.
3593
3594 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3595
3596 * unif.c (scm_make_uve): Removed local variable and simplified
3597 code in order to avoid compiler used uninitialized warnings.
3598
3599 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3600 scm_hash_map.
3601 (scm_hash_fold): Use scm_call_3 directly in the call to
3602 scm_internal_hash_fold instead of going via fold_proc (which is
3603 now removed).
3604 (scm_hash_for_each): Use a trampoline +
3605 scm_internal_hash_for_each_handle.
3606 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3607 functions.
3608
3609 2004-02-12 Kevin Ryde <user42@zip.com.au>
3610
3611 * ports.c (scm_port_line): In docstring, note first line is 0.
3612 (scm_set_port_line_x): In docstring, note first line is 0.
3613 (scm_port_column): In docstring, there's no default to current input
3614 port, and remove shared port-line @defun.
3615 (scm_set_port_column_x): In docstring, there's no default to current
3616 input port, note first column is 0, remove shared set-port-line!
3617 @defun.
3618
3619 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3620 convert args the same way that array-set! does.
3621
3622 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3623 for dvect.
3624 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3625 for "l" not "s", fix dvect to be false for singp(prot) since such a
3626 value is for fvect.
3627 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3628 (exactly_one_third): New variable.
3629 (scm_init_unif): Initialize it.
3630
3631 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3632
3633 * read.c (scm_read_opts): Change `escaped-parens' to
3634 `elisp-strings'.
3635
3636 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3637
3638 * read.c (scm_read_opts): New opts `elisp-vectors' and
3639 `escaped-parens'.
3640 (s_vector): New.
3641 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3642 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3643 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3644 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3645 `escaped-parens' option set.
3646 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3647 in tokens.
3648 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3649 (scm_lreadparen1): New.
3650
3651 * read.h: Remove conditionally compiled last arg to
3652 scm_lreadparen.
3653 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3654
3655 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3656
3657 * eval.c (m_expand_body): remove stray variable new_body.
3658
3659 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3660
3661 * eval.c (m_expand_body): Rewrite the expression in place (by
3662 overwriting FORMS) also when a letrec is constructed, not only
3663 when no definitions are found. Do not return rewritten expression
3664 to emphasize the in-place rewriting. Changed all users.
3665
3666 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3667
3668 * gc.c: add protected_object_count, a number that is dumped from
3669 gc_stats()
3670
3671 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3672
3673 * dynwind.h, dynwind.c (scm_frame_unwind,
3674 scm_frame_unwind_handler): Renamed and changed all uses.
3675 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3676
3677 2004-01-11 Kevin Ryde <user42@zip.com.au>
3678
3679 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3680 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3681 changes made to scheme-compound.texi.
3682
3683 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3684
3685 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3686 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3687
3688 * guile-snarf.in: Use mkdir to create a unique temporary directory
3689 that we can safely use. Thanks to Stefan Nordhausen!
3690
3691 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3692
3693 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3694 argument since it is always zero now. Changed all callers.
3695 Removed code for handling fluids.
3696
3697 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3698 the wind chain explicitely. Use scm_c_with_fluid for the common
3699 case of only one fluid.
3700 (scm_with_fluid): New.
3701 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3702
3703 * fluids.h, fluids.c (scm_frame_fluid): New.
3704 (scm_with_fluid): New.
3705 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3706
3707 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3708 do the unwinding directly. It is simple enough.
3709
3710 * dynwind.h, dynwind.c: Did the following renamings:
3711 scm_begin_frame -> scm_frame_begin,
3712 scm_end_frame -> scm_frame_end,
3713 scm_on_unwind -> scm_frame_unwind,
3714 scm_on_rewind -> scm_frame_rewind,
3715 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3716 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3717 Changed all uses.
3718
3719 * aync.h, async.c: Did the follwing renamings:
3720 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3721 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3722 Changed all uses.
3723
3724 * ports.h, ports.c: Did the follwing renamings:
3725 scm_with_current_input_port -> scm_frame_current_input_port,
3726 scm_with_current_output_port -> scm_frame_current_output_port,
3727 scm_with_current_error_port -> scm_frame_current_error_port.
3728 Changed all uses.
3729
3730 2004-01-07 Kevin Ryde <user42@zip.com.au>
3731
3732 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3733 Reported by Richard Todd.
3734
3735 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3736 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3737
3738 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3739 traversing the args list, fixes segv if an improper list is given.
3740 Reported by Rouben Rostamian.
3741
3742 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3743
3744 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3745 swap_data on stack, use a 'malloc obj'.
3746
3747 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3748 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3749 scm_i_... since they are internal. Changed all uses.
3750
3751 * dynwind.c (frame_print): Removed, use the default printer.
3752 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3753 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3754 to protect SCM values.
3755
3756 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3757 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3758 Changed all uses.
3759 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3760
3761 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3762
3763 * ports.h, ports.c (scm_with_current_input_port,
3764 scm_with_current_output_port, scm_with_current_error_port): New.
3765
3766 * async.h, async.c (scm_with_blocked_asyncs,
3767 scm_with_unblocked_asyncs): New.
3768
3769 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3770
3771 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3772 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3773 New.
3774 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3775 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3776 function when the outermost wind point has been reached. The
3777 latter is used to copy a continuation stack at the right time.
3778 scm_dowinds remains available.
3779 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3780 tc16_guard, guards_print): Removed.
3781 (scm_internal_dynamic_wind): Reimplemented using frames.
3782
3783 * continuations.c (copy_stack): New, do only the stack copying
3784 part of copy_stack_and_call.
3785 (copy_stack_and_call): Copy the stack after unwinding and before
3786 rewinding.
3787 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3788 copy_stack_and_call.
3789
3790 2004-01-04 Kevin Ryde <user42@zip.com.au>
3791
3792 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3793 can give bad results due to rounding.
3794
3795 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3796 setzone/restorezone protection for DOS.
3797
3798 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3799
3800 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3801 and scm_t_uintmax to be defined in scmconfig.h
3802
3803 2003-12-03 Kevin Ryde <user42@zip.com.au>
3804
3805 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3806
3807 * numbers.c (scm_make_ratio): Check for numerator equal to
3808 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3809 giving integer -1.
3810
3811 * numbers.c (scm_real_part): Return fraction unchanged rather than
3812 converting to flonum.
3813
3814 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3815
3816 * modules.c (module_variable): Fixed (and thus simplified) the
3817 definition of SCM_BOUND_THING_P to reflect the fact that since
3818 after the 1.4 series of guile, obarrays only hold variable
3819 objects.
3820
3821 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3822
3823 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3824
3825 From Paul Jarc:
3826
3827 * read.c (scm_lreadr): Signal an error for invalid escape
3828 sequences in strings. Code cleanups too.
3829
3830 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3831 writing control characters in strings.
3832
3833 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3834
3835 * ports.c (scm_drain_input): Bug fix: only access the port after
3836 checking that it indeed is one.
3837
3838 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3839
3840 * eval.c (s_bad_define): New static identifier.
3841
3842 (m_body): Fixed comment.
3843
3844 (scm_m_define): Don't generate memoized code for definitions that
3845 are not on the top level. As a consequence, no memoized code at
3846 all is generated for definitions any more: Top level definitions
3847 are executed immediately during memoization and internal
3848 definitions are handled separately in m_expand_body.
3849
3850 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3851 definitions. Consequently, there is no unmemoizing code any more
3852 that might modify the environment. Thus, the old scm_unmemocopy
3853 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3854
3855 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3856 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3857 over SCM_NIMP in places, where the argument is known to be part of
3858 a proper list.
3859
3860 2003-11-21 Kevin Ryde <user42@zip.com.au>
3861
3862 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3863 for bignums.
3864
3865 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3866 to share some shifting.
3867
3868 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3869 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3870 since gc does this.
3871
3872 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3873
3874 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3875 structure. Previously, not all cases with a negative denominator
3876 were covered.
3877
3878 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3879 scm_divide2real when forming the fractional part. This allows
3880 "#e1.2" to yield 6/5.
3881
3882 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3883 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3884 fractions were equal to each other regardless of value. Ooops.
3885
3886 * numbers.c (scm_rationalize): Return an inexact result when given
3887 inexact arguments.
3888
3889 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3890 non-numbers.
3891
3892 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3893
3894 Support for exact fractions from Bill Schottstaedt! Thanks!
3895
3896 * print.c (scm_iprin1): Handle fractions.
3897
3898 * objects.h (scm_class_fraction): New.
3899 * objects.c (scm_class_fraction): New.
3900 (scm_class_of): Handle fractions.
3901
3902 * hash.c (scm_hasher): Handle fractions.
3903
3904 * numbers.c: New code for handling fraction all over the place.
3905 (scm_odd_p, scm_even_p): Handle inexact integers.
3906 (scm_rational_p): New function, same as scm_real_p.
3907 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3908 New exact functions that replace the inexact 'dsubr'
3909 implementations.
3910 (scm_numerator, scm_denominator): New.
3911
3912 * numbers.h (SCM_NUMP): Recognize fractions.
3913 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3914 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3915 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3916 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3917 SCM_FRACTION_REDUCED): New.
3918 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3919 New prototypes.
3920 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3921 scm_rational_p): New prototypes.
3922 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3923 scm_i_print_fraction): New prototypes.
3924
3925 * goops.c (create_standard_classes): Create "<fraction>" class.
3926
3927 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3928
3929 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3930 case in the switch, but do nothing for now.
3931
3932 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3933 to doubles when calling 'dsubr' functions.
3934
3935 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3936
3937 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3938
3939 * gen-scmconfig.c (main): remove public definition of
3940 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3941 direct typedef of long_long and ulong_long inside deprecated block
3942 when appropriate.
3943
3944 * deprecated.h: move long_long and ulong_long definitions to
3945 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3946 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3947
3948 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3949
3950 * hash.c (scm_string_hash): New hashing algorithm that takes the
3951 complete string into account.
3952
3953 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3954 is a list. This allows (@ ...) to work with set!.
3955 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3956 SCM_ASSYNT.
3957
3958 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3959 the "-e" option instead of scm_str2symbol. This allows things
3960 like (@ ...) to be specified for the entry point.
3961
3962 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3963
3964 * eval.c (scm_m_letstar): Create memoized code in place to
3965 minimize consing.
3966
3967 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3968
3969 * eval.c (s_splicing): Commented and reformulated.
3970
3971 (lookup_global_symbol, lookup_symbol): New static functions.
3972
3973 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3974
3975 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3976 creating a temporary pair for scm_lookupcar.
3977
3978 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3979 created deprecated wrapper function scm_unmemocar.
3980
3981 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3982 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3983 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3984 undefineds, sym_three_question_marks): Moved around without
3985 modifications.
3986
3987 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3988
3989 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3990
3991 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3992 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3993 No further modifications.
3994
3995 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3996
3997 * eval.c (s_mixed_body_forms): New static identifier.
3998
3999 (canonicalize_define, scm_m_define): The check for a bad
4000 expression is performed in canonicalize_define now.
4001
4002 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
4003 static helper functions for m_expand_body.
4004
4005 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
4006 expand user defined macros. Fixed handling of the definition/
4007 expression boundary. Fixed handling of definitions grouped with
4008 'begin. Use canonicalize_define to expand definitions.
4009
4010 2003-11-13 Marius Vollmer <mvo@zagadka.de>
4011
4012 * read.c (scm_lreadr): detect EOF after backslash, and interpret
4013 \xNN hexadecimal sequences. From Paul Jarc, thanks!
4014
4015 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
4016 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
4017 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
4018 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
4019 New macros from Paul Jarc. Thanks!
4020
4021 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
4022 return NULL when the machine type is unknown. Previously,
4023 gc_os_dep.c would refuse to compile.
4024
4025 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4026
4027 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
4028 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
4029 scm_m_body to m_body.
4030
4031 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4032
4033 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
4034 public use of scm_m_expand_body in eval.h. In eval.c, renamed
4035 scm_m_expand_body to m_expand_body and made it static. Added
4036 deprecated wrapper scm_m_expand_body.
4037
4038 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
4039 of scm_m_expand_body.
4040
4041 2003-11-09 Kevin Ryde <user42@zip.com.au>
4042
4043 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
4044 argument. Reported by Mike Gran.
4045
4046 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4047
4048 * eval.c (s_missing_body_expression): New static identifier.
4049
4050 (s_body): Removed.
4051
4052 (scm_m_expand_body): Fixed core dump when passing a body with
4053 defines, but without expressions (see additions to syntax.test).
4054 Use ASSERT_SYNTAX to signal syntax errors.
4055
4056 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4057
4058 * eval.c (canonicalize_define): New static helper function.
4059
4060 (memoize_define, canonicalize_define): Extract handling of
4061 function currying to canonicalize_define.
4062
4063 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4064
4065 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4066 Make sure that error checking in debug mode is not worse than in
4067 standard mode.
4068
4069 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4070
4071 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
4072 handled in scm_m_body any more, but rather in scm_m_lambda.
4073
4074 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
4075 scm_m_letrec, scm_m_expand_body): Check for validity is done by
4076 calling functions of scm_m_body.
4077
4078 (scm_m_lambda): Avoid unnecessary consing when creating the
4079 memoized code.
4080
4081 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4082
4083 * eval.c (s_expression): Added comment.
4084
4085 (s_empty_combination, error_unbound_variable): New static
4086 identifiers.
4087
4088 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
4089 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
4090 signal syntax errors.
4091
4092 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
4093 scheme objects.
4094
4095 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4096
4097 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
4098 Grouped together with unmemocopy, without modifications.
4099
4100 (build_binding_list, unmemocopy): Renamed names of list arguments
4101 and variables to reflect the actual order of the list elements.
4102
4103 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4104
4105 * eval.c (s_defun): New static identifier.
4106
4107 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
4108 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4109 when creating the memoized code.
4110
4111 2003-10-19 Kevin Ryde <user42@zip.com.au>
4112
4113 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
4114
4115 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
4116 in accordance with R5RS, which just mpz_get_d doesn't really give.
4117
4118 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4119
4120 * eval.c (s_bad_slot_number): New static identifier.
4121
4122 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
4123 signal syntax errors. Avoid unnecessary consing when creating the
4124 memoized code.
4125
4126 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4127
4128 * eval.c (scm_m_cont, scm_m_at_call_with_values,
4129 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
4130 errors. Avoid unnecessary consing when creating the memoized
4131 code.
4132
4133 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
4134 standard case. Make sure line and file information are copied to
4135 every created expression.
4136
4137 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4138
4139 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
4140 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4141 when creating the memoized code.
4142
4143 (scm_m_atbind): Reversed the order, in which the init expressions
4144 are stored and executed. The order of execution is now equal to
4145 the order in which the initializers of the let-forms are executed.
4146 Use check_bindings and transform_bindings.
4147
4148 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
4149 !SCM_NULLP. Added some comments.
4150
4151 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4152
4153 * eval.c: Sorted include files alphabetically.
4154
4155 (scm_m_begin): Added comment.
4156
4157 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4158 unnecessary consing when creating the memoized code.
4159
4160 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
4161 syntax errors. Be more specific about the kind of error that was
4162 detected.
4163
4164 (scm_m_quote, unmemocopy): As an optimization, vector constants
4165 are now inserted unquoted into the memoized code. During
4166 unmemoization the quotes are added again to provide syntactically
4167 correct code.
4168
4169 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4170
4171 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
4172 scm_m_expand_body, check_bindings): Extracted syntax checking of
4173 bindings to new static function check_bindings.
4174
4175 (scm_m_let, memoize_named_let): Extracted handling of named let to
4176 new static function memoize_named_let.
4177
4178 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
4179 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
4180 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
4181 unnecessary consing when creating the memoized code.
4182
4183 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4184
4185 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4186 static identifiers.
4187
4188 (s_clauses, s_formals, s_duplicate_formals): Removed.
4189
4190 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
4191 specific about the kind of error that was detected. Prepare for
4192 easier integration of changes for separated memoization.
4193
4194 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4195
4196 * eval.c (s_duplicate_binding): New static identifier.
4197
4198 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4199
4200 (scm_m_define): Added comment about how we check for duplicate
4201 formals.
4202
4203 (scm_m_do): Added check for duplicate bindings.
4204
4205 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4206 unnecessary consing when creating the memoized code.
4207
4208 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4209 scm_c_improper_memq to c_improper_memq, since it is not exported.
4210
4211 (transform_bindings): Call scm_c_memq rather than
4212 scm_c_improper_memq.
4213
4214 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4215
4216 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4217
4218 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4219 static identifiers.
4220
4221 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4222 specific about the kind of error that was detected. Avoid use of
4223 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4224 code, this way also making sure that file name, line number
4225 information etc. remain available.
4226
4227 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4228
4229 * eval.c (memoize_as_thunk_prototype): New static function.
4230
4231 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4232 Avoid unnecessary consing when creating the memoized code.
4233
4234 2003-10-12 Kevin Ryde <user42@zip.com.au>
4235
4236 * list.c (scm_append): Track argument number and use in error.
4237
4238 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4239
4240 * eval.c (s_missing_expression, s_bad_variable): New static
4241 identifiers.
4242
4243 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4244 R5RS terminology for the naming of variables. Be more specific
4245 about the kind of error that was detected. Make sure file name,
4246 line number etc. are added to all freshly created expressions.
4247 Avoid unnecessary consing when creating the memoized code.
4248
4249 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4250
4251 * eval.c (s_extra_expression, s_misplaced_else_clause,
4252 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4253
4254 (s_extra_case_clause): Removed.
4255
4256 (scm_m_case, scm_m_cond): If a clause appears after an else
4257 clause, report a misplaced else clause.
4258
4259 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4260 specific about the kind of error that was detected. Handle bound
4261 'else and '=>. Avoid unnecessary consing when creating the
4262 memoized code.
4263
4264 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4265 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4266 syntactic keyword '=>.
4267
4268 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4269
4270 * eval.c (scm_m_case): Allow empty lists of case labels.
4271
4272 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4273
4274 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4275
4276 * print.c (scm_isymnames): Add names for the new memoizer codes.
4277
4278 * eval.c (s_missing_clauses, s_bad_case_clause,
4279 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4280 literal_p): New static identifiers.
4281
4282 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4283 specific about the kind of error that was detected. Check for
4284 duplicate case labels. Handle bound 'else. Avoid unnecessary
4285 consing when creating the memoized code.
4286
4287 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4288 the syntactic keyword 'else.
4289
4290 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4291
4292 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4293 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4294
4295 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4296 unnecessary consing when creating the memoized code.
4297
4298 2003-10-09 Kevin Ryde <user42@zip.com.au>
4299
4300 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4301 cast gives for values bigger than a long, or for nan or inf.
4302
4303 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4304
4305 * smob.h (scm_make_smob_type): Made the declaration match the
4306 definition.
4307
4308 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4309
4310 * goops.c, objects.h, smob.c, smob.h: Make type names char
4311 const * instead of char *. Thanks to Paul Jarc!
4312
4313 2003-10-02 Kevin Ryde <user42@zip.com.au>
4314
4315 * strports.c (scm_call_with_output_string): scm_get_output_string
4316 rather than scm_strport_to_string, so as to guard against the port
4317 having been closed by the called procedure. Reported by Nic Ferrier.
4318
4319 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4320
4321 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4322
4323 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4324 tags.h to deprecated.h.
4325
4326 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4327
4328 This set of patches introduces a new tc7 code scm_tc7_number for
4329 numbers. Bignums, reals and complex numbers are turned from smobs
4330 into subtypes of scm_tc7_number.
4331
4332 * tags.h (scm_tc7_number): New.
4333
4334 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4335 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4336 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4337 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4338 (scm_class_of), print.c (scm_iprin1), smob.c
4339 (scm_smob_prehistory): Don't handle bignums, reals and complex
4340 numbers as subtypes of scm_tc7_smob any more.
4341
4342 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4343 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4344
4345 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4346
4347 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4348 sizeof (scm_t_complex) to determine the memory size of the
4349 malloc'd area for complex numbers.
4350
4351 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4352
4353 * numbers.c (scm_bigequal): Fixed.
4354
4355 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4356
4357 * stime.c (scm_current_time): 'time' does not set errno so don't
4358 use SCM_SYSERROR for reporting errors.
4359
4360 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4361
4362 This set of patches eliminates the dependency between the
4363 implementation of evaluator specific memoization codes and special
4364 constants like #f, '() etc. ('flags'), which are not evaluator
4365 specific. The goal is to remove definitions of evaluator
4366 memoization codes completely from the public interface. This will
4367 make it possible to experiment more freely with optimizations of
4368 guile's internal representation of memoized code.
4369
4370 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4371
4372 * print.c (iflagnames): New array, holding the printed names of
4373 guile's special constants ('flags').
4374
4375 (scm_isymnames): Now holds only the printed names of the
4376 memoization codes.
4377
4378 (scm_iprin1): Separate the handling of memoization codes and
4379 guile's special constants.
4380
4381 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4382 SCM_IFLAGNUM): new
4383
4384 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4385 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4386 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4387 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4388 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4389 values.
4390
4391 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4392
4393 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4394 tc9 macros and scm_tc9_flag.
4395
4396 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4397
4398 * posix.c (scm_setgroups): Check that the gid list is not too
4399 long. Thanks to Paul Jarc!
4400
4401 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4402
4403 * tags.h: Reduced the number of short instructions from 14 to 13.
4404 The typecode of the former 14th short instruction is now used to
4405 represent long instructions. Changed some comments to reflect
4406 this fact.
4407
4408 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4409 previously used by SCM_IM_DEFINE.
4410
4411 (SCM_IM_DEFINE): Turned into a long instruction.
4412
4413 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4414 instruction.
4415
4416 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4417 code that is separate from all instructions, one level of dispatch
4418 for long instructions can be eliminated.
4419
4420 * print.c (scm_isymnames): Removed some commented code.
4421
4422 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4423
4424 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4425 compiler on IA64.
4426
4427 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4428
4429 * modules.c (scm_module_reverse_lookup): Check that the obarray
4430 really is a hashtable and do nothing if not.
4431
4432 * inline.h: Use "extern inline" only with GCC. Use "static
4433 inline" else.
4434
4435 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4436
4437 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4438 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4439
4440 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4441 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4442 deprecated.h.
4443
4444 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4445
4446 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4447 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4448
4449 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4450 0.0==some_expression to some_expression==0.0. The latter is
4451 better readable. The former is preferred by some people, since it
4452 leads to a compiler error when confusing == with =. However, when
4453 using gcc, a warning will be issued if in an if-statement an
4454 assigment appears. Since many Guile developers are using gcc,
4455 such errors will not remain unnoticed anyway. We can therefore
4456 focus on better readability.
4457
4458 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4459
4460 * tags.h: Added description of Guile's type system. Removed some
4461 old and misleading comments.
4462
4463 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4464
4465 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4466 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4467
4468 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4469
4470 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4471
4472 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4473 respective SLOPPY macro.
4474
4475 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4476
4477 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4478 type string, not SCM_TYP7S.
4479
4480 2003-09-03 Kevin Ryde <user42@zip.com.au>
4481
4482 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4483 2s-complement.
4484
4485 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4486 current timezone requiring SCM_DEFER_INTS.
4487
4488 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4489
4490 * script.c (scm_compile_shell_switches): Make -s switch optional
4491 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4492 VanDevender for the patch!)
4493
4494 2003-08-30 Kevin Ryde <user42@zip.com.au>
4495
4496 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4497 and to have non-integer types rejected as per other logical funcs.
4498
4499 2003-08-28 Kevin Ryde <user42@zip.com.au>
4500
4501 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4502
4503 2003-08-23 Kevin Ryde <user42@zip.com.au>
4504
4505 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4506 thread safe, and could take a long time too.
4507
4508 2003-08-22 Kevin Ryde <user42@zip.com.au>
4509
4510 * numbers.c (scm_difference): Correction to bignum - negative inum.
4511
4512 2003-08-14 Kevin Ryde <user42@zip.com.au>
4513
4514 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4515 [__GNUC__]: Use volatile asm macros rather than a function call.
4516 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4517 macros while defining functions.
4518
4519 * simpos.c (getenv): Use <stdlib.h> for prototype.
4520 (scm_system): In docstring, refer to status:exit-val rather than
4521 "functions above".
4522
4523 2003-08-09 Kevin Ryde <user42@zip.com.au>
4524
4525 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4526 list set by source-properties! rather than an SRCPROPS object,
4527
4528 2003-07-29 Kevin Ryde <user42@zip.com.au>
4529
4530 * properties.c (scm_primitive_property_ref): In docstring, note
4531 parameters to not-found-proc, use hyphens rather than underscores for
4532 that parameter name.
4533 (scm_primitive_property_set_x): In docstring, VAL is the value
4534 parameter not CODE.
4535
4536 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4537
4538 * print.c (scm_print_symbol_name): handle more weird characters by
4539 escaping the symbol name properly. Thanks to Paul Jarc!
4540
4541 * posix.h (scm_setgroups): New prototype.
4542 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4543 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4544 Don't use SCM_WRITABLE_VELTS.
4545
4546 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4547 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4548 Matthias Koeppe!
4549
4550 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4551 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4552 compiles when SCM_C_INLINE is undefined.
4553
4554 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4555
4556 * __scm.h: Reformulated the architecture and compiler properties
4557 in terms of properties of scm_t_bits and SCM variables rather than
4558 in terms of c standard types. This is since it is not known which
4559 of the standard types scm_t_bits and SCM variables will be defined
4560 to.
4561
4562 2003-07-24 Kevin Ryde <user42@zip.com.au>
4563
4564 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4565 and real.
4566
4567 2003-07-18 Kevin Ryde <user42@zip.com.au>
4568
4569 * numbers.c (scm_product): In complex * bignum, correction to
4570 REAL/IMAG fetch, x is the complex, not y.
4571
4572 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4573
4574 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4575 scm_inf_p test as Scheme values.
4576 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4577 and a positive inum.
4578 Use GNU indentation style.
4579
4580 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4581
4582 * values.c (scm_values): Build lists of length 1 by using
4583 scm_list_1 instead of using scm_cons.
4584
4585 2003-07-10 Kevin Ryde <user42@zip.com.au>
4586
4587 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4588 * list.c (scm_list_n): Ditto.
4589
4590 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4591
4592 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4593
4594 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4595 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4596 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4597 the other using intptr_t.
4598
4599 2003-07-08 Kevin Ryde <user42@zip.com.au>
4600
4601 * numbers.c (scm_make_polar): Use sincos, when available.
4602 (scm_magnitude): Use hypot.
4603
4604 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4605 @footnote since it doesn't go through to guile-procedures.txt.
4606
4607 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4608 outside @var to quieten makeinfo, and use @code.
4609
4610 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4611
4612 * gc-malloc.c (decrease_mtrigger): new function
4613 (increase_mtrigger): new function, separate debug registering and
4614 mtrigger administration.
4615 (scm_gc_realloc): bugfix: do mtrigger administration before the
4616 actual realloc, for the realloc might invalidate a GC-d segment of
4617 memory. Thanks to Sam Hocevar for pointing this out.
4618 (scm_gc_realloc): use scm_malloc_reregister instead of
4619 unregistering and registering in sequence.
4620
4621 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4622
4623 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4624
4625 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4626
4627 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4628 clauses.
4629
4630 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4631
4632 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4633 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4634 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4635 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4636 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4637 the release_1_6 branch.
4638
4639 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4640
4641 * continuations.c: Redeclaration of getcontext() via the
4642 __asm__ ("getcontext") directive.
4643
4644 * continuations.h: Include <ucontext.h> instead of
4645 <sys/ucontext.h>.
4646
4647 2003-06-21 Kevin Ryde <user42@zip.com.au>
4648
4649 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4650 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4651 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4652 available.
4653 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4654 (isfinite): Remove, conflicts with C99 isfinite().
4655
4656 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4657
4658 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4659 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4660 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4661 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4662 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4663 the release_1_6 branch.
4664
4665 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4666
4667 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4668 to be functions instead of macros.
4669
4670 * threads.c: Conditionalized inclusion of <sys/time.h> and
4671 <unistd.h>.
4672 (scm_getspecific, scm_setspecific): Made these two function
4673 real part of the API.
4674
4675 * posix.c (s_scm_putenv): Added some code to make a
4676 (putenv "FOO="), i.e. setting an empty string, work also on
4677 Win32 systems. Thanks to Kevin Ryde for the proposal.
4678
4679 2003-06-12 Kevin Ryde <user42@zip.com.au>
4680
4681 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4682 freebsd to comment about need to use unsetenv.
4683
4684 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4685
4686 * ports.c (scm_peek_char): Safe the column of the port around the
4687 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4688
4689 2003-06-07 Kevin Ryde <user42@zip.com.au>
4690
4691 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4692 and friends required by scm_t_bits setups.
4693
4694 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4695
4696 * tags.h (scm_tc2_int): Added.
4697
4698 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4699 scm_tc2_int.
4700
4701 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4702 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4703
4704 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4705
4706 * eval.c: Partially undid my patch from 2003-05-31. This patch
4707 caused the segfault referenced in the previous changelog entry.
4708
4709 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4710
4711 * tags.h: Fixed comment about the immediate type code layout.
4712
4713 * eval.c: Fixed handling of non-special instructions. Without
4714 this patch, guile will segfault on (#\0) and similar instructions.
4715
4716 2003-06-05 Kevin Ryde <user42@zip.com.au>
4717
4718 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4719 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4720
4721 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4722 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4723
4724 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4725
4726 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4727 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4728 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4729 generalized it to apply not only to C level functions but also to
4730 scheme level functions.
4731
4732 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4733 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4734 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4735 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4736 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4737 respectively.
4738
4739 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4740 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4741 eval.h into eval.c and a copy is placed into deprecated.h.
4742
4743 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4744 into eval.c. This definition was not part of the API in any
4745 officially released version of guile and thus does not need to go
4746 through a phase of deprecation.
4747
4748 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4749
4750 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4751 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4752 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4753 definitions are make static and renamed from scm_s_xxx to s_xxx.
4754 In deprecated.c the original definitions are copied.
4755
4756 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4757 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4758 eval.h into eval.c and a copy (slightly modified to work in user
4759 code) is placed into deprecated.h.
4760
4761 * eval.c: Use the local static s_xxx definitions instead of the
4762 scm_s_xxx definitions throughout.
4763
4764 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4765
4766 This set of patches separates the representation of the cxr family
4767 of functions (car, cdr etc.) from the dsubr family of functions
4768 (i. e. functions that take a double precision floating point
4769 argument). Further, the algorithm for handling the cxr function
4770 is improved.
4771
4772 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4773 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4774 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4775 cosh, tanh), objects.c (scm_class_of), procprop.c
4776 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4777 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4778 typecode for the dsubr family of functions.
4779
4780 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4781 ramap_dsubr.
4782
4783 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4784 (scm_init_pairs): Make use of the (now usable) second cell element
4785 of a scm_tc7_cxr function to implement the cxr family of functions
4786 more efficiently.
4787
4788 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4789
4790 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4791 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4792 end of an if-else-if-sequence of checks.
4793
4794 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4795
4796 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4797 execution. Generalize apply_closure to apply_proc and use that
4798 for call-with-values.
4799
4800 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4801
4802 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4803 a non closure.
4804
4805 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4806
4807 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4808 appropriately for mingw32 hosts.
4809
4810 * numbers.h: Defining copysign(), isnan() and finite() to
4811 be prefixed by a single '_' for mingw32 hosts.
4812
4813 2003-05-30 Kevin Ryde <user42@zip.com.au>
4814
4815 * numbers.c (z_negative_one): New variable.
4816 (scm_init_numbers): Initialize it.
4817 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4818
4819 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4820
4821 * win32-dirent.c: Use malloc() instead of scm_malloc().
4822
4823 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4824 warning.
4825
4826 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4827 mingw32 build.
4828
4829 * modules.c (s_scm_module_import_interface): Renamed local
4830 variable interface to _interface. Seems like 'interface'
4831 is a special compiler directive for the mingw32 compiler.
4832
4833 * mkstemp.c: Provide prototype to avoid compiler warning.
4834
4835 * load.c (s_scm_search_path): Fixed absolute and relative
4836 path detections for native Windows platforms.
4837
4838 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4839 to build on mingw32).
4840
4841 * gc-freelist.c ("s_scm_map_free_list",
4842 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4843
4844 * fports.c (fport_fill_input): Disable use of
4845 fport_wait_for_input() on Win32 platforms.
4846
4847 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4848
4849 * Makefile.am: Modified some rules for cross compiling.
4850
4851 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4852
4853 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4854 proper function object and the correct number of arguments are now
4855 performed in the application part of SCM_CEVAL.
4856
4857 (scm_badformalsp): Removed.
4858
4859 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4860
4861 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4862
4863 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4864
4865 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4866 always being false by inserting preprocessor conditional. (Thanks
4867 to Bruce Korb.)
4868
4869 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4870 (void *) in order to avoid an aliasing warning; thanks to Bruce
4871 Korb.)
4872
4873 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4874
4875 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4876 SCM_STACK_PTR.
4877
4878 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4879 thread->base --> t->base.
4880
4881 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4882
4883 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4884
4885 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4886 scm_variable_set_name_hint, scm_builtin_variable,
4887 scm_internal_with_fluids, scm_make_gsubr,
4888 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4889 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4890 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4891 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4892 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4893 scm_make_subr_with_generic, scm_make_subr_opt,
4894 scm_call_catching_errors, scm_make_smob_type_mfpe,
4895 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4896 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4897 branch. Some have been slightly rewritten.
4898 (scm_i_object_chars, scm_i_object_length): New, to support
4899 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4900
4901 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4902
4903 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4904 names and inits in the memoized code of do.
4905
4906 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4907
4908 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4909 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4910 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4911 a compilation error if error-on-warning is enabled).
4912
4913 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4914
4915 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4916 removes preprocessor directives from the snarfage that might
4917 otherwise confuse us. These directives appear when compiling with
4918 "-g3", for example.
4919
4920 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4921
4922 * ChangeLog: add my surname
4923
4924 * srcprop.c (scm_finish_srcprop): use
4925 scm_gc_register_collectable_memory()
4926 (scm_make_srcprops): idem.
4927
4928 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4929
4930 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4931 wrap-around for scm_mtrigger
4932 (scm_gc_register_collectable_memory): abort on overflowing
4933 scm_mallocated().
4934
4935 2003-05-13 Kevin Ryde <user42@zip.com.au>
4936
4937 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4938 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4939
4940 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4941
4942 * backtrace.c (scm_display_error_message): Introduced fancy
4943 printing with max level 7 and length 10. (Purpose: avoid printing
4944 gigantic objects in error messages.)
4945
4946 * print.c, print.h (scm_i_port_with_print_state): New function.
4947
4948 * print.c (scm_iprin1, scm_printer_apply,
4949 scm_port_with_print_state): Use scm_i_port_with_print_state.
4950 (scm_simple_format): Modified not to destroy print states.
4951 (print_state_mutex): New mutex.
4952 (scm_make_print_state, scm_free_print_state, scm_prin1):
4953 Lock/unlock print_state_mutex.
4954
4955 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4956 Use current names in definitions.
4957
4958 2003-05-10 Kevin Ryde <user42@zip.com.au>
4959
4960 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4961
4962 * numbers.c (scm_integer_length): On negative bignums, adjust
4963 mpz_sizeinbase to account for it looking at absolute value where we
4964 want ones-complement.
4965
4966 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4967 since we're only using the ulong return value, and x might not fit.
4968
4969 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4970
4971 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4972 read. This will allow to make the definition in read.c static.
4973
4974 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4975
4976 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4977 from evalext to eval. This will allow to make some of the
4978 definitions in eval.c static.
4979
4980 2003-05-06 Kevin Ryde <user42@zip.com.au>
4981
4982 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4983 (scm_logcount): Use mpz_com, not mpz_neg.
4984
4985 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4986
4987 The purpose of this patch is to make guile's internal memoizers
4988 distinguishable from memoizing macros created on the scheme level
4989 or from user provided primitive memoizing macros. The reason is,
4990 that the internal memoizers are the only ones that are allowed to
4991 transform their scheme input into memoizer byte code, while all
4992 other memoizing macros may only transform scheme code into new
4993 scheme code.
4994
4995 To achieve this, a new macro type 'builtin-macro!' is introduced.
4996 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4997 this will change when the memoizer and executor are separated.
4998
4999 * macros.[ch] (scm_i_makbimacro): New.
5000
5001 * macros.h (SCM_BUILTIN_MACRO_P): New.
5002
5003 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
5004
5005 * eval.c, goops.c: All of guile's primitive memoizing macros are
5006 primitive builtin-macros now.
5007
5008 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
5009 builtin-macros are handled equally to memoizing macros.
5010
5011 2003-05-04 Marius Vollmer <mvo@zagadka.de>
5012
5013 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
5014 work around a bug in GCC 2.95.2 but is now a bug in itself.
5015
5016 2003-05-02 Marius Vollmer <mvo@zagadka.de>
5017
5018 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
5019 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
5020 scm_tcs_symbols): New.
5021
5022 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5023
5024 * deprecated.h, deprecated.c (scm_protect_object,
5025 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
5026 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
5027 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
5028 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
5029 scm_ensure_user_module, scm_load_scheme_module, scm_port,
5030 scm_ptob_descriptor, scm_port_rw_active,
5031 scm_close_all_ports_except): New.
5032
5033 * ports.c (scm_c_port_for_each): New function, mostly copied from
5034 scm_port_for_each.
5035 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
5036 * ports.h (scm_c_port_for_each): New prototype.
5037
5038 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5039
5040 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
5041 macro was introduced in anticipation of GOOPS method compilation
5042 code.)
5043
5044 * goops.c: Removed binding of @dispatch.
5045
5046 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5047
5048 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
5049 instructions that bind the macros on the scheme level back to
5050 goops.c in order to make sure again that the bindings go into the
5051 (oop goops) module and are not visible from the outside.
5052
5053 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5054
5055 * eval.c: Non functional change: Separated R5RS and non-R5RS
5056 macros into different sections of the file and ordered the
5057 memoizers alphabetically.
5058
5059 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5060
5061 * eval.c (scm_ilookup): Rewritten to improve readability.
5062
5063 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5064
5065 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5066 Partially reverted patch from 2003-04-23 in oder to find a better
5067 compromise between readability and debuggability.
5068
5069 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5070
5071 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
5072 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
5073 definitions of the special goops memoizers from goops.[ch] to
5074 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
5075 throughout guile.
5076
5077 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5078
5079 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
5080
5081 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
5082
5083 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
5084
5085 * ioext.c (scm_fdes_to_ports): Ditto.
5086
5087 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
5088 lock/unlock scm_i_port_table_mutex.
5089
5090 * strports.c (scm_mkstrport): Ditto.
5091
5092 * ports.c (scm_void_port, scm_port_for_each): Ditto.
5093
5094 * fports.c (scm_fdes_to_port): Ditto.
5095
5096 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5097
5098 This set of patches contains no functional changes, only debatable
5099 minor stylistic ones. Still, in order to prepare a patch between
5100 my local copy and the CVS version, I decided to submit the changes
5101 below. Then, the patch will hopefully only contain relevant
5102 modifications :-)
5103
5104 * eval.c (iqq): Added const specifier.
5105
5106 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5107 Use NULL instead of 0 to indicate that a pointer is returned.
5108 Removed some misleading 'fall through' comments.
5109
5110 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5111 Split up long expressions into smaller ones to be more debugging
5112 friendly.
5113
5114 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5115
5116 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
5117 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
5118 rather than casting to SCM.
5119
5120 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5121
5122 * sort.c, pairs.h: Removed unnecessary includes.
5123
5124 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5125
5126 * sort.c: Replaced hand-made trampline code by the new official
5127 mechanism from eval.c. This fixes a segfault in the new test file
5128 sort.test.
5129
5130 (quicksort, compare_function, scm_restricted_vector_sort_x,
5131 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
5132 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
5133 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
5134 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
5135 eval.c.
5136
5137 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
5138 cmp_fun_t): Removed.
5139
5140 (compare_function): Added.
5141
5142 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
5143 arithmetics with index arithmetics. Changed quicksort to work on
5144 an array of SCM values instead of an array of characters. Avoid
5145 bytewise copying of SCM elements. Avoid allocating memory on the
5146 stack with alloca. Fixed some comments.
5147
5148 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5149
5150 * eval.c (EXTEND_ENV): Eliminated.
5151
5152 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
5153 EXTEND_ENV.
5154
5155 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5156
5157 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
5158
5159 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
5160 compiling with SCM_DEBUG==1 by moving definition behind prototype.
5161
5162 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
5163 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
5164 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
5165 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
5166 functions such that they check if the object is a non-immediate.
5167 Further, renamed identifiers to use the scm_dbg_ prefix and made
5168 their inclusion into the lib dependent of the
5169 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
5170
5171 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5172
5173 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
5174 debug option.
5175
5176 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5177
5178 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
5179 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
5180 any calls to SCM_NCONSP any more.
5181
5182 * unif.c (l2ra): Eliminate redundant check.
5183
5184 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5185
5186 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
5187 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
5188 SCM_NNULLP. Now, guile itself does not include any calls to
5189 SCM_NNULLP any more.
5190
5191 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5192
5193 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
5194 scm_copy_tree): Place assignment expressions which are part of
5195 other expressions into an expression of their own.
5196
5197 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5198
5199 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5200 compare SCM values with !=.
5201
5202 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5203
5204 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5205 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5206 and definition of the memoizer for the generalized set! macro from
5207 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5208 define the macro object.
5209
5210 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5211 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5212 eval.c, it is made static and renamed to s_set_x.
5213
5214 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5215 over SCM_N<foo>.
5216
5217 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5218
5219 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5220 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5221 to undefineds and registered the object as a permanent object.
5222
5223 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5224 static in eval.c, renamed it to f_apply and registered the object
5225 as a permanent object.
5226
5227 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5228
5229 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5230 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5231
5232 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5233
5234 * numbers.c (scm_logtest): Fixed argument bug in the call to
5235 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5236
5237 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5238
5239 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5240 type errors that showed up when compiling with SCM_DEBUG defined.
5241
5242 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5243
5244 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5245 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5246 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5247 fix compile errors with --disable-deprecated.
5248
5249 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5250
5251 * numbers.c (scm_integer_expt): fix case where we were declaring
5252 vars in the middle of a statement block. Thanks to Thamer
5253 Al-Harbash.
5254
5255 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5256
5257 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5258 change.
5259
5260 * eq.c (scm_eqv_p): Turned into a primitive generic.
5261
5262 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5263
5264 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5265 Thanks to Boyd Gerber.
5266 Added check for __arm__ in addition to arm for LINUX and copied
5267 __s390__ defines from upstream libgc. Thanks to James Treacy for
5268 reporting the problems.
5269
5270 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5271
5272 * socket.c: use SCM_CHAR_BIT.
5273
5274 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5275
5276 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5277
5278 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5279
5280 * feature.c (scm_init_feature): Always add threads feature.
5281
5282 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5283
5284 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5285 scm_at_assert_bound_ref. (We don't want the unbound check. See
5286 oop/goops/active-slot.scm.)
5287
5288 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5289
5290 * tags.h: scm_t_intptr should have been intptr_t.
5291
5292 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5293
5294 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5295 test. Instead use
5296 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5297 as gc_os_dep.c suggests is appropriate.
5298
5299 * goops.c (prep_hashsets): make static to match prototype.
5300 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5301 Chin.
5302
5303 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5304 Albert Chin.
5305
5306 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5307 Klausner.
5308
5309 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5310
5311 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5312 indicated through extra fields in getters-n-setters.
5313 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5314 (Thanks to Andy Wingo.)
5315
5316 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5317
5318 * gc-segment.c: add comment
5319
5320 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5321
5322 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5323 clash.
5324
5325 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5326 and add regression test to standalone/.
5327
5328 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5329
5330 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5331 Thanks to Dale P. Smith.
5332
5333 * random.c: #include gmp.h.
5334 (scm_c_random_bignum): normalize result on return.
5335
5336 * init.c: #include gmp.h.
5337
5338 * numbers.h: remove the gmp.h #include (not needed now).
5339
5340 * posix.h: change occurences of "id" to something else so we don't
5341 cause trouble when included via objective-c (can't hurt, might
5342 help). Still have usage in debug.h, though.
5343
5344 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5345
5346 * random.c (scm_c_random_bignum): Don't generate a random number
5347 equal to m (the second argument of scm_c_random_bignum); only
5348 generate numbers in the range 0 <= r < m.
5349 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5350 scm_var_random_state.
5351
5352 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5353 clause.
5354
5355 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5356
5357 * modules.c (scm_module_import_interface): move declaration of
5358 uses before any code.
5359
5360 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5361
5362 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5363 not top_srcdir.
5364
5365 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5366 processing it in order to avoid an infinite loop.
5367
5368 * print.c (scm_prin1): Remember old state of pstate->writingp.
5369
5370 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5371
5372 * Changed license terms to the plain LGPL thru-out.
5373
5374 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5375
5376 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5377 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5378 rewrite to handle GMP bignums.
5379
5380
5381 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5382
5383 * ports.c (scm_getc): minor tweak.
5384
5385 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5386 rewrite to handle GMP bignums.
5387
5388 * numbers.c: rewrite *many* functions to handle GMP bignums.
5389
5390 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5391 handle GMP bignums.
5392
5393 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5394
5395 * init.c (check_config): remove SCM_BIGDIG conditionals.
5396 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5397
5398 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5399
5400 * eval.c: remove SCM_BIGDIG conditionals.
5401
5402 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5403
5404 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5405
5406 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5407 to Kevin Ryde.)
5408
5409 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5410
5411 * threads.h: fix various preprocessor usages of new public
5412 symbols to expect 0 or 1 values rather than 1 or undefined.
5413 i.e. change #ifdef to #if, etc.
5414
5415 * threads.c: fix various preprocessor usages of new public
5416 symbols to expect 0 or 1 values rather than 1 or undefined.
5417 i.e. change #ifdef to #if, etc.
5418
5419 * tags.h: fix various preprocessor usages of new public
5420 symbols to expect 0 or 1 values rather than 1 or undefined.
5421 i.e. change #ifdef to #if, etc.
5422
5423 * stacks.c: fix various preprocessor usages of new public
5424 symbols to expect 0 or 1 values rather than 1 or undefined.
5425 i.e. change #ifdef to #if, etc.
5426
5427 * stackchk.h: fix various preprocessor usages of new public
5428 symbols to expect 0 or 1 values rather than 1 or undefined.
5429 i.e. change #ifdef to #if, etc.
5430
5431 * stackchk.c: fix various preprocessor usages of new public
5432 symbols to expect 0 or 1 values rather than 1 or undefined.
5433 i.e. change #ifdef to #if, etc.
5434
5435 * sort.c: fix various preprocessor usages of new public
5436 symbols to expect 0 or 1 values rather than 1 or undefined.
5437 i.e. change #ifdef to #if, etc.
5438
5439 * read.c: fix various preprocessor usages of new public
5440 symbols to expect 0 or 1 values rather than 1 or undefined.
5441 i.e. change #ifdef to #if, etc.
5442
5443 * random.c: fix various preprocessor usages of new public
5444 symbols to expect 0 or 1 values rather than 1 or undefined.
5445 i.e. change #ifdef to #if, etc.
5446
5447 * print.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
5451 * objects.c: fix various preprocessor usages of new public
5452 symbols to expect 0 or 1 values rather than 1 or undefined.
5453 i.e. change #ifdef to #if, etc.
5454
5455 * numbers.h: fix various preprocessor usages of new public
5456 symbols to expect 0 or 1 values rather than 1 or undefined.
5457 i.e. change #ifdef to #if, etc.
5458
5459 * null-threads.c: fix various preprocessor usages of new public
5460 symbols to expect 0 or 1 values rather than 1 or undefined.
5461 i.e. change #ifdef to #if, etc.
5462
5463 * lang.c: fix various preprocessor usages of new public
5464 symbols to expect 0 or 1 values rather than 1 or undefined.
5465 i.e. change #ifdef to #if, etc.
5466
5467 * lang.h: fix various preprocessor usages of new public
5468 symbols to expect 0 or 1 values rather than 1 or undefined.
5469 i.e. change #ifdef to #if, etc.
5470
5471 * iselect.h: fix various preprocessor usages of new public
5472 symbols to expect 0 or 1 values rather than 1 or undefined.
5473 i.e. change #ifdef to #if, etc.
5474
5475 * init.c: fix various preprocessor usages of new public
5476 symbols to expect 0 or 1 values rather than 1 or undefined.
5477 i.e. change #ifdef to #if, etc.
5478
5479 * gh_data.c: fix various preprocessor usages of new public
5480 symbols to expect 0 or 1 values rather than 1 or undefined.
5481 i.e. change #ifdef to #if, etc.
5482
5483 * gh.h: fix various preprocessor usages of new public
5484 symbols to expect 0 or 1 values rather than 1 or undefined.
5485 i.e. change #ifdef to #if, etc.
5486
5487 * gen-scmconfig.c: change most new public symbols to be defined to
5488 0 or 1 rather than being either 1 or undefined.
5489
5490 * gc_os_dep.c: fix various preprocessor usages of new public
5491 symbols to expect 0 or 1 values rather than 1 or undefined.
5492 i.e. change #ifdef to #if, etc.
5493 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5494
5495 * gc.h: fix various preprocessor usages of new public
5496 symbols to expect 0 or 1 values rather than 1 or undefined.
5497 i.e. change #ifdef to #if, etc.
5498
5499 * gc-card.c: fix various preprocessor usages of new public
5500 symbols to expect 0 or 1 values rather than 1 or undefined.
5501 i.e. change #ifdef to #if, etc.
5502
5503 * gc-mark.c: fix various preprocessor usages of new public
5504 symbols to expect 0 or 1 values rather than 1 or undefined.
5505 i.e. change #ifdef to #if, etc.
5506
5507 * feature.c: fix various preprocessor usages of new public
5508 symbols to expect 0 or 1 values rather than 1 or undefined.
5509 i.e. change #ifdef to #if, etc.
5510
5511 * evalext.c: fix various preprocessor usages of new public
5512 symbols to expect 0 or 1 values rather than 1 or undefined.
5513 i.e. change #ifdef to #if, etc.
5514
5515 * eval.h: fix various preprocessor usages of new public
5516 symbols to expect 0 or 1 values rather than 1 or undefined.
5517 i.e. change #ifdef to #if, etc.
5518
5519 * eval.c: fix various preprocessor usages of new public
5520 symbols to expect 0 or 1 values rather than 1 or undefined.
5521 i.e. change #ifdef to #if, etc.
5522
5523 * eq.c: fix various preprocessor usages of new public
5524 symbols to expect 0 or 1 values rather than 1 or undefined.
5525 i.e. change #ifdef to #if, etc.
5526
5527 * coop.c: fix various preprocessor usages of new public
5528 symbols to expect 0 or 1 values rather than 1 or undefined.
5529 i.e. change #ifdef to #if, etc.
5530
5531 * coop-threads.c: fix various preprocessor usages of new public
5532 symbols to expect 0 or 1 values rather than 1 or undefined.
5533 i.e. change #ifdef to #if, etc.
5534
5535 * coop-pthreads.c: fix various preprocessor usages of new public
5536 symbols to expect 0 or 1 values rather than 1 or undefined.
5537 i.e. change #ifdef to #if, etc.
5538
5539 * coop-defs.h: fix various preprocessor usages of new public
5540 symbols to expect 0 or 1 values rather than 1 or undefined.
5541 i.e. change #ifdef to #if, etc.
5542
5543 * convert.i.c: fix various preprocessor usages of new public
5544 symbols to expect 0 or 1 values rather than 1 or undefined.
5545 i.e. change #ifdef to #if, etc.
5546
5547 * continuations.c: fix various preprocessor usages of new public
5548 symbols to expect 0 or 1 values rather than 1 or undefined.
5549 i.e. change #ifdef to #if, etc.
5550
5551 * _scm.h: fix various preprocessor usages of new public symbols to
5552 expect 0 or 1 values rather than 1 or undefined. i.e. change
5553 #ifdef to #if, etc.
5554
5555 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5556
5557 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5558
5559 * deprecated.c, deprecated.h: New files, to collect deprecated
5560 things in one place.
5561 * Makefile.am: Added them in all the right places.
5562
5563 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5564 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5565 builds work.
5566 (DOT_X_FILES): Removed "iselect.x".
5567 (DOT_DOC_FILES): Removed "iselect.doc".
5568
5569 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5570
5571 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5572 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5573
5574 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5575
5576 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5577
5578 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5579 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5580
5581 * threads.h: replace usage of struct timespect with
5582 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5583 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5584 favor of scm_t_timespec from scmconfig.h.
5585
5586 * threads.c: move libguile/_scm.h include to the top so we pick up
5587 any critical defines like _GNU_SOURCE early. Replace usage of
5588 struct timespect with scm_t_timespec. Replace usage of
5589 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5590 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5591
5592 * threads-plugin.h: replace usage of struct timespect with
5593 scm_t_timespec.
5594
5595 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5596 usage of struct timespect with scm_t_timespec.
5597
5598 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5599 HAVE_INTTYPES_H handling to scmconfig.h. #include
5600 "libguile/__scm.h". Rework handling for scm_t_bits,
5601 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5602 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5603 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5604 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5605 SCM_HAVE_ARRAYS.
5606
5607 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5608
5609 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5610
5611 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5612
5613 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5614
5615 * stime.h: move handling of time related headers to scmconfig.h.
5616
5617 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5618
5619 * stacks.c: replace usage of STACK_GROWS_UP with
5620 SCM_STACK_GROWS_UP.
5621
5622 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5623 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5624
5625 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5626 of uint32 and HAVE_UINT_32 with scm_t_int32.
5627
5628 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5629
5630 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5631
5632 * script.c: #include <config.h> if HAVE_CONFIG_H.
5633
5634 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5635
5636 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5637
5638 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5639
5640 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5641
5642 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5643
5644 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5645
5646 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5647 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5648 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5649 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5650
5651 * ramap.c: replace usage of HAVE_LONG_LONGS with
5652 "SCM_SIZEOF_LONG_LONG != 0".
5653
5654 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5655 "libguile/scmconfig.h".
5656
5657 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5658
5659 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5660 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5661
5662 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5663
5664 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5665
5666 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5667
5668 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5669 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5670 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5671 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5672 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5673 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5674 "SCM_SIZEOF_LONG_LONG != 0".
5675
5676 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5677 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5678 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5679 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5680
5681 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5682
5683 * null-threads.h: replace usage of struct timespect with
5684 scm_t_timespec.
5685
5686 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5687
5688 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5689 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5690 scm_t_uint64 and rename usages.
5691
5692 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5693
5694 * load.c: #include <config.h> if HAVE_CONFIG_H.
5695
5696 * iselect.h: move handling of time related headers to scmconfig.h.
5697 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5698 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5699 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5700
5701 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5702 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5703 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5704
5705 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5706
5707 * inline.h: #include "libguile/__scm.h" at the top. Change code
5708 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5709 what to do instead of creating a new public #define. Rename usage
5710 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5711 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5712 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5713
5714 * inline.c: rearrange handling -- now we just #define
5715 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5716 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5717 appropriate, and we use that in inline.h along with the above
5718 define to determine how to respond.
5719
5720 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5721 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5722
5723 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5724
5725 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5726 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5727
5728 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5729
5730 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5731
5732 * gen-scmconfig.c: new file -- see comments in file for details.
5733
5734 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5735
5736 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5737 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5738
5739 * gc.h: replace usage of SIZEOF_LONG with
5740 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5741 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5742 since we handle that in scmconfig.h now.
5743
5744 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5745
5746 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5747 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5748 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5749
5750 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5751
5752 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5753 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5754
5755 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5756
5757 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5758
5759 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5760 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5761
5762 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5763
5764 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5765 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5766
5767 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5768 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5769 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5770 with "SCM_SIZEOF_LONG_LONG != 0".
5771
5772 * error.c: #include <config.h> if HAVE_CONFIG_H.
5773
5774 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5775 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5776 with "SCM_SIZEOF_LONG_LONG != 0".
5777
5778 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5779
5780 * coop.c: replace usage of struct timespect with scm_t_timespec.
5781 #include <config.h> if HAVE_CONFIG_H.
5782
5783 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5784 usage of struct timespect with scm_t_timespec. Replace usage of
5785 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5786
5787 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5788 usage of struct timespect with scm_t_timespec. Replace usage of
5789 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5790
5791 * coop-defs.h: move handling of time related headers to
5792 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5793 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5794 timespect with scm_t_timespec.
5795
5796 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5797
5798 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5799
5800 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5801 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5802
5803 * continuations.c: move libguile/_scm.h include to the top so we
5804 pick up any critical defines like _GNU_SOURCE early.
5805
5806 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5807
5808 * async.c: #include <config.h> if HAVE_CONFIG_H.
5809
5810 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5811
5812 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5813 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5814
5815 * __scm.h: move libguile/scmconfig.h include up to the top, so
5816 we're sure to pick up any critical defines like _GNU_SOURCE early.
5817 #include <limits.h> removed in favor of scmconfig.h inclusion when
5818 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5819 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5820 scmconfig.h inclusion when appropriate. Various Win32 related
5821 definitions removed in favor of scmconfig.h inclusion when
5822 appropriate.
5823 (HAVE_UINTPTR_T): definition removed (see NEWS).
5824 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5825 (HAVE_LONG_LONGS): definition removed (see NEWS).
5826 (HAVE_LONG_LONG): definition removed (see NEWS).
5827 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5828
5829 * Makefile.am: scmconfig.h is now generated by building and
5830 running gen-scmconfig.h and capturing its output. gen-scmconfig
5831 uses config.h and the configure.in generated gen-scmconfig.h to
5832 decide what to output. See gen-scmconfig.c for details.
5833 (noinst_PROGRAMS): add gen-scmconfig.
5834 (gen_scmconfig_SOURCES): new variable.
5835 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5836 cross-compiling right.
5837 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5838 (BUILT_SOURCES): add scmconfig.h.
5839
5840 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5841
5842 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5843 Adrian Bunk. Thanks!
5844
5845 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5846
5847 * goops.c (make_class_from_template): New fourth arg:
5848 applicablep.
5849 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5850 cpls.
5851
5852 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5853
5854 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5855 second arg: applicablep.
5856 (scm_i_inherit_applicable): New function.
5857
5858 * goops.c, goops.h (scm_class_applicable,
5859 scm_class_extended_accessor): New classes.
5860
5861 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5862
5863 * procs.c (scm_procedure_documentation): Removed redundant
5864 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5865 predicates.
5866
5867 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5868
5869 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5870
5871 * modules.c (scm_module_import_interface): New function.
5872
5873 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5874 scm_class_accessor.
5875 (scm_class_accessor): New class.
5876
5877 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5878
5879 * goops.c (scm_primitive_generic_generic): Enable primitive
5880 generic if not enabled.
5881 (scm_sys_goops_loaded): Setup unextended primitive generics.
5882
5883 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5884
5885 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5886 snarf macros.
5887
5888 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5889 testing example. All uses of SCM_GPROC should be converted.)
5890
5891 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5892 scm_assoc.
5893
5894 * eq.c (scm_equal_p): Turned into a primitive generic.
5895
5896 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5897
5898 * Makefile.am (scmconfig.h): new target -- generate file from
5899 ../config.h.
5900 (modinclude_HEADERS): remove version.h.
5901 (nodist_modinclude_HEADERS): add version.h.
5902
5903 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5904
5905 This fixes a serious GC bug, introduced during the latest
5906 reorganization of the GC, which disabled freeing of structs and
5907 GOOPS objects:
5908
5909 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5910 SCM_EOL.
5911 (scm_struct_prehistory): Move scm_free_structs to
5912 scm_before_mark_c_hook.
5913
5914 * gc-card.c (sweep_card): Check that we haven't swept structs on
5915 this card before. That can happen if scm_i_sweep_all_segments has
5916 been called from some other place than scm_igc.
5917
5918 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5919
5920 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5921 (since hash tables now adapt their size).
5922
5923 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5924 (current number of prehistory bindings; hashtable code will select
5925 a prime which is greater than this value).
5926
5927 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5928 (current number of initial symbols).
5929
5930 * properties.c (scm_init_properties): Don't specify size of
5931 scm_properties_whash.
5932
5933 * objprop.c (scm_init_objprop): Don't specify size of
5934 scm_object_whash.
5935
5936 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5937
5938 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5939
5940 The following changes introduce the use of resizable hash tables
5941 throughout Guile. It also renames the old *-hash-table* functions
5942 to *-alist-vector* and places them, together with the rest of the
5943 weak vector support, in the module (ice-9 weak-vector). We should
5944 probably introduce a new, better, API for weak references, for
5945 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5946 look like and are used like ordinary pairs.)
5947
5948 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5949 leaf_environment_fold, obarray_remove_all): Use hashtable
5950 accessors.
5951
5952 * gc.c (scm_init_storage): Moved hook initialization to
5953 scm_storage_prehistory.
5954 (scm_storage_prehistory): New function.
5955 (scm_igc): Added commentary about placement of
5956 scm_after_sweep_c_hook.
5957
5958 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5959 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5960 SCM_WVECT_WEAK_VALUE_P.
5961
5962 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5963 functions.
5964 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5965 Removed.
5966 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5967 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5968
5969 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5970 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5971
5972 * modules.c (module-reverse-lookup): Use hashtable accessors.
5973
5974 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5975
5976 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5977 scm_make_weak_value_alist_vector,
5978 scm_make_doubly_weak_alist_vector): New functions.
5979
5980 * weaks.c (scm_init_weaks_builtins): New function.
5981
5982 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5983 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5984 SCM_WVECT_NOSCAN_P): New macros.
5985
5986 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5987 and SCM_WVECT_WEAK_VALUE_P.
5988
5989 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5990 allocate_weak_vector and exported.
5991
5992 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5993
5994 * hashtab.c: Undid thread safety. (We decided that it's better to
5995 let the user explicitly protect the tables (or not) according what
5996 is suitable for the application.)
5997
5998 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5999
6000 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
6001 thread safe and handle resizing tables.
6002 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
6003 SCM_DEFER/ALLOW_INTS.
6004
6005 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6006
6007 * hashtab.c (scm_vector_to_hash_table,
6008 scm_c_make_resizing_hash_table, scm_make_hash_table): New
6009 functions.
6010 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
6011 safe and handle resizing tables.
6012
6013 * weaks.c (scm_make_weak_key_hash_table,
6014 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
6015 Size argument made optional. Return resizable table if not
6016 specified.
6017
6018 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6019
6020 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6021 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
6022
6023 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6024
6025 * debug.c (scm_procedure_source): Handle all objects for which
6026 procedure? is #t. (Thanks to Bill Schottstaedt.)
6027
6028 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6029
6030 * futures.c (mark_futures): Don't need to mark data of recycled
6031 futures.
6032 (scan_futures, cleanup_undead): Be smarter about marking
6033 futures---avoid unnecessary passes through future lists.
6034
6035 * futures.h, futures.c: New files; Introduced recycling of
6036 futures. For fine-grained threading this lifts performance to
6037 another level. We can now use parallelization in inner loops of
6038 Guile programs without impossible overhead.
6039
6040 * threads.h, threads.c: Moved futures to their own file.
6041
6042 * Makefile.am (libguile_la_SOURCES): Added futures.c.
6043 (DOT_X_FILES): Added futures.x.
6044 (DOT_DOC_FILES): Added futures.doc.
6045 (modinclude_HEADERS): Added futures.h.
6046
6047 * threads.c, threads.h (scm_i_create_thread): Renamed from
6048 create_thread and made global.
6049
6050 * futures.c (scm_make_future): New procedure.
6051
6052 * eval.c: #include "libguile/futures.h".
6053
6054 * init.c: #include "futures.h"
6055 (scm_init_guile_1): Call scm_init_futures.
6056
6057 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
6058
6059 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
6060
6061 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
6062 functions.
6063
6064 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
6065
6066 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6067
6068 * threads.c (create_thread): Don't unwind dynwind chain of parent
6069 thread before creation. Just start the new thread with an empty
6070 dynwind chain.
6071
6072 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6073
6074 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
6075
6076 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6077
6078 * threads.c (scm_timed_wait_condition_variable): Support timed
6079 waiting also for simple condition variables.
6080
6081 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
6082 of calling the procedure change-object-class.
6083
6084 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6085
6086 * ramap.c (scm_ramapc): Typo in error message.
6087
6088 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6089
6090 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
6091 slots with instance allocation.
6092
6093 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
6094 class.
6095 (scm_compute_applicable_methods): Use scm_generic_function_methods.
6096
6097 * goops.c (scm_generic_function_methods): Support extended
6098 generic functions.
6099
6100 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6101
6102 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
6103 Thanks to Neil for pointing this out!
6104
6105 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
6106
6107 * lang.h: Remove declarations matching definitions removed from
6108 lang.c (just below).
6109
6110 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
6111
6112 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
6113 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
6114 and already commented out.
6115
6116 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
6117 scm_lreadparen): Support reading vectors with Elisp syntax if
6118 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
6119 is not currently defined, and there isn't even a configure switch
6120 to enable it yet.)
6121
6122 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6123
6124 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
6125 builds work.
6126 (EXTRA_DIST): Added version.h.in.
6127
6128 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6129
6130 This change makes it possible for one thread to do lazy sweeping
6131 while other threads are running. Now only the mark phase need to
6132 have all threads asleep. We should look further into this issue.
6133 Presently, I've put the locking of scm_i_sweep_mutex at
6134 "conservative" places due to my current lack of knowledge about
6135 the garbage collector. Please feel free to restrict these regions
6136 further to allow for maximal parallelism!
6137
6138 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
6139
6140 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
6141 scm_gc_register_collectable_memory): Substitute locking of
6142 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
6143 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
6144 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
6145 the single-thread section (which now only contains the mark
6146 phase).
6147 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
6148 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
6149
6150 * threads.c (gc_section_mutex): Removed.
6151
6152 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6153
6154 * threads.c (create_thread): Clear parent field in root state in
6155 order not to unnecessarily remember dead threads.
6156
6157 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
6158 (scm_trampoline_1, scm_trampoline_2): Use them.
6159
6160 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6161
6162 Partial introduction of real plugin interface.
6163
6164 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
6165 (EXTRA_DIST): Added threads-plugin.c.
6166
6167 * threads-plugin.h, threads-plugin.c: New files.
6168
6169 * threads.h: #include "libguile/threads-plugin.h".
6170
6171 * threads.c: #include "libguile/threads-plugin.c".
6172
6173 * pthread-threads.c: Temporarily remove debugging functions.
6174
6175 * threads.c, threads.h (scm_yield): Added back.
6176
6177 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6178
6179 * threads.c (really_launch): Detach before unlocking
6180 thread_admin_mutex in order not to risk being joined.
6181 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
6182 thread_admin_mutex locked during GC.
6183
6184 * pthread-threads.c, pthread-threads.h: Improvements to debugging
6185 functions.
6186
6187 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6188
6189 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
6190 support for debugging mutex operations.
6191
6192 * threads.c (scm_thread): Removed filed joining_threads.
6193 (thread_print): Print thread number as well as address of thread
6194 structure.
6195 (scm_join_thread): Bugfix.
6196 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
6197 scm_timed_wait_condition_variable, scm_signal_condition_variable,
6198 scm_broadcast_condition_variable): Use the low-level API.
6199 (scm_all_threads): Return copy of thread list (to prevent
6200 unintended destruction).
6201 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6202
6203 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6204 pthread "native" recursive mutex support.
6205
6206 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6207
6208 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6209 Simply lock a thread C API recursive mutex.
6210 (SCM_NONREC_CRITICAL_SECTION_START,
6211 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6212 SCM_REC_CRITICAL_SECTION_END): Removed.
6213
6214 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6215 direct calls to scm_rec_mutex_lock / unlock around the three calls
6216 to scm_m_expand_body.
6217
6218 * eval.c, eval.h (promise_free): New function.
6219 (scm_force): Rewritten; Now thread-safe; Removed
6220 SCM_DEFER/ALLOW_INTS.
6221
6222 * pthread-threads.h: Added partially implemented plugin interface
6223 for recursive mutexes. These are, for now, only intended to be
6224 used internally within the Guile implementation.
6225
6226 * pthread-threads.c: New file.
6227
6228 * threads.c: Conditionally #include "pthread-threads.c".
6229
6230 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6231 thread-safe;
6232
6233 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6234 SCM_GLOBAL_REC_MUTEX): New macros.
6235
6236 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6237 macros---use mutexes instead.
6238
6239 * tags.h (SCM_IM_FUTURE): New tag.
6240
6241 * eval.c (scm_m_future): New primitive macro.
6242 (SCM_CEVAL): Support futures.
6243 (unmemocopy): Support unmemoization of futures.
6244
6245 * print.c (scm_isymnames): Name of future isym.
6246
6247 * version.c: Unmade some changes to my private copy that got
6248 committed by mistake.
6249
6250 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6251
6252 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6253 2002-12-10.
6254
6255 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6256
6257 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6258 logical place.
6259
6260 * threads.c (create_thread): Remember root object until the handle
6261 of the new thread is on all_threads list.
6262
6263 * root.c (scm_make_root): Moved copying of fluids until after
6264 creation of root handle so that the fluids are GC protected. Also
6265 removed the critical section.
6266
6267 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6268
6269 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6270
6271 * gc-malloc.c (malloc_mutex): New mutex.
6272 (scm_gc_malloc_prehistory): Initialize it.
6273 (scm_realloc): Serialize call to realloc
6274 (scm_calloc): Same for calloc.
6275 Thanks to Wolfgang Jaehrling!
6276 (Now we have to make sure all calls to malloc/realloc are made
6277 through scm_malloc.)
6278
6279 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6280
6281 * threads.c (really_launch): Release heap (to prevent deadlock).
6282 (create_thread): Release heap before locking thread admin mutex.
6283
6284 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6285
6286 * threads.c (scm_i_thread_invalidate_freelists): New
6287 function.
6288
6289 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6290
6291 * modules.c (scm_export): Inserted a return statement.
6292
6293 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6294
6295 * modules.c (scm_export): new function
6296
6297 * gc-card.c: add a note about malloc()/free() overhead.
6298
6299 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6300
6301 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6302 in srcdir.
6303
6304 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6305
6306 These changes remove scm_ints_disabled (which hasn't has any
6307 effect in Guile for quite some time).
6308
6309 * async.c, error.h (scm_ints_disabled): Removed.
6310
6311 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6312 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6313 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6314 (old_ints): Removed.
6315
6316 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6317 critical section.
6318 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6319 SCM_ALLOW_INTS.
6320
6321 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6322
6323 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6324 Removed accidental #if 0 around these functions.
6325
6326 These changes are the start of support for preemptive
6327 multithreading. Marius and I have agreed that I commit this code
6328 into the repository although it isn't thoroughly tested and surely
6329 introduces many bugs. The bugs should only be exposed when using
6330 threads, though. Signalling and error handling for threads is
6331 very likely broken. Work on making the implementation cleaner and
6332 more efficient is needed.
6333
6334 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6335 (SCM_NONREC_CRITICAL_SECTION_START,
6336 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6337 SCM_REC_CRITICAL_SECTION_END): New macros.
6338 (SCM_CRITICAL_SECTION_START/END): Defined here.
6339
6340 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6341 the three calls to scm_m_expand_body.
6342
6343 * gc.h: #include "libguile/pthread-threads.h";
6344 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6345
6346 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6347 scm_t_key;
6348
6349 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6350 access.
6351
6352 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6353
6354 * gc-freelist.c, threads.c (really_launch): Use
6355 SCM_FREELIST_CREATE.
6356
6357 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6358
6359 * gc.c (scm_i_expensive_validation_check, scm_gc,
6360 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6361 heap administration so that those pieces of code are executed
6362 single-threaded. We might consider rewriting these code sections
6363 in terms of a "call_gc_code_singly_threaded" construct instead of
6364 calling the pair of scm_i_thread_put_to_sleep () and
6365 scm_i_thread_wake_up (). Also, we would want to have as many of
6366 these sections eleminated.
6367
6368 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6369
6370 * inline.h: #include "libguile/threads.h"
6371
6372 * pthread-threads.h: Macros now conform more closely to the
6373 pthreads interface. Some of them now take a second argument.
6374
6375 * threads.c, threads.h: Many changes.
6376
6377 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6378
6379 * Makefile.am (version.h): Changed $^ --> $< in rule for
6380 version.h.
6381
6382 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6383
6384 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6385 (SCM_MINOR_VERSION): use @--@ substitution now.
6386 (SCM_MICRO_VERSION): use @--@ substitution now.
6387 (scm_effective_version): new function prototype.
6388
6389 * version.c (scm_effective_version): new function, also add
6390 effective-version.
6391
6392 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6393 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6394 SCM_LIBRARY_DIR.
6395 (version.h): generate this here rather than configure.in. This
6396 approach tracks source edits better (i.e. more immediately).
6397 Might be worth considering for other .in files too.
6398
6399 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6400
6401 Reorganized thread package selection. A thread package now only
6402 implements a small set of pthread like functions and Guile
6403 implements the rest on top of that. Guile's implementation is
6404 what the "coop-pthreads" package has been previously. Support for
6405 "coop" threads has been removed until I get time to add it again.
6406
6407 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6408 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6409 null-threads.c, coop-pthreads.c.
6410 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6411 pthread-threads.h.
6412
6413 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6414
6415 * threads.h: Do not include "libguile/coop-defs.h". Include
6416 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6417 (previously deprecated) C level thread API prototypes. They are
6418 now in the thread package specific headers, "null-threads.h" and
6419 "pthread-threads.h".
6420 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6421 New.
6422 (scm_threads_init): Removed.
6423 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6424 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6425 SCM_I_THREAD_SWITCH_COUNT): Define here.
6426 (scm_single_thread_p): Removed.
6427 (scm_call_with_new_thread): Take two args directly instead of list
6428 of two args.
6429 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6430 SCM_SET_THREAD_LOCAL_DATA): Define here.
6431
6432 * threads.c: Merged with "coop-pthreads.c".
6433
6434 * null-threads.h: Implement pthread-like API as a set of macros.
6435
6436 * pthread-threads.h: New, implement pthread-like API by deferring
6437 to pthread itself.
6438
6439 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6440 has been lost in the reorganization.
6441
6442 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6443
6444 The following change makes it possible to move procedure
6445 application dispatch outside inner loops. The motivation was
6446 clean implementation of efficient replacements of R5RS primitives
6447 in SRFI-1.
6448
6449 The semantics is clear: scm_trampoline_N returns an optimized
6450 version of scm_call_N (or NULL if the procedure isn't applicable
6451 on N args).
6452
6453 Applying the optimization to map and for-each increases efficiency
6454 noticeably. For example, (map abs ls) is 8 times faster than
6455 before.
6456
6457 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6458
6459 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6460
6461 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6462 (map, for-each): Handle also application on two args as a special
6463 case; Use trampolines.
6464
6465 Other changes:
6466
6467 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6468 (subr2oless): Removed.
6469 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6470 vector GC protected.
6471
6472 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6473 scm_out_of_range.
6474
6475 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6476
6477 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6478
6479 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6480
6481 * debug.c (scm_make_iloc): Added missing "return".
6482
6483 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6484
6485 * strports.c (scm_eval_string_in_module): Validate second arg to
6486 be a module. Thanks to Arno Peters!
6487
6488 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6489
6490 * .cvsignore: remove goops.c
6491
6492 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6493
6494 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6495 module_variable, scm_module_lookup_closure,
6496 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6497 scm_system_module_env_p): Don't compare SCM values with C
6498 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6499 over SCM_NFALSEP.
6500
6501 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6502
6503 * eval.h (SCM_MAKE_ILOC): New macro.
6504
6505 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6506 the iloc bitpattern here.
6507
6508 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6509
6510 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6511 part of the API, otherwise it's difficult to write Guile
6512 extensions using non-blocking I/O => moved #include
6513 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6514
6515 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6516 s_unlock_mutex.
6517
6518 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6519
6520 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6521 are defined in configure.in.
6522
6523 * threads.c: Removed SCM_API from function definitions. SCM_API
6524 is only for declarations.
6525
6526 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6527
6528 * coop-pthreads.h: Added support for thread specific data to the
6529 generic C API for the coop-pthreads case.
6530
6531 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6532 change.
6533 (scm_cond_broadcast): Added missing function.
6534
6535 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6536
6537 * coop.c (coop_next_runnable_thread): Removed, wich should have
6538 happened when GUILE_ISELECT was hard-wired.
6539
6540 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6541
6542 * Makefile.am (libguile_la_SOURCES): Added threads.c
6543 (DOT_DOC_FILES): Added threads.doc.
6544 (DOT_X_FILES): Added threads.x.
6545 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6546 (noinst_HEADERS): Added coop-pthreads.c.
6547 (modinclude_HEADERS): Added coop-pthreads.h.
6548
6549 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6550 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6551
6552 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6553 Thanks to Bill Schottstaedt!
6554
6555 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6556
6557 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6558 SCM_COPT_THREADS is defined.
6559 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6560 is defined.
6561
6562 * coop-pthreads.c: Some harmless renamings of internal stuff.
6563 (create_thread): New, generalized version of
6564 scm_call_with_new_thread.
6565 (scm_call_with_new_thread): Use it.
6566 (scm_spawn_thread): New, use create_thread.
6567
6568 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6569
6570 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6571 start testing it now.
6572
6573 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6574 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6575 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6576 is defined.
6577
6578 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6579
6580 * scmsigs.c (signal_cell_handlers, install_handler_data,
6581 scm_delq_spine_x, really_install_handler, install_handler): New
6582 scheme for triggering signal handlers, to simplify take_signal.
6583 (take_signal): Simplified, to avoid race conditions.
6584 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6585 hasn't exited yet.
6586
6587 * async.c (scm_async_click): Reset pending_asyncs, handle
6588 signal_asyncs. Don't set cdr of a non-signal async to #f.
6589 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6590 always. Set pending_asyncs.
6591 (scm_system_async_mark_for_thread): Check that thread has not
6592 exited.
6593 (scm_unmask_signals, decrease_block): Call scm_async_click after
6594 block_asyncs becomes zero.
6595
6596 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6597 active_asyncs.
6598
6599 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6600 fields.
6601 * root.c (root_mark): Mark them.
6602 (make_root): Initialize them.
6603
6604 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6605 USE_COOP_THREADS.
6606 (scm_internal_select): Define one version for USE_COOP_THREADS and
6607 one for USE_NULL_THREADS.
6608 (scm_init_iselect): Likewise.
6609
6610 * inline.h (scm_cell, scm_double_cell): Also allow
6611 USE_COPT_THREADS to not protect the slot initializers.
6612
6613 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6614 because threads need to be initialized before the stack, but
6615 gsubrs such as scm_timed_condition_variable_wait can only be
6616 created later.
6617
6618 * threads.h: Include "coop-pthreads.h" when requested.
6619 (scm_threads_make_mutex, scm_threads_lock_mutex,
6620 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6621 not implemented anyway.
6622 (scm_init_thread_procs, scm_try_mutex,
6623 scm_timed_condition_variable_wait,
6624 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6625 scm_thread_exited_p): New prototypes.
6626 (struct timespec): Define if not already defined.
6627 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6628 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6629 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6630 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6631 deprecated.
6632
6633 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6634 requested.
6635 (scm_thread_exited_p): New.
6636 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6637 registered procedures.
6638 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6639 Use the latter as the procedure for "wait-condition-variable",
6640 thus offering a optional timeout parameter to Scheme.
6641 (scm_wait_condition_variable): Implement in terms of
6642 scm_timed_wait_condition_variable.
6643 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6644 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6645 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6646 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6647 scm_make_mutex, etc, and deprecate.
6648 (scm_init_threads): Do not create smobs, leave this to
6649 scm_threads_init. Do not include "threads.x" file.
6650 (scm_init_thread_procs): New, include "threads.x" here.
6651
6652 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6653 scm_null_mutex_lock, scm_null_mutex_unlock,
6654 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6655 scm_null_condvar_wait, scm_null_condvar_signal,
6656 scm_null_condvar_destroy): Removed.
6657 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6658 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6659 scm_cond_destory): Do not define, they are now deprecated and
6660 handled by threads.{h,c}.
6661
6662 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6663 (scm_threads_init): Create smobs here, using the appropriate
6664 sizes.
6665 (block): Removed, now unused.
6666 (scm_c_thread_exited_p): New.
6667 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6668 scm_null_mutex_destroy, scm_null_condvar_init,
6669 scm_null_condvar_wait, scm_null_condvar_signal,
6670 scm_null_condvar_destroy): Removed and updated users to do their
6671 task directly.
6672 (scm_try_mutex, timeval_subtract,
6673 scm_timed_wait_condition_variable,
6674 scm_broadcast_condition_variable): New.
6675 (scm_wait_condition_variable): Removed.
6676
6677 * coop-defs.h (coop_m): Added 'level' field.
6678 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6679 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6680 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6681 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6682 define.
6683 (coop_condition_variable_broadcast): New.
6684
6685 * coop-threads.c (scm_threads_init): Create smobs here, using the
6686 appropriate sizes.
6687 (scm_c_thread_exited_p, scm_try_mutex,
6688 scm_timed_wait_condition_variable,
6689 scm_broadcast_condition_variable): New.
6690 (scm_wait_condition_variable): Removed.
6691
6692 * coop.c (coop_new_mutex_init): Initialize level.
6693 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6694 level.
6695 (coop_condition_variable_signal): Renamed to
6696 coop_condition_variable_broadcast and reimplemented in terms of
6697 that. Thus...
6698 (coop_condition_variable_broadcast): New.
6699
6700 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6701
6702 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6703
6704 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6705
6706 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6707 of system headers.
6708
6709 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6710 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6711 give better error messages. Thanks to Bill Schottstaedt!
6712
6713 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6714
6715 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6716 scm_definedp to scm_defined_p and deprecated scm_definedp.
6717
6718 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6719
6720 * async.h, async.c (scm_system_async): Fixed deprecation to work
6721 correctly when deprecated features are excluded.
6722
6723 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6724
6725 * async.c (scm_system_async_mark_for_thread): Validate thread
6726 argument.
6727
6728 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6729
6730 * feature.c (scm_init_feature): Don't add 'threads' for
6731 USE_NULL_THREADS.
6732
6733 * inline.h (scm_cell, scm_double_cell): Also allow
6734 USE_NULL_THREADS to not protect the slot initializers.
6735
6736 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6737 "USE_THREAD".
6738
6739 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6740 (modinclude_HEADERS): Added null-threads.h.
6741
6742 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6743 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6744 (scm_init_threads): Use generic type names scm_t_mutex and
6745 scm_t_cond instead of coop_m and coop_c.
6746
6747 * null-threads.c, null-threads.h: New files.
6748
6749 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6750
6751 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6752 This is to support makes that know about "$<" only in pattern
6753 rules, like Sun's make.
6754
6755 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6756
6757 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6758 substitution. Thanks to David Allouche!
6759
6760 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6761
6762 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6763 !SCM_ENABLE_DEPRECATED.
6764
6765 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6766
6767 * async.c (scm_system_async_mark_for_thread): Only call
6768 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6769 otherwise.
6770
6771 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6772 USE_THREADS is defined. Use scm_root otherwise.
6773 (scm_sigaction_for_thread): Ignore THREAD argument when
6774 USE_THREADS is not defined. Also, move THREAD argument defaulting
6775 out of HAVE_SIGACTION section, which was a bug.
6776
6777 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6778
6779 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6780 signal_handlers, not the closure that is used as the async.
6781 The closure is stored in signal_handler_cells, as previously.
6782
6783 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6784
6785 * root.h (scm_root_state): Added 'block_async' slot.
6786 (scm_active_asyncs): Removed abbrev.
6787 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6788
6789 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6790 abbrev.
6791
6792 * async.h (scm_call_with_blocked_asyncs,
6793 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6794 scm_c_call_with_unblocked_asyncs): New prototypes.
6795 (scm_mask_signals, scm_unmask_signals): Deprecated.
6796 (scm_mask_ints): Turned into a macro.
6797 * async.c (scm_mask_ints): Removed.
6798 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6799 this should not be necessary.
6800 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6801 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6802 deprecation warning and check for errornous use. Set block_asyncs
6803 instead of scm_mask_ints.
6804 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6805 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6806 scm_c_call_with_unblocked_asyncs): New.
6807
6808 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6809 Asyncs are enabled by default.
6810
6811 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6812
6813 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6814 6th element: an input waiting thunk.
6815 (sf_input_waiting): New.
6816
6817 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6818
6819 * root.c (root_mark): Mark active_asyncs slot.
6820
6821 * async.c (scm_async_click): Set the cdr of a executed handler
6822 cell to SCM_BOOL_F, not SCM_EOL.
6823 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6824 and only if the handler procedure is not already present.
6825 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6826 with SCM_BOOL_F.
6827 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6828
6829 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6830
6831 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6832
6833 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6834 scm_lt_dlopenext, and scm_lt_dlerror.
6835 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6836 and scm_lt_dlerror.
6837 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6838 and scm_lt_dlerror.
6839 (sysdep_dynl_init): switch to scm_lt_dlinit();
6840
6841 * Makefile.am (libguile_la_LIBADD): switch to use
6842 libguile-ltdl.la.
6843
6844 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6845
6846 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6847
6848 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6849 * scmsigs.c (got_signal): Removed.
6850 (signal_handler_cells, signal_handler_threads): New.
6851 (take_signal): Queue the cell of the signal for the specified
6852 thread. Reset the signal handler on systems that don't have
6853 sigaction.
6854 (sys_deliver_signals): Removed.
6855 (close_1): New.
6856 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6857 extended to also set the thread of a signal and allocate a cell
6858 for it. Keep the Scheme name "sigaction". Check that signum is
6859 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6860 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6861 (scm_init_scmsigs): Allocate signal_handler_cells and
6862 signal_handler_threads vectors.
6863
6864 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6865 that system asnycs and user asyncs are separated. Reimplemented
6866 system asyncs to work per-thread.
6867
6868 * gc.c (scm_init_gc): Do not use scm_system_async.
6869
6870 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6871 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6872 Removed prototypes.
6873 (scm_i_queue_async_cell): New.
6874
6875 * __scm.h (scm_asyncs_pending_p): Removed.
6876 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6877 scm_asyncs_pending_p.
6878
6879 * async.h (scm_system_async_mark_for_thread): New prototype.
6880
6881 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6882
6883 * root.h (scm_root_state): Added new "active_asyncs" slot.
6884 * root.c (scm_make_root): Initialize it to SCM_EOL.
6885
6886 * coop-defs.h (coop_t): Added new "handle" slot.
6887 * coop-threads.c (all_threads, scm_current_thread,
6888 scm_all_threads, scm_i_thread_root): New.
6889 (scm_threads_init): Add main thread to all_threads.
6890 (scheme_launch_thread): Remove thread from all_threads when it
6891 terminates.
6892 (scm_call_with_new_thread): Initialize handle slot of coop_t
6893 structure and add new thread to all_threads.
6894 (scm_spawn_thread): Likewise.
6895
6896 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6897 * threads.c (scm_current_thread, scm_all_threads): Register as
6898 primitives.
6899
6900 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6901
6902 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6903
6904 * script.c (scm_compile_shell_switches): Fix bad spelling of
6905 `explicitly' in comment.
6906
6907 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6908
6909 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6910 Refer to provided? in doc string rather than deprecated feature?.
6911
6912 2002-09-24 Gary Houston <ghouston@arglist.com>
6913
6914 * inline.h (scm_double_cell): prevent reordering of statements
6915 with any following code (for GCC 3 strict-aliasing).
6916 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6917 the earlier version of the reordering prevention.
6918
6919 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6920
6921 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6922
6923 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6924
6925 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6926 protection.
6927
6928 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6929
6930 * inline.h: include stdio.h
6931
6932 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6933
6934 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6935
6936 * gc-segment.c (scm_i_make_initial_segment): check user settings
6937 for sanity.
6938
6939 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6940 sanity.
6941
6942 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6943
6944 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6945
6946 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6947 these won't ever wrap around with high memory usage. Thanks to
6948 Sven Hartrumpf for finding this.
6949
6950 * gc-freelist.c: include <stdio.h>
6951
6952 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6953
6954 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6955
6956 * vectors.h (SCM_VECTOR_REF): New.
6957
6958 * snarf.h (SCM_DEFINE_PUBLIC): New.
6959
6960 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6961
6962 * socket.c (scm_addr_vector): Added size of address to arguments.
6963 Use it to avoid accessing a non-existent path in a sockaddr_un.
6964 Changed all callers.
6965
6966 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6967
6968 * gc.h: remove DOUBLECELL card flags.
6969
6970 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6971 scm_realloc().
6972
6973 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6974 init loop; handle this from scm_init_card_freelist()
6975
6976 * gc-card.c (scm_init_card_freelist): init bit vector here.
6977
6978 * numbers.c (scm_make_real): prevent reordering of statements
6979 num2float.i.c (FLOAT2NUM): idem
6980
6981 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6982
6983 * eval.h: prepend libguile/ to include path
6984
6985 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6986
6987 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6988 years. Thanks to Martin Grabmüller!
6989
6990 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6991
6992 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6993 unsigned numbers for computing minimum heap increment. This
6994 prevents weird results when a a negative minimum increment is
6995 computed.
6996
6997 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6998
6999 * gc_os_dep.c: When we have __libc_stack_end, use that directly
7000 instead of the old tricks.
7001
7002 * guile-snarf.in: Do not expect the input file to be the first
7003 argument after the optional "-o" option, just pass everything to
7004 the pre-processor without extracting the input file name.
7005
7006 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7007
7008 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
7009 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
7010
7011 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7012
7013 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
7014 Bill Schottstaedt for the bug report
7015
7016 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
7017
7018 * print.c (scm_iprin1): Print primitives generics always as
7019 "primitive-generic" even when they have no primitive methods yet.
7020
7021 2002-08-17 Gary Houston <ghouston@arglist.com>
7022
7023 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
7024 call.
7025
7026 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7027
7028 * ports.c (scm_add_to_port_table): small bugfix.
7029
7030 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
7031 malloc.
7032
7033 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
7034 only use SCM_MIN_HEAP_SEG_SIZE.
7035
7036 * ports.c (scm_add_to_port_table): add backwards compatibility
7037 function
7038
7039 * ports.h: use scm_i_ prefix for port table and port table size.
7040
7041 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
7042
7043 * vports.c (scm_make_soft_port): Initialize pt variable.
7044
7045 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
7046
7047 * strports.h (scm_c_eval_string_in_module,
7048 scm_eval_string_in_module): New prototypes.
7049 * strports.c (scm_eval_string_in_module): New, but use
7050 "eval-string" as the Scheme name and make second parameter
7051 optional.
7052 (scm_eval_string): Implement using scm_eval_string_in_module.
7053 (scm_c_eval_string_in_module): New.
7054 Thanks to Ralf Mattes for the suggestion!
7055
7056 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7057
7058 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
7059 message and abort.
7060
7061 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
7062
7063 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
7064 stead of scm_t_port*. The function now takes a tag argument.
7065
7066 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7067
7068 * gc.h: add scm_debug_cells_gc_interval to public interface
7069
7070 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
7071
7072 * gc.c (scm_i_expensive_validation_check): separate expensive
7073 validation checks from cheap ones.
7074
7075 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7076
7077 * read.c (scm_input_error): new function: give meaningful error
7078 messages, and throw read-error
7079
7080 * gc-malloc.c (scm_calloc): add scm_calloc.
7081
7082 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7083
7084 * tags.h: remove GC bits documentation from the tags table.
7085
7086 * read.c (INPUT_ERROR): Prepare for file:line:column error
7087 messages for errors in scm_lreadr() and friends.
7088
7089 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7090
7091 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
7092 implementation).
7093 (scm_gc_calloc): new function
7094
7095 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7096
7097 * ports.c (scm_new_port_table_entry): init port entry to 0
7098 completely.
7099
7100 * ports.c (scm_new_port_table_entry): change function from
7101 scm_add_to_port_table. This prevents cells with null-pointers from
7102 being exposed to GC.
7103
7104 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
7105 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
7106
7107 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
7108 to gc-stats.
7109
7110 * numbers.c (big2str): return "0" for 0 iso. ""
7111
7112 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
7113 private-gc.h: new file
7114
7115 * gc.c: completely revised and cleaned up the GC. It now uses lazy
7116 sweeping. More documentation in workbook/newgc.text
7117
7118 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7119
7120 * random.c (rstate_free): Return zero.
7121
7122 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7123
7124 * environments.c (remove_key_from_alist): Removed.
7125
7126 (obarray_remove): Simplified.
7127
7128 2002-07-24 Stefan Jahn <stefan@lkcc.org>
7129
7130 * continuations.h: ia64: Include <signal.h> before
7131 <sys/ucontext.h>.
7132
7133 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7134
7135 * modules.c (scm_sym2var): Don't compare SCM values with ==.
7136
7137 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7138
7139 * goops.c (scm_compute_applicable_methods): use
7140 scm_remember_upto_here_1 iso scm_remember_upto_here
7141
7142 * macros.c: include deprecation.h
7143
7144 * vectors.c (scm_vector_move_right_x): remove side effect in
7145 macro arg.
7146 (scm_vector_move_left_x): idem.
7147
7148 * net_db.c, posix.c, socket.c: variable naming: change ans to
7149 result.
7150
7151 * sort.c (scm_merge_vector_x): accept vector as argument
7152 iso. SCM*. This is needed for full GC correctness.
7153
7154 * gc.h: undo previous undocumented changes related to #ifdef
7155 GENGC.
7156
7157 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7158
7159 * *.c: add space after commas everywhere.
7160
7161 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
7162 Document cases where SCM_WRITABLE_VELTS() is used.
7163
7164 * vectors.h (SCM_VELTS): prepare for write barrier, and let
7165 SCM_VELTS() return a const pointer
7166 (SCM_VECTOR_SET): add macro.
7167
7168 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7169
7170 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
7171 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
7172 Deprecated the special kind of built-in dynamic syntax transformer
7173 that was inaccurately named "macro". Note: The built-in syntax
7174 transformers that are named "mmacro" or "memoizing-macro" still
7175 exist, and it is these which come much closer to what one would
7176 call a macro.
7177
7178 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
7179
7180 * eval.c (unmemocopy): Fix for
7181 1001-local-eval-error-backtrace-segfaults (unmemoization crash
7182 with internal definitions and local-eval).
7183
7184 2002-07-12 Gary Houston <ghouston@arglist.com>
7185
7186 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
7187 defined. They don't do anything useful, especially since the
7188 only case where DYNAMIC_LINKING is undefined seems to be
7189 when --with-modules=no is given to configure, which is basically
7190 requesting that the "dynamic linking module" be omitted.
7191
7192 * Makefile.am (libguile_la_SOURCES): move dynl.c from
7193 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
7194
7195 * extensions.c (load_extension): check DYNAMIC_LINKING for
7196 scm_dynamic_call.
7197 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
7198 scm_init_dynamic_linking.
7199
7200 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7201
7202 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7203 check for Cygwin when including <winsock2.h>, this is already
7204 check for by configure. Thus, revert change from 2002-07-07.
7205
7206 2002-07-10 Gary Houston <ghouston@arglist.com>
7207
7208 * eq.c: include <string.h>
7209 * dynl.c: docstring editing.
7210
7211 2002-07-09 Gary Houston <ghouston@arglist.com>
7212
7213 * dynl.c (scm_dynamic_call): docstring editing.
7214
7215 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7216
7217 * gc_os_dep.c: HURD fixes.
7218
7219 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7220
7221 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7222
7223 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7224 this should be compiled for BUILD host.
7225 Override default rule for
7226 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7227 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7228 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7229
7230 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7231 <winsock2.h> on Cygwin even when we have it.
7232
7233 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7234
7235 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7236 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7237 the code. Full number of arguments checking of closures is
7238 mandatory now. However, the option to disable the checking has
7239 most probably not been used anyway.
7240
7241 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7242
7243 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7244 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7245 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7246 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7247 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7248 (scm_source_properties, scm_set_source_properties_x,
7249 scm_source_property): Removed compile time option SCM_RECKLESS to
7250 clean up the code. Full number of arguments checking of closures
7251 is mandatory now. However, the option to disable the checking has
7252 most probably not been used anyway.
7253
7254 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7255 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7256
7257 2002-06-30 Gary Houston <ghouston@arglist.com>
7258
7259 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7260 do anything useful. Added a comment about need for a mutex if
7261 pre-emptive threading is supported.
7262
7263 * posix.c (scm_convert_exec_args), dynl.c
7264 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7265 allocate_string_pointers. 2) simplified: don't reallocate the
7266 strings, just make an array of pointers 3) avoid memory leaks on
7267 error 4) let the procedure report errors in its own name.
7268 Consequences: 1) the procedures now assume that SCM strings are
7269 nul-terminated, which should always be the case. 2) Since strings
7270 are not reallocated, it's now possible for strings passed to
7271 dynamic-args-call to be mutated.
7272
7273 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7274
7275 * __scm.h, eval.c, eval.h: Removed compile time option
7276 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7277 variable positions during memoization is mandatory. However, the
7278 option to disable the caching has most probably not been used
7279 anyway.
7280
7281 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7282
7283 * print.c (scm_simple_format): Print missing part of format before
7284 ~% control. Thanks to Daniel Skarda!
7285
7286 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7287
7288 * mkstemp.c: Added exception notice to license statement.
7289
7290 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7291
7292 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7293 it is represented as a floating point value so that we can change
7294 its sign.
7295
7296 From John W. Eaton <jwe@bevo.che.wisc.edu>
7297
7298 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7299
7300 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7301
7302 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7303 in addition to `i386'. Thanks to Dale P. Smith.
7304
7305 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7306
7307 * eq.c (real_eqv): New.
7308 (scm_eqv_p): Use it when comparing reals and complexes.
7309
7310 * numbers.c: Include <string.h>, for strncmp.
7311 (mem2complex): Do not create negative NaNs.
7312 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7313 NaN.
7314 (scm_inexact_to_exact): Signal error when converting a NaN.
7315
7316 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7317
7318 * posix.c (scm_putenv): Handle removing variables explicitely by
7319 calling unsetenv.
7320
7321 From John W. Eaton.
7322
7323 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7324 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7325 and scm_nan.
7326 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7327 [SCO && ! HAVE_ISINF] (isinf): New function.
7328 (xisinf, xisnan): New functions.
7329 (IS_INF): Delete.
7330 (isfinite): Define in terms of xisinf.
7331 (scm_inf_p, scm_nan_p): New functions.
7332 (guile_Inf, guile_NaN): New file-scope vars.
7333 (guile_ieee_init): New function.
7334 (scm_inf, scm_nan): New functions.
7335 (idbl2str): Handle Inf and NaN. Remove funny label and
7336 corresponding gotos.
7337 (ALLOW_DIVIDE_BY_ZERO): New macro.
7338 (scm_divide): Allow division by zero to occur if
7339 ALLOW_DIVIDE_BY_ZERO is defined.
7340 Handle bignums and ints as special cases.
7341
7342 Additional stuff by me:
7343
7344 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7345 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7346 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7347 NaN. They will provide their own sign.
7348 (scm_divide): Only allow divides by inexact zeros. Dividing by
7349 exact zeros still signals an errors.
7350
7351 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7352
7353 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7354 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7355 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7356 Thanks to Andreas Rottmann.
7357
7358 2002-04-20 Gary Houston <ghouston@arglist.com>
7359
7360 * removal of unused fields in root state (thanks to Christopher
7361 Cramer for pointing out the disuse.)
7362 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7363 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7364
7365 * root.c (root_mark): don't mark them.
7366 (scm_make_root): don't set them to #f.
7367 * init.c (scm_init_standard_ports): don't initialise with the
7368 default ports.
7369
7370 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7371
7372 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7373 cpp_sig_symbols.c.
7374
7375 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7376
7377 * guile-snarf.in: Do not clean input file. This would write to
7378 the $(srcdir) during a VPATH build, which is not allowed. It also
7379 isn't needed since it only works when an output filename has been
7380 specified and in that case we don't need to clean the input file
7381 because the output file will already exist.
7382
7383 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7384
7385 * guile-snarf: Install the trap for removing $cleanfile only when
7386 the value of $cleanfile is actually known.
7387
7388 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7389
7390 * .cvsignore: add versiondat.h and *.c.clean.c.
7391
7392 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7393
7394 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7395 function, replaces macro SRCBRKP.
7396
7397 (SRCBRKP): Deprecated.
7398
7399 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7400 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7401 temporary variable.
7402
7403 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7404
7405 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7406 CHECK_EXIT and removed all references to them.
7407
7408 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7409
7410 * debug.h (scm_ready_p, debug_print): Removed declarations.
7411
7412 * eval.c (EVALCELLCAR): Removed.
7413
7414 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7415 operation from condition.
7416
7417 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7418
7419 * guile-snarf.in: When the output filename is "-", write to
7420 stdout. When no "-o" option is given, use "-" as the output
7421 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7422 output file on error when the output file name is not "-". Define
7423 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7424
7425 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7426
7427 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7428
7429 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7430 and the corresponding goto statements. Removed redundant code.
7431
7432 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7433
7434 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7435 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7436 Re-enabled handing of rpsubrs and asubrs.
7437
7438 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7439
7440 * eval.c (SIDEVAL): Removed.
7441
7442 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7443 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7444 argument checking order for set! to locals, variables and symbols.
7445 Improvements to control structure. Removed some uses of arg1 and
7446 arg2 as temporary variables.
7447
7448 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7449
7450 * guile-snarf.in: Remove "--compat=1.4" support.
7451 Add "-d" and "-D" support.
7452
7453 (deprecated_list): New var.
7454 (compat_mode_clean_xxx): Delete.
7455 (grep_deprecated): New func.
7456 ("main"): If "-d" or "-D", call `grep_deprecated'.
7457
7458 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7459
7460 * hooks.h: Change scm_t_c_hookype_t everywhere to
7461 scm_t_c_hook_type.
7462
7463 Docstring fixes:
7464
7465 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7466
7467 * ports.c (scm_sys_make_void_port): Use `@file'.
7468
7469 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7470 than `else'.
7471
7472 * macros.c (scm_makmacro): Don't say that the form replaces its
7473 source, because it doesn't.
7474 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7475
7476 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7477 scm_select, scm_basename), goops.c (scm_method_generic_function),
7478 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7479 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7480 spelling mistakes.
7481
7482 * debug.c (scm_debug_options), eval.c
7483 (scm_eval_options_interface), read.c (scm_read_options): Change
7484 incorrect @var in docstring to @code.
7485
7486 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7487
7488 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7489
7490 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7491 guile-snarf can remove trailing non-init code.
7492
7493 * guile-snarf.in (modern_snarf): Remove everything following and
7494 including "^:^" from the output.
7495
7496 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7497
7498 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7499
7500 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7501
7502 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7503
7504 * guile-snarf.in: Update copyright.
7505 Rewrite to internalize error handling.
7506 Add "--compat=1.4" handling.
7507 Add commentary.
7508
7509 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7510 (snarfcppopts): New var.
7511 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7512 (.c.doc): Use $(snarfcppopts).
7513
7514 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7515 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7516 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7517 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7518 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7519 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7520 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7521 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7522 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7523 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7524 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7525 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7526 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7527 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7528
7529 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7530
7531 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7532 The next step will be to remove the union 't' and simplify the
7533 code of SCM_CEVAL that way.
7534
7535 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7536
7537 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7538 rreadfds, rwritefds, rexceptfds): Made static.
7539
7540 * gc.c (terminating), fports.c (terminating): Renamed
7541 scm_i_terminating.
7542
7543 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7544
7545 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7546 potential overflow problems. Thanks to John W Eaton!
7547
7548 * strop.c (string_capitalize_x): Treat characters as unsigned so
7549 that 8-bit chars work. Thanks to David Pirotte!
7550
7551 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7552
7553 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7554 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7555 proc as temporary variables. Introduced temporary variables with
7556 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7557 by a more explicit predicate in some places.
7558
7559 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7560
7561 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7562 Added lots of comments regarding the implementation of #@dispatch.
7563 Changed intra-procedure communication to use t.arg1 instead of
7564 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7565 variables. Introduced temporary variables with hopefully
7566 descriptive names for clarification. Replaced SCM_N?IMP by a more
7567 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7568 of computing the expression explicitly. Eliminate now unused
7569 label nontoplevel_cdrxbegin.
7570
7571 * goops.h (SCM_INSTANCE_HASH): New macro.
7572
7573 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7574
7575 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7576
7577 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7578 "guile-snarf" moved back from `noinst_SCRIPTS'.
7579
7580 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7581
7582 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7583 exists when adding a source property other than those that are
7584 handled explicitly, add the new property to the SRCPROPS obj's
7585 plist.
7586
7587 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7588 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7589
7590 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7591 debug.status. It isn't needed, and it can overflow the bits
7592 reserved for it (which may lead to a segv or a GC abort).
7593
7594 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7595
7596 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7597 side-effecting operations from conditions and macro calls.
7598 Replaced SCM_N?IMP by a more explicit predicate in some places.
7599 Minimized the scope of some variables.
7600
7601 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7602
7603 * convert.i.c: Fixed int <-> long conversions which would have
7604 failed if their sizes were different.
7605
7606 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7607
7608 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7609 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7610 as temporary variables. Removed side-effecting operations from
7611 conditions and macro calls. Introduced temporary variables with
7612 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7613 by a more explicit predicate in some places. Removed code that
7614 was conditionally compiled if SICP was defined - which it never
7615 is.
7616
7617 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7618
7619 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7620 Removed some uses of t.arg1 and proc as temporary variables.
7621 Removed side-effecting operations from conditions and macro calls.
7622 Introduced temporary variables with hopefully descriptive names
7623 for clarification. Replaced SCM_N?IMP by a more explicit
7624 predicate in some places.
7625
7626 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7627
7628 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7629 explicit predicate in some places.
7630
7631 (CHECK_EQVISH): Removed.
7632
7633 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7634 variables. Removed side-effecting operations from conditions and
7635 macro calls. Introduced temporary variables for clarification.
7636 Sorted if-else-if check for the type of the last form in a list by
7637 frequency. Avoided some unnecessary tail-recursion calls.
7638
7639 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7640
7641 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7642 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7643 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7644 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7645 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7646 naming scheme for types.
7647
7648 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7649 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7650 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7651 (scm_make_environment), eval.c (scm_closure), fports.c
7652 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7653 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7654 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7655 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7656 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7657 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7658 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7659 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7660 scm_alloc_cell to scm_cell.
7661
7662 * environments.c (core_environments_observe), gc.c
7663 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7664 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7665 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7666 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7667 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7668 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7669 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7670 scm_double_cell.
7671
7672 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7673
7674 * convert.i.c, convert.c: Better range checking.
7675
7676 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7677
7678 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7679 Windows (MinGW).
7680
7681 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7682
7683 * Makefile.am: Update path to pre-inst-guile automake frag.
7684
7685 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7686
7687 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7688 features are excluded.
7689
7690 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7691
7692 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7693
7694 2002-02-25 Gary Houston <ghouston@arglist.com>
7695
7696 * convert.c: include <string.h> for convert_i.c.
7697
7698 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7699
7700 * .cvsignore: add stamp-h1.
7701
7702 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7703
7704 * unif.c (scm_array_to_list): Correct name, which had been
7705 accidentally changed to scm_t_arrayo_list!
7706
7707 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7708
7709 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7710 underflowing scm_mallocated.
7711
7712 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7713
7714 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7715 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7716 Reimplemented using the new scm_gc_malloc, etc., functions and
7717 deprecated.
7718
7719 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7720
7721 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7722 to `noinst_PROGRAMS'.
7723 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7724 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7725
7726 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7727
7728 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7729 non-zero is returned from a port or smob free function.
7730 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7731 scm_gc_register_collectable_memory,
7732 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7733 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7734
7735 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7736 debug-malloc.c, dynl.c, environments.c, environments.h,
7737 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7738 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7739 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7740 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7741 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7742 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7743 appropriate. Return zero from smob and port free functions.
7744
7745 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7746
7747 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7748 messages while the GC is running.
7749 (scm_c_issue_deprecation_warning_fmt): New.
7750
7751 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7752 it is pointing to the putback buffer.
7753
7754 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7755
7756 * gsubr.c (create_gsubr): On "too many args" error,
7757 also display arg count and name. Thanks to Bill Schottstaedt.
7758
7759 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7760
7761 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7762
7763 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7764 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7765 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7766
7767 * guile-snarf-docs-texi.in: Bye bye.
7768
7769 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7770
7771 * symbols.c (scm_make_symbol): Fix typo in docstring.
7772
7773 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7774 scm_make_symbol): New prototypes.
7775
7776 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7777
7778 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7779 (SCM_SYMBOL_INTERNED_P): New.
7780 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7781 SCM_MAKINUM since hash values can well be bignums.
7782 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7783 This signals a interned symbol.
7784 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7785 scm_make_symbol): New.
7786
7787 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7788
7789 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7790
7791 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7792 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7793 Thanks to Dave Love.
7794
7795 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7796
7797 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7798 This might help to make unintended clashes less likely.
7799 (scm_string_to_symbol): Protect the string until the symbols is
7800 created.
7801
7802 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7803
7804 * convert.c, convert.h, convert.i.c: New files containing C
7805 array to Scheme conversion helpers meant to be replacement
7806 functions for the deprecated gh interface.
7807
7808 * Makefile.am: Setup rules for new `convert.*' files.
7809
7810 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7811
7812 * symbols.c (scm_c_symbol2str): New function, replacement for
7813 `gh_scm2newsymbol()'.
7814
7815 * strings.c (scm_c_substring2str): New function. Proper
7816 replacement for `gh_get_substr()'.
7817
7818 * socket.c: Include `stdint.h' if available for the `uint32_t'
7819 declaration.
7820
7821 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7822 compiler warning).
7823
7824 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7825
7826 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7827
7828 Other changes unrelated to Elisp...
7829
7830 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7831 "if".
7832 (comments): Fix a few typos.
7833 (scm_for_each): Add parentheses around oddly unparenthesized
7834 if/while conditions.
7835
7836 * read.c (scm_read_opts): Add full stop at end of doc for
7837 `keywords' option.
7838
7839 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7840 instead of gh_symbol2scm.
7841
7842 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7843 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7844
7845 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7846 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7847
7848 First batch of changes for Elisp support...
7849
7850 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7851 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7852 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7853
7854 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7855 conditionalize compilation and initialization of Elisp support
7856 function.
7857
7858 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7859 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7860 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7861 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7862 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7863 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7864 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7865 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7866 options.c (change_option_setting, scm_options), posix.c
7867 (environ_list_to_c), print.c (scm_iprlist), throw.c
7868 (scm_exit_status), vectors.c (scm_vector), weaks.c
7869 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7870
7871 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7872 just SCM_FALSEP.
7873
7874 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7875 of just SCM_BOOLP.
7876
7877 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7878 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7879 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7880 (scm_m_atfop): Support function aliasing. Support both function
7881 args, which need transformation, and macro args, which do not.
7882 Add explanatory comments.
7883 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7884 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7885 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7886 SCM_NULLP || SCM_NILP instead of checks against (removed)
7887 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7888 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7889
7890 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7891 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7892 these, but I don't want to remove them yet, just in case.
7893 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7894 Elisp nil value.
7895
7896 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7897 against (removed) scm_lisp_nil.
7898 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7899 (SCM_NULL_OR_NIL_P): New.
7900
7901 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7902 SCM_VALIDATE_NULL.
7903
7904 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7905 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7906 value).
7907
7908 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7909 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7910 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7911 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7912
7913 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7914 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7915 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7916 Numbering shifted down accordingly.
7917 (SCM_ELISP_NIL): New IFLAG.
7918
7919 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7920
7921 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7922
7923 * eval.c: Removed outdated references to "everr". Improved some
7924 comments.
7925
7926 (scm_deval_args, deval_args): Renamed scm_deval_args to
7927 deval_args, since it is not part of the interface.
7928
7929 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7930 use references to debug.vect[0] before it exists. Add parentheses
7931 to switch statement.
7932
7933 * goops.h: Added local emacs variables.
7934
7935 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7936
7937 * eval.[ch] (scm_deval_args): Made static.
7938
7939 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7940 test.
7941
7942 * strings.c (scm_c_string2str): Clarified comment. Replaced
7943 THINKME by FIXME for uniformness. Removed question about whether
7944 arguments need to be protected from garbage collection: Arguments
7945 must be protected as any other variable.
7946
7947 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7948
7949 * procs.h (SCM_CLOSURE_BODY): New Macro.
7950
7951 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7952 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7953 get_slot_value, set_slot_value), procs.c
7954 (scm_procedure_documentation), sort.c (closureless), stacks.c
7955 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7956 SCM_CLOSURE_BODY.
7957
7958 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7959
7960 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7961
7962 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7963 use "cp" instead.
7964
7965 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7966
7967 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7968 everywhere.
7969
7970 * continuations.c (scm_make_continuation): Do not retain the
7971 throw_value when the continuation is invoked.
7972
7973 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7974
7975 * strings.c (scm_c_string2str): New function. Converts a
7976 given Scheme string into a C string. Also put in two
7977 THINKME's regarding the malloc policy for the missing converter
7978 routines.
7979
7980 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7981
7982 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7983 gh_symbol2scm.
7984
7985 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7986
7987 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7988 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7989
7990 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7991 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7992 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7993 macros.
7994
7995 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7996
7997 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7998 SCM_GC_CELL_* macros when accessing free cells.
7999
8000 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
8001
8002 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
8003 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
8004 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
8005 * strings.h (SCM_MAKE_STRING_TAG): New.
8006 * procs.h (SCM_MAKE_CCLO_TAG): New.
8007 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
8008
8009 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
8010 !SCM_ENABLE_DEPRECATED.
8011
8012 * async.c, async.h (scm_system_async_mark_from_signal_handler):
8013 New.
8014
8015 * scmsigs.c (scm_take_signal): Removed all code that assumes that
8016 signal handlers are allowed to divert the flow of control. Call
8017 scm_system_async_mark_from_signal_handler instead of
8018 scm_system_async_mark.
8019
8020
8021 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
8022 scm_alloc_double_cell in their place.
8023
8024 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
8025 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
8026 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8027 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
8028 scm_deprecated_newcell and scm_deprecated_newcell2.
8029
8030 gc.c (scm_tc16_allocated): Only define when including deprecated
8031 features.
8032 (scm_debug_newcell, scm_debug_newcell2): Removed.
8033 (scm_init_storage): Do not initialize scm_tc16_allocated.
8034 (scm_init_gc): Do it here.
8035 (allocated_mark): New, from old code.
8036 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8037
8038 * inline.c, inline.h: New files.
8039 * Makefile.am: Added them in all the right places.
8040
8041 * _scm.h: Include "libguile/inline.h".
8042
8043 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
8044 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
8045 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
8046 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
8047 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
8048 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
8049 scm_alloc_double_cell, respectively.
8050
8051 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
8052
8053 * modules.c (scm_c_use_module): Adapt to changes to
8054 `process-use-modules'.
8055
8056 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8057
8058 * numbers.c (scm_divide): Fix more division by zero errors.
8059
8060 2001-11-21 Gary Houston <ghouston@arglist.com>
8061
8062 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
8063 obsolete. autogen.sh says:
8064 invalid unused variable name: `OMIT_DEPENDENCIES'
8065
8066 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8067
8068 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
8069 reporting the bug.
8070
8071 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
8072
8073 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
8074 Thanks to Eric Gillespie, Jr!
8075
8076 2001-11-21 Stefan Jahn <stefan@lkcc.org>
8077
8078 * win32-socket.c (getservent, setservent, endservent,
8079 getprotoent, setprotoent, endprotoent): New functions.
8080 Appropriate replacements for M$-Windows.
8081
8082 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
8083 these definitions for GUILE_DEBUG.
8084
8085 * net_db.c: Include "win32-socket.h" if compiling with a native
8086 M$-Windows compiler. Include some pieces of code (protoent and
8087 servent interface) protected by HAVE_* macros when using a
8088 native M$-Windows compiler.
8089
8090 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
8091
8092 * modules.c (scm_c_export): Do nothing when the first argument is
8093 already the terminating NULL. Thanks to Han-Wen Nienhuys!
8094
8095 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
8096
8097 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
8098 also include `buildstamp'.
8099
8100 2001-11-18 Rob Browning <rlb@defaultvalue.org>
8101
8102 * version.c
8103 (s_scm_major_version): use SCM_MAJOR_VERSION.
8104 (s_scm_minor_version): use SCM_MINOR_VERSION.
8105 (s_scm_micro_version): use SCM_MICRO_VERSION.
8106 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
8107 SCM_MICRO_VERSION.
8108
8109 * version.h.in
8110 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
8111 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
8112 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
8113
8114 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
8115
8116 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8117 Rewrite docstrings without reference to substring-move-left/right,
8118 since the latter no longer exist.
8119
8120 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8121
8122 * eval.c: Removed bogus comment about acros.
8123
8124 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
8125 Minimize scope of local variable. Eliminate dependency on
8126 macro DEBUG_EXTENSIONS.
8127
8128 (s_splicing): New error message string.
8129
8130 (scm_m_body): Issue 'bad body' message rather than 'missing
8131 expression' message.
8132
8133 (scm_m_quote): Eliminate unnecessary copying.
8134
8135 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
8136 checking of the body to scm_m_body.
8137
8138 (scm_m_do): Move comment to function header. Rename arg1 to
8139 binding. Made the code a bit easier to read.
8140
8141 (evalcar): Removed.
8142
8143 (iqq): Added a comment. Changed the depth parameter to
8144 unsigned. Use size_t for vector lengths. Make sure vector object
8145 is gc protected as long as its contents are read. Add some syntax
8146 checks. Get rid of unnecessary SCM_IMP test. Clean up the
8147 control structure a bit.
8148
8149 (scm_m_delay): Added comment about the implementation of
8150 scm_m_delay.
8151
8152 (scm_m_define): Add comment about guile's currying define
8153 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
8154 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
8155
8156 (scm_m_letrec1): Removed. Part of the functionality is taken
8157 over by the new function 'transform_bindings'.
8158
8159 (transform_bindings): New function. Takes over some of the
8160 functionality of removed function 'scm_m_letrec1', namely to split
8161 a list of bindings into a reversed list of variables and a list of
8162 initializers.
8163
8164 (scm_m_letrec): Call 'transform_bindings'.
8165
8166 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
8167 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
8168 test. Use 'transform_bindings'. Fixed scoping error with named
8169 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
8170 Jerram for suggesting the fix). Cleaned up the control structure
8171 a bit.
8172
8173 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
8174 unnecessary consing. Eliminated unnecessary
8175 SCM_DEFER/ALLOW_INTS.
8176
8177 (SCM_CEVAL): Un-obfuscated some loops.
8178
8179 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
8180
8181 * gc.h (scm_unhash_name): Old declaration removed.
8182
8183 * eval.c (s_scm_eval): Change @var{primitive-eval} to
8184 @code{primitive-eval}.
8185
8186 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
8187 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
8188 Change @deffnx lines in docstrings to say {Scheme Procedure}
8189 rather than primitive or procedure.
8190
8191 * posix.c (scm_execl), filesys.c (scm_close), unif.c
8192 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
8193 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
8194 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
8195 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
8196 (scm_string_split, scm_string_ci_to_symbol), strings.c
8197 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
8198 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8199 Docstring fixes and improvements reflecting edits that have been
8200 made in the reference manual source.
8201
8202 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8203 scm_object_property, scm_set_object_property_x): Remove invalid
8204 @deffnx lines for corresponding procedure property primitives.
8205
8206 These changes add a @deffnx C function declaration and function
8207 index entries for each Guile primitive to the copy of the doc
8208 snarf output that is used for reference manual synchronization.
8209 Online help is unchanged.
8210
8211 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8212 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8213 name to SCM_SNARF_DOCS.
8214
8215 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8216 snarf-check-and-output-texi.
8217
8218 * Makefile.am (guile-procedures.texi): New rule.
8219 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8220 Changed so that the last stage of doc snarfing is now performed
8221 twice, once to produce guile-procedures.txt for online help, and
8222 once to produce guile.texi for reference manual synchronization.
8223
8224 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8225
8226 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8227 safely usable as a single statement followed by a ';', for example
8228 in an if statement.
8229
8230 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8231
8232 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8233
8234 * random.c (scm_random_solid_sphere_x,
8235 scm_random_hollow_sphere_x): Correct "shere" typos.
8236
8237 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8238
8239 * version.c (scm_version): Update docstring to include
8240 `micro-version'.
8241
8242 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8243
8244 * modules.c (scm_c_export): Call va_end after collecting the
8245 symbols.
8246
8247 * strop.h, strop.c (scm_substring_move_left_x,
8248 scm_substring_move_right_x): Removed.
8249
8250 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8251 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8252 configure does.
8253
8254 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8255
8256 * numbers.c: Document macros to define when including
8257 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8258 now rely on SIZEOF_ macros that have been figured out at
8259 configure time.
8260
8261 * num2integral.i.c: Adapt to new interface.
8262 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8263 target type by casting it and checking whether it is still the
8264 same. Do not try to handle bignums for integral types that are
8265 smaller than fixnums. When handling bignums, collect the
8266 magnituse first into a unsigned type, and correctly check for
8267 overflow.
8268 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8269 only -MIN_VALUE can still be negative of all negative numbers (in
8270 twos-complement).
8271
8272 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8273
8274 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8275 HAVE_LONG_LONG depending on whether their size is non-zero.
8276
8277 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8278
8279 * strop.c (scm_string_null_p): Docfix; nfc.
8280 Thanks to Scott Lenser.
8281
8282 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8283
8284 * extensions.c (scm_load_extension): Canonicalize docstring
8285 whitespace.
8286
8287 * unif.c (scm_uniform_array_write), ports.c
8288 (scm_current_output_port, scm_force_output), dynwind.c
8289 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8290 filesys.c (scm_open, scm_lstat), struct.c
8291 (scm_make_struct_layout), random.c (scm_random,
8292 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8293 (scm_i_index): Remove superfluous whitespace from end of docstring
8294 lines.
8295
8296 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8297 strings.c (scm_make_string), variable.c (scm_make_variable,
8298 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8299 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8300 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8301 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8302 newline at end of docstrings.
8303
8304 * modules.c (scm_set_current_module): Add missing newline to
8305 docstring.
8306
8307 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8308
8309 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8310 and makes them available through Guile. That is because the
8311 Winsock-API does not store its errors in `errno' and thus cannot
8312 return error messages via `strerror (errno)'.
8313
8314 * socket.c (scm_init_socket): Initialize `win32-socket' part
8315 here under M$-Windows.
8316
8317 * numbers.h: Added missing declaration of
8318 `scm_sys_check_number_conversions()'.
8319
8320 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8321 and use in `(strerror)' and `(system-error)'.
8322
8323 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8324 `win32-socket.[ch]' to extra source and header files.
8325
8326 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8327
8328 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8329 a call to turn-on-debugging when --debug has been given instead of
8330 turning it on directly. Also, handle new `--no-debug' option,
8331 which might suppress the call to turn-on-debugging.
8332
8333 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8334
8335 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8336
8337 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8338
8339 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8340 here (was at guile_LDADD) which describes the dependency
8341 correctly and allows a clean build on Win32.
8342
8343 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8344 into FOO.
8345
8346 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8347 import macros for external libraries (libcrypt, libqthreads,
8348 libreadline and libregex).
8349
8350 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8351
8352 * posix.c (flock): Added support for flock() in M$-Windows.
8353
8354 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8355 of __SCM_IMPORT__.
8356
8357 * fports.c (getflags): Differentiate reading and writing pipes
8358 descriptors.
8359
8360 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8361 M$-Windows.
8362
8363 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8364 conditionalized error code if `ETIMEDOUT' is not available.
8365 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8366 timeout'.
8367
8368 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8369 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8370 each inclusion of `num2integral.i.c'.
8371 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8372
8373 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8374
8375 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8376 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8377
8378 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8379
8380 * print.c (scm_iprin1): Mark print state as revealed when
8381 dispatching to generic write or display.
8382
8383 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8384
8385 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8386
8387 Support for native Win32. Thanks to Stefan Jahn!
8388
8389 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8390 and win32-dirent.h to extra source and header files. These
8391 include the uname() and the POSIX dirent interface implementation
8392 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8393 linkers which do not allow unresolved symbols inside shared
8394 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8395 dependency.
8396
8397 * __scm.h: Defined SCM_API. This macro gets prepended to all
8398 function and data definitions which should be exported or imported
8399 in the resulting dynamic link library in the Win32 port.
8400
8401 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8402 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8403 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8404 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8405 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8406 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8407 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8408 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8409 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8410 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8411 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8412 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8413 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8414 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8415 vports.h, weaks.h:
8416 Prefixed each each exported symbol with SCM_API.
8417
8418 * continuations.c: Added comment about the use of the extern
8419 declarations of {get,set}context() functions used in the ia64 port.
8420
8421 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8422 is meant to be a `unsigned long *'.
8423
8424 * filesys.c: Include `direct.h' if possible. Use local
8425 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8426 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8427 able to differentiate between sockets and other file descriptors.
8428 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8429 `scm_dirname()'.
8430
8431 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8432 statement block in `scm_fport_buffer_add()'.
8433 Some corrections in `getflags()'.
8434
8435 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8436
8437 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8438 build on Win32. Disable preloaded symbols on Win2 platforms.
8439
8440 * ioext.c, ports.c: Include `io.h' is possible.
8441
8442 * mkstemp.c: Include `process.h' is possible.
8443
8444 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8445 too.
8446 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8447
8448 * posix.c: Remove unnecessary dirent includes and defines. Include
8449 local `win32-uname.h' for MinGW. Extern declaration of
8450 `mkstemp()' for systems where it does not exists. Make
8451 `getlogin()' available on M$-Windows.
8452
8453 * scmsigs.c: Made `usleep()' avalable on MinGW.
8454
8455 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8456
8457 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8458
8459 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8460
8461 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8462
8463 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8464 Don't apply scm_uniform_vector_length on arrays.
8465
8466 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8467
8468 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8469 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8470 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8471 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8472 scm_list_<n> over scm_cons[2]?.
8473
8474 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8475 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8476 SCM_C[AD][AD]R instead of explicit form.
8477
8478 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8479 comparison parameters.
8480
8481 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8482 !SCM_NULLP instead of SCM_NIMP.
8483
8484 (scm_m_case): Don't copy the form. Renamed proc to clause and
8485 minimized its scope. Renamed x to clauses. Removed side
8486 effecting operation from macro call.
8487
8488 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8489 minimized its scope. Renamed x to clauses. Minimized the scope
8490 of variable 'len'. Make sure the else clause is treated specially
8491 even in case of '=>' occurences. Don't change the else to #t in
8492 order to be able to distinguish this case in the evaluator. Leave
8493 type checking of the recipient to the evaluator.
8494
8495 (scm_c_improper_memq): Made the comment somewhat clearer.
8496
8497 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8498 test for SCM_IM_LET at the place of the formal parameters.
8499 Simplified the formal parameter checking.
8500
8501 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8502 Renamed arg1 to binding and minimized its scope. Eliminated
8503 unnecessary consing.
8504
8505 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8506 variable 'len'.
8507
8508 (build_binding_list): New static function.
8509
8510 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8511 Further, split up the 'letrec' unmemoizing code to the
8512 corresponding parts for 'do', 'let' and 'letrec', adding comments
8513 to each form. Cleanup the handling of the do form (This removes
8514 some *real* code :-).
8515
8516 (SCM_CEVAL): Removed side effecting operation from macro call.
8517 Handle the 'else clause of the 'cond form specially - the symbol
8518 'else is not replaced with #t any more.
8519
8520 2001-10-14 Gary Houston <ghouston@arglist.com>
8521
8522 * version.c (scm_version): use sprintf instead of snprintf,
8523 for portability. thanks to Bill Schottstaedt.
8524
8525 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8526
8527 * read.c (scm_lreadr): When user-defined hash procedure returns
8528 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8529 an exception. (This prevents parsing of uniform vectors from
8530 interfering with parsing of numbers.)
8531
8532 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8533
8534 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8535 PTRDIFF_MIN. Thanks to Ken Raeburn.
8536
8537 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8538
8539 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8540
8541 * eval.c (scm_m_atbind): First try to find the variable without
8542 defining it locally; when it has not been found, define it
8543 locally.
8544
8545 * modules.c (module_variable): Pass over variables that exist but
8546 are unbound.
8547
8548 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8549
8550 * backtrace.c (display_backtrace_file_and_line): Only use
8551 scm_basename when POSIX support is compiled in. Thanks to Chris
8552 Cramer.
8553
8554 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8555
8556 * numbers.c (mem2uinteger): Return number read so far when coming
8557 across a hexdigit after having read a # or if not reading a hex
8558 value. This will enable the calling code to correctly handle
8559 forms like 1e2. (The background is, that the exponent markers d,
8560 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8561 providing this patch.
8562
8563 (mem2complex): Fix erroneous double-negation. Now, numbers like
8564 1-i will be read correctly.
8565
8566 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8567
8568 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8569
8570 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8571
8572 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8573
8574 * print.c (scm_print_state_vtable, print_state_pool):
8575 Initialize. These variables are now registered as gc roots.
8576
8577 (scm_current_pstate): Update documentation.
8578
8579 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8580 scm_prin1, scm_init_print): print_state_pool is registered as a
8581 gc root and thus does not need to be protected by a surrounding
8582 pair any more.
8583
8584 (make_print_state): The car of print_state_pool no longer holds
8585 the scm_print_state_vtable.
8586
8587 (scm_current_pstate, scm_make_print_state, print_circref,
8588 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8589 SCM_N<foo>.
8590
8591 (scm_prin1): When building lists, prefer scm_list_<n> over
8592 scm_cons[2]?.
8593
8594 (scm_iprlist): Removed a redundant SCM_IMP test.
8595
8596 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8597
8598 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8599
8600 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8601
8602 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8603 scm_list_<n> over scm_cons[2]?.
8604
8605 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8606
8607 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8608
8609 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8610 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8611 for some reason his patch didn't make it into the cvs.
8612
8613 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8614
8615 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8616 little bit - should even be somewhat more accurate now.
8617
8618 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8619
8620 * gc.c: support ia64 register backing store.
8621 (SCM_MARK_BACKING_STORE): new macro.
8622
8623 * continuations.h: support ia64 register backing store.
8624 (struct scm_t_contregs): add ia64 register backing store.
8625
8626 * continuations.c: support ia64 register backing store.
8627 (continuation_mark): mark ia64 register backing store.
8628 (continuation_free): free ia64 register backing store.
8629 (scm_make_continuation): capture ia64 register backing store.
8630 (copy_stack_and_call): copy ia64 register backing store.
8631
8632 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8633
8634 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8635 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8636 instead of SCM_NIMP to test for that case.
8637
8638 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8639 scm_t_bits instead of long.
8640
8641 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8642
8643 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8644 SCM_T_SIGNED_BITS_MIN): New.
8645 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8646 Use them to make these macros computable by the preprocessor.
8647
8648 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8649 whether the integral type fits in a fixnum, not the compiler.
8650 This removes a spurious compiler warning. Also, honor the
8651 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8652 needed for `long long's.
8653
8654 * numbers.c: Define NO_PREPRO_MAGOC when including
8655 num2integral.c.i for `long long' and `signed long long'.
8656
8657 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8658
8659 These changes fixes a race condition in the Guile coop - pthread
8660 compatibility code.
8661
8662 * coop.c (mother_awake_p): New variable.
8663 (coop_create): Set mother_awake_p before creating or signalling
8664 mother; wait until mother is going to sleep before returning.
8665 (mother): Reset mother_awake_p before going to sleep.
8666
8667 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8668
8669 * options.c (protected_objects, scm_init_options): The content of
8670 protected_objects is now protected from garbage collection using
8671 scm_gc_register_root instead of scm_permanent_object.
8672
8673 (get_option_setting): New static function that computes an option
8674 setting as it was formerly done in the function scm_options.
8675
8676 (get_documented_option_setting): New static function that
8677 returns option documentation as it was formerly done in the
8678 function scm_options. Note that documentation C strings are no
8679 longer precomputed into SCM objects. Instead, they are converted
8680 into SCM strings every time get_documented_option_setting is
8681 called.
8682
8683 (change_option_setting): New static functions that modifies the
8684 option setting as it was formerly done in the function
8685 scm_options. The function is now exception safe, i. e. won't
8686 cause a memory leak when interrupted. Further, only non-immediate
8687 option values are added to the protection list.
8688
8689 (scm_options): This function now has only the purpose to dispatch
8690 to to get_option_setting, get_documented_option_setting or
8691 change_option_setting, depending on the arguments given to
8692 scm_options.
8693
8694 (scm_init_opts): Don't convert documentation C strings into SCM
8695 strings. Further, don't protect any object values: They _must_
8696 be immediate values, otherwise there is no guarantee that they
8697 have not been collected before anyway.
8698
8699 * options.[ch] (scm_t_option): Made type unsigned, name into a
8700 constant char* and val into a scm_t_bits type.
8701
8702 (scm_options, scm_init_opts): The number of options is guaranteed
8703 to be larger or equal to zero. Thus, the type is changed to
8704 unsigned.
8705
8706 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8707
8708 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8709 testing an unsigned value for being >= 0.
8710
8711 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8712
8713 * numbers.h: Removed old comment about using SCM_CAR to access
8714 non-pair cells.
8715
8716 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8717 the return value is signed. Thanks to Brian Crowder for the bug
8718 report.
8719
8720 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8721 values. With this patch, SCM_SRS can be safely used for other
8722 types than scm_t_signed_bits. However, it should still better be
8723 an internal macro and thus be renamed to SCM_I_SRS.
8724
8725 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8726
8727 2001-10-03 Gary Houston <ghouston@arglist.com>
8728
8729 * continuations.h, unif.h: in the descriptions of the bit patterns
8730 of the heap cells, make bit 0 the least significant.
8731
8732 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8733
8734 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8735 Thanks to Golubev I. N.
8736
8737 2001-09-25 Gary Houston <ghouston@arglist.com>
8738
8739 * ports.c (scm_drain_input): extended the docstring. thanks to
8740 Alex Schroeder and Thien-Thi Nguyen.
8741
8742 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8743
8744 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8745 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8746 macros. (The NUM names might soon change.)
8747
8748 * numbers.h: Added missing declarations.
8749
8750 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8751
8752 * Makefile.am: Distribute num2float.i.c.
8753
8754 * num2float.i.c: New file, multiply included by numbers.c, used
8755 to "templatize" the float <-> num conversion routines.
8756
8757 * numbers.c: New functions: scm_num2float, scm_float2num,
8758 scm_num2double, scm_double2num.
8759
8760 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8761
8762 * .cvsignore: really add version.h
8763
8764 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8765 Otherwise it fails on the alpha. However, we might rather choose
8766 this size conditionally.
8767
8768 * numbers.c (scm_gcd): change "k" to a long from an int.
8769 Otherwise it fails on the alpha. However, we might rather choose
8770 this size conditionally.
8771
8772 * error.c (scm_wta): coerce char* to intptr_t before int
8773 assignment.
8774
8775 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8776 int.
8777
8778 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8779
8780 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8781
8782 * numbers.c (scm_integer_expt): Accept inexact integer in second
8783 argument. (Thanks to Bill Schottstaedt.)
8784
8785 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8786
8787 * .cvsignore: add version.h
8788
8789 * versiondat.h.in: removed (obsolete).
8790
8791 * version.h.in: renamed from version.h.
8792 (SCM_GUILE_MAJOR_VERSION): new public macro.
8793 (SCM_GUILE_MINOR_VERSION): new public macro.
8794 (SCM_GUILE_MICRO_VERSION): new public macro.
8795
8796 * version.h: renamed to version.h.in.
8797
8798 * version.c
8799 (scm_major_version): support integer *_VERSION macros.
8800 (scm_minor_version): support integer *_VERSION macros.
8801 (scm_micro_version): support integer *_VERSION macros.
8802 (scm_version): support integer *_VERSION macros.
8803
8804 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8805
8806 * error.c, error.h: Made error keys globally accessible.
8807 Applications might want to test for these or use them in a direct
8808 call to scm_error.
8809
8810 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8811 routines are passed an inexact. This change in behavior is
8812 motivated by concordance with R5RS: It is more common that a
8813 primitive doesn't want to accept an inexact for an exact.
8814
8815 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8816
8817 The following patch partially undoes my patch from 2001-06-30,
8818 where I added the function scm_gc_mark_cell_conservatively. The
8819 function is buggy, since it breaks guile during conservative
8820 marking if a pointer on the stack points directly into the list of
8821 free cells on the heap: With conservative cell marking this will
8822 cause the whole free list to be scanned and marked - boom!
8823
8824 * gc.c (allocated_mark, MARK, heap_segment,
8825 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8826 (scm_gc_mark_cell_conservatively): Remove function
8827 scm_gc_mark_cell_conservatively and update the corresponding
8828 comments and uses accordingly. Thanks to Christopher Cramer for
8829 the patch. (Minor corrections by me.)
8830
8831 2001-09-15 Gary Houston <ghouston@arglist.com>
8832
8833 * root.h (scm_root_state): removed the continuation_stack and
8834 continuation_stack_ptr members, which have no apparent purpose.
8835 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8836 removed.
8837
8838 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8839 (scm_igc): remove all references to contination_stack and
8840 continuation_stack_ptr, avoiding allocation of a vector and
8841 useless processing during gc.
8842
8843 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8844
8845 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8846
8847 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8848
8849 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8850
8851 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8852
8853 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8854 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8855
8856 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8857
8858 * guardians.c (mark_dependencies_in_tconc,
8859 whine_about_self_centered_zombies, scm_init_guardians): Register
8860 the static global variable `self_centered_zombies' via
8861 scm_gc_register_root, to make some cdr-ing unnecessary.
8862
8863 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8864
8865 * backtrace.c (display_backtrace_file,
8866 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8867 values, use SCM_FALSEP when comparing SCM values against #f.
8868 Thanks to Rob Browning for the bug report.
8869
8870 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8871
8872 * strings.[ch] (scm_str2string): New function.
8873
8874 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8875
8876 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8877 when computing nm, even if it's negative.
8878 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8879 (scm_must_realloc): Likewise.
8880
8881 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8882
8883 * numbers.c (scm_sys_check_number_conversions): new function,
8884 defined if Guile is compiled in debugging mode. currently checks
8885 `scm_num2ulong', should check much much more.
8886
8887 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8888 unsigned, ensure that it's positive. thanks to Martin Baulig!
8889
8890 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8891
8892 * __scm.h: Added new section about compile time selectable
8893 features.
8894
8895 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8896 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8897 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8898 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8899 Removed.
8900
8901 * deprecation.c (scm_include_deprecated_features): Simplified.
8902
8903 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8904 `SCM_IMP' instead of `!SCM_CELLP´.
8905
8906 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8907 Extract side-effecting operations from macros.
8908
8909 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8910 scm_top_level_lookup_closure_var and scm_system_transformer.
8911
8912 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8913
8914 (heap_segment): Use CELL_P instead of SCM_CELLP.
8915
8916 * init.c (start_stack): Don't initialize
8917 scm_top_level_lookup_closure_var and scm_system_transformer.
8918
8919 * modules.c (scm_set_current_module): Don't access
8920 scm_top_level_lookup_closure_var and scm_system_transformer.
8921
8922 (scm_sym2var): Don't call scm_variable_set_name_hint.
8923
8924 (scm_post_boot_init_modules): Removed deprecated initializations.
8925
8926 * print.c (scm_ipruk): Don't access cell contents of non cells.
8927
8928 * strings.c (scm_string_set_x): All strings are writable.
8929
8930 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8931 type. There is only one string type now.
8932
8933 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8934
8935 * tags.h: Remove comments about two different string types.
8936
8937 (SCM_CELLP, SCM_NCELLP): Deprecated.
8938
8939 * variable.c (make_variable): Remove code variant for vcells.
8940
8941 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8942 SCM_VARIABLE_LOC): Remove code variant for vcells.
8943
8944 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8945 SCM_ENABLE_DEPRECATED with the logic reversed.
8946
8947 * dynl.c (moddata, registered_mods), dynl.[ch]
8948 (scm_register_module_xxx, scm_registered_modules,
8949 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8950 (*top-level-lookup-closure*), eval.[ch]
8951 (scm_top_level_lookup_closure_var, scm_system_transformer,
8952 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8953 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8954 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8955 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8956 scm_unprotect_object), modules.c (root_module_lookup_closure,
8957 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8958 beautify_user_module_x_var, try_module_autoload_var,
8959 scm_module_full_name), modules.[ch] (scm_the_root_module,
8960 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8961 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8962 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8963 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8964 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8965 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8966 scm_make_shared_substring), tags.h (scm_tc7_substring,
8967 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8968 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8969 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8970 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8971 Removed.
8972
8973 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8974 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8975 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8976 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8977 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8978 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8979 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8980 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8981 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8982 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8983 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8984 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8985 (setzone, scm_strftime, scm_strptime), vports.c
8986 (scm_make_soft_port): Remove calls to
8987 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8988 gone, all strings are 0-terminated anyway.
8989
8990 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8991 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8992 double inclusion of the same headers to the SCM_<filename>_H
8993 format.
8994
8995 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8996 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8997 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8998 any more.
8999
9000 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
9001 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
9002 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
9003 !SCM_<foo> over SCM_N<foo>.
9004
9005 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9006
9007 * Makefile.am: Remove references to symbols-deprecated.c.
9008
9009 * symbols.c (scm_init_symbols): Don't initialize deprecated
9010 symbol functions.
9011
9012 * symbols-deprecated.c: Removed.
9013
9014 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
9015 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
9016 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
9017 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
9018 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
9019 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
9020 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
9021 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
9022 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
9023 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
9024 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
9025 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
9026 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
9027 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
9028 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
9029 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
9030 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
9031 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
9032 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
9033 scm_intern0, scm_sysintern, scm_sysintern0,
9034 scm_sysintern0_no_module_lookup, scm_symbol_value0,
9035 scm_string_to_obarray_symbol, scm_intern_symbol,
9036 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
9037 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
9038 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
9039 vectors.[ch] (scm_vector_set_length_x): Removed.
9040
9041 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
9042 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
9043 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
9044 Renamed the macros that are defined to inhibit double inclusion of
9045 the same headers to the SCM_<filename>_H format.
9046
9047 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
9048 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
9049 SCM_N<foo>.
9050
9051 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9052
9053 * continuations.h (scm_contregs), debug.h (scm_debug_info,
9054 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
9055 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
9056 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9057 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
9058 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
9059 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
9060 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
9061 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
9062 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
9063 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
9064 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
9065
9066 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
9067 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
9068 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
9069 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
9070 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
9071 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
9072 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
9073 double inclusion of the same headers to the SCM_<filename>_H
9074 format.
9075
9076 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
9077 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
9078 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
9079 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
9080 !SCM_<foo> over SCM_N<foo>.
9081
9082 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9083
9084 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
9085 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
9086 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
9087 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
9088 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
9089 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
9090 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
9091 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
9092 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
9093 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
9094 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
9095 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
9096 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
9097 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
9098 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
9099 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
9100 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
9101 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
9102 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
9103 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
9104 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
9105 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
9106 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
9107 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
9108 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
9109 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
9110 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
9111 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
9112 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
9113 the macros that are defined to inhibit double inclusion of the
9114 same headers to the SCM_<filename>_H format.
9115
9116 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
9117
9118 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
9119 "scm_t_portable" with "scm_port_table" which was an artifact from
9120 the great "scm_*_t -> scm_t_" renaming.
9121
9122 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
9123
9124 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
9125 used; nfc. Thanks to Bill Schottstaedt.
9126
9127 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
9128 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
9129 Thanks to Chris Cramer.
9130
9131 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
9132
9133 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
9134
9135 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
9136 dynamic scope.
9137 * dynwind.h (scm_swap_bindings): Declare.
9138 * dynwind.c (scm_swap_bindings): Make non-static.
9139
9140 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
9141
9142 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
9143 doing exactly nothing about them). thanks Neil!
9144
9145 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
9146
9147 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
9148
9149 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
9150
9151 * gc.c: Fix omission bug: Add `heap_segment' forward decl
9152 (proto) in the case when either `GUILE_DEBUG' or
9153 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
9154
9155 (map_free_list): Fix typo: Ref `f' correctly.
9156
9157 Thanks to Chris Cramer.
9158
9159 2001-08-15 Rob Browning <rlb@defaultvalue.org>
9160
9161 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
9162 variables.
9163 (libpath.h): change libguileversion to libguileinterface.
9164
9165 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
9166
9167 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
9168 ChangeLog-2000. Thanks to Daniel Skarda!
9169
9170 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
9171
9172 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
9173 do it from the Makefile.
9174
9175 * Makefile.am: rearrange the snarfing slightly, so that .doc files
9176 are of a reasonable size.
9177
9178 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
9179
9180 * stacks.c (scm_make_stack): Improve docstring by explaining use
9181 of cutting args.
9182
9183 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
9184
9185 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
9186 scm_char_whitespace_p, scm_char_upper_case_p,
9187 scm_char_lower_case_p, scm_char_is_both_p): Do not require
9188 characters to fulfill isascii in addition to the primary
9189 predicate.
9190
9191 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9192
9193 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
9194 scm_istr2flo, scm_istring2number): Removed.
9195
9196 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
9197 SCM_SLOPPY_<foo>.
9198
9199 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9200 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9201 Added.
9202
9203 (scm_string_to_number): Use new number parser.
9204
9205 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9206 handles complex numbers.
9207
9208 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9209 SCM_<foo>_H.
9210
9211 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9212 SCM_N<pred>.
9213
9214 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9215
9216 (scm_i_mem2number): Added.
9217
9218 (scm_exact_to_inexact): Changed signature.
9219
9220 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9221 here instead of within scm_i_mem2number. Call scm_i_mem2number
9222 instead of scm_istr2int and scm_istring2number.
9223
9224 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9225
9226 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9227 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9228 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9229 !SCM_<pred> over SCM_N<pred>.
9230
9231 (scm_eval_body): Remove side effecting code from macro call.
9232
9233 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9234 SCM_NIMP test.
9235
9236 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9237
9238 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9239
9240 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9241
9242 Removed vcell slot from structs.
9243
9244 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9245 subsequent indices.
9246
9247 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9248 zero. Use scm_vtable_index_layout instead of "0" when accessing
9249 said slot.
9250 (scm_init_struct): Remove vcell slot layout code from
9251 required_vtable_fields.
9252
9253 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9254
9255 * goops.c (build_class_class_slots): Removed vcell slot
9256 definition.
9257
9258 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9259 Removed vcell slot layout code.
9260 (scm_si_vcell): Removed.
9261
9262 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9263
9264 "Glocs" have been removed.
9265
9266 * tags.h: Update tag system docs.
9267 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9268 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9269 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9270 or SCM_NCONSP, respectively.
9271
9272 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9273 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9274 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9275
9276 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9277 tell glocs from structs.
9278
9279 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9280
9281 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9282 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9283 instead of with glocs.
9284 (EVALCAR): Do not test for glocs.
9285 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9286 condition.
9287 (scm_unmemocar): Do not handle glocs.
9288 (scm_m_atfop): Memoize as a variable, not as a gloc.
9289 (scm_eval_args, scm_deval_args): Do not handle glocs.
9290 (scm_ceval, scm_deval): Likewise.
9291
9292 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9293 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9294 Removed.
9295
9296 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9297
9298 * dynwind.c (scm_swap_bindings): Likewise.
9299 (scm_dowinds): Updated to recognize lists of variables instead of
9300 lists of glocs.
9301
9302 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9303
9304
9305 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9306 where it is needed.
9307
9308 2001-07-25 Gary Houston <ghouston@arglist.com>
9309
9310 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9311 docstrings to reflect the n-ary implementation.
9312
9313 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9314
9315 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9316 value of a variable, not the plain "return" statement.
9317
9318 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9319
9320 * eval.c: Allow variables in memoized code (in addition to glocs).
9321 (scm_lookupcar): Handle variables in lost races. Replace symbol
9322 with variable directly, do not make a gloc.
9323 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9324 like glocs.
9325 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9326 the main switch.
9327
9328 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9329
9330 * variable.c (scm_i_variable_print): Use "value" instead of
9331 "binding" since a binding is the mapping between symbols and
9332 variables, not between variables and their values.
9333
9334 * tags.h (scm_tc7_variable): New.
9335 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9336 * print.c (scm_iprin1): Likewise.
9337
9338 * variable.h (scm_tc16_variable): Removed.
9339 (SCM_VARIABLEP): Test for new tc7 code.
9340 (scm_i_variable_print): New.
9341 * variable.c (scm_tc16_variable): Removed.
9342 (variable_print): Renamed to scm_i_variable_print and made
9343 non-static.
9344 (variable_equal_p): Removed.
9345 (make_variable): Construct a tc7 object instead of a smob.
9346 (scm_init_variable): Do not register smob.
9347
9348 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9349
9350 * tags.h: Include inttypes.h when we have it.
9351
9352 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9353
9354 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9355 is taken by the new SCM_IM_CALL_WITH_VALUES.
9356 * print.c (scm_isymnames): Update table accordingly.
9357
9358 2001-07-22 Gary Houston <ghouston@arglist.com>
9359
9360 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9361 SCM_MAKINUM to convert regoff_t value to SCM.
9362
9363 2001-07-21 Gary Houston <ghouston@arglist.com>
9364
9365 * scmsigs.c: include sys/time.h for itimer stuff.
9366
9367 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9368
9369 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9370
9371 * c-tokenize.lex: add option %nounput to quiet warning.
9372 Add prototype for yylex to quiet warning.
9373
9374 * scmconfig.h.in: add flags for setitimer and getitimer.
9375
9376 * scmsigs.h (scm_init_scmsigs): new prototype.
9377 (scm_init_scmsigs): new prototype.
9378
9379 * scmsigs.c (s_scm_setitimer): new function.
9380 (s_scm_setitimer): new function.
9381
9382 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9383
9384 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9385 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9386 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9387 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9388 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9389 guile-func-name-check.in, guile-snarf-docs-texi.in,
9390 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9391 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9392 objprop.c, objprop.h, options.c, options.h, random.h,
9393 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9394 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9395 version.c, version.h: Updated copyright notice.
9396
9397 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9398
9399 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9400 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9401 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9402 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9403 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9404 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9405 sym_environment, scm_sym_change_class): New static variables to
9406 hold predefined symbols.
9407
9408 (build_class_class_slots): Build the list using scm_list_n
9409 instead of cons. Also, slots are already created as lists, thus
9410 making a call to maplist unnecessary.
9411
9412 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9413 scm_class_direct_subclasses, scm_class_direct_methods,
9414 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9415 scm_method_procedure, create_standard_classes, purgatory): Use
9416 predefined symbols.
9417
9418 (build_slots_list, compute_getters_n_setters,
9419 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9420 get_slot_value_using_name, set_slot_value_using_name,
9421 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9422 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9423 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9424
9425 (scm_sys_prep_layout_x): Minimize variable scopes.
9426
9427 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9428 scm_sys_fast_slot_set_x): Fix signedness.
9429
9430 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9431 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9432 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9433 when converting to and from SCM values.
9434
9435 (scm_enable_primitive_generic_x): Add rest argument checking.
9436
9437 (map, filter_cpl, maplist, scm_sys_initialize_object,
9438 scm_sys_prep_layout_x, slot_definition_using_name,
9439 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9440 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9441 predicates over SCM_N?IMP tests.
9442
9443 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9444 checking.
9445
9446 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9447 alias.
9448
9449 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9450
9451 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9452
9453 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9454
9455 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9456
9457 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9458
9459 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9460
9461 * strings.c (s_scm_string): fix arg position in assert.
9462
9463 2001-07-11 Gary Houston <ghouston@arglist.com>
9464
9465 * strports.c (st_write): use memcpy, not strncpy. thanks to
9466 Dale P. Smith.
9467
9468 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9469
9470 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9471 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9472 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9473 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9474 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9475 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9476 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9477 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9478 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9479 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9480 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9481 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9482 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9483 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9484 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9485 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9486 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9487 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9488 weaks.c, weaks.h: Remove "face-lift" comment.
9489
9490 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9491
9492 * .cvsignore: add stamp-h.in.
9493
9494 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9495
9496 * hooks.c (scm_make_hook, scm_add_hook_x),
9497 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9498 value info to the docstrings.
9499
9500 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9501
9502 Some more compatibility patches for Windows.
9503
9504 * posix.c (getlogin): getlogin() implementation for Windows.
9505
9506 * backtrace.c, ioext.c: Include <stdio.h>.
9507
9508 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9509 exist.
9510
9511 * cpp_sig_symbols.in: Added SIGBREAK.
9512
9513 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9514
9515 * strports.c (scm_read_0str, scm_eval_0str): Call
9516 scm_c_read_string and scm_c_eval_string respectively, not
9517 themselves. Thanks to Dale P. Smith!
9518
9519 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9520
9521 * unif.c (scm_array_set_x): The variable args does not
9522 necessarily have to be a list. Further, got rid of a redundant
9523 SCM_NIMP test.
9524
9525 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9526
9527 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9528 last.
9529
9530 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9531 init_heap_seg): Fixed signedness.
9532
9533 (init_heap_seg): Replaced strange for-loop with a while loop.
9534
9535 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9536
9537 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9538
9539 The following patch adds conservative marking for the elements of
9540 free or allocated cells.
9541
9542 * gc.c (allocated_mark, heap_segment): New static functions.
9543
9544 (which_seg): Deleted, since the functionality is now provided by
9545 function heap_segment.
9546
9547 (map_free_list): Use heap_segment instead of which_seg.
9548
9549 (MARK): If cell debugging is disabled, mark free cells
9550 conservatively.
9551
9552 (scm_mark_locations, scm_cellp): Extracted the search for the
9553 heap segment of a SCM value into function heap_segment.
9554
9555 (scm_init_storage): Allocated cells must be marked
9556 conservatively.
9557
9558 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9559
9560 The following patch changes the representation of weak vectors to
9561 double cells instead of using an extension of the vector's
9562 allocated memory.
9563
9564 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9565 the result of SCM_WVECT_GC_CHAIN.
9566
9567 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9568
9569 * weaks.c (allocate_weak_vector): New static function. It does
9570 not patch any previously created vector object during the
9571 construction of a weak vector, and thus doesn't need to switch
9572 off interrupts during vector creation.
9573
9574 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9575 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9576 Use allocate_weak_vector to provide the new weak vector object.
9577
9578 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9579 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9580 now stored in the double cell.
9581
9582 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9583 Use SCM_WVECT_TYPE.
9584
9585 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9586 using an entry of the double cell.
9587
9588 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9589
9590 * stamp-h.in: bye bye
9591
9592 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9593
9594 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9595 scm_eval_0str.
9596
9597 * load.c, load.h (scm_c_primitive_load,
9598 scm_c_primitive_load_path): New.
9599
9600 * strports.c, strports.h (scm_c_read_string): Renamed from
9601 scm_read_0str. Also, added "const" qualifier to argument.
9602 (scm_c_eval_string): Renamed from scm_eval_0str.
9603 (scm_read_0str, scm_eval_0str): Deprecated.
9604
9605 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9606
9607 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9608 SCM_LIST1.
9609
9610 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9611
9612 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9613 scm_list_n): New functions.
9614 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9615 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9616 (lots of files): Use the new functions.
9617
9618 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9619
9620 * strings.c: #include "libguile/deprecation.h".
9621
9622 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9623
9624 * read.c (scm_lreadr): When reading a hash token, check for a
9625 user-defined hash procedure first, so that overriding the builtin
9626 hash characters is possible (this was needed for implementing
9627 SRFI-4's read synax `f32(...)').
9628
9629 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9630 because the latter is unsigned now and breaks comparisons like
9631 (n < (scm_t_signed_bits)MIN_VALUE).
9632
9633 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9634
9635 * eval.h, eval.c (scm_call_4): New function.
9636
9637 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9638 directly rather than dispatching to them via scm_ithrow and a lazy
9639 catch.
9640
9641 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9642 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9643 for trap handler procedures.
9644
9645 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9646 procedures not being #f.
9647
9648 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9649
9650 * Makefile.am (c-tokenize.c): add rule to generate it.
9651 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9652
9653 filter-doc-snarfage.c: remove.
9654
9655 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9656
9657 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9658
9659 The following set of changes makes compiling Guile under various
9660 Windows compilers easier. Compilation under GNU systems should
9661 not be affected at all.
9662
9663 Thanks to Stefan Jahn for all necessary information, patches and
9664 testing.
9665
9666 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9667 getpgrp, ttyname, primitive-fork and some header inclusion for
9668 Windows.
9669
9670 * random.c: Define M_PI, if not predefined and use __int64 for
9671 LONG64 under Windows.
9672
9673 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9674 Windows and conditionalize some signal names.
9675
9676 * socket.c (scm_getsockopt): Added missing comma.
9677 Include socket library header under Windows.
9678
9679 * stime.c (CLKTCK): Add cast to int, to make it compile under
9680 Windows.
9681
9682 * ports.c (truncate): New function, compiled only under Windows.
9683
9684 * net_db.c: Do not declare errno under Windows.
9685
9686 * iselect.h, inet_aton.c: Include socket library headers under
9687 Windows.
9688
9689 * guile.c (inner_main): Under Windows, initialize socket library
9690 and initialize gdb_interface data structures.
9691
9692 * gdb_interface.h: Under Windows, gdb_interface cannot be
9693 initialized statically. Initialize at runtime instead.
9694
9695 * fports.c (write_all): ssize_t -> size_t.
9696 (fport_print): Conditionalize call to ttyname().
9697 (getflags): New function, compiled only under Windows.
9698
9699 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9700 primitives chown, link, fcntl.
9701 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9702 as path seperator.
9703
9704 * backtrace.c: Include <io.h> under Windows.
9705
9706 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9707
9708 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9709 declaration.
9710
9711 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9712
9713 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9714 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9715 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9716 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9717 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9718 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9719 (scm_dynamic_wind, scm_dowinds), environments.c
9720 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9721 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9722 goops.c (GETVAR, purgatory, make_class_from_template,
9723 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9724 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9725 (scm_primitive_load), modules.c (scm_resolve_module,
9726 scm_c_define_module, scm_c_use_module, scm_c_export,
9727 module_variable, scm_eval_closure_lookup, scm_sym2var,
9728 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9729 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9730 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9731 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9732 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9733 (scm_object_to_string, scm_call_with_output_string,
9734 scm_call_with_input_string), throw.c (scm_body_thunk,
9735 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9736 scm_make_shared_array), vports.c (sf_flush, sf_write,
9737 sf_fill_input, sf_close): Use one of the above functions.
9738 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9739
9740 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9741
9742 * filesys.c (scm_close), ports.c (scm_close_port,
9743 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9744 instead of SCM_NEGATE_BOOL.
9745
9746 * filesys.c (scm_stat): Clean up type dispatch.
9747
9748 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9749 scm_output_port_p): Get rid of redundant IM type check.
9750
9751 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9752 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9753 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9754 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9755 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9756 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9757 scm_addr_vector), stime.c (scm_strftime), strings.c
9758 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9759 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9760 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9761 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9762 instead of scm_makfromstr.
9763
9764 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9765 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9766 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9767 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9768 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9769 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9770 !SCM_<pred> over SCM_N<pred>.
9771
9772 * strings.[ch] (scm_makfromstr): Deprecated.
9773
9774 (scm_mem2string): New function, replaces scm_makfromstr.
9775
9776 * strings.c (scm_substring), strop.c (string_copy,
9777 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9778 (scm_symbol_to_string): Fix gc problem.
9779
9780 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9781 SCM_<foo>_H.
9782
9783 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9784 warning about comparing signed and unsigned values. This fix is
9785 not optimal, since it won't work reliably if sizeof (c_start) >
9786 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9787 solution is to define this macro as an inline function, thus
9788 allowing to specifiy the types of c_start and c_end.
9789
9790 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9791
9792 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9793 scm_t_debug_frame*.
9794
9795 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9796 Rename <foo>H to SCM_<foo>_H.
9797
9798 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9799 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9800
9801 (narrow_stack): Make i unsigned. Don't use side-effecting
9802 operations in conditions.
9803
9804 (narrow_stack, scm_make_stack, scm_stack_id,
9805 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9806
9807 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9808 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9809 more.
9810
9811 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9812 signedness.
9813
9814 (scm_last_stack_frame): Remove bogus `;'.
9815
9816 * stacks.h (SCM_FRAMEP): Fix type check.
9817
9818 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9819
9820 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9821 c-tokenize.c when doing maintainer-clean.
9822
9823 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9824
9825 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9826 simplify.
9827
9828 * eval.c: all hash signs are in column 0.
9829
9830 * Makefile.am (guile_filter_doc_snarfage): build using
9831 c-tokenize.c, not filter-doc-snarfage.c.
9832 rearrange snarfing dependencies a bit.
9833
9834 * c-tokenize.lex: new file.
9835
9836 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9837
9838 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9839 scm_t_srcpropso_plist. See the big type renaming.
9840 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9841 Thanks to Seth Alves!
9842
9843 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9844 they aren't defined already.
9845
9846 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9847
9848 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9849 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9850 problem.
9851
9852 * backtrace.c (display_expression, scm_set_print_params_x,
9853 display_application, display_frame, scm_backtrace), numbers.c
9854 (scm_istring2number), objects.c (scm_class_of,
9855 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9856 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9857
9858 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9859 always positive.
9860
9861 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9862 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9863
9864 * objects.c (scm_class_of): Type fix.
9865
9866 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9867 eliminated goto.
9868
9869 * pairs.h (scm_error_pair_access): The function can return if
9870 called recursively.
9871
9872 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9873
9874 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9875
9876 * gdbint.c, init.c: Removed inclusion of tag.h.
9877
9878 * tag.h, tag.c: Removed files.
9879
9880 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9881
9882 2001-06-20 Gary Houston <ghouston@arglist.com>
9883
9884 * deprecation.c, extensions.c, rw.c: include string.h.
9885
9886 2001-06-19 Gary Houston <ghouston@arglist.com>
9887
9888 * filter-doc-snarfage.c (process): added ungetc in
9889 MULTILINE_COOKIE case since otherwise it fails when there's no
9890 space between the '(' and the quote of the following string
9891 (gcc 3.0).
9892
9893 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9894
9895 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9896
9897 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9898
9899 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9900 extension takes place.
9901 * strings.h (SCM_STRING_LENGTH): Likewise.
9902 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9903
9904 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9905 it.
9906
9907 * tags.h: Include <stdint.h> when we have it.
9908 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9909 available. Else use "unsigned long".
9910 (scm_signed_bits_t): New.
9911
9912 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9913 (SCM_INUM): Cast result to scm_signed_bits_t.
9914
9915 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9916
9917 * mkstemp.c: Update path to #include file scmconfig.h.
9918 Thanks to Golubev I. N.
9919
9920 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9921
9922 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9923
9924 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
9925 the macro definition.
9926
9927 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9928 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9929 instead of SCM_INST_TYPE.
9930
9931 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9932 the object is a struct before accessing its struct flags.
9933
9934 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9935
9936 2001-06-10 Gary Houston <ghouston@arglist.com>
9937
9938 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9939 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9940 work reliably anymore. try it from boot-9.scm instead.
9941
9942 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9943
9944 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9945 Thanks to Matthias Köppe!
9946
9947 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9948
9949 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9950 space-happy C preprocessors.
9951
9952 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9953 inside cookies. thanks to Matthias Köppe!
9954
9955 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9956
9957 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9958 keywords. Fix gc protection.
9959
9960 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9961 operations in macro calls.
9962
9963 * pairs.c (scm_error_pair_access): Avoid recursion.
9964
9965 Thanks to Matthias Koeppe for reporting the bugs that correspond
9966 to the following set of patches.
9967
9968 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9969 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9970 bitvector base address using SCM_BITVECTOR_BASE.
9971
9972 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9973 unsigned long*.
9974
9975 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9976
9977 * goops.c (SCM_CLASS_REDEF): Removed.
9978
9979 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9980 SCM_<foo>_H.
9981
9982 Thanks to Matthias Koeppe for reporting the bugs that correspond
9983 to the following set of patches.
9984
9985 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9986 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9987 scm_sys_allocate_instance, clear_method_cache,
9988 scm_sys_invalidate_method_cache_x, scm_make,
9989 create_standard_classes, scm_make_port_classes, scm_make_class,
9990 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9991
9992 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9993
9994 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9995
9996 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9997 UNARY_ELTS_CODE): Remove bogus break statement.
9998
9999 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
10000 Don't access bit vectors elements as SCM objects.
10001
10002 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
10003 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10004 Don't assign to an unpacked value.
10005
10006 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
10007
10008 * __scm.h (SCM_NORETURN): Moved here from error.h.
10009
10010 (SCM_UNUSED): New macro.
10011
10012 (SCM_DEBUG_PAIR_ACCESSES): New macro.
10013
10014 * backtrace.c (display_error_handler), continuations.c
10015 (continuation_print), debug.c (debugobj_print), dynwind.c
10016 (guards_print), environments.c (observer_print,
10017 core_environments_finalize, leaf_environment_cell,
10018 leaf_environment_print, eval_environment_print,
10019 eval_environment_observer, import_environment_define,
10020 import_environment_undefine, import_environment_print,
10021 import_environment_observer, export_environment_define,
10022 export_environment_undefine, export_environment_print,
10023 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
10024 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
10025 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
10026 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
10027 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
10028 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
10029 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
10030 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
10031 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
10032 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
10033 set_slot_value, test_slot_existence, scm_change_object_class,
10034 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
10035 default_setter), guardians.c (guardian_print, guardian_gc_init,
10036 guardian_zombify, whine_about_self_centered_zombies), guile.c
10037 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
10038 mallocs.c (malloc_print), numbers.c (scm_print_real,
10039 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
10040 end_input_default, scm_port_print, fill_input_void_port,
10041 write_void_port), root.c (root_print), smob.c (scm_mark0,
10042 scm_free0, scm_smob_print, scm_smob_apply_1_error,
10043 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
10044 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
10045 (scm_struct_free_0, scm_struct_free_standard,
10046 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
10047 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
10048 scm_handle_by_throw, scm_ithrow), weaks.c
10049 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
10050 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
10051 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
10052
10053 * error.h (SCM_NORETURN): Moved to __scm.h.
10054
10055 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
10056 Renamed <foo>H to SCM_<foo>_H.
10057
10058 * gc.c (debug_cells_gc_interval): New static variable.
10059
10060 (scm_assert_cell_valid): If selected by the user, perform
10061 additional garbage collections.
10062
10063 (scm_set_debug_cell_accesses_x): Extended to let the user specify
10064 if additional garbage collections are desired.
10065
10066 (mark_gc_async): If additional garbage collections are selected
10067 by the user, don't call the after-gc-hook. Instead require the
10068 user to run the hook manually.
10069
10070 * pairs.c (scm_error_pair_access): New function. Only compiled
10071 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
10072
10073 * pairs.h (SCM_VALIDATE_PAIR): New macro.
10074
10075 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
10076 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
10077 is a real pair object. (Glocs are also accepted, but that may
10078 change.) If not, abort with an error message.
10079
10080 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10081
10082 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
10083
10084 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
10085 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
10086
10087 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
10088
10089 * extensions.c (scm_c_register_extension): Allow NULL as library
10090 name.
10091 (load_extension): Ignore NULL library names when comparing.
10092
10093 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
10094 non-pointers are being compared. Thanks to Alexander Klimov!
10095
10096 2001-06-04 Gary Houston <ghouston@arglist.com>
10097
10098 * rw.c (scm_write_string_partial): new procedure implementing
10099 write-string/partial in (ice-9 rw).
10100 * rw.h: declare scm_write_string_partial.
10101
10102 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
10103
10104 * keywords.c (keyword_print): Substract 1 from length of symbol
10105 name, accounting for the silly dash.
10106
10107 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
10108 Do not emit deprecation warning.
10109
10110 Added exception notice to all files.
10111
10112 * dynl.c: Include "deprecation.h".
10113
10114 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
10115
10116 * dynl.c (scm_register_module_xxx, scm_registered_modules,
10117 scm_clear_registered_modules): Deprecated.
10118
10119 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
10120
10121 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
10122 guile-snarf-docs-texi.
10123
10124 * fports.c: HAVE_ST_BLKSIZE changed to
10125 HAVE_STRUCT_STAT_ST_BLKSIZE.
10126 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
10127 HAVE_STRUCT_STAT_ST_BLKSIZE.
10128
10129 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
10130 HAVE_STRUCT_STAT_ST_RDEV.
10131 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
10132 HAVE_STRUCT_STAT_ST_BLKSIZE.
10133 (scm_stat2scm): HAVE_ST_BLOCKS changed to
10134 HAVE_STRUCT_STAT_ST_BLOCKS.
10135
10136 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
10137
10138 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
10139 of scm_eval_x to allow module changes between the forms in the
10140 string. Set/restore module using scm_c_call_with_current_module.
10141
10142 * mkstemp.c: New file, slightly modified from libiberties
10143 mkstemps.c.
10144
10145 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
10146
10147 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
10148 filter-doc-snarfage.c: new files.
10149
10150 * Makefile.am: add stuff to [build,] use and distribute
10151 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
10152
10153 * guile-snarf.in: grok the new snarf output.
10154
10155 * snarf.h: make the output both texttools- and `read'-friendly.
10156
10157 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
10158 guile-snarf-docs. (should also deprecate, I guess. maybe not).
10159
10160 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
10161
10162 * print.c (scm_simple_format): Support "~~" and "~%". Signal
10163 error for unsupported format controls and for superflous
10164 arguments. Thanks to Daniel Skarda!
10165
10166 * print.h, print.c (scm_print_symbol_name): Factored out of
10167 scm_iprin1.
10168 (scm_iprin1): Call it.
10169
10170 * keywords.c (keyword_print): Use scm_print_symbol_name so that
10171 weird names are printed correctly.
10172
10173 * print.c (scm_print_symbol_name): Symbols whose name starts with
10174 `#' or `:' or ends with `:' are considered weird.
10175
10176 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10177
10178 * numbers.c (scm_difference, scm_divide): Clarified comments for -
10179 and /.
10180
10181 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10182
10183 * debug.h: Removed prototype for scm_eval_string.
10184
10185 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10186
10187 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
10188 (make-string 2000 #\!))' in an older version).
10189
10190 Change strncpy to memcpy to allow embedded NUL characters in
10191 symbol prefix.
10192
10193 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
10194
10195 * hooks.c (scm_create_hook): deprecated.
10196 (make_hook): deleted.
10197 (scm_make_hook): all the hook creation code is now here.
10198
10199 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10200 a hook, make it permanent, and do a `scm_c_define' on it.
10201
10202 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10203
10204 * socket.c (s_scm_inet_pton): fix docstring quoting.
10205 (s_scm_inet_ntop): ditto.
10206
10207 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10208
10209 * hashtab.c (scm_internal_hash_fold): fix argument position in
10210 SCM_ASSERT.
10211
10212 * environments.c (s_scm_import_environment_set_imports_x): fix
10213 argument position in SCM_ASSERT.
10214
10215 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10216 (s_scm_make_iloc): ditto.
10217
10218 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10219
10220 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10221
10222 * eval.c (promise_print): Read the promise's value as an object.
10223
10224 (SCM_CEVAL): Don't perform side-effecting operations in macro
10225 parameters.
10226
10227 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10228 conditional expression.
10229
10230 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10231 initializer.
10232
10233 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10234 text, removed redundant computation of effective_length and fixed
10235 the overflow check.
10236
10237 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10238 values.
10239
10240 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10241
10242 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10243
10244 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10245 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10246
10247 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10248
10249 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10250 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10251 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10252 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10253
10254 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10255
10256 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10257
10258 * ramap.c (ramap_rp): Removed bogus `;'.
10259
10260 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10261 problem.
10262
10263 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10264 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10265 Read SCM objects rather than scm_bits_t values.
10266
10267 * tags.h (SCM_VOIDP_TEST): Removed.
10268
10269 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10270 value of 2 now corresponds to the former 1, the current 1
10271 corresponds to the former situation that SCM_VOIDP_TEST was
10272 defined.
10273
10274 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10275 If this appears to be not ANSI compliant, we will change it to
10276 typedef struct scm_unused_struct { } * SCM;
10277 Thanks to Han-Wen Nienhuys for the suggestion.
10278
10279 * unif.c (scm_array_set_x): Fix typing problem, and use
10280 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10281 dealing with uniform vectors.
10282
10283 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10284
10285 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10286 (scm_igc): mark from them, too (precisely, not conservatively!).
10287
10288 * root.h (scm_gc_registered_roots): new object in
10289 scm_sys_protects.
10290
10291 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10292 `scm_protect_object'. shouldn't call it at all, though, it seems.
10293
10294 * gc.c (scm_[un]protect_object): deprecated.
10295 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10296 (scm_gc_[un]register_root[s]): new.
10297
10298 * gc.h: add prototypes for scm_gc_[un]protect_object,
10299 scm_gc_[un]register_root[s].
10300
10301 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10302
10303 revert the controversial part of the 2001-05-24 changes.
10304
10305 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10306
10307 * modules.c (scm_env_module): Exported to Scheme.
10308
10309 * eval.c (scm_debug_opts): New option `show-file-name'.
10310
10311 * debug.h (SCM_SHOW_FILE_NAME): New.
10312
10313 * backtrace.c: Include "libguile/filesys.h".
10314 (sym_base, display_backtrace_get_file_line,
10315 display_backtrace_file, display_backtrace_file_and_line): New.
10316 (display_frame): Call display_backtrace_file_and_line if that is
10317 requested.
10318 (display_backtrace_body): Call scm_display_backtrace_file if
10319 requested.
10320
10321 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10322 Prototypes removed since there's no definition for these
10323 functions.
10324
10325 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10326
10327 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10328 Changed use of scm_array->scm_array_t and
10329 scm_array_dim->scm_array_dim_t to enable build with
10330 --disable-deprecated.
10331
10332 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10333
10334 The purpose of this set of changes is to regularize Guile's usage
10335 of ANSI C integral types, with the following ideas in mind:
10336
10337 - SCM does not nesessarily have to be long.
10338 - long is not nesessarily enough to store pointers.
10339 - long is not nesessarily the same size as int.
10340
10341 The changes are incomplete and possibly buggy. Please test on
10342 something exotic.
10343
10344 * validate.h
10345 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10346 new macros.
10347
10348 * unif.h: type renaming:
10349 scm_array -> scm_array_t
10350 scm_array_dim -> scm_array_dim_t
10351 the old names are deprecated, all in-Guile uses changed.
10352
10353 * tags.h (scm_ubits_t): new typedef, representing unsigned
10354 scm_bits_t.
10355
10356 * stacks.h: type renaming:
10357 scm_info_frame -> scm_info_frame_t
10358 scm_stack -> scm_stack_t
10359 the old names are deprecated, all in-Guile uses changed.
10360
10361 * srcprop.h: type renaming:
10362 scm_srcprops -> scm_srcprops_t
10363 scm_srcprops_chunk -> scm_srcprops_chunk_t
10364 the old names are deprecated, all in-Guile uses changed.
10365
10366 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10367 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10368 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10369 vectors.c, vports.c, weaks.c:
10370 various int/size_t -> size_t/scm_bits_t changes.
10371
10372 * random.h: type renaming:
10373 scm_rstate -> scm_rstate_t
10374 scm_rng -> scm_rng_t
10375 scm_i_rstate -> scm_i_rstate_t
10376 the old names are deprecated, all in-Guile uses changed.
10377
10378 * procs.h: type renaming:
10379 scm_subr_entry -> scm_subr_entry_t
10380 the old name is deprecated, all in-Guile uses changed.
10381
10382 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10383 type renaming:
10384 scm_option -> scm_option_t
10385 the old name is deprecated, all in-Guile uses changed.
10386
10387 * objects.c: various long -> scm_bits_t changes.
10388 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10389
10390 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10391 SCM_I_FIXNUM_BIT.
10392
10393 * num2integral.i.c: new file, multiply included by numbers.c, used
10394 to "templatize" the various integral <-> num conversion routines.
10395
10396 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10397 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10398 deprecated.
10399 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10400 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10401 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10402 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10403 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10404 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10405 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10406 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10407 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10408 scm_num2size): new functions.
10409
10410 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10411
10412 * load.c: change int -> size_t in various places (where the
10413 variable is used to store a string length).
10414 (search-path): call scm_done_free, not scm_done_malloc.
10415
10416 * list.c (scm_ilength): return a scm_bits_t, not long.
10417 some other {int,long} -> scm_bits_t changes.
10418
10419 * hashtab.c: various [u]int -> scm_bits_t changes.
10420 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10421 (scm_ihashx): n: uint -> scm_bits_t
10422 use scm_bits2num instead of scm_ulong2num.
10423
10424 * gsubr.c: various int -> scm_bits_t changes.
10425
10426 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10427
10428 * gh_data.c (gh_num2int): no loss of precision any more.
10429
10430 * gh.h (gh_str2scm): len: int -> size_t
10431 (gh_{get,set}_substr): start: int -> scm_bits_t,
10432 len: int -> size_t
10433 (gh_<num>2scm): n: int -> scm_bits_t
10434 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10435 (gh_length): return scm_bits_t, not unsigned long.
10436
10437 * gc.[hc]: various small changes relating to many things stopping
10438 being long and starting being scm_[u]bits_t instead.
10439 scm_mallocated should no longer wrap around.
10440
10441 * fports.h: type renaming:
10442 scm_fport -> scm_fport_t
10443 the old name is deprecated, all in-Guile uses changed.
10444
10445 * fports.c (fport_fill_input): count: int -> scm_bits_t
10446 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10447
10448 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10449 those prototypes, as the functions they prototype don't exist.
10450
10451 * fports.c (default_buffer_size): int -> size_t
10452 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10453 default_size: int -> size_t
10454 (scm_setvbuf): csize: int -> scm_bits_t
10455
10456 * fluids.c (n_fluids): int -> scm_bits_t
10457 (grow_fluids): old_length, i: int -> scm_bits_t
10458 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10459 scm_bits_t
10460 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10461
10462 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10463 the new and shiny SCM_NUM2INT.
10464
10465 * extensions.c: extension -> extension_t (and made a typedef).
10466
10467 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10468 there are no nasty surprises if/when the various deeply magic tag
10469 bits move somewhere else.
10470
10471 * eval.c: changed the locals used to store results of SCM_IFRAME,
10472 scm_ilength and such to be of type scm_bits_t (and not int/long).
10473 (iqq): depth, edepth: int -> scm_bits_t
10474 (scm_eval_stack): int -> scm_bits_t
10475 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10476 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10477 i: int -> scm_bits_t
10478
10479 * environments.c: changed the many calls to scm_ulong2num to
10480 scm_ubits2num.
10481 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10482
10483 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10484
10485 * debug.h: type renaming:
10486 scm_debug_info -> scm_debug_info_t
10487 scm_debug_frame -> scm_debug_frame_t
10488 the old names are deprecated, all in-Guile uses changed.
10489 (scm_debug_eframe_size): int -> scm_bits_t
10490
10491 * debug.c (scm_init_debug): use scm_c_define instead of the
10492 deprecated scm_define.
10493
10494 * continuations.h: type renaming:
10495 scm_contregs -> scm_contregs_t
10496 the old name is deprecated, all in-Guile uses changed.
10497 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10498 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10499
10500 * continuations.c (scm_make_continuation): change the type of
10501 stack_size from long to scm_bits_t.
10502
10503 * ports.h: type renaming:
10504 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10505 scm_port -> scm_port_t
10506 scm_ptob_descriptor -> scm_ptob_descriptor_t
10507 the old names are deprecated, all in-Guile uses changed.
10508 (scm_port_t.entry): int -> scm_bits_t.
10509 (scm_port_t.line_number): int -> long.
10510 (scm_port_t.putback_buf_size): int -> size_t.
10511
10512 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10513 global namespace and have little value beside that).
10514 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10515 SCM handle).
10516 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10517 exist (for size_t & ptrdiff_t).
10518 (scm_sizet): deprecated.
10519
10520 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10521
10522 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10523
10524 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10525 SCM_VARIABLE_INIT since that it what it used to be.
10526
10527 * deprecation.c (scm_include_deprecated_features): Make docstring
10528 ANSIsh. Thanks to Matthias Köppe!
10529
10530 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10531
10532 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10533 needed for weak-key hashtables.
10534
10535 * procs.c (scm_make_subr_with_generic): Add missing last argument
10536 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10537
10538 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10539 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10540
10541 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10542
10543 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10544
10545 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10546 `duplicate_string'. Do not use an indirect cell, store symbol
10547 directly in collision list of hash table.
10548 (duplicate_string): Removed.
10549
10550 * init.c (scm_init_guile_1): Call scm_init_extensions.
10551
10552 * Makefile.am: Add "extensions.c" and related files in all the
10553 right places.
10554
10555 * extensions.h, extension.c: New files.
10556
10557 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10558
10559 * modules.h (scm_system_module_env_p): Move out of deprecated
10560 section.
10561
10562 * rw.h (scm_init_rw): Added prototype.
10563
10564 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10565 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10566 New functions. They replace scm_make_gsubr and
10567 scm_make_gsubr_with_generic. The `make' variants only create the
10568 gsubr object, while the `define' variants also put it into the
10569 current module. Changed all callers.
10570 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10571
10572 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10573 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10574 functions. They replace scm_make_subr, scm_make_subr_opt and
10575 scm_make_subr_with_generic. The `make' variants only create the
10576 subr object, while the `define' variants also put it into the
10577 current module. Changed all callers.
10578 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10579 Deprecated.
10580
10581 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10582 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10583 the comments above.
10584
10585 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10586
10587 * throw.c (scm_lazy_catch): Slight docstring clarification.
10588
10589 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10590
10591 * throw.c: Lazy-catch handlers are no longer allowed to return.
10592 Fixed comments throughout.
10593 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10594 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10595 recognized as such.
10596
10597 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10598 refered to s_scm_minor_version previously.
10599
10600 * modules.h, modules.c: Moved around a lot of code so that
10601 deprecated features appear at the bottom.
10602 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10603 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10604 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10605 scm_load_scheme_module): Deprecated.
10606 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10607 environments corresponding to the root module.
10608 (convert_module_name, scm_c_resolve_module,
10609 scm_c_call_with_current_module, scm_c_define_module,
10610 scm_c_use_module, scm_c_export): New.
10611 (the_root_module): New static variant of scm_the_root_module. Use
10612 it everywhere instead of scm_the_root_module.
10613
10614 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10615 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10616 (scm_c_with_fluid): New.
10617 (scm_with_fluids): Use scm_c_with_fluids instead of
10618 scm_internal_with_fluids.
10619
10620 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10621 `scm_init_goops'. Do not explicitly create/switch modules.
10622 Return SCM_UNSPECIFIED.
10623 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10624 (scm_load_goops): Use scm_c_resolve_module instead of
10625 scm_resolve_module.
10626
10627 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10628 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10629 `scm_init_rw' prior to loading the startup files.
10630
10631 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10632 scm_init_rdelim. Do not explicitly create/switch modules.
10633 Return SCM_UNSPECIFIED.
10634 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10635 procedure.
10636
10637 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10638 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10639 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10640
10641 * script.c (scm_shell): Evaluate the compiled switches in the
10642 current module, not in the root module.
10643
10644 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10645
10646 * fluids.c (scm_c_with_fluids): Rename from
10647 scm_internal_with_fluids.
10648 (scm_internal_with_fluids): Deprecated.
10649 (scm_c_with_fluid): New.
10650
10651 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10652
10653 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10654
10655 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10656 accessed with SCM_C[AD]R.
10657
10658 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10659
10660 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10661
10662 * version.c (s_scm_major_version): doc fixes.
10663 (s_scm_minor_version): doc fixes.
10664 (s_scm_minor_version): new function.
10665
10666 * version.h (scm_init_version): new function.
10667
10668 * versiondat.h.in: add GUILE_MICRO_VERSION.
10669
10670 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10671
10672 * deprecation.c (scm_init_deprecation): Renamed
10673 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10674
10675 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10676
10677 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10678 dependent on cpp_cnvt.awk
10679
10680 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10681
10682 * script.c (scm_compile_shell_switches): New command line option
10683 `--use-srfi' for loading a list of SRFIs on startup.
10684 (scm_shell_usage): Added `--use-srfi' to help message.
10685
10686 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10687
10688 Merged from mvo-vcell-cleanup-1-branch.
10689
10690 The concept of vcells has been removed from Guile. With it,
10691 explicit obarrays and associated operations are gone. Use
10692 hashtables instead of obarrays.
10693
10694 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10695 result as variable instead of vcell. Glocs no longer point to a
10696 vcell but to a variable. Use scm_c_define instead of
10697 scm_sysintern and treat the result as a variable (which it is),
10698 not a vcell.
10699
10700 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10701 SCM_DEFVARIABLEP): Deprecated.
10702 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10703 (variable_print): Do not print name of variable.
10704 (variable_equalp): Compare values, not vcells.
10705 (anonymous_variable_sym): Removed.
10706 (make_vcell_variable): Removed.
10707 (make_variable): New, as replacement.
10708 (scm_make_variable, scm_make_undefined_variable): Do not take name
10709 hint parameter.
10710 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10711 error in that case.
10712 (scm_builtin_variable): Deprecated.
10713
10714 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10715 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10716 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10717 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10718 scm_string_to_obarray_symbol, scm_intern_symbol,
10719 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10720 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10721 Deprecated and moved to "symbols-deprecated.c".
10722 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10723 (scm_init_symbols): Call scm_init_symbols_deprecated.
10724 * symbols-deprecated.c: New file.
10725 * Makefile.am: Added symbols-deprecated.c and related files in all
10726 the right places.
10727
10728 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10729 SCM_GLOBAL_VCELL_INIT): Deprecated.
10730 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10731 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10732
10733 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10734 SCM_GLOC_SYM.
10735
10736 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10737 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10738 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10739 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10740 Changed according to the `throughout' comments.
10741
10742 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10743 to `int'.
10744 (scm_module_type): Removed.
10745 (the_root_module): Renamed to the_root_module_var. Now points to
10746 a variable instead of a vcell. Updated all uses.
10747 (scm_the_root_module): Return SCM_BOOL_F when module systems
10748 hasn't been booted yet.
10749 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10750 (scm_post_boot_init_modules): Made static.
10751 (scm_set_current_module): Call scm_post_boot_init_modules on first
10752 call.
10753 (make_modules_in, beautify_user_module_x, resolve_module,
10754 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10755 suffix. Now point to variables instead of vcells. Updated all
10756 uses.
10757 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10758 and return SCM_BOOL_F in that case.
10759 (scm_module_transformer): Likewise.
10760 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10761 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10762 (scm_eval_closure_lookup): Do not allow new definitions when
10763 `interface' flag is set.
10764 (scm_standard_interface_eval_closure): New.
10765 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10766 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10767 scm_c_lookup, scm_c_module_define, scm_c_define,
10768 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10769 scm_modules_prehistory): New.
10770 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10771 instead of scm_intern0.
10772
10773 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10774 symbol.
10775
10776 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10777 hashtable operations to maintain the keywords, not obarray ones.
10778
10779 * init.c (scm_load_startup_files): Do not call
10780 scm_post_boot_init_modules. This is done by
10781 scm_set_current_module now.
10782 (scm_init_guile_1): Call scm_modules_prehistory. Call
10783 scm_init_variable early on.
10784
10785 * goops.c (s_scm_sys_goops_loaded): Get
10786 var_compute_applicable_methods from scm_sym2var, not from a direct
10787 invocation of scm_goops_lookup_closure.
10788
10789 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10790
10791 * gc.c: Added simple debugging hack to mark phase of GC: When
10792 activated, do not tail-call scm_gc_mark. This gives nice
10793 backtraces.
10794 (scm_unhash_name): Removed.
10795
10796 * feature.c (features): Renamed to features_var. Now points to a
10797 variable instead of a vcell. Updated all uses.
10798
10799 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10800 `scm_current_module_lookup_closure' which will do the right thing
10801 when the module system hasn't been booted yet.
10802 (SCM_GLOC_SYM): Removed.
10803 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10804 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10805
10806 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10807 instead of with vcells. Do not overwrite `var' with the result of
10808 the lookup, use the new `real_var' instead. Remove `var2' in
10809 exchange (which was only used with threads).
10810 (sym_three_question_marks): New.
10811 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10812 `SCM_GLOC_SYM'.
10813 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10814 (scm_m_atfop): Expect the function definition to be a variable
10815 instead of a vcell.
10816 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10817 symbol instead.
10818 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10819 (scm_eval_args): Use more explicit code in the gloc branch of the
10820 atrocious struct ambiguity test. The optimizer will sort this
10821 out.
10822 (scm_deval_args): Likewise.
10823 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10824 remember the symbol instead. Added some comments where
10825 scm_tc3_cons_gloc really exclusively refers to structs.
10826 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10827 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10828 of scm_sysintern in general.
10829
10830 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10831 explicit magic.
10832
10833 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10834 pairs. Put the variable directly in the gloc.
10835 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10836 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10837
10838 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10839
10840 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10841 scm_the_last_stack_fluid_var. It now points to a variable instead
10842 of a vcell. Updated all uses.
10843 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10844 instead of a vcell. Updated all uses.
10845
10846 * _scm.h: Include "variables.h" and "modules.h" since almost
10847 everybody needs them now.
10848
10849 * root.h (scm_symhash, scm_symhash_vars): Removed.
10850 * gc.c (scm_init_storage): Do not initialize them.
10851
10852 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10853
10854 * eval.c (scm_init_eval): Initialize scm_undefineds and
10855 scm_listofnull.
10856
10857 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10858 like the SCM_NEWCELL macro counterparts.
10859
10860 (scm_init_storage, scm_init_gc): Moved initialization of
10861 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10862
10863 (scm_init_storage): Moved initialization of scm_undefineds and
10864 scm_listofnull to eval.c, initializion of scm_nullstr to
10865 strings.c, initializion of scm_nullvect to vectors.c.
10866
10867 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10868 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10869
10870 * init.c (scm_init_guile_1): Reordered some initializations and
10871 added dependcy information comments.
10872
10873 * load.c (scm_init_load): Use scm_nullstr.
10874
10875 * strings.c (scm_init_strings): Initialize scm_nullstr.
10876
10877 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10878
10879 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10880
10881 * values.c (print_values): Print as a unreadable object, not as
10882 multiple lines. Thanks to Matthias Köppe!
10883
10884 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10885
10886 * deprecation.c: Fixed copyright date.
10887
10888 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10889 DEPRECATION_H to SCM_DEPRECATION_H.
10890
10891 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10892
10893 * guile-doc-snarf.in: Update copyright.
10894 Fix relative path bug. Thanks to Sergey Poznyakoff.
10895
10896 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10897
10898 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10899 accept open ports. Thanks to Quetzalcoatl Bradley!
10900
10901 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10902
10903 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10904 has 779 primitives on startup.
10905
10906 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10907
10908 * eval.c (scm_i_eval): Copy expression before passing it to
10909 SCM_XEVAL. The copy operation was removed unintendedly during my
10910 change on 2001-03-25.
10911
10912 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10913
10914 from Matthias Köppe (thanks!):
10915
10916 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10917 portable.
10918
10919 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10920 docstring.
10921
10922 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10923
10924 * gc.c (scm_init_gc): Added FIXME comment.
10925
10926 * hooks.c: Since hooks don't have a name any more, it is not
10927 necessary to include objprop.h.
10928
10929 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10930
10931 (symbol_name, scm_make_hook_with_name): Removed.
10932
10933 (scm_create_hook): Don't set the hook's name property.
10934
10935 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10936
10937 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10938
10939 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10940
10941 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10942 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10943 FLOBUFLEN and define it unconditionally.
10944
10945 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10946
10947 * gh_data.c (gh_lookup): Call gh_module_lookup with
10948 `scm_current_module ()', not `#f'.
10949 (gh_module_lookup): Expect a module instead of an obarray as first
10950 argument and do lookup in that module.
10951
10952 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10953 arrays. The length of array is already determined differently and
10954 scm_uniform_vector_length does not work on arrays.
10955
10956 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10957
10958 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10959 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10960
10961 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10962 they are not used. Changed `wrong type' error into `wrong num
10963 args' error. Changed all callers.
10964
10965 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10966 arguments are supplied.
10967
10968 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10969
10970 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10971 describe `regexp/notbol' and `regexp/noteol' execution flags.
10972
10973 * strop.c (scm_substring_move_x): Doc fix; nfc.
10974
10975 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10976
10977 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10978 (scm_set_object_procedure_x): Use it to check argument. Fix
10979 docstring.
10980
10981 * evalext.c (scm_definedp): Fix docstring.
10982
10983 2001-05-05 Gary Houston <ghouston@arglist.com>
10984
10985 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10986 support.
10987
10988 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10989
10990 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10991 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10992 Change R4RS references to R5RS.
10993
10994 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10995 docstring source are correctly reproduced in the output (ii)
10996 we don't anymore get occasional trailing quotes. Also reorganized
10997 and commented the code a little.
10998
10999 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
11000 fixes.
11001
11002 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11003
11004 * strop.c (scm_string_split): New procedure.
11005
11006 * strop.h (scm_string_split): Added prototype.
11007
11008 2001-05-04 Gary Houston <ghouston@arglist.com>
11009
11010 * socket.c: define uint32_t if netdb.h doesn't. thanks to
11011 Dale P. Smith.
11012
11013 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
11014
11015 * rw.c: Include "modules.h" and "strports.h".
11016
11017 * net_db.h (scm_gethost): Added prototype.
11018
11019 * deprecation.h, deprecation.c: New.
11020 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
11021 (DOT_X_FILES): Added "deprecation.x".
11022 (modinclude_HEADERS): Added "deprecation.h".
11023
11024 * init.c: Include "deprecation.h".
11025 (scm_init_guile_1): Call scm_init_deprecation.
11026
11027 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
11028
11029 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
11030 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
11031 New.
11032
11033 2001-04-29 Gary Houston <ghouston@arglist.com>
11034
11035 * rw.c: new file, implementing C part of module (ice-9 rw).
11036 (scm_read_string_x_partial): moved from ioext.c
11037 (scm_init_rw): new proc.
11038 * rw.h: new file.
11039 init.c: include rw.h and call scm_init_rw.
11040 Makefile.am: include rw.c and rw.h.
11041
11042 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
11043
11044 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
11045 know what's supposed to happen to it.
11046
11047 * list.h (scm_list_star): deprecation expired - removed.
11048
11049 * numbers.h (scm_dblproc): deprecation expired - removed.
11050 (SCM_UNEGFIXABLE): deprecation expired - removed.
11051 (SCM_FLOBUFLEN): deprecation expired - removed.
11052 (SCM_INEXP): deprecation expired - removed.
11053 (SCM_CPLXP): deprecation expired - removed.
11054 (SCM_REAL): deprecation expired - removed.
11055 (SCM_IMAG): deprecation expired - removed.
11056 (SCM_REALPART): deprecation expired - removed.
11057 (scm_makdbl): deprecation expired - removed.
11058 (SCM_SINGP): deprecation expired - removed.
11059 (SCM_NUM2DBL): deprecation expired - removed.
11060 (SCM_NO_BIGDIG): deprecation expired - removed.
11061
11062 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
11063 (scm_tc_dblr): deprecation expired - removed.
11064 (scm_tc_dblc): deprecation expired - removed.
11065 (scm_tc16_flo): deprecation expired - removed.
11066 (scm_tc_flo): deprecation expired - removed.
11067
11068 * tag.h (scm_tag): deprecation expired - removed.
11069
11070 * tag.c: (scm_tag): deprecation expired - removed.
11071
11072 * ioext.c: (scm_fseek): deprecation expired - removed.
11073
11074 * ioext.h (scm_fseek): deprecation expired - removed.
11075
11076 * gh_data.c (gh_int2scmb): deprecation expired - removed.
11077
11078 * gh.h (gh_int2scmb): deprecation expired - removed.
11079
11080 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
11081
11082 * stacks.c (scm_make_stack): Fix typo in docstring.
11083
11084 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
11085
11086 * error.c (scm_sysmissing): deprecation expired - removed.
11087
11088 * error.h (scm_sysmissing): deprecation expired - removed.
11089
11090 * gc.c
11091 (scm_init_gc): gc-thunk deprecation expired - removed.
11092 (scm_gc_vcell): deprecation expired - removed.
11093 (gc_async_thunk): scm_gc_vcell related code removed.
11094
11095 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
11096
11097 * strings.h
11098 (SCM_NSTRINGP): deprecation expired - removed.
11099 (SCM_NRWSTRINGP): deprecation expired - removed.
11100
11101 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
11102
11103 * chars.h
11104 (SCM_ICHRP): deprecation expired - removed.
11105 (SCM_ICHR): deprecation expired - removed.
11106 (SCM_MAKICHR): deprecation expired - removed.
11107
11108 * ports.h
11109 (SCM_INPORTP): deprecation expired - removed.
11110 (SCM_OUTPORTP): deprecation expired - removed.
11111
11112 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
11113
11114 * modules.c (scm_module_type): New.
11115 (scm_post_boot_init_modules): Initialize from Scheme value.
11116 (the_module, scm_current_module, scm_init_modules): the_module is
11117 now a C only fluid.
11118 (scm_current_module): Export to Scheme.
11119 (scm_set_current_module): Do not call out to Scheme, do all the
11120 work in C. Export procedure to Scheme. Only accept modules, `#f'
11121 is no longer valid as the current module. Only set
11122 scm_top_level_lookup_closure_var and scm_system_transformer when
11123 they are not deprecated.
11124 (scm_module_transformer, scm_current_module_transformer): New.
11125
11126 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
11127 scm_current_module_transformer, scm_module_transformer): New.
11128
11129 * gh_data.c: Removed FIXME comment about gh_lookup returning
11130 SCM_UNDEFINED. That's the right thing to do.
11131
11132 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
11133 into the conditionally compiled sections.
11134 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
11135 scm_current_module_transformer instead of scm_system_transformer.
11136 * init.c (start_stack): Move initialization of
11137 scm_system_transformer to the deprecated section.
11138
11139 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
11140
11141 * throw.c (scm_throw): Correct docstring.
11142
11143 2001-04-22 Gary Houston <ghouston@arglist.com>
11144
11145 * socket.c: attempted to improve the docstrings slightly.
11146
11147 * net_db.c: remove bogus "close" declaration.
11148 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
11149 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
11150 moved to socket.c.
11151 * net_db.h: declarations moved too.
11152
11153 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
11154 long.
11155 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
11156 (VALIDATE_INET6): new macro.
11157 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
11158 inet-pton and inet-ntop.
11159 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
11160 (scm_addr_vector): use ipv6_net_to_num.
11161
11162 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11163
11164 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
11165 smob number explicitly. Use SCM_TC2SMOBNUM instead.
11166
11167 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
11168 when compiled in debug mode.
11169
11170 (scm_gc_sweep): Only call smob's free function if it is defined.
11171
11172 * print.c (scm_iprin1): No need to check for validity of smob
11173 type or existence of print function.
11174
11175 * smob.[ch] (scm_smobs): Made into a fixed size global array.
11176 Resizing will not work well with preemptive threading.
11177
11178 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
11179
11180 (scm_make_smob_type): Extracted initialization of smob
11181 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
11182 of the critical section.
11183
11184 (scm_smob_prehistory): Initialize all smob descriptors. By
11185 default, don't assign a smob free function: Most smob types don't
11186 need one.
11187
11188 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
11189
11190 2001-04-21 Gary Houston <ghouston@arglist.com>
11191
11192 * socket.c (FLIP_NET_HOST_128): new macro.
11193 (scm_fill_sockaddr): use new macro.
11194 (scm_addr_vector): completed IPv6 address support. added const
11195 to the address parameter.
11196
11197 2001-04-20 Gary Houston <ghouston@arglist.com>
11198
11199 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11200 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11201 is defined.
11202 (scm_addr_vector): use a switch instead of multiple if statements.
11203 Add support for IPv6 (incomplete) .
11204 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11205
11206 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11207
11208 * struct.c (scm_free_structs): Only pairs may be accessed with
11209 SCM_C[AD]R.
11210
11211 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11212
11213 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11214
11215 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11216 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11217 parentheses in order to get the correct associativity.
11218
11219 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11220
11221 * unif.c (scm_array_to_list): Added missing handling of arrays of
11222 bytes. Thanks to Masao Uebayashi for the bug report.
11223
11224 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11225
11226 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11227 consistently.
11228
11229 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11230
11231 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11232
11233 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11234 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11235 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11236 SCM_CLOSURE_FORMALS.
11237
11238 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11239 (scm_i_procedure_arity): Prefer stronger predicates like
11240 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11241
11242 * macros.c (macro_print): Extracted macro printing code from
11243 print.c and simplified it.
11244
11245 (scm_macro_type): Use SCM_MACRO_TYPE;
11246
11247 (scm_init_macros): Use macro_print for printing macros.
11248
11249 * print.c (scm_print_opts): Improved option documentation.
11250
11251 (scm_iprin1): Extracted printing of macros to macros.c.
11252 Simplified printing of ordinary closures.
11253
11254 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11255 Martin Grabmueller for the bug report.
11256
11257 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11258
11259 This patch eliminates some further applications of SCM_C[AD]R to
11260 non pair cells.
11261
11262 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11263 never been applied to real pairs.
11264
11265 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11266
11267 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11268
11269 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11270 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11271 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11272
11273 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11274 Added.
11275
11276 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11277 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11278
11279 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11280 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11281 SCM_SET{AND,OR}_CAR.
11282
11283 2001-04-17 Gary Houston <ghouston@arglist.com>
11284
11285 * some initial support for IPv6:
11286
11287 * socket.c (scm_fill_sockaddr): improve the argument validation.
11288 don't allocate memory until all args are checked. instead of
11289 unconditional memset of soka, try setting sin_len to 0 if
11290 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11291 (scm_socket, scm_connect): extend docstrings for IPv6.
11292 (scm_init_socket): intern AF_INET6 and PF_INET6.
11293
11294 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11295
11296 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11297 matches SCM_DEFER_INTS at the beginning of the function.
11298
11299 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11300
11301 * gc.c (scm_igc): Unconditionally call
11302 SCM_CRITICAL_SECTION_START/END.
11303
11304 * fluids.c (next_fluid_num): Unconditionally call
11305 SCM_CRITICAL_SECTION_START/END.
11306 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11307
11308 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11309 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11310 Removed.
11311
11312 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11313 Defined as nothing for the case of !defined(USE_THREADS).
11314 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11315 Removed.
11316 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11317 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11318 LINE.
11319 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11320 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11321 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11322 SCM_CRITICAL_SECTION_START/END.
11323 (SCM_REALLOW_INTS: Bug fix. Don't call
11324 SCM_THREAD_SWITCHING_CODE.
11325 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11326 SCM_THREAD_SWITCHING_CODE directly.
11327 (SCM_ENTER_A_SECTION): Unconditionally use
11328 SCM_CRITICAL_SECTION_START/END. (was:
11329 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11330
11331 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11332
11333 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11334 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11335 allowed to explicitly set this macro via the CFLAGS variable
11336 during make.
11337
11338 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11339 (SCM_THREAD_CRITICAL_SECTION_START,
11340 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11341 SCM_THREAD_CRITICAL_SECTION_START/END to
11342 SCM_CRITICAL_SECTION_START/END.
11343
11344 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11345
11346 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11347 instead of bzero.
11348
11349 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11350 (MISSING_BZERO_DECL): Remove the declaration.
11351
11352 Thanks to NIIBE Yutaka.
11353
11354 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11355
11356 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11357 goops module should be registered in order to work for an
11358 application which uses libguile statically linked.)
11359
11360 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11361
11362 * numbers.[ch] (scm_num2long, scm_num2long_long,
11363 scm_num2ulong_long, scm_num2ulong): Argument position is an
11364 unsigned integer.
11365
11366 * environments.c (eval_environment_folder,
11367 import_environment_folder), gh_data.c (gh_scm2longs,
11368 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11369 for integers and pointers, respectively.
11370
11371 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11372 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11373 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11374 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11375
11376 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11377 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11378 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11379 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11380 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11381 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11382
11383 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11384
11385 * strings.c (scm_read_only_string_p): Update docstring to reflect
11386 current (non-)usage of "read only" strings.
11387 (scm_make_shared_substring): Clarify docstring by changing
11388 "semantics" to "arguments".
11389
11390 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11391
11392 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11393 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11394 improvements.
11395
11396 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11397
11398 The following changes make the documentation more consistent.
11399
11400 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11401 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11402 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11403 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11404 ... @end lisp.
11405
11406 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11407 (scm_array_dimensions, scm_make_shared_array),
11408 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11409 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11410 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11411 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11412 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11413 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11414 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11415 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11416 @example ... @end example to @lisp ... @end lisp.
11417
11418 * weaks.c (scm_weak_vector): Corrected docstring.
11419
11420 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11421 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11422 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11423 (scm_hashx_set_x, scm_hashx_get_handle),
11424 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11425 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11426 vectors.c (scm_vector_fill_x), strings.c
11427 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11428 objprop.c (scm_set_object_properties_x):
11429 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11430 strports.c (scm_call_with_input_string), ports.c
11431 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11432 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11433 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11434 (scm_make_weak_vector,scm_weak_vector_p),
11435 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11436 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11437 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11438 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11439 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11440 Made parameter names match documentation by renaming parameters
11441 and/or fixing docstrings.
11442
11443 * numbers.c (scm_ash): Corrected Texinfo markup.
11444
11445 * strop.c (scm_string_index, scm_string_rindex),
11446 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11447
11448 * vports.c (scm_make_soft_port), unif.c
11449 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11450 (scm_dimensions_to_uniform_array, scm_transpose_array),
11451 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11452 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11453 (scm_array_to_list, scm_list_to_uniform_array),
11454 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11455 (scm_open_input_string, scm_open_output_string),
11456 (scm_get_output_string), strop.c (scm_string_copy),
11457 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11458 (scm_get_internal_real_time, scm_times),
11459 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11460 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11461 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11462 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11463 simpos.c (scm_system), random.c (scm_random_uniform),
11464 (scm_random_normal, scm_random_exp), ramap.c
11465 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11466 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11467 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11468 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11469 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11470 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11471 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11472 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11473 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11474 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11475 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11476 (scm_integer_expt, scm_bit_extract, scm_logcount),
11477 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11478 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11479 (scm_interaction_environment), macros.c (scm_makacro),
11480 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11481 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11482 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11483 (scm_fluid_ref), filesys.c (scm_open_fdes),
11484 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11485 Docstring correction: `Returns' -> `Return'
11486
11487 * gc.c (scm_set_debug_cell_accesses_x):
11488 (s_scm_gc_set_debug_check_freelist_x):
11489 * fluids.c (scm_fluid_p): Added texinfo markup.
11490
11491 * error.c (scm_strerror): Made docstring more precise.
11492
11493 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11494 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11495 (scm_symbol_p, scm_symbol_to_string), strorder.c
11496 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11497 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11498 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11499 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11500 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11501
11502 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11503
11504 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11505 mode, as suggested by Michael Livshin.
11506
11507 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11508
11509 * backtrace.c (display_backtrace_body): since the `print_state'
11510 variable is not used (instead its data field is used directly as
11511 `pstate'), protect it from the hungry compiler optimizations.
11512 thanks to Bill Schottstaedt for the report.
11513
11514 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11515
11516 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11517 It is only defined and used if guile is compiled with
11518 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11519 let cells with a free_cell type tag be visible outside of the
11520 garbage collector when in debug mode.
11521
11522 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11523
11524 (scm_assert_cell_valid): Use a local static variable to avoid
11525 recursion.
11526
11527 (MARK): Only check for rogue cell pointers in debug mode. Use
11528 scm_cellp for this purpose and place all checks for rogue pointers
11529 into that function. Further, since due to conservative scanning
11530 we may encounter free cells during marking, don't use the standard
11531 cell type accessor macro to determine the cell type.
11532
11533 (scm_cellp): Check if the cell pointer actually points into a
11534 card header.
11535
11536 (scm_init_gc): Initalize scm_tc16_allocated.
11537
11538 * gc.h (GCH): Renamed to SCM_GC_H.
11539
11540 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11541 might be unnecessary, but I feel better this way :-)
11542
11543 (SCM_GC_CELL_TYPE): New macro.
11544
11545 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11546 in guile, and it is unlikely that they will be applied to real
11547 pairs anyway.
11548
11549 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11550
11551 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11552 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11553
11554 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11555 make sure that in debug mode no free cell will ever be visible
11556 outside of the garbage collector.
11557
11558 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11559
11560 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11561 values.
11562
11563 * async.c (scm_system_async), variable.c (scm_make_variable,
11564 scm_make_undefined_variable): Use scm_cons to create a pair.
11565
11566 * debug.c (scm_reverse_lookup): Perform proper type checking.
11567 Remove suspicious use of SCM_SLOPPY_CONSP.
11568
11569 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11570 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11571 the corresponding optimization.
11572
11573 * eval.c (iqq): Use proper type check.
11574
11575 (scm_m_expand_body): Remove redundant type checks.
11576
11577 (promise_print): Don't access promise cells as pairs.
11578
11579 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11580 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11581 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11582 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11583 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11584
11585 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11586 (scm_iprin1): Use new macro predicate and accessors.
11587
11588 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11589 in macros.h.
11590
11591 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11592 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11593 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11594 SCM_VARIABLE_H. Even the macros that are used to inhibit
11595 including a header file twice should be in the SCM_ namespace.
11596
11597 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11598 properties.c (scm_primitive_property_ref,
11599 scm_primitive_property_del_x): Prefer stronger predicates like
11600 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11601
11602 * gc.c (MARK): Use proper macros to access procedure-with-setter
11603 cell elements and closure cell elements.
11604
11605 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11606 access free cells as pairs.
11607
11608 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11609 no hashtab entry is found.
11610
11611 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11612 SCM_CLR_PORT_OPEN_FLAG.
11613
11614 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11615 use SCM_SET_C[AD]R for uninitialized cells.
11616
11617 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11618 If the hashtable has no slots, return #f instead of '(). This
11619 unifies the return value with most assoc-functions.
11620
11621 (scm_hash_fn_ref): Use proper type check.
11622
11623 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11624 Removed references to non-existing functions from documentation.
11625
11626 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11627 access keyword cell elements.
11628
11629 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11630 macros.
11631
11632 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11633
11634 * print.c (scm_iprlist): Added comment. Improved loop
11635 conditions.
11636
11637 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11638 pairs.
11639
11640 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11641
11642 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11643
11644 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11645 cells as pairs.
11646
11647 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11648 scm_variable_set_x): Use proper macros to access variable cell
11649 elements.
11650
11651 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11652
11653 * variable.h (SCM_VARVCELL): Don't access variable cells as
11654 pairs.
11655
11656 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11657 added FIXME comment, removed register specifier.
11658
11659 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11660
11661 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11662 * init.c (scm_init_guile_1): Don't init goopscore module.
11663
11664 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11665
11666 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11667
11668 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11669
11670 * strop.c (scm_string_to_list): Fixed docstring markup.
11671 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11672 (scm_string_downcase, scm_string_capitalize_x),
11673 (scm_string_capitalize): Rewrote and corrected docstrings.
11674 (scm_string_ci_to_symbol): Made docstring more explicit.
11675
11676 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11677
11678 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11679 eval.c can use it.
11680 (scm_call_with_values): Removed.
11681 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11682 so that it can be exported.
11683 (scm_call_with_values): Removed.
11684
11685 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11686 * eval.c: Include "libguile/values.h"
11687 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11688 New.
11689 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11690 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11691 New delcarations to support above change.
11692
11693 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11694 errors with last change.
11695
11696 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11697
11698 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11699 scm_i_eval): Moved the application of the system transformer from
11700 scm_i_eval to scm_primitive_eval.
11701
11702 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11703
11704 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11705
11706 * strop.c (scm_string_index): Fix docstring line break
11707 regression.
11708
11709 * list.c (scm_cons_star): Fix docstring typo.
11710
11711 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11712
11713 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11714 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11715 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11716 scm_make_string, scm_string_append), strports.c (st_resize_port,
11717 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11718 scm_makstr with calls to scm_allocate_string.
11719
11720 * strings.[ch] (scm_allocate_string): New function.
11721
11722 * strings.[ch] (scm_makstr): Deprecated.
11723
11724 2001-03-18 Gary Houston <ghouston@arglist.com>
11725
11726 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11727 NULL. rewrote the docstring.
11728 (scm_mkstemp): new procedure implementing "mkstemp!".
11729 * posix.h: declare scm_mkstemp.
11730
11731 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11732 normally it would be found in netdb.h.
11733
11734 2001-03-17 Gary Houston <ghouston@arglist.com>
11735
11736 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11737 warning when HAVE_ARRAYS is not defined. move len too.
11738
11739 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11740 (EXTRA_DOT_X_FILES): let configure set the value.
11741 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11742
11743 * gc.c (scm_must_malloc): changed the comment explaining when
11744 scm_must variants of malloc/free etc., should be used, based on
11745 explanation from Dirk Herrmann.
11746 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11747 string with procedure name. use scm_must_malloc instead of malloc.
11748 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11749 of malloc/free.
11750 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11751 scm_ungetc): use scm_must variants of malloc/realloc/free.
11752 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11753
11754 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11755
11756 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11757 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11758 scm_wrong_type_arg instead.
11759
11760 (SCM_WNA): Deprecated.
11761
11762 * error.[ch] (scm_wta): Deprecated.
11763
11764 * numbers.c (s_i_log): Minor comment fix.
11765
11766 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11767 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11768 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11769 wrong-num-args or misc errors.
11770
11771 * unif.c (scm_make_shared_array, scm_transpose_array,
11772 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11773 Validate the rest argument (note: this is only done when guile is
11774 built with SCM_DEBUG_REST_ARGUMENT=1)
11775
11776 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11777 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11778
11779 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11780 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11781
11782 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11783
11784 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11785 instead of scm_wrong_num_args.
11786
11787 * coop-threads.c: Don't include libguile/strings.h. (Was only
11788 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11789
11790 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11791 wrong-num-args errors.
11792
11793 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11794
11795 * error.[ch] (scm_error_num_args_subr): New function.
11796
11797 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11798
11799 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11800 (scm_length, scm_append, scm_reverse, scm_list_ref),
11801 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11802 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11803 (scm_delete1_x), gc.c (scm_map_free_list),
11804 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11805 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11806 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11807 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11808 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11809 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11810 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11811
11812 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11813 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11814 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11815 symbols.c (scm_symbol_interned_p), numbers.c
11816 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11817 markup.
11818
11819 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11820
11821 * snarf.h (SCM_CONST_LONG): Deprecated.
11822 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11823
11824 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11825
11826 * numbers.c (scm_num2ulong): Check that a bignum is positive
11827 before looking at the magnitude. Correctly check for overflow
11828 during conversion.
11829 (scm_num2long_long): Likewise.
11830 (scm_num2ulong_long): New.
11831 (ULONG_LONG_MAX): Define if not already defined.
11832 * numbers.h: (scm_num2ulong_long): New prototype.
11833
11834 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11835
11836 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11837
11838 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11839 (SCM_OPOUTSTRPORTP): New predicate macros.
11840 (scm_open_input_string, scm_open_output_string),
11841 (scm_get_output_string): New prototypes.
11842
11843 * strports.c (scm_open_input_string, scm_open_output_string),
11844 (scm_get_output_string): New procedures (SRFI-6 compliant).
11845 Made scm_tc16_strport non-static.
11846
11847 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11848
11849 * macros.h (SCM_ASSYNT): Removed unused object argument from
11850 signature.
11851
11852 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11853 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11854 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11855 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11856 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11857 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11858 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11859 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11860 scm_m_atdispatch): Removed unused object argument from call to
11861 SCM_ASSYNT.
11862
11863 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11864
11865 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11866 const int* to reflect that the input array of integers remains
11867 unchanged. Thanks to Brett Viren for the hint.
11868
11869 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11870
11871 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11872 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11873 in various places.
11874 (gh_scm2newstr, gh_symbol2newstr): Change call to
11875 scm_must_malloc() to malloc(), because user-free()able memory is
11876 allocated.
11877
11878 * gc.c: Added declaration of `scm_debug_check_freelist'.
11879
11880 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11881
11882 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11883
11884 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11885
11886 * strports.c (scm_object_to_string): New procedure.
11887 (scm_strprint_obj): Deprecated.
11888 * strports.h: Reflect the changes.
11889
11890 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11891
11892 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11893
11894 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11895 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11896 SCM_ASSYNT to check for correct argument types. Either use some
11897 SCM_VALIDATE_* macro or an explicit test.
11898
11899 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11900 misc-errors.
11901
11902 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11903 instead of calling scm_wta.
11904
11905 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11906
11907 * load.c (scm_primitive_load, scm_primitive_load_path),
11908 (scm_sys_search_load_path): Corrected docstrings (file ->
11909 filename).
11910
11911 * eval.c (scm_force): Added texinfo markup to docstring.
11912 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11913
11914 * debug-malloc.c: Reinserted #include <stdio.h>.
11915
11916 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11917
11918 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11919
11920 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11921 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11922 Use SCM_LISTn instead of scm_listify.
11923
11924 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11925
11926 * _scm.h: Removed #include <errno.h>.
11927
11928 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11929 errno variable (can be a macro on some systems, for example when
11930 using linux libc with threads).
11931
11932 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11933 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11934 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11935 #include <errno.h> in these 20 out of 100 files.
11936
11937 2001-03-10 Gary Houston <ghouston@arglist.com>
11938
11939 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11940 not already defined.
11941
11942 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11943
11944 * coop.c: Inserted #include <stdio.h>.
11945
11946 * iselect.c: Reinserted #include <stdio.h>.
11947
11948 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11949
11950 * posix.c: Replaced `#define' of __USE_XOPEN right before
11951 including unistd.h with a define of _GNU_SOURCE at the very top of
11952 the file.
11953
11954 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11955
11956 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11957 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11958 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11959 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11960 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11961 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11962 print.c, procprop.c, procs.c, properties.c, ramap.c,
11963 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11964 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11965 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11966 Remove #include <stdio.h>
11967 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11968
11969 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11970
11971 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11972
11973 * posix.c (scm_gethostname): Set initial name length to 256 for
11974 Solaris.
11975
11976 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11977
11978 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11979 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11980 (scm_sethostname, scm_gethostname): New prototypes.
11981
11982 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11983 <sys/file.h>, if present.
11984 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11985 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11986 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11987 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11988 (scm_sethostname, scm_gethostname): New procedures.
11989
11990 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11991
11992 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11993 not optional (ii) "recommend" spelling correction.
11994
11995 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11996
11997 * ramap.c (racp): Removed optimization which caused array copying
11998 to fail if the two arrays shared storage. Re-inserted the IVDEP
11999 macros removed in the change of 2000-03-09. (Don't really have a
12000 complete grasp of what they are for, but they seem to be necessary
12001 on Crays. This needs testing!) Thanks to Miroslav Silovic.
12002
12003 * hash.c (scm_string_hash): Don't downcase characters.
12004
12005 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12006
12007 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
12008 size from 277 --> 1009.
12009
12010 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
12011 function.
12012
12013 * coop-threads.c: Fixed change of 2001-03-06.
12014
12015 * validate.h: Code formatting.
12016
12017 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
12018
12019 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
12020 (*.doc): Add dependency on guile-snarf.awk.in.
12021
12022 * guile-snarf.awk.in: Neglect spaces at the end of
12023 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
12024 middle of docstrings. (To avoid the problem with gcc-2.96.)
12025
12026 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
12027
12028 * coop-threads.c (scm_call_with_new_thread), load.c
12029 (scm_primitive_load, scm_sys_search_load_path), random.c
12030 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
12031 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
12032 (potentially) issue a scm-misc-error or wrong-num-args error
12033 message.
12034
12035 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
12036 about the expected type with the wrong-type-arg error message.
12037
12038 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
12039 a C level bug that can't be fixed from scheme anyway.
12040
12041 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12042
12043 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
12044 Duplicate bindings are OK in a let* since a let* is semantically
12045 equivalent to a nested set of let:s.
12046
12047 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12048
12049 * print.c (scm_print_options): Fixed texinfo in docstring.
12050
12051 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
12052 the underlying functions getservent, getprotoent or getnetent
12053 return NULL instead of signalling an error.
12054
12055 2001-03-04 Gary Houston <ghouston@arglist.com>
12056
12057 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
12058 taking an unexpectedly large filename for an AF_UNIX socket from
12059 bind/connect/sendto (thanks to Martin Grabmueller).
12060
12061 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
12062 former and adjusted the latter.
12063 (scm_socket, scm_socketpair): cosmetic changes.
12064 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
12065 size_t as socklen_t substitute. don't restrict args/return values
12066 to INUM: allow full range of int or size_t.
12067 (scm_fill_sockaddr): check arguments before allocating memory, to
12068 avoid leakage. use malloc, not scm_must_malloc.
12069 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
12070 substitute. free the sockaddr structure before throwing an error.
12071 (scm_init_add_buffer): procedure removed, together with its static
12072 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
12073 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
12074 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
12075 scm_sendto): use a local buffer instead of scm_addr_buffer.
12076 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
12077 not size_t.
12078 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
12079 call to detect whether recvfrom could be bothered to set the address.
12080 (scm_init_socket): don't call scm_init_addr_buffer.
12081
12082 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12083
12084 * debug.c (scm_procedure_source, scm_procedure_environment),
12085 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
12086 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
12087 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
12088 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
12089 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
12090 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
12091 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
12092 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
12093 scm_array_to_list, scm_array_prototype), validate.h
12094 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
12095 scm_misc_error or scm_wrong_type_arg instead.
12096
12097 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
12098
12099 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12100
12101 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
12102 (scm_sys_tag_body): Added.
12103
12104 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12105
12106 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
12107 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
12108 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
12109 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
12110 options.c (scm_options), ports.c (scm_remove_from_port_table),
12111 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
12112 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
12113 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
12114 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
12115 instead.
12116
12117 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12118
12119 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
12120
12121 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
12122
12123 * eval.c (scm_s_duplicate_bindings): New error message.
12124 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
12125
12126 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
12127
12128 * eval.h (SCM_EVALIM2): New macro. Use it when a
12129 immediate, literal constant should be evaluated.
12130 * eval.c (scm_s_duplicate_formals): New error message string.
12131 (scm_c_improper_memq): New function.
12132 (scm_m_lambda): Check for duplicate arguments.
12133 (scm_ceval, scm_deval): When executing a body: only cons a new
12134 toplevel environment frame when it is different from the
12135 existing one; use EVALCAR instead of SIDEVAL so that we can properly
12136 check for empty combinations; use SCM_EVALIM2 for the same reason
12137 in the non-toplevel loop.
12138 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
12139 New labels with the meaning of their non-"nontoplevel" partners,
12140 but they are used when it is known that the body is not evaluated at
12141 top-level.
12142 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
12143 reporting for empty combinations.
12144
12145 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
12146
12147 * Remove dump facilities.
12148 * dump.c, dump.h: Removed.
12149 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
12150 * init.c: Remove #include "libguile/dump.h".
12151 (scm_init_guile_1): Remove scm_init_dump.
12152 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
12153 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
12154 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
12155 (scm_set_smob_dump, scm_set_smob_undump): Removed.
12156
12157 * keywords.c: Remove #include "libguile/dump.h".
12158 (keyword_dump, keyword_undump): Removed.
12159 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
12160
12161 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12162
12163 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
12164 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
12165 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
12166 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
12167 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
12168 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
12169 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
12170 to @code{} as the texinfo manual recommends, converted the
12171 examples to use a @lisp{}-environment.
12172
12173 * strports.c (scm_eval_string): Cleaned up the docstring.
12174
12175 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
12176 markup.
12177
12178 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
12179 (scm_number_to_string, scm_string_to_number, scm_number_p)
12180 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
12181 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
12182 (scm_ash): Added texinfo markup and removed obsolete @refill.
12183 (scm_gr_p): Corrected comment.
12184 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
12185 docstring) comments.
12186 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
12187 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
12188 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
12189 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
12190 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
12191 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
12192 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
12193 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
12194
12195 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
12196
12197 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
12198 (Obviously nobody compiles with SCM_RECKLESS defined...)
12199
12200 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12201
12202 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12203
12204 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12205
12206 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12207
12208 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12209
12210 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12211 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12212 since use of `z' suggests that the arguments may be complex.
12213
12214 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12215 typos.
12216
12217 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12218
12219 * dump.c (scm_binary_write, scm_binary_read), eval.c
12220 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12221 scm_guardian_greedy_p, scm_make_guardian), fports.c
12222 (scm_file_port_p): Minor docstring fixes.
12223
12224 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12225
12226 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12227
12228 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12229 scm_i_eval.
12230 (make_class_from_template): Do not bother to set the current
12231 module around the call to DEFVAR, scm_eval takes care of that.
12232 (scm_init_goops): Make scm_module_goops and
12233 scm_goops_lookup_closure permanent objects.
12234
12235 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12236 top level, create a fresh top-level environment for each
12237 expression instead of mutating the exisint frame. This is
12238 important when that frame is closed over.
12239
12240 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12241 SCM_DIGSPERLONG instead of DIGSPERLONG.
12242
12243 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12244
12245 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12246 before applying arrow procedure in `cond' and before applying
12247 receiver procedure in call-with-current-continuation.
12248 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12249 macro. The argument is expanded more than one time.
12250
12251 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12252 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12253
12254 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12255
12256 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12257 notice and license.
12258
12259 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12260
12261 * variable.c (scm_make_variable, scm_make_undefined_variable)
12262 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12263 (scm_variable_bound_p), values.c (scm_values)
12264 (scm_call_with_values), unif.c (scm_bit_count)
12265 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12266 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12267 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12268 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12269 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12270 (scm_copy_random_state, scm_random), print.c (scm_newline)
12271 (scm_write_char, scm_simple_format), debug-malloc.c
12272 (scm_malloc_stats), environments.c (scm_environment_p)
12273 (scm_environment_bound_p, scm_environment_ref)
12274 (scm_environment_fold, scm_environment_define)
12275 (scm_environment_undefine, scm_environment_set_x)
12276 (scm_environment_cell, scm_environment_observe)
12277 (scm_environment_observe_weak, scm_environment_unobserve)
12278 (scm_make_eval_environment, scm_eval_environment_p)
12279 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12280 (scm_eval_environment_imported)
12281 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12282 (scm_import_environment_p, scm_import_environment_imports)
12283 (scm_import_environment_set_imports_x, scm_make_export_environment)
12284 (scm_export_environment_p, scm_export_environment_private)
12285 (scm_export_environment_set_private_x)
12286 (scm_export_environment_signature)
12287 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12288 Added texinfo markup.
12289
12290 * ports.c (scm_drain_input): Lowercased argument to @var.
12291 (scm_current_input_port, scm_current_output_port): Filled in
12292 missing explanation.
12293 (scm_current_load_port, scm_set_current_output_port)
12294 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12295 Added texinfo markup.
12296
12297 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12298 (scm_release_arbiter): Added texinfo markup to docstrings.
12299 Changed `Returns' to `Return'.
12300 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12301
12302 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12303
12304 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12305 by doubling them to `@@'.
12306
12307 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12308
12309 * numbers.c (scm_lognot), random.c (scm_random,
12310 scm_random_normal, scm_random_solid_sphere_x,
12311 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12312 scm_random_exp), dynwind.c
12313 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12314
12315 * goops.c (scm_sys_initialize_object, scm_instance_p,
12316 scm_class_name, scm_class_precedence_list, scm_class_slots,
12317 scm_class_environment, scm_generic_function_name,
12318 scm_generic_function_methods, scm_method_generic_function,
12319 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12320 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12321 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12322 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12323 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12324 scm_class_direct_supers, scm_class_direct_slots,
12325 scm_class_direct_subclasses, scm_class_direct_methods,
12326 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12327 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12328 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12329 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12330 scm_memoized_environment, scm_procedure_name,
12331 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12332 objects.c
12333 (scm_class_of, scm_entity_p, scm_operator_p,
12334 scm_set_object_procedure_x, scm_object_procedure,
12335 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12336 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12337 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12338 scm_hook_to_list), lang.c
12339 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12340 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12341 (scm_print_options, scm_port_with_print_state,
12342 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12343 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12344 scm_make_procedure_with_setter, scm_procedure), throw.c
12345 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12346 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12347 scm_stack_ref, scm_stack_length, scm_frame_p,
12348 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12349 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12350 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12351 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12352 (scm_dirname, scm_basename), dynwind.c
12353 (scm_wind_chain), read.c (scm_read_options, scm_read,
12354 scm_read_hash_extend), gc.c
12355 (scm_unhash_name), eval.c (scm_eval_options_interface,
12356 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12357 (scm_display_error, scm_set_print_params_x,
12358 scm_display_application, scm_display_backtrace, scm_backtrace),
12359 async.c (scm_async, scm_system_async, scm_async_mark,
12360 scm_system_async_mark, scm_run_asyncs, scm_noop,
12361 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12362 scm_mask_signals): Added docstrings.
12363
12364 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12365
12366 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12367 address of car/cdr. (Thanks to Dirk Herrmann)
12368 Use scm_sizet to obtain the length of strings.
12369 (Thanks to Matthias Koeppe)
12370
12371 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12372
12373 * symbols.c (scm_mem2symbol): Put a empty statement after the
12374 next_symbol label. This is mandated by ANSI, appearantly.
12375
12376 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12377
12378 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12379 sense to compile for a specific kernel version. Do not include
12380 <asm/signal.h> while defining __KERNEL__. This hack should no
12381 longer be needed and caused problems.
12382
12383 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12384
12385 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12386 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12387 can not deal with immediates.
12388
12389 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12390
12391 * list.c (scm_list_copy): Validate the first argument.
12392
12393 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12394
12395 Fix evaluator so that top-level expressions are correctly
12396 evaluated with respect to the module system.
12397
12398 * modules.h. modules.c (scm_current_module_lookup_closure): New
12399 function.
12400
12401 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12402 prototypes.
12403 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12404 names to better reflect their meaning.
12405
12406 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12407 evaluated at top-level and synronize lookup closure before
12408 executing every subform.
12409 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12410 (scm_eval_x, scm_eval): Reimplement in terms of
12411 scm_primitive_eval_x and scm_primitive_eval, respectively.
12412
12413 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12414
12415 * macros.c (scm_macro_name, scm_macro_transformer): Use
12416 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12417 Thanks!
12418
12419 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12420
12421 * dump.c (scm_store_bytes): Store data size before data.
12422 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12423 * dump.h (scm_restore_bytes): Updated.
12424
12425 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12426
12427 * dump.c: Use double cells for update schedule.
12428
12429 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12430
12431 * ports.c (scm_unread_char): Take an optional argument.
12432
12433 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12434
12435 * modules.h (scm_selected_module, scm_current_module): Renamed
12436 scm_selected_module to scm_current_module to synchronize Scheme
12437 and C names.
12438 (scm_select_module, scm_set_current_module): Likewise. Changed
12439 all uses.
12440
12441 * ports.c (scm_port_for_each): Make a snapshot of the port table
12442 before iterating over it. The table might change while the user
12443 code is running. With the snapshot, the user can depend on the
12444 fact that each port that existed at the start of the iteration is
12445 encountered exactly once. (ice-9 popen) depends on this.
12446
12447 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12448
12449 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12450
12451 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12452 range checking for the size parameter. Thanks to Martin
12453 Grabmueller for the hint.
12454
12455 (scm_makstr): Reordered string initialization to make interrupt
12456 deferring unnecessary.
12457
12458 * vectors.c (scm_make_vector): Fixed range checking.
12459
12460 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12461
12462 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12463
12464 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12465 checking of the size parameter for type correctness and valid
12466 range. Thanks to Rob Browning for reporting the problem. Instead
12467 of deferring interrupts, scm_remember_upto_here_1 is used.
12468
12469 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12470
12471 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12472 (scm_dump_cell_update): Removed.
12473 (scm_dump_update): Renamed from scm_dump_object_update.
12474 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12475 a pointer instead of returning a value.
12476 * keywords.c (keyword_undump): Updated.
12477
12478 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12479
12480 * dump.c, dump.h: Modified a lot.
12481 (SCM_DUMP_COOKIE): Version 0.1
12482 (scm_dump_mark): Removed.
12483 (scm_restore_cell_object, scm_store_cell_object): New functions.
12484
12485 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12486 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12487 New slots: dump, undump.
12488 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12489 Updated.
12490
12491 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12492 (keyword_undump): Renamed from keyword_alloc.
12493 (scm_init_keywords): Set keyword_dump and keyword_undump.
12494
12495 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12496
12497 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12498 the deprecated SCM_DOUBLE_CELLP.
12499
12500 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12501
12502 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12503
12504 * dump.c, dump.h: New files.
12505 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12506 * init.c: #include "libguile/dump.h".
12507 (scm_init_guile_1): Call scm_init_dump.
12508 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12509 dump_dealloc, dump_store, undump_alloc, undump_restore,
12510 undump_init.
12511 * smob.c (scm_make_smob_type): Init the new slots.
12512 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12513 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12514
12515 * keywords.c: #include "libguile/dump.h".
12516 (keyword_dealloc, keyword_alloc): New functions.
12517 (scm_init_keywords): Set smob_dump and smob_undump.
12518
12519 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12520
12521 * vectors.c (scm_c_make_vector): New function.
12522 * vectors.h (scm_c_make_vector): Declared.
12523 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12524 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12525 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12526 (scm_make_method_cache, scm_i_vector2list,
12527 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12528 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12529 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12530 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12531 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12532 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12533 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12534 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12535
12536 * hashtab.c (scm_c_make_hash_table): New function.
12537 * hashtab.h (scm_c_make_hash_table): Declared.
12538 * environments.c (scm_make_leaf_environment,
12539 scm_make_eval_environment), gc.c (scm_init_storage),
12540 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12541 Use scm_c_make_hash_table.
12542
12543 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12544
12545 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12546
12547 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12548
12549 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12550 end of docstring.
12551
12552 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12553 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12554 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12555 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12556 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12557 scm_source_property, scm_set_source_property_x), sort.c
12558 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12559 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12560 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12561 docstrings.
12562
12563 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12564
12565 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12566 really get that arg.
12567
12568 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12569
12570 * goops.c (s_scm_get_keyword): Bug fix.
12571
12572 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12573
12574 The following patch was sent by Martin Grabmueller. It makes sure
12575 that in case of parameter errors the correct function name is
12576 shown, and that parameter types are only checked once.
12577
12578 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12579 string_capitalize_x): New functions. Each one performs the core
12580 functionality of the corresponding scm_* function.
12581
12582 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12583 scm_string_downcase_x, scm_string_downcase,
12584 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12585 parameter checking wrappers of the above functions.
12586
12587 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12588
12589 * continuations.c, dynl.c, keywords.c, load.c: Include
12590 strings.h. Thanks to Bill Schottstaedt for the bug report.
12591
12592 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12593
12594 * backtrace.c (display_header): Make sure that line and column
12595 information is shown independent of whether the port the code was
12596 read from had an associated filename. Thanks to Martin
12597 Grabmueller for providing this patch.
12598
12599 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12600
12601 * fports.[ch] (scm_file_port_p): New primitive.
12602
12603 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12604
12605 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12606 These are now defined in fports.c, strports.c and vports.c.
12607
12608 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12609 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12610 tags.h).
12611
12612 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12613 (scm_make_sfptob): Made static. These return a type code now.
12614
12615 fports.c (scm_init_fports), strports.c (scm_init_strports),
12616 vports.c (scm_init_vports): Create the corresponding port types.
12617
12618 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12619 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12620
12621 * init.c (scm_init_guile_1): Make sure strports are initialized
12622 before gdbint.
12623
12624 * ports.[ch] (scm_make_port_type): Changed the return type to
12625 scm_bits_t.
12626
12627 * ports.c (scm_ports_prehistory): Don't create any port types
12628 here.
12629
12630 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12631 against scm_tc16_fport directly.
12632
12633 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12634
12635 * srcprop.c (scm_set_source_property_x): Fix to handle
12636 (set-source-property! <obj> 'copy <datum>) correctly.
12637
12638 2001-01-24 Gary Houston <ghouston@arglist.com>
12639
12640 * filesys.c (scm_link): docstring fix.
12641 * fports.h (scm_setfileno): obsolete declaration removed.
12642 * posix.c: bogus popen declaration removed.
12643
12644 * rdelim.c: new file, split from ioext.c.
12645 * rdelim.h: new file, split from ioext.h
12646 * Makefile.am: add rdelim.c and related files.
12647 * init.c: call scm_init_rdelim. include rdelim.h.
12648
12649 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12650
12651 This patch was sent by Martin Grabmueller and makes sure that
12652 parameter errors are reported correctly by the lexicographic
12653 ordering predicates.
12654
12655 * strorder.c (string_less_p, string_ci_less_p): New functions.
12656
12657 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12658 functionality into string_less_p, string_ci_less_p respectively.
12659 The remaining code is just a wrapper to do the parameter
12660 checking.
12661
12662 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12663 parameters and call string_less_p instead of scm_string_less_p.
12664
12665 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12666 Check the parameters and call string_less_ci_p instead of
12667 scm_string_ci_less_p.
12668
12669 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12670
12671 This patch modifies scm_display_error to perform parameter
12672 checking. Thanks to Neil Jerram for the bug report.
12673
12674 * backtrace.[ch] (scm_i_display_error): New function.
12675
12676 * backtrace.c (scm_display_error): Added parameter check and
12677 extracted the core functionality into function
12678 scm_i_display_error.
12679
12680 * throw.c (handler_message): Call scm_i_display_error to display
12681 the error message.
12682
12683 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12684
12685 * eval.c (SCM_APPLY): Added # args check for application of
12686 procedures with arity 3. (Thanks to Anders Holst.)
12687
12688 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12689
12690 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12691
12692 (SCM_OPDIRP): Deprecated.
12693
12694 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12695 SCM_OPN.
12696
12697 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12698 Instead, give an explicit error message in case the directory is
12699 closed.
12700
12701 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12702 instead of SCM_OPENP and SCM_CLOSEDP.
12703
12704 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12705
12706 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12707
12708 * eval.c (inner_eval, scm_eval): Move all real functionality into
12709 inner_eval. Avoid to copy the expression twice by inlining some
12710 code from scm_i_eval.
12711
12712 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12713
12714 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12715 now has to be the last clause, as required by R5RS. Thanks to
12716 Martin Grabmueller for the patch.
12717
12718 2001-01-18 Gary Houston <ghouston@arglist.com>
12719
12720 * ioext.c: further simplify scm_read_string_x_partial by defining
12721 a macro SCM_EBLOCK.
12722
12723 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12724
12725 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12726
12727 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12728
12729 * __scm.h: Added comment about architecture and compiler
12730 properties that are required by guile.
12731
12732 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12733 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12734
12735 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12736
12737 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12738
12739 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12740 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12741
12742 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12743
12744 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12745 to the names in limits.h.
12746
12747 * numbers.c (abs_most_negative_fixnum): Added.
12748
12749 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12750 fixnum-min) special case.
12751
12752 (scm_big_and): Fix for negative first parameter.
12753
12754 (scm_bit_extract): Fix for fixnum paramters.
12755 Thanks to Rob Browning for the bug report.
12756
12757 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12758
12759 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12760
12761 * symbols.c (scm_symbol_bound_p): Fixed comment.
12762 Thanks to Chris Cramer.
12763
12764 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12765
12766 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12767 Thanks to Bill Schottstaedt.
12768
12769 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12770
12771 from Matthias Köppe:
12772
12773 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12774 casts its result, so doesn't yield an lvalue per ANSI C.
12775
12776 * goops.c (s_scm_sys_set_object_setter_x): use
12777 SCM_SET_ENTITY_SETTER.
12778 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12779
12780 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12781 its result, so doesn't yield an lvalue per ANSI C.
12782 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12783 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12784 SCM_GC_SET_CARD_FLAGS.
12785 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12786
12787 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12788
12789 2001-01-08 Gary Houston <ghouston@arglist.com>
12790
12791 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12792 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12793 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12794 changes.
12795 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12796 for fdes. if current input port is used, check that it's a file
12797 port.
12798
12799 2001-01-06 Gary Houston <ghouston@arglist.com>
12800
12801 * ioext.c (scm_read_string_x_partial): new procedure, implements
12802 read-string!/partial.
12803 * ports.c (scm_take_from_input_buffers): new procedure used by
12804 scm_read_string_x_partial.
12805 (scm_drain_input): use scm_take_from_input_buffers.
12806
12807 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12808
12809 * validate.h (SCM_VALIDATE_NUMBER): New.
12810
12811 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12812
12813 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12814 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12815 SET_DESTROYED): new defines/macros.
12816 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12817 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12818 (guardian_print): print more info.
12819 (guardian_apply): check if the guardian is destroyed, and throw an
12820 error if so. take one more optional argument `throw_p'.
12821 (scm_guard): depending on the value of `throw_p', return a boolean
12822 result.
12823 (scm_get_one_zombie): remove redundant property test.
12824 (guardian_t): represent the various (currently 3, I hope nothing
12825 more gets added) boolean fields as bit flags.
12826 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12827 (scm_destroy_guardian_x): new procedure.
12828
12829 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12830 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12831
12832 2001-01-01 Gary Houston <ghouston@arglist.com>
12833
12834 * fports.c (fport_write): bugfix: handle short writes for
12835 unbuffered ports too. optimize the buffered case by minimizing
12836 the number of write/flush calls.
12837 (write_all): new helper procedure.
12838
12839 The ChangeLog continues in the file: "ChangeLog-2000"