Modernize Automake files.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
95c6523b
LC
12008-06-28 Ludovic Courtès <ludo@gnu.org>
2
47871d5a
LC
3 * Makefile.am (INCLUDES): Renamed to...
4 (AM_CPPFLAGS): this, to match current Automake conventions.
5 Users updated.
6
95c6523b
LC
7 * tags.h (SCM_UNPACK): Disable type-checking for `__DECC' and
8 `__HP_cc'. Reported by Peter O'Gorman <pogma@thewrittenword.com>.
9
6eadcdab
LC
102008-06-02 Ludovic Courtès <ludo@gnu.org>
11
12 * deprecated.c (maybe_close_port): Rename EXCEPT to EXCEPT_SET
13 to workaround `#define except' on Tru64. Reported by Peter
14 O'Gorman <pogma@thewrittenword.com>.
15
102dbb6f
LC
162008-05-31 Ludovic Courtès <ludo@gnu.org>
17
18 * __scm.h (SCM_INTERNAL): New macro.
19 * *.h: Use it to mark as internal `scm_i_' and `scm_init_'
20 functions that are not used by public macros or inline
21 functions.
22
184af225
JG
232008-05-14 Julian Graham <joolean@gmail.com>
24
25 * threads.c (fat_mutex)[recursive]: New field.
26 (make_fat_mutex): Adjust initialization to reflect changes to
27 mutex lock level semantics.
28 (fat_mutex_lock, fat_mutex_unlock): Add support for unowned
29 mutexes and locking mutexes on behalf of other threads.
30 (scm_lock_mutex, scm_lock_mutex_timed): Update to reflect
31 signature change to fat_mutex_lock.
32 (scm_mutex_owner, scm_mutex_level, scm_mutex_locked_p): New /
33 re-enabled functions.
34 * threads.h (scm_mutex_owner, scm_mutex_level,
35 scm_mutex_locked_p): Prototypes for new functions.
36
e4c1d4cf
NJ
372008-05-12 Neil Jerram <neil@ossau.uklinux.net>
38
39 * discouraged.c: Expand DEFFROM and DEFTO macros, to avoid
40 compiler warnings about excess semicolons. (Reported by Didier
41 Godefroy.)
42
346e4402
NJ
432008-05-08 Neil Jerram <neil@ossau.uklinux.net>
44
45 * throw.c (scm_ithrow): For IA64 add a return statement, to
46 appease GCC.
47
48 * threads.h (scm_i_thread): New IA64 fields:
49 register_backing_store_base and pending_rbs_continuation.
50
51 * threads.c (guilify_self_1): For IA64: cap RBS base address at
52 the current value of scm_ia64_ar_bsp, and store the capped value
53 in thread state.
54 (SCM_MARK_BACKING_STORE): Use thread->register_backing_store_base
55 instead of scm_ia64_register_backing_store_base().
56 (scm_threads_mark_stacks): Add "&" in "&t->regs", so that the code
57 works both for jmp_buf defined as an array, and jmp_buf defined as
58 a struct.
59
60 * continuations.h (scm_t_contregs): Remove `fresh' and `ctx'
61 fields; these are now inside the IA64 definition of `jmp_buf'.
62
63 * continuations.c (scm_make_continuation): Simplify, by moving
64 some of the IA64 code inside the definition of "setjmp", and by
65 some obvious commonizations. For IA64 register backing store
66 (RBS) stack base, use thread->register_backing_store_base instead
67 of scm_ia64_register_backing_store_base().
68 (copy_stack): For IA64, store pointer to continuation being
69 invoked in thread state, so we can restore the continuation's RBS
70 stack just before the next setcontext call.
71 (copy_stack_and_call): Don't restore RBS stack explicitly here.
72 It will be restored, if appropriate, inside the longjmp call.
73 (scm_ia64_longjmp): New function.
74
75 * __scm.h (setjmp, longjmp, jmp_buf): For IA64, implement using
76 getcontext and setcontext.
77
7a35784c
LC
782008-05-07 Ludovic Courtès <ludo@gnu.org>
79
80 * numbers.c (scm_from_complex_double): Mark as `SCM_UNUSED'.
81 This fixes compilation with `-Werror' on FreeBSD 6.2 (i386).
82
6d4e1f62
NJ
832008-05-05 Neil Jerram <neil@ossau.uklinux.net>
84
85 * c-tokenize.lex: #define YY_NO_INPUT.
86
bd22f1c7
LC
872008-04-26 Ludovic Courtès <ludo@gnu.org>
88
89 * read.c (scm_read_sexp): Remove extraneous semi-colon at
90 end-of-line, which broke compilation with GCC 2.7. Reported by
91 Alain Guibert <alguibert+bts@free.fr>.
92
535b3592
LC
932008-04-24 Ludovic Courtès <ludo@gnu.org>
94
95 * Makefile.am (DEFAULT_INCLUDES): New. Fixes compilation on
96 Tru64 where our "random.h" would shadown libc's one.
97 (INCLUDES): Add "-I$(top_buildir)", which is normally in
98 `DEFAULT_INCLUDES'.
99 * gen-scmconfig.c: Include <libguile/gen-scmconfig.h>, not
100 "gen-scmconfig.h" since that file is under `$(builddir)'.
101
f5c2af4b
LC
1022008-04-16 Ludovic Courtès <ludo@gnu.org>
103
104 * ports.c (scm_getc, scm_putc, scm_puts): Moved...
105 * inline.h: ... here. Noticeably improves `read' performance.
106
ef4cbc08
LC
1072008-04-15 Ludovic Courtès <ludo@gnu.org>
108 Julian Graham <joolean@gmail.com>
109
110 * read.c (scm_keyword_postfix): New.
111 (scm_read_opts): Update docstring for `keywords'.
112 (scm_read_mixed_case_symbol): Add support for postfix keywords.
113
07db6fcd
LC
1142008-04-13 Ludovic Courtès <ludo@gnu.org>
115
116 * inline.h (SCM_C_USE_EXTERN_INLINE): New macro. Use it to make
117 sure "extern" declarations are produced when "extern inline" is
9dca8935 118 used. Simplify macrology around inline definitions.
07db6fcd 119
7dc9ae71
LC
1202008-04-10 Ludovic Courtès <ludo@gnu.org>
121
122 * inline.h (SCM_C_EXTERN_INLINE): Special-case Apple's GCC
123 4.0-based compiler, which doesn't support GNU inline semantics
124 at all in C99 mode but doesn't define `__GNUC_STDC_INLINE__'.
125 See http://thread.gmane.org/gmane.network.gnutls.general/1135 .
126
54ee7cdf
AW
1272008-04-10 Andy Wingo <wingo@pobox.com>
128
4650d115
AW
129 * struct.c (scm_struct_ref, scm_struct_set_x): "Light" structs
130 have no hidden words (members of the SCM_STRUCT_DATA(x) array
131 accessed with negative indices). In that case, determine the
132 number of fields from the length of the struct layout
133 descriptor. (Most GOOPS instances are light structs.)
134
4125c767
AW
135 * goops.c (wrap_init): Initialize 'u' slots to 0, not some random
136 SCM value.
137
138 * goops.c (get_slot_value, set_slot_value): In the struct
54ee7cdf
AW
139 allocation case, don't poke the slots array directly -- we should
140 go through struct-ref/struct-set! code so that we get the
141 permissions and allocation ('u' versus 'p') correct.
142
979eade6
LC
1432008-04-03 Ludovic Courtès <ludo@gnu.org>
144
145 * inline.h (SCM_C_EXTERN_INLINE): New macro, addresses the
146 "extern inline" semantic change in C99 mode with GCC 4.3 and
147 later and the warning in C99 mode with GCC 4.2. Use it in the
148 inline function definitions.
149
2a1d0688
NJ
1502008-03-24 Neil Jerram <neil@ossau.uklinux.net>
151
152 Applying patch from Julian Graham, containing minor fixes to his
153 thread enhancements:
154
155 * threads.c (to_timespec): Change 1000000 multiplier to
156 1000000000.
157 (unchecked_unlock_sym, allow_external_unlock_sym,
158 recursive_sym): Use SCM_SYMBOL.
159 (scm_make_mutex_with_flags): When raising unsupported option
160 error, report what the unsupported option was.
161 (fat_mutex_unlock): When raising errors, unlock m->lock first.
162 (fat_cond_timedwait): Removed.
163 (scm_timed_wait_condition_variable): Call fat_mutex_unlock
164 directly instead of via fat_cond_timedwait.
165
c2ad98ad
LC
1662008-03-10 Ludovic Courtès <ludo@gnu.org>
167
168 * eval.c, filesys.c: Enclose `alloca' blob in `#ifndef alloca',
169 as per Gnulib's `alloca'. This should fix compilation on
170 FreeBSD 6.
171
bca69a9f
NJ
1722008-03-09 Neil Jerram <neil@ossau.uklinux.net>
173
174 * numbers.c: Only define scm_from_complex_double if it will
175 actually be used.
176
6180e336
NJ
1772008-03-08 Julian Graham <joolean@gmail.com>
178
241d9cea
NJ
179 * threads.c (scm_join_thread_timed, scm_thread_p,
180 scm_make_mutex_with_flags, scm_lock_mutex_timed,
181 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p): New
6180e336
NJ
182 functions.
183 (thread_mark): Updated to mark new struct field `mutexes'.
241d9cea 184 (do_thread_exit): Notify threads waiting on mutexes locked by exiting
6180e336 185 thread.
241d9cea
NJ
186 (scm_join_thread, scm_make_mutex, scm_make_recursive_mutex,
187 scm_mutex_lock): Reimplement in terms of their newer
6180e336
NJ
188 counterparts.
189 (scm_abandoned_mutex_error_key): New symbol.
190 (fat_mutex)[unchecked_unlock, allow_external_unlock]: New fields.
191 (fat_mutex_lock): Reimplement to support timeouts and abandonment.
192 (fat_mutex_trylock, scm_try_mutex): Remove fat_mutex_trylock and
193 reimplement scm_try_mutex as a lock attempt with a timeout of zero.
194 (fat_mutex_unlock): Allow unlocking from other threads and unchecked
195 unlocking; implement in terms of condition variable wait.
241d9cea 196 (scm_timed_wait_condition_variable): Reimplement in terms of
6180e336
NJ
197 fat_mutex_unlock.
198 * threads.h (scm_i_thread)[mutexes]: New field.
199 (scm_join_thread_timed, scm_thread_p, scm_lock_mutex_timed,
241d9cea 200 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p):
6180e336
NJ
201 Prototypes for new functions.
202
61b6542a
LC
2032008-03-06 Ludovic Courtès <ludo@gnu.org>
204
205 * eval.c (scm_eval): If MODULE_OR_STATE is not a dynamic state,
206 make sure it's a module. Reported by David I. Lehn.
207
3f520967
LC
2082008-03-02 Ludovic Courtès <ludo@gnu.org>
209
210 * pairs.h (scm_is_pair): Moved declaration to `inline.h'.
211 * inline.h: Make sure `extern' declarations are not produced
212 when `inline' is supported but GCC is not used. This
213 fixes "mixed linkage" errors with compilers such as
214 DEC/Compaq/HP CC.
215
fa80e280
NJ
2162008-02-27 Neil Jerram <neil@ossau.uklinux.net>
217
218 * _scm.h (errno): Remove declarations that have been there
219 forever, and are known to conflict on some platforms with that
220 provided by <errno.h>, which we include unconditionally. If
221 <errno.h> doesn't provide a errno declaration, what is the point
222 of it?
223
a2c25234
LC
2242008-02-23 Ludovic Courtès <ludo@gnu.org>
225
226 * numbers.c (scm_make_rectangular): Rename argument to
227 `real_part' and `imaginary_part' to work around Solaris 2.10
228 headers which define `imaginary' as a macro. Patch by Tim
229 Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>.
230
bfb64eb4
LC
2312008-02-22 Ludovic Courtès <ludo@gnu.org>
232
4fcb27c4
LC
233 * read.c (strncasecmp): Add declaration when
234 `HAVE_DECL_STRNCASECMP' is undefined. Fixes compilation on
235 NetBSD 1.6.
236
bfb64eb4
LC
237 * gc.c (scm_ia64_ar_bsp)[linux]: Don't discard `const' qualifier
238 of OPAQUE.
239
5305df84
LC
2402008-02-21 Ludovic Courtès <ludo@gnu.org>
241
242 Fix bug #22369.
243
244 * goops.c (scm_add_slot): Add `SCM_UNDEFINED' as last argument
a2c25234
LC
245 to `scm_list_n ()'. Thanks to René Köcher
246 <shirk87@googlemail.com>.
5305df84 247
25a640ca
LC
2482008-02-17 Ludovic Courtès <ludo@gnu.org>
249
250 * script.c (scm_compile_shell_switches): Update copyright year.
251
9a6fac59
LC
2522008-02-16 Ludovic Courtès <ludo@gnu.org>
253
254 * gc_os_dep.c: Add NetBSD/alpha support. Patch by Greg Troxel
255 <gdt@ir.bbn.com>.
256
5b5179f8
LC
2572008-02-12 Ludovic Courtès <ludo@gnu.org>
258
259 * guile-snarf.in (tempdir): Honor `$TMPDIR'.
260
4b26c03e
NJ
2612008-02-11 Neil Jerram <neil@ossau.uklinux.net>
262
263 * numbers.c (SCM_COMPLEX_VALUE): Use GUILE_I instead of _Complex_I
264 directly, and only if GUILE_I was defined by the configure step.
265 (scm_log, scm_log10, scm_exp, scm_sqrt): Use SCM_COMPLEX_VALUE
266 code only if SCM_COMPLEX_VALUE is defined.
267
7f74cf9a
LC
2682008-02-07 Ludovic Courtès <ludo@gnu.org>
269
270 Fix bug #21378.
271 Thanks to David Diffenbaugh <davediff@nbcs.rutgers.edu>.
272
273 * read.c (scm_read_quote): Don't use `__FUNCTION__' since it is
274 not supported by Sun CC on Solaris 9.
275 (scm_read_keyword): Likewise.
276 * strings.c (scm_take_locale_stringn): Remove
277 `SCM_C_INLINE_KEYWORD' to allow compilation with Sun CC.
278
86a597f8
NJ
2792008-02-07 Julian Graham <joolean@gmail.com>
280
241d9cea
NJ
281 * threads.c (do_thread_exit, scm_cancel_thread,
282 scm_set_thread_cleanup_x, scm_thread_cleanup): Lock on thread-specific
86a597f8
NJ
283 admin mutex instead of `thread_admin_mutex'.
284 * threads.h (scm_i_thread)[admin_mutex]: New field.
285 * throw.c (make_jmpbuf): Don't enter critical section during thread
286 spawn -- there is a possibility of deadlock if other threads are
287 exiting.
241d9cea 288
4a19ed04
NJ
2892008-02-06 Neil Jerram <neil@ossau.uklinux.net>
290
291 * gc-malloc.c (scm_gc_malloc): Return NULL if requested size is 0.
292 (scm_gc_free): Don't call `free' if mem is NULL.
293
189171c5
LC
2942008-02-06 Ludovic Courtès <ludo@gnu.org>
295
296 * numbers.c (scm_i_mkbig, scm_i_long2big, scm_i_ulong2big,
297 scm_i_clonebig, scm_i_bigcmp, scm_i_dbl2big, scm_i_dbl2num,
298 scm_i_normbig): Remove `SCM_C_INLINE_KEYWORD' since these are
299 declared as `extern' in `numbers.h'. This precluded compilation
300 on Solaris 9 with Sun CC (reported by David Halik
301 <dhalik@nbcs.rutgers.edu>).
302
d05bcb2e
NJ
3032008-02-05 Neil Jerram <neil@ossau.uklinux.net>
304
305 * fports.c (fport_seek): Make dependent on GUILE_USE_64_CALLS.
306
307 * _scm.h: Make definition of CHOOSE_LARGEFILE depend on
308 GUILE_USE_64_CALLS.
309
3ac8359a
NJ
3102008-02-01 Neil Jerram <neil@ossau.uklinux.net>
311
312 * modules.c (the_root_module): Moved before scm_current_module.
313 (scm_current_module): Return the root module if `the-module' fluid
314 gives #f.
315
d3cf93bc
NJ
3162008-01-22 Neil Jerram <neil@ossau.uklinux.net>
317
7df13834
NJ
318 * COPYING: Removed.
319
d3cf93bc
NJ
320 * __scm.h, _scm.h, weaks.c: Update copyright statement to LGPL.
321
15bd90ea
NJ
3222008-01-18 Neil Jerram <neil@ossau.uklinux.net>
323
324 * hashtab.c (scm_hash_fn_create_handle_x): If supplied assoc_fn
325 returns neither a pair nor #f, signal a wrong-type-arg error.
326 (Thanks to Gregory Marton for reporting this.)
327
5c004b6d
NJ
3282007-12-29 Neil Jerram <neil@ossau.uklinux.net>
329
330 * gc.c (mark_gc_async): Change "func_data" to "fn_data", to avoid
331 clash with AIX header file.
332 * hooks.c (scm_c_hook_add, scm_c_hook_remove): Same again.
333 * hooks.h (scm_t_c_hook_function, scm_c_hook_add,
334 scm_c_hook_remove): Same again.
335
9cc37597
LC
3362007-12-08 Ludovic Courtès <ludo@gnu.org>
337
338 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
339 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
340 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
341 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
342 * eval.i.c (CEVAL): Use branch prediction hints for syntax
343 errors, wrong number of arguments and similar.
344 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
345 immediate numbers.
346 (scm_difference, scm_product, scm_i_divide): Likewise.
347 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
348
7d1fc872
LC
3492007-12-04 Ludovic Courtès <ludo@gnu.org>
350
693758d5
LC
351 * ports.c (scm_c_read): Validate PORT as an open input port.
352 (scm_c_write): Validate PORT as an open output port.
353
7d1fc872
LC
354 * socket.c (scm_accept): Leave guile mode using
355 `scm_std_select ()' before calling `accept(2)'. Reported by
356 dskr <dskr@mac.com>.
357
ee834df4
LC
3582007-10-27 Ludovic Courtès <ludo@gnu.org>
359
360 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
361 containing the port. Fixes a bug in the new port table (2007-08-26).
362 (scm_evict_ports): Use `scm_c_port_for_each ()'.
363
acbfb594
NJ
3642007-10-21 Neil Jerram <neil@ossau.uklinux.net>
365
366 * eval.c (unmemoize_delay): Extend the environment before
367 unmemoizing the promise thunk. This fixes a segmentation fault
368 reported by Frank Schwidom.
369
2e77f720
LC
3702007-10-20 Julian Graham <joolean@gmail.com>
371
372 Add support for thread cancellation and user-defined thread
373 cleanup handlers. Small rework by Ludovic Courtès.
374
375 * null-threads.h (scm_i_pthread_cancel,
376 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
377 * pthread-threads.h (scm_i_pthread_cancel,
378 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
379 * scmsigs.c (scm_i_signal_delivery_thread,
380 signal_delivery_thread_mutex): New.
381 (signal_delivery_thread): Leave when `read_without_guile ()'
382 returns zero.
383 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
384 before spawning the thread. Initialize
385 SCM_I_SIGNAL_DELIVERY_THREAD.
386 (ensure_signal_delivery_thread): Renamed to...
387 (scm_i_ensure_signal_delivery_thread): this.
388 (scm_i_close_signal_pipe): New.
389 * scmsigs.h: Updated.
390 * threads.c (thread_mark): Mark `t->cleanup_handler'.
391 (guilify_self_1): Initialize `t->cleanup_handler' and
392 `t->canceled'.
393 (do_thread_exit): Invoke `t->cleanup_handler'.
394 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
395 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
396 vanishes.
397 (scm_leave_guile_cleanup): New.
241d9cea 398 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
2e77f720
LC
399 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
400 than call `scm_leave_guile ()' after FUNC.
401 (scm_cancel_thread, scm_set_thread_cleanup_x,
402 scm_threads_cleanup): New.
403 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
404 returned list.
405 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
406 fields.
407 Add declarations of new functions.
241d9cea 408
d41668fa
LC
4092007-10-17 Ludovic Courtès <ludo@gnu.org>
410
411 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
412 regression compared to 1.8.2. Reported by Puneet
413 <schemer@gmail.com>.
414
66302618
LC
4152007-10-10 Ludovic Courtès <ludo@gnu.org>
416
417 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
418 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
419 * gen-scmconfig.h.in
420 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
421 * gen-scmconfig.c (main): Define
422 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
423
1445e449
LC
4242007-10-04 Ludovic Courtès <ludo@gnu.org>
425
426 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
427 `leave_locale_section ()' on failure of
428 `enter_locale_section ()' since the mutex is not held and locale
429 settings are unchanged.
430 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
241d9cea 431 `restore_locale_settings ()' instead of `leave_locale_section ()'
1445e449 432 since the mutex is not held.
241d9cea 433
29776e85
LC
4342007-10-02 Ludovic Courtès <ludo@gnu.org>
435
436 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
437 since we're already in non-guile mode. Reported by Greg Toxel
438 for NetBSD.
439
61d3568b
LC
4402007-10-01 Ludovic Courtès <ludo@gnu.org>
441
442 * ports.c (flush_output_port): Expect directly a port instead of
443 a pair. Fixes a bug in the new port table (2007-08-26).
444
68eccd8b
KR
4452007-09-11 Kevin Ryde <user42@zip.com.au>
446
447 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
448 putenv("NAME") as the fallback everywhere else. In particular this is
449 needed for solaris 9. Reported by Frank Storbeck.
241d9cea 450
454866e0
LC
4512007-09-03 Ludovic Courtès <ludo@gnu.org>
452
453 * read.c (flush_ws): Handle SCSH block comments.
454
f43f3620
LC
4552007-09-03 Ludovic Courtès <ludo@gnu.org>
456
457 Fix alignment issues which showed up at least on SPARC.
458
459 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
460 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
461 alignment.
462 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
463 correct alignment.
464 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
465 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
466 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
467 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
468 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
469
8d4d5dfc
KR
4702007-09-03 Kevin Ryde <user42@zip.com.au>
471
472 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
473 before using clog(). It's possible for gcc to provide the "complex
474 double" type, but for the system not to have the complex funcs.
475 (scm_exp): Ditto HAVE_CEXP for cexp().
476 (clog, cexp, carg): Remove fallback definitions. These only
477 duplicated the code within scm_log and scm_exp, and the latter have to
478 exist for the case when there's no "complex double". So better just
479 fix up the conditionals selecting between the complex funcs and plain
480 doubles than worry about fallbacks.
481
1ac5fb45
LC
4822007-09-02 Ludovic Courtès <ludo@gnu.org>
483
484 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
485 This fixes a memory leak.
486
b87e6d04
HWN
4872007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
488
5dbc6c06
HWN
489 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
490 gc.c: replace port table with weak hash table. This simplifies
491 memory management, and fixes freed cells appearing in
492 port-for-each output.
493
b87e6d04
HWN
494 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
495 held.
496
2baec6a9
LC
4972007-08-23 Ludovic Courtès <ludo@gnu.org>
498
492faee1 499 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 500 expression when asked to. Reported by Kevin.
492faee1 501
2baec6a9
LC
502 * stime.c: Define `_REENTRANT' only if not already defined.
503
1f11c61a
KR
5042007-08-21 Kevin Ryde <user42@zip.com.au>
505
506 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
507 tc16 values so big, real, complex and fraction can be distinguished.
508
509 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
510 was making numbers come out as "type 23" in gc-live-object-stats.
511 Fix tests of the tc16 number types, they were checked under
512 scm_tc7_number, but the values went down the tag>=255 smob case.
513 Put smob case under scm_tc7_smob instead of using tag>=255, per
241d9cea 514 recommendation in comments with scm_tc7_smob to use symbolic values.
1f11c61a
KR
515 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
516 code. Lose some unnecessary "break" statements.
517
518 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
519 element returned, rather than two lookups scm_hashq_ref and
520 scm_hashq_set_x.
521
949ec9f9
KR
5222007-08-17 Kevin Ryde <user42@zip.com.au>
523
524 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
525 solaris 2.6. Reported by anirkko.
526
6caac03c
LC
5272007-07-29 Ludovic Courtès <ludo@gnu.org>
528
529 * Makefile.am (INCLUDES): Added Gnulib includes.
530 (gnulib_library): New.
531 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
532 `$(gnulib_library)'.
533 (libguile_la_LIBADD): Likewise.
534
535 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
536 to define it when available.
537 * srfi-14.c: Likewise.
f7439099
LC
538 * i18n.c: Likewise. Include Gnulib's <alloca.h>
539 * eval.c: Include Gnulib's <alloca.h>.
540 * filesys.c: Likewise.
541 * read.c: Don't include <strings.h> and don't provide an
542 `strncasecmp ()' replacement; use Gnulib's <string.h> and
543 `strncasecmp ()' instead.
6caac03c 544
e08f3f7a
LC
5452007-07-25 Ludovic Courtès <ludo@gnu.org>
546
547 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
548 immediately. This used to produce a circular memoized
549 expression, e.g., for `(set (quote x) #t)'.
550
7337d56d
LC
5512007-07-22 Ludovic Courtès <ludo@gnu.org>
552
553 Overhauled the reader, making it faster.
554
555 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
556 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
557 of `scm_lreadr ()'.
558
559 * read.c: Overhauled. No longer use a token buffer. Use a
560 on-stack C buffer in the common case and use Scheme strings when
561 larger buffers are needed.
562 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
563 scm_lreadr, scm_lreadrecparen): Removed.
564 (scm_i_input_error): Marked as `SCM_NORETURN'.
565
df449722
LC
5662007-07-15 Ludovic Courtès <ludo@gnu.org>
567
568 * script.c (scm_compile_shell_switches): Updated copyright year.
569
b1f57ea4
LC
5702007-07-11 Ludovic Courtès <ludo@gnu.org>
571
572 * goops.c (scm_sys_method_more_specific_p): Added docstring.
573 Make sure LEN is greater than or equal to the minimum length of
574 specializers of M1 and M2. This fixes a segfault later on in
575 `more_specificp ()' if TARGS is too small. Reported by Marco
576 Maggi <marco.maggi-ipsu@poste.it>.
577
d3075c52
LC
5782007-06-26 Ludovic Courtès <ludo@gnu.org>
579
580 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
581 sure to free the previous array after the new one has been
582 installed. This leak is made visible by running
583 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
584 from the REPL within Valgrind.
585
7a5fb796
LC
5862007-06-12 Ludovic Courtès <ludo@chbouib.org>
587
588 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
589 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
590 bus error on SPARC (and possibly others) due to unaligned access.
591
a1ef7406
LC
5922007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
593
594 * posix.c (scm_ttyname): Check whether RESULT is NULL before
595 making a string from it (reported by Dan McMahill). Don't call
596 `scm_from_locale_string ()' before the mutex is released.
597
3dcf3373
LC
5982007-05-26 Ludovic Courtès <ludo@chbouib.org>
599
600 * eval.c (scm_m_define): Updated comment. Changed order for value
601 evaluation and `scm_sym2var ()' call, which is perfectly valid per
602 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
603
608860a5
LC
6042007-05-05 Ludovic Courtès <ludo@chbouib.org>
605
606 Implemented lazy duplicate binding handling.
607
608 * modules.c (scm_export): Renamed to...
609 (scm_module_export): This. Now public.
610 (module_variable): Removed.
611 (default_duplicate_binding_procedures_var): New variable.
612 (default_duplicate_binding_handlers, resolve_duplicate_binding,
613 module_imported_variable, scm_module_local_variable,
614 scm_module_variable): New functions.
615 (scm_module_import_interface): Rewritten.
616 (scm_module_reverse_lookup): Exported as a Scheme function.
617 * modules.h (scm_module_index_duplicate_handlers,
618 scm_module_index_import_obarray): New macros.
619 (scm_module_variable, scm_module_local_variable,
620 scm_module_export): New declarations.
621
1911e3da
LC
6222007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
623
624 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
625 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
626
1d8ce4c0
HWN
6272007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
628
629 * numbers.c (carg): provide carg, cexp, clog in case they are
630 missing.
631
afb49959
LC
6322007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
633
634 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
635 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
636 Steven Wu.
637
b3aa4626
KR
6382007-03-08 Kevin Ryde <user42@zip.com.au>
639
640 * struct.c, struct.h (scm_make_vtable): New function, providing
641 `make-vtable'.
642 * stacks.c (scm_init_stacks): Use it.
643
6442007-03-06 Kevin Ryde <user42@zip.com.au>
645
646 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
647 allocating a tail array. If there's no such then those tail fields
648 are uninitialized and garbage SCMs there can cause a segv if printed
649 (after fetching with struct-ref).
650
6512007-02-22 Kevin Ryde <user42@zip.com.au>
652
653 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
654 (scm_usleep): Update docstring per manual, cross reference sleep.
655
656 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
657 scm_struct_init is not within that section. scm_struct_init can
658 thrown an error, which within a critical section results in an
659 abort().
660
03291373
NJ
6612007-02-19 Neil Jerram <neil@ossau.uklinux.net>
662
663 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
664 is included in the distribution.
652dbce6 665 (noinst_HEADERS): And the same for eval.i.c.
03291373 666
a2f00b9b
LC
6672007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
668
669 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
670 unconditionally. Include <langinfo.h> and <nl_types.h> when
671 available.
672 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
673 SCM_LIST_OR_INTEGER_P): New macros.
674 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
675 as powers of two instead of `(1 << LC_*)'.
676 (scm_i_locale_free): New function/macro.
677 (scm_global_locale): New global variable.
678 (smob_locale_free): Use `scm_i_locale_free ()'.
679 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
680 (get_current_locale_settings): Return `EINVAL' instead of `errno'
681 when `setlocale' fails.
682 (restore_locale_settings): Likewise.
683 (install_locale_categories): Likewise.
684 (install_locale): Likewise. Stop the locale stack traversal when
685 all categories have been handled.
686 (get_current_locale, category_to_category_mask,
687 category_list_to_category_mask): New function.
688 (scm_make_locale): Use them. Accept both lists of `LC_*' values
689 and single `LC_*' values as the first argument. Handle the case
690 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
691 duplicate C_BASE_LOCALE before using it.
692 (scm_nl_langinfo, define_langinfo_items): New functions.
693 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
694 `nl-langinfo' and invoke `define_langinfo_items ()'.
695 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
696 * posix.c: Include <xlocale.h> when available.
697 (scm_i_locale_mutex): Always define it. Statically initialized.
698 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
699 acquiring the locale mutex.
700 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
701
b3aa4626
KR
7022007-01-27 Kevin Ryde <user42@zip.com.au>
703
704 * ports.c (scm_port_line, scm_set_port_line_x), read.c
705 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
706 port line number type, should be "long" not "int", as per line_number
707 field of scm_t_port. (Makes a difference only on 64-bit systems, and
708 only then for a linenum above 2Gig.)
709
2a8d66b0
HWN
7102007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
711
712 * vector.c: remove comment as per kryde's request.
713
b3aa4626
KR
7142007-01-25 Kevin Ryde <user42@zip.com.au>
715
716 * sort.c (scm_stable_sort): Return empty list for input empty list, as
717 done in guile 1.6 and as always done by plain `sort'. Was falling
718 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
719
cb90e2cb
HWN
7202007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
721
8cb7939c
HWN
722 * vectors.c (s_scm_vector_move_right_x): complain about naming.
723
d00a0704
HWN
724 * srcprop.c: regularize comments.
725
3d178652
HWN
726 * eval.c: remove superfluous ifndef DEVAL.
727
243ebb61
HWN
728 * private-options.h: idem.
729
730 * eval.i.c: copyright nitpicking.
731
0ee05b85
HWN
732 * eval.c: distangle. move duplicate code to eval.i.c and include
733 twice.
734
735 * eval.i.c: new file.
736
22fc179a
HWN
737 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
738 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
739 read.h, stacks.c, symbols.c, throw.c: use private-options.h
740
741 * private-options.h: new file: contain hardcoded option
742 definitions.
743
cb90e2cb
HWN
744 * private-gc.h: add FSF header.
745
62560650
HWN
7462007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
747
72f19c26
HWN
748 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
749 memoize-symbol is set.
750
751 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
752
753 * eval.c (CEVAL): add memoize_symbol trap.
754
03347a97
HWN
755 * options.c (scm_options_try): new function. This allows error
756 reporting before changing options in a critical section.
757
b0763985
HWN
758 * srcprop.c: use double cell for storing source-properties. Put
759 filename in the plist, and share between srcprops if possible.
760 Remove specialized storage.
761
762 * srcprop.h: remove macros without SCM_ prefix from
763 interface. Remove specialized storage/type definitions.
764
62560650
HWN
765 * read.c: idem.
766
767 * print.c: idem.
768
769 * eval.c: terminate option lists with 0.
770
771 * options.c: remove n (for length) from scm_option_X
772 functions. Detect option list length by looking for NULL name.
773
42ddb3cb
LC
7742007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
775
776 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
777 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
778 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
779 added by `make-vtable-vtable'. Reported by Marco Maggi.
241d9cea 780
937038e8
HWN
7812007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
782
783 * throw.c (scm_ithrow): more refined error message: print symbols
784 too.
785
23d72566
KR
7862007-01-16 Kevin Ryde <user42@zip.com.au>
787
788 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
789 implementing `set-program-arguments'.
790
791 * filesys.c (scm_init_filesys): Use scm_from_int rather than
792 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
793 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
794 O_LARGEFILE. These are all int not long, per arg to open().
795 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
796 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
797 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
798 an int arg to fcntl.
799
800 * posix.c (scm_putenv): Correction to "len" variable, was defined only
801 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
802 Move it to where it's used. Reported by Hugh Sasse.
803
804 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
805 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
806 meant #\nul in the input (detected by scm_to_locale_string) and a bad
807 flags arg (detected by scm_to_int) would throw from a critical
808 section, causing an abort().
809
810 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
811 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
812 REG_NOTEOL; they're all ints not longs (per args to regcomp and
813 regexec).
814
a2c40dc7
HWN
8152007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
816
817 * throw.c (scm_ithrow): print out key symbol and string arguments
818 when error happens inside a critical section, and document why.
819
391f57e6
HWN
8202007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
821
822 * read.c (s_scm_read_hash_extend): document #f argument to
823 read-hash-extend.
824
23d72566
KR
8252007-01-04 Kevin Ryde <user42@zip.com.au>
826
827 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
828 scm_minor_version, scm_micro_version, scm_effective_version,
829 scm_version, scm_init_version): Use SCM_API instead of just extern,
830 for the benefit of mingw. Reported by Cesar Strauss.
831
93632e3c
HWN
8322007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
833
834 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
835 too.
836 (gc_update_stats): update scm_gc_cells_allocated_acc too.
837
23d72566
KR
8382006-12-27 Kevin Ryde <user42@zip.com.au>
839
840 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
841 the basic scm_get_stack_base. As advised by Nils Durner.
842
843 * threads.c (get_thread_stack_base): Add a version using
844 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
845 As advised by Heikki Lindholm.
846
847 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
848 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
849 Durner.
850
8512006-12-24 Kevin Ryde <user42@zip.com.au>
852
853 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
854 error if pid is not our own process, instead of silently doing nothing.
855
856 * print.c (scm_write, scm_display, scm_write_char): Disable port close
857 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
858 check in configure.in unintentionally enabled it. Believe that
859 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
860 can leave errno in that state. popen.test "no duplicates" output test
861 provoked that.
862
e2bf3b19
HWN
8632006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
864
865 * numbers.c (scm_i_fraction_reduce): move logic into
866 scm_i_make_ratio(), so fractions are only read.
867 scm_i_fraction_reduce() modifies a fraction when reading it. A
868 race condition might lead to fractions being corrupted by reading
869 them concurrently.
870
871 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
872 comparisons between reduced and unreduced fractions go wrong.
241d9cea 873
e2bf3b19
HWN
874 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
875 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
876 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
877 SCM_FRACTION_REDUCED.
878
23d72566
KR
8792006-12-16 Kevin Ryde <user42@zip.com.au>
880
881 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
882 more direct for a procedure called raise.
883 (kill): Remove mingw fake fallback.
884
8852006-12-15 Kevin Ryde <user42@zip.com.au>
886
887 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
888 _pipe on mingw.
889
8902006-12-14 Kevin Ryde <user42@zip.com.au>
891
892 * threads.c (thread_print): Cope with the case where pthread_t is a
893 struct, as found on mingw. Can't just cast to size_t for printing.
894 Reported by Nils Durner.
895
896 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
897 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
898
8992006-12-13 Kevin Ryde <user42@zip.com.au>
900
901 * eval.c (scm_m_define): Set 'name procedure property on any
902 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
903 procedures with setters as used in srfi-17.
904
905 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
906 linux man page says is a possibility.
907
f30e1bdf
LC
9082006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
909
910 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 911 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
912 negative lower bounds.
913 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 914 Szavai Gyula).
f30e1bdf
LC
915
916 (scm_array_in_bounds_p): Iterate over S instead of always
917 comparing indices with the bounds of S[0]. This fixes
918 `array-in-bounds?' for arrays with a rank greater than one and
919 with different lower bounds for each dimension.
920
23d72566
KR
9212006-12-05 Kevin Ryde <user42@zip.com.au>
922
923 * numbers.c (scm_product): For flonum*inum and complex*inum, return
924 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
925 and as per R5RS section "Exactness".
926
9272006-12-03 Kevin Ryde <user42@zip.com.au>
928
929 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
930 allow $AWK from the environment to override. It had syntax gremlins,
931 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
932 Makefile stopped it having any effect. Use just $(AWK), which can be
933 overridden with "make AWK=xxx" in the usual way if desired.
934
22be72d3
LC
9352006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
936
937 * libguile/vectors.c (scm_vector_to_list): Fixed list
938 construction: elements were not copied when INC is zero (see
939 "shared array" example in `vectors.test'). Reported by
940 Szavai Gyula.
941
b89c4943
LC
9422006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
943
944 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
945 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
946 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
947 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
948 (DOT_X_FILES): Added `gettext.x'.
949 (DOT_DOC_FILES): Likewise.
950 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
951 (modinclude_HEADERS): Added `gettext.h'.
952 (EXTRA_DIST): Added `libgettext.h'.
953
954 * gettext.h: Renamed to...
955 * libgettext.h: New file.
956
957 * i18n.c: Renamed to...
958 * gettext.c: New file.
959
960 * i18n.h: Renamed to...
961 * gettext.h: New file.
962
963 * i18n.c, i18n.h, locale-categories.h: New files.
964
965 * init.c: Include "libguile/gettext.h" instead of
966 "libguile/i18n.h".
967 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
968 `scm_init_i18n ()'.
969
970 * posix.c: Include "libguile/gettext.h" instead of
971 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
972 (USE_GNU_LOCALE_API): New macro.
973 (scm_i_locale_mutex): New variable.
974 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
975
976 * posix.h: Include "libguile/threads.h".
977 (scm_i_locale_mutex): New declaration.
978
f3e3f530
NJ
9792006-11-17 Neil Jerram <neil@ossau.uklinux.net>
980
981 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
982
d9f71a07 9832006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
241d9cea 984
d9f71a07
LC
985 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
986 "sweep_stats" arguments; use them instead of accessing the global
987 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
988
989 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
990 before each iteration of the loop.
991 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
992 (scm_i_get_new_heap_segment): Take an additional argument
993 SWEEP_STATS. Compute MIN_CELLS as a function of it.
994
995 * libguile/gc.c (scm_gc_cells_collected,
996 scm_gc_cells_collected_1): Removed.
997 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
998 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
999 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
1000 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
1001 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
1002 `scm_gc_cells_(collected|swept)'.
1003 (gc_update_stats): New.
1004 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
1005 `scm_i_gc_sweep_stats_1' instead of the former globals.
1006 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
1007 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
1008 would keep allocating new segments instead of re-using collected
1009 cells (because `scm_gc_cells_collected' would remain zero).
1010
1011 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
1012 scm_gc_cell_yield_percentage): Removed.
1013
1014 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
1015 (scm_i_adjust_min_yield): Updated.
1016 (scm_i_get_new_heap_segment): Updated.
1017
dd18d312
NJ
10182006-11-02 Neil Jerram <neil@ossau.uklinux.net>
1019
1020 * modules.c: Correct comment saying that low-level environments
1021 will be used "in the next release".
1022
1023 * init.c: Comment out #include of environments.h.
1024 (scm_i_init_guile): Comment out scm_environments_prehistory() and
1025 scm_init_environments() calls.
1026
1027 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
1028 (DOT_X_FILES): Remove environments.x.
1029 (DOT_DOC_FILES): Remove environments.doc.
1030 (modinclude_HEADERS): Remove environments.h.
1031
9a5fa6e9
NJ
10322006-10-25 Neil Jerram <neil@ossau.uklinux.net>
1033
1034 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
241d9cea 1035
9a5fa6e9
NJ
1036 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
1037 scm_ia64_register_backing_store_base() instead of Linux-specific
1038 implementations.
1039
1040 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
1041 New declarations.
1042
1043 * gc.c (__libc_ia64_register_backing_store_base): Declaration
1044 removed.
1045 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
1046 implementations for Linux and HP-UX.
1047
1048 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
1049 and scm_ia64_register_backing_store_base() instead of
1050 Linux-specific implementations.
1051
1052 * continuations.h (__libc_ia64_register_backing_store_base):
1053 Declaration removed.
1054 (scm_t_contregs): New "fresh" field.
1055
1056 * continuations.c (ia64_getcontext): Removed.
1057 (scm_make_continuation): Use continuation fresh field instead of
1058 interpreting getcontext return values (which isn't portable). Use
1059 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
1060 instead of Linux-specific implementations.
1061 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
1062 instead of Linux-specific implementation.
1063
1064 * _scm.h (__ia64__): Also detect __ia64.
1065
8ab3d8a0
KR
10662006-10-03 Kevin Ryde <user42@zip.com.au>
1067
1068 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
1069 arguments or 3 or more arguments. Previously 0 called proc with
1070 SCM_UNDEFINED, and 3 or more silently used just the first 2.
1071
10722006-09-28 Kevin Ryde <user42@zip.com.au>
1073
1074 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
1075 for chsize fallback, instead of hard-coding mingw. Mingw in fact
1076 supplies ftruncate itself these days.
1077
1078 * ports.c (fcntl.h): Can include this unconditionally, no need for
1079 __MINGW32__.
1080
1081 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
1082 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
1083 "off_t" for parameters, per usual definition of this function, rather
1084 than "char *" and "int". Use ftruncate instead of chsize. Check for
1085 error on final close.
1086
10872006-09-27 Kevin Ryde <user42@zip.com.au>
1088
1089 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
1090 in mingw.
1091
1092 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
1093 const *" for mingw to suppress warnings from gcc (which are errors
1094 under the configure default -Werror). Reported by Nils Durner.
1095
10962006-09-26 Kevin Ryde <user42@zip.com.au>
1097
1098 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
1099 * fports.c (scm_open_file): Use open_or_open64.
1100 (fport_seek_or_seek64): New function, adapting fport_seek.
1101 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
1102 functions.
1103 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
1104 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
1105
1106 * ports.c (scm_truncate_file): Update docstring per manual.
1107
11082006-09-23 Kevin Ryde <user42@zip.com.au>
1109
1110 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
1111 functions.
1112
9a5fa6e9 11132006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
1114
1115 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
1116 (make_predset, define_predset, make_strset, define_strset, false,
1117 true): Removed.
1118 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
1119 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
1120 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
1121 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
1122 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
1123 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
1124 (define_charset, scm_srfi_14_compute_char_sets): New functions.
1125 (scm_init_srfi_14): Use `define_charset ()' instead of
1126 `define_predset ()' and `define_strset ()'.
1127
1128 * srfi-14.h (scm_c_init_srfi_14): Removed.
1129 (scm_srfi_14_compute_char_sets): New declaration.
1130
1131 * posix.h: Include "srfi-14.h".
1132 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
1133 successful `setlocale ()' call.
1134
8ab3d8a0
KR
11352006-09-08 Kevin Ryde <user42@zip.com.au>
1136
1137 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
1138 (scm_recvfrom): Update docstring from manual.
1139
418122ce
RB
11402006-08-31 Rob Browning <rlb@defaultvalue.org>
1141
1142 * ports.c (scm_c_port_for_each): Add a
1143 scm_remember_upto_here_1(ports) at the end of the function to fix
1144 a GC bug.
1145
b5944f66
NJ
11462006-08-28 Neil Jerram <neil@ossau.uklinux.net>
1147
1148 * backtrace.c (scm_display_backtrace_with_highlights): Minor
1149 improvements to docstring.
1150 (scm_backtrace_with_highlights): Analogous improvements.
1151
8ab3d8a0
KR
11522006-08-12 Kevin Ryde <user42@zip.com.au>
1153
1154 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
1155 New, set from configure.
1156 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
1157 to scmconfig.h.
1158 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
1159 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
1160 Reported by Claes Wallin.
1161
b0b0deff
NJ
11622006-08-11 Neil Jerram <neil@ossau.uklinux.net>
1163
1164 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
1165 frame, not a stack).
1166
8ab3d8a0
KR
11672006-07-25 Kevin Ryde <user42@zip.com.au>
1168
1169 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
1170 on pthreads version, since pthread_getattr_np not available on solaris
1171 and macos. Reported by Claes Wallin.
1172
11732006-07-24 Kevin Ryde <user42@zip.com.au>
1174
1175 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
1176 it's a macro on MacOS X. Reported by Claes Wallin.
1177
1178 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
1179 for the benefit of Solaris 10. Reported by Claes Wallin.
1180
1181 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
1182 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
1183
11842006-07-21 Kevin Ryde <user42@zip.com.au>
1185
1186 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
1187 autoconf recommendation. Should fix Solaris 10 reported by Claes
1188 Wallin.
1189
1190 * threads.c: Include <string.h>, needed for memset() which is used by
1191 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
1192
b4912378
RB
11932006-07-18 Rob Browning <rlb@defaultvalue.org>
1194
1195 * continuations.c: Add __attribute__ ((returns_twice)) to the
1196 ia64_getcontext prototype so that gcc will make the right
1197 arrangements and avoid an illegal instruction during
1198 call-with-current-continuation.
1199
9a5fa6e9 12002006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
1201
1202 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
1203 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
1204
8ab3d8a0
KR
12052006-07-08 Kevin Ryde <user42@zip.com.au>
1206
1207 * environments.c (core_environments_unobserve): Use if/else rather
1208 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
1209 about them not being rvalues. Reported by Mike Gran.
1210
1211 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
1212 portable and in particular fails on OpenBSD and AIX (see autoconf
1213 manual too). Reported by Mike Gran.
1214
12152006-06-25 Kevin Ryde <user42@zip.com.au>
1216
1217 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
1218 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
1219 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
1220 HAVE_TM_ZONE.
1221 (scm_strptime): Use tm_gmtoff from the strptime result when that field
1222 exists, it's set by glibc strptime "%s".
241d9cea 1223
9a5fa6e9 12242006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
1225
1226 * eq.c: Include "struct.h", "goops.h" and "objects.h".
1227 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
1228 are not GOOPS instances.
1229 * struct.c: Include "eq.h".
1230 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
1231 hand-written code.
1232 (scm_i_struct_equalp): New.
1233 * struct.h (scm_i_struct_equalp): New declaration.
1234
c862d0e0
KR
12352006-06-06 Kevin Ryde <user42@zip.com.au>
1236
1237 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
1238 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
1239 reported by Mattias Holm.
b4912378 1240
c862d0e0
KR
12412006-06-03 Kevin Ryde <user42@zip.com.au>
1242
1243 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
1244 unused variable warning when elisp disabled. Reported by Ryan
1245 VanderBijl.
1246
1247 * throw.c (scm_handle_by_message): Add dummy return value to avoid
1248 compiler warning on cygwin. Reported by Ryan VanderBijl.
241d9cea 1249
c862d0e0
KR
1250 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
1251 duplicate of EXTRA_DOT_DOC_FILES.
1252 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
1253 Add scmconfig.h to dependencies, since these all run cpp. Helps a
1254 parallel "make -j2". Reported by Mattias Holm.
1255
12562006-05-30 Kevin Ryde <user42@zip.com.au>
1257
1258 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
1259 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
1260 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
1261 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
1262 port type descriptor, same as scm_make_port_type return value.
1263
af4f8612
MV
12642006-05-30 Marius Vollmer <mvo@zagadka.de>
1265
1266 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
1267 of the arguments is a array. This allows vectors to be equal to
1268 one-dimensional arrays.
1269
18bffcd0
MV
12702006-05-29 Marius Vollmer <mvo@zagadka.de>
1271
1272 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
1273 that we have a pair before accessing its cdr. Thanks to Bill
1274 Schottstaedt!
1275
c862d0e0
KR
12762006-05-28 Kevin Ryde <user42@zip.com.au>
1277
1278 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
1279 by "The Senator".
1280
12812006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
1282
1283 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
1284 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
1285
c862d0e0
KR
12862006-05-26 Kevin Ryde <user42@zip.com.au>
1287
1288 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
1289 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
1290 Reported by "The Senator".
1291 For select and ioctl, move fdes into those conditionals, to avoid
1292 unused variable warning when neither of those used.
1293
12942006-05-23 Kevin Ryde <user42@zip.com.au>
1295
1296 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
1297 It's unused and will be in stdio.h anyway (if it's anywhere).
1298
12992006-05-20 Kevin Ryde <user42@zip.com.au>
1300
1301 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
1302 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
1303
1304 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
1305 symlink). Probably can't create symlinks with mknod anyway though.
1306
1307 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
1308 generation.
1309
13102006-05-15 Kevin Ryde <user42@zip.com.au>
1311
1312 * simpos.c, simpos.h (scm_primitive__exit): New function.
1313 (scm_primitive_exit): Update docstring, no longer the best exit after
1314 a fork.
1315
13162006-05-09 Kevin Ryde <user42@zip.com.au>
1317
1318 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
1319 rather than converting to doubles, to avoid inf or nan when the inputs
1320 are too big for a double but the quotient does fit. This affects
1321 conversions exact->inexact of big fractions.
1322
1323 * filesys.c (scm_open_fdes): Use open64.
1324 (scm_init_filesys): Add O_LARGEFILE.
1325
1326 * ports.c (scm_seek): Use lseek64.
1327 (scm_truncate_file): Use ftruncate64.
1328
4a342b19
MV
13292006-05-08 Marius Vollmer <mvo@zagadka.de>
1330
1331 * private-gc.h (CELL_P): Also check that the potential pointer is
1332 correctly aligned for a cell. Thanks to Miroslav Lichvar!
1333
c862d0e0
KR
13342006-04-18 Rob Browning <rlb@defaultvalue.org>
1335
1336 * _scm.h: Add back error if the size of off_t is unknown. The bug
1337 was actually in guile-readline's configuration.
1338
13392006-04-18 Kevin Ryde <user42@zip.com.au>
1340
1341 * posix.c (scm_mkstemp): Update docstring from the manual, in
1342 particular file mode 0600 is not guaranteed.
1343
281ab5e2
KR
13442006-04-17 Kevin Ryde <user42@zip.com.au>
1345
1346 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1347 size, to help the guile-readline build where off_t is unused.
1348
2b829bbb
KR
13492006-04-16 Kevin Ryde <user42@zip.com.au>
1350
1351 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1352 (scm_readdir): Use readdir64.
1353 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1354 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1355 and ftruncate take off_t not size_t.
1356 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1357 available.
1358
13592006-04-06 Kevin Ryde <user42@zip.com.au>
1360
1361 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1362 instead of toggling it. Reported by Ludovic Courtès.
241d9cea 1363
2b829bbb
KR
13642006-03-26 Marius Vollmer <mvo@zagadka.de>
1365
1366 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1367 instead of accessing __libc_stack_end directly, and only do this
1368 when pthread_attr_getstack is known not to work for the main
1369 thread or when not using pthreads at all.
1370
1371 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1372 unknown instead of returning NULL.
1373
9a5fa6e9 13742006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1375
1376 * numbers.c (scm_i_mem2number): Renamed to
1377 scm_c_locale_stringn_to_number.
1378 * numbers.c, print.c, read.c: Updated callers.
1379 * numbers.h: Update function declaration.
1380
13812006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1382
1383 * unif.c (string_set): Don't return in a void function. (Reported
1384 by Mike Gran.)
1385
1386 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1387 rather than void*, so we can do pointer arithmetic on it.
1388 (Reported by Mike Gran.)
1389 (s_scm_uniform_vector_write): Ditto.
1390
13912006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1392
1393 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1394 oldra is not an array. (Reported by Steve Juranich.)
1395
1396 * threads.c (do_unlock): Renamed from "unlock", which is defined
1397 in unistd.h on QNX. (Reported by Matt Kraai.)
1398
13992006-03-04 Kevin Ryde <user42@zip.com.au>
1400
1401 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1402 not SCM_CRITICAL_SECTION_START.
1403
1404 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1405 Mike Gran.
1406
14072006-02-28 Kevin Ryde <user42@zip.com.au>
1408
1409 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1410
14112006-02-26 Kevin Ryde <user42@zip.com.au>
1412
1413 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1414 NAME_MAX is not available, which is so on Solaris 10. Report and help
1415 by Bill Schottstaedt.
1416
1417 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1418 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1419 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1420 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1421 use "unsigned char", not signed char. This ensures comparisons are
1422 the same as `char<?' etc, and is also the same as guile 1.6 did.
1423 Reported by Sven Hartrumpf.
1424
4a9f83ff
MD
14252006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1426
1427 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1428 SCM_HAVE_T_INT64.
1429 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1430 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1431 scm_t_int32.
1432
29d8c124 14332006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1434
1435 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1436 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1437 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1438 Take into account SEG->SPAN when computing CELLS_SWEPT.
1439 (scm_i_sweep_segment): Take one more argument, similarly.
1440 (scm_i_sweep_all_segments): Likewise.
1441 (scm_i_sweep_some_segments): Likewise.
1442 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1443 refer to SCM_GC_CELLS_COLLECTED.
1444
1445 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1446 argument, an `scm_i_sweep_statistics' object.
1447 Change the way DELTA is collected: don't take into account
1448 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1449
1450 * gc-malloc.c (scm_realloc): Pass an extra argument
1451 to `scm_i_sweep_all_segments ()'.
1452
1453 * gc.c (gc_start_stats): Updated accordingly.
1454 (gc_end_stats): Take an additional SWEEP_STATS argument.
1455 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1456 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1457 Decrement SCM_CELLS_ALLOCATED.
1458 (scm_i_gc): Likewise.
1459
1460 * private-gc.h (scm_i_sweep_*): Updated function
1461 prototypes accordingly.
1462 (scm_t_sweep_statistics): New type.
1463 (scm_i_sweep_statistics_init): New macro.
1464 (scm_i_sweep_statistics_sum): New macro
1465
9a5fa6e9 14662006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1467
1468 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1469 LEN. Without this, too much collectable memory gets unregistered,
1470 which results in an underflow of SCM_MALLOCATED in
1471 `decrease_mtrigger()'.
1472
1473 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1474 equal to SCM_MALLOCATED.
1475
14762006-02-13 Marius Vollmer <mvo@zagadka.de>
1477
1478 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1479 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1480 configured --without-threads.
1481 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1482
1aaa1c17
MV
14832006-02-12 Marius Vollmer <mvo@zagadka.de>
1484
1485 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1486 filling when the fill parameter is omitted, as documented, but
1487 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1488 can not store characters.
1489
d7c6575f
NJ
14902006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1491
1492 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1493 on to scm_fill_sockaddr call.
1494
43e01b1e
NJ
14952006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1496
1497 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1498 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1499
1500 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1501 (struct pre_unwind_data): New, replaces struct lazy_catch.
1502 (scm_c_catch): New, replaces scm_internal_catch as the primary
1503 catch API for C code; adds pre-unwind handler support.
1504 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1505 compatibility.
1506 (tc16_pre_unwind_data, pre_unwind_data_print,
1507 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1508 "lazy_catch" equivalents.
1509 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1510 as the primary C API for a "lazy" catch.
1511 (scm_internal_lazy_catch): Now just a wrapper for
1512 scm_c_with_throw_handler, for back compatibility.
1513 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1514 pre-unwind handler support.
1515 (scm_catch): Now just a wrapper for
1516 scm_catch_with_pre_unwind_handler, for back compatibility.
1517 (scm_with_throw_handler): New.
1518 (scm_lazy_catch): Update comment to say that the handler can
1519 return, and what happens if it does.
1520 (toggle_pre_unwind_running): New.
1521 (scm_ithrow): When identifying the throw target, take running
1522 flags into account. In general, change naming of things from
1523 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1524 don't unwind the dynamic context first. Add dynwind framing to
1525 manage the running flag of a throw handler. If a lazy catch or
1526 throw handler returns, rethrow the same exception again. Add
1527 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1528
1529 * root.c (scm_internal_cwdr): Add NULL args to
1530 scm_i_with_continuation_barrier call.
1531
1532 * dynwind.c: Change comment mentioning lazy-catch to mention
1533 pre-unwind data and throw handler also.
1534
1535 * continuations.h (scm_i_with_continuation_barrier): Add
1536 pre-unwind handler args.
1537
1538 * continuations.c (scm_i_with_continuation_barrier): Add
1539 pre-unwind handler args, and pass on to scm_c_catch (changed from
1540 scm_internal_catch).
1541 (c_handler): Remove scm_handle_by_message_noexit call.
1542 (scm_c_with_continuation_barrier): Call
1543 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1544 as the pre-unwind handler.
1545 (scm_handler): Remove scm_handle_by_message_noexit call.
1546 (s_scm_with_continuation_barrier): Call
1547 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1548 as the pre-unwind handler.
1549
2b829bbb
KR
15502006-02-04 Kevin Ryde <user42@zip.com.au>
1551
1552 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1553
72098928
KR
15542006-02-03 Kevin Ryde <user42@zip.com.au>
1555
1556 * list.c, list.h (scm_list): Restore this function for use from C.
1557 It's a complete no-op but in theory might used by someone.
1558
aa092c5d
MV
15592006-01-30 Marius Vollmer <mvo@zagadka.de>
1560
1561 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1562 so that it gets unlocked in all cases.
1563 (SCM_APPLY, CEVAL): Likewise.
1564
661ae7ab
MV
15652006-01-29 Marius Vollmer <mvo@zagadka.de>
1566
ee51ba31
MV
1567 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1568 scm_is_typed_array instead.
1569
661ae7ab
MV
1570 Renamed the "frames" that are related to dynamic-wind to "dynamic
1571 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1572 Updated documentation.
1573
99e370f6
MV
1574 Disabled "futures":
1575
1576 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1577 * eval.c, init.c: Comment out all 'future' related things.
1578
15ccf10b
MV
15792006-01-28 Marius Vollmer <mvo@zagadka.de>
1580
1581 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1582 to inline.h to make it inline.
1583
9a5fa6e9 15842005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1585
1586 * strings.c (scm_i_take_stringbufn): New.
1587 (scm_i_c_take_symbol): New.
1588 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1589
1590 * strings.h (scm_i_c_take_symbol): New.
1591 (scm_i_take_stringbufn): New.
1592
1593 * symbols.c (lookup_interned_symbol): New function.
1594 (scm_i_c_mem2symbol): New function.
1595 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1596 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1597 creating a new Scheme string.
1598 (scm_from_locale_symboln): Likewise.
1599 (scm_take_locale_symbol): New.
1600 (scm_take_locale_symboln): New.
1601
1602 * symbols.h (scm_take_locale_symbol): New.
1603 (scm_take_locale_symboln): New.
1604
2ca2ffe6
HWN
16052006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1606
1607 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1608 free_count.
1609
c255614e
HWN
16102005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1611
1612 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1613 upon error
1614
29295b0c
NJ
16152005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1616
9a5fa6e9 1617 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1618 the GC when allocated_fluids_len is zero.
1619
2824f4dc
NJ
16202005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1621
ec3a8ace
NJ
1622 * load.c (the_reader, the_reader_fluid_num): New.
1623 (scm_primitive_load): Support custom reader.
1624 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1625 the_reader as `current-reader'.
1626
2824f4dc
NJ
1627 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1628 (rather than an uninitialized pointer on the stack).
1629
d9c36d2a
MV
16302005-12-07 Marius Vollmer <mvo@zagadka.de>
1631
6a88895b 1632 Reported by Bruce Korb:
241d9cea 1633
6a88895b
MV
1634 * init.c (invoke_main_func): Don't call exit here. Throws that
1635 are only caught by scm_with_guile will bypass us and would cause
1636 scm_boot_guile to return erroneously.
1637 (scm_boot_guile): Expect scm_with_guile to return and call exit
1638 here, passing it an appropriate exit code.
1639
1640 From Andy Wingo:
241d9cea 1641
d9c36d2a
MV
1642 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1643 unsigned char cast to an int, or -1 for EOS.
241d9cea 1644
b54df254
MV
16452005-12-06 Marius Vollmer <mvo@zagadka.de>
1646
08f489c9
MV
1647 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1648 non-const.
9a5fa6e9 1649 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
241d9cea 1650
b54df254
MV
1651 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1652 scm_enter_guile): Removed from public API. See comment at
1653 scm_without_guile for the rationale.
1654
1655 * scmsigs.c (read_without_guile): New.
1656 (signal_delivery_thread): Use it instead of
1657 scm_leave_guile/read/scm_enter_guile.
1658
9d9ce2b5
MV
1659 From Stephen Compall:
1660
1661 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1662 (CEVAL): Evaluate SRFI 61 cond clauses.
1663
9a5fa6e9 16642005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1665
1666 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1667 This was typically hit when running `gc-live-object-stats' right
1668 after starting Guile.
1669
efeac8ae
KR
16702005-11-30 Kevin Ryde <user42@zip.com.au>
1671
1672 * srfi-13.c (scm_string_append_shared): No copying if just one
1673 non-empty string in args.
1674
606183ba
KR
16752005-11-26 Kevin Ryde <user42@zip.com.au>
1676
1677 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1678 by Ludovic Courtès.
606183ba
KR
1679
1680 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1681 "register".
1682
1683 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1684 scm_malloc returning NULL, it never does that.
1685 * putenv.c (putenv): Likewise.
1686
1687 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1688 much too big to want to inline.
1689
9a5fa6e9 16902005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1691
1692 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1693 the value at its top. This fixes a reference leak.
1694 (PUSH_REF): Perform `pstate->top++' after calling
1695 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1696 effects.
1697
9a5fa6e9 16982005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1699
1700 * gc.c (scm_weak_vectors): Removed.
1701
f07d2b20
KR
17022005-11-12 Kevin Ryde <user42@zip.com.au>
1703
1704 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1705 by Ludovic Courtès.
f07d2b20 1706
bedd3f5f
MV
17072005-11-07 Marius Vollmer <mvo@zagadka.de>
1708
1709 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1710 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1711 section might exit non-locally.
1712
7c9c0169
NJ
17132005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1714
1715 * eval.c (sym_instead): New symbol.
1716 (ENTER_APPLY): Remove optional use of a continuation when making
1717 trap call.
1718 (scm_debug_opts): Change doc for 'cheap option to make clear that
1719 it is now obsolete.
1720 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1721 making trap calls, and implement substitution of eval expressions
1722 and return values using the values that the trap call handlers
1723 return.
1724
1725 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1726
9a5fa6e9 17272005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1728
1729 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1730 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1731 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1732 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1733 scm_c_make_socket_address): New functions.
1734 * socket.h: Add prototypes.
1735
fc9f596c
KR
17362005-10-24 Kevin Ryde <user42@zip.com.au>
1737
1738 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1739 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1740 POSIX spec examples, the latter are not available on for instance
1741 NetBSD.
1742
1743 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1744 posix.texi.
1745
1746 * stime.c (scm_strftime): Update docstring from posix.texi.
1747
0460c6e1
MV
17482005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1749
1750 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
241d9cea 1751
0460c6e1
MV
1752 * null-threads.h, pthread-threads.h
1753 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1754 (scm_i_pthread_mutexattr_recursive): New.
1755
1756 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1757 (scm_i_critical_section_mutex): Do not initialize statically.
1758 (scm_threads_prehistory): Initialize
1759 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1760 here.
241d9cea 1761
0460c6e1
MV
1762 * eval.c (source_mutex): Do not initialiaze statically.
1763 (scm_init_eval): Do it here, using
1764 scm_i_pthread_mutexattr_recursive.
1765
7b4a9e52
MV
17662005-09-05 Marius Vollmer <mvo@zagadka.de>
1767
1768 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1769 New.
1770 (sym_reader): New.
1771 (scm_print_opts): Added "quote-keywordish-symbols" option.
1772 (quote_keywordish_symbol): New, for evaluating the option.
1773 (scm_print_symbol_name): Use it.
1774 (scm_init_print): Initialize new option to sym_reader.
241d9cea 1775
5defc05d
NJ
17762005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1777
1778 * eval.c (eval_letrec_inits): New.
1779 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1780
036482e9
MV
17812005-08-12 Marius Vollmer <mvo@zagadka.de>
1782
1783 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1784 Peter Gavin!
1785
5c347f8c
KR
17862005-08-12 Kevin Ryde <user42@zip.com.au>
1787
1788 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1789
bc721aa2
KR
17902005-08-06 Kevin Ryde <user42@zip.com.au>
1791
1792 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1793 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1794 scm_string_index, scm_string_index_right, scm_string_skip,
1795 scm_string_skip_right, scm_string_count, scm_string_map,
1796 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1797 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1798 procedures called in loops.
1799
126c81db
KR
18002005-08-02 Kevin Ryde <user42@zip.com.au>
1801
1802 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1803 avoid lots of copying where previoulsy growing by only 80 bytes at a
1804 time.
1805
7f278dc6
MV
18062005-08-01 Marius Vollmer <mvo@zagadka.de>
1807
1808 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1809 already have scm_lookup_closure_module, which does the same thing.
241d9cea 1810
cb5c4b07
MV
18112005-08-01 Marius Vollmer <mvo@zagadka.de>
1812
1813 New marking algorithm for weak hashtables that fixes the problem
1814 that references from the non-weak value to the associated weak
1815 key (for example) would prevent the entry from ever being dropped.
1816
1817 Guardians have been changed back to their original semantics and
1818 are no longer greedy and no longer drop cycles.
241d9cea 1819
cb5c4b07
MV
1820 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1821 hashtable and guardian machinery but call the relevant functions
1822 directly.
1823
1824 * guardians.h, guardians.c, deprecated.h,
1825 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1826 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1827 Deprecated and moved into deprecated.[ch].
1828
1829 * guardians.h, guardians.c: Mostly rewritten.
1830 (scm_i_init_guardians_for_gc,
1831 scm_i_identify_inaccessible_guardeds,
1832 scm_i_mark_inaccessible_guardeds): New.
930888e8 1833 (scm_make_guardian): Removed greedy_p argument.
241d9cea 1834
cb5c4b07
MV
1835 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1836 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1837 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1838 (scm_weaks_prehistory): Removed.
1839 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1840 scm_i_mark_weak_vectors_non_weaks,
1841 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1842 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1843 scm_scan_weak_vectors): Removed.
241d9cea 1844
cb5c4b07
MV
1845 * hashtab.h (scm_i_scan_weak_hashtables): New.
1846 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1847 SCM_WVECTF_NOSCAN.
1848 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1849 t->n_items.
1850 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1851 to latter. Do not scan the alists themselves, this is done by the
1852 weak vector code now. Just update the element count.
1853
1854 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1855 to latter. The type is now only part of the cell word.
1856 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1857
1858 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1859
3e2073bd
MD
18602005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1861
1862 Some changes towards making it possible to run Guile on the EM64T
1863 platform.
1864
1865 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1866 mallocating for (unsigned long *bounds).
1867
1868 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1869 scm_t_bits before storing them in the type word.
241d9cea 1870
3e2073bd
MD
1871 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1872 scm_t_bits to int.
1873
e8ac8e75
KR
18742005-07-12 Kevin Ryde <user42@zip.com.au>
1875
1876 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1877 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1878 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1879 than scm_makfrom0str.
1880 Reported by Ken Raeburn.
241d9cea 1881
e8ac8e75
KR
1882 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1883 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1884 returning SCM_GC_CARD_BVEC.
241d9cea 1885
e8ac8e75
KR
1886 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1887 rather than latin-1 acute accent, the latter may not print on all
1888 terminals.
1889
1890 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1891 trailing deletions, so as to return a substring if those are the only
1892 changes.
1893
adc0677d
KR
18942005-07-10 Kevin Ryde <user42@zip.com.au>
1895
1896 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1897 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1898 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1899 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1900
8fecbb19
HWN
19012005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1902
1903 * gc-card.c (scm_i_card_statistics): init tag.
1904
1905 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1906
fc9c5d06
HWN
19072005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1908
8fecbb19
HWN
1909 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1910 string.
fc9c5d06 1911
08fce816
KR
19122005-06-25 Kevin Ryde <user42@zip.com.au>
1913
1914 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1915 last change, use plain copy-on-write substrings, the individual
1916 descriptions in the srfi don't mention shared storage (only the
1917 introduction does).
1918
1919 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1920 null-terminator, rather than mallocing a whole new block.
1921 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1922
fc4abd0e
MV
19232005-06-12 Marius Vollmer <mvo@zagadka.de>
1924
e3da8a30
MV
1925 * ramap.c (scm_array_index_map_x): First test for real arrays,
1926 then check for generalized vectors. This ensures that the
1927 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1928 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1929 to access the target array, making these functions work with all
1930 kinds of arrays, not just bit arrays.
e3da8a30 1931
fc4abd0e
MV
1932 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1933 gh_list.c, gh_predicates.c: Deprecated everything.
1934
1935 * environments.c (environment_default_folder,
1936 environment_default_observer): Do not use gh_call3, gh_call1.
1937
e4da0740
HWN
19382005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1939
1940 * modules.c (s_scm_eval_closure_module): new function. Return the
1941 module inside an eval-closure.
1942
1943 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1944 table. This means that procedure properties are GC'd if the
1945 procedure dies.
1946
27667158
KR
19472005-06-11 Kevin Ryde <user42@zip.com.au>
1948
1949 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1950 charset cases, count chars kept and build a string in a second pass,
1951 rather than using a cons cell for every char kept. Use a shared
1952 substring when nothing removed (such sharing is allowed by the srfi).
1953
8a00ba71
HWN
19542005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1955
1956 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
241d9cea 1957 string, so live object stats can be sorted with string<?.
8a00ba71 1958
a677679f
MV
19592005-06-06 Marius Vollmer <mvo@zagadka.de>
1960
2ff668b0
MV
1961 * print.c (iprin1): When writing a string, collect all characters
1962 that can be printed directly into one call to scm_lfwrite.
1963 Previously, every character was output with its own call to
1964 write(2) on unbuffered ports.
1965
589f22f6
MV
1966 * eval.c (scm_eval_options_interface): Use
1967 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1968 and SCM_CRITICAL_SECTION_END.
1969
a677679f
MV
1970 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1971 check for generalized vectors. This ensures that the generalized
1972 vector case need only work with zero-origin ranges.
1973
f8cda9ee
KR
19742005-06-06 Kevin Ryde <user42@zip.com.au>
1975
1976 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1977 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1978 matched.
1979
cdac1be4
MV
19802005-06-05 Marius Vollmer <mvo@zagadka.de>
1981
6642f7ac
MV
1982 * eval.c: Added comment on how to make case 1.1 of
1983 r5rs_pitfall.test succeed.
1984
cdac1be4
MV
1985 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1986
1987 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
241d9cea 1988
cdac1be4
MV
1989 * socket.c: Remove obsolete comment about socklen_t.
1990 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
241d9cea 1991
cdac1be4 1992 * numbers.h (isnan)[__MINGW32__]: Remove.
241d9cea 1993
cdac1be4
MV
1994 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1995 DEFAULT_INCLUDES when cross compiling.
241d9cea 1996
cdac1be4
MV
1997 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1998
a677679f 1999 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
2000 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
2001 from Jan's patch.)
241d9cea 2002
9e664475
MV
20032005-05-22 Marius Vollmer <mvo@zagadka.de>
2004
188d0c5e
MV
2005 * unif.c (scm_make_shared_array): Add old base to new base since
2006 scm_array_handle_pos does not include the base.
2007 (scm_aind): Likewise.
2008
9e664475
MV
2009 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
2010 output port.
2011
5a6d139b
NJ
20122005-05-12 Neil Jerram <neil@ossau.uklinux.net>
2013
2014 Mac OS X compile warning fixes, reported by Richard Todd.
241d9cea 2015
5a6d139b
NJ
2016 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
2017 that it is signed.
2018
2019 * strports.c (st_resize_port): Add unsigned char cast.
2020 (scm_mkstrport): Make read/write_buf cast unsigned.
2021
2022 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
2023
2024 * rdelim.c (scm_read_line): Initialize slen.
2025
2026 * load.c (scm_search_path): Remove weird >=1, and add
2027 parentheses to clarify conditions.
2028
2029 * hash.c (scm_hasher): Add const unsigned char cast.
2030
2031 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
2032
b01532af
NJ
20332005-05-11 Neil Jerram <neil@ossau.uklinux.net>
2034
9a5fa6e9 2035 Fix C99isms reported by Ludovic Courtès:
241d9cea 2036
b01532af
NJ
2037 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
2038 code.
2039
2040 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
2041 of code.
2042
2043 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
2044 of code.
2045 (scm_i_card_statistics): Add block for declarations of tag_as_scm
2046 and current.
2047
229a0710
NJ
20482005-05-10 Neil Jerram <neil@ossau.uklinux.net>
2049
2050 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
2051 compile warning reported by Werner Scheinast.
2052
645dd3fc
HWN
20532005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
2054
80038021
HWN
2055 * list.h: remove scm_list()
2056
645dd3fc
HWN
2057 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
2058 SCM_DEBUG_CELL_ACCESSES
2059 (FLUID_NEXT_LOC): idem.
2060
9a68a4a8
KR
20612005-04-30 Kevin Ryde <user42@zip.com.au>
2062
2063 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
2064 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
2065 zero when re==0 and im<0. Reported by Jean Crepeau.
2066
0640cdaa
KR
20672005-04-25 Kevin Ryde <user42@zip.com.au>
2068
2069 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
2070 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
2071 few sensible uses (like filling with a random number generator say),
2072 but has been allowed in the past and so should be kept.
0640cdaa 2073
c0b85e9c
KR
20742005-04-23 Kevin Ryde <user42@zip.com.au>
2075
2076 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
2077 scm_hash_fn_remove_x.
2078
2079 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
2080 the caller when cons* is reached through apply.
2081
2082 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
2083 list is called using apply, under the debugging evaluator.
2084 (scm_list): Remove.
2085
c51682b4
KR
2086 * list.c, list.h (scm_make_list): New code, moving make-list from
2087 boot-9.scm.
8cb2eff8 2088
c0575bde
KR
20892005-04-14 Kevin Ryde <user42@zip.com.au>
2090
2091 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
2092 converted from scheme code in boot-9.scm.
2093
47a298d9
KR
20942005-04-11 Kevin Ryde <user42@zip.com.au>
2095
2096 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
2097 Validate list argument, scm_string_append and scm_string_append_shared
2098 don't do that to their rest argument (in a normal build).
2099
8ea3dc2e
MV
21002005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2101
2102 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
2103 closure can not be stored since it is no longer valid at GC time.
2104 (make_hash_table): Initialize 'hash_fn' field.
2105 (scm_i_rehash): Only store hash_fn in hash table when closre is
2106 NULL.
2107 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
2108 non-NULL. Always use a NULL closure.
2109 (scm_hash_fn_create_handle_x): Also rehash when table contains too
2110 few entries.
241d9cea 2111
08d2020d
MV
21122005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2113
2114 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
2115 argument; always use scm_delq_x. The delete_fn function works on
2116 the handle, not the key, and it therefore makes no sense to make
2117 it configurable. Changed all callers.
2118 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
2119 (scm_hash_clear): Accept plain vectors as hashtables.
2120 (scm_delx_x): Removed.
241d9cea 2121
cb975c21
HWN
21222005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
2123
2124 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
2125 compatibility with gcc -std=c99.
2126
4c908f2c
MD
21272005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2128
2129 * async.h (scm_mask_ints): Removed left over reference to
2130 scm_root.
2131
2132 * threads.c: Removed fprintf debug statements.
241d9cea 2133
d193b04b
NJ
21342005-03-24 Neil Jerram <neil@ossau.uklinux.net>
2135
2136 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
2137
c29748cd
NJ
21382005-03-23 Neil Jerram <neil@ossau.uklinux.net>
2139
2140 * debug.c (scm_make_memoized): Remove unnecessary critical
2141 section, and simplify by using SCM_RETURN_NEWSMOB.
2142
e654b062
MD
21432005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2144
2145 * strings.h (SCM_STRING_UCHARS): Added missing argument.
2146
4bc6f1c6
KR
21472005-03-18 Kevin Ryde <user42@zip.com.au>
2148
2149 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 2150 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 2151
f1531813
KR
21522005-03-13 Kevin Ryde <user42@zip.com.au>
2153
2154 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
2155 srfi-60.
2156
2157 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
2158 because OR-ing bits into a negative can reduce the value to an inum.
2159
2160 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
2161 casting inum to double since that can lose precision.
2162
a9fae247
MV
21632005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2164
2165 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
2166 (guilify_self_1): Initialize it.
2167
2168 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
2169 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
2170 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
2171 field.
2172 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
2173 recursively.
2174 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
2175 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
2176 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
2177 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
2178 scm_after_gc_c_hook here.
2179 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
2180 scm_after_gc_c_hook when a full GC has in fact been performed.
2181 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
2182
2183 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
2184 scm_gc_heap_lock.
2185
2186 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
2187 scm_gc_running_p while the scm_i_sweep_mutex is locked.
2188
2189 * inline.h (scm_cell, scm_double_cell): Do not check
2190 scm_gc_running_p, allocation during sweeping is OK.
2191
2192 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
2193 not set scm_block_gc.
2194
2195 * init.c (scm_i_init_guile): Do not set scm_block_gc.
2196
2197 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
2198 instead of scm_malloc. The latter can not be used during GC.
2199
d1c38e11
MV
22002005-03-09 Marius Vollmer <mvo@zagadka.de>
2201
2202 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
2203 years.
2204
99ec43c1
MV
22052005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2206
2207 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
2208 scm_gc_running_p. Sweeping can happen in parallel with
2209 allocation.
2210
2211 * inline.h: Updated comments for current threading implementation.
2212
2213 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
2214 (scm_i_thread): Removed unused signal_asyncs field.
2215 (threads_mark): Do not mark it.
2216 (guilify_self_1): Do not initialize it. Do initialize
2217 continuation_root field.
2218 (do_thread_exit): Do not remove thread from all_threads list.
2219 (on_thread_exit): Do it here, after leaving guile mode.
2220 (sleep_level): Removed.
2221 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
2222 returning. Do not support recursive sleeps.
2223 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
2224 entry. Do not support recursive sleeps.
2225
2226 * fluids.c (ensure_state_size, ensure_all_state_sizes,
2227 resize_all_states): Collapsed ensure_state_size and
2228 ensure_all_state_sizes into one function named resize_all_states.
2229 Allocate new vectors outside of single threaded region. Do only
2230 simple things inside that region.
2231 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
2232 while adding to the global lists.
241d9cea 2233
99ec43c1 2234
461f34aa
MV
22352005-03-08 Marius Vollmer <mvo@zagadka.de>
2236
2237 libltdl is no longer distributed. We expect it to be installed
2238 already.
241d9cea 2239
461f34aa
MV
2240 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
2241 (libguile_la_LIBADD): Removed @LIBLTDL@.
2242
4e047c3e
MV
22432005-03-07 Marius Vollmer <mvo@zagadka.de>
2244
2245 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
2246 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
2247 they also block/unblock execution of asyncs and call
2248 scm_async_click which is declared in async.h but threads.h can not
2249 include async.h since async.h already includes threads.h.
2250 (scm_i_critical_section_level): New, for checking mistakes in the
2251 use of the SCM_CRITICAL_SECTION_* macros.
2252 (scm_i_critical_section_mutex): Make it a recursive mutex so that
2253 critical sections can be nested.
2254
2255 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
2256 not zero.
241d9cea 2257
4e047c3e
MV
2258 * threads.h, threads.c (scm_frame_lock_mutex): New.
2259 (scm_frame_critical_section): Take mutex as argument.
2260 (framed_critical_section_mutex): New, used as default for above.
2261 (scm_init_threads): Initialize it.
2262 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
2263 scm_i_critical_section_mutex; both are initialized statically.
241d9cea 2264
4e047c3e
MV
2265 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
2266 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
2267 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
2268 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
2269
2270 * debug.c (scm_debug_options): Replace
2271 SCM_CRITICAL_SECTION_START/END with a frame and
2272 scm_frame_critical_section.
2273
2274 * continuations.c (scm_make_continuation): No longer a critical
2275 section.
2276 (scm_dynthrow): Abort when scm_i_critical_section_level is
2277 not zero.
241d9cea 2278
d0a45bff
MV
22792005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2280
db6673e5
MV
2281 * threads.c (scm_try_mutex): Renamed argument for consistency.
2282
d0a45bff
MV
2283 * root.c (scm_call_with_dynamic_root): New docstring.
2284
2285 * eval.c: Define _GNU_SOURCE.
2286
9de87eea
MV
22872005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2288
2289 Big merge from the mvo-thread-cleanup branch. The main changes
2290 are:
241d9cea 2291
9de87eea
MV
2292 - The dynamic roots functionality has been split into dynamic
2293 states and continuations barriers. Fluids have been
2294 reimplemented and can now be garbage collected.
241d9cea 2295
9de87eea
MV
2296 - Initialization of Guile now works in a multi-thread friendly
2297 manner. Threads can freely enter and leave guile mode.
2298
2299 - Blocking on mutexes or condition variables or while selecting
2300 can now be reliably interrupted via system asyncs.
2301
2302 - The low-level threading interface has been removed.
2303
2304 - Signals are delivered via a pipe to a dedicated 'signal delivery
2305 thread'.
241d9cea 2306
9de87eea
MV
2307 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
2308
2309 * throw.c (scm_handle_by_message): Exit only the current thread,
2310 not the whole process.
2311 (scm_handle_by_message_noexit): Exit when catching 'quit.
241d9cea 2312
9de87eea
MV
2313 * scmsigs.c (take_signal, signal_delivery_thread,
2314 start_signal_delivery_thread, ensure_signal_delivery_thread,
2315 install_handler): Reimplemented signal delivery as explained in
2316 the comments.
2317
2318 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
2319 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
2320 scm_i_sched_yield, scm_i_pthread_sigmask,
2321 SCM_I_PTHREAD_MUTEX_INITIALIZER,
2322 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
2323 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
2324 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
2325 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
2326 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
2327 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
2328 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
2329 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
2330 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
2331 scm_i_pthread_key_create, scm_i_pthread_setspecific,
2332 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
2333 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
2334 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2335 when using pthreads.
2336 * null-threads.c, null-threads.h: Provide dummy definitions for
2337 the above symbols when not using pthreads.
241d9cea 2338
9de87eea
MV
2339 * modules.h, modules.c (scm_frame_current_module): New.
2340
2341 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2342 instead of scm_internal_dynamic_wind.
2343
2344 * init.h, init.c (restart_stack, start_stack): Removed.
2345 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2346 (scm_boot_guile_1): Removed.
2347 (scm_i_init_mutex): New.
2348 (really_cleanup_for_exit, cleanup_for_exit): New.
2349 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2350 Moved around some init funcs. Call
2351 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2352 with atexit.
241d9cea 2353
9de87eea
MV
2354 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2355 Use "!scm_is_eq" instead of "!=".
2356
2357 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2358 SCM_USE_COOP_THREADS): Removed.
2359
2360 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2361 maintained. Unlock scm_i_sweep_mutex before running
2362 scm_after_gc_c_hook.
2363 (scm_permanent_object): Allocate outside of critical section.
2364 (cleanup): Removed.
241d9cea 2365
9de87eea
MV
2366 * fluids.h, fluids.c: Reimplemented completely.
2367 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2368 SCM_FAST_FLUID_SET): Reimplemented as functions.
2369 (scm_is_fluid): New.
2370 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2371 (scm_make_dynamic_state, scm_dynamic_state_p,
2372 scm_is_dynamic_state, scm_current_dynamic_state,
2373 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2374 scm_c_with_dynamic_state, scm_with_dynamic_state,
2375 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
241d9cea 2376
9de87eea
MV
2377 * feature.c (progargs_fluid): New.
2378 (scm_program_arguments, scm_set_program_arguments): Use it instead
2379 of scm_progargs.
2380 (scm_init_feature): Allocate it. Also, only add "threads" feature
2381 when SCM_USE_PTHREAD_THREADS is true.
241d9cea 2382
9de87eea
MV
2383 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2384 scm_make_rec_mutex, with all the consequences.
2385 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2386 scm_internal_dynamic_wind. Handle dynamic states as second
2387 argument.
241d9cea 2388
9de87eea
MV
2389 * threads.h, threads.c (scm_internal_select): Renamed to
2390 scm_std_select and discouraged old name.
2391 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2392 and scm_std_usleep.
2393 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2394 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2395 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2396 SCM_THREAD_DATA): Removed.
2397 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2398 (scm_i_thread): New.
2399 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2400 Use scm_assert_smob_type.
2401 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2402 scm_thread_self, scm_thread_yield, scm_mutex_init,
2403 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2404 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2405 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2406 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2407 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2408 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2409 scm_thread_select): Removed. Replaced with scm_i_pthread
2410 functions as appropriate.
2411 (scm_in_guile, scm_outside_guile): Removed.
2412 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2413 take a ticket.
2414 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2415 New.
2416 (scm_i_frame_single_threaded): New.
2417 (scm_init_threads_default_dynamic_state): New.
2418 (scm_i_create_thread): Removed.
2419 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2420 (scm_make_recursive_mutex): New.
2421 (scm_frame_critical_section): New.
2422 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2423 latter, changed all uses.
2424 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2425 scm_i_set_last_debug_frame): New, use them instead of scm_root
2426 stuff.
2427 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2428 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2429 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2430 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2431 (remqueue): Allow the removal of already removed cells. Indicate
2432 whether a real removal has happened.
2433 (scm_thread): Removed, replaced with scm_i_thread.
2434 (make_thread, init_thread_creatant): Removed.
2435 (cur_thread): Removed.
2436 (block_self, unblock_from_queue): New.
2437 (block, timed_block, unblock): Removed.
2438 (guilify_self_1, guilify_self_2, do_thread_exit,
2439 init_thread_key_once, init_thread_key,
2440 scm_i_init_thread_for_guile, get_thread_stack_base,
2441 scm_init_guile): New initialisation method.
2442 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2443 thread creation.
2444 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2445 "fair" to fat and implemented new semantics, including reliable
2446 interruption.
2447 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2448 (scm_threads_mark_stacks): Explicitly mark handle.
2449 (scm_std_select): Allow interruption by also selecting on the
2450 sleep_pipe.
2451 (scm_i_thread_put_to_sleep): Handle recursive requests for
2452 single-threadedness.
2453 (scm_threads_prehistory, scm_init_threads): Put current thread
2454 into guile mode via guileify_self_1 and guileify_self_2,
2455 respectively.
2456
2457 * fluid.h (SCM_FLUIDP): Deprecated.
241d9cea 2458
9de87eea 2459 * coop-threads.c: Removed.
241d9cea 2460
9de87eea
MV
2461 * continuations.h, continuations.c (scm_with_continuation_barrier,
2462 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2463 New.
2464
2465 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2466 (async_mutex): New.
2467 (scm_async_click): Protected with async_mutex. Do not deal with
2468 signal_asyncs, which are gone. Set cdr of handled async cell to
2469 #f.
2470 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2471 current sleep.
2472 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2473 since that might not work during early initialization.
241d9cea 2474
9de87eea
MV
2475 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2476 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2477 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2478 and SCM_CRITICAL_SECTION_END.
2479 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2480 SCM_CRITICAL_SECTION_START/END.
241d9cea 2481
9de87eea
MV
2482 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2483 (libguile_la_SOURCES): Added null-threads.c
2484 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2485 threads-plugin.c.
2486 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2487
2488 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2489 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2490 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2491 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2492 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2493 scm_make_root): Removed or deprecated. Replaced with references
2494 to the current thread, dynamic state, continuation barrier, or
2495 some fluid, as appropriate.
2496 (root_mark, root_print): Removed.
2497 (scm_internal_cwdr): Reimplemented guts with
2498 scm_frame_current_dynamic_state and
2499 scm_i_with_continuation_barrier.
2500 (scm_dynamic_root): Return current continuation barrier.
241d9cea
NJ
2501
2502
ad3d5a65
MV
25032005-02-28 Marius Vollmer <mvo@zagadka.de>
2504
2505 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2506 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2507 cleanliness.
2508 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2509 IP_DROP_MEMBERSHIP.
2510 Thanks to Greg Troxel!
2511
73a90115
MD
25122005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2513
2514 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2515 block.
2516
5d2cb3ab
MV
25172005-02-25 Marius Vollmer <mvo@zagadka.de>
2518
2519 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2520 so that no two weak alist vectors share a spine.
2521 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2522 during GC before inserting the new alist cell.
2523
838c4126
MV
25242005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2525
2526 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2527 the hashtable.
2528 (scm_hash_fn_create_handle_x): Likewise.
2529 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
241d9cea 2530
29fed193
MD
25312005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2532
2533 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2534 the prototypical examples mentioned in the old reference manual.
2535 Instead keep the old semantics of dispatching on type. (Yes, this
2536 is extremely ugly, but the whole point of keeping the deprecated
2537 interface is not to break old code.)
2538
9cc49060
MD
25392005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2540
2541 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2542 scm_i_array_dims.
2543
8447f463
KR
25442005-01-28 Kevin Ryde <user42@zip.com.au>
2545
2546 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2547 integer-expt and multiply/divide. Inexacts and fractions no longer
2548 supported (they happened to work before for left shifts, but not
2549 right). Don't really need inexacts and fractions, since ash is
2550 documented as a "bitwise operation", and all the rest of those only
2551 take exact integers.
2552
1367aa5e
HWN
25532005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2554
856fca7e
HWN
2555 * gc-card.c (scm_i_card_statistics): map structs, closures and
2556 subrs to one tag.
2557
1367aa5e 2558 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2559 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2560
2561 * gc-segment.c (scm_i_all_segments_statistics): new function.
2562 (scm_i_heap_segment_statistics): new function
2563
2564 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2565 statistics on the number of live objects of each type.
2566
2567 * gc-card.c (scm_i_tag_name): new function.
241d9cea 2568 (scm_i_card_statistics): new function.
1367aa5e 2569
333db3b8
KR
25702005-01-24 Kevin Ryde <user42@zip.com.au>
2571
2572 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2573 POSIX and C99 don't document errno being set. Reported by Bruno
2574 Haible.
2575 (scm_flock): Update docstring from manual.
2576
8447f463
KR
2577 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2578 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2579 a 64-bit system.
2580
2581 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2582 sa_handler, needs to be a long on 64-bit systems where int is only 32
2583 bits.
2584
88f59e53
MV
25852005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2586
0eeb2611
MV
2587 * environments.c (obarray_enter, obarray_replace): Call
2588 SCM_HASHTABLE_INCREMENT when adding a new entry.
2589
88f59e53
MV
2590 * objects.c: Include goops.h for the scm_class_of prototype.
2591
2592 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2593 sizes to be smaller than the maximum lengths of vectors.
2594
219b2868
MV
25952005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2596
2597 * ports.c, smob.c: Include "libguile/goops.h".
2598
2599 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2600 scm_class_char, scm_class_pair, scm_class_procedure,
2601 scm_class_string, scm_class_symbol,
2602 scm_class_procedure_with_setter, scm_class_primitive_generic,
2603 scm_class_vector, scm_class_null, scm_class_real,
2604 scm_class_complex, scm_class_integer, scm_class_fraction,
2605 scm_class_unknown, scm_port_class, scm_smob_class,
2606 scm_no_applicable_method, scm_class_of): Moved from objects to
2607 goops since they are only useable once goops has been loaded.
2608 (scm_classes_initialized): Removed.
2609 (scm_class_of): Do not check it.
2610 (create_standard_classes): Do not set it.
241d9cea 2611
009c6b9c
MV
26122005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2613
50472546
MV
2614 * objects.h, objects.c (scm_classes_initialized): New.
2615 (scm_class_of): Signal error when scm_classes_initialized is zero.
2616 * goops.c (create_standard_classes): Set scm_classes_initialized
2617 to one.
241d9cea 2618
009c6b9c
MV
2619 * random.c (scm_random_solid_sphere_x): Use
2620 scm_c_generalized_vector_length instead of
2621 scm_uniform_vector_length.
2622
7719cbe9
MV
26232005-01-16 Marius Vollmer <mvo@zagadka.de>
2624
2625 * script.c (scm_compile_shell_switches): Removed debugging output.
2626
1ec44fed
KR
26272005-01-15 Kevin Ryde <user42@zip.com.au>
2628
2629 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2630 docstrings from manual.
2631 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2632
6e4cd850
MV
26332005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2634
0b5a0521
MV
2635 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2636 its value.
2637
2638 Implement u64 and s64 uniform numeric vectors with bignums when
2639 scm_t_uint64 and scm_t_int64 are not available.
2640
2641 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2642 scm_array_handle_u64_elements,
2643 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2644 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2645 is not available.
2646 (scm_take_s64vector, scm_array_handle_s64_elements,
2647 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2648 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2649 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2650 scm_t_int64/scm_t_uint64 are not available.
2651 (uvec_mark): New, to mark the bignums.
2652 (alloc_uvec): Initialize bignums.
2653 (uvec_fast_ref): Return bignums directly.
2654 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2655 assert_exact_integer): New.
2656 (uvec_fast_set): Use them to validate the bignums.
2657 (scm_init_srfi_4): Set mark function of smob when needed.
2658 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2659 scm_int64_max.
241d9cea 2660
6e4cd850 2661 Recognize 1.4 -e syntax.
241d9cea 2662
6e4cd850
MV
2663 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2664 (scm_compile_shell_switches): Use them to recognize and convert
2665 1.4 "-e" syntax.
241d9cea 2666
3b698afe
MV
26672005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2668
2669 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2670 deprecated features that once were macros but are now functions
2671 back into macros.
2672
d6dc83a9
MV
26732005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2674
49086691
MV
2675 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2676 * deprecation.c (scm_issue_deprecation_warning,
2677 scm_c_issue_deprecation_warning_fmt): Use it.
2678 (mode): Removed.
2679 (print_summary): New.
2680 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2681 mode.
241d9cea 2682
d6dc83a9 2683 Deprecated SCM_ARRAY* macros.
241d9cea 2684
d6dc83a9
MV
2685 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2686 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2687 version. Changed all uses.
2688 (scm_tc16_array, scm_i_tc16_array,
2689 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2690 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2691 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2692 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2693 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2694 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2695 SCM_ARRAY_V, SCM_I_ARRAY_V,
2696 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2697 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2698 scm_t_array, scm_i_t_array): Likewise.
2699 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2700 Moved from unif.h to unif.c.
2701 (scm_c_array_rank): New.
2702 (scm_array_rank): Reimplement using it.
241d9cea 2703
d6dc83a9
MV
2704 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2705 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2706 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
241d9cea 2707
dc91d8de
MV
27082005-01-11 Marius Vollmer <mvo@zagadka.de>
2709
2710 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2711 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2712 scm_c_generalized_vector_ref and scm_cvref, and
2713 scm_c_generalized_vector_set_x, respectively.
2714 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2715 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2716
2717 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2718 former to latter and made public. Changed all uses.
2719 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2720 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2721 (scm_i_shap2ra): New internal version of scm_shap2ra.
2722 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2723 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2724 (scm_ra_set_contp): Deprecated, changed all uses to
2725 scm_i_ra_set_contp.
2726 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
241d9cea 2727
66d33784
MV
27282005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2729
b06f099d
MV
2730 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2731 Trotts!
2732
5d35ad81
MV
2733 * unif.c (scm_list_to_typed_array): Allow the specification of the
2734 upper bound as well. This is needed for empty arrays.
2735 (l2ra): Give needed number of elements in error message.
2736 (scm_i_print_array): Print length information for arrays that need
2737 it.
2738 (scm_i_read_array): Parse it.
241d9cea 2739
66d33784
MV
2740 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2741 scm_i_object_chars, scm_i_object_length): Brought back from the
2742 dead.
2743
d7d7d401
MV
27442005-01-10 Marius Vollmer <mvo@zagadka.de>
2745
74c58fce
MV
2746 * ramap.c: Replaced single-index uses of scm_array_set_x with
2747 scm_c_generalized_vector_set_x.
2748
d7d7d401
MV
2749 * unif.c (scm_array_rank, scm_array_dimensions,
2750 scm_shared_array_offset, scm_shared_array_increments,
2751 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2752 to simplify code and make it more general.
2753 (scm_shared_array_root): Work with all kinds of arrays, including
2754 naked vectors.
2755 (indices_to_pos): New.
74c58fce
MV
2756 (scm_make_shared_array): Use it instead of scm_aind; use handle
2757 for oldra.
2758
4475d3fe
KR
27592005-01-10 Kevin Ryde <user42@zip.com.au>
2760
2761 * posix.c (scm_mkstemp): Update docstring from manual.
2762
d3ddc95e
KR
2763 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2764
8c8491f5
MV
27652005-01-09 Marius Vollmer <mvo@zagadka.de>
2766
b89ecc6f
MV
2767 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2768 scm_i_uniform_vector_set_proc): New.
2769 (u8ref, u8set, s8ref, s8set, etc): New.
2770 (uvec_reffers, uvec_setters): New.
2771 (uvec_to_list): Use generic scm_array_handle_ref instead of
2772 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2773 (coerce_to_uvec, scm_c_uniform_vector_ref,
2774 scm_c_uniform_vector_set_x): Likewise.
241d9cea 2775
b89ecc6f
MV
2776 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2777 New.
2778 (scm_t_array_handle): Added ref, set, elements and
2779 writable_elements for fast inline operation of
2780 scm_array_handle_ref and scm_array_handle_set.
2781 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2782 and replaced with inline code that simply calls the ref/set
2783 members of the handle.
2784 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2785 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2786 New.
2787 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2788 and memoize_set.
2789 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2790 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2791 scm_bit_invert_x): Correctly multiply index with increment in the
2792 general case.
241d9cea 2793
8c8491f5
MV
2794 * unif.c (scm_array_handle_set): Correctly execute only one
2795 alternative. D'Oh!
2796 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2797 the array; this covers all cases with much simpler code.
241d9cea 2798
8c8491f5
MV
2799 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2800 as well.
2801
cd5d55c7
MV
28022005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2803
2804 * srfi-4.c (uvec_type): New.
2805 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2806 scm_c_uniform_vector_x): Use it to get concrete type.
2807
2808 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2809 fit the docs.
2810
2811 * unif.c (ra2l): Handle zero rank arrays.
2812 (scm_i_print_array): Print zero rank arrays specially.
2813 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2814 (scm_i_read_array): Allow zero rank arrays.
241d9cea 2815
a4aad74e
MV
28162005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2817
2818 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2819 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2820 and SCM_SET_HASHTAB_BUCKET.
2821
2822 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2823 Removed ref_stack field.
2824 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2825 of a print state. Use them everywhere instead of ref_stack.
241d9cea 2826
3a40d5e1 2827 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
241d9cea 2828
a4aad74e
MV
2829 * srfi-4.c: Include deprecation.h.
2830
2831 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2832 deprecated.c, eq.c
2833 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2834 (scm_vector_elements, scm_vector_writable_elements,
2835 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2836 unif.[hc].
2837 (SCM_SIMPLE_VECTOR_LOC): Removed.
2838 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2839 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2840 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2841 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2842 latter. Changed use in eq.c.
241d9cea 2843
f01fe441
MV
28442005-01-07 Marius Vollmer <mvo@zagadka.de>
2845
2846 Make the uniform vector routines also deal with one dimensional
2847 arrays.
241d9cea 2848
f01fe441
MV
2849 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2850 SCM_SMOB_PREDICATE in this file.
2851 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2852 of the right type.
2853 (scm_is_uniform_vector): Likewise.
2854 (uvec_fast_ref): Made BASE param const.
2855 (uvec_writable_elements, uvec_elements): New.
2856 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2857 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2858 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2859 arrays.
2860 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2861 argument convention.
2862 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2863 checking.
2864 (scm_uniform_vector_length): Use uvec_length.
241d9cea 2865
2aaf5726
MV
28662005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2867
2868 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2869 scm_c_uniform_vector_size): Removed.
2870 (scm_array_handle_uniform_element_size): New.
241d9cea 2871
2aaf5726
MV
2872
2873 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2874 type of POS parameter to be signed, positions can be negative.
2875 (scm_array_handle_release): New, changed all uses of
2876 scm_t_array_handle to properly call it.
2877 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2878 Renamed former to latter, changed all uses.
241d9cea 2879
34ae52fc
MV
28802005-01-05 Marius Vollmer <mvo@zagadka.de>
2881
2882 Updated bitvector routines to also use scm_t_array_handles.
241d9cea 2883
34ae52fc
MV
2884 * unif.h (scm_bitvector_elements,
2885 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2886 deliver offset, length and increment to caller. Changed all uses.
2887 (scm_bitvector_release_elements,
2888 scm_frame_bitvector_release_elements,
2889 scm_bitvector_release_writable_elements,
2890 scm_frame_bitvector_release_writable_elements): Removed.
2891 (scm_array_handle_bit_elements,
2892 scm_array_handle_bit_writable_elements,
2893 scm_array_handle_bit_elements_offset): New.
2894 (scm_make_typed_array): The special value for non-initialized
2895 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2896 was a valid value to fill bitvectors with, so it can't really be
2897 specialed out.
241d9cea 2898
c4cb7628
KR
28992005-01-04 Kevin Ryde <user42@zip.com.au>
2900
2901 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2902 Reported by Bill Schottstaedt.
2903
0356881d
MV
29042005-01-02 Marius Vollmer <mvo@zagadka.de>
2905
2906 * sort.c (quicksort): Added INC parameter for non-contigous
2907 vectors.
2908 (quicksort1): New, for contigous vectors. Both functions are
2909 generated from the same code by including "quicksort.i.c".
2910 (scm_restricted_vector_sort_x): Call one of quicksort and
2911 quicksort1, depending on increment of vector.
2912 (scm_sort): Simply call scm_sort_x on a copy of the list or
2913 vector.
2914 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2915 size_t, added inc parameter.
2916 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2917 so that it doesn't leak.
2918 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2919 list or vector.
241d9cea 2920
0356881d
MV
2921 * ramap.c (scm_array_map_x): Do not try to convert fill value
2922 before filling, any necessary conversion is done while storing.
2923
2924 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2925 doing it inline.
2926
2927 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2928 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2929 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2930
2931 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2932 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2933 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2934 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2935 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2936 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2937 vector elements API or simple vector API, as appropriate. Removed
2938 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2939 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
241d9cea 2940
0356881d
MV
2941 * srfi-4.h, srfi-4.c,
2942 srfi-4.i.c (scm_array_handle_uniform_elements,
2943 scm_array_handle_uniform_writable_elements,
2944 scm_uniform_vector_elements,
2945 scm_uniform_vector_writable_elements):
2946 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2947 scm_t_array_handle, deliver length and increment.
2948 (scm_array_handle_<foo>_elements,
2949 scm_array_handle_<foo>_writable_elements): New.
241d9cea 2950
0356881d
MV
2951 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2952 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
241d9cea 2953
0356881d
MV
2954 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2955 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2956 scm_array_handle_set, scm_array_handle_elements
2957 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2958 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2959 scm_dimensions_to_uniform_array): Deprecated for real.
2960 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2961 snarfing wont allow a mismatch between C and Scheme arglists.
2962 (scm_make_shared_array, scm_enclose_array): Correctly use
2963 scm_c_generalized_vector_length instead of
2964 scm_uniform_vector_length.
241d9cea 2965
0356881d
MV
2966 * validate.h (SCM_VALIDATE_VECTOR,
2967 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2968 of SCM_VECTORP.
2969
2970 * weaks.h, weaks.c: Use new internal weak vector API from
2971 vectors.h.
2972
2973 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2974 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2975 'extra' to being regular sources.
2976 (noinst_HEADERS): Added quicksort.i.c.
2977 * quicksort.i.c: New file.
2978
2979 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2980 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2981 and reimplemented. Replaced all uses with scm_vector_elements,
2982 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2983 appropriate.
2984 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2985 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2986 SCM_SIMPLE_VECTOR_LOC): New.
2987 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2988 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2989 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2990 Removed.
2991 (scm_vector_copy): New.
2992 (scm_vector_elements, scm_vector_writable_elements): Use
2993 scm_t_array_handle, deliver length and increment. Moved to
2994 unif.h. Changed all uses.
2995 (scm_vector_release_elements,
2996 scm_vector_release_writable_elements,
2997 (scm_frame_vector_release_elements,
2998 scm_frame_vector_release_writable_elements): Removed.
2999 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
3000 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
3001 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
3002 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
3003 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
3004 weak vectors.
3005
0336d18b
MV
30062004-12-29 Marius Vollmer <mvo@zagadka.de>
3007
3008 No longer use creators to specify the type of an array. Creators
3009 expose the fact that arrays are wrapped around vectors, but that
3010 might change.
241d9cea 3011
0336d18b
MV
3012 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
3013 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
3014 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
3015 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
3016 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
3017 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
3018 uvec_proc_vars): Removed.
3019 (scm_i_generalized_vector_creator): Removed.
3020 (scm_i_generalized_vector_type): New.
3021
3022 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
3023 scm_make_typed_array, scm_array_type, scm_list_to_array,
3024 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
3025 (scm_array_creator): Removed.
3026 (scm_array_p): Deprecated second PROT argument.
3027 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
3028 Deprecated, reimplemented in terms of scm_make_typed_array and
3029 scm_list_to_typed_array.
3030 (scm_i_proc_make_vector, scm_i_proc_make_string,
3031 scm_i_proc_make_bitvector): Removed.
3032 (type_creator_table, init_type_creator_table, type_to_creator,
3033 make_typed_vector): New.
3034 (scm_i_convert_old_prototype): Removed.
3035 (prototype_to_type): New.
3036 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
3037 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
3038 minor added clarity.
3039 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
3040 instead of scm_make_uve.
3041 (tag_creator_table, scm_i_tag_to_creator): Removed.
3042 (tag_to_type): New.
3043 (scm_i_read_array): Use scm_list_to_typed_array instead of
3044 scm_list_to_uniform_array.
241d9cea 3045
277e8472
MV
30462004-12-27 Marius Vollmer <mvo@zagadka.de>
3047
32b26202
MV
3048 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
3049 (scm_bitvector_writable_elements): New.
3050 (scm_bitvector_release, scm_bitvector_release_elements):
3051 Renamed former to latter. Added explicit call to
3052 scm_remember_upto_here_1.
3053 (scm_frame_bitvector_release,
3054 scm_frame_bitvector_release_elements): Renamed former to latter.
3055 (scm_bitvector_release_writable_elements,
3056 scm_bitvector_release_writable_elements): New.
3057 Changed all uses as required by the changes above.
3058
3059 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
3060 scm_u8vector_elements, etc): Made return value "const".
3061 (scm_uniform_vector_writable_elements,
3062 scm_u8vector_writable_elements, etc): New.
3063 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
3064 Renamed former to latter. Added explicit call to
3065 scm_remember_upto_here_1.
3066 (scm_frame_uniform_vector_release,
3067 scm_frame_uniform_vector_release_elements): Renamed former to latter.
3068 (scm_uniform_vector_release_writable_elements,
3069 scm_frame_uniform_vector_release_writable_elements): New. Takes
3070 crown of longest identifier yet.
3071 Changed all uses as required by the changes above.
241d9cea 3072
277e8472
MV
3073 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
3074 void.
3075 (scm_is_vector, scm_vector_p, scm_vector_length,
3076 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
3077 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
3078 scm_vector_move_left_x, scm_vector_move_right_x,
3079 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
3080 (scm_vector_elements, scm_vector_release_elements,
3081 scm_vector_frame_release_elements, scm_vector_writable_elements,
3082 scm_vector_release_writable_elements,
3083 scm_vector_frame_release_writable_elements): New.
3084 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
3085 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
3086
3087 * ramap.c (scm_ramapc, scm_raeql): Use
3088 scm_c_generalized_vector_length instead of
3089 scm_uniform_vector_length.
3090 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
3091 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
241d9cea 3092
49c51610
MV
30932004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3094
3095 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
3096 member for relocating debug frames.
3097 (scm_make_continuation): Set it.
3098
3099 * stacks.c (read_frame, read_frames, scm_make_stack,
3100 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
3101 of continuations instead of calculating the offset ourselves.
3102 Relocate 'vect' member of scm_t_debug_frame.
241d9cea 3103
3b2ee265
KR
31042004-12-16 Kevin Ryde <user42@zip.com.au>
3105
3106 * ramap.c (scm_array_map_x): Check for at least one source argument.
3107
e120686a
KR
31082004-12-14 Kevin Ryde <user42@zip.com.au>
3109
3110 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
3111 the C code so for the final call to the predicate procedure is a tail
3112 call, per SRFI-13 spec.
3113
680b5237
KR
31142004-12-10 Kevin Ryde <user42@zip.com.au>
3115
3116 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
3117 recent revision to the reference manual.
3118
3119 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
3120 with "%", C99 says it's well-defined.
3121
3122 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
3123 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
3124 bother trying to fit scm_from_ulong, not really worth the trouble if
3125 addresses are more than 4 bytes usually.
3126
446d320c
KR
31272004-11-30 Kevin Ryde <user42@zip.com.au>
3128
3129 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
3130 arm32. Reported by Greg Troxel.
3131
f2654760
MV
31322004-11-14 mvo <mvo@zagadka.de>
3133
3134 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
3135
3136 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
3137
d550e35f
MV
31382004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3139
3140 Enclosed arrays are now their own smob. This has been done to
3141 make the code more explicit about them and to prepare for the time
f2654760
MV
3142 when generalized vectors include arbitrary one-dimensional
3143 arrays. (Uptonow, enclosed arrays have been recognized by their
3144 use of an array as their storage 'vector'. When all generalized
3145 vectors are allowed as storage, including one-dimensional arrays,
3146 this will no longer work.)
241d9cea 3147
d550e35f
MV
3148 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
3149 New.
3150 (exactly_one_third, singp): Removed.
3151 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
3152 scm_shared_array_offset, scm_shared_array_increments): Handle
3153 enclosed arrays explicitely.
3154 (scm_array_rank): Likewise. Also, do not return zero for
3155 non-arrays, signal an error instead since arrays with rank zero do
3156 exist.
3157 (scm_i_make_ra): New, for specifying the tag of the new array.
3158 (scm_make_enclosed_array): Use it.
3159 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
3160 (scm_make_shared_array): Use scm_c_generalized_vector_length
3161 instead of scm_uniform_vector_length.
3162 (scm_array_in_bounds_p): Rewritten to be much cleaner.
3163 (scm_i_cvref): New, doing the job of scm_cvref.
3164 (scm_cvref): Use scm_i_cvref.
3165 (scm_array_ref): Do not accept non-arrays when no indices are
3166 given. Use scm_i_cvref to do the actual access.
3167 ("uniform-array-set1"): Do not register.
3168 (scm_array_set_x, scm_uniform_array_read_x,
3169 scm_uniform_array_write): Handle enclosed arrays explicitly.
3170 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
3171 handle enclosed arrays.
3172 (scm_array_to_list): Handle enclosed arrays explicitly.
3173 (rapr1): Removed.
3174 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
3175 enclosed arrays.
3176 (scm_i_print_enclosed_array): New.
3177 (tag_proto_table, tag_creator_table): Renamed former to latter.
3178 Added "a" and "b" for strings and bitvectors, resp.
3179 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
3180 latter. Tag "a" is in the table now, no need to handle it as a
3181 legacy tag.
3182 (scm_raprin1): Just call scm_iprin1.
3183 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
3184 explicitly.
3185 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
3186 Use scm_i_print_array as printer for scm_tc16_array.
241d9cea 3187
2ed34885
MV
31882004-11-10 Marius Vollmer <mvo@zagadka.de>
3189
823086c1
MV
3190 * ramap.c (cind): Changed second arg to be pointer to long instead
3191 of uniform vector.
3192 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 3193 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
3194 (scm_array_index_map_x): Likewise.
3195
3196 * unif.c: Changed all uses of scm_array_prototype to
3197 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
3198 prototype is known.
3199 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
3200 in terms of scm_uniform_vector_read_x and
3201 scm_uniform_vector_write, respectively. Strings and
3202 bitvector support has been dropped.
241d9cea 3203
2ed34885
MV
3204 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
3205 needed files directly. Include config.h, <unistd.h> and <io.h>
3206 when available.
3207 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
3208
2c72f253
MV
32092004-11-09 Marius Vollmer <mvo@zagadka.de>
3210
3211 * gh_data.c (gh_uniform_vector_length): Properly use
3212 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
3213
3cc0a296
MV
32142004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3215
3216 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
3217 New.
3218 (scm_i_uniform_vector_creator): Removed.
3219 (scm_i_generalized_vector_creator): New.
3220 (scm_uniform_vector_length, scm_uniform_element_size): Do not
3221 handle generalized vectors, only uniform numeric vectors.
3222 (alloc_uvec): Do length check here...
3223 (make_uvec): ...but not here.
3224 (coerce_to_uvec): Use new generalized vector functions to handle
3225 all kinds of vectors in one go.
241d9cea 3226
3cc0a296
MV
3227 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
3228 remaining scm_tc7_unused tags to get a neatly ordered list.
3229
3230 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
3231 longer handle scm_tc7_bvect bitvectors.
3232
3233 * ramap.c: Use the new generalized vector functions to handle all
3234 vector like things.
3235
3236 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
3237 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
3238 scm_generalized_vector_length, scm_generalized_vector_ref,
3239 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
3240 scm_is_generalized_vector, scm_c_generalized_vector_length,
3241 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
3242 New.
241d9cea 3243
3cc0a296
MV
3244 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
3245 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
3246 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
3247 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
3248 scm_c_bitvector_length, scm_c_bitvector_ref,
3249 scm_c_bitvector_set_x, scm_bitvector_elements,
3250 scm_bitvector_release, scm_frame_bitvector_release,
3251 scm_tc16_bitvector, bitvector_free, bitvector_print,
3252 bitvector_equalp, count_ones, find_first_one): New.
3253 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
3254 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
3255 using the new C API for bitvectors and maybe count_ones or
3256 find_first_one, as appropriate.
3257 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
3258 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
3259 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
3260 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
3261 new functions from above.
3262 (scm_i_proc_make_vector, scm_i_proc_make_string,
3263 scm_i_proc_make_bitvector): Made non-static for use in
3264 scm_i_generalized_vector_creator.
3265 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
3266 (scm_make_uve): Validate that the created object is a generalized
3267 vector.
3268 (scm_i_legacy_tag): Removed.
3269 (scm_i_print_array): Do it here.
3270 (scm_raprin1): Only print enclosed arrays.
3271
3272 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
3273
c24d026b
MV
32742004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3275
1f2328fe
MV
3276 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
3277 added portability.
3278
3279 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
3280 for "space". Thanks to Bruce Korb!
3281
c24d026b
MV
3282 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
3283 only after dest has been set. Thanks to Hyper Division!
3284
3285 * gh_data.c (gh_uniform_vector_length): Use
3286 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
3287
d4ea47c8
MV
32882004-11-03 Marius Vollmer <mvo@zagadka.de>
3289
3290 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
3291 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
3292 SCM_SET_UVECTOR_LENGTH): Removed.
3293
236288e2
MV
32942004-11-02 Marius Vollmer <mvo@zagadka.de>
3295
9a5fa6e9 3296 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
3297 Thanks!
3298
3299 * backtrace.c (scm_display_backtrace_with_highlights): Join the
3300 first and the second line of the SCM_DEFINE macro call, since old
3301 preprocessors cannot handle definitions that are split into two
3302 lines.
3303
3304 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
3305 declarations.
3306
3307 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
3308 scm_t_uint32 to fix the mismatch between the function declaration
3309 and definition.
3310
3311 * sort.c (quicksort): Don't use C99 variable declarations.
3312
3313 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
3314 SCM_BOOL_F if no type matches.
3315
3316 * threads.c (thread_print): Cast a pointer to size_t when printing
3317 with scm_uintprint.
3318
3319 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
3320 defined.
3321 (scm_array_prototype): Deprecated.
3322
f738b51d
MV
33232004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3324
5d1015ec
MV
3325 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
3326 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
3327 more efficient access to the u32vector.
241d9cea 3328
034486df
MV
3329 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
3330 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
3331 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
3332
3333 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
3334 instead of the old-style dvectors.
3335
3336 * gh_data.c: Use new-style uniform arrays in place of old-style
3337 ones.
3338
3339 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3340 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3341
3342 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3343 instead of old-sytle uvectors.
241d9cea 3344
034486df
MV
3345 * convert.c, convert.i.c: Rewritten completely, using
3346 scm_any_to_u8vector, etc and other new-style uniform vector
3347 functions.
3348
3349 * random.c (scm_random_solid_sphere_x,
3350 scm_random_hollow_sphere_x): Do not validate vector argument, this
3351 is already done elsewhere.
3352
3353 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3354 scm_any_to_u8vector, etc): New.
3355 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3356 longer handle old-style uniform vectors.
3357
f738b51d
MV
3358 * read.c (scm_lreadr): Bugfix: include the last bit in the
3359 bit vector.
3360
5e9c05a1
MV
33612004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3362
327114a2
MV
3363 * unif.h, unif.c (scm_array_creator): New.
3364 (scm_i_get_old_prototype): New.
3365 (scm_array_prototype): use it to return old-style prototype, never
3366 return creators.
3367 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3368 arg of SCM_UNDEFINED. The latter is wrong.
241d9cea 3369
5e9c05a1
MV
3370 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3371 (make_uve): Removed.
3372 (scm_i_proc_make_vector, scm_i_proc_make_string,
3373 scm_i_proc_make_u1vector): New.
3374 (scm_init_unif): Initialize them.
3375 (scm_i_convert_old_prototype): New.
3376 (scm_make_uve): Use it to get the creator procedure. Removed all
3377 old code that created old-style uniform vectors.
3378 (scm_array_p): Handle generic vectors.
3379 (scm_dimensions_to_uniform_array): Do not fill new array with
3380 prototype when that is a procedure.
3381 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3382 the NDIM argument.
3383 (scm_i_print_array): Print rank for shared or non-zero-origin
3384 vectors.
3385 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3386 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3387 which I do not understand yet.
3388 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3389
5e9c05a1
MV
3390 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3391 (iflo2str): Use icmplx2str for complex numbers.
3392
3393 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3394 scm_i_uniform_vector_prototype): Removed.
3395 (scm_i_uniform_vector_creator): New.
3396 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3397 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3398 Updated all tables and generic functions to support them.
3399 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3400 (scm_init_srfi_4): Initialize them.
241d9cea 3401
5e9c05a1
MV
3402 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3403 sizeof(CTYPE) as explained in the comment.
3404
3405 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3406 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3407 'i' and 'e' between introducing numbers and uniform vectors. Do
3408 not call scm_i_read_homogenous_vector, since that is also handled
3409 by scm_i_read_array now.
3410
f984af07
MV
34112004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3412
3413 First cut at integrating uniform vectors from srfi-4 with the rest
3414 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3415 vector. The plan is to gradually replace one type after the other
3416 until none is left and then to consider general cleanups and
3417 optimizations.
241d9cea 3418
f984af07
MV
3419 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3420
3421 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3422 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3423 scm_uniform_vector_to_list, scm_is_uniform_vector,
3424 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3425 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3426 scm_uniform_vector_release): New.
3427 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3428 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3429 from unif.h, unif.c and extended to handle both the old and new
3430 uniform vectors.
3431
3432 * tags.h (scm_tc7_byvect): Commented out.
3433
3434 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3435 the former to the latter.
3436 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3437 srfi-4.h, srfi-4.c.
3438 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3439 (scm_array_p, scm_array_rank, scm_array_dimensions,
3440 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3441 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3442 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3443 vectors. Removed code for scm_tc7_byvect.
3444 (scm_dimensions_to_uniform_array): Fill array with 0 when
3445 prototype is #\nul.
3446 (scm_i_print_array_dimension, scm_i_legacy_tag,
3447 scm_i_print_array): New.
3448 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3449 for scm_tc7_byvect.
3450
3451 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3452 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3453 uniform vectors. Removed code for scm_tc7_byvect
3454
3455 * print.c (iprin1): Removed code for scm_tc7_byvect.
3456 * objects.c (scm_class_of): Likewise.
3457 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3458 * gc-card.c (scm_i_sweep_card): Likewise.
3459 * evalext.c (scm_self_evaluating_p): Likewise.
3460 * eq.c (scm_equal_p): Likewise.
3461
3462 * gh_data.c (gh_chars2byvect): Reimplemented with
3463 scm_make_s8vector.
3464 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3465
3466 * srfi-4.c (take_uvec): New.
3467 (alloc_uvec): Use it.
3468 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3469
3470 * random.c (vector_scale, vector_scale_x): Renamed former to the
3471 latter, since it modifies its argument.
3472 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3473 Do not use scm_universal_vector_length for non-uniform vectors.
3474 Use scm_f64vector_elements to access innards of uniform vectors.
3475
3476 * convert.i.c: Convert srfi-4 style uniform vectors when
3477 requested.
3478 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3479 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
241d9cea 3480
79d52182
MV
34812004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3482
3483 * numbers.h, numbers.c (scm_i_print_double): New.
3484
3485 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3486 ../srfi/ but heavily modified.
3487 * Makefile.am: Add them in all the right places.
3488 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3489 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3490 '#u', and '#s'.
3491
3492 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3493 and made non-static. Changed all uses.
3494
6191ccec
MV
34952004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3496
e64e80b0
MV
3497 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3498 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3499 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3500 scm_uintprint to print unsigned integers, raw heap words, and
3501 adresses, using a cast to scm_t_bits to turn pointers into
3502 integers.
3503
3504 * unif.c: Include "libguile/print.h".
3505
c90ac3a8
MV
3506 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3507 scm_t_intmax values.
3508 (scm_uint2str): New, for scm_t_uintmax.
3509 (scm_iint2str): Argument type changed to scm_t_intmax,
3510 reimplemented in terms of scm_uint2str.
241d9cea 3511
c90ac3a8
MV
3512 * print.c, print.h (scm_uintprint): New, for printing
3513 scm_t_uintmax values.
3514 (scm_intprint): Argument type changed to scm_t_intmax.
241d9cea 3515
77c2594f
MV
3516 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3517 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3518 strategic places so that the loops can be interrupted.
3519
6191ccec
MV
3520 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3521 "-I$(top_srcdir)/libguile-ltdl".
3522 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3523 "../libguile-ltdl/libguile-ltdl.a".
241d9cea 3524
6191ccec
MV
3525 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3526 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3527 instead of <libguile-ltdl.h>.
3528
77600f3e
MV
35292004-10-20 Marius Vollmer <mvo@zagadka.de>
3530
3531 * sort.c (quicksort): Copy pivot out of the array while
3532 constructing the partitions; it could get overwritten otherwise.
3533 Because of the ultimate insertion sort, this bug did not cause
3534 quicksort to fail, it just put all the burdon on the insertion
3535 sort and was thus very slow. Thanks to Rolan Orre for reporting
3536 the slowness!
241d9cea 3537
5000379b
MV
35382004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3539
192cd792
MV
3540 * numbers.c (scm_i_range_error): New.
3541 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
241d9cea 3542 scm_out_of_range.
192cd792
MV
3543
3544 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3545 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3546
3547 * unif.c (scm_array_p): When no prototype is given, explicitely
3548 test for allowable types, do not simply return true. Thanks to
3549 Roland Orre for reporting this!
3550
5000379b
MV
3551 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3552
3553 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3554 segment to scm_max_segment_size.
3555
497eb0b7
HWN
35562004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3557
1367aa5e
HWN
3558 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3559
497eb0b7
HWN
3560 * inline.h (scm_double_cell): abort if GC running.
3561 (scm_cell): idem.
3562
aef0bdb4
MV
35632004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3564
3565 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3566 pos == 0.
3567
3568 Keywords no longer store a 'dash symbol'. Instead, they store a
3569 symbol with their real name.
241d9cea 3570
aef0bdb4
MV
3571 * keywords.h, keywords.c, deprecated.h, deprecated.c
3572 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3573 terms of scm_is_keyword and scm_keyword_dash_symbol.
241d9cea 3574
aef0bdb4
MV
3575 * keywords.h, keywords.c, discouraged.h, discouraged.c
3576 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3577 scm_c_make_keyword): Discouraged.
3578
3579 * keywords.h, keywords.c (scm_symbol_to_keyword,
3580 scm_keyword_to_symbol): Implemented in C.
3581 (scm_is_keyword, scm_from_locale_keyword,
3582 scm_from_locale_keywordn): New.
3583
241d9cea 3584 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
aef0bdb4
MV
3585
3586 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3587 scm_from_locale_keyword instead of scm_c_make_keyword.
3588
3589 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3590 better error message.
3591
3592 * deprecated.c: Include discouraged.h and keywords.h.
3593
3594 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3595 reading '#:' or ':'. See NEWS for consequences.
3596
818deb11
MV
35972004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3598
43c25626
MV
3599 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3600 literals are now read-write again (until SCM_STRING_CHARS is
3601 removed).
3602
3603 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3604 strings with an error message that blames SCM_STRING_CHARS.
3605
3606 * options.c (change_option_setting): Use scm_car instead of
3607 explicit type check plus SCM_CAR.
3608
3609 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3610 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3611 (scm_iprin1): Use them instead of the previoulsy hardcoded
3612 strings.
3613 (scm_init_print): Initialize them.
3614
3615 * backtrace.c (display_frame_expr): Do not remove control
3616 characters from the final string. Print it directly using
3617 scm_display.
3618
818deb11
MV
3619 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3620 Thanks to Roland Orre!
3621
d748089e
KR
36222004-09-29 Kevin Ryde <user42@zip.com.au>
3623
3624 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3625 be whole original string in match struct, not offsetted substring.
3626
0ff7e3ff
HWN
36272004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3628
3629 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3630
ad7de4b8
MV
36312004-09-24 Marius Vollmer <mvo@zagadka.de>
3632
2edf319f
MV
3633 * Makefile.am (EXTRA_DIST): Added gettext.h.
3634
d180337b
MV
3635 * smob.c, smob.h (scm_assert_smob_type): New.
3636
05d7cf89 3637 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3638 Include GUILE_CFLAGS.
3639 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3640 now.
3641 (libpath.h): Put GUILE_CFLAGS in the build-info.
241d9cea 3642
c9fedf8a
MV
36432004-09-23 Marius Vollmer <mvo@zagadka.de>
3644
3645 * print.h (scm_print_state): Added highlight_objects.
3646 * print.c (make_print_state, scm_free_print_state): Initialize it
3647 to SCM_EOL.
3648 (scm_iprin1): Wrap output in '{...}' when object is contained in
3649 highlight_objects.
3650
3651 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3652 scm_backtrace_with_highlights): New. Set highlight_objects of
3653 printstate.
241d9cea 3654
c9fedf8a
MV
3655 * error.c (scm_error_scm): Document new meaning of data/rest
3656 argument for out-of-range and wrong-type-arg errors.
3657 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3658 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3659 exception so that it gets highlighted in the backtrace.
3660 Don't talk about "argument" when not giving a position.
241d9cea 3661
c9fedf8a
MV
3662 * throw.c (handler_message): The rest argument is the fourth
3663 argument, not everything after the third. Call
3664 scm_display_backtrace_with_highlights, passing the rest argument
3665 when appropriate.
3666
d5ac9b2a
MV
36672004-09-22 Marius Vollmer <mvo@zagadka.de>
3668
3669 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3670 <bruno@clisp.org>:
3671
3672 * i18n.c: Handle --disable-nls (thanks Bruno).
3673
3674 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3675 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3676
3677 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3678 LC categories.
05d7cf89 3679 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3680
3681 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3682 scm_bind_textdomain_codeset): Make wrappers similar to C function
3683 they wrap.
3684
3685 * i18n.h: New file.
3686 * i18n.c: New file.
3687 * gettext.h: New file, taken from GNU gettext.
3688 * init.c: Include libguile/i18n.h.
3689 (scm_init_guile_1): Add call to scm_init_i18n().
3690 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3691 (DOT_X_FILES): Add i18n.x.
3692 (DOT_DOC_FILES): Add i18n.doc.
3693 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3694 (modinclude_HEADERS): Add i18n.h.
3695
d2e53ed6
MV
36962004-09-22 Marius Vollmer <mvo@zagadka.de>
3697
2cdfe016
MV
3698 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3699
d2e53ed6
MV
3700 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3701 discouraged.h. Replaced all uses with scm_is_pair.
3702 (SCM_I_CONSP): New name for SCM_CONSP.
3703
3704 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3705 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3706 scm_cadr, etc): New.
3707 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3708 uses with scm_is_null.
5dd82006 3709
d2e53ed6
MV
3710 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3711 instead of explicit code.
5dd82006 3712
5dfdf243
MV
37132004-09-22 Marius Vollmer <mvo@zagadka.de>
3714
b50c53e5
MV
3715 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3716 Reworded logic a bit so that #f is returned immediately when s1 is
3717 too short to contain s2.
3718
5dfdf243 3719 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3720 zero-terminated locale string before matching against it.
5dfdf243
MV
3721
3722 * strings.h, strings.c (scm_substring_read_only,
3723 scm_c_substring_read_only, scm_i_substring_read_only): New.
3724 (RO_STRING_TAG, IS_RO_STRING): New.
241d9cea
NJ
3725 (scm_i_string_writable_chars): Bail on read-only strings.
3726
5dfdf243
MV
3727 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3728 literals, thus making them read-only as specified by R5RS.
3729
22ab5ba3
MV
37302004-09-22 Marius Vollmer <mvo@zagadka.de>
3731
3732 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3733 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3734
2663421c
MV
37352004-09-21 Marius Vollmer <mvo@zagadka.de>
3736
0d83cb90
MV
3737 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3738 numbers.c.
3739 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3740 Thanks to Andreas Vögele!
241d9cea 3741
2663421c
MV
3742 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3743 just on a line of its own.
3744
3745 * srfi-13.c (scm_string_any, scm_string_every,
3746 scm_string_tabulate, string_upcase_x, string_down_case_x,
3747 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3748 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3749 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3750 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3751 indices, which can also be negative.
241d9cea 3752
b00b73f9
MV
37532004-09-20 Marius Vollmer <mvo@zagadka.de>
3754
3755 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3756
3757 * threads.c (scm_threads_mark_stacks): Call
3758 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3759 only used once.
3760
adba74f3
HWN
37612004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3762
05d7cf89 3763 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3764 Bugfix: when subtracting unsigned values, make sure that result
3765 does not wrap.
3766
f6de32c8
KR
37672004-09-09 Kevin Ryde <user42@zip.com.au>
3768
3769 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3770 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3771 by Andreas Vögele.
f6de32c8 3772
e548be5f
MV
37732004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3774
eb8d0af1
MV
3775 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3776
e548be5f
MV
3777 * eq.c (real_eqv): Pretend that all NaNs are equal.
3778
3779 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3780
e7acba81
MV
37812004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3782
874fbad1
MV
3783 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3784 use size_t for some locals instead of int.
3785
e7acba81
MV
3786 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3787 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3788 (skip_scsh_block_comment): Use scm_input_error instead of
3789 scm_misc_error in case of EOF.
241d9cea 3790
5de12658
KR
37912004-09-07 Kevin Ryde <user42@zip.com.au>
3792
3793 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3794 Bug report by Bill Schottstaedt.
3795
3796 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3797 column.
3798 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3799
3800 * posix.c (scm_access): Update docstring per manual.
3801
3802 * posix.c (scm_nice): Correction to error detection. Reported by
3803 Matthias Koeppe.
3804
3805 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3806 throw error before unlocking mutex with SCM_ALLOW_INTS.
3807
e227addf
KR
38082004-09-06 Kevin Ryde <user42@zip.com.au>
3809
3810 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3811 available. This also gets around CLK_TCK being absent when
3812 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3813
edea856c
SJ
38142004-09-03 Stefan Jahn <stefan@lkcc.org>
3815
3816 * threads.c (scm_threads_mark_stacks): Fixed local variable
3817 definitions.
3818
e7acba81 3819 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3820 local variable definitions.
3821
3822 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3823 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3824 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3825 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3826 scm_makfrom0str().
3827
874fbad1 3828 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3829 part.
3830
3831 * numbers.c (scm_init_numbers): Removed check_sanity() call
3832 inside GUILE_DEBUG. The function has been removed somewhen...
3833
3834 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3835 MinGW32 because it conflicts with its pthread headers.
3836
d9eb2d67
MV
38372004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3838
3839 * strings.c (SCM_STRINGP): Accept all strings.
3840 (SCM_STRING_CHARS): Reject shared substrings here.
3841
3842 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3843 the Copyright years.
3844
c495c342
KR
38452004-08-27 Kevin Ryde <user42@zip.com.au>
3846
3847 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3848 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3849 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3850
57aa5515
MV
38512004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3852
3853 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3854 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3855 scm_i_symbol_is_interned, scm_i_mem2symbol,
3856 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3857
ce25760f
MV
38582004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3859
19ff6ffc
MV
3860 * srfi-13.c: First cut at thread-safeness and proper use of
3861 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3862 been inserted. Made sure that no internal string pointer is used
3863 across a SCM_TICK or a possible GC.
241d9cea 3864
ce25760f
MV
3865 * script.c (scm_compile_shell_switches): Use
3866 scm_from_locale_string instead of scm_makfrom0str.
3867
3868 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3869 always been.
3870
c5080b51
MV
38712004-08-25 Marius Vollmer <mvo@zagadka.de>
3872
3873 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3874 strop.c.
3875
3876 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3877 * strop.h, strop.c: Removed, they are now empty.
3878 * Makefile.am: Updated for new and removed files.
241d9cea 3879
c5080b51
MV
3880 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3881 to scm_string_to_symbol.
3882
3883 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3884 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3885 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3886 charset instead of libc functions.
3887
3888 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3889 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3890 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3891 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3892 instead of explicit code.
241d9cea 3893
c5080b51
MV
3894 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3895 "srfi-13.h" instead of "strop.h".
3896
3897 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3898 scm_init_srfi_14. Do not call scm_init_strop.
3899
4b0d27f2
MV
39002004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3901
3902 * numbers.c (scm_inf_p): Synced docstring back from manual.
3903
3ece39d6
MV
39042004-08-22 Marius Vollmer <mvo@zagadka.de>
3905
3906 * strings.c (get_str_buf_start): New helper function.
3907 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3908 scm_i_string_char, scm_i_string_writable_chars): Use it.
3909 (scm_i_substring_copy): Make START argument optional for C
3910 callers, for upcoming SRFI-13 integration.
241d9cea 3911
3ece39d6
MV
39122004-08-21 Marius Vollmer <mvo@zagadka.de>
3913
3914 From Richard Todd, Thanks!
241d9cea 3915
3ece39d6
MV
3916 * script.c (scm_compile_shell_switches): added '-L' switch to add
3917 to the %load-path.
241d9cea 3918
5fa0939c
DH
39192004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3920
3921 * eval.c (unmemoize_exprs): When dropping internal body markers
3922 from the output during unmemoization, also drop those that are not
3923 immediately at the beginning of a body.
3924
2146fdeb
MV
39252004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3926
c1f54b3d
MV
3927 * eval.c (scm_lookupcar1): Report "Variable used before given a
3928 value" insetad of an "Unbound" one for variables that are found
3929 but still contain SCM_UNDEFINED.
2146fdeb
MV
3930
3931 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3932 expects a null-terminated string in the locale encoding, but
3933 scm_i_string_writable_chars doesn't give that. Fixed by letting
3934 mkstemp modify a locale version of the tmpl argument and copying
3935 the result back into tmpl.
241d9cea 3936
2146fdeb
MV
3937 * strop.c (scm_substring_move_x): Store into str2, not str1.
3938
d4f76919
KR
39392004-08-20 Kevin Ryde <user42@zip.com.au>
3940
3941 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3942 to modify the input string.
3943
b5247a6b
MV
39442004-08-19 Marius Vollmer <mvo@zagadka.de>
3945
3946 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3947 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3948 scm_c_symbol_length.
3949
f26b9395
MV
39502004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3951
3952 New string implementation, with copy-on-write strings and
3953 mutation-sharing substrings, and a new internal string API.
3954 Symbols can now share memory with strings.
241d9cea 3955
f26b9395
MV
3956 * tags.h (scm_tc7_stringbuf): New tag.
3957
3958 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3959 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3960 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3961 uses.
3962 (scm_i_make_string, scm_c_make_string): New, to replace
3963 scm_allocate_string. Updated all uses.
3964 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3965 SCM_STRING_LENGTH): Deprecated.
3966 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3967 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3968 Discouraged. Replaced all uses with scm_from_locale_string or
3969 similar, as appropriate.
3970 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3971 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3972 scm_substring_shared, scm_substring_copy): New.
3973
3974 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3975 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3976 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3977 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3978 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3979 Deprecated.
3980 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3981 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3982 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3983 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3984 Updated all uses.
3985 (scm_gensym): Generate only the number suffix in the buffer, just
3986 string-append the prefix.
3987
3988 * error.c (scm_memory_error): Do not try to throw, just abort.
3989 Throwing will not work anyway.
3990
3991 * gh.h, gh-data.c (gh_set_substr): Made src const.
3992
3993 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3994 (scm_mode_bits): Use it.
3995 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3996 a vector normally and fill that instead of consing a list with a
3997 blocked GC.
3998
3999 * read.c (scm_i_casei_streq): New, for counted strings.
4000
4001 * threads.c (gc_section_count): Removed, thread-sleeping can not
4002 be nested.
4003 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
4004 admin mutex so that we can be put to sleep by other threads while
4005 blocking on that mutex. Lock all the heap mutex of all threads,
4006 including ourselves.
4007 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
4008 call scm_i_enter_guile.
4009 (scm_thread_mark_stacks): Expect all threads to be suspended.
241d9cea 4010
f26b9395
MV
4011 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
4012 scm_gc_mallocated, for now.
4013 (scm_init_storage): Initialize it.
4014 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
241d9cea 4015
f26b9395
MV
4016 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
4017 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
4018 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
4019 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
4020
cd505b38
MV
4021 * strop.c (scm_string_copy): Use scm_c_substring to get a
4022 copy-on-write string.
4023
8a807b26
KR
40242004-08-18 Kevin Ryde <user42@zip.com.au>
4025
4026 * arbiters.c (FETCH_STORE): New macro.
4027 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
4028 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
4029 scm_try_arbiter and scm_release_arbiter.
4030 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
4031 for speed on i386, otherwise using mutex.
4032
4033 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
4034 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
4035 exact and inexact is #f.)
4036
4037 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
4038 to get thread safety of scm_ttyname.
4039
4040 * ports.c (ttyname): Remove prototype, unused.
4041
d6cd4c36 4042 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 4043 Reported by Michael Tuexen.
d6cd4c36 4044
fa0c0a4b
MV
40452004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4046
4047 * load.c (scm_init_load_path): Do not pass NULL to
4048 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
4049 not set. Thanks to Bill Schottstaedt.
4050
70f7ee41
MV
40512004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4052
4053 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
4054 locale strings instead of accessing their internals.
4055 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
4056 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
4057 SCM_STRING_CHARS and SCM_STRING_LENGTH.
241d9cea 4058
70f7ee41
MV
4059 * simpos.c (scm_system): Convert SCM strings to locale strings
4060 instead of accessing their internals.
4061
4062 * script.c (scm_compile_shell_switches): Convert version to locale
4063 string before printing it.
4064
4065 * rdelim.c (scm_read_delimited_x): Avoid
4066 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
4067 of scm_from_long for the returned number of read characters.
4068
4069 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
4070 scm_i_mode_bits to avoid accessing internals of SCM string from C.
4071
4072 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
4073 Use them instead of SCM_SYSCALL when one or two strings need to be
4074 converted into locale strings.
4075 (my_rename): New, gathers platform dependent code for renaming.
4076 (scm_rename): Use it.
4077 (scm_readlink, scm_copy_file): Convert SCM strings to locale
4078 strings instead of accessing their internals.
4079 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
4080 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
4081 SCM_STRING_LENGTH.
241d9cea 4082
70f7ee41
MV
4083 * extensions.c (load_extension): Convert lib and init to locale
4084 strings instead of accessing the internals directly.
4085 (scm_c_load_extension): Use scm_from_locale_string instead of
4086 scm_makfrom0str.
241d9cea 4087
70f7ee41
MV
4088 * fports.h, fports.c (scm_i_fdes_to_port): New, like
4089 scm_fdes_to_port, but take mode bits directly instead of as a C
4090 string.
4091 (scm_i_fdes_to_port): Implement using above.
4092 (scm_open_file): Use scm_i_fdes_to_port together with
4093 scm_i_mode_bits to avoid accessing internals of SCM string from C.
4094 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
4095 with scm_i_mode_bits to avoid accessing internals of SCM string
4096 from C.
4097
4098 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
4099 SCM string as argument.
4100
4101 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
4102 bits directly instead of C string.
4103 (scm_void_port): Implement using above.
4104 (scm_sys_make_void_port): Use scm_i_void_port together with
4105 scm_i_mode_bits to avoid accessing internals of SCM string.
241d9cea 4106
70f7ee41
MV
4107 * strings.h, strings.c (scm_i_get_substring_spec): New.
4108
4109 * socket.c, rw.c, deprecated.h, validate.h
4110 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
4111 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
4112 scm_to_locale_string, etc.
4113 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
4114 above, plus scm_i_get_substring_spec.
241d9cea 4115
70f7ee41
MV
4116 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
4117 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
4118 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
4119 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
4120 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
4121 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
4122 with more explicit scm_remember_upto_here_1, etc, or introduced
4123 them in the first place.
4124
4125 * posix.c (WITH_STRING): New helper macro. Use it where one
4126 locale string is needed for a short piece of code.
4127 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
4128 when one locale string is needed.
4129 (scm_mkstemp): Convert tmpl to a locale string.
4130 (scm_putenv): Rewritten to use only C strings.
4131 (scm_setlocale, scm_crpt): Convert argument strings to locale
4132 strings.
241d9cea 4133
70f7ee41
MV
41342004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4135
4136 * load.c (scm_primitive_load_path): Do not check for absolute
4137 filenames when scm_sys_search_load_path returns false, which will
4138 return absolute filenames unchanged.
4139
bb26cc2d
MV
41402004-08-11 Marius Vollmer <mvo@zagadka.de>
4141
4142 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
4143 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
4144 of an alist. Thanks to Matthias Koeppe!
4145
02573e4c
MV
41462004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4147
4148 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
4149 Moved from string.h to deprecated.h.
4150
4151 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
4152
f9751e86 4153 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
4154 SCM_I_MAKE_STRING_TAG, changed all uses.
4155 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
4156 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
4157 respectively. For a short time, the old names are still there as
4158 aliases. Not all uses have been changed yet, but the ones in
4159 strings.c have.
4160 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
4161 SCM_T_BITS_MAX.
4162 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
4163 scm_take_locale_string, scm_take_locale_stringn,
4164 scm_to_locale_string, scm_to_locale_stringn,
4165 scm_to_locale_stringbuf): New.
4166 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
4167 deprecated.[hc]. Implemented in terms of the new functions above.
4168 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
4169 scm_makfrom0str): Reimplemented in terms of the new functions from
4170 above. They will be discouraged shortly.
4171 (scm_substring): Do not use scm_mem2string.
4172 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
4173 to replace similar code from posix.c, simpos.c, and dynl.c.
4174 (scm_string_append): Use memcpy instead of explicit loop. Do not
4175 use register keyword. Use plain 'char' instead of 'unsigned
4176 char'.
241d9cea 4177
02573e4c
MV
4178 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
4179 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
4180
4181 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
4182 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4183 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
4184 not as a pointer. Use scm_remember_upto_here_1 to protect it.
4185
4186 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
4187 string. This avoids a conversion round-trip.
4188
4189 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
4190 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4191 SCM_I_STRING_LENGTH, respectively.
4192 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
241d9cea 4193
02573e4c
MV
4194 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
4195 of a string, call scm_display on the string itself.
4196
4197 * dynwind.c, dynwind.h (scm_frame_free): New.
4198
4199 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
4200 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
4201 Replaced uses of SCM_STRING_CHARS with proper uses of
4202 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
4203 Replaced scm_mem2string with scm_from_locale_string.
4204
4205 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
4206 Removed, replaced all uses with scm_i_allocate_string_pointers.
4207
4208 * load.h, load.c (scm_internal_parse_path): Removed.
4209 (scm_parse_path): Use scm_string_split to do the work.
4210 (scm_init_load_path): Use scm_parse_path instead of
4211 scm_internal_parse_path.
4212 (scm_search_path): Rewritten string handling part of the code in
4213 terms of scm_to_locale_stringbuf and so that it is thread safe.
4214
4215 * error.c (scm_error_scm): Throw directly instead of calling
4216 scm_error, this avoids the back and forth conversion of SUBR and
4217 MESSAGE and also plugs a memory leak.
4218 (scm_error): Call scm_error_scm.
241d9cea 4219
02573e4c
MV
4220 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
4221 (display_header): Print FNAME when it is true, not
4222 merely when it is a string.
4223
4224 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
4225 unceremoniously. They were unused by Guile itself, and external
4226 use should stop immediately.
241d9cea 4227
02573e4c 4228
409eb4e5
MV
42292004-08-10 Marius Vollmer <mvo@zagadka.de>
4230
4231 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
4232 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
4233 deprecated versions installed in deprecated.h and deprecated.c.
4234 Changed all uses.
241d9cea 4235
a00eaf19
RB
42362004-08-06 Rob Browning <rlb@defaultvalue.org>
4237
4238 * net_db.c (scm_resolv_error): don't cause an exception while
4239 trying to throw an exception -- call scm_misc_error with correct
4240 arguments. The previous arguments needed a format escape that
4241 wasn't in any of the format strings.
4242
bcb88c93
KR
42432004-08-06 Kevin Ryde <user42@zip.com.au>
4244
8f094b97
KR
4245 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
4246 so as not to depend on signedness of plain char. For byvect range
4247 check, throw out-of-range rather than wrong-type-arg.
4248
bcb88c93
KR
4249 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
4250 signed byte range checks by using scm_to_schar and scm_from_schar,
4251 don't want to depend on signedness of C char.
4252
29e61124
KR
42532004-08-05 Kevin Ryde <user42@zip.com.au>
4254
4255 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
4256 SCM_DEFER_INTS.
4257 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
4258 guaranteed if multiple threads compete to unlock.
4259 Update docstrings per doc/ref/api-scheduling.texi.
4260
99de794f
KR
4261 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
4262 stat on the filename, to be certain a file rename can't mean we get
4263 info on one filesystem object but open another. This fstat usage is
4264 similar to Emacs copy-file.
241d9cea 4265
29e61124
KR
4266 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
4267
4268 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
4269 SIGINT and SIGQUIT, since those values are ints.
4270
759aa8f9
MV
42712004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4272
7241f213
MV
4273 * num2integral.i.c, num2float.i.c: Removed.
4274 * Makefile.am (noinst_HEADERS): Updated.
4275
f9656a9f
MV
4276 * numbers.h. numbers.c (scm_make_ratio): Renamed to
4277 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
4278 (scm_complex_p): New, export as "complex?" to Scheme.
4279 (scm_number_p): Export as "number?" to Scheme.
4280 (scm_is_complex, scm_is_number): New.
4281 (scm_c_make_rectangular, scm_c_make_polar): New.
4282 (scm_make_rectangular, scm_make_polar): Use above.
4283 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
4284 New.
4285 (scm_make_complex): Discouraged by moving to discouraged.h and
4286 discouraged.c. Replaced all uses with scm_c_make_rectangular.
241d9cea 4287
759aa8f9
MV
4288 * discouraged.h, discouraged.c, numbers.c, numbers.h
4289 (scm_is_rational): New.
4290 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
4291 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
4292 Removed prototypes.
4293 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
4294 Discouraged by moving to discouraged.h and discouraged.c.
4295 Replaced all uses with scm_from_double.
4296 (scm_num2float, scm_num2double): Discouraged by moving prototype
4297 to discouraged.h and rewriting in terms of scm_to_double.
4298 Replaced all uses with scm_to_double.
4299 (scm_to_double): Do not implement in terms of scm_num2dbl, use
4300 explicit code.
4301 (scm_from_double): Do not implement in terms of scm_make_real, use
4302 explicit code.
241d9cea 4303
531bf3e6
MV
43042004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4305
759aa8f9
MV
4306 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
4307
531bf3e6
MV
4308 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
4309 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
4310
4311 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
4312 Renamed to SCM_I_* in order to avoid collisions with the versions
4313 defined in deprecated.h.
4314
4315 * discouraged.h, discouraged.c: New files.
4316
4317 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
4318 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
4319 deprecated to being discouraged by moving to discouraged.h.
4320
4321 * numbers.h, numbers.c, discouraged.h, discouraged.c
4322 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
4323 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
4324 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
4325 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
4326 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
4327 scm_num2ulong_long): Discouraged by moving to discouraged.h and
4328 discouraged.c and reimplementing in terms of scm_from_* and
4329 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
4330 functions.
4331
4332 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
4333 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
4334 scm_i_size2big, scm_i_ptrdiff2big): Removed.
241d9cea 4335 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
531bf3e6
MV
4336 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4337 explicit code.
4338
5ec82e96
KR
43392004-08-02 Kevin Ryde <user42@zip.com.au>
4340
4341 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4342 and current usage and migration.
4343
58f28989
KR
43442004-07-31 Kevin Ryde <user42@zip.com.au>
4345
4346 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4347 it's not thread safe.
4348 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4349 advantage of this.
4350 * fports.c (scm_open_file): Use scm_strerror likewise.
4351 * filesys.c (scm_stat, scm_lstat): Ditto.
4352
4353 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4354 cannot be opened.
4355
4356 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4357 update, for thread safety.
4358 (gensym_counter): Move into scm_gensym which is its only user.
4359 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4360
03696aab
MV
43612004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4362
51fdb325
MV
4363 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4364 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4365 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4366 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4367 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4368 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4369 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4370 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4371 defined in terms of scm_to_signed_integer, etc, but in terms of
4372 scm_to_int8, etc.
4373
4374 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4375
03696aab
MV
4376 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4377 no longer used.
4378
4379 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4380 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4381
4382 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4383 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4384 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4385 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4386 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4387 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4388 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
241d9cea 4389
03696aab
MV
4390 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4391 the functions below.
4392
4393 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4394 conv-uinteger.i.c.
4395
4396 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4397 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4398 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4399 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4400 scm_from_uint64): Turned from macros into proper functions.
4401 (scm_to_signed_integer, scm_to_unsigned_integer,
4402 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4403 conv-integer.i.c and conv-uinteger.i.c, as well.
241d9cea 4404
03696aab
MV
4405 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4406 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4407 the limits. Those are always defined.
241d9cea 4408
1f15779e
KR
44092004-07-29 Kevin Ryde <user42@zip.com.au>
4410
4411 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4412
48360eb3
KR
44132004-07-28 Kevin Ryde <user42@zip.com.au>
4414
4415 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4416 safety.
4417
c3f3c841
KR
4418 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4419 consistency with other vector types and to get arg and func name into
4420 error message.
4421
c82f8ed6
MV
44222004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4423
4424 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4425 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4426 scm_from_bool, respectively.
4427 (SCM_NINUMP): Added.
241d9cea 4428
c82f8ed6
MV
4429 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4430 deprecated.h. Replaced all uses with scm_is_eq.
4431
317b4c4a
KR
44322004-07-24 Kevin Ryde <user42@zip.com.au>
4433
4434 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4435 * posix.c (scm_crypt): Use it to protect static data in crypt().
4436
e11e83f3
MV
44372004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4438
4439 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4440 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4441 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4442 versions to deprecated.h and deprecated.c. Changed all uses to
4443 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4444 scm_from_*, as appropriate.
4445
4446 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4447 the unexisting scm_cross_dynwind_binding_scope for inums on the
4448 windlist.
241d9cea 4449
a55c2b68
MV
44502004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4451
4452 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4453 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4454 byte-wise address to a SCM integer. Changed all uses.
4455 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4456 scm_to_ipv6 and added type and range checking, for converting from
4457 an IPv& byte-wise address to a SCM integer. Changed all uses.
4458 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4459 is now done by scm_to_ipv6.
241d9cea 4460
a55c2b68
MV
4461 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4462 not accept inexact integers.
4463
4464 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4465 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4466 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4467 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4468 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4469 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4470 fixnum/bignum distinction visible. Changed all uses to
4471 scm_to_size_t or similar.
4472
44732004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4474
4475 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4476
48a06bd5
KR
44772004-07-10 Kevin Ryde <user42@zip.com.au>
4478
4479 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4480 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4481 such a size causes divide-by-zeros in scm_hasher.
4482
052fbfd9
KR
4483 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4484 leak.
4485
43240c9c
MV
44862004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4487
4488 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4489 Rewritten using the same logic as scm_to_signed_integer and
4490 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4491 use CHAR_BIT instead of hardcoding 8.
4492 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4493 SCM_I_LLONG_MIN etc. instead.
241d9cea 4494
43240c9c
MV
4495 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4496 SCM_I_MAKINUM and changed all uses.
4497 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4498
a3de8e7b
MV
4499 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4500 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4501 them by assuming twos-complement.
4502
c9eb03bb
MV
45032004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4504
4505 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4506 configure now produces.
4507 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4508 definitions, giving the limits of the integer types defined by
4509 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4510 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4511
4512 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4513 SHORT_MIN.
4514 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4515 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4516 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4517 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4518 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4519 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4520 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4521 scm_from_uintmax): New.
241d9cea 4522
7888309b
MV
45232004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4524
4525 * tags.h (scm_is_eq): New.
4526
4527 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4528 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4529 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4530 scm_from_bool, and scm_is_bool, respectively.
4531
4532 * boolean.h (scm_is_bool): Fix bug in prototype.
4533 (scm_from_bool): The argument is "x" not "f", stupid.
4534
4535 * boolean.c (scm_is_bool): Fix typo.
4536
4537 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4538 scm_is_unsigned_integer, scm_to_signed_integer,
4539 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4540 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4541 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4542 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4543 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4544 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4545 New.
241d9cea 4546
800570a6
MV
45472004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4548
4549 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4550 scm_to_bool): New.
4551
9fcf3cbb
DH
45522004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4553
4554 * backtrace.c (display_expression, display_frame): Call
4555 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4556 single memoized expression.
4557
4558 * debug.c (memoized_print): Don't try to unmemoize the memoized
4559 object, since we can't know whether it holds a single expression
4560 or a body.
4561
4562 (scm_mem_to_proc): Removed check for lambda expression, since it
4563 was moot anyway. Whoever uses these functions for debugging
4564 purposes should know what they do: Creating invalid memoized code
4565 will cause crashes, independent of whether this check is present
4566 or not.
4567
4568 (scm_proc_to_mem): Take the closure's code as it is and don't
4569 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4570 memoized code should not be modified.
4571
4572 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4573 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4574 available as a guile internal function instead. However,
4575 scm_i_unmemoize_expr will only work on memoized objects that hold
4576 a single memoized expression. It won't work with bodies.
4577
4578 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4579 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4580 i. e. a list of expressions.
4581
4582 * eval.c (unmemoize_exprs): Drop internal body markers from the
4583 output during unmemoization.
4584
4585 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4586 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4587 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4588 as guile internal functions instead. scm_i_unmemoize_expr will
4589 only work on a single memoized expression, while
4590 scm_i_unmemocopy_body will only work on bodies.
4591
90df793f
DH
45922004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4593
4594 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4595
4596 (scm_cons_source, scm_primitive_eval): Prefer higher level
4597 predicate SCM_FALSEP over SCM_IMP.
4598
8048c00b
RB
45992004-06-15 Rob Browning <rlb@defaultvalue.org>
4600
4601 * script.c (scm_shell_usage): minor phrasing change.
4602
4603 * gc_os_dep.c: update ifdefery for macosx.
4604 (scm_get_stack_base): separate result initialization from
4605 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4606 3.3. Thanks to Andreas Vögele.
8048c00b 4607
d93294d4
HWN
46082004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4609
4610 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4611
212e58ed
DH
46122004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4613
4614 * list.[ch] (scm_i_finite_list_copy): New internal function to
4615 copy lists that are known to be finite (though not necessarily
4616 proper).
4617
4618 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4619 a closure's argument list like an expression of a body.
4620
4621 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4622 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4623 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4624 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4625 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
241d9cea 4626 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
212e58ed
DH
4627 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4628 unmemoize_builtin_macro): New static functions and symbols.
4629
4630 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4631 now has a slightly different meaning: The memoized form that is
4632 receives as its argument is now interpreted as a sequence of
4633 expressions from a body.
4634
4635 (unmemocar, scm_unmemocar): Since the whole functionality of
4636 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4637 has its old content back and is deprecated, while unmemocar has
4638 been removed.
4639
4640 (SCM_BIT7): Removed.
4641
4642 (CEVAL): For unmemoizing a single expression, call
4643 unmemoize_expression instead of scm_unmemocopy, which now expects
4644 a sequence of body expressions. Eliminated unnecessary empty
4645 environment frame when executing let* forms. Eliminated
4646 unmemoization step from evaluator.
4647
9ccea370
MV
46482004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4649
4650 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4651 macroexp and made static. Added new version of scm_macroexp that
4652 emits a deprecation warning and then calls macroexp.
4653 (scm_m_undefine): Issue deprecation warning.
241d9cea 4654
57d23e25
DH
46552004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4656
4657 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4658 Modified to make set! work on symbols that represent syntactic
4659 keywords.
4660
141521ad
HWN
46612004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4662
4663 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4664 compound expression as lvalue errors.
4665
7c2f56a4
MV
46662004-05-24 Marius Vollmer <mvo@zagadka.de>
4667
4668 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4669 WINDER_DATA to a SCM.
4670
366ecaec
DH
46712004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4672
4673 * goops.c (compute_getters_n_setters, create_standard_classes,
4674 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4675 lambda expression rather than creating them with scm_closure.
4676
26ecfa39
DH
46772004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4678
4679 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4680 misplaced syntactic keywords. This will not work unless guile's
4681 defmacro feature is deprecated.
4682
4683 (scm_m_case): Fixed a bug that caused the list of labels to grow
4684 with every case form.
4685
f865229a
KR
46862004-05-19 Kevin Ryde <user42@zip.com.au>
4687
4688 * numbers.c (scm_round_number): For inum and big, just return x. For
4689 real, use scm_round for 2^54-1 etc problems covered there.
4690
4691 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4692 doesn't provide trunc. This was for when `truncate' was done as a
4693 scm_tc7_dsubr, no longer required.
4694
4695 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4696 to stack marking call, two parameters and no cast on t->base.
4697
63947c7a
MV
46982004-05-18 Marius Vollmer <mvo@zagadka.de>
4699
4700 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4701 processed hashtables back into the weak_hashtables list. Thanks
4702 to Bill Schottstaedt!
4703
e7313a9d
DH
47042004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4705
4706 * eval.c (unmemoize_quote): New static function.
4707
4708 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4709 representation of 'quote' and '@slot-ref' to an improper list.
4710 This reduces execution time, the number of cells used to hold the
4711 memoized code, and thus also reduces garbage collection time.
4712
4713 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4714
4715 (SCM_CEVAL): Changed macro handling to also work with macros that
4716 return improper lists. Added an assertion, that the code returned
4717 by a macro transformer will not lead to cycles in the memoized
4718 code.
4719
e5156567
DH
47202004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4721
4722 No functional change, just rearrangements of functions within the
4723 file.
4724
4725 * eval.c (scm_ilookup, scm_unbound_variable_key,
4726 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4727 the definitions used for execution, since that's where they will
4728 belong to later.
4729
651f07f8
DH
47302004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4731
4732 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4733 throughout guile, has not been part of an official release yet,
4734 and the concept of sloppy predicates has never been a good idea.
4735
4736 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4737 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4738 Simplified.
4739
770e048f
DH
47402004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4741
4742 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4743 to make explicit what happens.
4744
2ff08405
DH
47452004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4746
4747 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4748 explicit what happens.
4749
4750 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4751 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4752
89afb9cd
MV
47532004-05-11 Marius Vollmer <mvo@zagadka.de>
4754
4755 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4756 is indeed a procedure when it isn't a number.
4757
3d5ebfa9
MV
47582004-05-10 Marius Vollmer <mvo@zagadka.de>
4759
4760 Convert floating point numbers into strings with an arbitrary
4761 radix. Thanks to Richard Todd!
241d9cea 4762
3d5ebfa9
MV
4763 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4764 fit.
4765 (fx): Removed.
4766 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4767 number_chars): New, to support variable radices.
4768 (idbl2str): Use above instead of the old base-10 only tables.
4769 (iflo2str): Pass on new RADIX argument to idbl2str.
4770 (scm_number_to_string): Pass radix to iflo2str.
4771 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4772 iflo2str.
4773 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4774 possible radices.
4775
3ae69bb4
KR
47762004-05-10 Kevin Ryde <user42@zip.com.au>
4777
4778 * numbers.c (scm_logbit_p): Correction to test above the end of an
4779 inum. Reported by Jan Konecny.
4780
27968825
MV
47812004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4782
4783 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4784 scm_t_bits. Updated all users.
4785 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4786 duplicating the code.
4787 (SCM_CELL_OBJECT_LOC): New.
4788 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4789 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4790
4791 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4792 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4793 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4794 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4795 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4796 SCM_SMOB_OBJECT_3_LOC): New.
4797 * smob.c (scm_i_set_smob_flags): New function.
4798
4799 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4800 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4801 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4802 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4803 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4804 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4805
4806 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4807 taking the address of SCM_CELL_WORD_1, the latter being no longer
4808 an lvalue.
4809
4810 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4811 of casting SCM_CELL_WORD_LOC.
4812
3cf17ef0
KR
48132004-05-02 Kevin Ryde <user42@zip.com.au>
4814
37026925 4815 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4816 --disable-deprecated. Reported by Andreas Vögele.
37026925 4817
3cf17ef0 4818 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4819 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4820
c5854598
KR
4821 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4822 code has support for. Fixes building with AIX cc, which is ansi but
4823 doesn't define __STDC__. Reported by Keith Crane.
4824 (var_start): Remove macro, this variation no longer required.
4825 (scm_list_n): Use va_start directly.
4826
f26c1a32
KR
48272004-05-01 Kevin Ryde <user42@zip.com.au>
4828
4829 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4830 is now gone. Reported by Andreas Vögele.
f26c1a32 4831
dfa6017e
KR
48322004-04-28 Kevin Ryde <user42@zip.com.au>
4833
4834 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4835 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4836 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4837 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4838 Also cast through unsigned char to avoid passing negatives to those
4839 macros if input contains 8-bit values.
4840
4841 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4842 corrections to range check for signed numbers. Remove
4843 scm_remember_upto_here_1(num) from these checks, since num is used
4844 subsequently anyway.
4845
4846 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4847 avoid warning from gcc 3.4. Reported by Hyperdivision.
241d9cea 4848
dfa6017e
KR
4849 * numbers.c (scm_bit_extract): Use min instead of MIN.
4850 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4851 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4852
4853 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4854 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4855
a0d06a00 4856 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4857 Reported by Andreas Vögele.
a0d06a00 4858
dfa6017e
KR
4859 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4860 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4861 by Andreas Vögele.
dfa6017e 4862
36245b66
DH
48632004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4864
4865 * eval.c (s_macro_keyword): New static identifier.
4866
4867 (scm_m_define): Change order to first create binding and
4868 evaluating the expression afterwards.
4869
4870 (scm_m_set_x): Memoize complete set! expression. Only leave
4871 symbols if no binding exists at memoization time. Throw error if
4872 assigning to a syntactic keyword.
4873
4874 (lazy_memoize_variable): New function.
4875
4876 (CEVAL): When execution set!, perform lazy memoization if
4877 unmemoized symbol is detected.
4878
4879 * modules.c (module_variable): Return variables with unbound
4880 value.
4881
4882 * tags.h: Fix comment.
4883
4d81111e
KR
48842004-04-25 Kevin Ryde <user42@zip.com.au>
4885
da8bcb2f
KR
4886 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4887 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4888 in 8-bit locales, and ensures consistency with char-upper-case? and
4889 char-lower-case? which already use ctype.h.
4890 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4891 Remove.
4892 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4893
4d81111e
KR
4894 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4895 call. Reported by Hyperdivision.
4896
4897 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4898 Reported by Hyperdivision.
4899
4900 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4901 Hyperdivision.
4902
7e6e6b37
DH
49032004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4904
4905 Hide the implementation of ilocs and isyms in eval.c.
4906
4907 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4908 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4909 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4910 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4911 eval.h to eval.c.
4912
4913 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4914 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4915 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4916 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4917 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4918 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4919 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4920 renamed to ISYMNUM.
4921
4922 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4923 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4924 Extracted printing of ilocs and isyms to guile internal functions
4925 scm_i_print_iloc, scm_i_print_isym of eval.c.
4926
caab294f
KR
49272004-04-22 Kevin Ryde <user42@zip.com.au>
4928
7aaf4758
KR
4929 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4930
caab294f
KR
4931 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4932 rounding in x+0.5 when x is a big value already an integer. In
4933 certain hardware rounding cases x+0.5 can give an adjacent integer,
4934 leading to that as the result, when we really just wanted x itself.
241d9cea 4935
b1cb24ff
DH
49362004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4937
4938 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4939
4940 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4941 added const qualifiers, cast intentionally unused expressions to
4942 void for emphasis, improved comment.
4943
5065b40d
DH
49442004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4945
4946 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4947 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4948 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4949 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4950 Defined the tc8-tag for flags to be 0x04, which will mean that
4951 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4952 to the reduced number of bits and the simpler bit pattern for
4953 SCM_BOOL_F, certain machines may be able to use more efficient
4954 processor instructions to deal with SCM_BOOL_F.
4955
4956 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4957 never been defined in a released version, thus no need to
4958 deprecate them.
4959
4960 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4961 instead of tc9 tags.
4962
4963 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4964 of tc9 tags.
4965
4966 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4967 could have used this definition.
4968
4969 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4970 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4971 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4972 as isyms, as special isyms don't exist any more.
4973
9fa6c119
KR
49742004-04-18 Kevin Ryde <user42@zip.com.au>
4975
e08d2eee
KR
4976 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4977 safety.
4978
9fa6c119
KR
4979 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4980 explicit swapping code.
4981
c9cdd396
KR
49822004-04-15 Kevin Ryde <user42@zip.com.au>
4983
4984 * cpp_sig_symbols.in: Add SIGSYS.
241d9cea 4985
c9cdd396
KR
4986 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4987 recursion.
4988
4989 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4990 frac/big and frac/frac, use scm_less_p for exact comparison.
4991
83ac9c59
KR
4992 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4993 with big/inum.
4994
84a4be9a
KR
4995 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4996
84fad130
HWN
49972004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4998
6b69393d
HWN
4999 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
5000
84fad130 5001 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
241d9cea 5002 scm_c_{up,down}case.
84fad130 5003 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
241d9cea 5004 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
84fad130 5005
c3110a30
KR
50062004-04-06 Kevin Ryde <user42@zip.com.au>
5007
0b288f36
KR
5008 * numbers.c (scm_ash): Remove stray "}" in docstring.
5009
ea2508c8
KR
5010 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
5011 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
5012 calling mpz_cmp_ui in most cases.
5013
c3110a30
KR
5014 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
5015 for big == abs(most-negative-fixnum) special case.
5016 (abs_most_negative_fixnum): Remove, no longer used.
5017
5018 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
5019 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
5020 calling (sigaction NSIG).
5021
5022 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
5023 and fork error cases to do this.
5024
dec40cd2
DH
50252004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5026
5027 * eval.c (CEVAL): Don't distinguish between short and long
5028 instructions when dispatching - just always dispatch on the
5029 instruction code, which is common for short and long instructions.
5030 Further, removed unnecessary goto statements and added comment.
5031
0e7bb795
DH
50322004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5033
5034 * eval.c (scm_unmemocopy): Don't distinguish between short and
5035 long instructions when dispatching - just always dispatch on the
5036 instruction code, which is common for short and long instructions.
5037 Further, removed unnecessary goto statements, fixed indentation
5038 and replaced SCM_IMP predicates by SCM_NULLP.
5039
f9986767
DH
50402004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5041
5042 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
5043 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
5044 'checkmacro'.
5045
fbc42231
KR
50462004-03-31 Kevin Ryde <user42@zip.com.au>
5047
5048 * simpos.c: Include <signal.h> for SIG_IGN and friends.
5049
434f2f7a
DH
50502004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5051
5052 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
5053 SCM_DEBUGGINGP:
5054
5055 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
5056 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
5057 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
5058 single interface that also matches the naming conventions.
5059 Probably scm_debug_mode_p should be part of the private interface
5060 anyway.
5061
5062 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
5063 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
5064 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
5065 to scm_debug_mode_p.
5066
5067
5068 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
5069
5070 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
5071 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
5072 from debug.h to eval.h.
5073
5074 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
5075 more, just leave it with setting scm_debug_mode_p, which is
5076 equivalent for practical purposes.
5077
5078 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
5079 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
5080
5081 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
5082
5083 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
5084 static and renamed it to ceval throughout. Provide a new exported
5085 but deprecated function scm_ceval as a wrapper for backwards
5086 compatibility. The same is done for the deval/scm_deval pair of
5087 functions.
5088
5089 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
5090 throughout. Defined CEVAL to ceval or deval, based on compilation
5091 phase.
5092
5093 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
5094 to ceval and deval instead of calling *scm_ceval_ptr.
5095
5096 * eval.c (dispatching_eval): New deprecated static function.
5097
5098 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
5099 to emulate its old behaviour as closely as possible.
5100
5101
5102 Change the evaluator such that only expressions for which pair? is
5103 true are passed to CEVAL, and such that all other expressions are
5104 evaluated outside of CEVAL:
5105
5106 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
5107 expression that is assumed to be memoized already. All but
5108 expressions of the form '(<form> <form> ...)' are evaluated inline
5109 without calling an evaluator.
5110
5111 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
5112 expressions of the form '(<form> <form> ...)' inline without
5113 calling an evaluator.
5114
5115 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
5116 the special case of unmemoized symbols passed on the top level.
5117
5118 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
5119 is known that the expression passed to CEVAL is of the form
5120 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
5121 now it is known that the input expression of CEVAL is a pair.
5122
51232004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
5124
5125 * eval.c (is_self_quoting_p): New static function.
5126
5127 (scm_m_quote): Use is_self_quoting_p.
5128
5129 (copy_tree): Corrected typo in comment.
5130
702551e6
HWN
51312004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
5132
bfefbf18
HWN
5133 * eval.c (s_scm_copy_tree): idem.
5134
5135 * list.c (s_scm_filter): remove "pointer" from doc string.
5136
702551e6
HWN
5137 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
5138
5139 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
5140
5141 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
5142 (display_frame): idem.
5143 (display_backtrace_file_and_line): idem.
5144
5145 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
5146 arguments.
5147
3cd23214
KR
51482004-03-26 Kevin Ryde <user42@zip.com.au>
5149
88a7ae1f
KR
5150 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
5151
3cd23214
KR
5152 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
5153 big==0 since that never occurs.
5154
5155 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
5156 scm_modular_expt, matching scheme level name `modulo-expt'.
5157
5158 * numbers.c (scm_modular_expt): Return a negative remainder for a
5159 negative divisor, the same as `modulo' does.
5160
51612004-03-26 Eric Hanchrow <offby1@blarg.net>
5162
5163 * numbers.c, numbers.h (scm_modular_expt): New function.
5164
2926035a
KR
51652004-03-25 Kevin Ryde <user42@zip.com.au>
5166
5167 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
5168 return inexact as required by r5rs.
5169
62360b89
DH
51702004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5171
5172 * eval.c: Separated some definitions relevant for execution from
5173 the memoization part of the file.
5174
5175 (copy_tree): New static function
5176
5177 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
5178 structures are detected now and will lead to an exception instead
5179 of forcing guile to run in an endless loop, using up all the
5180 system's memory. Second, arrays in the cdr of an improper list
5181 are now copied. See the new test cases in eval.test.
5182
51832004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
5184
5185 * posix.c (scm_gethostname): Make sure len is initialised before
5186 it is used. Restructured to (hopefully) represent possible
5187 configurations more clearly in the code. Added unwind handler.
5188
3bd3bae8
KR
51892004-03-23 Kevin Ryde <user42@zip.com.au>
5190
5191 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
5192 MAXHOSTNAMELEN when available.
5193
254bf78d
MV
51942004-03-21 Marius Vollmer <mvo@zagadka.de>
5195
5196 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
5197 terminator. Rewritten the logic as a state machine, I must have
5198 been doing too much VHDL lately...
5199
5200 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
5201 themselves. Thanks to Han-Wen Nienhuys!
5202
5203 * list.c: Changed docstrings so that they no longer talk about
5204 returning 'pointers' to something.
5205
009c34a2
HWN
52062004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5207
5208 * gc.c: remove set_debug_cell_accesses! when
5209 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
5210 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
5211 debugging conditionally.
241d9cea 5212
54733c95
KR
52132004-03-21 Kevin Ryde <user42@zip.com.au>
5214
5215 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
5216
bbaf8747
KR
52172004-03-20 Kevin Ryde <user42@zip.com.au>
5218
5219 * posix.c (scm_gethostname): Preserve errno across free() call.
5220
726f82e7
HWN
52212004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
5222
5223 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
5224 free cells.
5225
e1350d6a
KR
52262004-03-14 Kevin Ryde <user42@zip.com.au>
5227
5228 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
5229 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
5230
62055253
KR
52312004-03-07 Kevin Ryde <user42@zip.com.au>
5232
5233 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
5234 than "GMT" always.
5235 (filltime): Make zname parameter "const".
5236
92e64b87
MD
52372004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
5238
5239 * threads.c, threads.h (scm_c_scm2thread): New function.
5240
004ad931
KR
52412004-02-29 Kevin Ryde <user42@zip.com.au>
5242
5243 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
5244 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
5245 particular don't assume "defined (__alpha__) && ! defined (linux)"
5246 means OSF. Remove "SCO" code, which was not really SCO specific and
5247 which John W. Eaton advises should be long past being needed.
5248
5249 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
5250 error throw.
5251
72ea45ac
KR
52522004-02-24 Kevin Ryde <user42@zip.com.au>
5253
5254 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
5255
2af0602e
KR
52562004-02-22 Kevin Ryde <user42@zip.com.au>
5257
5258 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
5259 complex, same as for two args. (Handle only inum, big, real, frac).
5260
b114eafe
KR
52612004-02-21 Kevin Ryde <user42@zip.com.au>
5262
5263 * posix.c (scm_crypt): Use new HAVE_CRYPT.
5264 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 5265 Reported by Andreas Voegele.
b114eafe 5266
1e55d288
NJ
52672004-02-20 Neil Jerram <neil@ossau.uklinux.net>
5268
5269 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
5270 validation.
5271
5272 * read.c (scm_lreadparen): Removed.
5273 (scm_lreadparen1): Renamed scm_i_lreadparen.
5274
eb741d98
HWN
52752004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5276
5277 * list.c (scm_list_n): validate non-immediate arguments;
5278 this will catch forgotten a SCM_UNDEFINED.
5279
4e28ba5e
MV
52802004-02-18 Marius Vollmer <mvo@zagadka.de>
5281
5282 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
5283 Thanks to Bill Schottstaedt!
241d9cea 5284
4e28ba5e
MV
5285 * socket.h (scm_gethost): Removed prototype it is already in
5286 "net_db.h". Thanks to Bill Schottstaedt!
241d9cea 5287
ef861ead
KR
52882004-02-18 Kevin Ryde <user42@zip.com.au>
5289
5290 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
5291 order parameter to mpz_import, in fact with just one word there's no
5292 order to worry about at all.
5293
5294 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
5295 and frac==complex, make an exact comparison rather than converting
5296 with fraction2double.
5297
5298 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
5299 shared library, since environ is not directly available there.
5300
5301 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
5302 standard.
5303
5304 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
5305 errno EINVAL in case localtime and gmtime don't set it.
5306 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
5307 SCM_SYSERROR, since mktime and strptime generally don't set errno.
5308
ae43d08e 53092004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 5310
c9ea6462
KR
5311 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
5312 which were permitted in the past for these.
5313
292dfa7f
KR
5314 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
5315 previous change to numbers.c.
5316
ae43d08e
KR
5317 * script.c (scm_shell_usage): Print bug-guile email address, as per
5318 GNU standard. Reported by Han-Wen Nienhuys.
5319
711a9fd7
MD
53202004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5321
5322 * unif.c (scm_make_uve): Removed local variable and simplified
5323 code in order to avoid compiler used uninitialized warnings.
5324
5325 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
5326 scm_hash_map.
5327 (scm_hash_fold): Use scm_call_3 directly in the call to
5328 scm_internal_hash_fold instead of going via fold_proc (which is
5329 now removed).
5330 (scm_hash_for_each): Use a trampoline +
5331 scm_internal_hash_for_each_handle.
5332 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
5333 functions.
5334
3da7f6b2
KR
53352004-02-12 Kevin Ryde <user42@zip.com.au>
5336
344a212f
KR
5337 * ports.c (scm_port_line): In docstring, note first line is 0.
5338 (scm_set_port_line_x): In docstring, note first line is 0.
5339 (scm_port_column): In docstring, there's no default to current input
5340 port, and remove shared port-line @defun.
5341 (scm_set_port_column_x): In docstring, there's no default to current
5342 input port, note first column is 0, remove shared set-port-line!
5343 @defun.
5344
3da7f6b2
KR
5345 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5346 convert args the same way that array-set! does.
5347
5348 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5349 for dvect.
5350 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5351 for "l" not "s", fix dvect to be false for singp(prot) since such a
5352 value is for fvect.
5353 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5354 (exactly_one_third): New variable.
5355 (scm_init_unif): Initialize it.
3da7f6b2 5356
cd21f5eb
NJ
53572004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5358
5359 * read.c (scm_read_opts): Change `escaped-parens' to
5360 `elisp-strings'.
5361
16353acc
NJ
53622004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5363
5364 * read.c (scm_read_opts): New opts `elisp-vectors' and
5365 `escaped-parens'.
5366 (s_vector): New.
5367 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5368 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5369 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5370 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5371 `escaped-parens' option set.
5372 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5373 in tokens.
5374 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5375 (scm_lreadparen1): New.
5376
5377 * read.h: Remove conditionally compiled last arg to
5378 scm_lreadparen.
5379 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
241d9cea 5380
f62b9dff
HWN
53812004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5382
5383 * eval.c (m_expand_body): remove stray variable new_body.
5384
ef5b6b61
MV
53852004-01-22 Marius Vollmer <mvo@zagadka.de>
5386
5387 * eval.c (m_expand_body): Rewrite the expression in place (by
5388 overwriting FORMS) also when a letrec is constructed, not only
5389 when no definitions are found. Do not return rewritten expression
5390 to emphasize the in-place rewriting. Changed all users.
5391
7eec4c37
HWN
53922004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5393
5394 * gc.c: add protected_object_count, a number that is dumped from
5395 gc_stats()
5396
25ffbdac
MV
53972004-01-11 Marius Vollmer <mvo@zagadka.de>
5398
5399 * dynwind.h, dynwind.c (scm_frame_unwind,
5400 scm_frame_unwind_handler): Renamed and changed all uses.
5401 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
241d9cea 5402
08568c95
KR
54032004-01-11 Kevin Ryde <user42@zip.com.au>
5404
5405 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5406 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5407 changes made to scheme-compound.texi.
5408
5565749c
MV
54092004-01-10 Marius Vollmer <mvo@zagadka.de>
5410
25ffbdac
MV
5411 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5412 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5413
5414 * guile-snarf.in: Use mkdir to create a unique temporary directory
5415 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5416
fc6bb283
MV
54172004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5418
7ebccde8
MV
5419 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5420 argument since it is always zero now. Changed all callers.
5421 Removed code for handling fluids.
96e3b2f8
MV
5422
5423 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5424 the wind chain explicitely. Use scm_c_with_fluid for the common
5425 case of only one fluid.
5426 (scm_with_fluid): New.
5427 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
241d9cea 5428
fc6bb283 5429 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5430 (scm_with_fluid): New.
5431 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5432
5433 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5434 do the unwinding directly. It is simple enough.
241d9cea 5435
fc6bb283
MV
5436 * dynwind.h, dynwind.c: Did the following renamings:
5437 scm_begin_frame -> scm_frame_begin,
5438 scm_end_frame -> scm_frame_end,
5439 scm_on_unwind -> scm_frame_unwind,
5440 scm_on_rewind -> scm_frame_rewind,
5441 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5442 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5443 Changed all uses.
5444
5445 * aync.h, async.c: Did the follwing renamings:
5446 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5447 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5448 Changed all uses.
241d9cea 5449
fc6bb283
MV
5450 * ports.h, ports.c: Did the follwing renamings:
5451 scm_with_current_input_port -> scm_frame_current_input_port,
5452 scm_with_current_output_port -> scm_frame_current_output_port,
5453 scm_with_current_error_port -> scm_frame_current_error_port.
5454 Changed all uses.
5455
298ab996
KR
54562004-01-07 Kevin Ryde <user42@zip.com.au>
5457
5458 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5459 Reported by Richard Todd.
5460
ba40113e
KR
5461 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5462 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5463
298ab996
KR
5464 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5465 traversing the args list, fixes segv if an improper list is given.
5466 Reported by Rouben Rostamian.
5467
aacff585
MV
54682004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5469
5470 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5471 swap_data on stack, use a 'malloc obj'.
5472
5473 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5474 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5475 scm_i_... since they are internal. Changed all uses.
5476
5477 * dynwind.c (frame_print): Removed, use the default printer.
5478 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5479 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5480 to protect SCM values.
241d9cea 5481
aacff585
MV
5482 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5483 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5484 Changed all uses.
5485 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
241d9cea 5486
49c00ecc
MV
54872004-01-05 Marius Vollmer <mvo@zagadka.de>
5488
5489 * ports.h, ports.c (scm_with_current_input_port,
5490 scm_with_current_output_port, scm_with_current_error_port): New.
5491
5492 * async.h, async.c (scm_with_blocked_asyncs,
5493 scm_with_unblocked_asyncs): New.
5494
dab514a8
MV
54952004-01-03 Marius Vollmer <mvo@zagadka.de>
5496
5497 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5498 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5499 New.
5500 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5501 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5502 function when the outermost wind point has been reached. The
5503 latter is used to copy a continuation stack at the right time.
5504 scm_dowinds remains available.
5505 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5506 tc16_guard, guards_print): Removed.
5507 (scm_internal_dynamic_wind): Reimplemented using frames.
5508
5509 * continuations.c (copy_stack): New, do only the stack copying
5510 part of copy_stack_and_call.
5511 (copy_stack_and_call): Copy the stack after unwinding and before
5512 rewinding.
5513 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5514 copy_stack_and_call.
241d9cea 5515
441a25d9
KR
55162004-01-04 Kevin Ryde <user42@zip.com.au>
5517
5518 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5519 can give bad results due to rounding.
241d9cea 5520
e0499207
KR
5521 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5522 setzone/restorezone protection for DOS.
5523
89fcf1b4
MV
55242003-12-26 Marius Vollmer <mvo@zagadka.de>
5525
5526 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5527 and scm_t_uintmax to be defined in scmconfig.h
5528
caff34d4
KR
55292003-12-03 Kevin Ryde <user42@zip.com.au>
5530
5531 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5532
5533 * numbers.c (scm_make_ratio): Check for numerator equal to
5534 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5535 giving integer -1.
5536
5537 * numbers.c (scm_real_part): Return fraction unchanged rather than
5538 converting to flonum.
5539
2d0b85ac
DH
55402003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5541
5542 * modules.c (module_variable): Fixed (and thus simplified) the
5543 definition of SCM_BOUND_THING_P to reflect the fact that since
5544 after the 1.4 series of guile, obarrays only hold variable
5545 objects.
5546
2297981d
MV
55472003-11-30 Marius Vollmer <mvo@zagadka.de>
5548
5549 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5550
5551 From Paul Jarc:
5552
5553 * read.c (scm_lreadr): Signal an error for invalid escape
5554 sequences in strings. Code cleanups too.
5555
5556 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5557 writing control characters in strings.
5558
55592003-11-21 Marius Vollmer <mvo@zagadka.de>
5560
5561 * ports.c (scm_drain_input): Bug fix: only access the port after
5562 checking that it indeed is one.
5563
5c264007
DH
55642003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5565
5566 * eval.c (s_bad_define): New static identifier.
5567
5568 (m_body): Fixed comment.
5569
5570 (scm_m_define): Don't generate memoized code for definitions that
5571 are not on the top level. As a consequence, no memoized code at
5572 all is generated for definitions any more: Top level definitions
5573 are executed immediately during memoization and internal
5574 definitions are handled separately in m_expand_body.
5575
5576 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5577 definitions. Consequently, there is no unmemoizing code any more
5578 that might modify the environment. Thus, the old scm_unmemocopy
5579 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5580
5581 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5582 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5583 over SCM_NIMP in places, where the argument is known to be part of
5584 a proper list.
5585
018d4730
KR
55862003-11-21 Kevin Ryde <user42@zip.com.au>
5587
5588 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5589 for bignums.
5590
5591 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5592 to share some shifting.
5593
5594 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5595 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5596 since gc does this.
5597
4bca30d8
MV
55982003-11-19 Marius Vollmer <mvo@zagadka.de>
5599
fb16d26e
MV
5600 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5601 structure. Previously, not all cases with a negative denominator
5602 were covered.
5603
4bca30d8
MV
5604 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5605 scm_divide2real when forming the fractional part. This allows
5606 "#e1.2" to yield 6/5.
5607
5608 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5609 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5610 fractions were equal to each other regardless of value. Ooops.
5611
5612 * numbers.c (scm_rationalize): Return an inexact result when given
5613 inexact arguments.
5614
5615 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5616 non-numbers.
5617
bdf26b60
MV
56182003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5619
5620 Support for exact fractions from Bill Schottstaedt! Thanks!
241d9cea 5621
bdf26b60
MV
5622 * print.c (scm_iprin1): Handle fractions.
5623
5624 * objects.h (scm_class_fraction): New.
241d9cea 5625 * objects.c (scm_class_fraction): New.
bdf26b60 5626 (scm_class_of): Handle fractions.
241d9cea 5627
bdf26b60
MV
5628 * hash.c (scm_hasher): Handle fractions.
5629
5630 * numbers.c: New code for handling fraction all over the place.
5631 (scm_odd_p, scm_even_p): Handle inexact integers.
5632 (scm_rational_p): New function, same as scm_real_p.
5633 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5634 New exact functions that replace the inexact 'dsubr'
5635 implementations.
5636 (scm_numerator, scm_denominator): New.
5637
5638 * numbers.h (SCM_NUMP): Recognize fractions.
5639 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5640 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5641 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5642 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5643 SCM_FRACTION_REDUCED): New.
5644 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5645 New prototypes.
5646 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5647 scm_rational_p): New prototypes.
5648 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5649 scm_i_print_fraction): New prototypes.
241d9cea 5650
bdf26b60
MV
5651 * goops.c (create_standard_classes): Create "<fraction>" class.
5652
5653 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5654
5655 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5656 case in the switch, but do nothing for now.
5657
5658 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5659 to doubles when calling 'dsubr' functions.
5660
5661 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5662
28fda544
RB
56632003-11-18 Rob Browning <rlb@defaultvalue.org>
5664
5665 * gen-scmconfig.c (main): remove public definition of
5666 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5667 direct typedef of long_long and ulong_long inside deprecated block
5668 when appropriate.
5669
5670 * deprecated.h: move long_long and ulong_long definitions to
5671 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5672 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5673
b58e7420
MV
56742003-11-17 Marius Vollmer <mvo@zagadka.de>
5675
9a1d7d7c
MV
5676 * hash.c (scm_string_hash): New hashing algorithm that takes the
5677 complete string into account.
5678
b58e7420
MV
5679 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5680 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5681 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5682 SCM_ASSYNT.
b58e7420
MV
5683
5684 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5685 the "-e" option instead of scm_str2symbol. This allows things
5686 like (@ ...) to be specified for the entry point.
5687
461bffb1
DH
56882003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5689
5690 * eval.c (scm_m_letstar): Create memoized code in place to
5691 minimize consing.
5692
6f81708a
DH
56932003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5694
5695 * eval.c (s_splicing): Commented and reformulated.
5696
5697 (lookup_global_symbol, lookup_symbol): New static functions.
5698
5699 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5700
5701 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5702 creating a temporary pair for scm_lookupcar.
5703
5704 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5705 created deprecated wrapper function scm_unmemocar.
5706
5707 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5708 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5709 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5710 undefineds, sym_three_question_marks): Moved around without
5711 modifications.
5712
5713 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5714
910b5125
DH
57152003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5716
5717 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5718 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5719 No further modifications.
5720
c86c440b
DH
57212003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5722
5723 * eval.c (s_mixed_body_forms): New static identifier.
5724
5725 (canonicalize_define, scm_m_define): The check for a bad
5726 expression is performed in canonicalize_define now.
5727
5728 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5729 static helper functions for m_expand_body.
5730
5731 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5732 expand user defined macros. Fixed handling of the definition/
5733 expression boundary. Fixed handling of definitions grouped with
5734 'begin. Use canonicalize_define to expand definitions.
5735
3890131a
MV
57362003-11-13 Marius Vollmer <mvo@zagadka.de>
5737
b58e7420
MV
5738 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5739 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5740
5df36eac
MV
5741 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5742 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5743 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5744 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5745 New macros from Paul Jarc. Thanks!
5746
3890131a
MV
5747 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5748 return NULL when the machine type is unknown. Previously,
5749 gc_os_dep.c would refuse to compile.
5750
430b8401
DH
57512003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5752
5753 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5754 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5755 scm_m_body to m_body.
5756
328dc9a3
DH
57572003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5758
5759 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5760 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5761 scm_m_expand_body to m_expand_body and made it static. Added
5762 deprecated wrapper scm_m_expand_body.
5763
5764 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5765 of scm_m_expand_body.
5766
c2337a61
KR
57672003-11-09 Kevin Ryde <user42@zip.com.au>
5768
5769 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5770 argument. Reported by Mike Gran.
5771
ced8edb0
DH
57722003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5773
5774 * eval.c (s_missing_body_expression): New static identifier.
5775
5776 (s_body): Removed.
5777
5778 (scm_m_expand_body): Fixed core dump when passing a body with
5779 defines, but without expressions (see additions to syntax.test).
5780 Use ASSERT_SYNTAX to signal syntax errors.
5781
0f572ba7
DH
57822003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5783
5784 * eval.c (canonicalize_define): New static helper function.
5785
5786 (memoize_define, canonicalize_define): Extract handling of
5787 function currying to canonicalize_define.
5788
2510c810
DH
57892003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5790
5791 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5792 Make sure that error checking in debug mode is not worse than in
5793 standard mode.
5794
34adf7ea
DH
57952003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5796
5797 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5798 handled in scm_m_body any more, but rather in scm_m_lambda.
5799
5800 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5801 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5802 calling functions of scm_m_body.
5803
5804 (scm_m_lambda): Avoid unnecessary consing when creating the
5805 memoized code.
5806
89bff2fc
DH
58072003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5808
5809 * eval.c (s_expression): Added comment.
5810
5811 (s_empty_combination, error_unbound_variable): New static
5812 identifiers.
5813
5814 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5815 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5816 signal syntax errors.
5817
5818 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5819 scheme objects.
5820
60a49842
DH
58212003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5822
5823 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5824 Grouped together with unmemocopy, without modifications.
5825
5826 (build_binding_list, unmemocopy): Renamed names of list arguments
5827 and variables to reflect the actual order of the list elements.
5828
70c1c108
DH
58292003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5830
5831 * eval.c (s_defun): New static identifier.
5832
5833 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5834 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5835 when creating the memoized code.
5836
0ee39677
KR
58372003-10-19 Kevin Ryde <user42@zip.com.au>
5838
5839 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5840
5841 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5842 in accordance with R5RS, which just mpz_get_d doesn't really give.
5843
9a848baf
DH
58442003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5845
5846 * eval.c (s_bad_slot_number): New static identifier.
5847
5848 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5849 signal syntax errors. Avoid unnecessary consing when creating the
5850 memoized code.
5851
da48db62
DH
58522003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5853
5854 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5855 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5856 errors. Avoid unnecessary consing when creating the memoized
5857 code.
5858
5859 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5860 standard case. Make sure line and file information are copied to
5861 every created expression.
5862
82b3e2c6
DH
58632003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5864
5865 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5866 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5867 when creating the memoized code.
5868
5869 (scm_m_atbind): Reversed the order, in which the init expressions
5870 are stored and executed. The order of execution is now equal to
5871 the order in which the initializers of the let-forms are executed.
5872 Use check_bindings and transform_bindings.
5873
5874 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5875 !SCM_NULLP. Added some comments.
5876
21628685
DH
58772003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5878
5879 * eval.c: Sorted include files alphabetically.
5880
5881 (scm_m_begin): Added comment.
5882
5883 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5884 unnecessary consing when creating the memoized code.
5885
5886 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5887 syntax errors. Be more specific about the kind of error that was
5888 detected.
5889
5890 (scm_m_quote, unmemocopy): As an optimization, vector constants
5891 are now inserted unquoted into the memoized code. During
5892 unmemoization the quotes are added again to provide syntactically
5893 correct code.
5894
d6754c23
DH
58952003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5896
5897 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5898 scm_m_expand_body, check_bindings): Extracted syntax checking of
5899 bindings to new static function check_bindings.
5900
5901 (scm_m_let, memoize_named_let): Extracted handling of named let to
5902 new static function memoize_named_let.
5903
5904 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5905 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5906 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5907 unnecessary consing when creating the memoized code.
5908
03a3e941
DH
59092003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5910
5911 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5912 static identifiers.
5913
5914 (s_clauses, s_formals, s_duplicate_formals): Removed.
5915
5916 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5917 specific about the kind of error that was detected. Prepare for
5918 easier integration of changes for separated memoization.
5919
da48db62 59202003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5921
5922 * eval.c (s_duplicate_binding): New static identifier.
5923
5924 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5925
5926 (scm_m_define): Added comment about how we check for duplicate
5927 formals.
5928
5929 (scm_m_do): Added check for duplicate bindings.
5930
5931 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5932 unnecessary consing when creating the memoized code.
5933
5934 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5935 scm_c_improper_memq to c_improper_memq, since it is not exported.
5936
5937 (transform_bindings): Call scm_c_memq rather than
5938 scm_c_improper_memq.
5939
5940 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5941
da48db62 59422003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5943
5944 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5945 static identifiers.
5946
5947 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5948 specific about the kind of error that was detected. Avoid use of
5949 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5950 code, this way also making sure that file name, line number
5951 information etc. remain available.
5952
da48db62 59532003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5954
5955 * eval.c (memoize_as_thunk_prototype): New static function.
5956
5957 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5958 Avoid unnecessary consing when creating the memoized code.
5959
9b9a35b6
KR
59602003-10-12 Kevin Ryde <user42@zip.com.au>
5961
5962 * list.c (scm_append): Track argument number and use in error.
5963
cc56ba80
DH
59642003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5965
5966 * eval.c (s_missing_expression, s_bad_variable): New static
5967 identifiers.
5968
5969 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5970 R5RS terminology for the naming of variables. Be more specific
5971 about the kind of error that was detected. Make sure file name,
5972 line number etc. are added to all freshly created expressions.
5973 Avoid unnecessary consing when creating the memoized code.
5974
609a8b86
DH
59752003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5976
5977 * eval.c (s_extra_expression, s_misplaced_else_clause,
5978 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5979
5980 (s_extra_case_clause): Removed.
5981
5982 (scm_m_case, scm_m_cond): If a clause appears after an else
5983 clause, report a misplaced else clause.
5984
5985 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5986 specific about the kind of error that was detected. Handle bound
5987 'else and '=>. Avoid unnecessary consing when creating the
5988 memoized code.
5989
5990 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5991 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5992 syntactic keyword '=>.
5993
58a2510b
DH
59942003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5995
5996 * eval.c (scm_m_case): Allow empty lists of case labels.
5997
2a6f7afe
DH
59982003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5999
6000 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
6001
6002 * print.c (scm_isymnames): Add names for the new memoizer codes.
6003
6004 * eval.c (s_missing_clauses, s_bad_case_clause,
6005 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
6006 literal_p): New static identifiers.
6007
6008 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
6009 specific about the kind of error that was detected. Check for
6010 duplicate case labels. Handle bound 'else. Avoid unnecessary
6011 consing when creating the memoized code.
6012
6013 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
6014 the syntactic keyword 'else.
6015
e6729603
DH
60162003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
6017
6018 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
6019 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
6020
6021 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
6022 unnecessary consing when creating the memoized code.
6023
9ddeb776
KR
60242003-10-09 Kevin Ryde <user42@zip.com.au>
6025
6026 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
6027 cast gives for values bigger than a long, or for nan or inf.
6028
df5af69a
DH
60292003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
6030
6031 * smob.h (scm_make_smob_type): Made the declaration match the
6032 definition.
6033
da0e6c2b
MV
60342003-10-07 Marius Vollmer <mvo@zagadka.de>
6035
6036 * goops.c, objects.h, smob.c, smob.h: Make type names char
6037 const * instead of char *. Thanks to Paul Jarc!
6038
591924eb
KR
60392003-10-02 Kevin Ryde <user42@zip.com.au>
6040
ff6ea7b9 6041 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
6042 rather than scm_strport_to_string, so as to guard against the port
6043 having been closed by the called procedure. Reported by Nic Ferrier.
6044
f03314f9
DH
60452003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6046
6047 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
6048
6049 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
6050 tags.h to deprecated.h.
6051
534c55a9
DH
60522003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6053
6054 This set of patches introduces a new tc7 code scm_tc7_number for
6055 numbers. Bignums, reals and complex numbers are turned from smobs
6056 into subtypes of scm_tc7_number.
6057
6058 * tags.h (scm_tc7_number): New.
6059
6060 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
6061 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
6062 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
6063 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
6064 (scm_class_of), print.c (scm_iprin1), smob.c
6065 (scm_smob_prehistory): Don't handle bignums, reals and complex
6066 numbers as subtypes of scm_tc7_smob any more.
6067
6068 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
6069 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
6070
29c4382a
DH
60712003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6072
6073 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
6074 sizeof (scm_t_complex) to determine the memory size of the
6075 malloc'd area for complex numbers.
6076
47ae1f0e
DH
60772003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
6078
6079 * numbers.c (scm_bigequal): Fixed.
6080
859b6b2f
MV
60812003-09-16 Marius Vollmer <mvo@zagadka.de>
6082
6083 * stime.c (scm_current_time): 'time' does not set errno so don't
6084 use SCM_SYSERROR for reporting errors.
6085
e17d318f
DH
60862003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6087
6088 This set of patches eliminates the dependency between the
6089 implementation of evaluator specific memoization codes and special
6090 constants like #f, '() etc. ('flags'), which are not evaluator
6091 specific. The goal is to remove definitions of evaluator
6092 memoization codes completely from the public interface. This will
6093 make it possible to experiment more freely with optimizations of
6094 guile's internal representation of memoized code.
6095
6096 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
6097
6098 * print.c (iflagnames): New array, holding the printed names of
6099 guile's special constants ('flags').
6100
6101 (scm_isymnames): Now holds only the printed names of the
6102 memoization codes.
6103
6104 (scm_iprin1): Separate the handling of memoization codes and
6105 guile's special constants.
6106
6107 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
6108 SCM_IFLAGNUM): new
6109
6110 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
6111 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
6112 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
6113 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
6114 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
6115 values.
6116
6117 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
6118
6119 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
6120 tc9 macros and scm_tc9_flag.
6121
eecac806
MV
61222003-09-15 Marius Vollmer <mvo@zagadka.de>
6123
6124 * posix.c (scm_setgroups): Check that the gid list is not too
6125 long. Thanks to Paul Jarc!
6126
22f2cf2d
DH
61272003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
6128
6129 * tags.h: Reduced the number of short instructions from 14 to 13.
6130 The typecode of the former 14th short instruction is now used to
6131 represent long instructions. Changed some comments to reflect
6132 this fact.
6133
6134 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
6135 previously used by SCM_IM_DEFINE.
6136
6137 (SCM_IM_DEFINE): Turned into a long instruction.
6138
6139 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
6140 instruction.
6141
6142 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
6143 code that is separate from all instructions, one level of dispatch
6144 for long instructions can be eliminated.
6145
6146 * print.c (scm_isymnames): Removed some commented code.
6147
62f548e1
MV
61482003-09-12 Marius Vollmer <mvo@zagadka.de>
6149
97a61c5f
MV
6150 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
6151 compiler on IA64.
6152
50e0ba57
MV
6153 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
6154
6155 * modules.c (scm_module_reverse_lookup): Check that the obarray
6156 really is a hashtable and do nothing if not.
6157
62f548e1
MV
6158 * inline.h: Use "extern inline" only with GCC. Use "static
6159 inline" else.
6160
0d5e3480
DH
61612003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6162
6163 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
6164 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6165
6166 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
6167 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
6168 deprecated.h.
6169
6b412e91
DH
61702003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6171
6172 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
6173 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6174
6175 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
6176 0.0==some_expression to some_expression==0.0. The latter is
6177 better readable. The former is preferred by some people, since it
6178 leads to a compiler error when confusing == with =. However, when
6179 using gcc, a warning will be issued if in an if-statement an
6180 assigment appears. Since many Guile developers are using gcc,
6181 such errors will not remain unnoticed anyway. We can therefore
6182 focus on better readability.
6183
7e3b25bf
DH
61842003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6185
6186 * tags.h: Added description of Guile's type system. Removed some
6187 old and misleading comments.
6188
3ea39242
DH
61892003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6190
6191 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
6192 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6193
5d7d39ff
DH
61942003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6195
6196 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
6197
6198 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
6199 respective SLOPPY macro.
6200
baa84a20
DH
62012003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6202
6203 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
6204 type string, not SCM_TYP7S.
6205
ba15f500
KR
62062003-09-03 Kevin Ryde <user42@zip.com.au>
6207
6208 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
6209 2s-complement.
6210
53bb8782
KR
6211 * stime.c (scm_strptime): Add comment about glibc strptime %s and
6212 current timezone requiring SCM_DEFER_INTS.
6213
defdc4b4
NJ
62142003-08-30 Neil Jerram <neil@ossau.uklinux.net>
6215
6216 * script.c (scm_compile_shell_switches): Make -s switch optional
6217 if file to be loaded does not begin with a `-'. (Thanks to Aaron
6218 VanDevender for the patch!)
6219
0f008a15
KR
62202003-08-30 Kevin Ryde <user42@zip.com.au>
6221
6222 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
6223 and to have non-integer types rejected as per other logical funcs.
241d9cea 6224
438a3ba1
KR
62252003-08-28 Kevin Ryde <user42@zip.com.au>
6226
6227 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
6228
98dceb37
KR
62292003-08-23 Kevin Ryde <user42@zip.com.au>
6230
6231 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
6232 thread safe, and could take a long time too.
6233
1fa79a38
KR
62342003-08-22 Kevin Ryde <user42@zip.com.au>
6235
6236 * numbers.c (scm_difference): Correction to bignum - negative inum.
6237
d97f9b42
KR
62382003-08-14 Kevin Ryde <user42@zip.com.au>
6239
6240 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
6241 [__GNUC__]: Use volatile asm macros rather than a function call.
6242 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
6243 macros while defining functions.
6244
6245 * simpos.c (getenv): Use <stdlib.h> for prototype.
6246 (scm_system): In docstring, refer to status:exit-val rather than
6247 "functions above".
6248
b9052fcc
KR
62492003-08-09 Kevin Ryde <user42@zip.com.au>
6250
6251 * srcprop.c (scm_source_properties): Return plist from hash if it's a
6252 list set by source-properties! rather than an SRCPROPS object,
6253
8e5b4b9e
KR
62542003-07-29 Kevin Ryde <user42@zip.com.au>
6255
6256 * properties.c (scm_primitive_property_ref): In docstring, note
6257 parameters to not-found-proc, use hyphens rather than underscores for
6258 that parameter name.
6259 (scm_primitive_property_set_x): In docstring, VAL is the value
6260 parameter not CODE.
241d9cea 6261
20703ac4
MV
62622003-07-27 Marius Vollmer <mvo@zagadka.de>
6263
c6ccee34
MV
6264 * print.c (scm_print_symbol_name): handle more weird characters by
6265 escaping the symbol name properly. Thanks to Paul Jarc!
6266
2f4931bf
MV
6267 * posix.h (scm_setgroups): New prototype.
6268 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
6269 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
6270 Don't use SCM_WRITABLE_VELTS.
241d9cea 6271
265c456f
MV
6272 * gc.h (SCM_GC_SET_CELL_BVEC): New.
6273 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
6274 Matthias Koeppe!
6275
20703ac4
MV
6276 * __scm.h (SCM_C_INLINE_KEYWORD): New.
6277 * numbers.c: Use it in place of SCM_C_INLINE so that the code
6278 compiles when SCM_C_INLINE is undefined.
6279
59c4bb82
DH
62802003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6281
6282 * __scm.h: Reformulated the architecture and compiler properties
6283 in terms of properties of scm_t_bits and SCM variables rather than
6284 in terms of c standard types. This is since it is not known which
6285 of the standard types scm_t_bits and SCM variables will be defined
6286 to.
6287
d7850c8d
KR
62882003-07-24 Kevin Ryde <user42@zip.com.au>
6289
6290 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
6291 and real.
6292
8a0c514f
KR
62932003-07-18 Kevin Ryde <user42@zip.com.au>
6294
6295 * numbers.c (scm_product): In complex * bignum, correction to
6296 REAL/IMAG fetch, x is the complex, not y.
6297
0aacf84e
MD
62982003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6299
6300 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
6301 scm_inf_p test as Scheme values.
6302 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
6303 and a positive inum.
6304 Use GNU indentation style.
6305
192de9a4
DH
63062003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
6307
6308 * values.c (scm_values): Build lists of length 1 by using
6309 scm_list_1 instead of using scm_cons.
6310
bbb4438a
KR
63112003-07-10 Kevin Ryde <user42@zip.com.au>
6312
b58c85ce
KR
6313 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
6314 * list.c (scm_list_n): Ditto.
6315
bbb4438a
KR
6316 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
6317
287f8ad1
KR
63182003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
6319
6320 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
6321 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
6322 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
6323 the other using intptr_t.
6324
005d2366
KR
63252003-07-08 Kevin Ryde <user42@zip.com.au>
6326
0aacf84e 6327 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
6328 (scm_magnitude): Use hypot.
6329
6330 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
6331 @footnote since it doesn't go through to guile-procedures.txt.
6332
6333 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
6334 outside @var to quieten makeinfo, and use @code.
6335
cbfe8e62
HWN
63362003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6337
6338 * gc-malloc.c (decrease_mtrigger): new function
6339 (increase_mtrigger): new function, separate debug registering and
6340 mtrigger administration.
6341 (scm_gc_realloc): bugfix: do mtrigger administration before the
6342 actual realloc, for the realloc might invalidate a GC-d segment of
6343 memory. Thanks to Sam Hocevar for pointing this out.
6344 (scm_gc_realloc): use scm_malloc_reregister instead of
6345 unregistering and registering in sequence.
6346
aeb4c2e1
HWN
63472003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6348
241d9cea 6349 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
aeb4c2e1 6350
4c27f8d2
HWN
63512003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6352
6353 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6354 clauses.
241d9cea 6355
983e697d
MV
63562003-06-29 Marius Vollmer <mvo@zagadka.de>
6357
6358 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6359 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6360 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6361 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6362 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6363 the release_1_6 branch.
6364
78b6566e
SJ
63652003-06-25 Stefan Jahn <stefan@lkcc.org>
6366
6367 * continuations.c: Redeclaration of getcontext() via the
6368 __asm__ ("getcontext") directive.
6369
241d9cea 6370 * continuations.h: Include <ucontext.h> instead of
78b6566e
SJ
6371 <sys/ucontext.h>.
6372
1ebb8497
KR
63732003-06-21 Kevin Ryde <user42@zip.com.au>
6374
6375 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6376 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6377 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6378 available.
6379 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6380 (isfinite): Remove, conflicts with C99 isfinite().
6381
fbf85ba4
MV
63822003-06-19 Marius Vollmer <mvo@zagadka.de>
6383
6384 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6385 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6386 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6387 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6388 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6389 the release_1_6 branch.
6390
fcc5d734
SJ
63912003-06-14 Stefan Jahn <stefan@lkcc.org>
6392
6393 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6394 to be functions instead of macros.
6395
6396 * threads.c: Conditionalized inclusion of <sys/time.h> and
6397 <unistd.h>.
6398 (scm_getspecific, scm_setspecific): Made these two function
6399 real part of the API.
6400
241d9cea 6401 * posix.c (s_scm_putenv): Added some code to make a
fcc5d734
SJ
6402 (putenv "FOO="), i.e. setting an empty string, work also on
6403 Win32 systems. Thanks to Kevin Ryde for the proposal.
6404
c3ae8e07
KR
64052003-06-12 Kevin Ryde <user42@zip.com.au>
6406
75b14838
KR
6407 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6408 freebsd to comment about need to use unsetenv.
c3ae8e07 6409
9d9fa092
MV
64102003-06-02 Marius Vollmer <mvo@zagadka.de>
6411
6412 * ports.c (scm_peek_char): Safe the column of the port around the
6413 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6414
f2478375
KR
64152003-06-07 Kevin Ryde <user42@zip.com.au>
6416
6417 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6418 and friends required by scm_t_bits setups.
6419
6375e040
DH
64202003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6421
6422 * tags.h (scm_tc2_int): Added.
6423
6424 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6425 scm_tc2_int.
6426
6427 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6428 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6429
f5c6ec2f
DH
64302003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6431
6432 * eval.c: Partially undid my patch from 2003-05-31. This patch
6433 caused the segfault referenced in the previous changelog entry.
6434
47dbd81e
DH
64352003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6436
6437 * tags.h: Fixed comment about the immediate type code layout.
6438
6439 * eval.c: Fixed handling of non-special instructions. Without
6440 this patch, guile will segfault on (#\0) and similar instructions.
6441
3ec52c51
KR
64422003-06-05 Kevin Ryde <user42@zip.com.au>
6443
6444 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6445 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6446
e418bd7c
KR
6447 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6448 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
241d9cea 6449
d0624e39
DH
64502003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6451
6452 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6453 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6454 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6455 generalized it to apply not only to C level functions but also to
6456 scheme level functions.
6457
6458 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6459 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6460 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6461 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6462 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6463 respectively.
6464
6465 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6466 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6467 eval.h into eval.c and a copy is placed into deprecated.h.
6468
6469 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6470 into eval.c. This definition was not part of the API in any
6471 officially released version of guile and thus does not need to go
6472 through a phase of deprecation.
6473
e90c3a89
DH
64742003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6475
d0624e39
DH
6476 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6477 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6478 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6479 definitions are make static and renamed from scm_s_xxx to s_xxx.
6480 In deprecated.c the original definitions are copied.
6481
d0624e39
DH
6482 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6483 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6484 eval.h into eval.c and a copy (slightly modified to work in user
6485 code) is placed into deprecated.h.
6486
6487 * eval.c: Use the local static s_xxx definitions instead of the
6488 scm_s_xxx definitions throughout.
6489
14b18ed6
DH
64902003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6491
6492 This set of patches separates the representation of the cxr family
6493 of functions (car, cdr etc.) from the dsubr family of functions
6494 (i. e. functions that take a double precision floating point
6495 argument). Further, the algorithm for handling the cxr function
6496 is improved.
6497
6498 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6499 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6500 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6501 cosh, tanh), objects.c (scm_class_of), procprop.c
6502 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6503 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6504 typecode for the dsubr family of functions.
6505
6506 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6507 ramap_dsubr.
6508
6509 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6510 (scm_init_pairs): Make use of the (now usable) second cell element
6511 of a scm_tc7_cxr function to implement the cxr family of functions
6512 more efficiently.
6513
2ca0d207
DH
65142003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6515
6516 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6517 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6518 end of an if-else-if-sequence of checks.
6519
9a069bdd
DH
65202003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6521
6522 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6523 execution. Generalize apply_closure to apply_proc and use that
6524 for call-with-values.
6525
e910e9d2
DH
65262003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6527
6528 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6529 a non closure.
6530
1e498fbd
SJ
65312003-05-30 Stefan Jahn <stefan@lkcc.org>
6532
241d9cea 6533 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
1e498fbd
SJ
6534 appropriately for mingw32 hosts.
6535
6536 * numbers.h: Defining copysign(), isnan() and finite() to
6537 be prefixed by a single '_' for mingw32 hosts.
6538
c47e2599
KR
65392003-05-30 Kevin Ryde <user42@zip.com.au>
6540
6541 * numbers.c (z_negative_one): New variable.
6542 (scm_init_numbers): Initialize it.
6543 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6544
2e945bcc
SJ
65452003-05-29 Stefan Jahn <stefan@lkcc.org>
6546
6547 * win32-dirent.c: Use malloc() instead of scm_malloc().
6548
6549 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6550 warning.
6551
6552 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6553 mingw32 build.
6554
6555 * modules.c (s_scm_module_import_interface): Renamed local
6556 variable interface to _interface. Seems like 'interface'
6557 is a special compiler directive for the mingw32 compiler.
6558
6559 * mkstemp.c: Provide prototype to avoid compiler warning.
6560
6561 * load.c (s_scm_search_path): Fixed absolute and relative
6562 path detections for native Windows platforms.
6563
241d9cea 6564 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
2e945bcc
SJ
6565 to build on mingw32).
6566
241d9cea 6567 * gc-freelist.c ("s_scm_map_free_list",
2e945bcc
SJ
6568 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6569
241d9cea 6570 * fports.c (fport_fill_input): Disable use of
2e945bcc
SJ
6571 fport_wait_for_input() on Win32 platforms.
6572
6573 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6574
6575 * Makefile.am: Modified some rules for cross compiling.
6576
ddd8f927
DH
65772003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6578
6579 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6580 proper function object and the correct number of arguments are now
6581 performed in the application part of SCM_CEVAL.
6582
6583 (scm_badformalsp): Removed.
6584
f8ba2197
DH
65852003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6586
6587 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6588
79f55b7c
MD
65892003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6590
a502595f
MD
6591 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6592 always being false by inserting preprocessor conditional. (Thanks
6593 to Bruce Korb.)
6594
79f55b7c
MD
6595 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6596 (void *) in order to avoid an aliasing warning; thanks to Bruce
6597 Korb.)
6598
6599 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6600
6601 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6602 SCM_STACK_PTR.
6603
6604 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6605 thread->base --> t->base.
6606
6607 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6608
47dee228
MV
66092003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6610
6611 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6612 scm_variable_set_name_hint, scm_builtin_variable,
6613 scm_internal_with_fluids, scm_make_gsubr,
6614 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6615 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6616 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6617 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6618 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6619 scm_make_subr_with_generic, scm_make_subr_opt,
6620 scm_call_catching_errors, scm_make_smob_type_mfpe,
6621 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6622 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6623 branch. Some have been slightly rewritten.
6624 (scm_i_object_chars, scm_i_object_length): New, to support
6625 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
241d9cea 6626
e681d187
DH
66272003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6628
6629 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6630 names and inits in the memoized code of do.
6631
7e59d9d4
MD
66322003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6633
6634 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6635 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6636 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6637 a compilation error if error-on-warning is enabled).
6638
9950a42c
MV
66392003-05-17 Marius Vollmer <mvo@zagadka.de>
6640
6641 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6642 removes preprocessor directives from the snarfage that might
6643 otherwise confuse us. These directives appear when compiling with
6644 "-g3", for example.
6645
0068984b
HWN
66462003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6647
26e68795
HWN
6648 * ChangeLog: add my surname
6649
0068984b
HWN
6650 * srcprop.c (scm_finish_srcprop): use
6651 scm_gc_register_collectable_memory()
6652 (scm_make_srcprops): idem.
6653
131805f0
HWN
66542003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6655
6656 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6657 wrap-around for scm_mtrigger
6658 (scm_gc_register_collectable_memory): abort on overflowing
6659 scm_mallocated().
6660
d4611024
KR
66612003-05-13 Kevin Ryde <user42@zip.com.au>
6662
6663 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6664 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6665
7aaf8dc9
MD
66662003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6667
dfd03fb9
MD
6668 * backtrace.c (scm_display_error_message): Introduced fancy
6669 printing with max level 7 and length 10. (Purpose: avoid printing
6670 gigantic objects in error messages.)
6671
6672 * print.c, print.h (scm_i_port_with_print_state): New function.
6673
6674 * print.c (scm_iprin1, scm_printer_apply,
6675 scm_port_with_print_state): Use scm_i_port_with_print_state.
6676 (scm_simple_format): Modified not to destroy print states.
6677 (print_state_mutex): New mutex.
6678 (scm_make_print_state, scm_free_print_state, scm_prin1):
6679 Lock/unlock print_state_mutex.
241d9cea 6680
7aaf8dc9
MD
6681 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6682 Use current names in definitions.
6683
a4d9ffa1
KR
66842003-05-10 Kevin Ryde <user42@zip.com.au>
6685
6686 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6687
d25e96a4
KR
6688 * numbers.c (scm_integer_length): On negative bignums, adjust
6689 mpz_sizeinbase to account for it looking at absolute value where we
6690 want ones-complement.
6691
6692 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6693 since we're only using the ulong return value, and x might not fit.
6694
5bf6a6f0
DH
66952003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6696
6697 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6698 read. This will allow to make the definition in read.c static.
6699
f58c472a
DH
67002003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6701
6702 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6703 from evalext to eval. This will allow to make some of the
6704 definitions in eval.c static.
6705
90382aeb
KR
67062003-05-06 Kevin Ryde <user42@zip.com.au>
6707
6708 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6709 (scm_logcount): Use mpz_com, not mpz_neg.
6710
3b88ed2a
DH
67112003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6712
6713 The purpose of this patch is to make guile's internal memoizers
6714 distinguishable from memoizing macros created on the scheme level
6715 or from user provided primitive memoizing macros. The reason is,
6716 that the internal memoizers are the only ones that are allowed to
6717 transform their scheme input into memoizer byte code, while all
6718 other memoizing macros may only transform scheme code into new
6719 scheme code.
6720
6721 To achieve this, a new macro type 'builtin-macro!' is introduced.
6722 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6723 this will change when the memoizer and executor are separated.
6724
6725 * macros.[ch] (scm_i_makbimacro): New.
6726
6727 * macros.h (SCM_BUILTIN_MACRO_P): New.
6728
6729 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6730
6731 * eval.c, goops.c: All of guile's primitive memoizing macros are
6732 primitive builtin-macros now.
6733
6734 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6735 builtin-macros are handled equally to memoizing macros.
6736
b0780eb1
MV
67372003-05-04 Marius Vollmer <mvo@zagadka.de>
6738
6739 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6740 work around a bug in GCC 2.95.2 but is now a bug in itself.
6741
1cbf4fe9
MV
67422003-05-02 Marius Vollmer <mvo@zagadka.de>
6743
6744 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6745 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6746 scm_tcs_symbols): New.
6747
1a61d41b
MV
67482003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6749
096ecbaf
MV
6750 * deprecated.h, deprecated.c (scm_protect_object,
6751 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6752 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6753 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6754 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6755 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6756 scm_ptob_descriptor, scm_port_rw_active,
6757 scm_close_all_ports_except): New.
6758
1a61d41b
MV
6759 * ports.c (scm_c_port_for_each): New function, mostly copied from
6760 scm_port_for_each.
6761 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6762 * ports.h (scm_c_port_for_each): New prototype.
241d9cea 6763
c8e1d354
MD
67642003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6765
6766 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6767 macro was introduced in anticipation of GOOPS method compilation
6768 code.)
6769
6770 * goops.c: Removed binding of @dispatch.
6771
a4aa2134
DH
67722003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6773
6774 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6775 instructions that bind the macros on the scheme level back to
6776 goops.c in order to make sure again that the bindings go into the
6777 (oop goops) module and are not visible from the outside.
6778
9fbee57e
DH
67792003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6780
6781 * eval.c: Non functional change: Separated R5RS and non-R5RS
6782 macros into different sections of the file and ordered the
6783 memoizers alphabetically.
6784
12841895
DH
67852003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6786
6787 * eval.c (scm_ilookup): Rewritten to improve readability.
6788
6a3f13f0
DH
67892003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6790
6791 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6792 Partially reverted patch from 2003-04-23 in oder to find a better
6793 compromise between readability and debuggability.
6794
b0c5d67b
DH
67952003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6796
6797 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6798 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6799 definitions of the special goops memoizers from goops.[ch] to
6800 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6801 throughout guile.
6802
b9ad392e
MD
68032003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6804
6805 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6806
6807 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6808
6809 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6810
6811 * ioext.c (scm_fdes_to_ports): Ditto.
6812
6813 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6814 lock/unlock scm_i_port_table_mutex.
6815
6816 * strports.c (scm_mkstrport): Ditto.
6817
6818 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6819
6820 * fports.c (scm_fdes_to_port): Ditto.
6821
d0b07b5d
DH
68222003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6823
6824 This set of patches contains no functional changes, only debatable
6825 minor stylistic ones. Still, in order to prepare a patch between
6826 my local copy and the CVS version, I decided to submit the changes
6827 below. Then, the patch will hopefully only contain relevant
6828 modifications :-)
6829
6830 * eval.c (iqq): Added const specifier.
6831
6832 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6833 Use NULL instead of 0 to indicate that a pointer is returned.
6834 Removed some misleading 'fall through' comments.
6835
6836 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6837 Split up long expressions into smaller ones to be more debugging
6838 friendly.
6839
a98e8e98
DH
68402003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6841
6842 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6843 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6844 rather than casting to SCM.
6845
c178c3a6
DH
68462003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6847
6848 * sort.c, pairs.h: Removed unnecessary includes.
6849
d339981a
DH
68502003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6851
6852 * sort.c: Replaced hand-made trampline code by the new official
6853 mechanism from eval.c. This fixes a segfault in the new test file
6854 sort.test.
6855
6856 (quicksort, compare_function, scm_restricted_vector_sort_x,
6857 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6858 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6859 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6860 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6861 eval.c.
6862
6863 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6864 cmp_fun_t): Removed.
6865
6866 (compare_function): Added.
6867
6868 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6869 arithmetics with index arithmetics. Changed quicksort to work on
6870 an array of SCM values instead of an array of characters. Avoid
6871 bytewise copying of SCM elements. Avoid allocating memory on the
6872 stack with alloca. Fixed some comments.
6873
821f18a4
DH
68742003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6875
6876 * eval.c (EXTEND_ENV): Eliminated.
6877
6878 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6879 EXTEND_ENV.
6880
94fb5a6e
DH
68812003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6882
6883 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6884
6885 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6886 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6887
6888 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6889 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6890 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6891 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6892 functions such that they check if the object is a non-immediate.
6893 Further, renamed identifiers to use the scm_dbg_ prefix and made
6894 their inclusion into the lib dependent of the
6895 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6896
fce0b22d
DH
68972003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6898
6899 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6900 debug option.
6901
1685446c
DH
69022003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6903
821f18a4 6904 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6905 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6906 any calls to SCM_NCONSP any more.
6907
6908 * unif.c (l2ra): Eliminate redundant check.
6909
9ff1720f
DH
69102003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6911
6912 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6913 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6914 SCM_NNULLP. Now, guile itself does not include any calls to
6915 SCM_NNULLP any more.
6916
05b15362
DH
69172003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6918
6919 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6920 scm_copy_tree): Place assignment expressions which are part of
6921 other expressions into an expression of their own.
6922
0c88d7df
DH
69232003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6924
6925 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6926 compare SCM values with !=.
6927
5cb22e96
DH
69282003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6929
6930 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6931 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6932 and definition of the memoizer for the generalized set! macro from
6933 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6934 define the macro object.
6935
6936 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6937 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6938 eval.c, it is made static and renamed to s_set_x.
6939
6940 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6941 over SCM_N<foo>.
6942
a44a9715
DH
69432003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6944
6945 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6946 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6947 to undefineds and registered the object as a permanent object.
6948
6949 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6950 static in eval.c, renamed it to f_apply and registered the object
6951 as a permanent object.
6952
1b43d24c
DH
69532003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6954
5cb22e96 6955 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6956 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6957
aec16f99
DH
69582003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6959
6960 * numbers.c (scm_logtest): Fixed argument bug in the call to
6961 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6962
f96460ce
DH
69632003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6964
6965 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6966 type errors that showed up when compiling with SCM_DEBUG defined.
6967
d0f6ceb8
DH
69682003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6969
6970 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6971 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6972 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6973 fix compile errors with --disable-deprecated.
6974
19a7a089
RB
69752003-04-17 Rob Browning <rlb@defaultvalue.org>
6976
6977 * numbers.c (scm_integer_expt): fix case where we were declaring
6978 vars in the middle of a statement block. Thanks to Thamer
6979 Al-Harbash.
6980
47cd67db
MD
69812003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6982
0fd7dcd3
MD
6983 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6984 change.
6985
47cd67db
MD
6986 * eq.c (scm_eqv_p): Turned into a primitive generic.
6987
3b8b889c
RB
69882003-04-16 Rob Browning <rlb@defaultvalue.org>
6989
312006bb
RB
6990 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6991 Thanks to Boyd Gerber.
6992 Added check for __arm__ in addition to arm for LINUX and copied
6993 __s390__ defines from upstream libgc. Thanks to James Treacy for
6994 reporting the problems.
c7ef2ea1 6995
3b8b889c
RB
6996 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6997
6998 * socket.c: use SCM_CHAR_BIT.
6999
7000 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
7001
7002 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
7003
43261b39
MD
70042003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7005
7006 * feature.c (scm_init_feature): Always add threads feature.
7007
58241edc
MD
70082003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7009
7010 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
7011 scm_at_assert_bound_ref. (We don't want the unbound check. See
7012 oop/goops/active-slot.scm.)
7013
94e91275
RB
70142003-04-14 Rob Browning <rlb@defaultvalue.org>
7015
7016 * tags.h: scm_t_intptr should have been intptr_t.
7017
3071ea27
RB
70182003-04-13 Rob Browning <rlb@defaultvalue.org>
7019
7020 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
7021 test. Instead use
7022 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
7023 as gc_os_dep.c suggests is appropriate.
7024
7025 * goops.c (prep_hashsets): make static to match prototype.
7026 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
7027 Chin.
241d9cea 7028
3071ea27
RB
7029 * c-tokenize.lex: remove trailing comma from enum. Thanks to
7030 Albert Chin.
7031
7032 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
7033 Klausner.
7034
21ab2aeb
MD
70352003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7036
7037 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
7038 indicated through extra fields in getters-n-setters.
7039 (scm_add_slot): Adapted to new format of getters_n_setters slot.
7040 (Thanks to Andy Wingo.)
7041
dff96e95
HWN
70422003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7043
7044 * gc-segment.c: add comment
7045
07921c76
RB
70462003-04-07 Rob Browning <rlb@defaultvalue.org>
7047
b5331f10
RB
7048 * debug.h: change "id" arg name to "info_id" to avoid objective-c
7049 clash.
7050
07921c76
RB
7051 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
7052 and add regression test to standalone/.
7053
70542003-04-06 Rob Browning <rlb@defaultvalue.org>
7055
7056 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
7057 Thanks to Dale P. Smith.
7058
7059 * random.c: #include gmp.h.
7060 (scm_c_random_bignum): normalize result on return.
7061
7062 * init.c: #include gmp.h.
7063
7064 * numbers.h: remove the gmp.h #include (not needed now).
7065
7066 * posix.h: change occurences of "id" to something else so we don't
7067 cause trouble when included via objective-c (can't hurt, might
7068 help). Still have usage in debug.h, though.
7069
938f6b7c
MD
70702003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7071
372691d8
MD
7072 * random.c (scm_c_random_bignum): Don't generate a random number
7073 equal to m (the second argument of scm_c_random_bignum); only
7074 generate numbers in the range 0 <= r < m.
c5f268f8
MD
7075 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
7076 scm_var_random_state.
372691d8 7077
938f6b7c
MD
7078 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
7079 clause.
7080
6cdb8c3f
RB
70812003-04-05 Rob Browning <rlb@defaultvalue.org>
7082
938f6b7c 7083 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
7084 uses before any code.
7085
15635be5
MD
70862003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7087
1ecfd013
MD
7088 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
7089 not top_srcdir.
7090
15635be5
MD
7091 * hashtab.c (rehash_after_gc): Clear to_rehash list before
7092 processing it in order to avoid an infinite loop.
7093
7094 * print.c (scm_prin1): Remember old state of pstate->writingp.
7095
73be1d9e
MV
70962003-04-05 Marius Vollmer <mvo@zagadka.de>
7097
7098 * Changed license terms to the plain LGPL thru-out.
7099
ad815c06
RB
71002003-04-04 Rob Browning <rlb@defaultvalue.org>
7101
7102 * socket.c (FLIPCPY_NET_HOST_128): new macro.
7103 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
7104 rewrite to handle GMP bignums.
7105
7106
7107 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
7108
7109 * ports.c (scm_getc): minor tweak.
7110
7111 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
7112 rewrite to handle GMP bignums.
7113
7114 * numbers.c: rewrite *many* functions to handle GMP bignums.
7115
7116 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
7117 handle GMP bignums.
7118
7119 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
7120
7121 * init.c (check_config): remove SCM_BIGDIG conditionals.
7122 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
7123
7124 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
7125
7126 * eval.c: remove SCM_BIGDIG conditionals.
7127
7128 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
7129
6cdb8c3f
RB
71302003-03-31 Rob Browning <rlb@defaultvalue.org>
7131
7132 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
7133 to Kevin Ryde.)
7134
71352003-03-27 Rob Browning <rlb@defaultvalue.org>
7136
7137 * threads.h: fix various preprocessor usages of new public
7138 symbols to expect 0 or 1 values rather than 1 or undefined.
7139 i.e. change #ifdef to #if, etc.
7140
7141 * threads.c: fix various preprocessor usages of new public
7142 symbols to expect 0 or 1 values rather than 1 or undefined.
7143 i.e. change #ifdef to #if, etc.
7144
7145 * tags.h: fix various preprocessor usages of new public
7146 symbols to expect 0 or 1 values rather than 1 or undefined.
7147 i.e. change #ifdef to #if, etc.
7148
7149 * stacks.c: fix various preprocessor usages of new public
7150 symbols to expect 0 or 1 values rather than 1 or undefined.
7151 i.e. change #ifdef to #if, etc.
7152
7153 * stackchk.h: fix various preprocessor usages of new public
7154 symbols to expect 0 or 1 values rather than 1 or undefined.
7155 i.e. change #ifdef to #if, etc.
7156
7157 * stackchk.c: fix various preprocessor usages of new public
7158 symbols to expect 0 or 1 values rather than 1 or undefined.
7159 i.e. change #ifdef to #if, etc.
7160
7161 * sort.c: fix various preprocessor usages of new public
7162 symbols to expect 0 or 1 values rather than 1 or undefined.
7163 i.e. change #ifdef to #if, etc.
7164
7165 * read.c: fix various preprocessor usages of new public
7166 symbols to expect 0 or 1 values rather than 1 or undefined.
7167 i.e. change #ifdef to #if, etc.
7168
7169 * random.c: fix various preprocessor usages of new public
7170 symbols to expect 0 or 1 values rather than 1 or undefined.
7171 i.e. change #ifdef to #if, etc.
7172
7173 * print.c: fix various preprocessor usages of new public
7174 symbols to expect 0 or 1 values rather than 1 or undefined.
7175 i.e. change #ifdef to #if, etc.
7176
7177 * objects.c: fix various preprocessor usages of new public
7178 symbols to expect 0 or 1 values rather than 1 or undefined.
7179 i.e. change #ifdef to #if, etc.
7180
7181 * numbers.h: fix various preprocessor usages of new public
7182 symbols to expect 0 or 1 values rather than 1 or undefined.
7183 i.e. change #ifdef to #if, etc.
7184
7185 * null-threads.c: fix various preprocessor usages of new public
7186 symbols to expect 0 or 1 values rather than 1 or undefined.
7187 i.e. change #ifdef to #if, etc.
7188
7189 * lang.c: fix various preprocessor usages of new public
7190 symbols to expect 0 or 1 values rather than 1 or undefined.
7191 i.e. change #ifdef to #if, etc.
7192
7193 * lang.h: fix various preprocessor usages of new public
7194 symbols to expect 0 or 1 values rather than 1 or undefined.
7195 i.e. change #ifdef to #if, etc.
7196
7197 * iselect.h: fix various preprocessor usages of new public
7198 symbols to expect 0 or 1 values rather than 1 or undefined.
7199 i.e. change #ifdef to #if, etc.
7200
7201 * init.c: fix various preprocessor usages of new public
7202 symbols to expect 0 or 1 values rather than 1 or undefined.
7203 i.e. change #ifdef to #if, etc.
7204
7205 * gh_data.c: fix various preprocessor usages of new public
7206 symbols to expect 0 or 1 values rather than 1 or undefined.
7207 i.e. change #ifdef to #if, etc.
7208
7209 * gh.h: fix various preprocessor usages of new public
7210 symbols to expect 0 or 1 values rather than 1 or undefined.
7211 i.e. change #ifdef to #if, etc.
7212
7213 * gen-scmconfig.c: change most new public symbols to be defined to
7214 0 or 1 rather than being either 1 or undefined.
7215
7216 * gc_os_dep.c: fix various preprocessor usages of new public
7217 symbols to expect 0 or 1 values rather than 1 or undefined.
7218 i.e. change #ifdef to #if, etc.
7219 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
7220
7221 * gc.h: fix various preprocessor usages of new public
7222 symbols to expect 0 or 1 values rather than 1 or undefined.
7223 i.e. change #ifdef to #if, etc.
7224
7225 * gc-card.c: fix various preprocessor usages of new public
7226 symbols to expect 0 or 1 values rather than 1 or undefined.
7227 i.e. change #ifdef to #if, etc.
7228
7229 * gc-mark.c: fix various preprocessor usages of new public
7230 symbols to expect 0 or 1 values rather than 1 or undefined.
7231 i.e. change #ifdef to #if, etc.
7232
7233 * feature.c: fix various preprocessor usages of new public
7234 symbols to expect 0 or 1 values rather than 1 or undefined.
7235 i.e. change #ifdef to #if, etc.
7236
7237 * evalext.c: fix various preprocessor usages of new public
7238 symbols to expect 0 or 1 values rather than 1 or undefined.
7239 i.e. change #ifdef to #if, etc.
7240
7241 * eval.h: fix various preprocessor usages of new public
7242 symbols to expect 0 or 1 values rather than 1 or undefined.
7243 i.e. change #ifdef to #if, etc.
7244
7245 * eval.c: fix various preprocessor usages of new public
7246 symbols to expect 0 or 1 values rather than 1 or undefined.
7247 i.e. change #ifdef to #if, etc.
7248
7249 * eq.c: fix various preprocessor usages of new public
7250 symbols to expect 0 or 1 values rather than 1 or undefined.
7251 i.e. change #ifdef to #if, etc.
7252
7253 * coop.c: fix various preprocessor usages of new public
7254 symbols to expect 0 or 1 values rather than 1 or undefined.
7255 i.e. change #ifdef to #if, etc.
7256
7257 * coop-threads.c: fix various preprocessor usages of new public
7258 symbols to expect 0 or 1 values rather than 1 or undefined.
7259 i.e. change #ifdef to #if, etc.
7260
7261 * coop-pthreads.c: fix various preprocessor usages of new public
7262 symbols to expect 0 or 1 values rather than 1 or undefined.
7263 i.e. change #ifdef to #if, etc.
7264
7265 * coop-defs.h: fix various preprocessor usages of new public
7266 symbols to expect 0 or 1 values rather than 1 or undefined.
7267 i.e. change #ifdef to #if, etc.
7268
7269 * convert.i.c: fix various preprocessor usages of new public
7270 symbols to expect 0 or 1 values rather than 1 or undefined.
7271 i.e. change #ifdef to #if, etc.
7272
7273 * continuations.c: fix various preprocessor usages of new public
7274 symbols to expect 0 or 1 values rather than 1 or undefined.
7275 i.e. change #ifdef to #if, etc.
7276
7277 * _scm.h: fix various preprocessor usages of new public symbols to
7278 expect 0 or 1 values rather than 1 or undefined. i.e. change
7279 #ifdef to #if, etc.
7280
d11d697a
MV
72812003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7282
9686f86d
MV
7283 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
7284
7285 * deprecated.c, deprecated.h: New files, to collect deprecated
7286 things in one place.
7287 * Makefile.am: Added them in all the right places.
7288
d11d697a
MV
7289 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
7290 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
7291 builds work.
9686f86d
MV
7292 (DOT_X_FILES): Removed "iselect.x".
7293 (DOT_DOC_FILES): Removed "iselect.doc".
241d9cea 7294
e3c0c3b9
RB
72952003-03-25 Rob Browning <rlb@defaultvalue.org>
7296
7297 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
7298 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
7299
7300 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
7301
7302 * vports.c: #include <config.h> if HAVE_CONFIG_H.
7303
7304 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
7305 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7306
7307 * threads.h: replace usage of struct timespect with
7308 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
7309 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
7310 favor of scm_t_timespec from scmconfig.h.
7311
7312 * threads.c: move libguile/_scm.h include to the top so we pick up
7313 any critical defines like _GNU_SOURCE early. Replace usage of
7314 struct timespect with scm_t_timespec. Replace usage of
7315 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
7316 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
7317
7318 * threads-plugin.h: replace usage of struct timespect with
7319 scm_t_timespec.
7320
7321 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
7322 usage of struct timespect with scm_t_timespec.
7323
7324 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
7325 HAVE_INTTYPES_H handling to scmconfig.h. #include
7326 "libguile/__scm.h". Rework handling for scm_t_bits,
7327 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7328 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
7329 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
7330 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
7331 SCM_HAVE_ARRAYS.
7332
7333 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
7334
7335 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7336
7337 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7338
7339 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7340
7341 * stime.h: move handling of time related headers to scmconfig.h.
7342
7343 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7344
7345 * stacks.c: replace usage of STACK_GROWS_UP with
7346 SCM_STACK_GROWS_UP.
7347
7348 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7349 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7350
7351 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7352 of uint32 and HAVE_UINT_32 with scm_t_int32.
7353
7354 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7355
7356 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7357
7358 * script.c: #include <config.h> if HAVE_CONFIG_H.
7359
7360 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7361
7362 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7363
7364 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7365
7366 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7367
7368 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7369
7370 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7371
7372 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7373 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7374 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7375 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7376
7377 * ramap.c: replace usage of HAVE_LONG_LONGS with
7378 "SCM_SIZEOF_LONG_LONG != 0".
7379
7380 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7381 "libguile/scmconfig.h".
7382
7383 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7384
7385 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7386 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7387
7388 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7389
7390 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7391
7392 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7393
7394 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7395 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7396 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7397 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7398 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7399 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7400 "SCM_SIZEOF_LONG_LONG != 0".
7401
7402 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7403 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7404 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7405 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7406
7407 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7408
7409 * null-threads.h: replace usage of struct timespect with
7410 scm_t_timespec.
7411
7412 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7413
7414 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7415 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7416 scm_t_uint64 and rename usages.
7417
7418 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7419
7420 * load.c: #include <config.h> if HAVE_CONFIG_H.
7421
7422 * iselect.h: move handling of time related headers to scmconfig.h.
7423 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7424 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7425 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7426
7427 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7428 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7429 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7430
7431 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7432
7433 * inline.h: #include "libguile/__scm.h" at the top. Change code
7434 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7435 what to do instead of creating a new public #define. Rename usage
7436 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7437 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7438 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7439
7440 * inline.c: rearrange handling -- now we just #define
7441 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7442 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7443 appropriate, and we use that in inline.h along with the above
7444 define to determine how to respond.
7445
7446 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7447 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7448
7449 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7450
7451 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7452 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7453
7454 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7455
7456 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7457
7458 * gen-scmconfig.c: new file -- see comments in file for details.
7459
7460 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7461
7462 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7463 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7464
7465 * gc.h: replace usage of SIZEOF_LONG with
7466 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7467 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7468 since we handle that in scmconfig.h now.
7469
7470 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7471
7472 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7473 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7474 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7475
7476 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7477
7478 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7479 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7480
7481 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7482
7483 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7484
7485 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7486 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7487
7488 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7489
7490 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7491 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7492
7493 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7494 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7495 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7496 with "SCM_SIZEOF_LONG_LONG != 0".
7497
7498 * error.c: #include <config.h> if HAVE_CONFIG_H.
7499
7500 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7501 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7502 with "SCM_SIZEOF_LONG_LONG != 0".
7503
7504 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7505
7506 * coop.c: replace usage of struct timespect with scm_t_timespec.
7507 #include <config.h> if HAVE_CONFIG_H.
7508
7509 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7510 usage of struct timespect with scm_t_timespec. Replace usage of
7511 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7512
7513 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7514 usage of struct timespect with scm_t_timespec. Replace usage of
7515 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7516
7517 * coop-defs.h: move handling of time related headers to
7518 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7519 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7520 timespect with scm_t_timespec.
7521
7522 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7523
7524 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7525
7526 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7527 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7528
7529 * continuations.c: move libguile/_scm.h include to the top so we
7530 pick up any critical defines like _GNU_SOURCE early.
7531
7532 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7533
7534 * async.c: #include <config.h> if HAVE_CONFIG_H.
7535
7536 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7537
7538 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7539 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7540
7541 * __scm.h: move libguile/scmconfig.h include up to the top, so
7542 we're sure to pick up any critical defines like _GNU_SOURCE early.
7543 #include <limits.h> removed in favor of scmconfig.h inclusion when
7544 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7545 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7546 scmconfig.h inclusion when appropriate. Various Win32 related
7547 definitions removed in favor of scmconfig.h inclusion when
7548 appropriate.
7549 (HAVE_UINTPTR_T): definition removed (see NEWS).
7550 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7551 (HAVE_LONG_LONGS): definition removed (see NEWS).
7552 (HAVE_LONG_LONG): definition removed (see NEWS).
7553 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7554
7555 * Makefile.am: scmconfig.h is now generated by building and
7556 running gen-scmconfig.h and capturing its output. gen-scmconfig
7557 uses config.h and the configure.in generated gen-scmconfig.h to
7558 decide what to output. See gen-scmconfig.c for details.
7559 (noinst_PROGRAMS): add gen-scmconfig.
7560 (gen_scmconfig_SOURCES): new variable.
7561 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7562 cross-compiling right.
7563 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7564 (BUILT_SOURCES): add scmconfig.h.
7565
25e0bf97
MV
75662003-03-19 Marius Vollmer <mvo@zagadka.de>
7567
7568 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7569 Adrian Bunk. Thanks!
7570
74b6d6e4
MD
75712003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7572
7573 * goops.c (make_class_from_template): New fourth arg:
7574 applicablep.
7575 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7576 cpls.
7577
7578 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7579
7580 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7581 second arg: applicablep.
7582 (scm_i_inherit_applicable): New function.
7583
7584 * goops.c, goops.h (scm_class_applicable,
7585 scm_class_extended_accessor): New classes.
7586
5c9e7dad
DH
75872003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7588
7589 * procs.c (scm_procedure_documentation): Removed redundant
7590 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7591 predicates.
7592
f8af5c6d
MD
75932003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7594
c614a00b
MD
7595 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7596
109c2c9f
MD
7597 * modules.c (scm_module_import_interface): New function.
7598
f8af5c6d
MD
7599 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7600 scm_class_accessor.
7601 (scm_class_accessor): New class.
7602
a48d60b1
MD
76032003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7604
7605 * goops.c (scm_primitive_generic_generic): Enable primitive
7606 generic if not enabled.
7607 (scm_sys_goops_loaded): Setup unextended primitive generics.
7608
7609 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7610
7611 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7612 snarf macros.
7613
7614 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7615 testing example. All uses of SCM_GPROC should be converted.)
7616
7617 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7618 scm_assoc.
7619
7620 * eq.c (scm_equal_p): Turned into a primitive generic.
7621
84edc049
RB
76222003-02-27 Rob Browning <rlb@defaultvalue.org>
7623
7624 * Makefile.am (scmconfig.h): new target -- generate file from
7625 ../config.h.
7626 (modinclude_HEADERS): remove version.h.
7627 (nodist_modinclude_HEADERS): add version.h.
7628
ea5c9285
MD
76292003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7630
b4a1358c
MD
7631 This fixes a serious GC bug, introduced during the latest
7632 reorganization of the GC, which disabled freeing of structs and
7633 GOOPS objects:
7634
7635 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7636 SCM_EOL.
53af8255
MD
7637 (scm_struct_prehistory): Move scm_free_structs to
7638 scm_before_mark_c_hook.
ea5c9285 7639
b4a1358c
MD
7640 * gc-card.c (sweep_card): Check that we haven't swept structs on
7641 this card before. That can happen if scm_i_sweep_all_segments has
7642 been called from some other place than scm_igc.
7643
c35738c1
MD
76442003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7645
231a4ea8
MD
7646 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7647 (since hash tables now adapt their size).
7648
7649 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7650 (current number of prehistory bindings; hashtable code will select
7651 a prime which is greater than this value).
7652
7653 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7654 (current number of initial symbols).
7655
7656 * properties.c (scm_init_properties): Don't specify size of
7657 scm_properties_whash.
7658
7659 * objprop.c (scm_init_objprop): Don't specify size of
7660 scm_object_whash.
7661
7662 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7663
c35738c1
MD
7664 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7665
7666 The following changes introduce the use of resizable hash tables
7667 throughout Guile. It also renames the old *-hash-table* functions
7668 to *-alist-vector* and places them, together with the rest of the
7669 weak vector support, in the module (ice-9 weak-vector). We should
7670 probably introduce a new, better, API for weak references, for
7671 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7672 look like and are used like ordinary pairs.)
7673
7674 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7675 leaf_environment_fold, obarray_remove_all): Use hashtable
7676 accessors.
7677
7678 * gc.c (scm_init_storage): Moved hook initialization to
7679 scm_storage_prehistory.
7680 (scm_storage_prehistory): New function.
7681 (scm_igc): Added commentary about placement of
7682 scm_after_sweep_c_hook.
7683
7684 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7685 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7686 SCM_WVECT_WEAK_VALUE_P.
7687
7688 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7689 functions.
7690 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7691 Removed.
7692 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7693 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7694
7695 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7696 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7697
7698 * modules.c (module-reverse-lookup): Use hashtable accessors.
7699
7700 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7701
7702 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7703 scm_make_weak_value_alist_vector,
7704 scm_make_doubly_weak_alist_vector): New functions.
7705
7706 * weaks.c (scm_init_weaks_builtins): New function.
7707
7708 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7709 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7710 SCM_WVECT_NOSCAN_P): New macros.
7711
7712 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7713 and SCM_WVECT_WEAK_VALUE_P.
7714
7715 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7716 allocate_weak_vector and exported.
7717
0a4c1355
MD
77182003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7719
7720 * hashtab.c: Undid thread safety. (We decided that it's better to
7721 let the user explicitly protect the tables (or not) according what
7722 is suitable for the application.)
7723
87ca11ff
MD
77242003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7725
7726 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7727 thread safe and handle resizing tables.
7728 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7729 SCM_DEFER/ALLOW_INTS.
7730
f59a096e
MD
77312003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7732
7733 * hashtab.c (scm_vector_to_hash_table,
7734 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7735 functions.
7736 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7737 safe and handle resizing tables.
7738
7739 * weaks.c (scm_make_weak_key_hash_table,
7740 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7741 Size argument made optional. Return resizable table if not
7742 specified.
7743
4b612c5b
MD
77442003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7745
7746 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7747 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7748
b3d7f6df
MD
77492003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7750
7751 * debug.c (scm_procedure_source): Handle all objects for which
7752 procedure? is #t. (Thanks to Bill Schottstaedt.)
7753
756414cf
MD
77542003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7755
361d631f
MD
7756 * futures.c (mark_futures): Don't need to mark data of recycled
7757 futures.
7758 (scan_futures, cleanup_undead): Be smarter about marking
7759 futures---avoid unnecessary passes through future lists.
7760
756414cf
MD
7761 * futures.h, futures.c: New files; Introduced recycling of
7762 futures. For fine-grained threading this lifts performance to
7763 another level. We can now use parallelization in inner loops of
7764 Guile programs without impossible overhead.
7765
7766 * threads.h, threads.c: Moved futures to their own file.
7767
7768 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7769 (DOT_X_FILES): Added futures.x.
7770 (DOT_DOC_FILES): Added futures.doc.
7771 (modinclude_HEADERS): Added futures.h.
7772
7773 * threads.c, threads.h (scm_i_create_thread): Renamed from
7774 create_thread and made global.
7775
7776 * futures.c (scm_make_future): New procedure.
7777
7778 * eval.c: #include "libguile/futures.h".
7779
7780 * init.c: #include "futures.h"
7781 (scm_init_guile_1): Call scm_init_futures.
7782
7783 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7784
7785 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7786
7787 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7788 functions.
7789
7790 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7791
b4debead
MD
77922003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7793
7794 * threads.c (create_thread): Don't unwind dynwind chain of parent
7795 thread before creation. Just start the new thread with an empty
7796 dynwind chain.
7797
93f26b7b
MD
77982003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7799
7800 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7801
38d8927c
MD
78022003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7803
41c96c32
MD
7804 * threads.c (scm_timed_wait_condition_variable): Support timed
7805 waiting also for simple condition variables.
7806
38d8927c
MD
7807 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7808 of calling the procedure change-object-class.
7809
9cf5d9b7
MD
78102003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7811
7812 * ramap.c (scm_ramapc): Typo in error message.
7813
bbf8d523
MD
78142003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7815
b46fae00
MD
7816 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7817 slots with instance allocation.
241d9cea 7818
bbf8d523
MD
7819 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7820 class.
7821 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7822
7823 * goops.c (scm_generic_function_methods): Support extended
7824 generic functions.
7825
ebf9b47c
MD
78262002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7827
7828 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7829 Thanks to Neil for pointing this out!
ebf9b47c 7830
14a9ba3f
NJ
78312002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7832
7833 * lang.h: Remove declarations matching definitions removed from
7834 lang.c (just below).
7835
c6a040a8
NJ
78362002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7837
6054d805
NJ
7838 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7839 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7840 and already commented out.
7841
c6a040a8
NJ
7842 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7843 scm_lreadparen): Support reading vectors with Elisp syntax if
7844 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7845 is not currently defined, and there isn't even a configure switch
7846 to enable it yet.)
7847
3742c12f
MV
78482002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7849
7850 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7851 builds work.
7852 (EXTRA_DIST): Added version.h.in.
241d9cea 7853
fb50ef08
MD
78542002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7855
7856 This change makes it possible for one thread to do lazy sweeping
7857 while other threads are running. Now only the mark phase need to
7858 have all threads asleep. We should look further into this issue.
7859 Presently, I've put the locking of scm_i_sweep_mutex at
7860 "conservative" places due to my current lack of knowledge about
7861 the garbage collector. Please feel free to restrict these regions
7862 further to allow for maximal parallelism!
7863
7864 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7865
7866 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7867 scm_gc_register_collectable_memory): Substitute locking of
7868 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7869 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7870 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7871 the single-thread section (which now only contains the mark
7872 phase).
7873 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7874 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7875
7876 * threads.c (gc_section_mutex): Removed.
7877
9ed24633
MD
78782002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7879
0d48aca5
MD
7880 * threads.c (create_thread): Clear parent field in root state in
7881 order not to unnecessarily remember dead threads.
7882
9ed24633
MD
7883 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7884 (scm_trampoline_1, scm_trampoline_2): Use them.
7885
29717c89
MD
78862002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7887
7888 Partial introduction of real plugin interface.
7889
7890 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7891 (EXTRA_DIST): Added threads-plugin.c.
7892
7893 * threads-plugin.h, threads-plugin.c: New files.
7894
7895 * threads.h: #include "libguile/threads-plugin.h".
7896
7897 * threads.c: #include "libguile/threads-plugin.c".
7898
7899 * pthread-threads.c: Temporarily remove debugging functions.
7900
7901 * threads.c, threads.h (scm_yield): Added back.
7902
e29e0b09
MD
79032002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7904
7905 * threads.c (really_launch): Detach before unlocking
7906 thread_admin_mutex in order not to risk being joined.
7907 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7908 thread_admin_mutex locked during GC.
7909
7910 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7911 functions.
7912
0b6843b1 79132002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7914
6da2dfc4
MD
7915 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7916 support for debugging mutex operations.
7917
1b92fb6b
MD
7918 * threads.c (scm_thread): Removed filed joining_threads.
7919 (thread_print): Print thread number as well as address of thread
7920 structure.
0b6843b1
MD
7921 (scm_join_thread): Bugfix.
7922 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7923 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7924 scm_broadcast_condition_variable): Use the low-level API.
7925 (scm_all_threads): Return copy of thread list (to prevent
7926 unintended destruction).
7927 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7928
93cd4dcd
MD
7929 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7930 pthread "native" recursive mutex support.
7931
2ff4f181
MD
79322002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7933
28d52ebb
MD
7934 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7935 Simply lock a thread C API recursive mutex.
7936 (SCM_NONREC_CRITICAL_SECTION_START,
7937 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7938 SCM_REC_CRITICAL_SECTION_END): Removed.
7939
7940 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7941 direct calls to scm_rec_mutex_lock / unlock around the three calls
7942 to scm_m_expand_body.
7943
7944 * eval.c, eval.h (promise_free): New function.
7945 (scm_force): Rewritten; Now thread-safe; Removed
7946 SCM_DEFER/ALLOW_INTS.
7947
7948 * pthread-threads.h: Added partially implemented plugin interface
7949 for recursive mutexes. These are, for now, only intended to be
7950 used internally within the Guile implementation.
7951
7952 * pthread-threads.c: New file.
7953
7954 * threads.c: Conditionally #include "pthread-threads.c".
7955
7956 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7957 thread-safe;
7958
7959 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7960 SCM_GLOBAL_REC_MUTEX): New macros.
7961
7962 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7963 macros---use mutexes instead.
7964
7965 * tags.h (SCM_IM_FUTURE): New tag.
7966
7967 * eval.c (scm_m_future): New primitive macro.
7968 (SCM_CEVAL): Support futures.
7969 (unmemocopy): Support unmemoization of futures.
7970
7971 * print.c (scm_isymnames): Name of future isym.
7972
2ff4f181
MD
7973 * version.c: Unmade some changes to my private copy that got
7974 committed by mistake.
7975
392d2833
MD
79762002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7977
e200ddee
MD
7978 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7979 2002-12-10.
7980
392d2833
MD
7981 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7982
7983 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7984 logical place.
7985
7986 * threads.c (create_thread): Remember root object until the handle
7987 of the new thread is on all_threads list.
7988
7989 * root.c (scm_make_root): Moved copying of fluids until after
7990 creation of root handle so that the fluids are GC protected. Also
7991 removed the critical section.
7992
c4c52ebe
MD
79932002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7994
960c408c
MD
7995 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7996
3cdde9d6 7997 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7998 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7999 (scm_realloc): Serialize call to realloc
8000 (scm_calloc): Same for calloc.
8001 Thanks to Wolfgang Jaehrling!
8002 (Now we have to make sure all calls to malloc/realloc are made
8003 through scm_malloc.)
8004
960c408c
MD
8005 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
8006
c4c52ebe
MD
8007 * threads.c (really_launch): Release heap (to prevent deadlock).
8008 (create_thread): Release heap before locking thread admin mutex.
8009
b0dc3d71
MD
80102002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
8011
8012 * threads.c (scm_i_thread_invalidate_freelists): New
8013 function.
8014
8015 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
8016
8017 * modules.c (scm_export): Inserted a return statement.
8018
06e80f59
HWN
80192002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8020
8021 * modules.c (scm_export): new function
8022
8023 * gc-card.c: add a note about malloc()/free() overhead.
8024
a12611c3
MD
80252002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
8026
8027 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
8028 in srcdir.
8029
c7fabadf
MD
80302002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8031
8032 These changes remove scm_ints_disabled (which hasn't has any
8033 effect in Guile for quite some time).
241d9cea 8034
c7fabadf
MD
8035 * async.c, error.h (scm_ints_disabled): Removed.
8036
8037 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
8038 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
8039 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
8040 (old_ints): Removed.
8041
8042 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
8043 critical section.
8044 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
8045 SCM_ALLOW_INTS.
8046
9bc4701c
MD
80472002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8048
52340b65
MD
8049 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
8050 Removed accidental #if 0 around these functions.
8051
9bc4701c
MD
8052 These changes are the start of support for preemptive
8053 multithreading. Marius and I have agreed that I commit this code
8054 into the repository although it isn't thoroughly tested and surely
8055 introduces many bugs. The bugs should only be exposed when using
8056 threads, though. Signalling and error handling for threads is
8057 very likely broken. Work on making the implementation cleaner and
8058 more efficient is needed.
241d9cea 8059
9bc4701c
MD
8060 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
8061 (SCM_NONREC_CRITICAL_SECTION_START,
8062 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
8063 SCM_REC_CRITICAL_SECTION_END): New macros.
8064 (SCM_CRITICAL_SECTION_START/END): Defined here.
8065
8066 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
8067 the three calls to scm_m_expand_body.
8068
8069 * gc.h: #include "libguile/pthread-threads.h";
8070 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
8071
8072 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
8073 scm_t_key;
8074
8075 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
8076 access.
8077
8078 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
8079
8080 * gc-freelist.c, threads.c (really_launch): Use
8081 SCM_FREELIST_CREATE.
8082
8083 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
8084
8085 * gc.c (scm_i_expensive_validation_check, scm_gc,
8086 scm_gc_for_newcell): Put threads to sleep before doing GC-related
8087 heap administration so that those pieces of code are executed
8088 single-threaded. We might consider rewriting these code sections
8089 in terms of a "call_gc_code_singly_threaded" construct instead of
8090 calling the pair of scm_i_thread_put_to_sleep () and
8091 scm_i_thread_wake_up (). Also, we would want to have as many of
8092 these sections eleminated.
8093
8094 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
8095
8096 * inline.h: #include "libguile/threads.h"
8097
8098 * pthread-threads.h: Macros now conform more closely to the
8099 pthreads interface. Some of them now take a second argument.
8100
8101 * threads.c, threads.h: Many changes.
8102
81032002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8104
8105 * Makefile.am (version.h): Changed $^ --> $< in rule for
8106 version.h.
241d9cea 8107
b2cbe8d8
RB
81082002-12-08 Rob Browning <rlb@defaultvalue.org>
8109
8110 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
8111 (SCM_MINOR_VERSION): use @--@ substitution now.
8112 (SCM_MICRO_VERSION): use @--@ substitution now.
8113 (scm_effective_version): new function prototype.
8114
8115 * version.c (scm_effective_version): new function, also add
8116 effective-version.
8117
8118 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
8119 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
8120 SCM_LIBRARY_DIR.
8121 (version.h): generate this here rather than configure.in. This
8122 approach tracks source edits better (i.e. more immediately).
8123 Might be worth considering for other .in files too.
8124
5441c65c
MV
81252002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
8126
8127 Reorganized thread package selection. A thread package now only
8128 implements a small set of pthread like functions and Guile
8129 implements the rest on top of that. Guile's implementation is
8130 what the "coop-pthreads" package has been previously. Support for
8131 "coop" threads has been removed until I get time to add it again.
241d9cea 8132
5441c65c
MV
8133 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
8134 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
8135 null-threads.c, coop-pthreads.c.
8136 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
8137 pthread-threads.h.
241d9cea 8138
5441c65c
MV
8139 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
8140
8141 * threads.h: Do not include "libguile/coop-defs.h". Include
8142 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
8143 (previously deprecated) C level thread API prototypes. They are
8144 now in the thread package specific headers, "null-threads.h" and
8145 "pthread-threads.h".
8146 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
8147 New.
8148 (scm_threads_init): Removed.
8149 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
8150 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
8151 SCM_I_THREAD_SWITCH_COUNT): Define here.
8152 (scm_single_thread_p): Removed.
8153 (scm_call_with_new_thread): Take two args directly instead of list
8154 of two args.
8155 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
8156 SCM_SET_THREAD_LOCAL_DATA): Define here.
8157
8158 * threads.c: Merged with "coop-pthreads.c".
8159
8160 * null-threads.h: Implement pthread-like API as a set of macros.
8161
8162 * pthread-threads.h: New, implement pthread-like API by deferring
8163 to pthread itself.
241d9cea 8164
5441c65c
MV
8165 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
8166 has been lost in the reorganization.
8167
504d99c5
MD
81682002-12-01 Mikael Djurfeldt <mdj@linnaeus>
8169
8170 The following change makes it possible to move procedure
8171 application dispatch outside inner loops. The motivation was
8172 clean implementation of efficient replacements of R5RS primitives
8173 in SRFI-1.
8174
8175 The semantics is clear: scm_trampoline_N returns an optimized
8176 version of scm_call_N (or NULL if the procedure isn't applicable
8177 on N args).
8178
8179 Applying the optimization to map and for-each increases efficiency
8180 noticeably. For example, (map abs ls) is 8 times faster than
8181 before.
8182
8183 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
8184
8185 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
8186
8187 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
8188 (map, for-each): Handle also application on two args as a special
8189 case; Use trampolines.
8190
8191 Other changes:
241d9cea 8192
504d99c5
MD
8193 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
8194 (subr2oless): Removed.
8195 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
8196 vector GC protected.
8197
8198 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
8199 scm_out_of_range.
8200
63dd3413
DH
82012002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8202
8203 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
8204
4ba5f279
MD
82052002-11-17 Mikael Djurfeldt <mdj@linnaeus>
8206
8207 * debug.c (scm_make_iloc): Added missing "return".
8208
56ae231f
MV
82092002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
8210
8211 * strports.c (scm_eval_string_in_module): Validate second arg to
8212 be a module. Thanks to Arno Peters!
8213
80b28865
DH
82142002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8215
8216 * .cvsignore: remove goops.c
8217
c88b1456
DH
82182002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8219
8220 * modules.c (scm_env_top_level, scm_lookup_closure_module,
8221 module_variable, scm_module_lookup_closure,
8222 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
8223 scm_system_module_env_p): Don't compare SCM values with C
8224 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
8225 over SCM_NFALSEP.
8226
a8a19efc
DH
82272002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8228
8229 * eval.h (SCM_MAKE_ILOC): New macro.
8230
8231 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
8232 the iloc bitpattern here.
8233
76734914
MD
82342002-11-14 Mikael Djurfeldt <mdj@linnaeus>
8235
8236 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
8237 part of the API, otherwise it's difficult to write Guile
8238 extensions using non-blocking I/O => moved #include
8239 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
8240
8241 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
8242 s_unlock_mutex.
8243
8b5b4a75
MV
82442002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
8245
8246 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
8247 are defined in configure.in.
8248
8249 * threads.c: Removed SCM_API from function definitions. SCM_API
8250 is only for declarations.
8251
e5a83084
MD
82522002-11-07 Mikael Djurfeldt <mdj@linnaeus>
8253
9be8bb45
MD
8254 * coop-pthreads.h: Added support for thread specific data to the
8255 generic C API for the coop-pthreads case.
8256
e5a83084
MD
8257 * threads.c, threads.h (scm_cond_init): Undo unintentional API
8258 change.
6c214b62 8259 (scm_cond_broadcast): Added missing function.
e5a83084 8260
7edf178e
MV
82612002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8262
8263 * coop.c (coop_next_runnable_thread): Removed, wich should have
8264 happened when GUILE_ISELECT was hard-wired.
8265
7f5b1b77
MV
82662002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8267
7caa1b07
MV
8268 * Makefile.am (libguile_la_SOURCES): Added threads.c
8269 (DOT_DOC_FILES): Added threads.doc.
8270 (DOT_X_FILES): Added threads.x.
8271 (EXTRA_libguile_la_SOURCES): Removed threads.c.
8272 (noinst_HEADERS): Added coop-pthreads.c.
8273 (modinclude_HEADERS): Added coop-pthreads.h.
8274
8275 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
8276 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
8277
bb11cbf4
MV
8278 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
8279 Thanks to Bill Schottstaedt!
8280
1d4cbbed
MV
8281 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
8282
7f5b1b77
MV
8283 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
8284 SCM_COPT_THREADS is defined.
8285 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
8286 is defined.
241d9cea 8287
7f5b1b77
MV
8288 * coop-pthreads.c: Some harmless renamings of internal stuff.
8289 (create_thread): New, generalized version of
8290 scm_call_with_new_thread.
8291 (scm_call_with_new_thread): Use it.
8292 (scm_spawn_thread): New, use create_thread.
241d9cea 8293
d52f53b1
MV
82942002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8295
8296 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
8297 start testing it now.
8298
8299 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
8300 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
8301 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
8302 is defined.
8303
30f920c3
MV
83042002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
8305
8306 * scmsigs.c (signal_cell_handlers, install_handler_data,
8307 scm_delq_spine_x, really_install_handler, install_handler): New
8308 scheme for triggering signal handlers, to simplify take_signal.
8309 (take_signal): Simplified, to avoid race conditions.
8310 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
8311 hasn't exited yet.
241d9cea 8312
30f920c3
MV
8313 * async.c (scm_async_click): Reset pending_asyncs, handle
8314 signal_asyncs. Don't set cdr of a non-signal async to #f.
8315 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
8316 always. Set pending_asyncs.
8317 (scm_system_async_mark_for_thread): Check that thread has not
8318 exited.
8319 (scm_unmask_signals, decrease_block): Call scm_async_click after
8320 block_asyncs becomes zero.
241d9cea 8321
30f920c3
MV
8322 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
8323 active_asyncs.
8324
8325 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
8326 fields.
8327 * root.c (root_mark): Mark them.
8328 (make_root): Initialize them.
241d9cea 8329
30f920c3
MV
8330 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
8331 USE_COOP_THREADS.
8332 (scm_internal_select): Define one version for USE_COOP_THREADS and
8333 one for USE_NULL_THREADS.
8334 (scm_init_iselect): Likewise.
241d9cea 8335
30f920c3
MV
8336 * inline.h (scm_cell, scm_double_cell): Also allow
8337 USE_COPT_THREADS to not protect the slot initializers.
241d9cea 8338
30f920c3
MV
8339 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8340 because threads need to be initialized before the stack, but
8341 gsubrs such as scm_timed_condition_variable_wait can only be
8342 created later.
8343
8344 * threads.h: Include "coop-pthreads.h" when requested.
8345 (scm_threads_make_mutex, scm_threads_lock_mutex,
8346 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8347 not implemented anyway.
8348 (scm_init_thread_procs, scm_try_mutex,
8349 scm_timed_condition_variable_wait,
8350 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8351 scm_thread_exited_p): New prototypes.
8352 (struct timespec): Define if not already defined.
8353 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8354 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8355 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8356 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8357 deprecated.
8358
8359 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8360 requested.
8361 (scm_thread_exited_p): New.
8362 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8363 registered procedures.
8364 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8365 Use the latter as the procedure for "wait-condition-variable",
8366 thus offering a optional timeout parameter to Scheme.
8367 (scm_wait_condition_variable): Implement in terms of
8368 scm_timed_wait_condition_variable.
8369 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8370 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8371 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8372 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8373 scm_make_mutex, etc, and deprecate.
8374 (scm_init_threads): Do not create smobs, leave this to
8375 scm_threads_init. Do not include "threads.x" file.
8376 (scm_init_thread_procs): New, include "threads.x" here.
8377
8378 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8379 scm_null_mutex_lock, scm_null_mutex_unlock,
8380 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8381 scm_null_condvar_wait, scm_null_condvar_signal,
8382 scm_null_condvar_destroy): Removed.
8383 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8384 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8385 scm_cond_destory): Do not define, they are now deprecated and
8386 handled by threads.{h,c}.
241d9cea 8387
30f920c3
MV
8388 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8389 (scm_threads_init): Create smobs here, using the appropriate
8390 sizes.
8391 (block): Removed, now unused.
8392 (scm_c_thread_exited_p): New.
8393 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8394 scm_null_mutex_destroy, scm_null_condvar_init,
8395 scm_null_condvar_wait, scm_null_condvar_signal,
8396 scm_null_condvar_destroy): Removed and updated users to do their
8397 task directly.
8398 (scm_try_mutex, timeval_subtract,
8399 scm_timed_wait_condition_variable,
8400 scm_broadcast_condition_variable): New.
8401 (scm_wait_condition_variable): Removed.
8402
8403 * coop-defs.h (coop_m): Added 'level' field.
8404 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8405 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8406 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8407 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8408 define.
8409 (coop_condition_variable_broadcast): New.
8410
8411 * coop-threads.c (scm_threads_init): Create smobs here, using the
8412 appropriate sizes.
8413 (scm_c_thread_exited_p, scm_try_mutex,
8414 scm_timed_wait_condition_variable,
8415 scm_broadcast_condition_variable): New.
8416 (scm_wait_condition_variable): Removed.
8417
8418 * coop.c (coop_new_mutex_init): Initialize level.
8419 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8420 level.
8421 (coop_condition_variable_signal): Renamed to
8422 coop_condition_variable_broadcast and reimplemented in terms of
8423 that. Thus...
8424 (coop_condition_variable_broadcast): New.
8425
8426 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8427
8428 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
241d9cea 8429
087ed40d
MV
84302002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8431
65a23095
MV
8432 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8433 of system headers.
8434
087ed40d
MV
8435 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8436 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8437 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8438
5ec1d2c8
DH
84392002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8440
8441 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8442 scm_definedp to scm_defined_p and deprecated scm_definedp.
8443
100ae50d
DH
84442002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8445
8446 * async.h, async.c (scm_system_async): Fixed deprecation to work
8447 correctly when deprecated features are excluded.
8448
2794cb50
MV
84492002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8450
8451 * async.c (scm_system_async_mark_for_thread): Validate thread
8452 argument.
8453
8454 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8455
8456 * feature.c (scm_init_feature): Don't add 'threads' for
8457 USE_NULL_THREADS.
8458
8459 * inline.h (scm_cell, scm_double_cell): Also allow
8460 USE_NULL_THREADS to not protect the slot initializers.
8461
8462 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8463 "USE_THREAD".
8464
8465 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8466 (modinclude_HEADERS): Added null-threads.h.
8467
8468 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8469 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8470 (scm_init_threads): Use generic type names scm_t_mutex and
8471 scm_t_cond instead of coop_m and coop_c.
8472
8473 * null-threads.c, null-threads.h: New files.
8474
ff810d7a
MV
84752002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8476
8477 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8478 This is to support makes that know about "$<" only in pattern
8479 rules, like Sun's make.
8480
a90bdb73
MV
84812002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8482
8483 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8484 substitution. Thanks to David Allouche!
8485
e71a8bf2
DH
84862002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8487
8488 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8489 !SCM_ENABLE_DEPRECATED.
8490
41f77ff5
MV
84912002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8492
504d99c5 8493 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8494 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8495 otherwise.
8496
8497 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8498 USE_THREADS is defined. Use scm_root otherwise.
8499 (scm_sigaction_for_thread): Ignore THREAD argument when
8500 USE_THREADS is not defined. Also, move THREAD argument defaulting
8501 out of HAVE_SIGACTION section, which was a bug.
8502
6d16b125
MV
85032002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8504
8505 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8506 signal_handlers, not the closure that is used as the async.
8507 The closure is stored in signal_handler_cells, as previously.
241d9cea 8508
acfa1f52
MV
85092002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8510
8511 * root.h (scm_root_state): Added 'block_async' slot.
8512 (scm_active_asyncs): Removed abbrev.
8513 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8514
8515 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8516 abbrev.
8517
8518 * async.h (scm_call_with_blocked_asyncs,
8519 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8520 scm_c_call_with_unblocked_asyncs): New prototypes.
8521 (scm_mask_signals, scm_unmask_signals): Deprecated.
8522 (scm_mask_ints): Turned into a macro.
8523 * async.c (scm_mask_ints): Removed.
8524 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8525 this should not be necessary.
8526 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8527 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8528 deprecation warning and check for errornous use. Set block_asyncs
8529 instead of scm_mask_ints.
8530 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8531 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8532 scm_c_call_with_unblocked_asyncs): New.
241d9cea 8533
acfa1f52
MV
8534 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8535 Asyncs are enabled by default.
8536
34010f56
NJ
85372002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8538
8539 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8540 6th element: an input waiting thunk.
8541 (sf_input_waiting): New.
8542
9310d6f2
MV
85432002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8544
8545 * root.c (root_mark): Mark active_asyncs slot.
8546
8547 * async.c (scm_async_click): Set the cdr of a executed handler
8548 cell to SCM_BOOL_F, not SCM_EOL.
8549 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8550 and only if the handler procedure is not already present.
8551 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8552 with SCM_BOOL_F.
8553 * scmsigs.c (scm_sigaction_for_thread): Likewise.
241d9cea 8554
ac48c719
RB
85552002-10-04 Rob Browning <rlb@defaultvalue.org>
8556
1360a142
RB
8557 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8558
8559 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8560 scm_lt_dlopenext, and scm_lt_dlerror.
8561 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8562 and scm_lt_dlerror.
8563 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8564 and scm_lt_dlerror.
8565 (sysdep_dynl_init): switch to scm_lt_dlinit();
8566
8567 * Makefile.am (libguile_la_LIBADD): switch to use
8568 libguile-ltdl.la.
8569
504d99c5 8570 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8571
497092c9
MV
85722002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8573
8574 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8575 * scmsigs.c (got_signal): Removed.
8576 (signal_handler_cells, signal_handler_threads): New.
8577 (take_signal): Queue the cell of the signal for the specified
8578 thread. Reset the signal handler on systems that don't have
8579 sigaction.
8580 (sys_deliver_signals): Removed.
8581 (close_1): New.
8582 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8583 extended to also set the thread of a signal and allocate a cell
8584 for it. Keep the Scheme name "sigaction". Check that signum is
8585 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8586 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8587 (scm_init_scmsigs): Allocate signal_handler_cells and
8588 signal_handler_threads vectors.
8589
8590 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8591 that system asnycs and user asyncs are separated. Reimplemented
8592 system asyncs to work per-thread.
8593
8594 * gc.c (scm_init_gc): Do not use scm_system_async.
8595
8596 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8597 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8598 Removed prototypes.
8599 (scm_i_queue_async_cell): New.
241d9cea 8600
497092c9
MV
8601 * __scm.h (scm_asyncs_pending_p): Removed.
8602 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8603 scm_asyncs_pending_p.
8604
8605 * async.h (scm_system_async_mark_for_thread): New prototype.
8606
8607 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8608
8609 * root.h (scm_root_state): Added new "active_asyncs" slot.
8610 * root.c (scm_make_root): Initialize it to SCM_EOL.
8611
8612 * coop-defs.h (coop_t): Added new "handle" slot.
8613 * coop-threads.c (all_threads, scm_current_thread,
8614 scm_all_threads, scm_i_thread_root): New.
8615 (scm_threads_init): Add main thread to all_threads.
8616 (scheme_launch_thread): Remove thread from all_threads when it
8617 terminates.
8618 (scm_call_with_new_thread): Initialize handle slot of coop_t
8619 structure and add new thread to all_threads.
8620 (scm_spawn_thread): Likewise.
8621
8622 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8623 * threads.c (scm_current_thread, scm_all_threads): Register as
8624 primitives.
8625
8626 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8627
480fa28d
NJ
86282002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8629
8630 * script.c (scm_compile_shell_switches): Fix bad spelling of
8631 `explicitly' in comment.
8632
86332002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8634
8635 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8636 Refer to provided? in doc string rather than deprecated feature?.
8637
3553e1d1
GH
86382002-09-24 Gary Houston <ghouston@arglist.com>
8639
8640 * inline.h (scm_double_cell): prevent reordering of statements
8641 with any following code (for GCC 3 strict-aliasing).
8642 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8643 the earlier version of the reordering prevention.
8644
4ad0814a
HWN
86452002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8646
241d9cea 8647 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
4ad0814a 8648
e88e4f2e
HWN
86492002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8650
8651 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8652 protection.
8653
1e71eafb
HWN
86542002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8655
8656 * inline.h: include stdio.h
8657
8658 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8659
61ef9c1f
HWN
86602002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8661
dac04e9f
HWN
8662 * gc-segment.c (scm_i_make_initial_segment): check user settings
8663 for sanity.
8664
8665 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8666 sanity.
dac04e9f 8667
241d9cea 8668 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
dac04e9f 8669
ffd72400
HWN
8670 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8671
8672 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8673 these won't ever wrap around with high memory usage. Thanks to
8674 Sven Hartrumpf for finding this.
ffd72400 8675
5bd4a949
HWN
8676 * gc-freelist.c: include <stdio.h>
8677
61ef9c1f
HWN
8678 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8679
ffd0ef3b
MV
86802002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8681
a27e3d14
MV
8682 * vectors.h (SCM_VECTOR_REF): New.
8683
ffd0ef3b
MV
8684 * snarf.h (SCM_DEFINE_PUBLIC): New.
8685
f8a1712b
MV
86862002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8687
8688 * socket.c (scm_addr_vector): Added size of address to arguments.
8689 Use it to avoid accessing a non-existent path in a sockaddr_un.
8690 Changed all callers.
8691
7200a36b
HWN
86922002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8693
1383773b
HWN
8694 * gc.h: remove DOUBLECELL card flags.
8695
8696 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8697 scm_realloc().
8698
8699 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8700 init loop; handle this from scm_init_card_freelist()
8701
8702 * gc-card.c (scm_init_card_freelist): init bit vector here.
8703
7200a36b 8704 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8705 num2float.i.c (FLOAT2NUM): idem
7200a36b 8706
9981de3a
HWN
87072002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8708
8709 * eval.h: prepend libguile/ to include path
8710
19647556
MV
87112002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8712
8713 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8714 years. Thanks to Martin Grabmüller!
19647556 8715
38d1262a
HWN
87162002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8717
8718 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8719 unsigned numbers for computing minimum heap increment. This
8720 prevents weird results when a a negative minimum increment is
8721 computed.
8722
f800ebfb
MV
87232002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8724
8725 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8726 instead of the old tricks.
f800ebfb
MV
8727
8728 * guile-snarf.in: Do not expect the input file to be the first
8729 argument after the optional "-o" option, just pass everything to
8730 the pre-processor without extracting the input file name.
8731
4a5309c9
HWN
87322002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8733
8734 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
241d9cea 8735 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
4a5309c9 8736
f2893a25
HWN
87372002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8738
8739 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8740 Bill Schottstaedt for the bug report
8741
483f518b
MV
87422002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8743
8744 * print.c (scm_iprin1): Print primitives generics always as
8745 "primitive-generic" even when they have no primitive methods yet.
8746
917adc55
GH
87472002-08-17 Gary Houston <ghouston@arglist.com>
8748
8749 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8750 call.
8751
67329a9e
HWN
87522002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8753
85835e59 8754 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8755
8756 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8757 malloc.
8758
8759 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8760 only use SCM_MIN_HEAP_SEG_SIZE.
8761
8762 * ports.c (scm_add_to_port_table): add backwards compatibility
8763 function
8764
8765 * ports.h: use scm_i_ prefix for port table and port table size.
241d9cea 8766
f07c886a
MD
87672002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8768
8769 * vports.c (scm_make_soft_port): Initialize pt variable.
8770
dc61cbc6
MV
87712002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8772
8773 * strports.h (scm_c_eval_string_in_module,
8774 scm_eval_string_in_module): New prototypes.
8775 * strports.c (scm_eval_string_in_module): New, but use
8776 "eval-string" as the Scheme name and make second parameter
8777 optional.
8778 (scm_eval_string): Implement using scm_eval_string_in_module.
8779 (scm_c_eval_string_in_module): New.
8780 Thanks to Ralf Mattes for the suggestion!
241d9cea 8781
da220f27
HWN
87822002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8783
be3ff021
HWN
8784 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8785 message and abort.
241d9cea 8786
be3ff021
HWN
8787 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8788
da220f27
HWN
8789 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8790 stead of scm_t_port*. The function now takes a tag argument.
8791
eab1b259
HWN
87922002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8793
8794 * gc.h: add scm_debug_cells_gc_interval to public interface
8795
8796 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8797
8798 * gc.c (scm_i_expensive_validation_check): separate expensive
8799 validation checks from cheap ones.
8800
ba1b2226
HWN
88012002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8802
8803 * read.c (scm_input_error): new function: give meaningful error
8804 messages, and throw read-error
8805
8806 * gc-malloc.c (scm_calloc): add scm_calloc.
8807
39e8f371
HWN
88082002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8809
241d9cea 8810 * tags.h: remove GC bits documentation from the tags table.
33138b05 8811
39e8f371
HWN
8812 * read.c (INPUT_ERROR): Prepare for file:line:column error
8813 messages for errors in scm_lreadr() and friends.
8814
88152002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8816
8817 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
241d9cea 8818 implementation).
39e8f371
HWN
8819 (scm_gc_calloc): new function
8820
26e68795 88212002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8822
5f16b897
HWN
8823 * ports.c (scm_new_port_table_entry): init port entry to 0
8824 completely.
241d9cea 8825
402788a9
HWN
8826 * ports.c (scm_new_port_table_entry): change function from
8827 scm_add_to_port_table. This prevents cells with null-pointers from
8828 being exposed to GC.
8829
504d99c5 8830 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8831 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8832
504d99c5 8833 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8834 to gc-stats.
8835
c8a1bdc4
HWN
8836 * numbers.c (big2str): return "0" for 0 iso. ""
8837
c2cbcc57
HWN
8838 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8839 private-gc.h: new file
c8a1bdc4
HWN
8840
8841 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8842 sweeping. More documentation in workbook/newgc.text
8843
aea06b34
MV
88442002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8845
8846 * random.c (rstate_free): Return zero.
8847
35060ae9
DH
88482002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8849
8850 * environments.c (remove_key_from_alist): Removed.
8851
8852 (obarray_remove): Simplified.
8853
6a535440
SJ
88542002-07-24 Stefan Jahn <stefan@lkcc.org>
8855
241d9cea 8856 * continuations.h: ia64: Include <signal.h> before
6a535440
SJ
8857 <sys/ucontext.h>.
8858
bcbd25b7
DH
88592002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8860
8861 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8862
26e68795 88632002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8864
8865 * goops.c (scm_compute_applicable_methods): use
8866 scm_remember_upto_here_1 iso scm_remember_upto_here
8867
8868 * macros.c: include deprecation.h
8869
504d99c5 8870 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8871 macro arg.
504d99c5 8872 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8873
8874 * net_db.c, posix.c, socket.c: variable naming: change ans to
8875 result.
8876
8877 * sort.c (scm_merge_vector_x): accept vector as argument
8878 iso. SCM*. This is needed for full GC correctness.
8879
8880 * gc.h: undo previous undocumented changes related to #ifdef
8881 GENGC.
8882
26e68795 88832002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8884
8885 * *.c: add space after commas everywhere.
8886
8887 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8888 Document cases where SCM_WRITABLE_VELTS() is used.
241d9cea 8889
34d19ef6
HWN
8890 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8891 SCM_VELTS() return a const pointer
8892 (SCM_VECTOR_SET): add macro.
8893
3063e30a
DH
88942002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8895
8896 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8897 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8898 Deprecated the special kind of built-in dynamic syntax transformer
8899 that was inaccurately named "macro". Note: The built-in syntax
8900 transformers that are named "mmacro" or "memoizing-macro" still
8901 exist, and it is these which come much closer to what one would
8902 call a macro.
8903
4c5f8e8f
NJ
89042002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8905
8906 * eval.c (unmemocopy): Fix for
8907 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8908 with internal definitions and local-eval).
8909
4f6f9ae3
GH
89102002-07-12 Gary Houston <ghouston@arglist.com>
8911
8912 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8913 defined. They don't do anything useful, especially since the
8914 only case where DYNAMIC_LINKING is undefined seems to be
8915 when --with-modules=no is given to configure, which is basically
8916 requesting that the "dynamic linking module" be omitted.
8917
8918 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8919 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8920
8921 * extensions.c (load_extension): check DYNAMIC_LINKING for
8922 scm_dynamic_call.
8923 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8924 scm_init_dynamic_linking.
8925
c21935e6
MV
89262002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8927
8928 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8929 check for Cygwin when including <winsock2.h>, this is already
8930 check for by configure. Thus, revert change from 2002-07-07.
8931
ee95d597
GH
89322002-07-10 Gary Houston <ghouston@arglist.com>
8933
9540b68f 8934 * eq.c: include <string.h>
ee95d597
GH
8935 * dynl.c: docstring editing.
8936
46732b54
GH
89372002-07-09 Gary Houston <ghouston@arglist.com>
8938
8939 * dynl.c (scm_dynamic_call): docstring editing.
8940
c09d12e0
RB
89412002-07-08 Rob Browning <rlb@defaultvalue.org>
8942
8943 * gc_os_dep.c: HURD fixes.
8944
3f6571eb
MV
89452002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8946
8947 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8948
8949 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8950 this should be compiled for BUILD host.
8951 Override default rule for
8952 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8953 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8954 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8955
8956 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8957 <winsock2.h> on Cygwin even when we have it.
8958
bd987b8e
DH
89592002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8960
8961 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8962 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8963 the code. Full number of arguments checking of closures is
8964 mandatory now. However, the option to disable the checking has
8965 most probably not been used anyway.
8966
8505e285
DH
89672002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8968
bd987b8e
DH
8969 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8970 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8971 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8972 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8973 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8974 (scm_source_properties, scm_set_source_properties_x,
8975 scm_source_property): Removed compile time option SCM_RECKLESS to
8976 clean up the code. Full number of arguments checking of closures
8977 is mandatory now. However, the option to disable the checking has
8978 most probably not been used anyway.
8505e285
DH
8979
8980 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8981 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8982
2ee08a28
GH
89832002-06-30 Gary Houston <ghouston@arglist.com>
8984
732b9327
GH
8985 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8986 do anything useful. Added a comment about need for a mutex if
8987 pre-emptive threading is supported.
8988
2ee08a28
GH
8989 * posix.c (scm_convert_exec_args), dynl.c
8990 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8991 allocate_string_pointers. 2) simplified: don't reallocate the
8992 strings, just make an array of pointers 3) avoid memory leaks on
8993 error 4) let the procedure report errors in its own name.
8994 Consequences: 1) the procedures now assume that SCM strings are
8995 nul-terminated, which should always be the case. 2) Since strings
8996 are not reallocated, it's now possible for strings passed to
8997 dynamic-args-call to be mutated.
8998
c136c920
DH
89992002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9000
9001 * __scm.h, eval.c, eval.h: Removed compile time option
9002 MEMOIZE_LOCALS to clean up the code. Now, caching of local
9003 variable positions during memoization is mandatory. However, the
9004 option to disable the caching has most probably not been used
9005 anyway.
9006
e540802f
MV
90072002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
9008
9009 * print.c (scm_simple_format): Print missing part of format before
9010 ~% control. Thanks to Daniel Skarda!
9011
4c1ffcdd
MV
90122002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
9013
9014 * mkstemp.c: Added exception notice to license statement.
9015
ba1b077b
MV
90162002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
9017
8dc434c7
MV
9018 * numbers.c (mem2ureal): When returning an inexact zero, make sure
9019 it is represented as a floating point value so that we can change
9020 its sign.
9021
ba1b077b
MV
9022 From John W. Eaton <jwe@bevo.che.wisc.edu>
9023
9024 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
9025
74c58131
TTN
90262002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
9027
9028 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 9029 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 9030
8766d4b5
MV
90312002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
9032
9033 * eq.c (real_eqv): New.
9034 (scm_eqv_p): Use it when comparing reals and complexes.
9035
9036 * numbers.c: Include <string.h>, for strncmp.
9037 (mem2complex): Do not create negative NaNs.
9038 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
9039 NaN.
9040 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 9041
1d8c3cad
MV
90422002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
9043
9044 * posix.c (scm_putenv): Handle removing variables explicitely by
9045 calling unsetenv.
9046
9047 From John W. Eaton.
74c58131 9048
1d8c3cad
MV
9049 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
9050 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
9051 and scm_nan.
9052 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
9053 [SCO && ! HAVE_ISINF] (isinf): New function.
9054 (xisinf, xisnan): New functions.
9055 (IS_INF): Delete.
9056 (isfinite): Define in terms of xisinf.
9057 (scm_inf_p, scm_nan_p): New functions.
9058 (guile_Inf, guile_NaN): New file-scope vars.
9059 (guile_ieee_init): New function.
9060 (scm_inf, scm_nan): New functions.
9061 (idbl2str): Handle Inf and NaN. Remove funny label and
9062 corresponding gotos.
9063 (ALLOW_DIVIDE_BY_ZERO): New macro.
9064 (scm_divide): Allow division by zero to occur if
9065 ALLOW_DIVIDE_BY_ZERO is defined.
9066 Handle bignums and ints as special cases.
9067
9068 Additional stuff by me:
9069
9070 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
9071 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
9072 (iflo2str): Don't output a '+' for negative numbers or for Inf and
9073 NaN. They will provide their own sign.
9074 (scm_divide): Only allow divides by inexact zeros. Dividing by
9075 exact zeros still signals an errors.
74c58131 9076
7a0c65eb
TTN
90772002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
9078
87b72063 9079 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 9080 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 9081 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
9082 Thanks to Andreas Rottmann.
9083
5e423a39
GH
90842002-04-20 Gary Houston <ghouston@arglist.com>
9085
9086 * removal of unused fields in root state (thanks to Christopher
9087 Cramer for pointing out the disuse.)
9088 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 9089 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 9090
5e423a39
GH
9091 * root.c (root_mark): don't mark them.
9092 (scm_make_root): don't set them to #f.
9093 * init.c (scm_init_standard_ports): don't initialise with the
9094 default ports.
9095
9d2cce76
MV
90962002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
9097
9098 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
9099 cpp_sig_symbols.c.
9100
91012002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
9102
9103 * guile-snarf.in: Do not clean input file. This would write to
9104 the $(srcdir) during a VPATH build, which is not allowed. It also
9105 isn't needed since it only works when an output filename has been
9106 specified and in that case we don't need to clean the input file
9107 because the output file will already exist.
9108
6f79b6cc
MV
91092002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
9110
9111 * guile-snarf: Install the trap for removing $cleanfile only when
9112 the value of $cleanfile is actually known.
9113
21550b10
RB
91142002-04-10 Rob Browning <rlb@defaultvalue.org>
9115
9116 * .cvsignore: add versiondat.h and *.c.clean.c.
9117
bc76d628
DH
91182002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9119
9120 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
9121 function, replaces macro SRCBRKP.
9122
9123 (SRCBRKP): Deprecated.
9124
9125 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
9126 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
9127 temporary variable.
9128
5132eef0
DH
91292002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9130
9131 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
9132 CHECK_EXIT and removed all references to them.
9133
680516ba
DH
91342002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
9135
9136 * debug.h (scm_ready_p, debug_print): Removed declarations.
9137
9138 * eval.c (EVALCELLCAR): Removed.
9139
9140 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
9141 operation from condition.
9142
e2bd68e0
MV
91432002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
9144
9145 * guile-snarf.in: When the output filename is "-", write to
9146 stdout. When no "-o" option is given, use "-" as the output
9147 filename (i.e., stdout). Only 'clean' the inputfile or remove the
9148 output file on error when the output file name is not "-". Define
9149 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
9150
9151 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
9152
ab1f1094
DH
91532002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9154
9155 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
9156 and the corresponding goto statements. Removed redundant code.
9157
42030fb2
DH
91582002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9159
9160 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
9161 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
9162 Re-enabled handing of rpsubrs and asubrs.
9163
e050d4f8
DH
91642002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
9165
9166 * eval.c (SIDEVAL): Removed.
9167
9168 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
9169 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
9170 argument checking order for set! to locals, variables and symbols.
9171 Improvements to control structure. Removed some uses of arg1 and
9172 arg2 as temporary variables.
9173
a6d344d3
TTN
91742002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
9175
9176 * guile-snarf.in: Remove "--compat=1.4" support.
9177 Add "-d" and "-D" support.
9178
9179 (deprecated_list): New var.
9180 (compat_mode_clean_xxx): Delete.
9181 (grep_deprecated): New func.
9182 ("main"): If "-d" or "-D", call `grep_deprecated'.
9183
3939e9df
NJ
91842002-03-15 Neil Jerram <neil@ossau.uklinux.net>
9185
387d418c
NJ
9186 * hooks.h: Change scm_t_c_hookype_t everywhere to
9187 scm_t_c_hook_type.
9188
bb2c02f2 9189 Docstring fixes:
a6d344d3 9190
bb2c02f2
NJ
9191 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
9192
9193 * ports.c (scm_sys_make_void_port): Use `@file'.
9194
9195 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
9196 than `else'.
9197
9198 * macros.c (scm_makmacro): Don't say that the form replaces its
9199 source, because it doesn't.
9200 (scm_makmmacro): Clarify difference between this and scm_makmacro.
9201
9202 * backtrace.c (scm_display_error), filesys.c (scm_umask,
9203 scm_select, scm_basename), goops.c (scm_method_generic_function),
9204 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
9205 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
9206 spelling mistakes.
9207
3939e9df
NJ
9208 * debug.c (scm_debug_options), eval.c
9209 (scm_eval_options_interface), read.c (scm_read_options): Change
9210 incorrect @var in docstring to @code.
9211
3b3cc781
MV
92122002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
9213
500b0d5b
MV
9214 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
9215
3b3cc781
MV
9216 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
9217 guile-snarf can remove trailing non-init code.
9218
9219 * guile-snarf.in (modern_snarf): Remove everything following and
9220 including "^:^" from the output.
9221
dff98306
DH
92222002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9223
9224 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
9225
9226 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
9227
2287fb53
TTN
92282002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
9229
9230 * guile-snarf.in: Update copyright.
9231 Rewrite to internalize error handling.
9232 Add "--compat=1.4" handling.
9233 Add commentary.
9234
9235 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
9236 (snarfcppopts): New var.
9237 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
9238 (.c.doc): Use $(snarfcppopts).
9239
822250a4
TTN
9240 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
9241 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
9242 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
9243 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
9244 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9245 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
9246 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
9247 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
9248 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
9249 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
9250 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
9251 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
9252 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
9253 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
9254
b7798e10
DH
92552002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9256
9257 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
9258 The next step will be to remove the union 't' and simplify the
9259 code of SCM_CEVAL that way.
9260
04a98cff
NJ
92612002-03-12 Neil Jerram <neil@ossau.uklinux.net>
9262
9263 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
9264 rreadfds, rwritefds, rexceptfds): Made static.
9265
9266 * gc.c (terminating), fports.c (terminating): Renamed
9267 scm_i_terminating.
9268
16d98032
MV
92692002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
9270
5046250e
MV
9271 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
9272 potential overflow problems. Thanks to John W Eaton!
9273
8794207d
MV
9274 * strop.c (string_capitalize_x): Treat characters as unsigned so
9275 that 8-bit chars work. Thanks to David Pirotte!
16d98032 9276
1d15ecd3
DH
92772002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9278
9279 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
9280 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
9281 proc as temporary variables. Introduced temporary variables with
9282 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9283 by a more explicit predicate in some places.
9284
92852002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
9286
9287 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
9288 Added lots of comments regarding the implementation of #@dispatch.
9289 Changed intra-procedure communication to use t.arg1 instead of
9290 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
9291 variables. Introduced temporary variables with hopefully
9292 descriptive names for clarification. Replaced SCM_N?IMP by a more
9293 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
9294 of computing the expression explicitly. Eliminate now unused
9295 label nontoplevel_cdrxbegin.
9296
9297 * goops.h (SCM_INSTANCE_HASH): New macro.
9298
9299 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
9300
1ebf1566
TTN
93012002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9302
9303 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
9304 "guile-snarf" moved back from `noinst_SCRIPTS'.
9305
020c890c
NJ
93062002-03-08 Neil Jerram <neil@ossau.uklinux.net>
9307
58d233cc
NJ
9308 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
9309 exists when adding a source property other than those that are
9310 handled explicitly, add the new property to the SRCPROPS obj's
9311 plist.
9312
020c890c
NJ
9313 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
9314 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
9315
9316 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
9317 debug.status. It isn't needed, and it can overflow the bits
9318 reserved for it (which may lead to a segv or a GC abort).
9319
3f04400d
DH
93202002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9321
9322 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
9323 side-effecting operations from conditions and macro calls.
9324 Replaced SCM_N?IMP by a more explicit predicate in some places.
9325 Minimized the scope of some variables.
9326
97820583
SJ
93272002-03-02 Stefan Jahn <stefan@lkcc.org>
9328
9329 * convert.i.c: Fixed int <-> long conversions which would have
9330 failed if their sizes were different.
9331
38ace99e
DH
93322002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9333
9334 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9335 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9336 as temporary variables. Removed side-effecting operations from
9337 conditions and macro calls. Introduced temporary variables with
9338 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9339 by a more explicit predicate in some places. Removed code that
9340 was conditionally compiled if SICP was defined - which it never
9341 is.
9342
e5cb71a0
DH
93432002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9344
9345 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9346 Removed some uses of t.arg1 and proc as temporary variables.
9347 Removed side-effecting operations from conditions and macro calls.
9348 Introduced temporary variables with hopefully descriptive names
9349 for clarification. Replaced SCM_N?IMP by a more explicit
9350 predicate in some places.
9351
6a0f6ff3
DH
93522002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9353
9354 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9355 explicit predicate in some places.
9356
9357 (CHECK_EQVISH): Removed.
9358
9359 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9360 variables. Removed side-effecting operations from conditions and
9361 macro calls. Introduced temporary variables for clarification.
9362 Sorted if-else-if check for the type of the last form in a list by
9363 frequency. Avoided some unnecessary tail-recursion calls.
9364
228a24ef
DH
93652002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9366
9367 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9368 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9369 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9370 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9371 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9372 naming scheme for types.
9373
9374 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9375 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9376 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9377 (scm_make_environment), eval.c (scm_closure), fports.c
9378 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9379 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9380 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9381 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9382 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9383 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9384 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9385 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9386 scm_alloc_cell to scm_cell.
9387
9388 * environments.c (core_environments_observe), gc.c
9389 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9390 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9391 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9392 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9393 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9394 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9395 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9396 scm_double_cell.
9397
edb810bb
SJ
93982002-02-27 Stefan Jahn <stefan@lkcc.org>
9399
9400 * convert.i.c, convert.c: Better range checking.
9401
9402 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9403
1ebf1566 9404 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9405 Windows (MinGW).
9406
327d4dd3
TTN
94072002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9408
9409 * Makefile.am: Update path to pre-inst-guile automake frag.
9410
89d7a92c 94112002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9412
9413 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9414 features are excluded.
9415
89d7a92c 94162002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9417
9418 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9419
4f2716b6
GH
94202002-02-25 Gary Houston <ghouston@arglist.com>
9421
9422 * convert.c: include <string.h> for convert_i.c.
9423
46151112
RB
94242002-02-24 Rob Browning <rlb@defaultvalue.org>
9425
9426 * .cvsignore: add stamp-h1.
9427
cd328b4f
NJ
94282002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9429
9430 * unif.c (scm_array_to_list): Correct name, which had been
9431 accidentally changed to scm_t_arrayo_list!
9432
c709de7f
MD
94332002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9434
9435 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9436 underflowing scm_mallocated.
9437
c1965d31
MV
94382002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9439
9440 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9441 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9442 Reimplemented using the new scm_gc_malloc, etc., functions and
9443 deprecated.
9444
b606945b
TTN
94452002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9446
9447 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9448 to `noinst_PROGRAMS'.
9449 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9450 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9451
7c686ba8
MV
94522002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9453
9454 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9455 non-zero is returned from a port or smob free function.
9456 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9457 scm_gc_register_collectable_memory,
9458 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9459 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9460
9461 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9462 debug-malloc.c, dynl.c, environments.c, environments.h,
9463 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9464 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9465 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9466 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9467 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9468 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9469 appropriate. Return zero from smob and port free functions.
9470
9471 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9472
9473 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9474 messages while the GC is running.
9475 (scm_c_issue_deprecation_warning_fmt): New.
9476
9477 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9478 it is pointing to the putback buffer.
9479
66adc0a6
TTN
94802002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9481
9482 * gsubr.c (create_gsubr): On "too many args" error,
9483 also display arg count and name. Thanks to Bill Schottstaedt.
9484
0187b4f4
TTN
94852002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9486
9487 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9488
9489 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9490 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9491 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9492
9493 * guile-snarf-docs-texi.in: Bye bye.
9494
402e687c
MV
94952002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9496
9497 * symbols.c (scm_make_symbol): Fix typo in docstring.
9498
9499 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9500 scm_make_symbol): New prototypes.
9501
319b98ed
MV
95022002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9503
9504 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9505 (SCM_SYMBOL_INTERNED_P): New.
9506 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9507 SCM_MAKINUM since hash values can well be bignums.
9508 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9509 This signals a interned symbol.
9510 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9511 scm_make_symbol): New.
0187b4f4 9512
319b98ed
MV
9513 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9514
34472dfe
TTN
95152002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9516
9517 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9518 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9519 Thanks to Dave Love.
34472dfe 9520
1b39c2e3
MV
95212002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9522
9523 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9524 This might help to make unintended clashes less likely.
1b39c2e3
MV
9525 (scm_string_to_symbol): Protect the string until the symbols is
9526 created.
9527
1fa86ca5
SJ
95282002-01-31 Stefan Jahn <stefan@lkcc.org>
9529
9530 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9531 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9532 functions for the deprecated gh interface.
9533
9534 * Makefile.am: Setup rules for new `convert.*' files.
9535
af68e5e5
SJ
95362002-01-28 Stefan Jahn <stefan@lkcc.org>
9537
9538 * symbols.c (scm_c_symbol2str): New function, replacement for
9539 `gh_scm2newsymbol()'.
9540
34472dfe 9541 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9542 replacement for `gh_get_substr()'.
9543
9544 * socket.c: Include `stdint.h' if available for the `uint32_t'
9545 declaration.
9546
504d99c5 9547 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9548 compiler warning).
9549
9550 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9551
c96d76b8 95522002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9553
c96d76b8 9554 Other changes unrelated to Elisp...
34472dfe 9555
c96d76b8
NJ
9556 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9557 "if".
9558 (comments): Fix a few typos.
9559 (scm_for_each): Add parentheses around oddly unparenthesized
9560 if/while conditions.
9561
9562 * read.c (scm_read_opts): Add full stop at end of doc for
9563 `keywords' option.
9564
9565 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9566 instead of gh_symbol2scm.
9567
9568 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9569 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9570
9571 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9572 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9573
9574 First batch of changes for Elisp support...
9575
9576 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9577 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9578 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9579
9580 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9581 conditionalize compilation and initialization of Elisp support
9582 function.
34472dfe 9583
c96d76b8
NJ
9584 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9585 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9586 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9587 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9588 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9589 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9590 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9591 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9592 options.c (change_option_setting, scm_options), posix.c
9593 (environ_list_to_c), print.c (scm_iprlist), throw.c
9594 (scm_exit_status), vectors.c (scm_vector), weaks.c
9595 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9596
9597 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9598 just SCM_FALSEP.
34472dfe 9599
c96d76b8
NJ
9600 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9601 of just SCM_BOOLP.
9602
9603 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9604 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9605 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9606 (scm_m_atfop): Support function aliasing. Support both function
9607 args, which need transformation, and macro args, which do not.
9608 Add explanatory comments.
9609 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9610 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9611 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9612 SCM_NULLP || SCM_NILP instead of checks against (removed)
9613 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9614 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9615
9616 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9617 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9618 these, but I don't want to remove them yet, just in case.
9619 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9620 Elisp nil value.
9621
9622 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9623 against (removed) scm_lisp_nil.
9624 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9625 (SCM_NULL_OR_NIL_P): New.
9626
9627 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9628 SCM_VALIDATE_NULL.
9629
9630 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9631 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9632 value).
9633
9634 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9635 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9636 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9637 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9638
9639 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9640 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9641 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9642 Numbering shifted down accordingly.
9643 (SCM_ELISP_NIL): New IFLAG.
9644
9645 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9646
a392ee15
DH
96472002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9648
9649 * eval.c: Removed outdated references to "everr". Improved some
9650 comments.
9651
9652 (scm_deval_args, deval_args): Renamed scm_deval_args to
9653 deval_args, since it is not part of the interface.
9654
9655 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9656 use references to debug.vect[0] before it exists. Add parentheses
9657 to switch statement.
9658
9659 * goops.h: Added local emacs variables.
9660
24933780
DH
96612002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9662
9663 * eval.[ch] (scm_deval_args): Made static.
9664
9665 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9666 test.
9667
9668 * strings.c (scm_c_string2str): Clarified comment. Replaced
9669 THINKME by FIXME for uniformness. Removed question about whether
9670 arguments need to be protected from garbage collection: Arguments
9671 must be protected as any other variable.
9672
f9450cdb
DH
96732002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9674
9675 * procs.h (SCM_CLOSURE_BODY): New Macro.
9676
9677 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9678 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9679 get_slot_value, set_slot_value), procs.c
9680 (scm_procedure_documentation), sort.c (closureless), stacks.c
9681 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9682 SCM_CLOSURE_BODY.
9683
9684 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9685
5dc64f64
MV
96862001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9687
9688 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9689 use "cp" instead.
9690
197ee3d3
MV
96912001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9692
9693 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9694 everywhere.
9695
9696 * continuations.c (scm_make_continuation): Do not retain the
9697 throw_value when the continuation is invoked.
9698
4d4528e7
SJ
96992001-12-08 Stefan Jahn <stefan@lkcc.org>
9700
9701 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9702 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9703 THINKME's regarding the malloc policy for the missing converter
9704 routines.
9705
98347362
NJ
97062001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9707
9708 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9709 gh_symbol2scm.
9710
1fc8902f
DH
97112001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9712
9713 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9714 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9715
9716 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9717 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9718 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9719 macros.
9720
9721 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9722
9723 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9724 SCM_GC_CELL_* macros when accessing free cells.
9725
4878beec
MV
97262001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9727
9728 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9729 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9730 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9731 * strings.h (SCM_MAKE_STRING_TAG): New.
9732 * procs.h (SCM_MAKE_CCLO_TAG): New.
9733 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9734
9735 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9736 !SCM_ENABLE_DEPRECATED.
9737
9738 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9739 New.
9740
9741 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9742 signal handlers are allowed to divert the flow of control. Call
9743 scm_system_async_mark_from_signal_handler instead of
9744 scm_system_async_mark.
9745
9746
9747 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9748 scm_alloc_double_cell in their place.
34472dfe 9749
4878beec
MV
9750 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9751 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9752 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9753 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9754 scm_deprecated_newcell and scm_deprecated_newcell2.
9755
9756 gc.c (scm_tc16_allocated): Only define when including deprecated
9757 features.
9758 (scm_debug_newcell, scm_debug_newcell2): Removed.
9759 (scm_init_storage): Do not initialize scm_tc16_allocated.
9760 (scm_init_gc): Do it here.
9761 (allocated_mark): New, from old code.
9762 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9763
4878beec 9764 * inline.c, inline.h: New files.
34472dfe 9765 * Makefile.am: Added them in all the right places.
4878beec 9766
34472dfe 9767 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9768
9769 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9770 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9771 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9772 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9773 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9774 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9775 scm_alloc_double_cell, respectively.
9776
d2bc7fae
MV
97772001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9778
9779 * modules.c (scm_c_use_module): Adapt to changes to
9780 `process-use-modules'.
9781
5eec27e9
DH
97822001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9783
9784 * numbers.c (scm_divide): Fix more division by zero errors.
9785
8978878f
GH
97862001-11-21 Gary Houston <ghouston@arglist.com>
9787
9788 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9789 obsolete. autogen.sh says:
9790 invalid unused variable name: `OMIT_DEPENDENCIES'
9791
164826d3
DH
97922001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9793
9794 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9795 reporting the bug.
9796
84aff7a7
MV
97972001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9798
9799 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9800 Thanks to Eric Gillespie, Jr!
34472dfe 9801
6063dc1d
SJ
98022001-11-21 Stefan Jahn <stefan@lkcc.org>
9803
34472dfe
TTN
9804 * win32-socket.c (getservent, setservent, endservent,
9805 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9806 Appropriate replacements for M$-Windows.
9807
9808 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9809 these definitions for GUILE_DEBUG.
9810
9811 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9812 M$-Windows compiler. Include some pieces of code (protoent and
9813 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9814 native M$-Windows compiler.
9815
351982f6
MV
98162001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9817
9818 * modules.c (scm_c_export): Do nothing when the first argument is
9819 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9820
849038b5
TTN
98212001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9822
9823 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9824 also include `buildstamp'.
9825
5c790b44
RB
98262001-11-18 Rob Browning <rlb@defaultvalue.org>
9827
9828 * version.c
9829 (s_scm_major_version): use SCM_MAJOR_VERSION.
9830 (s_scm_minor_version): use SCM_MINOR_VERSION.
9831 (s_scm_micro_version): use SCM_MICRO_VERSION.
9832 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9833 SCM_MICRO_VERSION.
9834
9835 * version.h.in
9836 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9837 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9838 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9839
694a9bb3
NJ
98402001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9841
9842 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9843 Rewrite docstrings without reference to substring-move-left/right,
9844 since the latter no longer exist.
9845
302c12b4
DH
98462001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9847
9848 * eval.c: Removed bogus comment about acros.
9849
9850 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9851 Minimize scope of local variable. Eliminate dependency on
9852 macro DEBUG_EXTENSIONS.
9853
9854 (s_splicing): New error message string.
9855
9856 (scm_m_body): Issue 'bad body' message rather than 'missing
9857 expression' message.
9858
9859 (scm_m_quote): Eliminate unnecessary copying.
9860
9861 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9862 checking of the body to scm_m_body.
9863
9864 (scm_m_do): Move comment to function header. Rename arg1 to
9865 binding. Made the code a bit easier to read.
9866
9867 (evalcar): Removed.
9868
9869 (iqq): Added a comment. Changed the depth parameter to
9870 unsigned. Use size_t for vector lengths. Make sure vector object
9871 is gc protected as long as its contents are read. Add some syntax
9872 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9873 control structure a bit.
9874
9875 (scm_m_delay): Added comment about the implementation of
9876 scm_m_delay.
9877
9878 (scm_m_define): Add comment about guile's currying define
9879 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9880 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9881
9882 (scm_m_letrec1): Removed. Part of the functionality is taken
9883 over by the new function 'transform_bindings'.
9884
9885 (transform_bindings): New function. Takes over some of the
9886 functionality of removed function 'scm_m_letrec1', namely to split
9887 a list of bindings into a reversed list of variables and a list of
9888 initializers.
9889
9890 (scm_m_letrec): Call 'transform_bindings'.
9891
9892 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9893 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9894 test. Use 'transform_bindings'. Fixed scoping error with named
9895 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9896 Jerram for suggesting the fix). Cleaned up the control structure
9897 a bit.
9898
9899 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9900 unnecessary consing. Eliminated unnecessary
9901 SCM_DEFER/ALLOW_INTS.
9902
9903 (SCM_CEVAL): Un-obfuscated some loops.
9904
cecb4a5e
NJ
99052001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9906
8f85c0c6
NJ
9907 * gc.h (scm_unhash_name): Old declaration removed.
9908
9909 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9910 @code{primitive-eval}.
9911
9912 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9913 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9914 Change @deffnx lines in docstrings to say {Scheme Procedure}
9915 rather than primitive or procedure.
9916
9917 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9918 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9919 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9920 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9921 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9922 (scm_string_split, scm_string_ci_to_symbol), strings.c
9923 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9924 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9925 Docstring fixes and improvements reflecting edits that have been
9926 made in the reference manual source.
9927
9928 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9929 scm_object_property, scm_set_object_property_x): Remove invalid
9930 @deffnx lines for corresponding procedure property primitives.
9931
cecb4a5e
NJ
9932 These changes add a @deffnx C function declaration and function
9933 index entries for each Guile primitive to the copy of the doc
9934 snarf output that is used for reference manual synchronization.
9935 Online help is unchanged.
849038b5 9936
cecb4a5e
NJ
9937 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9938 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9939 name to SCM_SNARF_DOCS.
849038b5 9940
cecb4a5e
NJ
9941 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9942 snarf-check-and-output-texi.
9943
9944 * Makefile.am (guile-procedures.texi): New rule.
9945 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9946 Changed so that the last stage of doc snarfing is now performed
9947 twice, once to produce guile-procedures.txt for online help, and
9948 once to produce guile.texi for reference manual synchronization.
9949
ddea3325
DH
99502001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9951
9952 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9953 safely usable as a single statement followed by a ';', for example
9954 in an if statement.
9955
9956 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9957
72dd0a03
NJ
99582001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9959
9960 * random.c (scm_random_solid_sphere_x,
9961 scm_random_hollow_sphere_x): Correct "shere" typos.
9962
9963 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9964
9965 * version.c (scm_version): Update docstring to include
9966 `micro-version'.
9967
6558eda6
MV
99682001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9969
409b8588
MV
9970 * modules.c (scm_c_export): Call va_end after collecting the
9971 symbols.
9972
adb8c0f2
MV
9973 * strop.h, strop.c (scm_substring_move_left_x,
9974 scm_substring_move_right_x): Removed.
9975
6558eda6
MV
9976 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9977 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9978 configure does.
9979
5d8fc640
MV
99802001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9981
9982 * numbers.c: Document macros to define when including
9983 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9984 now rely on SIZEOF_ macros that have been figured out at
9985 configure time.
9986
9987 * num2integral.i.c: Adapt to new interface.
9988 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9989 target type by casting it and checking whether it is still the
9990 same. Do not try to handle bignums for integral types that are
9991 smaller than fixnums. When handling bignums, collect the
9992 magnituse first into a unsigned type, and correctly check for
9993 overflow.
9994 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9995 only -MIN_VALUE can still be negative of all negative numbers (in
9996 twos-complement).
9997
849038b5 9998 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9999
10000 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
10001 HAVE_LONG_LONG depending on whether their size is non-zero.
10002
d6b8cf11
TTN
100032001-11-11 Thien-Thi Nguyen <ttn@glug.org>
10004
10005 * strop.c (scm_string_null_p): Docfix; nfc.
10006 Thanks to Scott Lenser.
10007
9401323e
NJ
100082001-11-07 Neil Jerram <neil@ossau.uklinux.net>
10009
10010 * extensions.c (scm_load_extension): Canonicalize docstring
10011 whitespace.
10012
10013 * unif.c (scm_uniform_array_write), ports.c
10014 (scm_current_output_port, scm_force_output), dynwind.c
10015 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
10016 filesys.c (scm_open, scm_lstat), struct.c
10017 (scm_make_struct_layout), random.c (scm_random,
10018 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
10019 (scm_i_index): Remove superfluous whitespace from end of docstring
10020 lines.
10021
10022 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
10023 strings.c (scm_make_string), variable.c (scm_make_variable,
10024 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
10025 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
10026 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
10027 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
10028 newline at end of docstrings.
10029
10030 * modules.c (scm_set_current_module): Add missing newline to
10031 docstring.
10032
b4e15479
SJ
100332001-11-07 Stefan Jahn <stefan@lkcc.org>
10034
10035 * win32-socket.[ch]: New files. Defines Winsock-API error codes
10036 and makes them available through Guile. That is because the
10037 Winsock-API does not store its errors in `errno' and thus cannot
10038 return error messages via `strerror (errno)'.
10039
10040 * socket.c (scm_init_socket): Initialize `win32-socket' part
10041 here under M$-Windows.
10042
d6b8cf11 10043 * numbers.h: Added missing declaration of
b4e15479
SJ
10044 `scm_sys_check_number_conversions()'.
10045
10046 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
10047 and use in `(strerror)' and `(system-error)'.
10048
d6b8cf11 10049 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
10050 `win32-socket.[ch]' to extra source and header files.
10051
7ab89df1
MV
100522001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
10053
10054 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
10055 a call to turn-on-debugging when --debug has been given instead of
10056 turning it on directly. Also, handle new `--no-debug' option,
10057 which might suppress the call to turn-on-debugging.
10058
0233bfc1
SJ
100592001-11-05 Stefan Jahn <stefan@lkcc.org>
10060
10061 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
10062
8f99e3f3
SJ
100632001-11-04 Stefan Jahn <stefan@lkcc.org>
10064
10065 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 10066 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
10067 correctly and allows a clean build on Win32.
10068
d6b8cf11 10069 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
10070 into FOO.
10071
10072 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
10073 import macros for external libraries (libcrypt, libqthreads,
10074 libreadline and libregex).
10075
10076 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
10077
10078 * posix.c (flock): Added support for flock() in M$-Windows.
10079
10080 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
10081 of __SCM_IMPORT__.
10082
10083 * fports.c (getflags): Differentiate reading and writing pipes
10084 descriptors.
10085
10086 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
10087 M$-Windows.
10088
10089 * coop.c (coop_condition_variable_timed_wait_mutex): Use
10090 conditionalized error code if `ETIMEDOUT' is not available.
10091 (scm_thread_usleep): Remove bogus declaration of `struct timeval
10092 timeout'.
10093
10094 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
10095 belongs. That is because NO_PREPRO_MAGIC gets undefined after
10096 each inclusion of `num2integral.i.c'.
10097 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
10098
4e21fa60
MV
100992001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
10100
10101 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
10102 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
10103
08112c95
MD
101042001-11-02 Mikael Djurfeldt <mdj@linnaeus>
10105
7663c008
MD
10106 * print.c (scm_iprin1): Mark print state as revealed when
10107 dispatching to generic write or display.
10108
08112c95
MD
10109 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
10110
f712d833
MV
101112001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
10112
10113 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 10114
f712d833
MV
10115 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
10116 and win32-dirent.h to extra source and header files. These
10117 include the uname() and the POSIX dirent interface implementation
10118 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
10119 linkers which do not allow unresolved symbols inside shared
10120 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
10121 dependency.
10122
d6b8cf11
TTN
10123 * __scm.h: Defined SCM_API. This macro gets prepended to all
10124 function and data definitions which should be exported or imported
f712d833
MV
10125 in the resulting dynamic link library in the Win32 port.
10126
10127 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 10128 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
10129 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
10130 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
10131 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
10132 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
10133 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 10134 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
10135 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
10136 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
10137 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
10138 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
10139 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
10140 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
10141 vports.h, weaks.h:
10142 Prefixed each each exported symbol with SCM_API.
10143
d6b8cf11 10144 * continuations.c: Added comment about the use of the extern
f712d833
MV
10145 declarations of {get,set}context() functions used in the ia64 port.
10146
10147 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
10148 is meant to be a `unsigned long *'.
10149
10150 * filesys.c: Include `direct.h' if possible. Use local
10151 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
10152 macros for M$-Windows. Implementation of `fstat_Win32()' which is
10153 able to differentiate between sockets and other file descriptors.
10154 Use this function as wrapper in `scm_fstat()'. Fixed typo in
10155 `scm_dirname()'.
10156
10157 * fports.c: Include `io.h' is possible. Put `*fp' into referring
10158 statement block in `scm_fport_buffer_add()'.
10159 Some corrections in `getflags()'.
d6b8cf11 10160
f712d833
MV
10161 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
10162
10163 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
10164 build on Win32. Disable preloaded symbols on Win2 platforms.
10165
10166 * ioext.c, ports.c: Include `io.h' is possible.
10167
10168 * mkstemp.c: Include `process.h' is possible.
10169
10170 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
10171 too.
10172 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
10173
10174 * posix.c: Remove unnecessary dirent includes and defines. Include
10175 local `win32-uname.h' for MinGW. Extern declaration of
10176 `mkstemp()' for systems where it does not exists. Make
10177 `getlogin()' available on M$-Windows.
10178
10179 * scmsigs.c: Made `usleep()' avalable on MinGW.
10180
10181 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
10182
10183 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
10184
10185 * win32-uname.c: Include "win32-uname.h", not "uname.h".
10186
d245ce23
MD
101872001-10-28 Mikael Djurfeldt <mdj@linnaeus>
10188
10189 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
10190 Don't apply scm_uniform_vector_length on arrays.
10191
8ea46249
DH
101922001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10193
10194 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
10195 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
10196 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
10197 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
10198 scm_list_<n> over scm_cons[2]?.
10199
10200 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
10201 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
10202 SCM_C[AD][AD]R instead of explicit form.
10203
10204 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
10205 comparison parameters.
10206
10207 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
10208 !SCM_NULLP instead of SCM_NIMP.
10209
10210 (scm_m_case): Don't copy the form. Renamed proc to clause and
10211 minimized its scope. Renamed x to clauses. Removed side
10212 effecting operation from macro call.
10213
10214 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
10215 minimized its scope. Renamed x to clauses. Minimized the scope
10216 of variable 'len'. Make sure the else clause is treated specially
10217 even in case of '=>' occurences. Don't change the else to #t in
10218 order to be able to distinguish this case in the evaluator. Leave
10219 type checking of the recipient to the evaluator.
10220
10221 (scm_c_improper_memq): Made the comment somewhat clearer.
10222
10223 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
10224 test for SCM_IM_LET at the place of the formal parameters.
10225 Simplified the formal parameter checking.
10226
10227 (scm_m_letstar): Added Comment. Renamed proc to bindings.
10228 Renamed arg1 to binding and minimized its scope. Eliminated
10229 unnecessary consing.
10230
10231 (scm_m_do): Renamed proc to bindings. Minimized the scope of
10232 variable 'len'.
10233
10234 (build_binding_list): New static function.
10235
10236 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
10237 Further, split up the 'letrec' unmemoizing code to the
10238 corresponding parts for 'do', 'let' and 'letrec', adding comments
10239 to each form. Cleanup the handling of the do form (This removes
10240 some *real* code :-).
10241
10242 (SCM_CEVAL): Removed side effecting operation from macro call.
10243 Handle the 'else clause of the 'cond form specially - the symbol
10244 'else is not replaced with #t any more.
10245
8186c4f5
GH
102462001-10-14 Gary Houston <ghouston@arglist.com>
10247
10248 * version.c (scm_version): use sprintf instead of snprintf,
10249 for portability. thanks to Bill Schottstaedt.
10250
89759084
MD
102512001-10-14 Mikael Djurfeldt <mdj@linnaeus>
10252
10253 * read.c (scm_lreadr): When user-defined hash procedure returns
10254 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
10255 an exception. (This prevents parsing of uniform vectors from
10256 interfering with parsing of numbers.)
10257
9c7ce563
MV
102582001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
10259
10260 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
10261 PTRDIFF_MIN. Thanks to Ken Raeburn.
10262
102632001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
10264
10265 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
10266
10267 * eval.c (scm_m_atbind): First try to find the variable without
10268 defining it locally; when it has not been found, define it
10269 locally.
10270
10271 * modules.c (module_variable): Pass over variables that exist but
10272 are unbound.
10273
102742001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10275
10276 * backtrace.c (display_backtrace_file_and_line): Only use
10277 scm_basename when POSIX support is compiled in. Thanks to Chris
10278 Cramer.
10279
1fe5e088
DH
102802001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10281
10282 * numbers.c (mem2uinteger): Return number read so far when coming
10283 across a hexdigit after having read a # or if not reading a hex
10284 value. This will enable the calling code to correctly handle
10285 forms like 1e2. (The background is, that the exponent markers d,
10286 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
10287 providing this patch.
10288
10289 (mem2complex): Fix erroneous double-negation. Now, numbers like
10290 1-i will be read correctly.
10291
68665a97
MD
102922001-10-12 Mikael Djurfeldt <mdj@linnaeus>
10293
10294 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
10295
10296 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
10297
d5cf5324
DH
102982001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
10299
10300 * print.c (scm_print_state_vtable, print_state_pool):
10301 Initialize. These variables are now registered as gc roots.
10302
10303 (scm_current_pstate): Update documentation.
10304
10305 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
10306 scm_prin1, scm_init_print): print_state_pool is registered as a
10307 gc root and thus does not need to be protected by a surrounding
10308 pair any more.
10309
10310 (make_print_state): The car of print_state_pool no longer holds
10311 the scm_print_state_vtable.
10312
10313 (scm_current_pstate, scm_make_print_state, print_circref,
10314 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
10315 SCM_N<foo>.
10316
10317 (scm_prin1): When building lists, prefer scm_list_<n> over
10318 scm_cons[2]?.
10319
10320 (scm_iprlist): Removed a redundant SCM_IMP test.
10321
10322 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
10323
37c56aec
DH
103242001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10325
10326 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
10327
10328 (scm_memcons, scm_mem_to_proc): When building lists, prefer
10329 scm_list_<n> over scm_cons[2]?.
10330
10331 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
10332
10333 (scm_procedure_name): Use SCM_CADR instead of explicit form.
10334
10335 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10336 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10337 for some reason his patch didn't make it into the cvs.
10338
79d34f68
DH
103392001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10340
10341 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10342 little bit - should even be somewhat more accurate now.
10343
5e137c65
RB
103442001-10-08 Rob Browning <rlb@defaultvalue.org>
10345
10346 * gc.c: support ia64 register backing store.
10347 (SCM_MARK_BACKING_STORE): new macro.
10348
10349 * continuations.h: support ia64 register backing store.
10350 (struct scm_t_contregs): add ia64 register backing store.
10351
10352 * continuations.c: support ia64 register backing store.
10353 (continuation_mark): mark ia64 register backing store.
10354 (continuation_free): free ia64 register backing store.
10355 (scm_make_continuation): capture ia64 register backing store.
10356 (copy_stack_and_call): copy ia64 register backing store.
10357
ee083ac2
DH
103582001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10359
10360 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10361 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10362 instead of SCM_NIMP to test for that case.
10363
10364 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10365 scm_t_bits instead of long.
10366
71dcdbf9
MV
103672001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10368
10369 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10370 SCM_T_SIGNED_BITS_MIN): New.
10371 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10372 Use them to make these macros computable by the preprocessor.
10373
10374 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10375 whether the integral type fits in a fixnum, not the compiler.
10376 This removes a spurious compiler warning. Also, honor the
10377 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10378 needed for `long long's.
10379
10380 * numbers.c: Define NO_PREPRO_MAGOC when including
10381 num2integral.c.i for `long long' and `signed long long'.
10382
152812c0
MD
103832001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10384
10385 These changes fixes a race condition in the Guile coop - pthread
10386 compatibility code.
d6b8cf11 10387
152812c0
MD
10388 * coop.c (mother_awake_p): New variable.
10389 (coop_create): Set mother_awake_p before creating or signalling
10390 mother; wait until mother is going to sleep before returning.
10391 (mother): Reset mother_awake_p before going to sleep.
10392
11d49f54
DH
103932001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10394
10395 * options.c (protected_objects, scm_init_options): The content of
10396 protected_objects is now protected from garbage collection using
10397 scm_gc_register_root instead of scm_permanent_object.
10398
10399 (get_option_setting): New static function that computes an option
10400 setting as it was formerly done in the function scm_options.
10401
10402 (get_documented_option_setting): New static function that
10403 returns option documentation as it was formerly done in the
10404 function scm_options. Note that documentation C strings are no
10405 longer precomputed into SCM objects. Instead, they are converted
10406 into SCM strings every time get_documented_option_setting is
10407 called.
10408
10409 (change_option_setting): New static functions that modifies the
10410 option setting as it was formerly done in the function
10411 scm_options. The function is now exception safe, i. e. won't
10412 cause a memory leak when interrupted. Further, only non-immediate
10413 option values are added to the protection list.
10414
10415 (scm_options): This function now has only the purpose to dispatch
10416 to to get_option_setting, get_documented_option_setting or
10417 change_option_setting, depending on the arguments given to
10418 scm_options.
10419
10420 (scm_init_opts): Don't convert documentation C strings into SCM
10421 strings. Further, don't protect any object values: They _must_
10422 be immediate values, otherwise there is no guarantee that they
10423 have not been collected before anyway.
10424
10425 * options.[ch] (scm_t_option): Made type unsigned, name into a
10426 constant char* and val into a scm_t_bits type.
10427
10428 (scm_options, scm_init_opts): The number of options is guaranteed
10429 to be larger or equal to zero. Thus, the type is changed to
10430 unsigned.
10431
3dbacabc
DH
104322001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10433
10434 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10435 testing an unsigned value for being >= 0.
10436
14282d0f
DH
104372001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10438
10439 * numbers.h: Removed old comment about using SCM_CAR to access
10440 non-pair cells.
10441
10442 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10443 the return value is signed. Thanks to Brian Crowder for the bug
10444 report.
10445
10446 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10447 values. With this patch, SCM_SRS can be safely used for other
10448 types than scm_t_signed_bits. However, it should still better be
10449 an internal macro and thus be renamed to SCM_I_SRS.
10450
10451 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10452
2dbec7b5
GH
104532001-10-03 Gary Houston <ghouston@arglist.com>
10454
10455 * continuations.h, unif.h: in the descriptions of the bit patterns
10456 of the heap cells, make bit 0 the least significant.
10457
cf4ee841
TTN
104582001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10459
10460 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10461 Thanks to Golubev I. N.
10462
4a151b3d
GH
104632001-09-25 Gary Houston <ghouston@arglist.com>
10464
10465 * ports.c (scm_drain_input): extended the docstring. thanks to
10466 Alex Schroeder and Thien-Thi Nguyen.
10467
581ded70
MD
104682001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10469
10470 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10471 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10472 macros. (The NUM names might soon change.)
10473
10474 * numbers.h: Added missing declarations.
10475
5437598b
MD
104762001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10477
10478 * Makefile.am: Distribute num2float.i.c.
10479
10480 * num2float.i.c: New file, multiply included by numbers.c, used
10481 to "templatize" the float <-> num conversion routines.
10482
10483 * numbers.c: New functions: scm_num2float, scm_float2num,
10484 scm_num2double, scm_double2num.
10485
0b073f0f
RB
104862001-09-21 Rob Browning <rlb@defaultvalue.org>
10487
10488 * .cvsignore: really add version.h
10489
10490 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10491 Otherwise it fails on the alpha. However, we might rather choose
10492 this size conditionally.
10493
10494 * numbers.c (scm_gcd): change "k" to a long from an int.
10495 Otherwise it fails on the alpha. However, we might rather choose
10496 this size conditionally.
10497
10498 * error.c (scm_wta): coerce char* to intptr_t before int
10499 assignment.
10500
10501 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10502 int.
10503
10504 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10505
2830fd91
MD
105062001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10507
10508 * numbers.c (scm_integer_expt): Accept inexact integer in second
10509 argument. (Thanks to Bill Schottstaedt.)
10510
c13f0a90
RB
105112001-09-20 Rob Browning <rlb@defaultvalue.org>
10512
10513 * .cvsignore: add version.h
10514
10515 * versiondat.h.in: removed (obsolete).
10516
10517 * version.h.in: renamed from version.h.
10518 (SCM_GUILE_MAJOR_VERSION): new public macro.
10519 (SCM_GUILE_MINOR_VERSION): new public macro.
10520 (SCM_GUILE_MICRO_VERSION): new public macro.
10521
10522 * version.h: renamed to version.h.in.
10523
10524 * version.c
10525 (scm_major_version): support integer *_VERSION macros.
10526 (scm_minor_version): support integer *_VERSION macros.
10527 (scm_micro_version): support integer *_VERSION macros.
10528 (scm_version): support integer *_VERSION macros.
10529
147c18a0
MD
105302001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10531
10532 * error.c, error.h: Made error keys globally accessible.
10533 Applications might want to test for these or use them in a direct
10534 call to scm_error.
10535
10536 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10537 routines are passed an inexact. This change in behavior is
10538 motivated by concordance with R5RS: It is more common that a
10539 primitive doesn't want to accept an inexact for an exact.
10540
662c5539
DH
105412001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10542
10543 The following patch partially undoes my patch from 2001-06-30,
10544 where I added the function scm_gc_mark_cell_conservatively. The
10545 function is buggy, since it breaks guile during conservative
10546 marking if a pointer on the stack points directly into the list of
10547 free cells on the heap: With conservative cell marking this will
10548 cause the whole free list to be scanned and marked - boom!
10549
10550 * gc.c (allocated_mark, MARK, heap_segment,
10551 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10552 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10553 scm_gc_mark_cell_conservatively and update the corresponding
10554 comments and uses accordingly. Thanks to Christopher Cramer for
10555 the patch. (Minor corrections by me.)
10556
6c1b7628
GH
105572001-09-15 Gary Houston <ghouston@arglist.com>
10558
10559 * root.h (scm_root_state): removed the continuation_stack and
10560 continuation_stack_ptr members, which have no apparent purpose.
10561 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10562 removed.
662c5539 10563
6c1b7628
GH
10564 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10565 (scm_igc): remove all references to contination_stack and
10566 continuation_stack_ptr, avoiding allocation of a vector and
10567 useless processing during gc.
10568
455c0ac8
DH
105692001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10570
10571 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10572
10573 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10574
10575 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10576
10577 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10578
10579 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10580 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10581
22ba637b
DH
105822001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10583
10584 * guardians.c (mark_dependencies_in_tconc,
10585 whine_about_self_centered_zombies, scm_init_guardians): Register
10586 the static global variable `self_centered_zombies' via
10587 scm_gc_register_root, to make some cdr-ing unnecessary.
10588
c3c4d801
DH
105892001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10590
10591 * backtrace.c (display_backtrace_file,
10592 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10593 values, use SCM_FALSEP when comparing SCM values against #f.
10594 Thanks to Rob Browning for the bug report.
10595
b00418df
DH
105962001-09-12 Martin Baulig <martin@home-of-linux.org>
10597
10598 * strings.[ch] (scm_str2string): New function.
10599
a0d34a0b
MV
106002001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10601
10602 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10603 when computing nm, even if it's negative.
10604 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10605 (scm_must_realloc): Likewise.
10606
b10586f0
ML
106072001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10608
10609 * numbers.c (scm_sys_check_number_conversions): new function,
10610 defined if Guile is compiled in debugging mode. currently checks
10611 `scm_num2ulong', should check much much more.
10612
10613 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10614 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10615
8c494e99
DH
106162001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10617
10618 * __scm.h: Added new section about compile time selectable
10619 features.
10620
10621 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10622 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10623 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10624 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10625 Removed.
10626
10627 * deprecation.c (scm_include_deprecated_features): Simplified.
10628
10629 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10630 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10631
10632 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10633 Extract side-effecting operations from macros.
10634
10635 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10636 scm_top_level_lookup_closure_var and scm_system_transformer.
10637
10638 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10639
10640 (heap_segment): Use CELL_P instead of SCM_CELLP.
10641
10642 * init.c (start_stack): Don't initialize
10643 scm_top_level_lookup_closure_var and scm_system_transformer.
10644
10645 * modules.c (scm_set_current_module): Don't access
10646 scm_top_level_lookup_closure_var and scm_system_transformer.
10647
10648 (scm_sym2var): Don't call scm_variable_set_name_hint.
10649
10650 (scm_post_boot_init_modules): Removed deprecated initializations.
10651
10652 * print.c (scm_ipruk): Don't access cell contents of non cells.
10653
10654 * strings.c (scm_string_set_x): All strings are writable.
10655
10656 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10657 type. There is only one string type now.
10658
10659 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10660
10661 * tags.h: Remove comments about two different string types.
10662
10663 (SCM_CELLP, SCM_NCELLP): Deprecated.
10664
10665 * variable.c (make_variable): Remove code variant for vcells.
10666
10667 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10668 SCM_VARIABLE_LOC): Remove code variant for vcells.
10669
10670 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10671 SCM_ENABLE_DEPRECATED with the logic reversed.
10672
10673 * dynl.c (moddata, registered_mods), dynl.[ch]
10674 (scm_register_module_xxx, scm_registered_modules,
10675 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10676 (*top-level-lookup-closure*), eval.[ch]
10677 (scm_top_level_lookup_closure_var, scm_system_transformer,
10678 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10679 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10680 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10681 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10682 scm_unprotect_object), modules.c (root_module_lookup_closure,
10683 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10684 beautify_user_module_x_var, try_module_autoload_var,
10685 scm_module_full_name), modules.[ch] (scm_the_root_module,
10686 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10687 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10688 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10689 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10690 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10691 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10692 scm_make_shared_substring), tags.h (scm_tc7_substring,
10693 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10694 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10695 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10696 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10697 Removed.
10698
10699 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10700 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10701 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10702 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10703 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10704 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10705 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10706 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10707 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10708 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10709 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10710 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10711 (setzone, scm_strftime, scm_strptime), vports.c
10712 (scm_make_soft_port): Remove calls to
10713 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10714 gone, all strings are 0-terminated anyway.
10715
10716 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10717 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10718 double inclusion of the same headers to the SCM_<filename>_H
10719 format.
10720
10721 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10722 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10723 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10724 any more.
10725
10726 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10727 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10728 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10729 !SCM_<foo> over SCM_N<foo>.
10730
dee01b01
DH
107312001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10732
10733 * Makefile.am: Remove references to symbols-deprecated.c.
10734
10735 * symbols.c (scm_init_symbols): Don't initialize deprecated
10736 symbol functions.
10737
10738 * symbols-deprecated.c: Removed.
10739
10740 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10741 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10742 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10743 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10744 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10745 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10746 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10747 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10748 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10749 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10750 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10751 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10752 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10753 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10754 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10755 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10756 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10757 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10758 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10759 scm_intern0, scm_sysintern, scm_sysintern0,
10760 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10761 scm_string_to_obarray_symbol, scm_intern_symbol,
10762 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10763 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10764 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10765 vectors.[ch] (scm_vector_set_length_x): Removed.
10766
10767 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10768 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10769 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10770 Renamed the macros that are defined to inhibit double inclusion of
10771 the same headers to the SCM_<filename>_H format.
10772
10773 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10774 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10775 SCM_N<foo>.
10776
b29058ff
DH
107772001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10778
10779 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10780 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10781 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10782 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10783 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10784 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10785 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10786 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10787 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10788 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10789 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10790 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10791
10792 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10793 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10794 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10795 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10796 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10797 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10798 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10799 double inclusion of the same headers to the SCM_<filename>_H
10800 format.
10801
10802 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10803 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10804 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10805 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10806 !SCM_<foo> over SCM_N<foo>.
10807
0527e687
DH
108082001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10809
10810 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10811 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10812 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10813 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10814 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10815 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10816 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10817 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10818 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10819 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10820 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10821 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10822 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10823 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10824 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10825 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10826 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10827 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10828 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10829 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10830 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10831 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10832 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10833 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10834 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10835 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10836 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10837 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10838 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10839 the macros that are defined to inhibit double inclusion of the
10840 same headers to the SCM_<filename>_H format.
10841
fada26b2
MV
108422001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10843
10844 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10845 "scm_t_portable" with "scm_port_table" which was an artifact from
10846 the great "scm_*_t -> scm_t_" renaming.
10847
e4d1c1ea
TTN
108482001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10849
10850 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10851 used; nfc. Thanks to Bill Schottstaedt.
10852
10853 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10854 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10855 Thanks to Chris Cramer.
10856
b573e744
MV
108572001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10858
10859 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10860
10861 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10862 dynamic scope.
10863 * dynwind.h (scm_swap_bindings): Declare.
10864 * dynwind.c (scm_swap_bindings): Make non-static.
10865
8a3e715b
ML
108662001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10867
10868 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10869 doing exactly nothing about them). thanks Neil!
10870
cf504ee0
NJ
108712001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10872
10873 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10874
43b83b54
TTN
108752001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10876
10877 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10878 (proto) in the case when either `GUILE_DEBUG' or
10879 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10880
10881 (map_free_list): Fix typo: Ref `f' correctly.
10882
10883 Thanks to Chris Cramer.
10884
ab4cd34b
RB
108852001-08-15 Rob Browning <rlb@defaultvalue.org>
10886
10887 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10888 variables.
10889 (libpath.h): change libguileversion to libguileinterface.
10890
b754e3d1
MV
108912001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10892
10893 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10894 ChangeLog-2000. Thanks to Daniel Skarda!
10895
8b1d12c7
ML
108962001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10897
10898 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10899 do it from the Makefile.
10900
10901 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10902 are of a reasonable size.
10903
baffb19f
NJ
109042001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10905
10906 * stacks.c (scm_make_stack): Improve docstring by explaining use
10907 of cutting args.
10908
c1151355
MV
109092001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10910
10911 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10912 scm_char_whitespace_p, scm_char_upper_case_p,
10913 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10914 characters to fulfill isascii in addition to the primary
10915 predicate.
10916
3c9a524f
DH
109172001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10918
10919 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10920 scm_istr2flo, scm_istring2number): Removed.
10921
10922 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10923 SCM_SLOPPY_<foo>.
10924
10925 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10926 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10927 Added.
10928
10929 (scm_string_to_number): Use new number parser.
10930
10931 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10932 handles complex numbers.
10933
10934 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10935 SCM_<foo>_H.
10936
10937 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10938 SCM_N<pred>.
10939
10940 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10941
10942 (scm_i_mem2number): Added.
10943
10944 (scm_exact_to_inexact): Changed signature.
10945
10946 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10947 here instead of within scm_i_mem2number. Call scm_i_mem2number
10948 instead of scm_istr2int and scm_istring2number.
10949
01f11e02
DH
109502001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10951
10952 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10953 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10954 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10955 !SCM_<pred> over SCM_N<pred>.
10956
10957 (scm_eval_body): Remove side effecting code from macro call.
10958
10959 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10960 SCM_NIMP test.
10961
6cf69537
DH
109622001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10963
10964 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10965
54866b6c
MV
109662001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10967
10968 Removed vcell slot from structs.
43b83b54 10969
54866b6c
MV
10970 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10971 subsequent indices.
10972
10973 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10974 zero. Use scm_vtable_index_layout instead of "0" when accessing
10975 said slot.
10976 (scm_init_struct): Remove vcell slot layout code from
10977 required_vtable_fields.
10978
10979 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10980
10981 * goops.c (build_class_class_slots): Removed vcell slot
10982 definition.
10983
10984 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10985 Removed vcell slot layout code.
10986 (scm_si_vcell): Removed.
10987
5b54c4da
MV
109882001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10989
a0f5718e 10990 "Glocs" have been removed.
43b83b54 10991
a0f5718e
MV
10992 * tags.h: Update tag system docs.
10993 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10994 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10995 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10996 or SCM_NCONSP, respectively.
10997
10998 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10999 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
11000 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
11001
11002 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
11003 tell glocs from structs.
43b83b54 11004
a0f5718e
MV
11005 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
11006
11007 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
11008 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
11009 instead of with glocs.
11010 (EVALCAR): Do not test for glocs.
11011 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
11012 condition.
11013 (scm_unmemocar): Do not handle glocs.
11014 (scm_m_atfop): Memoize as a variable, not as a gloc.
11015 (scm_eval_args, scm_deval_args): Do not handle glocs.
11016 (scm_ceval, scm_deval): Likewise.
43b83b54 11017
a0f5718e
MV
11018 * eval.h (SCM_XEVALCAR): Do not test for glocs.
11019 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
11020 Removed.
11021
11022 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
11023
11024 * dynwind.c (scm_swap_bindings): Likewise.
11025 (scm_dowinds): Updated to recognize lists of variables instead of
11026 lists of glocs.
11027
11028 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
11029
43b83b54 11030
5b54c4da
MV
11031 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
11032 where it is needed.
43b83b54 11033
3c3db128
GH
110342001-07-25 Gary Houston <ghouston@arglist.com>
11035
11036 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
11037 docstrings to reflect the n-ary implementation.
11038
dd29a169
MV
110392001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
11040
11041 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
11042 value of a variable, not the plain "return" statement.
11043
f5fe6c2f
MV
110442001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
11045
11046 * eval.c: Allow variables in memoized code (in addition to glocs).
11047 (scm_lookupcar): Handle variables in lost races. Replace symbol
11048 with variable directly, do not make a gloc.
11049 (scm_unmemocar): Rewrite variables using a reverse lookup, just
11050 like glocs.
11051 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
11052 the main switch.
11053
ee0c7345
MV
110542001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11055
6d9ad98a
MV
11056 * variable.c (scm_i_variable_print): Use "value" instead of
11057 "binding" since a binding is the mapping between symbols and
11058 variables, not between variables and their values.
11059
ee0c7345
MV
11060 * tags.h (scm_tc7_variable): New.
11061 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
11062 * print.c (scm_iprin1): Likewise.
11063
11064 * variable.h (scm_tc16_variable): Removed.
11065 (SCM_VARIABLEP): Test for new tc7 code.
11066 (scm_i_variable_print): New.
11067 * variable.c (scm_tc16_variable): Removed.
11068 (variable_print): Renamed to scm_i_variable_print and made
11069 non-static.
11070 (variable_equal_p): Removed.
11071 (make_variable): Construct a tc7 object instead of a smob.
11072 (scm_init_variable): Do not register smob.
43b83b54 11073
f3805ebb
MV
110742001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
11075
11076 * tags.h: Include inttypes.h when we have it.
11077
110782001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
11079
11080 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
11081 is taken by the new SCM_IM_CALL_WITH_VALUES.
11082 * print.c (scm_isymnames): Update table accordingly.
43b83b54 11083
6a1677a3
GH
110842001-07-22 Gary Houston <ghouston@arglist.com>
11085
11086 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
11087 SCM_MAKINUM to convert regoff_t value to SCM.
11088
1bed8c28
GH
110892001-07-21 Gary Houston <ghouston@arglist.com>
11090
11091 * scmsigs.c: include sys/time.h for itimer stuff.
11092
e658215a
RB
110932001-07-19 Rob Browning <rlb@defaultvalue.org>
11094
11095 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
11096
11097 * c-tokenize.lex: add option %nounput to quiet warning.
11098 Add prototype for yylex to quiet warning.
11099
11100 * scmconfig.h.in: add flags for setitimer and getitimer.
11101
11102 * scmsigs.h (scm_init_scmsigs): new prototype.
11103 (scm_init_scmsigs): new prototype.
11104
11105 * scmsigs.c (s_scm_setitimer): new function.
11106 (s_scm_setitimer): new function.
11107
58ade102
MG
111082001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11109
11110 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
11111 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
11112 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
11113 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
11114 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
11115 guile-func-name-check.in, guile-snarf-docs-texi.in,
11116 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
11117 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
11118 objprop.c, objprop.h, options.c, options.h, random.h,
11119 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
11120 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
11121 version.c, version.h: Updated copyright notice.
11122
6b80d352
DH
111232001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11124
11125 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
11126 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
11127 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
11128 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
11129 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
11130 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
11131 sym_environment, scm_sym_change_class): New static variables to
11132 hold predefined symbols.
11133
11134 (build_class_class_slots): Build the list using scm_list_n
11135 instead of cons. Also, slots are already created as lists, thus
11136 making a call to maplist unnecessary.
11137
11138 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
11139 scm_class_direct_subclasses, scm_class_direct_methods,
11140 scm_class_precedence_list, scm_class_slots, scm_class_environment,
11141 scm_method_procedure, create_standard_classes, purgatory): Use
11142 predefined symbols.
11143
11144 (build_slots_list, compute_getters_n_setters,
11145 scm_sys_initialize_object, scm_sys_inherit_magic_x,
11146 get_slot_value_using_name, set_slot_value_using_name,
11147 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
11148 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
11149 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
11150
11151 (scm_sys_prep_layout_x): Minimize variable scopes.
11152
11153 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
11154 scm_sys_fast_slot_set_x): Fix signedness.
11155
11156 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
11157 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
11158 scm_memoize_method, scm_wrap_object): Use packing and unpacking
11159 when converting to and from SCM values.
11160
11161 (scm_enable_primitive_generic_x): Add rest argument checking.
11162
11163 (map, filter_cpl, maplist, scm_sys_initialize_object,
11164 scm_sys_prep_layout_x, slot_definition_using_name,
11165 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
11166 call_memoize_method, scm_make, scm_make_class): Prefer explicit
11167 predicates over SCM_N?IMP tests.
11168
11169 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
11170 checking.
11171
11172 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
11173 alias.
11174
63bcad19
DH
111752001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11176
11177 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
11178
11179 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
11180
11181 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
11182
11183 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
11184
4d6aae71
ML
111852001-07-12 Michael Livshin <mlivshin@bigfoot.com>
11186
11187 * strings.c (s_scm_string): fix arg position in assert.
11188
4b8ec619
GH
111892001-07-11 Gary Houston <ghouston@arglist.com>
11190
11191 * strports.c (st_write): use memcpy, not strncpy. thanks to
11192 Dale P. Smith.
11193
dbb640bd
TTN
111942001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
11195
11196 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
11197 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
11198 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
11199 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
11200 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
11201 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
11202 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
11203 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
11204 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
11205 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
11206 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
11207 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
11208 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
11209 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
11210 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
11211 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
11212 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
11213 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
11214 weaks.c, weaks.h: Remove "face-lift" comment.
11215
fd6c6321
RB
112162001-07-08 Rob Browning <rlb@defaultvalue.org>
11217
11218 * .cvsignore: add stamp-h.in.
11219
f91e4547
MG
112202001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11221
11222 * hooks.c (scm_make_hook, scm_add_hook_x),
11223 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
11224 value info to the docstrings.
11225
7beabedb
MG
112262001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11227
11228 Some more compatibility patches for Windows.
dbb640bd 11229
7beabedb
MG
11230 * posix.c (getlogin): getlogin() implementation for Windows.
11231
11232 * backtrace.c, ioext.c: Include <stdio.h>.
11233
11234 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
11235 exist.
11236
11237 * cpp_sig_symbols.in: Added SIGBREAK.
11238
0d0560d0
MV
112392001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
11240
11241 * strports.c (scm_read_0str, scm_eval_0str): Call
11242 scm_c_read_string and scm_c_eval_string respectively, not
11243 themselves. Thanks to Dale P. Smith!
11244
9a97e362
DH
112452001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11246
11247 * unif.c (scm_array_set_x): The variable args does not
11248 necessarily have to be a list. Further, got rid of a redundant
11249 SCM_NIMP test.
11250
592996c9
DH
112512001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11252
11253 * list.c (SCM_I_CONS): Make sure the cell type is initialized
11254 last.
11255
11256 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 11257 init_heap_seg): Fixed signedness.
592996c9
DH
11258
11259 (init_heap_seg): Replaced strange for-loop with a while loop.
11260
11261 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
11262
11263 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
11264
11265 The following patch adds conservative marking for the elements of
11266 free or allocated cells.
11267
11268 * gc.c (allocated_mark, heap_segment): New static functions.
11269
11270 (which_seg): Deleted, since the functionality is now provided by
11271 function heap_segment.
11272
11273 (map_free_list): Use heap_segment instead of which_seg.
11274
11275 (MARK): If cell debugging is disabled, mark free cells
11276 conservatively.
11277
11278 (scm_mark_locations, scm_cellp): Extracted the search for the
11279 heap segment of a SCM value into function heap_segment.
11280
11281 (scm_init_storage): Allocated cells must be marked
11282 conservatively.
11283
11284 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
11285
11286 The following patch changes the representation of weak vectors to
11287 double cells instead of using an extension of the vector's
11288 allocated memory.
11289
11290 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
11291 the result of SCM_WVECT_GC_CHAIN.
11292
11293 (scm_gc_sweep): Weak vectors don't have extra fields any more.
11294
11295 * weaks.c (allocate_weak_vector): New static function. It does
11296 not patch any previously created vector object during the
11297 construction of a weak vector, and thus doesn't need to switch
11298 off interrupts during vector creation.
11299
11300 (scm_make_weak_vector, scm_make_weak_key_hash_table,
11301 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11302 Use allocate_weak_vector to provide the new weak vector object.
11303
11304 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
11305 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
11306 now stored in the double cell.
11307
11308 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
11309 Use SCM_WVECT_TYPE.
11310
11311 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
11312 using an entry of the double cell.
11313
4dadf664
TTN
113142001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
11315
11316 * stamp-h.in: bye bye
11317
02202352
MV
113182001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
11319
11320 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
11321 scm_eval_0str.
11322
11323 * load.c, load.h (scm_c_primitive_load,
11324 scm_c_primitive_load_path): New.
11325
11326 * strports.c, strports.h (scm_c_read_string): Renamed from
11327 scm_read_0str. Also, added "const" qualifier to argument.
11328 (scm_c_eval_string): Renamed from scm_eval_0str.
11329 (scm_read_0str, scm_eval_0str): Deprecated.
11330
df1ad0d1
MG
113312001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11332
11333 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
11334 SCM_LIST1.
11335
1afff620
KN
113362001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11337
11338 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11339 scm_list_n): New functions.
11340 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11341 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11342 (lots of files): Use the new functions.
4dadf664 11343
1afff620
KN
11344 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11345
11346 * strings.c: #include "libguile/deprecation.h".
11347
b858464a
MG
113482001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11349
11350 * read.c (scm_lreadr): When reading a hash token, check for a
11351 user-defined hash procedure first, so that overriding the builtin
11352 hash characters is possible (this was needed for implementing
11353 SRFI-4's read synax `f32(...)').
4dadf664 11354
b858464a
MG
11355 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11356 because the latter is unsigned now and breaks comparisons like
11357 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11358
d95c0b76
NJ
113592001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11360
11361 * eval.h, eval.c (scm_call_4): New function.
11362
11363 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11364 directly rather than dispatching to them via scm_ithrow and a lazy
11365 catch.
4dadf664 11366
d95c0b76
NJ
11367 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11368 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11369 for trap handler procedures.
11370
11371 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11372 procedures not being #f.
11373
30e3be5a
ML
113742001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11375
11376 * Makefile.am (c-tokenize.c): add rule to generate it.
11377 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11378
11379 filter-doc-snarfage.c: remove.
11380
82893676
MG
113812001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11382
11383 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11384
11385 The following set of changes makes compiling Guile under various
11386 Windows compilers easier. Compilation under GNU systems should
11387 not be affected at all.
11388
11389 Thanks to Stefan Jahn for all necessary information, patches and
11390 testing.
4dadf664 11391
82893676
MG
11392 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11393 getpgrp, ttyname, primitive-fork and some header inclusion for
11394 Windows.
11395
11396 * random.c: Define M_PI, if not predefined and use __int64 for
11397 LONG64 under Windows.
11398
11399 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11400 Windows and conditionalize some signal names.
11401
4dadf664 11402 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11403 Include socket library header under Windows.
11404
11405 * stime.c (CLKTCK): Add cast to int, to make it compile under
11406 Windows.
11407
11408 * ports.c (truncate): New function, compiled only under Windows.
11409
11410 * net_db.c: Do not declare errno under Windows.
11411
11412 * iselect.h, inet_aton.c: Include socket library headers under
11413 Windows.
11414
11415 * guile.c (inner_main): Under Windows, initialize socket library
11416 and initialize gdb_interface data structures.
11417
11418 * gdb_interface.h: Under Windows, gdb_interface cannot be
11419 initialized statically. Initialize at runtime instead.
11420
11421 * fports.c (write_all): ssize_t -> size_t.
11422 (fport_print): Conditionalize call to ttyname().
11423 (getflags): New function, compiled only under Windows.
11424
11425 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11426 primitives chown, link, fcntl.
11427 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11428 as path seperator.
11429
11430 * backtrace.c: Include <io.h> under Windows.
11431
11432 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11433
11434 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11435 declaration.
11436
fdc28395
KN
114372001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11438
11439 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11440 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11441 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11442 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11443 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11444 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11445 (scm_dynamic_wind, scm_dowinds), environments.c
11446 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11447 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11448 goops.c (GETVAR, purgatory, make_class_from_template,
11449 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11450 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11451 (scm_primitive_load), modules.c (scm_resolve_module,
11452 scm_c_define_module, scm_c_use_module, scm_c_export,
11453 module_variable, scm_eval_closure_lookup, scm_sym2var,
11454 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11455 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11456 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11457 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11458 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11459 (scm_object_to_string, scm_call_with_output_string,
11460 scm_call_with_input_string), throw.c (scm_body_thunk,
11461 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11462 scm_make_shared_array), vports.c (sf_flush, sf_write,
11463 sf_fill_input, sf_close): Use one of the above functions.
11464 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11465
36284627
DH
114662001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11467
11468 * filesys.c (scm_close), ports.c (scm_close_port,
11469 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11470 instead of SCM_NEGATE_BOOL.
11471
11472 * filesys.c (scm_stat): Clean up type dispatch.
11473
11474 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11475 scm_output_port_p): Get rid of redundant IM type check.
11476
11477 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11478 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11479 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11480 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11481 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11482 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11483 scm_addr_vector), stime.c (scm_strftime), strings.c
11484 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11485 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11486 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11487 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11488 instead of scm_makfromstr.
11489
11490 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11491 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11492 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11493 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11494 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11495 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11496 !SCM_<pred> over SCM_N<pred>.
11497
11498 * strings.[ch] (scm_makfromstr): Deprecated.
11499
11500 (scm_mem2string): New function, replaces scm_makfromstr.
11501
11502 * strings.c (scm_substring), strop.c (string_copy,
11503 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11504 (scm_symbol_to_string): Fix gc problem.
11505
11506 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11507 SCM_<foo>_H.
11508
11509 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11510 warning about comparing signed and unsigned values. This fix is
11511 not optimal, since it won't work reliably if sizeof (c_start) >
11512 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11513 solution is to define this macro as an inline function, thus
11514 allowing to specifiy the types of c_start and c_end.
11515
13dcb666
DH
115162001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11517
11518 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11519 scm_t_debug_frame*.
11520
11521 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11522 Rename <foo>H to SCM_<foo>_H.
11523
11524 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11525 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11526
11527 (narrow_stack): Make i unsigned. Don't use side-effecting
11528 operations in conditions.
11529
11530 (narrow_stack, scm_make_stack, scm_stack_id,
11531 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11532
11533 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11534 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11535 more.
11536
11537 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11538 signedness.
11539
ea2c3968 11540 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11541
11542 * stacks.h (SCM_FRAMEP): Fix type check.
11543
ac13d9d2
ML
115442001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11545
ee0c0e03
ML
11546 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11547 c-tokenize.c when doing maintainer-clean.
11548
ac13d9d2
ML
11549 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11550
11551 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11552 simplify.
11553
11554 * eval.c: all hash signs are in column 0.
11555
11556 * Makefile.am (guile_filter_doc_snarfage): build using
11557 c-tokenize.c, not filter-doc-snarfage.c.
11558 rearrange snarfing dependencies a bit.
11559
11560 * c-tokenize.lex: new file.
11561
16be44e5
MV
115622001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11563
11564 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11565 scm_t_srcpropso_plist. See the big type renaming.
11566 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11567 Thanks to Seth Alves!
4dadf664 11568
16be44e5
MV
11569 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11570 they aren't defined already.
11571
5843e5c9
DH
115722001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11573
11574 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11575 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11576 problem.
11577
11578 * backtrace.c (display_expression, scm_set_print_params_x,
11579 display_application, display_frame, scm_backtrace), numbers.c
11580 (scm_istring2number), objects.c (scm_class_of,
11581 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11582 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11583
11584 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11585 always positive.
11586
11587 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11588 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11589
11590 * objects.c (scm_class_of): Type fix.
11591
11592 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11593 eliminated goto.
11594
11595 * pairs.h (scm_error_pair_access): The function can return if
11596 called recursively.
11597
6b41a313
MG
115982001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11599
11600 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11601
11602 * gdbint.c, init.c: Removed inclusion of tag.h.
11603
11604 * tag.h, tag.c: Removed files.
11605
11606 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11607
fbbdb121
GH
116082001-06-20 Gary Houston <ghouston@arglist.com>
11609
11610 * deprecation.c, extensions.c, rw.c: include string.h.
11611
72c17ed0
GH
116122001-06-19 Gary Houston <ghouston@arglist.com>
11613
11614 * filter-doc-snarfage.c (process): added ungetc in
11615 MULTILINE_COOKIE case since otherwise it fails when there's no
11616 space between the '(' and the quote of the following string
11617 (gcc 3.0).
11618
4ff9f825
MV
116192001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11620
4927dd28
MV
11621 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11622
b629af45
MV
116232001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11624
11625 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11626 extension takes place.
11627 * strings.h (SCM_STRING_LENGTH): Likewise.
11628 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11629
4ff9f825
MV
11630 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11631 it.
11632
11633 * tags.h: Include <stdint.h> when we have it.
11634 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11635 available. Else use "unsigned long".
11636 (scm_signed_bits_t): New.
11637
11638 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11639 (SCM_INUM): Cast result to scm_signed_bits_t.
11640
58bee6a8
TTN
116412001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11642
11643 * mkstemp.c: Update path to #include file scmconfig.h.
11644 Thanks to Golubev I. N.
11645
00d8d838
DH
116462001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11647
11648 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11649
ea2c3968 11650 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11651 the macro definition.
11652
11653 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11654 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11655 instead of SCM_INST_TYPE.
11656
11657 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11658 the object is a struct before accessing its struct flags.
11659
11660 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11661
495c67e5
GH
116622001-06-10 Gary Houston <ghouston@arglist.com>
11663
11664 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11665 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11666 work reliably anymore. try it from boot-9.scm instead.
11667
6a9003d3
MV
116682001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11669
11670 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11671 Thanks to Matthias Köppe!
58bee6a8 11672
47bcd646
ML
116732001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11674
a88ff5b6
ML
11675 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11676 space-happy C preprocessors.
11677
47bcd646 11678 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11679 inside cookies. thanks to Matthias Köppe!
47bcd646 11680
bab246f3
DH
116812001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11682
11683 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11684 keywords. Fix gc protection.
11685
11686 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11687 operations in macro calls.
11688
11689 * pairs.c (scm_error_pair_access): Avoid recursion.
11690
11691 Thanks to Matthias Koeppe for reporting the bugs that correspond
11692 to the following set of patches.
11693
11694 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11695 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11696 bitvector base address using SCM_BITVECTOR_BASE.
11697
11698 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11699 unsigned long*.
11700
dcb410ec
DH
117012001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11702
11703 * goops.c (SCM_CLASS_REDEF): Removed.
11704
11705 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11706 SCM_<foo>_H.
11707
11708 Thanks to Matthias Koeppe for reporting the bugs that correspond
11709 to the following set of patches.
11710
11711 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11712 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11713 scm_sys_allocate_instance, clear_method_cache,
11714 scm_sys_invalidate_method_cache_x, scm_make,
11715 create_standard_classes, scm_make_port_classes, scm_make_class,
11716 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11717
11718 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11719
11720 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11721
11722 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11723 UNARY_ELTS_CODE): Remove bogus break statement.
11724
11725 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11726 Don't access bit vectors elements as SCM objects.
11727
11728 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11729 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11730 Don't assign to an unpacked value.
11731
e81d98ec
DH
117322001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11733
11734 * __scm.h (SCM_NORETURN): Moved here from error.h.
11735
11736 (SCM_UNUSED): New macro.
11737
11738 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11739
11740 * backtrace.c (display_error_handler), continuations.c
11741 (continuation_print), debug.c (debugobj_print), dynwind.c
11742 (guards_print), environments.c (observer_print,
11743 core_environments_finalize, leaf_environment_cell,
11744 leaf_environment_print, eval_environment_print,
11745 eval_environment_observer, import_environment_define,
11746 import_environment_undefine, import_environment_print,
11747 import_environment_observer, export_environment_define,
11748 export_environment_undefine, export_environment_print,
11749 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11750 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11751 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11752 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11753 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11754 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11755 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11756 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11757 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11758 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11759 set_slot_value, test_slot_existence, scm_change_object_class,
11760 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11761 default_setter), guardians.c (guardian_print, guardian_gc_init,
11762 guardian_zombify, whine_about_self_centered_zombies), guile.c
11763 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11764 mallocs.c (malloc_print), numbers.c (scm_print_real,
11765 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11766 end_input_default, scm_port_print, fill_input_void_port,
11767 write_void_port), root.c (root_print), smob.c (scm_mark0,
11768 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11769 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11770 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11771 (scm_struct_free_0, scm_struct_free_standard,
11772 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11773 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11774 scm_handle_by_throw, scm_ithrow), weaks.c
11775 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11776 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11777 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11778
11779 * error.h (SCM_NORETURN): Moved to __scm.h.
11780
11781 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11782 Renamed <foo>H to SCM_<foo>_H.
11783
11784 * gc.c (debug_cells_gc_interval): New static variable.
11785
11786 (scm_assert_cell_valid): If selected by the user, perform
11787 additional garbage collections.
11788
11789 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11790 if additional garbage collections are desired.
11791
11792 (mark_gc_async): If additional garbage collections are selected
11793 by the user, don't call the after-gc-hook. Instead require the
11794 user to run the hook manually.
11795
11796 * pairs.c (scm_error_pair_access): New function. Only compiled
11797 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11798
11799 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11800
11801 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11802 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11803 is a real pair object. (Glocs are also accepted, but that may
11804 change.) If not, abort with an error message.
11805
17fa3fcf
DH
118062001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11807
11808 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11809
11810 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11811 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11812
feeedafb
MV
118132001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11814
11815 * extensions.c (scm_c_register_extension): Allow NULL as library
11816 name.
11817 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11818
feeedafb
MV
11819 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11820 non-pointers are being compared. Thanks to Alexander Klimov!
11821
4bcdfe46
GH
118222001-06-04 Gary Houston <ghouston@arglist.com>
11823
11824 * rw.c (scm_write_string_partial): new procedure implementing
11825 write-string/partial in (ice-9 rw).
11826 * rw.h: declare scm_write_string_partial.
58bee6a8 11827
f480396b
MV
118282001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11829
feeedafb
MV
11830 * keywords.c (keyword_print): Substract 1 from length of symbol
11831 name, accounting for the silly dash.
11832
11833 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11834 Do not emit deprecation warning.
11835
f480396b
MV
11836 Added exception notice to all files.
11837
11838 * dynl.c: Include "deprecation.h".
11839
c794483c
MV
118402001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11841
11842 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11843 scm_clear_registered_modules): Deprecated.
11844
9454d8d5
RB
118452001-06-02 Rob Browning <rlb@cs.utexas.edu>
11846
11847 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11848 guile-snarf-docs-texi.
11849
11850 * fports.c: HAVE_ST_BLKSIZE changed to
11851 HAVE_STRUCT_STAT_ST_BLKSIZE.
11852 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11853 HAVE_STRUCT_STAT_ST_BLKSIZE.
11854
11855 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11856 HAVE_STRUCT_STAT_ST_RDEV.
11857 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11858 HAVE_STRUCT_STAT_ST_BLKSIZE.
11859 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11860 HAVE_STRUCT_STAT_ST_BLOCKS.
11861
114f9bab
MV
118622001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11863
b0c16cd9
MV
11864 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11865 of scm_eval_x to allow module changes between the forms in the
11866 string. Set/restore module using scm_c_call_with_current_module.
11867
114f9bab
MV
11868 * mkstemp.c: New file, slightly modified from libiberties
11869 mkstemps.c.
11870
c99f9605
ML
118712001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11872
11873 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11874 filter-doc-snarfage.c: new files.
11875
11876 * Makefile.am: add stuff to [build,] use and distribute
11877 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11878
11879 * guile-snarf.in: grok the new snarf output.
11880
11881 * snarf.h: make the output both texttools- and `read'-friendly.
11882
47bcd646
ML
11883 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11884 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11885
7eb5d7b2
MV
118862001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11887
11888 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11889 error for unsupported format controls and for superflous
ec2667f0 11890 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11891
11892 * print.h, print.c (scm_print_symbol_name): Factored out of
11893 scm_iprin1.
11894 (scm_iprin1): Call it.
58bee6a8 11895
7eb5d7b2
MV
11896 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11897 weird names are printed correctly.
11898
11899 * print.c (scm_print_symbol_name): Symbols whose name starts with
11900 `#' or `:' or ends with `:' are considered weird.
11901
609c3d30
MG
119022001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11903
11904 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11905 and /.
11906
119072001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11908
11909 * debug.h: Removed prototype for scm_eval_string.
11910
8d09eb04
MG
119112001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11912
11913 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11914 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11915
11916 Change strncpy to memcpy to allow embedded NUL characters in
11917 symbol prefix.
11918
dd85ce47
ML
119192001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11920
fde50407
ML
11921 * hooks.c (scm_create_hook): deprecated.
11922 (make_hook): deleted.
11923 (scm_make_hook): all the hook creation code is now here.
11924
11925 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11926 a hook, make it permanent, and do a `scm_c_define' on it.
11927
dd85ce47
ML
11928 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11929
11930 * socket.c (s_scm_inet_pton): fix docstring quoting.
11931 (s_scm_inet_ntop): ditto.
11932
11933 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11934
11935 * hashtab.c (scm_internal_hash_fold): fix argument position in
11936 SCM_ASSERT.
11937
11938 * environments.c (s_scm_import_environment_set_imports_x): fix
11939 argument position in SCM_ASSERT.
11940
11941 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11942 (s_scm_make_iloc): ditto.
11943
729dbac3
DH
119442001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11945
11946 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11947
11948 * eval.c (promise_print): Read the promise's value as an object.
11949
11950 (SCM_CEVAL): Don't perform side-effecting operations in macro
11951 parameters.
11952
11953 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11954 conditional expression.
11955
11956 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11957 initializer.
11958
11959 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11960 text, removed redundant computation of effective_length and fixed
11961 the overflow check.
11962
11963 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11964 values.
11965
11966 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11967
11968 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11969
11970 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11971 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11972
11973 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11974
11975 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11976 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11977 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11978 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11979
11980 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11981
11982 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11983
ea2c3968 11984 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11985
11986 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11987 problem.
11988
11989 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11990 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11991 Read SCM objects rather than scm_bits_t values.
11992
11993 * tags.h (SCM_VOIDP_TEST): Removed.
11994
11995 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11996 value of 2 now corresponds to the former 1, the current 1
11997 corresponds to the former situation that SCM_VOIDP_TEST was
11998 defined.
11999
58bee6a8
TTN
12000 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
12001 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
12002 typedef struct scm_unused_struct { } * SCM;
12003 Thanks to Han-Wen Nienhuys for the suggestion.
12004
12005 * unif.c (scm_array_set_x): Fix typing problem, and use
12006 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
12007 dealing with uniform vectors.
12008
6b1b030e
ML
120092001-05-27 Michael Livshin <mlivshin@bigfoot.com>
12010
12011 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
12012 (scm_igc): mark from them, too (precisely, not conservatively!).
12013
12014 * root.h (scm_gc_registered_roots): new object in
12015 scm_sys_protects.
12016
12017 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
12018 `scm_protect_object'. shouldn't call it at all, though, it seems.
12019
12020 * gc.c (scm_[un]protect_object): deprecated.
12021 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
12022 (scm_gc_[un]register_root[s]): new.
12023
12024 * gc.h: add prototypes for scm_gc_[un]protect_object,
12025 scm_gc_[un]register_root[s].
12026
c014a02e
ML
120272001-05-26 Michael Livshin <mlivshin@bigfoot.com>
12028
12029 revert the controversial part of the 2001-05-24 changes.
12030
0120801d
MV
120312001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
12032
f4e0611e
MV
12033 * modules.c (scm_env_module): Exported to Scheme.
12034
0120801d 12035 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 12036
0120801d 12037 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 12038
0120801d
MV
12039 * backtrace.c: Include "libguile/filesys.h".
12040 (sym_base, display_backtrace_get_file_line,
12041 display_backtrace_file, display_backtrace_file_and_line): New.
12042 (display_frame): Call display_backtrace_file_and_line if that is
12043 requested.
12044 (display_backtrace_body): Call scm_display_backtrace_file if
12045 requested.
12046
12047 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
12048 Prototypes removed since there's no definition for these
12049 functions.
12050
880a7d13
MG
120512001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12052
12053 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
12054 Changed use of scm_array->scm_array_t and
12055 scm_array_dim->scm_array_dim_t to enable build with
12056 --disable-deprecated.
12057
1be6b49c
ML
120582001-05-24 Michael Livshin <mlivshin@bigfoot.com>
12059
12060 The purpose of this set of changes is to regularize Guile's usage
12061 of ANSI C integral types, with the following ideas in mind:
12062
d69c867a
ML
12063 - SCM does not nesessarily have to be long.
12064 - long is not nesessarily enough to store pointers.
1be6b49c
ML
12065 - long is not nesessarily the same size as int.
12066
12067 The changes are incomplete and possibly buggy. Please test on
12068 something exotic.
12069
12070 * validate.h
12071 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
12072 new macros.
12073
12074 * unif.h: type renaming:
12075 scm_array -> scm_array_t
12076 scm_array_dim -> scm_array_dim_t
12077 the old names are deprecated, all in-Guile uses changed.
12078
12079 * tags.h (scm_ubits_t): new typedef, representing unsigned
12080 scm_bits_t.
12081
12082 * stacks.h: type renaming:
12083 scm_info_frame -> scm_info_frame_t
12084 scm_stack -> scm_stack_t
12085 the old names are deprecated, all in-Guile uses changed.
12086
12087 * srcprop.h: type renaming:
12088 scm_srcprops -> scm_srcprops_t
12089 scm_srcprops_chunk -> scm_srcprops_chunk_t
12090 the old names are deprecated, all in-Guile uses changed.
12091
12092 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
12093 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
12094 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
12095 vectors.c, vports.c, weaks.c:
12096 various int/size_t -> size_t/scm_bits_t changes.
12097
12098 * random.h: type renaming:
12099 scm_rstate -> scm_rstate_t
12100 scm_rng -> scm_rng_t
12101 scm_i_rstate -> scm_i_rstate_t
12102 the old names are deprecated, all in-Guile uses changed.
12103
12104 * procs.h: type renaming:
12105 scm_subr_entry -> scm_subr_entry_t
12106 the old name is deprecated, all in-Guile uses changed.
12107
12108 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
12109 type renaming:
12110 scm_option -> scm_option_t
12111 the old name is deprecated, all in-Guile uses changed.
12112
12113 * objects.c: various long -> scm_bits_t changes.
12114 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
12115
12116 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
12117 SCM_I_FIXNUM_BIT.
12118
12119 * num2integral.i.c: new file, multiply included by numbers.c, used
12120 to "templatize" the various integral <-> num conversion routines.
12121
12122 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
12123 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
12124 deprecated.
12125 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
12126 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
12127 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
12128 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
12129 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
12130 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
12131 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
12132 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
12133 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
12134 scm_num2size): new functions.
12135
d69c867a 12136 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
12137
12138 * load.c: change int -> size_t in various places (where the
12139 variable is used to store a string length).
12140 (search-path): call scm_done_free, not scm_done_malloc.
12141
12142 * list.c (scm_ilength): return a scm_bits_t, not long.
12143 some other {int,long} -> scm_bits_t changes.
12144
12145 * hashtab.c: various [u]int -> scm_bits_t changes.
12146 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
12147 (scm_ihashx): n: uint -> scm_bits_t
12148 use scm_bits2num instead of scm_ulong2num.
12149
12150 * gsubr.c: various int -> scm_bits_t changes.
12151
12152 * goops.[hc]: various {int,long} -> scm_bits_t changes.
12153
d69c867a 12154 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
12155
12156 * gh.h (gh_str2scm): len: int -> size_t
12157 (gh_{get,set}_substr): start: int -> scm_bits_t,
12158 len: int -> size_t
12159 (gh_<num>2scm): n: int -> scm_bits_t
12160 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
12161 (gh_length): return scm_bits_t, not unsigned long.
12162
12163 * gc.[hc]: various small changes relating to many things stopping
12164 being long and starting being scm_[u]bits_t instead.
12165 scm_mallocated should no longer wrap around.
12166
12167 * fports.h: type renaming:
12168 scm_fport -> scm_fport_t
12169 the old name is deprecated, all in-Guile uses changed.
12170
12171 * fports.c (fport_fill_input): count: int -> scm_bits_t
12172 (fport_flush): init_size, remaining, count: int -> scm_bits_t
12173
12174 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
12175 those prototypes, as the functions they prototype don't exist.
12176
12177 * fports.c (default_buffer_size): int -> size_t
12178 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
12179 default_size: int -> size_t
12180 (scm_setvbuf): csize: int -> scm_bits_t
12181
12182 * fluids.c (n_fluids): int -> scm_bits_t
12183 (grow_fluids): old_length, i: int -> scm_bits_t
12184 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
12185 scm_bits_t
12186 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
12187
12188 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
12189 the new and shiny SCM_NUM2INT.
12190
12191 * extensions.c: extension -> extension_t (and made a typedef).
12192
12193 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
12194 there are no nasty surprises if/when the various deeply magic tag
12195 bits move somewhere else.
12196
12197 * eval.c: changed the locals used to store results of SCM_IFRAME,
12198 scm_ilength and such to be of type scm_bits_t (and not int/long).
12199 (iqq): depth, edepth: int -> scm_bits_t
12200 (scm_eval_stack): int -> scm_bits_t
12201 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
12202 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
12203 i: int -> scm_bits_t
12204
12205 * environments.c: changed the many calls to scm_ulong2num to
12206 scm_ubits2num.
12207 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
12208
12209 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
12210
12211 * debug.h: type renaming:
12212 scm_debug_info -> scm_debug_info_t
12213 scm_debug_frame -> scm_debug_frame_t
12214 the old names are deprecated, all in-Guile uses changed.
12215 (scm_debug_eframe_size): int -> scm_bits_t
12216
12217 * debug.c (scm_init_debug): use scm_c_define instead of the
12218 deprecated scm_define.
12219
12220 * continuations.h: type renaming:
12221 scm_contregs -> scm_contregs_t
12222 the old name is deprecated, all in-Guile uses changed.
12223 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
12224 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
12225
12226 * continuations.c (scm_make_continuation): change the type of
d69c867a 12227 stack_size from long to scm_bits_t.
1be6b49c
ML
12228
12229 * ports.h: type renaming:
12230 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
12231 scm_port -> scm_port_t
12232 scm_ptob_descriptor -> scm_ptob_descriptor_t
12233 the old names are deprecated, all in-Guile uses changed.
12234 (scm_port_t.entry): int -> scm_bits_t.
12235 (scm_port_t.line_number): int -> long.
12236 (scm_port_t.putback_buf_size): int -> size_t.
12237
12238 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 12239 global namespace and have little value beside that).
1be6b49c
ML
12240 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
12241 SCM handle).
12242 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 12243 exist (for size_t & ptrdiff_t).
1be6b49c
ML
12244 (scm_sizet): deprecated.
12245
12246 * Makefile.am (noinst_HEADERS): add num2integral.i.c
12247
a6219f22
MV
122482001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
12249
12250 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
12251 SCM_VARIABLE_INIT since that it what it used to be.
12252
12253 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 12254 ANSIsh. Thanks to Matthias Köppe!
a6219f22 12255
311b6a3c
MV
122562001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
12257
9dfc4faa
MV
12258 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
12259 needed for weak-key hashtables.
12260
12261 * procs.c (scm_make_subr_with_generic): Add missing last argument
12262 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
12263
12264 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
12265 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
12266
12267 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
12268
2fc933fe
MV
122692001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
12270
57ae112d
MV
12271 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
12272 `duplicate_string'. Do not use an indirect cell, store symbol
12273 directly in collision list of hash table.
12274 (duplicate_string): Removed.
58bee6a8 12275
57ae112d
MV
12276 * init.c (scm_init_guile_1): Call scm_init_extensions.
12277
12278 * Makefile.am: Add "extensions.c" and related files in all the
12279 right places.
12280
12281 * extensions.h, extension.c: New files.
12282
12283 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
12284
2fc933fe
MV
12285 * modules.h (scm_system_module_env_p): Move out of deprecated
12286 section.
12287
12288 * rw.h (scm_init_rw): Added prototype.
12289
12290 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
12291 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
12292 New functions. They replace scm_make_gsubr and
12293 scm_make_gsubr_with_generic. The `make' variants only create the
12294 gsubr object, while the `define' variants also put it into the
12295 current module. Changed all callers.
12296 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
12297
12298 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
12299 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
12300 functions. They replace scm_make_subr, scm_make_subr_opt and
12301 scm_make_subr_with_generic. The `make' variants only create the
12302 subr object, while the `define' variants also put it into the
12303 current module. Changed all callers.
12304 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
12305 Deprecated.
12306
12307 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
12308 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
12309 the comments above.
58bee6a8 12310
18928596
NJ
123112001-05-19 Neil Jerram <neil@ossau.uklinux.net>
12312
12313 * throw.c (scm_lazy_catch): Slight docstring clarification.
12314
21a13beb
MV
123152001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
12316
e2b6ddc6
MV
12317 * throw.c: Lazy-catch handlers are no longer allowed to return.
12318 Fixed comments throughout.
12319 (scm_ithrow): Signal an error when a lazy-catch handler returns.
12320 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
12321 recognized as such.
12322
21a13beb
MV
12323 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
12324 refered to s_scm_minor_version previously.
12325
12326 * modules.h, modules.c: Moved around a lot of code so that
12327 deprecated features appear at the bottom.
12328 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
12329 module_prefix, make_modules_in_var, beautify_user_module_x_var,
12330 scm_the_root_module, scm_make_module, scm_ensure_user_module,
12331 scm_load_scheme_module): Deprecated.
12332 (scm_system_module_env_p): Return SCM_BOOL_T directly for
12333 environments corresponding to the root module.
12334 (convert_module_name, scm_c_resolve_module,
12335 scm_c_call_with_current_module, scm_c_define_module,
12336 scm_c_use_module, scm_c_export): New.
12337 (the_root_module): New static variant of scm_the_root_module. Use
12338 it everywhere instead of scm_the_root_module.
58bee6a8 12339
21a13beb
MV
12340 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12341 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12342 (scm_c_with_fluid): New.
12343 (scm_with_fluids): Use scm_c_with_fluids instead of
12344 scm_internal_with_fluids.
58bee6a8 12345
21a13beb
MV
12346 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12347 `scm_init_goops'. Do not explicitly create/switch modules.
12348 Return SCM_UNSPECIFIED.
12349 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12350 (scm_load_goops): Use scm_c_resolve_module instead of
12351 scm_resolve_module.
58bee6a8 12352
21a13beb
MV
12353 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12354 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12355 `scm_init_rw' prior to loading the startup files.
12356
12357 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12358 scm_init_rdelim. Do not explicitly create/switch modules.
12359 Return SCM_UNSPECIFIED.
12360 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12361 procedure.
58bee6a8 12362
21a13beb
MV
12363 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12364 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12365 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12366
12367 * script.c (scm_shell): Evaluate the compiled switches in the
12368 current module, not in the root module.
12369
123702001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12371
12372 * fluids.c (scm_c_with_fluids): Rename from
12373 scm_internal_with_fluids.
12374 (scm_internal_with_fluids): Deprecated.
12375 (scm_c_with_fluid): New.
12376
09cb9e73
DH
123772001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12378
12379 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12380
12381 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12382 accessed with SCM_C[AD]R.
12383
12384 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12385
c81ea65d
RB
123862001-05-16 Rob Browning <rlb@cs.utexas.edu>
12387
12388 * version.c (s_scm_major_version): doc fixes.
12389 (s_scm_minor_version): doc fixes.
12390 (s_scm_minor_version): new function.
12391
12392 * version.h (scm_init_version): new function.
12393
12394 * versiondat.h.in: add GUILE_MICRO_VERSION.
12395
887dfa7d
DH
123962001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12397
12398 * deprecation.c (scm_init_deprecation): Renamed
12399 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12400
78930a69
MV
124012001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12402
12403 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12404 dependent on cpp_cnvt.awk
12405
39cde5c5
MG
124062001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12407
12408 * script.c (scm_compile_shell_switches): New command line option
12409 `--use-srfi' for loading a list of SRFIs on startup.
12410 (scm_shell_usage): Added `--use-srfi' to help message.
12411
f3f9dcbc
MV
124122001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12413
78930a69 12414 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12415
f3f9dcbc
MV
12416 The concept of vcells has been removed from Guile. With it,
12417 explicit obarrays and associated operations are gone. Use
12418 hashtables instead of obarrays.
887dfa7d 12419
f3f9dcbc
MV
12420 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12421 result as variable instead of vcell. Glocs no longer point to a
12422 vcell but to a variable. Use scm_c_define instead of
12423 scm_sysintern and treat the result as a variable (which it is),
12424 not a vcell.
887dfa7d 12425
f3f9dcbc
MV
12426 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12427 SCM_DEFVARIABLEP): Deprecated.
12428 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12429 (variable_print): Do not print name of variable.
12430 (variable_equalp): Compare values, not vcells.
12431 (anonymous_variable_sym): Removed.
12432 (make_vcell_variable): Removed.
12433 (make_variable): New, as replacement.
12434 (scm_make_variable, scm_make_undefined_variable): Do not take name
12435 hint parameter.
12436 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12437 error in that case.
12438 (scm_builtin_variable): Deprecated.
12439
12440 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12441 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12442 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12443 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12444 scm_string_to_obarray_symbol, scm_intern_symbol,
12445 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12446 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12447 Deprecated and moved to "symbols-deprecated.c".
12448 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12449 (scm_init_symbols): Call scm_init_symbols_deprecated.
12450 * symbols-deprecated.c: New file.
12451 * Makefile.am: Added symbols-deprecated.c and related files in all
12452 the right places.
887dfa7d 12453
f3f9dcbc
MV
12454 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12455 SCM_GLOBAL_VCELL_INIT): Deprecated.
12456 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12457 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12458
f3f9dcbc
MV
12459 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12460 SCM_GLOC_SYM.
12461
12462 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12463 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12464 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12465 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12466 Changed according to the `throughout' comments.
12467
12468 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12469 to `int'.
12470 (scm_module_type): Removed.
12471 (the_root_module): Renamed to the_root_module_var. Now points to
12472 a variable instead of a vcell. Updated all uses.
12473 (scm_the_root_module): Return SCM_BOOL_F when module systems
12474 hasn't been booted yet.
12475 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12476 (scm_post_boot_init_modules): Made static.
12477 (scm_set_current_module): Call scm_post_boot_init_modules on first
12478 call.
12479 (make_modules_in, beautify_user_module_x, resolve_module,
12480 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12481 suffix. Now point to variables instead of vcells. Updated all
12482 uses.
12483 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12484 and return SCM_BOOL_F in that case.
12485 (scm_module_transformer): Likewise.
12486 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12487 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12488 (scm_eval_closure_lookup): Do not allow new definitions when
12489 `interface' flag is set.
12490 (scm_standard_interface_eval_closure): New.
12491 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12492 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12493 scm_c_lookup, scm_c_module_define, scm_c_define,
12494 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12495 scm_modules_prehistory): New.
12496 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12497 instead of scm_intern0.
887dfa7d 12498
f3f9dcbc
MV
12499 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12500 symbol.
12501
12502 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12503 hashtable operations to maintain the keywords, not obarray ones.
12504
12505 * init.c (scm_load_startup_files): Do not call
12506 scm_post_boot_init_modules. This is done by
12507 scm_set_current_module now.
12508 (scm_init_guile_1): Call scm_modules_prehistory. Call
12509 scm_init_variable early on.
12510
12511 * goops.c (s_scm_sys_goops_loaded): Get
12512 var_compute_applicable_methods from scm_sym2var, not from a direct
12513 invocation of scm_goops_lookup_closure.
12514
12515 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12516
12517 * gc.c: Added simple debugging hack to mark phase of GC: When
12518 activated, do not tail-call scm_gc_mark. This gives nice
12519 backtraces.
12520 (scm_unhash_name): Removed.
12521
12522 * feature.c (features): Renamed to features_var. Now points to a
12523 variable instead of a vcell. Updated all uses.
12524
12525 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12526 `scm_current_module_lookup_closure' which will do the right thing
12527 when the module system hasn't been booted yet.
12528 (SCM_GLOC_SYM): Removed.
12529 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12530 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12531
f3f9dcbc
MV
12532 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12533 instead of with vcells. Do not overwrite `var' with the result of
12534 the lookup, use the new `real_var' instead. Remove `var2' in
12535 exchange (which was only used with threads).
12536 (sym_three_question_marks): New.
12537 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12538 `SCM_GLOC_SYM'.
12539 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12540 (scm_m_atfop): Expect the function definition to be a variable
12541 instead of a vcell.
12542 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12543 symbol instead.
12544 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12545 (scm_eval_args): Use more explicit code in the gloc branch of the
12546 atrocious struct ambiguity test. The optimizer will sort this
12547 out.
12548 (scm_deval_args): Likewise.
12549 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12550 remember the symbol instead. Added some comments where
12551 scm_tc3_cons_gloc really exclusively refers to structs.
12552 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12553 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12554 of scm_sysintern in general.
12555
12556 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12557 explicit magic.
12558
12559 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12560 pairs. Put the variable directly in the gloc.
12561 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12562 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12563
12564 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12565
12566 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12567 scm_the_last_stack_fluid_var. It now points to a variable instead
12568 of a vcell. Updated all uses.
12569 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12570 instead of a vcell. Updated all uses.
12571
12572 * _scm.h: Include "variables.h" and "modules.h" since almost
12573 everybody needs them now.
12574
12575 * root.h (scm_symhash, scm_symhash_vars): Removed.
12576 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12577
7c33806a
DH
125782001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12579
12580 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12581 scm_listofnull.
7c33806a
DH
12582
12583 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12584 like the SCM_NEWCELL macro counterparts.
12585
12586 (scm_init_storage, scm_init_gc): Moved initialization of
12587 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12588
12589 (scm_init_storage): Moved initialization of scm_undefineds and
12590 scm_listofnull to eval.c, initializion of scm_nullstr to
12591 strings.c, initializion of scm_nullvect to vectors.c.
12592
12593 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12594 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12595
12596 * init.c (scm_init_guile_1): Reordered some initializations and
12597 added dependcy information comments.
12598
12599 * load.c (scm_init_load): Use scm_nullstr.
12600
12601 * strings.c (scm_init_strings): Initialize scm_nullstr.
12602
12603 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12604
11bbab47
MV
126052001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12606
12607 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12608 multiple lines. Thanks to Matthias Köppe!
11bbab47 12609
5cd06d5e
DH
126102001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12611
12612 * deprecation.c: Fixed copyright date.
12613
12614 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12615 DEPRECATION_H to SCM_DEPRECATION_H.
12616
32bac999
TTN
126172001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12618
12619 * guile-doc-snarf.in: Update copyright.
12620 Fix relative path bug. Thanks to Sergey Poznyakoff.
12621
c9dcc5ae
MV
126222001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12623
12624 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12625 accept open ports. Thanks to Quetzalcoatl Bradley!
12626
7c582ec9
MG
126272001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12628
12629 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12630 has 779 primitives on startup.
12631
284ab601
MV
126322001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12633
12634 * eval.c (scm_i_eval): Copy expression before passing it to
12635 SCM_XEVAL. The copy operation was removed unintendedly during my
12636 change on 2001-03-25.
12637
910d1e40
ML
126382001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12639
9a5fa6e9 12640 from Matthias Köppe (thanks!):
910d1e40
ML
12641
12642 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12643 portable.
12644
12645 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12646 docstring.
12647
56e55ac7
DH
126482001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12649
12650 * gc.c (scm_init_gc): Added FIXME comment.
12651
12652 * hooks.c: Since hooks don't have a name any more, it is not
12653 necessary to include objprop.h.
12654
12655 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12656
12657 (symbol_name, scm_make_hook_with_name): Removed.
12658
12659 (scm_create_hook): Don't set the hook's name property.
12660
12661 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12662
12663 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12664
12665 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12666
12667 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12668 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12669 FLOBUFLEN and define it unconditionally.
12670
d204b24c
MV
126712001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12672
438201b4
MV
12673 * gh_data.c (gh_lookup): Call gh_module_lookup with
12674 `scm_current_module ()', not `#f'.
12675 (gh_module_lookup): Expect a module instead of an obarray as first
12676 argument and do lookup in that module.
56e55ac7 12677
d204b24c
MV
12678 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12679 arrays. The length of array is already determined differently and
12680 scm_uniform_vector_length does not work on arrays.
12681
26c1d549
MV
126822001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12683
fe7c2f88
MV
12684 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12685 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12686
26c1d549
MV
12687 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12688 they are not used. Changed `wrong type' error into `wrong num
12689 args' error. Changed all callers.
56e55ac7 12690
26c1d549
MV
12691 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12692 arguments are supplied.
12693
1c938eb8
TTN
126942001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12695
12696 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12697 describe `regexp/notbol' and `regexp/noteol' execution flags.
12698
3a6379f7
TTN
12699 * strop.c (scm_substring_move_x): Doc fix; nfc.
12700
c10ecc4c
MV
127012001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12702
12703 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12704 (scm_set_object_procedure_x): Use it to check argument. Fix
12705 docstring.
12706
12707 * evalext.c (scm_definedp): Fix docstring.
12708
a57a0b1e
GH
127092001-05-05 Gary Houston <ghouston@arglist.com>
12710
12711 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12712 support.
12713
7a095584
NJ
127142001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12715
12716 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12717 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12718 Change R4RS references to R5RS.
12719
12720 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12721 docstring source are correctly reproduced in the output (ii)
12722 we don't anymore get occasional trailing quotes. Also reorganized
12723 and commented the code a little.
12724
12725 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12726 fixes.
12727
dd2a6f3a
MG
127282001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12729
12730 * strop.c (scm_string_split): New procedure.
12731
12732 * strop.h (scm_string_split): Added prototype.
12733
00120130
GH
127342001-05-04 Gary Houston <ghouston@arglist.com>
12735
12736 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12737 Dale P. Smith.
12738
b65e6bfe
MV
127392001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12740
12741 * rw.c: Include "modules.h" and "strports.h".
12742
12743 * net_db.h (scm_gethost): Added prototype.
12744
12745 * deprecation.h, deprecation.c: New.
12746 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12747 (DOT_X_FILES): Added "deprecation.x".
12748 (modinclude_HEADERS): Added "deprecation.h".
12749
12750 * init.c: Include "deprecation.h".
12751 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12752
b65e6bfe
MV
127532001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12754
12755 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12756 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12757 New.
12758
b0e5fd8c
GH
127592001-04-29 Gary Houston <ghouston@arglist.com>
12760
12761 * rw.c: new file, implementing C part of module (ice-9 rw).
12762 (scm_read_string_x_partial): moved from ioext.c
12763 (scm_init_rw): new proc.
12764 * rw.h: new file.
12765 init.c: include rw.h and call scm_init_rw.
12766 Makefile.am: include rw.c and rw.h.
12767
0b2da99c
RB
127682001-04-28 Rob Browning <rlb@cs.utexas.edu>
12769
12770 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12771 know what's supposed to happen to it.
12772
12773 * list.h (scm_list_star): deprecation expired - removed.
12774
12775 * numbers.h (scm_dblproc): deprecation expired - removed.
12776 (SCM_UNEGFIXABLE): deprecation expired - removed.
12777 (SCM_FLOBUFLEN): deprecation expired - removed.
12778 (SCM_INEXP): deprecation expired - removed.
12779 (SCM_CPLXP): deprecation expired - removed.
12780 (SCM_REAL): deprecation expired - removed.
12781 (SCM_IMAG): deprecation expired - removed.
12782 (SCM_REALPART): deprecation expired - removed.
12783 (scm_makdbl): deprecation expired - removed.
12784 (SCM_SINGP): deprecation expired - removed.
12785 (SCM_NUM2DBL): deprecation expired - removed.
12786 (SCM_NO_BIGDIG): deprecation expired - removed.
12787
12788 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12789 (scm_tc_dblr): deprecation expired - removed.
12790 (scm_tc_dblc): deprecation expired - removed.
12791 (scm_tc16_flo): deprecation expired - removed.
12792 (scm_tc_flo): deprecation expired - removed.
12793
12794 * tag.h (scm_tag): deprecation expired - removed.
12795
12796 * tag.c: (scm_tag): deprecation expired - removed.
12797
12798 * ioext.c: (scm_fseek): deprecation expired - removed.
12799
12800 * ioext.h (scm_fseek): deprecation expired - removed.
12801
12802 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12803
12804 * gh.h (gh_int2scmb): deprecation expired - removed.
12805
e3334972
NJ
128062001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12807
12808 * stacks.c (scm_make_stack): Fix typo in docstring.
12809
a0f979ac
RB
128102001-04-27 Rob Browning <rlb@cs.utexas.edu>
12811
12812 * error.c (scm_sysmissing): deprecation expired - removed.
12813
12814 * error.h (scm_sysmissing): deprecation expired - removed.
12815
12816 * gc.c
12817 (scm_init_gc): gc-thunk deprecation expired - removed.
12818 (scm_gc_vcell): deprecation expired - removed.
12819 (gc_async_thunk): scm_gc_vcell related code removed.
12820
12821 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12822
12823 * strings.h
12824 (SCM_NSTRINGP): deprecation expired - removed.
12825 (SCM_NRWSTRINGP): deprecation expired - removed.
12826
12827 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12828
12829 * chars.h
12830 (SCM_ICHRP): deprecation expired - removed.
12831 (SCM_ICHR): deprecation expired - removed.
12832 (SCM_MAKICHR): deprecation expired - removed.
12833
12834 * ports.h
12835 (SCM_INPORTP): deprecation expired - removed.
12836 (SCM_OUTPORTP): deprecation expired - removed.
12837
253081cf
MV
128382001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12839
12840 * modules.c (scm_module_type): New.
12841 (scm_post_boot_init_modules): Initialize from Scheme value.
12842 (the_module, scm_current_module, scm_init_modules): the_module is
12843 now a C only fluid.
12844 (scm_current_module): Export to Scheme.
12845 (scm_set_current_module): Do not call out to Scheme, do all the
12846 work in C. Export procedure to Scheme. Only accept modules, `#f'
12847 is no longer valid as the current module. Only set
12848 scm_top_level_lookup_closure_var and scm_system_transformer when
12849 they are not deprecated.
12850 (scm_module_transformer, scm_current_module_transformer): New.
12851
12852 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12853 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12854
253081cf
MV
12855 * gh_data.c: Removed FIXME comment about gh_lookup returning
12856 SCM_UNDEFINED. That's the right thing to do.
12857
12858 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12859 into the conditionally compiled sections.
12860 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12861 scm_current_module_transformer instead of scm_system_transformer.
12862 * init.c (start_stack): Move initialization of
12863 scm_system_transformer to the deprecated section.
1c938eb8 12864
1f7f9ed4
NJ
128652001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12866
12867 * throw.c (scm_throw): Correct docstring.
12868
66c73b76
GH
128692001-04-22 Gary Houston <ghouston@arglist.com>
12870
eefae538
GH
12871 * socket.c: attempted to improve the docstrings slightly.
12872
66c73b76
GH
12873 * net_db.c: remove bogus "close" declaration.
12874 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12875 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12876 moved to socket.c.
12877 * net_db.h: declarations moved too.
12878
12879 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12880 long.
12881 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12882 (VALIDATE_INET6): new macro.
12883 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12884 inet-pton and inet-ntop.
12885 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12886 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12887
7a7f7c53
DH
128882001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12889
12890 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12891 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12892
12893 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12894 when compiled in debug mode.
12895
12896 (scm_gc_sweep): Only call smob's free function if it is defined.
12897
12898 * print.c (scm_iprin1): No need to check for validity of smob
12899 type or existence of print function.
12900
12901 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12902 Resizing will not work well with preemptive threading.
12903
12904 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12905
12906 (scm_make_smob_type): Extracted initialization of smob
12907 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12908 of the critical section.
12909
12910 (scm_smob_prehistory): Initialize all smob descriptors. By
12911 default, don't assign a smob free function: Most smob types don't
12912 need one.
12913
12914 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12915
e1368a8d
GH
129162001-04-21 Gary Houston <ghouston@arglist.com>
12917
12918 * socket.c (FLIP_NET_HOST_128): new macro.
12919 (scm_fill_sockaddr): use new macro.
12920 (scm_addr_vector): completed IPv6 address support. added const
12921 to the address parameter.
12922
5a525b84
GH
129232001-04-20 Gary Houston <ghouston@arglist.com>
12924
12925 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12926 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12927 is defined.
12928 (scm_addr_vector): use a switch instead of multiple if statements.
12929 Add support for IPv6 (incomplete) .
e1368a8d 12930 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12931
1a551638
DH
129322001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12933
12934 * struct.c (scm_free_structs): Only pairs may be accessed with
12935 SCM_C[AD]R.
12936
c07b3fef
MD
129372001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12938
a9d861e3
MD
12939 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12940
c07b3fef
MD
12941 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12942 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12943 parentheses in order to get the correct associativity.
12944
af7546eb
DH
129452001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12946
12947 * unif.c (scm_array_to_list): Added missing handling of arrays of
12948 bytes. Thanks to Masao Uebayashi for the bug report.
12949
4daecfee
DH
129502001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12951
12952 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12953 consistently.
12954
726d810a
DH
129552001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12956
12957 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12958
12959 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12960 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12961 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12962 SCM_CLOSURE_FORMALS.
12963
12964 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12965 (scm_i_procedure_arity): Prefer stronger predicates like
12966 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12967
12968 * macros.c (macro_print): Extracted macro printing code from
12969 print.c and simplified it.
12970
12971 (scm_macro_type): Use SCM_MACRO_TYPE;
12972
12973 (scm_init_macros): Use macro_print for printing macros.
12974
12975 * print.c (scm_print_opts): Improved option documentation.
12976
12977 (scm_iprin1): Extracted printing of macros to macros.c.
12978 Simplified printing of ordinary closures.
12979
12980 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12981 Martin Grabmueller for the bug report.
12982
e038c042
DH
129832001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12984
12985 This patch eliminates some further applications of SCM_C[AD]R to
12986 non pair cells.
12987
12988 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12989 never been applied to real pairs.
12990
12991 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12992
12993 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12994
12995 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12996 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12997 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12998
12999 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
13000 Added.
13001
13002 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
13003 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
13004
13005 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
13006 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
13007 SCM_SET{AND,OR}_CAR.
13008
3453619b
GH
130092001-04-17 Gary Houston <ghouston@arglist.com>
13010
13011 * some initial support for IPv6:
1c938eb8 13012
3453619b
GH
13013 * socket.c (scm_fill_sockaddr): improve the argument validation.
13014 don't allocate memory until all args are checked. instead of
13015 unconditional memset of soka, try setting sin_len to 0 if
13016 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
13017 (scm_socket, scm_connect): extend docstrings for IPv6.
13018 (scm_init_socket): intern AF_INET6 and PF_INET6.
13019
216eedfc
DH
130202001-04-17 Niibe Yutaka <gniibe@m17n.org>
13021
13022 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
13023 matches SCM_DEFER_INTS at the beginning of the function.
13024
13025 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
13026
13027 * gc.c (scm_igc): Unconditionally call
13028 SCM_CRITICAL_SECTION_START/END.
13029
13030 * fluids.c (next_fluid_num): Unconditionally call
13031 SCM_CRITICAL_SECTION_START/END.
13032 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
13033
13034 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
13035 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
13036 Removed.
13037
13038 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
13039 Defined as nothing for the case of !defined(USE_THREADS).
13040 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
13041 Removed.
13042 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
13043 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
13044 LINE.
13045 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
13046 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
13047 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
13048 SCM_CRITICAL_SECTION_START/END.
13049 (SCM_REALLOW_INTS: Bug fix. Don't call
13050 SCM_THREAD_SWITCHING_CODE.
13051 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
13052 SCM_THREAD_SWITCHING_CODE directly.
13053 (SCM_ENTER_A_SECTION): Unconditionally use
13054 SCM_CRITICAL_SECTION_START/END. (was:
13055 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
13056
130572001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13058
13059 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
13060 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
13061 allowed to explicitly set this macro via the CFLAGS variable
13062 during make.
13063
13064 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
13065 (SCM_THREAD_CRITICAL_SECTION_START,
13066 SCM_THREAD_CRITICAL_SECTION_END): Renamed
13067 SCM_THREAD_CRITICAL_SECTION_START/END to
13068 SCM_CRITICAL_SECTION_START/END.
13069
f22ed5a0
KN
130702001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
13071
13072 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
13073 instead of bzero.
1c938eb8 13074
f22ed5a0 13075 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 13076 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
13077
13078 Thanks to NIIBE Yutaka.
13079
508ded1c
MD
130802001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13081
a087ba81
MD
13082 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
13083 goops module should be registered in order to work for an
13084 application which uses libguile statically linked.)
508ded1c 13085
e4b265d8
DH
130862001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
13087
13088 * numbers.[ch] (scm_num2long, scm_num2long_long,
13089 scm_num2ulong_long, scm_num2ulong): Argument position is an
13090 unsigned integer.
13091
13092 * environments.c (eval_environment_folder,
13093 import_environment_folder), gh_data.c (gh_scm2longs,
13094 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
13095 for integers and pointers, respectively.
13096
13097 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
13098 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
13099 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
13100 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
13101
13102 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
13103 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
13104 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
13105 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
13106 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
13107 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
13108
89d04205
NJ
131092001-04-09 Neil Jerram <neil@ossau.uklinux.net>
13110
13111 * strings.c (scm_read_only_string_p): Update docstring to reflect
13112 current (non-)usage of "read only" strings.
40f83c3e
NJ
13113 (scm_make_shared_substring): Clarify docstring by changing
13114 "semantics" to "arguments".
89d04205 13115
4d66be54
MG
131162001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13117
13118 * hooks.c (scm_make_hook, scm_make_hook_with_name),
13119 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
13120 improvements.
13121
1e6808ea
MG
131222001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13123
13124 The following changes make the documentation more consistent.
1c938eb8 13125
1e6808ea
MG
13126 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
13127 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
13128 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
13129 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
13130 ... @end lisp.
13131
13132 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
13133 (scm_array_dimensions, scm_make_shared_array),
13134 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
13135 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
13136 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
13137 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
13138 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
13139 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
13140 macros.c (scm_makmmacro), list.c (scm_append), environments.c
13141 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
13142 @example ... @end example to @lisp ... @end lisp.
13143
13144 * weaks.c (scm_weak_vector): Corrected docstring.
13145
13146 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
13147 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
13148 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
13149 (scm_hashx_set_x, scm_hashx_get_handle),
13150 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
13151 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
13152 vectors.c (scm_vector_fill_x), strings.c
13153 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
13154 objprop.c (scm_set_object_properties_x):
13155 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
13156 strports.c (scm_call_with_input_string), ports.c
13157 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
13158 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
13159 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
13160 (scm_make_weak_vector,scm_weak_vector_p),
13161 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
13162 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
13163 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13164 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
13165 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
13166 Made parameter names match documentation by renaming parameters
13167 and/or fixing docstrings.
1c938eb8 13168
1e6808ea
MG
13169 * numbers.c (scm_ash): Corrected Texinfo markup.
13170
13171 * strop.c (scm_string_index, scm_string_rindex),
13172 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
13173
13174 * vports.c (scm_make_soft_port), unif.c
13175 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
13176 (scm_dimensions_to_uniform_array, scm_transpose_array),
13177 (scm_array_in_bounds_p, scm_uniform_vector_ref),
13178 (scm_bit_count, scm_bit_position, scm_bit_count_star),
13179 (scm_array_to_list, scm_list_to_uniform_array),
13180 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
13181 (scm_open_input_string, scm_open_output_string),
13182 (scm_get_output_string), strop.c (scm_string_copy),
13183 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
13184 (scm_get_internal_real_time, scm_times),
13185 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
13186 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
13187 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
13188 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
13189 simpos.c (scm_system), random.c (scm_random_uniform),
13190 (scm_random_normal, scm_random_exp), ramap.c
13191 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
13192 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
13193 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
13194 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
13195 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
13196 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
13197 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
13198 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
13199 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
13200 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
13201 (scm_logand, scm_logior, scm_logxor, scm_lognot),
13202 (scm_integer_expt, scm_bit_extract, scm_logcount),
13203 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
13204 net_db.c (scm_inet_netof, scm_lnaof), modules.c
13205 (scm_interaction_environment), macros.c (scm_makacro),
13206 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
13207 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
13208 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
13209 (scm_fluid_ref), filesys.c (scm_open_fdes),
13210 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
13211 Docstring correction: `Returns' -> `Return'
13212
1c938eb8
TTN
13213 * gc.c (scm_set_debug_cell_accesses_x):
13214 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
13215 * fluids.c (scm_fluid_p): Added texinfo markup.
13216
13217 * error.c (scm_strerror): Made docstring more precise.
13218
13219 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
13220 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
13221 (scm_symbol_p, scm_symbol_to_string), strorder.c
13222 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
13223 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
13224 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
13225 (scm_string_ci_geq_p), strop.c (scm_string_copy),
13226 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
13227
9a6976cd
DH
132282001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
13229
13230 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
13231 mode, as suggested by Michael Livshin.
13232
463b2219
ML
132332001-03-31 Michael Livshin <mlivshin@bigfoot.com>
13234
13235 * backtrace.c (display_backtrace_body): since the `print_state'
13236 variable is not used (instead its data field is used directly as
13237 `pstate'), protect it from the hungry compiler optimizations.
13238 thanks to Bill Schottstaedt for the report.
13239
61045190
DH
132402001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13241
13242 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
13243 It is only defined and used if guile is compiled with
13244 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
13245 let cells with a free_cell type tag be visible outside of the
13246 garbage collector when in debug mode.
13247
13248 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
13249
13250 (scm_assert_cell_valid): Use a local static variable to avoid
13251 recursion.
13252
13253 (MARK): Only check for rogue cell pointers in debug mode. Use
13254 scm_cellp for this purpose and place all checks for rogue pointers
13255 into that function. Further, since due to conservative scanning
13256 we may encounter free cells during marking, don't use the standard
13257 cell type accessor macro to determine the cell type.
13258
13259 (scm_cellp): Check if the cell pointer actually points into a
13260 card header.
13261
13262 (scm_init_gc): Initalize scm_tc16_allocated.
13263
13264 * gc.h (GCH): Renamed to SCM_GC_H.
13265
13266 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
13267 might be unnecessary, but I feel better this way :-)
13268
13269 (SCM_GC_CELL_TYPE): New macro.
13270
13271 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
13272 in guile, and it is unlikely that they will be applied to real
13273 pairs anyway.
13274
13275 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
13276
13277 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
13278 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
13279
13280 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
13281 make sure that in debug mode no free cell will ever be visible
13282 outside of the garbage collector.
13283
85d6df6a
DH
132842001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13285
13286 * async.c (scm_asyncs_pending): Don't use != to compare SCM
13287 values.
13288
13289 * async.c (scm_system_async), variable.c (scm_make_variable,
13290 scm_make_undefined_variable): Use scm_cons to create a pair.
13291
13292 * debug.c (scm_reverse_lookup): Perform proper type checking.
13293 Remove suspicious use of SCM_SLOPPY_CONSP.
13294
13295 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
13296 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
13297 the corresponding optimization.
13298
13299 * eval.c (iqq): Use proper type check.
13300
13301 (scm_m_expand_body): Remove redundant type checks.
13302
13303 (promise_print): Don't access promise cells as pairs.
13304
13305 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
13306 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
13307 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
13308 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
13309 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
13310
13311 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
13312 (scm_iprin1): Use new macro predicate and accessors.
13313
13314 * eval.h (scm_tc16_macro): Removed declaration. It is declared
13315 in macros.h.
13316
13317 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
13318 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
13319 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
13320 SCM_VARIABLE_H. Even the macros that are used to inhibit
13321 including a header file twice should be in the SCM_ namespace.
13322
13323 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
13324 properties.c (scm_primitive_property_ref,
13325 scm_primitive_property_del_x): Prefer stronger predicates like
13326 SCM_NULLP or SCM_FALSEP over SCM_IMP.
13327
13328 * gc.c (MARK): Use proper macros to access procedure-with-setter
13329 cell elements and closure cell elements.
13330
13331 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
13332 access free cells as pairs.
13333
13334 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13335 no hashtab entry is found.
13336
13337 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13338 SCM_CLR_PORT_OPEN_FLAG.
13339
13340 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13341 use SCM_SET_C[AD]R for uninitialized cells.
13342
13343 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13344 If the hashtable has no slots, return #f instead of '(). This
13345 unifies the return value with most assoc-functions.
13346
13347 (scm_hash_fn_ref): Use proper type check.
13348
13349 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13350 Removed references to non-existing functions from documentation.
13351
13352 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13353 access keyword cell elements.
13354
13355 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13356 macros.
13357
13358 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13359
13360 * print.c (scm_iprlist): Added comment. Improved loop
13361 conditions.
13362
13363 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13364 pairs.
13365
13366 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13367
13368 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13369
13370 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13371 cells as pairs.
13372
13373 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13374 scm_variable_set_x): Use proper macros to access variable cell
13375 elements.
13376
13377 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13378
13379 * variable.h (SCM_VARVCELL): Don't access variable cells as
13380 pairs.
13381
13382 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13383 added FIXME comment, removed register specifier.
13384
1b27e91a
KN
133852001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13386
13387 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13388 * init.c (scm_init_guile_1): Don't init goopscore module.
13389
16c634ec
MV
133902001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13391
13392 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13393
91344ceb
MG
133942001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13395
13396 * strop.c (scm_string_to_list): Fixed docstring markup.
13397 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13398 (scm_string_downcase, scm_string_capitalize_x),
13399 (scm_string_capitalize): Rewrote and corrected docstrings.
13400 (scm_string_ci_to_symbol): Made docstring more explicit.
13401
07576812
MV
134022001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13403
13404 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13405 eval.c can use it.
13406 (scm_call_with_values): Removed.
13407 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13408 so that it can be exported.
13409 (scm_call_with_values): Removed.
1c938eb8 13410
07576812
MV
13411 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13412 * eval.c: Include "libguile/values.h"
13413 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13414 New.
13415 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13416 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13417 New delcarations to support above change.
13418
13419 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13420 errors with last change.
1c938eb8 13421
07576812
MV
134222001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13423
13424 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13425 scm_i_eval): Moved the application of the system transformer from
13426 scm_i_eval to scm_primitive_eval.
13427
a17bb5fd
NJ
134282001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13429
a6be01a4
NJ
13430 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13431
a17bb5fd
NJ
13432 * strop.c (scm_string_index): Fix docstring line break
13433 regression.
13434
13435 * list.c (scm_cons_star): Fix docstring typo.
13436
be54b15d
DH
134372001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13438
13439 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13440 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13441 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13442 scm_make_string, scm_string_append), strports.c (st_resize_port,
13443 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13444 scm_makstr with calls to scm_allocate_string.
13445
13446 * strings.[ch] (scm_allocate_string): New function.
13447
13448 * strings.[ch] (scm_makstr): Deprecated.
13449
789ecc05
GH
134502001-03-18 Gary Houston <ghouston@arglist.com>
13451
6d163216
GH
13452 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13453 NULL. rewrote the docstring.
13454 (scm_mkstemp): new procedure implementing "mkstemp!".
13455 * posix.h: declare scm_mkstemp.
13456
789ecc05
GH
13457 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13458 normally it would be found in netdb.h.
13459
c6c79933
GH
134602001-03-17 Gary Houston <ghouston@arglist.com>
13461
e9e225e5
GH
13462 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13463 warning when HAVE_ARRAYS is not defined. move len too.
13464
13465 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13466 (EXTRA_DOT_X_FILES): let configure set the value.
13467 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13468
c6c79933
GH
13469 * gc.c (scm_must_malloc): changed the comment explaining when
13470 scm_must variants of malloc/free etc., should be used, based on
13471 explanation from Dirk Herrmann.
13472 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13473 string with procedure name. use scm_must_malloc instead of malloc.
13474 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13475 of malloc/free.
13476 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13477 scm_ungetc): use scm_must variants of malloc/realloc/free.
13478 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13479
b3fcac34
DH
134802001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13481
13482 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13483 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13484 scm_wrong_type_arg instead.
13485
13486 (SCM_WNA): Deprecated.
13487
13488 * error.[ch] (scm_wta): Deprecated.
13489
13490 * numbers.c (s_i_log): Minor comment fix.
13491
13492 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13493 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13494 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13495 wrong-num-args or misc errors.
13496
13497 * unif.c (scm_make_shared_array, scm_transpose_array,
13498 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13499 Validate the rest argument (note: this is only done when guile is
13500 built with SCM_DEBUG_REST_ARGUMENT=1)
13501
13502 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13503 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13504
13505 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13506 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13507
68baa7e7
DH
135082001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13509
13510 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13511 instead of scm_wrong_num_args.
13512
13513 * coop-threads.c: Don't include libguile/strings.h. (Was only
13514 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13515
13516 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13517 wrong-num-args errors.
13518
9f40cd87
DH
135192001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13520
13521 * error.[ch] (scm_error_num_args_subr): New function.
13522
5352393c
MG
135232001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13524
13525 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13526 (scm_length, scm_append, scm_reverse, scm_list_ref),
13527 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13528 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13529 (scm_delete1_x), gc.c (scm_map_free_list),
13530 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13531 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13532 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13533 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13534 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13535 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13536 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13537
13538 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13539 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13540 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13541 symbols.c (scm_symbol_interned_p), numbers.c
13542 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13543 markup.
13544
a9205f07
KN
135452001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13546
13547 * snarf.h (SCM_CONST_LONG): Deprecated.
13548 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13549
6d583887
MV
135502001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13551
13552 * numbers.c (scm_num2ulong): Check that a bignum is positive
13553 before looking at the magnitude. Correctly check for overflow
13554 during conversion.
13555 (scm_num2long_long): Likewise.
13556 (scm_num2ulong_long): New.
13557 (ULONG_LONG_MAX): Define if not already defined.
13558 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13559
e87a03fc
MG
135602001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13561
13562 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13563
13564 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13565 (SCM_OPOUTSTRPORTP): New predicate macros.
13566 (scm_open_input_string, scm_open_output_string),
13567 (scm_get_output_string): New prototypes.
1c938eb8 13568
e87a03fc
MG
13569 * strports.c (scm_open_input_string, scm_open_output_string),
13570 (scm_get_output_string): New procedures (SRFI-6 compliant).
13571 Made scm_tc16_strport non-static.
13572
160bb34a
DH
135732001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13574
13575 * macros.h (SCM_ASSYNT): Removed unused object argument from
13576 signature.
13577
13578 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13579 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13580 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13581 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13582 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13583 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13584 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13585 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13586 scm_m_atdispatch): Removed unused object argument from call to
13587 SCM_ASSYNT.
13588
80dee77b
DH
135892001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13590
13591 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13592 const int* to reflect that the input array of integers remains
13593 unchanged. Thanks to Brett Viren for the hint.
13594
d3dd80ab
MG
135952001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13596
13597 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13598 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13599 in various places.
13600 (gh_scm2newstr, gh_symbol2newstr): Change call to
13601 scm_must_malloc() to malloc(), because user-free()able memory is
13602 allocated.
13603
13604 * gc.c: Added declaration of `scm_debug_check_freelist'.
13605
26a3038d
MG
136062001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13607
13608 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13609
1f3908c4
KN
136102001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13611
13612 * strports.c (scm_object_to_string): New procedure.
13613 (scm_strprint_obj): Deprecated.
13614 * strports.h: Reflect the changes.
13615
e11208ca
DH
136162001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13617
13618 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13619
13620 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13621 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13622 SCM_ASSYNT to check for correct argument types. Either use some
13623 SCM_VALIDATE_* macro or an explicit test.
13624
13625 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13626 misc-errors.
13627
13628 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13629 instead of calling scm_wta.
13630
67e8151b
MG
136312001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13632
13633 * load.c (scm_primitive_load, scm_primitive_load_path),
13634 (scm_sys_search_load_path): Corrected docstrings (file ->
13635 filename).
13636
13637 * eval.c (scm_force): Added texinfo markup to docstring.
13638 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13639
13640 * debug-malloc.c: Reinserted #include <stdio.h>.
13641
e0c08f17
KN
136422001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13643
e39c3de4
KN
13644 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13645
e0c08f17
KN
13646 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13647 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13648 Use SCM_LISTn instead of scm_listify.
13649
e6e2e95a
MD
136502001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13651
13652 * _scm.h: Removed #include <errno.h>.
13653
13654 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13655 errno variable (can be a macro on some systems, for example when
13656 using linux libc with threads).
13657
13658 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13659 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13660 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13661 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13662
97d0e20b
GH
136632001-03-10 Gary Houston <ghouston@arglist.com>
13664
13665 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13666 not already defined.
13667
e75341b3
MD
136682001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13669
13670 * coop.c: Inserted #include <stdio.h>.
13671
13672 * iselect.c: Reinserted #include <stdio.h>.
13673
74355186
MV
136742001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13675
13676 * posix.c: Replaced `#define' of __USE_XOPEN right before
13677 including unistd.h with a define of _GNU_SOURCE at the very top of
13678 the file.
13679
783e7774
KN
136802001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13681
13682 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13683 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13684 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13685 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13686 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13687 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13688 print.c, procprop.c, procs.c, properties.c, ramap.c,
13689 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13690 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13691 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13692 Remove #include <stdio.h>
783e7774
KN
13693 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13694
13695 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13696
9a677c37
MG
136972001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13698
13699 * posix.c (scm_gethostname): Set initial name length to 256 for
13700 Solaris.
13701
94e6d793
MG
137022001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13703
13704 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13705 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13706 (scm_sethostname, scm_gethostname): New prototypes.
13707
13708 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13709 <sys/file.h>, if present.
13710 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13711 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13712 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13713 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13714 (scm_sethostname, scm_gethostname): New procedures.
13715
650a1cf9
NJ
137162001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13717
13718 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13719 not optional (ii) "recommend" spelling correction.
13720
9636b49c
MD
137212001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13722
5e4a4d09
MD
13723 * ramap.c (racp): Removed optimization which caused array copying
13724 to fail if the two arrays shared storage. Re-inserted the IVDEP
13725 macros removed in the change of 2000-03-09. (Don't really have a
13726 complete grasp of what they are for, but they seem to be necessary
13727 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13728
9636b49c
MD
13729 * hash.c (scm_string_hash): Don't downcase characters.
13730
04a4d666
MD
137312001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13732
9636b49c 13733 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13734 size from 277 --> 1009.
13735
13736 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13737 function.
13738
13739 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13740
04a4d666
MD
13741 * validate.h: Code formatting.
13742
66418d34
KN
137432001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13744
13745 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13746 (*.doc): Add dependency on guile-snarf.awk.in.
13747
13748 * guile-snarf.awk.in: Neglect spaces at the end of
13749 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13750 middle of docstrings. (To avoid the problem with gcc-2.96.)
13751
2ade72d7
DH
137522001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13753
13754 * coop-threads.c (scm_call_with_new_thread), load.c
13755 (scm_primitive_load, scm_sys_search_load_path), random.c
13756 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13757 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13758 (potentially) issue a scm-misc-error or wrong-num-args error
13759 message.
13760
13761 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13762 about the expected type with the wrong-type-arg error message.
13763
13764 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13765 a C level bug that can't be fixed from scheme anyway.
13766
586d7da2
MD
137672001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13768
13769 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13770 Duplicate bindings are OK in a let* since a let* is semantically
13771 equivalent to a nested set of let:s.
13772
1dd05fd8
MG
137732001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13774
13775 * print.c (scm_print_options): Fixed texinfo in docstring.
13776
13777 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13778 the underlying functions getservent, getprotoent or getnetent
13779 return NULL instead of signalling an error.
13780
439006bf
GH
137812001-03-04 Gary Houston <ghouston@arglist.com>
13782
13783 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13784 taking an unexpectedly large filename for an AF_UNIX socket from
13785 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13786
439006bf
GH
13787 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13788 former and adjusted the latter.
13789 (scm_socket, scm_socketpair): cosmetic changes.
13790 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13791 size_t as socklen_t substitute. don't restrict args/return values
13792 to INUM: allow full range of int or size_t.
13793 (scm_fill_sockaddr): check arguments before allocating memory, to
13794 avoid leakage. use malloc, not scm_must_malloc.
13795 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13796 substitute. free the sockaddr structure before throwing an error.
13797 (scm_init_add_buffer): procedure removed, together with its static
13798 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13799 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13800 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13801 scm_sendto): use a local buffer instead of scm_addr_buffer.
13802 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13803 not size_t.
13804 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13805 call to detect whether recvfrom could be bothered to set the address.
13806 (scm_init_socket): don't call scm_init_addr_buffer.
13807
276dd677
DH
138082001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13809
13810 * debug.c (scm_procedure_source, scm_procedure_environment),
13811 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13812 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13813 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13814 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13815 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13816 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13817 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13818 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13819 scm_array_to_list, scm_array_prototype), validate.h
13820 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13821 scm_misc_error or scm_wrong_type_arg instead.
13822
13823 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13824
5e03762c
MD
138252001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13826
13827 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13828 (scm_sys_tag_body): Added.
13829
db4b4ca6
DH
138302001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13831
13832 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13833 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13834 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13835 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13836 options.c (scm_options), ports.c (scm_remove_from_port_table),
13837 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13838 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13839 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13840 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13841 instead.
13842
87e7741d
MD
138432001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13844
13845 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13846
d19b0aac
MV
138472001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13848
13849 * eval.c (scm_s_duplicate_bindings): New error message.
13850 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13851
2fd945df
MV
138522001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13853
13854 * eval.h (SCM_EVALIM2): New macro. Use it when a
13855 immediate, literal constant should be evaluated.
13856 * eval.c (scm_s_duplicate_formals): New error message string.
13857 (scm_c_improper_memq): New function.
13858 (scm_m_lambda): Check for duplicate arguments.
13859 (scm_ceval, scm_deval): When executing a body: only cons a new
13860 toplevel environment frame when it is different from the
13861 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13862 check for empty combinations; use SCM_EVALIM2 for the same reason
13863 in the non-toplevel loop.
13864 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13865 New labels with the meaning of their non-"nontoplevel" partners,
13866 but they are used when it is known that the body is not evaluated at
13867 top-level.
13868 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13869 reporting for empty combinations.
13870
9e6fc585
KN
138712001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13872
13873 * Remove dump facilities.
13874 * dump.c, dump.h: Removed.
13875 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13876 * init.c: Remove #include "libguile/dump.h".
13877 (scm_init_guile_1): Remove scm_init_dump.
13878 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13879 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13880 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13881 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13882
13883 * keywords.c: Remove #include "libguile/dump.h".
13884 (keyword_dump, keyword_undump): Removed.
13885 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13886
eae54bf0
MG
138872001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13888
13889 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13890 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13891 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13892 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13893 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13894 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13895 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13896 to @code{} as the texinfo manual recommends, converted the
13897 examples to use a @lisp{}-environment.
13898
13899 * strports.c (scm_eval_string): Cleaned up the docstring.
13900
13901 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13902 markup.
13903
13904 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13905 (scm_number_to_string, scm_string_to_number, scm_number_p)
13906 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13907 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13908 (scm_ash): Added texinfo markup and removed obsolete @refill.
13909 (scm_gr_p): Corrected comment.
13910 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13911 docstring) comments.
13912 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13913 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13914 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13915 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13916 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13917 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13918 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13919 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13920
23deee81
DH
139212001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13922
13923 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13924 (Obviously nobody compiles with SCM_RECKLESS defined...)
13925
13926 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13927
6fe692e9
MD
139282001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13929
13930 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13931
13932 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13933
27c37006
NJ
139342001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13935
13936 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13937 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13938 since use of `z' suggests that the arguments may be complex.
13939
13940 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13941 typos.
13942
2069af38
NJ
139432001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13944
13945 * dump.c (scm_binary_write, scm_binary_read), eval.c
13946 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13947 scm_guardian_greedy_p, scm_make_guardian), fports.c
13948 (scm_file_port_p): Minor docstring fixes.
13949
b42ff180
MV
139502001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13951
2069af38 13952 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13953
13954 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13955 scm_i_eval.
13956 (make_class_from_template): Do not bother to set the current
13957 module around the call to DEFVAR, scm_eval takes care of that.
13958 (scm_init_goops): Make scm_module_goops and
13959 scm_goops_lookup_closure permanent objects.
1c938eb8 13960
97ea55f8
MV
13961 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13962 top level, create a fresh top-level environment for each
13963 expression instead of mutating the exisint frame. This is
13964 important when that frame is closed over.
13965
b42ff180
MV
13966 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13967 SCM_DIGSPERLONG instead of DIGSPERLONG.
13968
09f2ab1e
MV
139692001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13970
13971 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13972 before applying arrow procedure in `cond' and before applying
13973 receiver procedure in call-with-current-continuation.
13974 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13975 macro. The argument is expanded more than one time.
13976
13977 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13978 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13979
139802001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13981
13982 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13983 notice and license.
13984
7090240c
MG
139852001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13986
13987 * variable.c (scm_make_variable, scm_make_undefined_variable)
13988 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13989 (scm_variable_bound_p), values.c (scm_values)
13990 (scm_call_with_values), unif.c (scm_bit_count)
13991 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13992 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13993 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13994 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13995 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13996 (scm_copy_random_state, scm_random), print.c (scm_newline)
13997 (scm_write_char, scm_simple_format), debug-malloc.c
13998 (scm_malloc_stats), environments.c (scm_environment_p)
13999 (scm_environment_bound_p, scm_environment_ref)
14000 (scm_environment_fold, scm_environment_define)
14001 (scm_environment_undefine, scm_environment_set_x)
14002 (scm_environment_cell, scm_environment_observe)
14003 (scm_environment_observe_weak, scm_environment_unobserve)
14004 (scm_make_eval_environment, scm_eval_environment_p)
14005 (scm_eval_environment_set_local_x, scm_eval_environment_local)
14006 (scm_eval_environment_imported)
14007 (scm_eval_environment_set_imported_x, scm_make_import_environment)
14008 (scm_import_environment_p, scm_import_environment_imports)
14009 (scm_import_environment_set_imports_x, scm_make_export_environment)
14010 (scm_export_environment_p, scm_export_environment_private)
14011 (scm_export_environment_set_private_x)
14012 (scm_export_environment_signature)
14013 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
14014 Added texinfo markup.
14015
14016 * ports.c (scm_drain_input): Lowercased argument to @var.
14017 (scm_current_input_port, scm_current_output_port): Filled in
14018 missing explanation.
14019 (scm_current_load_port, scm_set_current_output_port)
14020 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
14021 Added texinfo markup.
14022
14023 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
14024 (scm_release_arbiter): Added texinfo markup to docstrings.
14025 Changed `Returns' to `Return'.
14026 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
14027
25703850
NJ
140282001-02-16 Neil Jerram <neil@ossau.uklinux.net>
14029
14030 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
14031 by doubling them to `@@'.
14032
73c0fdce
MG
140332001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
14034
14035 * numbers.c (scm_lognot), random.c (scm_random,
14036 scm_random_normal, scm_random_solid_sphere_x,
14037 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
14038 scm_random_exp), dynwind.c
14039 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 14040
73c0fdce
MG
14041 * goops.c (scm_sys_initialize_object, scm_instance_p,
14042 scm_class_name, scm_class_precedence_list, scm_class_slots,
14043 scm_class_environment, scm_generic_function_name,
14044 scm_generic_function_methods, scm_method_generic_function,
14045 scm_method_specializers, scm_method_procedure, scm_make_unbound,
14046 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
14047 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
14048 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
14049 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
14050 scm_class_direct_supers, scm_class_direct_slots,
14051 scm_class_direct_subclasses, scm_class_direct_methods,
14052 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
14053 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
14054 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
14055 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
14056 scm_memoized_environment, scm_procedure_name,
14057 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
14058 objects.c
14059 (scm_class_of, scm_entity_p, scm_operator_p,
14060 scm_set_object_procedure_x, scm_object_procedure,
14061 scm_make_class_object), hooks.c (scm_make_hook_with_name,
14062 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
14063 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
14064 scm_hook_to_list), lang.c
14065 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
14066 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
14067 (scm_print_options, scm_port_with_print_state,
14068 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
14069 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
14070 scm_make_procedure_with_setter, scm_procedure), throw.c
14071 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
14072 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
14073 scm_stack_ref, scm_stack_length, scm_frame_p,
14074 scm_last_stack_frame, scm_frame_number, scm_frame_source,
14075 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
14076 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
14077 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
14078 (scm_dirname, scm_basename), dynwind.c
14079 (scm_wind_chain), read.c (scm_read_options, scm_read,
14080 scm_read_hash_extend), gc.c
14081 (scm_unhash_name), eval.c (scm_eval_options_interface,
14082 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
14083 (scm_display_error, scm_set_print_params_x,
14084 scm_display_application, scm_display_backtrace, scm_backtrace),
14085 async.c (scm_async, scm_system_async, scm_async_mark,
14086 scm_system_async_mark, scm_run_asyncs, scm_noop,
14087 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
14088 scm_mask_signals): Added docstrings.
14089
e228a203
KN
140902001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
14091
14092 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
14093 address of car/cdr. (Thanks to Dirk Herrmann)
14094 Use scm_sizet to obtain the length of strings.
14095 (Thanks to Matthias Koeppe)
14096
1552a59d
MV
140972001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
14098
14099 * symbols.c (scm_mem2symbol): Put a empty statement after the
14100 next_symbol label. This is mandated by ANSI, appearantly.
14101
3178f751
MV
141022001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
14103
14104 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
14105 sense to compile for a specific kernel version. Do not include
14106 <asm/signal.h> while defining __KERNEL__. This hack should no
14107 longer be needed and caused problems.
14108
7af4defe
MV
141092001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
14110
14111 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
14112 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
14113 can not deal with immediates.
14114
5d6bb349
KN
141152001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
14116
14117 * list.c (scm_list_copy): Validate the first argument.
14118
ec9709f0
MV
141192001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
14120
14121 Fix evaluator so that top-level expressions are correctly
14122 evaluated with respect to the module system.
1c938eb8 14123
ec9709f0
MV
14124 * modules.h. modules.c (scm_current_module_lookup_closure): New
14125 function.
14126
14127 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
14128 prototypes.
14129 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
14130 names to better reflect their meaning.
14131
14132 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
14133 evaluated at top-level and synronize lookup closure before
14134 executing every subform.
14135 (scm_primitve_eval_x, scm_primitive_eval): New functions.
14136 (scm_eval_x, scm_eval): Reimplement in terms of
14137 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 14138
ec9709f0
MV
141392001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
14140
14141 * macros.c (scm_macro_name, scm_macro_transformer): Use
14142 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
14143 Thanks!
14144
42417394
KN
141452001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
14146
14147 * dump.c (scm_store_bytes): Store data size before data.
14148 (scm_restore_bytes): Restore data size. Takes a pointer to size.
14149 * dump.h (scm_restore_bytes): Updated.
14150
bf942687
KN
141512001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
14152
14153 * dump.c: Use double cells for update schedule.
14154
1be4270a
KN
141552001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
14156
14157 * ports.c (scm_unread_char): Take an optional argument.
14158
548728ea
MV
141592001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
14160
14161 * modules.h (scm_selected_module, scm_current_module): Renamed
14162 scm_selected_module to scm_current_module to synchronize Scheme
14163 and C names.
14164 (scm_select_module, scm_set_current_module): Likewise. Changed
14165 all uses.
1c938eb8 14166
548728ea
MV
14167 * ports.c (scm_port_for_each): Make a snapshot of the port table
14168 before iterating over it. The table might change while the user
14169 code is running. With the snapshot, the user can depend on the
c5408bc3 14170 fact that each port that existed at the start of the iteration is
548728ea
MV
14171 encountered exactly once. (ice-9 popen) depends on this.
14172
cb0d8be2
DH
141732001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14174
14175 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
14176
14177 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
14178 range checking for the size parameter. Thanks to Martin
14179 Grabmueller for the hint.
14180
14181 (scm_makstr): Reordered string initialization to make interrupt
14182 deferring unnecessary.
14183
14184 * vectors.c (scm_make_vector): Fixed range checking.
14185
e382fdbe
DH
141862001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14187
14188 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
14189
14190 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
14191 checking of the size parameter for type correctness and valid
14192 range. Thanks to Rob Browning for reporting the problem. Instead
14193 of deferring interrupts, scm_remember_upto_here_1 is used.
14194
bf8f0922
KN
141952001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14196
14197 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
14198 (scm_dump_cell_update): Removed.
14199 (scm_dump_update): Renamed from scm_dump_object_update.
14200 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
14201 a pointer instead of returning a value.
14202 * keywords.c (keyword_undump): Updated.
14203
914cceec
KN
142042001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14205
14206 * dump.c, dump.h: Modified a lot.
5f17c66f 14207 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
14208 (scm_dump_mark): Removed.
14209 (scm_restore_cell_object, scm_store_cell_object): New functions.
14210
14211 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
14212 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
14213 New slots: dump, undump.
14214 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
14215 Updated.
14216
14217 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
14218 (keyword_undump): Renamed from keyword_alloc.
14219 (scm_init_keywords): Set keyword_dump and keyword_undump.
14220
ecf470a2
ML
142212001-02-03 Michael Livshin <mlivshin@bigfoot.com>
14222
14223 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
14224 the deprecated SCM_DOUBLE_CELLP.
14225
14226 * tags.h (SCM_DOUBLE_CELLP): deprecated.
14227
03416a99
KN
142282001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
14229
14230 * dump.c, dump.h: New files.
14231 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
14232 * init.c: #include "libguile/dump.h".
14233 (scm_init_guile_1): Call scm_init_dump.
14234 * smob.h (scm_smob_descriptor): New slots: dump_mark,
14235 dump_dealloc, dump_store, undump_alloc, undump_restore,
14236 undump_init.
14237 * smob.c (scm_make_smob_type): Init the new slots.
14238 (scm_set_smob_dump, scm_set_smob_undump): New functions.
14239 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
14240
14241 * keywords.c: #include "libguile/dump.h".
14242 (keyword_dealloc, keyword_alloc): New functions.
14243 (scm_init_keywords): Set smob_dump and smob_undump.
14244
00ffa0e7
KN
142452001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
14246
14247 * vectors.c (scm_c_make_vector): New function.
14248 * vectors.h (scm_c_make_vector): Declared.
14249 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
14250 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
14251 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
14252 (scm_make_method_cache, scm_i_vector2list,
14253 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
14254 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
14255 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
14256 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
14257 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
14258 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
14259 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
14260 (scm_vector, scm_make_vector): Use scm_c_make_vector.
14261
14262 * hashtab.c (scm_c_make_hash_table): New function.
14263 * hashtab.h (scm_c_make_hash_table): Declared.
14264 * environments.c (scm_make_leaf_environment,
14265 scm_make_eval_environment), gc.c (scm_init_storage),
14266 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
14267 Use scm_c_make_hash_table.
14268
b8446ce8
MD
142692001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14270
14271 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
14272
e3239868
DH
142732001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
14274
14275 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
14276 end of docstring.
14277
14278 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
14279 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
14280 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
14281 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
14282 srcprop.c (scm_source_properties, scm_set_source_properties_x,
14283 scm_source_property, scm_set_source_property_x), sort.c
14284 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
14285 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
14286 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
14287 docstrings.
14288
41ee56dd
MD
142892001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14290
14291 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
14292 really get that arg.
14293
b6311c08
KN
142942001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
14295
14296 * goops.c (s_scm_get_keyword): Bug fix.
14297
a49af0c0
DH
142982001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14299
14300 The following patch was sent by Martin Grabmueller. It makes sure
14301 that in case of parameter errors the correct function name is
14302 shown, and that parameter types are only checked once.
14303
14304 * strop.c (string_copy, string_upcase_x, string_downcase_x,
14305 string_capitalize_x): New functions. Each one performs the core
14306 functionality of the corresponding scm_* function.
14307
14308 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
14309 scm_string_downcase_x, scm_string_downcase,
14310 scm_string_capitalize_x, scm_string_capitalize): Reduced to
14311 parameter checking wrappers of the above functions.
14312
13070bd3
DH
143132001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14314
14315 * continuations.c, dynl.c, keywords.c, load.c: Include
14316 strings.h. Thanks to Bill Schottstaedt for the bug report.
14317
2f2b390c
DH
143182001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14319
14320 * backtrace.c (display_header): Make sure that line and column
14321 information is shown independent of whether the port the code was
14322 read from had an associated filename. Thanks to Martin
14323 Grabmueller for providing this patch.
14324
efa40607
DH
143252001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14326
14327 * fports.[ch] (scm_file_port_p): New primitive.
14328
a98bddfd
DH
143292001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14330
14331 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
14332 These are now defined in fports.c, strports.c and vports.c.
14333
14334 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14335 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14336 tags.h).
14337
14338 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14339 (scm_make_sfptob): Made static. These return a type code now.
14340
14341 fports.c (scm_init_fports), strports.c (scm_init_strports),
14342 vports.c (scm_init_vports): Create the corresponding port types.
14343
14344 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14345 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14346
14347 * init.c (scm_init_guile_1): Make sure strports are initialized
14348 before gdbint.
14349
14350 * ports.[ch] (scm_make_port_type): Changed the return type to
14351 scm_bits_t.
14352
14353 * ports.c (scm_ports_prehistory): Don't create any port types
14354 here.
14355
14356 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14357 against scm_tc16_fport directly.
14358
0419a528
DH
143592001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14360
14361 * srcprop.c (scm_set_source_property_x): Fix to handle
14362 (set-source-property! <obj> 'copy <datum>) correctly.
14363
6d36532c
GH
143642001-01-24 Gary Houston <ghouston@arglist.com>
14365
14366 * filesys.c (scm_link): docstring fix.
14367 * fports.h (scm_setfileno): obsolete declaration removed.
14368 * posix.c: bogus popen declaration removed.
14369
14370 * rdelim.c: new file, split from ioext.c.
14371 * rdelim.h: new file, split from ioext.h
14372 * Makefile.am: add rdelim.c and related files.
14373 * init.c: call scm_init_rdelim. include rdelim.h.
14374
3ba5a6c2
DH
143752001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14376
14377 This patch was sent by Martin Grabmueller and makes sure that
14378 parameter errors are reported correctly by the lexicographic
14379 ordering predicates.
14380
14381 * strorder.c (string_less_p, string_ci_less_p): New functions.
14382
14383 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14384 functionality into string_less_p, string_ci_less_p respectively.
14385 The remaining code is just a wrapper to do the parameter
14386 checking.
14387
14388 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14389 parameters and call string_less_p instead of scm_string_less_p.
14390
14391 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14392 Check the parameters and call string_less_ci_p instead of
14393 scm_string_ci_less_p.
14394
e40a4095
DH
143952001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14396
ed6a2db9
DH
14397 This patch modifies scm_display_error to perform parameter
14398 checking. Thanks to Neil Jerram for the bug report.
14399
e40a4095
DH
14400 * backtrace.[ch] (scm_i_display_error): New function.
14401
14402 * backtrace.c (scm_display_error): Added parameter check and
14403 extracted the core functionality into function
14404 scm_i_display_error.
14405
14406 * throw.c (handler_message): Call scm_i_display_error to display
14407 the error message.
14408
f1e06a96
MD
144092001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14410
14411 * eval.c (SCM_APPLY): Added # args check for application of
14412 procedures with arity 3. (Thanks to Anders Holst.)
14413
30ea841d
DH
144142001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14415
14416 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14417
14418 (SCM_OPDIRP): Deprecated.
14419
14420 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14421 SCM_OPN.
14422
14423 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14424 Instead, give an explicit error message in case the directory is
14425 closed.
14426
14427 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14428 instead of SCM_OPENP and SCM_CLOSEDP.
14429
14430 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14431
312ae976
DH
144322001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14433
14434 * eval.c (inner_eval, scm_eval): Move all real functionality into
14435 inner_eval. Avoid to copy the expression twice by inlining some
14436 code from scm_i_eval.
14437
4567ed78
DH
144382001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14439
14440 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14441 now has to be the last clause, as required by R5RS. Thanks to
14442 Martin Grabmueller for the patch.
14443
10288a09
GH
144442001-01-18 Gary Houston <ghouston@arglist.com>
14445
14446 * ioext.c: further simplify scm_read_string_x_partial by defining
14447 a macro SCM_EBLOCK.
14448
8f379a8f
DH
144492001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14450
14451 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14452
5c75b29f
DH
144532001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14454
14455 * __scm.h: Added comment about architecture and compiler
14456 properties that are required by guile.
14457
14458 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14459 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14460
14461 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14462
14463 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14464
14465 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14466 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14467
ac0c002c
DH
144682001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14469
14470 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14471 to the names in limits.h.
14472
14473 * numbers.c (abs_most_negative_fixnum): Added.
14474
14475 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14476 fixnum-min) special case.
14477
14478 (scm_big_and): Fix for negative first parameter.
14479
14480 (scm_bit_extract): Fix for fixnum paramters.
14481 Thanks to Rob Browning for the bug report.
14482
14483 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14484
debe0dc2
DH
144852001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14486
14487 * symbols.c (scm_symbol_bound_p): Fixed comment.
14488 Thanks to Chris Cramer.
14489
8a39e3fc
DH
144902001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14491
14492 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14493 Thanks to Bill Schottstaedt.
14494
322ec19d
ML
144952001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14496
9a5fa6e9 14497 from Matthias Köppe:
1c938eb8 14498
322ec19d
ML
14499 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14500 casts its result, so doesn't yield an lvalue per ANSI C.
14501
14502 * goops.c (s_scm_sys_set_object_setter_x): use
14503 SCM_SET_ENTITY_SETTER.
14504 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14505
14506 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14507 its result, so doesn't yield an lvalue per ANSI C.
14508 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14509 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14510 SCM_GC_SET_CARD_FLAGS.
14511 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14512
14513 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14514
60d02d09
GH
145152001-01-08 Gary Houston <ghouston@arglist.com>
14516
14517 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14518 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14519 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14520 changes.
14521 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14522 for fdes. if current input port is used, check that it's a file
14523 port.
14524
c2da2648
GH
145252001-01-06 Gary Houston <ghouston@arglist.com>
14526
14527 * ioext.c (scm_read_string_x_partial): new procedure, implements
14528 read-string!/partial.
14529 * ports.c (scm_take_from_input_buffers): new procedure used by
14530 scm_read_string_x_partial.
14531 (scm_drain_input): use scm_take_from_input_buffers.
14532
4651d663
MV
145332001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14534
14535 * validate.h (SCM_VALIDATE_NUMBER): New.
14536
c0a5d888
ML
145372001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14538
14539 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14540 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14541 SET_DESTROYED): new defines/macros.
14542 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14543 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14544 (guardian_print): print more info.
14545 (guardian_apply): check if the guardian is destroyed, and throw an
14546 error if so. take one more optional argument `throw_p'.
14547 (scm_guard): depending on the value of `throw_p', return a boolean
14548 result.
14549 (scm_get_one_zombie): remove redundant property test.
14550 (guardian_t): represent the various (currently 3, I hope nothing
14551 more gets added) boolean fields as bit flags.
14552 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14553 (scm_destroy_guardian_x): new procedure.
14554
14555 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14556 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14557
0c6d2191
GH
145582001-01-01 Gary Houston <ghouston@arglist.com>
14559
14560 * fports.c (fport_write): bugfix: handle short writes for
14561 unbuffered ports too. optimize the buffered case by minimizing
14562 the number of write/flush calls.
14563 (write_all): new helper procedure.
14564
a51fe247 14565The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14566
14567;; Local Variables:
14568;; coding: utf-8
14569;; End: