2006-02-01 Ludovic Courtès <ludovic.courtes@laas.fr>
[bpt/guile.git] / libguile / ChangeLog
1 2006-01-30 Marius Vollmer <mvo@zagadka.de>
2
3 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
4 so that it gets unlocked in all cases.
5 (SCM_APPLY, CEVAL): Likewise.
6
7 2006-01-29 Marius Vollmer <mvo@zagadka.de>
8
9 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
10 scm_is_typed_array instead.
11
12 Renamed the "frames" that are related to dynamic-wind to "dynamic
13 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
14 Updated documentation.
15
16 Disabled "futures":
17
18 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
19 * eval.c, init.c: Comment out all 'future' related things.
20
21 2006-01-28 Marius Vollmer <mvo@zagadka.de>
22
23 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
24 to inline.h to make it inline.
25
26 2005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
27
28 * strings.c (scm_i_take_stringbufn): New.
29 (scm_i_c_take_symbol): New.
30 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
31
32 * strings.h (scm_i_c_take_symbol): New.
33 (scm_i_take_stringbufn): New.
34
35 * symbols.c (lookup_interned_symbol): New function.
36 (scm_i_c_mem2symbol): New function.
37 (scm_i_mem2symbol): Use `lookup_symbol ()'.
38 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
39 creating a new Scheme string.
40 (scm_from_locale_symboln): Likewise.
41 (scm_take_locale_symbol): New.
42 (scm_take_locale_symboln): New.
43
44 * symbols.h (scm_take_locale_symbol): New.
45 (scm_take_locale_symboln): New.
46
47 2006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
48
49 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
50 free_count.
51
52 2005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
53
54 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
55 upon error
56
57 2005-12-29 Neil Jerram <neil@ossau.uklinux.net>
58
59 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
60 the GC when allocated_fluids_len is zero.
61
62 2005-12-14 Neil Jerram <neil@ossau.uklinux.net>
63
64 * load.c (the_reader, the_reader_fluid_num): New.
65 (scm_primitive_load): Support custom reader.
66 (scm_init_load): Init the_reader and the_reader_fluid_num; export
67 the_reader as `current-reader'.
68
69 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
70 (rather than an uninitialized pointer on the stack).
71
72 2005-12-07 Marius Vollmer <mvo@zagadka.de>
73
74 Reported by Bruce Korb:
75
76 * init.c (invoke_main_func): Don't call exit here. Throws that
77 are only caught by scm_with_guile will bypass us and would cause
78 scm_boot_guile to return erroneously.
79 (scm_boot_guile): Expect scm_with_guile to return and call exit
80 here, passing it an appropriate exit code.
81
82 From Andy Wingo:
83
84 * script.c (scm_find_executable): Compile fix -- fgetc returns an
85 unsigned char cast to an int, or -1 for EOS.
86
87 2005-12-06 Marius Vollmer <mvo@zagadka.de>
88
89 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
90 non-const.
91 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
92
93 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
94 scm_enter_guile): Removed from public API. See comment at
95 scm_without_guile for the rationale.
96
97 * scmsigs.c (read_without_guile): New.
98 (signal_delivery_thread): Use it instead of
99 scm_leave_guile/read/scm_enter_guile.
100
101 From Stephen Compall:
102
103 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
104 (CEVAL): Evaluate SRFI 61 cond clauses.
105
106 2005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
107
108 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
109 This was typically hit when running `gc-live-object-stats' right
110 after starting Guile.
111
112 2005-11-30 Kevin Ryde <user42@zip.com.au>
113
114 * srfi-13.c (scm_string_append_shared): No copying if just one
115 non-empty string in args.
116
117 2005-11-26 Kevin Ryde <user42@zip.com.au>
118
119 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
120 by Ludovic Courtès.
121
122 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
123 "register".
124
125 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
126 scm_malloc returning NULL, it never does that.
127 * putenv.c (putenv): Likewise.
128
129 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
130 much too big to want to inline.
131
132 2005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
133
134 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
135 the value at its top. This fixes a reference leak.
136 (PUSH_REF): Perform `pstate->top++' after calling
137 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
138 effects.
139
140 2005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
141
142 * gc.c (scm_weak_vectors): Removed.
143
144 2005-11-12 Kevin Ryde <user42@zip.com.au>
145
146 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
147 by Ludovic Courtès.
148
149 2005-11-07 Marius Vollmer <mvo@zagadka.de>
150
151 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
152 SCM_CRITICAL_SECTION_START/END since the code inside the critical
153 section might exit non-locally.
154
155 2005-11-04 Neil Jerram <neil@ossau.uklinux.net>
156
157 * eval.c (sym_instead): New symbol.
158 (ENTER_APPLY): Remove optional use of a continuation when making
159 trap call.
160 (scm_debug_opts): Change doc for 'cheap option to make clear that
161 it is now obsolete.
162 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
163 making trap calls, and implement substitution of eval expressions
164 and return values using the values that the trap call handlers
165 return.
166
167 * debug.h (SCM_CHEAPTRAPS_P): Removed.
168
169 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
170
171 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
172 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
173 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
174 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
175 scm_c_make_socket_address): New functions.
176 * socket.h: Add prototypes.
177
178 2005-10-24 Kevin Ryde <user42@zip.com.au>
179
180 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
181 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
182 POSIX spec examples, the latter are not available on for instance
183 NetBSD.
184
185 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
186 posix.texi.
187
188 * stime.c (scm_strftime): Update docstring from posix.texi.
189
190 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
191
192 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
193
194 * null-threads.h, pthread-threads.h
195 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
196 (scm_i_pthread_mutexattr_recursive): New.
197
198 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
199 (scm_i_critical_section_mutex): Do not initialize statically.
200 (scm_threads_prehistory): Initialize
201 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
202 here.
203
204 * eval.c (source_mutex): Do not initialiaze statically.
205 (scm_init_eval): Do it here, using
206 scm_i_pthread_mutexattr_recursive.
207
208 2005-09-05 Marius Vollmer <mvo@zagadka.de>
209
210 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
211 New.
212 (sym_reader): New.
213 (scm_print_opts): Added "quote-keywordish-symbols" option.
214 (quote_keywordish_symbol): New, for evaluating the option.
215 (scm_print_symbol_name): Use it.
216 (scm_init_print): Initialize new option to sym_reader.
217
218 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
219
220 * eval.c (eval_letrec_inits): New.
221 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
222
223 2005-08-12 Marius Vollmer <mvo@zagadka.de>
224
225 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
226 Peter Gavin!
227
228 2005-08-12 Kevin Ryde <user42@zip.com.au>
229
230 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
231
232 2005-08-06 Kevin Ryde <user42@zip.com.au>
233
234 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
235 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
236 scm_string_index, scm_string_index_right, scm_string_skip,
237 scm_string_skip_right, scm_string_count, scm_string_map,
238 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
239 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
240 procedures called in loops.
241
242 2005-08-02 Kevin Ryde <user42@zip.com.au>
243
244 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
245 avoid lots of copying where previoulsy growing by only 80 bytes at a
246 time.
247
248 2005-08-01 Marius Vollmer <mvo@zagadka.de>
249
250 * modules.h, modules.c (scm_eval_closure_module): Removed, we
251 already have scm_lookup_closure_module, which does the same thing.
252
253 2005-08-01 Marius Vollmer <mvo@zagadka.de>
254
255 New marking algorithm for weak hashtables that fixes the problem
256 that references from the non-weak value to the associated weak
257 key (for example) would prevent the entry from ever being dropped.
258
259 Guardians have been changed back to their original semantics and
260 are no longer greedy and no longer drop cycles.
261
262 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
263 hashtable and guardian machinery but call the relevant functions
264 directly.
265
266 * guardians.h, guardians.c, deprecated.h,
267 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
268 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
269 Deprecated and moved into deprecated.[ch].
270
271 * guardians.h, guardians.c: Mostly rewritten.
272 (scm_i_init_guardians_for_gc,
273 scm_i_identify_inaccessible_guardeds,
274 scm_i_mark_inaccessible_guardeds): New.
275 (scm_make_guardian): Removed greedy_p argument.
276
277 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
278 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
279 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
280 (scm_weaks_prehistory): Removed.
281 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
282 scm_i_mark_weak_vectors_non_weaks,
283 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
284 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
285 scm_scan_weak_vectors): Removed.
286
287 * hashtab.h (scm_i_scan_weak_hashtables): New.
288 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
289 SCM_WVECTF_NOSCAN.
290 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
291 t->n_items.
292 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
293 to latter. Do not scan the alists themselves, this is done by the
294 weak vector code now. Just update the element count.
295
296 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
297 to latter. The type is now only part of the cell word.
298 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
299
300 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
301
302 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
303
304 Some changes towards making it possible to run Guile on the EM64T
305 platform.
306
307 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
308 mallocating for (unsigned long *bounds).
309
310 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
311 scm_t_bits before storing them in the type word.
312
313 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
314 scm_t_bits to int.
315
316 2005-07-12 Kevin Ryde <user42@zip.com.au>
317
318 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
319 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
320 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
321 than scm_makfrom0str.
322 Reported by Ken Raeburn.
323
324 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
325 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
326 returning SCM_GC_CARD_BVEC.
327
328 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
329 rather than latin-1 acute accent, the latter may not print on all
330 terminals.
331
332 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
333 trailing deletions, so as to return a substring if those are the only
334 changes.
335
336 2005-07-10 Kevin Ryde <user42@zip.com.au>
337
338 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
339 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
340 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
341 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
342
343 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
344
345 * gc-card.c (scm_i_card_statistics): init tag.
346
347 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
348
349 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
350
351 * fports.c (s_scm_open_file): add the b flag for binary to the doc
352 string.
353
354 2005-06-25 Kevin Ryde <user42@zip.com.au>
355
356 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
357 last change, use plain copy-on-write substrings, the individual
358 descriptions in the srfi don't mention shared storage (only the
359 introduction does).
360
361 * strings.c (scm_take_locale_stringn): Use realloc to make room for
362 null-terminator, rather than mallocing a whole new block.
363 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
364
365 2005-06-12 Marius Vollmer <mvo@zagadka.de>
366
367 * ramap.c (scm_array_index_map_x): First test for real arrays,
368 then check for generalized vectors. This ensures that the
369 generalized vector case need only work with zero-origin ranges.
370 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
371 to access the target array, making these functions work with all
372 kinds of arrays, not just bit arrays.
373
374 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
375 gh_list.c, gh_predicates.c: Deprecated everything.
376
377 * environments.c (environment_default_folder,
378 environment_default_observer): Do not use gh_call3, gh_call1.
379
380 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
381
382 * modules.c (s_scm_eval_closure_module): new function. Return the
383 module inside an eval-closure.
384
385 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
386 table. This means that procedure properties are GC'd if the
387 procedure dies.
388
389 2005-06-11 Kevin Ryde <user42@zip.com.au>
390
391 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
392 charset cases, count chars kept and build a string in a second pass,
393 rather than using a cons cell for every char kept. Use a shared
394 substring when nothing removed (such sharing is allowed by the srfi).
395
396 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
397
398 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
399 string, so live object stats can be sorted with string<?.
400
401 2005-06-06 Marius Vollmer <mvo@zagadka.de>
402
403 * print.c (iprin1): When writing a string, collect all characters
404 that can be printed directly into one call to scm_lfwrite.
405 Previously, every character was output with its own call to
406 write(2) on unbuffered ports.
407
408 * eval.c (scm_eval_options_interface): Use
409 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
410 and SCM_CRITICAL_SECTION_END.
411
412 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
413 check for generalized vectors. This ensures that the generalized
414 vector case need only work with zero-origin ranges.
415
416 2005-06-06 Kevin Ryde <user42@zip.com.au>
417
418 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
419 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
420 matched.
421
422 2005-06-05 Marius Vollmer <mvo@zagadka.de>
423
424 * eval.c: Added comment on how to make case 1.1 of
425 r5rs_pitfall.test succeed.
426
427 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
428
429 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
430
431 * socket.c: Remove obsolete comment about socklen_t.
432 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
433
434 * numbers.h (isnan)[__MINGW32__]: Remove.
435
436 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
437 DEFAULT_INCLUDES when cross compiling.
438
439 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
440
441 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
442 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
443 from Jan's patch.)
444
445 2005-05-22 Marius Vollmer <mvo@zagadka.de>
446
447 * unif.c (scm_make_shared_array): Add old base to new base since
448 scm_array_handle_pos does not include the base.
449 (scm_aind): Likewise.
450
451 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
452 output port.
453
454 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
455
456 Mac OS X compile warning fixes, reported by Richard Todd.
457
458 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
459 that it is signed.
460
461 * strports.c (st_resize_port): Add unsigned char cast.
462 (scm_mkstrport): Make read/write_buf cast unsigned.
463
464 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
465
466 * rdelim.c (scm_read_line): Initialize slen.
467
468 * load.c (scm_search_path): Remove weird >=1, and add
469 parentheses to clarify conditions.
470
471 * hash.c (scm_hasher): Add const unsigned char cast.
472
473 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
474
475 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
476
477 Fix C99isms reported by Ludovic Courtès:
478
479 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
480 code.
481
482 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
483 of code.
484
485 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
486 of code.
487 (scm_i_card_statistics): Add block for declarations of tag_as_scm
488 and current.
489
490 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
491
492 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
493 compile warning reported by Werner Scheinast.
494
495 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
496
497 * list.h: remove scm_list()
498
499 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
500 SCM_DEBUG_CELL_ACCESSES
501 (FLUID_NEXT_LOC): idem.
502
503 2005-04-30 Kevin Ryde <user42@zip.com.au>
504
505 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
506 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
507 zero when re==0 and im<0. Reported by Jean Crepeau.
508
509 2005-04-25 Kevin Ryde <user42@zip.com.au>
510
511 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
512 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
513 few sensible uses (like filling with a random number generator say),
514 but has been allowed in the past and so should be kept.
515
516 2005-04-23 Kevin Ryde <user42@zip.com.au>
517
518 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
519 scm_hash_fn_remove_x.
520
521 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
522 the caller when cons* is reached through apply.
523
524 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
525 list is called using apply, under the debugging evaluator.
526 (scm_list): Remove.
527
528 * list.c, list.h (scm_make_list): New code, moving make-list from
529 boot-9.scm.
530
531 2005-04-14 Kevin Ryde <user42@zip.com.au>
532
533 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
534 converted from scheme code in boot-9.scm.
535
536 2005-04-11 Kevin Ryde <user42@zip.com.au>
537
538 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
539 Validate list argument, scm_string_append and scm_string_append_shared
540 don't do that to their rest argument (in a normal build).
541
542 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
543
544 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
545 closure can not be stored since it is no longer valid at GC time.
546 (make_hash_table): Initialize 'hash_fn' field.
547 (scm_i_rehash): Only store hash_fn in hash table when closre is
548 NULL.
549 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
550 non-NULL. Always use a NULL closure.
551 (scm_hash_fn_create_handle_x): Also rehash when table contains too
552 few entries.
553
554 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
555
556 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
557 argument; always use scm_delq_x. The delete_fn function works on
558 the handle, not the key, and it therefore makes no sense to make
559 it configurable. Changed all callers.
560 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
561 (scm_hash_clear): Accept plain vectors as hashtables.
562 (scm_delx_x): Removed.
563
564 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
565
566 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
567 compatibility with gcc -std=c99.
568
569 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
570
571 * async.h (scm_mask_ints): Removed left over reference to
572 scm_root.
573
574 * threads.c: Removed fprintf debug statements.
575
576 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
577
578 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
579
580 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
581
582 * debug.c (scm_make_memoized): Remove unnecessary critical
583 section, and simplify by using SCM_RETURN_NEWSMOB.
584
585 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
586
587 * strings.h (SCM_STRING_UCHARS): Added missing argument.
588
589 2005-03-18 Kevin Ryde <user42@zip.com.au>
590
591 * arbiters.c (FETCH_STORE) [generic C]: Should be
592 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
593
594 2005-03-13 Kevin Ryde <user42@zip.com.au>
595
596 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
597 srfi-60.
598
599 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
600 because OR-ing bits into a negative can reduce the value to an inum.
601
602 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
603 casting inum to double since that can lose precision.
604
605 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
606
607 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
608 (guilify_self_1): Initialize it.
609
610 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
611 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
612 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
613 field.
614 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
615 recursively.
616 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
617 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
618 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
619 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
620 scm_after_gc_c_hook here.
621 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
622 scm_after_gc_c_hook when a full GC has in fact been performed.
623 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
624
625 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
626 scm_gc_heap_lock.
627
628 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
629 scm_gc_running_p while the scm_i_sweep_mutex is locked.
630
631 * inline.h (scm_cell, scm_double_cell): Do not check
632 scm_gc_running_p, allocation during sweeping is OK.
633
634 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
635 not set scm_block_gc.
636
637 * init.c (scm_i_init_guile): Do not set scm_block_gc.
638
639 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
640 instead of scm_malloc. The latter can not be used during GC.
641
642 2005-03-09 Marius Vollmer <mvo@zagadka.de>
643
644 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
645 years.
646
647 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
648
649 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
650 scm_gc_running_p. Sweeping can happen in parallel with
651 allocation.
652
653 * inline.h: Updated comments for current threading implementation.
654
655 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
656 (scm_i_thread): Removed unused signal_asyncs field.
657 (threads_mark): Do not mark it.
658 (guilify_self_1): Do not initialize it. Do initialize
659 continuation_root field.
660 (do_thread_exit): Do not remove thread from all_threads list.
661 (on_thread_exit): Do it here, after leaving guile mode.
662 (sleep_level): Removed.
663 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
664 returning. Do not support recursive sleeps.
665 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
666 entry. Do not support recursive sleeps.
667
668 * fluids.c (ensure_state_size, ensure_all_state_sizes,
669 resize_all_states): Collapsed ensure_state_size and
670 ensure_all_state_sizes into one function named resize_all_states.
671 Allocate new vectors outside of single threaded region. Do only
672 simple things inside that region.
673 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
674 while adding to the global lists.
675
676
677 2005-03-08 Marius Vollmer <mvo@zagadka.de>
678
679 libltdl is no longer distributed. We expect it to be installed
680 already.
681
682 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
683 (libguile_la_LIBADD): Removed @LIBLTDL@.
684
685 2005-03-07 Marius Vollmer <mvo@zagadka.de>
686
687 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
688 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
689 they also block/unblock execution of asyncs and call
690 scm_async_click which is declared in async.h but threads.h can not
691 include async.h since async.h already includes threads.h.
692 (scm_i_critical_section_level): New, for checking mistakes in the
693 use of the SCM_CRITICAL_SECTION_* macros.
694 (scm_i_critical_section_mutex): Make it a recursive mutex so that
695 critical sections can be nested.
696
697 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
698 not zero.
699
700 * threads.h, threads.c (scm_frame_lock_mutex): New.
701 (scm_frame_critical_section): Take mutex as argument.
702 (framed_critical_section_mutex): New, used as default for above.
703 (scm_init_threads): Initialize it.
704 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
705 scm_i_critical_section_mutex; both are initialized statically.
706
707 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
708 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
709 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
710 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
711
712 * debug.c (scm_debug_options): Replace
713 SCM_CRITICAL_SECTION_START/END with a frame and
714 scm_frame_critical_section.
715
716 * continuations.c (scm_make_continuation): No longer a critical
717 section.
718 (scm_dynthrow): Abort when scm_i_critical_section_level is
719 not zero.
720
721 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
722
723 * threads.c (scm_try_mutex): Renamed argument for consistency.
724
725 * root.c (scm_call_with_dynamic_root): New docstring.
726
727 * eval.c: Define _GNU_SOURCE.
728
729 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
730
731 Big merge from the mvo-thread-cleanup branch. The main changes
732 are:
733
734 - The dynamic roots functionality has been split into dynamic
735 states and continuations barriers. Fluids have been
736 reimplemented and can now be garbage collected.
737
738 - Initialization of Guile now works in a multi-thread friendly
739 manner. Threads can freely enter and leave guile mode.
740
741 - Blocking on mutexes or condition variables or while selecting
742 can now be reliably interrupted via system asyncs.
743
744 - The low-level threading interface has been removed.
745
746 - Signals are delivered via a pipe to a dedicated 'signal delivery
747 thread'.
748
749 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
750
751 * throw.c (scm_handle_by_message): Exit only the current thread,
752 not the whole process.
753 (scm_handle_by_message_noexit): Exit when catching 'quit.
754
755 * scmsigs.c (take_signal, signal_delivery_thread,
756 start_signal_delivery_thread, ensure_signal_delivery_thread,
757 install_handler): Reimplemented signal delivery as explained in
758 the comments.
759
760 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
761 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
762 scm_i_sched_yield, scm_i_pthread_sigmask,
763 SCM_I_PTHREAD_MUTEX_INITIALIZER,
764 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
765 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
766 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
767 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
768 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
769 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
770 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
771 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
772 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
773 scm_i_pthread_key_create, scm_i_pthread_setspecific,
774 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
775 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
776 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
777 when using pthreads.
778 * null-threads.c, null-threads.h: Provide dummy definitions for
779 the above symbols when not using pthreads.
780
781 * modules.h, modules.c (scm_frame_current_module): New.
782
783 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
784 instead of scm_internal_dynamic_wind.
785
786 * init.h, init.c (restart_stack, start_stack): Removed.
787 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
788 (scm_boot_guile_1): Removed.
789 (scm_i_init_mutex): New.
790 (really_cleanup_for_exit, cleanup_for_exit): New.
791 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
792 Moved around some init funcs. Call
793 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
794 with atexit.
795
796 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
797 Use "!scm_is_eq" instead of "!=".
798
799 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
800 SCM_USE_COOP_THREADS): Removed.
801
802 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
803 maintained. Unlock scm_i_sweep_mutex before running
804 scm_after_gc_c_hook.
805 (scm_permanent_object): Allocate outside of critical section.
806 (cleanup): Removed.
807
808 * fluids.h, fluids.c: Reimplemented completely.
809 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
810 SCM_FAST_FLUID_SET): Reimplemented as functions.
811 (scm_is_fluid): New.
812 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
813 (scm_make_dynamic_state, scm_dynamic_state_p,
814 scm_is_dynamic_state, scm_current_dynamic_state,
815 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
816 scm_c_with_dynamic_state, scm_with_dynamic_state,
817 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
818
819 * feature.c (progargs_fluid): New.
820 (scm_program_arguments, scm_set_program_arguments): Use it instead
821 of scm_progargs.
822 (scm_init_feature): Allocate it. Also, only add "threads" feature
823 when SCM_USE_PTHREAD_THREADS is true.
824
825 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
826 scm_make_rec_mutex, with all the consequences.
827 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
828 scm_internal_dynamic_wind. Handle dynamic states as second
829 argument.
830
831 * threads.h, threads.c (scm_internal_select): Renamed to
832 scm_std_select and discouraged old name.
833 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
834 and scm_std_usleep.
835 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
836 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
837 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
838 SCM_THREAD_DATA): Removed.
839 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
840 (scm_i_thread): New.
841 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
842 Use scm_assert_smob_type.
843 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
844 scm_thread_self, scm_thread_yield, scm_mutex_init,
845 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
846 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
847 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
848 scm_cond_init, scm_cond_destroy, scm_cond_wait,
849 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
850 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
851 scm_thread_select): Removed. Replaced with scm_i_pthread
852 functions as appropriate.
853 (scm_in_guile, scm_outside_guile): Removed.
854 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
855 take a ticket.
856 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
857 New.
858 (scm_i_frame_single_threaded): New.
859 (scm_init_threads_default_dynamic_state): New.
860 (scm_i_create_thread): Removed.
861 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
862 (scm_make_recursive_mutex): New.
863 (scm_frame_critical_section): New.
864 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
865 latter, changed all uses.
866 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
867 scm_i_set_last_debug_frame): New, use them instead of scm_root
868 stuff.
869 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
870 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
871 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
872 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
873 (remqueue): Allow the removal of already removed cells. Indicate
874 whether a real removal has happened.
875 (scm_thread): Removed, replaced with scm_i_thread.
876 (make_thread, init_thread_creatant): Removed.
877 (cur_thread): Removed.
878 (block_self, unblock_from_queue): New.
879 (block, timed_block, unblock): Removed.
880 (guilify_self_1, guilify_self_2, do_thread_exit,
881 init_thread_key_once, init_thread_key,
882 scm_i_init_thread_for_guile, get_thread_stack_base,
883 scm_init_guile): New initialisation method.
884 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
885 thread creation.
886 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
887 "fair" to fat and implemented new semantics, including reliable
888 interruption.
889 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
890 (scm_threads_mark_stacks): Explicitly mark handle.
891 (scm_std_select): Allow interruption by also selecting on the
892 sleep_pipe.
893 (scm_i_thread_put_to_sleep): Handle recursive requests for
894 single-threadedness.
895 (scm_threads_prehistory, scm_init_threads): Put current thread
896 into guile mode via guileify_self_1 and guileify_self_2,
897 respectively.
898
899 * fluid.h (SCM_FLUIDP): Deprecated.
900
901 * coop-threads.c: Removed.
902
903 * continuations.h, continuations.c (scm_with_continuation_barrier,
904 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
905 New.
906
907 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
908 (async_mutex): New.
909 (scm_async_click): Protected with async_mutex. Do not deal with
910 signal_asyncs, which are gone. Set cdr of handled async cell to
911 #f.
912 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
913 current sleep.
914 (scm_system_async_mark_for_thread): Do not use scm_current_thread
915 since that might not work during early initialization.
916
917 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
918 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
919 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
920 and SCM_CRITICAL_SECTION_END.
921 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
922 SCM_CRITICAL_SECTION_START/END.
923
924 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
925 (libguile_la_SOURCES): Added null-threads.c
926 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
927 threads-plugin.c.
928 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
929
930 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
931 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
932 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
933 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
934 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
935 scm_make_root): Removed or deprecated. Replaced with references
936 to the current thread, dynamic state, continuation barrier, or
937 some fluid, as appropriate.
938 (root_mark, root_print): Removed.
939 (scm_internal_cwdr): Reimplemented guts with
940 scm_frame_current_dynamic_state and
941 scm_i_with_continuation_barrier.
942 (scm_dynamic_root): Return current continuation barrier.
943
944
945 2005-02-28 Marius Vollmer <mvo@zagadka.de>
946
947 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
948 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
949 cleanliness.
950 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
951 IP_DROP_MEMBERSHIP.
952 Thanks to Greg Troxel!
953
954 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
955
956 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
957 block.
958
959 2005-02-25 Marius Vollmer <mvo@zagadka.de>
960
961 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
962 so that no two weak alist vectors share a spine.
963 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
964 during GC before inserting the new alist cell.
965
966 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
967
968 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
969 the hashtable.
970 (scm_hash_fn_create_handle_x): Likewise.
971 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
972
973 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
974
975 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
976 the prototypical examples mentioned in the old reference manual.
977 Instead keep the old semantics of dispatching on type. (Yes, this
978 is extremely ugly, but the whole point of keeping the deprecated
979 interface is not to break old code.)
980
981 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
982
983 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
984 scm_i_array_dims.
985
986 2005-01-28 Kevin Ryde <user42@zip.com.au>
987
988 * numbers.c (scm_ash): Rewrite using shifts, much faster than
989 integer-expt and multiply/divide. Inexacts and fractions no longer
990 supported (they happened to work before for left shifts, but not
991 right). Don't really need inexacts and fractions, since ash is
992 documented as a "bitwise operation", and all the rest of those only
993 take exact integers.
994
995 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
996
997 * gc-card.c (scm_i_card_statistics): map structs, closures and
998 subrs to one tag.
999
1000 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
1001 (tag_table_to_type_alist): ignore unknown types.
1002
1003 * gc-segment.c (scm_i_all_segments_statistics): new function.
1004 (scm_i_heap_segment_statistics): new function
1005
1006 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
1007 statistics on the number of live objects of each type.
1008
1009 * gc-card.c (scm_i_tag_name): new function.
1010 (scm_i_card_statistics): new function.
1011
1012 2005-01-24 Kevin Ryde <user42@zip.com.au>
1013
1014 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
1015 POSIX and C99 don't document errno being set. Reported by Bruno
1016 Haible.
1017 (scm_flock): Update docstring from manual.
1018
1019 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
1020 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
1021 a 64-bit system.
1022
1023 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
1024 sa_handler, needs to be a long on 64-bit systems where int is only 32
1025 bits.
1026
1027 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1028
1029 * environments.c (obarray_enter, obarray_replace): Call
1030 SCM_HASHTABLE_INCREMENT when adding a new entry.
1031
1032 * objects.c: Include goops.h for the scm_class_of prototype.
1033
1034 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
1035 sizes to be smaller than the maximum lengths of vectors.
1036
1037 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1038
1039 * ports.c, smob.c: Include "libguile/goops.h".
1040
1041 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
1042 scm_class_char, scm_class_pair, scm_class_procedure,
1043 scm_class_string, scm_class_symbol,
1044 scm_class_procedure_with_setter, scm_class_primitive_generic,
1045 scm_class_vector, scm_class_null, scm_class_real,
1046 scm_class_complex, scm_class_integer, scm_class_fraction,
1047 scm_class_unknown, scm_port_class, scm_smob_class,
1048 scm_no_applicable_method, scm_class_of): Moved from objects to
1049 goops since they are only useable once goops has been loaded.
1050 (scm_classes_initialized): Removed.
1051 (scm_class_of): Do not check it.
1052 (create_standard_classes): Do not set it.
1053
1054 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1055
1056 * objects.h, objects.c (scm_classes_initialized): New.
1057 (scm_class_of): Signal error when scm_classes_initialized is zero.
1058 * goops.c (create_standard_classes): Set scm_classes_initialized
1059 to one.
1060
1061 * random.c (scm_random_solid_sphere_x): Use
1062 scm_c_generalized_vector_length instead of
1063 scm_uniform_vector_length.
1064
1065 2005-01-16 Marius Vollmer <mvo@zagadka.de>
1066
1067 * script.c (scm_compile_shell_switches): Removed debugging output.
1068
1069 2005-01-15 Kevin Ryde <user42@zip.com.au>
1070
1071 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
1072 docstrings from manual.
1073 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
1074
1075 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1076
1077 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
1078 its value.
1079
1080 Implement u64 and s64 uniform numeric vectors with bignums when
1081 scm_t_uint64 and scm_t_int64 are not available.
1082
1083 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
1084 scm_array_handle_u64_elements,
1085 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
1086 scm_u64vector_writable_elements): Do not define when scm_t_uint64
1087 is not available.
1088 (scm_take_s64vector, scm_array_handle_s64_elements,
1089 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
1090 scm_s64vector_writable_elements): Likewise for scm_t_int64.
1091 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
1092 scm_t_int64/scm_t_uint64 are not available.
1093 (uvec_mark): New, to mark the bignums.
1094 (alloc_uvec): Initialize bignums.
1095 (uvec_fast_ref): Return bignums directly.
1096 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
1097 assert_exact_integer): New.
1098 (uvec_fast_set): Use them to validate the bignums.
1099 (scm_init_srfi_4): Set mark function of smob when needed.
1100 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
1101 scm_int64_max.
1102
1103 Recognize 1.4 -e syntax.
1104
1105 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
1106 (scm_compile_shell_switches): Use them to recognize and convert
1107 1.4 "-e" syntax.
1108
1109 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1110
1111 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
1112 deprecated features that once were macros but are now functions
1113 back into macros.
1114
1115 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1116
1117 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
1118 * deprecation.c (scm_issue_deprecation_warning,
1119 scm_c_issue_deprecation_warning_fmt): Use it.
1120 (mode): Removed.
1121 (print_summary): New.
1122 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
1123 mode.
1124
1125 Deprecated SCM_ARRAY* macros.
1126
1127 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
1128 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
1129 version. Changed all uses.
1130 (scm_tc16_array, scm_i_tc16_array,
1131 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
1132 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
1133 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
1134 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
1135 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
1136 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
1137 SCM_ARRAY_V, SCM_I_ARRAY_V,
1138 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
1139 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
1140 scm_t_array, scm_i_t_array): Likewise.
1141 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
1142 Moved from unif.h to unif.c.
1143 (scm_c_array_rank): New.
1144 (scm_array_rank): Reimplement using it.
1145
1146 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
1147 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
1148 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
1149
1150 2005-01-11 Marius Vollmer <mvo@zagadka.de>
1151
1152 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
1153 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
1154 scm_c_generalized_vector_ref and scm_cvref, and
1155 scm_c_generalized_vector_set_x, respectively.
1156 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
1157 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
1158
1159 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
1160 former to latter and made public. Changed all uses.
1161 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
1162 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
1163 (scm_i_shap2ra): New internal version of scm_shap2ra.
1164 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
1165 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
1166 (scm_ra_set_contp): Deprecated, changed all uses to
1167 scm_i_ra_set_contp.
1168 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
1169
1170 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1171
1172 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
1173 Trotts!
1174
1175 * unif.c (scm_list_to_typed_array): Allow the specification of the
1176 upper bound as well. This is needed for empty arrays.
1177 (l2ra): Give needed number of elements in error message.
1178 (scm_i_print_array): Print length information for arrays that need
1179 it.
1180 (scm_i_read_array): Parse it.
1181
1182 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
1183 scm_i_object_chars, scm_i_object_length): Brought back from the
1184 dead.
1185
1186 2005-01-10 Marius Vollmer <mvo@zagadka.de>
1187
1188 * ramap.c: Replaced single-index uses of scm_array_set_x with
1189 scm_c_generalized_vector_set_x.
1190
1191 * unif.c (scm_array_rank, scm_array_dimensions,
1192 scm_shared_array_offset, scm_shared_array_increments,
1193 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
1194 to simplify code and make it more general.
1195 (scm_shared_array_root): Work with all kinds of arrays, including
1196 naked vectors.
1197 (indices_to_pos): New.
1198 (scm_make_shared_array): Use it instead of scm_aind; use handle
1199 for oldra.
1200
1201 2005-01-10 Kevin Ryde <user42@zip.com.au>
1202
1203 * posix.c (scm_mkstemp): Update docstring from manual.
1204
1205 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
1206
1207 2005-01-09 Marius Vollmer <mvo@zagadka.de>
1208
1209 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
1210 scm_i_uniform_vector_set_proc): New.
1211 (u8ref, u8set, s8ref, s8set, etc): New.
1212 (uvec_reffers, uvec_setters): New.
1213 (uvec_to_list): Use generic scm_array_handle_ref instead of
1214 uvec_fast_ref since scm_array_handle_ref should be faster now.
1215 (coerce_to_uvec, scm_c_uniform_vector_ref,
1216 scm_c_uniform_vector_set_x): Likewise.
1217
1218 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
1219 New.
1220 (scm_t_array_handle): Added ref, set, elements and
1221 writable_elements for fast inline operation of
1222 scm_array_handle_ref and scm_array_handle_set.
1223 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
1224 and replaced with inline code that simply calls the ref/set
1225 members of the handle.
1226 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
1227 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
1228 New.
1229 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
1230 and memoize_set.
1231 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
1232 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1233 scm_bit_invert_x): Correctly multiply index with increment in the
1234 general case.
1235
1236 * unif.c (scm_array_handle_set): Correctly execute only one
1237 alternative. D'Oh!
1238 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
1239 the array; this covers all cases with much simpler code.
1240
1241 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
1242 as well.
1243
1244 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1245
1246 * srfi-4.c (uvec_type): New.
1247 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
1248 scm_c_uniform_vector_x): Use it to get concrete type.
1249
1250 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
1251 fit the docs.
1252
1253 * unif.c (ra2l): Handle zero rank arrays.
1254 (scm_i_print_array): Print zero rank arrays specially.
1255 (tag_to_type): Return #t for an empty tag, not the empty symbol.
1256 (scm_i_read_array): Allow zero rank arrays.
1257
1258 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1259
1260 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
1261 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
1262 and SCM_SET_HASHTAB_BUCKET.
1263
1264 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
1265 Removed ref_stack field.
1266 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
1267 of a print state. Use them everywhere instead of ref_stack.
1268
1269 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
1270
1271 * srfi-4.c: Include deprecation.h.
1272
1273 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
1274 deprecated.c, eq.c
1275 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
1276 (scm_vector_elements, scm_vector_writable_elements,
1277 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
1278 unif.[hc].
1279 (SCM_SIMPLE_VECTOR_LOC): Removed.
1280 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
1281 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
1282 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
1283 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
1284 latter. Changed use in eq.c.
1285
1286 2005-01-07 Marius Vollmer <mvo@zagadka.de>
1287
1288 Make the uniform vector routines also deal with one dimensional
1289 arrays.
1290
1291 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
1292 SCM_SMOB_PREDICATE in this file.
1293 (is_uvec): Also recognize one-dimensional uniform numeric arrays
1294 of the right type.
1295 (scm_is_uniform_vector): Likewise.
1296 (uvec_fast_ref): Made BASE param const.
1297 (uvec_writable_elements, uvec_elements): New.
1298 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
1299 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
1300 scm_c_uniform_set_x): Use them to also deal with one-dimensional
1301 arrays.
1302 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
1303 argument convention.
1304 (scm_uniform_vector_to_list): Let uvec_to_list do all the
1305 checking.
1306 (scm_uniform_vector_length): Use uvec_length.
1307
1308 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1309
1310 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
1311 scm_c_uniform_vector_size): Removed.
1312 (scm_array_handle_uniform_element_size): New.
1313
1314
1315 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
1316 type of POS parameter to be signed, positions can be negative.
1317 (scm_array_handle_release): New, changed all uses of
1318 scm_t_array_handle to properly call it.
1319 (scm_vector_get_handle, scm_generalized_vector_get_handle):
1320 Renamed former to latter, changed all uses.
1321
1322 2005-01-05 Marius Vollmer <mvo@zagadka.de>
1323
1324 Updated bitvector routines to also use scm_t_array_handles.
1325
1326 * unif.h (scm_bitvector_elements,
1327 scm_bitvector_writable_elements): Use a scm_t_array_handle and
1328 deliver offset, length and increment to caller. Changed all uses.
1329 (scm_bitvector_release_elements,
1330 scm_frame_bitvector_release_elements,
1331 scm_bitvector_release_writable_elements,
1332 scm_frame_bitvector_release_writable_elements): Removed.
1333 (scm_array_handle_bit_elements,
1334 scm_array_handle_bit_writable_elements,
1335 scm_array_handle_bit_elements_offset): New.
1336 (scm_make_typed_array): The special value for non-initialized
1337 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
1338 was a valid value to fill bitvectors with, so it can't really be
1339 specialed out.
1340
1341 2005-01-04 Kevin Ryde <user42@zip.com.au>
1342
1343 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
1344 Reported by Bill Schottstaedt.
1345
1346 2005-01-02 Marius Vollmer <mvo@zagadka.de>
1347
1348 * sort.c (quicksort): Added INC parameter for non-contigous
1349 vectors.
1350 (quicksort1): New, for contigous vectors. Both functions are
1351 generated from the same code by including "quicksort.i.c".
1352 (scm_restricted_vector_sort_x): Call one of quicksort and
1353 quicksort1, depending on increment of vector.
1354 (scm_sort): Simply call scm_sort_x on a copy of the list or
1355 vector.
1356 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
1357 size_t, added inc parameter.
1358 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
1359 so that it doesn't leak.
1360 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
1361 list or vector.
1362
1363 * ramap.c (scm_array_map_x): Do not try to convert fill value
1364 before filling, any necessary conversion is done while storing.
1365
1366 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1367 doing it inline.
1368
1369 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1370 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1371 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1372
1373 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1374 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1375 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1376 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1377 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1378 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1379 vector elements API or simple vector API, as appropriate. Removed
1380 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1381 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1382
1383 * srfi-4.h, srfi-4.c,
1384 srfi-4.i.c (scm_array_handle_uniform_elements,
1385 scm_array_handle_uniform_writable_elements,
1386 scm_uniform_vector_elements,
1387 scm_uniform_vector_writable_elements):
1388 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1389 scm_t_array_handle, deliver length and increment.
1390 (scm_array_handle_<foo>_elements,
1391 scm_array_handle_<foo>_writable_elements): New.
1392
1393 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1394 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1395
1396 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1397 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1398 scm_array_handle_set, scm_array_handle_elements
1399 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1400 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1401 scm_dimensions_to_uniform_array): Deprecated for real.
1402 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1403 snarfing wont allow a mismatch between C and Scheme arglists.
1404 (scm_make_shared_array, scm_enclose_array): Correctly use
1405 scm_c_generalized_vector_length instead of
1406 scm_uniform_vector_length.
1407
1408 * validate.h (SCM_VALIDATE_VECTOR,
1409 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1410 of SCM_VECTORP.
1411
1412 * weaks.h, weaks.c: Use new internal weak vector API from
1413 vectors.h.
1414
1415 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1416 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1417 'extra' to being regular sources.
1418 (noinst_HEADERS): Added quicksort.i.c.
1419 * quicksort.i.c: New file.
1420
1421 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1422 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1423 and reimplemented. Replaced all uses with scm_vector_elements,
1424 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1425 appropriate.
1426 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1427 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1428 SCM_SIMPLE_VECTOR_LOC): New.
1429 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1430 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1431 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1432 Removed.
1433 (scm_vector_copy): New.
1434 (scm_vector_elements, scm_vector_writable_elements): Use
1435 scm_t_array_handle, deliver length and increment. Moved to
1436 unif.h. Changed all uses.
1437 (scm_vector_release_elements,
1438 scm_vector_release_writable_elements,
1439 (scm_frame_vector_release_elements,
1440 scm_frame_vector_release_writable_elements): Removed.
1441 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1442 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1443 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1444 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1445 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1446 weak vectors.
1447
1448 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1449
1450 No longer use creators to specify the type of an array. Creators
1451 expose the fact that arrays are wrapped around vectors, but that
1452 might change.
1453
1454 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1455 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1456 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1457 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1458 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1459 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1460 uvec_proc_vars): Removed.
1461 (scm_i_generalized_vector_creator): Removed.
1462 (scm_i_generalized_vector_type): New.
1463
1464 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1465 scm_make_typed_array, scm_array_type, scm_list_to_array,
1466 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1467 (scm_array_creator): Removed.
1468 (scm_array_p): Deprecated second PROT argument.
1469 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1470 Deprecated, reimplemented in terms of scm_make_typed_array and
1471 scm_list_to_typed_array.
1472 (scm_i_proc_make_vector, scm_i_proc_make_string,
1473 scm_i_proc_make_bitvector): Removed.
1474 (type_creator_table, init_type_creator_table, type_to_creator,
1475 make_typed_vector): New.
1476 (scm_i_convert_old_prototype): Removed.
1477 (prototype_to_type): New.
1478 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1479 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1480 minor added clarity.
1481 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1482 instead of scm_make_uve.
1483 (tag_creator_table, scm_i_tag_to_creator): Removed.
1484 (tag_to_type): New.
1485 (scm_i_read_array): Use scm_list_to_typed_array instead of
1486 scm_list_to_uniform_array.
1487
1488 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1489
1490 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1491 (scm_bitvector_writable_elements): New.
1492 (scm_bitvector_release, scm_bitvector_release_elements):
1493 Renamed former to latter. Added explicit call to
1494 scm_remember_upto_here_1.
1495 (scm_frame_bitvector_release,
1496 scm_frame_bitvector_release_elements): Renamed former to latter.
1497 (scm_bitvector_release_writable_elements,
1498 scm_bitvector_release_writable_elements): New.
1499 Changed all uses as required by the changes above.
1500
1501 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1502 scm_u8vector_elements, etc): Made return value "const".
1503 (scm_uniform_vector_writable_elements,
1504 scm_u8vector_writable_elements, etc): New.
1505 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1506 Renamed former to latter. Added explicit call to
1507 scm_remember_upto_here_1.
1508 (scm_frame_uniform_vector_release,
1509 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1510 (scm_uniform_vector_release_writable_elements,
1511 scm_frame_uniform_vector_release_writable_elements): New. Takes
1512 crown of longest identifier yet.
1513 Changed all uses as required by the changes above.
1514
1515 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1516 void.
1517 (scm_is_vector, scm_vector_p, scm_vector_length,
1518 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1519 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1520 scm_vector_move_left_x, scm_vector_move_right_x,
1521 scm_vector_fill_x): handle one-dimensional arrays.
1522 (scm_vector_elements, scm_vector_release_elements,
1523 scm_vector_frame_release_elements, scm_vector_writable_elements,
1524 scm_vector_release_writable_elements,
1525 scm_vector_frame_release_writable_elements): New.
1526 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1527 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1528
1529 * ramap.c (scm_ramapc, scm_raeql): Use
1530 scm_c_generalized_vector_length instead of
1531 scm_uniform_vector_length.
1532 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1533 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1534
1535 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1536
1537 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1538 member for relocating debug frames.
1539 (scm_make_continuation): Set it.
1540
1541 * stacks.c (read_frame, read_frames, scm_make_stack,
1542 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1543 of continuations instead of calculating the offset ourselves.
1544 Relocate 'vect' member of scm_t_debug_frame.
1545
1546 2004-12-16 Kevin Ryde <user42@zip.com.au>
1547
1548 * ramap.c (scm_array_map_x): Check for at least one source argument.
1549
1550 2004-12-14 Kevin Ryde <user42@zip.com.au>
1551
1552 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1553 the C code so for the final call to the predicate procedure is a tail
1554 call, per SRFI-13 spec.
1555
1556 2004-12-10 Kevin Ryde <user42@zip.com.au>
1557
1558 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1559 recent revision to the reference manual.
1560
1561 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1562 with "%", C99 says it's well-defined.
1563
1564 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1565 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1566 bother trying to fit scm_from_ulong, not really worth the trouble if
1567 addresses are more than 4 bytes usually.
1568
1569 2004-11-30 Kevin Ryde <user42@zip.com.au>
1570
1571 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1572 arm32. Reported by Greg Troxel.
1573
1574 2004-11-14 mvo <mvo@zagadka.de>
1575
1576 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1577
1578 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1579
1580 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1581
1582 Enclosed arrays are now their own smob. This has been done to
1583 make the code more explicit about them and to prepare for the time
1584 when generalized vectors include arbitrary one-dimensional
1585 arrays. (Uptonow, enclosed arrays have been recognized by their
1586 use of an array as their storage 'vector'. When all generalized
1587 vectors are allowed as storage, including one-dimensional arrays,
1588 this will no longer work.)
1589
1590 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1591 New.
1592 (exactly_one_third, singp): Removed.
1593 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1594 scm_shared_array_offset, scm_shared_array_increments): Handle
1595 enclosed arrays explicitely.
1596 (scm_array_rank): Likewise. Also, do not return zero for
1597 non-arrays, signal an error instead since arrays with rank zero do
1598 exist.
1599 (scm_i_make_ra): New, for specifying the tag of the new array.
1600 (scm_make_enclosed_array): Use it.
1601 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1602 (scm_make_shared_array): Use scm_c_generalized_vector_length
1603 instead of scm_uniform_vector_length.
1604 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1605 (scm_i_cvref): New, doing the job of scm_cvref.
1606 (scm_cvref): Use scm_i_cvref.
1607 (scm_array_ref): Do not accept non-arrays when no indices are
1608 given. Use scm_i_cvref to do the actual access.
1609 ("uniform-array-set1"): Do not register.
1610 (scm_array_set_x, scm_uniform_array_read_x,
1611 scm_uniform_array_write): Handle enclosed arrays explicitly.
1612 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1613 handle enclosed arrays.
1614 (scm_array_to_list): Handle enclosed arrays explicitly.
1615 (rapr1): Removed.
1616 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1617 enclosed arrays.
1618 (scm_i_print_enclosed_array): New.
1619 (tag_proto_table, tag_creator_table): Renamed former to latter.
1620 Added "a" and "b" for strings and bitvectors, resp.
1621 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1622 latter. Tag "a" is in the table now, no need to handle it as a
1623 legacy tag.
1624 (scm_raprin1): Just call scm_iprin1.
1625 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1626 explicitly.
1627 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1628 Use scm_i_print_array as printer for scm_tc16_array.
1629
1630 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1631
1632 * ramap.c (cind): Changed second arg to be pointer to long instead
1633 of uniform vector.
1634 (scm_ramapc): Allocate index vector with scm_malloc and not as
1635 uniform vector. Wrap it in a frame so that it gets properly freed.
1636 (scm_array_index_map_x): Likewise.
1637
1638 * unif.c: Changed all uses of scm_array_prototype to
1639 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1640 prototype is known.
1641 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1642 in terms of scm_uniform_vector_read_x and
1643 scm_uniform_vector_write, respectively. Strings and
1644 bitvector support has been dropped.
1645
1646 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1647 needed files directly. Include config.h, <unistd.h> and <io.h>
1648 when available.
1649 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1650
1651 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1652
1653 * gh_data.c (gh_uniform_vector_length): Properly use
1654 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1655
1656 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1657
1658 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1659 New.
1660 (scm_i_uniform_vector_creator): Removed.
1661 (scm_i_generalized_vector_creator): New.
1662 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1663 handle generalized vectors, only uniform numeric vectors.
1664 (alloc_uvec): Do length check here...
1665 (make_uvec): ...but not here.
1666 (coerce_to_uvec): Use new generalized vector functions to handle
1667 all kinds of vectors in one go.
1668
1669 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1670 remaining scm_tc7_unused tags to get a neatly ordered list.
1671
1672 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1673 longer handle scm_tc7_bvect bitvectors.
1674
1675 * ramap.c: Use the new generalized vector functions to handle all
1676 vector like things.
1677
1678 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1679 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1680 scm_generalized_vector_length, scm_generalized_vector_ref,
1681 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1682 scm_is_generalized_vector, scm_c_generalized_vector_length,
1683 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1684 New.
1685
1686 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1687 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1688 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1689 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1690 scm_c_bitvector_length, scm_c_bitvector_ref,
1691 scm_c_bitvector_set_x, scm_bitvector_elements,
1692 scm_bitvector_release, scm_frame_bitvector_release,
1693 scm_tc16_bitvector, bitvector_free, bitvector_print,
1694 bitvector_equalp, count_ones, find_first_one): New.
1695 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1696 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1697 using the new C API for bitvectors and maybe count_ones or
1698 find_first_one, as appropriate.
1699 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1700 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1701 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1702 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1703 new functions from above.
1704 (scm_i_proc_make_vector, scm_i_proc_make_string,
1705 scm_i_proc_make_bitvector): Made non-static for use in
1706 scm_i_generalized_vector_creator.
1707 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1708 (scm_make_uve): Validate that the created object is a generalized
1709 vector.
1710 (scm_i_legacy_tag): Removed.
1711 (scm_i_print_array): Do it here.
1712 (scm_raprin1): Only print enclosed arrays.
1713
1714 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1715
1716 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1717
1718 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1719 added portability.
1720
1721 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1722 for "space". Thanks to Bruce Korb!
1723
1724 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1725 only after dest has been set. Thanks to Hyper Division!
1726
1727 * gh_data.c (gh_uniform_vector_length): Use
1728 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1729
1730 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1731
1732 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1733 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1734 SCM_SET_UVECTOR_LENGTH): Removed.
1735
1736 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1737
1738 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1739 Thanks!
1740
1741 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1742 first and the second line of the SCM_DEFINE macro call, since old
1743 preprocessors cannot handle definitions that are split into two
1744 lines.
1745
1746 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1747 declarations.
1748
1749 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1750 scm_t_uint32 to fix the mismatch between the function declaration
1751 and definition.
1752
1753 * sort.c (quicksort): Don't use C99 variable declarations.
1754
1755 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1756 SCM_BOOL_F if no type matches.
1757
1758 * threads.c (thread_print): Cast a pointer to size_t when printing
1759 with scm_uintprint.
1760
1761 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1762 defined.
1763 (scm_array_prototype): Deprecated.
1764
1765 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1766
1767 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1768 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1769 more efficient access to the u32vector.
1770
1771 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1772 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1773 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1774
1775 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1776 instead of the old-style dvectors.
1777
1778 * gh_data.c: Use new-style uniform arrays in place of old-style
1779 ones.
1780
1781 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1782 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1783
1784 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1785 instead of old-sytle uvectors.
1786
1787 * convert.c, convert.i.c: Rewritten completely, using
1788 scm_any_to_u8vector, etc and other new-style uniform vector
1789 functions.
1790
1791 * random.c (scm_random_solid_sphere_x,
1792 scm_random_hollow_sphere_x): Do not validate vector argument, this
1793 is already done elsewhere.
1794
1795 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1796 scm_any_to_u8vector, etc): New.
1797 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1798 longer handle old-style uniform vectors.
1799
1800 * read.c (scm_lreadr): Bugfix: include the last bit in the
1801 bit vector.
1802
1803 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1804
1805 * unif.h, unif.c (scm_array_creator): New.
1806 (scm_i_get_old_prototype): New.
1807 (scm_array_prototype): use it to return old-style prototype, never
1808 return creators.
1809 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1810 arg of SCM_UNDEFINED. The latter is wrong.
1811
1812 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1813 (make_uve): Removed.
1814 (scm_i_proc_make_vector, scm_i_proc_make_string,
1815 scm_i_proc_make_u1vector): New.
1816 (scm_init_unif): Initialize them.
1817 (scm_i_convert_old_prototype): New.
1818 (scm_make_uve): Use it to get the creator procedure. Removed all
1819 old code that created old-style uniform vectors.
1820 (scm_array_p): Handle generic vectors.
1821 (scm_dimensions_to_uniform_array): Do not fill new array with
1822 prototype when that is a procedure.
1823 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1824 the NDIM argument.
1825 (scm_i_print_array): Print rank for shared or non-zero-origin
1826 vectors.
1827 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1828 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1829 which I do not understand yet.
1830 (scm_array_prototype): Explicitely handle generic vectors.
1831
1832 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1833 (iflo2str): Use icmplx2str for complex numbers.
1834
1835 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1836 scm_i_uniform_vector_prototype): Removed.
1837 (scm_i_uniform_vector_creator): New.
1838 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1839 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1840 Updated all tables and generic functions to support them.
1841 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1842 (scm_init_srfi_4): Initialize them.
1843
1844 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1845 sizeof(CTYPE) as explained in the comment.
1846
1847 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1848 following '#' that can start an array. Explicitely disambiguate
1849 'i' and 'e' between introducing numbers and uniform vectors. Do
1850 not call scm_i_read_homogenous_vector, since that is also handled
1851 by scm_i_read_array now.
1852
1853 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1854
1855 First cut at integrating uniform vectors from srfi-4 with the rest
1856 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1857 vector. The plan is to gradually replace one type after the other
1858 until none is left and then to consider general cleanups and
1859 optimizations.
1860
1861 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1862
1863 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1864 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1865 scm_uniform_vector_to_list, scm_is_uniform_vector,
1866 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1867 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1868 scm_uniform_vector_release): New.
1869 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1870 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1871 from unif.h, unif.c and extended to handle both the old and new
1872 uniform vectors.
1873
1874 * tags.h (scm_tc7_byvect): Commented out.
1875
1876 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1877 the former to the latter.
1878 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1879 srfi-4.h, srfi-4.c.
1880 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1881 (scm_array_p, scm_array_rank, scm_array_dimensions,
1882 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1883 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1884 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1885 vectors. Removed code for scm_tc7_byvect.
1886 (scm_dimensions_to_uniform_array): Fill array with 0 when
1887 prototype is #\nul.
1888 (scm_i_print_array_dimension, scm_i_legacy_tag,
1889 scm_i_print_array): New.
1890 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1891 for scm_tc7_byvect.
1892
1893 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1894 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1895 uniform vectors. Removed code for scm_tc7_byvect
1896
1897 * print.c (iprin1): Removed code for scm_tc7_byvect.
1898 * objects.c (scm_class_of): Likewise.
1899 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1900 * gc-card.c (scm_i_sweep_card): Likewise.
1901 * evalext.c (scm_self_evaluating_p): Likewise.
1902 * eq.c (scm_equal_p): Likewise.
1903
1904 * gh_data.c (gh_chars2byvect): Reimplemented with
1905 scm_make_s8vector.
1906 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1907
1908 * srfi-4.c (take_uvec): New.
1909 (alloc_uvec): Use it.
1910 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1911
1912 * random.c (vector_scale, vector_scale_x): Renamed former to the
1913 latter, since it modifies its argument.
1914 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1915 Do not use scm_universal_vector_length for non-uniform vectors.
1916 Use scm_f64vector_elements to access innards of uniform vectors.
1917
1918 * convert.i.c: Convert srfi-4 style uniform vectors when
1919 requested.
1920 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1921 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1922
1923 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1924
1925 * numbers.h, numbers.c (scm_i_print_double): New.
1926
1927 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1928 ../srfi/ but heavily modified.
1929 * Makefile.am: Add them in all the right places.
1930 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1931 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1932 '#u', and '#s'.
1933
1934 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1935 and made non-static. Changed all uses.
1936
1937 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1938
1939 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1940 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1941 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1942 scm_uintprint to print unsigned integers, raw heap words, and
1943 adresses, using a cast to scm_t_bits to turn pointers into
1944 integers.
1945
1946 * unif.c: Include "libguile/print.h".
1947
1948 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1949 scm_t_intmax values.
1950 (scm_uint2str): New, for scm_t_uintmax.
1951 (scm_iint2str): Argument type changed to scm_t_intmax,
1952 reimplemented in terms of scm_uint2str.
1953
1954 * print.c, print.h (scm_uintprint): New, for printing
1955 scm_t_uintmax values.
1956 (scm_intprint): Argument type changed to scm_t_intmax.
1957
1958 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1959 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1960 strategic places so that the loops can be interrupted.
1961
1962 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1963 "-I$(top_srcdir)/libguile-ltdl".
1964 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1965 "../libguile-ltdl/libguile-ltdl.a".
1966
1967 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1968 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1969 instead of <libguile-ltdl.h>.
1970
1971 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1972
1973 * sort.c (quicksort): Copy pivot out of the array while
1974 constructing the partitions; it could get overwritten otherwise.
1975 Because of the ultimate insertion sort, this bug did not cause
1976 quicksort to fail, it just put all the burdon on the insertion
1977 sort and was thus very slow. Thanks to Rolan Orre for reporting
1978 the slowness!
1979
1980 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1981
1982 * numbers.c (scm_i_range_error): New.
1983 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1984 scm_out_of_range.
1985
1986 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1987 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1988
1989 * unif.c (scm_array_p): When no prototype is given, explicitely
1990 test for allowable types, do not simply return true. Thanks to
1991 Roland Orre for reporting this!
1992
1993 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1994
1995 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1996 segment to scm_max_segment_size.
1997
1998 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1999
2000 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
2001
2002 * inline.h (scm_double_cell): abort if GC running.
2003 (scm_cell): idem.
2004
2005 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2006
2007 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
2008 pos == 0.
2009
2010 Keywords no longer store a 'dash symbol'. Instead, they store a
2011 symbol with their real name.
2012
2013 * keywords.h, keywords.c, deprecated.h, deprecated.c
2014 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
2015 terms of scm_is_keyword and scm_keyword_dash_symbol.
2016
2017 * keywords.h, keywords.c, discouraged.h, discouraged.c
2018 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
2019 scm_c_make_keyword): Discouraged.
2020
2021 * keywords.h, keywords.c (scm_symbol_to_keyword,
2022 scm_keyword_to_symbol): Implemented in C.
2023 (scm_is_keyword, scm_from_locale_keyword,
2024 scm_from_locale_keywordn): New.
2025
2026 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
2027
2028 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
2029 scm_from_locale_keyword instead of scm_c_make_keyword.
2030
2031 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
2032 better error message.
2033
2034 * deprecated.c: Include discouraged.h and keywords.h.
2035
2036 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
2037 reading '#:' or ':'. See NEWS for consequences.
2038
2039 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2040
2041 * read.c (scm_lreadr): Revert change from 2004-09-22: string
2042 literals are now read-write again (until SCM_STRING_CHARS is
2043 removed).
2044
2045 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
2046 strings with an error message that blames SCM_STRING_CHARS.
2047
2048 * options.c (change_option_setting): Use scm_car instead of
2049 explicit type check plus SCM_CAR.
2050
2051 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
2052 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
2053 (scm_iprin1): Use them instead of the previoulsy hardcoded
2054 strings.
2055 (scm_init_print): Initialize them.
2056
2057 * backtrace.c (display_frame_expr): Do not remove control
2058 characters from the final string. Print it directly using
2059 scm_display.
2060
2061 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
2062 Thanks to Roland Orre!
2063
2064 2004-09-29 Kevin Ryde <user42@zip.com.au>
2065
2066 * regex-posix.c (scm_regexp_exec): Correction to last change, should
2067 be whole original string in match struct, not offsetted substring.
2068
2069 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
2070
2071 * gc.c (scm_gc_unprotect_object): abort if called during GC.
2072
2073 2004-09-24 Marius Vollmer <mvo@zagadka.de>
2074
2075 * Makefile.am (EXTRA_DIST): Added gettext.h.
2076
2077 * smob.c, smob.h (scm_assert_smob_type): New.
2078
2079 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
2080 Include GUILE_CFLAGS.
2081 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
2082 now.
2083 (libpath.h): Put GUILE_CFLAGS in the build-info.
2084
2085 2004-09-23 Marius Vollmer <mvo@zagadka.de>
2086
2087 * print.h (scm_print_state): Added highlight_objects.
2088 * print.c (make_print_state, scm_free_print_state): Initialize it
2089 to SCM_EOL.
2090 (scm_iprin1): Wrap output in '{...}' when object is contained in
2091 highlight_objects.
2092
2093 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
2094 scm_backtrace_with_highlights): New. Set highlight_objects of
2095 printstate.
2096
2097 * error.c (scm_error_scm): Document new meaning of data/rest
2098 argument for out-of-range and wrong-type-arg errors.
2099 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
2100 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
2101 exception so that it gets highlighted in the backtrace.
2102 Don't talk about "argument" when not giving a position.
2103
2104 * throw.c (handler_message): The rest argument is the fourth
2105 argument, not everything after the third. Call
2106 scm_display_backtrace_with_highlights, passing the rest argument
2107 when appropriate.
2108
2109 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2110
2111 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
2112 <bruno@clisp.org>:
2113
2114 * i18n.c: Handle --disable-nls (thanks Bruno).
2115
2116 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
2117 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
2118
2119 * i18n.c (scm_i_to_lc_category): New name and export. Support all
2120 LC categories.
2121 * posix.c (scm_setlocale): Use it.
2122
2123 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
2124 scm_bind_textdomain_codeset): Make wrappers similar to C function
2125 they wrap.
2126
2127 * i18n.h: New file.
2128 * i18n.c: New file.
2129 * gettext.h: New file, taken from GNU gettext.
2130 * init.c: Include libguile/i18n.h.
2131 (scm_init_guile_1): Add call to scm_init_i18n().
2132 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
2133 (DOT_X_FILES): Add i18n.x.
2134 (DOT_DOC_FILES): Add i18n.doc.
2135 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
2136 (modinclude_HEADERS): Add i18n.h.
2137
2138 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2139
2140 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
2141
2142 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
2143 discouraged.h. Replaced all uses with scm_is_pair.
2144 (SCM_I_CONSP): New name for SCM_CONSP.
2145
2146 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
2147 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
2148 scm_cadr, etc): New.
2149 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
2150 uses with scm_is_null.
2151
2152 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
2153 instead of explicit code.
2154
2155 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2156
2157 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2158 Reworded logic a bit so that #f is returned immediately when s1 is
2159 too short to contain s2.
2160
2161 * regex-posix.c (scm_regexp_exec): Convert string to
2162 zero-terminated locale string before matching against it.
2163
2164 * strings.h, strings.c (scm_substring_read_only,
2165 scm_c_substring_read_only, scm_i_substring_read_only): New.
2166 (RO_STRING_TAG, IS_RO_STRING): New.
2167 (scm_i_string_writable_chars): Bail on read-only strings.
2168
2169 * read.c (scm_lreadr): use scm_c_substring_read_only for string
2170 literals, thus making them read-only as specified by R5RS.
2171
2172 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2173
2174 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
2175 by testing for smobs before insisting on equal SCM_CELL_TYPES.
2176
2177 2004-09-21 Marius Vollmer <mvo@zagadka.de>
2178
2179 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
2180 numbers.c.
2181 (scm_to_mpz, scm_from_mpz): New.
2182 Thanks to Andreas Vögele!
2183
2184 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
2185 just on a line of its own.
2186
2187 * srfi-13.c (scm_string_any, scm_string_every,
2188 scm_string_tabulate, string_upcase_x, string_down_case_x,
2189 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
2190 size_t instead of int for indices into strings. Make sure that no
2191 over- or underflow occurs. Thanks to Andreas Vögele!
2192 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
2193 indices, which can also be negative.
2194
2195 2004-09-20 Marius Vollmer <mvo@zagadka.de>
2196
2197 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
2198
2199 * threads.c (scm_threads_mark_stacks): Call
2200 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
2201 only used once.
2202
2203 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
2204
2205 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2206 Bugfix: when subtracting unsigned values, make sure that result
2207 does not wrap.
2208
2209 2004-09-09 Kevin Ryde <user42@zip.com.au>
2210
2211 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
2212 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
2213 by Andreas Vögele.
2214
2215 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2216
2217 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
2218
2219 * eq.c (real_eqv): Pretend that all NaNs are equal.
2220
2221 * numbers.c (scm_integer_expt): Do not accept inexact integers.
2222
2223 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2224
2225 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
2226 use size_t for some locals instead of int.
2227
2228 * read.c (scm_flush_ws): Detect "#!"-style comments here.
2229 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
2230 (skip_scsh_block_comment): Use scm_input_error instead of
2231 scm_misc_error in case of EOF.
2232
2233 2004-09-07 Kevin Ryde <user42@zip.com.au>
2234
2235 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
2236 Bug report by Bill Schottstaedt.
2237
2238 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
2239 column.
2240 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
2241
2242 * posix.c (scm_access): Update docstring per manual.
2243
2244 * posix.c (scm_nice): Correction to error detection. Reported by
2245 Matthias Koeppe.
2246
2247 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
2248 throw error before unlocking mutex with SCM_ALLOW_INTS.
2249
2250 2004-09-06 Kevin Ryde <user42@zip.com.au>
2251
2252 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
2253 available. This also gets around CLK_TCK being absent when
2254 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
2255
2256 2004-09-03 Stefan Jahn <stefan@lkcc.org>
2257
2258 * threads.c (scm_threads_mark_stacks): Fixed local variable
2259 definitions.
2260
2261 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
2262 local variable definitions.
2263
2264 * stime.c (_POSIX_C_SOURCE): Do not define this item on
2265 MinGW32 because it conflicts with its pthread headers.
2266 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
2267 (scm_strftime): Using scm_from_locale_string() instead of
2268 scm_makfrom0str().
2269
2270 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
2271 part.
2272
2273 * numbers.c (scm_init_numbers): Removed check_sanity() call
2274 inside GUILE_DEBUG. The function has been removed somewhen...
2275
2276 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
2277 MinGW32 because it conflicts with its pthread headers.
2278
2279 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2280
2281 * strings.c (SCM_STRINGP): Accept all strings.
2282 (SCM_STRING_CHARS): Reject shared substrings here.
2283
2284 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
2285 the Copyright years.
2286
2287 2004-08-27 Kevin Ryde <user42@zip.com.au>
2288
2289 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
2290 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
2291 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
2292
2293 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2294
2295 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
2296 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
2297 scm_i_symbol_is_interned, scm_i_mem2symbol,
2298 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
2299
2300 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2301
2302 * srfi-13.c: First cut at thread-safeness and proper use of
2303 scm_i_string_chars et al. Copious scm_remember_upto_heres have
2304 been inserted. Made sure that no internal string pointer is used
2305 across a SCM_TICK or a possible GC.
2306
2307 * script.c (scm_compile_shell_switches): Use
2308 scm_from_locale_string instead of scm_makfrom0str.
2309
2310 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
2311 always been.
2312
2313 2004-08-25 Marius Vollmer <mvo@zagadka.de>
2314
2315 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
2316 strop.c.
2317
2318 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
2319 * strop.h, strop.c: Removed, they are now empty.
2320 * Makefile.am: Updated for new and removed files.
2321
2322 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
2323 to scm_string_to_symbol.
2324
2325 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
2326 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
2327 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
2328 charset instead of libc functions.
2329
2330 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
2331 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
2332 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
2333 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
2334 instead of explicit code.
2335
2336 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
2337 "srfi-13.h" instead of "strop.h".
2338
2339 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
2340 scm_init_srfi_14. Do not call scm_init_strop.
2341
2342 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2343
2344 * numbers.c (scm_inf_p): Synced docstring back from manual.
2345
2346 2004-08-22 Marius Vollmer <mvo@zagadka.de>
2347
2348 * strings.c (get_str_buf_start): New helper function.
2349 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
2350 scm_i_string_char, scm_i_string_writable_chars): Use it.
2351 (scm_i_substring_copy): Make START argument optional for C
2352 callers, for upcoming SRFI-13 integration.
2353
2354 2004-08-21 Marius Vollmer <mvo@zagadka.de>
2355
2356 From Richard Todd, Thanks!
2357
2358 * script.c (scm_compile_shell_switches): added '-L' switch to add
2359 to the %load-path.
2360
2361 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2362
2363 * eval.c (unmemoize_exprs): When dropping internal body markers
2364 from the output during unmemoization, also drop those that are not
2365 immediately at the beginning of a body.
2366
2367 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2368
2369 * eval.c (scm_lookupcar1): Report "Variable used before given a
2370 value" insetad of an "Unbound" one for variables that are found
2371 but still contain SCM_UNDEFINED.
2372
2373 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2374 expects a null-terminated string in the locale encoding, but
2375 scm_i_string_writable_chars doesn't give that. Fixed by letting
2376 mkstemp modify a locale version of the tmpl argument and copying
2377 the result back into tmpl.
2378
2379 * strop.c (scm_substring_move_x): Store into str2, not str1.
2380
2381 2004-08-20 Kevin Ryde <user42@zip.com.au>
2382
2383 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2384 to modify the input string.
2385
2386 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2387
2388 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2389 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2390 scm_c_symbol_length.
2391
2392 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2393
2394 New string implementation, with copy-on-write strings and
2395 mutation-sharing substrings, and a new internal string API.
2396 Symbols can now share memory with strings.
2397
2398 * tags.h (scm_tc7_stringbuf): New tag.
2399
2400 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2401 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2402 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2403 uses.
2404 (scm_i_make_string, scm_c_make_string): New, to replace
2405 scm_allocate_string. Updated all uses.
2406 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2407 SCM_STRING_LENGTH): Deprecated.
2408 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2409 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2410 Discouraged. Replaced all uses with scm_from_locale_string or
2411 similar, as appropriate.
2412 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2413 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2414 scm_substring_shared, scm_substring_copy): New.
2415
2416 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2417 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2418 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2419 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2420 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2421 Deprecated.
2422 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2423 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2424 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2425 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2426 Updated all uses.
2427 (scm_gensym): Generate only the number suffix in the buffer, just
2428 string-append the prefix.
2429
2430 * error.c (scm_memory_error): Do not try to throw, just abort.
2431 Throwing will not work anyway.
2432
2433 * gh.h, gh-data.c (gh_set_substr): Made src const.
2434
2435 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2436 (scm_mode_bits): Use it.
2437 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2438 a vector normally and fill that instead of consing a list with a
2439 blocked GC.
2440
2441 * read.c (scm_i_casei_streq): New, for counted strings.
2442
2443 * threads.c (gc_section_count): Removed, thread-sleeping can not
2444 be nested.
2445 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2446 admin mutex so that we can be put to sleep by other threads while
2447 blocking on that mutex. Lock all the heap mutex of all threads,
2448 including ourselves.
2449 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2450 call scm_i_enter_guile.
2451 (scm_thread_mark_stacks): Expect all threads to be suspended.
2452
2453 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2454 scm_gc_mallocated, for now.
2455 (scm_init_storage): Initialize it.
2456 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2457
2458 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2459 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2460 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2461 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2462
2463 * strop.c (scm_string_copy): Use scm_c_substring to get a
2464 copy-on-write string.
2465
2466 2004-08-18 Kevin Ryde <user42@zip.com.au>
2467
2468 * arbiters.c (FETCH_STORE): New macro.
2469 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2470 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2471 scm_try_arbiter and scm_release_arbiter.
2472 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2473 for speed on i386, otherwise using mutex.
2474
2475 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2476 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2477 exact and inexact is #f.)
2478
2479 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2480 to get thread safety of scm_ttyname.
2481
2482 * ports.c (ttyname): Remove prototype, unused.
2483
2484 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2485 Reported by Michael Tuexen.
2486
2487 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2488
2489 * load.c (scm_init_load_path): Do not pass NULL to
2490 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2491 not set. Thanks to Bill Schottstaedt.
2492
2493 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2494
2495 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2496 locale strings instead of accessing their internals.
2497 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2498 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2499 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2500
2501 * simpos.c (scm_system): Convert SCM strings to locale strings
2502 instead of accessing their internals.
2503
2504 * script.c (scm_compile_shell_switches): Convert version to locale
2505 string before printing it.
2506
2507 * rdelim.c (scm_read_delimited_x): Avoid
2508 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2509 of scm_from_long for the returned number of read characters.
2510
2511 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2512 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2513
2514 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2515 Use them instead of SCM_SYSCALL when one or two strings need to be
2516 converted into locale strings.
2517 (my_rename): New, gathers platform dependent code for renaming.
2518 (scm_rename): Use it.
2519 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2520 strings instead of accessing their internals.
2521 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2522 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2523 SCM_STRING_LENGTH.
2524
2525 * extensions.c (load_extension): Convert lib and init to locale
2526 strings instead of accessing the internals directly.
2527 (scm_c_load_extension): Use scm_from_locale_string instead of
2528 scm_makfrom0str.
2529
2530 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2531 scm_fdes_to_port, but take mode bits directly instead of as a C
2532 string.
2533 (scm_i_fdes_to_port): Implement using above.
2534 (scm_open_file): Use scm_i_fdes_to_port together with
2535 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2536 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2537 with scm_i_mode_bits to avoid accessing internals of SCM string
2538 from C.
2539
2540 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2541 SCM string as argument.
2542
2543 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2544 bits directly instead of C string.
2545 (scm_void_port): Implement using above.
2546 (scm_sys_make_void_port): Use scm_i_void_port together with
2547 scm_i_mode_bits to avoid accessing internals of SCM string.
2548
2549 * strings.h, strings.c (scm_i_get_substring_spec): New.
2550
2551 * socket.c, rw.c, deprecated.h, validate.h
2552 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2553 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2554 scm_to_locale_string, etc.
2555 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2556 above, plus scm_i_get_substring_spec.
2557
2558 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2559 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2560 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2561 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2562 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2563 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2564 with more explicit scm_remember_upto_here_1, etc, or introduced
2565 them in the first place.
2566
2567 * posix.c (WITH_STRING): New helper macro. Use it where one
2568 locale string is needed for a short piece of code.
2569 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2570 when one locale string is needed.
2571 (scm_mkstemp): Convert tmpl to a locale string.
2572 (scm_putenv): Rewritten to use only C strings.
2573 (scm_setlocale, scm_crpt): Convert argument strings to locale
2574 strings.
2575
2576 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2577
2578 * load.c (scm_primitive_load_path): Do not check for absolute
2579 filenames when scm_sys_search_load_path returns false, which will
2580 return absolute filenames unchanged.
2581
2582 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2583
2584 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2585 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2586 of an alist. Thanks to Matthias Koeppe!
2587
2588 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2589
2590 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2591 Moved from string.h to deprecated.h.
2592
2593 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2594
2595 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2596 SCM_I_MAKE_STRING_TAG, changed all uses.
2597 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2598 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2599 respectively. For a short time, the old names are still there as
2600 aliases. Not all uses have been changed yet, but the ones in
2601 strings.c have.
2602 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2603 SCM_T_BITS_MAX.
2604 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2605 scm_take_locale_string, scm_take_locale_stringn,
2606 scm_to_locale_string, scm_to_locale_stringn,
2607 scm_to_locale_stringbuf): New.
2608 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2609 deprecated.[hc]. Implemented in terms of the new functions above.
2610 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2611 scm_makfrom0str): Reimplemented in terms of the new functions from
2612 above. They will be discouraged shortly.
2613 (scm_substring): Do not use scm_mem2string.
2614 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2615 to replace similar code from posix.c, simpos.c, and dynl.c.
2616 (scm_string_append): Use memcpy instead of explicit loop. Do not
2617 use register keyword. Use plain 'char' instead of 'unsigned
2618 char'.
2619
2620 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2621 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2622
2623 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2624 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2625 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2626 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2627
2628 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2629 string. This avoids a conversion round-trip.
2630
2631 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2632 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2633 SCM_I_STRING_LENGTH, respectively.
2634 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2635
2636 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2637 of a string, call scm_display on the string itself.
2638
2639 * dynwind.c, dynwind.h (scm_frame_free): New.
2640
2641 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2642 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2643 Replaced uses of SCM_STRING_CHARS with proper uses of
2644 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2645 Replaced scm_mem2string with scm_from_locale_string.
2646
2647 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2648 Removed, replaced all uses with scm_i_allocate_string_pointers.
2649
2650 * load.h, load.c (scm_internal_parse_path): Removed.
2651 (scm_parse_path): Use scm_string_split to do the work.
2652 (scm_init_load_path): Use scm_parse_path instead of
2653 scm_internal_parse_path.
2654 (scm_search_path): Rewritten string handling part of the code in
2655 terms of scm_to_locale_stringbuf and so that it is thread safe.
2656
2657 * error.c (scm_error_scm): Throw directly instead of calling
2658 scm_error, this avoids the back and forth conversion of SUBR and
2659 MESSAGE and also plugs a memory leak.
2660 (scm_error): Call scm_error_scm.
2661
2662 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2663 (display_header): Print FNAME when it is true, not
2664 merely when it is a string.
2665
2666 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2667 unceremoniously. They were unused by Guile itself, and external
2668 use should stop immediately.
2669
2670
2671 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2672
2673 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2674 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2675 deprecated versions installed in deprecated.h and deprecated.c.
2676 Changed all uses.
2677
2678 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2679
2680 * net_db.c (scm_resolv_error): don't cause an exception while
2681 trying to throw an exception -- call scm_misc_error with correct
2682 arguments. The previous arguments needed a format escape that
2683 wasn't in any of the format strings.
2684
2685 2004-08-06 Kevin Ryde <user42@zip.com.au>
2686
2687 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2688 so as not to depend on signedness of plain char. For byvect range
2689 check, throw out-of-range rather than wrong-type-arg.
2690
2691 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2692 signed byte range checks by using scm_to_schar and scm_from_schar,
2693 don't want to depend on signedness of C char.
2694
2695 2004-08-05 Kevin Ryde <user42@zip.com.au>
2696
2697 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2698 SCM_DEFER_INTS.
2699 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2700 guaranteed if multiple threads compete to unlock.
2701 Update docstrings per doc/ref/api-scheduling.texi.
2702
2703 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2704 stat on the filename, to be certain a file rename can't mean we get
2705 info on one filesystem object but open another. This fstat usage is
2706 similar to Emacs copy-file.
2707
2708 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2709
2710 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2711 SIGINT and SIGQUIT, since those values are ints.
2712
2713 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2714
2715 * num2integral.i.c, num2float.i.c: Removed.
2716 * Makefile.am (noinst_HEADERS): Updated.
2717
2718 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2719 scm_i_make_ratio and made static, replaced uses with scm_divide.
2720 (scm_complex_p): New, export as "complex?" to Scheme.
2721 (scm_number_p): Export as "number?" to Scheme.
2722 (scm_is_complex, scm_is_number): New.
2723 (scm_c_make_rectangular, scm_c_make_polar): New.
2724 (scm_make_rectangular, scm_make_polar): Use above.
2725 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2726 New.
2727 (scm_make_complex): Discouraged by moving to discouraged.h and
2728 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2729
2730 * discouraged.h, discouraged.c, numbers.c, numbers.h
2731 (scm_is_rational): New.
2732 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2733 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2734 Removed prototypes.
2735 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2736 Discouraged by moving to discouraged.h and discouraged.c.
2737 Replaced all uses with scm_from_double.
2738 (scm_num2float, scm_num2double): Discouraged by moving prototype
2739 to discouraged.h and rewriting in terms of scm_to_double.
2740 Replaced all uses with scm_to_double.
2741 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2742 explicit code.
2743 (scm_from_double): Do not implement in terms of scm_make_real, use
2744 explicit code.
2745
2746 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2747
2748 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2749
2750 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2751 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2752
2753 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2754 Renamed to SCM_I_* in order to avoid collisions with the versions
2755 defined in deprecated.h.
2756
2757 * discouraged.h, discouraged.c: New files.
2758
2759 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2760 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2761 deprecated to being discouraged by moving to discouraged.h.
2762
2763 * numbers.h, numbers.c, discouraged.h, discouraged.c
2764 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2765 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2766 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2767 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2768 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2769 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2770 discouraged.c and reimplementing in terms of scm_from_* and
2771 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2772 functions.
2773
2774 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2775 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2776 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2777 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2778 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2779 explicit code.
2780
2781 2004-08-02 Kevin Ryde <user42@zip.com.au>
2782
2783 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2784 and current usage and migration.
2785
2786 2004-07-31 Kevin Ryde <user42@zip.com.au>
2787
2788 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2789 it's not thread safe.
2790 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2791 advantage of this.
2792 * fports.c (scm_open_file): Use scm_strerror likewise.
2793 * filesys.c (scm_stat, scm_lstat): Ditto.
2794
2795 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2796 cannot be opened.
2797
2798 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2799 update, for thread safety.
2800 (gensym_counter): Move into scm_gensym which is its only user.
2801 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2802
2803 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2804
2805 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2806 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2807 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2808 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2809 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2810 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2811 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2812 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2813 defined in terms of scm_to_signed_integer, etc, but in terms of
2814 scm_to_int8, etc.
2815
2816 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2817
2818 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2819 no longer used.
2820
2821 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2822 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2823
2824 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2825 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2826 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2827 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2828 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2829 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2830 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2831
2832 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2833 the functions below.
2834
2835 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2836 conv-uinteger.i.c.
2837
2838 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2839 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2840 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2841 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2842 scm_from_uint64): Turned from macros into proper functions.
2843 (scm_to_signed_integer, scm_to_unsigned_integer,
2844 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2845 conv-integer.i.c and conv-uinteger.i.c, as well.
2846
2847 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2848 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2849 the limits. Those are always defined.
2850
2851 2004-07-29 Kevin Ryde <user42@zip.com.au>
2852
2853 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2854
2855 2004-07-28 Kevin Ryde <user42@zip.com.au>
2856
2857 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2858 safety.
2859
2860 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2861 consistency with other vector types and to get arg and func name into
2862 error message.
2863
2864 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2865
2866 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2867 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2868 scm_from_bool, respectively.
2869 (SCM_NINUMP): Added.
2870
2871 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2872 deprecated.h. Replaced all uses with scm_is_eq.
2873
2874 2004-07-24 Kevin Ryde <user42@zip.com.au>
2875
2876 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2877 * posix.c (scm_crypt): Use it to protect static data in crypt().
2878
2879 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2880
2881 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2882 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2883 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2884 versions to deprecated.h and deprecated.c. Changed all uses to
2885 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2886 scm_from_*, as appropriate.
2887
2888 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2889 the unexisting scm_cross_dynwind_binding_scope for inums on the
2890 windlist.
2891
2892 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2893
2894 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2895 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2896 byte-wise address to a SCM integer. Changed all uses.
2897 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2898 scm_to_ipv6 and added type and range checking, for converting from
2899 an IPv& byte-wise address to a SCM integer. Changed all uses.
2900 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2901 is now done by scm_to_ipv6.
2902
2903 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2904 not accept inexact integers.
2905
2906 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2907 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2908 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2909 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2910 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2911 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2912 fixnum/bignum distinction visible. Changed all uses to
2913 scm_to_size_t or similar.
2914
2915 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2916
2917 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2918
2919 2004-07-10 Kevin Ryde <user42@zip.com.au>
2920
2921 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2922 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2923 such a size causes divide-by-zeros in scm_hasher.
2924
2925 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2926 leak.
2927
2928 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2929
2930 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2931 Rewritten using the same logic as scm_to_signed_integer and
2932 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2933 use CHAR_BIT instead of hardcoding 8.
2934 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2935 SCM_I_LLONG_MIN etc. instead.
2936
2937 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2938 SCM_I_MAKINUM and changed all uses.
2939 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2940
2941 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2942 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2943 them by assuming twos-complement.
2944
2945 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2946
2947 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2948 configure now produces.
2949 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2950 definitions, giving the limits of the integer types defined by
2951 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2952 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2953
2954 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2955 SHORT_MIN.
2956 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2957 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2958 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2959 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2960 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2961 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2962 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2963 scm_from_uintmax): New.
2964
2965 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2966
2967 * tags.h (scm_is_eq): New.
2968
2969 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2970 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2971 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2972 scm_from_bool, and scm_is_bool, respectively.
2973
2974 * boolean.h (scm_is_bool): Fix bug in prototype.
2975 (scm_from_bool): The argument is "x" not "f", stupid.
2976
2977 * boolean.c (scm_is_bool): Fix typo.
2978
2979 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2980 scm_is_unsigned_integer, scm_to_signed_integer,
2981 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2982 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2983 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2984 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2985 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2986 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2987 New.
2988
2989 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2990
2991 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2992 scm_to_bool): New.
2993
2994 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2995
2996 * backtrace.c (display_expression, display_frame): Call
2997 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2998 single memoized expression.
2999
3000 * debug.c (memoized_print): Don't try to unmemoize the memoized
3001 object, since we can't know whether it holds a single expression
3002 or a body.
3003
3004 (scm_mem_to_proc): Removed check for lambda expression, since it
3005 was moot anyway. Whoever uses these functions for debugging
3006 purposes should know what they do: Creating invalid memoized code
3007 will cause crashes, independent of whether this check is present
3008 or not.
3009
3010 (scm_proc_to_mem): Take the closure's code as it is and don't
3011 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
3012 memoized code should not be modified.
3013
3014 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
3015 scm_unmemoize from public use, but made scm_i_unmemoize_expr
3016 available as a guile internal function instead. However,
3017 scm_i_unmemoize_expr will only work on memoized objects that hold
3018 a single memoized expression. It won't work with bodies.
3019
3020 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
3021 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
3022 i. e. a list of expressions.
3023
3024 * eval.c (unmemoize_exprs): Drop internal body markers from the
3025 output during unmemoization.
3026
3027 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
3028 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
3029 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
3030 as guile internal functions instead. scm_i_unmemoize_expr will
3031 only work on a single memoized expression, while
3032 scm_i_unmemocopy_body will only work on bodies.
3033
3034 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3035
3036 * eval.c (unmemoize_exprs): Handle semi-memoized code.
3037
3038 (scm_cons_source, scm_primitive_eval): Prefer higher level
3039 predicate SCM_FALSEP over SCM_IMP.
3040
3041 2004-06-15 Rob Browning <rlb@defaultvalue.org>
3042
3043 * script.c (scm_shell_usage): minor phrasing change.
3044
3045 * gc_os_dep.c: update ifdefery for macosx.
3046 (scm_get_stack_base): separate result initialization from
3047 declaration to slience warnings with macosx and hp-ux using gcc
3048 3.3. Thanks to Andreas Vögele.
3049
3050 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
3051
3052 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
3053
3054 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3055
3056 * list.[ch] (scm_i_finite_list_copy): New internal function to
3057 copy lists that are known to be finite (though not necessarily
3058 proper).
3059
3060 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
3061 a closure's argument list like an expression of a body.
3062
3063 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
3064 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
3065 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
3066 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
3067 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
3068 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
3069 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
3070 unmemoize_builtin_macro): New static functions and symbols.
3071
3072 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
3073 now has a slightly different meaning: The memoized form that is
3074 receives as its argument is now interpreted as a sequence of
3075 expressions from a body.
3076
3077 (unmemocar, scm_unmemocar): Since the whole functionality of
3078 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
3079 has its old content back and is deprecated, while unmemocar has
3080 been removed.
3081
3082 (SCM_BIT7): Removed.
3083
3084 (CEVAL): For unmemoizing a single expression, call
3085 unmemoize_expression instead of scm_unmemocopy, which now expects
3086 a sequence of body expressions. Eliminated unnecessary empty
3087 environment frame when executing let* forms. Eliminated
3088 unmemoization step from evaluator.
3089
3090 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3091
3092 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
3093 macroexp and made static. Added new version of scm_macroexp that
3094 emits a deprecation warning and then calls macroexp.
3095 (scm_m_undefine): Issue deprecation warning.
3096
3097 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3098
3099 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
3100 Modified to make set! work on symbols that represent syntactic
3101 keywords.
3102
3103 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
3104
3105 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
3106 compound expression as lvalue errors.
3107
3108 2004-05-24 Marius Vollmer <mvo@zagadka.de>
3109
3110 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
3111 WINDER_DATA to a SCM.
3112
3113 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3114
3115 * goops.c (compute_getters_n_setters, create_standard_classes,
3116 scm_add_slot): Compute closures by calling scm_i_eval_x on a
3117 lambda expression rather than creating them with scm_closure.
3118
3119 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3120
3121 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
3122 misplaced syntactic keywords. This will not work unless guile's
3123 defmacro feature is deprecated.
3124
3125 (scm_m_case): Fixed a bug that caused the list of labels to grow
3126 with every case form.
3127
3128 2004-05-19 Kevin Ryde <user42@zip.com.au>
3129
3130 * numbers.c (scm_round_number): For inum and big, just return x. For
3131 real, use scm_round for 2^54-1 etc problems covered there.
3132
3133 * numbers.c (trunc): Remove #define to scm_truncate when the C library
3134 doesn't provide trunc. This was for when `truncate' was done as a
3135 scm_tc7_dsubr, no longer required.
3136
3137 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
3138 to stack marking call, two parameters and no cast on t->base.
3139
3140 2004-05-18 Marius Vollmer <mvo@zagadka.de>
3141
3142 * hashtab.c (rehash_after_gc): Bug fix: properly link the
3143 processed hashtables back into the weak_hashtables list. Thanks
3144 to Bill Schottstaedt!
3145
3146 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3147
3148 * eval.c (unmemoize_quote): New static function.
3149
3150 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
3151 representation of 'quote' and '@slot-ref' to an improper list.
3152 This reduces execution time, the number of cells used to hold the
3153 memoized code, and thus also reduces garbage collection time.
3154
3155 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
3156
3157 (SCM_CEVAL): Changed macro handling to also work with macros that
3158 return improper lists. Added an assertion, that the code returned
3159 by a macro transformer will not lead to cycles in the memoized
3160 code.
3161
3162 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3163
3164 No functional change, just rearrangements of functions within the
3165 file.
3166
3167 * eval.c (scm_ilookup, scm_unbound_variable_key,
3168 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
3169 the definitions used for execution, since that's where they will
3170 belong to later.
3171
3172 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3173
3174 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
3175 throughout guile, has not been part of an official release yet,
3176 and the concept of sloppy predicates has never been a good idea.
3177
3178 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
3179 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
3180 Simplified.
3181
3182 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3183
3184 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
3185 to make explicit what happens.
3186
3187 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3188
3189 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
3190 explicit what happens.
3191
3192 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
3193 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
3194
3195 2004-05-11 Marius Vollmer <mvo@zagadka.de>
3196
3197 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
3198 is indeed a procedure when it isn't a number.
3199
3200 2004-05-10 Marius Vollmer <mvo@zagadka.de>
3201
3202 Convert floating point numbers into strings with an arbitrary
3203 radix. Thanks to Richard Todd!
3204
3205 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
3206 fit.
3207 (fx): Removed.
3208 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
3209 number_chars): New, to support variable radices.
3210 (idbl2str): Use above instead of the old base-10 only tables.
3211 (iflo2str): Pass on new RADIX argument to idbl2str.
3212 (scm_number_to_string): Pass radix to iflo2str.
3213 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
3214 iflo2str.
3215 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
3216 possible radices.
3217
3218 2004-05-10 Kevin Ryde <user42@zip.com.au>
3219
3220 * numbers.c (scm_logbit_p): Correction to test above the end of an
3221 inum. Reported by Jan Konecny.
3222
3223 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3224
3225 * gc.h (scm_t_cell): Fields are now of type SCM instead of
3226 scm_t_bits. Updated all users.
3227 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
3228 duplicating the code.
3229 (SCM_CELL_OBJECT_LOC): New.
3230 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
3231 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
3232
3233 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
3234 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
3235 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
3236 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
3237 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
3238 SCM_SMOB_OBJECT_3_LOC): New.
3239 * smob.c (scm_i_set_smob_flags): New function.
3240
3241 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
3242 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
3243 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
3244 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
3245 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
3246 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
3247
3248 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
3249 taking the address of SCM_CELL_WORD_1, the latter being no longer
3250 an lvalue.
3251
3252 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
3253 of casting SCM_CELL_WORD_LOC.
3254
3255 2004-05-02 Kevin Ryde <user42@zip.com.au>
3256
3257 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
3258 --disable-deprecated. Reported by Andreas Vögele.
3259
3260 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
3261 particular on HP-UX). Reported by Andreas Vögele.
3262
3263 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
3264 code has support for. Fixes building with AIX cc, which is ansi but
3265 doesn't define __STDC__. Reported by Keith Crane.
3266 (var_start): Remove macro, this variation no longer required.
3267 (scm_list_n): Use va_start directly.
3268
3269 2004-05-01 Kevin Ryde <user42@zip.com.au>
3270
3271 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
3272 is now gone. Reported by Andreas Vögele.
3273
3274 2004-04-28 Kevin Ryde <user42@zip.com.au>
3275
3276 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
3277 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
3278 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
3279 subscript. Reported by Andreas Vögele.
3280 Also cast through unsigned char to avoid passing negatives to those
3281 macros if input contains 8-bit values.
3282
3283 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
3284 corrections to range check for signed numbers. Remove
3285 scm_remember_upto_here_1(num) from these checks, since num is used
3286 subsequently anyway.
3287
3288 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
3289 avoid warning from gcc 3.4. Reported by Hyperdivision.
3290
3291 * numbers.c (scm_bit_extract): Use min instead of MIN.
3292 (MIN): Remove, this conflicts with similar macro defined by limits.h
3293 on HP-UX. Reported by Andreas Vögele.
3294
3295 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
3296 particular on HP-UX). Reported by Andreas Vögele.
3297
3298 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
3299 Reported by Andreas Vögele.
3300
3301 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
3302 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
3303 by Andreas Vögele.
3304
3305 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3306
3307 * eval.c (s_macro_keyword): New static identifier.
3308
3309 (scm_m_define): Change order to first create binding and
3310 evaluating the expression afterwards.
3311
3312 (scm_m_set_x): Memoize complete set! expression. Only leave
3313 symbols if no binding exists at memoization time. Throw error if
3314 assigning to a syntactic keyword.
3315
3316 (lazy_memoize_variable): New function.
3317
3318 (CEVAL): When execution set!, perform lazy memoization if
3319 unmemoized symbol is detected.
3320
3321 * modules.c (module_variable): Return variables with unbound
3322 value.
3323
3324 * tags.h: Fix comment.
3325
3326 2004-04-25 Kevin Ryde <user42@zip.com.au>
3327
3328 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
3329 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
3330 in 8-bit locales, and ensures consistency with char-upper-case? and
3331 char-lower-case? which already use ctype.h.
3332 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
3333 Remove.
3334 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
3335
3336 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
3337 call. Reported by Hyperdivision.
3338
3339 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
3340 Reported by Hyperdivision.
3341
3342 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
3343 Hyperdivision.
3344
3345 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3346
3347 Hide the implementation of ilocs and isyms in eval.c.
3348
3349 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3350 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3351 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
3352 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
3353 eval.h to eval.c.
3354
3355 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
3356 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
3357 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
3358 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
3359 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
3360 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
3361 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
3362 renamed to ISYMNUM.
3363
3364 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
3365 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
3366 Extracted printing of ilocs and isyms to guile internal functions
3367 scm_i_print_iloc, scm_i_print_isym of eval.c.
3368
3369 2004-04-22 Kevin Ryde <user42@zip.com.au>
3370
3371 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3372
3373 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3374 rounding in x+0.5 when x is a big value already an integer. In
3375 certain hardware rounding cases x+0.5 can give an adjacent integer,
3376 leading to that as the result, when we really just wanted x itself.
3377
3378 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3379
3380 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3381
3382 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3383 added const qualifiers, cast intentionally unused expressions to
3384 void for emphasis, improved comment.
3385
3386 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3387
3388 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3389 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3390 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3391 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3392 Defined the tc8-tag for flags to be 0x04, which will mean that
3393 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3394 to the reduced number of bits and the simpler bit pattern for
3395 SCM_BOOL_F, certain machines may be able to use more efficient
3396 processor instructions to deal with SCM_BOOL_F.
3397
3398 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3399 never been defined in a released version, thus no need to
3400 deprecate them.
3401
3402 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3403 instead of tc9 tags.
3404
3405 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3406 of tc9 tags.
3407
3408 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3409 could have used this definition.
3410
3411 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3412 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3413 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3414 as isyms, as special isyms don't exist any more.
3415
3416 2004-04-18 Kevin Ryde <user42@zip.com.au>
3417
3418 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3419 safety.
3420
3421 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3422 explicit swapping code.
3423
3424 2004-04-15 Kevin Ryde <user42@zip.com.au>
3425
3426 * cpp_sig_symbols.in: Add SIGSYS.
3427
3428 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3429 recursion.
3430
3431 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3432 frac/big and frac/frac, use scm_less_p for exact comparison.
3433
3434 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3435 with big/inum.
3436
3437 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3438
3439 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3440
3441 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3442
3443 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3444 scm_c_{up,down}case.
3445 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3446 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3447
3448 2004-04-06 Kevin Ryde <user42@zip.com.au>
3449
3450 * numbers.c (scm_ash): Remove stray "}" in docstring.
3451
3452 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3453 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3454 calling mpz_cmp_ui in most cases.
3455
3456 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3457 for big == abs(most-negative-fixnum) special case.
3458 (abs_most_negative_fixnum): Remove, no longer used.
3459
3460 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3461 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3462 calling (sigaction NSIG).
3463
3464 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3465 and fork error cases to do this.
3466
3467 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3468
3469 * eval.c (CEVAL): Don't distinguish between short and long
3470 instructions when dispatching - just always dispatch on the
3471 instruction code, which is common for short and long instructions.
3472 Further, removed unnecessary goto statements and added comment.
3473
3474 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3475
3476 * eval.c (scm_unmemocopy): Don't distinguish between short and
3477 long instructions when dispatching - just always dispatch on the
3478 instruction code, which is common for short and long instructions.
3479 Further, removed unnecessary goto statements, fixed indentation
3480 and replaced SCM_IMP predicates by SCM_NULLP.
3481
3482 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3483
3484 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3485 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3486 'checkmacro'.
3487
3488 2004-03-31 Kevin Ryde <user42@zip.com.au>
3489
3490 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3491
3492 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3493
3494 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3495 SCM_DEBUGGINGP:
3496
3497 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3498 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3499 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3500 single interface that also matches the naming conventions.
3501 Probably scm_debug_mode_p should be part of the private interface
3502 anyway.
3503
3504 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3505 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3506 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3507 to scm_debug_mode_p.
3508
3509
3510 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3511
3512 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3513 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3514 from debug.h to eval.h.
3515
3516 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3517 more, just leave it with setting scm_debug_mode_p, which is
3518 equivalent for practical purposes.
3519
3520 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3521 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3522
3523 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3524
3525 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3526 static and renamed it to ceval throughout. Provide a new exported
3527 but deprecated function scm_ceval as a wrapper for backwards
3528 compatibility. The same is done for the deval/scm_deval pair of
3529 functions.
3530
3531 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3532 throughout. Defined CEVAL to ceval or deval, based on compilation
3533 phase.
3534
3535 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3536 to ceval and deval instead of calling *scm_ceval_ptr.
3537
3538 * eval.c (dispatching_eval): New deprecated static function.
3539
3540 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3541 to emulate its old behaviour as closely as possible.
3542
3543
3544 Change the evaluator such that only expressions for which pair? is
3545 true are passed to CEVAL, and such that all other expressions are
3546 evaluated outside of CEVAL:
3547
3548 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3549 expression that is assumed to be memoized already. All but
3550 expressions of the form '(<form> <form> ...)' are evaluated inline
3551 without calling an evaluator.
3552
3553 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3554 expressions of the form '(<form> <form> ...)' inline without
3555 calling an evaluator.
3556
3557 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3558 the special case of unmemoized symbols passed on the top level.
3559
3560 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3561 is known that the expression passed to CEVAL is of the form
3562 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3563 now it is known that the input expression of CEVAL is a pair.
3564
3565 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3566
3567 * eval.c (is_self_quoting_p): New static function.
3568
3569 (scm_m_quote): Use is_self_quoting_p.
3570
3571 (copy_tree): Corrected typo in comment.
3572
3573 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3574
3575 * eval.c (s_scm_copy_tree): idem.
3576
3577 * list.c (s_scm_filter): remove "pointer" from doc string.
3578
3579 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3580
3581 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3582
3583 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3584 (display_frame): idem.
3585 (display_backtrace_file_and_line): idem.
3586
3587 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3588 arguments.
3589
3590 2004-03-26 Kevin Ryde <user42@zip.com.au>
3591
3592 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3593
3594 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3595 big==0 since that never occurs.
3596
3597 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3598 scm_modular_expt, matching scheme level name `modulo-expt'.
3599
3600 * numbers.c (scm_modular_expt): Return a negative remainder for a
3601 negative divisor, the same as `modulo' does.
3602
3603 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3604
3605 * numbers.c, numbers.h (scm_modular_expt): New function.
3606
3607 2004-03-25 Kevin Ryde <user42@zip.com.au>
3608
3609 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3610 return inexact as required by r5rs.
3611
3612 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3613
3614 * eval.c: Separated some definitions relevant for execution from
3615 the memoization part of the file.
3616
3617 (copy_tree): New static function
3618
3619 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3620 structures are detected now and will lead to an exception instead
3621 of forcing guile to run in an endless loop, using up all the
3622 system's memory. Second, arrays in the cdr of an improper list
3623 are now copied. See the new test cases in eval.test.
3624
3625 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3626
3627 * posix.c (scm_gethostname): Make sure len is initialised before
3628 it is used. Restructured to (hopefully) represent possible
3629 configurations more clearly in the code. Added unwind handler.
3630
3631 2004-03-23 Kevin Ryde <user42@zip.com.au>
3632
3633 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3634 MAXHOSTNAMELEN when available.
3635
3636 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3637
3638 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3639 terminator. Rewritten the logic as a state machine, I must have
3640 been doing too much VHDL lately...
3641
3642 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3643 themselves. Thanks to Han-Wen Nienhuys!
3644
3645 * list.c: Changed docstrings so that they no longer talk about
3646 returning 'pointers' to something.
3647
3648 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3649
3650 * gc.c: remove set_debug_cell_accesses! when
3651 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3652 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3653 debugging conditionally.
3654
3655 2004-03-21 Kevin Ryde <user42@zip.com.au>
3656
3657 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3658
3659 2004-03-20 Kevin Ryde <user42@zip.com.au>
3660
3661 * posix.c (scm_gethostname): Preserve errno across free() call.
3662
3663 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3664
3665 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3666 free cells.
3667
3668 2004-03-14 Kevin Ryde <user42@zip.com.au>
3669
3670 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3671 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3672
3673 2004-03-07 Kevin Ryde <user42@zip.com.au>
3674
3675 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3676 than "GMT" always.
3677 (filltime): Make zname parameter "const".
3678
3679 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3680
3681 * threads.c, threads.h (scm_c_scm2thread): New function.
3682
3683 2004-02-29 Kevin Ryde <user42@zip.com.au>
3684
3685 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3686 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3687 particular don't assume "defined (__alpha__) && ! defined (linux)"
3688 means OSF. Remove "SCO" code, which was not really SCO specific and
3689 which John W. Eaton advises should be long past being needed.
3690
3691 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3692 error throw.
3693
3694 2004-02-24 Kevin Ryde <user42@zip.com.au>
3695
3696 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3697
3698 2004-02-22 Kevin Ryde <user42@zip.com.au>
3699
3700 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3701 complex, same as for two args. (Handle only inum, big, real, frac).
3702
3703 2004-02-21 Kevin Ryde <user42@zip.com.au>
3704
3705 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3706 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3707 Reported by Andreas Voegele.
3708
3709 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3710
3711 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3712 validation.
3713
3714 * read.c (scm_lreadparen): Removed.
3715 (scm_lreadparen1): Renamed scm_i_lreadparen.
3716
3717 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3718
3719 * list.c (scm_list_n): validate non-immediate arguments;
3720 this will catch forgotten a SCM_UNDEFINED.
3721
3722 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3723
3724 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3725 Thanks to Bill Schottstaedt!
3726
3727 * socket.h (scm_gethost): Removed prototype it is already in
3728 "net_db.h". Thanks to Bill Schottstaedt!
3729
3730 2004-02-18 Kevin Ryde <user42@zip.com.au>
3731
3732 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3733 order parameter to mpz_import, in fact with just one word there's no
3734 order to worry about at all.
3735
3736 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3737 and frac==complex, make an exact comparison rather than converting
3738 with fraction2double.
3739
3740 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3741 shared library, since environ is not directly available there.
3742
3743 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3744 standard.
3745
3746 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3747 errno EINVAL in case localtime and gmtime don't set it.
3748 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3749 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3750
3751 2004-02-16 Kevin Ryde <kevin@swox.se>
3752
3753 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3754 which were permitted in the past for these.
3755
3756 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3757 previous change to numbers.c.
3758
3759 * script.c (scm_shell_usage): Print bug-guile email address, as per
3760 GNU standard. Reported by Han-Wen Nienhuys.
3761
3762 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3763
3764 * unif.c (scm_make_uve): Removed local variable and simplified
3765 code in order to avoid compiler used uninitialized warnings.
3766
3767 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3768 scm_hash_map.
3769 (scm_hash_fold): Use scm_call_3 directly in the call to
3770 scm_internal_hash_fold instead of going via fold_proc (which is
3771 now removed).
3772 (scm_hash_for_each): Use a trampoline +
3773 scm_internal_hash_for_each_handle.
3774 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3775 functions.
3776
3777 2004-02-12 Kevin Ryde <user42@zip.com.au>
3778
3779 * ports.c (scm_port_line): In docstring, note first line is 0.
3780 (scm_set_port_line_x): In docstring, note first line is 0.
3781 (scm_port_column): In docstring, there's no default to current input
3782 port, and remove shared port-line @defun.
3783 (scm_set_port_column_x): In docstring, there's no default to current
3784 input port, note first column is 0, remove shared set-port-line!
3785 @defun.
3786
3787 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3788 convert args the same way that array-set! does.
3789
3790 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3791 for dvect.
3792 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3793 for "l" not "s", fix dvect to be false for singp(prot) since such a
3794 value is for fvect.
3795 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3796 (exactly_one_third): New variable.
3797 (scm_init_unif): Initialize it.
3798
3799 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3800
3801 * read.c (scm_read_opts): Change `escaped-parens' to
3802 `elisp-strings'.
3803
3804 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3805
3806 * read.c (scm_read_opts): New opts `elisp-vectors' and
3807 `escaped-parens'.
3808 (s_vector): New.
3809 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3810 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3811 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3812 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3813 `escaped-parens' option set.
3814 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3815 in tokens.
3816 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3817 (scm_lreadparen1): New.
3818
3819 * read.h: Remove conditionally compiled last arg to
3820 scm_lreadparen.
3821 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3822
3823 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3824
3825 * eval.c (m_expand_body): remove stray variable new_body.
3826
3827 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3828
3829 * eval.c (m_expand_body): Rewrite the expression in place (by
3830 overwriting FORMS) also when a letrec is constructed, not only
3831 when no definitions are found. Do not return rewritten expression
3832 to emphasize the in-place rewriting. Changed all users.
3833
3834 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3835
3836 * gc.c: add protected_object_count, a number that is dumped from
3837 gc_stats()
3838
3839 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3840
3841 * dynwind.h, dynwind.c (scm_frame_unwind,
3842 scm_frame_unwind_handler): Renamed and changed all uses.
3843 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3844
3845 2004-01-11 Kevin Ryde <user42@zip.com.au>
3846
3847 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3848 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3849 changes made to scheme-compound.texi.
3850
3851 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3852
3853 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3854 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3855
3856 * guile-snarf.in: Use mkdir to create a unique temporary directory
3857 that we can safely use. Thanks to Stefan Nordhausen!
3858
3859 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3860
3861 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3862 argument since it is always zero now. Changed all callers.
3863 Removed code for handling fluids.
3864
3865 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3866 the wind chain explicitely. Use scm_c_with_fluid for the common
3867 case of only one fluid.
3868 (scm_with_fluid): New.
3869 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3870
3871 * fluids.h, fluids.c (scm_frame_fluid): New.
3872 (scm_with_fluid): New.
3873 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3874
3875 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3876 do the unwinding directly. It is simple enough.
3877
3878 * dynwind.h, dynwind.c: Did the following renamings:
3879 scm_begin_frame -> scm_frame_begin,
3880 scm_end_frame -> scm_frame_end,
3881 scm_on_unwind -> scm_frame_unwind,
3882 scm_on_rewind -> scm_frame_rewind,
3883 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3884 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3885 Changed all uses.
3886
3887 * aync.h, async.c: Did the follwing renamings:
3888 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3889 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3890 Changed all uses.
3891
3892 * ports.h, ports.c: Did the follwing renamings:
3893 scm_with_current_input_port -> scm_frame_current_input_port,
3894 scm_with_current_output_port -> scm_frame_current_output_port,
3895 scm_with_current_error_port -> scm_frame_current_error_port.
3896 Changed all uses.
3897
3898 2004-01-07 Kevin Ryde <user42@zip.com.au>
3899
3900 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3901 Reported by Richard Todd.
3902
3903 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3904 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3905
3906 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3907 traversing the args list, fixes segv if an improper list is given.
3908 Reported by Rouben Rostamian.
3909
3910 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3911
3912 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3913 swap_data on stack, use a 'malloc obj'.
3914
3915 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3916 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3917 scm_i_... since they are internal. Changed all uses.
3918
3919 * dynwind.c (frame_print): Removed, use the default printer.
3920 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3921 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3922 to protect SCM values.
3923
3924 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3925 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3926 Changed all uses.
3927 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3928
3929 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3930
3931 * ports.h, ports.c (scm_with_current_input_port,
3932 scm_with_current_output_port, scm_with_current_error_port): New.
3933
3934 * async.h, async.c (scm_with_blocked_asyncs,
3935 scm_with_unblocked_asyncs): New.
3936
3937 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3938
3939 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3940 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3941 New.
3942 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3943 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3944 function when the outermost wind point has been reached. The
3945 latter is used to copy a continuation stack at the right time.
3946 scm_dowinds remains available.
3947 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3948 tc16_guard, guards_print): Removed.
3949 (scm_internal_dynamic_wind): Reimplemented using frames.
3950
3951 * continuations.c (copy_stack): New, do only the stack copying
3952 part of copy_stack_and_call.
3953 (copy_stack_and_call): Copy the stack after unwinding and before
3954 rewinding.
3955 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3956 copy_stack_and_call.
3957
3958 2004-01-04 Kevin Ryde <user42@zip.com.au>
3959
3960 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3961 can give bad results due to rounding.
3962
3963 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3964 setzone/restorezone protection for DOS.
3965
3966 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3967
3968 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3969 and scm_t_uintmax to be defined in scmconfig.h
3970
3971 2003-12-03 Kevin Ryde <user42@zip.com.au>
3972
3973 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3974
3975 * numbers.c (scm_make_ratio): Check for numerator equal to
3976 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3977 giving integer -1.
3978
3979 * numbers.c (scm_real_part): Return fraction unchanged rather than
3980 converting to flonum.
3981
3982 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3983
3984 * modules.c (module_variable): Fixed (and thus simplified) the
3985 definition of SCM_BOUND_THING_P to reflect the fact that since
3986 after the 1.4 series of guile, obarrays only hold variable
3987 objects.
3988
3989 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3990
3991 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3992
3993 From Paul Jarc:
3994
3995 * read.c (scm_lreadr): Signal an error for invalid escape
3996 sequences in strings. Code cleanups too.
3997
3998 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3999 writing control characters in strings.
4000
4001 2003-11-21 Marius Vollmer <mvo@zagadka.de>
4002
4003 * ports.c (scm_drain_input): Bug fix: only access the port after
4004 checking that it indeed is one.
4005
4006 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4007
4008 * eval.c (s_bad_define): New static identifier.
4009
4010 (m_body): Fixed comment.
4011
4012 (scm_m_define): Don't generate memoized code for definitions that
4013 are not on the top level. As a consequence, no memoized code at
4014 all is generated for definitions any more: Top level definitions
4015 are executed immediately during memoization and internal
4016 definitions are handled separately in m_expand_body.
4017
4018 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
4019 definitions. Consequently, there is no unmemoizing code any more
4020 that might modify the environment. Thus, the old scm_unmemocopy
4021 is removed and the old unmemocopy is renamed to scm_unmemocopy.
4022
4023 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
4024 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
4025 over SCM_NIMP in places, where the argument is known to be part of
4026 a proper list.
4027
4028 2003-11-21 Kevin Ryde <user42@zip.com.au>
4029
4030 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
4031 for bignums.
4032
4033 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
4034 to share some shifting.
4035
4036 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
4037 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
4038 since gc does this.
4039
4040 2003-11-19 Marius Vollmer <mvo@zagadka.de>
4041
4042 * numbers.c (scm_make_ratio): Rewritten to have a simpler
4043 structure. Previously, not all cases with a negative denominator
4044 were covered.
4045
4046 * numbers.c (mem2decimal_from_point): use scm_divide instead of
4047 scm_divide2real when forming the fractional part. This allows
4048 "#e1.2" to yield 6/5.
4049
4050 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
4051 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
4052 fractions were equal to each other regardless of value. Ooops.
4053
4054 * numbers.c (scm_rationalize): Return an inexact result when given
4055 inexact arguments.
4056
4057 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
4058 non-numbers.
4059
4060 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4061
4062 Support for exact fractions from Bill Schottstaedt! Thanks!
4063
4064 * print.c (scm_iprin1): Handle fractions.
4065
4066 * objects.h (scm_class_fraction): New.
4067 * objects.c (scm_class_fraction): New.
4068 (scm_class_of): Handle fractions.
4069
4070 * hash.c (scm_hasher): Handle fractions.
4071
4072 * numbers.c: New code for handling fraction all over the place.
4073 (scm_odd_p, scm_even_p): Handle inexact integers.
4074 (scm_rational_p): New function, same as scm_real_p.
4075 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
4076 New exact functions that replace the inexact 'dsubr'
4077 implementations.
4078 (scm_numerator, scm_denominator): New.
4079
4080 * numbers.h (SCM_NUMP): Recognize fractions.
4081 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
4082 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
4083 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
4084 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
4085 SCM_FRACTION_REDUCED): New.
4086 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
4087 New prototypes.
4088 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
4089 scm_rational_p): New prototypes.
4090 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
4091 scm_i_print_fraction): New prototypes.
4092
4093 * goops.c (create_standard_classes): Create "<fraction>" class.
4094
4095 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
4096
4097 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
4098 case in the switch, but do nothing for now.
4099
4100 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
4101 to doubles when calling 'dsubr' functions.
4102
4103 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
4104
4105 2003-11-18 Rob Browning <rlb@defaultvalue.org>
4106
4107 * gen-scmconfig.c (main): remove public definition of
4108 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
4109 direct typedef of long_long and ulong_long inside deprecated block
4110 when appropriate.
4111
4112 * deprecated.h: move long_long and ulong_long definitions to
4113 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
4114 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
4115
4116 2003-11-17 Marius Vollmer <mvo@zagadka.de>
4117
4118 * hash.c (scm_string_hash): New hashing algorithm that takes the
4119 complete string into account.
4120
4121 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
4122 is a list. This allows (@ ...) to work with set!.
4123 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
4124 SCM_ASSYNT.
4125
4126 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
4127 the "-e" option instead of scm_str2symbol. This allows things
4128 like (@ ...) to be specified for the entry point.
4129
4130 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4131
4132 * eval.c (scm_m_letstar): Create memoized code in place to
4133 minimize consing.
4134
4135 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4136
4137 * eval.c (s_splicing): Commented and reformulated.
4138
4139 (lookup_global_symbol, lookup_symbol): New static functions.
4140
4141 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
4142
4143 (try_macro_lookup, literal_p): Use lookup_symbol instead of
4144 creating a temporary pair for scm_lookupcar.
4145
4146 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
4147 created deprecated wrapper function scm_unmemocar.
4148
4149 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
4150 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
4151 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
4152 undefineds, sym_three_question_marks): Moved around without
4153 modifications.
4154
4155 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
4156
4157 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4158
4159 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
4160 m_expand_body, scm_m_expand_body): Grouped together with m_body.
4161 No further modifications.
4162
4163 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4164
4165 * eval.c (s_mixed_body_forms): New static identifier.
4166
4167 (canonicalize_define, scm_m_define): The check for a bad
4168 expression is performed in canonicalize_define now.
4169
4170 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
4171 static helper functions for m_expand_body.
4172
4173 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
4174 expand user defined macros. Fixed handling of the definition/
4175 expression boundary. Fixed handling of definitions grouped with
4176 'begin. Use canonicalize_define to expand definitions.
4177
4178 2003-11-13 Marius Vollmer <mvo@zagadka.de>
4179
4180 * read.c (scm_lreadr): detect EOF after backslash, and interpret
4181 \xNN hexadecimal sequences. From Paul Jarc, thanks!
4182
4183 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
4184 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
4185 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
4186 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
4187 New macros from Paul Jarc. Thanks!
4188
4189 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
4190 return NULL when the machine type is unknown. Previously,
4191 gc_os_dep.c would refuse to compile.
4192
4193 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4194
4195 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
4196 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
4197 scm_m_body to m_body.
4198
4199 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4200
4201 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
4202 public use of scm_m_expand_body in eval.h. In eval.c, renamed
4203 scm_m_expand_body to m_expand_body and made it static. Added
4204 deprecated wrapper scm_m_expand_body.
4205
4206 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
4207 of scm_m_expand_body.
4208
4209 2003-11-09 Kevin Ryde <user42@zip.com.au>
4210
4211 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
4212 argument. Reported by Mike Gran.
4213
4214 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4215
4216 * eval.c (s_missing_body_expression): New static identifier.
4217
4218 (s_body): Removed.
4219
4220 (scm_m_expand_body): Fixed core dump when passing a body with
4221 defines, but without expressions (see additions to syntax.test).
4222 Use ASSERT_SYNTAX to signal syntax errors.
4223
4224 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4225
4226 * eval.c (canonicalize_define): New static helper function.
4227
4228 (memoize_define, canonicalize_define): Extract handling of
4229 function currying to canonicalize_define.
4230
4231 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4232
4233 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4234 Make sure that error checking in debug mode is not worse than in
4235 standard mode.
4236
4237 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4238
4239 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
4240 handled in scm_m_body any more, but rather in scm_m_lambda.
4241
4242 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
4243 scm_m_letrec, scm_m_expand_body): Check for validity is done by
4244 calling functions of scm_m_body.
4245
4246 (scm_m_lambda): Avoid unnecessary consing when creating the
4247 memoized code.
4248
4249 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4250
4251 * eval.c (s_expression): Added comment.
4252
4253 (s_empty_combination, error_unbound_variable): New static
4254 identifiers.
4255
4256 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
4257 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
4258 signal syntax errors.
4259
4260 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
4261 scheme objects.
4262
4263 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4264
4265 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
4266 Grouped together with unmemocopy, without modifications.
4267
4268 (build_binding_list, unmemocopy): Renamed names of list arguments
4269 and variables to reflect the actual order of the list elements.
4270
4271 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4272
4273 * eval.c (s_defun): New static identifier.
4274
4275 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
4276 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4277 when creating the memoized code.
4278
4279 2003-10-19 Kevin Ryde <user42@zip.com.au>
4280
4281 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
4282
4283 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
4284 in accordance with R5RS, which just mpz_get_d doesn't really give.
4285
4286 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4287
4288 * eval.c (s_bad_slot_number): New static identifier.
4289
4290 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
4291 signal syntax errors. Avoid unnecessary consing when creating the
4292 memoized code.
4293
4294 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4295
4296 * eval.c (scm_m_cont, scm_m_at_call_with_values,
4297 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
4298 errors. Avoid unnecessary consing when creating the memoized
4299 code.
4300
4301 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
4302 standard case. Make sure line and file information are copied to
4303 every created expression.
4304
4305 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4306
4307 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
4308 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4309 when creating the memoized code.
4310
4311 (scm_m_atbind): Reversed the order, in which the init expressions
4312 are stored and executed. The order of execution is now equal to
4313 the order in which the initializers of the let-forms are executed.
4314 Use check_bindings and transform_bindings.
4315
4316 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
4317 !SCM_NULLP. Added some comments.
4318
4319 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4320
4321 * eval.c: Sorted include files alphabetically.
4322
4323 (scm_m_begin): Added comment.
4324
4325 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4326 unnecessary consing when creating the memoized code.
4327
4328 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
4329 syntax errors. Be more specific about the kind of error that was
4330 detected.
4331
4332 (scm_m_quote, unmemocopy): As an optimization, vector constants
4333 are now inserted unquoted into the memoized code. During
4334 unmemoization the quotes are added again to provide syntactically
4335 correct code.
4336
4337 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4338
4339 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
4340 scm_m_expand_body, check_bindings): Extracted syntax checking of
4341 bindings to new static function check_bindings.
4342
4343 (scm_m_let, memoize_named_let): Extracted handling of named let to
4344 new static function memoize_named_let.
4345
4346 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
4347 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
4348 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
4349 unnecessary consing when creating the memoized code.
4350
4351 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4352
4353 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4354 static identifiers.
4355
4356 (s_clauses, s_formals, s_duplicate_formals): Removed.
4357
4358 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
4359 specific about the kind of error that was detected. Prepare for
4360 easier integration of changes for separated memoization.
4361
4362 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4363
4364 * eval.c (s_duplicate_binding): New static identifier.
4365
4366 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4367
4368 (scm_m_define): Added comment about how we check for duplicate
4369 formals.
4370
4371 (scm_m_do): Added check for duplicate bindings.
4372
4373 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4374 unnecessary consing when creating the memoized code.
4375
4376 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4377 scm_c_improper_memq to c_improper_memq, since it is not exported.
4378
4379 (transform_bindings): Call scm_c_memq rather than
4380 scm_c_improper_memq.
4381
4382 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4383
4384 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4385
4386 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4387 static identifiers.
4388
4389 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4390 specific about the kind of error that was detected. Avoid use of
4391 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4392 code, this way also making sure that file name, line number
4393 information etc. remain available.
4394
4395 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4396
4397 * eval.c (memoize_as_thunk_prototype): New static function.
4398
4399 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4400 Avoid unnecessary consing when creating the memoized code.
4401
4402 2003-10-12 Kevin Ryde <user42@zip.com.au>
4403
4404 * list.c (scm_append): Track argument number and use in error.
4405
4406 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4407
4408 * eval.c (s_missing_expression, s_bad_variable): New static
4409 identifiers.
4410
4411 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4412 R5RS terminology for the naming of variables. Be more specific
4413 about the kind of error that was detected. Make sure file name,
4414 line number etc. are added to all freshly created expressions.
4415 Avoid unnecessary consing when creating the memoized code.
4416
4417 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4418
4419 * eval.c (s_extra_expression, s_misplaced_else_clause,
4420 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4421
4422 (s_extra_case_clause): Removed.
4423
4424 (scm_m_case, scm_m_cond): If a clause appears after an else
4425 clause, report a misplaced else clause.
4426
4427 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4428 specific about the kind of error that was detected. Handle bound
4429 'else and '=>. Avoid unnecessary consing when creating the
4430 memoized code.
4431
4432 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4433 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4434 syntactic keyword '=>.
4435
4436 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4437
4438 * eval.c (scm_m_case): Allow empty lists of case labels.
4439
4440 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4441
4442 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4443
4444 * print.c (scm_isymnames): Add names for the new memoizer codes.
4445
4446 * eval.c (s_missing_clauses, s_bad_case_clause,
4447 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4448 literal_p): New static identifiers.
4449
4450 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4451 specific about the kind of error that was detected. Check for
4452 duplicate case labels. Handle bound 'else. Avoid unnecessary
4453 consing when creating the memoized code.
4454
4455 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4456 the syntactic keyword 'else.
4457
4458 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4459
4460 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4461 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4462
4463 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4464 unnecessary consing when creating the memoized code.
4465
4466 2003-10-09 Kevin Ryde <user42@zip.com.au>
4467
4468 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4469 cast gives for values bigger than a long, or for nan or inf.
4470
4471 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4472
4473 * smob.h (scm_make_smob_type): Made the declaration match the
4474 definition.
4475
4476 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4477
4478 * goops.c, objects.h, smob.c, smob.h: Make type names char
4479 const * instead of char *. Thanks to Paul Jarc!
4480
4481 2003-10-02 Kevin Ryde <user42@zip.com.au>
4482
4483 * strports.c (scm_call_with_output_string): scm_get_output_string
4484 rather than scm_strport_to_string, so as to guard against the port
4485 having been closed by the called procedure. Reported by Nic Ferrier.
4486
4487 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4488
4489 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4490
4491 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4492 tags.h to deprecated.h.
4493
4494 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4495
4496 This set of patches introduces a new tc7 code scm_tc7_number for
4497 numbers. Bignums, reals and complex numbers are turned from smobs
4498 into subtypes of scm_tc7_number.
4499
4500 * tags.h (scm_tc7_number): New.
4501
4502 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4503 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4504 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4505 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4506 (scm_class_of), print.c (scm_iprin1), smob.c
4507 (scm_smob_prehistory): Don't handle bignums, reals and complex
4508 numbers as subtypes of scm_tc7_smob any more.
4509
4510 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4511 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4512
4513 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4514
4515 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4516 sizeof (scm_t_complex) to determine the memory size of the
4517 malloc'd area for complex numbers.
4518
4519 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4520
4521 * numbers.c (scm_bigequal): Fixed.
4522
4523 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4524
4525 * stime.c (scm_current_time): 'time' does not set errno so don't
4526 use SCM_SYSERROR for reporting errors.
4527
4528 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4529
4530 This set of patches eliminates the dependency between the
4531 implementation of evaluator specific memoization codes and special
4532 constants like #f, '() etc. ('flags'), which are not evaluator
4533 specific. The goal is to remove definitions of evaluator
4534 memoization codes completely from the public interface. This will
4535 make it possible to experiment more freely with optimizations of
4536 guile's internal representation of memoized code.
4537
4538 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4539
4540 * print.c (iflagnames): New array, holding the printed names of
4541 guile's special constants ('flags').
4542
4543 (scm_isymnames): Now holds only the printed names of the
4544 memoization codes.
4545
4546 (scm_iprin1): Separate the handling of memoization codes and
4547 guile's special constants.
4548
4549 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4550 SCM_IFLAGNUM): new
4551
4552 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4553 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4554 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4555 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4556 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4557 values.
4558
4559 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4560
4561 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4562 tc9 macros and scm_tc9_flag.
4563
4564 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4565
4566 * posix.c (scm_setgroups): Check that the gid list is not too
4567 long. Thanks to Paul Jarc!
4568
4569 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4570
4571 * tags.h: Reduced the number of short instructions from 14 to 13.
4572 The typecode of the former 14th short instruction is now used to
4573 represent long instructions. Changed some comments to reflect
4574 this fact.
4575
4576 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4577 previously used by SCM_IM_DEFINE.
4578
4579 (SCM_IM_DEFINE): Turned into a long instruction.
4580
4581 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4582 instruction.
4583
4584 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4585 code that is separate from all instructions, one level of dispatch
4586 for long instructions can be eliminated.
4587
4588 * print.c (scm_isymnames): Removed some commented code.
4589
4590 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4591
4592 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4593 compiler on IA64.
4594
4595 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4596
4597 * modules.c (scm_module_reverse_lookup): Check that the obarray
4598 really is a hashtable and do nothing if not.
4599
4600 * inline.h: Use "extern inline" only with GCC. Use "static
4601 inline" else.
4602
4603 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4604
4605 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4606 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4607
4608 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4609 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4610 deprecated.h.
4611
4612 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4613
4614 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4615 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4616
4617 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4618 0.0==some_expression to some_expression==0.0. The latter is
4619 better readable. The former is preferred by some people, since it
4620 leads to a compiler error when confusing == with =. However, when
4621 using gcc, a warning will be issued if in an if-statement an
4622 assigment appears. Since many Guile developers are using gcc,
4623 such errors will not remain unnoticed anyway. We can therefore
4624 focus on better readability.
4625
4626 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4627
4628 * tags.h: Added description of Guile's type system. Removed some
4629 old and misleading comments.
4630
4631 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4632
4633 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4634 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4635
4636 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4637
4638 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4639
4640 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4641 respective SLOPPY macro.
4642
4643 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4644
4645 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4646 type string, not SCM_TYP7S.
4647
4648 2003-09-03 Kevin Ryde <user42@zip.com.au>
4649
4650 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4651 2s-complement.
4652
4653 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4654 current timezone requiring SCM_DEFER_INTS.
4655
4656 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4657
4658 * script.c (scm_compile_shell_switches): Make -s switch optional
4659 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4660 VanDevender for the patch!)
4661
4662 2003-08-30 Kevin Ryde <user42@zip.com.au>
4663
4664 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4665 and to have non-integer types rejected as per other logical funcs.
4666
4667 2003-08-28 Kevin Ryde <user42@zip.com.au>
4668
4669 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4670
4671 2003-08-23 Kevin Ryde <user42@zip.com.au>
4672
4673 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4674 thread safe, and could take a long time too.
4675
4676 2003-08-22 Kevin Ryde <user42@zip.com.au>
4677
4678 * numbers.c (scm_difference): Correction to bignum - negative inum.
4679
4680 2003-08-14 Kevin Ryde <user42@zip.com.au>
4681
4682 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4683 [__GNUC__]: Use volatile asm macros rather than a function call.
4684 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4685 macros while defining functions.
4686
4687 * simpos.c (getenv): Use <stdlib.h> for prototype.
4688 (scm_system): In docstring, refer to status:exit-val rather than
4689 "functions above".
4690
4691 2003-08-09 Kevin Ryde <user42@zip.com.au>
4692
4693 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4694 list set by source-properties! rather than an SRCPROPS object,
4695
4696 2003-07-29 Kevin Ryde <user42@zip.com.au>
4697
4698 * properties.c (scm_primitive_property_ref): In docstring, note
4699 parameters to not-found-proc, use hyphens rather than underscores for
4700 that parameter name.
4701 (scm_primitive_property_set_x): In docstring, VAL is the value
4702 parameter not CODE.
4703
4704 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4705
4706 * print.c (scm_print_symbol_name): handle more weird characters by
4707 escaping the symbol name properly. Thanks to Paul Jarc!
4708
4709 * posix.h (scm_setgroups): New prototype.
4710 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4711 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4712 Don't use SCM_WRITABLE_VELTS.
4713
4714 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4715 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4716 Matthias Koeppe!
4717
4718 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4719 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4720 compiles when SCM_C_INLINE is undefined.
4721
4722 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4723
4724 * __scm.h: Reformulated the architecture and compiler properties
4725 in terms of properties of scm_t_bits and SCM variables rather than
4726 in terms of c standard types. This is since it is not known which
4727 of the standard types scm_t_bits and SCM variables will be defined
4728 to.
4729
4730 2003-07-24 Kevin Ryde <user42@zip.com.au>
4731
4732 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4733 and real.
4734
4735 2003-07-18 Kevin Ryde <user42@zip.com.au>
4736
4737 * numbers.c (scm_product): In complex * bignum, correction to
4738 REAL/IMAG fetch, x is the complex, not y.
4739
4740 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4741
4742 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4743 scm_inf_p test as Scheme values.
4744 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4745 and a positive inum.
4746 Use GNU indentation style.
4747
4748 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4749
4750 * values.c (scm_values): Build lists of length 1 by using
4751 scm_list_1 instead of using scm_cons.
4752
4753 2003-07-10 Kevin Ryde <user42@zip.com.au>
4754
4755 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4756 * list.c (scm_list_n): Ditto.
4757
4758 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4759
4760 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4761
4762 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4763 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4764 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4765 the other using intptr_t.
4766
4767 2003-07-08 Kevin Ryde <user42@zip.com.au>
4768
4769 * numbers.c (scm_make_polar): Use sincos, when available.
4770 (scm_magnitude): Use hypot.
4771
4772 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4773 @footnote since it doesn't go through to guile-procedures.txt.
4774
4775 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4776 outside @var to quieten makeinfo, and use @code.
4777
4778 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4779
4780 * gc-malloc.c (decrease_mtrigger): new function
4781 (increase_mtrigger): new function, separate debug registering and
4782 mtrigger administration.
4783 (scm_gc_realloc): bugfix: do mtrigger administration before the
4784 actual realloc, for the realloc might invalidate a GC-d segment of
4785 memory. Thanks to Sam Hocevar for pointing this out.
4786 (scm_gc_realloc): use scm_malloc_reregister instead of
4787 unregistering and registering in sequence.
4788
4789 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4790
4791 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4792
4793 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4794
4795 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4796 clauses.
4797
4798 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4799
4800 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4801 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4802 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4803 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4804 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4805 the release_1_6 branch.
4806
4807 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4808
4809 * continuations.c: Redeclaration of getcontext() via the
4810 __asm__ ("getcontext") directive.
4811
4812 * continuations.h: Include <ucontext.h> instead of
4813 <sys/ucontext.h>.
4814
4815 2003-06-21 Kevin Ryde <user42@zip.com.au>
4816
4817 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4818 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4819 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4820 available.
4821 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4822 (isfinite): Remove, conflicts with C99 isfinite().
4823
4824 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4825
4826 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4827 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4828 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4829 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4830 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4831 the release_1_6 branch.
4832
4833 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4834
4835 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4836 to be functions instead of macros.
4837
4838 * threads.c: Conditionalized inclusion of <sys/time.h> and
4839 <unistd.h>.
4840 (scm_getspecific, scm_setspecific): Made these two function
4841 real part of the API.
4842
4843 * posix.c (s_scm_putenv): Added some code to make a
4844 (putenv "FOO="), i.e. setting an empty string, work also on
4845 Win32 systems. Thanks to Kevin Ryde for the proposal.
4846
4847 2003-06-12 Kevin Ryde <user42@zip.com.au>
4848
4849 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4850 freebsd to comment about need to use unsetenv.
4851
4852 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4853
4854 * ports.c (scm_peek_char): Safe the column of the port around the
4855 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4856
4857 2003-06-07 Kevin Ryde <user42@zip.com.au>
4858
4859 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4860 and friends required by scm_t_bits setups.
4861
4862 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4863
4864 * tags.h (scm_tc2_int): Added.
4865
4866 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4867 scm_tc2_int.
4868
4869 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4870 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4871
4872 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4873
4874 * eval.c: Partially undid my patch from 2003-05-31. This patch
4875 caused the segfault referenced in the previous changelog entry.
4876
4877 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4878
4879 * tags.h: Fixed comment about the immediate type code layout.
4880
4881 * eval.c: Fixed handling of non-special instructions. Without
4882 this patch, guile will segfault on (#\0) and similar instructions.
4883
4884 2003-06-05 Kevin Ryde <user42@zip.com.au>
4885
4886 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4887 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4888
4889 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4890 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4891
4892 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4893
4894 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4895 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4896 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4897 generalized it to apply not only to C level functions but also to
4898 scheme level functions.
4899
4900 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4901 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4902 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4903 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4904 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4905 respectively.
4906
4907 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4908 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4909 eval.h into eval.c and a copy is placed into deprecated.h.
4910
4911 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4912 into eval.c. This definition was not part of the API in any
4913 officially released version of guile and thus does not need to go
4914 through a phase of deprecation.
4915
4916 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4917
4918 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4919 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4920 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4921 definitions are make static and renamed from scm_s_xxx to s_xxx.
4922 In deprecated.c the original definitions are copied.
4923
4924 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4925 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4926 eval.h into eval.c and a copy (slightly modified to work in user
4927 code) is placed into deprecated.h.
4928
4929 * eval.c: Use the local static s_xxx definitions instead of the
4930 scm_s_xxx definitions throughout.
4931
4932 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4933
4934 This set of patches separates the representation of the cxr family
4935 of functions (car, cdr etc.) from the dsubr family of functions
4936 (i. e. functions that take a double precision floating point
4937 argument). Further, the algorithm for handling the cxr function
4938 is improved.
4939
4940 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4941 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4942 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4943 cosh, tanh), objects.c (scm_class_of), procprop.c
4944 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4945 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4946 typecode for the dsubr family of functions.
4947
4948 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4949 ramap_dsubr.
4950
4951 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4952 (scm_init_pairs): Make use of the (now usable) second cell element
4953 of a scm_tc7_cxr function to implement the cxr family of functions
4954 more efficiently.
4955
4956 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4957
4958 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4959 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4960 end of an if-else-if-sequence of checks.
4961
4962 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4963
4964 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4965 execution. Generalize apply_closure to apply_proc and use that
4966 for call-with-values.
4967
4968 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4969
4970 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4971 a non closure.
4972
4973 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4974
4975 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4976 appropriately for mingw32 hosts.
4977
4978 * numbers.h: Defining copysign(), isnan() and finite() to
4979 be prefixed by a single '_' for mingw32 hosts.
4980
4981 2003-05-30 Kevin Ryde <user42@zip.com.au>
4982
4983 * numbers.c (z_negative_one): New variable.
4984 (scm_init_numbers): Initialize it.
4985 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4986
4987 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4988
4989 * win32-dirent.c: Use malloc() instead of scm_malloc().
4990
4991 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4992 warning.
4993
4994 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4995 mingw32 build.
4996
4997 * modules.c (s_scm_module_import_interface): Renamed local
4998 variable interface to _interface. Seems like 'interface'
4999 is a special compiler directive for the mingw32 compiler.
5000
5001 * mkstemp.c: Provide prototype to avoid compiler warning.
5002
5003 * load.c (s_scm_search_path): Fixed absolute and relative
5004 path detections for native Windows platforms.
5005
5006 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
5007 to build on mingw32).
5008
5009 * gc-freelist.c ("s_scm_map_free_list",
5010 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
5011
5012 * fports.c (fport_fill_input): Disable use of
5013 fport_wait_for_input() on Win32 platforms.
5014
5015 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
5016
5017 * Makefile.am: Modified some rules for cross compiling.
5018
5019 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5020
5021 * eval.c (SCM_CEVAL): In case of an application, all checks for a
5022 proper function object and the correct number of arguments are now
5023 performed in the application part of SCM_CEVAL.
5024
5025 (scm_badformalsp): Removed.
5026
5027 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5028
5029 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
5030
5031 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5032
5033 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
5034 always being false by inserting preprocessor conditional. (Thanks
5035 to Bruce Korb.)
5036
5037 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
5038 (void *) in order to avoid an aliasing warning; thanks to Bruce
5039 Korb.)
5040
5041 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
5042
5043 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
5044 SCM_STACK_PTR.
5045
5046 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
5047 thread->base --> t->base.
5048
5049 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
5050
5051 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5052
5053 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
5054 scm_variable_set_name_hint, scm_builtin_variable,
5055 scm_internal_with_fluids, scm_make_gsubr,
5056 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
5057 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
5058 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
5059 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
5060 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
5061 scm_make_subr_with_generic, scm_make_subr_opt,
5062 scm_call_catching_errors, scm_make_smob_type_mfpe,
5063 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
5064 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
5065 branch. Some have been slightly rewritten.
5066 (scm_i_object_chars, scm_i_object_length): New, to support
5067 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
5068
5069 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
5070
5071 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
5072 names and inits in the memoized code of do.
5073
5074 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5075
5076 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
5077 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
5078 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
5079 a compilation error if error-on-warning is enabled).
5080
5081 2003-05-17 Marius Vollmer <mvo@zagadka.de>
5082
5083 * c-tokenize.lex: Gobble up complete lines after a '#'. This
5084 removes preprocessor directives from the snarfage that might
5085 otherwise confuse us. These directives appear when compiling with
5086 "-g3", for example.
5087
5088 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5089
5090 * ChangeLog: add my surname
5091
5092 * srcprop.c (scm_finish_srcprop): use
5093 scm_gc_register_collectable_memory()
5094 (scm_make_srcprops): idem.
5095
5096 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5097
5098 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
5099 wrap-around for scm_mtrigger
5100 (scm_gc_register_collectable_memory): abort on overflowing
5101 scm_mallocated().
5102
5103 2003-05-13 Kevin Ryde <user42@zip.com.au>
5104
5105 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
5106 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
5107
5108 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5109
5110 * backtrace.c (scm_display_error_message): Introduced fancy
5111 printing with max level 7 and length 10. (Purpose: avoid printing
5112 gigantic objects in error messages.)
5113
5114 * print.c, print.h (scm_i_port_with_print_state): New function.
5115
5116 * print.c (scm_iprin1, scm_printer_apply,
5117 scm_port_with_print_state): Use scm_i_port_with_print_state.
5118 (scm_simple_format): Modified not to destroy print states.
5119 (print_state_mutex): New mutex.
5120 (scm_make_print_state, scm_free_print_state, scm_prin1):
5121 Lock/unlock print_state_mutex.
5122
5123 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
5124 Use current names in definitions.
5125
5126 2003-05-10 Kevin Ryde <user42@zip.com.au>
5127
5128 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
5129
5130 * numbers.c (scm_integer_length): On negative bignums, adjust
5131 mpz_sizeinbase to account for it looking at absolute value where we
5132 want ones-complement.
5133
5134 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
5135 since we're only using the ulong return value, and x might not fit.
5136
5137 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5138
5139 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
5140 read. This will allow to make the definition in read.c static.
5141
5142 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5143
5144 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
5145 from evalext to eval. This will allow to make some of the
5146 definitions in eval.c static.
5147
5148 2003-05-06 Kevin Ryde <user42@zip.com.au>
5149
5150 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
5151 (scm_logcount): Use mpz_com, not mpz_neg.
5152
5153 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5154
5155 The purpose of this patch is to make guile's internal memoizers
5156 distinguishable from memoizing macros created on the scheme level
5157 or from user provided primitive memoizing macros. The reason is,
5158 that the internal memoizers are the only ones that are allowed to
5159 transform their scheme input into memoizer byte code, while all
5160 other memoizing macros may only transform scheme code into new
5161 scheme code.
5162
5163 To achieve this, a new macro type 'builtin-macro!' is introduced.
5164 Currently, 'builtin-macro!'s are handled as memoizing macros, but
5165 this will change when the memoizer and executor are separated.
5166
5167 * macros.[ch] (scm_i_makbimacro): New.
5168
5169 * macros.h (SCM_BUILTIN_MACRO_P): New.
5170
5171 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
5172
5173 * eval.c, goops.c: All of guile's primitive memoizing macros are
5174 primitive builtin-macros now.
5175
5176 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
5177 builtin-macros are handled equally to memoizing macros.
5178
5179 2003-05-04 Marius Vollmer <mvo@zagadka.de>
5180
5181 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
5182 work around a bug in GCC 2.95.2 but is now a bug in itself.
5183
5184 2003-05-02 Marius Vollmer <mvo@zagadka.de>
5185
5186 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
5187 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
5188 scm_tcs_symbols): New.
5189
5190 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5191
5192 * deprecated.h, deprecated.c (scm_protect_object,
5193 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
5194 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
5195 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
5196 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
5197 scm_ensure_user_module, scm_load_scheme_module, scm_port,
5198 scm_ptob_descriptor, scm_port_rw_active,
5199 scm_close_all_ports_except): New.
5200
5201 * ports.c (scm_c_port_for_each): New function, mostly copied from
5202 scm_port_for_each.
5203 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
5204 * ports.h (scm_c_port_for_each): New prototype.
5205
5206 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5207
5208 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
5209 macro was introduced in anticipation of GOOPS method compilation
5210 code.)
5211
5212 * goops.c: Removed binding of @dispatch.
5213
5214 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5215
5216 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
5217 instructions that bind the macros on the scheme level back to
5218 goops.c in order to make sure again that the bindings go into the
5219 (oop goops) module and are not visible from the outside.
5220
5221 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5222
5223 * eval.c: Non functional change: Separated R5RS and non-R5RS
5224 macros into different sections of the file and ordered the
5225 memoizers alphabetically.
5226
5227 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5228
5229 * eval.c (scm_ilookup): Rewritten to improve readability.
5230
5231 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5232
5233 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5234 Partially reverted patch from 2003-04-23 in oder to find a better
5235 compromise between readability and debuggability.
5236
5237 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5238
5239 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
5240 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
5241 definitions of the special goops memoizers from goops.[ch] to
5242 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
5243 throughout guile.
5244
5245 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5246
5247 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
5248
5249 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
5250
5251 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
5252
5253 * ioext.c (scm_fdes_to_ports): Ditto.
5254
5255 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
5256 lock/unlock scm_i_port_table_mutex.
5257
5258 * strports.c (scm_mkstrport): Ditto.
5259
5260 * ports.c (scm_void_port, scm_port_for_each): Ditto.
5261
5262 * fports.c (scm_fdes_to_port): Ditto.
5263
5264 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5265
5266 This set of patches contains no functional changes, only debatable
5267 minor stylistic ones. Still, in order to prepare a patch between
5268 my local copy and the CVS version, I decided to submit the changes
5269 below. Then, the patch will hopefully only contain relevant
5270 modifications :-)
5271
5272 * eval.c (iqq): Added const specifier.
5273
5274 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5275 Use NULL instead of 0 to indicate that a pointer is returned.
5276 Removed some misleading 'fall through' comments.
5277
5278 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5279 Split up long expressions into smaller ones to be more debugging
5280 friendly.
5281
5282 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5283
5284 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
5285 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
5286 rather than casting to SCM.
5287
5288 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5289
5290 * sort.c, pairs.h: Removed unnecessary includes.
5291
5292 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5293
5294 * sort.c: Replaced hand-made trampline code by the new official
5295 mechanism from eval.c. This fixes a segfault in the new test file
5296 sort.test.
5297
5298 (quicksort, compare_function, scm_restricted_vector_sort_x,
5299 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
5300 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
5301 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
5302 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
5303 eval.c.
5304
5305 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
5306 cmp_fun_t): Removed.
5307
5308 (compare_function): Added.
5309
5310 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
5311 arithmetics with index arithmetics. Changed quicksort to work on
5312 an array of SCM values instead of an array of characters. Avoid
5313 bytewise copying of SCM elements. Avoid allocating memory on the
5314 stack with alloca. Fixed some comments.
5315
5316 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5317
5318 * eval.c (EXTEND_ENV): Eliminated.
5319
5320 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
5321 EXTEND_ENV.
5322
5323 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5324
5325 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
5326
5327 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
5328 compiling with SCM_DEBUG==1 by moving definition behind prototype.
5329
5330 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
5331 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
5332 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
5333 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
5334 functions such that they check if the object is a non-immediate.
5335 Further, renamed identifiers to use the scm_dbg_ prefix and made
5336 their inclusion into the lib dependent of the
5337 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
5338
5339 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5340
5341 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
5342 debug option.
5343
5344 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5345
5346 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
5347 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
5348 any calls to SCM_NCONSP any more.
5349
5350 * unif.c (l2ra): Eliminate redundant check.
5351
5352 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5353
5354 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
5355 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
5356 SCM_NNULLP. Now, guile itself does not include any calls to
5357 SCM_NNULLP any more.
5358
5359 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5360
5361 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
5362 scm_copy_tree): Place assignment expressions which are part of
5363 other expressions into an expression of their own.
5364
5365 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5366
5367 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5368 compare SCM values with !=.
5369
5370 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5371
5372 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5373 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5374 and definition of the memoizer for the generalized set! macro from
5375 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5376 define the macro object.
5377
5378 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5379 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5380 eval.c, it is made static and renamed to s_set_x.
5381
5382 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5383 over SCM_N<foo>.
5384
5385 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5386
5387 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5388 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5389 to undefineds and registered the object as a permanent object.
5390
5391 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5392 static in eval.c, renamed it to f_apply and registered the object
5393 as a permanent object.
5394
5395 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5396
5397 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5398 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5399
5400 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5401
5402 * numbers.c (scm_logtest): Fixed argument bug in the call to
5403 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5404
5405 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5406
5407 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5408 type errors that showed up when compiling with SCM_DEBUG defined.
5409
5410 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5411
5412 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5413 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5414 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5415 fix compile errors with --disable-deprecated.
5416
5417 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5418
5419 * numbers.c (scm_integer_expt): fix case where we were declaring
5420 vars in the middle of a statement block. Thanks to Thamer
5421 Al-Harbash.
5422
5423 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5424
5425 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5426 change.
5427
5428 * eq.c (scm_eqv_p): Turned into a primitive generic.
5429
5430 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5431
5432 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5433 Thanks to Boyd Gerber.
5434 Added check for __arm__ in addition to arm for LINUX and copied
5435 __s390__ defines from upstream libgc. Thanks to James Treacy for
5436 reporting the problems.
5437
5438 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5439
5440 * socket.c: use SCM_CHAR_BIT.
5441
5442 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5443
5444 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5445
5446 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5447
5448 * feature.c (scm_init_feature): Always add threads feature.
5449
5450 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5451
5452 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5453 scm_at_assert_bound_ref. (We don't want the unbound check. See
5454 oop/goops/active-slot.scm.)
5455
5456 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5457
5458 * tags.h: scm_t_intptr should have been intptr_t.
5459
5460 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5461
5462 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5463 test. Instead use
5464 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5465 as gc_os_dep.c suggests is appropriate.
5466
5467 * goops.c (prep_hashsets): make static to match prototype.
5468 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5469 Chin.
5470
5471 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5472 Albert Chin.
5473
5474 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5475 Klausner.
5476
5477 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5478
5479 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5480 indicated through extra fields in getters-n-setters.
5481 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5482 (Thanks to Andy Wingo.)
5483
5484 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5485
5486 * gc-segment.c: add comment
5487
5488 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5489
5490 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5491 clash.
5492
5493 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5494 and add regression test to standalone/.
5495
5496 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5497
5498 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5499 Thanks to Dale P. Smith.
5500
5501 * random.c: #include gmp.h.
5502 (scm_c_random_bignum): normalize result on return.
5503
5504 * init.c: #include gmp.h.
5505
5506 * numbers.h: remove the gmp.h #include (not needed now).
5507
5508 * posix.h: change occurences of "id" to something else so we don't
5509 cause trouble when included via objective-c (can't hurt, might
5510 help). Still have usage in debug.h, though.
5511
5512 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5513
5514 * random.c (scm_c_random_bignum): Don't generate a random number
5515 equal to m (the second argument of scm_c_random_bignum); only
5516 generate numbers in the range 0 <= r < m.
5517 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5518 scm_var_random_state.
5519
5520 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5521 clause.
5522
5523 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5524
5525 * modules.c (scm_module_import_interface): move declaration of
5526 uses before any code.
5527
5528 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5529
5530 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5531 not top_srcdir.
5532
5533 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5534 processing it in order to avoid an infinite loop.
5535
5536 * print.c (scm_prin1): Remember old state of pstate->writingp.
5537
5538 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5539
5540 * Changed license terms to the plain LGPL thru-out.
5541
5542 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5543
5544 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5545 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5546 rewrite to handle GMP bignums.
5547
5548
5549 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5550
5551 * ports.c (scm_getc): minor tweak.
5552
5553 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5554 rewrite to handle GMP bignums.
5555
5556 * numbers.c: rewrite *many* functions to handle GMP bignums.
5557
5558 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5559 handle GMP bignums.
5560
5561 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5562
5563 * init.c (check_config): remove SCM_BIGDIG conditionals.
5564 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5565
5566 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5567
5568 * eval.c: remove SCM_BIGDIG conditionals.
5569
5570 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5571
5572 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5573
5574 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5575 to Kevin Ryde.)
5576
5577 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5578
5579 * threads.h: fix various preprocessor usages of new public
5580 symbols to expect 0 or 1 values rather than 1 or undefined.
5581 i.e. change #ifdef to #if, etc.
5582
5583 * threads.c: fix various preprocessor usages of new public
5584 symbols to expect 0 or 1 values rather than 1 or undefined.
5585 i.e. change #ifdef to #if, etc.
5586
5587 * tags.h: fix various preprocessor usages of new public
5588 symbols to expect 0 or 1 values rather than 1 or undefined.
5589 i.e. change #ifdef to #if, etc.
5590
5591 * stacks.c: fix various preprocessor usages of new public
5592 symbols to expect 0 or 1 values rather than 1 or undefined.
5593 i.e. change #ifdef to #if, etc.
5594
5595 * stackchk.h: fix various preprocessor usages of new public
5596 symbols to expect 0 or 1 values rather than 1 or undefined.
5597 i.e. change #ifdef to #if, etc.
5598
5599 * stackchk.c: fix various preprocessor usages of new public
5600 symbols to expect 0 or 1 values rather than 1 or undefined.
5601 i.e. change #ifdef to #if, etc.
5602
5603 * sort.c: fix various preprocessor usages of new public
5604 symbols to expect 0 or 1 values rather than 1 or undefined.
5605 i.e. change #ifdef to #if, etc.
5606
5607 * read.c: fix various preprocessor usages of new public
5608 symbols to expect 0 or 1 values rather than 1 or undefined.
5609 i.e. change #ifdef to #if, etc.
5610
5611 * random.c: fix various preprocessor usages of new public
5612 symbols to expect 0 or 1 values rather than 1 or undefined.
5613 i.e. change #ifdef to #if, etc.
5614
5615 * print.c: fix various preprocessor usages of new public
5616 symbols to expect 0 or 1 values rather than 1 or undefined.
5617 i.e. change #ifdef to #if, etc.
5618
5619 * objects.c: fix various preprocessor usages of new public
5620 symbols to expect 0 or 1 values rather than 1 or undefined.
5621 i.e. change #ifdef to #if, etc.
5622
5623 * numbers.h: fix various preprocessor usages of new public
5624 symbols to expect 0 or 1 values rather than 1 or undefined.
5625 i.e. change #ifdef to #if, etc.
5626
5627 * null-threads.c: fix various preprocessor usages of new public
5628 symbols to expect 0 or 1 values rather than 1 or undefined.
5629 i.e. change #ifdef to #if, etc.
5630
5631 * lang.c: fix various preprocessor usages of new public
5632 symbols to expect 0 or 1 values rather than 1 or undefined.
5633 i.e. change #ifdef to #if, etc.
5634
5635 * lang.h: fix various preprocessor usages of new public
5636 symbols to expect 0 or 1 values rather than 1 or undefined.
5637 i.e. change #ifdef to #if, etc.
5638
5639 * iselect.h: fix various preprocessor usages of new public
5640 symbols to expect 0 or 1 values rather than 1 or undefined.
5641 i.e. change #ifdef to #if, etc.
5642
5643 * init.c: fix various preprocessor usages of new public
5644 symbols to expect 0 or 1 values rather than 1 or undefined.
5645 i.e. change #ifdef to #if, etc.
5646
5647 * gh_data.c: fix various preprocessor usages of new public
5648 symbols to expect 0 or 1 values rather than 1 or undefined.
5649 i.e. change #ifdef to #if, etc.
5650
5651 * gh.h: fix various preprocessor usages of new public
5652 symbols to expect 0 or 1 values rather than 1 or undefined.
5653 i.e. change #ifdef to #if, etc.
5654
5655 * gen-scmconfig.c: change most new public symbols to be defined to
5656 0 or 1 rather than being either 1 or undefined.
5657
5658 * gc_os_dep.c: fix various preprocessor usages of new public
5659 symbols to expect 0 or 1 values rather than 1 or undefined.
5660 i.e. change #ifdef to #if, etc.
5661 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5662
5663 * gc.h: fix various preprocessor usages of new public
5664 symbols to expect 0 or 1 values rather than 1 or undefined.
5665 i.e. change #ifdef to #if, etc.
5666
5667 * gc-card.c: fix various preprocessor usages of new public
5668 symbols to expect 0 or 1 values rather than 1 or undefined.
5669 i.e. change #ifdef to #if, etc.
5670
5671 * gc-mark.c: fix various preprocessor usages of new public
5672 symbols to expect 0 or 1 values rather than 1 or undefined.
5673 i.e. change #ifdef to #if, etc.
5674
5675 * feature.c: fix various preprocessor usages of new public
5676 symbols to expect 0 or 1 values rather than 1 or undefined.
5677 i.e. change #ifdef to #if, etc.
5678
5679 * evalext.c: fix various preprocessor usages of new public
5680 symbols to expect 0 or 1 values rather than 1 or undefined.
5681 i.e. change #ifdef to #if, etc.
5682
5683 * eval.h: fix various preprocessor usages of new public
5684 symbols to expect 0 or 1 values rather than 1 or undefined.
5685 i.e. change #ifdef to #if, etc.
5686
5687 * eval.c: fix various preprocessor usages of new public
5688 symbols to expect 0 or 1 values rather than 1 or undefined.
5689 i.e. change #ifdef to #if, etc.
5690
5691 * eq.c: fix various preprocessor usages of new public
5692 symbols to expect 0 or 1 values rather than 1 or undefined.
5693 i.e. change #ifdef to #if, etc.
5694
5695 * coop.c: fix various preprocessor usages of new public
5696 symbols to expect 0 or 1 values rather than 1 or undefined.
5697 i.e. change #ifdef to #if, etc.
5698
5699 * coop-threads.c: fix various preprocessor usages of new public
5700 symbols to expect 0 or 1 values rather than 1 or undefined.
5701 i.e. change #ifdef to #if, etc.
5702
5703 * coop-pthreads.c: fix various preprocessor usages of new public
5704 symbols to expect 0 or 1 values rather than 1 or undefined.
5705 i.e. change #ifdef to #if, etc.
5706
5707 * coop-defs.h: fix various preprocessor usages of new public
5708 symbols to expect 0 or 1 values rather than 1 or undefined.
5709 i.e. change #ifdef to #if, etc.
5710
5711 * convert.i.c: fix various preprocessor usages of new public
5712 symbols to expect 0 or 1 values rather than 1 or undefined.
5713 i.e. change #ifdef to #if, etc.
5714
5715 * continuations.c: fix various preprocessor usages of new public
5716 symbols to expect 0 or 1 values rather than 1 or undefined.
5717 i.e. change #ifdef to #if, etc.
5718
5719 * _scm.h: fix various preprocessor usages of new public symbols to
5720 expect 0 or 1 values rather than 1 or undefined. i.e. change
5721 #ifdef to #if, etc.
5722
5723 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5724
5725 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5726
5727 * deprecated.c, deprecated.h: New files, to collect deprecated
5728 things in one place.
5729 * Makefile.am: Added them in all the right places.
5730
5731 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5732 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5733 builds work.
5734 (DOT_X_FILES): Removed "iselect.x".
5735 (DOT_DOC_FILES): Removed "iselect.doc".
5736
5737 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5738
5739 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5740 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5741
5742 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5743
5744 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5745
5746 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5747 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5748
5749 * threads.h: replace usage of struct timespect with
5750 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5751 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5752 favor of scm_t_timespec from scmconfig.h.
5753
5754 * threads.c: move libguile/_scm.h include to the top so we pick up
5755 any critical defines like _GNU_SOURCE early. Replace usage of
5756 struct timespect with scm_t_timespec. Replace usage of
5757 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5758 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5759
5760 * threads-plugin.h: replace usage of struct timespect with
5761 scm_t_timespec.
5762
5763 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5764 usage of struct timespect with scm_t_timespec.
5765
5766 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5767 HAVE_INTTYPES_H handling to scmconfig.h. #include
5768 "libguile/__scm.h". Rework handling for scm_t_bits,
5769 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5770 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5771 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5772 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5773 SCM_HAVE_ARRAYS.
5774
5775 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5776
5777 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5778
5779 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5780
5781 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5782
5783 * stime.h: move handling of time related headers to scmconfig.h.
5784
5785 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5786
5787 * stacks.c: replace usage of STACK_GROWS_UP with
5788 SCM_STACK_GROWS_UP.
5789
5790 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5791 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5792
5793 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5794 of uint32 and HAVE_UINT_32 with scm_t_int32.
5795
5796 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5797
5798 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5799
5800 * script.c: #include <config.h> if HAVE_CONFIG_H.
5801
5802 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5803
5804 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5805
5806 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5807
5808 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5809
5810 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5811
5812 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5813
5814 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5815 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5816 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5817 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5818
5819 * ramap.c: replace usage of HAVE_LONG_LONGS with
5820 "SCM_SIZEOF_LONG_LONG != 0".
5821
5822 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5823 "libguile/scmconfig.h".
5824
5825 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5826
5827 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5828 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5829
5830 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5831
5832 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5833
5834 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5835
5836 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5837 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5838 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5839 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5840 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5841 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5842 "SCM_SIZEOF_LONG_LONG != 0".
5843
5844 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5845 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5846 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5847 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5848
5849 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5850
5851 * null-threads.h: replace usage of struct timespect with
5852 scm_t_timespec.
5853
5854 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5855
5856 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5857 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5858 scm_t_uint64 and rename usages.
5859
5860 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5861
5862 * load.c: #include <config.h> if HAVE_CONFIG_H.
5863
5864 * iselect.h: move handling of time related headers to scmconfig.h.
5865 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5866 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5867 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5868
5869 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5870 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5871 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5872
5873 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5874
5875 * inline.h: #include "libguile/__scm.h" at the top. Change code
5876 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5877 what to do instead of creating a new public #define. Rename usage
5878 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5879 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5880 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5881
5882 * inline.c: rearrange handling -- now we just #define
5883 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5884 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5885 appropriate, and we use that in inline.h along with the above
5886 define to determine how to respond.
5887
5888 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5889 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5890
5891 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5892
5893 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5894 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5895
5896 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5897
5898 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5899
5900 * gen-scmconfig.c: new file -- see comments in file for details.
5901
5902 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5903
5904 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5905 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5906
5907 * gc.h: replace usage of SIZEOF_LONG with
5908 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5909 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5910 since we handle that in scmconfig.h now.
5911
5912 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5913
5914 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5915 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5916 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5917
5918 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5919
5920 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5921 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5922
5923 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5924
5925 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5926
5927 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5928 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5929
5930 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5931
5932 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5933 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5934
5935 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5936 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5937 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5938 with "SCM_SIZEOF_LONG_LONG != 0".
5939
5940 * error.c: #include <config.h> if HAVE_CONFIG_H.
5941
5942 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5943 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5944 with "SCM_SIZEOF_LONG_LONG != 0".
5945
5946 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5947
5948 * coop.c: replace usage of struct timespect with scm_t_timespec.
5949 #include <config.h> if HAVE_CONFIG_H.
5950
5951 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5952 usage of struct timespect with scm_t_timespec. Replace usage of
5953 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5954
5955 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5956 usage of struct timespect with scm_t_timespec. Replace usage of
5957 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5958
5959 * coop-defs.h: move handling of time related headers to
5960 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5961 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5962 timespect with scm_t_timespec.
5963
5964 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5965
5966 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5967
5968 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5969 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5970
5971 * continuations.c: move libguile/_scm.h include to the top so we
5972 pick up any critical defines like _GNU_SOURCE early.
5973
5974 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5975
5976 * async.c: #include <config.h> if HAVE_CONFIG_H.
5977
5978 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5979
5980 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5981 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5982
5983 * __scm.h: move libguile/scmconfig.h include up to the top, so
5984 we're sure to pick up any critical defines like _GNU_SOURCE early.
5985 #include <limits.h> removed in favor of scmconfig.h inclusion when
5986 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5987 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5988 scmconfig.h inclusion when appropriate. Various Win32 related
5989 definitions removed in favor of scmconfig.h inclusion when
5990 appropriate.
5991 (HAVE_UINTPTR_T): definition removed (see NEWS).
5992 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5993 (HAVE_LONG_LONGS): definition removed (see NEWS).
5994 (HAVE_LONG_LONG): definition removed (see NEWS).
5995 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5996
5997 * Makefile.am: scmconfig.h is now generated by building and
5998 running gen-scmconfig.h and capturing its output. gen-scmconfig
5999 uses config.h and the configure.in generated gen-scmconfig.h to
6000 decide what to output. See gen-scmconfig.c for details.
6001 (noinst_PROGRAMS): add gen-scmconfig.
6002 (gen_scmconfig_SOURCES): new variable.
6003 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
6004 cross-compiling right.
6005 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
6006 (BUILT_SOURCES): add scmconfig.h.
6007
6008 2003-03-19 Marius Vollmer <mvo@zagadka.de>
6009
6010 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
6011 Adrian Bunk. Thanks!
6012
6013 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6014
6015 * goops.c (make_class_from_template): New fourth arg:
6016 applicablep.
6017 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
6018 cpls.
6019
6020 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
6021
6022 * goops.c, objects.c, objects.h (scm_make_extended_class): New
6023 second arg: applicablep.
6024 (scm_i_inherit_applicable): New function.
6025
6026 * goops.c, goops.h (scm_class_applicable,
6027 scm_class_extended_accessor): New classes.
6028
6029 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6030
6031 * procs.c (scm_procedure_documentation): Removed redundant
6032 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
6033 predicates.
6034
6035 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6036
6037 * list.c, list.h (scm_filter, scm_filter_x): New functions.
6038
6039 * modules.c (scm_module_import_interface): New function.
6040
6041 * goops.c, goops.h (scm_class_accessor_method): Renamed from
6042 scm_class_accessor.
6043 (scm_class_accessor): New class.
6044
6045 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6046
6047 * goops.c (scm_primitive_generic_generic): Enable primitive
6048 generic if not enabled.
6049 (scm_sys_goops_loaded): Setup unextended primitive generics.
6050
6051 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
6052
6053 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
6054 snarf macros.
6055
6056 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
6057 testing example. All uses of SCM_GPROC should be converted.)
6058
6059 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
6060 scm_assoc.
6061
6062 * eq.c (scm_equal_p): Turned into a primitive generic.
6063
6064 2003-02-27 Rob Browning <rlb@defaultvalue.org>
6065
6066 * Makefile.am (scmconfig.h): new target -- generate file from
6067 ../config.h.
6068 (modinclude_HEADERS): remove version.h.
6069 (nodist_modinclude_HEADERS): add version.h.
6070
6071 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6072
6073 This fixes a serious GC bug, introduced during the latest
6074 reorganization of the GC, which disabled freeing of structs and
6075 GOOPS objects:
6076
6077 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
6078 SCM_EOL.
6079 (scm_struct_prehistory): Move scm_free_structs to
6080 scm_before_mark_c_hook.
6081
6082 * gc-card.c (sweep_card): Check that we haven't swept structs on
6083 this card before. That can happen if scm_i_sweep_all_segments has
6084 been called from some other place than scm_igc.
6085
6086 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6087
6088 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
6089 (since hash tables now adapt their size).
6090
6091 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
6092 (current number of prehistory bindings; hashtable code will select
6093 a prime which is greater than this value).
6094
6095 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
6096 (current number of initial symbols).
6097
6098 * properties.c (scm_init_properties): Don't specify size of
6099 scm_properties_whash.
6100
6101 * objprop.c (scm_init_objprop): Don't specify size of
6102 scm_object_whash.
6103
6104 * keywords.c (scm_init_keywords): Don't specify a hash table size.
6105
6106 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
6107
6108 The following changes introduce the use of resizable hash tables
6109 throughout Guile. It also renames the old *-hash-table* functions
6110 to *-alist-vector* and places them, together with the rest of the
6111 weak vector support, in the module (ice-9 weak-vector). We should
6112 probably introduce a new, better, API for weak references, for
6113 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
6114 look like and are used like ordinary pairs.)
6115
6116 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
6117 leaf_environment_fold, obarray_remove_all): Use hashtable
6118 accessors.
6119
6120 * gc.c (scm_init_storage): Moved hook initialization to
6121 scm_storage_prehistory.
6122 (scm_storage_prehistory): New function.
6123 (scm_igc): Added commentary about placement of
6124 scm_after_sweep_c_hook.
6125
6126 * gc-mark.c (scm_mark_all): Use hashtable accessors.
6127 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
6128 SCM_WVECT_WEAK_VALUE_P.
6129
6130 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
6131 functions.
6132 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
6133 Removed.
6134 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
6135 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
6136
6137 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
6138 calls to scm_storage_prehistory and scm_hashtab_prehistory.
6139
6140 * modules.c (module-reverse-lookup): Use hashtable accessors.
6141
6142 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
6143
6144 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
6145 scm_make_weak_value_alist_vector,
6146 scm_make_doubly_weak_alist_vector): New functions.
6147
6148 * weaks.c (scm_init_weaks_builtins): New function.
6149
6150 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
6151 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
6152 SCM_WVECT_NOSCAN_P): New macros.
6153
6154 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
6155 and SCM_WVECT_WEAK_VALUE_P.
6156
6157 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
6158 allocate_weak_vector and exported.
6159
6160 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6161
6162 * hashtab.c: Undid thread safety. (We decided that it's better to
6163 let the user explicitly protect the tables (or not) according what
6164 is suitable for the application.)
6165
6166 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6167
6168 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
6169 thread safe and handle resizing tables.
6170 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
6171 SCM_DEFER/ALLOW_INTS.
6172
6173 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6174
6175 * hashtab.c (scm_vector_to_hash_table,
6176 scm_c_make_resizing_hash_table, scm_make_hash_table): New
6177 functions.
6178 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
6179 safe and handle resizing tables.
6180
6181 * weaks.c (scm_make_weak_key_hash_table,
6182 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
6183 Size argument made optional. Return resizable table if not
6184 specified.
6185
6186 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6187
6188 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6189 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
6190
6191 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6192
6193 * debug.c (scm_procedure_source): Handle all objects for which
6194 procedure? is #t. (Thanks to Bill Schottstaedt.)
6195
6196 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6197
6198 * futures.c (mark_futures): Don't need to mark data of recycled
6199 futures.
6200 (scan_futures, cleanup_undead): Be smarter about marking
6201 futures---avoid unnecessary passes through future lists.
6202
6203 * futures.h, futures.c: New files; Introduced recycling of
6204 futures. For fine-grained threading this lifts performance to
6205 another level. We can now use parallelization in inner loops of
6206 Guile programs without impossible overhead.
6207
6208 * threads.h, threads.c: Moved futures to their own file.
6209
6210 * Makefile.am (libguile_la_SOURCES): Added futures.c.
6211 (DOT_X_FILES): Added futures.x.
6212 (DOT_DOC_FILES): Added futures.doc.
6213 (modinclude_HEADERS): Added futures.h.
6214
6215 * threads.c, threads.h (scm_i_create_thread): Renamed from
6216 create_thread and made global.
6217
6218 * futures.c (scm_make_future): New procedure.
6219
6220 * eval.c: #include "libguile/futures.h".
6221
6222 * init.c: #include "futures.h"
6223 (scm_init_guile_1): Call scm_init_futures.
6224
6225 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
6226
6227 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
6228
6229 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
6230 functions.
6231
6232 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
6233
6234 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6235
6236 * threads.c (create_thread): Don't unwind dynwind chain of parent
6237 thread before creation. Just start the new thread with an empty
6238 dynwind chain.
6239
6240 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6241
6242 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
6243
6244 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6245
6246 * threads.c (scm_timed_wait_condition_variable): Support timed
6247 waiting also for simple condition variables.
6248
6249 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
6250 of calling the procedure change-object-class.
6251
6252 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6253
6254 * ramap.c (scm_ramapc): Typo in error message.
6255
6256 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6257
6258 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
6259 slots with instance allocation.
6260
6261 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
6262 class.
6263 (scm_compute_applicable_methods): Use scm_generic_function_methods.
6264
6265 * goops.c (scm_generic_function_methods): Support extended
6266 generic functions.
6267
6268 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6269
6270 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
6271 Thanks to Neil for pointing this out!
6272
6273 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
6274
6275 * lang.h: Remove declarations matching definitions removed from
6276 lang.c (just below).
6277
6278 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
6279
6280 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
6281 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
6282 and already commented out.
6283
6284 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
6285 scm_lreadparen): Support reading vectors with Elisp syntax if
6286 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
6287 is not currently defined, and there isn't even a configure switch
6288 to enable it yet.)
6289
6290 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6291
6292 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
6293 builds work.
6294 (EXTRA_DIST): Added version.h.in.
6295
6296 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6297
6298 This change makes it possible for one thread to do lazy sweeping
6299 while other threads are running. Now only the mark phase need to
6300 have all threads asleep. We should look further into this issue.
6301 Presently, I've put the locking of scm_i_sweep_mutex at
6302 "conservative" places due to my current lack of knowledge about
6303 the garbage collector. Please feel free to restrict these regions
6304 further to allow for maximal parallelism!
6305
6306 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
6307
6308 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
6309 scm_gc_register_collectable_memory): Substitute locking of
6310 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
6311 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
6312 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
6313 the single-thread section (which now only contains the mark
6314 phase).
6315 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
6316 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
6317
6318 * threads.c (gc_section_mutex): Removed.
6319
6320 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6321
6322 * threads.c (create_thread): Clear parent field in root state in
6323 order not to unnecessarily remember dead threads.
6324
6325 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
6326 (scm_trampoline_1, scm_trampoline_2): Use them.
6327
6328 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6329
6330 Partial introduction of real plugin interface.
6331
6332 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
6333 (EXTRA_DIST): Added threads-plugin.c.
6334
6335 * threads-plugin.h, threads-plugin.c: New files.
6336
6337 * threads.h: #include "libguile/threads-plugin.h".
6338
6339 * threads.c: #include "libguile/threads-plugin.c".
6340
6341 * pthread-threads.c: Temporarily remove debugging functions.
6342
6343 * threads.c, threads.h (scm_yield): Added back.
6344
6345 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6346
6347 * threads.c (really_launch): Detach before unlocking
6348 thread_admin_mutex in order not to risk being joined.
6349 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
6350 thread_admin_mutex locked during GC.
6351
6352 * pthread-threads.c, pthread-threads.h: Improvements to debugging
6353 functions.
6354
6355 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6356
6357 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
6358 support for debugging mutex operations.
6359
6360 * threads.c (scm_thread): Removed filed joining_threads.
6361 (thread_print): Print thread number as well as address of thread
6362 structure.
6363 (scm_join_thread): Bugfix.
6364 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
6365 scm_timed_wait_condition_variable, scm_signal_condition_variable,
6366 scm_broadcast_condition_variable): Use the low-level API.
6367 (scm_all_threads): Return copy of thread list (to prevent
6368 unintended destruction).
6369 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6370
6371 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6372 pthread "native" recursive mutex support.
6373
6374 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6375
6376 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6377 Simply lock a thread C API recursive mutex.
6378 (SCM_NONREC_CRITICAL_SECTION_START,
6379 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6380 SCM_REC_CRITICAL_SECTION_END): Removed.
6381
6382 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6383 direct calls to scm_rec_mutex_lock / unlock around the three calls
6384 to scm_m_expand_body.
6385
6386 * eval.c, eval.h (promise_free): New function.
6387 (scm_force): Rewritten; Now thread-safe; Removed
6388 SCM_DEFER/ALLOW_INTS.
6389
6390 * pthread-threads.h: Added partially implemented plugin interface
6391 for recursive mutexes. These are, for now, only intended to be
6392 used internally within the Guile implementation.
6393
6394 * pthread-threads.c: New file.
6395
6396 * threads.c: Conditionally #include "pthread-threads.c".
6397
6398 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6399 thread-safe;
6400
6401 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6402 SCM_GLOBAL_REC_MUTEX): New macros.
6403
6404 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6405 macros---use mutexes instead.
6406
6407 * tags.h (SCM_IM_FUTURE): New tag.
6408
6409 * eval.c (scm_m_future): New primitive macro.
6410 (SCM_CEVAL): Support futures.
6411 (unmemocopy): Support unmemoization of futures.
6412
6413 * print.c (scm_isymnames): Name of future isym.
6414
6415 * version.c: Unmade some changes to my private copy that got
6416 committed by mistake.
6417
6418 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6419
6420 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6421 2002-12-10.
6422
6423 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6424
6425 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6426 logical place.
6427
6428 * threads.c (create_thread): Remember root object until the handle
6429 of the new thread is on all_threads list.
6430
6431 * root.c (scm_make_root): Moved copying of fluids until after
6432 creation of root handle so that the fluids are GC protected. Also
6433 removed the critical section.
6434
6435 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6436
6437 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6438
6439 * gc-malloc.c (malloc_mutex): New mutex.
6440 (scm_gc_malloc_prehistory): Initialize it.
6441 (scm_realloc): Serialize call to realloc
6442 (scm_calloc): Same for calloc.
6443 Thanks to Wolfgang Jaehrling!
6444 (Now we have to make sure all calls to malloc/realloc are made
6445 through scm_malloc.)
6446
6447 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6448
6449 * threads.c (really_launch): Release heap (to prevent deadlock).
6450 (create_thread): Release heap before locking thread admin mutex.
6451
6452 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6453
6454 * threads.c (scm_i_thread_invalidate_freelists): New
6455 function.
6456
6457 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6458
6459 * modules.c (scm_export): Inserted a return statement.
6460
6461 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6462
6463 * modules.c (scm_export): new function
6464
6465 * gc-card.c: add a note about malloc()/free() overhead.
6466
6467 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6468
6469 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6470 in srcdir.
6471
6472 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6473
6474 These changes remove scm_ints_disabled (which hasn't has any
6475 effect in Guile for quite some time).
6476
6477 * async.c, error.h (scm_ints_disabled): Removed.
6478
6479 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6480 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6481 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6482 (old_ints): Removed.
6483
6484 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6485 critical section.
6486 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6487 SCM_ALLOW_INTS.
6488
6489 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6490
6491 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6492 Removed accidental #if 0 around these functions.
6493
6494 These changes are the start of support for preemptive
6495 multithreading. Marius and I have agreed that I commit this code
6496 into the repository although it isn't thoroughly tested and surely
6497 introduces many bugs. The bugs should only be exposed when using
6498 threads, though. Signalling and error handling for threads is
6499 very likely broken. Work on making the implementation cleaner and
6500 more efficient is needed.
6501
6502 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6503 (SCM_NONREC_CRITICAL_SECTION_START,
6504 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6505 SCM_REC_CRITICAL_SECTION_END): New macros.
6506 (SCM_CRITICAL_SECTION_START/END): Defined here.
6507
6508 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6509 the three calls to scm_m_expand_body.
6510
6511 * gc.h: #include "libguile/pthread-threads.h";
6512 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6513
6514 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6515 scm_t_key;
6516
6517 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6518 access.
6519
6520 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6521
6522 * gc-freelist.c, threads.c (really_launch): Use
6523 SCM_FREELIST_CREATE.
6524
6525 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6526
6527 * gc.c (scm_i_expensive_validation_check, scm_gc,
6528 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6529 heap administration so that those pieces of code are executed
6530 single-threaded. We might consider rewriting these code sections
6531 in terms of a "call_gc_code_singly_threaded" construct instead of
6532 calling the pair of scm_i_thread_put_to_sleep () and
6533 scm_i_thread_wake_up (). Also, we would want to have as many of
6534 these sections eleminated.
6535
6536 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6537
6538 * inline.h: #include "libguile/threads.h"
6539
6540 * pthread-threads.h: Macros now conform more closely to the
6541 pthreads interface. Some of them now take a second argument.
6542
6543 * threads.c, threads.h: Many changes.
6544
6545 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6546
6547 * Makefile.am (version.h): Changed $^ --> $< in rule for
6548 version.h.
6549
6550 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6551
6552 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6553 (SCM_MINOR_VERSION): use @--@ substitution now.
6554 (SCM_MICRO_VERSION): use @--@ substitution now.
6555 (scm_effective_version): new function prototype.
6556
6557 * version.c (scm_effective_version): new function, also add
6558 effective-version.
6559
6560 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6561 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6562 SCM_LIBRARY_DIR.
6563 (version.h): generate this here rather than configure.in. This
6564 approach tracks source edits better (i.e. more immediately).
6565 Might be worth considering for other .in files too.
6566
6567 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6568
6569 Reorganized thread package selection. A thread package now only
6570 implements a small set of pthread like functions and Guile
6571 implements the rest on top of that. Guile's implementation is
6572 what the "coop-pthreads" package has been previously. Support for
6573 "coop" threads has been removed until I get time to add it again.
6574
6575 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6576 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6577 null-threads.c, coop-pthreads.c.
6578 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6579 pthread-threads.h.
6580
6581 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6582
6583 * threads.h: Do not include "libguile/coop-defs.h". Include
6584 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6585 (previously deprecated) C level thread API prototypes. They are
6586 now in the thread package specific headers, "null-threads.h" and
6587 "pthread-threads.h".
6588 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6589 New.
6590 (scm_threads_init): Removed.
6591 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6592 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6593 SCM_I_THREAD_SWITCH_COUNT): Define here.
6594 (scm_single_thread_p): Removed.
6595 (scm_call_with_new_thread): Take two args directly instead of list
6596 of two args.
6597 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6598 SCM_SET_THREAD_LOCAL_DATA): Define here.
6599
6600 * threads.c: Merged with "coop-pthreads.c".
6601
6602 * null-threads.h: Implement pthread-like API as a set of macros.
6603
6604 * pthread-threads.h: New, implement pthread-like API by deferring
6605 to pthread itself.
6606
6607 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6608 has been lost in the reorganization.
6609
6610 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6611
6612 The following change makes it possible to move procedure
6613 application dispatch outside inner loops. The motivation was
6614 clean implementation of efficient replacements of R5RS primitives
6615 in SRFI-1.
6616
6617 The semantics is clear: scm_trampoline_N returns an optimized
6618 version of scm_call_N (or NULL if the procedure isn't applicable
6619 on N args).
6620
6621 Applying the optimization to map and for-each increases efficiency
6622 noticeably. For example, (map abs ls) is 8 times faster than
6623 before.
6624
6625 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6626
6627 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6628
6629 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6630 (map, for-each): Handle also application on two args as a special
6631 case; Use trampolines.
6632
6633 Other changes:
6634
6635 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6636 (subr2oless): Removed.
6637 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6638 vector GC protected.
6639
6640 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6641 scm_out_of_range.
6642
6643 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6644
6645 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6646
6647 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6648
6649 * debug.c (scm_make_iloc): Added missing "return".
6650
6651 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6652
6653 * strports.c (scm_eval_string_in_module): Validate second arg to
6654 be a module. Thanks to Arno Peters!
6655
6656 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6657
6658 * .cvsignore: remove goops.c
6659
6660 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6661
6662 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6663 module_variable, scm_module_lookup_closure,
6664 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6665 scm_system_module_env_p): Don't compare SCM values with C
6666 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6667 over SCM_NFALSEP.
6668
6669 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6670
6671 * eval.h (SCM_MAKE_ILOC): New macro.
6672
6673 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6674 the iloc bitpattern here.
6675
6676 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6677
6678 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6679 part of the API, otherwise it's difficult to write Guile
6680 extensions using non-blocking I/O => moved #include
6681 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6682
6683 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6684 s_unlock_mutex.
6685
6686 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6687
6688 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6689 are defined in configure.in.
6690
6691 * threads.c: Removed SCM_API from function definitions. SCM_API
6692 is only for declarations.
6693
6694 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6695
6696 * coop-pthreads.h: Added support for thread specific data to the
6697 generic C API for the coop-pthreads case.
6698
6699 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6700 change.
6701 (scm_cond_broadcast): Added missing function.
6702
6703 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6704
6705 * coop.c (coop_next_runnable_thread): Removed, wich should have
6706 happened when GUILE_ISELECT was hard-wired.
6707
6708 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6709
6710 * Makefile.am (libguile_la_SOURCES): Added threads.c
6711 (DOT_DOC_FILES): Added threads.doc.
6712 (DOT_X_FILES): Added threads.x.
6713 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6714 (noinst_HEADERS): Added coop-pthreads.c.
6715 (modinclude_HEADERS): Added coop-pthreads.h.
6716
6717 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6718 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6719
6720 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6721 Thanks to Bill Schottstaedt!
6722
6723 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6724
6725 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6726 SCM_COPT_THREADS is defined.
6727 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6728 is defined.
6729
6730 * coop-pthreads.c: Some harmless renamings of internal stuff.
6731 (create_thread): New, generalized version of
6732 scm_call_with_new_thread.
6733 (scm_call_with_new_thread): Use it.
6734 (scm_spawn_thread): New, use create_thread.
6735
6736 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6737
6738 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6739 start testing it now.
6740
6741 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6742 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6743 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6744 is defined.
6745
6746 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6747
6748 * scmsigs.c (signal_cell_handlers, install_handler_data,
6749 scm_delq_spine_x, really_install_handler, install_handler): New
6750 scheme for triggering signal handlers, to simplify take_signal.
6751 (take_signal): Simplified, to avoid race conditions.
6752 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6753 hasn't exited yet.
6754
6755 * async.c (scm_async_click): Reset pending_asyncs, handle
6756 signal_asyncs. Don't set cdr of a non-signal async to #f.
6757 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6758 always. Set pending_asyncs.
6759 (scm_system_async_mark_for_thread): Check that thread has not
6760 exited.
6761 (scm_unmask_signals, decrease_block): Call scm_async_click after
6762 block_asyncs becomes zero.
6763
6764 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6765 active_asyncs.
6766
6767 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6768 fields.
6769 * root.c (root_mark): Mark them.
6770 (make_root): Initialize them.
6771
6772 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6773 USE_COOP_THREADS.
6774 (scm_internal_select): Define one version for USE_COOP_THREADS and
6775 one for USE_NULL_THREADS.
6776 (scm_init_iselect): Likewise.
6777
6778 * inline.h (scm_cell, scm_double_cell): Also allow
6779 USE_COPT_THREADS to not protect the slot initializers.
6780
6781 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6782 because threads need to be initialized before the stack, but
6783 gsubrs such as scm_timed_condition_variable_wait can only be
6784 created later.
6785
6786 * threads.h: Include "coop-pthreads.h" when requested.
6787 (scm_threads_make_mutex, scm_threads_lock_mutex,
6788 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6789 not implemented anyway.
6790 (scm_init_thread_procs, scm_try_mutex,
6791 scm_timed_condition_variable_wait,
6792 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6793 scm_thread_exited_p): New prototypes.
6794 (struct timespec): Define if not already defined.
6795 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6796 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6797 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6798 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6799 deprecated.
6800
6801 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6802 requested.
6803 (scm_thread_exited_p): New.
6804 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6805 registered procedures.
6806 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6807 Use the latter as the procedure for "wait-condition-variable",
6808 thus offering a optional timeout parameter to Scheme.
6809 (scm_wait_condition_variable): Implement in terms of
6810 scm_timed_wait_condition_variable.
6811 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6812 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6813 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6814 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6815 scm_make_mutex, etc, and deprecate.
6816 (scm_init_threads): Do not create smobs, leave this to
6817 scm_threads_init. Do not include "threads.x" file.
6818 (scm_init_thread_procs): New, include "threads.x" here.
6819
6820 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6821 scm_null_mutex_lock, scm_null_mutex_unlock,
6822 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6823 scm_null_condvar_wait, scm_null_condvar_signal,
6824 scm_null_condvar_destroy): Removed.
6825 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6826 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6827 scm_cond_destory): Do not define, they are now deprecated and
6828 handled by threads.{h,c}.
6829
6830 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6831 (scm_threads_init): Create smobs here, using the appropriate
6832 sizes.
6833 (block): Removed, now unused.
6834 (scm_c_thread_exited_p): New.
6835 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6836 scm_null_mutex_destroy, scm_null_condvar_init,
6837 scm_null_condvar_wait, scm_null_condvar_signal,
6838 scm_null_condvar_destroy): Removed and updated users to do their
6839 task directly.
6840 (scm_try_mutex, timeval_subtract,
6841 scm_timed_wait_condition_variable,
6842 scm_broadcast_condition_variable): New.
6843 (scm_wait_condition_variable): Removed.
6844
6845 * coop-defs.h (coop_m): Added 'level' field.
6846 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6847 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6848 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6849 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6850 define.
6851 (coop_condition_variable_broadcast): New.
6852
6853 * coop-threads.c (scm_threads_init): Create smobs here, using the
6854 appropriate sizes.
6855 (scm_c_thread_exited_p, scm_try_mutex,
6856 scm_timed_wait_condition_variable,
6857 scm_broadcast_condition_variable): New.
6858 (scm_wait_condition_variable): Removed.
6859
6860 * coop.c (coop_new_mutex_init): Initialize level.
6861 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6862 level.
6863 (coop_condition_variable_signal): Renamed to
6864 coop_condition_variable_broadcast and reimplemented in terms of
6865 that. Thus...
6866 (coop_condition_variable_broadcast): New.
6867
6868 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6869
6870 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6871
6872 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6873
6874 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6875 of system headers.
6876
6877 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6878 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6879 give better error messages. Thanks to Bill Schottstaedt!
6880
6881 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6882
6883 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6884 scm_definedp to scm_defined_p and deprecated scm_definedp.
6885
6886 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6887
6888 * async.h, async.c (scm_system_async): Fixed deprecation to work
6889 correctly when deprecated features are excluded.
6890
6891 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6892
6893 * async.c (scm_system_async_mark_for_thread): Validate thread
6894 argument.
6895
6896 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6897
6898 * feature.c (scm_init_feature): Don't add 'threads' for
6899 USE_NULL_THREADS.
6900
6901 * inline.h (scm_cell, scm_double_cell): Also allow
6902 USE_NULL_THREADS to not protect the slot initializers.
6903
6904 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6905 "USE_THREAD".
6906
6907 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6908 (modinclude_HEADERS): Added null-threads.h.
6909
6910 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6911 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6912 (scm_init_threads): Use generic type names scm_t_mutex and
6913 scm_t_cond instead of coop_m and coop_c.
6914
6915 * null-threads.c, null-threads.h: New files.
6916
6917 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6918
6919 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6920 This is to support makes that know about "$<" only in pattern
6921 rules, like Sun's make.
6922
6923 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6924
6925 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6926 substitution. Thanks to David Allouche!
6927
6928 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6929
6930 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6931 !SCM_ENABLE_DEPRECATED.
6932
6933 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6934
6935 * async.c (scm_system_async_mark_for_thread): Only call
6936 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6937 otherwise.
6938
6939 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6940 USE_THREADS is defined. Use scm_root otherwise.
6941 (scm_sigaction_for_thread): Ignore THREAD argument when
6942 USE_THREADS is not defined. Also, move THREAD argument defaulting
6943 out of HAVE_SIGACTION section, which was a bug.
6944
6945 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6946
6947 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6948 signal_handlers, not the closure that is used as the async.
6949 The closure is stored in signal_handler_cells, as previously.
6950
6951 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6952
6953 * root.h (scm_root_state): Added 'block_async' slot.
6954 (scm_active_asyncs): Removed abbrev.
6955 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6956
6957 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6958 abbrev.
6959
6960 * async.h (scm_call_with_blocked_asyncs,
6961 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6962 scm_c_call_with_unblocked_asyncs): New prototypes.
6963 (scm_mask_signals, scm_unmask_signals): Deprecated.
6964 (scm_mask_ints): Turned into a macro.
6965 * async.c (scm_mask_ints): Removed.
6966 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6967 this should not be necessary.
6968 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6969 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6970 deprecation warning and check for errornous use. Set block_asyncs
6971 instead of scm_mask_ints.
6972 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6973 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6974 scm_c_call_with_unblocked_asyncs): New.
6975
6976 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6977 Asyncs are enabled by default.
6978
6979 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6980
6981 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6982 6th element: an input waiting thunk.
6983 (sf_input_waiting): New.
6984
6985 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6986
6987 * root.c (root_mark): Mark active_asyncs slot.
6988
6989 * async.c (scm_async_click): Set the cdr of a executed handler
6990 cell to SCM_BOOL_F, not SCM_EOL.
6991 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6992 and only if the handler procedure is not already present.
6993 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6994 with SCM_BOOL_F.
6995 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6996
6997 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6998
6999 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
7000
7001 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
7002 scm_lt_dlopenext, and scm_lt_dlerror.
7003 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
7004 and scm_lt_dlerror.
7005 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
7006 and scm_lt_dlerror.
7007 (sysdep_dynl_init): switch to scm_lt_dlinit();
7008
7009 * Makefile.am (libguile_la_LIBADD): switch to use
7010 libguile-ltdl.la.
7011
7012 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
7013
7014 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
7015
7016 * scmsigs.h (scm_sigaction_for_thread): New prototype.
7017 * scmsigs.c (got_signal): Removed.
7018 (signal_handler_cells, signal_handler_threads): New.
7019 (take_signal): Queue the cell of the signal for the specified
7020 thread. Reset the signal handler on systems that don't have
7021 sigaction.
7022 (sys_deliver_signals): Removed.
7023 (close_1): New.
7024 (scm_sigaction_for_thread): Renamed from scm_sigaction and
7025 extended to also set the thread of a signal and allocate a cell
7026 for it. Keep the Scheme name "sigaction". Check that signum is
7027 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
7028 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
7029 (scm_init_scmsigs): Allocate signal_handler_cells and
7030 signal_handler_threads vectors.
7031
7032 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
7033 that system asnycs and user asyncs are separated. Reimplemented
7034 system asyncs to work per-thread.
7035
7036 * gc.c (scm_init_gc): Do not use scm_system_async.
7037
7038 * async.h (scm_asyncs_pending, scm_set_tick_rate,
7039 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
7040 Removed prototypes.
7041 (scm_i_queue_async_cell): New.
7042
7043 * __scm.h (scm_asyncs_pending_p): Removed.
7044 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
7045 scm_asyncs_pending_p.
7046
7047 * async.h (scm_system_async_mark_for_thread): New prototype.
7048
7049 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
7050
7051 * root.h (scm_root_state): Added new "active_asyncs" slot.
7052 * root.c (scm_make_root): Initialize it to SCM_EOL.
7053
7054 * coop-defs.h (coop_t): Added new "handle" slot.
7055 * coop-threads.c (all_threads, scm_current_thread,
7056 scm_all_threads, scm_i_thread_root): New.
7057 (scm_threads_init): Add main thread to all_threads.
7058 (scheme_launch_thread): Remove thread from all_threads when it
7059 terminates.
7060 (scm_call_with_new_thread): Initialize handle slot of coop_t
7061 structure and add new thread to all_threads.
7062 (scm_spawn_thread): Likewise.
7063
7064 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
7065 * threads.c (scm_current_thread, scm_all_threads): Register as
7066 primitives.
7067
7068 * dynl.c: Use scm_lt_ prefix for libltdl functions.
7069
7070 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
7071
7072 * script.c (scm_compile_shell_switches): Fix bad spelling of
7073 `explicitly' in comment.
7074
7075 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
7076
7077 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
7078 Refer to provided? in doc string rather than deprecated feature?.
7079
7080 2002-09-24 Gary Houston <ghouston@arglist.com>
7081
7082 * inline.h (scm_double_cell): prevent reordering of statements
7083 with any following code (for GCC 3 strict-aliasing).
7084 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
7085 the earlier version of the reordering prevention.
7086
7087 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7088
7089 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
7090
7091 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7092
7093 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
7094 protection.
7095
7096 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7097
7098 * inline.h: include stdio.h
7099
7100 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
7101
7102 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7103
7104 * gc-segment.c (scm_i_make_initial_segment): check user settings
7105 for sanity.
7106
7107 * gc-malloc.c (scm_gc_init_malloc): check user settings for
7108 sanity.
7109
7110 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
7111
7112 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
7113
7114 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
7115 these won't ever wrap around with high memory usage. Thanks to
7116 Sven Hartrumpf for finding this.
7117
7118 * gc-freelist.c: include <stdio.h>
7119
7120 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
7121
7122 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
7123
7124 * vectors.h (SCM_VECTOR_REF): New.
7125
7126 * snarf.h (SCM_DEFINE_PUBLIC): New.
7127
7128 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
7129
7130 * socket.c (scm_addr_vector): Added size of address to arguments.
7131 Use it to avoid accessing a non-existent path in a sockaddr_un.
7132 Changed all callers.
7133
7134 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7135
7136 * gc.h: remove DOUBLECELL card flags.
7137
7138 * gc-malloc.c (scm_calloc): try to use calloc() before calling
7139 scm_realloc().
7140
7141 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
7142 init loop; handle this from scm_init_card_freelist()
7143
7144 * gc-card.c (scm_init_card_freelist): init bit vector here.
7145
7146 * numbers.c (scm_make_real): prevent reordering of statements
7147 num2float.i.c (FLOAT2NUM): idem
7148
7149 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7150
7151 * eval.h: prepend libguile/ to include path
7152
7153 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
7154
7155 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
7156 years. Thanks to Martin Grabmüller!
7157
7158 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7159
7160 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
7161 unsigned numbers for computing minimum heap increment. This
7162 prevents weird results when a a negative minimum increment is
7163 computed.
7164
7165 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
7166
7167 * gc_os_dep.c: When we have __libc_stack_end, use that directly
7168 instead of the old tricks.
7169
7170 * guile-snarf.in: Do not expect the input file to be the first
7171 argument after the optional "-o" option, just pass everything to
7172 the pre-processor without extracting the input file name.
7173
7174 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7175
7176 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
7177 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
7178
7179 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7180
7181 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
7182 Bill Schottstaedt for the bug report
7183
7184 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
7185
7186 * print.c (scm_iprin1): Print primitives generics always as
7187 "primitive-generic" even when they have no primitive methods yet.
7188
7189 2002-08-17 Gary Houston <ghouston@arglist.com>
7190
7191 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
7192 call.
7193
7194 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7195
7196 * ports.c (scm_add_to_port_table): small bugfix.
7197
7198 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
7199 malloc.
7200
7201 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
7202 only use SCM_MIN_HEAP_SEG_SIZE.
7203
7204 * ports.c (scm_add_to_port_table): add backwards compatibility
7205 function
7206
7207 * ports.h: use scm_i_ prefix for port table and port table size.
7208
7209 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
7210
7211 * vports.c (scm_make_soft_port): Initialize pt variable.
7212
7213 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
7214
7215 * strports.h (scm_c_eval_string_in_module,
7216 scm_eval_string_in_module): New prototypes.
7217 * strports.c (scm_eval_string_in_module): New, but use
7218 "eval-string" as the Scheme name and make second parameter
7219 optional.
7220 (scm_eval_string): Implement using scm_eval_string_in_module.
7221 (scm_c_eval_string_in_module): New.
7222 Thanks to Ralf Mattes for the suggestion!
7223
7224 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7225
7226 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
7227 message and abort.
7228
7229 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
7230
7231 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
7232 stead of scm_t_port*. The function now takes a tag argument.
7233
7234 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7235
7236 * gc.h: add scm_debug_cells_gc_interval to public interface
7237
7238 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
7239
7240 * gc.c (scm_i_expensive_validation_check): separate expensive
7241 validation checks from cheap ones.
7242
7243 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7244
7245 * read.c (scm_input_error): new function: give meaningful error
7246 messages, and throw read-error
7247
7248 * gc-malloc.c (scm_calloc): add scm_calloc.
7249
7250 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7251
7252 * tags.h: remove GC bits documentation from the tags table.
7253
7254 * read.c (INPUT_ERROR): Prepare for file:line:column error
7255 messages for errors in scm_lreadr() and friends.
7256
7257 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7258
7259 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
7260 implementation).
7261 (scm_gc_calloc): new function
7262
7263 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7264
7265 * ports.c (scm_new_port_table_entry): init port entry to 0
7266 completely.
7267
7268 * ports.c (scm_new_port_table_entry): change function from
7269 scm_add_to_port_table. This prevents cells with null-pointers from
7270 being exposed to GC.
7271
7272 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
7273 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
7274
7275 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
7276 to gc-stats.
7277
7278 * numbers.c (big2str): return "0" for 0 iso. ""
7279
7280 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
7281 private-gc.h: new file
7282
7283 * gc.c: completely revised and cleaned up the GC. It now uses lazy
7284 sweeping. More documentation in workbook/newgc.text
7285
7286 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7287
7288 * random.c (rstate_free): Return zero.
7289
7290 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7291
7292 * environments.c (remove_key_from_alist): Removed.
7293
7294 (obarray_remove): Simplified.
7295
7296 2002-07-24 Stefan Jahn <stefan@lkcc.org>
7297
7298 * continuations.h: ia64: Include <signal.h> before
7299 <sys/ucontext.h>.
7300
7301 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7302
7303 * modules.c (scm_sym2var): Don't compare SCM values with ==.
7304
7305 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7306
7307 * goops.c (scm_compute_applicable_methods): use
7308 scm_remember_upto_here_1 iso scm_remember_upto_here
7309
7310 * macros.c: include deprecation.h
7311
7312 * vectors.c (scm_vector_move_right_x): remove side effect in
7313 macro arg.
7314 (scm_vector_move_left_x): idem.
7315
7316 * net_db.c, posix.c, socket.c: variable naming: change ans to
7317 result.
7318
7319 * sort.c (scm_merge_vector_x): accept vector as argument
7320 iso. SCM*. This is needed for full GC correctness.
7321
7322 * gc.h: undo previous undocumented changes related to #ifdef
7323 GENGC.
7324
7325 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7326
7327 * *.c: add space after commas everywhere.
7328
7329 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
7330 Document cases where SCM_WRITABLE_VELTS() is used.
7331
7332 * vectors.h (SCM_VELTS): prepare for write barrier, and let
7333 SCM_VELTS() return a const pointer
7334 (SCM_VECTOR_SET): add macro.
7335
7336 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7337
7338 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
7339 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
7340 Deprecated the special kind of built-in dynamic syntax transformer
7341 that was inaccurately named "macro". Note: The built-in syntax
7342 transformers that are named "mmacro" or "memoizing-macro" still
7343 exist, and it is these which come much closer to what one would
7344 call a macro.
7345
7346 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
7347
7348 * eval.c (unmemocopy): Fix for
7349 1001-local-eval-error-backtrace-segfaults (unmemoization crash
7350 with internal definitions and local-eval).
7351
7352 2002-07-12 Gary Houston <ghouston@arglist.com>
7353
7354 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
7355 defined. They don't do anything useful, especially since the
7356 only case where DYNAMIC_LINKING is undefined seems to be
7357 when --with-modules=no is given to configure, which is basically
7358 requesting that the "dynamic linking module" be omitted.
7359
7360 * Makefile.am (libguile_la_SOURCES): move dynl.c from
7361 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
7362
7363 * extensions.c (load_extension): check DYNAMIC_LINKING for
7364 scm_dynamic_call.
7365 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
7366 scm_init_dynamic_linking.
7367
7368 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7369
7370 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7371 check for Cygwin when including <winsock2.h>, this is already
7372 check for by configure. Thus, revert change from 2002-07-07.
7373
7374 2002-07-10 Gary Houston <ghouston@arglist.com>
7375
7376 * eq.c: include <string.h>
7377 * dynl.c: docstring editing.
7378
7379 2002-07-09 Gary Houston <ghouston@arglist.com>
7380
7381 * dynl.c (scm_dynamic_call): docstring editing.
7382
7383 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7384
7385 * gc_os_dep.c: HURD fixes.
7386
7387 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7388
7389 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7390
7391 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7392 this should be compiled for BUILD host.
7393 Override default rule for
7394 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7395 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7396 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7397
7398 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7399 <winsock2.h> on Cygwin even when we have it.
7400
7401 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7402
7403 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7404 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7405 the code. Full number of arguments checking of closures is
7406 mandatory now. However, the option to disable the checking has
7407 most probably not been used anyway.
7408
7409 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7410
7411 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7412 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7413 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7414 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7415 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7416 (scm_source_properties, scm_set_source_properties_x,
7417 scm_source_property): Removed compile time option SCM_RECKLESS to
7418 clean up the code. Full number of arguments checking of closures
7419 is mandatory now. However, the option to disable the checking has
7420 most probably not been used anyway.
7421
7422 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7423 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7424
7425 2002-06-30 Gary Houston <ghouston@arglist.com>
7426
7427 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7428 do anything useful. Added a comment about need for a mutex if
7429 pre-emptive threading is supported.
7430
7431 * posix.c (scm_convert_exec_args), dynl.c
7432 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7433 allocate_string_pointers. 2) simplified: don't reallocate the
7434 strings, just make an array of pointers 3) avoid memory leaks on
7435 error 4) let the procedure report errors in its own name.
7436 Consequences: 1) the procedures now assume that SCM strings are
7437 nul-terminated, which should always be the case. 2) Since strings
7438 are not reallocated, it's now possible for strings passed to
7439 dynamic-args-call to be mutated.
7440
7441 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7442
7443 * __scm.h, eval.c, eval.h: Removed compile time option
7444 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7445 variable positions during memoization is mandatory. However, the
7446 option to disable the caching has most probably not been used
7447 anyway.
7448
7449 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7450
7451 * print.c (scm_simple_format): Print missing part of format before
7452 ~% control. Thanks to Daniel Skarda!
7453
7454 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7455
7456 * mkstemp.c: Added exception notice to license statement.
7457
7458 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7459
7460 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7461 it is represented as a floating point value so that we can change
7462 its sign.
7463
7464 From John W. Eaton <jwe@bevo.che.wisc.edu>
7465
7466 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7467
7468 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7469
7470 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7471 in addition to `i386'. Thanks to Dale P. Smith.
7472
7473 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7474
7475 * eq.c (real_eqv): New.
7476 (scm_eqv_p): Use it when comparing reals and complexes.
7477
7478 * numbers.c: Include <string.h>, for strncmp.
7479 (mem2complex): Do not create negative NaNs.
7480 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7481 NaN.
7482 (scm_inexact_to_exact): Signal error when converting a NaN.
7483
7484 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7485
7486 * posix.c (scm_putenv): Handle removing variables explicitely by
7487 calling unsetenv.
7488
7489 From John W. Eaton.
7490
7491 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7492 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7493 and scm_nan.
7494 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7495 [SCO && ! HAVE_ISINF] (isinf): New function.
7496 (xisinf, xisnan): New functions.
7497 (IS_INF): Delete.
7498 (isfinite): Define in terms of xisinf.
7499 (scm_inf_p, scm_nan_p): New functions.
7500 (guile_Inf, guile_NaN): New file-scope vars.
7501 (guile_ieee_init): New function.
7502 (scm_inf, scm_nan): New functions.
7503 (idbl2str): Handle Inf and NaN. Remove funny label and
7504 corresponding gotos.
7505 (ALLOW_DIVIDE_BY_ZERO): New macro.
7506 (scm_divide): Allow division by zero to occur if
7507 ALLOW_DIVIDE_BY_ZERO is defined.
7508 Handle bignums and ints as special cases.
7509
7510 Additional stuff by me:
7511
7512 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7513 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7514 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7515 NaN. They will provide their own sign.
7516 (scm_divide): Only allow divides by inexact zeros. Dividing by
7517 exact zeros still signals an errors.
7518
7519 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7520
7521 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7522 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7523 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7524 Thanks to Andreas Rottmann.
7525
7526 2002-04-20 Gary Houston <ghouston@arglist.com>
7527
7528 * removal of unused fields in root state (thanks to Christopher
7529 Cramer for pointing out the disuse.)
7530 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7531 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7532
7533 * root.c (root_mark): don't mark them.
7534 (scm_make_root): don't set them to #f.
7535 * init.c (scm_init_standard_ports): don't initialise with the
7536 default ports.
7537
7538 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7539
7540 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7541 cpp_sig_symbols.c.
7542
7543 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7544
7545 * guile-snarf.in: Do not clean input file. This would write to
7546 the $(srcdir) during a VPATH build, which is not allowed. It also
7547 isn't needed since it only works when an output filename has been
7548 specified and in that case we don't need to clean the input file
7549 because the output file will already exist.
7550
7551 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7552
7553 * guile-snarf: Install the trap for removing $cleanfile only when
7554 the value of $cleanfile is actually known.
7555
7556 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7557
7558 * .cvsignore: add versiondat.h and *.c.clean.c.
7559
7560 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7561
7562 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7563 function, replaces macro SRCBRKP.
7564
7565 (SRCBRKP): Deprecated.
7566
7567 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7568 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7569 temporary variable.
7570
7571 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7572
7573 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7574 CHECK_EXIT and removed all references to them.
7575
7576 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7577
7578 * debug.h (scm_ready_p, debug_print): Removed declarations.
7579
7580 * eval.c (EVALCELLCAR): Removed.
7581
7582 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7583 operation from condition.
7584
7585 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7586
7587 * guile-snarf.in: When the output filename is "-", write to
7588 stdout. When no "-o" option is given, use "-" as the output
7589 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7590 output file on error when the output file name is not "-". Define
7591 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7592
7593 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7594
7595 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7596
7597 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7598 and the corresponding goto statements. Removed redundant code.
7599
7600 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7601
7602 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7603 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7604 Re-enabled handing of rpsubrs and asubrs.
7605
7606 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7607
7608 * eval.c (SIDEVAL): Removed.
7609
7610 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7611 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7612 argument checking order for set! to locals, variables and symbols.
7613 Improvements to control structure. Removed some uses of arg1 and
7614 arg2 as temporary variables.
7615
7616 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7617
7618 * guile-snarf.in: Remove "--compat=1.4" support.
7619 Add "-d" and "-D" support.
7620
7621 (deprecated_list): New var.
7622 (compat_mode_clean_xxx): Delete.
7623 (grep_deprecated): New func.
7624 ("main"): If "-d" or "-D", call `grep_deprecated'.
7625
7626 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7627
7628 * hooks.h: Change scm_t_c_hookype_t everywhere to
7629 scm_t_c_hook_type.
7630
7631 Docstring fixes:
7632
7633 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7634
7635 * ports.c (scm_sys_make_void_port): Use `@file'.
7636
7637 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7638 than `else'.
7639
7640 * macros.c (scm_makmacro): Don't say that the form replaces its
7641 source, because it doesn't.
7642 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7643
7644 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7645 scm_select, scm_basename), goops.c (scm_method_generic_function),
7646 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7647 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7648 spelling mistakes.
7649
7650 * debug.c (scm_debug_options), eval.c
7651 (scm_eval_options_interface), read.c (scm_read_options): Change
7652 incorrect @var in docstring to @code.
7653
7654 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7655
7656 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7657
7658 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7659 guile-snarf can remove trailing non-init code.
7660
7661 * guile-snarf.in (modern_snarf): Remove everything following and
7662 including "^:^" from the output.
7663
7664 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7665
7666 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7667
7668 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7669
7670 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7671
7672 * guile-snarf.in: Update copyright.
7673 Rewrite to internalize error handling.
7674 Add "--compat=1.4" handling.
7675 Add commentary.
7676
7677 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7678 (snarfcppopts): New var.
7679 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7680 (.c.doc): Use $(snarfcppopts).
7681
7682 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7683 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7684 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7685 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7686 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7687 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7688 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7689 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7690 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7691 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7692 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7693 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7694 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7695 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7696
7697 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7698
7699 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7700 The next step will be to remove the union 't' and simplify the
7701 code of SCM_CEVAL that way.
7702
7703 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7704
7705 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7706 rreadfds, rwritefds, rexceptfds): Made static.
7707
7708 * gc.c (terminating), fports.c (terminating): Renamed
7709 scm_i_terminating.
7710
7711 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7712
7713 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7714 potential overflow problems. Thanks to John W Eaton!
7715
7716 * strop.c (string_capitalize_x): Treat characters as unsigned so
7717 that 8-bit chars work. Thanks to David Pirotte!
7718
7719 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7720
7721 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7722 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7723 proc as temporary variables. Introduced temporary variables with
7724 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7725 by a more explicit predicate in some places.
7726
7727 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7728
7729 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7730 Added lots of comments regarding the implementation of #@dispatch.
7731 Changed intra-procedure communication to use t.arg1 instead of
7732 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7733 variables. Introduced temporary variables with hopefully
7734 descriptive names for clarification. Replaced SCM_N?IMP by a more
7735 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7736 of computing the expression explicitly. Eliminate now unused
7737 label nontoplevel_cdrxbegin.
7738
7739 * goops.h (SCM_INSTANCE_HASH): New macro.
7740
7741 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7742
7743 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7744
7745 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7746 "guile-snarf" moved back from `noinst_SCRIPTS'.
7747
7748 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7749
7750 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7751 exists when adding a source property other than those that are
7752 handled explicitly, add the new property to the SRCPROPS obj's
7753 plist.
7754
7755 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7756 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7757
7758 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7759 debug.status. It isn't needed, and it can overflow the bits
7760 reserved for it (which may lead to a segv or a GC abort).
7761
7762 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7763
7764 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7765 side-effecting operations from conditions and macro calls.
7766 Replaced SCM_N?IMP by a more explicit predicate in some places.
7767 Minimized the scope of some variables.
7768
7769 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7770
7771 * convert.i.c: Fixed int <-> long conversions which would have
7772 failed if their sizes were different.
7773
7774 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7775
7776 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7777 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7778 as temporary variables. Removed side-effecting operations from
7779 conditions and macro calls. Introduced temporary variables with
7780 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7781 by a more explicit predicate in some places. Removed code that
7782 was conditionally compiled if SICP was defined - which it never
7783 is.
7784
7785 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7786
7787 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7788 Removed some uses of t.arg1 and proc as temporary variables.
7789 Removed side-effecting operations from conditions and macro calls.
7790 Introduced temporary variables with hopefully descriptive names
7791 for clarification. Replaced SCM_N?IMP by a more explicit
7792 predicate in some places.
7793
7794 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7795
7796 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7797 explicit predicate in some places.
7798
7799 (CHECK_EQVISH): Removed.
7800
7801 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7802 variables. Removed side-effecting operations from conditions and
7803 macro calls. Introduced temporary variables for clarification.
7804 Sorted if-else-if check for the type of the last form in a list by
7805 frequency. Avoided some unnecessary tail-recursion calls.
7806
7807 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7808
7809 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7810 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7811 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7812 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7813 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7814 naming scheme for types.
7815
7816 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7817 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7818 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7819 (scm_make_environment), eval.c (scm_closure), fports.c
7820 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7821 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7822 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7823 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7824 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7825 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7826 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7827 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7828 scm_alloc_cell to scm_cell.
7829
7830 * environments.c (core_environments_observe), gc.c
7831 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7832 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7833 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7834 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7835 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7836 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7837 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7838 scm_double_cell.
7839
7840 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7841
7842 * convert.i.c, convert.c: Better range checking.
7843
7844 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7845
7846 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7847 Windows (MinGW).
7848
7849 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7850
7851 * Makefile.am: Update path to pre-inst-guile automake frag.
7852
7853 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7854
7855 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7856 features are excluded.
7857
7858 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7859
7860 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7861
7862 2002-02-25 Gary Houston <ghouston@arglist.com>
7863
7864 * convert.c: include <string.h> for convert_i.c.
7865
7866 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7867
7868 * .cvsignore: add stamp-h1.
7869
7870 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7871
7872 * unif.c (scm_array_to_list): Correct name, which had been
7873 accidentally changed to scm_t_arrayo_list!
7874
7875 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7876
7877 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7878 underflowing scm_mallocated.
7879
7880 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7881
7882 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7883 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7884 Reimplemented using the new scm_gc_malloc, etc., functions and
7885 deprecated.
7886
7887 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7888
7889 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7890 to `noinst_PROGRAMS'.
7891 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7892 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7893
7894 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7895
7896 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7897 non-zero is returned from a port or smob free function.
7898 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7899 scm_gc_register_collectable_memory,
7900 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7901 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7902
7903 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7904 debug-malloc.c, dynl.c, environments.c, environments.h,
7905 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7906 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7907 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7908 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7909 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7910 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7911 appropriate. Return zero from smob and port free functions.
7912
7913 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7914
7915 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7916 messages while the GC is running.
7917 (scm_c_issue_deprecation_warning_fmt): New.
7918
7919 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7920 it is pointing to the putback buffer.
7921
7922 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7923
7924 * gsubr.c (create_gsubr): On "too many args" error,
7925 also display arg count and name. Thanks to Bill Schottstaedt.
7926
7927 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7928
7929 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7930
7931 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7932 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7933 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7934
7935 * guile-snarf-docs-texi.in: Bye bye.
7936
7937 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7938
7939 * symbols.c (scm_make_symbol): Fix typo in docstring.
7940
7941 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7942 scm_make_symbol): New prototypes.
7943
7944 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7945
7946 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7947 (SCM_SYMBOL_INTERNED_P): New.
7948 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7949 SCM_MAKINUM since hash values can well be bignums.
7950 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7951 This signals a interned symbol.
7952 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7953 scm_make_symbol): New.
7954
7955 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7956
7957 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7958
7959 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7960 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7961 Thanks to Dave Love.
7962
7963 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7964
7965 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7966 This might help to make unintended clashes less likely.
7967 (scm_string_to_symbol): Protect the string until the symbols is
7968 created.
7969
7970 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7971
7972 * convert.c, convert.h, convert.i.c: New files containing C
7973 array to Scheme conversion helpers meant to be replacement
7974 functions for the deprecated gh interface.
7975
7976 * Makefile.am: Setup rules for new `convert.*' files.
7977
7978 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7979
7980 * symbols.c (scm_c_symbol2str): New function, replacement for
7981 `gh_scm2newsymbol()'.
7982
7983 * strings.c (scm_c_substring2str): New function. Proper
7984 replacement for `gh_get_substr()'.
7985
7986 * socket.c: Include `stdint.h' if available for the `uint32_t'
7987 declaration.
7988
7989 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7990 compiler warning).
7991
7992 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7993
7994 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7995
7996 Other changes unrelated to Elisp...
7997
7998 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7999 "if".
8000 (comments): Fix a few typos.
8001 (scm_for_each): Add parentheses around oddly unparenthesized
8002 if/while conditions.
8003
8004 * read.c (scm_read_opts): Add full stop at end of doc for
8005 `keywords' option.
8006
8007 * script.c (scm_compile_shell_switches): Use scm_str2symbol
8008 instead of gh_symbol2scm.
8009
8010 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
8011 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
8012
8013 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
8014 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
8015
8016 First batch of changes for Elisp support...
8017
8018 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
8019 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
8020 throw.c, vectors.c, weaks.c: Add #include for lang.h.
8021
8022 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
8023 conditionalize compilation and initialization of Elisp support
8024 function.
8025
8026 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
8027 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
8028 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
8029 filesys.c (fill_select_type, retrieve_select_type), fluids.c
8030 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
8031 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
8032 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
8033 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
8034 options.c (change_option_setting, scm_options), posix.c
8035 (environ_list_to_c), print.c (scm_iprlist), throw.c
8036 (scm_exit_status), vectors.c (scm_vector), weaks.c
8037 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
8038
8039 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
8040 just SCM_FALSEP.
8041
8042 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
8043 of just SCM_BOOLP.
8044
8045 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
8046 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
8047 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
8048 (scm_m_atfop): Support function aliasing. Support both function
8049 args, which need transformation, and macro args, which do not.
8050 Add explanatory comments.
8051 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
8052 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
8053 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
8054 SCM_NULLP || SCM_NILP instead of checks against (removed)
8055 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
8056 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
8057
8058 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
8059 scm_m_while, scm_nil_eq): Commented out; I don't think we need
8060 these, but I don't want to remove them yet, just in case.
8061 (scm_init_lang): Define `%nil' variable on Scheme level to hold
8062 Elisp nil value.
8063
8064 * lang.h (SCM_NILP): Test against Elisp nil value instead of
8065 against (removed) scm_lisp_nil.
8066 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
8067 (SCM_NULL_OR_NIL_P): New.
8068
8069 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
8070 SCM_VALIDATE_NULL.
8071
8072 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
8073 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
8074 value).
8075
8076 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
8077 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
8078 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
8079 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
8080
8081 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
8082 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
8083 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
8084 Numbering shifted down accordingly.
8085 (SCM_ELISP_NIL): New IFLAG.
8086
8087 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
8088
8089 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8090
8091 * eval.c: Removed outdated references to "everr". Improved some
8092 comments.
8093
8094 (scm_deval_args, deval_args): Renamed scm_deval_args to
8095 deval_args, since it is not part of the interface.
8096
8097 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
8098 use references to debug.vect[0] before it exists. Add parentheses
8099 to switch statement.
8100
8101 * goops.h: Added local emacs variables.
8102
8103 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8104
8105 * eval.[ch] (scm_deval_args): Made static.
8106
8107 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
8108 test.
8109
8110 * strings.c (scm_c_string2str): Clarified comment. Replaced
8111 THINKME by FIXME for uniformness. Removed question about whether
8112 arguments need to be protected from garbage collection: Arguments
8113 must be protected as any other variable.
8114
8115 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8116
8117 * procs.h (SCM_CLOSURE_BODY): New Macro.
8118
8119 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
8120 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
8121 get_slot_value, set_slot_value), procs.c
8122 (scm_procedure_documentation), sort.c (closureless), stacks.c
8123 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
8124 SCM_CLOSURE_BODY.
8125
8126 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
8127
8128 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
8129
8130 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
8131 use "cp" instead.
8132
8133 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
8134
8135 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
8136 everywhere.
8137
8138 * continuations.c (scm_make_continuation): Do not retain the
8139 throw_value when the continuation is invoked.
8140
8141 2001-12-08 Stefan Jahn <stefan@lkcc.org>
8142
8143 * strings.c (scm_c_string2str): New function. Converts a
8144 given Scheme string into a C string. Also put in two
8145 THINKME's regarding the malloc policy for the missing converter
8146 routines.
8147
8148 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
8149
8150 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
8151 gh_symbol2scm.
8152
8153 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8154
8155 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
8156 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
8157
8158 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
8159 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
8160 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
8161 macros.
8162
8163 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
8164
8165 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
8166 SCM_GC_CELL_* macros when accessing free cells.
8167
8168 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
8169
8170 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
8171 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
8172 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
8173 * strings.h (SCM_MAKE_STRING_TAG): New.
8174 * procs.h (SCM_MAKE_CCLO_TAG): New.
8175 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
8176
8177 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
8178 !SCM_ENABLE_DEPRECATED.
8179
8180 * async.c, async.h (scm_system_async_mark_from_signal_handler):
8181 New.
8182
8183 * scmsigs.c (scm_take_signal): Removed all code that assumes that
8184 signal handlers are allowed to divert the flow of control. Call
8185 scm_system_async_mark_from_signal_handler instead of
8186 scm_system_async_mark.
8187
8188
8189 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
8190 scm_alloc_double_cell in their place.
8191
8192 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
8193 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
8194 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8195 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
8196 scm_deprecated_newcell and scm_deprecated_newcell2.
8197
8198 gc.c (scm_tc16_allocated): Only define when including deprecated
8199 features.
8200 (scm_debug_newcell, scm_debug_newcell2): Removed.
8201 (scm_init_storage): Do not initialize scm_tc16_allocated.
8202 (scm_init_gc): Do it here.
8203 (allocated_mark): New, from old code.
8204 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8205
8206 * inline.c, inline.h: New files.
8207 * Makefile.am: Added them in all the right places.
8208
8209 * _scm.h: Include "libguile/inline.h".
8210
8211 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
8212 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
8213 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
8214 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
8215 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
8216 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
8217 scm_alloc_double_cell, respectively.
8218
8219 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
8220
8221 * modules.c (scm_c_use_module): Adapt to changes to
8222 `process-use-modules'.
8223
8224 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8225
8226 * numbers.c (scm_divide): Fix more division by zero errors.
8227
8228 2001-11-21 Gary Houston <ghouston@arglist.com>
8229
8230 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
8231 obsolete. autogen.sh says:
8232 invalid unused variable name: `OMIT_DEPENDENCIES'
8233
8234 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8235
8236 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
8237 reporting the bug.
8238
8239 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
8240
8241 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
8242 Thanks to Eric Gillespie, Jr!
8243
8244 2001-11-21 Stefan Jahn <stefan@lkcc.org>
8245
8246 * win32-socket.c (getservent, setservent, endservent,
8247 getprotoent, setprotoent, endprotoent): New functions.
8248 Appropriate replacements for M$-Windows.
8249
8250 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
8251 these definitions for GUILE_DEBUG.
8252
8253 * net_db.c: Include "win32-socket.h" if compiling with a native
8254 M$-Windows compiler. Include some pieces of code (protoent and
8255 servent interface) protected by HAVE_* macros when using a
8256 native M$-Windows compiler.
8257
8258 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
8259
8260 * modules.c (scm_c_export): Do nothing when the first argument is
8261 already the terminating NULL. Thanks to Han-Wen Nienhuys!
8262
8263 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
8264
8265 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
8266 also include `buildstamp'.
8267
8268 2001-11-18 Rob Browning <rlb@defaultvalue.org>
8269
8270 * version.c
8271 (s_scm_major_version): use SCM_MAJOR_VERSION.
8272 (s_scm_minor_version): use SCM_MINOR_VERSION.
8273 (s_scm_micro_version): use SCM_MICRO_VERSION.
8274 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
8275 SCM_MICRO_VERSION.
8276
8277 * version.h.in
8278 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
8279 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
8280 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
8281
8282 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
8283
8284 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8285 Rewrite docstrings without reference to substring-move-left/right,
8286 since the latter no longer exist.
8287
8288 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8289
8290 * eval.c: Removed bogus comment about acros.
8291
8292 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
8293 Minimize scope of local variable. Eliminate dependency on
8294 macro DEBUG_EXTENSIONS.
8295
8296 (s_splicing): New error message string.
8297
8298 (scm_m_body): Issue 'bad body' message rather than 'missing
8299 expression' message.
8300
8301 (scm_m_quote): Eliminate unnecessary copying.
8302
8303 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
8304 checking of the body to scm_m_body.
8305
8306 (scm_m_do): Move comment to function header. Rename arg1 to
8307 binding. Made the code a bit easier to read.
8308
8309 (evalcar): Removed.
8310
8311 (iqq): Added a comment. Changed the depth parameter to
8312 unsigned. Use size_t for vector lengths. Make sure vector object
8313 is gc protected as long as its contents are read. Add some syntax
8314 checks. Get rid of unnecessary SCM_IMP test. Clean up the
8315 control structure a bit.
8316
8317 (scm_m_delay): Added comment about the implementation of
8318 scm_m_delay.
8319
8320 (scm_m_define): Add comment about guile's currying define
8321 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
8322 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
8323
8324 (scm_m_letrec1): Removed. Part of the functionality is taken
8325 over by the new function 'transform_bindings'.
8326
8327 (transform_bindings): New function. Takes over some of the
8328 functionality of removed function 'scm_m_letrec1', namely to split
8329 a list of bindings into a reversed list of variables and a list of
8330 initializers.
8331
8332 (scm_m_letrec): Call 'transform_bindings'.
8333
8334 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
8335 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
8336 test. Use 'transform_bindings'. Fixed scoping error with named
8337 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
8338 Jerram for suggesting the fix). Cleaned up the control structure
8339 a bit.
8340
8341 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
8342 unnecessary consing. Eliminated unnecessary
8343 SCM_DEFER/ALLOW_INTS.
8344
8345 (SCM_CEVAL): Un-obfuscated some loops.
8346
8347 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
8348
8349 * gc.h (scm_unhash_name): Old declaration removed.
8350
8351 * eval.c (s_scm_eval): Change @var{primitive-eval} to
8352 @code{primitive-eval}.
8353
8354 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
8355 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
8356 Change @deffnx lines in docstrings to say {Scheme Procedure}
8357 rather than primitive or procedure.
8358
8359 * posix.c (scm_execl), filesys.c (scm_close), unif.c
8360 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
8361 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
8362 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
8363 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
8364 (scm_string_split, scm_string_ci_to_symbol), strings.c
8365 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
8366 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8367 Docstring fixes and improvements reflecting edits that have been
8368 made in the reference manual source.
8369
8370 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8371 scm_object_property, scm_set_object_property_x): Remove invalid
8372 @deffnx lines for corresponding procedure property primitives.
8373
8374 These changes add a @deffnx C function declaration and function
8375 index entries for each Guile primitive to the copy of the doc
8376 snarf output that is used for reference manual synchronization.
8377 Online help is unchanged.
8378
8379 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8380 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8381 name to SCM_SNARF_DOCS.
8382
8383 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8384 snarf-check-and-output-texi.
8385
8386 * Makefile.am (guile-procedures.texi): New rule.
8387 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8388 Changed so that the last stage of doc snarfing is now performed
8389 twice, once to produce guile-procedures.txt for online help, and
8390 once to produce guile.texi for reference manual synchronization.
8391
8392 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8393
8394 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8395 safely usable as a single statement followed by a ';', for example
8396 in an if statement.
8397
8398 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8399
8400 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8401
8402 * random.c (scm_random_solid_sphere_x,
8403 scm_random_hollow_sphere_x): Correct "shere" typos.
8404
8405 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8406
8407 * version.c (scm_version): Update docstring to include
8408 `micro-version'.
8409
8410 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8411
8412 * modules.c (scm_c_export): Call va_end after collecting the
8413 symbols.
8414
8415 * strop.h, strop.c (scm_substring_move_left_x,
8416 scm_substring_move_right_x): Removed.
8417
8418 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8419 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8420 configure does.
8421
8422 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8423
8424 * numbers.c: Document macros to define when including
8425 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8426 now rely on SIZEOF_ macros that have been figured out at
8427 configure time.
8428
8429 * num2integral.i.c: Adapt to new interface.
8430 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8431 target type by casting it and checking whether it is still the
8432 same. Do not try to handle bignums for integral types that are
8433 smaller than fixnums. When handling bignums, collect the
8434 magnituse first into a unsigned type, and correctly check for
8435 overflow.
8436 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8437 only -MIN_VALUE can still be negative of all negative numbers (in
8438 twos-complement).
8439
8440 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8441
8442 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8443 HAVE_LONG_LONG depending on whether their size is non-zero.
8444
8445 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8446
8447 * strop.c (scm_string_null_p): Docfix; nfc.
8448 Thanks to Scott Lenser.
8449
8450 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8451
8452 * extensions.c (scm_load_extension): Canonicalize docstring
8453 whitespace.
8454
8455 * unif.c (scm_uniform_array_write), ports.c
8456 (scm_current_output_port, scm_force_output), dynwind.c
8457 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8458 filesys.c (scm_open, scm_lstat), struct.c
8459 (scm_make_struct_layout), random.c (scm_random,
8460 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8461 (scm_i_index): Remove superfluous whitespace from end of docstring
8462 lines.
8463
8464 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8465 strings.c (scm_make_string), variable.c (scm_make_variable,
8466 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8467 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8468 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8469 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8470 newline at end of docstrings.
8471
8472 * modules.c (scm_set_current_module): Add missing newline to
8473 docstring.
8474
8475 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8476
8477 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8478 and makes them available through Guile. That is because the
8479 Winsock-API does not store its errors in `errno' and thus cannot
8480 return error messages via `strerror (errno)'.
8481
8482 * socket.c (scm_init_socket): Initialize `win32-socket' part
8483 here under M$-Windows.
8484
8485 * numbers.h: Added missing declaration of
8486 `scm_sys_check_number_conversions()'.
8487
8488 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8489 and use in `(strerror)' and `(system-error)'.
8490
8491 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8492 `win32-socket.[ch]' to extra source and header files.
8493
8494 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8495
8496 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8497 a call to turn-on-debugging when --debug has been given instead of
8498 turning it on directly. Also, handle new `--no-debug' option,
8499 which might suppress the call to turn-on-debugging.
8500
8501 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8502
8503 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8504
8505 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8506
8507 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8508 here (was at guile_LDADD) which describes the dependency
8509 correctly and allows a clean build on Win32.
8510
8511 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8512 into FOO.
8513
8514 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8515 import macros for external libraries (libcrypt, libqthreads,
8516 libreadline and libregex).
8517
8518 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8519
8520 * posix.c (flock): Added support for flock() in M$-Windows.
8521
8522 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8523 of __SCM_IMPORT__.
8524
8525 * fports.c (getflags): Differentiate reading and writing pipes
8526 descriptors.
8527
8528 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8529 M$-Windows.
8530
8531 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8532 conditionalized error code if `ETIMEDOUT' is not available.
8533 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8534 timeout'.
8535
8536 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8537 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8538 each inclusion of `num2integral.i.c'.
8539 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8540
8541 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8542
8543 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8544 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8545
8546 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8547
8548 * print.c (scm_iprin1): Mark print state as revealed when
8549 dispatching to generic write or display.
8550
8551 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8552
8553 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8554
8555 Support for native Win32. Thanks to Stefan Jahn!
8556
8557 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8558 and win32-dirent.h to extra source and header files. These
8559 include the uname() and the POSIX dirent interface implementation
8560 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8561 linkers which do not allow unresolved symbols inside shared
8562 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8563 dependency.
8564
8565 * __scm.h: Defined SCM_API. This macro gets prepended to all
8566 function and data definitions which should be exported or imported
8567 in the resulting dynamic link library in the Win32 port.
8568
8569 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8570 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8571 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8572 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8573 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8574 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8575 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8576 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8577 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8578 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8579 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8580 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8581 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8582 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8583 vports.h, weaks.h:
8584 Prefixed each each exported symbol with SCM_API.
8585
8586 * continuations.c: Added comment about the use of the extern
8587 declarations of {get,set}context() functions used in the ia64 port.
8588
8589 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8590 is meant to be a `unsigned long *'.
8591
8592 * filesys.c: Include `direct.h' if possible. Use local
8593 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8594 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8595 able to differentiate between sockets and other file descriptors.
8596 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8597 `scm_dirname()'.
8598
8599 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8600 statement block in `scm_fport_buffer_add()'.
8601 Some corrections in `getflags()'.
8602
8603 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8604
8605 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8606 build on Win32. Disable preloaded symbols on Win2 platforms.
8607
8608 * ioext.c, ports.c: Include `io.h' is possible.
8609
8610 * mkstemp.c: Include `process.h' is possible.
8611
8612 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8613 too.
8614 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8615
8616 * posix.c: Remove unnecessary dirent includes and defines. Include
8617 local `win32-uname.h' for MinGW. Extern declaration of
8618 `mkstemp()' for systems where it does not exists. Make
8619 `getlogin()' available on M$-Windows.
8620
8621 * scmsigs.c: Made `usleep()' avalable on MinGW.
8622
8623 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8624
8625 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8626
8627 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8628
8629 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8630
8631 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8632 Don't apply scm_uniform_vector_length on arrays.
8633
8634 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8635
8636 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8637 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8638 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8639 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8640 scm_list_<n> over scm_cons[2]?.
8641
8642 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8643 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8644 SCM_C[AD][AD]R instead of explicit form.
8645
8646 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8647 comparison parameters.
8648
8649 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8650 !SCM_NULLP instead of SCM_NIMP.
8651
8652 (scm_m_case): Don't copy the form. Renamed proc to clause and
8653 minimized its scope. Renamed x to clauses. Removed side
8654 effecting operation from macro call.
8655
8656 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8657 minimized its scope. Renamed x to clauses. Minimized the scope
8658 of variable 'len'. Make sure the else clause is treated specially
8659 even in case of '=>' occurences. Don't change the else to #t in
8660 order to be able to distinguish this case in the evaluator. Leave
8661 type checking of the recipient to the evaluator.
8662
8663 (scm_c_improper_memq): Made the comment somewhat clearer.
8664
8665 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8666 test for SCM_IM_LET at the place of the formal parameters.
8667 Simplified the formal parameter checking.
8668
8669 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8670 Renamed arg1 to binding and minimized its scope. Eliminated
8671 unnecessary consing.
8672
8673 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8674 variable 'len'.
8675
8676 (build_binding_list): New static function.
8677
8678 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8679 Further, split up the 'letrec' unmemoizing code to the
8680 corresponding parts for 'do', 'let' and 'letrec', adding comments
8681 to each form. Cleanup the handling of the do form (This removes
8682 some *real* code :-).
8683
8684 (SCM_CEVAL): Removed side effecting operation from macro call.
8685 Handle the 'else clause of the 'cond form specially - the symbol
8686 'else is not replaced with #t any more.
8687
8688 2001-10-14 Gary Houston <ghouston@arglist.com>
8689
8690 * version.c (scm_version): use sprintf instead of snprintf,
8691 for portability. thanks to Bill Schottstaedt.
8692
8693 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8694
8695 * read.c (scm_lreadr): When user-defined hash procedure returns
8696 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8697 an exception. (This prevents parsing of uniform vectors from
8698 interfering with parsing of numbers.)
8699
8700 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8701
8702 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8703 PTRDIFF_MIN. Thanks to Ken Raeburn.
8704
8705 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8706
8707 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8708
8709 * eval.c (scm_m_atbind): First try to find the variable without
8710 defining it locally; when it has not been found, define it
8711 locally.
8712
8713 * modules.c (module_variable): Pass over variables that exist but
8714 are unbound.
8715
8716 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8717
8718 * backtrace.c (display_backtrace_file_and_line): Only use
8719 scm_basename when POSIX support is compiled in. Thanks to Chris
8720 Cramer.
8721
8722 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8723
8724 * numbers.c (mem2uinteger): Return number read so far when coming
8725 across a hexdigit after having read a # or if not reading a hex
8726 value. This will enable the calling code to correctly handle
8727 forms like 1e2. (The background is, that the exponent markers d,
8728 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8729 providing this patch.
8730
8731 (mem2complex): Fix erroneous double-negation. Now, numbers like
8732 1-i will be read correctly.
8733
8734 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8735
8736 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8737
8738 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8739
8740 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8741
8742 * print.c (scm_print_state_vtable, print_state_pool):
8743 Initialize. These variables are now registered as gc roots.
8744
8745 (scm_current_pstate): Update documentation.
8746
8747 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8748 scm_prin1, scm_init_print): print_state_pool is registered as a
8749 gc root and thus does not need to be protected by a surrounding
8750 pair any more.
8751
8752 (make_print_state): The car of print_state_pool no longer holds
8753 the scm_print_state_vtable.
8754
8755 (scm_current_pstate, scm_make_print_state, print_circref,
8756 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8757 SCM_N<foo>.
8758
8759 (scm_prin1): When building lists, prefer scm_list_<n> over
8760 scm_cons[2]?.
8761
8762 (scm_iprlist): Removed a redundant SCM_IMP test.
8763
8764 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8765
8766 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8767
8768 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8769
8770 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8771 scm_list_<n> over scm_cons[2]?.
8772
8773 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8774
8775 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8776
8777 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8778 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8779 for some reason his patch didn't make it into the cvs.
8780
8781 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8782
8783 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8784 little bit - should even be somewhat more accurate now.
8785
8786 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8787
8788 * gc.c: support ia64 register backing store.
8789 (SCM_MARK_BACKING_STORE): new macro.
8790
8791 * continuations.h: support ia64 register backing store.
8792 (struct scm_t_contregs): add ia64 register backing store.
8793
8794 * continuations.c: support ia64 register backing store.
8795 (continuation_mark): mark ia64 register backing store.
8796 (continuation_free): free ia64 register backing store.
8797 (scm_make_continuation): capture ia64 register backing store.
8798 (copy_stack_and_call): copy ia64 register backing store.
8799
8800 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8801
8802 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8803 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8804 instead of SCM_NIMP to test for that case.
8805
8806 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8807 scm_t_bits instead of long.
8808
8809 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8810
8811 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8812 SCM_T_SIGNED_BITS_MIN): New.
8813 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8814 Use them to make these macros computable by the preprocessor.
8815
8816 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8817 whether the integral type fits in a fixnum, not the compiler.
8818 This removes a spurious compiler warning. Also, honor the
8819 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8820 needed for `long long's.
8821
8822 * numbers.c: Define NO_PREPRO_MAGOC when including
8823 num2integral.c.i for `long long' and `signed long long'.
8824
8825 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8826
8827 These changes fixes a race condition in the Guile coop - pthread
8828 compatibility code.
8829
8830 * coop.c (mother_awake_p): New variable.
8831 (coop_create): Set mother_awake_p before creating or signalling
8832 mother; wait until mother is going to sleep before returning.
8833 (mother): Reset mother_awake_p before going to sleep.
8834
8835 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8836
8837 * options.c (protected_objects, scm_init_options): The content of
8838 protected_objects is now protected from garbage collection using
8839 scm_gc_register_root instead of scm_permanent_object.
8840
8841 (get_option_setting): New static function that computes an option
8842 setting as it was formerly done in the function scm_options.
8843
8844 (get_documented_option_setting): New static function that
8845 returns option documentation as it was formerly done in the
8846 function scm_options. Note that documentation C strings are no
8847 longer precomputed into SCM objects. Instead, they are converted
8848 into SCM strings every time get_documented_option_setting is
8849 called.
8850
8851 (change_option_setting): New static functions that modifies the
8852 option setting as it was formerly done in the function
8853 scm_options. The function is now exception safe, i. e. won't
8854 cause a memory leak when interrupted. Further, only non-immediate
8855 option values are added to the protection list.
8856
8857 (scm_options): This function now has only the purpose to dispatch
8858 to to get_option_setting, get_documented_option_setting or
8859 change_option_setting, depending on the arguments given to
8860 scm_options.
8861
8862 (scm_init_opts): Don't convert documentation C strings into SCM
8863 strings. Further, don't protect any object values: They _must_
8864 be immediate values, otherwise there is no guarantee that they
8865 have not been collected before anyway.
8866
8867 * options.[ch] (scm_t_option): Made type unsigned, name into a
8868 constant char* and val into a scm_t_bits type.
8869
8870 (scm_options, scm_init_opts): The number of options is guaranteed
8871 to be larger or equal to zero. Thus, the type is changed to
8872 unsigned.
8873
8874 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8875
8876 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8877 testing an unsigned value for being >= 0.
8878
8879 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8880
8881 * numbers.h: Removed old comment about using SCM_CAR to access
8882 non-pair cells.
8883
8884 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8885 the return value is signed. Thanks to Brian Crowder for the bug
8886 report.
8887
8888 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8889 values. With this patch, SCM_SRS can be safely used for other
8890 types than scm_t_signed_bits. However, it should still better be
8891 an internal macro and thus be renamed to SCM_I_SRS.
8892
8893 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8894
8895 2001-10-03 Gary Houston <ghouston@arglist.com>
8896
8897 * continuations.h, unif.h: in the descriptions of the bit patterns
8898 of the heap cells, make bit 0 the least significant.
8899
8900 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8901
8902 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8903 Thanks to Golubev I. N.
8904
8905 2001-09-25 Gary Houston <ghouston@arglist.com>
8906
8907 * ports.c (scm_drain_input): extended the docstring. thanks to
8908 Alex Schroeder and Thien-Thi Nguyen.
8909
8910 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8911
8912 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8913 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8914 macros. (The NUM names might soon change.)
8915
8916 * numbers.h: Added missing declarations.
8917
8918 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8919
8920 * Makefile.am: Distribute num2float.i.c.
8921
8922 * num2float.i.c: New file, multiply included by numbers.c, used
8923 to "templatize" the float <-> num conversion routines.
8924
8925 * numbers.c: New functions: scm_num2float, scm_float2num,
8926 scm_num2double, scm_double2num.
8927
8928 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8929
8930 * .cvsignore: really add version.h
8931
8932 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8933 Otherwise it fails on the alpha. However, we might rather choose
8934 this size conditionally.
8935
8936 * numbers.c (scm_gcd): change "k" to a long from an int.
8937 Otherwise it fails on the alpha. However, we might rather choose
8938 this size conditionally.
8939
8940 * error.c (scm_wta): coerce char* to intptr_t before int
8941 assignment.
8942
8943 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8944 int.
8945
8946 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8947
8948 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8949
8950 * numbers.c (scm_integer_expt): Accept inexact integer in second
8951 argument. (Thanks to Bill Schottstaedt.)
8952
8953 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8954
8955 * .cvsignore: add version.h
8956
8957 * versiondat.h.in: removed (obsolete).
8958
8959 * version.h.in: renamed from version.h.
8960 (SCM_GUILE_MAJOR_VERSION): new public macro.
8961 (SCM_GUILE_MINOR_VERSION): new public macro.
8962 (SCM_GUILE_MICRO_VERSION): new public macro.
8963
8964 * version.h: renamed to version.h.in.
8965
8966 * version.c
8967 (scm_major_version): support integer *_VERSION macros.
8968 (scm_minor_version): support integer *_VERSION macros.
8969 (scm_micro_version): support integer *_VERSION macros.
8970 (scm_version): support integer *_VERSION macros.
8971
8972 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8973
8974 * error.c, error.h: Made error keys globally accessible.
8975 Applications might want to test for these or use them in a direct
8976 call to scm_error.
8977
8978 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8979 routines are passed an inexact. This change in behavior is
8980 motivated by concordance with R5RS: It is more common that a
8981 primitive doesn't want to accept an inexact for an exact.
8982
8983 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8984
8985 The following patch partially undoes my patch from 2001-06-30,
8986 where I added the function scm_gc_mark_cell_conservatively. The
8987 function is buggy, since it breaks guile during conservative
8988 marking if a pointer on the stack points directly into the list of
8989 free cells on the heap: With conservative cell marking this will
8990 cause the whole free list to be scanned and marked - boom!
8991
8992 * gc.c (allocated_mark, MARK, heap_segment,
8993 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8994 (scm_gc_mark_cell_conservatively): Remove function
8995 scm_gc_mark_cell_conservatively and update the corresponding
8996 comments and uses accordingly. Thanks to Christopher Cramer for
8997 the patch. (Minor corrections by me.)
8998
8999 2001-09-15 Gary Houston <ghouston@arglist.com>
9000
9001 * root.h (scm_root_state): removed the continuation_stack and
9002 continuation_stack_ptr members, which have no apparent purpose.
9003 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
9004 removed.
9005
9006 * root.c (root_mark), init.c (restart_stack, start_stack), gc
9007 (scm_igc): remove all references to contination_stack and
9008 continuation_stack_ptr, avoiding allocation of a vector and
9009 useless processing during gc.
9010
9011 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9012
9013 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
9014
9015 (TCONC_IN): Make sure that the cell word 0 is initialized last.
9016
9017 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
9018
9019 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
9020
9021 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
9022 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
9023
9024 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9025
9026 * guardians.c (mark_dependencies_in_tconc,
9027 whine_about_self_centered_zombies, scm_init_guardians): Register
9028 the static global variable `self_centered_zombies' via
9029 scm_gc_register_root, to make some cdr-ing unnecessary.
9030
9031 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9032
9033 * backtrace.c (display_backtrace_file,
9034 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
9035 values, use SCM_FALSEP when comparing SCM values against #f.
9036 Thanks to Rob Browning for the bug report.
9037
9038 2001-09-12 Martin Baulig <martin@home-of-linux.org>
9039
9040 * strings.[ch] (scm_str2string): New function.
9041
9042 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
9043
9044 * gc.c (scm_done_free): Always subtract size from scm_mallocated
9045 when computing nm, even if it's negative.
9046 (scm_must_malloc): Abort on overflow of scm_mtrigger.
9047 (scm_must_realloc): Likewise.
9048
9049 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
9050
9051 * numbers.c (scm_sys_check_number_conversions): new function,
9052 defined if Guile is compiled in debugging mode. currently checks
9053 `scm_num2ulong', should check much much more.
9054
9055 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
9056 unsigned, ensure that it's positive. thanks to Martin Baulig!
9057
9058 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9059
9060 * __scm.h: Added new section about compile time selectable
9061 features.
9062
9063 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
9064 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
9065 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
9066 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
9067 Removed.
9068
9069 * deprecation.c (scm_include_deprecated_features): Simplified.
9070
9071 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9072 `SCM_IMP' instead of `!SCM_CELLP´.
9073
9074 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
9075 Extract side-effecting operations from macros.
9076
9077 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
9078 scm_top_level_lookup_closure_var and scm_system_transformer.
9079
9080 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
9081
9082 (heap_segment): Use CELL_P instead of SCM_CELLP.
9083
9084 * init.c (start_stack): Don't initialize
9085 scm_top_level_lookup_closure_var and scm_system_transformer.
9086
9087 * modules.c (scm_set_current_module): Don't access
9088 scm_top_level_lookup_closure_var and scm_system_transformer.
9089
9090 (scm_sym2var): Don't call scm_variable_set_name_hint.
9091
9092 (scm_post_boot_init_modules): Removed deprecated initializations.
9093
9094 * print.c (scm_ipruk): Don't access cell contents of non cells.
9095
9096 * strings.c (scm_string_set_x): All strings are writable.
9097
9098 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
9099 type. There is only one string type now.
9100
9101 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
9102
9103 * tags.h: Remove comments about two different string types.
9104
9105 (SCM_CELLP, SCM_NCELLP): Deprecated.
9106
9107 * variable.c (make_variable): Remove code variant for vcells.
9108
9109 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
9110 SCM_VARIABLE_LOC): Remove code variant for vcells.
9111
9112 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
9113 SCM_ENABLE_DEPRECATED with the logic reversed.
9114
9115 * dynl.c (moddata, registered_mods), dynl.[ch]
9116 (scm_register_module_xxx, scm_registered_modules,
9117 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
9118 (*top-level-lookup-closure*), eval.[ch]
9119 (scm_top_level_lookup_closure_var, scm_system_transformer,
9120 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
9121 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
9122 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
9123 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
9124 scm_unprotect_object), modules.c (root_module_lookup_closure,
9125 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
9126 beautify_user_module_x_var, try_module_autoload_var,
9127 scm_module_full_name), modules.[ch] (scm_the_root_module,
9128 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9129 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
9130 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
9131 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
9132 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
9133 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
9134 scm_make_shared_substring), tags.h (scm_tc7_substring,
9135 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
9136 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
9137 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
9138 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
9139 Removed.
9140
9141 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
9142 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
9143 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
9144 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
9145 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
9146 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9147 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
9148 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
9149 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
9150 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
9151 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
9152 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
9153 (setzone, scm_strftime, scm_strptime), vports.c
9154 (scm_make_soft_port): Remove calls to
9155 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
9156 gone, all strings are 0-terminated anyway.
9157
9158 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
9159 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
9160 double inclusion of the same headers to the SCM_<filename>_H
9161 format.
9162
9163 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
9164 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
9165 print.c (scm_iprin1): The type scm_tc7_substring does not exist
9166 any more.
9167
9168 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
9169 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
9170 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
9171 !SCM_<foo> over SCM_N<foo>.
9172
9173 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9174
9175 * Makefile.am: Remove references to symbols-deprecated.c.
9176
9177 * symbols.c (scm_init_symbols): Don't initialize deprecated
9178 symbol functions.
9179
9180 * symbols-deprecated.c: Removed.
9181
9182 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
9183 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
9184 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
9185 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
9186 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
9187 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
9188 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
9189 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
9190 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
9191 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
9192 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
9193 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
9194 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
9195 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
9196 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
9197 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
9198 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
9199 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
9200 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
9201 scm_intern0, scm_sysintern, scm_sysintern0,
9202 scm_sysintern0_no_module_lookup, scm_symbol_value0,
9203 scm_string_to_obarray_symbol, scm_intern_symbol,
9204 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
9205 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
9206 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
9207 vectors.[ch] (scm_vector_set_length_x): Removed.
9208
9209 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
9210 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
9211 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
9212 Renamed the macros that are defined to inhibit double inclusion of
9213 the same headers to the SCM_<filename>_H format.
9214
9215 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
9216 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
9217 SCM_N<foo>.
9218
9219 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9220
9221 * continuations.h (scm_contregs), debug.h (scm_debug_info,
9222 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
9223 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
9224 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9225 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
9226 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
9227 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
9228 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
9229 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
9230 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
9231 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
9232 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
9233
9234 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
9235 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
9236 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
9237 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
9238 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
9239 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
9240 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
9241 double inclusion of the same headers to the SCM_<filename>_H
9242 format.
9243
9244 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
9245 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
9246 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
9247 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
9248 !SCM_<foo> over SCM_N<foo>.
9249
9250 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9251
9252 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
9253 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
9254 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
9255 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
9256 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
9257 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
9258 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
9259 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
9260 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
9261 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
9262 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
9263 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
9264 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
9265 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
9266 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
9267 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
9268 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
9269 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
9270 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
9271 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
9272 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
9273 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
9274 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
9275 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
9276 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
9277 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
9278 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
9279 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
9280 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
9281 the macros that are defined to inhibit double inclusion of the
9282 same headers to the SCM_<filename>_H format.
9283
9284 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
9285
9286 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
9287 "scm_t_portable" with "scm_port_table" which was an artifact from
9288 the great "scm_*_t -> scm_t_" renaming.
9289
9290 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
9291
9292 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
9293 used; nfc. Thanks to Bill Schottstaedt.
9294
9295 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
9296 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
9297 Thanks to Chris Cramer.
9298
9299 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
9300
9301 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
9302
9303 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
9304 dynamic scope.
9305 * dynwind.h (scm_swap_bindings): Declare.
9306 * dynwind.c (scm_swap_bindings): Make non-static.
9307
9308 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
9309
9310 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
9311 doing exactly nothing about them). thanks Neil!
9312
9313 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
9314
9315 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
9316
9317 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
9318
9319 * gc.c: Fix omission bug: Add `heap_segment' forward decl
9320 (proto) in the case when either `GUILE_DEBUG' or
9321 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
9322
9323 (map_free_list): Fix typo: Ref `f' correctly.
9324
9325 Thanks to Chris Cramer.
9326
9327 2001-08-15 Rob Browning <rlb@defaultvalue.org>
9328
9329 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
9330 variables.
9331 (libpath.h): change libguileversion to libguileinterface.
9332
9333 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
9334
9335 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
9336 ChangeLog-2000. Thanks to Daniel Skarda!
9337
9338 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
9339
9340 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
9341 do it from the Makefile.
9342
9343 * Makefile.am: rearrange the snarfing slightly, so that .doc files
9344 are of a reasonable size.
9345
9346 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
9347
9348 * stacks.c (scm_make_stack): Improve docstring by explaining use
9349 of cutting args.
9350
9351 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
9352
9353 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
9354 scm_char_whitespace_p, scm_char_upper_case_p,
9355 scm_char_lower_case_p, scm_char_is_both_p): Do not require
9356 characters to fulfill isascii in addition to the primary
9357 predicate.
9358
9359 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9360
9361 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
9362 scm_istr2flo, scm_istring2number): Removed.
9363
9364 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
9365 SCM_SLOPPY_<foo>.
9366
9367 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9368 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9369 Added.
9370
9371 (scm_string_to_number): Use new number parser.
9372
9373 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9374 handles complex numbers.
9375
9376 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9377 SCM_<foo>_H.
9378
9379 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9380 SCM_N<pred>.
9381
9382 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9383
9384 (scm_i_mem2number): Added.
9385
9386 (scm_exact_to_inexact): Changed signature.
9387
9388 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9389 here instead of within scm_i_mem2number. Call scm_i_mem2number
9390 instead of scm_istr2int and scm_istring2number.
9391
9392 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9393
9394 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9395 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9396 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9397 !SCM_<pred> over SCM_N<pred>.
9398
9399 (scm_eval_body): Remove side effecting code from macro call.
9400
9401 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9402 SCM_NIMP test.
9403
9404 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9405
9406 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9407
9408 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9409
9410 Removed vcell slot from structs.
9411
9412 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9413 subsequent indices.
9414
9415 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9416 zero. Use scm_vtable_index_layout instead of "0" when accessing
9417 said slot.
9418 (scm_init_struct): Remove vcell slot layout code from
9419 required_vtable_fields.
9420
9421 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9422
9423 * goops.c (build_class_class_slots): Removed vcell slot
9424 definition.
9425
9426 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9427 Removed vcell slot layout code.
9428 (scm_si_vcell): Removed.
9429
9430 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9431
9432 "Glocs" have been removed.
9433
9434 * tags.h: Update tag system docs.
9435 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9436 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9437 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9438 or SCM_NCONSP, respectively.
9439
9440 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9441 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9442 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9443
9444 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9445 tell glocs from structs.
9446
9447 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9448
9449 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9450 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9451 instead of with glocs.
9452 (EVALCAR): Do not test for glocs.
9453 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9454 condition.
9455 (scm_unmemocar): Do not handle glocs.
9456 (scm_m_atfop): Memoize as a variable, not as a gloc.
9457 (scm_eval_args, scm_deval_args): Do not handle glocs.
9458 (scm_ceval, scm_deval): Likewise.
9459
9460 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9461 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9462 Removed.
9463
9464 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9465
9466 * dynwind.c (scm_swap_bindings): Likewise.
9467 (scm_dowinds): Updated to recognize lists of variables instead of
9468 lists of glocs.
9469
9470 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9471
9472
9473 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9474 where it is needed.
9475
9476 2001-07-25 Gary Houston <ghouston@arglist.com>
9477
9478 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9479 docstrings to reflect the n-ary implementation.
9480
9481 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9482
9483 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9484 value of a variable, not the plain "return" statement.
9485
9486 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9487
9488 * eval.c: Allow variables in memoized code (in addition to glocs).
9489 (scm_lookupcar): Handle variables in lost races. Replace symbol
9490 with variable directly, do not make a gloc.
9491 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9492 like glocs.
9493 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9494 the main switch.
9495
9496 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9497
9498 * variable.c (scm_i_variable_print): Use "value" instead of
9499 "binding" since a binding is the mapping between symbols and
9500 variables, not between variables and their values.
9501
9502 * tags.h (scm_tc7_variable): New.
9503 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9504 * print.c (scm_iprin1): Likewise.
9505
9506 * variable.h (scm_tc16_variable): Removed.
9507 (SCM_VARIABLEP): Test for new tc7 code.
9508 (scm_i_variable_print): New.
9509 * variable.c (scm_tc16_variable): Removed.
9510 (variable_print): Renamed to scm_i_variable_print and made
9511 non-static.
9512 (variable_equal_p): Removed.
9513 (make_variable): Construct a tc7 object instead of a smob.
9514 (scm_init_variable): Do not register smob.
9515
9516 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9517
9518 * tags.h: Include inttypes.h when we have it.
9519
9520 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9521
9522 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9523 is taken by the new SCM_IM_CALL_WITH_VALUES.
9524 * print.c (scm_isymnames): Update table accordingly.
9525
9526 2001-07-22 Gary Houston <ghouston@arglist.com>
9527
9528 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9529 SCM_MAKINUM to convert regoff_t value to SCM.
9530
9531 2001-07-21 Gary Houston <ghouston@arglist.com>
9532
9533 * scmsigs.c: include sys/time.h for itimer stuff.
9534
9535 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9536
9537 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9538
9539 * c-tokenize.lex: add option %nounput to quiet warning.
9540 Add prototype for yylex to quiet warning.
9541
9542 * scmconfig.h.in: add flags for setitimer and getitimer.
9543
9544 * scmsigs.h (scm_init_scmsigs): new prototype.
9545 (scm_init_scmsigs): new prototype.
9546
9547 * scmsigs.c (s_scm_setitimer): new function.
9548 (s_scm_setitimer): new function.
9549
9550 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9551
9552 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9553 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9554 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9555 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9556 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9557 guile-func-name-check.in, guile-snarf-docs-texi.in,
9558 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9559 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9560 objprop.c, objprop.h, options.c, options.h, random.h,
9561 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9562 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9563 version.c, version.h: Updated copyright notice.
9564
9565 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9566
9567 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9568 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9569 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9570 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9571 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9572 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9573 sym_environment, scm_sym_change_class): New static variables to
9574 hold predefined symbols.
9575
9576 (build_class_class_slots): Build the list using scm_list_n
9577 instead of cons. Also, slots are already created as lists, thus
9578 making a call to maplist unnecessary.
9579
9580 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9581 scm_class_direct_subclasses, scm_class_direct_methods,
9582 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9583 scm_method_procedure, create_standard_classes, purgatory): Use
9584 predefined symbols.
9585
9586 (build_slots_list, compute_getters_n_setters,
9587 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9588 get_slot_value_using_name, set_slot_value_using_name,
9589 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9590 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9591 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9592
9593 (scm_sys_prep_layout_x): Minimize variable scopes.
9594
9595 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9596 scm_sys_fast_slot_set_x): Fix signedness.
9597
9598 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9599 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9600 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9601 when converting to and from SCM values.
9602
9603 (scm_enable_primitive_generic_x): Add rest argument checking.
9604
9605 (map, filter_cpl, maplist, scm_sys_initialize_object,
9606 scm_sys_prep_layout_x, slot_definition_using_name,
9607 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9608 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9609 predicates over SCM_N?IMP tests.
9610
9611 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9612 checking.
9613
9614 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9615 alias.
9616
9617 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9618
9619 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9620
9621 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9622
9623 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9624
9625 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9626
9627 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9628
9629 * strings.c (s_scm_string): fix arg position in assert.
9630
9631 2001-07-11 Gary Houston <ghouston@arglist.com>
9632
9633 * strports.c (st_write): use memcpy, not strncpy. thanks to
9634 Dale P. Smith.
9635
9636 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9637
9638 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9639 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9640 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9641 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9642 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9643 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9644 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9645 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9646 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9647 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9648 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9649 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9650 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9651 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9652 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9653 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9654 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9655 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9656 weaks.c, weaks.h: Remove "face-lift" comment.
9657
9658 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9659
9660 * .cvsignore: add stamp-h.in.
9661
9662 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9663
9664 * hooks.c (scm_make_hook, scm_add_hook_x),
9665 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9666 value info to the docstrings.
9667
9668 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9669
9670 Some more compatibility patches for Windows.
9671
9672 * posix.c (getlogin): getlogin() implementation for Windows.
9673
9674 * backtrace.c, ioext.c: Include <stdio.h>.
9675
9676 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9677 exist.
9678
9679 * cpp_sig_symbols.in: Added SIGBREAK.
9680
9681 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9682
9683 * strports.c (scm_read_0str, scm_eval_0str): Call
9684 scm_c_read_string and scm_c_eval_string respectively, not
9685 themselves. Thanks to Dale P. Smith!
9686
9687 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9688
9689 * unif.c (scm_array_set_x): The variable args does not
9690 necessarily have to be a list. Further, got rid of a redundant
9691 SCM_NIMP test.
9692
9693 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9694
9695 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9696 last.
9697
9698 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9699 init_heap_seg): Fixed signedness.
9700
9701 (init_heap_seg): Replaced strange for-loop with a while loop.
9702
9703 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9704
9705 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9706
9707 The following patch adds conservative marking for the elements of
9708 free or allocated cells.
9709
9710 * gc.c (allocated_mark, heap_segment): New static functions.
9711
9712 (which_seg): Deleted, since the functionality is now provided by
9713 function heap_segment.
9714
9715 (map_free_list): Use heap_segment instead of which_seg.
9716
9717 (MARK): If cell debugging is disabled, mark free cells
9718 conservatively.
9719
9720 (scm_mark_locations, scm_cellp): Extracted the search for the
9721 heap segment of a SCM value into function heap_segment.
9722
9723 (scm_init_storage): Allocated cells must be marked
9724 conservatively.
9725
9726 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9727
9728 The following patch changes the representation of weak vectors to
9729 double cells instead of using an extension of the vector's
9730 allocated memory.
9731
9732 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9733 the result of SCM_WVECT_GC_CHAIN.
9734
9735 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9736
9737 * weaks.c (allocate_weak_vector): New static function. It does
9738 not patch any previously created vector object during the
9739 construction of a weak vector, and thus doesn't need to switch
9740 off interrupts during vector creation.
9741
9742 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9743 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9744 Use allocate_weak_vector to provide the new weak vector object.
9745
9746 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9747 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9748 now stored in the double cell.
9749
9750 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9751 Use SCM_WVECT_TYPE.
9752
9753 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9754 using an entry of the double cell.
9755
9756 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9757
9758 * stamp-h.in: bye bye
9759
9760 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9761
9762 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9763 scm_eval_0str.
9764
9765 * load.c, load.h (scm_c_primitive_load,
9766 scm_c_primitive_load_path): New.
9767
9768 * strports.c, strports.h (scm_c_read_string): Renamed from
9769 scm_read_0str. Also, added "const" qualifier to argument.
9770 (scm_c_eval_string): Renamed from scm_eval_0str.
9771 (scm_read_0str, scm_eval_0str): Deprecated.
9772
9773 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9774
9775 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9776 SCM_LIST1.
9777
9778 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9779
9780 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9781 scm_list_n): New functions.
9782 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9783 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9784 (lots of files): Use the new functions.
9785
9786 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9787
9788 * strings.c: #include "libguile/deprecation.h".
9789
9790 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9791
9792 * read.c (scm_lreadr): When reading a hash token, check for a
9793 user-defined hash procedure first, so that overriding the builtin
9794 hash characters is possible (this was needed for implementing
9795 SRFI-4's read synax `f32(...)').
9796
9797 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9798 because the latter is unsigned now and breaks comparisons like
9799 (n < (scm_t_signed_bits)MIN_VALUE).
9800
9801 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9802
9803 * eval.h, eval.c (scm_call_4): New function.
9804
9805 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9806 directly rather than dispatching to them via scm_ithrow and a lazy
9807 catch.
9808
9809 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9810 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9811 for trap handler procedures.
9812
9813 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9814 procedures not being #f.
9815
9816 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9817
9818 * Makefile.am (c-tokenize.c): add rule to generate it.
9819 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9820
9821 filter-doc-snarfage.c: remove.
9822
9823 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9824
9825 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9826
9827 The following set of changes makes compiling Guile under various
9828 Windows compilers easier. Compilation under GNU systems should
9829 not be affected at all.
9830
9831 Thanks to Stefan Jahn for all necessary information, patches and
9832 testing.
9833
9834 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9835 getpgrp, ttyname, primitive-fork and some header inclusion for
9836 Windows.
9837
9838 * random.c: Define M_PI, if not predefined and use __int64 for
9839 LONG64 under Windows.
9840
9841 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9842 Windows and conditionalize some signal names.
9843
9844 * socket.c (scm_getsockopt): Added missing comma.
9845 Include socket library header under Windows.
9846
9847 * stime.c (CLKTCK): Add cast to int, to make it compile under
9848 Windows.
9849
9850 * ports.c (truncate): New function, compiled only under Windows.
9851
9852 * net_db.c: Do not declare errno under Windows.
9853
9854 * iselect.h, inet_aton.c: Include socket library headers under
9855 Windows.
9856
9857 * guile.c (inner_main): Under Windows, initialize socket library
9858 and initialize gdb_interface data structures.
9859
9860 * gdb_interface.h: Under Windows, gdb_interface cannot be
9861 initialized statically. Initialize at runtime instead.
9862
9863 * fports.c (write_all): ssize_t -> size_t.
9864 (fport_print): Conditionalize call to ttyname().
9865 (getflags): New function, compiled only under Windows.
9866
9867 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9868 primitives chown, link, fcntl.
9869 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9870 as path seperator.
9871
9872 * backtrace.c: Include <io.h> under Windows.
9873
9874 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9875
9876 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9877 declaration.
9878
9879 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9880
9881 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9882 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9883 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9884 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9885 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9886 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9887 (scm_dynamic_wind, scm_dowinds), environments.c
9888 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9889 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9890 goops.c (GETVAR, purgatory, make_class_from_template,
9891 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9892 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9893 (scm_primitive_load), modules.c (scm_resolve_module,
9894 scm_c_define_module, scm_c_use_module, scm_c_export,
9895 module_variable, scm_eval_closure_lookup, scm_sym2var,
9896 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9897 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9898 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9899 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9900 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9901 (scm_object_to_string, scm_call_with_output_string,
9902 scm_call_with_input_string), throw.c (scm_body_thunk,
9903 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9904 scm_make_shared_array), vports.c (sf_flush, sf_write,
9905 sf_fill_input, sf_close): Use one of the above functions.
9906 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9907
9908 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9909
9910 * filesys.c (scm_close), ports.c (scm_close_port,
9911 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9912 instead of SCM_NEGATE_BOOL.
9913
9914 * filesys.c (scm_stat): Clean up type dispatch.
9915
9916 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9917 scm_output_port_p): Get rid of redundant IM type check.
9918
9919 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9920 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9921 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9922 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9923 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9924 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9925 scm_addr_vector), stime.c (scm_strftime), strings.c
9926 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9927 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9928 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9929 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9930 instead of scm_makfromstr.
9931
9932 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9933 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9934 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9935 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9936 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9937 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9938 !SCM_<pred> over SCM_N<pred>.
9939
9940 * strings.[ch] (scm_makfromstr): Deprecated.
9941
9942 (scm_mem2string): New function, replaces scm_makfromstr.
9943
9944 * strings.c (scm_substring), strop.c (string_copy,
9945 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9946 (scm_symbol_to_string): Fix gc problem.
9947
9948 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9949 SCM_<foo>_H.
9950
9951 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9952 warning about comparing signed and unsigned values. This fix is
9953 not optimal, since it won't work reliably if sizeof (c_start) >
9954 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9955 solution is to define this macro as an inline function, thus
9956 allowing to specifiy the types of c_start and c_end.
9957
9958 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9959
9960 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9961 scm_t_debug_frame*.
9962
9963 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9964 Rename <foo>H to SCM_<foo>_H.
9965
9966 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9967 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9968
9969 (narrow_stack): Make i unsigned. Don't use side-effecting
9970 operations in conditions.
9971
9972 (narrow_stack, scm_make_stack, scm_stack_id,
9973 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9974
9975 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9976 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9977 more.
9978
9979 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9980 signedness.
9981
9982 (scm_last_stack_frame): Remove bogus `;'.
9983
9984 * stacks.h (SCM_FRAMEP): Fix type check.
9985
9986 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9987
9988 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9989 c-tokenize.c when doing maintainer-clean.
9990
9991 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9992
9993 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9994 simplify.
9995
9996 * eval.c: all hash signs are in column 0.
9997
9998 * Makefile.am (guile_filter_doc_snarfage): build using
9999 c-tokenize.c, not filter-doc-snarfage.c.
10000 rearrange snarfing dependencies a bit.
10001
10002 * c-tokenize.lex: new file.
10003
10004 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
10005
10006 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
10007 scm_t_srcpropso_plist. See the big type renaming.
10008 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
10009 Thanks to Seth Alves!
10010
10011 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
10012 they aren't defined already.
10013
10014 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
10015
10016 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
10017 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
10018 problem.
10019
10020 * backtrace.c (display_expression, scm_set_print_params_x,
10021 display_application, display_frame, scm_backtrace), numbers.c
10022 (scm_istring2number), objects.c (scm_class_of,
10023 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
10024 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
10025
10026 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
10027 always positive.
10028
10029 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
10030 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
10031
10032 * objects.c (scm_class_of): Type fix.
10033
10034 (scm_mcache_lookup_cmethod): Improved comment, simplified,
10035 eliminated goto.
10036
10037 * pairs.h (scm_error_pair_access): The function can return if
10038 called recursively.
10039
10040 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10041
10042 * init.c (scm_init_guile_1): Removed initialization of tag.c.
10043
10044 * gdbint.c, init.c: Removed inclusion of tag.h.
10045
10046 * tag.h, tag.c: Removed files.
10047
10048 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
10049
10050 2001-06-20 Gary Houston <ghouston@arglist.com>
10051
10052 * deprecation.c, extensions.c, rw.c: include string.h.
10053
10054 2001-06-19 Gary Houston <ghouston@arglist.com>
10055
10056 * filter-doc-snarfage.c (process): added ungetc in
10057 MULTILINE_COOKIE case since otherwise it fails when there's no
10058 space between the '(' and the quote of the following string
10059 (gcc 3.0).
10060
10061 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10062
10063 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
10064
10065 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
10066
10067 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
10068 extension takes place.
10069 * strings.h (SCM_STRING_LENGTH): Likewise.
10070 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
10071
10072 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
10073 it.
10074
10075 * tags.h: Include <stdint.h> when we have it.
10076 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
10077 available. Else use "unsigned long".
10078 (scm_signed_bits_t): New.
10079
10080 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
10081 (SCM_INUM): Cast result to scm_signed_bits_t.
10082
10083 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
10084
10085 * mkstemp.c: Update path to #include file scmconfig.h.
10086 Thanks to Golubev I. N.
10087
10088 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10089
10090 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
10091
10092 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
10093 the macro definition.
10094
10095 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
10096 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
10097 instead of SCM_INST_TYPE.
10098
10099 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
10100 the object is a struct before accessing its struct flags.
10101
10102 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
10103
10104 2001-06-10 Gary Houston <ghouston@arglist.com>
10105
10106 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
10107 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
10108 work reliably anymore. try it from boot-9.scm instead.
10109
10110 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
10111
10112 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
10113 Thanks to Matthias Köppe!
10114
10115 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
10116
10117 * snarf.h, filter-doc-snarfage.c: more changes to cope with
10118 space-happy C preprocessors.
10119
10120 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
10121 inside cookies. thanks to Matthias Köppe!
10122
10123 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10124
10125 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
10126 keywords. Fix gc protection.
10127
10128 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
10129 operations in macro calls.
10130
10131 * pairs.c (scm_error_pair_access): Avoid recursion.
10132
10133 Thanks to Matthias Koeppe for reporting the bugs that correspond
10134 to the following set of patches.
10135
10136 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
10137 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
10138 bitvector base address using SCM_BITVECTOR_BASE.
10139
10140 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
10141 unsigned long*.
10142
10143 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10144
10145 * goops.c (SCM_CLASS_REDEF): Removed.
10146
10147 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
10148 SCM_<foo>_H.
10149
10150 Thanks to Matthias Koeppe for reporting the bugs that correspond
10151 to the following set of patches.
10152
10153 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
10154 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
10155 scm_sys_allocate_instance, clear_method_cache,
10156 scm_sys_invalidate_method_cache_x, scm_make,
10157 create_standard_classes, scm_make_port_classes, scm_make_class,
10158 scm_add_slot): Use SCM_SET_SLOT to set slot values.
10159
10160 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
10161
10162 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
10163
10164 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
10165 UNARY_ELTS_CODE): Remove bogus break statement.
10166
10167 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
10168 Don't access bit vectors elements as SCM objects.
10169
10170 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
10171 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10172 Don't assign to an unpacked value.
10173
10174 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
10175
10176 * __scm.h (SCM_NORETURN): Moved here from error.h.
10177
10178 (SCM_UNUSED): New macro.
10179
10180 (SCM_DEBUG_PAIR_ACCESSES): New macro.
10181
10182 * backtrace.c (display_error_handler), continuations.c
10183 (continuation_print), debug.c (debugobj_print), dynwind.c
10184 (guards_print), environments.c (observer_print,
10185 core_environments_finalize, leaf_environment_cell,
10186 leaf_environment_print, eval_environment_print,
10187 eval_environment_observer, import_environment_define,
10188 import_environment_undefine, import_environment_print,
10189 import_environment_observer, export_environment_define,
10190 export_environment_undefine, export_environment_print,
10191 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
10192 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
10193 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
10194 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
10195 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
10196 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
10197 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
10198 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
10199 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
10200 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
10201 set_slot_value, test_slot_existence, scm_change_object_class,
10202 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
10203 default_setter), guardians.c (guardian_print, guardian_gc_init,
10204 guardian_zombify, whine_about_self_centered_zombies), guile.c
10205 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
10206 mallocs.c (malloc_print), numbers.c (scm_print_real,
10207 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
10208 end_input_default, scm_port_print, fill_input_void_port,
10209 write_void_port), root.c (root_print), smob.c (scm_mark0,
10210 scm_free0, scm_smob_print, scm_smob_apply_1_error,
10211 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
10212 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
10213 (scm_struct_free_0, scm_struct_free_standard,
10214 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
10215 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
10216 scm_handle_by_throw, scm_ithrow), weaks.c
10217 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
10218 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
10219 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
10220
10221 * error.h (SCM_NORETURN): Moved to __scm.h.
10222
10223 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
10224 Renamed <foo>H to SCM_<foo>_H.
10225
10226 * gc.c (debug_cells_gc_interval): New static variable.
10227
10228 (scm_assert_cell_valid): If selected by the user, perform
10229 additional garbage collections.
10230
10231 (scm_set_debug_cell_accesses_x): Extended to let the user specify
10232 if additional garbage collections are desired.
10233
10234 (mark_gc_async): If additional garbage collections are selected
10235 by the user, don't call the after-gc-hook. Instead require the
10236 user to run the hook manually.
10237
10238 * pairs.c (scm_error_pair_access): New function. Only compiled
10239 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
10240
10241 * pairs.h (SCM_VALIDATE_PAIR): New macro.
10242
10243 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
10244 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
10245 is a real pair object. (Glocs are also accepted, but that may
10246 change.) If not, abort with an error message.
10247
10248 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10249
10250 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
10251
10252 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
10253 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
10254
10255 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
10256
10257 * extensions.c (scm_c_register_extension): Allow NULL as library
10258 name.
10259 (load_extension): Ignore NULL library names when comparing.
10260
10261 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
10262 non-pointers are being compared. Thanks to Alexander Klimov!
10263
10264 2001-06-04 Gary Houston <ghouston@arglist.com>
10265
10266 * rw.c (scm_write_string_partial): new procedure implementing
10267 write-string/partial in (ice-9 rw).
10268 * rw.h: declare scm_write_string_partial.
10269
10270 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
10271
10272 * keywords.c (keyword_print): Substract 1 from length of symbol
10273 name, accounting for the silly dash.
10274
10275 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
10276 Do not emit deprecation warning.
10277
10278 Added exception notice to all files.
10279
10280 * dynl.c: Include "deprecation.h".
10281
10282 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
10283
10284 * dynl.c (scm_register_module_xxx, scm_registered_modules,
10285 scm_clear_registered_modules): Deprecated.
10286
10287 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
10288
10289 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
10290 guile-snarf-docs-texi.
10291
10292 * fports.c: HAVE_ST_BLKSIZE changed to
10293 HAVE_STRUCT_STAT_ST_BLKSIZE.
10294 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
10295 HAVE_STRUCT_STAT_ST_BLKSIZE.
10296
10297 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
10298 HAVE_STRUCT_STAT_ST_RDEV.
10299 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
10300 HAVE_STRUCT_STAT_ST_BLKSIZE.
10301 (scm_stat2scm): HAVE_ST_BLOCKS changed to
10302 HAVE_STRUCT_STAT_ST_BLOCKS.
10303
10304 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
10305
10306 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
10307 of scm_eval_x to allow module changes between the forms in the
10308 string. Set/restore module using scm_c_call_with_current_module.
10309
10310 * mkstemp.c: New file, slightly modified from libiberties
10311 mkstemps.c.
10312
10313 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
10314
10315 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
10316 filter-doc-snarfage.c: new files.
10317
10318 * Makefile.am: add stuff to [build,] use and distribute
10319 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
10320
10321 * guile-snarf.in: grok the new snarf output.
10322
10323 * snarf.h: make the output both texttools- and `read'-friendly.
10324
10325 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
10326 guile-snarf-docs. (should also deprecate, I guess. maybe not).
10327
10328 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
10329
10330 * print.c (scm_simple_format): Support "~~" and "~%". Signal
10331 error for unsupported format controls and for superflous
10332 arguments. Thanks to Daniel Skarda!
10333
10334 * print.h, print.c (scm_print_symbol_name): Factored out of
10335 scm_iprin1.
10336 (scm_iprin1): Call it.
10337
10338 * keywords.c (keyword_print): Use scm_print_symbol_name so that
10339 weird names are printed correctly.
10340
10341 * print.c (scm_print_symbol_name): Symbols whose name starts with
10342 `#' or `:' or ends with `:' are considered weird.
10343
10344 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10345
10346 * numbers.c (scm_difference, scm_divide): Clarified comments for -
10347 and /.
10348
10349 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10350
10351 * debug.h: Removed prototype for scm_eval_string.
10352
10353 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10354
10355 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
10356 (make-string 2000 #\!))' in an older version).
10357
10358 Change strncpy to memcpy to allow embedded NUL characters in
10359 symbol prefix.
10360
10361 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
10362
10363 * hooks.c (scm_create_hook): deprecated.
10364 (make_hook): deleted.
10365 (scm_make_hook): all the hook creation code is now here.
10366
10367 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10368 a hook, make it permanent, and do a `scm_c_define' on it.
10369
10370 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10371
10372 * socket.c (s_scm_inet_pton): fix docstring quoting.
10373 (s_scm_inet_ntop): ditto.
10374
10375 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10376
10377 * hashtab.c (scm_internal_hash_fold): fix argument position in
10378 SCM_ASSERT.
10379
10380 * environments.c (s_scm_import_environment_set_imports_x): fix
10381 argument position in SCM_ASSERT.
10382
10383 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10384 (s_scm_make_iloc): ditto.
10385
10386 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10387
10388 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10389
10390 * eval.c (promise_print): Read the promise's value as an object.
10391
10392 (SCM_CEVAL): Don't perform side-effecting operations in macro
10393 parameters.
10394
10395 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10396 conditional expression.
10397
10398 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10399 initializer.
10400
10401 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10402 text, removed redundant computation of effective_length and fixed
10403 the overflow check.
10404
10405 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10406 values.
10407
10408 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10409
10410 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10411
10412 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10413 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10414
10415 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10416
10417 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10418 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10419 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10420 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10421
10422 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10423
10424 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10425
10426 * ramap.c (ramap_rp): Removed bogus `;'.
10427
10428 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10429 problem.
10430
10431 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10432 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10433 Read SCM objects rather than scm_bits_t values.
10434
10435 * tags.h (SCM_VOIDP_TEST): Removed.
10436
10437 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10438 value of 2 now corresponds to the former 1, the current 1
10439 corresponds to the former situation that SCM_VOIDP_TEST was
10440 defined.
10441
10442 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10443 If this appears to be not ANSI compliant, we will change it to
10444 typedef struct scm_unused_struct { } * SCM;
10445 Thanks to Han-Wen Nienhuys for the suggestion.
10446
10447 * unif.c (scm_array_set_x): Fix typing problem, and use
10448 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10449 dealing with uniform vectors.
10450
10451 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10452
10453 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10454 (scm_igc): mark from them, too (precisely, not conservatively!).
10455
10456 * root.h (scm_gc_registered_roots): new object in
10457 scm_sys_protects.
10458
10459 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10460 `scm_protect_object'. shouldn't call it at all, though, it seems.
10461
10462 * gc.c (scm_[un]protect_object): deprecated.
10463 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10464 (scm_gc_[un]register_root[s]): new.
10465
10466 * gc.h: add prototypes for scm_gc_[un]protect_object,
10467 scm_gc_[un]register_root[s].
10468
10469 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10470
10471 revert the controversial part of the 2001-05-24 changes.
10472
10473 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10474
10475 * modules.c (scm_env_module): Exported to Scheme.
10476
10477 * eval.c (scm_debug_opts): New option `show-file-name'.
10478
10479 * debug.h (SCM_SHOW_FILE_NAME): New.
10480
10481 * backtrace.c: Include "libguile/filesys.h".
10482 (sym_base, display_backtrace_get_file_line,
10483 display_backtrace_file, display_backtrace_file_and_line): New.
10484 (display_frame): Call display_backtrace_file_and_line if that is
10485 requested.
10486 (display_backtrace_body): Call scm_display_backtrace_file if
10487 requested.
10488
10489 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10490 Prototypes removed since there's no definition for these
10491 functions.
10492
10493 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10494
10495 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10496 Changed use of scm_array->scm_array_t and
10497 scm_array_dim->scm_array_dim_t to enable build with
10498 --disable-deprecated.
10499
10500 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10501
10502 The purpose of this set of changes is to regularize Guile's usage
10503 of ANSI C integral types, with the following ideas in mind:
10504
10505 - SCM does not nesessarily have to be long.
10506 - long is not nesessarily enough to store pointers.
10507 - long is not nesessarily the same size as int.
10508
10509 The changes are incomplete and possibly buggy. Please test on
10510 something exotic.
10511
10512 * validate.h
10513 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10514 new macros.
10515
10516 * unif.h: type renaming:
10517 scm_array -> scm_array_t
10518 scm_array_dim -> scm_array_dim_t
10519 the old names are deprecated, all in-Guile uses changed.
10520
10521 * tags.h (scm_ubits_t): new typedef, representing unsigned
10522 scm_bits_t.
10523
10524 * stacks.h: type renaming:
10525 scm_info_frame -> scm_info_frame_t
10526 scm_stack -> scm_stack_t
10527 the old names are deprecated, all in-Guile uses changed.
10528
10529 * srcprop.h: type renaming:
10530 scm_srcprops -> scm_srcprops_t
10531 scm_srcprops_chunk -> scm_srcprops_chunk_t
10532 the old names are deprecated, all in-Guile uses changed.
10533
10534 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10535 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10536 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10537 vectors.c, vports.c, weaks.c:
10538 various int/size_t -> size_t/scm_bits_t changes.
10539
10540 * random.h: type renaming:
10541 scm_rstate -> scm_rstate_t
10542 scm_rng -> scm_rng_t
10543 scm_i_rstate -> scm_i_rstate_t
10544 the old names are deprecated, all in-Guile uses changed.
10545
10546 * procs.h: type renaming:
10547 scm_subr_entry -> scm_subr_entry_t
10548 the old name is deprecated, all in-Guile uses changed.
10549
10550 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10551 type renaming:
10552 scm_option -> scm_option_t
10553 the old name is deprecated, all in-Guile uses changed.
10554
10555 * objects.c: various long -> scm_bits_t changes.
10556 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10557
10558 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10559 SCM_I_FIXNUM_BIT.
10560
10561 * num2integral.i.c: new file, multiply included by numbers.c, used
10562 to "templatize" the various integral <-> num conversion routines.
10563
10564 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10565 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10566 deprecated.
10567 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10568 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10569 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10570 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10571 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10572 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10573 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10574 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10575 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10576 scm_num2size): new functions.
10577
10578 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10579
10580 * load.c: change int -> size_t in various places (where the
10581 variable is used to store a string length).
10582 (search-path): call scm_done_free, not scm_done_malloc.
10583
10584 * list.c (scm_ilength): return a scm_bits_t, not long.
10585 some other {int,long} -> scm_bits_t changes.
10586
10587 * hashtab.c: various [u]int -> scm_bits_t changes.
10588 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10589 (scm_ihashx): n: uint -> scm_bits_t
10590 use scm_bits2num instead of scm_ulong2num.
10591
10592 * gsubr.c: various int -> scm_bits_t changes.
10593
10594 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10595
10596 * gh_data.c (gh_num2int): no loss of precision any more.
10597
10598 * gh.h (gh_str2scm): len: int -> size_t
10599 (gh_{get,set}_substr): start: int -> scm_bits_t,
10600 len: int -> size_t
10601 (gh_<num>2scm): n: int -> scm_bits_t
10602 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10603 (gh_length): return scm_bits_t, not unsigned long.
10604
10605 * gc.[hc]: various small changes relating to many things stopping
10606 being long and starting being scm_[u]bits_t instead.
10607 scm_mallocated should no longer wrap around.
10608
10609 * fports.h: type renaming:
10610 scm_fport -> scm_fport_t
10611 the old name is deprecated, all in-Guile uses changed.
10612
10613 * fports.c (fport_fill_input): count: int -> scm_bits_t
10614 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10615
10616 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10617 those prototypes, as the functions they prototype don't exist.
10618
10619 * fports.c (default_buffer_size): int -> size_t
10620 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10621 default_size: int -> size_t
10622 (scm_setvbuf): csize: int -> scm_bits_t
10623
10624 * fluids.c (n_fluids): int -> scm_bits_t
10625 (grow_fluids): old_length, i: int -> scm_bits_t
10626 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10627 scm_bits_t
10628 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10629
10630 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10631 the new and shiny SCM_NUM2INT.
10632
10633 * extensions.c: extension -> extension_t (and made a typedef).
10634
10635 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10636 there are no nasty surprises if/when the various deeply magic tag
10637 bits move somewhere else.
10638
10639 * eval.c: changed the locals used to store results of SCM_IFRAME,
10640 scm_ilength and such to be of type scm_bits_t (and not int/long).
10641 (iqq): depth, edepth: int -> scm_bits_t
10642 (scm_eval_stack): int -> scm_bits_t
10643 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10644 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10645 i: int -> scm_bits_t
10646
10647 * environments.c: changed the many calls to scm_ulong2num to
10648 scm_ubits2num.
10649 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10650
10651 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10652
10653 * debug.h: type renaming:
10654 scm_debug_info -> scm_debug_info_t
10655 scm_debug_frame -> scm_debug_frame_t
10656 the old names are deprecated, all in-Guile uses changed.
10657 (scm_debug_eframe_size): int -> scm_bits_t
10658
10659 * debug.c (scm_init_debug): use scm_c_define instead of the
10660 deprecated scm_define.
10661
10662 * continuations.h: type renaming:
10663 scm_contregs -> scm_contregs_t
10664 the old name is deprecated, all in-Guile uses changed.
10665 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10666 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10667
10668 * continuations.c (scm_make_continuation): change the type of
10669 stack_size from long to scm_bits_t.
10670
10671 * ports.h: type renaming:
10672 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10673 scm_port -> scm_port_t
10674 scm_ptob_descriptor -> scm_ptob_descriptor_t
10675 the old names are deprecated, all in-Guile uses changed.
10676 (scm_port_t.entry): int -> scm_bits_t.
10677 (scm_port_t.line_number): int -> long.
10678 (scm_port_t.putback_buf_size): int -> size_t.
10679
10680 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10681 global namespace and have little value beside that).
10682 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10683 SCM handle).
10684 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10685 exist (for size_t & ptrdiff_t).
10686 (scm_sizet): deprecated.
10687
10688 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10689
10690 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10691
10692 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10693 SCM_VARIABLE_INIT since that it what it used to be.
10694
10695 * deprecation.c (scm_include_deprecated_features): Make docstring
10696 ANSIsh. Thanks to Matthias Köppe!
10697
10698 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10699
10700 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10701 needed for weak-key hashtables.
10702
10703 * procs.c (scm_make_subr_with_generic): Add missing last argument
10704 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10705
10706 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10707 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10708
10709 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10710
10711 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10712
10713 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10714 `duplicate_string'. Do not use an indirect cell, store symbol
10715 directly in collision list of hash table.
10716 (duplicate_string): Removed.
10717
10718 * init.c (scm_init_guile_1): Call scm_init_extensions.
10719
10720 * Makefile.am: Add "extensions.c" and related files in all the
10721 right places.
10722
10723 * extensions.h, extension.c: New files.
10724
10725 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10726
10727 * modules.h (scm_system_module_env_p): Move out of deprecated
10728 section.
10729
10730 * rw.h (scm_init_rw): Added prototype.
10731
10732 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10733 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10734 New functions. They replace scm_make_gsubr and
10735 scm_make_gsubr_with_generic. The `make' variants only create the
10736 gsubr object, while the `define' variants also put it into the
10737 current module. Changed all callers.
10738 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10739
10740 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10741 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10742 functions. They replace scm_make_subr, scm_make_subr_opt and
10743 scm_make_subr_with_generic. The `make' variants only create the
10744 subr object, while the `define' variants also put it into the
10745 current module. Changed all callers.
10746 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10747 Deprecated.
10748
10749 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10750 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10751 the comments above.
10752
10753 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10754
10755 * throw.c (scm_lazy_catch): Slight docstring clarification.
10756
10757 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10758
10759 * throw.c: Lazy-catch handlers are no longer allowed to return.
10760 Fixed comments throughout.
10761 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10762 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10763 recognized as such.
10764
10765 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10766 refered to s_scm_minor_version previously.
10767
10768 * modules.h, modules.c: Moved around a lot of code so that
10769 deprecated features appear at the bottom.
10770 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10771 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10772 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10773 scm_load_scheme_module): Deprecated.
10774 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10775 environments corresponding to the root module.
10776 (convert_module_name, scm_c_resolve_module,
10777 scm_c_call_with_current_module, scm_c_define_module,
10778 scm_c_use_module, scm_c_export): New.
10779 (the_root_module): New static variant of scm_the_root_module. Use
10780 it everywhere instead of scm_the_root_module.
10781
10782 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10783 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10784 (scm_c_with_fluid): New.
10785 (scm_with_fluids): Use scm_c_with_fluids instead of
10786 scm_internal_with_fluids.
10787
10788 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10789 `scm_init_goops'. Do not explicitly create/switch modules.
10790 Return SCM_UNSPECIFIED.
10791 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10792 (scm_load_goops): Use scm_c_resolve_module instead of
10793 scm_resolve_module.
10794
10795 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10796 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10797 `scm_init_rw' prior to loading the startup files.
10798
10799 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10800 scm_init_rdelim. Do not explicitly create/switch modules.
10801 Return SCM_UNSPECIFIED.
10802 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10803 procedure.
10804
10805 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10806 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10807 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10808
10809 * script.c (scm_shell): Evaluate the compiled switches in the
10810 current module, not in the root module.
10811
10812 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10813
10814 * fluids.c (scm_c_with_fluids): Rename from
10815 scm_internal_with_fluids.
10816 (scm_internal_with_fluids): Deprecated.
10817 (scm_c_with_fluid): New.
10818
10819 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10820
10821 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10822
10823 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10824 accessed with SCM_C[AD]R.
10825
10826 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10827
10828 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10829
10830 * version.c (s_scm_major_version): doc fixes.
10831 (s_scm_minor_version): doc fixes.
10832 (s_scm_minor_version): new function.
10833
10834 * version.h (scm_init_version): new function.
10835
10836 * versiondat.h.in: add GUILE_MICRO_VERSION.
10837
10838 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10839
10840 * deprecation.c (scm_init_deprecation): Renamed
10841 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10842
10843 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10844
10845 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10846 dependent on cpp_cnvt.awk
10847
10848 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10849
10850 * script.c (scm_compile_shell_switches): New command line option
10851 `--use-srfi' for loading a list of SRFIs on startup.
10852 (scm_shell_usage): Added `--use-srfi' to help message.
10853
10854 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10855
10856 Merged from mvo-vcell-cleanup-1-branch.
10857
10858 The concept of vcells has been removed from Guile. With it,
10859 explicit obarrays and associated operations are gone. Use
10860 hashtables instead of obarrays.
10861
10862 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10863 result as variable instead of vcell. Glocs no longer point to a
10864 vcell but to a variable. Use scm_c_define instead of
10865 scm_sysintern and treat the result as a variable (which it is),
10866 not a vcell.
10867
10868 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10869 SCM_DEFVARIABLEP): Deprecated.
10870 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10871 (variable_print): Do not print name of variable.
10872 (variable_equalp): Compare values, not vcells.
10873 (anonymous_variable_sym): Removed.
10874 (make_vcell_variable): Removed.
10875 (make_variable): New, as replacement.
10876 (scm_make_variable, scm_make_undefined_variable): Do not take name
10877 hint parameter.
10878 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10879 error in that case.
10880 (scm_builtin_variable): Deprecated.
10881
10882 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10883 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10884 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10885 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10886 scm_string_to_obarray_symbol, scm_intern_symbol,
10887 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10888 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10889 Deprecated and moved to "symbols-deprecated.c".
10890 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10891 (scm_init_symbols): Call scm_init_symbols_deprecated.
10892 * symbols-deprecated.c: New file.
10893 * Makefile.am: Added symbols-deprecated.c and related files in all
10894 the right places.
10895
10896 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10897 SCM_GLOBAL_VCELL_INIT): Deprecated.
10898 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10899 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10900
10901 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10902 SCM_GLOC_SYM.
10903
10904 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10905 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10906 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10907 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10908 Changed according to the `throughout' comments.
10909
10910 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10911 to `int'.
10912 (scm_module_type): Removed.
10913 (the_root_module): Renamed to the_root_module_var. Now points to
10914 a variable instead of a vcell. Updated all uses.
10915 (scm_the_root_module): Return SCM_BOOL_F when module systems
10916 hasn't been booted yet.
10917 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10918 (scm_post_boot_init_modules): Made static.
10919 (scm_set_current_module): Call scm_post_boot_init_modules on first
10920 call.
10921 (make_modules_in, beautify_user_module_x, resolve_module,
10922 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10923 suffix. Now point to variables instead of vcells. Updated all
10924 uses.
10925 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10926 and return SCM_BOOL_F in that case.
10927 (scm_module_transformer): Likewise.
10928 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10929 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10930 (scm_eval_closure_lookup): Do not allow new definitions when
10931 `interface' flag is set.
10932 (scm_standard_interface_eval_closure): New.
10933 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10934 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10935 scm_c_lookup, scm_c_module_define, scm_c_define,
10936 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10937 scm_modules_prehistory): New.
10938 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10939 instead of scm_intern0.
10940
10941 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10942 symbol.
10943
10944 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10945 hashtable operations to maintain the keywords, not obarray ones.
10946
10947 * init.c (scm_load_startup_files): Do not call
10948 scm_post_boot_init_modules. This is done by
10949 scm_set_current_module now.
10950 (scm_init_guile_1): Call scm_modules_prehistory. Call
10951 scm_init_variable early on.
10952
10953 * goops.c (s_scm_sys_goops_loaded): Get
10954 var_compute_applicable_methods from scm_sym2var, not from a direct
10955 invocation of scm_goops_lookup_closure.
10956
10957 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10958
10959 * gc.c: Added simple debugging hack to mark phase of GC: When
10960 activated, do not tail-call scm_gc_mark. This gives nice
10961 backtraces.
10962 (scm_unhash_name): Removed.
10963
10964 * feature.c (features): Renamed to features_var. Now points to a
10965 variable instead of a vcell. Updated all uses.
10966
10967 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10968 `scm_current_module_lookup_closure' which will do the right thing
10969 when the module system hasn't been booted yet.
10970 (SCM_GLOC_SYM): Removed.
10971 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10972 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10973
10974 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10975 instead of with vcells. Do not overwrite `var' with the result of
10976 the lookup, use the new `real_var' instead. Remove `var2' in
10977 exchange (which was only used with threads).
10978 (sym_three_question_marks): New.
10979 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10980 `SCM_GLOC_SYM'.
10981 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10982 (scm_m_atfop): Expect the function definition to be a variable
10983 instead of a vcell.
10984 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10985 symbol instead.
10986 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10987 (scm_eval_args): Use more explicit code in the gloc branch of the
10988 atrocious struct ambiguity test. The optimizer will sort this
10989 out.
10990 (scm_deval_args): Likewise.
10991 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10992 remember the symbol instead. Added some comments where
10993 scm_tc3_cons_gloc really exclusively refers to structs.
10994 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10995 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10996 of scm_sysintern in general.
10997
10998 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10999 explicit magic.
11000
11001 * debug.c (s_scm_make_gloc): Only allow proper variables, no
11002 pairs. Put the variable directly in the gloc.
11003 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
11004 (scm_init_debug): Use scm_c_define instead scm_sysintern.
11005
11006 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
11007
11008 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
11009 scm_the_last_stack_fluid_var. It now points to a variable instead
11010 of a vcell. Updated all uses.
11011 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
11012 instead of a vcell. Updated all uses.
11013
11014 * _scm.h: Include "variables.h" and "modules.h" since almost
11015 everybody needs them now.
11016
11017 * root.h (scm_symhash, scm_symhash_vars): Removed.
11018 * gc.c (scm_init_storage): Do not initialize them.
11019
11020 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11021
11022 * eval.c (scm_init_eval): Initialize scm_undefineds and
11023 scm_listofnull.
11024
11025 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
11026 like the SCM_NEWCELL macro counterparts.
11027
11028 (scm_init_storage, scm_init_gc): Moved initialization of
11029 scm_tc16_allocated from scm_init_gc to scm_init_storage.
11030
11031 (scm_init_storage): Moved initialization of scm_undefineds and
11032 scm_listofnull to eval.c, initializion of scm_nullstr to
11033 strings.c, initializion of scm_nullvect to vectors.c.
11034
11035 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
11036 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
11037
11038 * init.c (scm_init_guile_1): Reordered some initializations and
11039 added dependcy information comments.
11040
11041 * load.c (scm_init_load): Use scm_nullstr.
11042
11043 * strings.c (scm_init_strings): Initialize scm_nullstr.
11044
11045 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
11046
11047 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
11048
11049 * values.c (print_values): Print as a unreadable object, not as
11050 multiple lines. Thanks to Matthias Köppe!
11051
11052 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
11053
11054 * deprecation.c: Fixed copyright date.
11055
11056 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
11057 DEPRECATION_H to SCM_DEPRECATION_H.
11058
11059 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
11060
11061 * guile-doc-snarf.in: Update copyright.
11062 Fix relative path bug. Thanks to Sergey Poznyakoff.
11063
11064 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
11065
11066 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
11067 accept open ports. Thanks to Quetzalcoatl Bradley!
11068
11069 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11070
11071 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
11072 has 779 primitives on startup.
11073
11074 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
11075
11076 * eval.c (scm_i_eval): Copy expression before passing it to
11077 SCM_XEVAL. The copy operation was removed unintendedly during my
11078 change on 2001-03-25.
11079
11080 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
11081
11082 from Matthias Köppe (thanks!):
11083
11084 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
11085 portable.
11086
11087 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
11088 docstring.
11089
11090 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11091
11092 * gc.c (scm_init_gc): Added FIXME comment.
11093
11094 * hooks.c: Since hooks don't have a name any more, it is not
11095 necessary to include objprop.h.
11096
11097 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
11098
11099 (symbol_name, scm_make_hook_with_name): Removed.
11100
11101 (scm_create_hook): Don't set the hook's name property.
11102
11103 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
11104
11105 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
11106
11107 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
11108
11109 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
11110 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
11111 FLOBUFLEN and define it unconditionally.
11112
11113 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
11114
11115 * gh_data.c (gh_lookup): Call gh_module_lookup with
11116 `scm_current_module ()', not `#f'.
11117 (gh_module_lookup): Expect a module instead of an obarray as first
11118 argument and do lookup in that module.
11119
11120 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
11121 arrays. The length of array is already determined differently and
11122 scm_uniform_vector_length does not work on arrays.
11123
11124 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
11125
11126 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
11127 as well. "SCM (*)(...)" does not work on RedHat 7.1.
11128
11129 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
11130 they are not used. Changed `wrong type' error into `wrong num
11131 args' error. Changed all callers.
11132
11133 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
11134 arguments are supplied.
11135
11136 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
11137
11138 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
11139 describe `regexp/notbol' and `regexp/noteol' execution flags.
11140
11141 * strop.c (scm_substring_move_x): Doc fix; nfc.
11142
11143 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
11144
11145 * objects.c, objects.h (scm_valid_object_procedure_p): New.
11146 (scm_set_object_procedure_x): Use it to check argument. Fix
11147 docstring.
11148
11149 * evalext.c (scm_definedp): Fix docstring.
11150
11151 2001-05-05 Gary Houston <ghouston@arglist.com>
11152
11153 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
11154 support.
11155
11156 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
11157
11158 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
11159 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
11160 Change R4RS references to R5RS.
11161
11162 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
11163 docstring source are correctly reproduced in the output (ii)
11164 we don't anymore get occasional trailing quotes. Also reorganized
11165 and commented the code a little.
11166
11167 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
11168 fixes.
11169
11170 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11171
11172 * strop.c (scm_string_split): New procedure.
11173
11174 * strop.h (scm_string_split): Added prototype.
11175
11176 2001-05-04 Gary Houston <ghouston@arglist.com>
11177
11178 * socket.c: define uint32_t if netdb.h doesn't. thanks to
11179 Dale P. Smith.
11180
11181 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
11182
11183 * rw.c: Include "modules.h" and "strports.h".
11184
11185 * net_db.h (scm_gethost): Added prototype.
11186
11187 * deprecation.h, deprecation.c: New.
11188 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
11189 (DOT_X_FILES): Added "deprecation.x".
11190 (modinclude_HEADERS): Added "deprecation.h".
11191
11192 * init.c: Include "deprecation.h".
11193 (scm_init_guile_1): Call scm_init_deprecation.
11194
11195 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
11196
11197 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
11198 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
11199 New.
11200
11201 2001-04-29 Gary Houston <ghouston@arglist.com>
11202
11203 * rw.c: new file, implementing C part of module (ice-9 rw).
11204 (scm_read_string_x_partial): moved from ioext.c
11205 (scm_init_rw): new proc.
11206 * rw.h: new file.
11207 init.c: include rw.h and call scm_init_rw.
11208 Makefile.am: include rw.c and rw.h.
11209
11210 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
11211
11212 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
11213 know what's supposed to happen to it.
11214
11215 * list.h (scm_list_star): deprecation expired - removed.
11216
11217 * numbers.h (scm_dblproc): deprecation expired - removed.
11218 (SCM_UNEGFIXABLE): deprecation expired - removed.
11219 (SCM_FLOBUFLEN): deprecation expired - removed.
11220 (SCM_INEXP): deprecation expired - removed.
11221 (SCM_CPLXP): deprecation expired - removed.
11222 (SCM_REAL): deprecation expired - removed.
11223 (SCM_IMAG): deprecation expired - removed.
11224 (SCM_REALPART): deprecation expired - removed.
11225 (scm_makdbl): deprecation expired - removed.
11226 (SCM_SINGP): deprecation expired - removed.
11227 (SCM_NUM2DBL): deprecation expired - removed.
11228 (SCM_NO_BIGDIG): deprecation expired - removed.
11229
11230 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
11231 (scm_tc_dblr): deprecation expired - removed.
11232 (scm_tc_dblc): deprecation expired - removed.
11233 (scm_tc16_flo): deprecation expired - removed.
11234 (scm_tc_flo): deprecation expired - removed.
11235
11236 * tag.h (scm_tag): deprecation expired - removed.
11237
11238 * tag.c: (scm_tag): deprecation expired - removed.
11239
11240 * ioext.c: (scm_fseek): deprecation expired - removed.
11241
11242 * ioext.h (scm_fseek): deprecation expired - removed.
11243
11244 * gh_data.c (gh_int2scmb): deprecation expired - removed.
11245
11246 * gh.h (gh_int2scmb): deprecation expired - removed.
11247
11248 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
11249
11250 * stacks.c (scm_make_stack): Fix typo in docstring.
11251
11252 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
11253
11254 * error.c (scm_sysmissing): deprecation expired - removed.
11255
11256 * error.h (scm_sysmissing): deprecation expired - removed.
11257
11258 * gc.c
11259 (scm_init_gc): gc-thunk deprecation expired - removed.
11260 (scm_gc_vcell): deprecation expired - removed.
11261 (gc_async_thunk): scm_gc_vcell related code removed.
11262
11263 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
11264
11265 * strings.h
11266 (SCM_NSTRINGP): deprecation expired - removed.
11267 (SCM_NRWSTRINGP): deprecation expired - removed.
11268
11269 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
11270
11271 * chars.h
11272 (SCM_ICHRP): deprecation expired - removed.
11273 (SCM_ICHR): deprecation expired - removed.
11274 (SCM_MAKICHR): deprecation expired - removed.
11275
11276 * ports.h
11277 (SCM_INPORTP): deprecation expired - removed.
11278 (SCM_OUTPORTP): deprecation expired - removed.
11279
11280 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
11281
11282 * modules.c (scm_module_type): New.
11283 (scm_post_boot_init_modules): Initialize from Scheme value.
11284 (the_module, scm_current_module, scm_init_modules): the_module is
11285 now a C only fluid.
11286 (scm_current_module): Export to Scheme.
11287 (scm_set_current_module): Do not call out to Scheme, do all the
11288 work in C. Export procedure to Scheme. Only accept modules, `#f'
11289 is no longer valid as the current module. Only set
11290 scm_top_level_lookup_closure_var and scm_system_transformer when
11291 they are not deprecated.
11292 (scm_module_transformer, scm_current_module_transformer): New.
11293
11294 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
11295 scm_current_module_transformer, scm_module_transformer): New.
11296
11297 * gh_data.c: Removed FIXME comment about gh_lookup returning
11298 SCM_UNDEFINED. That's the right thing to do.
11299
11300 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
11301 into the conditionally compiled sections.
11302 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
11303 scm_current_module_transformer instead of scm_system_transformer.
11304 * init.c (start_stack): Move initialization of
11305 scm_system_transformer to the deprecated section.
11306
11307 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
11308
11309 * throw.c (scm_throw): Correct docstring.
11310
11311 2001-04-22 Gary Houston <ghouston@arglist.com>
11312
11313 * socket.c: attempted to improve the docstrings slightly.
11314
11315 * net_db.c: remove bogus "close" declaration.
11316 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
11317 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
11318 moved to socket.c.
11319 * net_db.h: declarations moved too.
11320
11321 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
11322 long.
11323 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
11324 (VALIDATE_INET6): new macro.
11325 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
11326 inet-pton and inet-ntop.
11327 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
11328 (scm_addr_vector): use ipv6_net_to_num.
11329
11330 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11331
11332 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
11333 smob number explicitly. Use SCM_TC2SMOBNUM instead.
11334
11335 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
11336 when compiled in debug mode.
11337
11338 (scm_gc_sweep): Only call smob's free function if it is defined.
11339
11340 * print.c (scm_iprin1): No need to check for validity of smob
11341 type or existence of print function.
11342
11343 * smob.[ch] (scm_smobs): Made into a fixed size global array.
11344 Resizing will not work well with preemptive threading.
11345
11346 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
11347
11348 (scm_make_smob_type): Extracted initialization of smob
11349 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
11350 of the critical section.
11351
11352 (scm_smob_prehistory): Initialize all smob descriptors. By
11353 default, don't assign a smob free function: Most smob types don't
11354 need one.
11355
11356 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
11357
11358 2001-04-21 Gary Houston <ghouston@arglist.com>
11359
11360 * socket.c (FLIP_NET_HOST_128): new macro.
11361 (scm_fill_sockaddr): use new macro.
11362 (scm_addr_vector): completed IPv6 address support. added const
11363 to the address parameter.
11364
11365 2001-04-20 Gary Houston <ghouston@arglist.com>
11366
11367 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11368 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11369 is defined.
11370 (scm_addr_vector): use a switch instead of multiple if statements.
11371 Add support for IPv6 (incomplete) .
11372 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11373
11374 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11375
11376 * struct.c (scm_free_structs): Only pairs may be accessed with
11377 SCM_C[AD]R.
11378
11379 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11380
11381 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11382
11383 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11384 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11385 parentheses in order to get the correct associativity.
11386
11387 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11388
11389 * unif.c (scm_array_to_list): Added missing handling of arrays of
11390 bytes. Thanks to Masao Uebayashi for the bug report.
11391
11392 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11393
11394 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11395 consistently.
11396
11397 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11398
11399 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11400
11401 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11402 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11403 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11404 SCM_CLOSURE_FORMALS.
11405
11406 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11407 (scm_i_procedure_arity): Prefer stronger predicates like
11408 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11409
11410 * macros.c (macro_print): Extracted macro printing code from
11411 print.c and simplified it.
11412
11413 (scm_macro_type): Use SCM_MACRO_TYPE;
11414
11415 (scm_init_macros): Use macro_print for printing macros.
11416
11417 * print.c (scm_print_opts): Improved option documentation.
11418
11419 (scm_iprin1): Extracted printing of macros to macros.c.
11420 Simplified printing of ordinary closures.
11421
11422 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11423 Martin Grabmueller for the bug report.
11424
11425 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11426
11427 This patch eliminates some further applications of SCM_C[AD]R to
11428 non pair cells.
11429
11430 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11431 never been applied to real pairs.
11432
11433 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11434
11435 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11436
11437 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11438 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11439 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11440
11441 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11442 Added.
11443
11444 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11445 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11446
11447 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11448 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11449 SCM_SET{AND,OR}_CAR.
11450
11451 2001-04-17 Gary Houston <ghouston@arglist.com>
11452
11453 * some initial support for IPv6:
11454
11455 * socket.c (scm_fill_sockaddr): improve the argument validation.
11456 don't allocate memory until all args are checked. instead of
11457 unconditional memset of soka, try setting sin_len to 0 if
11458 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11459 (scm_socket, scm_connect): extend docstrings for IPv6.
11460 (scm_init_socket): intern AF_INET6 and PF_INET6.
11461
11462 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11463
11464 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11465 matches SCM_DEFER_INTS at the beginning of the function.
11466
11467 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11468
11469 * gc.c (scm_igc): Unconditionally call
11470 SCM_CRITICAL_SECTION_START/END.
11471
11472 * fluids.c (next_fluid_num): Unconditionally call
11473 SCM_CRITICAL_SECTION_START/END.
11474 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11475
11476 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11477 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11478 Removed.
11479
11480 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11481 Defined as nothing for the case of !defined(USE_THREADS).
11482 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11483 Removed.
11484 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11485 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11486 LINE.
11487 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11488 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11489 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11490 SCM_CRITICAL_SECTION_START/END.
11491 (SCM_REALLOW_INTS: Bug fix. Don't call
11492 SCM_THREAD_SWITCHING_CODE.
11493 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11494 SCM_THREAD_SWITCHING_CODE directly.
11495 (SCM_ENTER_A_SECTION): Unconditionally use
11496 SCM_CRITICAL_SECTION_START/END. (was:
11497 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11498
11499 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11500
11501 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11502 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11503 allowed to explicitly set this macro via the CFLAGS variable
11504 during make.
11505
11506 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11507 (SCM_THREAD_CRITICAL_SECTION_START,
11508 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11509 SCM_THREAD_CRITICAL_SECTION_START/END to
11510 SCM_CRITICAL_SECTION_START/END.
11511
11512 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11513
11514 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11515 instead of bzero.
11516
11517 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11518 (MISSING_BZERO_DECL): Remove the declaration.
11519
11520 Thanks to NIIBE Yutaka.
11521
11522 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11523
11524 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11525 goops module should be registered in order to work for an
11526 application which uses libguile statically linked.)
11527
11528 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11529
11530 * numbers.[ch] (scm_num2long, scm_num2long_long,
11531 scm_num2ulong_long, scm_num2ulong): Argument position is an
11532 unsigned integer.
11533
11534 * environments.c (eval_environment_folder,
11535 import_environment_folder), gh_data.c (gh_scm2longs,
11536 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11537 for integers and pointers, respectively.
11538
11539 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11540 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11541 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11542 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11543
11544 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11545 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11546 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11547 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11548 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11549 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11550
11551 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11552
11553 * strings.c (scm_read_only_string_p): Update docstring to reflect
11554 current (non-)usage of "read only" strings.
11555 (scm_make_shared_substring): Clarify docstring by changing
11556 "semantics" to "arguments".
11557
11558 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11559
11560 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11561 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11562 improvements.
11563
11564 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11565
11566 The following changes make the documentation more consistent.
11567
11568 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11569 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11570 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11571 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11572 ... @end lisp.
11573
11574 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11575 (scm_array_dimensions, scm_make_shared_array),
11576 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11577 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11578 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11579 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11580 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11581 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11582 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11583 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11584 @example ... @end example to @lisp ... @end lisp.
11585
11586 * weaks.c (scm_weak_vector): Corrected docstring.
11587
11588 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11589 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11590 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11591 (scm_hashx_set_x, scm_hashx_get_handle),
11592 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11593 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11594 vectors.c (scm_vector_fill_x), strings.c
11595 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11596 objprop.c (scm_set_object_properties_x):
11597 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11598 strports.c (scm_call_with_input_string), ports.c
11599 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11600 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11601 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11602 (scm_make_weak_vector,scm_weak_vector_p),
11603 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11604 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11605 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11606 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11607 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11608 Made parameter names match documentation by renaming parameters
11609 and/or fixing docstrings.
11610
11611 * numbers.c (scm_ash): Corrected Texinfo markup.
11612
11613 * strop.c (scm_string_index, scm_string_rindex),
11614 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11615
11616 * vports.c (scm_make_soft_port), unif.c
11617 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11618 (scm_dimensions_to_uniform_array, scm_transpose_array),
11619 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11620 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11621 (scm_array_to_list, scm_list_to_uniform_array),
11622 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11623 (scm_open_input_string, scm_open_output_string),
11624 (scm_get_output_string), strop.c (scm_string_copy),
11625 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11626 (scm_get_internal_real_time, scm_times),
11627 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11628 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11629 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11630 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11631 simpos.c (scm_system), random.c (scm_random_uniform),
11632 (scm_random_normal, scm_random_exp), ramap.c
11633 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11634 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11635 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11636 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11637 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11638 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11639 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11640 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11641 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11642 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11643 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11644 (scm_integer_expt, scm_bit_extract, scm_logcount),
11645 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11646 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11647 (scm_interaction_environment), macros.c (scm_makacro),
11648 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11649 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11650 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11651 (scm_fluid_ref), filesys.c (scm_open_fdes),
11652 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11653 Docstring correction: `Returns' -> `Return'
11654
11655 * gc.c (scm_set_debug_cell_accesses_x):
11656 (s_scm_gc_set_debug_check_freelist_x):
11657 * fluids.c (scm_fluid_p): Added texinfo markup.
11658
11659 * error.c (scm_strerror): Made docstring more precise.
11660
11661 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11662 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11663 (scm_symbol_p, scm_symbol_to_string), strorder.c
11664 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11665 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11666 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11667 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11668 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11669
11670 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11671
11672 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11673 mode, as suggested by Michael Livshin.
11674
11675 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11676
11677 * backtrace.c (display_backtrace_body): since the `print_state'
11678 variable is not used (instead its data field is used directly as
11679 `pstate'), protect it from the hungry compiler optimizations.
11680 thanks to Bill Schottstaedt for the report.
11681
11682 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11683
11684 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11685 It is only defined and used if guile is compiled with
11686 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11687 let cells with a free_cell type tag be visible outside of the
11688 garbage collector when in debug mode.
11689
11690 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11691
11692 (scm_assert_cell_valid): Use a local static variable to avoid
11693 recursion.
11694
11695 (MARK): Only check for rogue cell pointers in debug mode. Use
11696 scm_cellp for this purpose and place all checks for rogue pointers
11697 into that function. Further, since due to conservative scanning
11698 we may encounter free cells during marking, don't use the standard
11699 cell type accessor macro to determine the cell type.
11700
11701 (scm_cellp): Check if the cell pointer actually points into a
11702 card header.
11703
11704 (scm_init_gc): Initalize scm_tc16_allocated.
11705
11706 * gc.h (GCH): Renamed to SCM_GC_H.
11707
11708 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11709 might be unnecessary, but I feel better this way :-)
11710
11711 (SCM_GC_CELL_TYPE): New macro.
11712
11713 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11714 in guile, and it is unlikely that they will be applied to real
11715 pairs anyway.
11716
11717 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11718
11719 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11720 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11721
11722 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11723 make sure that in debug mode no free cell will ever be visible
11724 outside of the garbage collector.
11725
11726 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11727
11728 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11729 values.
11730
11731 * async.c (scm_system_async), variable.c (scm_make_variable,
11732 scm_make_undefined_variable): Use scm_cons to create a pair.
11733
11734 * debug.c (scm_reverse_lookup): Perform proper type checking.
11735 Remove suspicious use of SCM_SLOPPY_CONSP.
11736
11737 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11738 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11739 the corresponding optimization.
11740
11741 * eval.c (iqq): Use proper type check.
11742
11743 (scm_m_expand_body): Remove redundant type checks.
11744
11745 (promise_print): Don't access promise cells as pairs.
11746
11747 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11748 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11749 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11750 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11751 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11752
11753 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11754 (scm_iprin1): Use new macro predicate and accessors.
11755
11756 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11757 in macros.h.
11758
11759 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11760 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11761 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11762 SCM_VARIABLE_H. Even the macros that are used to inhibit
11763 including a header file twice should be in the SCM_ namespace.
11764
11765 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11766 properties.c (scm_primitive_property_ref,
11767 scm_primitive_property_del_x): Prefer stronger predicates like
11768 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11769
11770 * gc.c (MARK): Use proper macros to access procedure-with-setter
11771 cell elements and closure cell elements.
11772
11773 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11774 access free cells as pairs.
11775
11776 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11777 no hashtab entry is found.
11778
11779 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11780 SCM_CLR_PORT_OPEN_FLAG.
11781
11782 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11783 use SCM_SET_C[AD]R for uninitialized cells.
11784
11785 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11786 If the hashtable has no slots, return #f instead of '(). This
11787 unifies the return value with most assoc-functions.
11788
11789 (scm_hash_fn_ref): Use proper type check.
11790
11791 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11792 Removed references to non-existing functions from documentation.
11793
11794 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11795 access keyword cell elements.
11796
11797 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11798 macros.
11799
11800 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11801
11802 * print.c (scm_iprlist): Added comment. Improved loop
11803 conditions.
11804
11805 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11806 pairs.
11807
11808 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11809
11810 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11811
11812 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11813 cells as pairs.
11814
11815 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11816 scm_variable_set_x): Use proper macros to access variable cell
11817 elements.
11818
11819 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11820
11821 * variable.h (SCM_VARVCELL): Don't access variable cells as
11822 pairs.
11823
11824 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11825 added FIXME comment, removed register specifier.
11826
11827 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11828
11829 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11830 * init.c (scm_init_guile_1): Don't init goopscore module.
11831
11832 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11833
11834 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11835
11836 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11837
11838 * strop.c (scm_string_to_list): Fixed docstring markup.
11839 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11840 (scm_string_downcase, scm_string_capitalize_x),
11841 (scm_string_capitalize): Rewrote and corrected docstrings.
11842 (scm_string_ci_to_symbol): Made docstring more explicit.
11843
11844 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11845
11846 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11847 eval.c can use it.
11848 (scm_call_with_values): Removed.
11849 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11850 so that it can be exported.
11851 (scm_call_with_values): Removed.
11852
11853 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11854 * eval.c: Include "libguile/values.h"
11855 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11856 New.
11857 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11858 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11859 New delcarations to support above change.
11860
11861 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11862 errors with last change.
11863
11864 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11865
11866 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11867 scm_i_eval): Moved the application of the system transformer from
11868 scm_i_eval to scm_primitive_eval.
11869
11870 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11871
11872 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11873
11874 * strop.c (scm_string_index): Fix docstring line break
11875 regression.
11876
11877 * list.c (scm_cons_star): Fix docstring typo.
11878
11879 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11880
11881 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11882 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11883 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11884 scm_make_string, scm_string_append), strports.c (st_resize_port,
11885 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11886 scm_makstr with calls to scm_allocate_string.
11887
11888 * strings.[ch] (scm_allocate_string): New function.
11889
11890 * strings.[ch] (scm_makstr): Deprecated.
11891
11892 2001-03-18 Gary Houston <ghouston@arglist.com>
11893
11894 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11895 NULL. rewrote the docstring.
11896 (scm_mkstemp): new procedure implementing "mkstemp!".
11897 * posix.h: declare scm_mkstemp.
11898
11899 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11900 normally it would be found in netdb.h.
11901
11902 2001-03-17 Gary Houston <ghouston@arglist.com>
11903
11904 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11905 warning when HAVE_ARRAYS is not defined. move len too.
11906
11907 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11908 (EXTRA_DOT_X_FILES): let configure set the value.
11909 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11910
11911 * gc.c (scm_must_malloc): changed the comment explaining when
11912 scm_must variants of malloc/free etc., should be used, based on
11913 explanation from Dirk Herrmann.
11914 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11915 string with procedure name. use scm_must_malloc instead of malloc.
11916 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11917 of malloc/free.
11918 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11919 scm_ungetc): use scm_must variants of malloc/realloc/free.
11920 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11921
11922 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11923
11924 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11925 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11926 scm_wrong_type_arg instead.
11927
11928 (SCM_WNA): Deprecated.
11929
11930 * error.[ch] (scm_wta): Deprecated.
11931
11932 * numbers.c (s_i_log): Minor comment fix.
11933
11934 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11935 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11936 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11937 wrong-num-args or misc errors.
11938
11939 * unif.c (scm_make_shared_array, scm_transpose_array,
11940 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11941 Validate the rest argument (note: this is only done when guile is
11942 built with SCM_DEBUG_REST_ARGUMENT=1)
11943
11944 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11945 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11946
11947 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11948 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11949
11950 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11951
11952 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11953 instead of scm_wrong_num_args.
11954
11955 * coop-threads.c: Don't include libguile/strings.h. (Was only
11956 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11957
11958 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11959 wrong-num-args errors.
11960
11961 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11962
11963 * error.[ch] (scm_error_num_args_subr): New function.
11964
11965 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11966
11967 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11968 (scm_length, scm_append, scm_reverse, scm_list_ref),
11969 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11970 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11971 (scm_delete1_x), gc.c (scm_map_free_list),
11972 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11973 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11974 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11975 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11976 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11977 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11978 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11979
11980 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11981 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11982 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11983 symbols.c (scm_symbol_interned_p), numbers.c
11984 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11985 markup.
11986
11987 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11988
11989 * snarf.h (SCM_CONST_LONG): Deprecated.
11990 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11991
11992 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11993
11994 * numbers.c (scm_num2ulong): Check that a bignum is positive
11995 before looking at the magnitude. Correctly check for overflow
11996 during conversion.
11997 (scm_num2long_long): Likewise.
11998 (scm_num2ulong_long): New.
11999 (ULONG_LONG_MAX): Define if not already defined.
12000 * numbers.h: (scm_num2ulong_long): New prototype.
12001
12002 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12003
12004 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
12005
12006 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
12007 (SCM_OPOUTSTRPORTP): New predicate macros.
12008 (scm_open_input_string, scm_open_output_string),
12009 (scm_get_output_string): New prototypes.
12010
12011 * strports.c (scm_open_input_string, scm_open_output_string),
12012 (scm_get_output_string): New procedures (SRFI-6 compliant).
12013 Made scm_tc16_strport non-static.
12014
12015 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12016
12017 * macros.h (SCM_ASSYNT): Removed unused object argument from
12018 signature.
12019
12020 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
12021 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
12022 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
12023 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
12024 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
12025 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
12026 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
12027 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
12028 scm_m_atdispatch): Removed unused object argument from call to
12029 SCM_ASSYNT.
12030
12031 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12032
12033 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
12034 const int* to reflect that the input array of integers remains
12035 unchanged. Thanks to Brett Viren for the hint.
12036
12037 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12038
12039 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
12040 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
12041 in various places.
12042 (gh_scm2newstr, gh_symbol2newstr): Change call to
12043 scm_must_malloc() to malloc(), because user-free()able memory is
12044 allocated.
12045
12046 * gc.c: Added declaration of `scm_debug_check_freelist'.
12047
12048 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12049
12050 * ports.c (scm_port_mode): Changed `mode' array size to 4.
12051
12052 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
12053
12054 * strports.c (scm_object_to_string): New procedure.
12055 (scm_strprint_obj): Deprecated.
12056 * strports.h: Reflect the changes.
12057
12058 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
12059
12060 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
12061
12062 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
12063 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
12064 SCM_ASSYNT to check for correct argument types. Either use some
12065 SCM_VALIDATE_* macro or an explicit test.
12066
12067 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
12068 misc-errors.
12069
12070 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
12071 instead of calling scm_wta.
12072
12073 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12074
12075 * load.c (scm_primitive_load, scm_primitive_load_path),
12076 (scm_sys_search_load_path): Corrected docstrings (file ->
12077 filename).
12078
12079 * eval.c (scm_force): Added texinfo markup to docstring.
12080 (scm_promise_p): Renamed parameter to `obj' to match docstring.
12081
12082 * debug-malloc.c: Reinserted #include <stdio.h>.
12083
12084 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
12085
12086 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
12087
12088 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
12089 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
12090 Use SCM_LISTn instead of scm_listify.
12091
12092 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12093
12094 * _scm.h: Removed #include <errno.h>.
12095
12096 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
12097 errno variable (can be a macro on some systems, for example when
12098 using linux libc with threads).
12099
12100 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
12101 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
12102 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
12103 #include <errno.h> in these 20 out of 100 files.
12104
12105 2001-03-10 Gary Houston <ghouston@arglist.com>
12106
12107 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
12108 not already defined.
12109
12110 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12111
12112 * coop.c: Inserted #include <stdio.h>.
12113
12114 * iselect.c: Reinserted #include <stdio.h>.
12115
12116 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
12117
12118 * posix.c: Replaced `#define' of __USE_XOPEN right before
12119 including unistd.h with a define of _GNU_SOURCE at the very top of
12120 the file.
12121
12122 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
12123
12124 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
12125 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
12126 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
12127 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
12128 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
12129 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
12130 print.c, procprop.c, procs.c, properties.c, ramap.c,
12131 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
12132 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
12133 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
12134 Remove #include <stdio.h>
12135 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
12136
12137 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
12138
12139 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12140
12141 * posix.c (scm_gethostname): Set initial name length to 256 for
12142 Solaris.
12143
12144 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12145
12146 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12147 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12148 (scm_sethostname, scm_gethostname): New prototypes.
12149
12150 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
12151 <sys/file.h>, if present.
12152 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
12153 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
12154 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12155 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12156 (scm_sethostname, scm_gethostname): New procedures.
12157
12158 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
12159
12160 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
12161 not optional (ii) "recommend" spelling correction.
12162
12163 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12164
12165 * ramap.c (racp): Removed optimization which caused array copying
12166 to fail if the two arrays shared storage. Re-inserted the IVDEP
12167 macros removed in the change of 2000-03-09. (Don't really have a
12168 complete grasp of what they are for, but they seem to be necessary
12169 on Crays. This needs testing!) Thanks to Miroslav Silovic.
12170
12171 * hash.c (scm_string_hash): Don't downcase characters.
12172
12173 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12174
12175 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
12176 size from 277 --> 1009.
12177
12178 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
12179 function.
12180
12181 * coop-threads.c: Fixed change of 2001-03-06.
12182
12183 * validate.h: Code formatting.
12184
12185 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
12186
12187 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
12188 (*.doc): Add dependency on guile-snarf.awk.in.
12189
12190 * guile-snarf.awk.in: Neglect spaces at the end of
12191 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
12192 middle of docstrings. (To avoid the problem with gcc-2.96.)
12193
12194 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
12195
12196 * coop-threads.c (scm_call_with_new_thread), load.c
12197 (scm_primitive_load, scm_sys_search_load_path), random.c
12198 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
12199 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
12200 (potentially) issue a scm-misc-error or wrong-num-args error
12201 message.
12202
12203 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
12204 about the expected type with the wrong-type-arg error message.
12205
12206 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
12207 a C level bug that can't be fixed from scheme anyway.
12208
12209 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12210
12211 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
12212 Duplicate bindings are OK in a let* since a let* is semantically
12213 equivalent to a nested set of let:s.
12214
12215 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12216
12217 * print.c (scm_print_options): Fixed texinfo in docstring.
12218
12219 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
12220 the underlying functions getservent, getprotoent or getnetent
12221 return NULL instead of signalling an error.
12222
12223 2001-03-04 Gary Houston <ghouston@arglist.com>
12224
12225 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
12226 taking an unexpectedly large filename for an AF_UNIX socket from
12227 bind/connect/sendto (thanks to Martin Grabmueller).
12228
12229 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
12230 former and adjusted the latter.
12231 (scm_socket, scm_socketpair): cosmetic changes.
12232 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
12233 size_t as socklen_t substitute. don't restrict args/return values
12234 to INUM: allow full range of int or size_t.
12235 (scm_fill_sockaddr): check arguments before allocating memory, to
12236 avoid leakage. use malloc, not scm_must_malloc.
12237 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
12238 substitute. free the sockaddr structure before throwing an error.
12239 (scm_init_add_buffer): procedure removed, together with its static
12240 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
12241 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
12242 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
12243 scm_sendto): use a local buffer instead of scm_addr_buffer.
12244 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
12245 not size_t.
12246 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
12247 call to detect whether recvfrom could be bothered to set the address.
12248 (scm_init_socket): don't call scm_init_addr_buffer.
12249
12250 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12251
12252 * debug.c (scm_procedure_source, scm_procedure_environment),
12253 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
12254 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
12255 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
12256 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
12257 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
12258 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
12259 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
12260 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
12261 scm_array_to_list, scm_array_prototype), validate.h
12262 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
12263 scm_misc_error or scm_wrong_type_arg instead.
12264
12265 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
12266
12267 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12268
12269 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
12270 (scm_sys_tag_body): Added.
12271
12272 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12273
12274 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
12275 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
12276 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
12277 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
12278 options.c (scm_options), ports.c (scm_remove_from_port_table),
12279 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
12280 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
12281 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
12282 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
12283 instead.
12284
12285 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12286
12287 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
12288
12289 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
12290
12291 * eval.c (scm_s_duplicate_bindings): New error message.
12292 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
12293
12294 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
12295
12296 * eval.h (SCM_EVALIM2): New macro. Use it when a
12297 immediate, literal constant should be evaluated.
12298 * eval.c (scm_s_duplicate_formals): New error message string.
12299 (scm_c_improper_memq): New function.
12300 (scm_m_lambda): Check for duplicate arguments.
12301 (scm_ceval, scm_deval): When executing a body: only cons a new
12302 toplevel environment frame when it is different from the
12303 existing one; use EVALCAR instead of SIDEVAL so that we can properly
12304 check for empty combinations; use SCM_EVALIM2 for the same reason
12305 in the non-toplevel loop.
12306 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
12307 New labels with the meaning of their non-"nontoplevel" partners,
12308 but they are used when it is known that the body is not evaluated at
12309 top-level.
12310 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
12311 reporting for empty combinations.
12312
12313 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
12314
12315 * Remove dump facilities.
12316 * dump.c, dump.h: Removed.
12317 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
12318 * init.c: Remove #include "libguile/dump.h".
12319 (scm_init_guile_1): Remove scm_init_dump.
12320 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
12321 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
12322 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
12323 (scm_set_smob_dump, scm_set_smob_undump): Removed.
12324
12325 * keywords.c: Remove #include "libguile/dump.h".
12326 (keyword_dump, keyword_undump): Removed.
12327 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
12328
12329 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12330
12331 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
12332 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
12333 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
12334 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
12335 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
12336 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
12337 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
12338 to @code{} as the texinfo manual recommends, converted the
12339 examples to use a @lisp{}-environment.
12340
12341 * strports.c (scm_eval_string): Cleaned up the docstring.
12342
12343 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
12344 markup.
12345
12346 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
12347 (scm_number_to_string, scm_string_to_number, scm_number_p)
12348 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
12349 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
12350 (scm_ash): Added texinfo markup and removed obsolete @refill.
12351 (scm_gr_p): Corrected comment.
12352 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
12353 docstring) comments.
12354 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
12355 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
12356 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
12357 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
12358 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
12359 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
12360 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
12361 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
12362
12363 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
12364
12365 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
12366 (Obviously nobody compiles with SCM_RECKLESS defined...)
12367
12368 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12369
12370 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12371
12372 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12373
12374 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12375
12376 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12377
12378 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12379 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12380 since use of `z' suggests that the arguments may be complex.
12381
12382 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12383 typos.
12384
12385 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12386
12387 * dump.c (scm_binary_write, scm_binary_read), eval.c
12388 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12389 scm_guardian_greedy_p, scm_make_guardian), fports.c
12390 (scm_file_port_p): Minor docstring fixes.
12391
12392 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12393
12394 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12395
12396 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12397 scm_i_eval.
12398 (make_class_from_template): Do not bother to set the current
12399 module around the call to DEFVAR, scm_eval takes care of that.
12400 (scm_init_goops): Make scm_module_goops and
12401 scm_goops_lookup_closure permanent objects.
12402
12403 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12404 top level, create a fresh top-level environment for each
12405 expression instead of mutating the exisint frame. This is
12406 important when that frame is closed over.
12407
12408 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12409 SCM_DIGSPERLONG instead of DIGSPERLONG.
12410
12411 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12412
12413 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12414 before applying arrow procedure in `cond' and before applying
12415 receiver procedure in call-with-current-continuation.
12416 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12417 macro. The argument is expanded more than one time.
12418
12419 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12420 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12421
12422 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12423
12424 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12425 notice and license.
12426
12427 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12428
12429 * variable.c (scm_make_variable, scm_make_undefined_variable)
12430 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12431 (scm_variable_bound_p), values.c (scm_values)
12432 (scm_call_with_values), unif.c (scm_bit_count)
12433 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12434 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12435 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12436 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12437 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12438 (scm_copy_random_state, scm_random), print.c (scm_newline)
12439 (scm_write_char, scm_simple_format), debug-malloc.c
12440 (scm_malloc_stats), environments.c (scm_environment_p)
12441 (scm_environment_bound_p, scm_environment_ref)
12442 (scm_environment_fold, scm_environment_define)
12443 (scm_environment_undefine, scm_environment_set_x)
12444 (scm_environment_cell, scm_environment_observe)
12445 (scm_environment_observe_weak, scm_environment_unobserve)
12446 (scm_make_eval_environment, scm_eval_environment_p)
12447 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12448 (scm_eval_environment_imported)
12449 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12450 (scm_import_environment_p, scm_import_environment_imports)
12451 (scm_import_environment_set_imports_x, scm_make_export_environment)
12452 (scm_export_environment_p, scm_export_environment_private)
12453 (scm_export_environment_set_private_x)
12454 (scm_export_environment_signature)
12455 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12456 Added texinfo markup.
12457
12458 * ports.c (scm_drain_input): Lowercased argument to @var.
12459 (scm_current_input_port, scm_current_output_port): Filled in
12460 missing explanation.
12461 (scm_current_load_port, scm_set_current_output_port)
12462 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12463 Added texinfo markup.
12464
12465 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12466 (scm_release_arbiter): Added texinfo markup to docstrings.
12467 Changed `Returns' to `Return'.
12468 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12469
12470 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12471
12472 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12473 by doubling them to `@@'.
12474
12475 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12476
12477 * numbers.c (scm_lognot), random.c (scm_random,
12478 scm_random_normal, scm_random_solid_sphere_x,
12479 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12480 scm_random_exp), dynwind.c
12481 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12482
12483 * goops.c (scm_sys_initialize_object, scm_instance_p,
12484 scm_class_name, scm_class_precedence_list, scm_class_slots,
12485 scm_class_environment, scm_generic_function_name,
12486 scm_generic_function_methods, scm_method_generic_function,
12487 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12488 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12489 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12490 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12491 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12492 scm_class_direct_supers, scm_class_direct_slots,
12493 scm_class_direct_subclasses, scm_class_direct_methods,
12494 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12495 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12496 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12497 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12498 scm_memoized_environment, scm_procedure_name,
12499 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12500 objects.c
12501 (scm_class_of, scm_entity_p, scm_operator_p,
12502 scm_set_object_procedure_x, scm_object_procedure,
12503 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12504 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12505 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12506 scm_hook_to_list), lang.c
12507 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12508 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12509 (scm_print_options, scm_port_with_print_state,
12510 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12511 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12512 scm_make_procedure_with_setter, scm_procedure), throw.c
12513 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12514 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12515 scm_stack_ref, scm_stack_length, scm_frame_p,
12516 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12517 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12518 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12519 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12520 (scm_dirname, scm_basename), dynwind.c
12521 (scm_wind_chain), read.c (scm_read_options, scm_read,
12522 scm_read_hash_extend), gc.c
12523 (scm_unhash_name), eval.c (scm_eval_options_interface,
12524 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12525 (scm_display_error, scm_set_print_params_x,
12526 scm_display_application, scm_display_backtrace, scm_backtrace),
12527 async.c (scm_async, scm_system_async, scm_async_mark,
12528 scm_system_async_mark, scm_run_asyncs, scm_noop,
12529 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12530 scm_mask_signals): Added docstrings.
12531
12532 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12533
12534 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12535 address of car/cdr. (Thanks to Dirk Herrmann)
12536 Use scm_sizet to obtain the length of strings.
12537 (Thanks to Matthias Koeppe)
12538
12539 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12540
12541 * symbols.c (scm_mem2symbol): Put a empty statement after the
12542 next_symbol label. This is mandated by ANSI, appearantly.
12543
12544 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12545
12546 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12547 sense to compile for a specific kernel version. Do not include
12548 <asm/signal.h> while defining __KERNEL__. This hack should no
12549 longer be needed and caused problems.
12550
12551 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12552
12553 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12554 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12555 can not deal with immediates.
12556
12557 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12558
12559 * list.c (scm_list_copy): Validate the first argument.
12560
12561 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12562
12563 Fix evaluator so that top-level expressions are correctly
12564 evaluated with respect to the module system.
12565
12566 * modules.h. modules.c (scm_current_module_lookup_closure): New
12567 function.
12568
12569 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12570 prototypes.
12571 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12572 names to better reflect their meaning.
12573
12574 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12575 evaluated at top-level and synronize lookup closure before
12576 executing every subform.
12577 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12578 (scm_eval_x, scm_eval): Reimplement in terms of
12579 scm_primitive_eval_x and scm_primitive_eval, respectively.
12580
12581 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12582
12583 * macros.c (scm_macro_name, scm_macro_transformer): Use
12584 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12585 Thanks!
12586
12587 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12588
12589 * dump.c (scm_store_bytes): Store data size before data.
12590 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12591 * dump.h (scm_restore_bytes): Updated.
12592
12593 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12594
12595 * dump.c: Use double cells for update schedule.
12596
12597 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12598
12599 * ports.c (scm_unread_char): Take an optional argument.
12600
12601 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12602
12603 * modules.h (scm_selected_module, scm_current_module): Renamed
12604 scm_selected_module to scm_current_module to synchronize Scheme
12605 and C names.
12606 (scm_select_module, scm_set_current_module): Likewise. Changed
12607 all uses.
12608
12609 * ports.c (scm_port_for_each): Make a snapshot of the port table
12610 before iterating over it. The table might change while the user
12611 code is running. With the snapshot, the user can depend on the
12612 fact that each port that existed at the start of the iteration is
12613 encountered exactly once. (ice-9 popen) depends on this.
12614
12615 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12616
12617 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12618
12619 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12620 range checking for the size parameter. Thanks to Martin
12621 Grabmueller for the hint.
12622
12623 (scm_makstr): Reordered string initialization to make interrupt
12624 deferring unnecessary.
12625
12626 * vectors.c (scm_make_vector): Fixed range checking.
12627
12628 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12629
12630 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12631
12632 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12633 checking of the size parameter for type correctness and valid
12634 range. Thanks to Rob Browning for reporting the problem. Instead
12635 of deferring interrupts, scm_remember_upto_here_1 is used.
12636
12637 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12638
12639 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12640 (scm_dump_cell_update): Removed.
12641 (scm_dump_update): Renamed from scm_dump_object_update.
12642 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12643 a pointer instead of returning a value.
12644 * keywords.c (keyword_undump): Updated.
12645
12646 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12647
12648 * dump.c, dump.h: Modified a lot.
12649 (SCM_DUMP_COOKIE): Version 0.1
12650 (scm_dump_mark): Removed.
12651 (scm_restore_cell_object, scm_store_cell_object): New functions.
12652
12653 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12654 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12655 New slots: dump, undump.
12656 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12657 Updated.
12658
12659 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12660 (keyword_undump): Renamed from keyword_alloc.
12661 (scm_init_keywords): Set keyword_dump and keyword_undump.
12662
12663 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12664
12665 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12666 the deprecated SCM_DOUBLE_CELLP.
12667
12668 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12669
12670 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12671
12672 * dump.c, dump.h: New files.
12673 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12674 * init.c: #include "libguile/dump.h".
12675 (scm_init_guile_1): Call scm_init_dump.
12676 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12677 dump_dealloc, dump_store, undump_alloc, undump_restore,
12678 undump_init.
12679 * smob.c (scm_make_smob_type): Init the new slots.
12680 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12681 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12682
12683 * keywords.c: #include "libguile/dump.h".
12684 (keyword_dealloc, keyword_alloc): New functions.
12685 (scm_init_keywords): Set smob_dump and smob_undump.
12686
12687 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12688
12689 * vectors.c (scm_c_make_vector): New function.
12690 * vectors.h (scm_c_make_vector): Declared.
12691 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12692 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12693 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12694 (scm_make_method_cache, scm_i_vector2list,
12695 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12696 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12697 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12698 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12699 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12700 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12701 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12702 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12703
12704 * hashtab.c (scm_c_make_hash_table): New function.
12705 * hashtab.h (scm_c_make_hash_table): Declared.
12706 * environments.c (scm_make_leaf_environment,
12707 scm_make_eval_environment), gc.c (scm_init_storage),
12708 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12709 Use scm_c_make_hash_table.
12710
12711 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12712
12713 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12714
12715 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12716
12717 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12718 end of docstring.
12719
12720 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12721 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12722 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12723 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12724 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12725 scm_source_property, scm_set_source_property_x), sort.c
12726 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12727 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12728 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12729 docstrings.
12730
12731 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12732
12733 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12734 really get that arg.
12735
12736 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12737
12738 * goops.c (s_scm_get_keyword): Bug fix.
12739
12740 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12741
12742 The following patch was sent by Martin Grabmueller. It makes sure
12743 that in case of parameter errors the correct function name is
12744 shown, and that parameter types are only checked once.
12745
12746 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12747 string_capitalize_x): New functions. Each one performs the core
12748 functionality of the corresponding scm_* function.
12749
12750 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12751 scm_string_downcase_x, scm_string_downcase,
12752 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12753 parameter checking wrappers of the above functions.
12754
12755 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12756
12757 * continuations.c, dynl.c, keywords.c, load.c: Include
12758 strings.h. Thanks to Bill Schottstaedt for the bug report.
12759
12760 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12761
12762 * backtrace.c (display_header): Make sure that line and column
12763 information is shown independent of whether the port the code was
12764 read from had an associated filename. Thanks to Martin
12765 Grabmueller for providing this patch.
12766
12767 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12768
12769 * fports.[ch] (scm_file_port_p): New primitive.
12770
12771 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12772
12773 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12774 These are now defined in fports.c, strports.c and vports.c.
12775
12776 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12777 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12778 tags.h).
12779
12780 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12781 (scm_make_sfptob): Made static. These return a type code now.
12782
12783 fports.c (scm_init_fports), strports.c (scm_init_strports),
12784 vports.c (scm_init_vports): Create the corresponding port types.
12785
12786 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12787 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12788
12789 * init.c (scm_init_guile_1): Make sure strports are initialized
12790 before gdbint.
12791
12792 * ports.[ch] (scm_make_port_type): Changed the return type to
12793 scm_bits_t.
12794
12795 * ports.c (scm_ports_prehistory): Don't create any port types
12796 here.
12797
12798 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12799 against scm_tc16_fport directly.
12800
12801 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12802
12803 * srcprop.c (scm_set_source_property_x): Fix to handle
12804 (set-source-property! <obj> 'copy <datum>) correctly.
12805
12806 2001-01-24 Gary Houston <ghouston@arglist.com>
12807
12808 * filesys.c (scm_link): docstring fix.
12809 * fports.h (scm_setfileno): obsolete declaration removed.
12810 * posix.c: bogus popen declaration removed.
12811
12812 * rdelim.c: new file, split from ioext.c.
12813 * rdelim.h: new file, split from ioext.h
12814 * Makefile.am: add rdelim.c and related files.
12815 * init.c: call scm_init_rdelim. include rdelim.h.
12816
12817 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12818
12819 This patch was sent by Martin Grabmueller and makes sure that
12820 parameter errors are reported correctly by the lexicographic
12821 ordering predicates.
12822
12823 * strorder.c (string_less_p, string_ci_less_p): New functions.
12824
12825 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12826 functionality into string_less_p, string_ci_less_p respectively.
12827 The remaining code is just a wrapper to do the parameter
12828 checking.
12829
12830 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12831 parameters and call string_less_p instead of scm_string_less_p.
12832
12833 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12834 Check the parameters and call string_less_ci_p instead of
12835 scm_string_ci_less_p.
12836
12837 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12838
12839 This patch modifies scm_display_error to perform parameter
12840 checking. Thanks to Neil Jerram for the bug report.
12841
12842 * backtrace.[ch] (scm_i_display_error): New function.
12843
12844 * backtrace.c (scm_display_error): Added parameter check and
12845 extracted the core functionality into function
12846 scm_i_display_error.
12847
12848 * throw.c (handler_message): Call scm_i_display_error to display
12849 the error message.
12850
12851 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12852
12853 * eval.c (SCM_APPLY): Added # args check for application of
12854 procedures with arity 3. (Thanks to Anders Holst.)
12855
12856 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12857
12858 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12859
12860 (SCM_OPDIRP): Deprecated.
12861
12862 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12863 SCM_OPN.
12864
12865 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12866 Instead, give an explicit error message in case the directory is
12867 closed.
12868
12869 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12870 instead of SCM_OPENP and SCM_CLOSEDP.
12871
12872 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12873
12874 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12875
12876 * eval.c (inner_eval, scm_eval): Move all real functionality into
12877 inner_eval. Avoid to copy the expression twice by inlining some
12878 code from scm_i_eval.
12879
12880 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12881
12882 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12883 now has to be the last clause, as required by R5RS. Thanks to
12884 Martin Grabmueller for the patch.
12885
12886 2001-01-18 Gary Houston <ghouston@arglist.com>
12887
12888 * ioext.c: further simplify scm_read_string_x_partial by defining
12889 a macro SCM_EBLOCK.
12890
12891 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12892
12893 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12894
12895 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12896
12897 * __scm.h: Added comment about architecture and compiler
12898 properties that are required by guile.
12899
12900 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12901 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12902
12903 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12904
12905 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12906
12907 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12908 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12909
12910 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12911
12912 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12913 to the names in limits.h.
12914
12915 * numbers.c (abs_most_negative_fixnum): Added.
12916
12917 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12918 fixnum-min) special case.
12919
12920 (scm_big_and): Fix for negative first parameter.
12921
12922 (scm_bit_extract): Fix for fixnum paramters.
12923 Thanks to Rob Browning for the bug report.
12924
12925 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12926
12927 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12928
12929 * symbols.c (scm_symbol_bound_p): Fixed comment.
12930 Thanks to Chris Cramer.
12931
12932 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12933
12934 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12935 Thanks to Bill Schottstaedt.
12936
12937 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12938
12939 from Matthias Köppe:
12940
12941 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12942 casts its result, so doesn't yield an lvalue per ANSI C.
12943
12944 * goops.c (s_scm_sys_set_object_setter_x): use
12945 SCM_SET_ENTITY_SETTER.
12946 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12947
12948 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12949 its result, so doesn't yield an lvalue per ANSI C.
12950 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12951 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12952 SCM_GC_SET_CARD_FLAGS.
12953 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12954
12955 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12956
12957 2001-01-08 Gary Houston <ghouston@arglist.com>
12958
12959 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12960 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12961 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12962 changes.
12963 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12964 for fdes. if current input port is used, check that it's a file
12965 port.
12966
12967 2001-01-06 Gary Houston <ghouston@arglist.com>
12968
12969 * ioext.c (scm_read_string_x_partial): new procedure, implements
12970 read-string!/partial.
12971 * ports.c (scm_take_from_input_buffers): new procedure used by
12972 scm_read_string_x_partial.
12973 (scm_drain_input): use scm_take_from_input_buffers.
12974
12975 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12976
12977 * validate.h (SCM_VALIDATE_NUMBER): New.
12978
12979 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12980
12981 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12982 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12983 SET_DESTROYED): new defines/macros.
12984 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12985 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12986 (guardian_print): print more info.
12987 (guardian_apply): check if the guardian is destroyed, and throw an
12988 error if so. take one more optional argument `throw_p'.
12989 (scm_guard): depending on the value of `throw_p', return a boolean
12990 result.
12991 (scm_get_one_zombie): remove redundant property test.
12992 (guardian_t): represent the various (currently 3, I hope nothing
12993 more gets added) boolean fields as bit flags.
12994 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12995 (scm_destroy_guardian_x): new procedure.
12996
12997 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12998 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12999
13000 2001-01-01 Gary Houston <ghouston@arglist.com>
13001
13002 * fports.c (fport_write): bugfix: handle short writes for
13003 unbuffered ports too. optimize the buffered case by minimizing
13004 the number of write/flush calls.
13005 (write_all): new helper procedure.
13006
13007 The ChangeLog continues in the file: "ChangeLog-2000"