1 2005-12-14 Neil Jerram <neil@ossau.uklinux.net>
3 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
4 (rather than an uninitialized pointer on the stack).
6 2005-12-07 Marius Vollmer <mvo@zagadka.de>
8 Reported by Bruce Korb:
10 * init.c (invoke_main_func): Don't call exit here. Throws that
11 are only caught by scm_with_guile will bypass us and would cause
12 scm_boot_guile to return erroneously.
13 (scm_boot_guile): Expect scm_with_guile to return and call exit
14 here, passing it an appropriate exit code.
18 * script.c (scm_find_executable): Compile fix -- fgetc returns an
19 unsigned char cast to an int, or -1 for EOS.
21 2005-12-06 Marius Vollmer <mvo@zagadka.de>
23 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
25 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
27 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
28 scm_enter_guile): Removed from public API. See comment at
29 scm_without_guile for the rationale.
31 * scmsigs.c (read_without_guile): New.
32 (signal_delivery_thread): Use it instead of
33 scm_leave_guile/read/scm_enter_guile.
37 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
38 (CEVAL): Evaluate SRFI 61 cond clauses.
40 2005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
42 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
43 This was typically hit when running `gc-live-object-stats' right
46 2005-11-30 Kevin Ryde <user42@zip.com.au>
48 * srfi-13.c (scm_string_append_shared): No copying if just one
49 non-empty string in args.
51 2005-11-26 Kevin Ryde <user42@zip.com.au>
53 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
56 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
59 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
60 scm_malloc returning NULL, it never does that.
61 * putenv.c (putenv): Likewise.
63 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
64 much too big to want to inline.
66 2005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
68 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
69 the value at its top. This fixes a reference leak.
70 (PUSH_REF): Perform `pstate->top++' after calling
71 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
74 2005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
76 * gc.c (scm_weak_vectors): Removed.
78 2005-11-12 Kevin Ryde <user42@zip.com.au>
80 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
83 2005-11-07 Marius Vollmer <mvo@zagadka.de>
85 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
86 SCM_CRITICAL_SECTION_START/END since the code inside the critical
87 section might exit non-locally.
89 2005-11-04 Neil Jerram <neil@ossau.uklinux.net>
91 * eval.c (sym_instead): New symbol.
92 (ENTER_APPLY): Remove optional use of a continuation when making
94 (scm_debug_opts): Change doc for 'cheap option to make clear that
96 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
97 making trap calls, and implement substitution of eval expressions
98 and return values using the values that the trap call handlers
101 * debug.h (SCM_CHEAPTRAPS_P): Removed.
103 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
105 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
106 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
107 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
108 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
109 scm_c_make_socket_address): New functions.
110 * socket.h: Add prototypes.
112 2005-10-24 Kevin Ryde <user42@zip.com.au>
114 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
115 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
116 POSIX spec examples, the latter are not available on for instance
119 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
122 * stime.c (scm_strftime): Update docstring from posix.texi.
124 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
126 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
128 * null-threads.h, pthread-threads.h
129 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
130 (scm_i_pthread_mutexattr_recursive): New.
132 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
133 (scm_i_critical_section_mutex): Do not initialize statically.
134 (scm_threads_prehistory): Initialize
135 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
138 * eval.c (source_mutex): Do not initialiaze statically.
139 (scm_init_eval): Do it here, using
140 scm_i_pthread_mutexattr_recursive.
142 2005-09-05 Marius Vollmer <mvo@zagadka.de>
144 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
147 (scm_print_opts): Added "quote-keywordish-symbols" option.
148 (quote_keywordish_symbol): New, for evaluating the option.
149 (scm_print_symbol_name): Use it.
150 (scm_init_print): Initialize new option to sym_reader.
152 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
154 * eval.c (eval_letrec_inits): New.
155 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
157 2005-08-12 Marius Vollmer <mvo@zagadka.de>
159 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
162 2005-08-12 Kevin Ryde <user42@zip.com.au>
164 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
166 2005-08-06 Kevin Ryde <user42@zip.com.au>
168 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
169 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
170 scm_string_index, scm_string_index_right, scm_string_skip,
171 scm_string_skip_right, scm_string_count, scm_string_map,
172 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
173 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
174 procedures called in loops.
176 2005-08-02 Kevin Ryde <user42@zip.com.au>
178 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
179 avoid lots of copying where previoulsy growing by only 80 bytes at a
182 2005-08-01 Marius Vollmer <mvo@zagadka.de>
184 * modules.h, modules.c (scm_eval_closure_module): Removed, we
185 already have scm_lookup_closure_module, which does the same thing.
187 2005-08-01 Marius Vollmer <mvo@zagadka.de>
189 New marking algorithm for weak hashtables that fixes the problem
190 that references from the non-weak value to the associated weak
191 key (for example) would prevent the entry from ever being dropped.
193 Guardians have been changed back to their original semantics and
194 are no longer greedy and no longer drop cycles.
196 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
197 hashtable and guardian machinery but call the relevant functions
200 * guardians.h, guardians.c, deprecated.h,
201 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
202 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
203 Deprecated and moved into deprecated.[ch].
205 * guardians.h, guardians.c: Mostly rewritten.
206 (scm_i_init_guardians_for_gc,
207 scm_i_identify_inaccessible_guardeds,
208 scm_i_mark_inaccessible_guardeds): New.
209 (scm_make_guardian): Removed greedy_p argument.
211 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
212 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
213 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
214 (scm_weaks_prehistory): Removed.
215 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
216 scm_i_mark_weak_vectors_non_weaks,
217 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
218 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
219 scm_scan_weak_vectors): Removed.
221 * hashtab.h (scm_i_scan_weak_hashtables): New.
222 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
224 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
226 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
227 to latter. Do not scan the alists themselves, this is done by the
228 weak vector code now. Just update the element count.
230 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
231 to latter. The type is now only part of the cell word.
232 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
234 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
236 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
238 Some changes towards making it possible to run Guile on the EM64T
241 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
242 mallocating for (unsigned long *bounds).
244 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
245 scm_t_bits before storing them in the type word.
247 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
250 2005-07-12 Kevin Ryde <user42@zip.com.au>
252 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
253 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
254 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
255 than scm_makfrom0str.
256 Reported by Ken Raeburn.
258 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
259 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
260 returning SCM_GC_CARD_BVEC.
262 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
263 rather than latin-1 acute accent, the latter may not print on all
266 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
267 trailing deletions, so as to return a substring if those are the only
270 2005-07-10 Kevin Ryde <user42@zip.com.au>
272 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
273 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
274 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
275 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
277 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
279 * gc-card.c (scm_i_card_statistics): init tag.
281 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
283 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
285 * fports.c (s_scm_open_file): add the b flag for binary to the doc
288 2005-06-25 Kevin Ryde <user42@zip.com.au>
290 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
291 last change, use plain copy-on-write substrings, the individual
292 descriptions in the srfi don't mention shared storage (only the
295 * strings.c (scm_take_locale_stringn): Use realloc to make room for
296 null-terminator, rather than mallocing a whole new block.
297 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
299 2005-06-12 Marius Vollmer <mvo@zagadka.de>
301 * ramap.c (scm_array_index_map_x): First test for real arrays,
302 then check for generalized vectors. This ensures that the
303 generalized vector case need only work with zero-origin ranges.
304 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
305 to access the target array, making these functions work with all
306 kinds of arrays, not just bit arrays.
308 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
309 gh_list.c, gh_predicates.c: Deprecated everything.
311 * environments.c (environment_default_folder,
312 environment_default_observer): Do not use gh_call3, gh_call1.
314 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
316 * modules.c (s_scm_eval_closure_module): new function. Return the
317 module inside an eval-closure.
319 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
320 table. This means that procedure properties are GC'd if the
323 2005-06-11 Kevin Ryde <user42@zip.com.au>
325 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
326 charset cases, count chars kept and build a string in a second pass,
327 rather than using a cons cell for every char kept. Use a shared
328 substring when nothing removed (such sharing is allowed by the srfi).
330 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
332 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
333 string, so live object stats can be sorted with string<?.
335 2005-06-06 Marius Vollmer <mvo@zagadka.de>
337 * print.c (iprin1): When writing a string, collect all characters
338 that can be printed directly into one call to scm_lfwrite.
339 Previously, every character was output with its own call to
340 write(2) on unbuffered ports.
342 * eval.c (scm_eval_options_interface): Use
343 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
344 and SCM_CRITICAL_SECTION_END.
346 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
347 check for generalized vectors. This ensures that the generalized
348 vector case need only work with zero-origin ranges.
350 2005-06-06 Kevin Ryde <user42@zip.com.au>
352 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
353 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
356 2005-06-05 Marius Vollmer <mvo@zagadka.de>
358 * eval.c: Added comment on how to make case 1.1 of
359 r5rs_pitfall.test succeed.
361 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
363 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
365 * socket.c: Remove obsolete comment about socklen_t.
366 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
368 * numbers.h (isnan)[__MINGW32__]: Remove.
370 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
371 DEFAULT_INCLUDES when cross compiling.
373 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
375 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
376 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
379 2005-05-22 Marius Vollmer <mvo@zagadka.de>
381 * unif.c (scm_make_shared_array): Add old base to new base since
382 scm_array_handle_pos does not include the base.
383 (scm_aind): Likewise.
385 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
388 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
390 Mac OS X compile warning fixes, reported by Richard Todd.
392 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
395 * strports.c (st_resize_port): Add unsigned char cast.
396 (scm_mkstrport): Make read/write_buf cast unsigned.
398 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
400 * rdelim.c (scm_read_line): Initialize slen.
402 * load.c (scm_search_path): Remove weird >=1, and add
403 parentheses to clarify conditions.
405 * hash.c (scm_hasher): Add const unsigned char cast.
407 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
409 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
411 Fix C99isms reported by Ludovic Courtès:
413 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
416 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
419 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
421 (scm_i_card_statistics): Add block for declarations of tag_as_scm
424 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
426 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
427 compile warning reported by Werner Scheinast.
429 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
431 * list.h: remove scm_list()
433 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
434 SCM_DEBUG_CELL_ACCESSES
435 (FLUID_NEXT_LOC): idem.
437 2005-04-30 Kevin Ryde <user42@zip.com.au>
439 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
440 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
441 zero when re==0 and im<0. Reported by Jean Crepeau.
443 2005-04-25 Kevin Ryde <user42@zip.com.au>
445 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
446 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
447 few sensible uses (like filling with a random number generator say),
448 but has been allowed in the past and so should be kept.
450 2005-04-23 Kevin Ryde <user42@zip.com.au>
452 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
453 scm_hash_fn_remove_x.
455 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
456 the caller when cons* is reached through apply.
458 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
459 list is called using apply, under the debugging evaluator.
462 * list.c, list.h (scm_make_list): New code, moving make-list from
465 2005-04-14 Kevin Ryde <user42@zip.com.au>
467 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
468 converted from scheme code in boot-9.scm.
470 2005-04-11 Kevin Ryde <user42@zip.com.au>
472 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
473 Validate list argument, scm_string_append and scm_string_append_shared
474 don't do that to their rest argument (in a normal build).
476 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
478 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
479 closure can not be stored since it is no longer valid at GC time.
480 (make_hash_table): Initialize 'hash_fn' field.
481 (scm_i_rehash): Only store hash_fn in hash table when closre is
483 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
484 non-NULL. Always use a NULL closure.
485 (scm_hash_fn_create_handle_x): Also rehash when table contains too
488 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
490 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
491 argument; always use scm_delq_x. The delete_fn function works on
492 the handle, not the key, and it therefore makes no sense to make
493 it configurable. Changed all callers.
494 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
495 (scm_hash_clear): Accept plain vectors as hashtables.
496 (scm_delx_x): Removed.
498 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
500 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
501 compatibility with gcc -std=c99.
503 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
505 * async.h (scm_mask_ints): Removed left over reference to
508 * threads.c: Removed fprintf debug statements.
510 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
512 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
514 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
516 * debug.c (scm_make_memoized): Remove unnecessary critical
517 section, and simplify by using SCM_RETURN_NEWSMOB.
519 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
521 * strings.h (SCM_STRING_UCHARS): Added missing argument.
523 2005-03-18 Kevin Ryde <user42@zip.com.au>
525 * arbiters.c (FETCH_STORE) [generic C]: Should be
526 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
528 2005-03-13 Kevin Ryde <user42@zip.com.au>
530 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
533 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
534 because OR-ing bits into a negative can reduce the value to an inum.
536 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
537 casting inum to double since that can lose precision.
539 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
541 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
542 (guilify_self_1): Initialize it.
544 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
545 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
546 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
548 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
550 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
551 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
552 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
553 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
554 scm_after_gc_c_hook here.
555 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
556 scm_after_gc_c_hook when a full GC has in fact been performed.
557 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
559 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
562 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
563 scm_gc_running_p while the scm_i_sweep_mutex is locked.
565 * inline.h (scm_cell, scm_double_cell): Do not check
566 scm_gc_running_p, allocation during sweeping is OK.
568 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
569 not set scm_block_gc.
571 * init.c (scm_i_init_guile): Do not set scm_block_gc.
573 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
574 instead of scm_malloc. The latter can not be used during GC.
576 2005-03-09 Marius Vollmer <mvo@zagadka.de>
578 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
581 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
583 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
584 scm_gc_running_p. Sweeping can happen in parallel with
587 * inline.h: Updated comments for current threading implementation.
589 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
590 (scm_i_thread): Removed unused signal_asyncs field.
591 (threads_mark): Do not mark it.
592 (guilify_self_1): Do not initialize it. Do initialize
593 continuation_root field.
594 (do_thread_exit): Do not remove thread from all_threads list.
595 (on_thread_exit): Do it here, after leaving guile mode.
596 (sleep_level): Removed.
597 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
598 returning. Do not support recursive sleeps.
599 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
600 entry. Do not support recursive sleeps.
602 * fluids.c (ensure_state_size, ensure_all_state_sizes,
603 resize_all_states): Collapsed ensure_state_size and
604 ensure_all_state_sizes into one function named resize_all_states.
605 Allocate new vectors outside of single threaded region. Do only
606 simple things inside that region.
607 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
608 while adding to the global lists.
611 2005-03-08 Marius Vollmer <mvo@zagadka.de>
613 libltdl is no longer distributed. We expect it to be installed
616 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
617 (libguile_la_LIBADD): Removed @LIBLTDL@.
619 2005-03-07 Marius Vollmer <mvo@zagadka.de>
621 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
622 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
623 they also block/unblock execution of asyncs and call
624 scm_async_click which is declared in async.h but threads.h can not
625 include async.h since async.h already includes threads.h.
626 (scm_i_critical_section_level): New, for checking mistakes in the
627 use of the SCM_CRITICAL_SECTION_* macros.
628 (scm_i_critical_section_mutex): Make it a recursive mutex so that
629 critical sections can be nested.
631 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
634 * threads.h, threads.c (scm_frame_lock_mutex): New.
635 (scm_frame_critical_section): Take mutex as argument.
636 (framed_critical_section_mutex): New, used as default for above.
637 (scm_init_threads): Initialize it.
638 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
639 scm_i_critical_section_mutex; both are initialized statically.
641 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
642 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
643 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
644 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
646 * debug.c (scm_debug_options): Replace
647 SCM_CRITICAL_SECTION_START/END with a frame and
648 scm_frame_critical_section.
650 * continuations.c (scm_make_continuation): No longer a critical
652 (scm_dynthrow): Abort when scm_i_critical_section_level is
655 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
657 * threads.c (scm_try_mutex): Renamed argument for consistency.
659 * root.c (scm_call_with_dynamic_root): New docstring.
661 * eval.c: Define _GNU_SOURCE.
663 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
665 Big merge from the mvo-thread-cleanup branch. The main changes
668 - The dynamic roots functionality has been split into dynamic
669 states and continuations barriers. Fluids have been
670 reimplemented and can now be garbage collected.
672 - Initialization of Guile now works in a multi-thread friendly
673 manner. Threads can freely enter and leave guile mode.
675 - Blocking on mutexes or condition variables or while selecting
676 can now be reliably interrupted via system asyncs.
678 - The low-level threading interface has been removed.
680 - Signals are delivered via a pipe to a dedicated 'signal delivery
683 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
685 * throw.c (scm_handle_by_message): Exit only the current thread,
686 not the whole process.
687 (scm_handle_by_message_noexit): Exit when catching 'quit.
689 * scmsigs.c (take_signal, signal_delivery_thread,
690 start_signal_delivery_thread, ensure_signal_delivery_thread,
691 install_handler): Reimplemented signal delivery as explained in
694 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
695 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
696 scm_i_sched_yield, scm_i_pthread_sigmask,
697 SCM_I_PTHREAD_MUTEX_INITIALIZER,
698 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
699 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
700 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
701 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
702 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
703 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
704 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
705 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
706 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
707 scm_i_pthread_key_create, scm_i_pthread_setspecific,
708 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
709 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
710 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
712 * null-threads.c, null-threads.h: Provide dummy definitions for
713 the above symbols when not using pthreads.
715 * modules.h, modules.c (scm_frame_current_module): New.
717 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
718 instead of scm_internal_dynamic_wind.
720 * init.h, init.c (restart_stack, start_stack): Removed.
721 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
722 (scm_boot_guile_1): Removed.
723 (scm_i_init_mutex): New.
724 (really_cleanup_for_exit, cleanup_for_exit): New.
725 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
726 Moved around some init funcs. Call
727 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
730 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
731 Use "!scm_is_eq" instead of "!=".
733 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
734 SCM_USE_COOP_THREADS): Removed.
736 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
737 maintained. Unlock scm_i_sweep_mutex before running
739 (scm_permanent_object): Allocate outside of critical section.
742 * fluids.h, fluids.c: Reimplemented completely.
743 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
744 SCM_FAST_FLUID_SET): Reimplemented as functions.
746 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
747 (scm_make_dynamic_state, scm_dynamic_state_p,
748 scm_is_dynamic_state, scm_current_dynamic_state,
749 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
750 scm_c_with_dynamic_state, scm_with_dynamic_state,
751 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
753 * feature.c (progargs_fluid): New.
754 (scm_program_arguments, scm_set_program_arguments): Use it instead
756 (scm_init_feature): Allocate it. Also, only add "threads" feature
757 when SCM_USE_PTHREAD_THREADS is true.
759 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
760 scm_make_rec_mutex, with all the consequences.
761 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
762 scm_internal_dynamic_wind. Handle dynamic states as second
765 * threads.h, threads.c (scm_internal_select): Renamed to
766 scm_std_select and discouraged old name.
767 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
769 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
770 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
771 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
772 SCM_THREAD_DATA): Removed.
773 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
775 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
776 Use scm_assert_smob_type.
777 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
778 scm_thread_self, scm_thread_yield, scm_mutex_init,
779 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
780 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
781 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
782 scm_cond_init, scm_cond_destroy, scm_cond_wait,
783 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
784 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
785 scm_thread_select): Removed. Replaced with scm_i_pthread
786 functions as appropriate.
787 (scm_in_guile, scm_outside_guile): Removed.
788 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
790 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
792 (scm_i_frame_single_threaded): New.
793 (scm_init_threads_default_dynamic_state): New.
794 (scm_i_create_thread): Removed.
795 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
796 (scm_make_recursive_mutex): New.
797 (scm_frame_critical_section): New.
798 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
799 latter, changed all uses.
800 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
801 scm_i_set_last_debug_frame): New, use them instead of scm_root
803 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
804 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
805 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
806 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
807 (remqueue): Allow the removal of already removed cells. Indicate
808 whether a real removal has happened.
809 (scm_thread): Removed, replaced with scm_i_thread.
810 (make_thread, init_thread_creatant): Removed.
811 (cur_thread): Removed.
812 (block_self, unblock_from_queue): New.
813 (block, timed_block, unblock): Removed.
814 (guilify_self_1, guilify_self_2, do_thread_exit,
815 init_thread_key_once, init_thread_key,
816 scm_i_init_thread_for_guile, get_thread_stack_base,
817 scm_init_guile): New initialisation method.
818 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
820 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
821 "fair" to fat and implemented new semantics, including reliable
823 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
824 (scm_threads_mark_stacks): Explicitly mark handle.
825 (scm_std_select): Allow interruption by also selecting on the
827 (scm_i_thread_put_to_sleep): Handle recursive requests for
829 (scm_threads_prehistory, scm_init_threads): Put current thread
830 into guile mode via guileify_self_1 and guileify_self_2,
833 * fluid.h (SCM_FLUIDP): Deprecated.
835 * coop-threads.c: Removed.
837 * continuations.h, continuations.c (scm_with_continuation_barrier,
838 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
841 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
843 (scm_async_click): Protected with async_mutex. Do not deal with
844 signal_asyncs, which are gone. Set cdr of handled async cell to
846 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
848 (scm_system_async_mark_for_thread): Do not use scm_current_thread
849 since that might not work during early initialization.
851 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
852 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
853 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
854 and SCM_CRITICAL_SECTION_END.
855 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
856 SCM_CRITICAL_SECTION_START/END.
858 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
859 (libguile_la_SOURCES): Added null-threads.c
860 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
862 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
864 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
865 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
866 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
867 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
868 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
869 scm_make_root): Removed or deprecated. Replaced with references
870 to the current thread, dynamic state, continuation barrier, or
871 some fluid, as appropriate.
872 (root_mark, root_print): Removed.
873 (scm_internal_cwdr): Reimplemented guts with
874 scm_frame_current_dynamic_state and
875 scm_i_with_continuation_barrier.
876 (scm_dynamic_root): Return current continuation barrier.
879 2005-02-28 Marius Vollmer <mvo@zagadka.de>
881 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
882 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
884 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
886 Thanks to Greg Troxel!
888 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
890 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
893 2005-02-25 Marius Vollmer <mvo@zagadka.de>
895 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
896 so that no two weak alist vectors share a spine.
897 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
898 during GC before inserting the new alist cell.
900 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
902 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
904 (scm_hash_fn_create_handle_x): Likewise.
905 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
907 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
909 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
910 the prototypical examples mentioned in the old reference manual.
911 Instead keep the old semantics of dispatching on type. (Yes, this
912 is extremely ugly, but the whole point of keeping the deprecated
913 interface is not to break old code.)
915 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
917 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
920 2005-01-28 Kevin Ryde <user42@zip.com.au>
922 * numbers.c (scm_ash): Rewrite using shifts, much faster than
923 integer-expt and multiply/divide. Inexacts and fractions no longer
924 supported (they happened to work before for left shifts, but not
925 right). Don't really need inexacts and fractions, since ash is
926 documented as a "bitwise operation", and all the rest of those only
929 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
931 * gc-card.c (scm_i_card_statistics): map structs, closures and
934 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
935 (tag_table_to_type_alist): ignore unknown types.
937 * gc-segment.c (scm_i_all_segments_statistics): new function.
938 (scm_i_heap_segment_statistics): new function
940 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
941 statistics on the number of live objects of each type.
943 * gc-card.c (scm_i_tag_name): new function.
944 (scm_i_card_statistics): new function.
946 2005-01-24 Kevin Ryde <user42@zip.com.au>
948 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
949 POSIX and C99 don't document errno being set. Reported by Bruno
951 (scm_flock): Update docstring from manual.
953 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
954 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
957 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
958 sa_handler, needs to be a long on 64-bit systems where int is only 32
961 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
963 * environments.c (obarray_enter, obarray_replace): Call
964 SCM_HASHTABLE_INCREMENT when adding a new entry.
966 * objects.c: Include goops.h for the scm_class_of prototype.
968 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
969 sizes to be smaller than the maximum lengths of vectors.
971 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
973 * ports.c, smob.c: Include "libguile/goops.h".
975 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
976 scm_class_char, scm_class_pair, scm_class_procedure,
977 scm_class_string, scm_class_symbol,
978 scm_class_procedure_with_setter, scm_class_primitive_generic,
979 scm_class_vector, scm_class_null, scm_class_real,
980 scm_class_complex, scm_class_integer, scm_class_fraction,
981 scm_class_unknown, scm_port_class, scm_smob_class,
982 scm_no_applicable_method, scm_class_of): Moved from objects to
983 goops since they are only useable once goops has been loaded.
984 (scm_classes_initialized): Removed.
985 (scm_class_of): Do not check it.
986 (create_standard_classes): Do not set it.
988 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
990 * objects.h, objects.c (scm_classes_initialized): New.
991 (scm_class_of): Signal error when scm_classes_initialized is zero.
992 * goops.c (create_standard_classes): Set scm_classes_initialized
995 * random.c (scm_random_solid_sphere_x): Use
996 scm_c_generalized_vector_length instead of
997 scm_uniform_vector_length.
999 2005-01-16 Marius Vollmer <mvo@zagadka.de>
1001 * script.c (scm_compile_shell_switches): Removed debugging output.
1003 2005-01-15 Kevin Ryde <user42@zip.com.au>
1005 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
1006 docstrings from manual.
1007 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
1009 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1011 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
1014 Implement u64 and s64 uniform numeric vectors with bignums when
1015 scm_t_uint64 and scm_t_int64 are not available.
1017 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
1018 scm_array_handle_u64_elements,
1019 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
1020 scm_u64vector_writable_elements): Do not define when scm_t_uint64
1022 (scm_take_s64vector, scm_array_handle_s64_elements,
1023 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
1024 scm_s64vector_writable_elements): Likewise for scm_t_int64.
1025 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
1026 scm_t_int64/scm_t_uint64 are not available.
1027 (uvec_mark): New, to mark the bignums.
1028 (alloc_uvec): Initialize bignums.
1029 (uvec_fast_ref): Return bignums directly.
1030 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
1031 assert_exact_integer): New.
1032 (uvec_fast_set): Use them to validate the bignums.
1033 (scm_init_srfi_4): Set mark function of smob when needed.
1034 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
1037 Recognize 1.4 -e syntax.
1039 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
1040 (scm_compile_shell_switches): Use them to recognize and convert
1043 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1045 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
1046 deprecated features that once were macros but are now functions
1049 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1051 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
1052 * deprecation.c (scm_issue_deprecation_warning,
1053 scm_c_issue_deprecation_warning_fmt): Use it.
1055 (print_summary): New.
1056 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
1059 Deprecated SCM_ARRAY* macros.
1061 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
1062 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
1063 version. Changed all uses.
1064 (scm_tc16_array, scm_i_tc16_array,
1065 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
1066 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
1067 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
1068 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
1069 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
1070 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
1071 SCM_ARRAY_V, SCM_I_ARRAY_V,
1072 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
1073 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
1074 scm_t_array, scm_i_t_array): Likewise.
1075 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
1076 Moved from unif.h to unif.c.
1077 (scm_c_array_rank): New.
1078 (scm_array_rank): Reimplement using it.
1080 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
1081 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
1082 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
1084 2005-01-11 Marius Vollmer <mvo@zagadka.de>
1086 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
1087 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
1088 scm_c_generalized_vector_ref and scm_cvref, and
1089 scm_c_generalized_vector_set_x, respectively.
1090 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
1091 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
1093 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
1094 former to latter and made public. Changed all uses.
1095 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
1096 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
1097 (scm_i_shap2ra): New internal version of scm_shap2ra.
1098 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
1099 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
1100 (scm_ra_set_contp): Deprecated, changed all uses to
1102 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
1104 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1106 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
1109 * unif.c (scm_list_to_typed_array): Allow the specification of the
1110 upper bound as well. This is needed for empty arrays.
1111 (l2ra): Give needed number of elements in error message.
1112 (scm_i_print_array): Print length information for arrays that need
1114 (scm_i_read_array): Parse it.
1116 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
1117 scm_i_object_chars, scm_i_object_length): Brought back from the
1120 2005-01-10 Marius Vollmer <mvo@zagadka.de>
1122 * ramap.c: Replaced single-index uses of scm_array_set_x with
1123 scm_c_generalized_vector_set_x.
1125 * unif.c (scm_array_rank, scm_array_dimensions,
1126 scm_shared_array_offset, scm_shared_array_increments,
1127 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
1128 to simplify code and make it more general.
1129 (scm_shared_array_root): Work with all kinds of arrays, including
1131 (indices_to_pos): New.
1132 (scm_make_shared_array): Use it instead of scm_aind; use handle
1135 2005-01-10 Kevin Ryde <user42@zip.com.au>
1137 * posix.c (scm_mkstemp): Update docstring from manual.
1139 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
1141 2005-01-09 Marius Vollmer <mvo@zagadka.de>
1143 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
1144 scm_i_uniform_vector_set_proc): New.
1145 (u8ref, u8set, s8ref, s8set, etc): New.
1146 (uvec_reffers, uvec_setters): New.
1147 (uvec_to_list): Use generic scm_array_handle_ref instead of
1148 uvec_fast_ref since scm_array_handle_ref should be faster now.
1149 (coerce_to_uvec, scm_c_uniform_vector_ref,
1150 scm_c_uniform_vector_set_x): Likewise.
1152 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
1154 (scm_t_array_handle): Added ref, set, elements and
1155 writable_elements for fast inline operation of
1156 scm_array_handle_ref and scm_array_handle_set.
1157 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
1158 and replaced with inline code that simply calls the ref/set
1159 members of the handle.
1160 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
1161 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
1163 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
1165 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
1166 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1167 scm_bit_invert_x): Correctly multiply index with increment in the
1170 * unif.c (scm_array_handle_set): Correctly execute only one
1172 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
1173 the array; this covers all cases with much simpler code.
1175 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
1178 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1180 * srfi-4.c (uvec_type): New.
1181 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
1182 scm_c_uniform_vector_x): Use it to get concrete type.
1184 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
1187 * unif.c (ra2l): Handle zero rank arrays.
1188 (scm_i_print_array): Print zero rank arrays specially.
1189 (tag_to_type): Return #t for an empty tag, not the empty symbol.
1190 (scm_i_read_array): Allow zero rank arrays.
1192 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1194 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
1195 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
1196 and SCM_SET_HASHTAB_BUCKET.
1198 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
1199 Removed ref_stack field.
1200 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
1201 of a print state. Use them everywhere instead of ref_stack.
1203 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
1205 * srfi-4.c: Include deprecation.h.
1207 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
1209 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
1210 (scm_vector_elements, scm_vector_writable_elements,
1211 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
1213 (SCM_SIMPLE_VECTOR_LOC): Removed.
1214 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
1215 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
1216 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
1217 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
1218 latter. Changed use in eq.c.
1220 2005-01-07 Marius Vollmer <mvo@zagadka.de>
1222 Make the uniform vector routines also deal with one dimensional
1225 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
1226 SCM_SMOB_PREDICATE in this file.
1227 (is_uvec): Also recognize one-dimensional uniform numeric arrays
1229 (scm_is_uniform_vector): Likewise.
1230 (uvec_fast_ref): Made BASE param const.
1231 (uvec_writable_elements, uvec_elements): New.
1232 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
1233 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
1234 scm_c_uniform_set_x): Use them to also deal with one-dimensional
1236 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
1237 argument convention.
1238 (scm_uniform_vector_to_list): Let uvec_to_list do all the
1240 (scm_uniform_vector_length): Use uvec_length.
1242 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1244 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
1245 scm_c_uniform_vector_size): Removed.
1246 (scm_array_handle_uniform_element_size): New.
1249 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
1250 type of POS parameter to be signed, positions can be negative.
1251 (scm_array_handle_release): New, changed all uses of
1252 scm_t_array_handle to properly call it.
1253 (scm_vector_get_handle, scm_generalized_vector_get_handle):
1254 Renamed former to latter, changed all uses.
1256 2005-01-05 Marius Vollmer <mvo@zagadka.de>
1258 Updated bitvector routines to also use scm_t_array_handles.
1260 * unif.h (scm_bitvector_elements,
1261 scm_bitvector_writable_elements): Use a scm_t_array_handle and
1262 deliver offset, length and increment to caller. Changed all uses.
1263 (scm_bitvector_release_elements,
1264 scm_frame_bitvector_release_elements,
1265 scm_bitvector_release_writable_elements,
1266 scm_frame_bitvector_release_writable_elements): Removed.
1267 (scm_array_handle_bit_elements,
1268 scm_array_handle_bit_writable_elements,
1269 scm_array_handle_bit_elements_offset): New.
1270 (scm_make_typed_array): The special value for non-initialized
1271 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
1272 was a valid value to fill bitvectors with, so it can't really be
1275 2005-01-04 Kevin Ryde <user42@zip.com.au>
1277 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
1278 Reported by Bill Schottstaedt.
1280 2005-01-02 Marius Vollmer <mvo@zagadka.de>
1282 * sort.c (quicksort): Added INC parameter for non-contigous
1284 (quicksort1): New, for contigous vectors. Both functions are
1285 generated from the same code by including "quicksort.i.c".
1286 (scm_restricted_vector_sort_x): Call one of quicksort and
1287 quicksort1, depending on increment of vector.
1288 (scm_sort): Simply call scm_sort_x on a copy of the list or
1290 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
1291 size_t, added inc parameter.
1292 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
1293 so that it doesn't leak.
1294 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
1297 * ramap.c (scm_array_map_x): Do not try to convert fill value
1298 before filling, any necessary conversion is done while storing.
1300 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1303 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1304 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1305 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1307 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1308 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1309 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1310 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1311 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1312 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1313 vector elements API or simple vector API, as appropriate. Removed
1314 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1315 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1317 * srfi-4.h, srfi-4.c,
1318 srfi-4.i.c (scm_array_handle_uniform_elements,
1319 scm_array_handle_uniform_writable_elements,
1320 scm_uniform_vector_elements,
1321 scm_uniform_vector_writable_elements):
1322 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1323 scm_t_array_handle, deliver length and increment.
1324 (scm_array_handle_<foo>_elements,
1325 scm_array_handle_<foo>_writable_elements): New.
1327 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1328 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1330 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1331 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1332 scm_array_handle_set, scm_array_handle_elements
1333 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1334 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1335 scm_dimensions_to_uniform_array): Deprecated for real.
1336 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1337 snarfing wont allow a mismatch between C and Scheme arglists.
1338 (scm_make_shared_array, scm_enclose_array): Correctly use
1339 scm_c_generalized_vector_length instead of
1340 scm_uniform_vector_length.
1342 * validate.h (SCM_VALIDATE_VECTOR,
1343 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1346 * weaks.h, weaks.c: Use new internal weak vector API from
1349 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1350 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1351 'extra' to being regular sources.
1352 (noinst_HEADERS): Added quicksort.i.c.
1353 * quicksort.i.c: New file.
1355 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1356 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1357 and reimplemented. Replaced all uses with scm_vector_elements,
1358 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1360 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1361 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1362 SCM_SIMPLE_VECTOR_LOC): New.
1363 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1364 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1365 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1367 (scm_vector_copy): New.
1368 (scm_vector_elements, scm_vector_writable_elements): Use
1369 scm_t_array_handle, deliver length and increment. Moved to
1370 unif.h. Changed all uses.
1371 (scm_vector_release_elements,
1372 scm_vector_release_writable_elements,
1373 (scm_frame_vector_release_elements,
1374 scm_frame_vector_release_writable_elements): Removed.
1375 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1376 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1377 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1378 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1379 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1382 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1384 No longer use creators to specify the type of an array. Creators
1385 expose the fact that arrays are wrapped around vectors, but that
1388 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1389 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1390 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1391 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1392 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1393 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1394 uvec_proc_vars): Removed.
1395 (scm_i_generalized_vector_creator): Removed.
1396 (scm_i_generalized_vector_type): New.
1398 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1399 scm_make_typed_array, scm_array_type, scm_list_to_array,
1400 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1401 (scm_array_creator): Removed.
1402 (scm_array_p): Deprecated second PROT argument.
1403 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1404 Deprecated, reimplemented in terms of scm_make_typed_array and
1405 scm_list_to_typed_array.
1406 (scm_i_proc_make_vector, scm_i_proc_make_string,
1407 scm_i_proc_make_bitvector): Removed.
1408 (type_creator_table, init_type_creator_table, type_to_creator,
1409 make_typed_vector): New.
1410 (scm_i_convert_old_prototype): Removed.
1411 (prototype_to_type): New.
1412 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1413 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1414 minor added clarity.
1415 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1416 instead of scm_make_uve.
1417 (tag_creator_table, scm_i_tag_to_creator): Removed.
1419 (scm_i_read_array): Use scm_list_to_typed_array instead of
1420 scm_list_to_uniform_array.
1422 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1424 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1425 (scm_bitvector_writable_elements): New.
1426 (scm_bitvector_release, scm_bitvector_release_elements):
1427 Renamed former to latter. Added explicit call to
1428 scm_remember_upto_here_1.
1429 (scm_frame_bitvector_release,
1430 scm_frame_bitvector_release_elements): Renamed former to latter.
1431 (scm_bitvector_release_writable_elements,
1432 scm_bitvector_release_writable_elements): New.
1433 Changed all uses as required by the changes above.
1435 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1436 scm_u8vector_elements, etc): Made return value "const".
1437 (scm_uniform_vector_writable_elements,
1438 scm_u8vector_writable_elements, etc): New.
1439 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1440 Renamed former to latter. Added explicit call to
1441 scm_remember_upto_here_1.
1442 (scm_frame_uniform_vector_release,
1443 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1444 (scm_uniform_vector_release_writable_elements,
1445 scm_frame_uniform_vector_release_writable_elements): New. Takes
1446 crown of longest identifier yet.
1447 Changed all uses as required by the changes above.
1449 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1451 (scm_is_vector, scm_vector_p, scm_vector_length,
1452 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1453 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1454 scm_vector_move_left_x, scm_vector_move_right_x,
1455 scm_vector_fill_x): handle one-dimensional arrays.
1456 (scm_vector_elements, scm_vector_release_elements,
1457 scm_vector_frame_release_elements, scm_vector_writable_elements,
1458 scm_vector_release_writable_elements,
1459 scm_vector_frame_release_writable_elements): New.
1460 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1461 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1463 * ramap.c (scm_ramapc, scm_raeql): Use
1464 scm_c_generalized_vector_length instead of
1465 scm_uniform_vector_length.
1466 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1467 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1469 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1471 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1472 member for relocating debug frames.
1473 (scm_make_continuation): Set it.
1475 * stacks.c (read_frame, read_frames, scm_make_stack,
1476 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1477 of continuations instead of calculating the offset ourselves.
1478 Relocate 'vect' member of scm_t_debug_frame.
1480 2004-12-16 Kevin Ryde <user42@zip.com.au>
1482 * ramap.c (scm_array_map_x): Check for at least one source argument.
1484 2004-12-14 Kevin Ryde <user42@zip.com.au>
1486 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1487 the C code so for the final call to the predicate procedure is a tail
1488 call, per SRFI-13 spec.
1490 2004-12-10 Kevin Ryde <user42@zip.com.au>
1492 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1493 recent revision to the reference manual.
1495 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1496 with "%", C99 says it's well-defined.
1498 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1499 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1500 bother trying to fit scm_from_ulong, not really worth the trouble if
1501 addresses are more than 4 bytes usually.
1503 2004-11-30 Kevin Ryde <user42@zip.com.au>
1505 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1506 arm32. Reported by Greg Troxel.
1508 2004-11-14 mvo <mvo@zagadka.de>
1510 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1512 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1514 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1516 Enclosed arrays are now their own smob. This has been done to
1517 make the code more explicit about them and to prepare for the time
1518 when generalized vectors include arbitrary one-dimensional
1519 arrays. (Uptonow, enclosed arrays have been recognized by their
1520 use of an array as their storage 'vector'. When all generalized
1521 vectors are allowed as storage, including one-dimensional arrays,
1522 this will no longer work.)
1524 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1526 (exactly_one_third, singp): Removed.
1527 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1528 scm_shared_array_offset, scm_shared_array_increments): Handle
1529 enclosed arrays explicitely.
1530 (scm_array_rank): Likewise. Also, do not return zero for
1531 non-arrays, signal an error instead since arrays with rank zero do
1533 (scm_i_make_ra): New, for specifying the tag of the new array.
1534 (scm_make_enclosed_array): Use it.
1535 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1536 (scm_make_shared_array): Use scm_c_generalized_vector_length
1537 instead of scm_uniform_vector_length.
1538 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1539 (scm_i_cvref): New, doing the job of scm_cvref.
1540 (scm_cvref): Use scm_i_cvref.
1541 (scm_array_ref): Do not accept non-arrays when no indices are
1542 given. Use scm_i_cvref to do the actual access.
1543 ("uniform-array-set1"): Do not register.
1544 (scm_array_set_x, scm_uniform_array_read_x,
1545 scm_uniform_array_write): Handle enclosed arrays explicitly.
1546 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1547 handle enclosed arrays.
1548 (scm_array_to_list): Handle enclosed arrays explicitly.
1550 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1552 (scm_i_print_enclosed_array): New.
1553 (tag_proto_table, tag_creator_table): Renamed former to latter.
1554 Added "a" and "b" for strings and bitvectors, resp.
1555 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1556 latter. Tag "a" is in the table now, no need to handle it as a
1558 (scm_raprin1): Just call scm_iprin1.
1559 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1561 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1562 Use scm_i_print_array as printer for scm_tc16_array.
1564 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1566 * ramap.c (cind): Changed second arg to be pointer to long instead
1568 (scm_ramapc): Allocate index vector with scm_malloc and not as
1569 uniform vector. Wrap it in a frame so that it gets properly freed.
1570 (scm_array_index_map_x): Likewise.
1572 * unif.c: Changed all uses of scm_array_prototype to
1573 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1575 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1576 in terms of scm_uniform_vector_read_x and
1577 scm_uniform_vector_write, respectively. Strings and
1578 bitvector support has been dropped.
1580 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1581 needed files directly. Include config.h, <unistd.h> and <io.h>
1583 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1585 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1587 * gh_data.c (gh_uniform_vector_length): Properly use
1588 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1590 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1592 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1594 (scm_i_uniform_vector_creator): Removed.
1595 (scm_i_generalized_vector_creator): New.
1596 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1597 handle generalized vectors, only uniform numeric vectors.
1598 (alloc_uvec): Do length check here...
1599 (make_uvec): ...but not here.
1600 (coerce_to_uvec): Use new generalized vector functions to handle
1601 all kinds of vectors in one go.
1603 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1604 remaining scm_tc7_unused tags to get a neatly ordered list.
1606 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1607 longer handle scm_tc7_bvect bitvectors.
1609 * ramap.c: Use the new generalized vector functions to handle all
1612 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1613 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1614 scm_generalized_vector_length, scm_generalized_vector_ref,
1615 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1616 scm_is_generalized_vector, scm_c_generalized_vector_length,
1617 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1620 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1621 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1622 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1623 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1624 scm_c_bitvector_length, scm_c_bitvector_ref,
1625 scm_c_bitvector_set_x, scm_bitvector_elements,
1626 scm_bitvector_release, scm_frame_bitvector_release,
1627 scm_tc16_bitvector, bitvector_free, bitvector_print,
1628 bitvector_equalp, count_ones, find_first_one): New.
1629 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1630 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1631 using the new C API for bitvectors and maybe count_ones or
1632 find_first_one, as appropriate.
1633 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1634 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1635 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1636 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1637 new functions from above.
1638 (scm_i_proc_make_vector, scm_i_proc_make_string,
1639 scm_i_proc_make_bitvector): Made non-static for use in
1640 scm_i_generalized_vector_creator.
1641 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1642 (scm_make_uve): Validate that the created object is a generalized
1644 (scm_i_legacy_tag): Removed.
1645 (scm_i_print_array): Do it here.
1646 (scm_raprin1): Only print enclosed arrays.
1648 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1650 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1652 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1655 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1656 for "space". Thanks to Bruce Korb!
1658 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1659 only after dest has been set. Thanks to Hyper Division!
1661 * gh_data.c (gh_uniform_vector_length): Use
1662 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1664 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1666 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1667 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1668 SCM_SET_UVECTOR_LENGTH): Removed.
1670 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1672 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1675 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1676 first and the second line of the SCM_DEFINE macro call, since old
1677 preprocessors cannot handle definitions that are split into two
1680 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1683 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1684 scm_t_uint32 to fix the mismatch between the function declaration
1687 * sort.c (quicksort): Don't use C99 variable declarations.
1689 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1690 SCM_BOOL_F if no type matches.
1692 * threads.c (thread_print): Cast a pointer to size_t when printing
1695 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1697 (scm_array_prototype): Deprecated.
1699 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1701 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1702 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1703 more efficient access to the u32vector.
1705 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1706 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1707 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1709 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1710 instead of the old-style dvectors.
1712 * gh_data.c: Use new-style uniform arrays in place of old-style
1715 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1716 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1718 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1719 instead of old-sytle uvectors.
1721 * convert.c, convert.i.c: Rewritten completely, using
1722 scm_any_to_u8vector, etc and other new-style uniform vector
1725 * random.c (scm_random_solid_sphere_x,
1726 scm_random_hollow_sphere_x): Do not validate vector argument, this
1727 is already done elsewhere.
1729 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1730 scm_any_to_u8vector, etc): New.
1731 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1732 longer handle old-style uniform vectors.
1734 * read.c (scm_lreadr): Bugfix: include the last bit in the
1737 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1739 * unif.h, unif.c (scm_array_creator): New.
1740 (scm_i_get_old_prototype): New.
1741 (scm_array_prototype): use it to return old-style prototype, never
1743 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1744 arg of SCM_UNDEFINED. The latter is wrong.
1746 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1747 (make_uve): Removed.
1748 (scm_i_proc_make_vector, scm_i_proc_make_string,
1749 scm_i_proc_make_u1vector): New.
1750 (scm_init_unif): Initialize them.
1751 (scm_i_convert_old_prototype): New.
1752 (scm_make_uve): Use it to get the creator procedure. Removed all
1753 old code that created old-style uniform vectors.
1754 (scm_array_p): Handle generic vectors.
1755 (scm_dimensions_to_uniform_array): Do not fill new array with
1756 prototype when that is a procedure.
1757 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1759 (scm_i_print_array): Print rank for shared or non-zero-origin
1761 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1762 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1763 which I do not understand yet.
1764 (scm_array_prototype): Explicitely handle generic vectors.
1766 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1767 (iflo2str): Use icmplx2str for complex numbers.
1769 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1770 scm_i_uniform_vector_prototype): Removed.
1771 (scm_i_uniform_vector_creator): New.
1772 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1773 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1774 Updated all tables and generic functions to support them.
1775 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1776 (scm_init_srfi_4): Initialize them.
1778 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1779 sizeof(CTYPE) as explained in the comment.
1781 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1782 following '#' that can start an array. Explicitely disambiguate
1783 'i' and 'e' between introducing numbers and uniform vectors. Do
1784 not call scm_i_read_homogenous_vector, since that is also handled
1785 by scm_i_read_array now.
1787 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1789 First cut at integrating uniform vectors from srfi-4 with the rest
1790 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1791 vector. The plan is to gradually replace one type after the other
1792 until none is left and then to consider general cleanups and
1795 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1797 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1798 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1799 scm_uniform_vector_to_list, scm_is_uniform_vector,
1800 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1801 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1802 scm_uniform_vector_release): New.
1803 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1804 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1805 from unif.h, unif.c and extended to handle both the old and new
1808 * tags.h (scm_tc7_byvect): Commented out.
1810 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1811 the former to the latter.
1812 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1814 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1815 (scm_array_p, scm_array_rank, scm_array_dimensions,
1816 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1817 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1818 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1819 vectors. Removed code for scm_tc7_byvect.
1820 (scm_dimensions_to_uniform_array): Fill array with 0 when
1822 (scm_i_print_array_dimension, scm_i_legacy_tag,
1823 scm_i_print_array): New.
1824 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1827 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1828 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1829 uniform vectors. Removed code for scm_tc7_byvect
1831 * print.c (iprin1): Removed code for scm_tc7_byvect.
1832 * objects.c (scm_class_of): Likewise.
1833 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1834 * gc-card.c (scm_i_sweep_card): Likewise.
1835 * evalext.c (scm_self_evaluating_p): Likewise.
1836 * eq.c (scm_equal_p): Likewise.
1838 * gh_data.c (gh_chars2byvect): Reimplemented with
1840 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1842 * srfi-4.c (take_uvec): New.
1843 (alloc_uvec): Use it.
1844 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1846 * random.c (vector_scale, vector_scale_x): Renamed former to the
1847 latter, since it modifies its argument.
1848 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1849 Do not use scm_universal_vector_length for non-uniform vectors.
1850 Use scm_f64vector_elements to access innards of uniform vectors.
1852 * convert.i.c: Convert srfi-4 style uniform vectors when
1854 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1855 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1857 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1859 * numbers.h, numbers.c (scm_i_print_double): New.
1861 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1862 ../srfi/ but heavily modified.
1863 * Makefile.am: Add them in all the right places.
1864 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1865 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1868 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1869 and made non-static. Changed all uses.
1871 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1873 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1874 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1875 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1876 scm_uintprint to print unsigned integers, raw heap words, and
1877 adresses, using a cast to scm_t_bits to turn pointers into
1880 * unif.c: Include "libguile/print.h".
1882 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1883 scm_t_intmax values.
1884 (scm_uint2str): New, for scm_t_uintmax.
1885 (scm_iint2str): Argument type changed to scm_t_intmax,
1886 reimplemented in terms of scm_uint2str.
1888 * print.c, print.h (scm_uintprint): New, for printing
1889 scm_t_uintmax values.
1890 (scm_intprint): Argument type changed to scm_t_intmax.
1892 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1893 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1894 strategic places so that the loops can be interrupted.
1896 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1897 "-I$(top_srcdir)/libguile-ltdl".
1898 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1899 "../libguile-ltdl/libguile-ltdl.a".
1901 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1902 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1903 instead of <libguile-ltdl.h>.
1905 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1907 * sort.c (quicksort): Copy pivot out of the array while
1908 constructing the partitions; it could get overwritten otherwise.
1909 Because of the ultimate insertion sort, this bug did not cause
1910 quicksort to fail, it just put all the burdon on the insertion
1911 sort and was thus very slow. Thanks to Rolan Orre for reporting
1914 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1916 * numbers.c (scm_i_range_error): New.
1917 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1920 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1921 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1923 * unif.c (scm_array_p): When no prototype is given, explicitely
1924 test for allowable types, do not simply return true. Thanks to
1925 Roland Orre for reporting this!
1927 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1929 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1930 segment to scm_max_segment_size.
1932 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1934 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1936 * inline.h (scm_double_cell): abort if GC running.
1939 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1941 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1944 Keywords no longer store a 'dash symbol'. Instead, they store a
1945 symbol with their real name.
1947 * keywords.h, keywords.c, deprecated.h, deprecated.c
1948 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1949 terms of scm_is_keyword and scm_keyword_dash_symbol.
1951 * keywords.h, keywords.c, discouraged.h, discouraged.c
1952 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1953 scm_c_make_keyword): Discouraged.
1955 * keywords.h, keywords.c (scm_symbol_to_keyword,
1956 scm_keyword_to_symbol): Implemented in C.
1957 (scm_is_keyword, scm_from_locale_keyword,
1958 scm_from_locale_keywordn): New.
1960 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1962 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1963 scm_from_locale_keyword instead of scm_c_make_keyword.
1965 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1966 better error message.
1968 * deprecated.c: Include discouraged.h and keywords.h.
1970 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1971 reading '#:' or ':'. See NEWS for consequences.
1973 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1975 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1976 literals are now read-write again (until SCM_STRING_CHARS is
1979 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1980 strings with an error message that blames SCM_STRING_CHARS.
1982 * options.c (change_option_setting): Use scm_car instead of
1983 explicit type check plus SCM_CAR.
1985 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1986 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1987 (scm_iprin1): Use them instead of the previoulsy hardcoded
1989 (scm_init_print): Initialize them.
1991 * backtrace.c (display_frame_expr): Do not remove control
1992 characters from the final string. Print it directly using
1995 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1996 Thanks to Roland Orre!
1998 2004-09-29 Kevin Ryde <user42@zip.com.au>
2000 * regex-posix.c (scm_regexp_exec): Correction to last change, should
2001 be whole original string in match struct, not offsetted substring.
2003 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
2005 * gc.c (scm_gc_unprotect_object): abort if called during GC.
2007 2004-09-24 Marius Vollmer <mvo@zagadka.de>
2009 * Makefile.am (EXTRA_DIST): Added gettext.h.
2011 * smob.c, smob.h (scm_assert_smob_type): New.
2013 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
2014 Include GUILE_CFLAGS.
2015 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
2017 (libpath.h): Put GUILE_CFLAGS in the build-info.
2019 2004-09-23 Marius Vollmer <mvo@zagadka.de>
2021 * print.h (scm_print_state): Added highlight_objects.
2022 * print.c (make_print_state, scm_free_print_state): Initialize it
2024 (scm_iprin1): Wrap output in '{...}' when object is contained in
2027 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
2028 scm_backtrace_with_highlights): New. Set highlight_objects of
2031 * error.c (scm_error_scm): Document new meaning of data/rest
2032 argument for out-of-range and wrong-type-arg errors.
2033 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
2034 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
2035 exception so that it gets highlighted in the backtrace.
2036 Don't talk about "argument" when not giving a position.
2038 * throw.c (handler_message): The rest argument is the fourth
2039 argument, not everything after the third. Call
2040 scm_display_backtrace_with_highlights, passing the rest argument
2043 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2045 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
2048 * i18n.c: Handle --disable-nls (thanks Bruno).
2050 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
2051 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
2053 * i18n.c (scm_i_to_lc_category): New name and export. Support all
2055 * posix.c (scm_setlocale): Use it.
2057 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
2058 scm_bind_textdomain_codeset): Make wrappers similar to C function
2063 * gettext.h: New file, taken from GNU gettext.
2064 * init.c: Include libguile/i18n.h.
2065 (scm_init_guile_1): Add call to scm_init_i18n().
2066 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
2067 (DOT_X_FILES): Add i18n.x.
2068 (DOT_DOC_FILES): Add i18n.doc.
2069 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
2070 (modinclude_HEADERS): Add i18n.h.
2072 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2074 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
2076 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
2077 discouraged.h. Replaced all uses with scm_is_pair.
2078 (SCM_I_CONSP): New name for SCM_CONSP.
2080 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
2081 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
2082 scm_cadr, etc): New.
2083 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
2084 uses with scm_is_null.
2086 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
2087 instead of explicit code.
2089 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2091 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2092 Reworded logic a bit so that #f is returned immediately when s1 is
2093 too short to contain s2.
2095 * regex-posix.c (scm_regexp_exec): Convert string to
2096 zero-terminated locale string before matching against it.
2098 * strings.h, strings.c (scm_substring_read_only,
2099 scm_c_substring_read_only, scm_i_substring_read_only): New.
2100 (RO_STRING_TAG, IS_RO_STRING): New.
2101 (scm_i_string_writable_chars): Bail on read-only strings.
2103 * read.c (scm_lreadr): use scm_c_substring_read_only for string
2104 literals, thus making them read-only as specified by R5RS.
2106 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2108 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
2109 by testing for smobs before insisting on equal SCM_CELL_TYPES.
2111 2004-09-21 Marius Vollmer <mvo@zagadka.de>
2113 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
2115 (scm_to_mpz, scm_from_mpz): New.
2116 Thanks to Andreas Vögele!
2118 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
2119 just on a line of its own.
2121 * srfi-13.c (scm_string_any, scm_string_every,
2122 scm_string_tabulate, string_upcase_x, string_down_case_x,
2123 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
2124 size_t instead of int for indices into strings. Make sure that no
2125 over- or underflow occurs. Thanks to Andreas Vögele!
2126 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
2127 indices, which can also be negative.
2129 2004-09-20 Marius Vollmer <mvo@zagadka.de>
2131 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
2133 * threads.c (scm_threads_mark_stacks): Call
2134 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
2137 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
2139 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2140 Bugfix: when subtracting unsigned values, make sure that result
2143 2004-09-09 Kevin Ryde <user42@zip.com.au>
2145 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
2146 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
2149 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2151 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
2153 * eq.c (real_eqv): Pretend that all NaNs are equal.
2155 * numbers.c (scm_integer_expt): Do not accept inexact integers.
2157 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2159 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
2160 use size_t for some locals instead of int.
2162 * read.c (scm_flush_ws): Detect "#!"-style comments here.
2163 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
2164 (skip_scsh_block_comment): Use scm_input_error instead of
2165 scm_misc_error in case of EOF.
2167 2004-09-07 Kevin Ryde <user42@zip.com.au>
2169 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
2170 Bug report by Bill Schottstaedt.
2172 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
2174 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
2176 * posix.c (scm_access): Update docstring per manual.
2178 * posix.c (scm_nice): Correction to error detection. Reported by
2181 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
2182 throw error before unlocking mutex with SCM_ALLOW_INTS.
2184 2004-09-06 Kevin Ryde <user42@zip.com.au>
2186 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
2187 available. This also gets around CLK_TCK being absent when
2188 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
2190 2004-09-03 Stefan Jahn <stefan@lkcc.org>
2192 * threads.c (scm_threads_mark_stacks): Fixed local variable
2195 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
2196 local variable definitions.
2198 * stime.c (_POSIX_C_SOURCE): Do not define this item on
2199 MinGW32 because it conflicts with its pthread headers.
2200 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
2201 (scm_strftime): Using scm_from_locale_string() instead of
2204 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
2207 * numbers.c (scm_init_numbers): Removed check_sanity() call
2208 inside GUILE_DEBUG. The function has been removed somewhen...
2210 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
2211 MinGW32 because it conflicts with its pthread headers.
2213 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2215 * strings.c (SCM_STRINGP): Accept all strings.
2216 (SCM_STRING_CHARS): Reject shared substrings here.
2218 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
2219 the Copyright years.
2221 2004-08-27 Kevin Ryde <user42@zip.com.au>
2223 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
2224 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
2225 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
2227 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2229 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
2230 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
2231 scm_i_symbol_is_interned, scm_i_mem2symbol,
2232 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
2234 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2236 * srfi-13.c: First cut at thread-safeness and proper use of
2237 scm_i_string_chars et al. Copious scm_remember_upto_heres have
2238 been inserted. Made sure that no internal string pointer is used
2239 across a SCM_TICK or a possible GC.
2241 * script.c (scm_compile_shell_switches): Use
2242 scm_from_locale_string instead of scm_makfrom0str.
2244 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
2247 2004-08-25 Marius Vollmer <mvo@zagadka.de>
2249 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
2252 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
2253 * strop.h, strop.c: Removed, they are now empty.
2254 * Makefile.am: Updated for new and removed files.
2256 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
2257 to scm_string_to_symbol.
2259 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
2260 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
2261 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
2262 charset instead of libc functions.
2264 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
2265 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
2266 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
2267 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
2268 instead of explicit code.
2270 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
2271 "srfi-13.h" instead of "strop.h".
2273 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
2274 scm_init_srfi_14. Do not call scm_init_strop.
2276 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2278 * numbers.c (scm_inf_p): Synced docstring back from manual.
2280 2004-08-22 Marius Vollmer <mvo@zagadka.de>
2282 * strings.c (get_str_buf_start): New helper function.
2283 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
2284 scm_i_string_char, scm_i_string_writable_chars): Use it.
2285 (scm_i_substring_copy): Make START argument optional for C
2286 callers, for upcoming SRFI-13 integration.
2288 2004-08-21 Marius Vollmer <mvo@zagadka.de>
2290 From Richard Todd, Thanks!
2292 * script.c (scm_compile_shell_switches): added '-L' switch to add
2295 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2297 * eval.c (unmemoize_exprs): When dropping internal body markers
2298 from the output during unmemoization, also drop those that are not
2299 immediately at the beginning of a body.
2301 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2303 * eval.c (scm_lookupcar1): Report "Variable used before given a
2304 value" insetad of an "Unbound" one for variables that are found
2305 but still contain SCM_UNDEFINED.
2307 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2308 expects a null-terminated string in the locale encoding, but
2309 scm_i_string_writable_chars doesn't give that. Fixed by letting
2310 mkstemp modify a locale version of the tmpl argument and copying
2311 the result back into tmpl.
2313 * strop.c (scm_substring_move_x): Store into str2, not str1.
2315 2004-08-20 Kevin Ryde <user42@zip.com.au>
2317 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2318 to modify the input string.
2320 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2322 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2323 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2324 scm_c_symbol_length.
2326 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2328 New string implementation, with copy-on-write strings and
2329 mutation-sharing substrings, and a new internal string API.
2330 Symbols can now share memory with strings.
2332 * tags.h (scm_tc7_stringbuf): New tag.
2334 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2335 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2336 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2338 (scm_i_make_string, scm_c_make_string): New, to replace
2339 scm_allocate_string. Updated all uses.
2340 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2341 SCM_STRING_LENGTH): Deprecated.
2342 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2343 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2344 Discouraged. Replaced all uses with scm_from_locale_string or
2345 similar, as appropriate.
2346 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2347 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2348 scm_substring_shared, scm_substring_copy): New.
2350 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2351 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2352 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2353 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2354 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2356 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2357 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2358 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2359 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2361 (scm_gensym): Generate only the number suffix in the buffer, just
2362 string-append the prefix.
2364 * error.c (scm_memory_error): Do not try to throw, just abort.
2365 Throwing will not work anyway.
2367 * gh.h, gh-data.c (gh_set_substr): Made src const.
2369 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2370 (scm_mode_bits): Use it.
2371 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2372 a vector normally and fill that instead of consing a list with a
2375 * read.c (scm_i_casei_streq): New, for counted strings.
2377 * threads.c (gc_section_count): Removed, thread-sleeping can not
2379 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2380 admin mutex so that we can be put to sleep by other threads while
2381 blocking on that mutex. Lock all the heap mutex of all threads,
2382 including ourselves.
2383 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2384 call scm_i_enter_guile.
2385 (scm_thread_mark_stacks): Expect all threads to be suspended.
2387 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2388 scm_gc_mallocated, for now.
2389 (scm_init_storage): Initialize it.
2390 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2392 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2393 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2394 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2395 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2397 * strop.c (scm_string_copy): Use scm_c_substring to get a
2398 copy-on-write string.
2400 2004-08-18 Kevin Ryde <user42@zip.com.au>
2402 * arbiters.c (FETCH_STORE): New macro.
2403 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2404 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2405 scm_try_arbiter and scm_release_arbiter.
2406 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2407 for speed on i386, otherwise using mutex.
2409 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2410 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2411 exact and inexact is #f.)
2413 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2414 to get thread safety of scm_ttyname.
2416 * ports.c (ttyname): Remove prototype, unused.
2418 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2419 Reported by Michael Tuexen.
2421 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2423 * load.c (scm_init_load_path): Do not pass NULL to
2424 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2425 not set. Thanks to Bill Schottstaedt.
2427 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2429 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2430 locale strings instead of accessing their internals.
2431 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2432 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2433 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2435 * simpos.c (scm_system): Convert SCM strings to locale strings
2436 instead of accessing their internals.
2438 * script.c (scm_compile_shell_switches): Convert version to locale
2439 string before printing it.
2441 * rdelim.c (scm_read_delimited_x): Avoid
2442 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2443 of scm_from_long for the returned number of read characters.
2445 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2446 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2448 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2449 Use them instead of SCM_SYSCALL when one or two strings need to be
2450 converted into locale strings.
2451 (my_rename): New, gathers platform dependent code for renaming.
2452 (scm_rename): Use it.
2453 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2454 strings instead of accessing their internals.
2455 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2456 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2459 * extensions.c (load_extension): Convert lib and init to locale
2460 strings instead of accessing the internals directly.
2461 (scm_c_load_extension): Use scm_from_locale_string instead of
2464 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2465 scm_fdes_to_port, but take mode bits directly instead of as a C
2467 (scm_i_fdes_to_port): Implement using above.
2468 (scm_open_file): Use scm_i_fdes_to_port together with
2469 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2470 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2471 with scm_i_mode_bits to avoid accessing internals of SCM string
2474 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2475 SCM string as argument.
2477 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2478 bits directly instead of C string.
2479 (scm_void_port): Implement using above.
2480 (scm_sys_make_void_port): Use scm_i_void_port together with
2481 scm_i_mode_bits to avoid accessing internals of SCM string.
2483 * strings.h, strings.c (scm_i_get_substring_spec): New.
2485 * socket.c, rw.c, deprecated.h, validate.h
2486 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2487 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2488 scm_to_locale_string, etc.
2489 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2490 above, plus scm_i_get_substring_spec.
2492 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2493 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2494 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2495 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2496 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2497 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2498 with more explicit scm_remember_upto_here_1, etc, or introduced
2499 them in the first place.
2501 * posix.c (WITH_STRING): New helper macro. Use it where one
2502 locale string is needed for a short piece of code.
2503 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2504 when one locale string is needed.
2505 (scm_mkstemp): Convert tmpl to a locale string.
2506 (scm_putenv): Rewritten to use only C strings.
2507 (scm_setlocale, scm_crpt): Convert argument strings to locale
2510 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2512 * load.c (scm_primitive_load_path): Do not check for absolute
2513 filenames when scm_sys_search_load_path returns false, which will
2514 return absolute filenames unchanged.
2516 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2518 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2519 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2520 of an alist. Thanks to Matthias Koeppe!
2522 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2524 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2525 Moved from string.h to deprecated.h.
2527 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2529 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2530 SCM_I_MAKE_STRING_TAG, changed all uses.
2531 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2532 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2533 respectively. For a short time, the old names are still there as
2534 aliases. Not all uses have been changed yet, but the ones in
2536 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2538 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2539 scm_take_locale_string, scm_take_locale_stringn,
2540 scm_to_locale_string, scm_to_locale_stringn,
2541 scm_to_locale_stringbuf): New.
2542 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2543 deprecated.[hc]. Implemented in terms of the new functions above.
2544 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2545 scm_makfrom0str): Reimplemented in terms of the new functions from
2546 above. They will be discouraged shortly.
2547 (scm_substring): Do not use scm_mem2string.
2548 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2549 to replace similar code from posix.c, simpos.c, and dynl.c.
2550 (scm_string_append): Use memcpy instead of explicit loop. Do not
2551 use register keyword. Use plain 'char' instead of 'unsigned
2554 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2555 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2557 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2558 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2559 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2560 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2562 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2563 string. This avoids a conversion round-trip.
2565 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2566 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2567 SCM_I_STRING_LENGTH, respectively.
2568 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2570 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2571 of a string, call scm_display on the string itself.
2573 * dynwind.c, dynwind.h (scm_frame_free): New.
2575 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2576 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2577 Replaced uses of SCM_STRING_CHARS with proper uses of
2578 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2579 Replaced scm_mem2string with scm_from_locale_string.
2581 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2582 Removed, replaced all uses with scm_i_allocate_string_pointers.
2584 * load.h, load.c (scm_internal_parse_path): Removed.
2585 (scm_parse_path): Use scm_string_split to do the work.
2586 (scm_init_load_path): Use scm_parse_path instead of
2587 scm_internal_parse_path.
2588 (scm_search_path): Rewritten string handling part of the code in
2589 terms of scm_to_locale_stringbuf and so that it is thread safe.
2591 * error.c (scm_error_scm): Throw directly instead of calling
2592 scm_error, this avoids the back and forth conversion of SUBR and
2593 MESSAGE and also plugs a memory leak.
2594 (scm_error): Call scm_error_scm.
2596 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2597 (display_header): Print FNAME when it is true, not
2598 merely when it is a string.
2600 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2601 unceremoniously. They were unused by Guile itself, and external
2602 use should stop immediately.
2605 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2607 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2608 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2609 deprecated versions installed in deprecated.h and deprecated.c.
2612 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2614 * net_db.c (scm_resolv_error): don't cause an exception while
2615 trying to throw an exception -- call scm_misc_error with correct
2616 arguments. The previous arguments needed a format escape that
2617 wasn't in any of the format strings.
2619 2004-08-06 Kevin Ryde <user42@zip.com.au>
2621 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2622 so as not to depend on signedness of plain char. For byvect range
2623 check, throw out-of-range rather than wrong-type-arg.
2625 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2626 signed byte range checks by using scm_to_schar and scm_from_schar,
2627 don't want to depend on signedness of C char.
2629 2004-08-05 Kevin Ryde <user42@zip.com.au>
2631 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2633 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2634 guaranteed if multiple threads compete to unlock.
2635 Update docstrings per doc/ref/api-scheduling.texi.
2637 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2638 stat on the filename, to be certain a file rename can't mean we get
2639 info on one filesystem object but open another. This fstat usage is
2640 similar to Emacs copy-file.
2642 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2644 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2645 SIGINT and SIGQUIT, since those values are ints.
2647 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2649 * num2integral.i.c, num2float.i.c: Removed.
2650 * Makefile.am (noinst_HEADERS): Updated.
2652 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2653 scm_i_make_ratio and made static, replaced uses with scm_divide.
2654 (scm_complex_p): New, export as "complex?" to Scheme.
2655 (scm_number_p): Export as "number?" to Scheme.
2656 (scm_is_complex, scm_is_number): New.
2657 (scm_c_make_rectangular, scm_c_make_polar): New.
2658 (scm_make_rectangular, scm_make_polar): Use above.
2659 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2661 (scm_make_complex): Discouraged by moving to discouraged.h and
2662 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2664 * discouraged.h, discouraged.c, numbers.c, numbers.h
2665 (scm_is_rational): New.
2666 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2667 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2669 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2670 Discouraged by moving to discouraged.h and discouraged.c.
2671 Replaced all uses with scm_from_double.
2672 (scm_num2float, scm_num2double): Discouraged by moving prototype
2673 to discouraged.h and rewriting in terms of scm_to_double.
2674 Replaced all uses with scm_to_double.
2675 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2677 (scm_from_double): Do not implement in terms of scm_make_real, use
2680 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2682 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2684 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2685 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2687 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2688 Renamed to SCM_I_* in order to avoid collisions with the versions
2689 defined in deprecated.h.
2691 * discouraged.h, discouraged.c: New files.
2693 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2694 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2695 deprecated to being discouraged by moving to discouraged.h.
2697 * numbers.h, numbers.c, discouraged.h, discouraged.c
2698 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2699 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2700 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2701 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2702 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2703 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2704 discouraged.c and reimplementing in terms of scm_from_* and
2705 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2708 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2709 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2710 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2711 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2712 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2715 2004-08-02 Kevin Ryde <user42@zip.com.au>
2717 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2718 and current usage and migration.
2720 2004-07-31 Kevin Ryde <user42@zip.com.au>
2722 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2723 it's not thread safe.
2724 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2726 * fports.c (scm_open_file): Use scm_strerror likewise.
2727 * filesys.c (scm_stat, scm_lstat): Ditto.
2729 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2732 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2733 update, for thread safety.
2734 (gensym_counter): Move into scm_gensym which is its only user.
2735 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2737 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2739 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2740 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2741 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2742 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2743 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2744 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2745 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2746 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2747 defined in terms of scm_to_signed_integer, etc, but in terms of
2750 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2752 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2755 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2756 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2758 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2759 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2760 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2761 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2762 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2763 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2764 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2766 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2767 the functions below.
2769 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2772 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2773 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2774 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2775 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2776 scm_from_uint64): Turned from macros into proper functions.
2777 (scm_to_signed_integer, scm_to_unsigned_integer,
2778 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2779 conv-integer.i.c and conv-uinteger.i.c, as well.
2781 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2782 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2783 the limits. Those are always defined.
2785 2004-07-29 Kevin Ryde <user42@zip.com.au>
2787 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2789 2004-07-28 Kevin Ryde <user42@zip.com.au>
2791 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2794 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2795 consistency with other vector types and to get arg and func name into
2798 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2800 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2801 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2802 scm_from_bool, respectively.
2803 (SCM_NINUMP): Added.
2805 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2806 deprecated.h. Replaced all uses with scm_is_eq.
2808 2004-07-24 Kevin Ryde <user42@zip.com.au>
2810 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2811 * posix.c (scm_crypt): Use it to protect static data in crypt().
2813 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2815 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2816 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2817 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2818 versions to deprecated.h and deprecated.c. Changed all uses to
2819 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2820 scm_from_*, as appropriate.
2822 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2823 the unexisting scm_cross_dynwind_binding_scope for inums on the
2826 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2828 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2829 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2830 byte-wise address to a SCM integer. Changed all uses.
2831 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2832 scm_to_ipv6 and added type and range checking, for converting from
2833 an IPv& byte-wise address to a SCM integer. Changed all uses.
2834 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2835 is now done by scm_to_ipv6.
2837 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2838 not accept inexact integers.
2840 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2841 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2842 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2843 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2844 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2845 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2846 fixnum/bignum distinction visible. Changed all uses to
2847 scm_to_size_t or similar.
2849 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2851 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2853 2004-07-10 Kevin Ryde <user42@zip.com.au>
2855 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2856 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2857 such a size causes divide-by-zeros in scm_hasher.
2859 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2862 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2864 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2865 Rewritten using the same logic as scm_to_signed_integer and
2866 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2867 use CHAR_BIT instead of hardcoding 8.
2868 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2869 SCM_I_LLONG_MIN etc. instead.
2871 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2872 SCM_I_MAKINUM and changed all uses.
2873 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2875 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2876 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2877 them by assuming twos-complement.
2879 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2881 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2882 configure now produces.
2883 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2884 definitions, giving the limits of the integer types defined by
2885 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2886 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2888 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2890 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2891 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2892 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2893 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2894 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2895 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2896 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2897 scm_from_uintmax): New.
2899 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2901 * tags.h (scm_is_eq): New.
2903 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2904 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2905 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2906 scm_from_bool, and scm_is_bool, respectively.
2908 * boolean.h (scm_is_bool): Fix bug in prototype.
2909 (scm_from_bool): The argument is "x" not "f", stupid.
2911 * boolean.c (scm_is_bool): Fix typo.
2913 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2914 scm_is_unsigned_integer, scm_to_signed_integer,
2915 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2916 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2917 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2918 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2919 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2920 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2923 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2925 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2928 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2930 * backtrace.c (display_expression, display_frame): Call
2931 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2932 single memoized expression.
2934 * debug.c (memoized_print): Don't try to unmemoize the memoized
2935 object, since we can't know whether it holds a single expression
2938 (scm_mem_to_proc): Removed check for lambda expression, since it
2939 was moot anyway. Whoever uses these functions for debugging
2940 purposes should know what they do: Creating invalid memoized code
2941 will cause crashes, independent of whether this check is present
2944 (scm_proc_to_mem): Take the closure's code as it is and don't
2945 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2946 memoized code should not be modified.
2948 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2949 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2950 available as a guile internal function instead. However,
2951 scm_i_unmemoize_expr will only work on memoized objects that hold
2952 a single memoized expression. It won't work with bodies.
2954 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2955 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2956 i. e. a list of expressions.
2958 * eval.c (unmemoize_exprs): Drop internal body markers from the
2959 output during unmemoization.
2961 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2962 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2963 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2964 as guile internal functions instead. scm_i_unmemoize_expr will
2965 only work on a single memoized expression, while
2966 scm_i_unmemocopy_body will only work on bodies.
2968 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2970 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2972 (scm_cons_source, scm_primitive_eval): Prefer higher level
2973 predicate SCM_FALSEP over SCM_IMP.
2975 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2977 * script.c (scm_shell_usage): minor phrasing change.
2979 * gc_os_dep.c: update ifdefery for macosx.
2980 (scm_get_stack_base): separate result initialization from
2981 declaration to slience warnings with macosx and hp-ux using gcc
2982 3.3. Thanks to Andreas Vögele.
2984 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2986 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2988 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2990 * list.[ch] (scm_i_finite_list_copy): New internal function to
2991 copy lists that are known to be finite (though not necessarily
2994 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2995 a closure's argument list like an expression of a body.
2997 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2998 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2999 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
3000 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
3001 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
3002 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
3003 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
3004 unmemoize_builtin_macro): New static functions and symbols.
3006 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
3007 now has a slightly different meaning: The memoized form that is
3008 receives as its argument is now interpreted as a sequence of
3009 expressions from a body.
3011 (unmemocar, scm_unmemocar): Since the whole functionality of
3012 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
3013 has its old content back and is deprecated, while unmemocar has
3016 (SCM_BIT7): Removed.
3018 (CEVAL): For unmemoizing a single expression, call
3019 unmemoize_expression instead of scm_unmemocopy, which now expects
3020 a sequence of body expressions. Eliminated unnecessary empty
3021 environment frame when executing let* forms. Eliminated
3022 unmemoization step from evaluator.
3024 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3026 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
3027 macroexp and made static. Added new version of scm_macroexp that
3028 emits a deprecation warning and then calls macroexp.
3029 (scm_m_undefine): Issue deprecation warning.
3031 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3033 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
3034 Modified to make set! work on symbols that represent syntactic
3037 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
3039 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
3040 compound expression as lvalue errors.
3042 2004-05-24 Marius Vollmer <mvo@zagadka.de>
3044 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
3045 WINDER_DATA to a SCM.
3047 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3049 * goops.c (compute_getters_n_setters, create_standard_classes,
3050 scm_add_slot): Compute closures by calling scm_i_eval_x on a
3051 lambda expression rather than creating them with scm_closure.
3053 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3055 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
3056 misplaced syntactic keywords. This will not work unless guile's
3057 defmacro feature is deprecated.
3059 (scm_m_case): Fixed a bug that caused the list of labels to grow
3060 with every case form.
3062 2004-05-19 Kevin Ryde <user42@zip.com.au>
3064 * numbers.c (scm_round_number): For inum and big, just return x. For
3065 real, use scm_round for 2^54-1 etc problems covered there.
3067 * numbers.c (trunc): Remove #define to scm_truncate when the C library
3068 doesn't provide trunc. This was for when `truncate' was done as a
3069 scm_tc7_dsubr, no longer required.
3071 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
3072 to stack marking call, two parameters and no cast on t->base.
3074 2004-05-18 Marius Vollmer <mvo@zagadka.de>
3076 * hashtab.c (rehash_after_gc): Bug fix: properly link the
3077 processed hashtables back into the weak_hashtables list. Thanks
3078 to Bill Schottstaedt!
3080 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3082 * eval.c (unmemoize_quote): New static function.
3084 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
3085 representation of 'quote' and '@slot-ref' to an improper list.
3086 This reduces execution time, the number of cells used to hold the
3087 memoized code, and thus also reduces garbage collection time.
3089 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
3091 (SCM_CEVAL): Changed macro handling to also work with macros that
3092 return improper lists. Added an assertion, that the code returned
3093 by a macro transformer will not lead to cycles in the memoized
3096 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3098 No functional change, just rearrangements of functions within the
3101 * eval.c (scm_ilookup, scm_unbound_variable_key,
3102 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
3103 the definitions used for execution, since that's where they will
3106 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3108 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
3109 throughout guile, has not been part of an official release yet,
3110 and the concept of sloppy predicates has never been a good idea.
3112 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
3113 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
3116 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3118 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
3119 to make explicit what happens.
3121 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3123 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
3124 explicit what happens.
3126 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
3127 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
3129 2004-05-11 Marius Vollmer <mvo@zagadka.de>
3131 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
3132 is indeed a procedure when it isn't a number.
3134 2004-05-10 Marius Vollmer <mvo@zagadka.de>
3136 Convert floating point numbers into strings with an arbitrary
3137 radix. Thanks to Richard Todd!
3139 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
3142 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
3143 number_chars): New, to support variable radices.
3144 (idbl2str): Use above instead of the old base-10 only tables.
3145 (iflo2str): Pass on new RADIX argument to idbl2str.
3146 (scm_number_to_string): Pass radix to iflo2str.
3147 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
3149 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
3152 2004-05-10 Kevin Ryde <user42@zip.com.au>
3154 * numbers.c (scm_logbit_p): Correction to test above the end of an
3155 inum. Reported by Jan Konecny.
3157 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3159 * gc.h (scm_t_cell): Fields are now of type SCM instead of
3160 scm_t_bits. Updated all users.
3161 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
3162 duplicating the code.
3163 (SCM_CELL_OBJECT_LOC): New.
3164 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
3165 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
3167 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
3168 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
3169 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
3170 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
3171 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
3172 SCM_SMOB_OBJECT_3_LOC): New.
3173 * smob.c (scm_i_set_smob_flags): New function.
3175 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
3176 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
3177 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
3178 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
3179 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
3180 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
3182 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
3183 taking the address of SCM_CELL_WORD_1, the latter being no longer
3186 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
3187 of casting SCM_CELL_WORD_LOC.
3189 2004-05-02 Kevin Ryde <user42@zip.com.au>
3191 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
3192 --disable-deprecated. Reported by Andreas Vögele.
3194 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
3195 particular on HP-UX). Reported by Andreas Vögele.
3197 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
3198 code has support for. Fixes building with AIX cc, which is ansi but
3199 doesn't define __STDC__. Reported by Keith Crane.
3200 (var_start): Remove macro, this variation no longer required.
3201 (scm_list_n): Use va_start directly.
3203 2004-05-01 Kevin Ryde <user42@zip.com.au>
3205 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
3206 is now gone. Reported by Andreas Vögele.
3208 2004-04-28 Kevin Ryde <user42@zip.com.au>
3210 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
3211 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
3212 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
3213 subscript. Reported by Andreas Vögele.
3214 Also cast through unsigned char to avoid passing negatives to those
3215 macros if input contains 8-bit values.
3217 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
3218 corrections to range check for signed numbers. Remove
3219 scm_remember_upto_here_1(num) from these checks, since num is used
3220 subsequently anyway.
3222 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
3223 avoid warning from gcc 3.4. Reported by Hyperdivision.
3225 * numbers.c (scm_bit_extract): Use min instead of MIN.
3226 (MIN): Remove, this conflicts with similar macro defined by limits.h
3227 on HP-UX. Reported by Andreas Vögele.
3229 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
3230 particular on HP-UX). Reported by Andreas Vögele.
3232 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
3233 Reported by Andreas Vögele.
3235 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
3236 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
3239 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3241 * eval.c (s_macro_keyword): New static identifier.
3243 (scm_m_define): Change order to first create binding and
3244 evaluating the expression afterwards.
3246 (scm_m_set_x): Memoize complete set! expression. Only leave
3247 symbols if no binding exists at memoization time. Throw error if
3248 assigning to a syntactic keyword.
3250 (lazy_memoize_variable): New function.
3252 (CEVAL): When execution set!, perform lazy memoization if
3253 unmemoized symbol is detected.
3255 * modules.c (module_variable): Return variables with unbound
3258 * tags.h: Fix comment.
3260 2004-04-25 Kevin Ryde <user42@zip.com.au>
3262 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
3263 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
3264 in 8-bit locales, and ensures consistency with char-upper-case? and
3265 char-lower-case? which already use ctype.h.
3266 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
3268 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
3270 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
3271 call. Reported by Hyperdivision.
3273 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
3274 Reported by Hyperdivision.
3276 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
3279 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3281 Hide the implementation of ilocs and isyms in eval.c.
3283 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3284 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3285 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
3286 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
3289 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
3290 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
3291 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
3292 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
3293 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
3294 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
3295 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
3298 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
3299 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
3300 Extracted printing of ilocs and isyms to guile internal functions
3301 scm_i_print_iloc, scm_i_print_isym of eval.c.
3303 2004-04-22 Kevin Ryde <user42@zip.com.au>
3305 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3307 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3308 rounding in x+0.5 when x is a big value already an integer. In
3309 certain hardware rounding cases x+0.5 can give an adjacent integer,
3310 leading to that as the result, when we really just wanted x itself.
3312 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3314 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3316 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3317 added const qualifiers, cast intentionally unused expressions to
3318 void for emphasis, improved comment.
3320 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3322 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3323 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3324 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3325 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3326 Defined the tc8-tag for flags to be 0x04, which will mean that
3327 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3328 to the reduced number of bits and the simpler bit pattern for
3329 SCM_BOOL_F, certain machines may be able to use more efficient
3330 processor instructions to deal with SCM_BOOL_F.
3332 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3333 never been defined in a released version, thus no need to
3336 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3337 instead of tc9 tags.
3339 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3342 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3343 could have used this definition.
3345 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3346 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3347 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3348 as isyms, as special isyms don't exist any more.
3350 2004-04-18 Kevin Ryde <user42@zip.com.au>
3352 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3355 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3356 explicit swapping code.
3358 2004-04-15 Kevin Ryde <user42@zip.com.au>
3360 * cpp_sig_symbols.in: Add SIGSYS.
3362 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3365 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3366 frac/big and frac/frac, use scm_less_p for exact comparison.
3368 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3371 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3373 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3375 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3377 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3378 scm_c_{up,down}case.
3379 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3380 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3382 2004-04-06 Kevin Ryde <user42@zip.com.au>
3384 * numbers.c (scm_ash): Remove stray "}" in docstring.
3386 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3387 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3388 calling mpz_cmp_ui in most cases.
3390 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3391 for big == abs(most-negative-fixnum) special case.
3392 (abs_most_negative_fixnum): Remove, no longer used.
3394 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3395 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3396 calling (sigaction NSIG).
3398 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3399 and fork error cases to do this.
3401 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3403 * eval.c (CEVAL): Don't distinguish between short and long
3404 instructions when dispatching - just always dispatch on the
3405 instruction code, which is common for short and long instructions.
3406 Further, removed unnecessary goto statements and added comment.
3408 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3410 * eval.c (scm_unmemocopy): Don't distinguish between short and
3411 long instructions when dispatching - just always dispatch on the
3412 instruction code, which is common for short and long instructions.
3413 Further, removed unnecessary goto statements, fixed indentation
3414 and replaced SCM_IMP predicates by SCM_NULLP.
3416 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3418 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3419 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3422 2004-03-31 Kevin Ryde <user42@zip.com.au>
3424 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3426 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3428 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3431 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3432 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3433 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3434 single interface that also matches the naming conventions.
3435 Probably scm_debug_mode_p should be part of the private interface
3438 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3439 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3440 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3441 to scm_debug_mode_p.
3444 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3446 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3447 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3448 from debug.h to eval.h.
3450 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3451 more, just leave it with setting scm_debug_mode_p, which is
3452 equivalent for practical purposes.
3454 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3455 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3457 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3459 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3460 static and renamed it to ceval throughout. Provide a new exported
3461 but deprecated function scm_ceval as a wrapper for backwards
3462 compatibility. The same is done for the deval/scm_deval pair of
3465 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3466 throughout. Defined CEVAL to ceval or deval, based on compilation
3469 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3470 to ceval and deval instead of calling *scm_ceval_ptr.
3472 * eval.c (dispatching_eval): New deprecated static function.
3474 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3475 to emulate its old behaviour as closely as possible.
3478 Change the evaluator such that only expressions for which pair? is
3479 true are passed to CEVAL, and such that all other expressions are
3480 evaluated outside of CEVAL:
3482 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3483 expression that is assumed to be memoized already. All but
3484 expressions of the form '(<form> <form> ...)' are evaluated inline
3485 without calling an evaluator.
3487 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3488 expressions of the form '(<form> <form> ...)' inline without
3489 calling an evaluator.
3491 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3492 the special case of unmemoized symbols passed on the top level.
3494 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3495 is known that the expression passed to CEVAL is of the form
3496 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3497 now it is known that the input expression of CEVAL is a pair.
3499 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3501 * eval.c (is_self_quoting_p): New static function.
3503 (scm_m_quote): Use is_self_quoting_p.
3505 (copy_tree): Corrected typo in comment.
3507 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3509 * eval.c (s_scm_copy_tree): idem.
3511 * list.c (s_scm_filter): remove "pointer" from doc string.
3513 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3515 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3517 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3518 (display_frame): idem.
3519 (display_backtrace_file_and_line): idem.
3521 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3524 2004-03-26 Kevin Ryde <user42@zip.com.au>
3526 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3528 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3529 big==0 since that never occurs.
3531 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3532 scm_modular_expt, matching scheme level name `modulo-expt'.
3534 * numbers.c (scm_modular_expt): Return a negative remainder for a
3535 negative divisor, the same as `modulo' does.
3537 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3539 * numbers.c, numbers.h (scm_modular_expt): New function.
3541 2004-03-25 Kevin Ryde <user42@zip.com.au>
3543 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3544 return inexact as required by r5rs.
3546 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3548 * eval.c: Separated some definitions relevant for execution from
3549 the memoization part of the file.
3551 (copy_tree): New static function
3553 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3554 structures are detected now and will lead to an exception instead
3555 of forcing guile to run in an endless loop, using up all the
3556 system's memory. Second, arrays in the cdr of an improper list
3557 are now copied. See the new test cases in eval.test.
3559 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3561 * posix.c (scm_gethostname): Make sure len is initialised before
3562 it is used. Restructured to (hopefully) represent possible
3563 configurations more clearly in the code. Added unwind handler.
3565 2004-03-23 Kevin Ryde <user42@zip.com.au>
3567 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3568 MAXHOSTNAMELEN when available.
3570 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3572 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3573 terminator. Rewritten the logic as a state machine, I must have
3574 been doing too much VHDL lately...
3576 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3577 themselves. Thanks to Han-Wen Nienhuys!
3579 * list.c: Changed docstrings so that they no longer talk about
3580 returning 'pointers' to something.
3582 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3584 * gc.c: remove set_debug_cell_accesses! when
3585 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3586 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3587 debugging conditionally.
3589 2004-03-21 Kevin Ryde <user42@zip.com.au>
3591 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3593 2004-03-20 Kevin Ryde <user42@zip.com.au>
3595 * posix.c (scm_gethostname): Preserve errno across free() call.
3597 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3599 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3602 2004-03-14 Kevin Ryde <user42@zip.com.au>
3604 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3605 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3607 2004-03-07 Kevin Ryde <user42@zip.com.au>
3609 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3611 (filltime): Make zname parameter "const".
3613 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3615 * threads.c, threads.h (scm_c_scm2thread): New function.
3617 2004-02-29 Kevin Ryde <user42@zip.com.au>
3619 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3620 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3621 particular don't assume "defined (__alpha__) && ! defined (linux)"
3622 means OSF. Remove "SCO" code, which was not really SCO specific and
3623 which John W. Eaton advises should be long past being needed.
3625 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3628 2004-02-24 Kevin Ryde <user42@zip.com.au>
3630 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3632 2004-02-22 Kevin Ryde <user42@zip.com.au>
3634 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3635 complex, same as for two args. (Handle only inum, big, real, frac).
3637 2004-02-21 Kevin Ryde <user42@zip.com.au>
3639 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3640 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3641 Reported by Andreas Voegele.
3643 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3645 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3648 * read.c (scm_lreadparen): Removed.
3649 (scm_lreadparen1): Renamed scm_i_lreadparen.
3651 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3653 * list.c (scm_list_n): validate non-immediate arguments;
3654 this will catch forgotten a SCM_UNDEFINED.
3656 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3658 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3659 Thanks to Bill Schottstaedt!
3661 * socket.h (scm_gethost): Removed prototype it is already in
3662 "net_db.h". Thanks to Bill Schottstaedt!
3664 2004-02-18 Kevin Ryde <user42@zip.com.au>
3666 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3667 order parameter to mpz_import, in fact with just one word there's no
3668 order to worry about at all.
3670 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3671 and frac==complex, make an exact comparison rather than converting
3672 with fraction2double.
3674 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3675 shared library, since environ is not directly available there.
3677 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3680 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3681 errno EINVAL in case localtime and gmtime don't set it.
3682 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3683 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3685 2004-02-16 Kevin Ryde <kevin@swox.se>
3687 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3688 which were permitted in the past for these.
3690 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3691 previous change to numbers.c.
3693 * script.c (scm_shell_usage): Print bug-guile email address, as per
3694 GNU standard. Reported by Han-Wen Nienhuys.
3696 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3698 * unif.c (scm_make_uve): Removed local variable and simplified
3699 code in order to avoid compiler used uninitialized warnings.
3701 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3703 (scm_hash_fold): Use scm_call_3 directly in the call to
3704 scm_internal_hash_fold instead of going via fold_proc (which is
3706 (scm_hash_for_each): Use a trampoline +
3707 scm_internal_hash_for_each_handle.
3708 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3711 2004-02-12 Kevin Ryde <user42@zip.com.au>
3713 * ports.c (scm_port_line): In docstring, note first line is 0.
3714 (scm_set_port_line_x): In docstring, note first line is 0.
3715 (scm_port_column): In docstring, there's no default to current input
3716 port, and remove shared port-line @defun.
3717 (scm_set_port_column_x): In docstring, there's no default to current
3718 input port, note first column is 0, remove shared set-port-line!
3721 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3722 convert args the same way that array-set! does.
3724 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3726 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3727 for "l" not "s", fix dvect to be false for singp(prot) since such a
3729 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3730 (exactly_one_third): New variable.
3731 (scm_init_unif): Initialize it.
3733 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3735 * read.c (scm_read_opts): Change `escaped-parens' to
3738 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3740 * read.c (scm_read_opts): New opts `elisp-vectors' and
3743 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3744 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3745 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3746 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3747 `escaped-parens' option set.
3748 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3750 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3751 (scm_lreadparen1): New.
3753 * read.h: Remove conditionally compiled last arg to
3755 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3757 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3759 * eval.c (m_expand_body): remove stray variable new_body.
3761 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3763 * eval.c (m_expand_body): Rewrite the expression in place (by
3764 overwriting FORMS) also when a letrec is constructed, not only
3765 when no definitions are found. Do not return rewritten expression
3766 to emphasize the in-place rewriting. Changed all users.
3768 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3770 * gc.c: add protected_object_count, a number that is dumped from
3773 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3775 * dynwind.h, dynwind.c (scm_frame_unwind,
3776 scm_frame_unwind_handler): Renamed and changed all uses.
3777 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3779 2004-01-11 Kevin Ryde <user42@zip.com.au>
3781 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3782 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3783 changes made to scheme-compound.texi.
3785 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3787 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3788 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3790 * guile-snarf.in: Use mkdir to create a unique temporary directory
3791 that we can safely use. Thanks to Stefan Nordhausen!
3793 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3795 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3796 argument since it is always zero now. Changed all callers.
3797 Removed code for handling fluids.
3799 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3800 the wind chain explicitely. Use scm_c_with_fluid for the common
3801 case of only one fluid.
3802 (scm_with_fluid): New.
3803 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3805 * fluids.h, fluids.c (scm_frame_fluid): New.
3806 (scm_with_fluid): New.
3807 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3809 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3810 do the unwinding directly. It is simple enough.
3812 * dynwind.h, dynwind.c: Did the following renamings:
3813 scm_begin_frame -> scm_frame_begin,
3814 scm_end_frame -> scm_frame_end,
3815 scm_on_unwind -> scm_frame_unwind,
3816 scm_on_rewind -> scm_frame_rewind,
3817 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3818 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3821 * aync.h, async.c: Did the follwing renamings:
3822 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3823 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3826 * ports.h, ports.c: Did the follwing renamings:
3827 scm_with_current_input_port -> scm_frame_current_input_port,
3828 scm_with_current_output_port -> scm_frame_current_output_port,
3829 scm_with_current_error_port -> scm_frame_current_error_port.
3832 2004-01-07 Kevin Ryde <user42@zip.com.au>
3834 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3835 Reported by Richard Todd.
3837 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3838 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3840 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3841 traversing the args list, fixes segv if an improper list is given.
3842 Reported by Rouben Rostamian.
3844 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3846 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3847 swap_data on stack, use a 'malloc obj'.
3849 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3850 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3851 scm_i_... since they are internal. Changed all uses.
3853 * dynwind.c (frame_print): Removed, use the default printer.
3854 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3855 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3856 to protect SCM values.
3858 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3859 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3861 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3863 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3865 * ports.h, ports.c (scm_with_current_input_port,
3866 scm_with_current_output_port, scm_with_current_error_port): New.
3868 * async.h, async.c (scm_with_blocked_asyncs,
3869 scm_with_unblocked_asyncs): New.
3871 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3873 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3874 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3876 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3877 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3878 function when the outermost wind point has been reached. The
3879 latter is used to copy a continuation stack at the right time.
3880 scm_dowinds remains available.
3881 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3882 tc16_guard, guards_print): Removed.
3883 (scm_internal_dynamic_wind): Reimplemented using frames.
3885 * continuations.c (copy_stack): New, do only the stack copying
3886 part of copy_stack_and_call.
3887 (copy_stack_and_call): Copy the stack after unwinding and before
3889 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3890 copy_stack_and_call.
3892 2004-01-04 Kevin Ryde <user42@zip.com.au>
3894 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3895 can give bad results due to rounding.
3897 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3898 setzone/restorezone protection for DOS.
3900 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3902 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3903 and scm_t_uintmax to be defined in scmconfig.h
3905 2003-12-03 Kevin Ryde <user42@zip.com.au>
3907 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3909 * numbers.c (scm_make_ratio): Check for numerator equal to
3910 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3913 * numbers.c (scm_real_part): Return fraction unchanged rather than
3914 converting to flonum.
3916 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3918 * modules.c (module_variable): Fixed (and thus simplified) the
3919 definition of SCM_BOUND_THING_P to reflect the fact that since
3920 after the 1.4 series of guile, obarrays only hold variable
3923 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3925 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3929 * read.c (scm_lreadr): Signal an error for invalid escape
3930 sequences in strings. Code cleanups too.
3932 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3933 writing control characters in strings.
3935 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3937 * ports.c (scm_drain_input): Bug fix: only access the port after
3938 checking that it indeed is one.
3940 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3942 * eval.c (s_bad_define): New static identifier.
3944 (m_body): Fixed comment.
3946 (scm_m_define): Don't generate memoized code for definitions that
3947 are not on the top level. As a consequence, no memoized code at
3948 all is generated for definitions any more: Top level definitions
3949 are executed immediately during memoization and internal
3950 definitions are handled separately in m_expand_body.
3952 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3953 definitions. Consequently, there is no unmemoizing code any more
3954 that might modify the environment. Thus, the old scm_unmemocopy
3955 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3957 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3958 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3959 over SCM_NIMP in places, where the argument is known to be part of
3962 2003-11-21 Kevin Ryde <user42@zip.com.au>
3964 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3967 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3968 to share some shifting.
3970 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3971 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3974 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3976 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3977 structure. Previously, not all cases with a negative denominator
3980 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3981 scm_divide2real when forming the fractional part. This allows
3982 "#e1.2" to yield 6/5.
3984 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3985 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3986 fractions were equal to each other regardless of value. Ooops.
3988 * numbers.c (scm_rationalize): Return an inexact result when given
3991 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3994 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3996 Support for exact fractions from Bill Schottstaedt! Thanks!
3998 * print.c (scm_iprin1): Handle fractions.
4000 * objects.h (scm_class_fraction): New.
4001 * objects.c (scm_class_fraction): New.
4002 (scm_class_of): Handle fractions.
4004 * hash.c (scm_hasher): Handle fractions.
4006 * numbers.c: New code for handling fraction all over the place.
4007 (scm_odd_p, scm_even_p): Handle inexact integers.
4008 (scm_rational_p): New function, same as scm_real_p.
4009 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
4010 New exact functions that replace the inexact 'dsubr'
4012 (scm_numerator, scm_denominator): New.
4014 * numbers.h (SCM_NUMP): Recognize fractions.
4015 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
4016 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
4017 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
4018 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
4019 SCM_FRACTION_REDUCED): New.
4020 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
4022 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
4023 scm_rational_p): New prototypes.
4024 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
4025 scm_i_print_fraction): New prototypes.
4027 * goops.c (create_standard_classes): Create "<fraction>" class.
4029 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
4031 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
4032 case in the switch, but do nothing for now.
4034 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
4035 to doubles when calling 'dsubr' functions.
4037 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
4039 2003-11-18 Rob Browning <rlb@defaultvalue.org>
4041 * gen-scmconfig.c (main): remove public definition of
4042 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
4043 direct typedef of long_long and ulong_long inside deprecated block
4046 * deprecated.h: move long_long and ulong_long definitions to
4047 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
4048 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
4050 2003-11-17 Marius Vollmer <mvo@zagadka.de>
4052 * hash.c (scm_string_hash): New hashing algorithm that takes the
4053 complete string into account.
4055 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
4056 is a list. This allows (@ ...) to work with set!.
4057 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
4060 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
4061 the "-e" option instead of scm_str2symbol. This allows things
4062 like (@ ...) to be specified for the entry point.
4064 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4066 * eval.c (scm_m_letstar): Create memoized code in place to
4069 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4071 * eval.c (s_splicing): Commented and reformulated.
4073 (lookup_global_symbol, lookup_symbol): New static functions.
4075 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
4077 (try_macro_lookup, literal_p): Use lookup_symbol instead of
4078 creating a temporary pair for scm_lookupcar.
4080 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
4081 created deprecated wrapper function scm_unmemocar.
4083 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
4084 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
4085 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
4086 undefineds, sym_three_question_marks): Moved around without
4089 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
4091 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4093 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
4094 m_expand_body, scm_m_expand_body): Grouped together with m_body.
4095 No further modifications.
4097 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4099 * eval.c (s_mixed_body_forms): New static identifier.
4101 (canonicalize_define, scm_m_define): The check for a bad
4102 expression is performed in canonicalize_define now.
4104 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
4105 static helper functions for m_expand_body.
4107 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
4108 expand user defined macros. Fixed handling of the definition/
4109 expression boundary. Fixed handling of definitions grouped with
4110 'begin. Use canonicalize_define to expand definitions.
4112 2003-11-13 Marius Vollmer <mvo@zagadka.de>
4114 * read.c (scm_lreadr): detect EOF after backslash, and interpret
4115 \xNN hexadecimal sequences. From Paul Jarc, thanks!
4117 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
4118 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
4119 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
4120 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
4121 New macros from Paul Jarc. Thanks!
4123 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
4124 return NULL when the machine type is unknown. Previously,
4125 gc_os_dep.c would refuse to compile.
4127 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4129 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
4130 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
4131 scm_m_body to m_body.
4133 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4135 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
4136 public use of scm_m_expand_body in eval.h. In eval.c, renamed
4137 scm_m_expand_body to m_expand_body and made it static. Added
4138 deprecated wrapper scm_m_expand_body.
4140 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
4141 of scm_m_expand_body.
4143 2003-11-09 Kevin Ryde <user42@zip.com.au>
4145 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
4146 argument. Reported by Mike Gran.
4148 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4150 * eval.c (s_missing_body_expression): New static identifier.
4154 (scm_m_expand_body): Fixed core dump when passing a body with
4155 defines, but without expressions (see additions to syntax.test).
4156 Use ASSERT_SYNTAX to signal syntax errors.
4158 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4160 * eval.c (canonicalize_define): New static helper function.
4162 (memoize_define, canonicalize_define): Extract handling of
4163 function currying to canonicalize_define.
4165 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4167 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4168 Make sure that error checking in debug mode is not worse than in
4171 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4173 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
4174 handled in scm_m_body any more, but rather in scm_m_lambda.
4176 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
4177 scm_m_letrec, scm_m_expand_body): Check for validity is done by
4178 calling functions of scm_m_body.
4180 (scm_m_lambda): Avoid unnecessary consing when creating the
4183 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4185 * eval.c (s_expression): Added comment.
4187 (s_empty_combination, error_unbound_variable): New static
4190 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
4191 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
4192 signal syntax errors.
4194 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
4197 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4199 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
4200 Grouped together with unmemocopy, without modifications.
4202 (build_binding_list, unmemocopy): Renamed names of list arguments
4203 and variables to reflect the actual order of the list elements.
4205 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4207 * eval.c (s_defun): New static identifier.
4209 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
4210 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4211 when creating the memoized code.
4213 2003-10-19 Kevin Ryde <user42@zip.com.au>
4215 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
4217 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
4218 in accordance with R5RS, which just mpz_get_d doesn't really give.
4220 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4222 * eval.c (s_bad_slot_number): New static identifier.
4224 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
4225 signal syntax errors. Avoid unnecessary consing when creating the
4228 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4230 * eval.c (scm_m_cont, scm_m_at_call_with_values,
4231 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
4232 errors. Avoid unnecessary consing when creating the memoized
4235 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
4236 standard case. Make sure line and file information are copied to
4237 every created expression.
4239 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4241 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
4242 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4243 when creating the memoized code.
4245 (scm_m_atbind): Reversed the order, in which the init expressions
4246 are stored and executed. The order of execution is now equal to
4247 the order in which the initializers of the let-forms are executed.
4248 Use check_bindings and transform_bindings.
4250 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
4251 !SCM_NULLP. Added some comments.
4253 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4255 * eval.c: Sorted include files alphabetically.
4257 (scm_m_begin): Added comment.
4259 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4260 unnecessary consing when creating the memoized code.
4262 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
4263 syntax errors. Be more specific about the kind of error that was
4266 (scm_m_quote, unmemocopy): As an optimization, vector constants
4267 are now inserted unquoted into the memoized code. During
4268 unmemoization the quotes are added again to provide syntactically
4271 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4273 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
4274 scm_m_expand_body, check_bindings): Extracted syntax checking of
4275 bindings to new static function check_bindings.
4277 (scm_m_let, memoize_named_let): Extracted handling of named let to
4278 new static function memoize_named_let.
4280 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
4281 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
4282 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
4283 unnecessary consing when creating the memoized code.
4285 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4287 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4290 (s_clauses, s_formals, s_duplicate_formals): Removed.
4292 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
4293 specific about the kind of error that was detected. Prepare for
4294 easier integration of changes for separated memoization.
4296 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4298 * eval.c (s_duplicate_binding): New static identifier.
4300 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4302 (scm_m_define): Added comment about how we check for duplicate
4305 (scm_m_do): Added check for duplicate bindings.
4307 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4308 unnecessary consing when creating the memoized code.
4310 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4311 scm_c_improper_memq to c_improper_memq, since it is not exported.
4313 (transform_bindings): Call scm_c_memq rather than
4314 scm_c_improper_memq.
4316 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4318 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4320 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4323 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4324 specific about the kind of error that was detected. Avoid use of
4325 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4326 code, this way also making sure that file name, line number
4327 information etc. remain available.
4329 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4331 * eval.c (memoize_as_thunk_prototype): New static function.
4333 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4334 Avoid unnecessary consing when creating the memoized code.
4336 2003-10-12 Kevin Ryde <user42@zip.com.au>
4338 * list.c (scm_append): Track argument number and use in error.
4340 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4342 * eval.c (s_missing_expression, s_bad_variable): New static
4345 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4346 R5RS terminology for the naming of variables. Be more specific
4347 about the kind of error that was detected. Make sure file name,
4348 line number etc. are added to all freshly created expressions.
4349 Avoid unnecessary consing when creating the memoized code.
4351 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4353 * eval.c (s_extra_expression, s_misplaced_else_clause,
4354 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4356 (s_extra_case_clause): Removed.
4358 (scm_m_case, scm_m_cond): If a clause appears after an else
4359 clause, report a misplaced else clause.
4361 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4362 specific about the kind of error that was detected. Handle bound
4363 'else and '=>. Avoid unnecessary consing when creating the
4366 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4367 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4368 syntactic keyword '=>.
4370 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4372 * eval.c (scm_m_case): Allow empty lists of case labels.
4374 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4376 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4378 * print.c (scm_isymnames): Add names for the new memoizer codes.
4380 * eval.c (s_missing_clauses, s_bad_case_clause,
4381 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4382 literal_p): New static identifiers.
4384 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4385 specific about the kind of error that was detected. Check for
4386 duplicate case labels. Handle bound 'else. Avoid unnecessary
4387 consing when creating the memoized code.
4389 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4390 the syntactic keyword 'else.
4392 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4394 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4395 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4397 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4398 unnecessary consing when creating the memoized code.
4400 2003-10-09 Kevin Ryde <user42@zip.com.au>
4402 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4403 cast gives for values bigger than a long, or for nan or inf.
4405 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4407 * smob.h (scm_make_smob_type): Made the declaration match the
4410 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4412 * goops.c, objects.h, smob.c, smob.h: Make type names char
4413 const * instead of char *. Thanks to Paul Jarc!
4415 2003-10-02 Kevin Ryde <user42@zip.com.au>
4417 * strports.c (scm_call_with_output_string): scm_get_output_string
4418 rather than scm_strport_to_string, so as to guard against the port
4419 having been closed by the called procedure. Reported by Nic Ferrier.
4421 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4423 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4425 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4426 tags.h to deprecated.h.
4428 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4430 This set of patches introduces a new tc7 code scm_tc7_number for
4431 numbers. Bignums, reals and complex numbers are turned from smobs
4432 into subtypes of scm_tc7_number.
4434 * tags.h (scm_tc7_number): New.
4436 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4437 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4438 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4439 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4440 (scm_class_of), print.c (scm_iprin1), smob.c
4441 (scm_smob_prehistory): Don't handle bignums, reals and complex
4442 numbers as subtypes of scm_tc7_smob any more.
4444 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4445 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4447 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4449 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4450 sizeof (scm_t_complex) to determine the memory size of the
4451 malloc'd area for complex numbers.
4453 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4455 * numbers.c (scm_bigequal): Fixed.
4457 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4459 * stime.c (scm_current_time): 'time' does not set errno so don't
4460 use SCM_SYSERROR for reporting errors.
4462 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4464 This set of patches eliminates the dependency between the
4465 implementation of evaluator specific memoization codes and special
4466 constants like #f, '() etc. ('flags'), which are not evaluator
4467 specific. The goal is to remove definitions of evaluator
4468 memoization codes completely from the public interface. This will
4469 make it possible to experiment more freely with optimizations of
4470 guile's internal representation of memoized code.
4472 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4474 * print.c (iflagnames): New array, holding the printed names of
4475 guile's special constants ('flags').
4477 (scm_isymnames): Now holds only the printed names of the
4480 (scm_iprin1): Separate the handling of memoization codes and
4481 guile's special constants.
4483 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4486 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4487 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4488 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4489 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4490 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4493 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4495 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4496 tc9 macros and scm_tc9_flag.
4498 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4500 * posix.c (scm_setgroups): Check that the gid list is not too
4501 long. Thanks to Paul Jarc!
4503 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4505 * tags.h: Reduced the number of short instructions from 14 to 13.
4506 The typecode of the former 14th short instruction is now used to
4507 represent long instructions. Changed some comments to reflect
4510 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4511 previously used by SCM_IM_DEFINE.
4513 (SCM_IM_DEFINE): Turned into a long instruction.
4515 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4518 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4519 code that is separate from all instructions, one level of dispatch
4520 for long instructions can be eliminated.
4522 * print.c (scm_isymnames): Removed some commented code.
4524 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4526 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4529 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4531 * modules.c (scm_module_reverse_lookup): Check that the obarray
4532 really is a hashtable and do nothing if not.
4534 * inline.h: Use "extern inline" only with GCC. Use "static
4537 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4539 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4540 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4542 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4543 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4546 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4548 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4549 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4551 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4552 0.0==some_expression to some_expression==0.0. The latter is
4553 better readable. The former is preferred by some people, since it
4554 leads to a compiler error when confusing == with =. However, when
4555 using gcc, a warning will be issued if in an if-statement an
4556 assigment appears. Since many Guile developers are using gcc,
4557 such errors will not remain unnoticed anyway. We can therefore
4558 focus on better readability.
4560 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4562 * tags.h: Added description of Guile's type system. Removed some
4563 old and misleading comments.
4565 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4567 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4568 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4570 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4572 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4574 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4575 respective SLOPPY macro.
4577 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4579 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4580 type string, not SCM_TYP7S.
4582 2003-09-03 Kevin Ryde <user42@zip.com.au>
4584 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4587 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4588 current timezone requiring SCM_DEFER_INTS.
4590 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4592 * script.c (scm_compile_shell_switches): Make -s switch optional
4593 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4594 VanDevender for the patch!)
4596 2003-08-30 Kevin Ryde <user42@zip.com.au>
4598 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4599 and to have non-integer types rejected as per other logical funcs.
4601 2003-08-28 Kevin Ryde <user42@zip.com.au>
4603 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4605 2003-08-23 Kevin Ryde <user42@zip.com.au>
4607 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4608 thread safe, and could take a long time too.
4610 2003-08-22 Kevin Ryde <user42@zip.com.au>
4612 * numbers.c (scm_difference): Correction to bignum - negative inum.
4614 2003-08-14 Kevin Ryde <user42@zip.com.au>
4616 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4617 [__GNUC__]: Use volatile asm macros rather than a function call.
4618 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4619 macros while defining functions.
4621 * simpos.c (getenv): Use <stdlib.h> for prototype.
4622 (scm_system): In docstring, refer to status:exit-val rather than
4625 2003-08-09 Kevin Ryde <user42@zip.com.au>
4627 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4628 list set by source-properties! rather than an SRCPROPS object,
4630 2003-07-29 Kevin Ryde <user42@zip.com.au>
4632 * properties.c (scm_primitive_property_ref): In docstring, note
4633 parameters to not-found-proc, use hyphens rather than underscores for
4634 that parameter name.
4635 (scm_primitive_property_set_x): In docstring, VAL is the value
4638 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4640 * print.c (scm_print_symbol_name): handle more weird characters by
4641 escaping the symbol name properly. Thanks to Paul Jarc!
4643 * posix.h (scm_setgroups): New prototype.
4644 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4645 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4646 Don't use SCM_WRITABLE_VELTS.
4648 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4649 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4652 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4653 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4654 compiles when SCM_C_INLINE is undefined.
4656 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4658 * __scm.h: Reformulated the architecture and compiler properties
4659 in terms of properties of scm_t_bits and SCM variables rather than
4660 in terms of c standard types. This is since it is not known which
4661 of the standard types scm_t_bits and SCM variables will be defined
4664 2003-07-24 Kevin Ryde <user42@zip.com.au>
4666 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4669 2003-07-18 Kevin Ryde <user42@zip.com.au>
4671 * numbers.c (scm_product): In complex * bignum, correction to
4672 REAL/IMAG fetch, x is the complex, not y.
4674 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4676 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4677 scm_inf_p test as Scheme values.
4678 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4679 and a positive inum.
4680 Use GNU indentation style.
4682 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4684 * values.c (scm_values): Build lists of length 1 by using
4685 scm_list_1 instead of using scm_cons.
4687 2003-07-10 Kevin Ryde <user42@zip.com.au>
4689 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4690 * list.c (scm_list_n): Ditto.
4692 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4694 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4696 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4697 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4698 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4699 the other using intptr_t.
4701 2003-07-08 Kevin Ryde <user42@zip.com.au>
4703 * numbers.c (scm_make_polar): Use sincos, when available.
4704 (scm_magnitude): Use hypot.
4706 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4707 @footnote since it doesn't go through to guile-procedures.txt.
4709 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4710 outside @var to quieten makeinfo, and use @code.
4712 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4714 * gc-malloc.c (decrease_mtrigger): new function
4715 (increase_mtrigger): new function, separate debug registering and
4716 mtrigger administration.
4717 (scm_gc_realloc): bugfix: do mtrigger administration before the
4718 actual realloc, for the realloc might invalidate a GC-d segment of
4719 memory. Thanks to Sam Hocevar for pointing this out.
4720 (scm_gc_realloc): use scm_malloc_reregister instead of
4721 unregistering and registering in sequence.
4723 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4725 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4727 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4729 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4732 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4734 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4735 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4736 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4737 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4738 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4739 the release_1_6 branch.
4741 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4743 * continuations.c: Redeclaration of getcontext() via the
4744 __asm__ ("getcontext") directive.
4746 * continuations.h: Include <ucontext.h> instead of
4749 2003-06-21 Kevin Ryde <user42@zip.com.au>
4751 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4752 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4753 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4755 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4756 (isfinite): Remove, conflicts with C99 isfinite().
4758 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4760 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4761 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4762 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4763 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4764 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4765 the release_1_6 branch.
4767 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4769 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4770 to be functions instead of macros.
4772 * threads.c: Conditionalized inclusion of <sys/time.h> and
4774 (scm_getspecific, scm_setspecific): Made these two function
4775 real part of the API.
4777 * posix.c (s_scm_putenv): Added some code to make a
4778 (putenv "FOO="), i.e. setting an empty string, work also on
4779 Win32 systems. Thanks to Kevin Ryde for the proposal.
4781 2003-06-12 Kevin Ryde <user42@zip.com.au>
4783 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4784 freebsd to comment about need to use unsetenv.
4786 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4788 * ports.c (scm_peek_char): Safe the column of the port around the
4789 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4791 2003-06-07 Kevin Ryde <user42@zip.com.au>
4793 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4794 and friends required by scm_t_bits setups.
4796 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4798 * tags.h (scm_tc2_int): Added.
4800 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4803 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4804 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4806 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4808 * eval.c: Partially undid my patch from 2003-05-31. This patch
4809 caused the segfault referenced in the previous changelog entry.
4811 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4813 * tags.h: Fixed comment about the immediate type code layout.
4815 * eval.c: Fixed handling of non-special instructions. Without
4816 this patch, guile will segfault on (#\0) and similar instructions.
4818 2003-06-05 Kevin Ryde <user42@zip.com.au>
4820 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4821 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4823 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4824 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4826 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4828 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4829 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4830 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4831 generalized it to apply not only to C level functions but also to
4832 scheme level functions.
4834 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4835 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4836 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4837 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4838 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4841 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4842 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4843 eval.h into eval.c and a copy is placed into deprecated.h.
4845 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4846 into eval.c. This definition was not part of the API in any
4847 officially released version of guile and thus does not need to go
4848 through a phase of deprecation.
4850 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4852 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4853 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4854 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4855 definitions are make static and renamed from scm_s_xxx to s_xxx.
4856 In deprecated.c the original definitions are copied.
4858 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4859 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4860 eval.h into eval.c and a copy (slightly modified to work in user
4861 code) is placed into deprecated.h.
4863 * eval.c: Use the local static s_xxx definitions instead of the
4864 scm_s_xxx definitions throughout.
4866 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4868 This set of patches separates the representation of the cxr family
4869 of functions (car, cdr etc.) from the dsubr family of functions
4870 (i. e. functions that take a double precision floating point
4871 argument). Further, the algorithm for handling the cxr function
4874 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4875 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4876 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4877 cosh, tanh), objects.c (scm_class_of), procprop.c
4878 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4879 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4880 typecode for the dsubr family of functions.
4882 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4885 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4886 (scm_init_pairs): Make use of the (now usable) second cell element
4887 of a scm_tc7_cxr function to implement the cxr family of functions
4890 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4892 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4893 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4894 end of an if-else-if-sequence of checks.
4896 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4898 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4899 execution. Generalize apply_closure to apply_proc and use that
4900 for call-with-values.
4902 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4904 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4907 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4909 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4910 appropriately for mingw32 hosts.
4912 * numbers.h: Defining copysign(), isnan() and finite() to
4913 be prefixed by a single '_' for mingw32 hosts.
4915 2003-05-30 Kevin Ryde <user42@zip.com.au>
4917 * numbers.c (z_negative_one): New variable.
4918 (scm_init_numbers): Initialize it.
4919 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4921 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4923 * win32-dirent.c: Use malloc() instead of scm_malloc().
4925 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4928 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4931 * modules.c (s_scm_module_import_interface): Renamed local
4932 variable interface to _interface. Seems like 'interface'
4933 is a special compiler directive for the mingw32 compiler.
4935 * mkstemp.c: Provide prototype to avoid compiler warning.
4937 * load.c (s_scm_search_path): Fixed absolute and relative
4938 path detections for native Windows platforms.
4940 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4941 to build on mingw32).
4943 * gc-freelist.c ("s_scm_map_free_list",
4944 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4946 * fports.c (fport_fill_input): Disable use of
4947 fport_wait_for_input() on Win32 platforms.
4949 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4951 * Makefile.am: Modified some rules for cross compiling.
4953 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4955 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4956 proper function object and the correct number of arguments are now
4957 performed in the application part of SCM_CEVAL.
4959 (scm_badformalsp): Removed.
4961 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4963 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4965 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4967 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4968 always being false by inserting preprocessor conditional. (Thanks
4971 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4972 (void *) in order to avoid an aliasing warning; thanks to Bruce
4975 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4977 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4980 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4981 thread->base --> t->base.
4983 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4985 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4987 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4988 scm_variable_set_name_hint, scm_builtin_variable,
4989 scm_internal_with_fluids, scm_make_gsubr,
4990 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4991 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4992 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4993 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4994 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4995 scm_make_subr_with_generic, scm_make_subr_opt,
4996 scm_call_catching_errors, scm_make_smob_type_mfpe,
4997 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4998 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4999 branch. Some have been slightly rewritten.
5000 (scm_i_object_chars, scm_i_object_length): New, to support
5001 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
5003 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
5005 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
5006 names and inits in the memoized code of do.
5008 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5010 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
5011 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
5012 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
5013 a compilation error if error-on-warning is enabled).
5015 2003-05-17 Marius Vollmer <mvo@zagadka.de>
5017 * c-tokenize.lex: Gobble up complete lines after a '#'. This
5018 removes preprocessor directives from the snarfage that might
5019 otherwise confuse us. These directives appear when compiling with
5022 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5024 * ChangeLog: add my surname
5026 * srcprop.c (scm_finish_srcprop): use
5027 scm_gc_register_collectable_memory()
5028 (scm_make_srcprops): idem.
5030 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5032 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
5033 wrap-around for scm_mtrigger
5034 (scm_gc_register_collectable_memory): abort on overflowing
5037 2003-05-13 Kevin Ryde <user42@zip.com.au>
5039 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
5040 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
5042 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5044 * backtrace.c (scm_display_error_message): Introduced fancy
5045 printing with max level 7 and length 10. (Purpose: avoid printing
5046 gigantic objects in error messages.)
5048 * print.c, print.h (scm_i_port_with_print_state): New function.
5050 * print.c (scm_iprin1, scm_printer_apply,
5051 scm_port_with_print_state): Use scm_i_port_with_print_state.
5052 (scm_simple_format): Modified not to destroy print states.
5053 (print_state_mutex): New mutex.
5054 (scm_make_print_state, scm_free_print_state, scm_prin1):
5055 Lock/unlock print_state_mutex.
5057 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
5058 Use current names in definitions.
5060 2003-05-10 Kevin Ryde <user42@zip.com.au>
5062 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
5064 * numbers.c (scm_integer_length): On negative bignums, adjust
5065 mpz_sizeinbase to account for it looking at absolute value where we
5066 want ones-complement.
5068 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
5069 since we're only using the ulong return value, and x might not fit.
5071 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5073 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
5074 read. This will allow to make the definition in read.c static.
5076 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5078 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
5079 from evalext to eval. This will allow to make some of the
5080 definitions in eval.c static.
5082 2003-05-06 Kevin Ryde <user42@zip.com.au>
5084 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
5085 (scm_logcount): Use mpz_com, not mpz_neg.
5087 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5089 The purpose of this patch is to make guile's internal memoizers
5090 distinguishable from memoizing macros created on the scheme level
5091 or from user provided primitive memoizing macros. The reason is,
5092 that the internal memoizers are the only ones that are allowed to
5093 transform their scheme input into memoizer byte code, while all
5094 other memoizing macros may only transform scheme code into new
5097 To achieve this, a new macro type 'builtin-macro!' is introduced.
5098 Currently, 'builtin-macro!'s are handled as memoizing macros, but
5099 this will change when the memoizer and executor are separated.
5101 * macros.[ch] (scm_i_makbimacro): New.
5103 * macros.h (SCM_BUILTIN_MACRO_P): New.
5105 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
5107 * eval.c, goops.c: All of guile's primitive memoizing macros are
5108 primitive builtin-macros now.
5110 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
5111 builtin-macros are handled equally to memoizing macros.
5113 2003-05-04 Marius Vollmer <mvo@zagadka.de>
5115 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
5116 work around a bug in GCC 2.95.2 but is now a bug in itself.
5118 2003-05-02 Marius Vollmer <mvo@zagadka.de>
5120 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
5121 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
5122 scm_tcs_symbols): New.
5124 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5126 * deprecated.h, deprecated.c (scm_protect_object,
5127 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
5128 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
5129 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
5130 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
5131 scm_ensure_user_module, scm_load_scheme_module, scm_port,
5132 scm_ptob_descriptor, scm_port_rw_active,
5133 scm_close_all_ports_except): New.
5135 * ports.c (scm_c_port_for_each): New function, mostly copied from
5137 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
5138 * ports.h (scm_c_port_for_each): New prototype.
5140 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5142 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
5143 macro was introduced in anticipation of GOOPS method compilation
5146 * goops.c: Removed binding of @dispatch.
5148 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5150 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
5151 instructions that bind the macros on the scheme level back to
5152 goops.c in order to make sure again that the bindings go into the
5153 (oop goops) module and are not visible from the outside.
5155 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5157 * eval.c: Non functional change: Separated R5RS and non-R5RS
5158 macros into different sections of the file and ordered the
5159 memoizers alphabetically.
5161 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5163 * eval.c (scm_ilookup): Rewritten to improve readability.
5165 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5167 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5168 Partially reverted patch from 2003-04-23 in oder to find a better
5169 compromise between readability and debuggability.
5171 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5173 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
5174 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
5175 definitions of the special goops memoizers from goops.[ch] to
5176 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
5179 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5181 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
5183 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
5185 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
5187 * ioext.c (scm_fdes_to_ports): Ditto.
5189 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
5190 lock/unlock scm_i_port_table_mutex.
5192 * strports.c (scm_mkstrport): Ditto.
5194 * ports.c (scm_void_port, scm_port_for_each): Ditto.
5196 * fports.c (scm_fdes_to_port): Ditto.
5198 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5200 This set of patches contains no functional changes, only debatable
5201 minor stylistic ones. Still, in order to prepare a patch between
5202 my local copy and the CVS version, I decided to submit the changes
5203 below. Then, the patch will hopefully only contain relevant
5206 * eval.c (iqq): Added const specifier.
5208 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5209 Use NULL instead of 0 to indicate that a pointer is returned.
5210 Removed some misleading 'fall through' comments.
5212 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5213 Split up long expressions into smaller ones to be more debugging
5216 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5218 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
5219 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
5220 rather than casting to SCM.
5222 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5224 * sort.c, pairs.h: Removed unnecessary includes.
5226 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5228 * sort.c: Replaced hand-made trampline code by the new official
5229 mechanism from eval.c. This fixes a segfault in the new test file
5232 (quicksort, compare_function, scm_restricted_vector_sort_x,
5233 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
5234 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
5235 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
5236 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
5239 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
5240 cmp_fun_t): Removed.
5242 (compare_function): Added.
5244 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
5245 arithmetics with index arithmetics. Changed quicksort to work on
5246 an array of SCM values instead of an array of characters. Avoid
5247 bytewise copying of SCM elements. Avoid allocating memory on the
5248 stack with alloca. Fixed some comments.
5250 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5252 * eval.c (EXTEND_ENV): Eliminated.
5254 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
5257 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5259 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
5261 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
5262 compiling with SCM_DEBUG==1 by moving definition behind prototype.
5264 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
5265 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
5266 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
5267 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
5268 functions such that they check if the object is a non-immediate.
5269 Further, renamed identifiers to use the scm_dbg_ prefix and made
5270 their inclusion into the lib dependent of the
5271 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
5273 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5275 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
5278 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5280 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
5281 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
5282 any calls to SCM_NCONSP any more.
5284 * unif.c (l2ra): Eliminate redundant check.
5286 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5288 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
5289 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
5290 SCM_NNULLP. Now, guile itself does not include any calls to
5291 SCM_NNULLP any more.
5293 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5295 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
5296 scm_copy_tree): Place assignment expressions which are part of
5297 other expressions into an expression of their own.
5299 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5301 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5302 compare SCM values with !=.
5304 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5306 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5307 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5308 and definition of the memoizer for the generalized set! macro from
5309 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5310 define the macro object.
5312 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5313 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5314 eval.c, it is made static and renamed to s_set_x.
5316 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5319 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5321 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5322 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5323 to undefineds and registered the object as a permanent object.
5325 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5326 static in eval.c, renamed it to f_apply and registered the object
5327 as a permanent object.
5329 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5331 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5332 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5334 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5336 * numbers.c (scm_logtest): Fixed argument bug in the call to
5337 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5339 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5341 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5342 type errors that showed up when compiling with SCM_DEBUG defined.
5344 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5346 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5347 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5348 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5349 fix compile errors with --disable-deprecated.
5351 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5353 * numbers.c (scm_integer_expt): fix case where we were declaring
5354 vars in the middle of a statement block. Thanks to Thamer
5357 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5359 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5362 * eq.c (scm_eqv_p): Turned into a primitive generic.
5364 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5366 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5367 Thanks to Boyd Gerber.
5368 Added check for __arm__ in addition to arm for LINUX and copied
5369 __s390__ defines from upstream libgc. Thanks to James Treacy for
5370 reporting the problems.
5372 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5374 * socket.c: use SCM_CHAR_BIT.
5376 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5378 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5380 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5382 * feature.c (scm_init_feature): Always add threads feature.
5384 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5386 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5387 scm_at_assert_bound_ref. (We don't want the unbound check. See
5388 oop/goops/active-slot.scm.)
5390 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5392 * tags.h: scm_t_intptr should have been intptr_t.
5394 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5396 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5398 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5399 as gc_os_dep.c suggests is appropriate.
5401 * goops.c (prep_hashsets): make static to match prototype.
5402 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5405 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5408 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5411 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5413 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5414 indicated through extra fields in getters-n-setters.
5415 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5416 (Thanks to Andy Wingo.)
5418 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5420 * gc-segment.c: add comment
5422 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5424 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5427 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5428 and add regression test to standalone/.
5430 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5432 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5433 Thanks to Dale P. Smith.
5435 * random.c: #include gmp.h.
5436 (scm_c_random_bignum): normalize result on return.
5438 * init.c: #include gmp.h.
5440 * numbers.h: remove the gmp.h #include (not needed now).
5442 * posix.h: change occurences of "id" to something else so we don't
5443 cause trouble when included via objective-c (can't hurt, might
5444 help). Still have usage in debug.h, though.
5446 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5448 * random.c (scm_c_random_bignum): Don't generate a random number
5449 equal to m (the second argument of scm_c_random_bignum); only
5450 generate numbers in the range 0 <= r < m.
5451 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5452 scm_var_random_state.
5454 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5457 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5459 * modules.c (scm_module_import_interface): move declaration of
5460 uses before any code.
5462 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5464 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5467 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5468 processing it in order to avoid an infinite loop.
5470 * print.c (scm_prin1): Remember old state of pstate->writingp.
5472 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5474 * Changed license terms to the plain LGPL thru-out.
5476 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5478 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5479 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5480 rewrite to handle GMP bignums.
5483 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5485 * ports.c (scm_getc): minor tweak.
5487 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5488 rewrite to handle GMP bignums.
5490 * numbers.c: rewrite *many* functions to handle GMP bignums.
5492 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5495 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5497 * init.c (check_config): remove SCM_BIGDIG conditionals.
5498 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5500 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5502 * eval.c: remove SCM_BIGDIG conditionals.
5504 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5506 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5508 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5511 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5513 * threads.h: fix various preprocessor usages of new public
5514 symbols to expect 0 or 1 values rather than 1 or undefined.
5515 i.e. change #ifdef to #if, etc.
5517 * threads.c: fix various preprocessor usages of new public
5518 symbols to expect 0 or 1 values rather than 1 or undefined.
5519 i.e. change #ifdef to #if, etc.
5521 * tags.h: fix various preprocessor usages of new public
5522 symbols to expect 0 or 1 values rather than 1 or undefined.
5523 i.e. change #ifdef to #if, etc.
5525 * stacks.c: fix various preprocessor usages of new public
5526 symbols to expect 0 or 1 values rather than 1 or undefined.
5527 i.e. change #ifdef to #if, etc.
5529 * stackchk.h: fix various preprocessor usages of new public
5530 symbols to expect 0 or 1 values rather than 1 or undefined.
5531 i.e. change #ifdef to #if, etc.
5533 * stackchk.c: fix various preprocessor usages of new public
5534 symbols to expect 0 or 1 values rather than 1 or undefined.
5535 i.e. change #ifdef to #if, etc.
5537 * sort.c: fix various preprocessor usages of new public
5538 symbols to expect 0 or 1 values rather than 1 or undefined.
5539 i.e. change #ifdef to #if, etc.
5541 * read.c: fix various preprocessor usages of new public
5542 symbols to expect 0 or 1 values rather than 1 or undefined.
5543 i.e. change #ifdef to #if, etc.
5545 * random.c: fix various preprocessor usages of new public
5546 symbols to expect 0 or 1 values rather than 1 or undefined.
5547 i.e. change #ifdef to #if, etc.
5549 * print.c: fix various preprocessor usages of new public
5550 symbols to expect 0 or 1 values rather than 1 or undefined.
5551 i.e. change #ifdef to #if, etc.
5553 * objects.c: fix various preprocessor usages of new public
5554 symbols to expect 0 or 1 values rather than 1 or undefined.
5555 i.e. change #ifdef to #if, etc.
5557 * numbers.h: fix various preprocessor usages of new public
5558 symbols to expect 0 or 1 values rather than 1 or undefined.
5559 i.e. change #ifdef to #if, etc.
5561 * null-threads.c: fix various preprocessor usages of new public
5562 symbols to expect 0 or 1 values rather than 1 or undefined.
5563 i.e. change #ifdef to #if, etc.
5565 * lang.c: fix various preprocessor usages of new public
5566 symbols to expect 0 or 1 values rather than 1 or undefined.
5567 i.e. change #ifdef to #if, etc.
5569 * lang.h: fix various preprocessor usages of new public
5570 symbols to expect 0 or 1 values rather than 1 or undefined.
5571 i.e. change #ifdef to #if, etc.
5573 * iselect.h: fix various preprocessor usages of new public
5574 symbols to expect 0 or 1 values rather than 1 or undefined.
5575 i.e. change #ifdef to #if, etc.
5577 * init.c: fix various preprocessor usages of new public
5578 symbols to expect 0 or 1 values rather than 1 or undefined.
5579 i.e. change #ifdef to #if, etc.
5581 * gh_data.c: fix various preprocessor usages of new public
5582 symbols to expect 0 or 1 values rather than 1 or undefined.
5583 i.e. change #ifdef to #if, etc.
5585 * gh.h: fix various preprocessor usages of new public
5586 symbols to expect 0 or 1 values rather than 1 or undefined.
5587 i.e. change #ifdef to #if, etc.
5589 * gen-scmconfig.c: change most new public symbols to be defined to
5590 0 or 1 rather than being either 1 or undefined.
5592 * gc_os_dep.c: fix various preprocessor usages of new public
5593 symbols to expect 0 or 1 values rather than 1 or undefined.
5594 i.e. change #ifdef to #if, etc.
5595 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5597 * gc.h: fix various preprocessor usages of new public
5598 symbols to expect 0 or 1 values rather than 1 or undefined.
5599 i.e. change #ifdef to #if, etc.
5601 * gc-card.c: fix various preprocessor usages of new public
5602 symbols to expect 0 or 1 values rather than 1 or undefined.
5603 i.e. change #ifdef to #if, etc.
5605 * gc-mark.c: fix various preprocessor usages of new public
5606 symbols to expect 0 or 1 values rather than 1 or undefined.
5607 i.e. change #ifdef to #if, etc.
5609 * feature.c: fix various preprocessor usages of new public
5610 symbols to expect 0 or 1 values rather than 1 or undefined.
5611 i.e. change #ifdef to #if, etc.
5613 * evalext.c: fix various preprocessor usages of new public
5614 symbols to expect 0 or 1 values rather than 1 or undefined.
5615 i.e. change #ifdef to #if, etc.
5617 * eval.h: fix various preprocessor usages of new public
5618 symbols to expect 0 or 1 values rather than 1 or undefined.
5619 i.e. change #ifdef to #if, etc.
5621 * eval.c: fix various preprocessor usages of new public
5622 symbols to expect 0 or 1 values rather than 1 or undefined.
5623 i.e. change #ifdef to #if, etc.
5625 * eq.c: fix various preprocessor usages of new public
5626 symbols to expect 0 or 1 values rather than 1 or undefined.
5627 i.e. change #ifdef to #if, etc.
5629 * coop.c: fix various preprocessor usages of new public
5630 symbols to expect 0 or 1 values rather than 1 or undefined.
5631 i.e. change #ifdef to #if, etc.
5633 * coop-threads.c: fix various preprocessor usages of new public
5634 symbols to expect 0 or 1 values rather than 1 or undefined.
5635 i.e. change #ifdef to #if, etc.
5637 * coop-pthreads.c: fix various preprocessor usages of new public
5638 symbols to expect 0 or 1 values rather than 1 or undefined.
5639 i.e. change #ifdef to #if, etc.
5641 * coop-defs.h: fix various preprocessor usages of new public
5642 symbols to expect 0 or 1 values rather than 1 or undefined.
5643 i.e. change #ifdef to #if, etc.
5645 * convert.i.c: fix various preprocessor usages of new public
5646 symbols to expect 0 or 1 values rather than 1 or undefined.
5647 i.e. change #ifdef to #if, etc.
5649 * continuations.c: fix various preprocessor usages of new public
5650 symbols to expect 0 or 1 values rather than 1 or undefined.
5651 i.e. change #ifdef to #if, etc.
5653 * _scm.h: fix various preprocessor usages of new public symbols to
5654 expect 0 or 1 values rather than 1 or undefined. i.e. change
5657 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5659 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5661 * deprecated.c, deprecated.h: New files, to collect deprecated
5662 things in one place.
5663 * Makefile.am: Added them in all the right places.
5665 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5666 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5668 (DOT_X_FILES): Removed "iselect.x".
5669 (DOT_DOC_FILES): Removed "iselect.doc".
5671 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5673 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5674 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5676 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5678 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5680 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5681 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5683 * threads.h: replace usage of struct timespect with
5684 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5685 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5686 favor of scm_t_timespec from scmconfig.h.
5688 * threads.c: move libguile/_scm.h include to the top so we pick up
5689 any critical defines like _GNU_SOURCE early. Replace usage of
5690 struct timespect with scm_t_timespec. Replace usage of
5691 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5692 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5694 * threads-plugin.h: replace usage of struct timespect with
5697 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5698 usage of struct timespect with scm_t_timespec.
5700 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5701 HAVE_INTTYPES_H handling to scmconfig.h. #include
5702 "libguile/__scm.h". Rework handling for scm_t_bits,
5703 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5704 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5705 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5706 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5709 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5711 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5713 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5715 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5717 * stime.h: move handling of time related headers to scmconfig.h.
5719 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5721 * stacks.c: replace usage of STACK_GROWS_UP with
5724 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5725 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5727 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5728 of uint32 and HAVE_UINT_32 with scm_t_int32.
5730 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5732 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5734 * script.c: #include <config.h> if HAVE_CONFIG_H.
5736 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5738 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5740 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5742 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5744 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5746 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5748 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5749 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5750 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5751 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5753 * ramap.c: replace usage of HAVE_LONG_LONGS with
5754 "SCM_SIZEOF_LONG_LONG != 0".
5756 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5757 "libguile/scmconfig.h".
5759 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5761 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5762 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5764 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5766 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5768 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5770 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5771 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5772 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5773 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5774 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5775 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5776 "SCM_SIZEOF_LONG_LONG != 0".
5778 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5779 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5780 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5781 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5783 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5785 * null-threads.h: replace usage of struct timespect with
5788 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5790 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5791 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5792 scm_t_uint64 and rename usages.
5794 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5796 * load.c: #include <config.h> if HAVE_CONFIG_H.
5798 * iselect.h: move handling of time related headers to scmconfig.h.
5799 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5800 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5801 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5803 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5804 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5805 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5807 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5809 * inline.h: #include "libguile/__scm.h" at the top. Change code
5810 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5811 what to do instead of creating a new public #define. Rename usage
5812 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5813 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5814 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5816 * inline.c: rearrange handling -- now we just #define
5817 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5818 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5819 appropriate, and we use that in inline.h along with the above
5820 define to determine how to respond.
5822 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5823 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5825 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5827 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5828 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5830 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5832 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5834 * gen-scmconfig.c: new file -- see comments in file for details.
5836 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5838 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5839 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5841 * gc.h: replace usage of SIZEOF_LONG with
5842 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5843 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5844 since we handle that in scmconfig.h now.
5846 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5848 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5849 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5850 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5852 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5854 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5855 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5857 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5859 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5861 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5862 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5864 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5866 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5867 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5869 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5870 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5871 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5872 with "SCM_SIZEOF_LONG_LONG != 0".
5874 * error.c: #include <config.h> if HAVE_CONFIG_H.
5876 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5877 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5878 with "SCM_SIZEOF_LONG_LONG != 0".
5880 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5882 * coop.c: replace usage of struct timespect with scm_t_timespec.
5883 #include <config.h> if HAVE_CONFIG_H.
5885 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5886 usage of struct timespect with scm_t_timespec. Replace usage of
5887 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5889 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5890 usage of struct timespect with scm_t_timespec. Replace usage of
5891 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5893 * coop-defs.h: move handling of time related headers to
5894 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5895 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5896 timespect with scm_t_timespec.
5898 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5900 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5902 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5903 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5905 * continuations.c: move libguile/_scm.h include to the top so we
5906 pick up any critical defines like _GNU_SOURCE early.
5908 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5910 * async.c: #include <config.h> if HAVE_CONFIG_H.
5912 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5914 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5915 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5917 * __scm.h: move libguile/scmconfig.h include up to the top, so
5918 we're sure to pick up any critical defines like _GNU_SOURCE early.
5919 #include <limits.h> removed in favor of scmconfig.h inclusion when
5920 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5921 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5922 scmconfig.h inclusion when appropriate. Various Win32 related
5923 definitions removed in favor of scmconfig.h inclusion when
5925 (HAVE_UINTPTR_T): definition removed (see NEWS).
5926 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5927 (HAVE_LONG_LONGS): definition removed (see NEWS).
5928 (HAVE_LONG_LONG): definition removed (see NEWS).
5929 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5931 * Makefile.am: scmconfig.h is now generated by building and
5932 running gen-scmconfig.h and capturing its output. gen-scmconfig
5933 uses config.h and the configure.in generated gen-scmconfig.h to
5934 decide what to output. See gen-scmconfig.c for details.
5935 (noinst_PROGRAMS): add gen-scmconfig.
5936 (gen_scmconfig_SOURCES): new variable.
5937 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5938 cross-compiling right.
5939 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5940 (BUILT_SOURCES): add scmconfig.h.
5942 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5944 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5945 Adrian Bunk. Thanks!
5947 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5949 * goops.c (make_class_from_template): New fourth arg:
5951 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5954 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5956 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5957 second arg: applicablep.
5958 (scm_i_inherit_applicable): New function.
5960 * goops.c, goops.h (scm_class_applicable,
5961 scm_class_extended_accessor): New classes.
5963 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5965 * procs.c (scm_procedure_documentation): Removed redundant
5966 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5969 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5971 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5973 * modules.c (scm_module_import_interface): New function.
5975 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5977 (scm_class_accessor): New class.
5979 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5981 * goops.c (scm_primitive_generic_generic): Enable primitive
5982 generic if not enabled.
5983 (scm_sys_goops_loaded): Setup unextended primitive generics.
5985 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5987 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5990 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5991 testing example. All uses of SCM_GPROC should be converted.)
5993 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5996 * eq.c (scm_equal_p): Turned into a primitive generic.
5998 2003-02-27 Rob Browning <rlb@defaultvalue.org>
6000 * Makefile.am (scmconfig.h): new target -- generate file from
6002 (modinclude_HEADERS): remove version.h.
6003 (nodist_modinclude_HEADERS): add version.h.
6005 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6007 This fixes a serious GC bug, introduced during the latest
6008 reorganization of the GC, which disabled freeing of structs and
6011 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
6013 (scm_struct_prehistory): Move scm_free_structs to
6014 scm_before_mark_c_hook.
6016 * gc-card.c (sweep_card): Check that we haven't swept structs on
6017 this card before. That can happen if scm_i_sweep_all_segments has
6018 been called from some other place than scm_igc.
6020 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6022 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
6023 (since hash tables now adapt their size).
6025 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
6026 (current number of prehistory bindings; hashtable code will select
6027 a prime which is greater than this value).
6029 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
6030 (current number of initial symbols).
6032 * properties.c (scm_init_properties): Don't specify size of
6033 scm_properties_whash.
6035 * objprop.c (scm_init_objprop): Don't specify size of
6038 * keywords.c (scm_init_keywords): Don't specify a hash table size.
6040 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
6042 The following changes introduce the use of resizable hash tables
6043 throughout Guile. It also renames the old *-hash-table* functions
6044 to *-alist-vector* and places them, together with the rest of the
6045 weak vector support, in the module (ice-9 weak-vector). We should
6046 probably introduce a new, better, API for weak references, for
6047 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
6048 look like and are used like ordinary pairs.)
6050 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
6051 leaf_environment_fold, obarray_remove_all): Use hashtable
6054 * gc.c (scm_init_storage): Moved hook initialization to
6055 scm_storage_prehistory.
6056 (scm_storage_prehistory): New function.
6057 (scm_igc): Added commentary about placement of
6058 scm_after_sweep_c_hook.
6060 * gc-mark.c (scm_mark_all): Use hashtable accessors.
6061 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
6062 SCM_WVECT_WEAK_VALUE_P.
6064 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
6066 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
6068 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
6069 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
6071 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
6072 calls to scm_storage_prehistory and scm_hashtab_prehistory.
6074 * modules.c (module-reverse-lookup): Use hashtable accessors.
6076 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
6078 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
6079 scm_make_weak_value_alist_vector,
6080 scm_make_doubly_weak_alist_vector): New functions.
6082 * weaks.c (scm_init_weaks_builtins): New function.
6084 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
6085 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
6086 SCM_WVECT_NOSCAN_P): New macros.
6088 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
6089 and SCM_WVECT_WEAK_VALUE_P.
6091 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
6092 allocate_weak_vector and exported.
6094 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6096 * hashtab.c: Undid thread safety. (We decided that it's better to
6097 let the user explicitly protect the tables (or not) according what
6098 is suitable for the application.)
6100 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6102 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
6103 thread safe and handle resizing tables.
6104 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
6105 SCM_DEFER/ALLOW_INTS.
6107 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6109 * hashtab.c (scm_vector_to_hash_table,
6110 scm_c_make_resizing_hash_table, scm_make_hash_table): New
6112 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
6113 safe and handle resizing tables.
6115 * weaks.c (scm_make_weak_key_hash_table,
6116 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
6117 Size argument made optional. Return resizable table if not
6120 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6122 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6123 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
6125 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6127 * debug.c (scm_procedure_source): Handle all objects for which
6128 procedure? is #t. (Thanks to Bill Schottstaedt.)
6130 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6132 * futures.c (mark_futures): Don't need to mark data of recycled
6134 (scan_futures, cleanup_undead): Be smarter about marking
6135 futures---avoid unnecessary passes through future lists.
6137 * futures.h, futures.c: New files; Introduced recycling of
6138 futures. For fine-grained threading this lifts performance to
6139 another level. We can now use parallelization in inner loops of
6140 Guile programs without impossible overhead.
6142 * threads.h, threads.c: Moved futures to their own file.
6144 * Makefile.am (libguile_la_SOURCES): Added futures.c.
6145 (DOT_X_FILES): Added futures.x.
6146 (DOT_DOC_FILES): Added futures.doc.
6147 (modinclude_HEADERS): Added futures.h.
6149 * threads.c, threads.h (scm_i_create_thread): Renamed from
6150 create_thread and made global.
6152 * futures.c (scm_make_future): New procedure.
6154 * eval.c: #include "libguile/futures.h".
6156 * init.c: #include "futures.h"
6157 (scm_init_guile_1): Call scm_init_futures.
6159 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
6161 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
6163 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
6166 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
6168 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6170 * threads.c (create_thread): Don't unwind dynwind chain of parent
6171 thread before creation. Just start the new thread with an empty
6174 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6176 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
6178 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6180 * threads.c (scm_timed_wait_condition_variable): Support timed
6181 waiting also for simple condition variables.
6183 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
6184 of calling the procedure change-object-class.
6186 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6188 * ramap.c (scm_ramapc): Typo in error message.
6190 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6192 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
6193 slots with instance allocation.
6195 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
6197 (scm_compute_applicable_methods): Use scm_generic_function_methods.
6199 * goops.c (scm_generic_function_methods): Support extended
6202 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6204 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
6205 Thanks to Neil for pointing this out!
6207 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
6209 * lang.h: Remove declarations matching definitions removed from
6210 lang.c (just below).
6212 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
6214 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
6215 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
6216 and already commented out.
6218 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
6219 scm_lreadparen): Support reading vectors with Elisp syntax if
6220 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
6221 is not currently defined, and there isn't even a configure switch
6224 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6226 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
6228 (EXTRA_DIST): Added version.h.in.
6230 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6232 This change makes it possible for one thread to do lazy sweeping
6233 while other threads are running. Now only the mark phase need to
6234 have all threads asleep. We should look further into this issue.
6235 Presently, I've put the locking of scm_i_sweep_mutex at
6236 "conservative" places due to my current lack of knowledge about
6237 the garbage collector. Please feel free to restrict these regions
6238 further to allow for maximal parallelism!
6240 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
6242 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
6243 scm_gc_register_collectable_memory): Substitute locking of
6244 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
6245 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
6246 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
6247 the single-thread section (which now only contains the mark
6249 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
6250 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
6252 * threads.c (gc_section_mutex): Removed.
6254 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6256 * threads.c (create_thread): Clear parent field in root state in
6257 order not to unnecessarily remember dead threads.
6259 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
6260 (scm_trampoline_1, scm_trampoline_2): Use them.
6262 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6264 Partial introduction of real plugin interface.
6266 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
6267 (EXTRA_DIST): Added threads-plugin.c.
6269 * threads-plugin.h, threads-plugin.c: New files.
6271 * threads.h: #include "libguile/threads-plugin.h".
6273 * threads.c: #include "libguile/threads-plugin.c".
6275 * pthread-threads.c: Temporarily remove debugging functions.
6277 * threads.c, threads.h (scm_yield): Added back.
6279 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6281 * threads.c (really_launch): Detach before unlocking
6282 thread_admin_mutex in order not to risk being joined.
6283 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
6284 thread_admin_mutex locked during GC.
6286 * pthread-threads.c, pthread-threads.h: Improvements to debugging
6289 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6291 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
6292 support for debugging mutex operations.
6294 * threads.c (scm_thread): Removed filed joining_threads.
6295 (thread_print): Print thread number as well as address of thread
6297 (scm_join_thread): Bugfix.
6298 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
6299 scm_timed_wait_condition_variable, scm_signal_condition_variable,
6300 scm_broadcast_condition_variable): Use the low-level API.
6301 (scm_all_threads): Return copy of thread list (to prevent
6302 unintended destruction).
6303 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6305 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6306 pthread "native" recursive mutex support.
6308 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6310 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6311 Simply lock a thread C API recursive mutex.
6312 (SCM_NONREC_CRITICAL_SECTION_START,
6313 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6314 SCM_REC_CRITICAL_SECTION_END): Removed.
6316 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6317 direct calls to scm_rec_mutex_lock / unlock around the three calls
6318 to scm_m_expand_body.
6320 * eval.c, eval.h (promise_free): New function.
6321 (scm_force): Rewritten; Now thread-safe; Removed
6322 SCM_DEFER/ALLOW_INTS.
6324 * pthread-threads.h: Added partially implemented plugin interface
6325 for recursive mutexes. These are, for now, only intended to be
6326 used internally within the Guile implementation.
6328 * pthread-threads.c: New file.
6330 * threads.c: Conditionally #include "pthread-threads.c".
6332 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6335 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6336 SCM_GLOBAL_REC_MUTEX): New macros.
6338 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6339 macros---use mutexes instead.
6341 * tags.h (SCM_IM_FUTURE): New tag.
6343 * eval.c (scm_m_future): New primitive macro.
6344 (SCM_CEVAL): Support futures.
6345 (unmemocopy): Support unmemoization of futures.
6347 * print.c (scm_isymnames): Name of future isym.
6349 * version.c: Unmade some changes to my private copy that got
6350 committed by mistake.
6352 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6354 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6357 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6359 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6362 * threads.c (create_thread): Remember root object until the handle
6363 of the new thread is on all_threads list.
6365 * root.c (scm_make_root): Moved copying of fluids until after
6366 creation of root handle so that the fluids are GC protected. Also
6367 removed the critical section.
6369 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6371 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6373 * gc-malloc.c (malloc_mutex): New mutex.
6374 (scm_gc_malloc_prehistory): Initialize it.
6375 (scm_realloc): Serialize call to realloc
6376 (scm_calloc): Same for calloc.
6377 Thanks to Wolfgang Jaehrling!
6378 (Now we have to make sure all calls to malloc/realloc are made
6379 through scm_malloc.)
6381 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6383 * threads.c (really_launch): Release heap (to prevent deadlock).
6384 (create_thread): Release heap before locking thread admin mutex.
6386 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6388 * threads.c (scm_i_thread_invalidate_freelists): New
6391 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6393 * modules.c (scm_export): Inserted a return statement.
6395 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6397 * modules.c (scm_export): new function
6399 * gc-card.c: add a note about malloc()/free() overhead.
6401 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6403 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6406 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6408 These changes remove scm_ints_disabled (which hasn't has any
6409 effect in Guile for quite some time).
6411 * async.c, error.h (scm_ints_disabled): Removed.
6413 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6414 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6415 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6416 (old_ints): Removed.
6418 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6420 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6423 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6425 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6426 Removed accidental #if 0 around these functions.
6428 These changes are the start of support for preemptive
6429 multithreading. Marius and I have agreed that I commit this code
6430 into the repository although it isn't thoroughly tested and surely
6431 introduces many bugs. The bugs should only be exposed when using
6432 threads, though. Signalling and error handling for threads is
6433 very likely broken. Work on making the implementation cleaner and
6434 more efficient is needed.
6436 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6437 (SCM_NONREC_CRITICAL_SECTION_START,
6438 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6439 SCM_REC_CRITICAL_SECTION_END): New macros.
6440 (SCM_CRITICAL_SECTION_START/END): Defined here.
6442 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6443 the three calls to scm_m_expand_body.
6445 * gc.h: #include "libguile/pthread-threads.h";
6446 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6448 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6451 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6454 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6456 * gc-freelist.c, threads.c (really_launch): Use
6457 SCM_FREELIST_CREATE.
6459 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6461 * gc.c (scm_i_expensive_validation_check, scm_gc,
6462 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6463 heap administration so that those pieces of code are executed
6464 single-threaded. We might consider rewriting these code sections
6465 in terms of a "call_gc_code_singly_threaded" construct instead of
6466 calling the pair of scm_i_thread_put_to_sleep () and
6467 scm_i_thread_wake_up (). Also, we would want to have as many of
6468 these sections eleminated.
6470 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6472 * inline.h: #include "libguile/threads.h"
6474 * pthread-threads.h: Macros now conform more closely to the
6475 pthreads interface. Some of them now take a second argument.
6477 * threads.c, threads.h: Many changes.
6479 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6481 * Makefile.am (version.h): Changed $^ --> $< in rule for
6484 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6486 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6487 (SCM_MINOR_VERSION): use @--@ substitution now.
6488 (SCM_MICRO_VERSION): use @--@ substitution now.
6489 (scm_effective_version): new function prototype.
6491 * version.c (scm_effective_version): new function, also add
6494 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6495 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6497 (version.h): generate this here rather than configure.in. This
6498 approach tracks source edits better (i.e. more immediately).
6499 Might be worth considering for other .in files too.
6501 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6503 Reorganized thread package selection. A thread package now only
6504 implements a small set of pthread like functions and Guile
6505 implements the rest on top of that. Guile's implementation is
6506 what the "coop-pthreads" package has been previously. Support for
6507 "coop" threads has been removed until I get time to add it again.
6509 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6510 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6511 null-threads.c, coop-pthreads.c.
6512 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6515 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6517 * threads.h: Do not include "libguile/coop-defs.h". Include
6518 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6519 (previously deprecated) C level thread API prototypes. They are
6520 now in the thread package specific headers, "null-threads.h" and
6521 "pthread-threads.h".
6522 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6524 (scm_threads_init): Removed.
6525 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6526 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6527 SCM_I_THREAD_SWITCH_COUNT): Define here.
6528 (scm_single_thread_p): Removed.
6529 (scm_call_with_new_thread): Take two args directly instead of list
6531 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6532 SCM_SET_THREAD_LOCAL_DATA): Define here.
6534 * threads.c: Merged with "coop-pthreads.c".
6536 * null-threads.h: Implement pthread-like API as a set of macros.
6538 * pthread-threads.h: New, implement pthread-like API by deferring
6541 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6542 has been lost in the reorganization.
6544 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6546 The following change makes it possible to move procedure
6547 application dispatch outside inner loops. The motivation was
6548 clean implementation of efficient replacements of R5RS primitives
6551 The semantics is clear: scm_trampoline_N returns an optimized
6552 version of scm_call_N (or NULL if the procedure isn't applicable
6555 Applying the optimization to map and for-each increases efficiency
6556 noticeably. For example, (map abs ls) is 8 times faster than
6559 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6561 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6563 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6564 (map, for-each): Handle also application on two args as a special
6565 case; Use trampolines.
6569 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6570 (subr2oless): Removed.
6571 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6572 vector GC protected.
6574 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6577 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6579 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6581 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6583 * debug.c (scm_make_iloc): Added missing "return".
6585 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6587 * strports.c (scm_eval_string_in_module): Validate second arg to
6588 be a module. Thanks to Arno Peters!
6590 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6592 * .cvsignore: remove goops.c
6594 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6596 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6597 module_variable, scm_module_lookup_closure,
6598 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6599 scm_system_module_env_p): Don't compare SCM values with C
6600 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6603 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6605 * eval.h (SCM_MAKE_ILOC): New macro.
6607 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6608 the iloc bitpattern here.
6610 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6612 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6613 part of the API, otherwise it's difficult to write Guile
6614 extensions using non-blocking I/O => moved #include
6615 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6617 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6620 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6622 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6623 are defined in configure.in.
6625 * threads.c: Removed SCM_API from function definitions. SCM_API
6626 is only for declarations.
6628 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6630 * coop-pthreads.h: Added support for thread specific data to the
6631 generic C API for the coop-pthreads case.
6633 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6635 (scm_cond_broadcast): Added missing function.
6637 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6639 * coop.c (coop_next_runnable_thread): Removed, wich should have
6640 happened when GUILE_ISELECT was hard-wired.
6642 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6644 * Makefile.am (libguile_la_SOURCES): Added threads.c
6645 (DOT_DOC_FILES): Added threads.doc.
6646 (DOT_X_FILES): Added threads.x.
6647 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6648 (noinst_HEADERS): Added coop-pthreads.c.
6649 (modinclude_HEADERS): Added coop-pthreads.h.
6651 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6652 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6654 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6655 Thanks to Bill Schottstaedt!
6657 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6659 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6660 SCM_COPT_THREADS is defined.
6661 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6664 * coop-pthreads.c: Some harmless renamings of internal stuff.
6665 (create_thread): New, generalized version of
6666 scm_call_with_new_thread.
6667 (scm_call_with_new_thread): Use it.
6668 (scm_spawn_thread): New, use create_thread.
6670 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6672 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6673 start testing it now.
6675 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6676 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6677 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6680 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6682 * scmsigs.c (signal_cell_handlers, install_handler_data,
6683 scm_delq_spine_x, really_install_handler, install_handler): New
6684 scheme for triggering signal handlers, to simplify take_signal.
6685 (take_signal): Simplified, to avoid race conditions.
6686 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6689 * async.c (scm_async_click): Reset pending_asyncs, handle
6690 signal_asyncs. Don't set cdr of a non-signal async to #f.
6691 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6692 always. Set pending_asyncs.
6693 (scm_system_async_mark_for_thread): Check that thread has not
6695 (scm_unmask_signals, decrease_block): Call scm_async_click after
6696 block_asyncs becomes zero.
6698 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6701 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6703 * root.c (root_mark): Mark them.
6704 (make_root): Initialize them.
6706 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6708 (scm_internal_select): Define one version for USE_COOP_THREADS and
6709 one for USE_NULL_THREADS.
6710 (scm_init_iselect): Likewise.
6712 * inline.h (scm_cell, scm_double_cell): Also allow
6713 USE_COPT_THREADS to not protect the slot initializers.
6715 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6716 because threads need to be initialized before the stack, but
6717 gsubrs such as scm_timed_condition_variable_wait can only be
6720 * threads.h: Include "coop-pthreads.h" when requested.
6721 (scm_threads_make_mutex, scm_threads_lock_mutex,
6722 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6723 not implemented anyway.
6724 (scm_init_thread_procs, scm_try_mutex,
6725 scm_timed_condition_variable_wait,
6726 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6727 scm_thread_exited_p): New prototypes.
6728 (struct timespec): Define if not already defined.
6729 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6730 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6731 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6732 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6735 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6737 (scm_thread_exited_p): New.
6738 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6739 registered procedures.
6740 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6741 Use the latter as the procedure for "wait-condition-variable",
6742 thus offering a optional timeout parameter to Scheme.
6743 (scm_wait_condition_variable): Implement in terms of
6744 scm_timed_wait_condition_variable.
6745 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6746 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6747 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6748 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6749 scm_make_mutex, etc, and deprecate.
6750 (scm_init_threads): Do not create smobs, leave this to
6751 scm_threads_init. Do not include "threads.x" file.
6752 (scm_init_thread_procs): New, include "threads.x" here.
6754 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6755 scm_null_mutex_lock, scm_null_mutex_unlock,
6756 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6757 scm_null_condvar_wait, scm_null_condvar_signal,
6758 scm_null_condvar_destroy): Removed.
6759 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6760 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6761 scm_cond_destory): Do not define, they are now deprecated and
6762 handled by threads.{h,c}.
6764 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6765 (scm_threads_init): Create smobs here, using the appropriate
6767 (block): Removed, now unused.
6768 (scm_c_thread_exited_p): New.
6769 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6770 scm_null_mutex_destroy, scm_null_condvar_init,
6771 scm_null_condvar_wait, scm_null_condvar_signal,
6772 scm_null_condvar_destroy): Removed and updated users to do their
6774 (scm_try_mutex, timeval_subtract,
6775 scm_timed_wait_condition_variable,
6776 scm_broadcast_condition_variable): New.
6777 (scm_wait_condition_variable): Removed.
6779 * coop-defs.h (coop_m): Added 'level' field.
6780 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6781 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6782 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6783 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6785 (coop_condition_variable_broadcast): New.
6787 * coop-threads.c (scm_threads_init): Create smobs here, using the
6789 (scm_c_thread_exited_p, scm_try_mutex,
6790 scm_timed_wait_condition_variable,
6791 scm_broadcast_condition_variable): New.
6792 (scm_wait_condition_variable): Removed.
6794 * coop.c (coop_new_mutex_init): Initialize level.
6795 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6797 (coop_condition_variable_signal): Renamed to
6798 coop_condition_variable_broadcast and reimplemented in terms of
6800 (coop_condition_variable_broadcast): New.
6802 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6804 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6806 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6808 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6811 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6812 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6813 give better error messages. Thanks to Bill Schottstaedt!
6815 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6817 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6818 scm_definedp to scm_defined_p and deprecated scm_definedp.
6820 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6822 * async.h, async.c (scm_system_async): Fixed deprecation to work
6823 correctly when deprecated features are excluded.
6825 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6827 * async.c (scm_system_async_mark_for_thread): Validate thread
6830 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6832 * feature.c (scm_init_feature): Don't add 'threads' for
6835 * inline.h (scm_cell, scm_double_cell): Also allow
6836 USE_NULL_THREADS to not protect the slot initializers.
6838 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6841 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6842 (modinclude_HEADERS): Added null-threads.h.
6844 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6845 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6846 (scm_init_threads): Use generic type names scm_t_mutex and
6847 scm_t_cond instead of coop_m and coop_c.
6849 * null-threads.c, null-threads.h: New files.
6851 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6853 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6854 This is to support makes that know about "$<" only in pattern
6855 rules, like Sun's make.
6857 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6859 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6860 substitution. Thanks to David Allouche!
6862 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6864 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6865 !SCM_ENABLE_DEPRECATED.
6867 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6869 * async.c (scm_system_async_mark_for_thread): Only call
6870 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6873 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6874 USE_THREADS is defined. Use scm_root otherwise.
6875 (scm_sigaction_for_thread): Ignore THREAD argument when
6876 USE_THREADS is not defined. Also, move THREAD argument defaulting
6877 out of HAVE_SIGACTION section, which was a bug.
6879 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6881 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6882 signal_handlers, not the closure that is used as the async.
6883 The closure is stored in signal_handler_cells, as previously.
6885 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6887 * root.h (scm_root_state): Added 'block_async' slot.
6888 (scm_active_asyncs): Removed abbrev.
6889 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6891 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6894 * async.h (scm_call_with_blocked_asyncs,
6895 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6896 scm_c_call_with_unblocked_asyncs): New prototypes.
6897 (scm_mask_signals, scm_unmask_signals): Deprecated.
6898 (scm_mask_ints): Turned into a macro.
6899 * async.c (scm_mask_ints): Removed.
6900 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6901 this should not be necessary.
6902 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6903 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6904 deprecation warning and check for errornous use. Set block_asyncs
6905 instead of scm_mask_ints.
6906 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6907 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6908 scm_c_call_with_unblocked_asyncs): New.
6910 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6911 Asyncs are enabled by default.
6913 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6915 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6916 6th element: an input waiting thunk.
6917 (sf_input_waiting): New.
6919 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6921 * root.c (root_mark): Mark active_asyncs slot.
6923 * async.c (scm_async_click): Set the cdr of a executed handler
6924 cell to SCM_BOOL_F, not SCM_EOL.
6925 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6926 and only if the handler procedure is not already present.
6927 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6929 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6931 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6933 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6935 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6936 scm_lt_dlopenext, and scm_lt_dlerror.
6937 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6939 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6941 (sysdep_dynl_init): switch to scm_lt_dlinit();
6943 * Makefile.am (libguile_la_LIBADD): switch to use
6946 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6948 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6950 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6951 * scmsigs.c (got_signal): Removed.
6952 (signal_handler_cells, signal_handler_threads): New.
6953 (take_signal): Queue the cell of the signal for the specified
6954 thread. Reset the signal handler on systems that don't have
6956 (sys_deliver_signals): Removed.
6958 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6959 extended to also set the thread of a signal and allocate a cell
6960 for it. Keep the Scheme name "sigaction". Check that signum is
6961 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6962 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6963 (scm_init_scmsigs): Allocate signal_handler_cells and
6964 signal_handler_threads vectors.
6966 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6967 that system asnycs and user asyncs are separated. Reimplemented
6968 system asyncs to work per-thread.
6970 * gc.c (scm_init_gc): Do not use scm_system_async.
6972 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6973 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6975 (scm_i_queue_async_cell): New.
6977 * __scm.h (scm_asyncs_pending_p): Removed.
6978 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6979 scm_asyncs_pending_p.
6981 * async.h (scm_system_async_mark_for_thread): New prototype.
6983 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6985 * root.h (scm_root_state): Added new "active_asyncs" slot.
6986 * root.c (scm_make_root): Initialize it to SCM_EOL.
6988 * coop-defs.h (coop_t): Added new "handle" slot.
6989 * coop-threads.c (all_threads, scm_current_thread,
6990 scm_all_threads, scm_i_thread_root): New.
6991 (scm_threads_init): Add main thread to all_threads.
6992 (scheme_launch_thread): Remove thread from all_threads when it
6994 (scm_call_with_new_thread): Initialize handle slot of coop_t
6995 structure and add new thread to all_threads.
6996 (scm_spawn_thread): Likewise.
6998 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6999 * threads.c (scm_current_thread, scm_all_threads): Register as
7002 * dynl.c: Use scm_lt_ prefix for libltdl functions.
7004 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
7006 * script.c (scm_compile_shell_switches): Fix bad spelling of
7007 `explicitly' in comment.
7009 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
7011 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
7012 Refer to provided? in doc string rather than deprecated feature?.
7014 2002-09-24 Gary Houston <ghouston@arglist.com>
7016 * inline.h (scm_double_cell): prevent reordering of statements
7017 with any following code (for GCC 3 strict-aliasing).
7018 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
7019 the earlier version of the reordering prevention.
7021 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7023 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
7025 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7027 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
7030 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7032 * inline.h: include stdio.h
7034 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
7036 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7038 * gc-segment.c (scm_i_make_initial_segment): check user settings
7041 * gc-malloc.c (scm_gc_init_malloc): check user settings for
7044 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
7046 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
7048 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
7049 these won't ever wrap around with high memory usage. Thanks to
7050 Sven Hartrumpf for finding this.
7052 * gc-freelist.c: include <stdio.h>
7054 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
7056 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
7058 * vectors.h (SCM_VECTOR_REF): New.
7060 * snarf.h (SCM_DEFINE_PUBLIC): New.
7062 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
7064 * socket.c (scm_addr_vector): Added size of address to arguments.
7065 Use it to avoid accessing a non-existent path in a sockaddr_un.
7066 Changed all callers.
7068 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7070 * gc.h: remove DOUBLECELL card flags.
7072 * gc-malloc.c (scm_calloc): try to use calloc() before calling
7075 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
7076 init loop; handle this from scm_init_card_freelist()
7078 * gc-card.c (scm_init_card_freelist): init bit vector here.
7080 * numbers.c (scm_make_real): prevent reordering of statements
7081 num2float.i.c (FLOAT2NUM): idem
7083 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7085 * eval.h: prepend libguile/ to include path
7087 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
7089 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
7090 years. Thanks to Martin Grabmüller!
7092 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7094 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
7095 unsigned numbers for computing minimum heap increment. This
7096 prevents weird results when a a negative minimum increment is
7099 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
7101 * gc_os_dep.c: When we have __libc_stack_end, use that directly
7102 instead of the old tricks.
7104 * guile-snarf.in: Do not expect the input file to be the first
7105 argument after the optional "-o" option, just pass everything to
7106 the pre-processor without extracting the input file name.
7108 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7110 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
7111 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
7113 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7115 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
7116 Bill Schottstaedt for the bug report
7118 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
7120 * print.c (scm_iprin1): Print primitives generics always as
7121 "primitive-generic" even when they have no primitive methods yet.
7123 2002-08-17 Gary Houston <ghouston@arglist.com>
7125 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
7128 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7130 * ports.c (scm_add_to_port_table): small bugfix.
7132 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
7135 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
7136 only use SCM_MIN_HEAP_SEG_SIZE.
7138 * ports.c (scm_add_to_port_table): add backwards compatibility
7141 * ports.h: use scm_i_ prefix for port table and port table size.
7143 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
7145 * vports.c (scm_make_soft_port): Initialize pt variable.
7147 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
7149 * strports.h (scm_c_eval_string_in_module,
7150 scm_eval_string_in_module): New prototypes.
7151 * strports.c (scm_eval_string_in_module): New, but use
7152 "eval-string" as the Scheme name and make second parameter
7154 (scm_eval_string): Implement using scm_eval_string_in_module.
7155 (scm_c_eval_string_in_module): New.
7156 Thanks to Ralf Mattes for the suggestion!
7158 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7160 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
7163 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
7165 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
7166 stead of scm_t_port*. The function now takes a tag argument.
7168 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7170 * gc.h: add scm_debug_cells_gc_interval to public interface
7172 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
7174 * gc.c (scm_i_expensive_validation_check): separate expensive
7175 validation checks from cheap ones.
7177 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7179 * read.c (scm_input_error): new function: give meaningful error
7180 messages, and throw read-error
7182 * gc-malloc.c (scm_calloc): add scm_calloc.
7184 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7186 * tags.h: remove GC bits documentation from the tags table.
7188 * read.c (INPUT_ERROR): Prepare for file:line:column error
7189 messages for errors in scm_lreadr() and friends.
7191 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7193 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
7195 (scm_gc_calloc): new function
7197 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7199 * ports.c (scm_new_port_table_entry): init port entry to 0
7202 * ports.c (scm_new_port_table_entry): change function from
7203 scm_add_to_port_table. This prevents cells with null-pointers from
7204 being exposed to GC.
7206 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
7207 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
7209 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
7212 * numbers.c (big2str): return "0" for 0 iso. ""
7214 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
7215 private-gc.h: new file
7217 * gc.c: completely revised and cleaned up the GC. It now uses lazy
7218 sweeping. More documentation in workbook/newgc.text
7220 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7222 * random.c (rstate_free): Return zero.
7224 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7226 * environments.c (remove_key_from_alist): Removed.
7228 (obarray_remove): Simplified.
7230 2002-07-24 Stefan Jahn <stefan@lkcc.org>
7232 * continuations.h: ia64: Include <signal.h> before
7235 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7237 * modules.c (scm_sym2var): Don't compare SCM values with ==.
7239 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7241 * goops.c (scm_compute_applicable_methods): use
7242 scm_remember_upto_here_1 iso scm_remember_upto_here
7244 * macros.c: include deprecation.h
7246 * vectors.c (scm_vector_move_right_x): remove side effect in
7248 (scm_vector_move_left_x): idem.
7250 * net_db.c, posix.c, socket.c: variable naming: change ans to
7253 * sort.c (scm_merge_vector_x): accept vector as argument
7254 iso. SCM*. This is needed for full GC correctness.
7256 * gc.h: undo previous undocumented changes related to #ifdef
7259 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7261 * *.c: add space after commas everywhere.
7263 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
7264 Document cases where SCM_WRITABLE_VELTS() is used.
7266 * vectors.h (SCM_VELTS): prepare for write barrier, and let
7267 SCM_VELTS() return a const pointer
7268 (SCM_VECTOR_SET): add macro.
7270 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7272 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
7273 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
7274 Deprecated the special kind of built-in dynamic syntax transformer
7275 that was inaccurately named "macro". Note: The built-in syntax
7276 transformers that are named "mmacro" or "memoizing-macro" still
7277 exist, and it is these which come much closer to what one would
7280 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
7282 * eval.c (unmemocopy): Fix for
7283 1001-local-eval-error-backtrace-segfaults (unmemoization crash
7284 with internal definitions and local-eval).
7286 2002-07-12 Gary Houston <ghouston@arglist.com>
7288 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
7289 defined. They don't do anything useful, especially since the
7290 only case where DYNAMIC_LINKING is undefined seems to be
7291 when --with-modules=no is given to configure, which is basically
7292 requesting that the "dynamic linking module" be omitted.
7294 * Makefile.am (libguile_la_SOURCES): move dynl.c from
7295 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
7297 * extensions.c (load_extension): check DYNAMIC_LINKING for
7299 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
7300 scm_init_dynamic_linking.
7302 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7304 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7305 check for Cygwin when including <winsock2.h>, this is already
7306 check for by configure. Thus, revert change from 2002-07-07.
7308 2002-07-10 Gary Houston <ghouston@arglist.com>
7310 * eq.c: include <string.h>
7311 * dynl.c: docstring editing.
7313 2002-07-09 Gary Houston <ghouston@arglist.com>
7315 * dynl.c (scm_dynamic_call): docstring editing.
7317 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7319 * gc_os_dep.c: HURD fixes.
7321 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7323 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7325 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7326 this should be compiled for BUILD host.
7327 Override default rule for
7328 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7329 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7330 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7332 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7333 <winsock2.h> on Cygwin even when we have it.
7335 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7337 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7338 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7339 the code. Full number of arguments checking of closures is
7340 mandatory now. However, the option to disable the checking has
7341 most probably not been used anyway.
7343 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7345 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7346 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7347 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7348 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7349 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7350 (scm_source_properties, scm_set_source_properties_x,
7351 scm_source_property): Removed compile time option SCM_RECKLESS to
7352 clean up the code. Full number of arguments checking of closures
7353 is mandatory now. However, the option to disable the checking has
7354 most probably not been used anyway.
7356 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7357 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7359 2002-06-30 Gary Houston <ghouston@arglist.com>
7361 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7362 do anything useful. Added a comment about need for a mutex if
7363 pre-emptive threading is supported.
7365 * posix.c (scm_convert_exec_args), dynl.c
7366 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7367 allocate_string_pointers. 2) simplified: don't reallocate the
7368 strings, just make an array of pointers 3) avoid memory leaks on
7369 error 4) let the procedure report errors in its own name.
7370 Consequences: 1) the procedures now assume that SCM strings are
7371 nul-terminated, which should always be the case. 2) Since strings
7372 are not reallocated, it's now possible for strings passed to
7373 dynamic-args-call to be mutated.
7375 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7377 * __scm.h, eval.c, eval.h: Removed compile time option
7378 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7379 variable positions during memoization is mandatory. However, the
7380 option to disable the caching has most probably not been used
7383 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7385 * print.c (scm_simple_format): Print missing part of format before
7386 ~% control. Thanks to Daniel Skarda!
7388 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7390 * mkstemp.c: Added exception notice to license statement.
7392 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7394 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7395 it is represented as a floating point value so that we can change
7398 From John W. Eaton <jwe@bevo.che.wisc.edu>
7400 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7402 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7404 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7405 in addition to `i386'. Thanks to Dale P. Smith.
7407 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7409 * eq.c (real_eqv): New.
7410 (scm_eqv_p): Use it when comparing reals and complexes.
7412 * numbers.c: Include <string.h>, for strncmp.
7413 (mem2complex): Do not create negative NaNs.
7414 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7416 (scm_inexact_to_exact): Signal error when converting a NaN.
7418 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7420 * posix.c (scm_putenv): Handle removing variables explicitely by
7425 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7426 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7428 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7429 [SCO && ! HAVE_ISINF] (isinf): New function.
7430 (xisinf, xisnan): New functions.
7432 (isfinite): Define in terms of xisinf.
7433 (scm_inf_p, scm_nan_p): New functions.
7434 (guile_Inf, guile_NaN): New file-scope vars.
7435 (guile_ieee_init): New function.
7436 (scm_inf, scm_nan): New functions.
7437 (idbl2str): Handle Inf and NaN. Remove funny label and
7438 corresponding gotos.
7439 (ALLOW_DIVIDE_BY_ZERO): New macro.
7440 (scm_divide): Allow division by zero to occur if
7441 ALLOW_DIVIDE_BY_ZERO is defined.
7442 Handle bignums and ints as special cases.
7444 Additional stuff by me:
7446 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7447 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7448 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7449 NaN. They will provide their own sign.
7450 (scm_divide): Only allow divides by inexact zeros. Dividing by
7451 exact zeros still signals an errors.
7453 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7455 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7456 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7457 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7458 Thanks to Andreas Rottmann.
7460 2002-04-20 Gary Houston <ghouston@arglist.com>
7462 * removal of unused fields in root state (thanks to Christopher
7463 Cramer for pointing out the disuse.)
7464 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7465 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7467 * root.c (root_mark): don't mark them.
7468 (scm_make_root): don't set them to #f.
7469 * init.c (scm_init_standard_ports): don't initialise with the
7472 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7474 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7477 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7479 * guile-snarf.in: Do not clean input file. This would write to
7480 the $(srcdir) during a VPATH build, which is not allowed. It also
7481 isn't needed since it only works when an output filename has been
7482 specified and in that case we don't need to clean the input file
7483 because the output file will already exist.
7485 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7487 * guile-snarf: Install the trap for removing $cleanfile only when
7488 the value of $cleanfile is actually known.
7490 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7492 * .cvsignore: add versiondat.h and *.c.clean.c.
7494 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7496 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7497 function, replaces macro SRCBRKP.
7499 (SRCBRKP): Deprecated.
7501 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7502 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7505 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7507 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7508 CHECK_EXIT and removed all references to them.
7510 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7512 * debug.h (scm_ready_p, debug_print): Removed declarations.
7514 * eval.c (EVALCELLCAR): Removed.
7516 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7517 operation from condition.
7519 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7521 * guile-snarf.in: When the output filename is "-", write to
7522 stdout. When no "-o" option is given, use "-" as the output
7523 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7524 output file on error when the output file name is not "-". Define
7525 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7527 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7529 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7531 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7532 and the corresponding goto statements. Removed redundant code.
7534 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7536 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7537 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7538 Re-enabled handing of rpsubrs and asubrs.
7540 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7542 * eval.c (SIDEVAL): Removed.
7544 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7545 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7546 argument checking order for set! to locals, variables and symbols.
7547 Improvements to control structure. Removed some uses of arg1 and
7548 arg2 as temporary variables.
7550 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7552 * guile-snarf.in: Remove "--compat=1.4" support.
7553 Add "-d" and "-D" support.
7555 (deprecated_list): New var.
7556 (compat_mode_clean_xxx): Delete.
7557 (grep_deprecated): New func.
7558 ("main"): If "-d" or "-D", call `grep_deprecated'.
7560 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7562 * hooks.h: Change scm_t_c_hookype_t everywhere to
7567 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7569 * ports.c (scm_sys_make_void_port): Use `@file'.
7571 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7574 * macros.c (scm_makmacro): Don't say that the form replaces its
7575 source, because it doesn't.
7576 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7578 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7579 scm_select, scm_basename), goops.c (scm_method_generic_function),
7580 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7581 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7584 * debug.c (scm_debug_options), eval.c
7585 (scm_eval_options_interface), read.c (scm_read_options): Change
7586 incorrect @var in docstring to @code.
7588 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7590 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7592 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7593 guile-snarf can remove trailing non-init code.
7595 * guile-snarf.in (modern_snarf): Remove everything following and
7596 including "^:^" from the output.
7598 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7600 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7602 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7604 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7606 * guile-snarf.in: Update copyright.
7607 Rewrite to internalize error handling.
7608 Add "--compat=1.4" handling.
7611 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7612 (snarfcppopts): New var.
7613 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7614 (.c.doc): Use $(snarfcppopts).
7616 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7617 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7618 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7619 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7620 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7621 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7622 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7623 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7624 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7625 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7626 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7627 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7628 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7629 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7631 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7633 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7634 The next step will be to remove the union 't' and simplify the
7635 code of SCM_CEVAL that way.
7637 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7639 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7640 rreadfds, rwritefds, rexceptfds): Made static.
7642 * gc.c (terminating), fports.c (terminating): Renamed
7645 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7647 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7648 potential overflow problems. Thanks to John W Eaton!
7650 * strop.c (string_capitalize_x): Treat characters as unsigned so
7651 that 8-bit chars work. Thanks to David Pirotte!
7653 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7655 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7656 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7657 proc as temporary variables. Introduced temporary variables with
7658 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7659 by a more explicit predicate in some places.
7661 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7663 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7664 Added lots of comments regarding the implementation of #@dispatch.
7665 Changed intra-procedure communication to use t.arg1 instead of
7666 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7667 variables. Introduced temporary variables with hopefully
7668 descriptive names for clarification. Replaced SCM_N?IMP by a more
7669 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7670 of computing the expression explicitly. Eliminate now unused
7671 label nontoplevel_cdrxbegin.
7673 * goops.h (SCM_INSTANCE_HASH): New macro.
7675 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7677 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7679 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7680 "guile-snarf" moved back from `noinst_SCRIPTS'.
7682 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7684 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7685 exists when adding a source property other than those that are
7686 handled explicitly, add the new property to the SRCPROPS obj's
7689 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7690 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7692 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7693 debug.status. It isn't needed, and it can overflow the bits
7694 reserved for it (which may lead to a segv or a GC abort).
7696 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7698 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7699 side-effecting operations from conditions and macro calls.
7700 Replaced SCM_N?IMP by a more explicit predicate in some places.
7701 Minimized the scope of some variables.
7703 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7705 * convert.i.c: Fixed int <-> long conversions which would have
7706 failed if their sizes were different.
7708 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7710 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7711 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7712 as temporary variables. Removed side-effecting operations from
7713 conditions and macro calls. Introduced temporary variables with
7714 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7715 by a more explicit predicate in some places. Removed code that
7716 was conditionally compiled if SICP was defined - which it never
7719 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7721 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7722 Removed some uses of t.arg1 and proc as temporary variables.
7723 Removed side-effecting operations from conditions and macro calls.
7724 Introduced temporary variables with hopefully descriptive names
7725 for clarification. Replaced SCM_N?IMP by a more explicit
7726 predicate in some places.
7728 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7730 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7731 explicit predicate in some places.
7733 (CHECK_EQVISH): Removed.
7735 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7736 variables. Removed side-effecting operations from conditions and
7737 macro calls. Introduced temporary variables for clarification.
7738 Sorted if-else-if check for the type of the last form in a list by
7739 frequency. Avoided some unnecessary tail-recursion calls.
7741 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7743 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7744 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7745 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7746 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7747 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7748 naming scheme for types.
7750 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7751 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7752 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7753 (scm_make_environment), eval.c (scm_closure), fports.c
7754 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7755 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7756 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7757 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7758 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7759 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7760 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7761 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7762 scm_alloc_cell to scm_cell.
7764 * environments.c (core_environments_observe), gc.c
7765 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7766 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7767 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7768 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7769 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7770 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7771 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7774 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7776 * convert.i.c, convert.c: Better range checking.
7778 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7780 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7783 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7785 * Makefile.am: Update path to pre-inst-guile automake frag.
7787 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7789 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7790 features are excluded.
7792 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7794 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7796 2002-02-25 Gary Houston <ghouston@arglist.com>
7798 * convert.c: include <string.h> for convert_i.c.
7800 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7802 * .cvsignore: add stamp-h1.
7804 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7806 * unif.c (scm_array_to_list): Correct name, which had been
7807 accidentally changed to scm_t_arrayo_list!
7809 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7811 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7812 underflowing scm_mallocated.
7814 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7816 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7817 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7818 Reimplemented using the new scm_gc_malloc, etc., functions and
7821 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7823 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7824 to `noinst_PROGRAMS'.
7825 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7826 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7828 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7830 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7831 non-zero is returned from a port or smob free function.
7832 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7833 scm_gc_register_collectable_memory,
7834 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7835 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7837 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7838 debug-malloc.c, dynl.c, environments.c, environments.h,
7839 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7840 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7841 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7842 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7843 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7844 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7845 appropriate. Return zero from smob and port free functions.
7847 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7849 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7850 messages while the GC is running.
7851 (scm_c_issue_deprecation_warning_fmt): New.
7853 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7854 it is pointing to the putback buffer.
7856 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7858 * gsubr.c (create_gsubr): On "too many args" error,
7859 also display arg count and name. Thanks to Bill Schottstaedt.
7861 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7863 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7865 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7866 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7867 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7869 * guile-snarf-docs-texi.in: Bye bye.
7871 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7873 * symbols.c (scm_make_symbol): Fix typo in docstring.
7875 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7876 scm_make_symbol): New prototypes.
7878 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7880 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7881 (SCM_SYMBOL_INTERNED_P): New.
7882 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7883 SCM_MAKINUM since hash values can well be bignums.
7884 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7885 This signals a interned symbol.
7886 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7887 scm_make_symbol): New.
7889 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7891 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7893 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7894 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7895 Thanks to Dave Love.
7897 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7899 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7900 This might help to make unintended clashes less likely.
7901 (scm_string_to_symbol): Protect the string until the symbols is
7904 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7906 * convert.c, convert.h, convert.i.c: New files containing C
7907 array to Scheme conversion helpers meant to be replacement
7908 functions for the deprecated gh interface.
7910 * Makefile.am: Setup rules for new `convert.*' files.
7912 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7914 * symbols.c (scm_c_symbol2str): New function, replacement for
7915 `gh_scm2newsymbol()'.
7917 * strings.c (scm_c_substring2str): New function. Proper
7918 replacement for `gh_get_substr()'.
7920 * socket.c: Include `stdint.h' if available for the `uint32_t'
7923 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7926 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7928 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7930 Other changes unrelated to Elisp...
7932 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7934 (comments): Fix a few typos.
7935 (scm_for_each): Add parentheses around oddly unparenthesized
7936 if/while conditions.
7938 * read.c (scm_read_opts): Add full stop at end of doc for
7941 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7942 instead of gh_symbol2scm.
7944 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7945 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7947 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7948 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7950 First batch of changes for Elisp support...
7952 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7953 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7954 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7956 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7957 conditionalize compilation and initialization of Elisp support
7960 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7961 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7962 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7963 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7964 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7965 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7966 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7967 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7968 options.c (change_option_setting, scm_options), posix.c
7969 (environ_list_to_c), print.c (scm_iprlist), throw.c
7970 (scm_exit_status), vectors.c (scm_vector), weaks.c
7971 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7973 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7976 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7979 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7980 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7981 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7982 (scm_m_atfop): Support function aliasing. Support both function
7983 args, which need transformation, and macro args, which do not.
7984 Add explanatory comments.
7985 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7986 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7987 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7988 SCM_NULLP || SCM_NILP instead of checks against (removed)
7989 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7990 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7992 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7993 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7994 these, but I don't want to remove them yet, just in case.
7995 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7998 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7999 against (removed) scm_lisp_nil.
8000 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
8001 (SCM_NULL_OR_NIL_P): New.
8003 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
8006 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
8007 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
8010 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
8011 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
8012 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
8013 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
8015 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
8016 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
8017 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
8018 Numbering shifted down accordingly.
8019 (SCM_ELISP_NIL): New IFLAG.
8021 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
8023 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8025 * eval.c: Removed outdated references to "everr". Improved some
8028 (scm_deval_args, deval_args): Renamed scm_deval_args to
8029 deval_args, since it is not part of the interface.
8031 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
8032 use references to debug.vect[0] before it exists. Add parentheses
8033 to switch statement.
8035 * goops.h: Added local emacs variables.
8037 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8039 * eval.[ch] (scm_deval_args): Made static.
8041 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
8044 * strings.c (scm_c_string2str): Clarified comment. Replaced
8045 THINKME by FIXME for uniformness. Removed question about whether
8046 arguments need to be protected from garbage collection: Arguments
8047 must be protected as any other variable.
8049 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8051 * procs.h (SCM_CLOSURE_BODY): New Macro.
8053 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
8054 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
8055 get_slot_value, set_slot_value), procs.c
8056 (scm_procedure_documentation), sort.c (closureless), stacks.c
8057 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
8060 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
8062 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
8064 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
8067 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
8069 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
8072 * continuations.c (scm_make_continuation): Do not retain the
8073 throw_value when the continuation is invoked.
8075 2001-12-08 Stefan Jahn <stefan@lkcc.org>
8077 * strings.c (scm_c_string2str): New function. Converts a
8078 given Scheme string into a C string. Also put in two
8079 THINKME's regarding the malloc policy for the missing converter
8082 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
8084 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
8087 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8089 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
8090 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
8092 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
8093 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
8094 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
8097 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
8099 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
8100 SCM_GC_CELL_* macros when accessing free cells.
8102 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
8104 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
8105 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
8106 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
8107 * strings.h (SCM_MAKE_STRING_TAG): New.
8108 * procs.h (SCM_MAKE_CCLO_TAG): New.
8109 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
8111 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
8112 !SCM_ENABLE_DEPRECATED.
8114 * async.c, async.h (scm_system_async_mark_from_signal_handler):
8117 * scmsigs.c (scm_take_signal): Removed all code that assumes that
8118 signal handlers are allowed to divert the flow of control. Call
8119 scm_system_async_mark_from_signal_handler instead of
8120 scm_system_async_mark.
8123 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
8124 scm_alloc_double_cell in their place.
8126 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
8127 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
8128 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8129 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
8130 scm_deprecated_newcell and scm_deprecated_newcell2.
8132 gc.c (scm_tc16_allocated): Only define when including deprecated
8134 (scm_debug_newcell, scm_debug_newcell2): Removed.
8135 (scm_init_storage): Do not initialize scm_tc16_allocated.
8136 (scm_init_gc): Do it here.
8137 (allocated_mark): New, from old code.
8138 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8140 * inline.c, inline.h: New files.
8141 * Makefile.am: Added them in all the right places.
8143 * _scm.h: Include "libguile/inline.h".
8145 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
8146 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
8147 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
8148 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
8149 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
8150 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
8151 scm_alloc_double_cell, respectively.
8153 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
8155 * modules.c (scm_c_use_module): Adapt to changes to
8156 `process-use-modules'.
8158 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8160 * numbers.c (scm_divide): Fix more division by zero errors.
8162 2001-11-21 Gary Houston <ghouston@arglist.com>
8164 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
8165 obsolete. autogen.sh says:
8166 invalid unused variable name: `OMIT_DEPENDENCIES'
8168 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8170 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
8173 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
8175 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
8176 Thanks to Eric Gillespie, Jr!
8178 2001-11-21 Stefan Jahn <stefan@lkcc.org>
8180 * win32-socket.c (getservent, setservent, endservent,
8181 getprotoent, setprotoent, endprotoent): New functions.
8182 Appropriate replacements for M$-Windows.
8184 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
8185 these definitions for GUILE_DEBUG.
8187 * net_db.c: Include "win32-socket.h" if compiling with a native
8188 M$-Windows compiler. Include some pieces of code (protoent and
8189 servent interface) protected by HAVE_* macros when using a
8190 native M$-Windows compiler.
8192 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
8194 * modules.c (scm_c_export): Do nothing when the first argument is
8195 already the terminating NULL. Thanks to Han-Wen Nienhuys!
8197 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
8199 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
8200 also include `buildstamp'.
8202 2001-11-18 Rob Browning <rlb@defaultvalue.org>
8205 (s_scm_major_version): use SCM_MAJOR_VERSION.
8206 (s_scm_minor_version): use SCM_MINOR_VERSION.
8207 (s_scm_micro_version): use SCM_MICRO_VERSION.
8208 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
8212 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
8213 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
8214 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
8216 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
8218 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8219 Rewrite docstrings without reference to substring-move-left/right,
8220 since the latter no longer exist.
8222 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8224 * eval.c: Removed bogus comment about acros.
8226 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
8227 Minimize scope of local variable. Eliminate dependency on
8228 macro DEBUG_EXTENSIONS.
8230 (s_splicing): New error message string.
8232 (scm_m_body): Issue 'bad body' message rather than 'missing
8233 expression' message.
8235 (scm_m_quote): Eliminate unnecessary copying.
8237 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
8238 checking of the body to scm_m_body.
8240 (scm_m_do): Move comment to function header. Rename arg1 to
8241 binding. Made the code a bit easier to read.
8245 (iqq): Added a comment. Changed the depth parameter to
8246 unsigned. Use size_t for vector lengths. Make sure vector object
8247 is gc protected as long as its contents are read. Add some syntax
8248 checks. Get rid of unnecessary SCM_IMP test. Clean up the
8249 control structure a bit.
8251 (scm_m_delay): Added comment about the implementation of
8254 (scm_m_define): Add comment about guile's currying define
8255 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
8256 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
8258 (scm_m_letrec1): Removed. Part of the functionality is taken
8259 over by the new function 'transform_bindings'.
8261 (transform_bindings): New function. Takes over some of the
8262 functionality of removed function 'scm_m_letrec1', namely to split
8263 a list of bindings into a reversed list of variables and a list of
8266 (scm_m_letrec): Call 'transform_bindings'.
8268 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
8269 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
8270 test. Use 'transform_bindings'. Fixed scoping error with named
8271 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
8272 Jerram for suggesting the fix). Cleaned up the control structure
8275 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
8276 unnecessary consing. Eliminated unnecessary
8277 SCM_DEFER/ALLOW_INTS.
8279 (SCM_CEVAL): Un-obfuscated some loops.
8281 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
8283 * gc.h (scm_unhash_name): Old declaration removed.
8285 * eval.c (s_scm_eval): Change @var{primitive-eval} to
8286 @code{primitive-eval}.
8288 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
8289 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
8290 Change @deffnx lines in docstrings to say {Scheme Procedure}
8291 rather than primitive or procedure.
8293 * posix.c (scm_execl), filesys.c (scm_close), unif.c
8294 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
8295 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
8296 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
8297 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
8298 (scm_string_split, scm_string_ci_to_symbol), strings.c
8299 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
8300 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8301 Docstring fixes and improvements reflecting edits that have been
8302 made in the reference manual source.
8304 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8305 scm_object_property, scm_set_object_property_x): Remove invalid
8306 @deffnx lines for corresponding procedure property primitives.
8308 These changes add a @deffnx C function declaration and function
8309 index entries for each Guile primitive to the copy of the doc
8310 snarf output that is used for reference manual synchronization.
8311 Online help is unchanged.
8313 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8314 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8315 name to SCM_SNARF_DOCS.
8317 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8318 snarf-check-and-output-texi.
8320 * Makefile.am (guile-procedures.texi): New rule.
8321 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8322 Changed so that the last stage of doc snarfing is now performed
8323 twice, once to produce guile-procedures.txt for online help, and
8324 once to produce guile.texi for reference manual synchronization.
8326 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8328 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8329 safely usable as a single statement followed by a ';', for example
8332 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8334 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8336 * random.c (scm_random_solid_sphere_x,
8337 scm_random_hollow_sphere_x): Correct "shere" typos.
8339 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8341 * version.c (scm_version): Update docstring to include
8344 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8346 * modules.c (scm_c_export): Call va_end after collecting the
8349 * strop.h, strop.c (scm_substring_move_left_x,
8350 scm_substring_move_right_x): Removed.
8352 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8353 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8356 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8358 * numbers.c: Document macros to define when including
8359 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8360 now rely on SIZEOF_ macros that have been figured out at
8363 * num2integral.i.c: Adapt to new interface.
8364 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8365 target type by casting it and checking whether it is still the
8366 same. Do not try to handle bignums for integral types that are
8367 smaller than fixnums. When handling bignums, collect the
8368 magnituse first into a unsigned type, and correctly check for
8370 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8371 only -MIN_VALUE can still be negative of all negative numbers (in
8374 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8376 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8377 HAVE_LONG_LONG depending on whether their size is non-zero.
8379 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8381 * strop.c (scm_string_null_p): Docfix; nfc.
8382 Thanks to Scott Lenser.
8384 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8386 * extensions.c (scm_load_extension): Canonicalize docstring
8389 * unif.c (scm_uniform_array_write), ports.c
8390 (scm_current_output_port, scm_force_output), dynwind.c
8391 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8392 filesys.c (scm_open, scm_lstat), struct.c
8393 (scm_make_struct_layout), random.c (scm_random,
8394 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8395 (scm_i_index): Remove superfluous whitespace from end of docstring
8398 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8399 strings.c (scm_make_string), variable.c (scm_make_variable,
8400 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8401 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8402 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8403 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8404 newline at end of docstrings.
8406 * modules.c (scm_set_current_module): Add missing newline to
8409 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8411 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8412 and makes them available through Guile. That is because the
8413 Winsock-API does not store its errors in `errno' and thus cannot
8414 return error messages via `strerror (errno)'.
8416 * socket.c (scm_init_socket): Initialize `win32-socket' part
8417 here under M$-Windows.
8419 * numbers.h: Added missing declaration of
8420 `scm_sys_check_number_conversions()'.
8422 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8423 and use in `(strerror)' and `(system-error)'.
8425 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8426 `win32-socket.[ch]' to extra source and header files.
8428 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8430 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8431 a call to turn-on-debugging when --debug has been given instead of
8432 turning it on directly. Also, handle new `--no-debug' option,
8433 which might suppress the call to turn-on-debugging.
8435 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8437 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8439 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8441 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8442 here (was at guile_LDADD) which describes the dependency
8443 correctly and allows a clean build on Win32.
8445 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8448 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8449 import macros for external libraries (libcrypt, libqthreads,
8450 libreadline and libregex).
8452 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8454 * posix.c (flock): Added support for flock() in M$-Windows.
8456 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8459 * fports.c (getflags): Differentiate reading and writing pipes
8462 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8465 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8466 conditionalized error code if `ETIMEDOUT' is not available.
8467 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8470 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8471 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8472 each inclusion of `num2integral.i.c'.
8473 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8475 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8477 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8478 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8480 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8482 * print.c (scm_iprin1): Mark print state as revealed when
8483 dispatching to generic write or display.
8485 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8487 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8489 Support for native Win32. Thanks to Stefan Jahn!
8491 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8492 and win32-dirent.h to extra source and header files. These
8493 include the uname() and the POSIX dirent interface implementation
8494 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8495 linkers which do not allow unresolved symbols inside shared
8496 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8499 * __scm.h: Defined SCM_API. This macro gets prepended to all
8500 function and data definitions which should be exported or imported
8501 in the resulting dynamic link library in the Win32 port.
8503 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8504 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8505 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8506 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8507 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8508 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8509 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8510 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8511 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8512 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8513 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8514 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8515 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8516 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8518 Prefixed each each exported symbol with SCM_API.
8520 * continuations.c: Added comment about the use of the extern
8521 declarations of {get,set}context() functions used in the ia64 port.
8523 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8524 is meant to be a `unsigned long *'.
8526 * filesys.c: Include `direct.h' if possible. Use local
8527 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8528 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8529 able to differentiate between sockets and other file descriptors.
8530 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8533 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8534 statement block in `scm_fport_buffer_add()'.
8535 Some corrections in `getflags()'.
8537 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8539 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8540 build on Win32. Disable preloaded symbols on Win2 platforms.
8542 * ioext.c, ports.c: Include `io.h' is possible.
8544 * mkstemp.c: Include `process.h' is possible.
8546 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8548 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8550 * posix.c: Remove unnecessary dirent includes and defines. Include
8551 local `win32-uname.h' for MinGW. Extern declaration of
8552 `mkstemp()' for systems where it does not exists. Make
8553 `getlogin()' available on M$-Windows.
8555 * scmsigs.c: Made `usleep()' avalable on MinGW.
8557 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8559 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8561 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8563 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8565 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8566 Don't apply scm_uniform_vector_length on arrays.
8568 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8570 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8571 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8572 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8573 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8574 scm_list_<n> over scm_cons[2]?.
8576 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8577 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8578 SCM_C[AD][AD]R instead of explicit form.
8580 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8581 comparison parameters.
8583 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8584 !SCM_NULLP instead of SCM_NIMP.
8586 (scm_m_case): Don't copy the form. Renamed proc to clause and
8587 minimized its scope. Renamed x to clauses. Removed side
8588 effecting operation from macro call.
8590 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8591 minimized its scope. Renamed x to clauses. Minimized the scope
8592 of variable 'len'. Make sure the else clause is treated specially
8593 even in case of '=>' occurences. Don't change the else to #t in
8594 order to be able to distinguish this case in the evaluator. Leave
8595 type checking of the recipient to the evaluator.
8597 (scm_c_improper_memq): Made the comment somewhat clearer.
8599 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8600 test for SCM_IM_LET at the place of the formal parameters.
8601 Simplified the formal parameter checking.
8603 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8604 Renamed arg1 to binding and minimized its scope. Eliminated
8605 unnecessary consing.
8607 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8610 (build_binding_list): New static function.
8612 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8613 Further, split up the 'letrec' unmemoizing code to the
8614 corresponding parts for 'do', 'let' and 'letrec', adding comments
8615 to each form. Cleanup the handling of the do form (This removes
8616 some *real* code :-).
8618 (SCM_CEVAL): Removed side effecting operation from macro call.
8619 Handle the 'else clause of the 'cond form specially - the symbol
8620 'else is not replaced with #t any more.
8622 2001-10-14 Gary Houston <ghouston@arglist.com>
8624 * version.c (scm_version): use sprintf instead of snprintf,
8625 for portability. thanks to Bill Schottstaedt.
8627 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8629 * read.c (scm_lreadr): When user-defined hash procedure returns
8630 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8631 an exception. (This prevents parsing of uniform vectors from
8632 interfering with parsing of numbers.)
8634 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8636 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8637 PTRDIFF_MIN. Thanks to Ken Raeburn.
8639 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8641 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8643 * eval.c (scm_m_atbind): First try to find the variable without
8644 defining it locally; when it has not been found, define it
8647 * modules.c (module_variable): Pass over variables that exist but
8650 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8652 * backtrace.c (display_backtrace_file_and_line): Only use
8653 scm_basename when POSIX support is compiled in. Thanks to Chris
8656 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8658 * numbers.c (mem2uinteger): Return number read so far when coming
8659 across a hexdigit after having read a # or if not reading a hex
8660 value. This will enable the calling code to correctly handle
8661 forms like 1e2. (The background is, that the exponent markers d,
8662 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8663 providing this patch.
8665 (mem2complex): Fix erroneous double-negation. Now, numbers like
8666 1-i will be read correctly.
8668 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8670 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8672 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8674 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8676 * print.c (scm_print_state_vtable, print_state_pool):
8677 Initialize. These variables are now registered as gc roots.
8679 (scm_current_pstate): Update documentation.
8681 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8682 scm_prin1, scm_init_print): print_state_pool is registered as a
8683 gc root and thus does not need to be protected by a surrounding
8686 (make_print_state): The car of print_state_pool no longer holds
8687 the scm_print_state_vtable.
8689 (scm_current_pstate, scm_make_print_state, print_circref,
8690 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8693 (scm_prin1): When building lists, prefer scm_list_<n> over
8696 (scm_iprlist): Removed a redundant SCM_IMP test.
8698 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8700 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8702 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8704 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8705 scm_list_<n> over scm_cons[2]?.
8707 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8709 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8711 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8712 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8713 for some reason his patch didn't make it into the cvs.
8715 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8717 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8718 little bit - should even be somewhat more accurate now.
8720 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8722 * gc.c: support ia64 register backing store.
8723 (SCM_MARK_BACKING_STORE): new macro.
8725 * continuations.h: support ia64 register backing store.
8726 (struct scm_t_contregs): add ia64 register backing store.
8728 * continuations.c: support ia64 register backing store.
8729 (continuation_mark): mark ia64 register backing store.
8730 (continuation_free): free ia64 register backing store.
8731 (scm_make_continuation): capture ia64 register backing store.
8732 (copy_stack_and_call): copy ia64 register backing store.
8734 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8736 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8737 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8738 instead of SCM_NIMP to test for that case.
8740 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8741 scm_t_bits instead of long.
8743 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8745 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8746 SCM_T_SIGNED_BITS_MIN): New.
8747 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8748 Use them to make these macros computable by the preprocessor.
8750 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8751 whether the integral type fits in a fixnum, not the compiler.
8752 This removes a spurious compiler warning. Also, honor the
8753 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8754 needed for `long long's.
8756 * numbers.c: Define NO_PREPRO_MAGOC when including
8757 num2integral.c.i for `long long' and `signed long long'.
8759 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8761 These changes fixes a race condition in the Guile coop - pthread
8764 * coop.c (mother_awake_p): New variable.
8765 (coop_create): Set mother_awake_p before creating or signalling
8766 mother; wait until mother is going to sleep before returning.
8767 (mother): Reset mother_awake_p before going to sleep.
8769 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8771 * options.c (protected_objects, scm_init_options): The content of
8772 protected_objects is now protected from garbage collection using
8773 scm_gc_register_root instead of scm_permanent_object.
8775 (get_option_setting): New static function that computes an option
8776 setting as it was formerly done in the function scm_options.
8778 (get_documented_option_setting): New static function that
8779 returns option documentation as it was formerly done in the
8780 function scm_options. Note that documentation C strings are no
8781 longer precomputed into SCM objects. Instead, they are converted
8782 into SCM strings every time get_documented_option_setting is
8785 (change_option_setting): New static functions that modifies the
8786 option setting as it was formerly done in the function
8787 scm_options. The function is now exception safe, i. e. won't
8788 cause a memory leak when interrupted. Further, only non-immediate
8789 option values are added to the protection list.
8791 (scm_options): This function now has only the purpose to dispatch
8792 to to get_option_setting, get_documented_option_setting or
8793 change_option_setting, depending on the arguments given to
8796 (scm_init_opts): Don't convert documentation C strings into SCM
8797 strings. Further, don't protect any object values: They _must_
8798 be immediate values, otherwise there is no guarantee that they
8799 have not been collected before anyway.
8801 * options.[ch] (scm_t_option): Made type unsigned, name into a
8802 constant char* and val into a scm_t_bits type.
8804 (scm_options, scm_init_opts): The number of options is guaranteed
8805 to be larger or equal to zero. Thus, the type is changed to
8808 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8810 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8811 testing an unsigned value for being >= 0.
8813 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8815 * numbers.h: Removed old comment about using SCM_CAR to access
8818 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8819 the return value is signed. Thanks to Brian Crowder for the bug
8822 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8823 values. With this patch, SCM_SRS can be safely used for other
8824 types than scm_t_signed_bits. However, it should still better be
8825 an internal macro and thus be renamed to SCM_I_SRS.
8827 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8829 2001-10-03 Gary Houston <ghouston@arglist.com>
8831 * continuations.h, unif.h: in the descriptions of the bit patterns
8832 of the heap cells, make bit 0 the least significant.
8834 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8836 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8837 Thanks to Golubev I. N.
8839 2001-09-25 Gary Houston <ghouston@arglist.com>
8841 * ports.c (scm_drain_input): extended the docstring. thanks to
8842 Alex Schroeder and Thien-Thi Nguyen.
8844 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8846 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8847 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8848 macros. (The NUM names might soon change.)
8850 * numbers.h: Added missing declarations.
8852 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8854 * Makefile.am: Distribute num2float.i.c.
8856 * num2float.i.c: New file, multiply included by numbers.c, used
8857 to "templatize" the float <-> num conversion routines.
8859 * numbers.c: New functions: scm_num2float, scm_float2num,
8860 scm_num2double, scm_double2num.
8862 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8864 * .cvsignore: really add version.h
8866 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8867 Otherwise it fails on the alpha. However, we might rather choose
8868 this size conditionally.
8870 * numbers.c (scm_gcd): change "k" to a long from an int.
8871 Otherwise it fails on the alpha. However, we might rather choose
8872 this size conditionally.
8874 * error.c (scm_wta): coerce char* to intptr_t before int
8877 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8880 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8882 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8884 * numbers.c (scm_integer_expt): Accept inexact integer in second
8885 argument. (Thanks to Bill Schottstaedt.)
8887 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8889 * .cvsignore: add version.h
8891 * versiondat.h.in: removed (obsolete).
8893 * version.h.in: renamed from version.h.
8894 (SCM_GUILE_MAJOR_VERSION): new public macro.
8895 (SCM_GUILE_MINOR_VERSION): new public macro.
8896 (SCM_GUILE_MICRO_VERSION): new public macro.
8898 * version.h: renamed to version.h.in.
8901 (scm_major_version): support integer *_VERSION macros.
8902 (scm_minor_version): support integer *_VERSION macros.
8903 (scm_micro_version): support integer *_VERSION macros.
8904 (scm_version): support integer *_VERSION macros.
8906 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8908 * error.c, error.h: Made error keys globally accessible.
8909 Applications might want to test for these or use them in a direct
8912 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8913 routines are passed an inexact. This change in behavior is
8914 motivated by concordance with R5RS: It is more common that a
8915 primitive doesn't want to accept an inexact for an exact.
8917 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8919 The following patch partially undoes my patch from 2001-06-30,
8920 where I added the function scm_gc_mark_cell_conservatively. The
8921 function is buggy, since it breaks guile during conservative
8922 marking if a pointer on the stack points directly into the list of
8923 free cells on the heap: With conservative cell marking this will
8924 cause the whole free list to be scanned and marked - boom!
8926 * gc.c (allocated_mark, MARK, heap_segment,
8927 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8928 (scm_gc_mark_cell_conservatively): Remove function
8929 scm_gc_mark_cell_conservatively and update the corresponding
8930 comments and uses accordingly. Thanks to Christopher Cramer for
8931 the patch. (Minor corrections by me.)
8933 2001-09-15 Gary Houston <ghouston@arglist.com>
8935 * root.h (scm_root_state): removed the continuation_stack and
8936 continuation_stack_ptr members, which have no apparent purpose.
8937 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8940 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8941 (scm_igc): remove all references to contination_stack and
8942 continuation_stack_ptr, avoiding allocation of a vector and
8943 useless processing during gc.
8945 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8947 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8949 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8951 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8953 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8955 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8956 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8958 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8960 * guardians.c (mark_dependencies_in_tconc,
8961 whine_about_self_centered_zombies, scm_init_guardians): Register
8962 the static global variable `self_centered_zombies' via
8963 scm_gc_register_root, to make some cdr-ing unnecessary.
8965 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8967 * backtrace.c (display_backtrace_file,
8968 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8969 values, use SCM_FALSEP when comparing SCM values against #f.
8970 Thanks to Rob Browning for the bug report.
8972 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8974 * strings.[ch] (scm_str2string): New function.
8976 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8978 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8979 when computing nm, even if it's negative.
8980 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8981 (scm_must_realloc): Likewise.
8983 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8985 * numbers.c (scm_sys_check_number_conversions): new function,
8986 defined if Guile is compiled in debugging mode. currently checks
8987 `scm_num2ulong', should check much much more.
8989 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8990 unsigned, ensure that it's positive. thanks to Martin Baulig!
8992 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8994 * __scm.h: Added new section about compile time selectable
8997 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8998 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8999 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
9000 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
9003 * deprecation.c (scm_include_deprecated_features): Simplified.
9005 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9006 `SCM_IMP' instead of `!SCM_CELLP´.
9008 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
9009 Extract side-effecting operations from macros.
9011 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
9012 scm_top_level_lookup_closure_var and scm_system_transformer.
9014 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
9016 (heap_segment): Use CELL_P instead of SCM_CELLP.
9018 * init.c (start_stack): Don't initialize
9019 scm_top_level_lookup_closure_var and scm_system_transformer.
9021 * modules.c (scm_set_current_module): Don't access
9022 scm_top_level_lookup_closure_var and scm_system_transformer.
9024 (scm_sym2var): Don't call scm_variable_set_name_hint.
9026 (scm_post_boot_init_modules): Removed deprecated initializations.
9028 * print.c (scm_ipruk): Don't access cell contents of non cells.
9030 * strings.c (scm_string_set_x): All strings are writable.
9032 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
9033 type. There is only one string type now.
9035 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
9037 * tags.h: Remove comments about two different string types.
9039 (SCM_CELLP, SCM_NCELLP): Deprecated.
9041 * variable.c (make_variable): Remove code variant for vcells.
9043 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
9044 SCM_VARIABLE_LOC): Remove code variant for vcells.
9046 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
9047 SCM_ENABLE_DEPRECATED with the logic reversed.
9049 * dynl.c (moddata, registered_mods), dynl.[ch]
9050 (scm_register_module_xxx, scm_registered_modules,
9051 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
9052 (*top-level-lookup-closure*), eval.[ch]
9053 (scm_top_level_lookup_closure_var, scm_system_transformer,
9054 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
9055 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
9056 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
9057 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
9058 scm_unprotect_object), modules.c (root_module_lookup_closure,
9059 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
9060 beautify_user_module_x_var, try_module_autoload_var,
9061 scm_module_full_name), modules.[ch] (scm_the_root_module,
9062 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9063 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
9064 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
9065 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
9066 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
9067 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
9068 scm_make_shared_substring), tags.h (scm_tc7_substring,
9069 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
9070 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
9071 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
9072 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
9075 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
9076 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
9077 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
9078 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
9079 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
9080 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9081 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
9082 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
9083 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
9084 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
9085 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
9086 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
9087 (setzone, scm_strftime, scm_strptime), vports.c
9088 (scm_make_soft_port): Remove calls to
9089 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
9090 gone, all strings are 0-terminated anyway.
9092 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
9093 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
9094 double inclusion of the same headers to the SCM_<filename>_H
9097 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
9098 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
9099 print.c (scm_iprin1): The type scm_tc7_substring does not exist
9102 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
9103 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
9104 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
9105 !SCM_<foo> over SCM_N<foo>.
9107 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9109 * Makefile.am: Remove references to symbols-deprecated.c.
9111 * symbols.c (scm_init_symbols): Don't initialize deprecated
9114 * symbols-deprecated.c: Removed.
9116 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
9117 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
9118 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
9119 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
9120 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
9121 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
9122 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
9123 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
9124 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
9125 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
9126 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
9127 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
9128 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
9129 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
9130 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
9131 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
9132 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
9133 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
9134 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
9135 scm_intern0, scm_sysintern, scm_sysintern0,
9136 scm_sysintern0_no_module_lookup, scm_symbol_value0,
9137 scm_string_to_obarray_symbol, scm_intern_symbol,
9138 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
9139 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
9140 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
9141 vectors.[ch] (scm_vector_set_length_x): Removed.
9143 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
9144 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
9145 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
9146 Renamed the macros that are defined to inhibit double inclusion of
9147 the same headers to the SCM_<filename>_H format.
9149 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
9150 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
9153 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9155 * continuations.h (scm_contregs), debug.h (scm_debug_info,
9156 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
9157 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
9158 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9159 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
9160 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
9161 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
9162 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
9163 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
9164 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
9165 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
9166 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
9168 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
9169 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
9170 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
9171 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
9172 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
9173 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
9174 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
9175 double inclusion of the same headers to the SCM_<filename>_H
9178 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
9179 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
9180 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
9181 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
9182 !SCM_<foo> over SCM_N<foo>.
9184 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9186 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
9187 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
9188 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
9189 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
9190 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
9191 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
9192 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
9193 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
9194 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
9195 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
9196 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
9197 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
9198 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
9199 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
9200 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
9201 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
9202 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
9203 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
9204 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
9205 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
9206 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
9207 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
9208 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
9209 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
9210 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
9211 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
9212 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
9213 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
9214 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
9215 the macros that are defined to inhibit double inclusion of the
9216 same headers to the SCM_<filename>_H format.
9218 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
9220 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
9221 "scm_t_portable" with "scm_port_table" which was an artifact from
9222 the great "scm_*_t -> scm_t_" renaming.
9224 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
9226 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
9227 used; nfc. Thanks to Bill Schottstaedt.
9229 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
9230 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
9231 Thanks to Chris Cramer.
9233 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
9235 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
9237 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
9239 * dynwind.h (scm_swap_bindings): Declare.
9240 * dynwind.c (scm_swap_bindings): Make non-static.
9242 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
9244 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
9245 doing exactly nothing about them). thanks Neil!
9247 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
9249 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
9251 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
9253 * gc.c: Fix omission bug: Add `heap_segment' forward decl
9254 (proto) in the case when either `GUILE_DEBUG' or
9255 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
9257 (map_free_list): Fix typo: Ref `f' correctly.
9259 Thanks to Chris Cramer.
9261 2001-08-15 Rob Browning <rlb@defaultvalue.org>
9263 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
9265 (libpath.h): change libguileversion to libguileinterface.
9267 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
9269 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
9270 ChangeLog-2000. Thanks to Daniel Skarda!
9272 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
9274 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
9275 do it from the Makefile.
9277 * Makefile.am: rearrange the snarfing slightly, so that .doc files
9278 are of a reasonable size.
9280 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
9282 * stacks.c (scm_make_stack): Improve docstring by explaining use
9285 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
9287 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
9288 scm_char_whitespace_p, scm_char_upper_case_p,
9289 scm_char_lower_case_p, scm_char_is_both_p): Do not require
9290 characters to fulfill isascii in addition to the primary
9293 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9295 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
9296 scm_istr2flo, scm_istring2number): Removed.
9298 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
9301 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9302 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9305 (scm_string_to_number): Use new number parser.
9307 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9308 handles complex numbers.
9310 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9313 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9316 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9318 (scm_i_mem2number): Added.
9320 (scm_exact_to_inexact): Changed signature.
9322 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9323 here instead of within scm_i_mem2number. Call scm_i_mem2number
9324 instead of scm_istr2int and scm_istring2number.
9326 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9328 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9329 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9330 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9331 !SCM_<pred> over SCM_N<pred>.
9333 (scm_eval_body): Remove side effecting code from macro call.
9335 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9338 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9340 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9342 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9344 Removed vcell slot from structs.
9346 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9349 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9350 zero. Use scm_vtable_index_layout instead of "0" when accessing
9352 (scm_init_struct): Remove vcell slot layout code from
9353 required_vtable_fields.
9355 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9357 * goops.c (build_class_class_slots): Removed vcell slot
9360 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9361 Removed vcell slot layout code.
9362 (scm_si_vcell): Removed.
9364 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9366 "Glocs" have been removed.
9368 * tags.h: Update tag system docs.
9369 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9370 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9371 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9372 or SCM_NCONSP, respectively.
9374 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9375 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9376 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9378 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9379 tell glocs from structs.
9381 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9383 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9384 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9385 instead of with glocs.
9386 (EVALCAR): Do not test for glocs.
9387 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9389 (scm_unmemocar): Do not handle glocs.
9390 (scm_m_atfop): Memoize as a variable, not as a gloc.
9391 (scm_eval_args, scm_deval_args): Do not handle glocs.
9392 (scm_ceval, scm_deval): Likewise.
9394 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9395 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9398 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9400 * dynwind.c (scm_swap_bindings): Likewise.
9401 (scm_dowinds): Updated to recognize lists of variables instead of
9404 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9407 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9410 2001-07-25 Gary Houston <ghouston@arglist.com>
9412 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9413 docstrings to reflect the n-ary implementation.
9415 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9417 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9418 value of a variable, not the plain "return" statement.
9420 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9422 * eval.c: Allow variables in memoized code (in addition to glocs).
9423 (scm_lookupcar): Handle variables in lost races. Replace symbol
9424 with variable directly, do not make a gloc.
9425 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9427 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9430 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9432 * variable.c (scm_i_variable_print): Use "value" instead of
9433 "binding" since a binding is the mapping between symbols and
9434 variables, not between variables and their values.
9436 * tags.h (scm_tc7_variable): New.
9437 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9438 * print.c (scm_iprin1): Likewise.
9440 * variable.h (scm_tc16_variable): Removed.
9441 (SCM_VARIABLEP): Test for new tc7 code.
9442 (scm_i_variable_print): New.
9443 * variable.c (scm_tc16_variable): Removed.
9444 (variable_print): Renamed to scm_i_variable_print and made
9446 (variable_equal_p): Removed.
9447 (make_variable): Construct a tc7 object instead of a smob.
9448 (scm_init_variable): Do not register smob.
9450 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9452 * tags.h: Include inttypes.h when we have it.
9454 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9456 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9457 is taken by the new SCM_IM_CALL_WITH_VALUES.
9458 * print.c (scm_isymnames): Update table accordingly.
9460 2001-07-22 Gary Houston <ghouston@arglist.com>
9462 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9463 SCM_MAKINUM to convert regoff_t value to SCM.
9465 2001-07-21 Gary Houston <ghouston@arglist.com>
9467 * scmsigs.c: include sys/time.h for itimer stuff.
9469 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9471 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9473 * c-tokenize.lex: add option %nounput to quiet warning.
9474 Add prototype for yylex to quiet warning.
9476 * scmconfig.h.in: add flags for setitimer and getitimer.
9478 * scmsigs.h (scm_init_scmsigs): new prototype.
9479 (scm_init_scmsigs): new prototype.
9481 * scmsigs.c (s_scm_setitimer): new function.
9482 (s_scm_setitimer): new function.
9484 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9486 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9487 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9488 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9489 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9490 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9491 guile-func-name-check.in, guile-snarf-docs-texi.in,
9492 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9493 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9494 objprop.c, objprop.h, options.c, options.h, random.h,
9495 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9496 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9497 version.c, version.h: Updated copyright notice.
9499 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9501 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9502 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9503 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9504 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9505 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9506 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9507 sym_environment, scm_sym_change_class): New static variables to
9508 hold predefined symbols.
9510 (build_class_class_slots): Build the list using scm_list_n
9511 instead of cons. Also, slots are already created as lists, thus
9512 making a call to maplist unnecessary.
9514 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9515 scm_class_direct_subclasses, scm_class_direct_methods,
9516 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9517 scm_method_procedure, create_standard_classes, purgatory): Use
9520 (build_slots_list, compute_getters_n_setters,
9521 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9522 get_slot_value_using_name, set_slot_value_using_name,
9523 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9524 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9525 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9527 (scm_sys_prep_layout_x): Minimize variable scopes.
9529 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9530 scm_sys_fast_slot_set_x): Fix signedness.
9532 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9533 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9534 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9535 when converting to and from SCM values.
9537 (scm_enable_primitive_generic_x): Add rest argument checking.
9539 (map, filter_cpl, maplist, scm_sys_initialize_object,
9540 scm_sys_prep_layout_x, slot_definition_using_name,
9541 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9542 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9543 predicates over SCM_N?IMP tests.
9545 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9548 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9551 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9553 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9555 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9557 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9559 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9561 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9563 * strings.c (s_scm_string): fix arg position in assert.
9565 2001-07-11 Gary Houston <ghouston@arglist.com>
9567 * strports.c (st_write): use memcpy, not strncpy. thanks to
9570 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9572 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9573 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9574 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9575 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9576 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9577 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9578 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9579 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9580 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9581 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9582 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9583 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9584 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9585 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9586 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9587 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9588 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9589 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9590 weaks.c, weaks.h: Remove "face-lift" comment.
9592 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9594 * .cvsignore: add stamp-h.in.
9596 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9598 * hooks.c (scm_make_hook, scm_add_hook_x),
9599 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9600 value info to the docstrings.
9602 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9604 Some more compatibility patches for Windows.
9606 * posix.c (getlogin): getlogin() implementation for Windows.
9608 * backtrace.c, ioext.c: Include <stdio.h>.
9610 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9613 * cpp_sig_symbols.in: Added SIGBREAK.
9615 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9617 * strports.c (scm_read_0str, scm_eval_0str): Call
9618 scm_c_read_string and scm_c_eval_string respectively, not
9619 themselves. Thanks to Dale P. Smith!
9621 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9623 * unif.c (scm_array_set_x): The variable args does not
9624 necessarily have to be a list. Further, got rid of a redundant
9627 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9629 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9632 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9633 init_heap_seg): Fixed signedness.
9635 (init_heap_seg): Replaced strange for-loop with a while loop.
9637 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9639 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9641 The following patch adds conservative marking for the elements of
9642 free or allocated cells.
9644 * gc.c (allocated_mark, heap_segment): New static functions.
9646 (which_seg): Deleted, since the functionality is now provided by
9647 function heap_segment.
9649 (map_free_list): Use heap_segment instead of which_seg.
9651 (MARK): If cell debugging is disabled, mark free cells
9654 (scm_mark_locations, scm_cellp): Extracted the search for the
9655 heap segment of a SCM value into function heap_segment.
9657 (scm_init_storage): Allocated cells must be marked
9660 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9662 The following patch changes the representation of weak vectors to
9663 double cells instead of using an extension of the vector's
9666 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9667 the result of SCM_WVECT_GC_CHAIN.
9669 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9671 * weaks.c (allocate_weak_vector): New static function. It does
9672 not patch any previously created vector object during the
9673 construction of a weak vector, and thus doesn't need to switch
9674 off interrupts during vector creation.
9676 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9677 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9678 Use allocate_weak_vector to provide the new weak vector object.
9680 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9681 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9682 now stored in the double cell.
9684 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9687 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9688 using an entry of the double cell.
9690 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9692 * stamp-h.in: bye bye
9694 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9696 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9699 * load.c, load.h (scm_c_primitive_load,
9700 scm_c_primitive_load_path): New.
9702 * strports.c, strports.h (scm_c_read_string): Renamed from
9703 scm_read_0str. Also, added "const" qualifier to argument.
9704 (scm_c_eval_string): Renamed from scm_eval_0str.
9705 (scm_read_0str, scm_eval_0str): Deprecated.
9707 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9709 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9712 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9714 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9715 scm_list_n): New functions.
9716 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9717 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9718 (lots of files): Use the new functions.
9720 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9722 * strings.c: #include "libguile/deprecation.h".
9724 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9726 * read.c (scm_lreadr): When reading a hash token, check for a
9727 user-defined hash procedure first, so that overriding the builtin
9728 hash characters is possible (this was needed for implementing
9729 SRFI-4's read synax `f32(...)').
9731 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9732 because the latter is unsigned now and breaks comparisons like
9733 (n < (scm_t_signed_bits)MIN_VALUE).
9735 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9737 * eval.h, eval.c (scm_call_4): New function.
9739 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9740 directly rather than dispatching to them via scm_ithrow and a lazy
9743 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9744 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9745 for trap handler procedures.
9747 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9748 procedures not being #f.
9750 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9752 * Makefile.am (c-tokenize.c): add rule to generate it.
9753 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9755 filter-doc-snarfage.c: remove.
9757 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9759 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9761 The following set of changes makes compiling Guile under various
9762 Windows compilers easier. Compilation under GNU systems should
9763 not be affected at all.
9765 Thanks to Stefan Jahn for all necessary information, patches and
9768 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9769 getpgrp, ttyname, primitive-fork and some header inclusion for
9772 * random.c: Define M_PI, if not predefined and use __int64 for
9773 LONG64 under Windows.
9775 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9776 Windows and conditionalize some signal names.
9778 * socket.c (scm_getsockopt): Added missing comma.
9779 Include socket library header under Windows.
9781 * stime.c (CLKTCK): Add cast to int, to make it compile under
9784 * ports.c (truncate): New function, compiled only under Windows.
9786 * net_db.c: Do not declare errno under Windows.
9788 * iselect.h, inet_aton.c: Include socket library headers under
9791 * guile.c (inner_main): Under Windows, initialize socket library
9792 and initialize gdb_interface data structures.
9794 * gdb_interface.h: Under Windows, gdb_interface cannot be
9795 initialized statically. Initialize at runtime instead.
9797 * fports.c (write_all): ssize_t -> size_t.
9798 (fport_print): Conditionalize call to ttyname().
9799 (getflags): New function, compiled only under Windows.
9801 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9802 primitives chown, link, fcntl.
9803 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9806 * backtrace.c: Include <io.h> under Windows.
9808 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9810 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9813 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9815 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9816 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9817 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9818 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9819 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9820 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9821 (scm_dynamic_wind, scm_dowinds), environments.c
9822 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9823 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9824 goops.c (GETVAR, purgatory, make_class_from_template,
9825 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9826 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9827 (scm_primitive_load), modules.c (scm_resolve_module,
9828 scm_c_define_module, scm_c_use_module, scm_c_export,
9829 module_variable, scm_eval_closure_lookup, scm_sym2var,
9830 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9831 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9832 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9833 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9834 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9835 (scm_object_to_string, scm_call_with_output_string,
9836 scm_call_with_input_string), throw.c (scm_body_thunk,
9837 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9838 scm_make_shared_array), vports.c (sf_flush, sf_write,
9839 sf_fill_input, sf_close): Use one of the above functions.
9840 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9842 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9844 * filesys.c (scm_close), ports.c (scm_close_port,
9845 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9846 instead of SCM_NEGATE_BOOL.
9848 * filesys.c (scm_stat): Clean up type dispatch.
9850 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9851 scm_output_port_p): Get rid of redundant IM type check.
9853 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9854 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9855 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9856 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9857 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9858 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9859 scm_addr_vector), stime.c (scm_strftime), strings.c
9860 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9861 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9862 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9863 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9864 instead of scm_makfromstr.
9866 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9867 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9868 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9869 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9870 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9871 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9872 !SCM_<pred> over SCM_N<pred>.
9874 * strings.[ch] (scm_makfromstr): Deprecated.
9876 (scm_mem2string): New function, replaces scm_makfromstr.
9878 * strings.c (scm_substring), strop.c (string_copy,
9879 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9880 (scm_symbol_to_string): Fix gc problem.
9882 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9885 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9886 warning about comparing signed and unsigned values. This fix is
9887 not optimal, since it won't work reliably if sizeof (c_start) >
9888 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9889 solution is to define this macro as an inline function, thus
9890 allowing to specifiy the types of c_start and c_end.
9892 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9894 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9897 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9898 Rename <foo>H to SCM_<foo>_H.
9900 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9901 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9903 (narrow_stack): Make i unsigned. Don't use side-effecting
9904 operations in conditions.
9906 (narrow_stack, scm_make_stack, scm_stack_id,
9907 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9909 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9910 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9913 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9916 (scm_last_stack_frame): Remove bogus `;'.
9918 * stacks.h (SCM_FRAMEP): Fix type check.
9920 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9922 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9923 c-tokenize.c when doing maintainer-clean.
9925 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9927 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9930 * eval.c: all hash signs are in column 0.
9932 * Makefile.am (guile_filter_doc_snarfage): build using
9933 c-tokenize.c, not filter-doc-snarfage.c.
9934 rearrange snarfing dependencies a bit.
9936 * c-tokenize.lex: new file.
9938 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9940 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9941 scm_t_srcpropso_plist. See the big type renaming.
9942 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9943 Thanks to Seth Alves!
9945 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9946 they aren't defined already.
9948 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9950 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9951 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9954 * backtrace.c (display_expression, scm_set_print_params_x,
9955 display_application, display_frame, scm_backtrace), numbers.c
9956 (scm_istring2number), objects.c (scm_class_of,
9957 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9958 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9960 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9963 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9964 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9966 * objects.c (scm_class_of): Type fix.
9968 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9971 * pairs.h (scm_error_pair_access): The function can return if
9974 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9976 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9978 * gdbint.c, init.c: Removed inclusion of tag.h.
9980 * tag.h, tag.c: Removed files.
9982 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9984 2001-06-20 Gary Houston <ghouston@arglist.com>
9986 * deprecation.c, extensions.c, rw.c: include string.h.
9988 2001-06-19 Gary Houston <ghouston@arglist.com>
9990 * filter-doc-snarfage.c (process): added ungetc in
9991 MULTILINE_COOKIE case since otherwise it fails when there's no
9992 space between the '(' and the quote of the following string
9995 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9997 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9999 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10001 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
10002 extension takes place.
10003 * strings.h (SCM_STRING_LENGTH): Likewise.
10004 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
10006 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
10009 * tags.h: Include <stdint.h> when we have it.
10010 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
10011 available. Else use "unsigned long".
10012 (scm_signed_bits_t): New.
10014 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
10015 (SCM_INUM): Cast result to scm_signed_bits_t.
10017 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
10019 * mkstemp.c: Update path to #include file scmconfig.h.
10020 Thanks to Golubev I. N.
10022 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10024 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
10026 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
10027 the macro definition.
10029 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
10030 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
10031 instead of SCM_INST_TYPE.
10033 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
10034 the object is a struct before accessing its struct flags.
10036 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
10038 2001-06-10 Gary Houston <ghouston@arglist.com>
10040 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
10041 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
10042 work reliably anymore. try it from boot-9.scm instead.
10044 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
10046 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
10047 Thanks to Matthias Köppe!
10049 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
10051 * snarf.h, filter-doc-snarfage.c: more changes to cope with
10052 space-happy C preprocessors.
10054 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
10055 inside cookies. thanks to Matthias Köppe!
10057 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10059 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
10060 keywords. Fix gc protection.
10062 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
10063 operations in macro calls.
10065 * pairs.c (scm_error_pair_access): Avoid recursion.
10067 Thanks to Matthias Koeppe for reporting the bugs that correspond
10068 to the following set of patches.
10070 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
10071 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
10072 bitvector base address using SCM_BITVECTOR_BASE.
10074 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
10077 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10079 * goops.c (SCM_CLASS_REDEF): Removed.
10081 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
10084 Thanks to Matthias Koeppe for reporting the bugs that correspond
10085 to the following set of patches.
10087 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
10088 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
10089 scm_sys_allocate_instance, clear_method_cache,
10090 scm_sys_invalidate_method_cache_x, scm_make,
10091 create_standard_classes, scm_make_port_classes, scm_make_class,
10092 scm_add_slot): Use SCM_SET_SLOT to set slot values.
10094 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
10096 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
10098 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
10099 UNARY_ELTS_CODE): Remove bogus break statement.
10101 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
10102 Don't access bit vectors elements as SCM objects.
10104 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
10105 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10106 Don't assign to an unpacked value.
10108 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
10110 * __scm.h (SCM_NORETURN): Moved here from error.h.
10112 (SCM_UNUSED): New macro.
10114 (SCM_DEBUG_PAIR_ACCESSES): New macro.
10116 * backtrace.c (display_error_handler), continuations.c
10117 (continuation_print), debug.c (debugobj_print), dynwind.c
10118 (guards_print), environments.c (observer_print,
10119 core_environments_finalize, leaf_environment_cell,
10120 leaf_environment_print, eval_environment_print,
10121 eval_environment_observer, import_environment_define,
10122 import_environment_undefine, import_environment_print,
10123 import_environment_observer, export_environment_define,
10124 export_environment_undefine, export_environment_print,
10125 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
10126 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
10127 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
10128 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
10129 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
10130 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
10131 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
10132 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
10133 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
10134 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
10135 set_slot_value, test_slot_existence, scm_change_object_class,
10136 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
10137 default_setter), guardians.c (guardian_print, guardian_gc_init,
10138 guardian_zombify, whine_about_self_centered_zombies), guile.c
10139 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
10140 mallocs.c (malloc_print), numbers.c (scm_print_real,
10141 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
10142 end_input_default, scm_port_print, fill_input_void_port,
10143 write_void_port), root.c (root_print), smob.c (scm_mark0,
10144 scm_free0, scm_smob_print, scm_smob_apply_1_error,
10145 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
10146 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
10147 (scm_struct_free_0, scm_struct_free_standard,
10148 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
10149 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
10150 scm_handle_by_throw, scm_ithrow), weaks.c
10151 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
10152 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
10153 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
10155 * error.h (SCM_NORETURN): Moved to __scm.h.
10157 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
10158 Renamed <foo>H to SCM_<foo>_H.
10160 * gc.c (debug_cells_gc_interval): New static variable.
10162 (scm_assert_cell_valid): If selected by the user, perform
10163 additional garbage collections.
10165 (scm_set_debug_cell_accesses_x): Extended to let the user specify
10166 if additional garbage collections are desired.
10168 (mark_gc_async): If additional garbage collections are selected
10169 by the user, don't call the after-gc-hook. Instead require the
10170 user to run the hook manually.
10172 * pairs.c (scm_error_pair_access): New function. Only compiled
10173 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
10175 * pairs.h (SCM_VALIDATE_PAIR): New macro.
10177 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
10178 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
10179 is a real pair object. (Glocs are also accepted, but that may
10180 change.) If not, abort with an error message.
10182 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10184 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
10186 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
10187 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
10189 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
10191 * extensions.c (scm_c_register_extension): Allow NULL as library
10193 (load_extension): Ignore NULL library names when comparing.
10195 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
10196 non-pointers are being compared. Thanks to Alexander Klimov!
10198 2001-06-04 Gary Houston <ghouston@arglist.com>
10200 * rw.c (scm_write_string_partial): new procedure implementing
10201 write-string/partial in (ice-9 rw).
10202 * rw.h: declare scm_write_string_partial.
10204 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
10206 * keywords.c (keyword_print): Substract 1 from length of symbol
10207 name, accounting for the silly dash.
10209 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
10210 Do not emit deprecation warning.
10212 Added exception notice to all files.
10214 * dynl.c: Include "deprecation.h".
10216 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
10218 * dynl.c (scm_register_module_xxx, scm_registered_modules,
10219 scm_clear_registered_modules): Deprecated.
10221 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
10223 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
10224 guile-snarf-docs-texi.
10226 * fports.c: HAVE_ST_BLKSIZE changed to
10227 HAVE_STRUCT_STAT_ST_BLKSIZE.
10228 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
10229 HAVE_STRUCT_STAT_ST_BLKSIZE.
10231 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
10232 HAVE_STRUCT_STAT_ST_RDEV.
10233 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
10234 HAVE_STRUCT_STAT_ST_BLKSIZE.
10235 (scm_stat2scm): HAVE_ST_BLOCKS changed to
10236 HAVE_STRUCT_STAT_ST_BLOCKS.
10238 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
10240 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
10241 of scm_eval_x to allow module changes between the forms in the
10242 string. Set/restore module using scm_c_call_with_current_module.
10244 * mkstemp.c: New file, slightly modified from libiberties
10247 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
10249 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
10250 filter-doc-snarfage.c: new files.
10252 * Makefile.am: add stuff to [build,] use and distribute
10253 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
10255 * guile-snarf.in: grok the new snarf output.
10257 * snarf.h: make the output both texttools- and `read'-friendly.
10259 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
10260 guile-snarf-docs. (should also deprecate, I guess. maybe not).
10262 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
10264 * print.c (scm_simple_format): Support "~~" and "~%". Signal
10265 error for unsupported format controls and for superflous
10266 arguments. Thanks to Daniel Skarda!
10268 * print.h, print.c (scm_print_symbol_name): Factored out of
10270 (scm_iprin1): Call it.
10272 * keywords.c (keyword_print): Use scm_print_symbol_name so that
10273 weird names are printed correctly.
10275 * print.c (scm_print_symbol_name): Symbols whose name starts with
10276 `#' or `:' or ends with `:' are considered weird.
10278 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10280 * numbers.c (scm_difference, scm_divide): Clarified comments for -
10283 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10285 * debug.h: Removed prototype for scm_eval_string.
10287 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10289 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
10290 (make-string 2000 #\!))' in an older version).
10292 Change strncpy to memcpy to allow embedded NUL characters in
10295 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
10297 * hooks.c (scm_create_hook): deprecated.
10298 (make_hook): deleted.
10299 (scm_make_hook): all the hook creation code is now here.
10301 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10302 a hook, make it permanent, and do a `scm_c_define' on it.
10304 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10306 * socket.c (s_scm_inet_pton): fix docstring quoting.
10307 (s_scm_inet_ntop): ditto.
10309 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10311 * hashtab.c (scm_internal_hash_fold): fix argument position in
10314 * environments.c (s_scm_import_environment_set_imports_x): fix
10315 argument position in SCM_ASSERT.
10317 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10318 (s_scm_make_iloc): ditto.
10320 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10322 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10324 * eval.c (promise_print): Read the promise's value as an object.
10326 (SCM_CEVAL): Don't perform side-effecting operations in macro
10329 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10330 conditional expression.
10332 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10335 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10336 text, removed redundant computation of effective_length and fixed
10337 the overflow check.
10339 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10342 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10344 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10346 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10347 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10349 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10351 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10352 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10353 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10354 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10356 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10358 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10360 * ramap.c (ramap_rp): Removed bogus `;'.
10362 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10365 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10366 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10367 Read SCM objects rather than scm_bits_t values.
10369 * tags.h (SCM_VOIDP_TEST): Removed.
10371 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10372 value of 2 now corresponds to the former 1, the current 1
10373 corresponds to the former situation that SCM_VOIDP_TEST was
10376 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10377 If this appears to be not ANSI compliant, we will change it to
10378 typedef struct scm_unused_struct { } * SCM;
10379 Thanks to Han-Wen Nienhuys for the suggestion.
10381 * unif.c (scm_array_set_x): Fix typing problem, and use
10382 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10383 dealing with uniform vectors.
10385 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10387 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10388 (scm_igc): mark from them, too (precisely, not conservatively!).
10390 * root.h (scm_gc_registered_roots): new object in
10393 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10394 `scm_protect_object'. shouldn't call it at all, though, it seems.
10396 * gc.c (scm_[un]protect_object): deprecated.
10397 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10398 (scm_gc_[un]register_root[s]): new.
10400 * gc.h: add prototypes for scm_gc_[un]protect_object,
10401 scm_gc_[un]register_root[s].
10403 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10405 revert the controversial part of the 2001-05-24 changes.
10407 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10409 * modules.c (scm_env_module): Exported to Scheme.
10411 * eval.c (scm_debug_opts): New option `show-file-name'.
10413 * debug.h (SCM_SHOW_FILE_NAME): New.
10415 * backtrace.c: Include "libguile/filesys.h".
10416 (sym_base, display_backtrace_get_file_line,
10417 display_backtrace_file, display_backtrace_file_and_line): New.
10418 (display_frame): Call display_backtrace_file_and_line if that is
10420 (display_backtrace_body): Call scm_display_backtrace_file if
10423 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10424 Prototypes removed since there's no definition for these
10427 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10429 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10430 Changed use of scm_array->scm_array_t and
10431 scm_array_dim->scm_array_dim_t to enable build with
10432 --disable-deprecated.
10434 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10436 The purpose of this set of changes is to regularize Guile's usage
10437 of ANSI C integral types, with the following ideas in mind:
10439 - SCM does not nesessarily have to be long.
10440 - long is not nesessarily enough to store pointers.
10441 - long is not nesessarily the same size as int.
10443 The changes are incomplete and possibly buggy. Please test on
10447 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10450 * unif.h: type renaming:
10451 scm_array -> scm_array_t
10452 scm_array_dim -> scm_array_dim_t
10453 the old names are deprecated, all in-Guile uses changed.
10455 * tags.h (scm_ubits_t): new typedef, representing unsigned
10458 * stacks.h: type renaming:
10459 scm_info_frame -> scm_info_frame_t
10460 scm_stack -> scm_stack_t
10461 the old names are deprecated, all in-Guile uses changed.
10463 * srcprop.h: type renaming:
10464 scm_srcprops -> scm_srcprops_t
10465 scm_srcprops_chunk -> scm_srcprops_chunk_t
10466 the old names are deprecated, all in-Guile uses changed.
10468 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10469 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10470 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10471 vectors.c, vports.c, weaks.c:
10472 various int/size_t -> size_t/scm_bits_t changes.
10474 * random.h: type renaming:
10475 scm_rstate -> scm_rstate_t
10476 scm_rng -> scm_rng_t
10477 scm_i_rstate -> scm_i_rstate_t
10478 the old names are deprecated, all in-Guile uses changed.
10480 * procs.h: type renaming:
10481 scm_subr_entry -> scm_subr_entry_t
10482 the old name is deprecated, all in-Guile uses changed.
10484 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10486 scm_option -> scm_option_t
10487 the old name is deprecated, all in-Guile uses changed.
10489 * objects.c: various long -> scm_bits_t changes.
10490 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10492 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10495 * num2integral.i.c: new file, multiply included by numbers.c, used
10496 to "templatize" the various integral <-> num conversion routines.
10498 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10499 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10501 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10502 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10503 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10504 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10505 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10506 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10507 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10508 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10509 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10510 scm_num2size): new functions.
10512 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10514 * load.c: change int -> size_t in various places (where the
10515 variable is used to store a string length).
10516 (search-path): call scm_done_free, not scm_done_malloc.
10518 * list.c (scm_ilength): return a scm_bits_t, not long.
10519 some other {int,long} -> scm_bits_t changes.
10521 * hashtab.c: various [u]int -> scm_bits_t changes.
10522 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10523 (scm_ihashx): n: uint -> scm_bits_t
10524 use scm_bits2num instead of scm_ulong2num.
10526 * gsubr.c: various int -> scm_bits_t changes.
10528 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10530 * gh_data.c (gh_num2int): no loss of precision any more.
10532 * gh.h (gh_str2scm): len: int -> size_t
10533 (gh_{get,set}_substr): start: int -> scm_bits_t,
10535 (gh_<num>2scm): n: int -> scm_bits_t
10536 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10537 (gh_length): return scm_bits_t, not unsigned long.
10539 * gc.[hc]: various small changes relating to many things stopping
10540 being long and starting being scm_[u]bits_t instead.
10541 scm_mallocated should no longer wrap around.
10543 * fports.h: type renaming:
10544 scm_fport -> scm_fport_t
10545 the old name is deprecated, all in-Guile uses changed.
10547 * fports.c (fport_fill_input): count: int -> scm_bits_t
10548 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10550 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10551 those prototypes, as the functions they prototype don't exist.
10553 * fports.c (default_buffer_size): int -> size_t
10554 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10555 default_size: int -> size_t
10556 (scm_setvbuf): csize: int -> scm_bits_t
10558 * fluids.c (n_fluids): int -> scm_bits_t
10559 (grow_fluids): old_length, i: int -> scm_bits_t
10560 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10562 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10564 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10565 the new and shiny SCM_NUM2INT.
10567 * extensions.c: extension -> extension_t (and made a typedef).
10569 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10570 there are no nasty surprises if/when the various deeply magic tag
10571 bits move somewhere else.
10573 * eval.c: changed the locals used to store results of SCM_IFRAME,
10574 scm_ilength and such to be of type scm_bits_t (and not int/long).
10575 (iqq): depth, edepth: int -> scm_bits_t
10576 (scm_eval_stack): int -> scm_bits_t
10577 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10578 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10579 i: int -> scm_bits_t
10581 * environments.c: changed the many calls to scm_ulong2num to
10583 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10585 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10587 * debug.h: type renaming:
10588 scm_debug_info -> scm_debug_info_t
10589 scm_debug_frame -> scm_debug_frame_t
10590 the old names are deprecated, all in-Guile uses changed.
10591 (scm_debug_eframe_size): int -> scm_bits_t
10593 * debug.c (scm_init_debug): use scm_c_define instead of the
10594 deprecated scm_define.
10596 * continuations.h: type renaming:
10597 scm_contregs -> scm_contregs_t
10598 the old name is deprecated, all in-Guile uses changed.
10599 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10600 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10602 * continuations.c (scm_make_continuation): change the type of
10603 stack_size from long to scm_bits_t.
10605 * ports.h: type renaming:
10606 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10607 scm_port -> scm_port_t
10608 scm_ptob_descriptor -> scm_ptob_descriptor_t
10609 the old names are deprecated, all in-Guile uses changed.
10610 (scm_port_t.entry): int -> scm_bits_t.
10611 (scm_port_t.line_number): int -> long.
10612 (scm_port_t.putback_buf_size): int -> size_t.
10614 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10615 global namespace and have little value beside that).
10616 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10618 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10619 exist (for size_t & ptrdiff_t).
10620 (scm_sizet): deprecated.
10622 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10624 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10626 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10627 SCM_VARIABLE_INIT since that it what it used to be.
10629 * deprecation.c (scm_include_deprecated_features): Make docstring
10630 ANSIsh. Thanks to Matthias Köppe!
10632 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10634 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10635 needed for weak-key hashtables.
10637 * procs.c (scm_make_subr_with_generic): Add missing last argument
10638 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10640 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10641 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10643 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10645 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10647 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10648 `duplicate_string'. Do not use an indirect cell, store symbol
10649 directly in collision list of hash table.
10650 (duplicate_string): Removed.
10652 * init.c (scm_init_guile_1): Call scm_init_extensions.
10654 * Makefile.am: Add "extensions.c" and related files in all the
10657 * extensions.h, extension.c: New files.
10659 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10661 * modules.h (scm_system_module_env_p): Move out of deprecated
10664 * rw.h (scm_init_rw): Added prototype.
10666 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10667 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10668 New functions. They replace scm_make_gsubr and
10669 scm_make_gsubr_with_generic. The `make' variants only create the
10670 gsubr object, while the `define' variants also put it into the
10671 current module. Changed all callers.
10672 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10674 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10675 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10676 functions. They replace scm_make_subr, scm_make_subr_opt and
10677 scm_make_subr_with_generic. The `make' variants only create the
10678 subr object, while the `define' variants also put it into the
10679 current module. Changed all callers.
10680 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10683 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10684 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10685 the comments above.
10687 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10689 * throw.c (scm_lazy_catch): Slight docstring clarification.
10691 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10693 * throw.c: Lazy-catch handlers are no longer allowed to return.
10694 Fixed comments throughout.
10695 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10696 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10697 recognized as such.
10699 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10700 refered to s_scm_minor_version previously.
10702 * modules.h, modules.c: Moved around a lot of code so that
10703 deprecated features appear at the bottom.
10704 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10705 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10706 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10707 scm_load_scheme_module): Deprecated.
10708 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10709 environments corresponding to the root module.
10710 (convert_module_name, scm_c_resolve_module,
10711 scm_c_call_with_current_module, scm_c_define_module,
10712 scm_c_use_module, scm_c_export): New.
10713 (the_root_module): New static variant of scm_the_root_module. Use
10714 it everywhere instead of scm_the_root_module.
10716 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10717 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10718 (scm_c_with_fluid): New.
10719 (scm_with_fluids): Use scm_c_with_fluids instead of
10720 scm_internal_with_fluids.
10722 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10723 `scm_init_goops'. Do not explicitly create/switch modules.
10724 Return SCM_UNSPECIFIED.
10725 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10726 (scm_load_goops): Use scm_c_resolve_module instead of
10727 scm_resolve_module.
10729 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10730 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10731 `scm_init_rw' prior to loading the startup files.
10733 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10734 scm_init_rdelim. Do not explicitly create/switch modules.
10735 Return SCM_UNSPECIFIED.
10736 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10739 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10740 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10741 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10743 * script.c (scm_shell): Evaluate the compiled switches in the
10744 current module, not in the root module.
10746 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10748 * fluids.c (scm_c_with_fluids): Rename from
10749 scm_internal_with_fluids.
10750 (scm_internal_with_fluids): Deprecated.
10751 (scm_c_with_fluid): New.
10753 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10755 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10757 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10758 accessed with SCM_C[AD]R.
10760 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10762 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10764 * version.c (s_scm_major_version): doc fixes.
10765 (s_scm_minor_version): doc fixes.
10766 (s_scm_minor_version): new function.
10768 * version.h (scm_init_version): new function.
10770 * versiondat.h.in: add GUILE_MICRO_VERSION.
10772 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10774 * deprecation.c (scm_init_deprecation): Renamed
10775 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10777 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10779 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10780 dependent on cpp_cnvt.awk
10782 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10784 * script.c (scm_compile_shell_switches): New command line option
10785 `--use-srfi' for loading a list of SRFIs on startup.
10786 (scm_shell_usage): Added `--use-srfi' to help message.
10788 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10790 Merged from mvo-vcell-cleanup-1-branch.
10792 The concept of vcells has been removed from Guile. With it,
10793 explicit obarrays and associated operations are gone. Use
10794 hashtables instead of obarrays.
10796 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10797 result as variable instead of vcell. Glocs no longer point to a
10798 vcell but to a variable. Use scm_c_define instead of
10799 scm_sysintern and treat the result as a variable (which it is),
10802 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10803 SCM_DEFVARIABLEP): Deprecated.
10804 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10805 (variable_print): Do not print name of variable.
10806 (variable_equalp): Compare values, not vcells.
10807 (anonymous_variable_sym): Removed.
10808 (make_vcell_variable): Removed.
10809 (make_variable): New, as replacement.
10810 (scm_make_variable, scm_make_undefined_variable): Do not take name
10812 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10813 error in that case.
10814 (scm_builtin_variable): Deprecated.
10816 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10817 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10818 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10819 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10820 scm_string_to_obarray_symbol, scm_intern_symbol,
10821 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10822 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10823 Deprecated and moved to "symbols-deprecated.c".
10824 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10825 (scm_init_symbols): Call scm_init_symbols_deprecated.
10826 * symbols-deprecated.c: New file.
10827 * Makefile.am: Added symbols-deprecated.c and related files in all
10830 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10831 SCM_GLOBAL_VCELL_INIT): Deprecated.
10832 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10833 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10835 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10838 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10839 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10840 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10841 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10842 Changed according to the `throughout' comments.
10844 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10846 (scm_module_type): Removed.
10847 (the_root_module): Renamed to the_root_module_var. Now points to
10848 a variable instead of a vcell. Updated all uses.
10849 (scm_the_root_module): Return SCM_BOOL_F when module systems
10850 hasn't been booted yet.
10851 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10852 (scm_post_boot_init_modules): Made static.
10853 (scm_set_current_module): Call scm_post_boot_init_modules on first
10855 (make_modules_in, beautify_user_module_x, resolve_module,
10856 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10857 suffix. Now point to variables instead of vcells. Updated all
10859 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10860 and return SCM_BOOL_F in that case.
10861 (scm_module_transformer): Likewise.
10862 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10863 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10864 (scm_eval_closure_lookup): Do not allow new definitions when
10865 `interface' flag is set.
10866 (scm_standard_interface_eval_closure): New.
10867 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10868 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10869 scm_c_lookup, scm_c_module_define, scm_c_define,
10870 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10871 scm_modules_prehistory): New.
10872 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10873 instead of scm_intern0.
10875 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10878 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10879 hashtable operations to maintain the keywords, not obarray ones.
10881 * init.c (scm_load_startup_files): Do not call
10882 scm_post_boot_init_modules. This is done by
10883 scm_set_current_module now.
10884 (scm_init_guile_1): Call scm_modules_prehistory. Call
10885 scm_init_variable early on.
10887 * goops.c (s_scm_sys_goops_loaded): Get
10888 var_compute_applicable_methods from scm_sym2var, not from a direct
10889 invocation of scm_goops_lookup_closure.
10891 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10893 * gc.c: Added simple debugging hack to mark phase of GC: When
10894 activated, do not tail-call scm_gc_mark. This gives nice
10896 (scm_unhash_name): Removed.
10898 * feature.c (features): Renamed to features_var. Now points to a
10899 variable instead of a vcell. Updated all uses.
10901 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10902 `scm_current_module_lookup_closure' which will do the right thing
10903 when the module system hasn't been booted yet.
10904 (SCM_GLOC_SYM): Removed.
10905 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10906 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10908 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10909 instead of with vcells. Do not overwrite `var' with the result of
10910 the lookup, use the new `real_var' instead. Remove `var2' in
10911 exchange (which was only used with threads).
10912 (sym_three_question_marks): New.
10913 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10915 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10916 (scm_m_atfop): Expect the function definition to be a variable
10917 instead of a vcell.
10918 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10920 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10921 (scm_eval_args): Use more explicit code in the gloc branch of the
10922 atrocious struct ambiguity test. The optimizer will sort this
10924 (scm_deval_args): Likewise.
10925 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10926 remember the symbol instead. Added some comments where
10927 scm_tc3_cons_gloc really exclusively refers to structs.
10928 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10929 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10930 of scm_sysintern in general.
10932 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10935 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10936 pairs. Put the variable directly in the gloc.
10937 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10938 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10940 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10942 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10943 scm_the_last_stack_fluid_var. It now points to a variable instead
10944 of a vcell. Updated all uses.
10945 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10946 instead of a vcell. Updated all uses.
10948 * _scm.h: Include "variables.h" and "modules.h" since almost
10949 everybody needs them now.
10951 * root.h (scm_symhash, scm_symhash_vars): Removed.
10952 * gc.c (scm_init_storage): Do not initialize them.
10954 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10956 * eval.c (scm_init_eval): Initialize scm_undefineds and
10959 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10960 like the SCM_NEWCELL macro counterparts.
10962 (scm_init_storage, scm_init_gc): Moved initialization of
10963 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10965 (scm_init_storage): Moved initialization of scm_undefineds and
10966 scm_listofnull to eval.c, initializion of scm_nullstr to
10967 strings.c, initializion of scm_nullvect to vectors.c.
10969 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10970 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10972 * init.c (scm_init_guile_1): Reordered some initializations and
10973 added dependcy information comments.
10975 * load.c (scm_init_load): Use scm_nullstr.
10977 * strings.c (scm_init_strings): Initialize scm_nullstr.
10979 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10981 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10983 * values.c (print_values): Print as a unreadable object, not as
10984 multiple lines. Thanks to Matthias Köppe!
10986 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10988 * deprecation.c: Fixed copyright date.
10990 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10991 DEPRECATION_H to SCM_DEPRECATION_H.
10993 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10995 * guile-doc-snarf.in: Update copyright.
10996 Fix relative path bug. Thanks to Sergey Poznyakoff.
10998 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11000 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
11001 accept open ports. Thanks to Quetzalcoatl Bradley!
11003 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11005 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
11006 has 779 primitives on startup.
11008 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
11010 * eval.c (scm_i_eval): Copy expression before passing it to
11011 SCM_XEVAL. The copy operation was removed unintendedly during my
11012 change on 2001-03-25.
11014 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
11016 from Matthias Köppe (thanks!):
11018 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
11021 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
11024 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11026 * gc.c (scm_init_gc): Added FIXME comment.
11028 * hooks.c: Since hooks don't have a name any more, it is not
11029 necessary to include objprop.h.
11031 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
11033 (symbol_name, scm_make_hook_with_name): Removed.
11035 (scm_create_hook): Don't set the hook's name property.
11037 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
11039 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
11041 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
11043 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
11044 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
11045 FLOBUFLEN and define it unconditionally.
11047 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
11049 * gh_data.c (gh_lookup): Call gh_module_lookup with
11050 `scm_current_module ()', not `#f'.
11051 (gh_module_lookup): Expect a module instead of an obarray as first
11052 argument and do lookup in that module.
11054 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
11055 arrays. The length of array is already determined differently and
11056 scm_uniform_vector_length does not work on arrays.
11058 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
11060 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
11061 as well. "SCM (*)(...)" does not work on RedHat 7.1.
11063 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
11064 they are not used. Changed `wrong type' error into `wrong num
11065 args' error. Changed all callers.
11067 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
11068 arguments are supplied.
11070 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
11072 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
11073 describe `regexp/notbol' and `regexp/noteol' execution flags.
11075 * strop.c (scm_substring_move_x): Doc fix; nfc.
11077 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
11079 * objects.c, objects.h (scm_valid_object_procedure_p): New.
11080 (scm_set_object_procedure_x): Use it to check argument. Fix
11083 * evalext.c (scm_definedp): Fix docstring.
11085 2001-05-05 Gary Houston <ghouston@arglist.com>
11087 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
11090 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
11092 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
11093 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
11094 Change R4RS references to R5RS.
11096 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
11097 docstring source are correctly reproduced in the output (ii)
11098 we don't anymore get occasional trailing quotes. Also reorganized
11099 and commented the code a little.
11101 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
11104 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11106 * strop.c (scm_string_split): New procedure.
11108 * strop.h (scm_string_split): Added prototype.
11110 2001-05-04 Gary Houston <ghouston@arglist.com>
11112 * socket.c: define uint32_t if netdb.h doesn't. thanks to
11115 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
11117 * rw.c: Include "modules.h" and "strports.h".
11119 * net_db.h (scm_gethost): Added prototype.
11121 * deprecation.h, deprecation.c: New.
11122 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
11123 (DOT_X_FILES): Added "deprecation.x".
11124 (modinclude_HEADERS): Added "deprecation.h".
11126 * init.c: Include "deprecation.h".
11127 (scm_init_guile_1): Call scm_init_deprecation.
11129 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
11131 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
11132 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
11135 2001-04-29 Gary Houston <ghouston@arglist.com>
11137 * rw.c: new file, implementing C part of module (ice-9 rw).
11138 (scm_read_string_x_partial): moved from ioext.c
11139 (scm_init_rw): new proc.
11141 init.c: include rw.h and call scm_init_rw.
11142 Makefile.am: include rw.c and rw.h.
11144 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
11146 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
11147 know what's supposed to happen to it.
11149 * list.h (scm_list_star): deprecation expired - removed.
11151 * numbers.h (scm_dblproc): deprecation expired - removed.
11152 (SCM_UNEGFIXABLE): deprecation expired - removed.
11153 (SCM_FLOBUFLEN): deprecation expired - removed.
11154 (SCM_INEXP): deprecation expired - removed.
11155 (SCM_CPLXP): deprecation expired - removed.
11156 (SCM_REAL): deprecation expired - removed.
11157 (SCM_IMAG): deprecation expired - removed.
11158 (SCM_REALPART): deprecation expired - removed.
11159 (scm_makdbl): deprecation expired - removed.
11160 (SCM_SINGP): deprecation expired - removed.
11161 (SCM_NUM2DBL): deprecation expired - removed.
11162 (SCM_NO_BIGDIG): deprecation expired - removed.
11164 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
11165 (scm_tc_dblr): deprecation expired - removed.
11166 (scm_tc_dblc): deprecation expired - removed.
11167 (scm_tc16_flo): deprecation expired - removed.
11168 (scm_tc_flo): deprecation expired - removed.
11170 * tag.h (scm_tag): deprecation expired - removed.
11172 * tag.c: (scm_tag): deprecation expired - removed.
11174 * ioext.c: (scm_fseek): deprecation expired - removed.
11176 * ioext.h (scm_fseek): deprecation expired - removed.
11178 * gh_data.c (gh_int2scmb): deprecation expired - removed.
11180 * gh.h (gh_int2scmb): deprecation expired - removed.
11182 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
11184 * stacks.c (scm_make_stack): Fix typo in docstring.
11186 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
11188 * error.c (scm_sysmissing): deprecation expired - removed.
11190 * error.h (scm_sysmissing): deprecation expired - removed.
11193 (scm_init_gc): gc-thunk deprecation expired - removed.
11194 (scm_gc_vcell): deprecation expired - removed.
11195 (gc_async_thunk): scm_gc_vcell related code removed.
11197 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
11200 (SCM_NSTRINGP): deprecation expired - removed.
11201 (SCM_NRWSTRINGP): deprecation expired - removed.
11203 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
11206 (SCM_ICHRP): deprecation expired - removed.
11207 (SCM_ICHR): deprecation expired - removed.
11208 (SCM_MAKICHR): deprecation expired - removed.
11211 (SCM_INPORTP): deprecation expired - removed.
11212 (SCM_OUTPORTP): deprecation expired - removed.
11214 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
11216 * modules.c (scm_module_type): New.
11217 (scm_post_boot_init_modules): Initialize from Scheme value.
11218 (the_module, scm_current_module, scm_init_modules): the_module is
11219 now a C only fluid.
11220 (scm_current_module): Export to Scheme.
11221 (scm_set_current_module): Do not call out to Scheme, do all the
11222 work in C. Export procedure to Scheme. Only accept modules, `#f'
11223 is no longer valid as the current module. Only set
11224 scm_top_level_lookup_closure_var and scm_system_transformer when
11225 they are not deprecated.
11226 (scm_module_transformer, scm_current_module_transformer): New.
11228 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
11229 scm_current_module_transformer, scm_module_transformer): New.
11231 * gh_data.c: Removed FIXME comment about gh_lookup returning
11232 SCM_UNDEFINED. That's the right thing to do.
11234 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
11235 into the conditionally compiled sections.
11236 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
11237 scm_current_module_transformer instead of scm_system_transformer.
11238 * init.c (start_stack): Move initialization of
11239 scm_system_transformer to the deprecated section.
11241 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
11243 * throw.c (scm_throw): Correct docstring.
11245 2001-04-22 Gary Houston <ghouston@arglist.com>
11247 * socket.c: attempted to improve the docstrings slightly.
11249 * net_db.c: remove bogus "close" declaration.
11250 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
11251 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
11253 * net_db.h: declarations moved too.
11255 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
11257 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
11258 (VALIDATE_INET6): new macro.
11259 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
11260 inet-pton and inet-ntop.
11261 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
11262 (scm_addr_vector): use ipv6_net_to_num.
11264 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11266 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
11267 smob number explicitly. Use SCM_TC2SMOBNUM instead.
11269 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
11270 when compiled in debug mode.
11272 (scm_gc_sweep): Only call smob's free function if it is defined.
11274 * print.c (scm_iprin1): No need to check for validity of smob
11275 type or existence of print function.
11277 * smob.[ch] (scm_smobs): Made into a fixed size global array.
11278 Resizing will not work well with preemptive threading.
11280 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
11282 (scm_make_smob_type): Extracted initialization of smob
11283 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
11284 of the critical section.
11286 (scm_smob_prehistory): Initialize all smob descriptors. By
11287 default, don't assign a smob free function: Most smob types don't
11290 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
11292 2001-04-21 Gary Houston <ghouston@arglist.com>
11294 * socket.c (FLIP_NET_HOST_128): new macro.
11295 (scm_fill_sockaddr): use new macro.
11296 (scm_addr_vector): completed IPv6 address support. added const
11297 to the address parameter.
11299 2001-04-20 Gary Houston <ghouston@arglist.com>
11301 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11302 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11304 (scm_addr_vector): use a switch instead of multiple if statements.
11305 Add support for IPv6 (incomplete) .
11306 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11308 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11310 * struct.c (scm_free_structs): Only pairs may be accessed with
11313 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11315 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11317 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11318 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11319 parentheses in order to get the correct associativity.
11321 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11323 * unif.c (scm_array_to_list): Added missing handling of arrays of
11324 bytes. Thanks to Masao Uebayashi for the bug report.
11326 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11328 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11331 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11333 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11335 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11336 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11337 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11338 SCM_CLOSURE_FORMALS.
11340 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11341 (scm_i_procedure_arity): Prefer stronger predicates like
11342 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11344 * macros.c (macro_print): Extracted macro printing code from
11345 print.c and simplified it.
11347 (scm_macro_type): Use SCM_MACRO_TYPE;
11349 (scm_init_macros): Use macro_print for printing macros.
11351 * print.c (scm_print_opts): Improved option documentation.
11353 (scm_iprin1): Extracted printing of macros to macros.c.
11354 Simplified printing of ordinary closures.
11356 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11357 Martin Grabmueller for the bug report.
11359 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11361 This patch eliminates some further applications of SCM_C[AD]R to
11364 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11365 never been applied to real pairs.
11367 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11369 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11371 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11372 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11373 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11375 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11378 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11379 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11381 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11382 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11383 SCM_SET{AND,OR}_CAR.
11385 2001-04-17 Gary Houston <ghouston@arglist.com>
11387 * some initial support for IPv6:
11389 * socket.c (scm_fill_sockaddr): improve the argument validation.
11390 don't allocate memory until all args are checked. instead of
11391 unconditional memset of soka, try setting sin_len to 0 if
11392 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11393 (scm_socket, scm_connect): extend docstrings for IPv6.
11394 (scm_init_socket): intern AF_INET6 and PF_INET6.
11396 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11398 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11399 matches SCM_DEFER_INTS at the beginning of the function.
11401 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11403 * gc.c (scm_igc): Unconditionally call
11404 SCM_CRITICAL_SECTION_START/END.
11406 * fluids.c (next_fluid_num): Unconditionally call
11407 SCM_CRITICAL_SECTION_START/END.
11408 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11410 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11411 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11414 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11415 Defined as nothing for the case of !defined(USE_THREADS).
11416 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11418 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11419 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11421 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11422 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11423 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11424 SCM_CRITICAL_SECTION_START/END.
11425 (SCM_REALLOW_INTS: Bug fix. Don't call
11426 SCM_THREAD_SWITCHING_CODE.
11427 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11428 SCM_THREAD_SWITCHING_CODE directly.
11429 (SCM_ENTER_A_SECTION): Unconditionally use
11430 SCM_CRITICAL_SECTION_START/END. (was:
11431 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11433 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11435 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11436 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11437 allowed to explicitly set this macro via the CFLAGS variable
11440 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11441 (SCM_THREAD_CRITICAL_SECTION_START,
11442 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11443 SCM_THREAD_CRITICAL_SECTION_START/END to
11444 SCM_CRITICAL_SECTION_START/END.
11446 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11448 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11451 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11452 (MISSING_BZERO_DECL): Remove the declaration.
11454 Thanks to NIIBE Yutaka.
11456 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11458 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11459 goops module should be registered in order to work for an
11460 application which uses libguile statically linked.)
11462 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11464 * numbers.[ch] (scm_num2long, scm_num2long_long,
11465 scm_num2ulong_long, scm_num2ulong): Argument position is an
11468 * environments.c (eval_environment_folder,
11469 import_environment_folder), gh_data.c (gh_scm2longs,
11470 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11471 for integers and pointers, respectively.
11473 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11474 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11475 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11476 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11478 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11479 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11480 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11481 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11482 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11483 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11485 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11487 * strings.c (scm_read_only_string_p): Update docstring to reflect
11488 current (non-)usage of "read only" strings.
11489 (scm_make_shared_substring): Clarify docstring by changing
11490 "semantics" to "arguments".
11492 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11494 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11495 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11498 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11500 The following changes make the documentation more consistent.
11502 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11503 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11504 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11505 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11508 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11509 (scm_array_dimensions, scm_make_shared_array),
11510 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11511 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11512 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11513 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11514 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11515 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11516 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11517 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11518 @example ... @end example to @lisp ... @end lisp.
11520 * weaks.c (scm_weak_vector): Corrected docstring.
11522 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11523 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11524 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11525 (scm_hashx_set_x, scm_hashx_get_handle),
11526 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11527 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11528 vectors.c (scm_vector_fill_x), strings.c
11529 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11530 objprop.c (scm_set_object_properties_x):
11531 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11532 strports.c (scm_call_with_input_string), ports.c
11533 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11534 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11535 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11536 (scm_make_weak_vector,scm_weak_vector_p),
11537 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11538 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11539 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11540 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11541 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11542 Made parameter names match documentation by renaming parameters
11543 and/or fixing docstrings.
11545 * numbers.c (scm_ash): Corrected Texinfo markup.
11547 * strop.c (scm_string_index, scm_string_rindex),
11548 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11550 * vports.c (scm_make_soft_port), unif.c
11551 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11552 (scm_dimensions_to_uniform_array, scm_transpose_array),
11553 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11554 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11555 (scm_array_to_list, scm_list_to_uniform_array),
11556 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11557 (scm_open_input_string, scm_open_output_string),
11558 (scm_get_output_string), strop.c (scm_string_copy),
11559 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11560 (scm_get_internal_real_time, scm_times),
11561 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11562 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11563 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11564 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11565 simpos.c (scm_system), random.c (scm_random_uniform),
11566 (scm_random_normal, scm_random_exp), ramap.c
11567 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11568 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11569 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11570 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11571 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11572 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11573 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11574 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11575 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11576 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11577 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11578 (scm_integer_expt, scm_bit_extract, scm_logcount),
11579 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11580 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11581 (scm_interaction_environment), macros.c (scm_makacro),
11582 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11583 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11584 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11585 (scm_fluid_ref), filesys.c (scm_open_fdes),
11586 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11587 Docstring correction: `Returns' -> `Return'
11589 * gc.c (scm_set_debug_cell_accesses_x):
11590 (s_scm_gc_set_debug_check_freelist_x):
11591 * fluids.c (scm_fluid_p): Added texinfo markup.
11593 * error.c (scm_strerror): Made docstring more precise.
11595 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11596 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11597 (scm_symbol_p, scm_symbol_to_string), strorder.c
11598 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11599 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11600 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11601 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11602 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11604 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11606 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11607 mode, as suggested by Michael Livshin.
11609 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11611 * backtrace.c (display_backtrace_body): since the `print_state'
11612 variable is not used (instead its data field is used directly as
11613 `pstate'), protect it from the hungry compiler optimizations.
11614 thanks to Bill Schottstaedt for the report.
11616 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11618 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11619 It is only defined and used if guile is compiled with
11620 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11621 let cells with a free_cell type tag be visible outside of the
11622 garbage collector when in debug mode.
11624 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11626 (scm_assert_cell_valid): Use a local static variable to avoid
11629 (MARK): Only check for rogue cell pointers in debug mode. Use
11630 scm_cellp for this purpose and place all checks for rogue pointers
11631 into that function. Further, since due to conservative scanning
11632 we may encounter free cells during marking, don't use the standard
11633 cell type accessor macro to determine the cell type.
11635 (scm_cellp): Check if the cell pointer actually points into a
11638 (scm_init_gc): Initalize scm_tc16_allocated.
11640 * gc.h (GCH): Renamed to SCM_GC_H.
11642 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11643 might be unnecessary, but I feel better this way :-)
11645 (SCM_GC_CELL_TYPE): New macro.
11647 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11648 in guile, and it is unlikely that they will be applied to real
11651 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11653 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11654 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11656 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11657 make sure that in debug mode no free cell will ever be visible
11658 outside of the garbage collector.
11660 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11662 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11665 * async.c (scm_system_async), variable.c (scm_make_variable,
11666 scm_make_undefined_variable): Use scm_cons to create a pair.
11668 * debug.c (scm_reverse_lookup): Perform proper type checking.
11669 Remove suspicious use of SCM_SLOPPY_CONSP.
11671 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11672 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11673 the corresponding optimization.
11675 * eval.c (iqq): Use proper type check.
11677 (scm_m_expand_body): Remove redundant type checks.
11679 (promise_print): Don't access promise cells as pairs.
11681 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11682 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11683 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11684 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11685 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11687 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11688 (scm_iprin1): Use new macro predicate and accessors.
11690 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11693 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11694 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11695 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11696 SCM_VARIABLE_H. Even the macros that are used to inhibit
11697 including a header file twice should be in the SCM_ namespace.
11699 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11700 properties.c (scm_primitive_property_ref,
11701 scm_primitive_property_del_x): Prefer stronger predicates like
11702 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11704 * gc.c (MARK): Use proper macros to access procedure-with-setter
11705 cell elements and closure cell elements.
11707 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11708 access free cells as pairs.
11710 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11711 no hashtab entry is found.
11713 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11714 SCM_CLR_PORT_OPEN_FLAG.
11716 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11717 use SCM_SET_C[AD]R for uninitialized cells.
11719 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11720 If the hashtable has no slots, return #f instead of '(). This
11721 unifies the return value with most assoc-functions.
11723 (scm_hash_fn_ref): Use proper type check.
11725 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11726 Removed references to non-existing functions from documentation.
11728 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11729 access keyword cell elements.
11731 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11734 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11736 * print.c (scm_iprlist): Added comment. Improved loop
11739 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11742 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11744 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11746 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11749 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11750 scm_variable_set_x): Use proper macros to access variable cell
11753 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11755 * variable.h (SCM_VARVCELL): Don't access variable cells as
11758 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11759 added FIXME comment, removed register specifier.
11761 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11763 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11764 * init.c (scm_init_guile_1): Don't init goopscore module.
11766 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11768 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11770 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11772 * strop.c (scm_string_to_list): Fixed docstring markup.
11773 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11774 (scm_string_downcase, scm_string_capitalize_x),
11775 (scm_string_capitalize): Rewrote and corrected docstrings.
11776 (scm_string_ci_to_symbol): Made docstring more explicit.
11778 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11780 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11782 (scm_call_with_values): Removed.
11783 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11784 so that it can be exported.
11785 (scm_call_with_values): Removed.
11787 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11788 * eval.c: Include "libguile/values.h"
11789 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11791 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11792 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11793 New delcarations to support above change.
11795 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11796 errors with last change.
11798 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11800 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11801 scm_i_eval): Moved the application of the system transformer from
11802 scm_i_eval to scm_primitive_eval.
11804 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11806 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11808 * strop.c (scm_string_index): Fix docstring line break
11811 * list.c (scm_cons_star): Fix docstring typo.
11813 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11815 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11816 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11817 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11818 scm_make_string, scm_string_append), strports.c (st_resize_port,
11819 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11820 scm_makstr with calls to scm_allocate_string.
11822 * strings.[ch] (scm_allocate_string): New function.
11824 * strings.[ch] (scm_makstr): Deprecated.
11826 2001-03-18 Gary Houston <ghouston@arglist.com>
11828 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11829 NULL. rewrote the docstring.
11830 (scm_mkstemp): new procedure implementing "mkstemp!".
11831 * posix.h: declare scm_mkstemp.
11833 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11834 normally it would be found in netdb.h.
11836 2001-03-17 Gary Houston <ghouston@arglist.com>
11838 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11839 warning when HAVE_ARRAYS is not defined. move len too.
11841 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11842 (EXTRA_DOT_X_FILES): let configure set the value.
11843 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11845 * gc.c (scm_must_malloc): changed the comment explaining when
11846 scm_must variants of malloc/free etc., should be used, based on
11847 explanation from Dirk Herrmann.
11848 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11849 string with procedure name. use scm_must_malloc instead of malloc.
11850 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11852 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11853 scm_ungetc): use scm_must variants of malloc/realloc/free.
11854 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11856 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11858 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11859 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11860 scm_wrong_type_arg instead.
11862 (SCM_WNA): Deprecated.
11864 * error.[ch] (scm_wta): Deprecated.
11866 * numbers.c (s_i_log): Minor comment fix.
11868 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11869 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11870 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11871 wrong-num-args or misc errors.
11873 * unif.c (scm_make_shared_array, scm_transpose_array,
11874 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11875 Validate the rest argument (note: this is only done when guile is
11876 built with SCM_DEBUG_REST_ARGUMENT=1)
11878 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11879 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11881 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11882 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11884 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11886 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11887 instead of scm_wrong_num_args.
11889 * coop-threads.c: Don't include libguile/strings.h. (Was only
11890 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11892 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11893 wrong-num-args errors.
11895 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11897 * error.[ch] (scm_error_num_args_subr): New function.
11899 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11901 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11902 (scm_length, scm_append, scm_reverse, scm_list_ref),
11903 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11904 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11905 (scm_delete1_x), gc.c (scm_map_free_list),
11906 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11907 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11908 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11909 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11910 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11911 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11912 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11914 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11915 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11916 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11917 symbols.c (scm_symbol_interned_p), numbers.c
11918 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11921 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11923 * snarf.h (SCM_CONST_LONG): Deprecated.
11924 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11926 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11928 * numbers.c (scm_num2ulong): Check that a bignum is positive
11929 before looking at the magnitude. Correctly check for overflow
11931 (scm_num2long_long): Likewise.
11932 (scm_num2ulong_long): New.
11933 (ULONG_LONG_MAX): Define if not already defined.
11934 * numbers.h: (scm_num2ulong_long): New prototype.
11936 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11938 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11940 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11941 (SCM_OPOUTSTRPORTP): New predicate macros.
11942 (scm_open_input_string, scm_open_output_string),
11943 (scm_get_output_string): New prototypes.
11945 * strports.c (scm_open_input_string, scm_open_output_string),
11946 (scm_get_output_string): New procedures (SRFI-6 compliant).
11947 Made scm_tc16_strport non-static.
11949 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11951 * macros.h (SCM_ASSYNT): Removed unused object argument from
11954 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11955 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11956 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11957 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11958 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11959 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11960 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11961 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11962 scm_m_atdispatch): Removed unused object argument from call to
11965 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11967 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11968 const int* to reflect that the input array of integers remains
11969 unchanged. Thanks to Brett Viren for the hint.
11971 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11973 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11974 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11976 (gh_scm2newstr, gh_symbol2newstr): Change call to
11977 scm_must_malloc() to malloc(), because user-free()able memory is
11980 * gc.c: Added declaration of `scm_debug_check_freelist'.
11982 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11984 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11986 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11988 * strports.c (scm_object_to_string): New procedure.
11989 (scm_strprint_obj): Deprecated.
11990 * strports.h: Reflect the changes.
11992 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11994 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11996 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11997 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11998 SCM_ASSYNT to check for correct argument types. Either use some
11999 SCM_VALIDATE_* macro or an explicit test.
12001 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
12004 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
12005 instead of calling scm_wta.
12007 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12009 * load.c (scm_primitive_load, scm_primitive_load_path),
12010 (scm_sys_search_load_path): Corrected docstrings (file ->
12013 * eval.c (scm_force): Added texinfo markup to docstring.
12014 (scm_promise_p): Renamed parameter to `obj' to match docstring.
12016 * debug-malloc.c: Reinserted #include <stdio.h>.
12018 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
12020 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
12022 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
12023 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
12024 Use SCM_LISTn instead of scm_listify.
12026 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12028 * _scm.h: Removed #include <errno.h>.
12030 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
12031 errno variable (can be a macro on some systems, for example when
12032 using linux libc with threads).
12034 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
12035 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
12036 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
12037 #include <errno.h> in these 20 out of 100 files.
12039 2001-03-10 Gary Houston <ghouston@arglist.com>
12041 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
12042 not already defined.
12044 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12046 * coop.c: Inserted #include <stdio.h>.
12048 * iselect.c: Reinserted #include <stdio.h>.
12050 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
12052 * posix.c: Replaced `#define' of __USE_XOPEN right before
12053 including unistd.h with a define of _GNU_SOURCE at the very top of
12056 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
12058 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
12059 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
12060 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
12061 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
12062 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
12063 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
12064 print.c, procprop.c, procs.c, properties.c, ramap.c,
12065 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
12066 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
12067 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
12068 Remove #include <stdio.h>
12069 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
12071 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
12073 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12075 * posix.c (scm_gethostname): Set initial name length to 256 for
12078 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12080 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12081 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12082 (scm_sethostname, scm_gethostname): New prototypes.
12084 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
12085 <sys/file.h>, if present.
12086 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
12087 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
12088 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12089 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12090 (scm_sethostname, scm_gethostname): New procedures.
12092 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
12094 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
12095 not optional (ii) "recommend" spelling correction.
12097 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12099 * ramap.c (racp): Removed optimization which caused array copying
12100 to fail if the two arrays shared storage. Re-inserted the IVDEP
12101 macros removed in the change of 2000-03-09. (Don't really have a
12102 complete grasp of what they are for, but they seem to be necessary
12103 on Crays. This needs testing!) Thanks to Miroslav Silovic.
12105 * hash.c (scm_string_hash): Don't downcase characters.
12107 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12109 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
12110 size from 277 --> 1009.
12112 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
12115 * coop-threads.c: Fixed change of 2001-03-06.
12117 * validate.h: Code formatting.
12119 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
12121 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
12122 (*.doc): Add dependency on guile-snarf.awk.in.
12124 * guile-snarf.awk.in: Neglect spaces at the end of
12125 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
12126 middle of docstrings. (To avoid the problem with gcc-2.96.)
12128 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
12130 * coop-threads.c (scm_call_with_new_thread), load.c
12131 (scm_primitive_load, scm_sys_search_load_path), random.c
12132 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
12133 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
12134 (potentially) issue a scm-misc-error or wrong-num-args error
12137 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
12138 about the expected type with the wrong-type-arg error message.
12140 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
12141 a C level bug that can't be fixed from scheme anyway.
12143 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12145 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
12146 Duplicate bindings are OK in a let* since a let* is semantically
12147 equivalent to a nested set of let:s.
12149 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12151 * print.c (scm_print_options): Fixed texinfo in docstring.
12153 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
12154 the underlying functions getservent, getprotoent or getnetent
12155 return NULL instead of signalling an error.
12157 2001-03-04 Gary Houston <ghouston@arglist.com>
12159 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
12160 taking an unexpectedly large filename for an AF_UNIX socket from
12161 bind/connect/sendto (thanks to Martin Grabmueller).
12163 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
12164 former and adjusted the latter.
12165 (scm_socket, scm_socketpair): cosmetic changes.
12166 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
12167 size_t as socklen_t substitute. don't restrict args/return values
12168 to INUM: allow full range of int or size_t.
12169 (scm_fill_sockaddr): check arguments before allocating memory, to
12170 avoid leakage. use malloc, not scm_must_malloc.
12171 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
12172 substitute. free the sockaddr structure before throwing an error.
12173 (scm_init_add_buffer): procedure removed, together with its static
12174 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
12175 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
12176 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
12177 scm_sendto): use a local buffer instead of scm_addr_buffer.
12178 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
12180 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
12181 call to detect whether recvfrom could be bothered to set the address.
12182 (scm_init_socket): don't call scm_init_addr_buffer.
12184 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12186 * debug.c (scm_procedure_source, scm_procedure_environment),
12187 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
12188 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
12189 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
12190 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
12191 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
12192 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
12193 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
12194 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
12195 scm_array_to_list, scm_array_prototype), validate.h
12196 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
12197 scm_misc_error or scm_wrong_type_arg instead.
12199 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
12201 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12203 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
12204 (scm_sys_tag_body): Added.
12206 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12208 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
12209 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
12210 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
12211 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
12212 options.c (scm_options), ports.c (scm_remove_from_port_table),
12213 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
12214 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
12215 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
12216 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
12219 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12221 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
12223 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
12225 * eval.c (scm_s_duplicate_bindings): New error message.
12226 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
12228 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
12230 * eval.h (SCM_EVALIM2): New macro. Use it when a
12231 immediate, literal constant should be evaluated.
12232 * eval.c (scm_s_duplicate_formals): New error message string.
12233 (scm_c_improper_memq): New function.
12234 (scm_m_lambda): Check for duplicate arguments.
12235 (scm_ceval, scm_deval): When executing a body: only cons a new
12236 toplevel environment frame when it is different from the
12237 existing one; use EVALCAR instead of SIDEVAL so that we can properly
12238 check for empty combinations; use SCM_EVALIM2 for the same reason
12239 in the non-toplevel loop.
12240 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
12241 New labels with the meaning of their non-"nontoplevel" partners,
12242 but they are used when it is known that the body is not evaluated at
12244 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
12245 reporting for empty combinations.
12247 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
12249 * Remove dump facilities.
12250 * dump.c, dump.h: Removed.
12251 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
12252 * init.c: Remove #include "libguile/dump.h".
12253 (scm_init_guile_1): Remove scm_init_dump.
12254 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
12255 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
12256 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
12257 (scm_set_smob_dump, scm_set_smob_undump): Removed.
12259 * keywords.c: Remove #include "libguile/dump.h".
12260 (keyword_dump, keyword_undump): Removed.
12261 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
12263 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12265 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
12266 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
12267 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
12268 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
12269 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
12270 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
12271 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
12272 to @code{} as the texinfo manual recommends, converted the
12273 examples to use a @lisp{}-environment.
12275 * strports.c (scm_eval_string): Cleaned up the docstring.
12277 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
12280 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
12281 (scm_number_to_string, scm_string_to_number, scm_number_p)
12282 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
12283 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
12284 (scm_ash): Added texinfo markup and removed obsolete @refill.
12285 (scm_gr_p): Corrected comment.
12286 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
12287 docstring) comments.
12288 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
12289 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
12290 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
12291 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
12292 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
12293 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
12294 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
12295 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
12297 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
12299 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
12300 (Obviously nobody compiles with SCM_RECKLESS defined...)
12302 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12304 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12306 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12308 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12310 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12312 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12313 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12314 since use of `z' suggests that the arguments may be complex.
12316 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12319 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12321 * dump.c (scm_binary_write, scm_binary_read), eval.c
12322 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12323 scm_guardian_greedy_p, scm_make_guardian), fports.c
12324 (scm_file_port_p): Minor docstring fixes.
12326 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12328 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12330 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12332 (make_class_from_template): Do not bother to set the current
12333 module around the call to DEFVAR, scm_eval takes care of that.
12334 (scm_init_goops): Make scm_module_goops and
12335 scm_goops_lookup_closure permanent objects.
12337 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12338 top level, create a fresh top-level environment for each
12339 expression instead of mutating the exisint frame. This is
12340 important when that frame is closed over.
12342 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12343 SCM_DIGSPERLONG instead of DIGSPERLONG.
12345 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12347 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12348 before applying arrow procedure in `cond' and before applying
12349 receiver procedure in call-with-current-continuation.
12350 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12351 macro. The argument is expanded more than one time.
12353 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12354 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12356 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12358 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12359 notice and license.
12361 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12363 * variable.c (scm_make_variable, scm_make_undefined_variable)
12364 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12365 (scm_variable_bound_p), values.c (scm_values)
12366 (scm_call_with_values), unif.c (scm_bit_count)
12367 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12368 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12369 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12370 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12371 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12372 (scm_copy_random_state, scm_random), print.c (scm_newline)
12373 (scm_write_char, scm_simple_format), debug-malloc.c
12374 (scm_malloc_stats), environments.c (scm_environment_p)
12375 (scm_environment_bound_p, scm_environment_ref)
12376 (scm_environment_fold, scm_environment_define)
12377 (scm_environment_undefine, scm_environment_set_x)
12378 (scm_environment_cell, scm_environment_observe)
12379 (scm_environment_observe_weak, scm_environment_unobserve)
12380 (scm_make_eval_environment, scm_eval_environment_p)
12381 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12382 (scm_eval_environment_imported)
12383 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12384 (scm_import_environment_p, scm_import_environment_imports)
12385 (scm_import_environment_set_imports_x, scm_make_export_environment)
12386 (scm_export_environment_p, scm_export_environment_private)
12387 (scm_export_environment_set_private_x)
12388 (scm_export_environment_signature)
12389 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12390 Added texinfo markup.
12392 * ports.c (scm_drain_input): Lowercased argument to @var.
12393 (scm_current_input_port, scm_current_output_port): Filled in
12394 missing explanation.
12395 (scm_current_load_port, scm_set_current_output_port)
12396 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12397 Added texinfo markup.
12399 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12400 (scm_release_arbiter): Added texinfo markup to docstrings.
12401 Changed `Returns' to `Return'.
12402 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12404 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12406 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12407 by doubling them to `@@'.
12409 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12411 * numbers.c (scm_lognot), random.c (scm_random,
12412 scm_random_normal, scm_random_solid_sphere_x,
12413 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12414 scm_random_exp), dynwind.c
12415 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12417 * goops.c (scm_sys_initialize_object, scm_instance_p,
12418 scm_class_name, scm_class_precedence_list, scm_class_slots,
12419 scm_class_environment, scm_generic_function_name,
12420 scm_generic_function_methods, scm_method_generic_function,
12421 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12422 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12423 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12424 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12425 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12426 scm_class_direct_supers, scm_class_direct_slots,
12427 scm_class_direct_subclasses, scm_class_direct_methods,
12428 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12429 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12430 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12431 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12432 scm_memoized_environment, scm_procedure_name,
12433 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12435 (scm_class_of, scm_entity_p, scm_operator_p,
12436 scm_set_object_procedure_x, scm_object_procedure,
12437 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12438 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12439 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12440 scm_hook_to_list), lang.c
12441 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12442 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12443 (scm_print_options, scm_port_with_print_state,
12444 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12445 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12446 scm_make_procedure_with_setter, scm_procedure), throw.c
12447 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12448 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12449 scm_stack_ref, scm_stack_length, scm_frame_p,
12450 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12451 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12452 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12453 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12454 (scm_dirname, scm_basename), dynwind.c
12455 (scm_wind_chain), read.c (scm_read_options, scm_read,
12456 scm_read_hash_extend), gc.c
12457 (scm_unhash_name), eval.c (scm_eval_options_interface,
12458 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12459 (scm_display_error, scm_set_print_params_x,
12460 scm_display_application, scm_display_backtrace, scm_backtrace),
12461 async.c (scm_async, scm_system_async, scm_async_mark,
12462 scm_system_async_mark, scm_run_asyncs, scm_noop,
12463 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12464 scm_mask_signals): Added docstrings.
12466 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12468 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12469 address of car/cdr. (Thanks to Dirk Herrmann)
12470 Use scm_sizet to obtain the length of strings.
12471 (Thanks to Matthias Koeppe)
12473 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12475 * symbols.c (scm_mem2symbol): Put a empty statement after the
12476 next_symbol label. This is mandated by ANSI, appearantly.
12478 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12480 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12481 sense to compile for a specific kernel version. Do not include
12482 <asm/signal.h> while defining __KERNEL__. This hack should no
12483 longer be needed and caused problems.
12485 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12487 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12488 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12489 can not deal with immediates.
12491 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12493 * list.c (scm_list_copy): Validate the first argument.
12495 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12497 Fix evaluator so that top-level expressions are correctly
12498 evaluated with respect to the module system.
12500 * modules.h. modules.c (scm_current_module_lookup_closure): New
12503 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12505 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12506 names to better reflect their meaning.
12508 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12509 evaluated at top-level and synronize lookup closure before
12510 executing every subform.
12511 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12512 (scm_eval_x, scm_eval): Reimplement in terms of
12513 scm_primitive_eval_x and scm_primitive_eval, respectively.
12515 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12517 * macros.c (scm_macro_name, scm_macro_transformer): Use
12518 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12521 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12523 * dump.c (scm_store_bytes): Store data size before data.
12524 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12525 * dump.h (scm_restore_bytes): Updated.
12527 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12529 * dump.c: Use double cells for update schedule.
12531 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12533 * ports.c (scm_unread_char): Take an optional argument.
12535 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12537 * modules.h (scm_selected_module, scm_current_module): Renamed
12538 scm_selected_module to scm_current_module to synchronize Scheme
12540 (scm_select_module, scm_set_current_module): Likewise. Changed
12543 * ports.c (scm_port_for_each): Make a snapshot of the port table
12544 before iterating over it. The table might change while the user
12545 code is running. With the snapshot, the user can depend on the
12546 fact that each port that existed at the start of the iteration is
12547 encountered exactly once. (ice-9 popen) depends on this.
12549 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12551 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12553 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12554 range checking for the size parameter. Thanks to Martin
12555 Grabmueller for the hint.
12557 (scm_makstr): Reordered string initialization to make interrupt
12558 deferring unnecessary.
12560 * vectors.c (scm_make_vector): Fixed range checking.
12562 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12564 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12566 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12567 checking of the size parameter for type correctness and valid
12568 range. Thanks to Rob Browning for reporting the problem. Instead
12569 of deferring interrupts, scm_remember_upto_here_1 is used.
12571 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12573 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12574 (scm_dump_cell_update): Removed.
12575 (scm_dump_update): Renamed from scm_dump_object_update.
12576 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12577 a pointer instead of returning a value.
12578 * keywords.c (keyword_undump): Updated.
12580 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12582 * dump.c, dump.h: Modified a lot.
12583 (SCM_DUMP_COOKIE): Version 0.1
12584 (scm_dump_mark): Removed.
12585 (scm_restore_cell_object, scm_store_cell_object): New functions.
12587 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12588 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12589 New slots: dump, undump.
12590 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12593 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12594 (keyword_undump): Renamed from keyword_alloc.
12595 (scm_init_keywords): Set keyword_dump and keyword_undump.
12597 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12599 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12600 the deprecated SCM_DOUBLE_CELLP.
12602 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12604 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12606 * dump.c, dump.h: New files.
12607 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12608 * init.c: #include "libguile/dump.h".
12609 (scm_init_guile_1): Call scm_init_dump.
12610 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12611 dump_dealloc, dump_store, undump_alloc, undump_restore,
12613 * smob.c (scm_make_smob_type): Init the new slots.
12614 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12615 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12617 * keywords.c: #include "libguile/dump.h".
12618 (keyword_dealloc, keyword_alloc): New functions.
12619 (scm_init_keywords): Set smob_dump and smob_undump.
12621 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12623 * vectors.c (scm_c_make_vector): New function.
12624 * vectors.h (scm_c_make_vector): Declared.
12625 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12626 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12627 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12628 (scm_make_method_cache, scm_i_vector2list,
12629 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12630 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12631 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12632 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12633 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12634 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12635 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12636 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12638 * hashtab.c (scm_c_make_hash_table): New function.
12639 * hashtab.h (scm_c_make_hash_table): Declared.
12640 * environments.c (scm_make_leaf_environment,
12641 scm_make_eval_environment), gc.c (scm_init_storage),
12642 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12643 Use scm_c_make_hash_table.
12645 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12647 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12649 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12651 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12654 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12655 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12656 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12657 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12658 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12659 scm_source_property, scm_set_source_property_x), sort.c
12660 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12661 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12662 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12665 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12667 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12668 really get that arg.
12670 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12672 * goops.c (s_scm_get_keyword): Bug fix.
12674 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12676 The following patch was sent by Martin Grabmueller. It makes sure
12677 that in case of parameter errors the correct function name is
12678 shown, and that parameter types are only checked once.
12680 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12681 string_capitalize_x): New functions. Each one performs the core
12682 functionality of the corresponding scm_* function.
12684 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12685 scm_string_downcase_x, scm_string_downcase,
12686 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12687 parameter checking wrappers of the above functions.
12689 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12691 * continuations.c, dynl.c, keywords.c, load.c: Include
12692 strings.h. Thanks to Bill Schottstaedt for the bug report.
12694 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12696 * backtrace.c (display_header): Make sure that line and column
12697 information is shown independent of whether the port the code was
12698 read from had an associated filename. Thanks to Martin
12699 Grabmueller for providing this patch.
12701 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12703 * fports.[ch] (scm_file_port_p): New primitive.
12705 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12707 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12708 These are now defined in fports.c, strports.c and vports.c.
12710 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12711 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12714 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12715 (scm_make_sfptob): Made static. These return a type code now.
12717 fports.c (scm_init_fports), strports.c (scm_init_strports),
12718 vports.c (scm_init_vports): Create the corresponding port types.
12720 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12721 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12723 * init.c (scm_init_guile_1): Make sure strports are initialized
12726 * ports.[ch] (scm_make_port_type): Changed the return type to
12729 * ports.c (scm_ports_prehistory): Don't create any port types
12732 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12733 against scm_tc16_fport directly.
12735 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12737 * srcprop.c (scm_set_source_property_x): Fix to handle
12738 (set-source-property! <obj> 'copy <datum>) correctly.
12740 2001-01-24 Gary Houston <ghouston@arglist.com>
12742 * filesys.c (scm_link): docstring fix.
12743 * fports.h (scm_setfileno): obsolete declaration removed.
12744 * posix.c: bogus popen declaration removed.
12746 * rdelim.c: new file, split from ioext.c.
12747 * rdelim.h: new file, split from ioext.h
12748 * Makefile.am: add rdelim.c and related files.
12749 * init.c: call scm_init_rdelim. include rdelim.h.
12751 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12753 This patch was sent by Martin Grabmueller and makes sure that
12754 parameter errors are reported correctly by the lexicographic
12755 ordering predicates.
12757 * strorder.c (string_less_p, string_ci_less_p): New functions.
12759 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12760 functionality into string_less_p, string_ci_less_p respectively.
12761 The remaining code is just a wrapper to do the parameter
12764 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12765 parameters and call string_less_p instead of scm_string_less_p.
12767 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12768 Check the parameters and call string_less_ci_p instead of
12769 scm_string_ci_less_p.
12771 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12773 This patch modifies scm_display_error to perform parameter
12774 checking. Thanks to Neil Jerram for the bug report.
12776 * backtrace.[ch] (scm_i_display_error): New function.
12778 * backtrace.c (scm_display_error): Added parameter check and
12779 extracted the core functionality into function
12780 scm_i_display_error.
12782 * throw.c (handler_message): Call scm_i_display_error to display
12785 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12787 * eval.c (SCM_APPLY): Added # args check for application of
12788 procedures with arity 3. (Thanks to Anders Holst.)
12790 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12792 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12794 (SCM_OPDIRP): Deprecated.
12796 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12799 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12800 Instead, give an explicit error message in case the directory is
12803 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12804 instead of SCM_OPENP and SCM_CLOSEDP.
12806 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12808 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12810 * eval.c (inner_eval, scm_eval): Move all real functionality into
12811 inner_eval. Avoid to copy the expression twice by inlining some
12812 code from scm_i_eval.
12814 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12816 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12817 now has to be the last clause, as required by R5RS. Thanks to
12818 Martin Grabmueller for the patch.
12820 2001-01-18 Gary Houston <ghouston@arglist.com>
12822 * ioext.c: further simplify scm_read_string_x_partial by defining
12823 a macro SCM_EBLOCK.
12825 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12827 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12829 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12831 * __scm.h: Added comment about architecture and compiler
12832 properties that are required by guile.
12834 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12835 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12837 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12839 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12841 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12842 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12844 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12846 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12847 to the names in limits.h.
12849 * numbers.c (abs_most_negative_fixnum): Added.
12851 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12852 fixnum-min) special case.
12854 (scm_big_and): Fix for negative first parameter.
12856 (scm_bit_extract): Fix for fixnum paramters.
12857 Thanks to Rob Browning for the bug report.
12859 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12861 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12863 * symbols.c (scm_symbol_bound_p): Fixed comment.
12864 Thanks to Chris Cramer.
12866 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12868 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12869 Thanks to Bill Schottstaedt.
12871 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12873 from Matthias Köppe:
12875 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12876 casts its result, so doesn't yield an lvalue per ANSI C.
12878 * goops.c (s_scm_sys_set_object_setter_x): use
12879 SCM_SET_ENTITY_SETTER.
12880 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12882 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12883 its result, so doesn't yield an lvalue per ANSI C.
12884 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12885 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12886 SCM_GC_SET_CARD_FLAGS.
12887 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12889 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12891 2001-01-08 Gary Houston <ghouston@arglist.com>
12893 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12894 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12895 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12897 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12898 for fdes. if current input port is used, check that it's a file
12901 2001-01-06 Gary Houston <ghouston@arglist.com>
12903 * ioext.c (scm_read_string_x_partial): new procedure, implements
12904 read-string!/partial.
12905 * ports.c (scm_take_from_input_buffers): new procedure used by
12906 scm_read_string_x_partial.
12907 (scm_drain_input): use scm_take_from_input_buffers.
12909 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12911 * validate.h (SCM_VALIDATE_NUMBER): New.
12913 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12915 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12916 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12917 SET_DESTROYED): new defines/macros.
12918 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12919 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12920 (guardian_print): print more info.
12921 (guardian_apply): check if the guardian is destroyed, and throw an
12922 error if so. take one more optional argument `throw_p'.
12923 (scm_guard): depending on the value of `throw_p', return a boolean
12925 (scm_get_one_zombie): remove redundant property test.
12926 (guardian_t): represent the various (currently 3, I hope nothing
12927 more gets added) boolean fields as bit flags.
12928 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12929 (scm_destroy_guardian_x): new procedure.
12931 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12932 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12934 2001-01-01 Gary Houston <ghouston@arglist.com>
12936 * fports.c (fport_write): bugfix: handle short writes for
12937 unbuffered ports too. optimize the buffered case by minimizing
12938 the number of write/flush calls.
12939 (write_all): new helper procedure.
12941 The ChangeLog continues in the file: "ChangeLog-2000"