*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-12-06 Marius Vollmer <mvo@zagadka.de>
2
3 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
4 scm_enter_guile): Removed from public API. See comment at
5 scm_without_guile for the rationale.
6
7 * scmsigs.c (read_without_guile): New.
8 (signal_delivery_thread): Use it instead of
9 scm_leave_guile/read/scm_enter_guile.
10
11 2005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
12
13 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
14 This was typically hit when running `gc-live-object-stats' right
15 after starting Guile.
16
17 2005-11-30 Kevin Ryde <user42@zip.com.au>
18
19 * srfi-13.c (scm_string_append_shared): No copying if just one
20 non-empty string in args.
21
22 2005-11-26 Kevin Ryde <user42@zip.com.au>
23
24 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
25 by Ludovic Courtès.
26
27 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
28 "register".
29
30 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
31 scm_malloc returning NULL, it never does that.
32 * putenv.c (putenv): Likewise.
33
34 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
35 much too big to want to inline.
36
37 2005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
38
39 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
40 the value at its top. This fixes a reference leak.
41 (PUSH_REF): Perform `pstate->top++' after calling
42 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
43 effects.
44
45 2005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
46
47 * gc.c (scm_weak_vectors): Removed.
48
49 2005-11-12 Kevin Ryde <user42@zip.com.au>
50
51 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
52 by Ludovic Courtès.
53
54 2005-11-07 Marius Vollmer <mvo@zagadka.de>
55
56 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
57 SCM_CRITICAL_SECTION_START/END since the code inside the critical
58 section might exit non-locally.
59
60 2005-11-04 Neil Jerram <neil@ossau.uklinux.net>
61
62 * eval.c (sym_instead): New symbol.
63 (ENTER_APPLY): Remove optional use of a continuation when making
64 trap call.
65 (scm_debug_opts): Change doc for 'cheap option to make clear that
66 it is now obsolete.
67 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
68 making trap calls, and implement substitution of eval expressions
69 and return values using the values that the trap call handlers
70 return.
71
72 * debug.h (SCM_CHEAPTRAPS_P): Removed.
73
74 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
75
76 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
77 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
78 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
79 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
80 scm_c_make_socket_address): New functions.
81 * socket.h: Add prototypes.
82
83 2005-10-24 Kevin Ryde <user42@zip.com.au>
84
85 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
86 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
87 POSIX spec examples, the latter are not available on for instance
88 NetBSD.
89
90 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
91 posix.texi.
92
93 * stime.c (scm_strftime): Update docstring from posix.texi.
94
95 2005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
96
97 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
98
99 * null-threads.h, pthread-threads.h
100 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
101 (scm_i_pthread_mutexattr_recursive): New.
102
103 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
104 (scm_i_critical_section_mutex): Do not initialize statically.
105 (scm_threads_prehistory): Initialize
106 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
107 here.
108
109 * eval.c (source_mutex): Do not initialiaze statically.
110 (scm_init_eval): Do it here, using
111 scm_i_pthread_mutexattr_recursive.
112
113 2005-09-05 Marius Vollmer <mvo@zagadka.de>
114
115 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
116 New.
117 (sym_reader): New.
118 (scm_print_opts): Added "quote-keywordish-symbols" option.
119 (quote_keywordish_symbol): New, for evaluating the option.
120 (scm_print_symbol_name): Use it.
121 (scm_init_print): Initialize new option to sym_reader.
122
123 2005-08-15 Neil Jerram <neil@ossau.uklinux.net>
124
125 * eval.c (eval_letrec_inits): New.
126 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
127
128 2005-08-12 Marius Vollmer <mvo@zagadka.de>
129
130 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
131 Peter Gavin!
132
133 2005-08-12 Kevin Ryde <user42@zip.com.au>
134
135 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
136
137 2005-08-06 Kevin Ryde <user42@zip.com.au>
138
139 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
140 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
141 scm_string_index, scm_string_index_right, scm_string_skip,
142 scm_string_skip_right, scm_string_count, scm_string_map,
143 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
144 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
145 procedures called in loops.
146
147 2005-08-02 Kevin Ryde <user42@zip.com.au>
148
149 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
150 avoid lots of copying where previoulsy growing by only 80 bytes at a
151 time.
152
153 2005-08-01 Marius Vollmer <mvo@zagadka.de>
154
155 * modules.h, modules.c (scm_eval_closure_module): Removed, we
156 already have scm_lookup_closure_module, which does the same thing.
157
158 2005-08-01 Marius Vollmer <mvo@zagadka.de>
159
160 New marking algorithm for weak hashtables that fixes the problem
161 that references from the non-weak value to the associated weak
162 key (for example) would prevent the entry from ever being dropped.
163
164 Guardians have been changed back to their original semantics and
165 are no longer greedy and no longer drop cycles.
166
167 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
168 hashtable and guardian machinery but call the relevant functions
169 directly.
170
171 * guardians.h, guardians.c, deprecated.h,
172 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
173 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
174 Deprecated and moved into deprecated.[ch].
175
176 * guardians.h, guardians.c: Mostly rewritten.
177 (scm_i_init_guardians_for_gc,
178 scm_i_identify_inaccessible_guardeds,
179 scm_i_mark_inaccessible_guardeds): New.
180 (scm_make_guardian): Removed greedy_p argument.
181
182 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
183 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
184 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
185 (scm_weaks_prehistory): Removed.
186 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
187 scm_i_mark_weak_vectors_non_weaks,
188 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
189 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
190 scm_scan_weak_vectors): Removed.
191
192 * hashtab.h (scm_i_scan_weak_hashtables): New.
193 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
194 SCM_WVECTF_NOSCAN.
195 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
196 t->n_items.
197 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
198 to latter. Do not scan the alists themselves, this is done by the
199 weak vector code now. Just update the element count.
200
201 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
202 to latter. The type is now only part of the cell word.
203 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
204
205 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
206
207 2005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
208
209 Some changes towards making it possible to run Guile on the EM64T
210 platform.
211
212 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
213 mallocating for (unsigned long *bounds).
214
215 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
216 scm_t_bits before storing them in the type word.
217
218 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
219 scm_t_bits to int.
220
221 2005-07-12 Kevin Ryde <user42@zip.com.au>
222
223 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
224 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
225 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
226 than scm_makfrom0str.
227 Reported by Ken Raeburn.
228
229 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
230 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
231 returning SCM_GC_CARD_BVEC.
232
233 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
234 rather than latin-1 acute accent, the latter may not print on all
235 terminals.
236
237 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
238 trailing deletions, so as to return a substring if those are the only
239 changes.
240
241 2005-07-10 Kevin Ryde <user42@zip.com.au>
242
243 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
244 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
245 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
246 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
247
248 2005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
249
250 * gc-card.c (scm_i_card_statistics): init tag.
251
252 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
253
254 2005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
255
256 * fports.c (s_scm_open_file): add the b flag for binary to the doc
257 string.
258
259 2005-06-25 Kevin Ryde <user42@zip.com.au>
260
261 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
262 last change, use plain copy-on-write substrings, the individual
263 descriptions in the srfi don't mention shared storage (only the
264 introduction does).
265
266 * strings.c (scm_take_locale_stringn): Use realloc to make room for
267 null-terminator, rather than mallocing a whole new block.
268 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
269
270 2005-06-12 Marius Vollmer <mvo@zagadka.de>
271
272 * ramap.c (scm_array_index_map_x): First test for real arrays,
273 then check for generalized vectors. This ensures that the
274 generalized vector case need only work with zero-origin ranges.
275 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
276 to access the target array, making these functions work with all
277 kinds of arrays, not just bit arrays.
278
279 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
280 gh_list.c, gh_predicates.c: Deprecated everything.
281
282 * environments.c (environment_default_folder,
283 environment_default_observer): Do not use gh_call3, gh_call1.
284
285 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
286
287 * modules.c (s_scm_eval_closure_module): new function. Return the
288 module inside an eval-closure.
289
290 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
291 table. This means that procedure properties are GC'd if the
292 procedure dies.
293
294 2005-06-11 Kevin Ryde <user42@zip.com.au>
295
296 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
297 charset cases, count chars kept and build a string in a second pass,
298 rather than using a cons cell for every char kept. Use a shared
299 substring when nothing removed (such sharing is allowed by the srfi).
300
301 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
302
303 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
304 string, so live object stats can be sorted with string<?.
305
306 2005-06-06 Marius Vollmer <mvo@zagadka.de>
307
308 * print.c (iprin1): When writing a string, collect all characters
309 that can be printed directly into one call to scm_lfwrite.
310 Previously, every character was output with its own call to
311 write(2) on unbuffered ports.
312
313 * eval.c (scm_eval_options_interface): Use
314 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
315 and SCM_CRITICAL_SECTION_END.
316
317 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
318 check for generalized vectors. This ensures that the generalized
319 vector case need only work with zero-origin ranges.
320
321 2005-06-06 Kevin Ryde <user42@zip.com.au>
322
323 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
324 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
325 matched.
326
327 2005-06-05 Marius Vollmer <mvo@zagadka.de>
328
329 * eval.c: Added comment on how to make case 1.1 of
330 r5rs_pitfall.test succeed.
331
332 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
333
334 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
335
336 * socket.c: Remove obsolete comment about socklen_t.
337 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
338
339 * numbers.h (isnan)[__MINGW32__]: Remove.
340
341 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
342 DEFAULT_INCLUDES when cross compiling.
343
344 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
345
346 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
347 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
348 from Jan's patch.)
349
350 2005-05-22 Marius Vollmer <mvo@zagadka.de>
351
352 * unif.c (scm_make_shared_array): Add old base to new base since
353 scm_array_handle_pos does not include the base.
354 (scm_aind): Likewise.
355
356 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
357 output port.
358
359 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
360
361 Mac OS X compile warning fixes, reported by Richard Todd.
362
363 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
364 that it is signed.
365
366 * strports.c (st_resize_port): Add unsigned char cast.
367 (scm_mkstrport): Make read/write_buf cast unsigned.
368
369 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
370
371 * rdelim.c (scm_read_line): Initialize slen.
372
373 * load.c (scm_search_path): Remove weird >=1, and add
374 parentheses to clarify conditions.
375
376 * hash.c (scm_hasher): Add const unsigned char cast.
377
378 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
379
380 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
381
382 Fix C99isms reported by Ludovic Courtès:
383
384 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
385 code.
386
387 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
388 of code.
389
390 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
391 of code.
392 (scm_i_card_statistics): Add block for declarations of tag_as_scm
393 and current.
394
395 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
396
397 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
398 compile warning reported by Werner Scheinast.
399
400 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
401
402 * list.h: remove scm_list()
403
404 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
405 SCM_DEBUG_CELL_ACCESSES
406 (FLUID_NEXT_LOC): idem.
407
408 2005-04-30 Kevin Ryde <user42@zip.com.au>
409
410 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
411 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
412 zero when re==0 and im<0. Reported by Jean Crepeau.
413
414 2005-04-25 Kevin Ryde <user42@zip.com.au>
415
416 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
417 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
418 few sensible uses (like filling with a random number generator say),
419 but has been allowed in the past and so should be kept.
420
421 2005-04-23 Kevin Ryde <user42@zip.com.au>
422
423 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
424 scm_hash_fn_remove_x.
425
426 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
427 the caller when cons* is reached through apply.
428
429 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
430 list is called using apply, under the debugging evaluator.
431 (scm_list): Remove.
432
433 * list.c, list.h (scm_make_list): New code, moving make-list from
434 boot-9.scm.
435
436 2005-04-14 Kevin Ryde <user42@zip.com.au>
437
438 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
439 converted from scheme code in boot-9.scm.
440
441 2005-04-11 Kevin Ryde <user42@zip.com.au>
442
443 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
444 Validate list argument, scm_string_append and scm_string_append_shared
445 don't do that to their rest argument (in a normal build).
446
447 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
448
449 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
450 closure can not be stored since it is no longer valid at GC time.
451 (make_hash_table): Initialize 'hash_fn' field.
452 (scm_i_rehash): Only store hash_fn in hash table when closre is
453 NULL.
454 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
455 non-NULL. Always use a NULL closure.
456 (scm_hash_fn_create_handle_x): Also rehash when table contains too
457 few entries.
458
459 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
460
461 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
462 argument; always use scm_delq_x. The delete_fn function works on
463 the handle, not the key, and it therefore makes no sense to make
464 it configurable. Changed all callers.
465 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
466 (scm_hash_clear): Accept plain vectors as hashtables.
467 (scm_delx_x): Removed.
468
469 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
470
471 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
472 compatibility with gcc -std=c99.
473
474 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
475
476 * async.h (scm_mask_ints): Removed left over reference to
477 scm_root.
478
479 * threads.c: Removed fprintf debug statements.
480
481 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
482
483 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
484
485 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
486
487 * debug.c (scm_make_memoized): Remove unnecessary critical
488 section, and simplify by using SCM_RETURN_NEWSMOB.
489
490 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
491
492 * strings.h (SCM_STRING_UCHARS): Added missing argument.
493
494 2005-03-18 Kevin Ryde <user42@zip.com.au>
495
496 * arbiters.c (FETCH_STORE) [generic C]: Should be
497 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
498
499 2005-03-13 Kevin Ryde <user42@zip.com.au>
500
501 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
502 srfi-60.
503
504 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
505 because OR-ing bits into a negative can reduce the value to an inum.
506
507 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
508 casting inum to double since that can lose precision.
509
510 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
511
512 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
513 (guilify_self_1): Initialize it.
514
515 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
516 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
517 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
518 field.
519 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
520 recursively.
521 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
522 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
523 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
524 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
525 scm_after_gc_c_hook here.
526 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
527 scm_after_gc_c_hook when a full GC has in fact been performed.
528 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
529
530 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
531 scm_gc_heap_lock.
532
533 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
534 scm_gc_running_p while the scm_i_sweep_mutex is locked.
535
536 * inline.h (scm_cell, scm_double_cell): Do not check
537 scm_gc_running_p, allocation during sweeping is OK.
538
539 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
540 not set scm_block_gc.
541
542 * init.c (scm_i_init_guile): Do not set scm_block_gc.
543
544 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
545 instead of scm_malloc. The latter can not be used during GC.
546
547 2005-03-09 Marius Vollmer <mvo@zagadka.de>
548
549 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
550 years.
551
552 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
553
554 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
555 scm_gc_running_p. Sweeping can happen in parallel with
556 allocation.
557
558 * inline.h: Updated comments for current threading implementation.
559
560 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
561 (scm_i_thread): Removed unused signal_asyncs field.
562 (threads_mark): Do not mark it.
563 (guilify_self_1): Do not initialize it. Do initialize
564 continuation_root field.
565 (do_thread_exit): Do not remove thread from all_threads list.
566 (on_thread_exit): Do it here, after leaving guile mode.
567 (sleep_level): Removed.
568 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
569 returning. Do not support recursive sleeps.
570 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
571 entry. Do not support recursive sleeps.
572
573 * fluids.c (ensure_state_size, ensure_all_state_sizes,
574 resize_all_states): Collapsed ensure_state_size and
575 ensure_all_state_sizes into one function named resize_all_states.
576 Allocate new vectors outside of single threaded region. Do only
577 simple things inside that region.
578 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
579 while adding to the global lists.
580
581
582 2005-03-08 Marius Vollmer <mvo@zagadka.de>
583
584 libltdl is no longer distributed. We expect it to be installed
585 already.
586
587 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
588 (libguile_la_LIBADD): Removed @LIBLTDL@.
589
590 2005-03-07 Marius Vollmer <mvo@zagadka.de>
591
592 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
593 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
594 they also block/unblock execution of asyncs and call
595 scm_async_click which is declared in async.h but threads.h can not
596 include async.h since async.h already includes threads.h.
597 (scm_i_critical_section_level): New, for checking mistakes in the
598 use of the SCM_CRITICAL_SECTION_* macros.
599 (scm_i_critical_section_mutex): Make it a recursive mutex so that
600 critical sections can be nested.
601
602 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
603 not zero.
604
605 * threads.h, threads.c (scm_frame_lock_mutex): New.
606 (scm_frame_critical_section): Take mutex as argument.
607 (framed_critical_section_mutex): New, used as default for above.
608 (scm_init_threads): Initialize it.
609 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
610 scm_i_critical_section_mutex; both are initialized statically.
611
612 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
613 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
614 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
615 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
616
617 * debug.c (scm_debug_options): Replace
618 SCM_CRITICAL_SECTION_START/END with a frame and
619 scm_frame_critical_section.
620
621 * continuations.c (scm_make_continuation): No longer a critical
622 section.
623 (scm_dynthrow): Abort when scm_i_critical_section_level is
624 not zero.
625
626 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
627
628 * threads.c (scm_try_mutex): Renamed argument for consistency.
629
630 * root.c (scm_call_with_dynamic_root): New docstring.
631
632 * eval.c: Define _GNU_SOURCE.
633
634 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
635
636 Big merge from the mvo-thread-cleanup branch. The main changes
637 are:
638
639 - The dynamic roots functionality has been split into dynamic
640 states and continuations barriers. Fluids have been
641 reimplemented and can now be garbage collected.
642
643 - Initialization of Guile now works in a multi-thread friendly
644 manner. Threads can freely enter and leave guile mode.
645
646 - Blocking on mutexes or condition variables or while selecting
647 can now be reliably interrupted via system asyncs.
648
649 - The low-level threading interface has been removed.
650
651 - Signals are delivered via a pipe to a dedicated 'signal delivery
652 thread'.
653
654 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
655
656 * throw.c (scm_handle_by_message): Exit only the current thread,
657 not the whole process.
658 (scm_handle_by_message_noexit): Exit when catching 'quit.
659
660 * scmsigs.c (take_signal, signal_delivery_thread,
661 start_signal_delivery_thread, ensure_signal_delivery_thread,
662 install_handler): Reimplemented signal delivery as explained in
663 the comments.
664
665 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
666 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
667 scm_i_sched_yield, scm_i_pthread_sigmask,
668 SCM_I_PTHREAD_MUTEX_INITIALIZER,
669 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
670 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
671 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
672 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
673 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
674 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
675 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
676 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
677 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
678 scm_i_pthread_key_create, scm_i_pthread_setspecific,
679 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
680 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
681 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
682 when using pthreads.
683 * null-threads.c, null-threads.h: Provide dummy definitions for
684 the above symbols when not using pthreads.
685
686 * modules.h, modules.c (scm_frame_current_module): New.
687
688 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
689 instead of scm_internal_dynamic_wind.
690
691 * init.h, init.c (restart_stack, start_stack): Removed.
692 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
693 (scm_boot_guile_1): Removed.
694 (scm_i_init_mutex): New.
695 (really_cleanup_for_exit, cleanup_for_exit): New.
696 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
697 Moved around some init funcs. Call
698 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
699 with atexit.
700
701 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
702 Use "!scm_is_eq" instead of "!=".
703
704 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
705 SCM_USE_COOP_THREADS): Removed.
706
707 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
708 maintained. Unlock scm_i_sweep_mutex before running
709 scm_after_gc_c_hook.
710 (scm_permanent_object): Allocate outside of critical section.
711 (cleanup): Removed.
712
713 * fluids.h, fluids.c: Reimplemented completely.
714 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
715 SCM_FAST_FLUID_SET): Reimplemented as functions.
716 (scm_is_fluid): New.
717 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
718 (scm_make_dynamic_state, scm_dynamic_state_p,
719 scm_is_dynamic_state, scm_current_dynamic_state,
720 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
721 scm_c_with_dynamic_state, scm_with_dynamic_state,
722 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
723
724 * feature.c (progargs_fluid): New.
725 (scm_program_arguments, scm_set_program_arguments): Use it instead
726 of scm_progargs.
727 (scm_init_feature): Allocate it. Also, only add "threads" feature
728 when SCM_USE_PTHREAD_THREADS is true.
729
730 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
731 scm_make_rec_mutex, with all the consequences.
732 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
733 scm_internal_dynamic_wind. Handle dynamic states as second
734 argument.
735
736 * threads.h, threads.c (scm_internal_select): Renamed to
737 scm_std_select and discouraged old name.
738 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
739 and scm_std_usleep.
740 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
741 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
742 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
743 SCM_THREAD_DATA): Removed.
744 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
745 (scm_i_thread): New.
746 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
747 Use scm_assert_smob_type.
748 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
749 scm_thread_self, scm_thread_yield, scm_mutex_init,
750 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
751 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
752 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
753 scm_cond_init, scm_cond_destroy, scm_cond_wait,
754 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
755 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
756 scm_thread_select): Removed. Replaced with scm_i_pthread
757 functions as appropriate.
758 (scm_in_guile, scm_outside_guile): Removed.
759 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
760 take a ticket.
761 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
762 New.
763 (scm_i_frame_single_threaded): New.
764 (scm_init_threads_default_dynamic_state): New.
765 (scm_i_create_thread): Removed.
766 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
767 (scm_make_recursive_mutex): New.
768 (scm_frame_critical_section): New.
769 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
770 latter, changed all uses.
771 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
772 scm_i_set_last_debug_frame): New, use them instead of scm_root
773 stuff.
774 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
775 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
776 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
777 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
778 (remqueue): Allow the removal of already removed cells. Indicate
779 whether a real removal has happened.
780 (scm_thread): Removed, replaced with scm_i_thread.
781 (make_thread, init_thread_creatant): Removed.
782 (cur_thread): Removed.
783 (block_self, unblock_from_queue): New.
784 (block, timed_block, unblock): Removed.
785 (guilify_self_1, guilify_self_2, do_thread_exit,
786 init_thread_key_once, init_thread_key,
787 scm_i_init_thread_for_guile, get_thread_stack_base,
788 scm_init_guile): New initialisation method.
789 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
790 thread creation.
791 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
792 "fair" to fat and implemented new semantics, including reliable
793 interruption.
794 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
795 (scm_threads_mark_stacks): Explicitly mark handle.
796 (scm_std_select): Allow interruption by also selecting on the
797 sleep_pipe.
798 (scm_i_thread_put_to_sleep): Handle recursive requests for
799 single-threadedness.
800 (scm_threads_prehistory, scm_init_threads): Put current thread
801 into guile mode via guileify_self_1 and guileify_self_2,
802 respectively.
803
804 * fluid.h (SCM_FLUIDP): Deprecated.
805
806 * coop-threads.c: Removed.
807
808 * continuations.h, continuations.c (scm_with_continuation_barrier,
809 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
810 New.
811
812 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
813 (async_mutex): New.
814 (scm_async_click): Protected with async_mutex. Do not deal with
815 signal_asyncs, which are gone. Set cdr of handled async cell to
816 #f.
817 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
818 current sleep.
819 (scm_system_async_mark_for_thread): Do not use scm_current_thread
820 since that might not work during early initialization.
821
822 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
823 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
824 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
825 and SCM_CRITICAL_SECTION_END.
826 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
827 SCM_CRITICAL_SECTION_START/END.
828
829 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
830 (libguile_la_SOURCES): Added null-threads.c
831 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
832 threads-plugin.c.
833 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
834
835 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
836 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
837 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
838 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
839 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
840 scm_make_root): Removed or deprecated. Replaced with references
841 to the current thread, dynamic state, continuation barrier, or
842 some fluid, as appropriate.
843 (root_mark, root_print): Removed.
844 (scm_internal_cwdr): Reimplemented guts with
845 scm_frame_current_dynamic_state and
846 scm_i_with_continuation_barrier.
847 (scm_dynamic_root): Return current continuation barrier.
848
849
850 2005-02-28 Marius Vollmer <mvo@zagadka.de>
851
852 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
853 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
854 cleanliness.
855 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
856 IP_DROP_MEMBERSHIP.
857 Thanks to Greg Troxel!
858
859 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
860
861 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
862 block.
863
864 2005-02-25 Marius Vollmer <mvo@zagadka.de>
865
866 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
867 so that no two weak alist vectors share a spine.
868 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
869 during GC before inserting the new alist cell.
870
871 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
872
873 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
874 the hashtable.
875 (scm_hash_fn_create_handle_x): Likewise.
876 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
877
878 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
879
880 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
881 the prototypical examples mentioned in the old reference manual.
882 Instead keep the old semantics of dispatching on type. (Yes, this
883 is extremely ugly, but the whole point of keeping the deprecated
884 interface is not to break old code.)
885
886 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
887
888 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
889 scm_i_array_dims.
890
891 2005-01-28 Kevin Ryde <user42@zip.com.au>
892
893 * numbers.c (scm_ash): Rewrite using shifts, much faster than
894 integer-expt and multiply/divide. Inexacts and fractions no longer
895 supported (they happened to work before for left shifts, but not
896 right). Don't really need inexacts and fractions, since ash is
897 documented as a "bitwise operation", and all the rest of those only
898 take exact integers.
899
900 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
901
902 * gc-card.c (scm_i_card_statistics): map structs, closures and
903 subrs to one tag.
904
905 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
906 (tag_table_to_type_alist): ignore unknown types.
907
908 * gc-segment.c (scm_i_all_segments_statistics): new function.
909 (scm_i_heap_segment_statistics): new function
910
911 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
912 statistics on the number of live objects of each type.
913
914 * gc-card.c (scm_i_tag_name): new function.
915 (scm_i_card_statistics): new function.
916
917 2005-01-24 Kevin Ryde <user42@zip.com.au>
918
919 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
920 POSIX and C99 don't document errno being set. Reported by Bruno
921 Haible.
922 (scm_flock): Update docstring from manual.
923
924 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
925 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
926 a 64-bit system.
927
928 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
929 sa_handler, needs to be a long on 64-bit systems where int is only 32
930 bits.
931
932 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
933
934 * environments.c (obarray_enter, obarray_replace): Call
935 SCM_HASHTABLE_INCREMENT when adding a new entry.
936
937 * objects.c: Include goops.h for the scm_class_of prototype.
938
939 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
940 sizes to be smaller than the maximum lengths of vectors.
941
942 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
943
944 * ports.c, smob.c: Include "libguile/goops.h".
945
946 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
947 scm_class_char, scm_class_pair, scm_class_procedure,
948 scm_class_string, scm_class_symbol,
949 scm_class_procedure_with_setter, scm_class_primitive_generic,
950 scm_class_vector, scm_class_null, scm_class_real,
951 scm_class_complex, scm_class_integer, scm_class_fraction,
952 scm_class_unknown, scm_port_class, scm_smob_class,
953 scm_no_applicable_method, scm_class_of): Moved from objects to
954 goops since they are only useable once goops has been loaded.
955 (scm_classes_initialized): Removed.
956 (scm_class_of): Do not check it.
957 (create_standard_classes): Do not set it.
958
959 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
960
961 * objects.h, objects.c (scm_classes_initialized): New.
962 (scm_class_of): Signal error when scm_classes_initialized is zero.
963 * goops.c (create_standard_classes): Set scm_classes_initialized
964 to one.
965
966 * random.c (scm_random_solid_sphere_x): Use
967 scm_c_generalized_vector_length instead of
968 scm_uniform_vector_length.
969
970 2005-01-16 Marius Vollmer <mvo@zagadka.de>
971
972 * script.c (scm_compile_shell_switches): Removed debugging output.
973
974 2005-01-15 Kevin Ryde <user42@zip.com.au>
975
976 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
977 docstrings from manual.
978 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
979
980 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
981
982 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
983 its value.
984
985 Implement u64 and s64 uniform numeric vectors with bignums when
986 scm_t_uint64 and scm_t_int64 are not available.
987
988 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
989 scm_array_handle_u64_elements,
990 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
991 scm_u64vector_writable_elements): Do not define when scm_t_uint64
992 is not available.
993 (scm_take_s64vector, scm_array_handle_s64_elements,
994 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
995 scm_s64vector_writable_elements): Likewise for scm_t_int64.
996 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
997 scm_t_int64/scm_t_uint64 are not available.
998 (uvec_mark): New, to mark the bignums.
999 (alloc_uvec): Initialize bignums.
1000 (uvec_fast_ref): Return bignums directly.
1001 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
1002 assert_exact_integer): New.
1003 (uvec_fast_set): Use them to validate the bignums.
1004 (scm_init_srfi_4): Set mark function of smob when needed.
1005 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
1006 scm_int64_max.
1007
1008 Recognize 1.4 -e syntax.
1009
1010 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
1011 (scm_compile_shell_switches): Use them to recognize and convert
1012 1.4 "-e" syntax.
1013
1014 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1015
1016 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
1017 deprecated features that once were macros but are now functions
1018 back into macros.
1019
1020 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1021
1022 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
1023 * deprecation.c (scm_issue_deprecation_warning,
1024 scm_c_issue_deprecation_warning_fmt): Use it.
1025 (mode): Removed.
1026 (print_summary): New.
1027 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
1028 mode.
1029
1030 Deprecated SCM_ARRAY* macros.
1031
1032 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
1033 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
1034 version. Changed all uses.
1035 (scm_tc16_array, scm_i_tc16_array,
1036 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
1037 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
1038 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
1039 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
1040 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
1041 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
1042 SCM_ARRAY_V, SCM_I_ARRAY_V,
1043 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
1044 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
1045 scm_t_array, scm_i_t_array): Likewise.
1046 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
1047 Moved from unif.h to unif.c.
1048 (scm_c_array_rank): New.
1049 (scm_array_rank): Reimplement using it.
1050
1051 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
1052 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
1053 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
1054
1055 2005-01-11 Marius Vollmer <mvo@zagadka.de>
1056
1057 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
1058 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
1059 scm_c_generalized_vector_ref and scm_cvref, and
1060 scm_c_generalized_vector_set_x, respectively.
1061 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
1062 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
1063
1064 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
1065 former to latter and made public. Changed all uses.
1066 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
1067 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
1068 (scm_i_shap2ra): New internal version of scm_shap2ra.
1069 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
1070 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
1071 (scm_ra_set_contp): Deprecated, changed all uses to
1072 scm_i_ra_set_contp.
1073 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
1074
1075 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1076
1077 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
1078 Trotts!
1079
1080 * unif.c (scm_list_to_typed_array): Allow the specification of the
1081 upper bound as well. This is needed for empty arrays.
1082 (l2ra): Give needed number of elements in error message.
1083 (scm_i_print_array): Print length information for arrays that need
1084 it.
1085 (scm_i_read_array): Parse it.
1086
1087 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
1088 scm_i_object_chars, scm_i_object_length): Brought back from the
1089 dead.
1090
1091 2005-01-10 Marius Vollmer <mvo@zagadka.de>
1092
1093 * ramap.c: Replaced single-index uses of scm_array_set_x with
1094 scm_c_generalized_vector_set_x.
1095
1096 * unif.c (scm_array_rank, scm_array_dimensions,
1097 scm_shared_array_offset, scm_shared_array_increments,
1098 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
1099 to simplify code and make it more general.
1100 (scm_shared_array_root): Work with all kinds of arrays, including
1101 naked vectors.
1102 (indices_to_pos): New.
1103 (scm_make_shared_array): Use it instead of scm_aind; use handle
1104 for oldra.
1105
1106 2005-01-10 Kevin Ryde <user42@zip.com.au>
1107
1108 * posix.c (scm_mkstemp): Update docstring from manual.
1109
1110 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
1111
1112 2005-01-09 Marius Vollmer <mvo@zagadka.de>
1113
1114 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
1115 scm_i_uniform_vector_set_proc): New.
1116 (u8ref, u8set, s8ref, s8set, etc): New.
1117 (uvec_reffers, uvec_setters): New.
1118 (uvec_to_list): Use generic scm_array_handle_ref instead of
1119 uvec_fast_ref since scm_array_handle_ref should be faster now.
1120 (coerce_to_uvec, scm_c_uniform_vector_ref,
1121 scm_c_uniform_vector_set_x): Likewise.
1122
1123 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
1124 New.
1125 (scm_t_array_handle): Added ref, set, elements and
1126 writable_elements for fast inline operation of
1127 scm_array_handle_ref and scm_array_handle_set.
1128 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
1129 and replaced with inline code that simply calls the ref/set
1130 members of the handle.
1131 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
1132 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
1133 New.
1134 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
1135 and memoize_set.
1136 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
1137 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1138 scm_bit_invert_x): Correctly multiply index with increment in the
1139 general case.
1140
1141 * unif.c (scm_array_handle_set): Correctly execute only one
1142 alternative. D'Oh!
1143 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
1144 the array; this covers all cases with much simpler code.
1145
1146 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
1147 as well.
1148
1149 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1150
1151 * srfi-4.c (uvec_type): New.
1152 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
1153 scm_c_uniform_vector_x): Use it to get concrete type.
1154
1155 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
1156 fit the docs.
1157
1158 * unif.c (ra2l): Handle zero rank arrays.
1159 (scm_i_print_array): Print zero rank arrays specially.
1160 (tag_to_type): Return #t for an empty tag, not the empty symbol.
1161 (scm_i_read_array): Allow zero rank arrays.
1162
1163 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1164
1165 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
1166 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
1167 and SCM_SET_HASHTAB_BUCKET.
1168
1169 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
1170 Removed ref_stack field.
1171 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
1172 of a print state. Use them everywhere instead of ref_stack.
1173
1174 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
1175
1176 * srfi-4.c: Include deprecation.h.
1177
1178 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
1179 deprecated.c, eq.c
1180 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
1181 (scm_vector_elements, scm_vector_writable_elements,
1182 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
1183 unif.[hc].
1184 (SCM_SIMPLE_VECTOR_LOC): Removed.
1185 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
1186 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
1187 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
1188 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
1189 latter. Changed use in eq.c.
1190
1191 2005-01-07 Marius Vollmer <mvo@zagadka.de>
1192
1193 Make the uniform vector routines also deal with one dimensional
1194 arrays.
1195
1196 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
1197 SCM_SMOB_PREDICATE in this file.
1198 (is_uvec): Also recognize one-dimensional uniform numeric arrays
1199 of the right type.
1200 (scm_is_uniform_vector): Likewise.
1201 (uvec_fast_ref): Made BASE param const.
1202 (uvec_writable_elements, uvec_elements): New.
1203 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
1204 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
1205 scm_c_uniform_set_x): Use them to also deal with one-dimensional
1206 arrays.
1207 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
1208 argument convention.
1209 (scm_uniform_vector_to_list): Let uvec_to_list do all the
1210 checking.
1211 (scm_uniform_vector_length): Use uvec_length.
1212
1213 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1214
1215 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
1216 scm_c_uniform_vector_size): Removed.
1217 (scm_array_handle_uniform_element_size): New.
1218
1219
1220 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
1221 type of POS parameter to be signed, positions can be negative.
1222 (scm_array_handle_release): New, changed all uses of
1223 scm_t_array_handle to properly call it.
1224 (scm_vector_get_handle, scm_generalized_vector_get_handle):
1225 Renamed former to latter, changed all uses.
1226
1227 2005-01-05 Marius Vollmer <mvo@zagadka.de>
1228
1229 Updated bitvector routines to also use scm_t_array_handles.
1230
1231 * unif.h (scm_bitvector_elements,
1232 scm_bitvector_writable_elements): Use a scm_t_array_handle and
1233 deliver offset, length and increment to caller. Changed all uses.
1234 (scm_bitvector_release_elements,
1235 scm_frame_bitvector_release_elements,
1236 scm_bitvector_release_writable_elements,
1237 scm_frame_bitvector_release_writable_elements): Removed.
1238 (scm_array_handle_bit_elements,
1239 scm_array_handle_bit_writable_elements,
1240 scm_array_handle_bit_elements_offset): New.
1241 (scm_make_typed_array): The special value for non-initialized
1242 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
1243 was a valid value to fill bitvectors with, so it can't really be
1244 specialed out.
1245
1246 2005-01-04 Kevin Ryde <user42@zip.com.au>
1247
1248 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
1249 Reported by Bill Schottstaedt.
1250
1251 2005-01-02 Marius Vollmer <mvo@zagadka.de>
1252
1253 * sort.c (quicksort): Added INC parameter for non-contigous
1254 vectors.
1255 (quicksort1): New, for contigous vectors. Both functions are
1256 generated from the same code by including "quicksort.i.c".
1257 (scm_restricted_vector_sort_x): Call one of quicksort and
1258 quicksort1, depending on increment of vector.
1259 (scm_sort): Simply call scm_sort_x on a copy of the list or
1260 vector.
1261 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
1262 size_t, added inc parameter.
1263 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
1264 so that it doesn't leak.
1265 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
1266 list or vector.
1267
1268 * ramap.c (scm_array_map_x): Do not try to convert fill value
1269 before filling, any necessary conversion is done while storing.
1270
1271 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1272 doing it inline.
1273
1274 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1275 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1276 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1277
1278 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1279 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1280 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1281 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1282 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1283 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1284 vector elements API or simple vector API, as appropriate. Removed
1285 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1286 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1287
1288 * srfi-4.h, srfi-4.c,
1289 srfi-4.i.c (scm_array_handle_uniform_elements,
1290 scm_array_handle_uniform_writable_elements,
1291 scm_uniform_vector_elements,
1292 scm_uniform_vector_writable_elements):
1293 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1294 scm_t_array_handle, deliver length and increment.
1295 (scm_array_handle_<foo>_elements,
1296 scm_array_handle_<foo>_writable_elements): New.
1297
1298 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1299 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1300
1301 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1302 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1303 scm_array_handle_set, scm_array_handle_elements
1304 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1305 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1306 scm_dimensions_to_uniform_array): Deprecated for real.
1307 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1308 snarfing wont allow a mismatch between C and Scheme arglists.
1309 (scm_make_shared_array, scm_enclose_array): Correctly use
1310 scm_c_generalized_vector_length instead of
1311 scm_uniform_vector_length.
1312
1313 * validate.h (SCM_VALIDATE_VECTOR,
1314 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1315 of SCM_VECTORP.
1316
1317 * weaks.h, weaks.c: Use new internal weak vector API from
1318 vectors.h.
1319
1320 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1321 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1322 'extra' to being regular sources.
1323 (noinst_HEADERS): Added quicksort.i.c.
1324 * quicksort.i.c: New file.
1325
1326 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1327 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1328 and reimplemented. Replaced all uses with scm_vector_elements,
1329 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1330 appropriate.
1331 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1332 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1333 SCM_SIMPLE_VECTOR_LOC): New.
1334 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1335 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1336 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1337 Removed.
1338 (scm_vector_copy): New.
1339 (scm_vector_elements, scm_vector_writable_elements): Use
1340 scm_t_array_handle, deliver length and increment. Moved to
1341 unif.h. Changed all uses.
1342 (scm_vector_release_elements,
1343 scm_vector_release_writable_elements,
1344 (scm_frame_vector_release_elements,
1345 scm_frame_vector_release_writable_elements): Removed.
1346 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1347 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1348 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1349 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1350 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1351 weak vectors.
1352
1353 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1354
1355 No longer use creators to specify the type of an array. Creators
1356 expose the fact that arrays are wrapped around vectors, but that
1357 might change.
1358
1359 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1360 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1361 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1362 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1363 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1364 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1365 uvec_proc_vars): Removed.
1366 (scm_i_generalized_vector_creator): Removed.
1367 (scm_i_generalized_vector_type): New.
1368
1369 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1370 scm_make_typed_array, scm_array_type, scm_list_to_array,
1371 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1372 (scm_array_creator): Removed.
1373 (scm_array_p): Deprecated second PROT argument.
1374 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1375 Deprecated, reimplemented in terms of scm_make_typed_array and
1376 scm_list_to_typed_array.
1377 (scm_i_proc_make_vector, scm_i_proc_make_string,
1378 scm_i_proc_make_bitvector): Removed.
1379 (type_creator_table, init_type_creator_table, type_to_creator,
1380 make_typed_vector): New.
1381 (scm_i_convert_old_prototype): Removed.
1382 (prototype_to_type): New.
1383 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1384 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1385 minor added clarity.
1386 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1387 instead of scm_make_uve.
1388 (tag_creator_table, scm_i_tag_to_creator): Removed.
1389 (tag_to_type): New.
1390 (scm_i_read_array): Use scm_list_to_typed_array instead of
1391 scm_list_to_uniform_array.
1392
1393 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1394
1395 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1396 (scm_bitvector_writable_elements): New.
1397 (scm_bitvector_release, scm_bitvector_release_elements):
1398 Renamed former to latter. Added explicit call to
1399 scm_remember_upto_here_1.
1400 (scm_frame_bitvector_release,
1401 scm_frame_bitvector_release_elements): Renamed former to latter.
1402 (scm_bitvector_release_writable_elements,
1403 scm_bitvector_release_writable_elements): New.
1404 Changed all uses as required by the changes above.
1405
1406 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1407 scm_u8vector_elements, etc): Made return value "const".
1408 (scm_uniform_vector_writable_elements,
1409 scm_u8vector_writable_elements, etc): New.
1410 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1411 Renamed former to latter. Added explicit call to
1412 scm_remember_upto_here_1.
1413 (scm_frame_uniform_vector_release,
1414 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1415 (scm_uniform_vector_release_writable_elements,
1416 scm_frame_uniform_vector_release_writable_elements): New. Takes
1417 crown of longest identifier yet.
1418 Changed all uses as required by the changes above.
1419
1420 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1421 void.
1422 (scm_is_vector, scm_vector_p, scm_vector_length,
1423 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1424 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1425 scm_vector_move_left_x, scm_vector_move_right_x,
1426 scm_vector_fill_x): handle one-dimensional arrays.
1427 (scm_vector_elements, scm_vector_release_elements,
1428 scm_vector_frame_release_elements, scm_vector_writable_elements,
1429 scm_vector_release_writable_elements,
1430 scm_vector_frame_release_writable_elements): New.
1431 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1432 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1433
1434 * ramap.c (scm_ramapc, scm_raeql): Use
1435 scm_c_generalized_vector_length instead of
1436 scm_uniform_vector_length.
1437 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1438 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1439
1440 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1441
1442 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1443 member for relocating debug frames.
1444 (scm_make_continuation): Set it.
1445
1446 * stacks.c (read_frame, read_frames, scm_make_stack,
1447 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1448 of continuations instead of calculating the offset ourselves.
1449 Relocate 'vect' member of scm_t_debug_frame.
1450
1451 2004-12-16 Kevin Ryde <user42@zip.com.au>
1452
1453 * ramap.c (scm_array_map_x): Check for at least one source argument.
1454
1455 2004-12-14 Kevin Ryde <user42@zip.com.au>
1456
1457 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1458 the C code so for the final call to the predicate procedure is a tail
1459 call, per SRFI-13 spec.
1460
1461 2004-12-10 Kevin Ryde <user42@zip.com.au>
1462
1463 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1464 recent revision to the reference manual.
1465
1466 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1467 with "%", C99 says it's well-defined.
1468
1469 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1470 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1471 bother trying to fit scm_from_ulong, not really worth the trouble if
1472 addresses are more than 4 bytes usually.
1473
1474 2004-11-30 Kevin Ryde <user42@zip.com.au>
1475
1476 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1477 arm32. Reported by Greg Troxel.
1478
1479 2004-11-14 mvo <mvo@zagadka.de>
1480
1481 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1482
1483 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1484
1485 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1486
1487 Enclosed arrays are now their own smob. This has been done to
1488 make the code more explicit about them and to prepare for the time
1489 when generalized vectors include arbitrary one-dimensional
1490 arrays. (Uptonow, enclosed arrays have been recognized by their
1491 use of an array as their storage 'vector'. When all generalized
1492 vectors are allowed as storage, including one-dimensional arrays,
1493 this will no longer work.)
1494
1495 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1496 New.
1497 (exactly_one_third, singp): Removed.
1498 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1499 scm_shared_array_offset, scm_shared_array_increments): Handle
1500 enclosed arrays explicitely.
1501 (scm_array_rank): Likewise. Also, do not return zero for
1502 non-arrays, signal an error instead since arrays with rank zero do
1503 exist.
1504 (scm_i_make_ra): New, for specifying the tag of the new array.
1505 (scm_make_enclosed_array): Use it.
1506 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1507 (scm_make_shared_array): Use scm_c_generalized_vector_length
1508 instead of scm_uniform_vector_length.
1509 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1510 (scm_i_cvref): New, doing the job of scm_cvref.
1511 (scm_cvref): Use scm_i_cvref.
1512 (scm_array_ref): Do not accept non-arrays when no indices are
1513 given. Use scm_i_cvref to do the actual access.
1514 ("uniform-array-set1"): Do not register.
1515 (scm_array_set_x, scm_uniform_array_read_x,
1516 scm_uniform_array_write): Handle enclosed arrays explicitly.
1517 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1518 handle enclosed arrays.
1519 (scm_array_to_list): Handle enclosed arrays explicitly.
1520 (rapr1): Removed.
1521 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1522 enclosed arrays.
1523 (scm_i_print_enclosed_array): New.
1524 (tag_proto_table, tag_creator_table): Renamed former to latter.
1525 Added "a" and "b" for strings and bitvectors, resp.
1526 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1527 latter. Tag "a" is in the table now, no need to handle it as a
1528 legacy tag.
1529 (scm_raprin1): Just call scm_iprin1.
1530 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1531 explicitly.
1532 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1533 Use scm_i_print_array as printer for scm_tc16_array.
1534
1535 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1536
1537 * ramap.c (cind): Changed second arg to be pointer to long instead
1538 of uniform vector.
1539 (scm_ramapc): Allocate index vector with scm_malloc and not as
1540 uniform vector. Wrap it in a frame so that it gets properly freed.
1541 (scm_array_index_map_x): Likewise.
1542
1543 * unif.c: Changed all uses of scm_array_prototype to
1544 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1545 prototype is known.
1546 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1547 in terms of scm_uniform_vector_read_x and
1548 scm_uniform_vector_write, respectively. Strings and
1549 bitvector support has been dropped.
1550
1551 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1552 needed files directly. Include config.h, <unistd.h> and <io.h>
1553 when available.
1554 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1555
1556 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1557
1558 * gh_data.c (gh_uniform_vector_length): Properly use
1559 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1560
1561 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1562
1563 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1564 New.
1565 (scm_i_uniform_vector_creator): Removed.
1566 (scm_i_generalized_vector_creator): New.
1567 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1568 handle generalized vectors, only uniform numeric vectors.
1569 (alloc_uvec): Do length check here...
1570 (make_uvec): ...but not here.
1571 (coerce_to_uvec): Use new generalized vector functions to handle
1572 all kinds of vectors in one go.
1573
1574 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1575 remaining scm_tc7_unused tags to get a neatly ordered list.
1576
1577 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1578 longer handle scm_tc7_bvect bitvectors.
1579
1580 * ramap.c: Use the new generalized vector functions to handle all
1581 vector like things.
1582
1583 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1584 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1585 scm_generalized_vector_length, scm_generalized_vector_ref,
1586 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1587 scm_is_generalized_vector, scm_c_generalized_vector_length,
1588 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1589 New.
1590
1591 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1592 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1593 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1594 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1595 scm_c_bitvector_length, scm_c_bitvector_ref,
1596 scm_c_bitvector_set_x, scm_bitvector_elements,
1597 scm_bitvector_release, scm_frame_bitvector_release,
1598 scm_tc16_bitvector, bitvector_free, bitvector_print,
1599 bitvector_equalp, count_ones, find_first_one): New.
1600 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1601 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1602 using the new C API for bitvectors and maybe count_ones or
1603 find_first_one, as appropriate.
1604 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1605 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1606 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1607 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1608 new functions from above.
1609 (scm_i_proc_make_vector, scm_i_proc_make_string,
1610 scm_i_proc_make_bitvector): Made non-static for use in
1611 scm_i_generalized_vector_creator.
1612 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1613 (scm_make_uve): Validate that the created object is a generalized
1614 vector.
1615 (scm_i_legacy_tag): Removed.
1616 (scm_i_print_array): Do it here.
1617 (scm_raprin1): Only print enclosed arrays.
1618
1619 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1620
1621 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1622
1623 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1624 added portability.
1625
1626 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1627 for "space". Thanks to Bruce Korb!
1628
1629 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1630 only after dest has been set. Thanks to Hyper Division!
1631
1632 * gh_data.c (gh_uniform_vector_length): Use
1633 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1634
1635 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1636
1637 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1638 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1639 SCM_SET_UVECTOR_LENGTH): Removed.
1640
1641 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1642
1643 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1644 Thanks!
1645
1646 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1647 first and the second line of the SCM_DEFINE macro call, since old
1648 preprocessors cannot handle definitions that are split into two
1649 lines.
1650
1651 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1652 declarations.
1653
1654 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1655 scm_t_uint32 to fix the mismatch between the function declaration
1656 and definition.
1657
1658 * sort.c (quicksort): Don't use C99 variable declarations.
1659
1660 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1661 SCM_BOOL_F if no type matches.
1662
1663 * threads.c (thread_print): Cast a pointer to size_t when printing
1664 with scm_uintprint.
1665
1666 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1667 defined.
1668 (scm_array_prototype): Deprecated.
1669
1670 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1671
1672 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1673 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1674 more efficient access to the u32vector.
1675
1676 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1677 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1678 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1679
1680 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1681 instead of the old-style dvectors.
1682
1683 * gh_data.c: Use new-style uniform arrays in place of old-style
1684 ones.
1685
1686 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1687 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1688
1689 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1690 instead of old-sytle uvectors.
1691
1692 * convert.c, convert.i.c: Rewritten completely, using
1693 scm_any_to_u8vector, etc and other new-style uniform vector
1694 functions.
1695
1696 * random.c (scm_random_solid_sphere_x,
1697 scm_random_hollow_sphere_x): Do not validate vector argument, this
1698 is already done elsewhere.
1699
1700 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1701 scm_any_to_u8vector, etc): New.
1702 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1703 longer handle old-style uniform vectors.
1704
1705 * read.c (scm_lreadr): Bugfix: include the last bit in the
1706 bit vector.
1707
1708 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1709
1710 * unif.h, unif.c (scm_array_creator): New.
1711 (scm_i_get_old_prototype): New.
1712 (scm_array_prototype): use it to return old-style prototype, never
1713 return creators.
1714 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1715 arg of SCM_UNDEFINED. The latter is wrong.
1716
1717 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1718 (make_uve): Removed.
1719 (scm_i_proc_make_vector, scm_i_proc_make_string,
1720 scm_i_proc_make_u1vector): New.
1721 (scm_init_unif): Initialize them.
1722 (scm_i_convert_old_prototype): New.
1723 (scm_make_uve): Use it to get the creator procedure. Removed all
1724 old code that created old-style uniform vectors.
1725 (scm_array_p): Handle generic vectors.
1726 (scm_dimensions_to_uniform_array): Do not fill new array with
1727 prototype when that is a procedure.
1728 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1729 the NDIM argument.
1730 (scm_i_print_array): Print rank for shared or non-zero-origin
1731 vectors.
1732 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1733 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1734 which I do not understand yet.
1735 (scm_array_prototype): Explicitely handle generic vectors.
1736
1737 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1738 (iflo2str): Use icmplx2str for complex numbers.
1739
1740 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1741 scm_i_uniform_vector_prototype): Removed.
1742 (scm_i_uniform_vector_creator): New.
1743 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1744 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1745 Updated all tables and generic functions to support them.
1746 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1747 (scm_init_srfi_4): Initialize them.
1748
1749 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1750 sizeof(CTYPE) as explained in the comment.
1751
1752 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1753 following '#' that can start an array. Explicitely disambiguate
1754 'i' and 'e' between introducing numbers and uniform vectors. Do
1755 not call scm_i_read_homogenous_vector, since that is also handled
1756 by scm_i_read_array now.
1757
1758 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1759
1760 First cut at integrating uniform vectors from srfi-4 with the rest
1761 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1762 vector. The plan is to gradually replace one type after the other
1763 until none is left and then to consider general cleanups and
1764 optimizations.
1765
1766 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1767
1768 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1769 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1770 scm_uniform_vector_to_list, scm_is_uniform_vector,
1771 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1772 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1773 scm_uniform_vector_release): New.
1774 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1775 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1776 from unif.h, unif.c and extended to handle both the old and new
1777 uniform vectors.
1778
1779 * tags.h (scm_tc7_byvect): Commented out.
1780
1781 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1782 the former to the latter.
1783 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1784 srfi-4.h, srfi-4.c.
1785 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1786 (scm_array_p, scm_array_rank, scm_array_dimensions,
1787 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1788 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1789 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1790 vectors. Removed code for scm_tc7_byvect.
1791 (scm_dimensions_to_uniform_array): Fill array with 0 when
1792 prototype is #\nul.
1793 (scm_i_print_array_dimension, scm_i_legacy_tag,
1794 scm_i_print_array): New.
1795 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1796 for scm_tc7_byvect.
1797
1798 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1799 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1800 uniform vectors. Removed code for scm_tc7_byvect
1801
1802 * print.c (iprin1): Removed code for scm_tc7_byvect.
1803 * objects.c (scm_class_of): Likewise.
1804 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1805 * gc-card.c (scm_i_sweep_card): Likewise.
1806 * evalext.c (scm_self_evaluating_p): Likewise.
1807 * eq.c (scm_equal_p): Likewise.
1808
1809 * gh_data.c (gh_chars2byvect): Reimplemented with
1810 scm_make_s8vector.
1811 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1812
1813 * srfi-4.c (take_uvec): New.
1814 (alloc_uvec): Use it.
1815 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1816
1817 * random.c (vector_scale, vector_scale_x): Renamed former to the
1818 latter, since it modifies its argument.
1819 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1820 Do not use scm_universal_vector_length for non-uniform vectors.
1821 Use scm_f64vector_elements to access innards of uniform vectors.
1822
1823 * convert.i.c: Convert srfi-4 style uniform vectors when
1824 requested.
1825 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1826 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1827
1828 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1829
1830 * numbers.h, numbers.c (scm_i_print_double): New.
1831
1832 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1833 ../srfi/ but heavily modified.
1834 * Makefile.am: Add them in all the right places.
1835 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1836 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1837 '#u', and '#s'.
1838
1839 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1840 and made non-static. Changed all uses.
1841
1842 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1843
1844 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1845 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1846 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1847 scm_uintprint to print unsigned integers, raw heap words, and
1848 adresses, using a cast to scm_t_bits to turn pointers into
1849 integers.
1850
1851 * unif.c: Include "libguile/print.h".
1852
1853 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1854 scm_t_intmax values.
1855 (scm_uint2str): New, for scm_t_uintmax.
1856 (scm_iint2str): Argument type changed to scm_t_intmax,
1857 reimplemented in terms of scm_uint2str.
1858
1859 * print.c, print.h (scm_uintprint): New, for printing
1860 scm_t_uintmax values.
1861 (scm_intprint): Argument type changed to scm_t_intmax.
1862
1863 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1864 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1865 strategic places so that the loops can be interrupted.
1866
1867 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1868 "-I$(top_srcdir)/libguile-ltdl".
1869 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1870 "../libguile-ltdl/libguile-ltdl.a".
1871
1872 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1873 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1874 instead of <libguile-ltdl.h>.
1875
1876 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1877
1878 * sort.c (quicksort): Copy pivot out of the array while
1879 constructing the partitions; it could get overwritten otherwise.
1880 Because of the ultimate insertion sort, this bug did not cause
1881 quicksort to fail, it just put all the burdon on the insertion
1882 sort and was thus very slow. Thanks to Rolan Orre for reporting
1883 the slowness!
1884
1885 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1886
1887 * numbers.c (scm_i_range_error): New.
1888 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1889 scm_out_of_range.
1890
1891 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1892 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1893
1894 * unif.c (scm_array_p): When no prototype is given, explicitely
1895 test for allowable types, do not simply return true. Thanks to
1896 Roland Orre for reporting this!
1897
1898 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1899
1900 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1901 segment to scm_max_segment_size.
1902
1903 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1904
1905 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1906
1907 * inline.h (scm_double_cell): abort if GC running.
1908 (scm_cell): idem.
1909
1910 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1911
1912 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1913 pos == 0.
1914
1915 Keywords no longer store a 'dash symbol'. Instead, they store a
1916 symbol with their real name.
1917
1918 * keywords.h, keywords.c, deprecated.h, deprecated.c
1919 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1920 terms of scm_is_keyword and scm_keyword_dash_symbol.
1921
1922 * keywords.h, keywords.c, discouraged.h, discouraged.c
1923 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1924 scm_c_make_keyword): Discouraged.
1925
1926 * keywords.h, keywords.c (scm_symbol_to_keyword,
1927 scm_keyword_to_symbol): Implemented in C.
1928 (scm_is_keyword, scm_from_locale_keyword,
1929 scm_from_locale_keywordn): New.
1930
1931 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1932
1933 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1934 scm_from_locale_keyword instead of scm_c_make_keyword.
1935
1936 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1937 better error message.
1938
1939 * deprecated.c: Include discouraged.h and keywords.h.
1940
1941 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1942 reading '#:' or ':'. See NEWS for consequences.
1943
1944 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1945
1946 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1947 literals are now read-write again (until SCM_STRING_CHARS is
1948 removed).
1949
1950 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1951 strings with an error message that blames SCM_STRING_CHARS.
1952
1953 * options.c (change_option_setting): Use scm_car instead of
1954 explicit type check plus SCM_CAR.
1955
1956 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1957 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1958 (scm_iprin1): Use them instead of the previoulsy hardcoded
1959 strings.
1960 (scm_init_print): Initialize them.
1961
1962 * backtrace.c (display_frame_expr): Do not remove control
1963 characters from the final string. Print it directly using
1964 scm_display.
1965
1966 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1967 Thanks to Roland Orre!
1968
1969 2004-09-29 Kevin Ryde <user42@zip.com.au>
1970
1971 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1972 be whole original string in match struct, not offsetted substring.
1973
1974 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1975
1976 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1977
1978 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1979
1980 * Makefile.am (EXTRA_DIST): Added gettext.h.
1981
1982 * smob.c, smob.h (scm_assert_smob_type): New.
1983
1984 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1985 Include GUILE_CFLAGS.
1986 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1987 now.
1988 (libpath.h): Put GUILE_CFLAGS in the build-info.
1989
1990 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1991
1992 * print.h (scm_print_state): Added highlight_objects.
1993 * print.c (make_print_state, scm_free_print_state): Initialize it
1994 to SCM_EOL.
1995 (scm_iprin1): Wrap output in '{...}' when object is contained in
1996 highlight_objects.
1997
1998 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1999 scm_backtrace_with_highlights): New. Set highlight_objects of
2000 printstate.
2001
2002 * error.c (scm_error_scm): Document new meaning of data/rest
2003 argument for out-of-range and wrong-type-arg errors.
2004 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
2005 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
2006 exception so that it gets highlighted in the backtrace.
2007 Don't talk about "argument" when not giving a position.
2008
2009 * throw.c (handler_message): The rest argument is the fourth
2010 argument, not everything after the third. Call
2011 scm_display_backtrace_with_highlights, passing the rest argument
2012 when appropriate.
2013
2014 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2015
2016 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
2017 <bruno@clisp.org>:
2018
2019 * i18n.c: Handle --disable-nls (thanks Bruno).
2020
2021 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
2022 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
2023
2024 * i18n.c (scm_i_to_lc_category): New name and export. Support all
2025 LC categories.
2026 * posix.c (scm_setlocale): Use it.
2027
2028 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
2029 scm_bind_textdomain_codeset): Make wrappers similar to C function
2030 they wrap.
2031
2032 * i18n.h: New file.
2033 * i18n.c: New file.
2034 * gettext.h: New file, taken from GNU gettext.
2035 * init.c: Include libguile/i18n.h.
2036 (scm_init_guile_1): Add call to scm_init_i18n().
2037 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
2038 (DOT_X_FILES): Add i18n.x.
2039 (DOT_DOC_FILES): Add i18n.doc.
2040 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
2041 (modinclude_HEADERS): Add i18n.h.
2042
2043 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2044
2045 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
2046
2047 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
2048 discouraged.h. Replaced all uses with scm_is_pair.
2049 (SCM_I_CONSP): New name for SCM_CONSP.
2050
2051 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
2052 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
2053 scm_cadr, etc): New.
2054 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
2055 uses with scm_is_null.
2056
2057 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
2058 instead of explicit code.
2059
2060 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2061
2062 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2063 Reworded logic a bit so that #f is returned immediately when s1 is
2064 too short to contain s2.
2065
2066 * regex-posix.c (scm_regexp_exec): Convert string to
2067 zero-terminated locale string before matching against it.
2068
2069 * strings.h, strings.c (scm_substring_read_only,
2070 scm_c_substring_read_only, scm_i_substring_read_only): New.
2071 (RO_STRING_TAG, IS_RO_STRING): New.
2072 (scm_i_string_writable_chars): Bail on read-only strings.
2073
2074 * read.c (scm_lreadr): use scm_c_substring_read_only for string
2075 literals, thus making them read-only as specified by R5RS.
2076
2077 2004-09-22 Marius Vollmer <mvo@zagadka.de>
2078
2079 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
2080 by testing for smobs before insisting on equal SCM_CELL_TYPES.
2081
2082 2004-09-21 Marius Vollmer <mvo@zagadka.de>
2083
2084 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
2085 numbers.c.
2086 (scm_to_mpz, scm_from_mpz): New.
2087 Thanks to Andreas Vögele!
2088
2089 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
2090 just on a line of its own.
2091
2092 * srfi-13.c (scm_string_any, scm_string_every,
2093 scm_string_tabulate, string_upcase_x, string_down_case_x,
2094 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
2095 size_t instead of int for indices into strings. Make sure that no
2096 over- or underflow occurs. Thanks to Andreas Vögele!
2097 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
2098 indices, which can also be negative.
2099
2100 2004-09-20 Marius Vollmer <mvo@zagadka.de>
2101
2102 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
2103
2104 * threads.c (scm_threads_mark_stacks): Call
2105 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
2106 only used once.
2107
2108 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
2109
2110 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
2111 Bugfix: when subtracting unsigned values, make sure that result
2112 does not wrap.
2113
2114 2004-09-09 Kevin Ryde <user42@zip.com.au>
2115
2116 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
2117 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
2118 by Andreas Vögele.
2119
2120 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2121
2122 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
2123
2124 * eq.c (real_eqv): Pretend that all NaNs are equal.
2125
2126 * numbers.c (scm_integer_expt): Do not accept inexact integers.
2127
2128 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2129
2130 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
2131 use size_t for some locals instead of int.
2132
2133 * read.c (scm_flush_ws): Detect "#!"-style comments here.
2134 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
2135 (skip_scsh_block_comment): Use scm_input_error instead of
2136 scm_misc_error in case of EOF.
2137
2138 2004-09-07 Kevin Ryde <user42@zip.com.au>
2139
2140 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
2141 Bug report by Bill Schottstaedt.
2142
2143 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
2144 column.
2145 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
2146
2147 * posix.c (scm_access): Update docstring per manual.
2148
2149 * posix.c (scm_nice): Correction to error detection. Reported by
2150 Matthias Koeppe.
2151
2152 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
2153 throw error before unlocking mutex with SCM_ALLOW_INTS.
2154
2155 2004-09-06 Kevin Ryde <user42@zip.com.au>
2156
2157 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
2158 available. This also gets around CLK_TCK being absent when
2159 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
2160
2161 2004-09-03 Stefan Jahn <stefan@lkcc.org>
2162
2163 * threads.c (scm_threads_mark_stacks): Fixed local variable
2164 definitions.
2165
2166 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
2167 local variable definitions.
2168
2169 * stime.c (_POSIX_C_SOURCE): Do not define this item on
2170 MinGW32 because it conflicts with its pthread headers.
2171 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
2172 (scm_strftime): Using scm_from_locale_string() instead of
2173 scm_makfrom0str().
2174
2175 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
2176 part.
2177
2178 * numbers.c (scm_init_numbers): Removed check_sanity() call
2179 inside GUILE_DEBUG. The function has been removed somewhen...
2180
2181 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
2182 MinGW32 because it conflicts with its pthread headers.
2183
2184 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2185
2186 * strings.c (SCM_STRINGP): Accept all strings.
2187 (SCM_STRING_CHARS): Reject shared substrings here.
2188
2189 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
2190 the Copyright years.
2191
2192 2004-08-27 Kevin Ryde <user42@zip.com.au>
2193
2194 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
2195 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
2196 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
2197
2198 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2199
2200 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
2201 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
2202 scm_i_symbol_is_interned, scm_i_mem2symbol,
2203 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
2204
2205 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2206
2207 * srfi-13.c: First cut at thread-safeness and proper use of
2208 scm_i_string_chars et al. Copious scm_remember_upto_heres have
2209 been inserted. Made sure that no internal string pointer is used
2210 across a SCM_TICK or a possible GC.
2211
2212 * script.c (scm_compile_shell_switches): Use
2213 scm_from_locale_string instead of scm_makfrom0str.
2214
2215 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
2216 always been.
2217
2218 2004-08-25 Marius Vollmer <mvo@zagadka.de>
2219
2220 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
2221 strop.c.
2222
2223 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
2224 * strop.h, strop.c: Removed, they are now empty.
2225 * Makefile.am: Updated for new and removed files.
2226
2227 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
2228 to scm_string_to_symbol.
2229
2230 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
2231 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
2232 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
2233 charset instead of libc functions.
2234
2235 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
2236 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
2237 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
2238 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
2239 instead of explicit code.
2240
2241 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
2242 "srfi-13.h" instead of "strop.h".
2243
2244 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
2245 scm_init_srfi_14. Do not call scm_init_strop.
2246
2247 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2248
2249 * numbers.c (scm_inf_p): Synced docstring back from manual.
2250
2251 2004-08-22 Marius Vollmer <mvo@zagadka.de>
2252
2253 * strings.c (get_str_buf_start): New helper function.
2254 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
2255 scm_i_string_char, scm_i_string_writable_chars): Use it.
2256 (scm_i_substring_copy): Make START argument optional for C
2257 callers, for upcoming SRFI-13 integration.
2258
2259 2004-08-21 Marius Vollmer <mvo@zagadka.de>
2260
2261 From Richard Todd, Thanks!
2262
2263 * script.c (scm_compile_shell_switches): added '-L' switch to add
2264 to the %load-path.
2265
2266 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2267
2268 * eval.c (unmemoize_exprs): When dropping internal body markers
2269 from the output during unmemoization, also drop those that are not
2270 immediately at the beginning of a body.
2271
2272 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2273
2274 * eval.c (scm_lookupcar1): Report "Variable used before given a
2275 value" insetad of an "Unbound" one for variables that are found
2276 but still contain SCM_UNDEFINED.
2277
2278 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2279 expects a null-terminated string in the locale encoding, but
2280 scm_i_string_writable_chars doesn't give that. Fixed by letting
2281 mkstemp modify a locale version of the tmpl argument and copying
2282 the result back into tmpl.
2283
2284 * strop.c (scm_substring_move_x): Store into str2, not str1.
2285
2286 2004-08-20 Kevin Ryde <user42@zip.com.au>
2287
2288 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2289 to modify the input string.
2290
2291 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2292
2293 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2294 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2295 scm_c_symbol_length.
2296
2297 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2298
2299 New string implementation, with copy-on-write strings and
2300 mutation-sharing substrings, and a new internal string API.
2301 Symbols can now share memory with strings.
2302
2303 * tags.h (scm_tc7_stringbuf): New tag.
2304
2305 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2306 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2307 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2308 uses.
2309 (scm_i_make_string, scm_c_make_string): New, to replace
2310 scm_allocate_string. Updated all uses.
2311 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2312 SCM_STRING_LENGTH): Deprecated.
2313 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2314 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2315 Discouraged. Replaced all uses with scm_from_locale_string or
2316 similar, as appropriate.
2317 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2318 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2319 scm_substring_shared, scm_substring_copy): New.
2320
2321 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2322 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2323 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2324 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2325 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2326 Deprecated.
2327 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2328 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2329 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2330 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2331 Updated all uses.
2332 (scm_gensym): Generate only the number suffix in the buffer, just
2333 string-append the prefix.
2334
2335 * error.c (scm_memory_error): Do not try to throw, just abort.
2336 Throwing will not work anyway.
2337
2338 * gh.h, gh-data.c (gh_set_substr): Made src const.
2339
2340 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2341 (scm_mode_bits): Use it.
2342 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2343 a vector normally and fill that instead of consing a list with a
2344 blocked GC.
2345
2346 * read.c (scm_i_casei_streq): New, for counted strings.
2347
2348 * threads.c (gc_section_count): Removed, thread-sleeping can not
2349 be nested.
2350 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2351 admin mutex so that we can be put to sleep by other threads while
2352 blocking on that mutex. Lock all the heap mutex of all threads,
2353 including ourselves.
2354 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2355 call scm_i_enter_guile.
2356 (scm_thread_mark_stacks): Expect all threads to be suspended.
2357
2358 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2359 scm_gc_mallocated, for now.
2360 (scm_init_storage): Initialize it.
2361 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2362
2363 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2364 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2365 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2366 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2367
2368 * strop.c (scm_string_copy): Use scm_c_substring to get a
2369 copy-on-write string.
2370
2371 2004-08-18 Kevin Ryde <user42@zip.com.au>
2372
2373 * arbiters.c (FETCH_STORE): New macro.
2374 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2375 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2376 scm_try_arbiter and scm_release_arbiter.
2377 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2378 for speed on i386, otherwise using mutex.
2379
2380 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2381 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2382 exact and inexact is #f.)
2383
2384 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2385 to get thread safety of scm_ttyname.
2386
2387 * ports.c (ttyname): Remove prototype, unused.
2388
2389 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2390 Reported by Michael Tuexen.
2391
2392 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2393
2394 * load.c (scm_init_load_path): Do not pass NULL to
2395 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2396 not set. Thanks to Bill Schottstaedt.
2397
2398 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2399
2400 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2401 locale strings instead of accessing their internals.
2402 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2403 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2404 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2405
2406 * simpos.c (scm_system): Convert SCM strings to locale strings
2407 instead of accessing their internals.
2408
2409 * script.c (scm_compile_shell_switches): Convert version to locale
2410 string before printing it.
2411
2412 * rdelim.c (scm_read_delimited_x): Avoid
2413 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2414 of scm_from_long for the returned number of read characters.
2415
2416 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2417 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2418
2419 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2420 Use them instead of SCM_SYSCALL when one or two strings need to be
2421 converted into locale strings.
2422 (my_rename): New, gathers platform dependent code for renaming.
2423 (scm_rename): Use it.
2424 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2425 strings instead of accessing their internals.
2426 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2427 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2428 SCM_STRING_LENGTH.
2429
2430 * extensions.c (load_extension): Convert lib and init to locale
2431 strings instead of accessing the internals directly.
2432 (scm_c_load_extension): Use scm_from_locale_string instead of
2433 scm_makfrom0str.
2434
2435 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2436 scm_fdes_to_port, but take mode bits directly instead of as a C
2437 string.
2438 (scm_i_fdes_to_port): Implement using above.
2439 (scm_open_file): Use scm_i_fdes_to_port together with
2440 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2441 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2442 with scm_i_mode_bits to avoid accessing internals of SCM string
2443 from C.
2444
2445 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2446 SCM string as argument.
2447
2448 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2449 bits directly instead of C string.
2450 (scm_void_port): Implement using above.
2451 (scm_sys_make_void_port): Use scm_i_void_port together with
2452 scm_i_mode_bits to avoid accessing internals of SCM string.
2453
2454 * strings.h, strings.c (scm_i_get_substring_spec): New.
2455
2456 * socket.c, rw.c, deprecated.h, validate.h
2457 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2458 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2459 scm_to_locale_string, etc.
2460 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2461 above, plus scm_i_get_substring_spec.
2462
2463 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2464 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2465 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2466 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2467 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2468 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2469 with more explicit scm_remember_upto_here_1, etc, or introduced
2470 them in the first place.
2471
2472 * posix.c (WITH_STRING): New helper macro. Use it where one
2473 locale string is needed for a short piece of code.
2474 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2475 when one locale string is needed.
2476 (scm_mkstemp): Convert tmpl to a locale string.
2477 (scm_putenv): Rewritten to use only C strings.
2478 (scm_setlocale, scm_crpt): Convert argument strings to locale
2479 strings.
2480
2481 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2482
2483 * load.c (scm_primitive_load_path): Do not check for absolute
2484 filenames when scm_sys_search_load_path returns false, which will
2485 return absolute filenames unchanged.
2486
2487 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2488
2489 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2490 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2491 of an alist. Thanks to Matthias Koeppe!
2492
2493 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2494
2495 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2496 Moved from string.h to deprecated.h.
2497
2498 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2499
2500 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2501 SCM_I_MAKE_STRING_TAG, changed all uses.
2502 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2503 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2504 respectively. For a short time, the old names are still there as
2505 aliases. Not all uses have been changed yet, but the ones in
2506 strings.c have.
2507 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2508 SCM_T_BITS_MAX.
2509 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2510 scm_take_locale_string, scm_take_locale_stringn,
2511 scm_to_locale_string, scm_to_locale_stringn,
2512 scm_to_locale_stringbuf): New.
2513 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2514 deprecated.[hc]. Implemented in terms of the new functions above.
2515 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2516 scm_makfrom0str): Reimplemented in terms of the new functions from
2517 above. They will be discouraged shortly.
2518 (scm_substring): Do not use scm_mem2string.
2519 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2520 to replace similar code from posix.c, simpos.c, and dynl.c.
2521 (scm_string_append): Use memcpy instead of explicit loop. Do not
2522 use register keyword. Use plain 'char' instead of 'unsigned
2523 char'.
2524
2525 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2526 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2527
2528 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2529 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2530 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2531 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2532
2533 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2534 string. This avoids a conversion round-trip.
2535
2536 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2537 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2538 SCM_I_STRING_LENGTH, respectively.
2539 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2540
2541 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2542 of a string, call scm_display on the string itself.
2543
2544 * dynwind.c, dynwind.h (scm_frame_free): New.
2545
2546 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2547 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2548 Replaced uses of SCM_STRING_CHARS with proper uses of
2549 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2550 Replaced scm_mem2string with scm_from_locale_string.
2551
2552 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2553 Removed, replaced all uses with scm_i_allocate_string_pointers.
2554
2555 * load.h, load.c (scm_internal_parse_path): Removed.
2556 (scm_parse_path): Use scm_string_split to do the work.
2557 (scm_init_load_path): Use scm_parse_path instead of
2558 scm_internal_parse_path.
2559 (scm_search_path): Rewritten string handling part of the code in
2560 terms of scm_to_locale_stringbuf and so that it is thread safe.
2561
2562 * error.c (scm_error_scm): Throw directly instead of calling
2563 scm_error, this avoids the back and forth conversion of SUBR and
2564 MESSAGE and also plugs a memory leak.
2565 (scm_error): Call scm_error_scm.
2566
2567 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2568 (display_header): Print FNAME when it is true, not
2569 merely when it is a string.
2570
2571 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2572 unceremoniously. They were unused by Guile itself, and external
2573 use should stop immediately.
2574
2575
2576 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2577
2578 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2579 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2580 deprecated versions installed in deprecated.h and deprecated.c.
2581 Changed all uses.
2582
2583 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2584
2585 * net_db.c (scm_resolv_error): don't cause an exception while
2586 trying to throw an exception -- call scm_misc_error with correct
2587 arguments. The previous arguments needed a format escape that
2588 wasn't in any of the format strings.
2589
2590 2004-08-06 Kevin Ryde <user42@zip.com.au>
2591
2592 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2593 so as not to depend on signedness of plain char. For byvect range
2594 check, throw out-of-range rather than wrong-type-arg.
2595
2596 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2597 signed byte range checks by using scm_to_schar and scm_from_schar,
2598 don't want to depend on signedness of C char.
2599
2600 2004-08-05 Kevin Ryde <user42@zip.com.au>
2601
2602 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2603 SCM_DEFER_INTS.
2604 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2605 guaranteed if multiple threads compete to unlock.
2606 Update docstrings per doc/ref/api-scheduling.texi.
2607
2608 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2609 stat on the filename, to be certain a file rename can't mean we get
2610 info on one filesystem object but open another. This fstat usage is
2611 similar to Emacs copy-file.
2612
2613 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2614
2615 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2616 SIGINT and SIGQUIT, since those values are ints.
2617
2618 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2619
2620 * num2integral.i.c, num2float.i.c: Removed.
2621 * Makefile.am (noinst_HEADERS): Updated.
2622
2623 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2624 scm_i_make_ratio and made static, replaced uses with scm_divide.
2625 (scm_complex_p): New, export as "complex?" to Scheme.
2626 (scm_number_p): Export as "number?" to Scheme.
2627 (scm_is_complex, scm_is_number): New.
2628 (scm_c_make_rectangular, scm_c_make_polar): New.
2629 (scm_make_rectangular, scm_make_polar): Use above.
2630 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2631 New.
2632 (scm_make_complex): Discouraged by moving to discouraged.h and
2633 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2634
2635 * discouraged.h, discouraged.c, numbers.c, numbers.h
2636 (scm_is_rational): New.
2637 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2638 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2639 Removed prototypes.
2640 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2641 Discouraged by moving to discouraged.h and discouraged.c.
2642 Replaced all uses with scm_from_double.
2643 (scm_num2float, scm_num2double): Discouraged by moving prototype
2644 to discouraged.h and rewriting in terms of scm_to_double.
2645 Replaced all uses with scm_to_double.
2646 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2647 explicit code.
2648 (scm_from_double): Do not implement in terms of scm_make_real, use
2649 explicit code.
2650
2651 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2652
2653 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2654
2655 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2656 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2657
2658 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2659 Renamed to SCM_I_* in order to avoid collisions with the versions
2660 defined in deprecated.h.
2661
2662 * discouraged.h, discouraged.c: New files.
2663
2664 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2665 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2666 deprecated to being discouraged by moving to discouraged.h.
2667
2668 * numbers.h, numbers.c, discouraged.h, discouraged.c
2669 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2670 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2671 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2672 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2673 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2674 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2675 discouraged.c and reimplementing in terms of scm_from_* and
2676 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2677 functions.
2678
2679 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2680 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2681 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2682 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2683 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2684 explicit code.
2685
2686 2004-08-02 Kevin Ryde <user42@zip.com.au>
2687
2688 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2689 and current usage and migration.
2690
2691 2004-07-31 Kevin Ryde <user42@zip.com.au>
2692
2693 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2694 it's not thread safe.
2695 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2696 advantage of this.
2697 * fports.c (scm_open_file): Use scm_strerror likewise.
2698 * filesys.c (scm_stat, scm_lstat): Ditto.
2699
2700 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2701 cannot be opened.
2702
2703 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2704 update, for thread safety.
2705 (gensym_counter): Move into scm_gensym which is its only user.
2706 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2707
2708 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2709
2710 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2711 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2712 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2713 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2714 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2715 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2716 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2717 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2718 defined in terms of scm_to_signed_integer, etc, but in terms of
2719 scm_to_int8, etc.
2720
2721 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2722
2723 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2724 no longer used.
2725
2726 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2727 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2728
2729 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2730 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2731 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2732 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2733 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2734 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2735 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2736
2737 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2738 the functions below.
2739
2740 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2741 conv-uinteger.i.c.
2742
2743 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2744 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2745 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2746 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2747 scm_from_uint64): Turned from macros into proper functions.
2748 (scm_to_signed_integer, scm_to_unsigned_integer,
2749 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2750 conv-integer.i.c and conv-uinteger.i.c, as well.
2751
2752 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2753 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2754 the limits. Those are always defined.
2755
2756 2004-07-29 Kevin Ryde <user42@zip.com.au>
2757
2758 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2759
2760 2004-07-28 Kevin Ryde <user42@zip.com.au>
2761
2762 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2763 safety.
2764
2765 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2766 consistency with other vector types and to get arg and func name into
2767 error message.
2768
2769 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2770
2771 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2772 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2773 scm_from_bool, respectively.
2774 (SCM_NINUMP): Added.
2775
2776 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2777 deprecated.h. Replaced all uses with scm_is_eq.
2778
2779 2004-07-24 Kevin Ryde <user42@zip.com.au>
2780
2781 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2782 * posix.c (scm_crypt): Use it to protect static data in crypt().
2783
2784 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2785
2786 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2787 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2788 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2789 versions to deprecated.h and deprecated.c. Changed all uses to
2790 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2791 scm_from_*, as appropriate.
2792
2793 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2794 the unexisting scm_cross_dynwind_binding_scope for inums on the
2795 windlist.
2796
2797 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2798
2799 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2800 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2801 byte-wise address to a SCM integer. Changed all uses.
2802 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2803 scm_to_ipv6 and added type and range checking, for converting from
2804 an IPv& byte-wise address to a SCM integer. Changed all uses.
2805 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2806 is now done by scm_to_ipv6.
2807
2808 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2809 not accept inexact integers.
2810
2811 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2812 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2813 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2814 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2815 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2816 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2817 fixnum/bignum distinction visible. Changed all uses to
2818 scm_to_size_t or similar.
2819
2820 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2821
2822 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2823
2824 2004-07-10 Kevin Ryde <user42@zip.com.au>
2825
2826 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2827 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2828 such a size causes divide-by-zeros in scm_hasher.
2829
2830 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2831 leak.
2832
2833 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2834
2835 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2836 Rewritten using the same logic as scm_to_signed_integer and
2837 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2838 use CHAR_BIT instead of hardcoding 8.
2839 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2840 SCM_I_LLONG_MIN etc. instead.
2841
2842 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2843 SCM_I_MAKINUM and changed all uses.
2844 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2845
2846 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2847 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2848 them by assuming twos-complement.
2849
2850 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2851
2852 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2853 configure now produces.
2854 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2855 definitions, giving the limits of the integer types defined by
2856 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2857 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2858
2859 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2860 SHORT_MIN.
2861 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2862 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2863 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2864 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2865 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2866 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2867 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2868 scm_from_uintmax): New.
2869
2870 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2871
2872 * tags.h (scm_is_eq): New.
2873
2874 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2875 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2876 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2877 scm_from_bool, and scm_is_bool, respectively.
2878
2879 * boolean.h (scm_is_bool): Fix bug in prototype.
2880 (scm_from_bool): The argument is "x" not "f", stupid.
2881
2882 * boolean.c (scm_is_bool): Fix typo.
2883
2884 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2885 scm_is_unsigned_integer, scm_to_signed_integer,
2886 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2887 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2888 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2889 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2890 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2891 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2892 New.
2893
2894 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2895
2896 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2897 scm_to_bool): New.
2898
2899 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2900
2901 * backtrace.c (display_expression, display_frame): Call
2902 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2903 single memoized expression.
2904
2905 * debug.c (memoized_print): Don't try to unmemoize the memoized
2906 object, since we can't know whether it holds a single expression
2907 or a body.
2908
2909 (scm_mem_to_proc): Removed check for lambda expression, since it
2910 was moot anyway. Whoever uses these functions for debugging
2911 purposes should know what they do: Creating invalid memoized code
2912 will cause crashes, independent of whether this check is present
2913 or not.
2914
2915 (scm_proc_to_mem): Take the closure's code as it is and don't
2916 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2917 memoized code should not be modified.
2918
2919 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2920 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2921 available as a guile internal function instead. However,
2922 scm_i_unmemoize_expr will only work on memoized objects that hold
2923 a single memoized expression. It won't work with bodies.
2924
2925 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2926 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2927 i. e. a list of expressions.
2928
2929 * eval.c (unmemoize_exprs): Drop internal body markers from the
2930 output during unmemoization.
2931
2932 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2933 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2934 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2935 as guile internal functions instead. scm_i_unmemoize_expr will
2936 only work on a single memoized expression, while
2937 scm_i_unmemocopy_body will only work on bodies.
2938
2939 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2940
2941 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2942
2943 (scm_cons_source, scm_primitive_eval): Prefer higher level
2944 predicate SCM_FALSEP over SCM_IMP.
2945
2946 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2947
2948 * script.c (scm_shell_usage): minor phrasing change.
2949
2950 * gc_os_dep.c: update ifdefery for macosx.
2951 (scm_get_stack_base): separate result initialization from
2952 declaration to slience warnings with macosx and hp-ux using gcc
2953 3.3. Thanks to Andreas Vögele.
2954
2955 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2956
2957 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2958
2959 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2960
2961 * list.[ch] (scm_i_finite_list_copy): New internal function to
2962 copy lists that are known to be finite (though not necessarily
2963 proper).
2964
2965 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2966 a closure's argument list like an expression of a body.
2967
2968 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2969 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2970 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2971 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2972 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2973 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2974 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2975 unmemoize_builtin_macro): New static functions and symbols.
2976
2977 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2978 now has a slightly different meaning: The memoized form that is
2979 receives as its argument is now interpreted as a sequence of
2980 expressions from a body.
2981
2982 (unmemocar, scm_unmemocar): Since the whole functionality of
2983 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2984 has its old content back and is deprecated, while unmemocar has
2985 been removed.
2986
2987 (SCM_BIT7): Removed.
2988
2989 (CEVAL): For unmemoizing a single expression, call
2990 unmemoize_expression instead of scm_unmemocopy, which now expects
2991 a sequence of body expressions. Eliminated unnecessary empty
2992 environment frame when executing let* forms. Eliminated
2993 unmemoization step from evaluator.
2994
2995 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2996
2997 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2998 macroexp and made static. Added new version of scm_macroexp that
2999 emits a deprecation warning and then calls macroexp.
3000 (scm_m_undefine): Issue deprecation warning.
3001
3002 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3003
3004 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
3005 Modified to make set! work on symbols that represent syntactic
3006 keywords.
3007
3008 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
3009
3010 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
3011 compound expression as lvalue errors.
3012
3013 2004-05-24 Marius Vollmer <mvo@zagadka.de>
3014
3015 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
3016 WINDER_DATA to a SCM.
3017
3018 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3019
3020 * goops.c (compute_getters_n_setters, create_standard_classes,
3021 scm_add_slot): Compute closures by calling scm_i_eval_x on a
3022 lambda expression rather than creating them with scm_closure.
3023
3024 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3025
3026 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
3027 misplaced syntactic keywords. This will not work unless guile's
3028 defmacro feature is deprecated.
3029
3030 (scm_m_case): Fixed a bug that caused the list of labels to grow
3031 with every case form.
3032
3033 2004-05-19 Kevin Ryde <user42@zip.com.au>
3034
3035 * numbers.c (scm_round_number): For inum and big, just return x. For
3036 real, use scm_round for 2^54-1 etc problems covered there.
3037
3038 * numbers.c (trunc): Remove #define to scm_truncate when the C library
3039 doesn't provide trunc. This was for when `truncate' was done as a
3040 scm_tc7_dsubr, no longer required.
3041
3042 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
3043 to stack marking call, two parameters and no cast on t->base.
3044
3045 2004-05-18 Marius Vollmer <mvo@zagadka.de>
3046
3047 * hashtab.c (rehash_after_gc): Bug fix: properly link the
3048 processed hashtables back into the weak_hashtables list. Thanks
3049 to Bill Schottstaedt!
3050
3051 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3052
3053 * eval.c (unmemoize_quote): New static function.
3054
3055 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
3056 representation of 'quote' and '@slot-ref' to an improper list.
3057 This reduces execution time, the number of cells used to hold the
3058 memoized code, and thus also reduces garbage collection time.
3059
3060 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
3061
3062 (SCM_CEVAL): Changed macro handling to also work with macros that
3063 return improper lists. Added an assertion, that the code returned
3064 by a macro transformer will not lead to cycles in the memoized
3065 code.
3066
3067 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3068
3069 No functional change, just rearrangements of functions within the
3070 file.
3071
3072 * eval.c (scm_ilookup, scm_unbound_variable_key,
3073 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
3074 the definitions used for execution, since that's where they will
3075 belong to later.
3076
3077 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3078
3079 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
3080 throughout guile, has not been part of an official release yet,
3081 and the concept of sloppy predicates has never been a good idea.
3082
3083 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
3084 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
3085 Simplified.
3086
3087 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3088
3089 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
3090 to make explicit what happens.
3091
3092 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3093
3094 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
3095 explicit what happens.
3096
3097 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
3098 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
3099
3100 2004-05-11 Marius Vollmer <mvo@zagadka.de>
3101
3102 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
3103 is indeed a procedure when it isn't a number.
3104
3105 2004-05-10 Marius Vollmer <mvo@zagadka.de>
3106
3107 Convert floating point numbers into strings with an arbitrary
3108 radix. Thanks to Richard Todd!
3109
3110 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
3111 fit.
3112 (fx): Removed.
3113 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
3114 number_chars): New, to support variable radices.
3115 (idbl2str): Use above instead of the old base-10 only tables.
3116 (iflo2str): Pass on new RADIX argument to idbl2str.
3117 (scm_number_to_string): Pass radix to iflo2str.
3118 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
3119 iflo2str.
3120 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
3121 possible radices.
3122
3123 2004-05-10 Kevin Ryde <user42@zip.com.au>
3124
3125 * numbers.c (scm_logbit_p): Correction to test above the end of an
3126 inum. Reported by Jan Konecny.
3127
3128 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3129
3130 * gc.h (scm_t_cell): Fields are now of type SCM instead of
3131 scm_t_bits. Updated all users.
3132 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
3133 duplicating the code.
3134 (SCM_CELL_OBJECT_LOC): New.
3135 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
3136 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
3137
3138 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
3139 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
3140 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
3141 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
3142 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
3143 SCM_SMOB_OBJECT_3_LOC): New.
3144 * smob.c (scm_i_set_smob_flags): New function.
3145
3146 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
3147 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
3148 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
3149 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
3150 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
3151 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
3152
3153 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
3154 taking the address of SCM_CELL_WORD_1, the latter being no longer
3155 an lvalue.
3156
3157 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
3158 of casting SCM_CELL_WORD_LOC.
3159
3160 2004-05-02 Kevin Ryde <user42@zip.com.au>
3161
3162 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
3163 --disable-deprecated. Reported by Andreas Vögele.
3164
3165 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
3166 particular on HP-UX). Reported by Andreas Vögele.
3167
3168 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
3169 code has support for. Fixes building with AIX cc, which is ansi but
3170 doesn't define __STDC__. Reported by Keith Crane.
3171 (var_start): Remove macro, this variation no longer required.
3172 (scm_list_n): Use va_start directly.
3173
3174 2004-05-01 Kevin Ryde <user42@zip.com.au>
3175
3176 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
3177 is now gone. Reported by Andreas Vögele.
3178
3179 2004-04-28 Kevin Ryde <user42@zip.com.au>
3180
3181 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
3182 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
3183 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
3184 subscript. Reported by Andreas Vögele.
3185 Also cast through unsigned char to avoid passing negatives to those
3186 macros if input contains 8-bit values.
3187
3188 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
3189 corrections to range check for signed numbers. Remove
3190 scm_remember_upto_here_1(num) from these checks, since num is used
3191 subsequently anyway.
3192
3193 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
3194 avoid warning from gcc 3.4. Reported by Hyperdivision.
3195
3196 * numbers.c (scm_bit_extract): Use min instead of MIN.
3197 (MIN): Remove, this conflicts with similar macro defined by limits.h
3198 on HP-UX. Reported by Andreas Vögele.
3199
3200 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
3201 particular on HP-UX). Reported by Andreas Vögele.
3202
3203 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
3204 Reported by Andreas Vögele.
3205
3206 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
3207 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
3208 by Andreas Vögele.
3209
3210 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3211
3212 * eval.c (s_macro_keyword): New static identifier.
3213
3214 (scm_m_define): Change order to first create binding and
3215 evaluating the expression afterwards.
3216
3217 (scm_m_set_x): Memoize complete set! expression. Only leave
3218 symbols if no binding exists at memoization time. Throw error if
3219 assigning to a syntactic keyword.
3220
3221 (lazy_memoize_variable): New function.
3222
3223 (CEVAL): When execution set!, perform lazy memoization if
3224 unmemoized symbol is detected.
3225
3226 * modules.c (module_variable): Return variables with unbound
3227 value.
3228
3229 * tags.h: Fix comment.
3230
3231 2004-04-25 Kevin Ryde <user42@zip.com.au>
3232
3233 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
3234 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
3235 in 8-bit locales, and ensures consistency with char-upper-case? and
3236 char-lower-case? which already use ctype.h.
3237 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
3238 Remove.
3239 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
3240
3241 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
3242 call. Reported by Hyperdivision.
3243
3244 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
3245 Reported by Hyperdivision.
3246
3247 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
3248 Hyperdivision.
3249
3250 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3251
3252 Hide the implementation of ilocs and isyms in eval.c.
3253
3254 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3255 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
3256 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
3257 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
3258 eval.h to eval.c.
3259
3260 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
3261 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
3262 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
3263 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
3264 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
3265 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
3266 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
3267 renamed to ISYMNUM.
3268
3269 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
3270 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
3271 Extracted printing of ilocs and isyms to guile internal functions
3272 scm_i_print_iloc, scm_i_print_isym of eval.c.
3273
3274 2004-04-22 Kevin Ryde <user42@zip.com.au>
3275
3276 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3277
3278 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3279 rounding in x+0.5 when x is a big value already an integer. In
3280 certain hardware rounding cases x+0.5 can give an adjacent integer,
3281 leading to that as the result, when we really just wanted x itself.
3282
3283 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3284
3285 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3286
3287 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3288 added const qualifiers, cast intentionally unused expressions to
3289 void for emphasis, improved comment.
3290
3291 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3292
3293 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3294 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3295 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3296 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3297 Defined the tc8-tag for flags to be 0x04, which will mean that
3298 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3299 to the reduced number of bits and the simpler bit pattern for
3300 SCM_BOOL_F, certain machines may be able to use more efficient
3301 processor instructions to deal with SCM_BOOL_F.
3302
3303 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3304 never been defined in a released version, thus no need to
3305 deprecate them.
3306
3307 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3308 instead of tc9 tags.
3309
3310 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3311 of tc9 tags.
3312
3313 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3314 could have used this definition.
3315
3316 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3317 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3318 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3319 as isyms, as special isyms don't exist any more.
3320
3321 2004-04-18 Kevin Ryde <user42@zip.com.au>
3322
3323 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3324 safety.
3325
3326 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3327 explicit swapping code.
3328
3329 2004-04-15 Kevin Ryde <user42@zip.com.au>
3330
3331 * cpp_sig_symbols.in: Add SIGSYS.
3332
3333 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3334 recursion.
3335
3336 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3337 frac/big and frac/frac, use scm_less_p for exact comparison.
3338
3339 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3340 with big/inum.
3341
3342 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3343
3344 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3345
3346 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3347
3348 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3349 scm_c_{up,down}case.
3350 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3351 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3352
3353 2004-04-06 Kevin Ryde <user42@zip.com.au>
3354
3355 * numbers.c (scm_ash): Remove stray "}" in docstring.
3356
3357 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3358 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3359 calling mpz_cmp_ui in most cases.
3360
3361 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3362 for big == abs(most-negative-fixnum) special case.
3363 (abs_most_negative_fixnum): Remove, no longer used.
3364
3365 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3366 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3367 calling (sigaction NSIG).
3368
3369 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3370 and fork error cases to do this.
3371
3372 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3373
3374 * eval.c (CEVAL): Don't distinguish between short and long
3375 instructions when dispatching - just always dispatch on the
3376 instruction code, which is common for short and long instructions.
3377 Further, removed unnecessary goto statements and added comment.
3378
3379 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3380
3381 * eval.c (scm_unmemocopy): Don't distinguish between short and
3382 long instructions when dispatching - just always dispatch on the
3383 instruction code, which is common for short and long instructions.
3384 Further, removed unnecessary goto statements, fixed indentation
3385 and replaced SCM_IMP predicates by SCM_NULLP.
3386
3387 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3388
3389 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3390 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3391 'checkmacro'.
3392
3393 2004-03-31 Kevin Ryde <user42@zip.com.au>
3394
3395 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3396
3397 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3398
3399 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3400 SCM_DEBUGGINGP:
3401
3402 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3403 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3404 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3405 single interface that also matches the naming conventions.
3406 Probably scm_debug_mode_p should be part of the private interface
3407 anyway.
3408
3409 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3410 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3411 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3412 to scm_debug_mode_p.
3413
3414
3415 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3416
3417 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3418 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3419 from debug.h to eval.h.
3420
3421 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3422 more, just leave it with setting scm_debug_mode_p, which is
3423 equivalent for practical purposes.
3424
3425 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3426 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3427
3428 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3429
3430 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3431 static and renamed it to ceval throughout. Provide a new exported
3432 but deprecated function scm_ceval as a wrapper for backwards
3433 compatibility. The same is done for the deval/scm_deval pair of
3434 functions.
3435
3436 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3437 throughout. Defined CEVAL to ceval or deval, based on compilation
3438 phase.
3439
3440 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3441 to ceval and deval instead of calling *scm_ceval_ptr.
3442
3443 * eval.c (dispatching_eval): New deprecated static function.
3444
3445 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3446 to emulate its old behaviour as closely as possible.
3447
3448
3449 Change the evaluator such that only expressions for which pair? is
3450 true are passed to CEVAL, and such that all other expressions are
3451 evaluated outside of CEVAL:
3452
3453 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3454 expression that is assumed to be memoized already. All but
3455 expressions of the form '(<form> <form> ...)' are evaluated inline
3456 without calling an evaluator.
3457
3458 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3459 expressions of the form '(<form> <form> ...)' inline without
3460 calling an evaluator.
3461
3462 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3463 the special case of unmemoized symbols passed on the top level.
3464
3465 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3466 is known that the expression passed to CEVAL is of the form
3467 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3468 now it is known that the input expression of CEVAL is a pair.
3469
3470 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3471
3472 * eval.c (is_self_quoting_p): New static function.
3473
3474 (scm_m_quote): Use is_self_quoting_p.
3475
3476 (copy_tree): Corrected typo in comment.
3477
3478 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3479
3480 * eval.c (s_scm_copy_tree): idem.
3481
3482 * list.c (s_scm_filter): remove "pointer" from doc string.
3483
3484 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3485
3486 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3487
3488 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3489 (display_frame): idem.
3490 (display_backtrace_file_and_line): idem.
3491
3492 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3493 arguments.
3494
3495 2004-03-26 Kevin Ryde <user42@zip.com.au>
3496
3497 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3498
3499 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3500 big==0 since that never occurs.
3501
3502 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3503 scm_modular_expt, matching scheme level name `modulo-expt'.
3504
3505 * numbers.c (scm_modular_expt): Return a negative remainder for a
3506 negative divisor, the same as `modulo' does.
3507
3508 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3509
3510 * numbers.c, numbers.h (scm_modular_expt): New function.
3511
3512 2004-03-25 Kevin Ryde <user42@zip.com.au>
3513
3514 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3515 return inexact as required by r5rs.
3516
3517 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3518
3519 * eval.c: Separated some definitions relevant for execution from
3520 the memoization part of the file.
3521
3522 (copy_tree): New static function
3523
3524 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3525 structures are detected now and will lead to an exception instead
3526 of forcing guile to run in an endless loop, using up all the
3527 system's memory. Second, arrays in the cdr of an improper list
3528 are now copied. See the new test cases in eval.test.
3529
3530 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3531
3532 * posix.c (scm_gethostname): Make sure len is initialised before
3533 it is used. Restructured to (hopefully) represent possible
3534 configurations more clearly in the code. Added unwind handler.
3535
3536 2004-03-23 Kevin Ryde <user42@zip.com.au>
3537
3538 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3539 MAXHOSTNAMELEN when available.
3540
3541 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3542
3543 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3544 terminator. Rewritten the logic as a state machine, I must have
3545 been doing too much VHDL lately...
3546
3547 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3548 themselves. Thanks to Han-Wen Nienhuys!
3549
3550 * list.c: Changed docstrings so that they no longer talk about
3551 returning 'pointers' to something.
3552
3553 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3554
3555 * gc.c: remove set_debug_cell_accesses! when
3556 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3557 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3558 debugging conditionally.
3559
3560 2004-03-21 Kevin Ryde <user42@zip.com.au>
3561
3562 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3563
3564 2004-03-20 Kevin Ryde <user42@zip.com.au>
3565
3566 * posix.c (scm_gethostname): Preserve errno across free() call.
3567
3568 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3569
3570 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3571 free cells.
3572
3573 2004-03-14 Kevin Ryde <user42@zip.com.au>
3574
3575 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3576 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3577
3578 2004-03-07 Kevin Ryde <user42@zip.com.au>
3579
3580 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3581 than "GMT" always.
3582 (filltime): Make zname parameter "const".
3583
3584 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3585
3586 * threads.c, threads.h (scm_c_scm2thread): New function.
3587
3588 2004-02-29 Kevin Ryde <user42@zip.com.au>
3589
3590 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3591 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3592 particular don't assume "defined (__alpha__) && ! defined (linux)"
3593 means OSF. Remove "SCO" code, which was not really SCO specific and
3594 which John W. Eaton advises should be long past being needed.
3595
3596 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3597 error throw.
3598
3599 2004-02-24 Kevin Ryde <user42@zip.com.au>
3600
3601 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3602
3603 2004-02-22 Kevin Ryde <user42@zip.com.au>
3604
3605 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3606 complex, same as for two args. (Handle only inum, big, real, frac).
3607
3608 2004-02-21 Kevin Ryde <user42@zip.com.au>
3609
3610 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3611 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3612 Reported by Andreas Voegele.
3613
3614 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3615
3616 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3617 validation.
3618
3619 * read.c (scm_lreadparen): Removed.
3620 (scm_lreadparen1): Renamed scm_i_lreadparen.
3621
3622 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3623
3624 * list.c (scm_list_n): validate non-immediate arguments;
3625 this will catch forgotten a SCM_UNDEFINED.
3626
3627 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3628
3629 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3630 Thanks to Bill Schottstaedt!
3631
3632 * socket.h (scm_gethost): Removed prototype it is already in
3633 "net_db.h". Thanks to Bill Schottstaedt!
3634
3635 2004-02-18 Kevin Ryde <user42@zip.com.au>
3636
3637 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3638 order parameter to mpz_import, in fact with just one word there's no
3639 order to worry about at all.
3640
3641 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3642 and frac==complex, make an exact comparison rather than converting
3643 with fraction2double.
3644
3645 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3646 shared library, since environ is not directly available there.
3647
3648 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3649 standard.
3650
3651 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3652 errno EINVAL in case localtime and gmtime don't set it.
3653 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3654 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3655
3656 2004-02-16 Kevin Ryde <kevin@swox.se>
3657
3658 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3659 which were permitted in the past for these.
3660
3661 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3662 previous change to numbers.c.
3663
3664 * script.c (scm_shell_usage): Print bug-guile email address, as per
3665 GNU standard. Reported by Han-Wen Nienhuys.
3666
3667 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3668
3669 * unif.c (scm_make_uve): Removed local variable and simplified
3670 code in order to avoid compiler used uninitialized warnings.
3671
3672 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3673 scm_hash_map.
3674 (scm_hash_fold): Use scm_call_3 directly in the call to
3675 scm_internal_hash_fold instead of going via fold_proc (which is
3676 now removed).
3677 (scm_hash_for_each): Use a trampoline +
3678 scm_internal_hash_for_each_handle.
3679 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3680 functions.
3681
3682 2004-02-12 Kevin Ryde <user42@zip.com.au>
3683
3684 * ports.c (scm_port_line): In docstring, note first line is 0.
3685 (scm_set_port_line_x): In docstring, note first line is 0.
3686 (scm_port_column): In docstring, there's no default to current input
3687 port, and remove shared port-line @defun.
3688 (scm_set_port_column_x): In docstring, there's no default to current
3689 input port, note first column is 0, remove shared set-port-line!
3690 @defun.
3691
3692 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3693 convert args the same way that array-set! does.
3694
3695 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3696 for dvect.
3697 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3698 for "l" not "s", fix dvect to be false for singp(prot) since such a
3699 value is for fvect.
3700 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3701 (exactly_one_third): New variable.
3702 (scm_init_unif): Initialize it.
3703
3704 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3705
3706 * read.c (scm_read_opts): Change `escaped-parens' to
3707 `elisp-strings'.
3708
3709 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3710
3711 * read.c (scm_read_opts): New opts `elisp-vectors' and
3712 `escaped-parens'.
3713 (s_vector): New.
3714 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3715 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3716 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3717 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3718 `escaped-parens' option set.
3719 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3720 in tokens.
3721 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3722 (scm_lreadparen1): New.
3723
3724 * read.h: Remove conditionally compiled last arg to
3725 scm_lreadparen.
3726 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3727
3728 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3729
3730 * eval.c (m_expand_body): remove stray variable new_body.
3731
3732 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3733
3734 * eval.c (m_expand_body): Rewrite the expression in place (by
3735 overwriting FORMS) also when a letrec is constructed, not only
3736 when no definitions are found. Do not return rewritten expression
3737 to emphasize the in-place rewriting. Changed all users.
3738
3739 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3740
3741 * gc.c: add protected_object_count, a number that is dumped from
3742 gc_stats()
3743
3744 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3745
3746 * dynwind.h, dynwind.c (scm_frame_unwind,
3747 scm_frame_unwind_handler): Renamed and changed all uses.
3748 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3749
3750 2004-01-11 Kevin Ryde <user42@zip.com.au>
3751
3752 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3753 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3754 changes made to scheme-compound.texi.
3755
3756 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3757
3758 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3759 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3760
3761 * guile-snarf.in: Use mkdir to create a unique temporary directory
3762 that we can safely use. Thanks to Stefan Nordhausen!
3763
3764 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3765
3766 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3767 argument since it is always zero now. Changed all callers.
3768 Removed code for handling fluids.
3769
3770 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3771 the wind chain explicitely. Use scm_c_with_fluid for the common
3772 case of only one fluid.
3773 (scm_with_fluid): New.
3774 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3775
3776 * fluids.h, fluids.c (scm_frame_fluid): New.
3777 (scm_with_fluid): New.
3778 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3779
3780 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3781 do the unwinding directly. It is simple enough.
3782
3783 * dynwind.h, dynwind.c: Did the following renamings:
3784 scm_begin_frame -> scm_frame_begin,
3785 scm_end_frame -> scm_frame_end,
3786 scm_on_unwind -> scm_frame_unwind,
3787 scm_on_rewind -> scm_frame_rewind,
3788 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3789 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3790 Changed all uses.
3791
3792 * aync.h, async.c: Did the follwing renamings:
3793 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3794 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3795 Changed all uses.
3796
3797 * ports.h, ports.c: Did the follwing renamings:
3798 scm_with_current_input_port -> scm_frame_current_input_port,
3799 scm_with_current_output_port -> scm_frame_current_output_port,
3800 scm_with_current_error_port -> scm_frame_current_error_port.
3801 Changed all uses.
3802
3803 2004-01-07 Kevin Ryde <user42@zip.com.au>
3804
3805 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3806 Reported by Richard Todd.
3807
3808 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3809 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3810
3811 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3812 traversing the args list, fixes segv if an improper list is given.
3813 Reported by Rouben Rostamian.
3814
3815 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3816
3817 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3818 swap_data on stack, use a 'malloc obj'.
3819
3820 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3821 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3822 scm_i_... since they are internal. Changed all uses.
3823
3824 * dynwind.c (frame_print): Removed, use the default printer.
3825 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3826 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3827 to protect SCM values.
3828
3829 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3830 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3831 Changed all uses.
3832 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3833
3834 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3835
3836 * ports.h, ports.c (scm_with_current_input_port,
3837 scm_with_current_output_port, scm_with_current_error_port): New.
3838
3839 * async.h, async.c (scm_with_blocked_asyncs,
3840 scm_with_unblocked_asyncs): New.
3841
3842 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3843
3844 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3845 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3846 New.
3847 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3848 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3849 function when the outermost wind point has been reached. The
3850 latter is used to copy a continuation stack at the right time.
3851 scm_dowinds remains available.
3852 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3853 tc16_guard, guards_print): Removed.
3854 (scm_internal_dynamic_wind): Reimplemented using frames.
3855
3856 * continuations.c (copy_stack): New, do only the stack copying
3857 part of copy_stack_and_call.
3858 (copy_stack_and_call): Copy the stack after unwinding and before
3859 rewinding.
3860 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3861 copy_stack_and_call.
3862
3863 2004-01-04 Kevin Ryde <user42@zip.com.au>
3864
3865 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3866 can give bad results due to rounding.
3867
3868 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3869 setzone/restorezone protection for DOS.
3870
3871 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3872
3873 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3874 and scm_t_uintmax to be defined in scmconfig.h
3875
3876 2003-12-03 Kevin Ryde <user42@zip.com.au>
3877
3878 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3879
3880 * numbers.c (scm_make_ratio): Check for numerator equal to
3881 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3882 giving integer -1.
3883
3884 * numbers.c (scm_real_part): Return fraction unchanged rather than
3885 converting to flonum.
3886
3887 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3888
3889 * modules.c (module_variable): Fixed (and thus simplified) the
3890 definition of SCM_BOUND_THING_P to reflect the fact that since
3891 after the 1.4 series of guile, obarrays only hold variable
3892 objects.
3893
3894 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3895
3896 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3897
3898 From Paul Jarc:
3899
3900 * read.c (scm_lreadr): Signal an error for invalid escape
3901 sequences in strings. Code cleanups too.
3902
3903 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3904 writing control characters in strings.
3905
3906 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3907
3908 * ports.c (scm_drain_input): Bug fix: only access the port after
3909 checking that it indeed is one.
3910
3911 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3912
3913 * eval.c (s_bad_define): New static identifier.
3914
3915 (m_body): Fixed comment.
3916
3917 (scm_m_define): Don't generate memoized code for definitions that
3918 are not on the top level. As a consequence, no memoized code at
3919 all is generated for definitions any more: Top level definitions
3920 are executed immediately during memoization and internal
3921 definitions are handled separately in m_expand_body.
3922
3923 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3924 definitions. Consequently, there is no unmemoizing code any more
3925 that might modify the environment. Thus, the old scm_unmemocopy
3926 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3927
3928 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3929 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3930 over SCM_NIMP in places, where the argument is known to be part of
3931 a proper list.
3932
3933 2003-11-21 Kevin Ryde <user42@zip.com.au>
3934
3935 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3936 for bignums.
3937
3938 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3939 to share some shifting.
3940
3941 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3942 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3943 since gc does this.
3944
3945 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3946
3947 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3948 structure. Previously, not all cases with a negative denominator
3949 were covered.
3950
3951 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3952 scm_divide2real when forming the fractional part. This allows
3953 "#e1.2" to yield 6/5.
3954
3955 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3956 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3957 fractions were equal to each other regardless of value. Ooops.
3958
3959 * numbers.c (scm_rationalize): Return an inexact result when given
3960 inexact arguments.
3961
3962 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3963 non-numbers.
3964
3965 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3966
3967 Support for exact fractions from Bill Schottstaedt! Thanks!
3968
3969 * print.c (scm_iprin1): Handle fractions.
3970
3971 * objects.h (scm_class_fraction): New.
3972 * objects.c (scm_class_fraction): New.
3973 (scm_class_of): Handle fractions.
3974
3975 * hash.c (scm_hasher): Handle fractions.
3976
3977 * numbers.c: New code for handling fraction all over the place.
3978 (scm_odd_p, scm_even_p): Handle inexact integers.
3979 (scm_rational_p): New function, same as scm_real_p.
3980 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3981 New exact functions that replace the inexact 'dsubr'
3982 implementations.
3983 (scm_numerator, scm_denominator): New.
3984
3985 * numbers.h (SCM_NUMP): Recognize fractions.
3986 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3987 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3988 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3989 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3990 SCM_FRACTION_REDUCED): New.
3991 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3992 New prototypes.
3993 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3994 scm_rational_p): New prototypes.
3995 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3996 scm_i_print_fraction): New prototypes.
3997
3998 * goops.c (create_standard_classes): Create "<fraction>" class.
3999
4000 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
4001
4002 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
4003 case in the switch, but do nothing for now.
4004
4005 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
4006 to doubles when calling 'dsubr' functions.
4007
4008 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
4009
4010 2003-11-18 Rob Browning <rlb@defaultvalue.org>
4011
4012 * gen-scmconfig.c (main): remove public definition of
4013 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
4014 direct typedef of long_long and ulong_long inside deprecated block
4015 when appropriate.
4016
4017 * deprecated.h: move long_long and ulong_long definitions to
4018 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
4019 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
4020
4021 2003-11-17 Marius Vollmer <mvo@zagadka.de>
4022
4023 * hash.c (scm_string_hash): New hashing algorithm that takes the
4024 complete string into account.
4025
4026 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
4027 is a list. This allows (@ ...) to work with set!.
4028 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
4029 SCM_ASSYNT.
4030
4031 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
4032 the "-e" option instead of scm_str2symbol. This allows things
4033 like (@ ...) to be specified for the entry point.
4034
4035 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4036
4037 * eval.c (scm_m_letstar): Create memoized code in place to
4038 minimize consing.
4039
4040 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4041
4042 * eval.c (s_splicing): Commented and reformulated.
4043
4044 (lookup_global_symbol, lookup_symbol): New static functions.
4045
4046 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
4047
4048 (try_macro_lookup, literal_p): Use lookup_symbol instead of
4049 creating a temporary pair for scm_lookupcar.
4050
4051 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
4052 created deprecated wrapper function scm_unmemocar.
4053
4054 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
4055 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
4056 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
4057 undefineds, sym_three_question_marks): Moved around without
4058 modifications.
4059
4060 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
4061
4062 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4063
4064 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
4065 m_expand_body, scm_m_expand_body): Grouped together with m_body.
4066 No further modifications.
4067
4068 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
4069
4070 * eval.c (s_mixed_body_forms): New static identifier.
4071
4072 (canonicalize_define, scm_m_define): The check for a bad
4073 expression is performed in canonicalize_define now.
4074
4075 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
4076 static helper functions for m_expand_body.
4077
4078 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
4079 expand user defined macros. Fixed handling of the definition/
4080 expression boundary. Fixed handling of definitions grouped with
4081 'begin. Use canonicalize_define to expand definitions.
4082
4083 2003-11-13 Marius Vollmer <mvo@zagadka.de>
4084
4085 * read.c (scm_lreadr): detect EOF after backslash, and interpret
4086 \xNN hexadecimal sequences. From Paul Jarc, thanks!
4087
4088 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
4089 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
4090 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
4091 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
4092 New macros from Paul Jarc. Thanks!
4093
4094 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
4095 return NULL when the machine type is unknown. Previously,
4096 gc_os_dep.c would refuse to compile.
4097
4098 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4099
4100 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
4101 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
4102 scm_m_body to m_body.
4103
4104 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
4105
4106 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
4107 public use of scm_m_expand_body in eval.h. In eval.c, renamed
4108 scm_m_expand_body to m_expand_body and made it static. Added
4109 deprecated wrapper scm_m_expand_body.
4110
4111 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
4112 of scm_m_expand_body.
4113
4114 2003-11-09 Kevin Ryde <user42@zip.com.au>
4115
4116 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
4117 argument. Reported by Mike Gran.
4118
4119 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4120
4121 * eval.c (s_missing_body_expression): New static identifier.
4122
4123 (s_body): Removed.
4124
4125 (scm_m_expand_body): Fixed core dump when passing a body with
4126 defines, but without expressions (see additions to syntax.test).
4127 Use ASSERT_SYNTAX to signal syntax errors.
4128
4129 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4130
4131 * eval.c (canonicalize_define): New static helper function.
4132
4133 (memoize_define, canonicalize_define): Extract handling of
4134 function currying to canonicalize_define.
4135
4136 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4137
4138 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4139 Make sure that error checking in debug mode is not worse than in
4140 standard mode.
4141
4142 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4143
4144 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
4145 handled in scm_m_body any more, but rather in scm_m_lambda.
4146
4147 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
4148 scm_m_letrec, scm_m_expand_body): Check for validity is done by
4149 calling functions of scm_m_body.
4150
4151 (scm_m_lambda): Avoid unnecessary consing when creating the
4152 memoized code.
4153
4154 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4155
4156 * eval.c (s_expression): Added comment.
4157
4158 (s_empty_combination, error_unbound_variable): New static
4159 identifiers.
4160
4161 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
4162 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
4163 signal syntax errors.
4164
4165 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
4166 scheme objects.
4167
4168 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4169
4170 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
4171 Grouped together with unmemocopy, without modifications.
4172
4173 (build_binding_list, unmemocopy): Renamed names of list arguments
4174 and variables to reflect the actual order of the list elements.
4175
4176 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4177
4178 * eval.c (s_defun): New static identifier.
4179
4180 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
4181 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4182 when creating the memoized code.
4183
4184 2003-10-19 Kevin Ryde <user42@zip.com.au>
4185
4186 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
4187
4188 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
4189 in accordance with R5RS, which just mpz_get_d doesn't really give.
4190
4191 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4192
4193 * eval.c (s_bad_slot_number): New static identifier.
4194
4195 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
4196 signal syntax errors. Avoid unnecessary consing when creating the
4197 memoized code.
4198
4199 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4200
4201 * eval.c (scm_m_cont, scm_m_at_call_with_values,
4202 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
4203 errors. Avoid unnecessary consing when creating the memoized
4204 code.
4205
4206 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
4207 standard case. Make sure line and file information are copied to
4208 every created expression.
4209
4210 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4211
4212 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
4213 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
4214 when creating the memoized code.
4215
4216 (scm_m_atbind): Reversed the order, in which the init expressions
4217 are stored and executed. The order of execution is now equal to
4218 the order in which the initializers of the let-forms are executed.
4219 Use check_bindings and transform_bindings.
4220
4221 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
4222 !SCM_NULLP. Added some comments.
4223
4224 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4225
4226 * eval.c: Sorted include files alphabetically.
4227
4228 (scm_m_begin): Added comment.
4229
4230 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4231 unnecessary consing when creating the memoized code.
4232
4233 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
4234 syntax errors. Be more specific about the kind of error that was
4235 detected.
4236
4237 (scm_m_quote, unmemocopy): As an optimization, vector constants
4238 are now inserted unquoted into the memoized code. During
4239 unmemoization the quotes are added again to provide syntactically
4240 correct code.
4241
4242 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4243
4244 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
4245 scm_m_expand_body, check_bindings): Extracted syntax checking of
4246 bindings to new static function check_bindings.
4247
4248 (scm_m_let, memoize_named_let): Extracted handling of named let to
4249 new static function memoize_named_let.
4250
4251 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
4252 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
4253 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
4254 unnecessary consing when creating the memoized code.
4255
4256 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4257
4258 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4259 static identifiers.
4260
4261 (s_clauses, s_formals, s_duplicate_formals): Removed.
4262
4263 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
4264 specific about the kind of error that was detected. Prepare for
4265 easier integration of changes for separated memoization.
4266
4267 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4268
4269 * eval.c (s_duplicate_binding): New static identifier.
4270
4271 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4272
4273 (scm_m_define): Added comment about how we check for duplicate
4274 formals.
4275
4276 (scm_m_do): Added check for duplicate bindings.
4277
4278 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4279 unnecessary consing when creating the memoized code.
4280
4281 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4282 scm_c_improper_memq to c_improper_memq, since it is not exported.
4283
4284 (transform_bindings): Call scm_c_memq rather than
4285 scm_c_improper_memq.
4286
4287 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4288
4289 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4290
4291 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4292 static identifiers.
4293
4294 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4295 specific about the kind of error that was detected. Avoid use of
4296 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4297 code, this way also making sure that file name, line number
4298 information etc. remain available.
4299
4300 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4301
4302 * eval.c (memoize_as_thunk_prototype): New static function.
4303
4304 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4305 Avoid unnecessary consing when creating the memoized code.
4306
4307 2003-10-12 Kevin Ryde <user42@zip.com.au>
4308
4309 * list.c (scm_append): Track argument number and use in error.
4310
4311 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4312
4313 * eval.c (s_missing_expression, s_bad_variable): New static
4314 identifiers.
4315
4316 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4317 R5RS terminology for the naming of variables. Be more specific
4318 about the kind of error that was detected. Make sure file name,
4319 line number etc. are added to all freshly created expressions.
4320 Avoid unnecessary consing when creating the memoized code.
4321
4322 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4323
4324 * eval.c (s_extra_expression, s_misplaced_else_clause,
4325 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4326
4327 (s_extra_case_clause): Removed.
4328
4329 (scm_m_case, scm_m_cond): If a clause appears after an else
4330 clause, report a misplaced else clause.
4331
4332 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4333 specific about the kind of error that was detected. Handle bound
4334 'else and '=>. Avoid unnecessary consing when creating the
4335 memoized code.
4336
4337 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4338 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4339 syntactic keyword '=>.
4340
4341 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4342
4343 * eval.c (scm_m_case): Allow empty lists of case labels.
4344
4345 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4346
4347 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4348
4349 * print.c (scm_isymnames): Add names for the new memoizer codes.
4350
4351 * eval.c (s_missing_clauses, s_bad_case_clause,
4352 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4353 literal_p): New static identifiers.
4354
4355 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4356 specific about the kind of error that was detected. Check for
4357 duplicate case labels. Handle bound 'else. Avoid unnecessary
4358 consing when creating the memoized code.
4359
4360 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4361 the syntactic keyword 'else.
4362
4363 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4364
4365 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4366 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4367
4368 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4369 unnecessary consing when creating the memoized code.
4370
4371 2003-10-09 Kevin Ryde <user42@zip.com.au>
4372
4373 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4374 cast gives for values bigger than a long, or for nan or inf.
4375
4376 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4377
4378 * smob.h (scm_make_smob_type): Made the declaration match the
4379 definition.
4380
4381 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4382
4383 * goops.c, objects.h, smob.c, smob.h: Make type names char
4384 const * instead of char *. Thanks to Paul Jarc!
4385
4386 2003-10-02 Kevin Ryde <user42@zip.com.au>
4387
4388 * strports.c (scm_call_with_output_string): scm_get_output_string
4389 rather than scm_strport_to_string, so as to guard against the port
4390 having been closed by the called procedure. Reported by Nic Ferrier.
4391
4392 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4393
4394 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4395
4396 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4397 tags.h to deprecated.h.
4398
4399 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4400
4401 This set of patches introduces a new tc7 code scm_tc7_number for
4402 numbers. Bignums, reals and complex numbers are turned from smobs
4403 into subtypes of scm_tc7_number.
4404
4405 * tags.h (scm_tc7_number): New.
4406
4407 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4408 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4409 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4410 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4411 (scm_class_of), print.c (scm_iprin1), smob.c
4412 (scm_smob_prehistory): Don't handle bignums, reals and complex
4413 numbers as subtypes of scm_tc7_smob any more.
4414
4415 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4416 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4417
4418 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4419
4420 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4421 sizeof (scm_t_complex) to determine the memory size of the
4422 malloc'd area for complex numbers.
4423
4424 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4425
4426 * numbers.c (scm_bigequal): Fixed.
4427
4428 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4429
4430 * stime.c (scm_current_time): 'time' does not set errno so don't
4431 use SCM_SYSERROR for reporting errors.
4432
4433 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4434
4435 This set of patches eliminates the dependency between the
4436 implementation of evaluator specific memoization codes and special
4437 constants like #f, '() etc. ('flags'), which are not evaluator
4438 specific. The goal is to remove definitions of evaluator
4439 memoization codes completely from the public interface. This will
4440 make it possible to experiment more freely with optimizations of
4441 guile's internal representation of memoized code.
4442
4443 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4444
4445 * print.c (iflagnames): New array, holding the printed names of
4446 guile's special constants ('flags').
4447
4448 (scm_isymnames): Now holds only the printed names of the
4449 memoization codes.
4450
4451 (scm_iprin1): Separate the handling of memoization codes and
4452 guile's special constants.
4453
4454 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4455 SCM_IFLAGNUM): new
4456
4457 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4458 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4459 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4460 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4461 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4462 values.
4463
4464 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4465
4466 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4467 tc9 macros and scm_tc9_flag.
4468
4469 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4470
4471 * posix.c (scm_setgroups): Check that the gid list is not too
4472 long. Thanks to Paul Jarc!
4473
4474 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4475
4476 * tags.h: Reduced the number of short instructions from 14 to 13.
4477 The typecode of the former 14th short instruction is now used to
4478 represent long instructions. Changed some comments to reflect
4479 this fact.
4480
4481 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4482 previously used by SCM_IM_DEFINE.
4483
4484 (SCM_IM_DEFINE): Turned into a long instruction.
4485
4486 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4487 instruction.
4488
4489 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4490 code that is separate from all instructions, one level of dispatch
4491 for long instructions can be eliminated.
4492
4493 * print.c (scm_isymnames): Removed some commented code.
4494
4495 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4496
4497 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4498 compiler on IA64.
4499
4500 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4501
4502 * modules.c (scm_module_reverse_lookup): Check that the obarray
4503 really is a hashtable and do nothing if not.
4504
4505 * inline.h: Use "extern inline" only with GCC. Use "static
4506 inline" else.
4507
4508 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4509
4510 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4511 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4512
4513 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4514 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4515 deprecated.h.
4516
4517 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4518
4519 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4520 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4521
4522 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4523 0.0==some_expression to some_expression==0.0. The latter is
4524 better readable. The former is preferred by some people, since it
4525 leads to a compiler error when confusing == with =. However, when
4526 using gcc, a warning will be issued if in an if-statement an
4527 assigment appears. Since many Guile developers are using gcc,
4528 such errors will not remain unnoticed anyway. We can therefore
4529 focus on better readability.
4530
4531 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4532
4533 * tags.h: Added description of Guile's type system. Removed some
4534 old and misleading comments.
4535
4536 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4537
4538 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4539 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4540
4541 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4542
4543 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4544
4545 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4546 respective SLOPPY macro.
4547
4548 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4549
4550 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4551 type string, not SCM_TYP7S.
4552
4553 2003-09-03 Kevin Ryde <user42@zip.com.au>
4554
4555 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4556 2s-complement.
4557
4558 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4559 current timezone requiring SCM_DEFER_INTS.
4560
4561 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4562
4563 * script.c (scm_compile_shell_switches): Make -s switch optional
4564 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4565 VanDevender for the patch!)
4566
4567 2003-08-30 Kevin Ryde <user42@zip.com.au>
4568
4569 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4570 and to have non-integer types rejected as per other logical funcs.
4571
4572 2003-08-28 Kevin Ryde <user42@zip.com.au>
4573
4574 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4575
4576 2003-08-23 Kevin Ryde <user42@zip.com.au>
4577
4578 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4579 thread safe, and could take a long time too.
4580
4581 2003-08-22 Kevin Ryde <user42@zip.com.au>
4582
4583 * numbers.c (scm_difference): Correction to bignum - negative inum.
4584
4585 2003-08-14 Kevin Ryde <user42@zip.com.au>
4586
4587 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4588 [__GNUC__]: Use volatile asm macros rather than a function call.
4589 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4590 macros while defining functions.
4591
4592 * simpos.c (getenv): Use <stdlib.h> for prototype.
4593 (scm_system): In docstring, refer to status:exit-val rather than
4594 "functions above".
4595
4596 2003-08-09 Kevin Ryde <user42@zip.com.au>
4597
4598 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4599 list set by source-properties! rather than an SRCPROPS object,
4600
4601 2003-07-29 Kevin Ryde <user42@zip.com.au>
4602
4603 * properties.c (scm_primitive_property_ref): In docstring, note
4604 parameters to not-found-proc, use hyphens rather than underscores for
4605 that parameter name.
4606 (scm_primitive_property_set_x): In docstring, VAL is the value
4607 parameter not CODE.
4608
4609 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4610
4611 * print.c (scm_print_symbol_name): handle more weird characters by
4612 escaping the symbol name properly. Thanks to Paul Jarc!
4613
4614 * posix.h (scm_setgroups): New prototype.
4615 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4616 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4617 Don't use SCM_WRITABLE_VELTS.
4618
4619 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4620 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4621 Matthias Koeppe!
4622
4623 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4624 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4625 compiles when SCM_C_INLINE is undefined.
4626
4627 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4628
4629 * __scm.h: Reformulated the architecture and compiler properties
4630 in terms of properties of scm_t_bits and SCM variables rather than
4631 in terms of c standard types. This is since it is not known which
4632 of the standard types scm_t_bits and SCM variables will be defined
4633 to.
4634
4635 2003-07-24 Kevin Ryde <user42@zip.com.au>
4636
4637 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4638 and real.
4639
4640 2003-07-18 Kevin Ryde <user42@zip.com.au>
4641
4642 * numbers.c (scm_product): In complex * bignum, correction to
4643 REAL/IMAG fetch, x is the complex, not y.
4644
4645 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4646
4647 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4648 scm_inf_p test as Scheme values.
4649 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4650 and a positive inum.
4651 Use GNU indentation style.
4652
4653 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4654
4655 * values.c (scm_values): Build lists of length 1 by using
4656 scm_list_1 instead of using scm_cons.
4657
4658 2003-07-10 Kevin Ryde <user42@zip.com.au>
4659
4660 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4661 * list.c (scm_list_n): Ditto.
4662
4663 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4664
4665 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4666
4667 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4668 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4669 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4670 the other using intptr_t.
4671
4672 2003-07-08 Kevin Ryde <user42@zip.com.au>
4673
4674 * numbers.c (scm_make_polar): Use sincos, when available.
4675 (scm_magnitude): Use hypot.
4676
4677 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4678 @footnote since it doesn't go through to guile-procedures.txt.
4679
4680 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4681 outside @var to quieten makeinfo, and use @code.
4682
4683 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4684
4685 * gc-malloc.c (decrease_mtrigger): new function
4686 (increase_mtrigger): new function, separate debug registering and
4687 mtrigger administration.
4688 (scm_gc_realloc): bugfix: do mtrigger administration before the
4689 actual realloc, for the realloc might invalidate a GC-d segment of
4690 memory. Thanks to Sam Hocevar for pointing this out.
4691 (scm_gc_realloc): use scm_malloc_reregister instead of
4692 unregistering and registering in sequence.
4693
4694 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4695
4696 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4697
4698 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4699
4700 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4701 clauses.
4702
4703 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4704
4705 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4706 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4707 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4708 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4709 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4710 the release_1_6 branch.
4711
4712 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4713
4714 * continuations.c: Redeclaration of getcontext() via the
4715 __asm__ ("getcontext") directive.
4716
4717 * continuations.h: Include <ucontext.h> instead of
4718 <sys/ucontext.h>.
4719
4720 2003-06-21 Kevin Ryde <user42@zip.com.au>
4721
4722 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4723 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4724 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4725 available.
4726 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4727 (isfinite): Remove, conflicts with C99 isfinite().
4728
4729 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4730
4731 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4732 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4733 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4734 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4735 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4736 the release_1_6 branch.
4737
4738 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4739
4740 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4741 to be functions instead of macros.
4742
4743 * threads.c: Conditionalized inclusion of <sys/time.h> and
4744 <unistd.h>.
4745 (scm_getspecific, scm_setspecific): Made these two function
4746 real part of the API.
4747
4748 * posix.c (s_scm_putenv): Added some code to make a
4749 (putenv "FOO="), i.e. setting an empty string, work also on
4750 Win32 systems. Thanks to Kevin Ryde for the proposal.
4751
4752 2003-06-12 Kevin Ryde <user42@zip.com.au>
4753
4754 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4755 freebsd to comment about need to use unsetenv.
4756
4757 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4758
4759 * ports.c (scm_peek_char): Safe the column of the port around the
4760 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4761
4762 2003-06-07 Kevin Ryde <user42@zip.com.au>
4763
4764 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4765 and friends required by scm_t_bits setups.
4766
4767 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4768
4769 * tags.h (scm_tc2_int): Added.
4770
4771 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4772 scm_tc2_int.
4773
4774 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4775 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4776
4777 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4778
4779 * eval.c: Partially undid my patch from 2003-05-31. This patch
4780 caused the segfault referenced in the previous changelog entry.
4781
4782 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4783
4784 * tags.h: Fixed comment about the immediate type code layout.
4785
4786 * eval.c: Fixed handling of non-special instructions. Without
4787 this patch, guile will segfault on (#\0) and similar instructions.
4788
4789 2003-06-05 Kevin Ryde <user42@zip.com.au>
4790
4791 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4792 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4793
4794 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4795 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4796
4797 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4798
4799 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4800 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4801 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4802 generalized it to apply not only to C level functions but also to
4803 scheme level functions.
4804
4805 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4806 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4807 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4808 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4809 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4810 respectively.
4811
4812 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4813 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4814 eval.h into eval.c and a copy is placed into deprecated.h.
4815
4816 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4817 into eval.c. This definition was not part of the API in any
4818 officially released version of guile and thus does not need to go
4819 through a phase of deprecation.
4820
4821 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4822
4823 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4824 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4825 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4826 definitions are make static and renamed from scm_s_xxx to s_xxx.
4827 In deprecated.c the original definitions are copied.
4828
4829 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4830 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4831 eval.h into eval.c and a copy (slightly modified to work in user
4832 code) is placed into deprecated.h.
4833
4834 * eval.c: Use the local static s_xxx definitions instead of the
4835 scm_s_xxx definitions throughout.
4836
4837 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4838
4839 This set of patches separates the representation of the cxr family
4840 of functions (car, cdr etc.) from the dsubr family of functions
4841 (i. e. functions that take a double precision floating point
4842 argument). Further, the algorithm for handling the cxr function
4843 is improved.
4844
4845 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4846 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4847 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4848 cosh, tanh), objects.c (scm_class_of), procprop.c
4849 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4850 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4851 typecode for the dsubr family of functions.
4852
4853 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4854 ramap_dsubr.
4855
4856 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4857 (scm_init_pairs): Make use of the (now usable) second cell element
4858 of a scm_tc7_cxr function to implement the cxr family of functions
4859 more efficiently.
4860
4861 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4862
4863 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4864 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4865 end of an if-else-if-sequence of checks.
4866
4867 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4868
4869 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4870 execution. Generalize apply_closure to apply_proc and use that
4871 for call-with-values.
4872
4873 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4874
4875 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4876 a non closure.
4877
4878 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4879
4880 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4881 appropriately for mingw32 hosts.
4882
4883 * numbers.h: Defining copysign(), isnan() and finite() to
4884 be prefixed by a single '_' for mingw32 hosts.
4885
4886 2003-05-30 Kevin Ryde <user42@zip.com.au>
4887
4888 * numbers.c (z_negative_one): New variable.
4889 (scm_init_numbers): Initialize it.
4890 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4891
4892 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4893
4894 * win32-dirent.c: Use malloc() instead of scm_malloc().
4895
4896 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4897 warning.
4898
4899 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4900 mingw32 build.
4901
4902 * modules.c (s_scm_module_import_interface): Renamed local
4903 variable interface to _interface. Seems like 'interface'
4904 is a special compiler directive for the mingw32 compiler.
4905
4906 * mkstemp.c: Provide prototype to avoid compiler warning.
4907
4908 * load.c (s_scm_search_path): Fixed absolute and relative
4909 path detections for native Windows platforms.
4910
4911 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4912 to build on mingw32).
4913
4914 * gc-freelist.c ("s_scm_map_free_list",
4915 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4916
4917 * fports.c (fport_fill_input): Disable use of
4918 fport_wait_for_input() on Win32 platforms.
4919
4920 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4921
4922 * Makefile.am: Modified some rules for cross compiling.
4923
4924 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4925
4926 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4927 proper function object and the correct number of arguments are now
4928 performed in the application part of SCM_CEVAL.
4929
4930 (scm_badformalsp): Removed.
4931
4932 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4933
4934 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4935
4936 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4937
4938 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4939 always being false by inserting preprocessor conditional. (Thanks
4940 to Bruce Korb.)
4941
4942 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4943 (void *) in order to avoid an aliasing warning; thanks to Bruce
4944 Korb.)
4945
4946 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4947
4948 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4949 SCM_STACK_PTR.
4950
4951 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4952 thread->base --> t->base.
4953
4954 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4955
4956 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4957
4958 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4959 scm_variable_set_name_hint, scm_builtin_variable,
4960 scm_internal_with_fluids, scm_make_gsubr,
4961 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4962 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4963 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4964 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4965 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4966 scm_make_subr_with_generic, scm_make_subr_opt,
4967 scm_call_catching_errors, scm_make_smob_type_mfpe,
4968 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4969 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4970 branch. Some have been slightly rewritten.
4971 (scm_i_object_chars, scm_i_object_length): New, to support
4972 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4973
4974 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4975
4976 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4977 names and inits in the memoized code of do.
4978
4979 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4980
4981 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4982 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4983 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4984 a compilation error if error-on-warning is enabled).
4985
4986 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4987
4988 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4989 removes preprocessor directives from the snarfage that might
4990 otherwise confuse us. These directives appear when compiling with
4991 "-g3", for example.
4992
4993 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4994
4995 * ChangeLog: add my surname
4996
4997 * srcprop.c (scm_finish_srcprop): use
4998 scm_gc_register_collectable_memory()
4999 (scm_make_srcprops): idem.
5000
5001 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5002
5003 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
5004 wrap-around for scm_mtrigger
5005 (scm_gc_register_collectable_memory): abort on overflowing
5006 scm_mallocated().
5007
5008 2003-05-13 Kevin Ryde <user42@zip.com.au>
5009
5010 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
5011 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
5012
5013 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5014
5015 * backtrace.c (scm_display_error_message): Introduced fancy
5016 printing with max level 7 and length 10. (Purpose: avoid printing
5017 gigantic objects in error messages.)
5018
5019 * print.c, print.h (scm_i_port_with_print_state): New function.
5020
5021 * print.c (scm_iprin1, scm_printer_apply,
5022 scm_port_with_print_state): Use scm_i_port_with_print_state.
5023 (scm_simple_format): Modified not to destroy print states.
5024 (print_state_mutex): New mutex.
5025 (scm_make_print_state, scm_free_print_state, scm_prin1):
5026 Lock/unlock print_state_mutex.
5027
5028 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
5029 Use current names in definitions.
5030
5031 2003-05-10 Kevin Ryde <user42@zip.com.au>
5032
5033 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
5034
5035 * numbers.c (scm_integer_length): On negative bignums, adjust
5036 mpz_sizeinbase to account for it looking at absolute value where we
5037 want ones-complement.
5038
5039 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
5040 since we're only using the ulong return value, and x might not fit.
5041
5042 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5043
5044 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
5045 read. This will allow to make the definition in read.c static.
5046
5047 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5048
5049 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
5050 from evalext to eval. This will allow to make some of the
5051 definitions in eval.c static.
5052
5053 2003-05-06 Kevin Ryde <user42@zip.com.au>
5054
5055 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
5056 (scm_logcount): Use mpz_com, not mpz_neg.
5057
5058 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5059
5060 The purpose of this patch is to make guile's internal memoizers
5061 distinguishable from memoizing macros created on the scheme level
5062 or from user provided primitive memoizing macros. The reason is,
5063 that the internal memoizers are the only ones that are allowed to
5064 transform their scheme input into memoizer byte code, while all
5065 other memoizing macros may only transform scheme code into new
5066 scheme code.
5067
5068 To achieve this, a new macro type 'builtin-macro!' is introduced.
5069 Currently, 'builtin-macro!'s are handled as memoizing macros, but
5070 this will change when the memoizer and executor are separated.
5071
5072 * macros.[ch] (scm_i_makbimacro): New.
5073
5074 * macros.h (SCM_BUILTIN_MACRO_P): New.
5075
5076 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
5077
5078 * eval.c, goops.c: All of guile's primitive memoizing macros are
5079 primitive builtin-macros now.
5080
5081 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
5082 builtin-macros are handled equally to memoizing macros.
5083
5084 2003-05-04 Marius Vollmer <mvo@zagadka.de>
5085
5086 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
5087 work around a bug in GCC 2.95.2 but is now a bug in itself.
5088
5089 2003-05-02 Marius Vollmer <mvo@zagadka.de>
5090
5091 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
5092 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
5093 scm_tcs_symbols): New.
5094
5095 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5096
5097 * deprecated.h, deprecated.c (scm_protect_object,
5098 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
5099 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
5100 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
5101 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
5102 scm_ensure_user_module, scm_load_scheme_module, scm_port,
5103 scm_ptob_descriptor, scm_port_rw_active,
5104 scm_close_all_ports_except): New.
5105
5106 * ports.c (scm_c_port_for_each): New function, mostly copied from
5107 scm_port_for_each.
5108 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
5109 * ports.h (scm_c_port_for_each): New prototype.
5110
5111 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5112
5113 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
5114 macro was introduced in anticipation of GOOPS method compilation
5115 code.)
5116
5117 * goops.c: Removed binding of @dispatch.
5118
5119 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
5120
5121 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
5122 instructions that bind the macros on the scheme level back to
5123 goops.c in order to make sure again that the bindings go into the
5124 (oop goops) module and are not visible from the outside.
5125
5126 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5127
5128 * eval.c: Non functional change: Separated R5RS and non-R5RS
5129 macros into different sections of the file and ordered the
5130 memoizers alphabetically.
5131
5132 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5133
5134 * eval.c (scm_ilookup): Rewritten to improve readability.
5135
5136 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
5137
5138 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5139 Partially reverted patch from 2003-04-23 in oder to find a better
5140 compromise between readability and debuggability.
5141
5142 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5143
5144 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
5145 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
5146 definitions of the special goops memoizers from goops.[ch] to
5147 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
5148 throughout guile.
5149
5150 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5151
5152 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
5153
5154 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
5155
5156 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
5157
5158 * ioext.c (scm_fdes_to_ports): Ditto.
5159
5160 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
5161 lock/unlock scm_i_port_table_mutex.
5162
5163 * strports.c (scm_mkstrport): Ditto.
5164
5165 * ports.c (scm_void_port, scm_port_for_each): Ditto.
5166
5167 * fports.c (scm_fdes_to_port): Ditto.
5168
5169 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5170
5171 This set of patches contains no functional changes, only debatable
5172 minor stylistic ones. Still, in order to prepare a patch between
5173 my local copy and the CVS version, I decided to submit the changes
5174 below. Then, the patch will hopefully only contain relevant
5175 modifications :-)
5176
5177 * eval.c (iqq): Added const specifier.
5178
5179 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5180 Use NULL instead of 0 to indicate that a pointer is returned.
5181 Removed some misleading 'fall through' comments.
5182
5183 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
5184 Split up long expressions into smaller ones to be more debugging
5185 friendly.
5186
5187 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5188
5189 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
5190 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
5191 rather than casting to SCM.
5192
5193 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5194
5195 * sort.c, pairs.h: Removed unnecessary includes.
5196
5197 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
5198
5199 * sort.c: Replaced hand-made trampline code by the new official
5200 mechanism from eval.c. This fixes a segfault in the new test file
5201 sort.test.
5202
5203 (quicksort, compare_function, scm_restricted_vector_sort_x,
5204 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
5205 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
5206 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
5207 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
5208 eval.c.
5209
5210 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
5211 cmp_fun_t): Removed.
5212
5213 (compare_function): Added.
5214
5215 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
5216 arithmetics with index arithmetics. Changed quicksort to work on
5217 an array of SCM values instead of an array of characters. Avoid
5218 bytewise copying of SCM elements. Avoid allocating memory on the
5219 stack with alloca. Fixed some comments.
5220
5221 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5222
5223 * eval.c (EXTEND_ENV): Eliminated.
5224
5225 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
5226 EXTEND_ENV.
5227
5228 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5229
5230 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
5231
5232 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
5233 compiling with SCM_DEBUG==1 by moving definition behind prototype.
5234
5235 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
5236 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
5237 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
5238 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
5239 functions such that they check if the object is a non-immediate.
5240 Further, renamed identifiers to use the scm_dbg_ prefix and made
5241 their inclusion into the lib dependent of the
5242 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
5243
5244 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5245
5246 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
5247 debug option.
5248
5249 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5250
5251 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
5252 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
5253 any calls to SCM_NCONSP any more.
5254
5255 * unif.c (l2ra): Eliminate redundant check.
5256
5257 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5258
5259 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
5260 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
5261 SCM_NNULLP. Now, guile itself does not include any calls to
5262 SCM_NNULLP any more.
5263
5264 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5265
5266 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
5267 scm_copy_tree): Place assignment expressions which are part of
5268 other expressions into an expression of their own.
5269
5270 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
5271
5272 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5273 compare SCM values with !=.
5274
5275 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5276
5277 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5278 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5279 and definition of the memoizer for the generalized set! macro from
5280 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5281 define the macro object.
5282
5283 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5284 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5285 eval.c, it is made static and renamed to s_set_x.
5286
5287 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5288 over SCM_N<foo>.
5289
5290 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5291
5292 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5293 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5294 to undefineds and registered the object as a permanent object.
5295
5296 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5297 static in eval.c, renamed it to f_apply and registered the object
5298 as a permanent object.
5299
5300 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5301
5302 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5303 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5304
5305 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5306
5307 * numbers.c (scm_logtest): Fixed argument bug in the call to
5308 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5309
5310 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5311
5312 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5313 type errors that showed up when compiling with SCM_DEBUG defined.
5314
5315 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5316
5317 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5318 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5319 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5320 fix compile errors with --disable-deprecated.
5321
5322 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5323
5324 * numbers.c (scm_integer_expt): fix case where we were declaring
5325 vars in the middle of a statement block. Thanks to Thamer
5326 Al-Harbash.
5327
5328 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5329
5330 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5331 change.
5332
5333 * eq.c (scm_eqv_p): Turned into a primitive generic.
5334
5335 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5336
5337 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5338 Thanks to Boyd Gerber.
5339 Added check for __arm__ in addition to arm for LINUX and copied
5340 __s390__ defines from upstream libgc. Thanks to James Treacy for
5341 reporting the problems.
5342
5343 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5344
5345 * socket.c: use SCM_CHAR_BIT.
5346
5347 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5348
5349 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5350
5351 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5352
5353 * feature.c (scm_init_feature): Always add threads feature.
5354
5355 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5356
5357 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5358 scm_at_assert_bound_ref. (We don't want the unbound check. See
5359 oop/goops/active-slot.scm.)
5360
5361 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5362
5363 * tags.h: scm_t_intptr should have been intptr_t.
5364
5365 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5366
5367 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5368 test. Instead use
5369 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5370 as gc_os_dep.c suggests is appropriate.
5371
5372 * goops.c (prep_hashsets): make static to match prototype.
5373 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5374 Chin.
5375
5376 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5377 Albert Chin.
5378
5379 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5380 Klausner.
5381
5382 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5383
5384 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5385 indicated through extra fields in getters-n-setters.
5386 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5387 (Thanks to Andy Wingo.)
5388
5389 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5390
5391 * gc-segment.c: add comment
5392
5393 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5394
5395 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5396 clash.
5397
5398 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5399 and add regression test to standalone/.
5400
5401 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5402
5403 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5404 Thanks to Dale P. Smith.
5405
5406 * random.c: #include gmp.h.
5407 (scm_c_random_bignum): normalize result on return.
5408
5409 * init.c: #include gmp.h.
5410
5411 * numbers.h: remove the gmp.h #include (not needed now).
5412
5413 * posix.h: change occurences of "id" to something else so we don't
5414 cause trouble when included via objective-c (can't hurt, might
5415 help). Still have usage in debug.h, though.
5416
5417 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5418
5419 * random.c (scm_c_random_bignum): Don't generate a random number
5420 equal to m (the second argument of scm_c_random_bignum); only
5421 generate numbers in the range 0 <= r < m.
5422 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5423 scm_var_random_state.
5424
5425 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5426 clause.
5427
5428 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5429
5430 * modules.c (scm_module_import_interface): move declaration of
5431 uses before any code.
5432
5433 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5434
5435 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5436 not top_srcdir.
5437
5438 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5439 processing it in order to avoid an infinite loop.
5440
5441 * print.c (scm_prin1): Remember old state of pstate->writingp.
5442
5443 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5444
5445 * Changed license terms to the plain LGPL thru-out.
5446
5447 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5448
5449 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5450 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5451 rewrite to handle GMP bignums.
5452
5453
5454 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5455
5456 * ports.c (scm_getc): minor tweak.
5457
5458 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5459 rewrite to handle GMP bignums.
5460
5461 * numbers.c: rewrite *many* functions to handle GMP bignums.
5462
5463 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5464 handle GMP bignums.
5465
5466 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5467
5468 * init.c (check_config): remove SCM_BIGDIG conditionals.
5469 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5470
5471 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5472
5473 * eval.c: remove SCM_BIGDIG conditionals.
5474
5475 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5476
5477 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5478
5479 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5480 to Kevin Ryde.)
5481
5482 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5483
5484 * threads.h: fix various preprocessor usages of new public
5485 symbols to expect 0 or 1 values rather than 1 or undefined.
5486 i.e. change #ifdef to #if, etc.
5487
5488 * threads.c: fix various preprocessor usages of new public
5489 symbols to expect 0 or 1 values rather than 1 or undefined.
5490 i.e. change #ifdef to #if, etc.
5491
5492 * tags.h: fix various preprocessor usages of new public
5493 symbols to expect 0 or 1 values rather than 1 or undefined.
5494 i.e. change #ifdef to #if, etc.
5495
5496 * stacks.c: fix various preprocessor usages of new public
5497 symbols to expect 0 or 1 values rather than 1 or undefined.
5498 i.e. change #ifdef to #if, etc.
5499
5500 * stackchk.h: fix various preprocessor usages of new public
5501 symbols to expect 0 or 1 values rather than 1 or undefined.
5502 i.e. change #ifdef to #if, etc.
5503
5504 * stackchk.c: fix various preprocessor usages of new public
5505 symbols to expect 0 or 1 values rather than 1 or undefined.
5506 i.e. change #ifdef to #if, etc.
5507
5508 * sort.c: fix various preprocessor usages of new public
5509 symbols to expect 0 or 1 values rather than 1 or undefined.
5510 i.e. change #ifdef to #if, etc.
5511
5512 * read.c: fix various preprocessor usages of new public
5513 symbols to expect 0 or 1 values rather than 1 or undefined.
5514 i.e. change #ifdef to #if, etc.
5515
5516 * random.c: fix various preprocessor usages of new public
5517 symbols to expect 0 or 1 values rather than 1 or undefined.
5518 i.e. change #ifdef to #if, etc.
5519
5520 * print.c: fix various preprocessor usages of new public
5521 symbols to expect 0 or 1 values rather than 1 or undefined.
5522 i.e. change #ifdef to #if, etc.
5523
5524 * objects.c: fix various preprocessor usages of new public
5525 symbols to expect 0 or 1 values rather than 1 or undefined.
5526 i.e. change #ifdef to #if, etc.
5527
5528 * numbers.h: fix various preprocessor usages of new public
5529 symbols to expect 0 or 1 values rather than 1 or undefined.
5530 i.e. change #ifdef to #if, etc.
5531
5532 * null-threads.c: fix various preprocessor usages of new public
5533 symbols to expect 0 or 1 values rather than 1 or undefined.
5534 i.e. change #ifdef to #if, etc.
5535
5536 * lang.c: fix various preprocessor usages of new public
5537 symbols to expect 0 or 1 values rather than 1 or undefined.
5538 i.e. change #ifdef to #if, etc.
5539
5540 * lang.h: fix various preprocessor usages of new public
5541 symbols to expect 0 or 1 values rather than 1 or undefined.
5542 i.e. change #ifdef to #if, etc.
5543
5544 * iselect.h: fix various preprocessor usages of new public
5545 symbols to expect 0 or 1 values rather than 1 or undefined.
5546 i.e. change #ifdef to #if, etc.
5547
5548 * init.c: fix various preprocessor usages of new public
5549 symbols to expect 0 or 1 values rather than 1 or undefined.
5550 i.e. change #ifdef to #if, etc.
5551
5552 * gh_data.c: fix various preprocessor usages of new public
5553 symbols to expect 0 or 1 values rather than 1 or undefined.
5554 i.e. change #ifdef to #if, etc.
5555
5556 * gh.h: fix various preprocessor usages of new public
5557 symbols to expect 0 or 1 values rather than 1 or undefined.
5558 i.e. change #ifdef to #if, etc.
5559
5560 * gen-scmconfig.c: change most new public symbols to be defined to
5561 0 or 1 rather than being either 1 or undefined.
5562
5563 * gc_os_dep.c: fix various preprocessor usages of new public
5564 symbols to expect 0 or 1 values rather than 1 or undefined.
5565 i.e. change #ifdef to #if, etc.
5566 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5567
5568 * gc.h: fix various preprocessor usages of new public
5569 symbols to expect 0 or 1 values rather than 1 or undefined.
5570 i.e. change #ifdef to #if, etc.
5571
5572 * gc-card.c: fix various preprocessor usages of new public
5573 symbols to expect 0 or 1 values rather than 1 or undefined.
5574 i.e. change #ifdef to #if, etc.
5575
5576 * gc-mark.c: fix various preprocessor usages of new public
5577 symbols to expect 0 or 1 values rather than 1 or undefined.
5578 i.e. change #ifdef to #if, etc.
5579
5580 * feature.c: fix various preprocessor usages of new public
5581 symbols to expect 0 or 1 values rather than 1 or undefined.
5582 i.e. change #ifdef to #if, etc.
5583
5584 * evalext.c: fix various preprocessor usages of new public
5585 symbols to expect 0 or 1 values rather than 1 or undefined.
5586 i.e. change #ifdef to #if, etc.
5587
5588 * eval.h: fix various preprocessor usages of new public
5589 symbols to expect 0 or 1 values rather than 1 or undefined.
5590 i.e. change #ifdef to #if, etc.
5591
5592 * eval.c: fix various preprocessor usages of new public
5593 symbols to expect 0 or 1 values rather than 1 or undefined.
5594 i.e. change #ifdef to #if, etc.
5595
5596 * eq.c: fix various preprocessor usages of new public
5597 symbols to expect 0 or 1 values rather than 1 or undefined.
5598 i.e. change #ifdef to #if, etc.
5599
5600 * coop.c: fix various preprocessor usages of new public
5601 symbols to expect 0 or 1 values rather than 1 or undefined.
5602 i.e. change #ifdef to #if, etc.
5603
5604 * coop-threads.c: fix various preprocessor usages of new public
5605 symbols to expect 0 or 1 values rather than 1 or undefined.
5606 i.e. change #ifdef to #if, etc.
5607
5608 * coop-pthreads.c: fix various preprocessor usages of new public
5609 symbols to expect 0 or 1 values rather than 1 or undefined.
5610 i.e. change #ifdef to #if, etc.
5611
5612 * coop-defs.h: fix various preprocessor usages of new public
5613 symbols to expect 0 or 1 values rather than 1 or undefined.
5614 i.e. change #ifdef to #if, etc.
5615
5616 * convert.i.c: fix various preprocessor usages of new public
5617 symbols to expect 0 or 1 values rather than 1 or undefined.
5618 i.e. change #ifdef to #if, etc.
5619
5620 * continuations.c: fix various preprocessor usages of new public
5621 symbols to expect 0 or 1 values rather than 1 or undefined.
5622 i.e. change #ifdef to #if, etc.
5623
5624 * _scm.h: fix various preprocessor usages of new public symbols to
5625 expect 0 or 1 values rather than 1 or undefined. i.e. change
5626 #ifdef to #if, etc.
5627
5628 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5629
5630 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5631
5632 * deprecated.c, deprecated.h: New files, to collect deprecated
5633 things in one place.
5634 * Makefile.am: Added them in all the right places.
5635
5636 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5637 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5638 builds work.
5639 (DOT_X_FILES): Removed "iselect.x".
5640 (DOT_DOC_FILES): Removed "iselect.doc".
5641
5642 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5643
5644 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5645 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5646
5647 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5648
5649 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5650
5651 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5652 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5653
5654 * threads.h: replace usage of struct timespect with
5655 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5656 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5657 favor of scm_t_timespec from scmconfig.h.
5658
5659 * threads.c: move libguile/_scm.h include to the top so we pick up
5660 any critical defines like _GNU_SOURCE early. Replace usage of
5661 struct timespect with scm_t_timespec. Replace usage of
5662 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5663 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5664
5665 * threads-plugin.h: replace usage of struct timespect with
5666 scm_t_timespec.
5667
5668 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5669 usage of struct timespect with scm_t_timespec.
5670
5671 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5672 HAVE_INTTYPES_H handling to scmconfig.h. #include
5673 "libguile/__scm.h". Rework handling for scm_t_bits,
5674 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5675 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5676 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5677 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5678 SCM_HAVE_ARRAYS.
5679
5680 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5681
5682 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5683
5684 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5685
5686 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5687
5688 * stime.h: move handling of time related headers to scmconfig.h.
5689
5690 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5691
5692 * stacks.c: replace usage of STACK_GROWS_UP with
5693 SCM_STACK_GROWS_UP.
5694
5695 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5696 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5697
5698 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5699 of uint32 and HAVE_UINT_32 with scm_t_int32.
5700
5701 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5702
5703 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5704
5705 * script.c: #include <config.h> if HAVE_CONFIG_H.
5706
5707 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5708
5709 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5710
5711 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5712
5713 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5714
5715 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5716
5717 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5718
5719 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5720 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5721 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5722 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5723
5724 * ramap.c: replace usage of HAVE_LONG_LONGS with
5725 "SCM_SIZEOF_LONG_LONG != 0".
5726
5727 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5728 "libguile/scmconfig.h".
5729
5730 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5731
5732 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5733 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5734
5735 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5736
5737 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5738
5739 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5740
5741 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5742 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5743 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5744 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5745 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5746 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5747 "SCM_SIZEOF_LONG_LONG != 0".
5748
5749 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5750 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5751 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5752 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5753
5754 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5755
5756 * null-threads.h: replace usage of struct timespect with
5757 scm_t_timespec.
5758
5759 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5760
5761 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5762 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5763 scm_t_uint64 and rename usages.
5764
5765 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5766
5767 * load.c: #include <config.h> if HAVE_CONFIG_H.
5768
5769 * iselect.h: move handling of time related headers to scmconfig.h.
5770 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5771 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5772 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5773
5774 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5775 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5776 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5777
5778 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5779
5780 * inline.h: #include "libguile/__scm.h" at the top. Change code
5781 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5782 what to do instead of creating a new public #define. Rename usage
5783 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5784 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5785 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5786
5787 * inline.c: rearrange handling -- now we just #define
5788 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5789 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5790 appropriate, and we use that in inline.h along with the above
5791 define to determine how to respond.
5792
5793 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5794 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5795
5796 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5797
5798 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5799 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5800
5801 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5802
5803 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5804
5805 * gen-scmconfig.c: new file -- see comments in file for details.
5806
5807 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5808
5809 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5810 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5811
5812 * gc.h: replace usage of SIZEOF_LONG with
5813 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5814 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5815 since we handle that in scmconfig.h now.
5816
5817 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5818
5819 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5820 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5821 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5822
5823 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5824
5825 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5826 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5827
5828 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5829
5830 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5831
5832 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5833 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5834
5835 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5836
5837 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5838 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5839
5840 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5841 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5842 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5843 with "SCM_SIZEOF_LONG_LONG != 0".
5844
5845 * error.c: #include <config.h> if HAVE_CONFIG_H.
5846
5847 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5848 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5849 with "SCM_SIZEOF_LONG_LONG != 0".
5850
5851 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5852
5853 * coop.c: replace usage of struct timespect with scm_t_timespec.
5854 #include <config.h> if HAVE_CONFIG_H.
5855
5856 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5857 usage of struct timespect with scm_t_timespec. Replace usage of
5858 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5859
5860 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5861 usage of struct timespect with scm_t_timespec. Replace usage of
5862 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5863
5864 * coop-defs.h: move handling of time related headers to
5865 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5866 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5867 timespect with scm_t_timespec.
5868
5869 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5870
5871 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5872
5873 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5874 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5875
5876 * continuations.c: move libguile/_scm.h include to the top so we
5877 pick up any critical defines like _GNU_SOURCE early.
5878
5879 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5880
5881 * async.c: #include <config.h> if HAVE_CONFIG_H.
5882
5883 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5884
5885 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5886 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5887
5888 * __scm.h: move libguile/scmconfig.h include up to the top, so
5889 we're sure to pick up any critical defines like _GNU_SOURCE early.
5890 #include <limits.h> removed in favor of scmconfig.h inclusion when
5891 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5892 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5893 scmconfig.h inclusion when appropriate. Various Win32 related
5894 definitions removed in favor of scmconfig.h inclusion when
5895 appropriate.
5896 (HAVE_UINTPTR_T): definition removed (see NEWS).
5897 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5898 (HAVE_LONG_LONGS): definition removed (see NEWS).
5899 (HAVE_LONG_LONG): definition removed (see NEWS).
5900 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5901
5902 * Makefile.am: scmconfig.h is now generated by building and
5903 running gen-scmconfig.h and capturing its output. gen-scmconfig
5904 uses config.h and the configure.in generated gen-scmconfig.h to
5905 decide what to output. See gen-scmconfig.c for details.
5906 (noinst_PROGRAMS): add gen-scmconfig.
5907 (gen_scmconfig_SOURCES): new variable.
5908 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5909 cross-compiling right.
5910 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5911 (BUILT_SOURCES): add scmconfig.h.
5912
5913 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5914
5915 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5916 Adrian Bunk. Thanks!
5917
5918 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5919
5920 * goops.c (make_class_from_template): New fourth arg:
5921 applicablep.
5922 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5923 cpls.
5924
5925 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5926
5927 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5928 second arg: applicablep.
5929 (scm_i_inherit_applicable): New function.
5930
5931 * goops.c, goops.h (scm_class_applicable,
5932 scm_class_extended_accessor): New classes.
5933
5934 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5935
5936 * procs.c (scm_procedure_documentation): Removed redundant
5937 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5938 predicates.
5939
5940 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5941
5942 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5943
5944 * modules.c (scm_module_import_interface): New function.
5945
5946 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5947 scm_class_accessor.
5948 (scm_class_accessor): New class.
5949
5950 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5951
5952 * goops.c (scm_primitive_generic_generic): Enable primitive
5953 generic if not enabled.
5954 (scm_sys_goops_loaded): Setup unextended primitive generics.
5955
5956 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5957
5958 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5959 snarf macros.
5960
5961 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5962 testing example. All uses of SCM_GPROC should be converted.)
5963
5964 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5965 scm_assoc.
5966
5967 * eq.c (scm_equal_p): Turned into a primitive generic.
5968
5969 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5970
5971 * Makefile.am (scmconfig.h): new target -- generate file from
5972 ../config.h.
5973 (modinclude_HEADERS): remove version.h.
5974 (nodist_modinclude_HEADERS): add version.h.
5975
5976 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5977
5978 This fixes a serious GC bug, introduced during the latest
5979 reorganization of the GC, which disabled freeing of structs and
5980 GOOPS objects:
5981
5982 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5983 SCM_EOL.
5984 (scm_struct_prehistory): Move scm_free_structs to
5985 scm_before_mark_c_hook.
5986
5987 * gc-card.c (sweep_card): Check that we haven't swept structs on
5988 this card before. That can happen if scm_i_sweep_all_segments has
5989 been called from some other place than scm_igc.
5990
5991 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5992
5993 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5994 (since hash tables now adapt their size).
5995
5996 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5997 (current number of prehistory bindings; hashtable code will select
5998 a prime which is greater than this value).
5999
6000 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
6001 (current number of initial symbols).
6002
6003 * properties.c (scm_init_properties): Don't specify size of
6004 scm_properties_whash.
6005
6006 * objprop.c (scm_init_objprop): Don't specify size of
6007 scm_object_whash.
6008
6009 * keywords.c (scm_init_keywords): Don't specify a hash table size.
6010
6011 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
6012
6013 The following changes introduce the use of resizable hash tables
6014 throughout Guile. It also renames the old *-hash-table* functions
6015 to *-alist-vector* and places them, together with the rest of the
6016 weak vector support, in the module (ice-9 weak-vector). We should
6017 probably introduce a new, better, API for weak references, for
6018 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
6019 look like and are used like ordinary pairs.)
6020
6021 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
6022 leaf_environment_fold, obarray_remove_all): Use hashtable
6023 accessors.
6024
6025 * gc.c (scm_init_storage): Moved hook initialization to
6026 scm_storage_prehistory.
6027 (scm_storage_prehistory): New function.
6028 (scm_igc): Added commentary about placement of
6029 scm_after_sweep_c_hook.
6030
6031 * gc-mark.c (scm_mark_all): Use hashtable accessors.
6032 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
6033 SCM_WVECT_WEAK_VALUE_P.
6034
6035 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
6036 functions.
6037 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
6038 Removed.
6039 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
6040 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
6041
6042 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
6043 calls to scm_storage_prehistory and scm_hashtab_prehistory.
6044
6045 * modules.c (module-reverse-lookup): Use hashtable accessors.
6046
6047 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
6048
6049 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
6050 scm_make_weak_value_alist_vector,
6051 scm_make_doubly_weak_alist_vector): New functions.
6052
6053 * weaks.c (scm_init_weaks_builtins): New function.
6054
6055 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
6056 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
6057 SCM_WVECT_NOSCAN_P): New macros.
6058
6059 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
6060 and SCM_WVECT_WEAK_VALUE_P.
6061
6062 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
6063 allocate_weak_vector and exported.
6064
6065 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6066
6067 * hashtab.c: Undid thread safety. (We decided that it's better to
6068 let the user explicitly protect the tables (or not) according what
6069 is suitable for the application.)
6070
6071 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6072
6073 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
6074 thread safe and handle resizing tables.
6075 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
6076 SCM_DEFER/ALLOW_INTS.
6077
6078 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6079
6080 * hashtab.c (scm_vector_to_hash_table,
6081 scm_c_make_resizing_hash_table, scm_make_hash_table): New
6082 functions.
6083 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
6084 safe and handle resizing tables.
6085
6086 * weaks.c (scm_make_weak_key_hash_table,
6087 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
6088 Size argument made optional. Return resizable table if not
6089 specified.
6090
6091 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6092
6093 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6094 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
6095
6096 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6097
6098 * debug.c (scm_procedure_source): Handle all objects for which
6099 procedure? is #t. (Thanks to Bill Schottstaedt.)
6100
6101 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6102
6103 * futures.c (mark_futures): Don't need to mark data of recycled
6104 futures.
6105 (scan_futures, cleanup_undead): Be smarter about marking
6106 futures---avoid unnecessary passes through future lists.
6107
6108 * futures.h, futures.c: New files; Introduced recycling of
6109 futures. For fine-grained threading this lifts performance to
6110 another level. We can now use parallelization in inner loops of
6111 Guile programs without impossible overhead.
6112
6113 * threads.h, threads.c: Moved futures to their own file.
6114
6115 * Makefile.am (libguile_la_SOURCES): Added futures.c.
6116 (DOT_X_FILES): Added futures.x.
6117 (DOT_DOC_FILES): Added futures.doc.
6118 (modinclude_HEADERS): Added futures.h.
6119
6120 * threads.c, threads.h (scm_i_create_thread): Renamed from
6121 create_thread and made global.
6122
6123 * futures.c (scm_make_future): New procedure.
6124
6125 * eval.c: #include "libguile/futures.h".
6126
6127 * init.c: #include "futures.h"
6128 (scm_init_guile_1): Call scm_init_futures.
6129
6130 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
6131
6132 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
6133
6134 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
6135 functions.
6136
6137 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
6138
6139 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6140
6141 * threads.c (create_thread): Don't unwind dynwind chain of parent
6142 thread before creation. Just start the new thread with an empty
6143 dynwind chain.
6144
6145 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6146
6147 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
6148
6149 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6150
6151 * threads.c (scm_timed_wait_condition_variable): Support timed
6152 waiting also for simple condition variables.
6153
6154 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
6155 of calling the procedure change-object-class.
6156
6157 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6158
6159 * ramap.c (scm_ramapc): Typo in error message.
6160
6161 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6162
6163 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
6164 slots with instance allocation.
6165
6166 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
6167 class.
6168 (scm_compute_applicable_methods): Use scm_generic_function_methods.
6169
6170 * goops.c (scm_generic_function_methods): Support extended
6171 generic functions.
6172
6173 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6174
6175 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
6176 Thanks to Neil for pointing this out!
6177
6178 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
6179
6180 * lang.h: Remove declarations matching definitions removed from
6181 lang.c (just below).
6182
6183 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
6184
6185 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
6186 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
6187 and already commented out.
6188
6189 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
6190 scm_lreadparen): Support reading vectors with Elisp syntax if
6191 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
6192 is not currently defined, and there isn't even a configure switch
6193 to enable it yet.)
6194
6195 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
6196
6197 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
6198 builds work.
6199 (EXTRA_DIST): Added version.h.in.
6200
6201 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6202
6203 This change makes it possible for one thread to do lazy sweeping
6204 while other threads are running. Now only the mark phase need to
6205 have all threads asleep. We should look further into this issue.
6206 Presently, I've put the locking of scm_i_sweep_mutex at
6207 "conservative" places due to my current lack of knowledge about
6208 the garbage collector. Please feel free to restrict these regions
6209 further to allow for maximal parallelism!
6210
6211 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
6212
6213 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
6214 scm_gc_register_collectable_memory): Substitute locking of
6215 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
6216 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
6217 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
6218 the single-thread section (which now only contains the mark
6219 phase).
6220 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
6221 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
6222
6223 * threads.c (gc_section_mutex): Removed.
6224
6225 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6226
6227 * threads.c (create_thread): Clear parent field in root state in
6228 order not to unnecessarily remember dead threads.
6229
6230 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
6231 (scm_trampoline_1, scm_trampoline_2): Use them.
6232
6233 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6234
6235 Partial introduction of real plugin interface.
6236
6237 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
6238 (EXTRA_DIST): Added threads-plugin.c.
6239
6240 * threads-plugin.h, threads-plugin.c: New files.
6241
6242 * threads.h: #include "libguile/threads-plugin.h".
6243
6244 * threads.c: #include "libguile/threads-plugin.c".
6245
6246 * pthread-threads.c: Temporarily remove debugging functions.
6247
6248 * threads.c, threads.h (scm_yield): Added back.
6249
6250 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6251
6252 * threads.c (really_launch): Detach before unlocking
6253 thread_admin_mutex in order not to risk being joined.
6254 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
6255 thread_admin_mutex locked during GC.
6256
6257 * pthread-threads.c, pthread-threads.h: Improvements to debugging
6258 functions.
6259
6260 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6261
6262 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
6263 support for debugging mutex operations.
6264
6265 * threads.c (scm_thread): Removed filed joining_threads.
6266 (thread_print): Print thread number as well as address of thread
6267 structure.
6268 (scm_join_thread): Bugfix.
6269 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
6270 scm_timed_wait_condition_variable, scm_signal_condition_variable,
6271 scm_broadcast_condition_variable): Use the low-level API.
6272 (scm_all_threads): Return copy of thread list (to prevent
6273 unintended destruction).
6274 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6275
6276 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6277 pthread "native" recursive mutex support.
6278
6279 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6280
6281 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6282 Simply lock a thread C API recursive mutex.
6283 (SCM_NONREC_CRITICAL_SECTION_START,
6284 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6285 SCM_REC_CRITICAL_SECTION_END): Removed.
6286
6287 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6288 direct calls to scm_rec_mutex_lock / unlock around the three calls
6289 to scm_m_expand_body.
6290
6291 * eval.c, eval.h (promise_free): New function.
6292 (scm_force): Rewritten; Now thread-safe; Removed
6293 SCM_DEFER/ALLOW_INTS.
6294
6295 * pthread-threads.h: Added partially implemented plugin interface
6296 for recursive mutexes. These are, for now, only intended to be
6297 used internally within the Guile implementation.
6298
6299 * pthread-threads.c: New file.
6300
6301 * threads.c: Conditionally #include "pthread-threads.c".
6302
6303 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6304 thread-safe;
6305
6306 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6307 SCM_GLOBAL_REC_MUTEX): New macros.
6308
6309 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6310 macros---use mutexes instead.
6311
6312 * tags.h (SCM_IM_FUTURE): New tag.
6313
6314 * eval.c (scm_m_future): New primitive macro.
6315 (SCM_CEVAL): Support futures.
6316 (unmemocopy): Support unmemoization of futures.
6317
6318 * print.c (scm_isymnames): Name of future isym.
6319
6320 * version.c: Unmade some changes to my private copy that got
6321 committed by mistake.
6322
6323 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6324
6325 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6326 2002-12-10.
6327
6328 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6329
6330 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6331 logical place.
6332
6333 * threads.c (create_thread): Remember root object until the handle
6334 of the new thread is on all_threads list.
6335
6336 * root.c (scm_make_root): Moved copying of fluids until after
6337 creation of root handle so that the fluids are GC protected. Also
6338 removed the critical section.
6339
6340 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6341
6342 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6343
6344 * gc-malloc.c (malloc_mutex): New mutex.
6345 (scm_gc_malloc_prehistory): Initialize it.
6346 (scm_realloc): Serialize call to realloc
6347 (scm_calloc): Same for calloc.
6348 Thanks to Wolfgang Jaehrling!
6349 (Now we have to make sure all calls to malloc/realloc are made
6350 through scm_malloc.)
6351
6352 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6353
6354 * threads.c (really_launch): Release heap (to prevent deadlock).
6355 (create_thread): Release heap before locking thread admin mutex.
6356
6357 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6358
6359 * threads.c (scm_i_thread_invalidate_freelists): New
6360 function.
6361
6362 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6363
6364 * modules.c (scm_export): Inserted a return statement.
6365
6366 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6367
6368 * modules.c (scm_export): new function
6369
6370 * gc-card.c: add a note about malloc()/free() overhead.
6371
6372 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6373
6374 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6375 in srcdir.
6376
6377 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6378
6379 These changes remove scm_ints_disabled (which hasn't has any
6380 effect in Guile for quite some time).
6381
6382 * async.c, error.h (scm_ints_disabled): Removed.
6383
6384 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6385 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6386 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6387 (old_ints): Removed.
6388
6389 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6390 critical section.
6391 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6392 SCM_ALLOW_INTS.
6393
6394 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6395
6396 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6397 Removed accidental #if 0 around these functions.
6398
6399 These changes are the start of support for preemptive
6400 multithreading. Marius and I have agreed that I commit this code
6401 into the repository although it isn't thoroughly tested and surely
6402 introduces many bugs. The bugs should only be exposed when using
6403 threads, though. Signalling and error handling for threads is
6404 very likely broken. Work on making the implementation cleaner and
6405 more efficient is needed.
6406
6407 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6408 (SCM_NONREC_CRITICAL_SECTION_START,
6409 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6410 SCM_REC_CRITICAL_SECTION_END): New macros.
6411 (SCM_CRITICAL_SECTION_START/END): Defined here.
6412
6413 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6414 the three calls to scm_m_expand_body.
6415
6416 * gc.h: #include "libguile/pthread-threads.h";
6417 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6418
6419 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6420 scm_t_key;
6421
6422 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6423 access.
6424
6425 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6426
6427 * gc-freelist.c, threads.c (really_launch): Use
6428 SCM_FREELIST_CREATE.
6429
6430 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6431
6432 * gc.c (scm_i_expensive_validation_check, scm_gc,
6433 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6434 heap administration so that those pieces of code are executed
6435 single-threaded. We might consider rewriting these code sections
6436 in terms of a "call_gc_code_singly_threaded" construct instead of
6437 calling the pair of scm_i_thread_put_to_sleep () and
6438 scm_i_thread_wake_up (). Also, we would want to have as many of
6439 these sections eleminated.
6440
6441 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6442
6443 * inline.h: #include "libguile/threads.h"
6444
6445 * pthread-threads.h: Macros now conform more closely to the
6446 pthreads interface. Some of them now take a second argument.
6447
6448 * threads.c, threads.h: Many changes.
6449
6450 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6451
6452 * Makefile.am (version.h): Changed $^ --> $< in rule for
6453 version.h.
6454
6455 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6456
6457 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6458 (SCM_MINOR_VERSION): use @--@ substitution now.
6459 (SCM_MICRO_VERSION): use @--@ substitution now.
6460 (scm_effective_version): new function prototype.
6461
6462 * version.c (scm_effective_version): new function, also add
6463 effective-version.
6464
6465 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6466 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6467 SCM_LIBRARY_DIR.
6468 (version.h): generate this here rather than configure.in. This
6469 approach tracks source edits better (i.e. more immediately).
6470 Might be worth considering for other .in files too.
6471
6472 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6473
6474 Reorganized thread package selection. A thread package now only
6475 implements a small set of pthread like functions and Guile
6476 implements the rest on top of that. Guile's implementation is
6477 what the "coop-pthreads" package has been previously. Support for
6478 "coop" threads has been removed until I get time to add it again.
6479
6480 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6481 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6482 null-threads.c, coop-pthreads.c.
6483 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6484 pthread-threads.h.
6485
6486 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6487
6488 * threads.h: Do not include "libguile/coop-defs.h". Include
6489 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6490 (previously deprecated) C level thread API prototypes. They are
6491 now in the thread package specific headers, "null-threads.h" and
6492 "pthread-threads.h".
6493 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6494 New.
6495 (scm_threads_init): Removed.
6496 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6497 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6498 SCM_I_THREAD_SWITCH_COUNT): Define here.
6499 (scm_single_thread_p): Removed.
6500 (scm_call_with_new_thread): Take two args directly instead of list
6501 of two args.
6502 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6503 SCM_SET_THREAD_LOCAL_DATA): Define here.
6504
6505 * threads.c: Merged with "coop-pthreads.c".
6506
6507 * null-threads.h: Implement pthread-like API as a set of macros.
6508
6509 * pthread-threads.h: New, implement pthread-like API by deferring
6510 to pthread itself.
6511
6512 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6513 has been lost in the reorganization.
6514
6515 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6516
6517 The following change makes it possible to move procedure
6518 application dispatch outside inner loops. The motivation was
6519 clean implementation of efficient replacements of R5RS primitives
6520 in SRFI-1.
6521
6522 The semantics is clear: scm_trampoline_N returns an optimized
6523 version of scm_call_N (or NULL if the procedure isn't applicable
6524 on N args).
6525
6526 Applying the optimization to map and for-each increases efficiency
6527 noticeably. For example, (map abs ls) is 8 times faster than
6528 before.
6529
6530 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6531
6532 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6533
6534 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6535 (map, for-each): Handle also application on two args as a special
6536 case; Use trampolines.
6537
6538 Other changes:
6539
6540 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6541 (subr2oless): Removed.
6542 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6543 vector GC protected.
6544
6545 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6546 scm_out_of_range.
6547
6548 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6549
6550 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6551
6552 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6553
6554 * debug.c (scm_make_iloc): Added missing "return".
6555
6556 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6557
6558 * strports.c (scm_eval_string_in_module): Validate second arg to
6559 be a module. Thanks to Arno Peters!
6560
6561 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6562
6563 * .cvsignore: remove goops.c
6564
6565 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6566
6567 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6568 module_variable, scm_module_lookup_closure,
6569 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6570 scm_system_module_env_p): Don't compare SCM values with C
6571 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6572 over SCM_NFALSEP.
6573
6574 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6575
6576 * eval.h (SCM_MAKE_ILOC): New macro.
6577
6578 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6579 the iloc bitpattern here.
6580
6581 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6582
6583 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6584 part of the API, otherwise it's difficult to write Guile
6585 extensions using non-blocking I/O => moved #include
6586 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6587
6588 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6589 s_unlock_mutex.
6590
6591 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6592
6593 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6594 are defined in configure.in.
6595
6596 * threads.c: Removed SCM_API from function definitions. SCM_API
6597 is only for declarations.
6598
6599 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6600
6601 * coop-pthreads.h: Added support for thread specific data to the
6602 generic C API for the coop-pthreads case.
6603
6604 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6605 change.
6606 (scm_cond_broadcast): Added missing function.
6607
6608 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6609
6610 * coop.c (coop_next_runnable_thread): Removed, wich should have
6611 happened when GUILE_ISELECT was hard-wired.
6612
6613 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6614
6615 * Makefile.am (libguile_la_SOURCES): Added threads.c
6616 (DOT_DOC_FILES): Added threads.doc.
6617 (DOT_X_FILES): Added threads.x.
6618 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6619 (noinst_HEADERS): Added coop-pthreads.c.
6620 (modinclude_HEADERS): Added coop-pthreads.h.
6621
6622 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6623 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6624
6625 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6626 Thanks to Bill Schottstaedt!
6627
6628 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6629
6630 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6631 SCM_COPT_THREADS is defined.
6632 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6633 is defined.
6634
6635 * coop-pthreads.c: Some harmless renamings of internal stuff.
6636 (create_thread): New, generalized version of
6637 scm_call_with_new_thread.
6638 (scm_call_with_new_thread): Use it.
6639 (scm_spawn_thread): New, use create_thread.
6640
6641 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6642
6643 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6644 start testing it now.
6645
6646 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6647 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6648 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6649 is defined.
6650
6651 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6652
6653 * scmsigs.c (signal_cell_handlers, install_handler_data,
6654 scm_delq_spine_x, really_install_handler, install_handler): New
6655 scheme for triggering signal handlers, to simplify take_signal.
6656 (take_signal): Simplified, to avoid race conditions.
6657 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6658 hasn't exited yet.
6659
6660 * async.c (scm_async_click): Reset pending_asyncs, handle
6661 signal_asyncs. Don't set cdr of a non-signal async to #f.
6662 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6663 always. Set pending_asyncs.
6664 (scm_system_async_mark_for_thread): Check that thread has not
6665 exited.
6666 (scm_unmask_signals, decrease_block): Call scm_async_click after
6667 block_asyncs becomes zero.
6668
6669 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6670 active_asyncs.
6671
6672 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6673 fields.
6674 * root.c (root_mark): Mark them.
6675 (make_root): Initialize them.
6676
6677 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6678 USE_COOP_THREADS.
6679 (scm_internal_select): Define one version for USE_COOP_THREADS and
6680 one for USE_NULL_THREADS.
6681 (scm_init_iselect): Likewise.
6682
6683 * inline.h (scm_cell, scm_double_cell): Also allow
6684 USE_COPT_THREADS to not protect the slot initializers.
6685
6686 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6687 because threads need to be initialized before the stack, but
6688 gsubrs such as scm_timed_condition_variable_wait can only be
6689 created later.
6690
6691 * threads.h: Include "coop-pthreads.h" when requested.
6692 (scm_threads_make_mutex, scm_threads_lock_mutex,
6693 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6694 not implemented anyway.
6695 (scm_init_thread_procs, scm_try_mutex,
6696 scm_timed_condition_variable_wait,
6697 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6698 scm_thread_exited_p): New prototypes.
6699 (struct timespec): Define if not already defined.
6700 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6701 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6702 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6703 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6704 deprecated.
6705
6706 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6707 requested.
6708 (scm_thread_exited_p): New.
6709 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6710 registered procedures.
6711 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6712 Use the latter as the procedure for "wait-condition-variable",
6713 thus offering a optional timeout parameter to Scheme.
6714 (scm_wait_condition_variable): Implement in terms of
6715 scm_timed_wait_condition_variable.
6716 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6717 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6718 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6719 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6720 scm_make_mutex, etc, and deprecate.
6721 (scm_init_threads): Do not create smobs, leave this to
6722 scm_threads_init. Do not include "threads.x" file.
6723 (scm_init_thread_procs): New, include "threads.x" here.
6724
6725 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6726 scm_null_mutex_lock, scm_null_mutex_unlock,
6727 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6728 scm_null_condvar_wait, scm_null_condvar_signal,
6729 scm_null_condvar_destroy): Removed.
6730 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6731 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6732 scm_cond_destory): Do not define, they are now deprecated and
6733 handled by threads.{h,c}.
6734
6735 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6736 (scm_threads_init): Create smobs here, using the appropriate
6737 sizes.
6738 (block): Removed, now unused.
6739 (scm_c_thread_exited_p): New.
6740 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6741 scm_null_mutex_destroy, scm_null_condvar_init,
6742 scm_null_condvar_wait, scm_null_condvar_signal,
6743 scm_null_condvar_destroy): Removed and updated users to do their
6744 task directly.
6745 (scm_try_mutex, timeval_subtract,
6746 scm_timed_wait_condition_variable,
6747 scm_broadcast_condition_variable): New.
6748 (scm_wait_condition_variable): Removed.
6749
6750 * coop-defs.h (coop_m): Added 'level' field.
6751 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6752 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6753 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6754 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6755 define.
6756 (coop_condition_variable_broadcast): New.
6757
6758 * coop-threads.c (scm_threads_init): Create smobs here, using the
6759 appropriate sizes.
6760 (scm_c_thread_exited_p, scm_try_mutex,
6761 scm_timed_wait_condition_variable,
6762 scm_broadcast_condition_variable): New.
6763 (scm_wait_condition_variable): Removed.
6764
6765 * coop.c (coop_new_mutex_init): Initialize level.
6766 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6767 level.
6768 (coop_condition_variable_signal): Renamed to
6769 coop_condition_variable_broadcast and reimplemented in terms of
6770 that. Thus...
6771 (coop_condition_variable_broadcast): New.
6772
6773 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6774
6775 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6776
6777 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6778
6779 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6780 of system headers.
6781
6782 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6783 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6784 give better error messages. Thanks to Bill Schottstaedt!
6785
6786 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6787
6788 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6789 scm_definedp to scm_defined_p and deprecated scm_definedp.
6790
6791 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6792
6793 * async.h, async.c (scm_system_async): Fixed deprecation to work
6794 correctly when deprecated features are excluded.
6795
6796 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6797
6798 * async.c (scm_system_async_mark_for_thread): Validate thread
6799 argument.
6800
6801 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6802
6803 * feature.c (scm_init_feature): Don't add 'threads' for
6804 USE_NULL_THREADS.
6805
6806 * inline.h (scm_cell, scm_double_cell): Also allow
6807 USE_NULL_THREADS to not protect the slot initializers.
6808
6809 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6810 "USE_THREAD".
6811
6812 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6813 (modinclude_HEADERS): Added null-threads.h.
6814
6815 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6816 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6817 (scm_init_threads): Use generic type names scm_t_mutex and
6818 scm_t_cond instead of coop_m and coop_c.
6819
6820 * null-threads.c, null-threads.h: New files.
6821
6822 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6823
6824 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6825 This is to support makes that know about "$<" only in pattern
6826 rules, like Sun's make.
6827
6828 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6829
6830 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6831 substitution. Thanks to David Allouche!
6832
6833 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6834
6835 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6836 !SCM_ENABLE_DEPRECATED.
6837
6838 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6839
6840 * async.c (scm_system_async_mark_for_thread): Only call
6841 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6842 otherwise.
6843
6844 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6845 USE_THREADS is defined. Use scm_root otherwise.
6846 (scm_sigaction_for_thread): Ignore THREAD argument when
6847 USE_THREADS is not defined. Also, move THREAD argument defaulting
6848 out of HAVE_SIGACTION section, which was a bug.
6849
6850 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6851
6852 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6853 signal_handlers, not the closure that is used as the async.
6854 The closure is stored in signal_handler_cells, as previously.
6855
6856 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6857
6858 * root.h (scm_root_state): Added 'block_async' slot.
6859 (scm_active_asyncs): Removed abbrev.
6860 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6861
6862 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6863 abbrev.
6864
6865 * async.h (scm_call_with_blocked_asyncs,
6866 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6867 scm_c_call_with_unblocked_asyncs): New prototypes.
6868 (scm_mask_signals, scm_unmask_signals): Deprecated.
6869 (scm_mask_ints): Turned into a macro.
6870 * async.c (scm_mask_ints): Removed.
6871 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6872 this should not be necessary.
6873 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6874 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6875 deprecation warning and check for errornous use. Set block_asyncs
6876 instead of scm_mask_ints.
6877 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6878 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6879 scm_c_call_with_unblocked_asyncs): New.
6880
6881 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6882 Asyncs are enabled by default.
6883
6884 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6885
6886 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6887 6th element: an input waiting thunk.
6888 (sf_input_waiting): New.
6889
6890 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6891
6892 * root.c (root_mark): Mark active_asyncs slot.
6893
6894 * async.c (scm_async_click): Set the cdr of a executed handler
6895 cell to SCM_BOOL_F, not SCM_EOL.
6896 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6897 and only if the handler procedure is not already present.
6898 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6899 with SCM_BOOL_F.
6900 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6901
6902 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6903
6904 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6905
6906 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6907 scm_lt_dlopenext, and scm_lt_dlerror.
6908 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6909 and scm_lt_dlerror.
6910 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6911 and scm_lt_dlerror.
6912 (sysdep_dynl_init): switch to scm_lt_dlinit();
6913
6914 * Makefile.am (libguile_la_LIBADD): switch to use
6915 libguile-ltdl.la.
6916
6917 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6918
6919 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6920
6921 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6922 * scmsigs.c (got_signal): Removed.
6923 (signal_handler_cells, signal_handler_threads): New.
6924 (take_signal): Queue the cell of the signal for the specified
6925 thread. Reset the signal handler on systems that don't have
6926 sigaction.
6927 (sys_deliver_signals): Removed.
6928 (close_1): New.
6929 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6930 extended to also set the thread of a signal and allocate a cell
6931 for it. Keep the Scheme name "sigaction". Check that signum is
6932 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6933 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6934 (scm_init_scmsigs): Allocate signal_handler_cells and
6935 signal_handler_threads vectors.
6936
6937 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6938 that system asnycs and user asyncs are separated. Reimplemented
6939 system asyncs to work per-thread.
6940
6941 * gc.c (scm_init_gc): Do not use scm_system_async.
6942
6943 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6944 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6945 Removed prototypes.
6946 (scm_i_queue_async_cell): New.
6947
6948 * __scm.h (scm_asyncs_pending_p): Removed.
6949 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6950 scm_asyncs_pending_p.
6951
6952 * async.h (scm_system_async_mark_for_thread): New prototype.
6953
6954 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6955
6956 * root.h (scm_root_state): Added new "active_asyncs" slot.
6957 * root.c (scm_make_root): Initialize it to SCM_EOL.
6958
6959 * coop-defs.h (coop_t): Added new "handle" slot.
6960 * coop-threads.c (all_threads, scm_current_thread,
6961 scm_all_threads, scm_i_thread_root): New.
6962 (scm_threads_init): Add main thread to all_threads.
6963 (scheme_launch_thread): Remove thread from all_threads when it
6964 terminates.
6965 (scm_call_with_new_thread): Initialize handle slot of coop_t
6966 structure and add new thread to all_threads.
6967 (scm_spawn_thread): Likewise.
6968
6969 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6970 * threads.c (scm_current_thread, scm_all_threads): Register as
6971 primitives.
6972
6973 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6974
6975 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6976
6977 * script.c (scm_compile_shell_switches): Fix bad spelling of
6978 `explicitly' in comment.
6979
6980 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6981
6982 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6983 Refer to provided? in doc string rather than deprecated feature?.
6984
6985 2002-09-24 Gary Houston <ghouston@arglist.com>
6986
6987 * inline.h (scm_double_cell): prevent reordering of statements
6988 with any following code (for GCC 3 strict-aliasing).
6989 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6990 the earlier version of the reordering prevention.
6991
6992 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6993
6994 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6995
6996 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6997
6998 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6999 protection.
7000
7001 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7002
7003 * inline.h: include stdio.h
7004
7005 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
7006
7007 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7008
7009 * gc-segment.c (scm_i_make_initial_segment): check user settings
7010 for sanity.
7011
7012 * gc-malloc.c (scm_gc_init_malloc): check user settings for
7013 sanity.
7014
7015 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
7016
7017 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
7018
7019 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
7020 these won't ever wrap around with high memory usage. Thanks to
7021 Sven Hartrumpf for finding this.
7022
7023 * gc-freelist.c: include <stdio.h>
7024
7025 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
7026
7027 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
7028
7029 * vectors.h (SCM_VECTOR_REF): New.
7030
7031 * snarf.h (SCM_DEFINE_PUBLIC): New.
7032
7033 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
7034
7035 * socket.c (scm_addr_vector): Added size of address to arguments.
7036 Use it to avoid accessing a non-existent path in a sockaddr_un.
7037 Changed all callers.
7038
7039 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7040
7041 * gc.h: remove DOUBLECELL card flags.
7042
7043 * gc-malloc.c (scm_calloc): try to use calloc() before calling
7044 scm_realloc().
7045
7046 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
7047 init loop; handle this from scm_init_card_freelist()
7048
7049 * gc-card.c (scm_init_card_freelist): init bit vector here.
7050
7051 * numbers.c (scm_make_real): prevent reordering of statements
7052 num2float.i.c (FLOAT2NUM): idem
7053
7054 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7055
7056 * eval.h: prepend libguile/ to include path
7057
7058 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
7059
7060 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
7061 years. Thanks to Martin Grabmüller!
7062
7063 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7064
7065 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
7066 unsigned numbers for computing minimum heap increment. This
7067 prevents weird results when a a negative minimum increment is
7068 computed.
7069
7070 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
7071
7072 * gc_os_dep.c: When we have __libc_stack_end, use that directly
7073 instead of the old tricks.
7074
7075 * guile-snarf.in: Do not expect the input file to be the first
7076 argument after the optional "-o" option, just pass everything to
7077 the pre-processor without extracting the input file name.
7078
7079 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7080
7081 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
7082 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
7083
7084 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7085
7086 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
7087 Bill Schottstaedt for the bug report
7088
7089 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
7090
7091 * print.c (scm_iprin1): Print primitives generics always as
7092 "primitive-generic" even when they have no primitive methods yet.
7093
7094 2002-08-17 Gary Houston <ghouston@arglist.com>
7095
7096 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
7097 call.
7098
7099 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7100
7101 * ports.c (scm_add_to_port_table): small bugfix.
7102
7103 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
7104 malloc.
7105
7106 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
7107 only use SCM_MIN_HEAP_SEG_SIZE.
7108
7109 * ports.c (scm_add_to_port_table): add backwards compatibility
7110 function
7111
7112 * ports.h: use scm_i_ prefix for port table and port table size.
7113
7114 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
7115
7116 * vports.c (scm_make_soft_port): Initialize pt variable.
7117
7118 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
7119
7120 * strports.h (scm_c_eval_string_in_module,
7121 scm_eval_string_in_module): New prototypes.
7122 * strports.c (scm_eval_string_in_module): New, but use
7123 "eval-string" as the Scheme name and make second parameter
7124 optional.
7125 (scm_eval_string): Implement using scm_eval_string_in_module.
7126 (scm_c_eval_string_in_module): New.
7127 Thanks to Ralf Mattes for the suggestion!
7128
7129 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7130
7131 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
7132 message and abort.
7133
7134 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
7135
7136 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
7137 stead of scm_t_port*. The function now takes a tag argument.
7138
7139 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7140
7141 * gc.h: add scm_debug_cells_gc_interval to public interface
7142
7143 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
7144
7145 * gc.c (scm_i_expensive_validation_check): separate expensive
7146 validation checks from cheap ones.
7147
7148 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7149
7150 * read.c (scm_input_error): new function: give meaningful error
7151 messages, and throw read-error
7152
7153 * gc-malloc.c (scm_calloc): add scm_calloc.
7154
7155 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7156
7157 * tags.h: remove GC bits documentation from the tags table.
7158
7159 * read.c (INPUT_ERROR): Prepare for file:line:column error
7160 messages for errors in scm_lreadr() and friends.
7161
7162 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7163
7164 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
7165 implementation).
7166 (scm_gc_calloc): new function
7167
7168 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7169
7170 * ports.c (scm_new_port_table_entry): init port entry to 0
7171 completely.
7172
7173 * ports.c (scm_new_port_table_entry): change function from
7174 scm_add_to_port_table. This prevents cells with null-pointers from
7175 being exposed to GC.
7176
7177 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
7178 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
7179
7180 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
7181 to gc-stats.
7182
7183 * numbers.c (big2str): return "0" for 0 iso. ""
7184
7185 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
7186 private-gc.h: new file
7187
7188 * gc.c: completely revised and cleaned up the GC. It now uses lazy
7189 sweeping. More documentation in workbook/newgc.text
7190
7191 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7192
7193 * random.c (rstate_free): Return zero.
7194
7195 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7196
7197 * environments.c (remove_key_from_alist): Removed.
7198
7199 (obarray_remove): Simplified.
7200
7201 2002-07-24 Stefan Jahn <stefan@lkcc.org>
7202
7203 * continuations.h: ia64: Include <signal.h> before
7204 <sys/ucontext.h>.
7205
7206 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7207
7208 * modules.c (scm_sym2var): Don't compare SCM values with ==.
7209
7210 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7211
7212 * goops.c (scm_compute_applicable_methods): use
7213 scm_remember_upto_here_1 iso scm_remember_upto_here
7214
7215 * macros.c: include deprecation.h
7216
7217 * vectors.c (scm_vector_move_right_x): remove side effect in
7218 macro arg.
7219 (scm_vector_move_left_x): idem.
7220
7221 * net_db.c, posix.c, socket.c: variable naming: change ans to
7222 result.
7223
7224 * sort.c (scm_merge_vector_x): accept vector as argument
7225 iso. SCM*. This is needed for full GC correctness.
7226
7227 * gc.h: undo previous undocumented changes related to #ifdef
7228 GENGC.
7229
7230 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7231
7232 * *.c: add space after commas everywhere.
7233
7234 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
7235 Document cases where SCM_WRITABLE_VELTS() is used.
7236
7237 * vectors.h (SCM_VELTS): prepare for write barrier, and let
7238 SCM_VELTS() return a const pointer
7239 (SCM_VECTOR_SET): add macro.
7240
7241 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7242
7243 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
7244 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
7245 Deprecated the special kind of built-in dynamic syntax transformer
7246 that was inaccurately named "macro". Note: The built-in syntax
7247 transformers that are named "mmacro" or "memoizing-macro" still
7248 exist, and it is these which come much closer to what one would
7249 call a macro.
7250
7251 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
7252
7253 * eval.c (unmemocopy): Fix for
7254 1001-local-eval-error-backtrace-segfaults (unmemoization crash
7255 with internal definitions and local-eval).
7256
7257 2002-07-12 Gary Houston <ghouston@arglist.com>
7258
7259 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
7260 defined. They don't do anything useful, especially since the
7261 only case where DYNAMIC_LINKING is undefined seems to be
7262 when --with-modules=no is given to configure, which is basically
7263 requesting that the "dynamic linking module" be omitted.
7264
7265 * Makefile.am (libguile_la_SOURCES): move dynl.c from
7266 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
7267
7268 * extensions.c (load_extension): check DYNAMIC_LINKING for
7269 scm_dynamic_call.
7270 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
7271 scm_init_dynamic_linking.
7272
7273 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7274
7275 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7276 check for Cygwin when including <winsock2.h>, this is already
7277 check for by configure. Thus, revert change from 2002-07-07.
7278
7279 2002-07-10 Gary Houston <ghouston@arglist.com>
7280
7281 * eq.c: include <string.h>
7282 * dynl.c: docstring editing.
7283
7284 2002-07-09 Gary Houston <ghouston@arglist.com>
7285
7286 * dynl.c (scm_dynamic_call): docstring editing.
7287
7288 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7289
7290 * gc_os_dep.c: HURD fixes.
7291
7292 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7293
7294 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7295
7296 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7297 this should be compiled for BUILD host.
7298 Override default rule for
7299 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7300 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7301 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7302
7303 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7304 <winsock2.h> on Cygwin even when we have it.
7305
7306 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7307
7308 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7309 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7310 the code. Full number of arguments checking of closures is
7311 mandatory now. However, the option to disable the checking has
7312 most probably not been used anyway.
7313
7314 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7315
7316 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7317 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7318 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7319 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7320 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7321 (scm_source_properties, scm_set_source_properties_x,
7322 scm_source_property): Removed compile time option SCM_RECKLESS to
7323 clean up the code. Full number of arguments checking of closures
7324 is mandatory now. However, the option to disable the checking has
7325 most probably not been used anyway.
7326
7327 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7328 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7329
7330 2002-06-30 Gary Houston <ghouston@arglist.com>
7331
7332 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7333 do anything useful. Added a comment about need for a mutex if
7334 pre-emptive threading is supported.
7335
7336 * posix.c (scm_convert_exec_args), dynl.c
7337 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7338 allocate_string_pointers. 2) simplified: don't reallocate the
7339 strings, just make an array of pointers 3) avoid memory leaks on
7340 error 4) let the procedure report errors in its own name.
7341 Consequences: 1) the procedures now assume that SCM strings are
7342 nul-terminated, which should always be the case. 2) Since strings
7343 are not reallocated, it's now possible for strings passed to
7344 dynamic-args-call to be mutated.
7345
7346 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7347
7348 * __scm.h, eval.c, eval.h: Removed compile time option
7349 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7350 variable positions during memoization is mandatory. However, the
7351 option to disable the caching has most probably not been used
7352 anyway.
7353
7354 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7355
7356 * print.c (scm_simple_format): Print missing part of format before
7357 ~% control. Thanks to Daniel Skarda!
7358
7359 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7360
7361 * mkstemp.c: Added exception notice to license statement.
7362
7363 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7364
7365 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7366 it is represented as a floating point value so that we can change
7367 its sign.
7368
7369 From John W. Eaton <jwe@bevo.che.wisc.edu>
7370
7371 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7372
7373 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7374
7375 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7376 in addition to `i386'. Thanks to Dale P. Smith.
7377
7378 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7379
7380 * eq.c (real_eqv): New.
7381 (scm_eqv_p): Use it when comparing reals and complexes.
7382
7383 * numbers.c: Include <string.h>, for strncmp.
7384 (mem2complex): Do not create negative NaNs.
7385 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7386 NaN.
7387 (scm_inexact_to_exact): Signal error when converting a NaN.
7388
7389 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7390
7391 * posix.c (scm_putenv): Handle removing variables explicitely by
7392 calling unsetenv.
7393
7394 From John W. Eaton.
7395
7396 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7397 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7398 and scm_nan.
7399 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7400 [SCO && ! HAVE_ISINF] (isinf): New function.
7401 (xisinf, xisnan): New functions.
7402 (IS_INF): Delete.
7403 (isfinite): Define in terms of xisinf.
7404 (scm_inf_p, scm_nan_p): New functions.
7405 (guile_Inf, guile_NaN): New file-scope vars.
7406 (guile_ieee_init): New function.
7407 (scm_inf, scm_nan): New functions.
7408 (idbl2str): Handle Inf and NaN. Remove funny label and
7409 corresponding gotos.
7410 (ALLOW_DIVIDE_BY_ZERO): New macro.
7411 (scm_divide): Allow division by zero to occur if
7412 ALLOW_DIVIDE_BY_ZERO is defined.
7413 Handle bignums and ints as special cases.
7414
7415 Additional stuff by me:
7416
7417 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7418 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7419 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7420 NaN. They will provide their own sign.
7421 (scm_divide): Only allow divides by inexact zeros. Dividing by
7422 exact zeros still signals an errors.
7423
7424 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7425
7426 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7427 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7428 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7429 Thanks to Andreas Rottmann.
7430
7431 2002-04-20 Gary Houston <ghouston@arglist.com>
7432
7433 * removal of unused fields in root state (thanks to Christopher
7434 Cramer for pointing out the disuse.)
7435 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7436 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7437
7438 * root.c (root_mark): don't mark them.
7439 (scm_make_root): don't set them to #f.
7440 * init.c (scm_init_standard_ports): don't initialise with the
7441 default ports.
7442
7443 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7444
7445 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7446 cpp_sig_symbols.c.
7447
7448 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7449
7450 * guile-snarf.in: Do not clean input file. This would write to
7451 the $(srcdir) during a VPATH build, which is not allowed. It also
7452 isn't needed since it only works when an output filename has been
7453 specified and in that case we don't need to clean the input file
7454 because the output file will already exist.
7455
7456 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7457
7458 * guile-snarf: Install the trap for removing $cleanfile only when
7459 the value of $cleanfile is actually known.
7460
7461 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7462
7463 * .cvsignore: add versiondat.h and *.c.clean.c.
7464
7465 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7466
7467 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7468 function, replaces macro SRCBRKP.
7469
7470 (SRCBRKP): Deprecated.
7471
7472 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7473 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7474 temporary variable.
7475
7476 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7477
7478 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7479 CHECK_EXIT and removed all references to them.
7480
7481 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7482
7483 * debug.h (scm_ready_p, debug_print): Removed declarations.
7484
7485 * eval.c (EVALCELLCAR): Removed.
7486
7487 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7488 operation from condition.
7489
7490 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7491
7492 * guile-snarf.in: When the output filename is "-", write to
7493 stdout. When no "-o" option is given, use "-" as the output
7494 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7495 output file on error when the output file name is not "-". Define
7496 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7497
7498 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7499
7500 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7501
7502 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7503 and the corresponding goto statements. Removed redundant code.
7504
7505 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7506
7507 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7508 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7509 Re-enabled handing of rpsubrs and asubrs.
7510
7511 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7512
7513 * eval.c (SIDEVAL): Removed.
7514
7515 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7516 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7517 argument checking order for set! to locals, variables and symbols.
7518 Improvements to control structure. Removed some uses of arg1 and
7519 arg2 as temporary variables.
7520
7521 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7522
7523 * guile-snarf.in: Remove "--compat=1.4" support.
7524 Add "-d" and "-D" support.
7525
7526 (deprecated_list): New var.
7527 (compat_mode_clean_xxx): Delete.
7528 (grep_deprecated): New func.
7529 ("main"): If "-d" or "-D", call `grep_deprecated'.
7530
7531 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7532
7533 * hooks.h: Change scm_t_c_hookype_t everywhere to
7534 scm_t_c_hook_type.
7535
7536 Docstring fixes:
7537
7538 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7539
7540 * ports.c (scm_sys_make_void_port): Use `@file'.
7541
7542 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7543 than `else'.
7544
7545 * macros.c (scm_makmacro): Don't say that the form replaces its
7546 source, because it doesn't.
7547 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7548
7549 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7550 scm_select, scm_basename), goops.c (scm_method_generic_function),
7551 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7552 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7553 spelling mistakes.
7554
7555 * debug.c (scm_debug_options), eval.c
7556 (scm_eval_options_interface), read.c (scm_read_options): Change
7557 incorrect @var in docstring to @code.
7558
7559 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7560
7561 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7562
7563 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7564 guile-snarf can remove trailing non-init code.
7565
7566 * guile-snarf.in (modern_snarf): Remove everything following and
7567 including "^:^" from the output.
7568
7569 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7570
7571 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7572
7573 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7574
7575 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7576
7577 * guile-snarf.in: Update copyright.
7578 Rewrite to internalize error handling.
7579 Add "--compat=1.4" handling.
7580 Add commentary.
7581
7582 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7583 (snarfcppopts): New var.
7584 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7585 (.c.doc): Use $(snarfcppopts).
7586
7587 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7588 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7589 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7590 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7591 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7592 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7593 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7594 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7595 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7596 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7597 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7598 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7599 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7600 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7601
7602 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7603
7604 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7605 The next step will be to remove the union 't' and simplify the
7606 code of SCM_CEVAL that way.
7607
7608 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7609
7610 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7611 rreadfds, rwritefds, rexceptfds): Made static.
7612
7613 * gc.c (terminating), fports.c (terminating): Renamed
7614 scm_i_terminating.
7615
7616 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7617
7618 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7619 potential overflow problems. Thanks to John W Eaton!
7620
7621 * strop.c (string_capitalize_x): Treat characters as unsigned so
7622 that 8-bit chars work. Thanks to David Pirotte!
7623
7624 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7625
7626 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7627 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7628 proc as temporary variables. Introduced temporary variables with
7629 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7630 by a more explicit predicate in some places.
7631
7632 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7633
7634 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7635 Added lots of comments regarding the implementation of #@dispatch.
7636 Changed intra-procedure communication to use t.arg1 instead of
7637 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7638 variables. Introduced temporary variables with hopefully
7639 descriptive names for clarification. Replaced SCM_N?IMP by a more
7640 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7641 of computing the expression explicitly. Eliminate now unused
7642 label nontoplevel_cdrxbegin.
7643
7644 * goops.h (SCM_INSTANCE_HASH): New macro.
7645
7646 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7647
7648 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7649
7650 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7651 "guile-snarf" moved back from `noinst_SCRIPTS'.
7652
7653 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7654
7655 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7656 exists when adding a source property other than those that are
7657 handled explicitly, add the new property to the SRCPROPS obj's
7658 plist.
7659
7660 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7661 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7662
7663 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7664 debug.status. It isn't needed, and it can overflow the bits
7665 reserved for it (which may lead to a segv or a GC abort).
7666
7667 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7668
7669 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7670 side-effecting operations from conditions and macro calls.
7671 Replaced SCM_N?IMP by a more explicit predicate in some places.
7672 Minimized the scope of some variables.
7673
7674 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7675
7676 * convert.i.c: Fixed int <-> long conversions which would have
7677 failed if their sizes were different.
7678
7679 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7680
7681 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7682 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7683 as temporary variables. Removed side-effecting operations from
7684 conditions and macro calls. Introduced temporary variables with
7685 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7686 by a more explicit predicate in some places. Removed code that
7687 was conditionally compiled if SICP was defined - which it never
7688 is.
7689
7690 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7691
7692 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7693 Removed some uses of t.arg1 and proc as temporary variables.
7694 Removed side-effecting operations from conditions and macro calls.
7695 Introduced temporary variables with hopefully descriptive names
7696 for clarification. Replaced SCM_N?IMP by a more explicit
7697 predicate in some places.
7698
7699 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7700
7701 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7702 explicit predicate in some places.
7703
7704 (CHECK_EQVISH): Removed.
7705
7706 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7707 variables. Removed side-effecting operations from conditions and
7708 macro calls. Introduced temporary variables for clarification.
7709 Sorted if-else-if check for the type of the last form in a list by
7710 frequency. Avoided some unnecessary tail-recursion calls.
7711
7712 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7713
7714 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7715 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7716 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7717 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7718 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7719 naming scheme for types.
7720
7721 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7722 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7723 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7724 (scm_make_environment), eval.c (scm_closure), fports.c
7725 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7726 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7727 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7728 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7729 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7730 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7731 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7732 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7733 scm_alloc_cell to scm_cell.
7734
7735 * environments.c (core_environments_observe), gc.c
7736 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7737 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7738 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7739 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7740 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7741 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7742 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7743 scm_double_cell.
7744
7745 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7746
7747 * convert.i.c, convert.c: Better range checking.
7748
7749 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7750
7751 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7752 Windows (MinGW).
7753
7754 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7755
7756 * Makefile.am: Update path to pre-inst-guile automake frag.
7757
7758 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7759
7760 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7761 features are excluded.
7762
7763 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7764
7765 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7766
7767 2002-02-25 Gary Houston <ghouston@arglist.com>
7768
7769 * convert.c: include <string.h> for convert_i.c.
7770
7771 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7772
7773 * .cvsignore: add stamp-h1.
7774
7775 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7776
7777 * unif.c (scm_array_to_list): Correct name, which had been
7778 accidentally changed to scm_t_arrayo_list!
7779
7780 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7781
7782 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7783 underflowing scm_mallocated.
7784
7785 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7786
7787 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7788 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7789 Reimplemented using the new scm_gc_malloc, etc., functions and
7790 deprecated.
7791
7792 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7793
7794 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7795 to `noinst_PROGRAMS'.
7796 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7797 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7798
7799 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7800
7801 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7802 non-zero is returned from a port or smob free function.
7803 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7804 scm_gc_register_collectable_memory,
7805 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7806 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7807
7808 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7809 debug-malloc.c, dynl.c, environments.c, environments.h,
7810 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7811 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7812 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7813 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7814 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7815 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7816 appropriate. Return zero from smob and port free functions.
7817
7818 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7819
7820 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7821 messages while the GC is running.
7822 (scm_c_issue_deprecation_warning_fmt): New.
7823
7824 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7825 it is pointing to the putback buffer.
7826
7827 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7828
7829 * gsubr.c (create_gsubr): On "too many args" error,
7830 also display arg count and name. Thanks to Bill Schottstaedt.
7831
7832 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7833
7834 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7835
7836 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7837 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7838 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7839
7840 * guile-snarf-docs-texi.in: Bye bye.
7841
7842 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7843
7844 * symbols.c (scm_make_symbol): Fix typo in docstring.
7845
7846 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7847 scm_make_symbol): New prototypes.
7848
7849 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7850
7851 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7852 (SCM_SYMBOL_INTERNED_P): New.
7853 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7854 SCM_MAKINUM since hash values can well be bignums.
7855 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7856 This signals a interned symbol.
7857 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7858 scm_make_symbol): New.
7859
7860 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7861
7862 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7863
7864 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7865 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7866 Thanks to Dave Love.
7867
7868 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7869
7870 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7871 This might help to make unintended clashes less likely.
7872 (scm_string_to_symbol): Protect the string until the symbols is
7873 created.
7874
7875 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7876
7877 * convert.c, convert.h, convert.i.c: New files containing C
7878 array to Scheme conversion helpers meant to be replacement
7879 functions for the deprecated gh interface.
7880
7881 * Makefile.am: Setup rules for new `convert.*' files.
7882
7883 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7884
7885 * symbols.c (scm_c_symbol2str): New function, replacement for
7886 `gh_scm2newsymbol()'.
7887
7888 * strings.c (scm_c_substring2str): New function. Proper
7889 replacement for `gh_get_substr()'.
7890
7891 * socket.c: Include `stdint.h' if available for the `uint32_t'
7892 declaration.
7893
7894 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7895 compiler warning).
7896
7897 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7898
7899 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7900
7901 Other changes unrelated to Elisp...
7902
7903 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7904 "if".
7905 (comments): Fix a few typos.
7906 (scm_for_each): Add parentheses around oddly unparenthesized
7907 if/while conditions.
7908
7909 * read.c (scm_read_opts): Add full stop at end of doc for
7910 `keywords' option.
7911
7912 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7913 instead of gh_symbol2scm.
7914
7915 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7916 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7917
7918 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7919 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7920
7921 First batch of changes for Elisp support...
7922
7923 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7924 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7925 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7926
7927 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7928 conditionalize compilation and initialization of Elisp support
7929 function.
7930
7931 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7932 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7933 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7934 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7935 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7936 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7937 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7938 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7939 options.c (change_option_setting, scm_options), posix.c
7940 (environ_list_to_c), print.c (scm_iprlist), throw.c
7941 (scm_exit_status), vectors.c (scm_vector), weaks.c
7942 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7943
7944 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7945 just SCM_FALSEP.
7946
7947 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7948 of just SCM_BOOLP.
7949
7950 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7951 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7952 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7953 (scm_m_atfop): Support function aliasing. Support both function
7954 args, which need transformation, and macro args, which do not.
7955 Add explanatory comments.
7956 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7957 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7958 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7959 SCM_NULLP || SCM_NILP instead of checks against (removed)
7960 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7961 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7962
7963 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7964 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7965 these, but I don't want to remove them yet, just in case.
7966 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7967 Elisp nil value.
7968
7969 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7970 against (removed) scm_lisp_nil.
7971 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7972 (SCM_NULL_OR_NIL_P): New.
7973
7974 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7975 SCM_VALIDATE_NULL.
7976
7977 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7978 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7979 value).
7980
7981 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7982 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7983 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7984 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7985
7986 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7987 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7988 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7989 Numbering shifted down accordingly.
7990 (SCM_ELISP_NIL): New IFLAG.
7991
7992 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7993
7994 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7995
7996 * eval.c: Removed outdated references to "everr". Improved some
7997 comments.
7998
7999 (scm_deval_args, deval_args): Renamed scm_deval_args to
8000 deval_args, since it is not part of the interface.
8001
8002 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
8003 use references to debug.vect[0] before it exists. Add parentheses
8004 to switch statement.
8005
8006 * goops.h: Added local emacs variables.
8007
8008 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8009
8010 * eval.[ch] (scm_deval_args): Made static.
8011
8012 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
8013 test.
8014
8015 * strings.c (scm_c_string2str): Clarified comment. Replaced
8016 THINKME by FIXME for uniformness. Removed question about whether
8017 arguments need to be protected from garbage collection: Arguments
8018 must be protected as any other variable.
8019
8020 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8021
8022 * procs.h (SCM_CLOSURE_BODY): New Macro.
8023
8024 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
8025 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
8026 get_slot_value, set_slot_value), procs.c
8027 (scm_procedure_documentation), sort.c (closureless), stacks.c
8028 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
8029 SCM_CLOSURE_BODY.
8030
8031 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
8032
8033 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
8034
8035 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
8036 use "cp" instead.
8037
8038 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
8039
8040 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
8041 everywhere.
8042
8043 * continuations.c (scm_make_continuation): Do not retain the
8044 throw_value when the continuation is invoked.
8045
8046 2001-12-08 Stefan Jahn <stefan@lkcc.org>
8047
8048 * strings.c (scm_c_string2str): New function. Converts a
8049 given Scheme string into a C string. Also put in two
8050 THINKME's regarding the malloc policy for the missing converter
8051 routines.
8052
8053 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
8054
8055 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
8056 gh_symbol2scm.
8057
8058 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8059
8060 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
8061 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
8062
8063 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
8064 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
8065 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
8066 macros.
8067
8068 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
8069
8070 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
8071 SCM_GC_CELL_* macros when accessing free cells.
8072
8073 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
8074
8075 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
8076 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
8077 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
8078 * strings.h (SCM_MAKE_STRING_TAG): New.
8079 * procs.h (SCM_MAKE_CCLO_TAG): New.
8080 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
8081
8082 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
8083 !SCM_ENABLE_DEPRECATED.
8084
8085 * async.c, async.h (scm_system_async_mark_from_signal_handler):
8086 New.
8087
8088 * scmsigs.c (scm_take_signal): Removed all code that assumes that
8089 signal handlers are allowed to divert the flow of control. Call
8090 scm_system_async_mark_from_signal_handler instead of
8091 scm_system_async_mark.
8092
8093
8094 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
8095 scm_alloc_double_cell in their place.
8096
8097 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
8098 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
8099 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8100 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
8101 scm_deprecated_newcell and scm_deprecated_newcell2.
8102
8103 gc.c (scm_tc16_allocated): Only define when including deprecated
8104 features.
8105 (scm_debug_newcell, scm_debug_newcell2): Removed.
8106 (scm_init_storage): Do not initialize scm_tc16_allocated.
8107 (scm_init_gc): Do it here.
8108 (allocated_mark): New, from old code.
8109 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
8110
8111 * inline.c, inline.h: New files.
8112 * Makefile.am: Added them in all the right places.
8113
8114 * _scm.h: Include "libguile/inline.h".
8115
8116 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
8117 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
8118 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
8119 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
8120 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
8121 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
8122 scm_alloc_double_cell, respectively.
8123
8124 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
8125
8126 * modules.c (scm_c_use_module): Adapt to changes to
8127 `process-use-modules'.
8128
8129 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8130
8131 * numbers.c (scm_divide): Fix more division by zero errors.
8132
8133 2001-11-21 Gary Houston <ghouston@arglist.com>
8134
8135 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
8136 obsolete. autogen.sh says:
8137 invalid unused variable name: `OMIT_DEPENDENCIES'
8138
8139 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
8140
8141 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
8142 reporting the bug.
8143
8144 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
8145
8146 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
8147 Thanks to Eric Gillespie, Jr!
8148
8149 2001-11-21 Stefan Jahn <stefan@lkcc.org>
8150
8151 * win32-socket.c (getservent, setservent, endservent,
8152 getprotoent, setprotoent, endprotoent): New functions.
8153 Appropriate replacements for M$-Windows.
8154
8155 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
8156 these definitions for GUILE_DEBUG.
8157
8158 * net_db.c: Include "win32-socket.h" if compiling with a native
8159 M$-Windows compiler. Include some pieces of code (protoent and
8160 servent interface) protected by HAVE_* macros when using a
8161 native M$-Windows compiler.
8162
8163 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
8164
8165 * modules.c (scm_c_export): Do nothing when the first argument is
8166 already the terminating NULL. Thanks to Han-Wen Nienhuys!
8167
8168 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
8169
8170 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
8171 also include `buildstamp'.
8172
8173 2001-11-18 Rob Browning <rlb@defaultvalue.org>
8174
8175 * version.c
8176 (s_scm_major_version): use SCM_MAJOR_VERSION.
8177 (s_scm_minor_version): use SCM_MINOR_VERSION.
8178 (s_scm_micro_version): use SCM_MICRO_VERSION.
8179 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
8180 SCM_MICRO_VERSION.
8181
8182 * version.h.in
8183 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
8184 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
8185 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
8186
8187 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
8188
8189 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8190 Rewrite docstrings without reference to substring-move-left/right,
8191 since the latter no longer exist.
8192
8193 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8194
8195 * eval.c: Removed bogus comment about acros.
8196
8197 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
8198 Minimize scope of local variable. Eliminate dependency on
8199 macro DEBUG_EXTENSIONS.
8200
8201 (s_splicing): New error message string.
8202
8203 (scm_m_body): Issue 'bad body' message rather than 'missing
8204 expression' message.
8205
8206 (scm_m_quote): Eliminate unnecessary copying.
8207
8208 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
8209 checking of the body to scm_m_body.
8210
8211 (scm_m_do): Move comment to function header. Rename arg1 to
8212 binding. Made the code a bit easier to read.
8213
8214 (evalcar): Removed.
8215
8216 (iqq): Added a comment. Changed the depth parameter to
8217 unsigned. Use size_t for vector lengths. Make sure vector object
8218 is gc protected as long as its contents are read. Add some syntax
8219 checks. Get rid of unnecessary SCM_IMP test. Clean up the
8220 control structure a bit.
8221
8222 (scm_m_delay): Added comment about the implementation of
8223 scm_m_delay.
8224
8225 (scm_m_define): Add comment about guile's currying define
8226 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
8227 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
8228
8229 (scm_m_letrec1): Removed. Part of the functionality is taken
8230 over by the new function 'transform_bindings'.
8231
8232 (transform_bindings): New function. Takes over some of the
8233 functionality of removed function 'scm_m_letrec1', namely to split
8234 a list of bindings into a reversed list of variables and a list of
8235 initializers.
8236
8237 (scm_m_letrec): Call 'transform_bindings'.
8238
8239 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
8240 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
8241 test. Use 'transform_bindings'. Fixed scoping error with named
8242 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
8243 Jerram for suggesting the fix). Cleaned up the control structure
8244 a bit.
8245
8246 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
8247 unnecessary consing. Eliminated unnecessary
8248 SCM_DEFER/ALLOW_INTS.
8249
8250 (SCM_CEVAL): Un-obfuscated some loops.
8251
8252 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
8253
8254 * gc.h (scm_unhash_name): Old declaration removed.
8255
8256 * eval.c (s_scm_eval): Change @var{primitive-eval} to
8257 @code{primitive-eval}.
8258
8259 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
8260 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
8261 Change @deffnx lines in docstrings to say {Scheme Procedure}
8262 rather than primitive or procedure.
8263
8264 * posix.c (scm_execl), filesys.c (scm_close), unif.c
8265 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
8266 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
8267 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
8268 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
8269 (scm_string_split, scm_string_ci_to_symbol), strings.c
8270 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
8271 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8272 Docstring fixes and improvements reflecting edits that have been
8273 made in the reference manual source.
8274
8275 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8276 scm_object_property, scm_set_object_property_x): Remove invalid
8277 @deffnx lines for corresponding procedure property primitives.
8278
8279 These changes add a @deffnx C function declaration and function
8280 index entries for each Guile primitive to the copy of the doc
8281 snarf output that is used for reference manual synchronization.
8282 Online help is unchanged.
8283
8284 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8285 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8286 name to SCM_SNARF_DOCS.
8287
8288 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8289 snarf-check-and-output-texi.
8290
8291 * Makefile.am (guile-procedures.texi): New rule.
8292 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8293 Changed so that the last stage of doc snarfing is now performed
8294 twice, once to produce guile-procedures.txt for online help, and
8295 once to produce guile.texi for reference manual synchronization.
8296
8297 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8298
8299 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8300 safely usable as a single statement followed by a ';', for example
8301 in an if statement.
8302
8303 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8304
8305 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8306
8307 * random.c (scm_random_solid_sphere_x,
8308 scm_random_hollow_sphere_x): Correct "shere" typos.
8309
8310 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8311
8312 * version.c (scm_version): Update docstring to include
8313 `micro-version'.
8314
8315 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8316
8317 * modules.c (scm_c_export): Call va_end after collecting the
8318 symbols.
8319
8320 * strop.h, strop.c (scm_substring_move_left_x,
8321 scm_substring_move_right_x): Removed.
8322
8323 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8324 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8325 configure does.
8326
8327 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8328
8329 * numbers.c: Document macros to define when including
8330 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8331 now rely on SIZEOF_ macros that have been figured out at
8332 configure time.
8333
8334 * num2integral.i.c: Adapt to new interface.
8335 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8336 target type by casting it and checking whether it is still the
8337 same. Do not try to handle bignums for integral types that are
8338 smaller than fixnums. When handling bignums, collect the
8339 magnituse first into a unsigned type, and correctly check for
8340 overflow.
8341 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8342 only -MIN_VALUE can still be negative of all negative numbers (in
8343 twos-complement).
8344
8345 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8346
8347 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8348 HAVE_LONG_LONG depending on whether their size is non-zero.
8349
8350 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8351
8352 * strop.c (scm_string_null_p): Docfix; nfc.
8353 Thanks to Scott Lenser.
8354
8355 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8356
8357 * extensions.c (scm_load_extension): Canonicalize docstring
8358 whitespace.
8359
8360 * unif.c (scm_uniform_array_write), ports.c
8361 (scm_current_output_port, scm_force_output), dynwind.c
8362 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8363 filesys.c (scm_open, scm_lstat), struct.c
8364 (scm_make_struct_layout), random.c (scm_random,
8365 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8366 (scm_i_index): Remove superfluous whitespace from end of docstring
8367 lines.
8368
8369 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8370 strings.c (scm_make_string), variable.c (scm_make_variable,
8371 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8372 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8373 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8374 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8375 newline at end of docstrings.
8376
8377 * modules.c (scm_set_current_module): Add missing newline to
8378 docstring.
8379
8380 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8381
8382 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8383 and makes them available through Guile. That is because the
8384 Winsock-API does not store its errors in `errno' and thus cannot
8385 return error messages via `strerror (errno)'.
8386
8387 * socket.c (scm_init_socket): Initialize `win32-socket' part
8388 here under M$-Windows.
8389
8390 * numbers.h: Added missing declaration of
8391 `scm_sys_check_number_conversions()'.
8392
8393 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8394 and use in `(strerror)' and `(system-error)'.
8395
8396 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8397 `win32-socket.[ch]' to extra source and header files.
8398
8399 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8400
8401 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8402 a call to turn-on-debugging when --debug has been given instead of
8403 turning it on directly. Also, handle new `--no-debug' option,
8404 which might suppress the call to turn-on-debugging.
8405
8406 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8407
8408 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8409
8410 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8411
8412 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8413 here (was at guile_LDADD) which describes the dependency
8414 correctly and allows a clean build on Win32.
8415
8416 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8417 into FOO.
8418
8419 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8420 import macros for external libraries (libcrypt, libqthreads,
8421 libreadline and libregex).
8422
8423 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8424
8425 * posix.c (flock): Added support for flock() in M$-Windows.
8426
8427 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8428 of __SCM_IMPORT__.
8429
8430 * fports.c (getflags): Differentiate reading and writing pipes
8431 descriptors.
8432
8433 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8434 M$-Windows.
8435
8436 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8437 conditionalized error code if `ETIMEDOUT' is not available.
8438 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8439 timeout'.
8440
8441 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8442 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8443 each inclusion of `num2integral.i.c'.
8444 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8445
8446 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8447
8448 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8449 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8450
8451 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8452
8453 * print.c (scm_iprin1): Mark print state as revealed when
8454 dispatching to generic write or display.
8455
8456 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8457
8458 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8459
8460 Support for native Win32. Thanks to Stefan Jahn!
8461
8462 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8463 and win32-dirent.h to extra source and header files. These
8464 include the uname() and the POSIX dirent interface implementation
8465 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8466 linkers which do not allow unresolved symbols inside shared
8467 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8468 dependency.
8469
8470 * __scm.h: Defined SCM_API. This macro gets prepended to all
8471 function and data definitions which should be exported or imported
8472 in the resulting dynamic link library in the Win32 port.
8473
8474 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8475 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8476 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8477 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8478 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8479 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8480 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8481 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8482 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8483 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8484 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8485 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8486 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8487 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8488 vports.h, weaks.h:
8489 Prefixed each each exported symbol with SCM_API.
8490
8491 * continuations.c: Added comment about the use of the extern
8492 declarations of {get,set}context() functions used in the ia64 port.
8493
8494 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8495 is meant to be a `unsigned long *'.
8496
8497 * filesys.c: Include `direct.h' if possible. Use local
8498 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8499 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8500 able to differentiate between sockets and other file descriptors.
8501 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8502 `scm_dirname()'.
8503
8504 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8505 statement block in `scm_fport_buffer_add()'.
8506 Some corrections in `getflags()'.
8507
8508 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8509
8510 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8511 build on Win32. Disable preloaded symbols on Win2 platforms.
8512
8513 * ioext.c, ports.c: Include `io.h' is possible.
8514
8515 * mkstemp.c: Include `process.h' is possible.
8516
8517 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8518 too.
8519 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8520
8521 * posix.c: Remove unnecessary dirent includes and defines. Include
8522 local `win32-uname.h' for MinGW. Extern declaration of
8523 `mkstemp()' for systems where it does not exists. Make
8524 `getlogin()' available on M$-Windows.
8525
8526 * scmsigs.c: Made `usleep()' avalable on MinGW.
8527
8528 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8529
8530 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8531
8532 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8533
8534 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8535
8536 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8537 Don't apply scm_uniform_vector_length on arrays.
8538
8539 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8540
8541 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8542 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8543 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8544 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8545 scm_list_<n> over scm_cons[2]?.
8546
8547 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8548 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8549 SCM_C[AD][AD]R instead of explicit form.
8550
8551 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8552 comparison parameters.
8553
8554 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8555 !SCM_NULLP instead of SCM_NIMP.
8556
8557 (scm_m_case): Don't copy the form. Renamed proc to clause and
8558 minimized its scope. Renamed x to clauses. Removed side
8559 effecting operation from macro call.
8560
8561 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8562 minimized its scope. Renamed x to clauses. Minimized the scope
8563 of variable 'len'. Make sure the else clause is treated specially
8564 even in case of '=>' occurences. Don't change the else to #t in
8565 order to be able to distinguish this case in the evaluator. Leave
8566 type checking of the recipient to the evaluator.
8567
8568 (scm_c_improper_memq): Made the comment somewhat clearer.
8569
8570 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8571 test for SCM_IM_LET at the place of the formal parameters.
8572 Simplified the formal parameter checking.
8573
8574 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8575 Renamed arg1 to binding and minimized its scope. Eliminated
8576 unnecessary consing.
8577
8578 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8579 variable 'len'.
8580
8581 (build_binding_list): New static function.
8582
8583 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8584 Further, split up the 'letrec' unmemoizing code to the
8585 corresponding parts for 'do', 'let' and 'letrec', adding comments
8586 to each form. Cleanup the handling of the do form (This removes
8587 some *real* code :-).
8588
8589 (SCM_CEVAL): Removed side effecting operation from macro call.
8590 Handle the 'else clause of the 'cond form specially - the symbol
8591 'else is not replaced with #t any more.
8592
8593 2001-10-14 Gary Houston <ghouston@arglist.com>
8594
8595 * version.c (scm_version): use sprintf instead of snprintf,
8596 for portability. thanks to Bill Schottstaedt.
8597
8598 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8599
8600 * read.c (scm_lreadr): When user-defined hash procedure returns
8601 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8602 an exception. (This prevents parsing of uniform vectors from
8603 interfering with parsing of numbers.)
8604
8605 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8606
8607 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8608 PTRDIFF_MIN. Thanks to Ken Raeburn.
8609
8610 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8611
8612 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8613
8614 * eval.c (scm_m_atbind): First try to find the variable without
8615 defining it locally; when it has not been found, define it
8616 locally.
8617
8618 * modules.c (module_variable): Pass over variables that exist but
8619 are unbound.
8620
8621 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8622
8623 * backtrace.c (display_backtrace_file_and_line): Only use
8624 scm_basename when POSIX support is compiled in. Thanks to Chris
8625 Cramer.
8626
8627 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8628
8629 * numbers.c (mem2uinteger): Return number read so far when coming
8630 across a hexdigit after having read a # or if not reading a hex
8631 value. This will enable the calling code to correctly handle
8632 forms like 1e2. (The background is, that the exponent markers d,
8633 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8634 providing this patch.
8635
8636 (mem2complex): Fix erroneous double-negation. Now, numbers like
8637 1-i will be read correctly.
8638
8639 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8640
8641 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8642
8643 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8644
8645 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8646
8647 * print.c (scm_print_state_vtable, print_state_pool):
8648 Initialize. These variables are now registered as gc roots.
8649
8650 (scm_current_pstate): Update documentation.
8651
8652 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8653 scm_prin1, scm_init_print): print_state_pool is registered as a
8654 gc root and thus does not need to be protected by a surrounding
8655 pair any more.
8656
8657 (make_print_state): The car of print_state_pool no longer holds
8658 the scm_print_state_vtable.
8659
8660 (scm_current_pstate, scm_make_print_state, print_circref,
8661 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8662 SCM_N<foo>.
8663
8664 (scm_prin1): When building lists, prefer scm_list_<n> over
8665 scm_cons[2]?.
8666
8667 (scm_iprlist): Removed a redundant SCM_IMP test.
8668
8669 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8670
8671 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8672
8673 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8674
8675 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8676 scm_list_<n> over scm_cons[2]?.
8677
8678 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8679
8680 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8681
8682 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8683 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8684 for some reason his patch didn't make it into the cvs.
8685
8686 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8687
8688 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8689 little bit - should even be somewhat more accurate now.
8690
8691 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8692
8693 * gc.c: support ia64 register backing store.
8694 (SCM_MARK_BACKING_STORE): new macro.
8695
8696 * continuations.h: support ia64 register backing store.
8697 (struct scm_t_contregs): add ia64 register backing store.
8698
8699 * continuations.c: support ia64 register backing store.
8700 (continuation_mark): mark ia64 register backing store.
8701 (continuation_free): free ia64 register backing store.
8702 (scm_make_continuation): capture ia64 register backing store.
8703 (copy_stack_and_call): copy ia64 register backing store.
8704
8705 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8706
8707 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8708 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8709 instead of SCM_NIMP to test for that case.
8710
8711 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8712 scm_t_bits instead of long.
8713
8714 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8715
8716 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8717 SCM_T_SIGNED_BITS_MIN): New.
8718 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8719 Use them to make these macros computable by the preprocessor.
8720
8721 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8722 whether the integral type fits in a fixnum, not the compiler.
8723 This removes a spurious compiler warning. Also, honor the
8724 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8725 needed for `long long's.
8726
8727 * numbers.c: Define NO_PREPRO_MAGOC when including
8728 num2integral.c.i for `long long' and `signed long long'.
8729
8730 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8731
8732 These changes fixes a race condition in the Guile coop - pthread
8733 compatibility code.
8734
8735 * coop.c (mother_awake_p): New variable.
8736 (coop_create): Set mother_awake_p before creating or signalling
8737 mother; wait until mother is going to sleep before returning.
8738 (mother): Reset mother_awake_p before going to sleep.
8739
8740 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8741
8742 * options.c (protected_objects, scm_init_options): The content of
8743 protected_objects is now protected from garbage collection using
8744 scm_gc_register_root instead of scm_permanent_object.
8745
8746 (get_option_setting): New static function that computes an option
8747 setting as it was formerly done in the function scm_options.
8748
8749 (get_documented_option_setting): New static function that
8750 returns option documentation as it was formerly done in the
8751 function scm_options. Note that documentation C strings are no
8752 longer precomputed into SCM objects. Instead, they are converted
8753 into SCM strings every time get_documented_option_setting is
8754 called.
8755
8756 (change_option_setting): New static functions that modifies the
8757 option setting as it was formerly done in the function
8758 scm_options. The function is now exception safe, i. e. won't
8759 cause a memory leak when interrupted. Further, only non-immediate
8760 option values are added to the protection list.
8761
8762 (scm_options): This function now has only the purpose to dispatch
8763 to to get_option_setting, get_documented_option_setting or
8764 change_option_setting, depending on the arguments given to
8765 scm_options.
8766
8767 (scm_init_opts): Don't convert documentation C strings into SCM
8768 strings. Further, don't protect any object values: They _must_
8769 be immediate values, otherwise there is no guarantee that they
8770 have not been collected before anyway.
8771
8772 * options.[ch] (scm_t_option): Made type unsigned, name into a
8773 constant char* and val into a scm_t_bits type.
8774
8775 (scm_options, scm_init_opts): The number of options is guaranteed
8776 to be larger or equal to zero. Thus, the type is changed to
8777 unsigned.
8778
8779 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8780
8781 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8782 testing an unsigned value for being >= 0.
8783
8784 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8785
8786 * numbers.h: Removed old comment about using SCM_CAR to access
8787 non-pair cells.
8788
8789 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8790 the return value is signed. Thanks to Brian Crowder for the bug
8791 report.
8792
8793 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8794 values. With this patch, SCM_SRS can be safely used for other
8795 types than scm_t_signed_bits. However, it should still better be
8796 an internal macro and thus be renamed to SCM_I_SRS.
8797
8798 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8799
8800 2001-10-03 Gary Houston <ghouston@arglist.com>
8801
8802 * continuations.h, unif.h: in the descriptions of the bit patterns
8803 of the heap cells, make bit 0 the least significant.
8804
8805 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8806
8807 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8808 Thanks to Golubev I. N.
8809
8810 2001-09-25 Gary Houston <ghouston@arglist.com>
8811
8812 * ports.c (scm_drain_input): extended the docstring. thanks to
8813 Alex Schroeder and Thien-Thi Nguyen.
8814
8815 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8816
8817 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8818 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8819 macros. (The NUM names might soon change.)
8820
8821 * numbers.h: Added missing declarations.
8822
8823 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8824
8825 * Makefile.am: Distribute num2float.i.c.
8826
8827 * num2float.i.c: New file, multiply included by numbers.c, used
8828 to "templatize" the float <-> num conversion routines.
8829
8830 * numbers.c: New functions: scm_num2float, scm_float2num,
8831 scm_num2double, scm_double2num.
8832
8833 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8834
8835 * .cvsignore: really add version.h
8836
8837 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8838 Otherwise it fails on the alpha. However, we might rather choose
8839 this size conditionally.
8840
8841 * numbers.c (scm_gcd): change "k" to a long from an int.
8842 Otherwise it fails on the alpha. However, we might rather choose
8843 this size conditionally.
8844
8845 * error.c (scm_wta): coerce char* to intptr_t before int
8846 assignment.
8847
8848 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8849 int.
8850
8851 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8852
8853 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8854
8855 * numbers.c (scm_integer_expt): Accept inexact integer in second
8856 argument. (Thanks to Bill Schottstaedt.)
8857
8858 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8859
8860 * .cvsignore: add version.h
8861
8862 * versiondat.h.in: removed (obsolete).
8863
8864 * version.h.in: renamed from version.h.
8865 (SCM_GUILE_MAJOR_VERSION): new public macro.
8866 (SCM_GUILE_MINOR_VERSION): new public macro.
8867 (SCM_GUILE_MICRO_VERSION): new public macro.
8868
8869 * version.h: renamed to version.h.in.
8870
8871 * version.c
8872 (scm_major_version): support integer *_VERSION macros.
8873 (scm_minor_version): support integer *_VERSION macros.
8874 (scm_micro_version): support integer *_VERSION macros.
8875 (scm_version): support integer *_VERSION macros.
8876
8877 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8878
8879 * error.c, error.h: Made error keys globally accessible.
8880 Applications might want to test for these or use them in a direct
8881 call to scm_error.
8882
8883 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8884 routines are passed an inexact. This change in behavior is
8885 motivated by concordance with R5RS: It is more common that a
8886 primitive doesn't want to accept an inexact for an exact.
8887
8888 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8889
8890 The following patch partially undoes my patch from 2001-06-30,
8891 where I added the function scm_gc_mark_cell_conservatively. The
8892 function is buggy, since it breaks guile during conservative
8893 marking if a pointer on the stack points directly into the list of
8894 free cells on the heap: With conservative cell marking this will
8895 cause the whole free list to be scanned and marked - boom!
8896
8897 * gc.c (allocated_mark, MARK, heap_segment,
8898 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8899 (scm_gc_mark_cell_conservatively): Remove function
8900 scm_gc_mark_cell_conservatively and update the corresponding
8901 comments and uses accordingly. Thanks to Christopher Cramer for
8902 the patch. (Minor corrections by me.)
8903
8904 2001-09-15 Gary Houston <ghouston@arglist.com>
8905
8906 * root.h (scm_root_state): removed the continuation_stack and
8907 continuation_stack_ptr members, which have no apparent purpose.
8908 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8909 removed.
8910
8911 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8912 (scm_igc): remove all references to contination_stack and
8913 continuation_stack_ptr, avoiding allocation of a vector and
8914 useless processing during gc.
8915
8916 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8917
8918 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8919
8920 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8921
8922 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8923
8924 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8925
8926 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8927 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8928
8929 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8930
8931 * guardians.c (mark_dependencies_in_tconc,
8932 whine_about_self_centered_zombies, scm_init_guardians): Register
8933 the static global variable `self_centered_zombies' via
8934 scm_gc_register_root, to make some cdr-ing unnecessary.
8935
8936 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8937
8938 * backtrace.c (display_backtrace_file,
8939 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8940 values, use SCM_FALSEP when comparing SCM values against #f.
8941 Thanks to Rob Browning for the bug report.
8942
8943 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8944
8945 * strings.[ch] (scm_str2string): New function.
8946
8947 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8948
8949 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8950 when computing nm, even if it's negative.
8951 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8952 (scm_must_realloc): Likewise.
8953
8954 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8955
8956 * numbers.c (scm_sys_check_number_conversions): new function,
8957 defined if Guile is compiled in debugging mode. currently checks
8958 `scm_num2ulong', should check much much more.
8959
8960 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8961 unsigned, ensure that it's positive. thanks to Martin Baulig!
8962
8963 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8964
8965 * __scm.h: Added new section about compile time selectable
8966 features.
8967
8968 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8969 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8970 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8971 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8972 Removed.
8973
8974 * deprecation.c (scm_include_deprecated_features): Simplified.
8975
8976 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8977 `SCM_IMP' instead of `!SCM_CELLP´.
8978
8979 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8980 Extract side-effecting operations from macros.
8981
8982 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8983 scm_top_level_lookup_closure_var and scm_system_transformer.
8984
8985 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8986
8987 (heap_segment): Use CELL_P instead of SCM_CELLP.
8988
8989 * init.c (start_stack): Don't initialize
8990 scm_top_level_lookup_closure_var and scm_system_transformer.
8991
8992 * modules.c (scm_set_current_module): Don't access
8993 scm_top_level_lookup_closure_var and scm_system_transformer.
8994
8995 (scm_sym2var): Don't call scm_variable_set_name_hint.
8996
8997 (scm_post_boot_init_modules): Removed deprecated initializations.
8998
8999 * print.c (scm_ipruk): Don't access cell contents of non cells.
9000
9001 * strings.c (scm_string_set_x): All strings are writable.
9002
9003 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
9004 type. There is only one string type now.
9005
9006 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
9007
9008 * tags.h: Remove comments about two different string types.
9009
9010 (SCM_CELLP, SCM_NCELLP): Deprecated.
9011
9012 * variable.c (make_variable): Remove code variant for vcells.
9013
9014 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
9015 SCM_VARIABLE_LOC): Remove code variant for vcells.
9016
9017 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
9018 SCM_ENABLE_DEPRECATED with the logic reversed.
9019
9020 * dynl.c (moddata, registered_mods), dynl.[ch]
9021 (scm_register_module_xxx, scm_registered_modules,
9022 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
9023 (*top-level-lookup-closure*), eval.[ch]
9024 (scm_top_level_lookup_closure_var, scm_system_transformer,
9025 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
9026 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
9027 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
9028 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
9029 scm_unprotect_object), modules.c (root_module_lookup_closure,
9030 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
9031 beautify_user_module_x_var, try_module_autoload_var,
9032 scm_module_full_name), modules.[ch] (scm_the_root_module,
9033 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9034 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
9035 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
9036 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
9037 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
9038 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
9039 scm_make_shared_substring), tags.h (scm_tc7_substring,
9040 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
9041 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
9042 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
9043 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
9044 Removed.
9045
9046 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
9047 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
9048 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
9049 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
9050 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
9051 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9052 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
9053 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
9054 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
9055 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
9056 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
9057 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
9058 (setzone, scm_strftime, scm_strptime), vports.c
9059 (scm_make_soft_port): Remove calls to
9060 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
9061 gone, all strings are 0-terminated anyway.
9062
9063 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
9064 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
9065 double inclusion of the same headers to the SCM_<filename>_H
9066 format.
9067
9068 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
9069 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
9070 print.c (scm_iprin1): The type scm_tc7_substring does not exist
9071 any more.
9072
9073 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
9074 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
9075 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
9076 !SCM_<foo> over SCM_N<foo>.
9077
9078 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9079
9080 * Makefile.am: Remove references to symbols-deprecated.c.
9081
9082 * symbols.c (scm_init_symbols): Don't initialize deprecated
9083 symbol functions.
9084
9085 * symbols-deprecated.c: Removed.
9086
9087 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
9088 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
9089 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
9090 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
9091 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
9092 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
9093 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
9094 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
9095 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
9096 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
9097 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
9098 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
9099 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
9100 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
9101 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
9102 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
9103 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
9104 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
9105 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
9106 scm_intern0, scm_sysintern, scm_sysintern0,
9107 scm_sysintern0_no_module_lookup, scm_symbol_value0,
9108 scm_string_to_obarray_symbol, scm_intern_symbol,
9109 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
9110 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
9111 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
9112 vectors.[ch] (scm_vector_set_length_x): Removed.
9113
9114 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
9115 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
9116 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
9117 Renamed the macros that are defined to inhibit double inclusion of
9118 the same headers to the SCM_<filename>_H format.
9119
9120 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
9121 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
9122 SCM_N<foo>.
9123
9124 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9125
9126 * continuations.h (scm_contregs), debug.h (scm_debug_info,
9127 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
9128 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
9129 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
9130 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
9131 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
9132 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
9133 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
9134 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
9135 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
9136 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
9137 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
9138
9139 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
9140 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
9141 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
9142 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
9143 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
9144 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
9145 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
9146 double inclusion of the same headers to the SCM_<filename>_H
9147 format.
9148
9149 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
9150 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
9151 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
9152 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
9153 !SCM_<foo> over SCM_N<foo>.
9154
9155 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
9156
9157 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
9158 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
9159 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
9160 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
9161 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
9162 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
9163 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
9164 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
9165 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
9166 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
9167 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
9168 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
9169 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
9170 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
9171 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
9172 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
9173 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
9174 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
9175 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
9176 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
9177 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
9178 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
9179 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
9180 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
9181 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
9182 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
9183 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
9184 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
9185 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
9186 the macros that are defined to inhibit double inclusion of the
9187 same headers to the SCM_<filename>_H format.
9188
9189 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
9190
9191 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
9192 "scm_t_portable" with "scm_port_table" which was an artifact from
9193 the great "scm_*_t -> scm_t_" renaming.
9194
9195 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
9196
9197 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
9198 used; nfc. Thanks to Bill Schottstaedt.
9199
9200 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
9201 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
9202 Thanks to Chris Cramer.
9203
9204 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
9205
9206 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
9207
9208 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
9209 dynamic scope.
9210 * dynwind.h (scm_swap_bindings): Declare.
9211 * dynwind.c (scm_swap_bindings): Make non-static.
9212
9213 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
9214
9215 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
9216 doing exactly nothing about them). thanks Neil!
9217
9218 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
9219
9220 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
9221
9222 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
9223
9224 * gc.c: Fix omission bug: Add `heap_segment' forward decl
9225 (proto) in the case when either `GUILE_DEBUG' or
9226 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
9227
9228 (map_free_list): Fix typo: Ref `f' correctly.
9229
9230 Thanks to Chris Cramer.
9231
9232 2001-08-15 Rob Browning <rlb@defaultvalue.org>
9233
9234 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
9235 variables.
9236 (libpath.h): change libguileversion to libguileinterface.
9237
9238 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
9239
9240 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
9241 ChangeLog-2000. Thanks to Daniel Skarda!
9242
9243 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
9244
9245 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
9246 do it from the Makefile.
9247
9248 * Makefile.am: rearrange the snarfing slightly, so that .doc files
9249 are of a reasonable size.
9250
9251 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
9252
9253 * stacks.c (scm_make_stack): Improve docstring by explaining use
9254 of cutting args.
9255
9256 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
9257
9258 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
9259 scm_char_whitespace_p, scm_char_upper_case_p,
9260 scm_char_lower_case_p, scm_char_is_both_p): Do not require
9261 characters to fulfill isascii in addition to the primary
9262 predicate.
9263
9264 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9265
9266 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
9267 scm_istr2flo, scm_istring2number): Removed.
9268
9269 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
9270 SCM_SLOPPY_<foo>.
9271
9272 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9273 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9274 Added.
9275
9276 (scm_string_to_number): Use new number parser.
9277
9278 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9279 handles complex numbers.
9280
9281 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9282 SCM_<foo>_H.
9283
9284 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9285 SCM_N<pred>.
9286
9287 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9288
9289 (scm_i_mem2number): Added.
9290
9291 (scm_exact_to_inexact): Changed signature.
9292
9293 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9294 here instead of within scm_i_mem2number. Call scm_i_mem2number
9295 instead of scm_istr2int and scm_istring2number.
9296
9297 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9298
9299 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9300 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9301 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9302 !SCM_<pred> over SCM_N<pred>.
9303
9304 (scm_eval_body): Remove side effecting code from macro call.
9305
9306 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9307 SCM_NIMP test.
9308
9309 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9310
9311 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9312
9313 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9314
9315 Removed vcell slot from structs.
9316
9317 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9318 subsequent indices.
9319
9320 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9321 zero. Use scm_vtable_index_layout instead of "0" when accessing
9322 said slot.
9323 (scm_init_struct): Remove vcell slot layout code from
9324 required_vtable_fields.
9325
9326 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9327
9328 * goops.c (build_class_class_slots): Removed vcell slot
9329 definition.
9330
9331 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9332 Removed vcell slot layout code.
9333 (scm_si_vcell): Removed.
9334
9335 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9336
9337 "Glocs" have been removed.
9338
9339 * tags.h: Update tag system docs.
9340 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9341 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9342 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9343 or SCM_NCONSP, respectively.
9344
9345 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9346 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9347 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9348
9349 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9350 tell glocs from structs.
9351
9352 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9353
9354 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9355 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9356 instead of with glocs.
9357 (EVALCAR): Do not test for glocs.
9358 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9359 condition.
9360 (scm_unmemocar): Do not handle glocs.
9361 (scm_m_atfop): Memoize as a variable, not as a gloc.
9362 (scm_eval_args, scm_deval_args): Do not handle glocs.
9363 (scm_ceval, scm_deval): Likewise.
9364
9365 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9366 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9367 Removed.
9368
9369 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9370
9371 * dynwind.c (scm_swap_bindings): Likewise.
9372 (scm_dowinds): Updated to recognize lists of variables instead of
9373 lists of glocs.
9374
9375 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9376
9377
9378 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9379 where it is needed.
9380
9381 2001-07-25 Gary Houston <ghouston@arglist.com>
9382
9383 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9384 docstrings to reflect the n-ary implementation.
9385
9386 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9387
9388 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9389 value of a variable, not the plain "return" statement.
9390
9391 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9392
9393 * eval.c: Allow variables in memoized code (in addition to glocs).
9394 (scm_lookupcar): Handle variables in lost races. Replace symbol
9395 with variable directly, do not make a gloc.
9396 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9397 like glocs.
9398 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9399 the main switch.
9400
9401 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9402
9403 * variable.c (scm_i_variable_print): Use "value" instead of
9404 "binding" since a binding is the mapping between symbols and
9405 variables, not between variables and their values.
9406
9407 * tags.h (scm_tc7_variable): New.
9408 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9409 * print.c (scm_iprin1): Likewise.
9410
9411 * variable.h (scm_tc16_variable): Removed.
9412 (SCM_VARIABLEP): Test for new tc7 code.
9413 (scm_i_variable_print): New.
9414 * variable.c (scm_tc16_variable): Removed.
9415 (variable_print): Renamed to scm_i_variable_print and made
9416 non-static.
9417 (variable_equal_p): Removed.
9418 (make_variable): Construct a tc7 object instead of a smob.
9419 (scm_init_variable): Do not register smob.
9420
9421 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9422
9423 * tags.h: Include inttypes.h when we have it.
9424
9425 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9426
9427 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9428 is taken by the new SCM_IM_CALL_WITH_VALUES.
9429 * print.c (scm_isymnames): Update table accordingly.
9430
9431 2001-07-22 Gary Houston <ghouston@arglist.com>
9432
9433 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9434 SCM_MAKINUM to convert regoff_t value to SCM.
9435
9436 2001-07-21 Gary Houston <ghouston@arglist.com>
9437
9438 * scmsigs.c: include sys/time.h for itimer stuff.
9439
9440 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9441
9442 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9443
9444 * c-tokenize.lex: add option %nounput to quiet warning.
9445 Add prototype for yylex to quiet warning.
9446
9447 * scmconfig.h.in: add flags for setitimer and getitimer.
9448
9449 * scmsigs.h (scm_init_scmsigs): new prototype.
9450 (scm_init_scmsigs): new prototype.
9451
9452 * scmsigs.c (s_scm_setitimer): new function.
9453 (s_scm_setitimer): new function.
9454
9455 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9456
9457 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9458 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9459 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9460 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9461 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9462 guile-func-name-check.in, guile-snarf-docs-texi.in,
9463 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9464 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9465 objprop.c, objprop.h, options.c, options.h, random.h,
9466 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9467 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9468 version.c, version.h: Updated copyright notice.
9469
9470 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9471
9472 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9473 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9474 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9475 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9476 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9477 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9478 sym_environment, scm_sym_change_class): New static variables to
9479 hold predefined symbols.
9480
9481 (build_class_class_slots): Build the list using scm_list_n
9482 instead of cons. Also, slots are already created as lists, thus
9483 making a call to maplist unnecessary.
9484
9485 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9486 scm_class_direct_subclasses, scm_class_direct_methods,
9487 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9488 scm_method_procedure, create_standard_classes, purgatory): Use
9489 predefined symbols.
9490
9491 (build_slots_list, compute_getters_n_setters,
9492 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9493 get_slot_value_using_name, set_slot_value_using_name,
9494 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9495 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9496 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9497
9498 (scm_sys_prep_layout_x): Minimize variable scopes.
9499
9500 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9501 scm_sys_fast_slot_set_x): Fix signedness.
9502
9503 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9504 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9505 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9506 when converting to and from SCM values.
9507
9508 (scm_enable_primitive_generic_x): Add rest argument checking.
9509
9510 (map, filter_cpl, maplist, scm_sys_initialize_object,
9511 scm_sys_prep_layout_x, slot_definition_using_name,
9512 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9513 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9514 predicates over SCM_N?IMP tests.
9515
9516 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9517 checking.
9518
9519 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9520 alias.
9521
9522 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9523
9524 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9525
9526 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9527
9528 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9529
9530 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9531
9532 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9533
9534 * strings.c (s_scm_string): fix arg position in assert.
9535
9536 2001-07-11 Gary Houston <ghouston@arglist.com>
9537
9538 * strports.c (st_write): use memcpy, not strncpy. thanks to
9539 Dale P. Smith.
9540
9541 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9542
9543 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9544 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9545 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9546 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9547 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9548 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9549 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9550 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9551 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9552 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9553 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9554 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9555 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9556 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9557 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9558 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9559 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9560 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9561 weaks.c, weaks.h: Remove "face-lift" comment.
9562
9563 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9564
9565 * .cvsignore: add stamp-h.in.
9566
9567 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9568
9569 * hooks.c (scm_make_hook, scm_add_hook_x),
9570 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9571 value info to the docstrings.
9572
9573 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9574
9575 Some more compatibility patches for Windows.
9576
9577 * posix.c (getlogin): getlogin() implementation for Windows.
9578
9579 * backtrace.c, ioext.c: Include <stdio.h>.
9580
9581 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9582 exist.
9583
9584 * cpp_sig_symbols.in: Added SIGBREAK.
9585
9586 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9587
9588 * strports.c (scm_read_0str, scm_eval_0str): Call
9589 scm_c_read_string and scm_c_eval_string respectively, not
9590 themselves. Thanks to Dale P. Smith!
9591
9592 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9593
9594 * unif.c (scm_array_set_x): The variable args does not
9595 necessarily have to be a list. Further, got rid of a redundant
9596 SCM_NIMP test.
9597
9598 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9599
9600 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9601 last.
9602
9603 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9604 init_heap_seg): Fixed signedness.
9605
9606 (init_heap_seg): Replaced strange for-loop with a while loop.
9607
9608 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9609
9610 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9611
9612 The following patch adds conservative marking for the elements of
9613 free or allocated cells.
9614
9615 * gc.c (allocated_mark, heap_segment): New static functions.
9616
9617 (which_seg): Deleted, since the functionality is now provided by
9618 function heap_segment.
9619
9620 (map_free_list): Use heap_segment instead of which_seg.
9621
9622 (MARK): If cell debugging is disabled, mark free cells
9623 conservatively.
9624
9625 (scm_mark_locations, scm_cellp): Extracted the search for the
9626 heap segment of a SCM value into function heap_segment.
9627
9628 (scm_init_storage): Allocated cells must be marked
9629 conservatively.
9630
9631 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9632
9633 The following patch changes the representation of weak vectors to
9634 double cells instead of using an extension of the vector's
9635 allocated memory.
9636
9637 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9638 the result of SCM_WVECT_GC_CHAIN.
9639
9640 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9641
9642 * weaks.c (allocate_weak_vector): New static function. It does
9643 not patch any previously created vector object during the
9644 construction of a weak vector, and thus doesn't need to switch
9645 off interrupts during vector creation.
9646
9647 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9648 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9649 Use allocate_weak_vector to provide the new weak vector object.
9650
9651 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9652 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9653 now stored in the double cell.
9654
9655 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9656 Use SCM_WVECT_TYPE.
9657
9658 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9659 using an entry of the double cell.
9660
9661 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9662
9663 * stamp-h.in: bye bye
9664
9665 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9666
9667 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9668 scm_eval_0str.
9669
9670 * load.c, load.h (scm_c_primitive_load,
9671 scm_c_primitive_load_path): New.
9672
9673 * strports.c, strports.h (scm_c_read_string): Renamed from
9674 scm_read_0str. Also, added "const" qualifier to argument.
9675 (scm_c_eval_string): Renamed from scm_eval_0str.
9676 (scm_read_0str, scm_eval_0str): Deprecated.
9677
9678 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9679
9680 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9681 SCM_LIST1.
9682
9683 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9684
9685 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9686 scm_list_n): New functions.
9687 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9688 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9689 (lots of files): Use the new functions.
9690
9691 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9692
9693 * strings.c: #include "libguile/deprecation.h".
9694
9695 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9696
9697 * read.c (scm_lreadr): When reading a hash token, check for a
9698 user-defined hash procedure first, so that overriding the builtin
9699 hash characters is possible (this was needed for implementing
9700 SRFI-4's read synax `f32(...)').
9701
9702 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9703 because the latter is unsigned now and breaks comparisons like
9704 (n < (scm_t_signed_bits)MIN_VALUE).
9705
9706 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9707
9708 * eval.h, eval.c (scm_call_4): New function.
9709
9710 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9711 directly rather than dispatching to them via scm_ithrow and a lazy
9712 catch.
9713
9714 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9715 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9716 for trap handler procedures.
9717
9718 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9719 procedures not being #f.
9720
9721 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9722
9723 * Makefile.am (c-tokenize.c): add rule to generate it.
9724 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9725
9726 filter-doc-snarfage.c: remove.
9727
9728 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9729
9730 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9731
9732 The following set of changes makes compiling Guile under various
9733 Windows compilers easier. Compilation under GNU systems should
9734 not be affected at all.
9735
9736 Thanks to Stefan Jahn for all necessary information, patches and
9737 testing.
9738
9739 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9740 getpgrp, ttyname, primitive-fork and some header inclusion for
9741 Windows.
9742
9743 * random.c: Define M_PI, if not predefined and use __int64 for
9744 LONG64 under Windows.
9745
9746 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9747 Windows and conditionalize some signal names.
9748
9749 * socket.c (scm_getsockopt): Added missing comma.
9750 Include socket library header under Windows.
9751
9752 * stime.c (CLKTCK): Add cast to int, to make it compile under
9753 Windows.
9754
9755 * ports.c (truncate): New function, compiled only under Windows.
9756
9757 * net_db.c: Do not declare errno under Windows.
9758
9759 * iselect.h, inet_aton.c: Include socket library headers under
9760 Windows.
9761
9762 * guile.c (inner_main): Under Windows, initialize socket library
9763 and initialize gdb_interface data structures.
9764
9765 * gdb_interface.h: Under Windows, gdb_interface cannot be
9766 initialized statically. Initialize at runtime instead.
9767
9768 * fports.c (write_all): ssize_t -> size_t.
9769 (fport_print): Conditionalize call to ttyname().
9770 (getflags): New function, compiled only under Windows.
9771
9772 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9773 primitives chown, link, fcntl.
9774 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9775 as path seperator.
9776
9777 * backtrace.c: Include <io.h> under Windows.
9778
9779 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9780
9781 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9782 declaration.
9783
9784 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9785
9786 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9787 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9788 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9789 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9790 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9791 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9792 (scm_dynamic_wind, scm_dowinds), environments.c
9793 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9794 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9795 goops.c (GETVAR, purgatory, make_class_from_template,
9796 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9797 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9798 (scm_primitive_load), modules.c (scm_resolve_module,
9799 scm_c_define_module, scm_c_use_module, scm_c_export,
9800 module_variable, scm_eval_closure_lookup, scm_sym2var,
9801 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9802 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9803 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9804 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9805 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9806 (scm_object_to_string, scm_call_with_output_string,
9807 scm_call_with_input_string), throw.c (scm_body_thunk,
9808 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9809 scm_make_shared_array), vports.c (sf_flush, sf_write,
9810 sf_fill_input, sf_close): Use one of the above functions.
9811 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9812
9813 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9814
9815 * filesys.c (scm_close), ports.c (scm_close_port,
9816 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9817 instead of SCM_NEGATE_BOOL.
9818
9819 * filesys.c (scm_stat): Clean up type dispatch.
9820
9821 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9822 scm_output_port_p): Get rid of redundant IM type check.
9823
9824 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9825 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9826 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9827 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9828 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9829 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9830 scm_addr_vector), stime.c (scm_strftime), strings.c
9831 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9832 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9833 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9834 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9835 instead of scm_makfromstr.
9836
9837 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9838 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9839 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9840 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9841 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9842 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9843 !SCM_<pred> over SCM_N<pred>.
9844
9845 * strings.[ch] (scm_makfromstr): Deprecated.
9846
9847 (scm_mem2string): New function, replaces scm_makfromstr.
9848
9849 * strings.c (scm_substring), strop.c (string_copy,
9850 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9851 (scm_symbol_to_string): Fix gc problem.
9852
9853 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9854 SCM_<foo>_H.
9855
9856 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9857 warning about comparing signed and unsigned values. This fix is
9858 not optimal, since it won't work reliably if sizeof (c_start) >
9859 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9860 solution is to define this macro as an inline function, thus
9861 allowing to specifiy the types of c_start and c_end.
9862
9863 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9864
9865 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9866 scm_t_debug_frame*.
9867
9868 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9869 Rename <foo>H to SCM_<foo>_H.
9870
9871 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9872 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9873
9874 (narrow_stack): Make i unsigned. Don't use side-effecting
9875 operations in conditions.
9876
9877 (narrow_stack, scm_make_stack, scm_stack_id,
9878 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9879
9880 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9881 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9882 more.
9883
9884 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9885 signedness.
9886
9887 (scm_last_stack_frame): Remove bogus `;'.
9888
9889 * stacks.h (SCM_FRAMEP): Fix type check.
9890
9891 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9892
9893 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9894 c-tokenize.c when doing maintainer-clean.
9895
9896 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9897
9898 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9899 simplify.
9900
9901 * eval.c: all hash signs are in column 0.
9902
9903 * Makefile.am (guile_filter_doc_snarfage): build using
9904 c-tokenize.c, not filter-doc-snarfage.c.
9905 rearrange snarfing dependencies a bit.
9906
9907 * c-tokenize.lex: new file.
9908
9909 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9910
9911 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9912 scm_t_srcpropso_plist. See the big type renaming.
9913 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9914 Thanks to Seth Alves!
9915
9916 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9917 they aren't defined already.
9918
9919 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9920
9921 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9922 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9923 problem.
9924
9925 * backtrace.c (display_expression, scm_set_print_params_x,
9926 display_application, display_frame, scm_backtrace), numbers.c
9927 (scm_istring2number), objects.c (scm_class_of,
9928 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9929 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9930
9931 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9932 always positive.
9933
9934 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9935 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9936
9937 * objects.c (scm_class_of): Type fix.
9938
9939 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9940 eliminated goto.
9941
9942 * pairs.h (scm_error_pair_access): The function can return if
9943 called recursively.
9944
9945 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9946
9947 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9948
9949 * gdbint.c, init.c: Removed inclusion of tag.h.
9950
9951 * tag.h, tag.c: Removed files.
9952
9953 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9954
9955 2001-06-20 Gary Houston <ghouston@arglist.com>
9956
9957 * deprecation.c, extensions.c, rw.c: include string.h.
9958
9959 2001-06-19 Gary Houston <ghouston@arglist.com>
9960
9961 * filter-doc-snarfage.c (process): added ungetc in
9962 MULTILINE_COOKIE case since otherwise it fails when there's no
9963 space between the '(' and the quote of the following string
9964 (gcc 3.0).
9965
9966 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9967
9968 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9969
9970 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9971
9972 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9973 extension takes place.
9974 * strings.h (SCM_STRING_LENGTH): Likewise.
9975 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9976
9977 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9978 it.
9979
9980 * tags.h: Include <stdint.h> when we have it.
9981 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9982 available. Else use "unsigned long".
9983 (scm_signed_bits_t): New.
9984
9985 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9986 (SCM_INUM): Cast result to scm_signed_bits_t.
9987
9988 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9989
9990 * mkstemp.c: Update path to #include file scmconfig.h.
9991 Thanks to Golubev I. N.
9992
9993 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9994
9995 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9996
9997 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
9998 the macro definition.
9999
10000 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
10001 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
10002 instead of SCM_INST_TYPE.
10003
10004 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
10005 the object is a struct before accessing its struct flags.
10006
10007 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
10008
10009 2001-06-10 Gary Houston <ghouston@arglist.com>
10010
10011 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
10012 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
10013 work reliably anymore. try it from boot-9.scm instead.
10014
10015 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
10016
10017 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
10018 Thanks to Matthias Köppe!
10019
10020 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
10021
10022 * snarf.h, filter-doc-snarfage.c: more changes to cope with
10023 space-happy C preprocessors.
10024
10025 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
10026 inside cookies. thanks to Matthias Köppe!
10027
10028 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10029
10030 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
10031 keywords. Fix gc protection.
10032
10033 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
10034 operations in macro calls.
10035
10036 * pairs.c (scm_error_pair_access): Avoid recursion.
10037
10038 Thanks to Matthias Koeppe for reporting the bugs that correspond
10039 to the following set of patches.
10040
10041 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
10042 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
10043 bitvector base address using SCM_BITVECTOR_BASE.
10044
10045 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
10046 unsigned long*.
10047
10048 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10049
10050 * goops.c (SCM_CLASS_REDEF): Removed.
10051
10052 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
10053 SCM_<foo>_H.
10054
10055 Thanks to Matthias Koeppe for reporting the bugs that correspond
10056 to the following set of patches.
10057
10058 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
10059 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
10060 scm_sys_allocate_instance, clear_method_cache,
10061 scm_sys_invalidate_method_cache_x, scm_make,
10062 create_standard_classes, scm_make_port_classes, scm_make_class,
10063 scm_add_slot): Use SCM_SET_SLOT to set slot values.
10064
10065 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
10066
10067 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
10068
10069 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
10070 UNARY_ELTS_CODE): Remove bogus break statement.
10071
10072 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
10073 Don't access bit vectors elements as SCM objects.
10074
10075 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
10076 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10077 Don't assign to an unpacked value.
10078
10079 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
10080
10081 * __scm.h (SCM_NORETURN): Moved here from error.h.
10082
10083 (SCM_UNUSED): New macro.
10084
10085 (SCM_DEBUG_PAIR_ACCESSES): New macro.
10086
10087 * backtrace.c (display_error_handler), continuations.c
10088 (continuation_print), debug.c (debugobj_print), dynwind.c
10089 (guards_print), environments.c (observer_print,
10090 core_environments_finalize, leaf_environment_cell,
10091 leaf_environment_print, eval_environment_print,
10092 eval_environment_observer, import_environment_define,
10093 import_environment_undefine, import_environment_print,
10094 import_environment_observer, export_environment_define,
10095 export_environment_undefine, export_environment_print,
10096 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
10097 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
10098 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
10099 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
10100 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
10101 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
10102 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
10103 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
10104 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
10105 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
10106 set_slot_value, test_slot_existence, scm_change_object_class,
10107 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
10108 default_setter), guardians.c (guardian_print, guardian_gc_init,
10109 guardian_zombify, whine_about_self_centered_zombies), guile.c
10110 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
10111 mallocs.c (malloc_print), numbers.c (scm_print_real,
10112 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
10113 end_input_default, scm_port_print, fill_input_void_port,
10114 write_void_port), root.c (root_print), smob.c (scm_mark0,
10115 scm_free0, scm_smob_print, scm_smob_apply_1_error,
10116 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
10117 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
10118 (scm_struct_free_0, scm_struct_free_standard,
10119 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
10120 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
10121 scm_handle_by_throw, scm_ithrow), weaks.c
10122 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
10123 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
10124 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
10125
10126 * error.h (SCM_NORETURN): Moved to __scm.h.
10127
10128 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
10129 Renamed <foo>H to SCM_<foo>_H.
10130
10131 * gc.c (debug_cells_gc_interval): New static variable.
10132
10133 (scm_assert_cell_valid): If selected by the user, perform
10134 additional garbage collections.
10135
10136 (scm_set_debug_cell_accesses_x): Extended to let the user specify
10137 if additional garbage collections are desired.
10138
10139 (mark_gc_async): If additional garbage collections are selected
10140 by the user, don't call the after-gc-hook. Instead require the
10141 user to run the hook manually.
10142
10143 * pairs.c (scm_error_pair_access): New function. Only compiled
10144 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
10145
10146 * pairs.h (SCM_VALIDATE_PAIR): New macro.
10147
10148 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
10149 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
10150 is a real pair object. (Glocs are also accepted, but that may
10151 change.) If not, abort with an error message.
10152
10153 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10154
10155 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
10156
10157 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
10158 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
10159
10160 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
10161
10162 * extensions.c (scm_c_register_extension): Allow NULL as library
10163 name.
10164 (load_extension): Ignore NULL library names when comparing.
10165
10166 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
10167 non-pointers are being compared. Thanks to Alexander Klimov!
10168
10169 2001-06-04 Gary Houston <ghouston@arglist.com>
10170
10171 * rw.c (scm_write_string_partial): new procedure implementing
10172 write-string/partial in (ice-9 rw).
10173 * rw.h: declare scm_write_string_partial.
10174
10175 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
10176
10177 * keywords.c (keyword_print): Substract 1 from length of symbol
10178 name, accounting for the silly dash.
10179
10180 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
10181 Do not emit deprecation warning.
10182
10183 Added exception notice to all files.
10184
10185 * dynl.c: Include "deprecation.h".
10186
10187 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
10188
10189 * dynl.c (scm_register_module_xxx, scm_registered_modules,
10190 scm_clear_registered_modules): Deprecated.
10191
10192 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
10193
10194 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
10195 guile-snarf-docs-texi.
10196
10197 * fports.c: HAVE_ST_BLKSIZE changed to
10198 HAVE_STRUCT_STAT_ST_BLKSIZE.
10199 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
10200 HAVE_STRUCT_STAT_ST_BLKSIZE.
10201
10202 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
10203 HAVE_STRUCT_STAT_ST_RDEV.
10204 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
10205 HAVE_STRUCT_STAT_ST_BLKSIZE.
10206 (scm_stat2scm): HAVE_ST_BLOCKS changed to
10207 HAVE_STRUCT_STAT_ST_BLOCKS.
10208
10209 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
10210
10211 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
10212 of scm_eval_x to allow module changes between the forms in the
10213 string. Set/restore module using scm_c_call_with_current_module.
10214
10215 * mkstemp.c: New file, slightly modified from libiberties
10216 mkstemps.c.
10217
10218 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
10219
10220 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
10221 filter-doc-snarfage.c: new files.
10222
10223 * Makefile.am: add stuff to [build,] use and distribute
10224 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
10225
10226 * guile-snarf.in: grok the new snarf output.
10227
10228 * snarf.h: make the output both texttools- and `read'-friendly.
10229
10230 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
10231 guile-snarf-docs. (should also deprecate, I guess. maybe not).
10232
10233 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
10234
10235 * print.c (scm_simple_format): Support "~~" and "~%". Signal
10236 error for unsupported format controls and for superflous
10237 arguments. Thanks to Daniel Skarda!
10238
10239 * print.h, print.c (scm_print_symbol_name): Factored out of
10240 scm_iprin1.
10241 (scm_iprin1): Call it.
10242
10243 * keywords.c (keyword_print): Use scm_print_symbol_name so that
10244 weird names are printed correctly.
10245
10246 * print.c (scm_print_symbol_name): Symbols whose name starts with
10247 `#' or `:' or ends with `:' are considered weird.
10248
10249 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10250
10251 * numbers.c (scm_difference, scm_divide): Clarified comments for -
10252 and /.
10253
10254 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10255
10256 * debug.h: Removed prototype for scm_eval_string.
10257
10258 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10259
10260 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
10261 (make-string 2000 #\!))' in an older version).
10262
10263 Change strncpy to memcpy to allow embedded NUL characters in
10264 symbol prefix.
10265
10266 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
10267
10268 * hooks.c (scm_create_hook): deprecated.
10269 (make_hook): deleted.
10270 (scm_make_hook): all the hook creation code is now here.
10271
10272 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10273 a hook, make it permanent, and do a `scm_c_define' on it.
10274
10275 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10276
10277 * socket.c (s_scm_inet_pton): fix docstring quoting.
10278 (s_scm_inet_ntop): ditto.
10279
10280 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10281
10282 * hashtab.c (scm_internal_hash_fold): fix argument position in
10283 SCM_ASSERT.
10284
10285 * environments.c (s_scm_import_environment_set_imports_x): fix
10286 argument position in SCM_ASSERT.
10287
10288 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10289 (s_scm_make_iloc): ditto.
10290
10291 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10292
10293 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10294
10295 * eval.c (promise_print): Read the promise's value as an object.
10296
10297 (SCM_CEVAL): Don't perform side-effecting operations in macro
10298 parameters.
10299
10300 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10301 conditional expression.
10302
10303 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10304 initializer.
10305
10306 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10307 text, removed redundant computation of effective_length and fixed
10308 the overflow check.
10309
10310 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10311 values.
10312
10313 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10314
10315 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10316
10317 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10318 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10319
10320 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10321
10322 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10323 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10324 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10325 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10326
10327 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10328
10329 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10330
10331 * ramap.c (ramap_rp): Removed bogus `;'.
10332
10333 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10334 problem.
10335
10336 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10337 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10338 Read SCM objects rather than scm_bits_t values.
10339
10340 * tags.h (SCM_VOIDP_TEST): Removed.
10341
10342 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10343 value of 2 now corresponds to the former 1, the current 1
10344 corresponds to the former situation that SCM_VOIDP_TEST was
10345 defined.
10346
10347 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10348 If this appears to be not ANSI compliant, we will change it to
10349 typedef struct scm_unused_struct { } * SCM;
10350 Thanks to Han-Wen Nienhuys for the suggestion.
10351
10352 * unif.c (scm_array_set_x): Fix typing problem, and use
10353 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10354 dealing with uniform vectors.
10355
10356 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10357
10358 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10359 (scm_igc): mark from them, too (precisely, not conservatively!).
10360
10361 * root.h (scm_gc_registered_roots): new object in
10362 scm_sys_protects.
10363
10364 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10365 `scm_protect_object'. shouldn't call it at all, though, it seems.
10366
10367 * gc.c (scm_[un]protect_object): deprecated.
10368 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10369 (scm_gc_[un]register_root[s]): new.
10370
10371 * gc.h: add prototypes for scm_gc_[un]protect_object,
10372 scm_gc_[un]register_root[s].
10373
10374 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10375
10376 revert the controversial part of the 2001-05-24 changes.
10377
10378 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10379
10380 * modules.c (scm_env_module): Exported to Scheme.
10381
10382 * eval.c (scm_debug_opts): New option `show-file-name'.
10383
10384 * debug.h (SCM_SHOW_FILE_NAME): New.
10385
10386 * backtrace.c: Include "libguile/filesys.h".
10387 (sym_base, display_backtrace_get_file_line,
10388 display_backtrace_file, display_backtrace_file_and_line): New.
10389 (display_frame): Call display_backtrace_file_and_line if that is
10390 requested.
10391 (display_backtrace_body): Call scm_display_backtrace_file if
10392 requested.
10393
10394 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10395 Prototypes removed since there's no definition for these
10396 functions.
10397
10398 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10399
10400 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10401 Changed use of scm_array->scm_array_t and
10402 scm_array_dim->scm_array_dim_t to enable build with
10403 --disable-deprecated.
10404
10405 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10406
10407 The purpose of this set of changes is to regularize Guile's usage
10408 of ANSI C integral types, with the following ideas in mind:
10409
10410 - SCM does not nesessarily have to be long.
10411 - long is not nesessarily enough to store pointers.
10412 - long is not nesessarily the same size as int.
10413
10414 The changes are incomplete and possibly buggy. Please test on
10415 something exotic.
10416
10417 * validate.h
10418 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10419 new macros.
10420
10421 * unif.h: type renaming:
10422 scm_array -> scm_array_t
10423 scm_array_dim -> scm_array_dim_t
10424 the old names are deprecated, all in-Guile uses changed.
10425
10426 * tags.h (scm_ubits_t): new typedef, representing unsigned
10427 scm_bits_t.
10428
10429 * stacks.h: type renaming:
10430 scm_info_frame -> scm_info_frame_t
10431 scm_stack -> scm_stack_t
10432 the old names are deprecated, all in-Guile uses changed.
10433
10434 * srcprop.h: type renaming:
10435 scm_srcprops -> scm_srcprops_t
10436 scm_srcprops_chunk -> scm_srcprops_chunk_t
10437 the old names are deprecated, all in-Guile uses changed.
10438
10439 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10440 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10441 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10442 vectors.c, vports.c, weaks.c:
10443 various int/size_t -> size_t/scm_bits_t changes.
10444
10445 * random.h: type renaming:
10446 scm_rstate -> scm_rstate_t
10447 scm_rng -> scm_rng_t
10448 scm_i_rstate -> scm_i_rstate_t
10449 the old names are deprecated, all in-Guile uses changed.
10450
10451 * procs.h: type renaming:
10452 scm_subr_entry -> scm_subr_entry_t
10453 the old name is deprecated, all in-Guile uses changed.
10454
10455 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10456 type renaming:
10457 scm_option -> scm_option_t
10458 the old name is deprecated, all in-Guile uses changed.
10459
10460 * objects.c: various long -> scm_bits_t changes.
10461 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10462
10463 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10464 SCM_I_FIXNUM_BIT.
10465
10466 * num2integral.i.c: new file, multiply included by numbers.c, used
10467 to "templatize" the various integral <-> num conversion routines.
10468
10469 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10470 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10471 deprecated.
10472 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10473 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10474 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10475 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10476 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10477 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10478 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10479 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10480 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10481 scm_num2size): new functions.
10482
10483 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10484
10485 * load.c: change int -> size_t in various places (where the
10486 variable is used to store a string length).
10487 (search-path): call scm_done_free, not scm_done_malloc.
10488
10489 * list.c (scm_ilength): return a scm_bits_t, not long.
10490 some other {int,long} -> scm_bits_t changes.
10491
10492 * hashtab.c: various [u]int -> scm_bits_t changes.
10493 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10494 (scm_ihashx): n: uint -> scm_bits_t
10495 use scm_bits2num instead of scm_ulong2num.
10496
10497 * gsubr.c: various int -> scm_bits_t changes.
10498
10499 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10500
10501 * gh_data.c (gh_num2int): no loss of precision any more.
10502
10503 * gh.h (gh_str2scm): len: int -> size_t
10504 (gh_{get,set}_substr): start: int -> scm_bits_t,
10505 len: int -> size_t
10506 (gh_<num>2scm): n: int -> scm_bits_t
10507 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10508 (gh_length): return scm_bits_t, not unsigned long.
10509
10510 * gc.[hc]: various small changes relating to many things stopping
10511 being long and starting being scm_[u]bits_t instead.
10512 scm_mallocated should no longer wrap around.
10513
10514 * fports.h: type renaming:
10515 scm_fport -> scm_fport_t
10516 the old name is deprecated, all in-Guile uses changed.
10517
10518 * fports.c (fport_fill_input): count: int -> scm_bits_t
10519 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10520
10521 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10522 those prototypes, as the functions they prototype don't exist.
10523
10524 * fports.c (default_buffer_size): int -> size_t
10525 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10526 default_size: int -> size_t
10527 (scm_setvbuf): csize: int -> scm_bits_t
10528
10529 * fluids.c (n_fluids): int -> scm_bits_t
10530 (grow_fluids): old_length, i: int -> scm_bits_t
10531 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10532 scm_bits_t
10533 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10534
10535 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10536 the new and shiny SCM_NUM2INT.
10537
10538 * extensions.c: extension -> extension_t (and made a typedef).
10539
10540 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10541 there are no nasty surprises if/when the various deeply magic tag
10542 bits move somewhere else.
10543
10544 * eval.c: changed the locals used to store results of SCM_IFRAME,
10545 scm_ilength and such to be of type scm_bits_t (and not int/long).
10546 (iqq): depth, edepth: int -> scm_bits_t
10547 (scm_eval_stack): int -> scm_bits_t
10548 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10549 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10550 i: int -> scm_bits_t
10551
10552 * environments.c: changed the many calls to scm_ulong2num to
10553 scm_ubits2num.
10554 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10555
10556 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10557
10558 * debug.h: type renaming:
10559 scm_debug_info -> scm_debug_info_t
10560 scm_debug_frame -> scm_debug_frame_t
10561 the old names are deprecated, all in-Guile uses changed.
10562 (scm_debug_eframe_size): int -> scm_bits_t
10563
10564 * debug.c (scm_init_debug): use scm_c_define instead of the
10565 deprecated scm_define.
10566
10567 * continuations.h: type renaming:
10568 scm_contregs -> scm_contregs_t
10569 the old name is deprecated, all in-Guile uses changed.
10570 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10571 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10572
10573 * continuations.c (scm_make_continuation): change the type of
10574 stack_size from long to scm_bits_t.
10575
10576 * ports.h: type renaming:
10577 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10578 scm_port -> scm_port_t
10579 scm_ptob_descriptor -> scm_ptob_descriptor_t
10580 the old names are deprecated, all in-Guile uses changed.
10581 (scm_port_t.entry): int -> scm_bits_t.
10582 (scm_port_t.line_number): int -> long.
10583 (scm_port_t.putback_buf_size): int -> size_t.
10584
10585 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10586 global namespace and have little value beside that).
10587 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10588 SCM handle).
10589 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10590 exist (for size_t & ptrdiff_t).
10591 (scm_sizet): deprecated.
10592
10593 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10594
10595 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10596
10597 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10598 SCM_VARIABLE_INIT since that it what it used to be.
10599
10600 * deprecation.c (scm_include_deprecated_features): Make docstring
10601 ANSIsh. Thanks to Matthias Köppe!
10602
10603 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10604
10605 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10606 needed for weak-key hashtables.
10607
10608 * procs.c (scm_make_subr_with_generic): Add missing last argument
10609 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10610
10611 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10612 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10613
10614 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10615
10616 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10617
10618 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10619 `duplicate_string'. Do not use an indirect cell, store symbol
10620 directly in collision list of hash table.
10621 (duplicate_string): Removed.
10622
10623 * init.c (scm_init_guile_1): Call scm_init_extensions.
10624
10625 * Makefile.am: Add "extensions.c" and related files in all the
10626 right places.
10627
10628 * extensions.h, extension.c: New files.
10629
10630 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10631
10632 * modules.h (scm_system_module_env_p): Move out of deprecated
10633 section.
10634
10635 * rw.h (scm_init_rw): Added prototype.
10636
10637 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10638 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10639 New functions. They replace scm_make_gsubr and
10640 scm_make_gsubr_with_generic. The `make' variants only create the
10641 gsubr object, while the `define' variants also put it into the
10642 current module. Changed all callers.
10643 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10644
10645 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10646 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10647 functions. They replace scm_make_subr, scm_make_subr_opt and
10648 scm_make_subr_with_generic. The `make' variants only create the
10649 subr object, while the `define' variants also put it into the
10650 current module. Changed all callers.
10651 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10652 Deprecated.
10653
10654 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10655 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10656 the comments above.
10657
10658 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10659
10660 * throw.c (scm_lazy_catch): Slight docstring clarification.
10661
10662 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10663
10664 * throw.c: Lazy-catch handlers are no longer allowed to return.
10665 Fixed comments throughout.
10666 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10667 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10668 recognized as such.
10669
10670 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10671 refered to s_scm_minor_version previously.
10672
10673 * modules.h, modules.c: Moved around a lot of code so that
10674 deprecated features appear at the bottom.
10675 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10676 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10677 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10678 scm_load_scheme_module): Deprecated.
10679 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10680 environments corresponding to the root module.
10681 (convert_module_name, scm_c_resolve_module,
10682 scm_c_call_with_current_module, scm_c_define_module,
10683 scm_c_use_module, scm_c_export): New.
10684 (the_root_module): New static variant of scm_the_root_module. Use
10685 it everywhere instead of scm_the_root_module.
10686
10687 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10688 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10689 (scm_c_with_fluid): New.
10690 (scm_with_fluids): Use scm_c_with_fluids instead of
10691 scm_internal_with_fluids.
10692
10693 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10694 `scm_init_goops'. Do not explicitly create/switch modules.
10695 Return SCM_UNSPECIFIED.
10696 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10697 (scm_load_goops): Use scm_c_resolve_module instead of
10698 scm_resolve_module.
10699
10700 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10701 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10702 `scm_init_rw' prior to loading the startup files.
10703
10704 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10705 scm_init_rdelim. Do not explicitly create/switch modules.
10706 Return SCM_UNSPECIFIED.
10707 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10708 procedure.
10709
10710 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10711 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10712 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10713
10714 * script.c (scm_shell): Evaluate the compiled switches in the
10715 current module, not in the root module.
10716
10717 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10718
10719 * fluids.c (scm_c_with_fluids): Rename from
10720 scm_internal_with_fluids.
10721 (scm_internal_with_fluids): Deprecated.
10722 (scm_c_with_fluid): New.
10723
10724 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10725
10726 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10727
10728 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10729 accessed with SCM_C[AD]R.
10730
10731 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10732
10733 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10734
10735 * version.c (s_scm_major_version): doc fixes.
10736 (s_scm_minor_version): doc fixes.
10737 (s_scm_minor_version): new function.
10738
10739 * version.h (scm_init_version): new function.
10740
10741 * versiondat.h.in: add GUILE_MICRO_VERSION.
10742
10743 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10744
10745 * deprecation.c (scm_init_deprecation): Renamed
10746 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10747
10748 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10749
10750 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10751 dependent on cpp_cnvt.awk
10752
10753 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10754
10755 * script.c (scm_compile_shell_switches): New command line option
10756 `--use-srfi' for loading a list of SRFIs on startup.
10757 (scm_shell_usage): Added `--use-srfi' to help message.
10758
10759 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10760
10761 Merged from mvo-vcell-cleanup-1-branch.
10762
10763 The concept of vcells has been removed from Guile. With it,
10764 explicit obarrays and associated operations are gone. Use
10765 hashtables instead of obarrays.
10766
10767 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10768 result as variable instead of vcell. Glocs no longer point to a
10769 vcell but to a variable. Use scm_c_define instead of
10770 scm_sysintern and treat the result as a variable (which it is),
10771 not a vcell.
10772
10773 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10774 SCM_DEFVARIABLEP): Deprecated.
10775 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10776 (variable_print): Do not print name of variable.
10777 (variable_equalp): Compare values, not vcells.
10778 (anonymous_variable_sym): Removed.
10779 (make_vcell_variable): Removed.
10780 (make_variable): New, as replacement.
10781 (scm_make_variable, scm_make_undefined_variable): Do not take name
10782 hint parameter.
10783 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10784 error in that case.
10785 (scm_builtin_variable): Deprecated.
10786
10787 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10788 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10789 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10790 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10791 scm_string_to_obarray_symbol, scm_intern_symbol,
10792 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10793 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10794 Deprecated and moved to "symbols-deprecated.c".
10795 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10796 (scm_init_symbols): Call scm_init_symbols_deprecated.
10797 * symbols-deprecated.c: New file.
10798 * Makefile.am: Added symbols-deprecated.c and related files in all
10799 the right places.
10800
10801 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10802 SCM_GLOBAL_VCELL_INIT): Deprecated.
10803 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10804 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10805
10806 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10807 SCM_GLOC_SYM.
10808
10809 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10810 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10811 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10812 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10813 Changed according to the `throughout' comments.
10814
10815 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10816 to `int'.
10817 (scm_module_type): Removed.
10818 (the_root_module): Renamed to the_root_module_var. Now points to
10819 a variable instead of a vcell. Updated all uses.
10820 (scm_the_root_module): Return SCM_BOOL_F when module systems
10821 hasn't been booted yet.
10822 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10823 (scm_post_boot_init_modules): Made static.
10824 (scm_set_current_module): Call scm_post_boot_init_modules on first
10825 call.
10826 (make_modules_in, beautify_user_module_x, resolve_module,
10827 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10828 suffix. Now point to variables instead of vcells. Updated all
10829 uses.
10830 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10831 and return SCM_BOOL_F in that case.
10832 (scm_module_transformer): Likewise.
10833 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10834 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10835 (scm_eval_closure_lookup): Do not allow new definitions when
10836 `interface' flag is set.
10837 (scm_standard_interface_eval_closure): New.
10838 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10839 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10840 scm_c_lookup, scm_c_module_define, scm_c_define,
10841 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10842 scm_modules_prehistory): New.
10843 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10844 instead of scm_intern0.
10845
10846 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10847 symbol.
10848
10849 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10850 hashtable operations to maintain the keywords, not obarray ones.
10851
10852 * init.c (scm_load_startup_files): Do not call
10853 scm_post_boot_init_modules. This is done by
10854 scm_set_current_module now.
10855 (scm_init_guile_1): Call scm_modules_prehistory. Call
10856 scm_init_variable early on.
10857
10858 * goops.c (s_scm_sys_goops_loaded): Get
10859 var_compute_applicable_methods from scm_sym2var, not from a direct
10860 invocation of scm_goops_lookup_closure.
10861
10862 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10863
10864 * gc.c: Added simple debugging hack to mark phase of GC: When
10865 activated, do not tail-call scm_gc_mark. This gives nice
10866 backtraces.
10867 (scm_unhash_name): Removed.
10868
10869 * feature.c (features): Renamed to features_var. Now points to a
10870 variable instead of a vcell. Updated all uses.
10871
10872 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10873 `scm_current_module_lookup_closure' which will do the right thing
10874 when the module system hasn't been booted yet.
10875 (SCM_GLOC_SYM): Removed.
10876 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10877 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10878
10879 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10880 instead of with vcells. Do not overwrite `var' with the result of
10881 the lookup, use the new `real_var' instead. Remove `var2' in
10882 exchange (which was only used with threads).
10883 (sym_three_question_marks): New.
10884 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10885 `SCM_GLOC_SYM'.
10886 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10887 (scm_m_atfop): Expect the function definition to be a variable
10888 instead of a vcell.
10889 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10890 symbol instead.
10891 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10892 (scm_eval_args): Use more explicit code in the gloc branch of the
10893 atrocious struct ambiguity test. The optimizer will sort this
10894 out.
10895 (scm_deval_args): Likewise.
10896 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10897 remember the symbol instead. Added some comments where
10898 scm_tc3_cons_gloc really exclusively refers to structs.
10899 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10900 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10901 of scm_sysintern in general.
10902
10903 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10904 explicit magic.
10905
10906 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10907 pairs. Put the variable directly in the gloc.
10908 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10909 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10910
10911 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10912
10913 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10914 scm_the_last_stack_fluid_var. It now points to a variable instead
10915 of a vcell. Updated all uses.
10916 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10917 instead of a vcell. Updated all uses.
10918
10919 * _scm.h: Include "variables.h" and "modules.h" since almost
10920 everybody needs them now.
10921
10922 * root.h (scm_symhash, scm_symhash_vars): Removed.
10923 * gc.c (scm_init_storage): Do not initialize them.
10924
10925 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10926
10927 * eval.c (scm_init_eval): Initialize scm_undefineds and
10928 scm_listofnull.
10929
10930 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10931 like the SCM_NEWCELL macro counterparts.
10932
10933 (scm_init_storage, scm_init_gc): Moved initialization of
10934 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10935
10936 (scm_init_storage): Moved initialization of scm_undefineds and
10937 scm_listofnull to eval.c, initializion of scm_nullstr to
10938 strings.c, initializion of scm_nullvect to vectors.c.
10939
10940 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10941 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10942
10943 * init.c (scm_init_guile_1): Reordered some initializations and
10944 added dependcy information comments.
10945
10946 * load.c (scm_init_load): Use scm_nullstr.
10947
10948 * strings.c (scm_init_strings): Initialize scm_nullstr.
10949
10950 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10951
10952 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10953
10954 * values.c (print_values): Print as a unreadable object, not as
10955 multiple lines. Thanks to Matthias Köppe!
10956
10957 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10958
10959 * deprecation.c: Fixed copyright date.
10960
10961 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10962 DEPRECATION_H to SCM_DEPRECATION_H.
10963
10964 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10965
10966 * guile-doc-snarf.in: Update copyright.
10967 Fix relative path bug. Thanks to Sergey Poznyakoff.
10968
10969 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10970
10971 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10972 accept open ports. Thanks to Quetzalcoatl Bradley!
10973
10974 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10975
10976 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10977 has 779 primitives on startup.
10978
10979 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10980
10981 * eval.c (scm_i_eval): Copy expression before passing it to
10982 SCM_XEVAL. The copy operation was removed unintendedly during my
10983 change on 2001-03-25.
10984
10985 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10986
10987 from Matthias Köppe (thanks!):
10988
10989 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10990 portable.
10991
10992 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10993 docstring.
10994
10995 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10996
10997 * gc.c (scm_init_gc): Added FIXME comment.
10998
10999 * hooks.c: Since hooks don't have a name any more, it is not
11000 necessary to include objprop.h.
11001
11002 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
11003
11004 (symbol_name, scm_make_hook_with_name): Removed.
11005
11006 (scm_create_hook): Don't set the hook's name property.
11007
11008 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
11009
11010 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
11011
11012 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
11013
11014 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
11015 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
11016 FLOBUFLEN and define it unconditionally.
11017
11018 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
11019
11020 * gh_data.c (gh_lookup): Call gh_module_lookup with
11021 `scm_current_module ()', not `#f'.
11022 (gh_module_lookup): Expect a module instead of an obarray as first
11023 argument and do lookup in that module.
11024
11025 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
11026 arrays. The length of array is already determined differently and
11027 scm_uniform_vector_length does not work on arrays.
11028
11029 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
11030
11031 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
11032 as well. "SCM (*)(...)" does not work on RedHat 7.1.
11033
11034 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
11035 they are not used. Changed `wrong type' error into `wrong num
11036 args' error. Changed all callers.
11037
11038 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
11039 arguments are supplied.
11040
11041 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
11042
11043 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
11044 describe `regexp/notbol' and `regexp/noteol' execution flags.
11045
11046 * strop.c (scm_substring_move_x): Doc fix; nfc.
11047
11048 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
11049
11050 * objects.c, objects.h (scm_valid_object_procedure_p): New.
11051 (scm_set_object_procedure_x): Use it to check argument. Fix
11052 docstring.
11053
11054 * evalext.c (scm_definedp): Fix docstring.
11055
11056 2001-05-05 Gary Houston <ghouston@arglist.com>
11057
11058 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
11059 support.
11060
11061 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
11062
11063 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
11064 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
11065 Change R4RS references to R5RS.
11066
11067 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
11068 docstring source are correctly reproduced in the output (ii)
11069 we don't anymore get occasional trailing quotes. Also reorganized
11070 and commented the code a little.
11071
11072 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
11073 fixes.
11074
11075 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11076
11077 * strop.c (scm_string_split): New procedure.
11078
11079 * strop.h (scm_string_split): Added prototype.
11080
11081 2001-05-04 Gary Houston <ghouston@arglist.com>
11082
11083 * socket.c: define uint32_t if netdb.h doesn't. thanks to
11084 Dale P. Smith.
11085
11086 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
11087
11088 * rw.c: Include "modules.h" and "strports.h".
11089
11090 * net_db.h (scm_gethost): Added prototype.
11091
11092 * deprecation.h, deprecation.c: New.
11093 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
11094 (DOT_X_FILES): Added "deprecation.x".
11095 (modinclude_HEADERS): Added "deprecation.h".
11096
11097 * init.c: Include "deprecation.h".
11098 (scm_init_guile_1): Call scm_init_deprecation.
11099
11100 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
11101
11102 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
11103 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
11104 New.
11105
11106 2001-04-29 Gary Houston <ghouston@arglist.com>
11107
11108 * rw.c: new file, implementing C part of module (ice-9 rw).
11109 (scm_read_string_x_partial): moved from ioext.c
11110 (scm_init_rw): new proc.
11111 * rw.h: new file.
11112 init.c: include rw.h and call scm_init_rw.
11113 Makefile.am: include rw.c and rw.h.
11114
11115 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
11116
11117 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
11118 know what's supposed to happen to it.
11119
11120 * list.h (scm_list_star): deprecation expired - removed.
11121
11122 * numbers.h (scm_dblproc): deprecation expired - removed.
11123 (SCM_UNEGFIXABLE): deprecation expired - removed.
11124 (SCM_FLOBUFLEN): deprecation expired - removed.
11125 (SCM_INEXP): deprecation expired - removed.
11126 (SCM_CPLXP): deprecation expired - removed.
11127 (SCM_REAL): deprecation expired - removed.
11128 (SCM_IMAG): deprecation expired - removed.
11129 (SCM_REALPART): deprecation expired - removed.
11130 (scm_makdbl): deprecation expired - removed.
11131 (SCM_SINGP): deprecation expired - removed.
11132 (SCM_NUM2DBL): deprecation expired - removed.
11133 (SCM_NO_BIGDIG): deprecation expired - removed.
11134
11135 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
11136 (scm_tc_dblr): deprecation expired - removed.
11137 (scm_tc_dblc): deprecation expired - removed.
11138 (scm_tc16_flo): deprecation expired - removed.
11139 (scm_tc_flo): deprecation expired - removed.
11140
11141 * tag.h (scm_tag): deprecation expired - removed.
11142
11143 * tag.c: (scm_tag): deprecation expired - removed.
11144
11145 * ioext.c: (scm_fseek): deprecation expired - removed.
11146
11147 * ioext.h (scm_fseek): deprecation expired - removed.
11148
11149 * gh_data.c (gh_int2scmb): deprecation expired - removed.
11150
11151 * gh.h (gh_int2scmb): deprecation expired - removed.
11152
11153 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
11154
11155 * stacks.c (scm_make_stack): Fix typo in docstring.
11156
11157 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
11158
11159 * error.c (scm_sysmissing): deprecation expired - removed.
11160
11161 * error.h (scm_sysmissing): deprecation expired - removed.
11162
11163 * gc.c
11164 (scm_init_gc): gc-thunk deprecation expired - removed.
11165 (scm_gc_vcell): deprecation expired - removed.
11166 (gc_async_thunk): scm_gc_vcell related code removed.
11167
11168 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
11169
11170 * strings.h
11171 (SCM_NSTRINGP): deprecation expired - removed.
11172 (SCM_NRWSTRINGP): deprecation expired - removed.
11173
11174 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
11175
11176 * chars.h
11177 (SCM_ICHRP): deprecation expired - removed.
11178 (SCM_ICHR): deprecation expired - removed.
11179 (SCM_MAKICHR): deprecation expired - removed.
11180
11181 * ports.h
11182 (SCM_INPORTP): deprecation expired - removed.
11183 (SCM_OUTPORTP): deprecation expired - removed.
11184
11185 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
11186
11187 * modules.c (scm_module_type): New.
11188 (scm_post_boot_init_modules): Initialize from Scheme value.
11189 (the_module, scm_current_module, scm_init_modules): the_module is
11190 now a C only fluid.
11191 (scm_current_module): Export to Scheme.
11192 (scm_set_current_module): Do not call out to Scheme, do all the
11193 work in C. Export procedure to Scheme. Only accept modules, `#f'
11194 is no longer valid as the current module. Only set
11195 scm_top_level_lookup_closure_var and scm_system_transformer when
11196 they are not deprecated.
11197 (scm_module_transformer, scm_current_module_transformer): New.
11198
11199 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
11200 scm_current_module_transformer, scm_module_transformer): New.
11201
11202 * gh_data.c: Removed FIXME comment about gh_lookup returning
11203 SCM_UNDEFINED. That's the right thing to do.
11204
11205 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
11206 into the conditionally compiled sections.
11207 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
11208 scm_current_module_transformer instead of scm_system_transformer.
11209 * init.c (start_stack): Move initialization of
11210 scm_system_transformer to the deprecated section.
11211
11212 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
11213
11214 * throw.c (scm_throw): Correct docstring.
11215
11216 2001-04-22 Gary Houston <ghouston@arglist.com>
11217
11218 * socket.c: attempted to improve the docstrings slightly.
11219
11220 * net_db.c: remove bogus "close" declaration.
11221 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
11222 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
11223 moved to socket.c.
11224 * net_db.h: declarations moved too.
11225
11226 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
11227 long.
11228 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
11229 (VALIDATE_INET6): new macro.
11230 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
11231 inet-pton and inet-ntop.
11232 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
11233 (scm_addr_vector): use ipv6_net_to_num.
11234
11235 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
11236
11237 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
11238 smob number explicitly. Use SCM_TC2SMOBNUM instead.
11239
11240 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
11241 when compiled in debug mode.
11242
11243 (scm_gc_sweep): Only call smob's free function if it is defined.
11244
11245 * print.c (scm_iprin1): No need to check for validity of smob
11246 type or existence of print function.
11247
11248 * smob.[ch] (scm_smobs): Made into a fixed size global array.
11249 Resizing will not work well with preemptive threading.
11250
11251 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
11252
11253 (scm_make_smob_type): Extracted initialization of smob
11254 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
11255 of the critical section.
11256
11257 (scm_smob_prehistory): Initialize all smob descriptors. By
11258 default, don't assign a smob free function: Most smob types don't
11259 need one.
11260
11261 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
11262
11263 2001-04-21 Gary Houston <ghouston@arglist.com>
11264
11265 * socket.c (FLIP_NET_HOST_128): new macro.
11266 (scm_fill_sockaddr): use new macro.
11267 (scm_addr_vector): completed IPv6 address support. added const
11268 to the address parameter.
11269
11270 2001-04-20 Gary Houston <ghouston@arglist.com>
11271
11272 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11273 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11274 is defined.
11275 (scm_addr_vector): use a switch instead of multiple if statements.
11276 Add support for IPv6 (incomplete) .
11277 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11278
11279 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11280
11281 * struct.c (scm_free_structs): Only pairs may be accessed with
11282 SCM_C[AD]R.
11283
11284 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11285
11286 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11287
11288 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11289 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11290 parentheses in order to get the correct associativity.
11291
11292 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11293
11294 * unif.c (scm_array_to_list): Added missing handling of arrays of
11295 bytes. Thanks to Masao Uebayashi for the bug report.
11296
11297 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11298
11299 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11300 consistently.
11301
11302 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11303
11304 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11305
11306 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11307 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11308 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11309 SCM_CLOSURE_FORMALS.
11310
11311 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11312 (scm_i_procedure_arity): Prefer stronger predicates like
11313 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11314
11315 * macros.c (macro_print): Extracted macro printing code from
11316 print.c and simplified it.
11317
11318 (scm_macro_type): Use SCM_MACRO_TYPE;
11319
11320 (scm_init_macros): Use macro_print for printing macros.
11321
11322 * print.c (scm_print_opts): Improved option documentation.
11323
11324 (scm_iprin1): Extracted printing of macros to macros.c.
11325 Simplified printing of ordinary closures.
11326
11327 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11328 Martin Grabmueller for the bug report.
11329
11330 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11331
11332 This patch eliminates some further applications of SCM_C[AD]R to
11333 non pair cells.
11334
11335 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11336 never been applied to real pairs.
11337
11338 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11339
11340 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11341
11342 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11343 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11344 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11345
11346 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11347 Added.
11348
11349 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11350 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11351
11352 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11353 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11354 SCM_SET{AND,OR}_CAR.
11355
11356 2001-04-17 Gary Houston <ghouston@arglist.com>
11357
11358 * some initial support for IPv6:
11359
11360 * socket.c (scm_fill_sockaddr): improve the argument validation.
11361 don't allocate memory until all args are checked. instead of
11362 unconditional memset of soka, try setting sin_len to 0 if
11363 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11364 (scm_socket, scm_connect): extend docstrings for IPv6.
11365 (scm_init_socket): intern AF_INET6 and PF_INET6.
11366
11367 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11368
11369 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11370 matches SCM_DEFER_INTS at the beginning of the function.
11371
11372 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11373
11374 * gc.c (scm_igc): Unconditionally call
11375 SCM_CRITICAL_SECTION_START/END.
11376
11377 * fluids.c (next_fluid_num): Unconditionally call
11378 SCM_CRITICAL_SECTION_START/END.
11379 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11380
11381 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11382 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11383 Removed.
11384
11385 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11386 Defined as nothing for the case of !defined(USE_THREADS).
11387 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11388 Removed.
11389 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11390 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11391 LINE.
11392 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11393 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11394 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11395 SCM_CRITICAL_SECTION_START/END.
11396 (SCM_REALLOW_INTS: Bug fix. Don't call
11397 SCM_THREAD_SWITCHING_CODE.
11398 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11399 SCM_THREAD_SWITCHING_CODE directly.
11400 (SCM_ENTER_A_SECTION): Unconditionally use
11401 SCM_CRITICAL_SECTION_START/END. (was:
11402 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11403
11404 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11405
11406 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11407 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11408 allowed to explicitly set this macro via the CFLAGS variable
11409 during make.
11410
11411 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11412 (SCM_THREAD_CRITICAL_SECTION_START,
11413 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11414 SCM_THREAD_CRITICAL_SECTION_START/END to
11415 SCM_CRITICAL_SECTION_START/END.
11416
11417 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11418
11419 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11420 instead of bzero.
11421
11422 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11423 (MISSING_BZERO_DECL): Remove the declaration.
11424
11425 Thanks to NIIBE Yutaka.
11426
11427 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11428
11429 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11430 goops module should be registered in order to work for an
11431 application which uses libguile statically linked.)
11432
11433 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11434
11435 * numbers.[ch] (scm_num2long, scm_num2long_long,
11436 scm_num2ulong_long, scm_num2ulong): Argument position is an
11437 unsigned integer.
11438
11439 * environments.c (eval_environment_folder,
11440 import_environment_folder), gh_data.c (gh_scm2longs,
11441 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11442 for integers and pointers, respectively.
11443
11444 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11445 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11446 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11447 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11448
11449 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11450 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11451 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11452 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11453 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11454 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11455
11456 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11457
11458 * strings.c (scm_read_only_string_p): Update docstring to reflect
11459 current (non-)usage of "read only" strings.
11460 (scm_make_shared_substring): Clarify docstring by changing
11461 "semantics" to "arguments".
11462
11463 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11464
11465 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11466 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11467 improvements.
11468
11469 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11470
11471 The following changes make the documentation more consistent.
11472
11473 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11474 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11475 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11476 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11477 ... @end lisp.
11478
11479 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11480 (scm_array_dimensions, scm_make_shared_array),
11481 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11482 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11483 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11484 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11485 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11486 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11487 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11488 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11489 @example ... @end example to @lisp ... @end lisp.
11490
11491 * weaks.c (scm_weak_vector): Corrected docstring.
11492
11493 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11494 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11495 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11496 (scm_hashx_set_x, scm_hashx_get_handle),
11497 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11498 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11499 vectors.c (scm_vector_fill_x), strings.c
11500 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11501 objprop.c (scm_set_object_properties_x):
11502 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11503 strports.c (scm_call_with_input_string), ports.c
11504 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11505 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11506 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11507 (scm_make_weak_vector,scm_weak_vector_p),
11508 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11509 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11510 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11511 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11512 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11513 Made parameter names match documentation by renaming parameters
11514 and/or fixing docstrings.
11515
11516 * numbers.c (scm_ash): Corrected Texinfo markup.
11517
11518 * strop.c (scm_string_index, scm_string_rindex),
11519 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11520
11521 * vports.c (scm_make_soft_port), unif.c
11522 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11523 (scm_dimensions_to_uniform_array, scm_transpose_array),
11524 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11525 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11526 (scm_array_to_list, scm_list_to_uniform_array),
11527 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11528 (scm_open_input_string, scm_open_output_string),
11529 (scm_get_output_string), strop.c (scm_string_copy),
11530 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11531 (scm_get_internal_real_time, scm_times),
11532 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11533 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11534 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11535 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11536 simpos.c (scm_system), random.c (scm_random_uniform),
11537 (scm_random_normal, scm_random_exp), ramap.c
11538 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11539 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11540 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11541 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11542 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11543 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11544 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11545 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11546 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11547 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11548 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11549 (scm_integer_expt, scm_bit_extract, scm_logcount),
11550 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11551 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11552 (scm_interaction_environment), macros.c (scm_makacro),
11553 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11554 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11555 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11556 (scm_fluid_ref), filesys.c (scm_open_fdes),
11557 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11558 Docstring correction: `Returns' -> `Return'
11559
11560 * gc.c (scm_set_debug_cell_accesses_x):
11561 (s_scm_gc_set_debug_check_freelist_x):
11562 * fluids.c (scm_fluid_p): Added texinfo markup.
11563
11564 * error.c (scm_strerror): Made docstring more precise.
11565
11566 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11567 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11568 (scm_symbol_p, scm_symbol_to_string), strorder.c
11569 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11570 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11571 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11572 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11573 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11574
11575 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11576
11577 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11578 mode, as suggested by Michael Livshin.
11579
11580 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11581
11582 * backtrace.c (display_backtrace_body): since the `print_state'
11583 variable is not used (instead its data field is used directly as
11584 `pstate'), protect it from the hungry compiler optimizations.
11585 thanks to Bill Schottstaedt for the report.
11586
11587 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11588
11589 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11590 It is only defined and used if guile is compiled with
11591 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11592 let cells with a free_cell type tag be visible outside of the
11593 garbage collector when in debug mode.
11594
11595 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11596
11597 (scm_assert_cell_valid): Use a local static variable to avoid
11598 recursion.
11599
11600 (MARK): Only check for rogue cell pointers in debug mode. Use
11601 scm_cellp for this purpose and place all checks for rogue pointers
11602 into that function. Further, since due to conservative scanning
11603 we may encounter free cells during marking, don't use the standard
11604 cell type accessor macro to determine the cell type.
11605
11606 (scm_cellp): Check if the cell pointer actually points into a
11607 card header.
11608
11609 (scm_init_gc): Initalize scm_tc16_allocated.
11610
11611 * gc.h (GCH): Renamed to SCM_GC_H.
11612
11613 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11614 might be unnecessary, but I feel better this way :-)
11615
11616 (SCM_GC_CELL_TYPE): New macro.
11617
11618 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11619 in guile, and it is unlikely that they will be applied to real
11620 pairs anyway.
11621
11622 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11623
11624 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11625 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11626
11627 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11628 make sure that in debug mode no free cell will ever be visible
11629 outside of the garbage collector.
11630
11631 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11632
11633 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11634 values.
11635
11636 * async.c (scm_system_async), variable.c (scm_make_variable,
11637 scm_make_undefined_variable): Use scm_cons to create a pair.
11638
11639 * debug.c (scm_reverse_lookup): Perform proper type checking.
11640 Remove suspicious use of SCM_SLOPPY_CONSP.
11641
11642 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11643 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11644 the corresponding optimization.
11645
11646 * eval.c (iqq): Use proper type check.
11647
11648 (scm_m_expand_body): Remove redundant type checks.
11649
11650 (promise_print): Don't access promise cells as pairs.
11651
11652 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11653 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11654 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11655 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11656 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11657
11658 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11659 (scm_iprin1): Use new macro predicate and accessors.
11660
11661 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11662 in macros.h.
11663
11664 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11665 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11666 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11667 SCM_VARIABLE_H. Even the macros that are used to inhibit
11668 including a header file twice should be in the SCM_ namespace.
11669
11670 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11671 properties.c (scm_primitive_property_ref,
11672 scm_primitive_property_del_x): Prefer stronger predicates like
11673 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11674
11675 * gc.c (MARK): Use proper macros to access procedure-with-setter
11676 cell elements and closure cell elements.
11677
11678 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11679 access free cells as pairs.
11680
11681 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11682 no hashtab entry is found.
11683
11684 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11685 SCM_CLR_PORT_OPEN_FLAG.
11686
11687 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11688 use SCM_SET_C[AD]R for uninitialized cells.
11689
11690 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11691 If the hashtable has no slots, return #f instead of '(). This
11692 unifies the return value with most assoc-functions.
11693
11694 (scm_hash_fn_ref): Use proper type check.
11695
11696 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11697 Removed references to non-existing functions from documentation.
11698
11699 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11700 access keyword cell elements.
11701
11702 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11703 macros.
11704
11705 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11706
11707 * print.c (scm_iprlist): Added comment. Improved loop
11708 conditions.
11709
11710 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11711 pairs.
11712
11713 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11714
11715 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11716
11717 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11718 cells as pairs.
11719
11720 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11721 scm_variable_set_x): Use proper macros to access variable cell
11722 elements.
11723
11724 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11725
11726 * variable.h (SCM_VARVCELL): Don't access variable cells as
11727 pairs.
11728
11729 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11730 added FIXME comment, removed register specifier.
11731
11732 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11733
11734 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11735 * init.c (scm_init_guile_1): Don't init goopscore module.
11736
11737 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11738
11739 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11740
11741 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11742
11743 * strop.c (scm_string_to_list): Fixed docstring markup.
11744 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11745 (scm_string_downcase, scm_string_capitalize_x),
11746 (scm_string_capitalize): Rewrote and corrected docstrings.
11747 (scm_string_ci_to_symbol): Made docstring more explicit.
11748
11749 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11750
11751 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11752 eval.c can use it.
11753 (scm_call_with_values): Removed.
11754 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11755 so that it can be exported.
11756 (scm_call_with_values): Removed.
11757
11758 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11759 * eval.c: Include "libguile/values.h"
11760 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11761 New.
11762 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11763 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11764 New delcarations to support above change.
11765
11766 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11767 errors with last change.
11768
11769 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11770
11771 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11772 scm_i_eval): Moved the application of the system transformer from
11773 scm_i_eval to scm_primitive_eval.
11774
11775 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11776
11777 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11778
11779 * strop.c (scm_string_index): Fix docstring line break
11780 regression.
11781
11782 * list.c (scm_cons_star): Fix docstring typo.
11783
11784 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11785
11786 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11787 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11788 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11789 scm_make_string, scm_string_append), strports.c (st_resize_port,
11790 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11791 scm_makstr with calls to scm_allocate_string.
11792
11793 * strings.[ch] (scm_allocate_string): New function.
11794
11795 * strings.[ch] (scm_makstr): Deprecated.
11796
11797 2001-03-18 Gary Houston <ghouston@arglist.com>
11798
11799 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11800 NULL. rewrote the docstring.
11801 (scm_mkstemp): new procedure implementing "mkstemp!".
11802 * posix.h: declare scm_mkstemp.
11803
11804 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11805 normally it would be found in netdb.h.
11806
11807 2001-03-17 Gary Houston <ghouston@arglist.com>
11808
11809 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11810 warning when HAVE_ARRAYS is not defined. move len too.
11811
11812 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11813 (EXTRA_DOT_X_FILES): let configure set the value.
11814 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11815
11816 * gc.c (scm_must_malloc): changed the comment explaining when
11817 scm_must variants of malloc/free etc., should be used, based on
11818 explanation from Dirk Herrmann.
11819 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11820 string with procedure name. use scm_must_malloc instead of malloc.
11821 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11822 of malloc/free.
11823 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11824 scm_ungetc): use scm_must variants of malloc/realloc/free.
11825 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11826
11827 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11828
11829 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11830 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11831 scm_wrong_type_arg instead.
11832
11833 (SCM_WNA): Deprecated.
11834
11835 * error.[ch] (scm_wta): Deprecated.
11836
11837 * numbers.c (s_i_log): Minor comment fix.
11838
11839 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11840 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11841 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11842 wrong-num-args or misc errors.
11843
11844 * unif.c (scm_make_shared_array, scm_transpose_array,
11845 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11846 Validate the rest argument (note: this is only done when guile is
11847 built with SCM_DEBUG_REST_ARGUMENT=1)
11848
11849 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11850 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11851
11852 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11853 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11854
11855 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11856
11857 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11858 instead of scm_wrong_num_args.
11859
11860 * coop-threads.c: Don't include libguile/strings.h. (Was only
11861 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11862
11863 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11864 wrong-num-args errors.
11865
11866 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11867
11868 * error.[ch] (scm_error_num_args_subr): New function.
11869
11870 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11871
11872 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11873 (scm_length, scm_append, scm_reverse, scm_list_ref),
11874 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11875 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11876 (scm_delete1_x), gc.c (scm_map_free_list),
11877 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11878 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11879 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11880 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11881 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11882 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11883 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11884
11885 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11886 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11887 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11888 symbols.c (scm_symbol_interned_p), numbers.c
11889 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11890 markup.
11891
11892 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11893
11894 * snarf.h (SCM_CONST_LONG): Deprecated.
11895 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11896
11897 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11898
11899 * numbers.c (scm_num2ulong): Check that a bignum is positive
11900 before looking at the magnitude. Correctly check for overflow
11901 during conversion.
11902 (scm_num2long_long): Likewise.
11903 (scm_num2ulong_long): New.
11904 (ULONG_LONG_MAX): Define if not already defined.
11905 * numbers.h: (scm_num2ulong_long): New prototype.
11906
11907 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11908
11909 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11910
11911 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11912 (SCM_OPOUTSTRPORTP): New predicate macros.
11913 (scm_open_input_string, scm_open_output_string),
11914 (scm_get_output_string): New prototypes.
11915
11916 * strports.c (scm_open_input_string, scm_open_output_string),
11917 (scm_get_output_string): New procedures (SRFI-6 compliant).
11918 Made scm_tc16_strport non-static.
11919
11920 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11921
11922 * macros.h (SCM_ASSYNT): Removed unused object argument from
11923 signature.
11924
11925 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11926 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11927 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11928 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11929 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11930 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11931 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11932 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11933 scm_m_atdispatch): Removed unused object argument from call to
11934 SCM_ASSYNT.
11935
11936 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11937
11938 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11939 const int* to reflect that the input array of integers remains
11940 unchanged. Thanks to Brett Viren for the hint.
11941
11942 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11943
11944 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11945 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11946 in various places.
11947 (gh_scm2newstr, gh_symbol2newstr): Change call to
11948 scm_must_malloc() to malloc(), because user-free()able memory is
11949 allocated.
11950
11951 * gc.c: Added declaration of `scm_debug_check_freelist'.
11952
11953 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11954
11955 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11956
11957 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11958
11959 * strports.c (scm_object_to_string): New procedure.
11960 (scm_strprint_obj): Deprecated.
11961 * strports.h: Reflect the changes.
11962
11963 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11964
11965 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11966
11967 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11968 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11969 SCM_ASSYNT to check for correct argument types. Either use some
11970 SCM_VALIDATE_* macro or an explicit test.
11971
11972 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11973 misc-errors.
11974
11975 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11976 instead of calling scm_wta.
11977
11978 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11979
11980 * load.c (scm_primitive_load, scm_primitive_load_path),
11981 (scm_sys_search_load_path): Corrected docstrings (file ->
11982 filename).
11983
11984 * eval.c (scm_force): Added texinfo markup to docstring.
11985 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11986
11987 * debug-malloc.c: Reinserted #include <stdio.h>.
11988
11989 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11990
11991 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11992
11993 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11994 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11995 Use SCM_LISTn instead of scm_listify.
11996
11997 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11998
11999 * _scm.h: Removed #include <errno.h>.
12000
12001 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
12002 errno variable (can be a macro on some systems, for example when
12003 using linux libc with threads).
12004
12005 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
12006 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
12007 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
12008 #include <errno.h> in these 20 out of 100 files.
12009
12010 2001-03-10 Gary Houston <ghouston@arglist.com>
12011
12012 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
12013 not already defined.
12014
12015 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12016
12017 * coop.c: Inserted #include <stdio.h>.
12018
12019 * iselect.c: Reinserted #include <stdio.h>.
12020
12021 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
12022
12023 * posix.c: Replaced `#define' of __USE_XOPEN right before
12024 including unistd.h with a define of _GNU_SOURCE at the very top of
12025 the file.
12026
12027 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
12028
12029 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
12030 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
12031 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
12032 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
12033 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
12034 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
12035 print.c, procprop.c, procs.c, properties.c, ramap.c,
12036 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
12037 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
12038 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
12039 Remove #include <stdio.h>
12040 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
12041
12042 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
12043
12044 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12045
12046 * posix.c (scm_gethostname): Set initial name length to 256 for
12047 Solaris.
12048
12049 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12050
12051 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12052 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12053 (scm_sethostname, scm_gethostname): New prototypes.
12054
12055 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
12056 <sys/file.h>, if present.
12057 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
12058 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
12059 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
12060 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
12061 (scm_sethostname, scm_gethostname): New procedures.
12062
12063 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
12064
12065 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
12066 not optional (ii) "recommend" spelling correction.
12067
12068 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12069
12070 * ramap.c (racp): Removed optimization which caused array copying
12071 to fail if the two arrays shared storage. Re-inserted the IVDEP
12072 macros removed in the change of 2000-03-09. (Don't really have a
12073 complete grasp of what they are for, but they seem to be necessary
12074 on Crays. This needs testing!) Thanks to Miroslav Silovic.
12075
12076 * hash.c (scm_string_hash): Don't downcase characters.
12077
12078 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12079
12080 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
12081 size from 277 --> 1009.
12082
12083 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
12084 function.
12085
12086 * coop-threads.c: Fixed change of 2001-03-06.
12087
12088 * validate.h: Code formatting.
12089
12090 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
12091
12092 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
12093 (*.doc): Add dependency on guile-snarf.awk.in.
12094
12095 * guile-snarf.awk.in: Neglect spaces at the end of
12096 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
12097 middle of docstrings. (To avoid the problem with gcc-2.96.)
12098
12099 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
12100
12101 * coop-threads.c (scm_call_with_new_thread), load.c
12102 (scm_primitive_load, scm_sys_search_load_path), random.c
12103 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
12104 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
12105 (potentially) issue a scm-misc-error or wrong-num-args error
12106 message.
12107
12108 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
12109 about the expected type with the wrong-type-arg error message.
12110
12111 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
12112 a C level bug that can't be fixed from scheme anyway.
12113
12114 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12115
12116 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
12117 Duplicate bindings are OK in a let* since a let* is semantically
12118 equivalent to a nested set of let:s.
12119
12120 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12121
12122 * print.c (scm_print_options): Fixed texinfo in docstring.
12123
12124 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
12125 the underlying functions getservent, getprotoent or getnetent
12126 return NULL instead of signalling an error.
12127
12128 2001-03-04 Gary Houston <ghouston@arglist.com>
12129
12130 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
12131 taking an unexpectedly large filename for an AF_UNIX socket from
12132 bind/connect/sendto (thanks to Martin Grabmueller).
12133
12134 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
12135 former and adjusted the latter.
12136 (scm_socket, scm_socketpair): cosmetic changes.
12137 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
12138 size_t as socklen_t substitute. don't restrict args/return values
12139 to INUM: allow full range of int or size_t.
12140 (scm_fill_sockaddr): check arguments before allocating memory, to
12141 avoid leakage. use malloc, not scm_must_malloc.
12142 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
12143 substitute. free the sockaddr structure before throwing an error.
12144 (scm_init_add_buffer): procedure removed, together with its static
12145 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
12146 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
12147 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
12148 scm_sendto): use a local buffer instead of scm_addr_buffer.
12149 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
12150 not size_t.
12151 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
12152 call to detect whether recvfrom could be bothered to set the address.
12153 (scm_init_socket): don't call scm_init_addr_buffer.
12154
12155 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12156
12157 * debug.c (scm_procedure_source, scm_procedure_environment),
12158 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
12159 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
12160 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
12161 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
12162 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
12163 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
12164 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
12165 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
12166 scm_array_to_list, scm_array_prototype), validate.h
12167 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
12168 scm_misc_error or scm_wrong_type_arg instead.
12169
12170 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
12171
12172 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12173
12174 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
12175 (scm_sys_tag_body): Added.
12176
12177 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
12178
12179 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
12180 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
12181 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
12182 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
12183 options.c (scm_options), ports.c (scm_remove_from_port_table),
12184 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
12185 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
12186 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
12187 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
12188 instead.
12189
12190 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12191
12192 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
12193
12194 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
12195
12196 * eval.c (scm_s_duplicate_bindings): New error message.
12197 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
12198
12199 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
12200
12201 * eval.h (SCM_EVALIM2): New macro. Use it when a
12202 immediate, literal constant should be evaluated.
12203 * eval.c (scm_s_duplicate_formals): New error message string.
12204 (scm_c_improper_memq): New function.
12205 (scm_m_lambda): Check for duplicate arguments.
12206 (scm_ceval, scm_deval): When executing a body: only cons a new
12207 toplevel environment frame when it is different from the
12208 existing one; use EVALCAR instead of SIDEVAL so that we can properly
12209 check for empty combinations; use SCM_EVALIM2 for the same reason
12210 in the non-toplevel loop.
12211 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
12212 New labels with the meaning of their non-"nontoplevel" partners,
12213 but they are used when it is known that the body is not evaluated at
12214 top-level.
12215 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
12216 reporting for empty combinations.
12217
12218 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
12219
12220 * Remove dump facilities.
12221 * dump.c, dump.h: Removed.
12222 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
12223 * init.c: Remove #include "libguile/dump.h".
12224 (scm_init_guile_1): Remove scm_init_dump.
12225 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
12226 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
12227 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
12228 (scm_set_smob_dump, scm_set_smob_undump): Removed.
12229
12230 * keywords.c: Remove #include "libguile/dump.h".
12231 (keyword_dump, keyword_undump): Removed.
12232 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
12233
12234 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12235
12236 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
12237 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
12238 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
12239 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
12240 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
12241 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
12242 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
12243 to @code{} as the texinfo manual recommends, converted the
12244 examples to use a @lisp{}-environment.
12245
12246 * strports.c (scm_eval_string): Cleaned up the docstring.
12247
12248 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
12249 markup.
12250
12251 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
12252 (scm_number_to_string, scm_string_to_number, scm_number_p)
12253 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
12254 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
12255 (scm_ash): Added texinfo markup and removed obsolete @refill.
12256 (scm_gr_p): Corrected comment.
12257 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
12258 docstring) comments.
12259 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
12260 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
12261 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
12262 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
12263 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
12264 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
12265 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
12266 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
12267
12268 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
12269
12270 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
12271 (Obviously nobody compiles with SCM_RECKLESS defined...)
12272
12273 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12274
12275 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12276
12277 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12278
12279 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12280
12281 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12282
12283 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12284 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12285 since use of `z' suggests that the arguments may be complex.
12286
12287 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12288 typos.
12289
12290 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12291
12292 * dump.c (scm_binary_write, scm_binary_read), eval.c
12293 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12294 scm_guardian_greedy_p, scm_make_guardian), fports.c
12295 (scm_file_port_p): Minor docstring fixes.
12296
12297 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12298
12299 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12300
12301 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12302 scm_i_eval.
12303 (make_class_from_template): Do not bother to set the current
12304 module around the call to DEFVAR, scm_eval takes care of that.
12305 (scm_init_goops): Make scm_module_goops and
12306 scm_goops_lookup_closure permanent objects.
12307
12308 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12309 top level, create a fresh top-level environment for each
12310 expression instead of mutating the exisint frame. This is
12311 important when that frame is closed over.
12312
12313 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12314 SCM_DIGSPERLONG instead of DIGSPERLONG.
12315
12316 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12317
12318 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12319 before applying arrow procedure in `cond' and before applying
12320 receiver procedure in call-with-current-continuation.
12321 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12322 macro. The argument is expanded more than one time.
12323
12324 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12325 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12326
12327 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12328
12329 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12330 notice and license.
12331
12332 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12333
12334 * variable.c (scm_make_variable, scm_make_undefined_variable)
12335 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12336 (scm_variable_bound_p), values.c (scm_values)
12337 (scm_call_with_values), unif.c (scm_bit_count)
12338 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12339 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12340 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12341 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12342 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12343 (scm_copy_random_state, scm_random), print.c (scm_newline)
12344 (scm_write_char, scm_simple_format), debug-malloc.c
12345 (scm_malloc_stats), environments.c (scm_environment_p)
12346 (scm_environment_bound_p, scm_environment_ref)
12347 (scm_environment_fold, scm_environment_define)
12348 (scm_environment_undefine, scm_environment_set_x)
12349 (scm_environment_cell, scm_environment_observe)
12350 (scm_environment_observe_weak, scm_environment_unobserve)
12351 (scm_make_eval_environment, scm_eval_environment_p)
12352 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12353 (scm_eval_environment_imported)
12354 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12355 (scm_import_environment_p, scm_import_environment_imports)
12356 (scm_import_environment_set_imports_x, scm_make_export_environment)
12357 (scm_export_environment_p, scm_export_environment_private)
12358 (scm_export_environment_set_private_x)
12359 (scm_export_environment_signature)
12360 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12361 Added texinfo markup.
12362
12363 * ports.c (scm_drain_input): Lowercased argument to @var.
12364 (scm_current_input_port, scm_current_output_port): Filled in
12365 missing explanation.
12366 (scm_current_load_port, scm_set_current_output_port)
12367 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12368 Added texinfo markup.
12369
12370 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12371 (scm_release_arbiter): Added texinfo markup to docstrings.
12372 Changed `Returns' to `Return'.
12373 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12374
12375 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12376
12377 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12378 by doubling them to `@@'.
12379
12380 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12381
12382 * numbers.c (scm_lognot), random.c (scm_random,
12383 scm_random_normal, scm_random_solid_sphere_x,
12384 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12385 scm_random_exp), dynwind.c
12386 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12387
12388 * goops.c (scm_sys_initialize_object, scm_instance_p,
12389 scm_class_name, scm_class_precedence_list, scm_class_slots,
12390 scm_class_environment, scm_generic_function_name,
12391 scm_generic_function_methods, scm_method_generic_function,
12392 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12393 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12394 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12395 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12396 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12397 scm_class_direct_supers, scm_class_direct_slots,
12398 scm_class_direct_subclasses, scm_class_direct_methods,
12399 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12400 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12401 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12402 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12403 scm_memoized_environment, scm_procedure_name,
12404 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12405 objects.c
12406 (scm_class_of, scm_entity_p, scm_operator_p,
12407 scm_set_object_procedure_x, scm_object_procedure,
12408 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12409 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12410 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12411 scm_hook_to_list), lang.c
12412 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12413 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12414 (scm_print_options, scm_port_with_print_state,
12415 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12416 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12417 scm_make_procedure_with_setter, scm_procedure), throw.c
12418 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12419 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12420 scm_stack_ref, scm_stack_length, scm_frame_p,
12421 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12422 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12423 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12424 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12425 (scm_dirname, scm_basename), dynwind.c
12426 (scm_wind_chain), read.c (scm_read_options, scm_read,
12427 scm_read_hash_extend), gc.c
12428 (scm_unhash_name), eval.c (scm_eval_options_interface,
12429 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12430 (scm_display_error, scm_set_print_params_x,
12431 scm_display_application, scm_display_backtrace, scm_backtrace),
12432 async.c (scm_async, scm_system_async, scm_async_mark,
12433 scm_system_async_mark, scm_run_asyncs, scm_noop,
12434 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12435 scm_mask_signals): Added docstrings.
12436
12437 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12438
12439 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12440 address of car/cdr. (Thanks to Dirk Herrmann)
12441 Use scm_sizet to obtain the length of strings.
12442 (Thanks to Matthias Koeppe)
12443
12444 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12445
12446 * symbols.c (scm_mem2symbol): Put a empty statement after the
12447 next_symbol label. This is mandated by ANSI, appearantly.
12448
12449 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12450
12451 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12452 sense to compile for a specific kernel version. Do not include
12453 <asm/signal.h> while defining __KERNEL__. This hack should no
12454 longer be needed and caused problems.
12455
12456 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12457
12458 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12459 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12460 can not deal with immediates.
12461
12462 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12463
12464 * list.c (scm_list_copy): Validate the first argument.
12465
12466 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12467
12468 Fix evaluator so that top-level expressions are correctly
12469 evaluated with respect to the module system.
12470
12471 * modules.h. modules.c (scm_current_module_lookup_closure): New
12472 function.
12473
12474 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12475 prototypes.
12476 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12477 names to better reflect their meaning.
12478
12479 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12480 evaluated at top-level and synronize lookup closure before
12481 executing every subform.
12482 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12483 (scm_eval_x, scm_eval): Reimplement in terms of
12484 scm_primitive_eval_x and scm_primitive_eval, respectively.
12485
12486 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12487
12488 * macros.c (scm_macro_name, scm_macro_transformer): Use
12489 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12490 Thanks!
12491
12492 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12493
12494 * dump.c (scm_store_bytes): Store data size before data.
12495 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12496 * dump.h (scm_restore_bytes): Updated.
12497
12498 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12499
12500 * dump.c: Use double cells for update schedule.
12501
12502 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12503
12504 * ports.c (scm_unread_char): Take an optional argument.
12505
12506 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12507
12508 * modules.h (scm_selected_module, scm_current_module): Renamed
12509 scm_selected_module to scm_current_module to synchronize Scheme
12510 and C names.
12511 (scm_select_module, scm_set_current_module): Likewise. Changed
12512 all uses.
12513
12514 * ports.c (scm_port_for_each): Make a snapshot of the port table
12515 before iterating over it. The table might change while the user
12516 code is running. With the snapshot, the user can depend on the
12517 fact that each port that existed at the start of the iteration is
12518 encountered exactly once. (ice-9 popen) depends on this.
12519
12520 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12521
12522 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12523
12524 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12525 range checking for the size parameter. Thanks to Martin
12526 Grabmueller for the hint.
12527
12528 (scm_makstr): Reordered string initialization to make interrupt
12529 deferring unnecessary.
12530
12531 * vectors.c (scm_make_vector): Fixed range checking.
12532
12533 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12534
12535 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12536
12537 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12538 checking of the size parameter for type correctness and valid
12539 range. Thanks to Rob Browning for reporting the problem. Instead
12540 of deferring interrupts, scm_remember_upto_here_1 is used.
12541
12542 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12543
12544 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12545 (scm_dump_cell_update): Removed.
12546 (scm_dump_update): Renamed from scm_dump_object_update.
12547 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12548 a pointer instead of returning a value.
12549 * keywords.c (keyword_undump): Updated.
12550
12551 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12552
12553 * dump.c, dump.h: Modified a lot.
12554 (SCM_DUMP_COOKIE): Version 0.1
12555 (scm_dump_mark): Removed.
12556 (scm_restore_cell_object, scm_store_cell_object): New functions.
12557
12558 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12559 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12560 New slots: dump, undump.
12561 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12562 Updated.
12563
12564 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12565 (keyword_undump): Renamed from keyword_alloc.
12566 (scm_init_keywords): Set keyword_dump and keyword_undump.
12567
12568 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12569
12570 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12571 the deprecated SCM_DOUBLE_CELLP.
12572
12573 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12574
12575 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12576
12577 * dump.c, dump.h: New files.
12578 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12579 * init.c: #include "libguile/dump.h".
12580 (scm_init_guile_1): Call scm_init_dump.
12581 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12582 dump_dealloc, dump_store, undump_alloc, undump_restore,
12583 undump_init.
12584 * smob.c (scm_make_smob_type): Init the new slots.
12585 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12586 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12587
12588 * keywords.c: #include "libguile/dump.h".
12589 (keyword_dealloc, keyword_alloc): New functions.
12590 (scm_init_keywords): Set smob_dump and smob_undump.
12591
12592 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12593
12594 * vectors.c (scm_c_make_vector): New function.
12595 * vectors.h (scm_c_make_vector): Declared.
12596 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12597 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12598 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12599 (scm_make_method_cache, scm_i_vector2list,
12600 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12601 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12602 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12603 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12604 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12605 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12606 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12607 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12608
12609 * hashtab.c (scm_c_make_hash_table): New function.
12610 * hashtab.h (scm_c_make_hash_table): Declared.
12611 * environments.c (scm_make_leaf_environment,
12612 scm_make_eval_environment), gc.c (scm_init_storage),
12613 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12614 Use scm_c_make_hash_table.
12615
12616 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12617
12618 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12619
12620 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12621
12622 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12623 end of docstring.
12624
12625 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12626 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12627 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12628 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12629 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12630 scm_source_property, scm_set_source_property_x), sort.c
12631 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12632 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12633 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12634 docstrings.
12635
12636 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12637
12638 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12639 really get that arg.
12640
12641 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12642
12643 * goops.c (s_scm_get_keyword): Bug fix.
12644
12645 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12646
12647 The following patch was sent by Martin Grabmueller. It makes sure
12648 that in case of parameter errors the correct function name is
12649 shown, and that parameter types are only checked once.
12650
12651 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12652 string_capitalize_x): New functions. Each one performs the core
12653 functionality of the corresponding scm_* function.
12654
12655 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12656 scm_string_downcase_x, scm_string_downcase,
12657 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12658 parameter checking wrappers of the above functions.
12659
12660 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12661
12662 * continuations.c, dynl.c, keywords.c, load.c: Include
12663 strings.h. Thanks to Bill Schottstaedt for the bug report.
12664
12665 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12666
12667 * backtrace.c (display_header): Make sure that line and column
12668 information is shown independent of whether the port the code was
12669 read from had an associated filename. Thanks to Martin
12670 Grabmueller for providing this patch.
12671
12672 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12673
12674 * fports.[ch] (scm_file_port_p): New primitive.
12675
12676 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12677
12678 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12679 These are now defined in fports.c, strports.c and vports.c.
12680
12681 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12682 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12683 tags.h).
12684
12685 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12686 (scm_make_sfptob): Made static. These return a type code now.
12687
12688 fports.c (scm_init_fports), strports.c (scm_init_strports),
12689 vports.c (scm_init_vports): Create the corresponding port types.
12690
12691 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12692 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12693
12694 * init.c (scm_init_guile_1): Make sure strports are initialized
12695 before gdbint.
12696
12697 * ports.[ch] (scm_make_port_type): Changed the return type to
12698 scm_bits_t.
12699
12700 * ports.c (scm_ports_prehistory): Don't create any port types
12701 here.
12702
12703 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12704 against scm_tc16_fport directly.
12705
12706 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12707
12708 * srcprop.c (scm_set_source_property_x): Fix to handle
12709 (set-source-property! <obj> 'copy <datum>) correctly.
12710
12711 2001-01-24 Gary Houston <ghouston@arglist.com>
12712
12713 * filesys.c (scm_link): docstring fix.
12714 * fports.h (scm_setfileno): obsolete declaration removed.
12715 * posix.c: bogus popen declaration removed.
12716
12717 * rdelim.c: new file, split from ioext.c.
12718 * rdelim.h: new file, split from ioext.h
12719 * Makefile.am: add rdelim.c and related files.
12720 * init.c: call scm_init_rdelim. include rdelim.h.
12721
12722 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12723
12724 This patch was sent by Martin Grabmueller and makes sure that
12725 parameter errors are reported correctly by the lexicographic
12726 ordering predicates.
12727
12728 * strorder.c (string_less_p, string_ci_less_p): New functions.
12729
12730 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12731 functionality into string_less_p, string_ci_less_p respectively.
12732 The remaining code is just a wrapper to do the parameter
12733 checking.
12734
12735 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12736 parameters and call string_less_p instead of scm_string_less_p.
12737
12738 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12739 Check the parameters and call string_less_ci_p instead of
12740 scm_string_ci_less_p.
12741
12742 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12743
12744 This patch modifies scm_display_error to perform parameter
12745 checking. Thanks to Neil Jerram for the bug report.
12746
12747 * backtrace.[ch] (scm_i_display_error): New function.
12748
12749 * backtrace.c (scm_display_error): Added parameter check and
12750 extracted the core functionality into function
12751 scm_i_display_error.
12752
12753 * throw.c (handler_message): Call scm_i_display_error to display
12754 the error message.
12755
12756 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12757
12758 * eval.c (SCM_APPLY): Added # args check for application of
12759 procedures with arity 3. (Thanks to Anders Holst.)
12760
12761 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12762
12763 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12764
12765 (SCM_OPDIRP): Deprecated.
12766
12767 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12768 SCM_OPN.
12769
12770 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12771 Instead, give an explicit error message in case the directory is
12772 closed.
12773
12774 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12775 instead of SCM_OPENP and SCM_CLOSEDP.
12776
12777 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12778
12779 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12780
12781 * eval.c (inner_eval, scm_eval): Move all real functionality into
12782 inner_eval. Avoid to copy the expression twice by inlining some
12783 code from scm_i_eval.
12784
12785 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12786
12787 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12788 now has to be the last clause, as required by R5RS. Thanks to
12789 Martin Grabmueller for the patch.
12790
12791 2001-01-18 Gary Houston <ghouston@arglist.com>
12792
12793 * ioext.c: further simplify scm_read_string_x_partial by defining
12794 a macro SCM_EBLOCK.
12795
12796 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12797
12798 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12799
12800 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12801
12802 * __scm.h: Added comment about architecture and compiler
12803 properties that are required by guile.
12804
12805 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12806 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12807
12808 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12809
12810 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12811
12812 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12813 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12814
12815 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12816
12817 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12818 to the names in limits.h.
12819
12820 * numbers.c (abs_most_negative_fixnum): Added.
12821
12822 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12823 fixnum-min) special case.
12824
12825 (scm_big_and): Fix for negative first parameter.
12826
12827 (scm_bit_extract): Fix for fixnum paramters.
12828 Thanks to Rob Browning for the bug report.
12829
12830 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12831
12832 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12833
12834 * symbols.c (scm_symbol_bound_p): Fixed comment.
12835 Thanks to Chris Cramer.
12836
12837 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12838
12839 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12840 Thanks to Bill Schottstaedt.
12841
12842 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12843
12844 from Matthias Köppe:
12845
12846 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12847 casts its result, so doesn't yield an lvalue per ANSI C.
12848
12849 * goops.c (s_scm_sys_set_object_setter_x): use
12850 SCM_SET_ENTITY_SETTER.
12851 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12852
12853 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12854 its result, so doesn't yield an lvalue per ANSI C.
12855 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12856 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12857 SCM_GC_SET_CARD_FLAGS.
12858 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12859
12860 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12861
12862 2001-01-08 Gary Houston <ghouston@arglist.com>
12863
12864 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12865 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12866 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12867 changes.
12868 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12869 for fdes. if current input port is used, check that it's a file
12870 port.
12871
12872 2001-01-06 Gary Houston <ghouston@arglist.com>
12873
12874 * ioext.c (scm_read_string_x_partial): new procedure, implements
12875 read-string!/partial.
12876 * ports.c (scm_take_from_input_buffers): new procedure used by
12877 scm_read_string_x_partial.
12878 (scm_drain_input): use scm_take_from_input_buffers.
12879
12880 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12881
12882 * validate.h (SCM_VALIDATE_NUMBER): New.
12883
12884 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12885
12886 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12887 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12888 SET_DESTROYED): new defines/macros.
12889 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12890 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12891 (guardian_print): print more info.
12892 (guardian_apply): check if the guardian is destroyed, and throw an
12893 error if so. take one more optional argument `throw_p'.
12894 (scm_guard): depending on the value of `throw_p', return a boolean
12895 result.
12896 (scm_get_one_zombie): remove redundant property test.
12897 (guardian_t): represent the various (currently 3, I hope nothing
12898 more gets added) boolean fields as bit flags.
12899 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12900 (scm_destroy_guardian_x): new procedure.
12901
12902 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12903 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12904
12905 2001-01-01 Gary Houston <ghouston@arglist.com>
12906
12907 * fports.c (fport_write): bugfix: handle short writes for
12908 unbuffered ports too. optimize the buffered case by minimizing
12909 the number of write/flush calls.
12910 (write_all): new helper procedure.
12911
12912 The ChangeLog continues in the file: "ChangeLog-2000"