initialize 'u' slots to 0, not SCM_UNPACK(SCM_GOOPS_UNBOUND)
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
54ee7cdf
AW
12008-04-10 Andy Wingo <wingo@pobox.com>
2
4125c767
AW
3 * goops.c (wrap_init): Initialize 'u' slots to 0, not some random
4 SCM value.
5
6 * goops.c (get_slot_value, set_slot_value): In the struct
54ee7cdf
AW
7 allocation case, don't poke the slots array directly -- we should
8 go through struct-ref/struct-set! code so that we get the
9 permissions and allocation ('u' versus 'p') correct.
10
979eade6
LC
112008-04-03 Ludovic Courtès <ludo@gnu.org>
12
13 * inline.h (SCM_C_EXTERN_INLINE): New macro, addresses the
14 "extern inline" semantic change in C99 mode with GCC 4.3 and
15 later and the warning in C99 mode with GCC 4.2. Use it in the
16 inline function definitions.
17
2a1d0688
NJ
182008-03-24 Neil Jerram <neil@ossau.uklinux.net>
19
20 Applying patch from Julian Graham, containing minor fixes to his
21 thread enhancements:
22
23 * threads.c (to_timespec): Change 1000000 multiplier to
24 1000000000.
25 (unchecked_unlock_sym, allow_external_unlock_sym,
26 recursive_sym): Use SCM_SYMBOL.
27 (scm_make_mutex_with_flags): When raising unsupported option
28 error, report what the unsupported option was.
29 (fat_mutex_unlock): When raising errors, unlock m->lock first.
30 (fat_cond_timedwait): Removed.
31 (scm_timed_wait_condition_variable): Call fat_mutex_unlock
32 directly instead of via fat_cond_timedwait.
33
c2ad98ad
LC
342008-03-10 Ludovic Courtès <ludo@gnu.org>
35
36 * eval.c, filesys.c: Enclose `alloca' blob in `#ifndef alloca',
37 as per Gnulib's `alloca'. This should fix compilation on
38 FreeBSD 6.
39
bca69a9f
NJ
402008-03-09 Neil Jerram <neil@ossau.uklinux.net>
41
42 * numbers.c: Only define scm_from_complex_double if it will
43 actually be used.
44
6180e336
NJ
452008-03-08 Julian Graham <joolean@gmail.com>
46
47 * threads.c (scm_join_thread_timed, scm_thread_p,
48 scm_make_mutex_with_flags, scm_lock_mutex_timed,
49 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p): New
50 functions.
51 (thread_mark): Updated to mark new struct field `mutexes'.
52 (do_thread_exit): Notify threads waiting on mutexes locked by exiting
53 thread.
54 (scm_join_thread, scm_make_mutex, scm_make_recursive_mutex,
55 scm_mutex_lock): Reimplement in terms of their newer
56 counterparts.
57 (scm_abandoned_mutex_error_key): New symbol.
58 (fat_mutex)[unchecked_unlock, allow_external_unlock]: New fields.
59 (fat_mutex_lock): Reimplement to support timeouts and abandonment.
60 (fat_mutex_trylock, scm_try_mutex): Remove fat_mutex_trylock and
61 reimplement scm_try_mutex as a lock attempt with a timeout of zero.
62 (fat_mutex_unlock): Allow unlocking from other threads and unchecked
63 unlocking; implement in terms of condition variable wait.
64 (scm_timed_wait_condition_variable): Reimplement in terms of
65 fat_mutex_unlock.
66 * threads.h (scm_i_thread)[mutexes]: New field.
67 (scm_join_thread_timed, scm_thread_p, scm_lock_mutex_timed,
68 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p):
69 Prototypes for new functions.
70
61b6542a
LC
712008-03-06 Ludovic Courtès <ludo@gnu.org>
72
73 * eval.c (scm_eval): If MODULE_OR_STATE is not a dynamic state,
74 make sure it's a module. Reported by David I. Lehn.
75
3f520967
LC
762008-03-02 Ludovic Courtès <ludo@gnu.org>
77
78 * pairs.h (scm_is_pair): Moved declaration to `inline.h'.
79 * inline.h: Make sure `extern' declarations are not produced
80 when `inline' is supported but GCC is not used. This
81 fixes "mixed linkage" errors with compilers such as
82 DEC/Compaq/HP CC.
83
fa80e280
NJ
842008-02-27 Neil Jerram <neil@ossau.uklinux.net>
85
86 * _scm.h (errno): Remove declarations that have been there
87 forever, and are known to conflict on some platforms with that
88 provided by <errno.h>, which we include unconditionally. If
89 <errno.h> doesn't provide a errno declaration, what is the point
90 of it?
91
a2c25234
LC
922008-02-23 Ludovic Courtès <ludo@gnu.org>
93
94 * numbers.c (scm_make_rectangular): Rename argument to
95 `real_part' and `imaginary_part' to work around Solaris 2.10
96 headers which define `imaginary' as a macro. Patch by Tim
97 Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>.
98
bfb64eb4
LC
992008-02-22 Ludovic Courtès <ludo@gnu.org>
100
4fcb27c4
LC
101 * read.c (strncasecmp): Add declaration when
102 `HAVE_DECL_STRNCASECMP' is undefined. Fixes compilation on
103 NetBSD 1.6.
104
bfb64eb4
LC
105 * gc.c (scm_ia64_ar_bsp)[linux]: Don't discard `const' qualifier
106 of OPAQUE.
107
5305df84
LC
1082008-02-21 Ludovic Courtès <ludo@gnu.org>
109
110 Fix bug #22369.
111
112 * goops.c (scm_add_slot): Add `SCM_UNDEFINED' as last argument
a2c25234
LC
113 to `scm_list_n ()'. Thanks to René Köcher
114 <shirk87@googlemail.com>.
5305df84 115
25a640ca
LC
1162008-02-17 Ludovic Courtès <ludo@gnu.org>
117
118 * script.c (scm_compile_shell_switches): Update copyright year.
119
9a6fac59
LC
1202008-02-16 Ludovic Courtès <ludo@gnu.org>
121
122 * gc_os_dep.c: Add NetBSD/alpha support. Patch by Greg Troxel
123 <gdt@ir.bbn.com>.
124
5b5179f8
LC
1252008-02-12 Ludovic Courtès <ludo@gnu.org>
126
127 * guile-snarf.in (tempdir): Honor `$TMPDIR'.
128
4b26c03e
NJ
1292008-02-11 Neil Jerram <neil@ossau.uklinux.net>
130
131 * numbers.c (SCM_COMPLEX_VALUE): Use GUILE_I instead of _Complex_I
132 directly, and only if GUILE_I was defined by the configure step.
133 (scm_log, scm_log10, scm_exp, scm_sqrt): Use SCM_COMPLEX_VALUE
134 code only if SCM_COMPLEX_VALUE is defined.
135
7f74cf9a
LC
1362008-02-07 Ludovic Courtès <ludo@gnu.org>
137
138 Fix bug #21378.
139 Thanks to David Diffenbaugh <davediff@nbcs.rutgers.edu>.
140
141 * read.c (scm_read_quote): Don't use `__FUNCTION__' since it is
142 not supported by Sun CC on Solaris 9.
143 (scm_read_keyword): Likewise.
144 * strings.c (scm_take_locale_stringn): Remove
145 `SCM_C_INLINE_KEYWORD' to allow compilation with Sun CC.
146
86a597f8
NJ
1472008-02-07 Julian Graham <joolean@gmail.com>
148
149 * threads.c (do_thread_exit, scm_cancel_thread,
150 scm_set_thread_cleanup_x, scm_thread_cleanup): Lock on thread-specific
151 admin mutex instead of `thread_admin_mutex'.
152 * threads.h (scm_i_thread)[admin_mutex]: New field.
153 * throw.c (make_jmpbuf): Don't enter critical section during thread
154 spawn -- there is a possibility of deadlock if other threads are
155 exiting.
156
4a19ed04
NJ
1572008-02-06 Neil Jerram <neil@ossau.uklinux.net>
158
159 * gc-malloc.c (scm_gc_malloc): Return NULL if requested size is 0.
160 (scm_gc_free): Don't call `free' if mem is NULL.
161
189171c5
LC
1622008-02-06 Ludovic Courtès <ludo@gnu.org>
163
164 * numbers.c (scm_i_mkbig, scm_i_long2big, scm_i_ulong2big,
165 scm_i_clonebig, scm_i_bigcmp, scm_i_dbl2big, scm_i_dbl2num,
166 scm_i_normbig): Remove `SCM_C_INLINE_KEYWORD' since these are
167 declared as `extern' in `numbers.h'. This precluded compilation
168 on Solaris 9 with Sun CC (reported by David Halik
169 <dhalik@nbcs.rutgers.edu>).
170
d05bcb2e
NJ
1712008-02-05 Neil Jerram <neil@ossau.uklinux.net>
172
173 * fports.c (fport_seek): Make dependent on GUILE_USE_64_CALLS.
174
175 * _scm.h: Make definition of CHOOSE_LARGEFILE depend on
176 GUILE_USE_64_CALLS.
177
3ac8359a
NJ
1782008-02-01 Neil Jerram <neil@ossau.uklinux.net>
179
180 * modules.c (the_root_module): Moved before scm_current_module.
181 (scm_current_module): Return the root module if `the-module' fluid
182 gives #f.
183
d3cf93bc
NJ
1842008-01-22 Neil Jerram <neil@ossau.uklinux.net>
185
7df13834
NJ
186 * COPYING: Removed.
187
d3cf93bc
NJ
188 * __scm.h, _scm.h, weaks.c: Update copyright statement to LGPL.
189
15bd90ea
NJ
1902008-01-18 Neil Jerram <neil@ossau.uklinux.net>
191
192 * hashtab.c (scm_hash_fn_create_handle_x): If supplied assoc_fn
193 returns neither a pair nor #f, signal a wrong-type-arg error.
194 (Thanks to Gregory Marton for reporting this.)
195
5c004b6d
NJ
1962007-12-29 Neil Jerram <neil@ossau.uklinux.net>
197
198 * gc.c (mark_gc_async): Change "func_data" to "fn_data", to avoid
199 clash with AIX header file.
200 * hooks.c (scm_c_hook_add, scm_c_hook_remove): Same again.
201 * hooks.h (scm_t_c_hook_function, scm_c_hook_add,
202 scm_c_hook_remove): Same again.
203
9cc37597
LC
2042007-12-08 Ludovic Courtès <ludo@gnu.org>
205
206 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
207 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
208 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
209 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
210 * eval.i.c (CEVAL): Use branch prediction hints for syntax
211 errors, wrong number of arguments and similar.
212 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
213 immediate numbers.
214 (scm_difference, scm_product, scm_i_divide): Likewise.
215 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
216
7d1fc872
LC
2172007-12-04 Ludovic Courtès <ludo@gnu.org>
218
693758d5
LC
219 * ports.c (scm_c_read): Validate PORT as an open input port.
220 (scm_c_write): Validate PORT as an open output port.
221
7d1fc872
LC
222 * socket.c (scm_accept): Leave guile mode using
223 `scm_std_select ()' before calling `accept(2)'. Reported by
224 dskr <dskr@mac.com>.
225
ee834df4
LC
2262007-10-27 Ludovic Courtès <ludo@gnu.org>
227
228 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
229 containing the port. Fixes a bug in the new port table (2007-08-26).
230 (scm_evict_ports): Use `scm_c_port_for_each ()'.
231
acbfb594
NJ
2322007-10-21 Neil Jerram <neil@ossau.uklinux.net>
233
234 * eval.c (unmemoize_delay): Extend the environment before
235 unmemoizing the promise thunk. This fixes a segmentation fault
236 reported by Frank Schwidom.
237
2e77f720
LC
2382007-10-20 Julian Graham <joolean@gmail.com>
239
240 Add support for thread cancellation and user-defined thread
241 cleanup handlers. Small rework by Ludovic Courtès.
242
243 * null-threads.h (scm_i_pthread_cancel,
244 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
245 * pthread-threads.h (scm_i_pthread_cancel,
246 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
247 * scmsigs.c (scm_i_signal_delivery_thread,
248 signal_delivery_thread_mutex): New.
249 (signal_delivery_thread): Leave when `read_without_guile ()'
250 returns zero.
251 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
252 before spawning the thread. Initialize
253 SCM_I_SIGNAL_DELIVERY_THREAD.
254 (ensure_signal_delivery_thread): Renamed to...
255 (scm_i_ensure_signal_delivery_thread): this.
256 (scm_i_close_signal_pipe): New.
257 * scmsigs.h: Updated.
258 * threads.c (thread_mark): Mark `t->cleanup_handler'.
259 (guilify_self_1): Initialize `t->cleanup_handler' and
260 `t->canceled'.
261 (do_thread_exit): Invoke `t->cleanup_handler'.
262 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
263 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
264 vanishes.
265 (scm_leave_guile_cleanup): New.
266 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
267 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
268 than call `scm_leave_guile ()' after FUNC.
269 (scm_cancel_thread, scm_set_thread_cleanup_x,
270 scm_threads_cleanup): New.
271 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
272 returned list.
273 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
274 fields.
275 Add declarations of new functions.
276
d41668fa
LC
2772007-10-17 Ludovic Courtès <ludo@gnu.org>
278
279 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
280 regression compared to 1.8.2. Reported by Puneet
281 <schemer@gmail.com>.
282
66302618
LC
2832007-10-10 Ludovic Courtès <ludo@gnu.org>
284
285 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
286 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
287 * gen-scmconfig.h.in
288 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
289 * gen-scmconfig.c (main): Define
290 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
291
1445e449
LC
2922007-10-04 Ludovic Courtès <ludo@gnu.org>
293
294 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
295 `leave_locale_section ()' on failure of
296 `enter_locale_section ()' since the mutex is not held and locale
297 settings are unchanged.
298 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
299 `restore_locale_settings ()' instead of `leave_locale_section ()'
300 since the mutex is not held.
301
29776e85
LC
3022007-10-02 Ludovic Courtès <ludo@gnu.org>
303
304 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
305 since we're already in non-guile mode. Reported by Greg Toxel
306 for NetBSD.
307
61d3568b
LC
3082007-10-01 Ludovic Courtès <ludo@gnu.org>
309
310 * ports.c (flush_output_port): Expect directly a port instead of
311 a pair. Fixes a bug in the new port table (2007-08-26).
312
68eccd8b
KR
3132007-09-11 Kevin Ryde <user42@zip.com.au>
314
315 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
316 putenv("NAME") as the fallback everywhere else. In particular this is
317 needed for solaris 9. Reported by Frank Storbeck.
318
454866e0
LC
3192007-09-03 Ludovic Courtès <ludo@gnu.org>
320
321 * read.c (flush_ws): Handle SCSH block comments.
322
f43f3620
LC
3232007-09-03 Ludovic Courtès <ludo@gnu.org>
324
325 Fix alignment issues which showed up at least on SPARC.
326
327 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
328 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
329 alignment.
330 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
331 correct alignment.
332 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
333 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
334 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
335 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
336 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
337
8d4d5dfc
KR
3382007-09-03 Kevin Ryde <user42@zip.com.au>
339
340 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
341 before using clog(). It's possible for gcc to provide the "complex
342 double" type, but for the system not to have the complex funcs.
343 (scm_exp): Ditto HAVE_CEXP for cexp().
344 (clog, cexp, carg): Remove fallback definitions. These only
345 duplicated the code within scm_log and scm_exp, and the latter have to
346 exist for the case when there's no "complex double". So better just
347 fix up the conditionals selecting between the complex funcs and plain
348 doubles than worry about fallbacks.
349
1ac5fb45
LC
3502007-09-02 Ludovic Courtès <ludo@gnu.org>
351
352 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
353 This fixes a memory leak.
354
b87e6d04
HWN
3552007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
356
5dbc6c06
HWN
357 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
358 gc.c: replace port table with weak hash table. This simplifies
359 memory management, and fixes freed cells appearing in
360 port-for-each output.
361
b87e6d04
HWN
362 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
363 held.
364
2baec6a9
LC
3652007-08-23 Ludovic Courtès <ludo@gnu.org>
366
492faee1 367 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 368 expression when asked to. Reported by Kevin.
492faee1 369
2baec6a9
LC
370 * stime.c: Define `_REENTRANT' only if not already defined.
371
1f11c61a
KR
3722007-08-21 Kevin Ryde <user42@zip.com.au>
373
374 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
375 tc16 values so big, real, complex and fraction can be distinguished.
376
377 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
378 was making numbers come out as "type 23" in gc-live-object-stats.
379 Fix tests of the tc16 number types, they were checked under
380 scm_tc7_number, but the values went down the tag>=255 smob case.
381 Put smob case under scm_tc7_smob instead of using tag>=255, per
382 recommendation in comments with scm_tc7_smob to use symbolic values.
383 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
384 code. Lose some unnecessary "break" statements.
385
386 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
387 element returned, rather than two lookups scm_hashq_ref and
388 scm_hashq_set_x.
389
949ec9f9
KR
3902007-08-17 Kevin Ryde <user42@zip.com.au>
391
392 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
393 solaris 2.6. Reported by anirkko.
394
6caac03c
LC
3952007-07-29 Ludovic Courtès <ludo@gnu.org>
396
397 * Makefile.am (INCLUDES): Added Gnulib includes.
398 (gnulib_library): New.
399 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
400 `$(gnulib_library)'.
401 (libguile_la_LIBADD): Likewise.
402
403 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
404 to define it when available.
405 * srfi-14.c: Likewise.
f7439099
LC
406 * i18n.c: Likewise. Include Gnulib's <alloca.h>
407 * eval.c: Include Gnulib's <alloca.h>.
408 * filesys.c: Likewise.
409 * read.c: Don't include <strings.h> and don't provide an
410 `strncasecmp ()' replacement; use Gnulib's <string.h> and
411 `strncasecmp ()' instead.
6caac03c 412
e08f3f7a
LC
4132007-07-25 Ludovic Courtès <ludo@gnu.org>
414
415 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
416 immediately. This used to produce a circular memoized
417 expression, e.g., for `(set (quote x) #t)'.
418
7337d56d
LC
4192007-07-22 Ludovic Courtès <ludo@gnu.org>
420
421 Overhauled the reader, making it faster.
422
423 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
424 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
425 of `scm_lreadr ()'.
426
427 * read.c: Overhauled. No longer use a token buffer. Use a
428 on-stack C buffer in the common case and use Scheme strings when
429 larger buffers are needed.
430 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
431 scm_lreadr, scm_lreadrecparen): Removed.
432 (scm_i_input_error): Marked as `SCM_NORETURN'.
433
df449722
LC
4342007-07-15 Ludovic Courtès <ludo@gnu.org>
435
436 * script.c (scm_compile_shell_switches): Updated copyright year.
437
b1f57ea4
LC
4382007-07-11 Ludovic Courtès <ludo@gnu.org>
439
440 * goops.c (scm_sys_method_more_specific_p): Added docstring.
441 Make sure LEN is greater than or equal to the minimum length of
442 specializers of M1 and M2. This fixes a segfault later on in
443 `more_specificp ()' if TARGS is too small. Reported by Marco
444 Maggi <marco.maggi-ipsu@poste.it>.
445
d3075c52
LC
4462007-06-26 Ludovic Courtès <ludo@gnu.org>
447
448 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
449 sure to free the previous array after the new one has been
450 installed. This leak is made visible by running
451 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
452 from the REPL within Valgrind.
453
7a5fb796
LC
4542007-06-12 Ludovic Courtès <ludo@chbouib.org>
455
456 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
457 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
458 bus error on SPARC (and possibly others) due to unaligned access.
459
a1ef7406
LC
4602007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
461
462 * posix.c (scm_ttyname): Check whether RESULT is NULL before
463 making a string from it (reported by Dan McMahill). Don't call
464 `scm_from_locale_string ()' before the mutex is released.
465
3dcf3373
LC
4662007-05-26 Ludovic Courtès <ludo@chbouib.org>
467
468 * eval.c (scm_m_define): Updated comment. Changed order for value
469 evaluation and `scm_sym2var ()' call, which is perfectly valid per
470 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
471
608860a5
LC
4722007-05-05 Ludovic Courtès <ludo@chbouib.org>
473
474 Implemented lazy duplicate binding handling.
475
476 * modules.c (scm_export): Renamed to...
477 (scm_module_export): This. Now public.
478 (module_variable): Removed.
479 (default_duplicate_binding_procedures_var): New variable.
480 (default_duplicate_binding_handlers, resolve_duplicate_binding,
481 module_imported_variable, scm_module_local_variable,
482 scm_module_variable): New functions.
483 (scm_module_import_interface): Rewritten.
484 (scm_module_reverse_lookup): Exported as a Scheme function.
485 * modules.h (scm_module_index_duplicate_handlers,
486 scm_module_index_import_obarray): New macros.
487 (scm_module_variable, scm_module_local_variable,
488 scm_module_export): New declarations.
489
1911e3da
LC
4902007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
491
492 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
493 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
494
1d8ce4c0
HWN
4952007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
496
497 * numbers.c (carg): provide carg, cexp, clog in case they are
498 missing.
499
afb49959
LC
5002007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
501
502 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
503 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
504 Steven Wu.
505
b3aa4626
KR
5062007-03-08 Kevin Ryde <user42@zip.com.au>
507
508 * struct.c, struct.h (scm_make_vtable): New function, providing
509 `make-vtable'.
510 * stacks.c (scm_init_stacks): Use it.
511
5122007-03-06 Kevin Ryde <user42@zip.com.au>
513
514 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
515 allocating a tail array. If there's no such then those tail fields
516 are uninitialized and garbage SCMs there can cause a segv if printed
517 (after fetching with struct-ref).
518
5192007-02-22 Kevin Ryde <user42@zip.com.au>
520
521 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
522 (scm_usleep): Update docstring per manual, cross reference sleep.
523
524 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
525 scm_struct_init is not within that section. scm_struct_init can
526 thrown an error, which within a critical section results in an
527 abort().
528
03291373
NJ
5292007-02-19 Neil Jerram <neil@ossau.uklinux.net>
530
531 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
532 is included in the distribution.
652dbce6 533 (noinst_HEADERS): And the same for eval.i.c.
03291373 534
a2f00b9b
LC
5352007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
536
537 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
538 unconditionally. Include <langinfo.h> and <nl_types.h> when
539 available.
540 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
541 SCM_LIST_OR_INTEGER_P): New macros.
542 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
543 as powers of two instead of `(1 << LC_*)'.
544 (scm_i_locale_free): New function/macro.
545 (scm_global_locale): New global variable.
546 (smob_locale_free): Use `scm_i_locale_free ()'.
547 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
548 (get_current_locale_settings): Return `EINVAL' instead of `errno'
549 when `setlocale' fails.
550 (restore_locale_settings): Likewise.
551 (install_locale_categories): Likewise.
552 (install_locale): Likewise. Stop the locale stack traversal when
553 all categories have been handled.
554 (get_current_locale, category_to_category_mask,
555 category_list_to_category_mask): New function.
556 (scm_make_locale): Use them. Accept both lists of `LC_*' values
557 and single `LC_*' values as the first argument. Handle the case
558 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
559 duplicate C_BASE_LOCALE before using it.
560 (scm_nl_langinfo, define_langinfo_items): New functions.
561 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
562 `nl-langinfo' and invoke `define_langinfo_items ()'.
563 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
564 * posix.c: Include <xlocale.h> when available.
565 (scm_i_locale_mutex): Always define it. Statically initialized.
566 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
567 acquiring the locale mutex.
568 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
569
b3aa4626
KR
5702007-01-27 Kevin Ryde <user42@zip.com.au>
571
572 * ports.c (scm_port_line, scm_set_port_line_x), read.c
573 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
574 port line number type, should be "long" not "int", as per line_number
575 field of scm_t_port. (Makes a difference only on 64-bit systems, and
576 only then for a linenum above 2Gig.)
577
2a8d66b0
HWN
5782007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
579
580 * vector.c: remove comment as per kryde's request.
581
b3aa4626
KR
5822007-01-25 Kevin Ryde <user42@zip.com.au>
583
584 * sort.c (scm_stable_sort): Return empty list for input empty list, as
585 done in guile 1.6 and as always done by plain `sort'. Was falling
586 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
587
cb90e2cb
HWN
5882007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
589
8cb7939c
HWN
590 * vectors.c (s_scm_vector_move_right_x): complain about naming.
591
d00a0704
HWN
592 * srcprop.c: regularize comments.
593
3d178652
HWN
594 * eval.c: remove superfluous ifndef DEVAL.
595
243ebb61
HWN
596 * private-options.h: idem.
597
598 * eval.i.c: copyright nitpicking.
599
0ee05b85
HWN
600 * eval.c: distangle. move duplicate code to eval.i.c and include
601 twice.
602
603 * eval.i.c: new file.
604
22fc179a
HWN
605 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
606 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
607 read.h, stacks.c, symbols.c, throw.c: use private-options.h
608
609 * private-options.h: new file: contain hardcoded option
610 definitions.
611
cb90e2cb
HWN
612 * private-gc.h: add FSF header.
613
62560650
HWN
6142007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
615
72f19c26
HWN
616 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
617 memoize-symbol is set.
618
619 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
620
621 * eval.c (CEVAL): add memoize_symbol trap.
622
03347a97
HWN
623 * options.c (scm_options_try): new function. This allows error
624 reporting before changing options in a critical section.
625
b0763985
HWN
626 * srcprop.c: use double cell for storing source-properties. Put
627 filename in the plist, and share between srcprops if possible.
628 Remove specialized storage.
629
630 * srcprop.h: remove macros without SCM_ prefix from
631 interface. Remove specialized storage/type definitions.
632
62560650
HWN
633 * read.c: idem.
634
635 * print.c: idem.
636
637 * eval.c: terminate option lists with 0.
638
639 * options.c: remove n (for length) from scm_option_X
640 functions. Detect option list length by looking for NULL name.
641
42ddb3cb
LC
6422007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
643
644 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
645 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
646 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
647 added by `make-vtable-vtable'. Reported by Marco Maggi.
648
937038e8
HWN
6492007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
650
651 * throw.c (scm_ithrow): more refined error message: print symbols
652 too.
653
23d72566
KR
6542007-01-16 Kevin Ryde <user42@zip.com.au>
655
656 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
657 implementing `set-program-arguments'.
658
659 * filesys.c (scm_init_filesys): Use scm_from_int rather than
660 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
661 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
662 O_LARGEFILE. These are all int not long, per arg to open().
663 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
664 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
665 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
666 an int arg to fcntl.
667
668 * posix.c (scm_putenv): Correction to "len" variable, was defined only
669 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
670 Move it to where it's used. Reported by Hugh Sasse.
671
672 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
673 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
674 meant #\nul in the input (detected by scm_to_locale_string) and a bad
675 flags arg (detected by scm_to_int) would throw from a critical
676 section, causing an abort().
677
678 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
679 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
680 REG_NOTEOL; they're all ints not longs (per args to regcomp and
681 regexec).
682
a2c40dc7
HWN
6832007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
684
685 * throw.c (scm_ithrow): print out key symbol and string arguments
686 when error happens inside a critical section, and document why.
687
391f57e6
HWN
6882007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
689
690 * read.c (s_scm_read_hash_extend): document #f argument to
691 read-hash-extend.
692
23d72566
KR
6932007-01-04 Kevin Ryde <user42@zip.com.au>
694
695 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
696 scm_minor_version, scm_micro_version, scm_effective_version,
697 scm_version, scm_init_version): Use SCM_API instead of just extern,
698 for the benefit of mingw. Reported by Cesar Strauss.
699
93632e3c
HWN
7002007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
701
702 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
703 too.
704 (gc_update_stats): update scm_gc_cells_allocated_acc too.
705
23d72566
KR
7062006-12-27 Kevin Ryde <user42@zip.com.au>
707
708 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
709 the basic scm_get_stack_base. As advised by Nils Durner.
710
711 * threads.c (get_thread_stack_base): Add a version using
712 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
713 As advised by Heikki Lindholm.
714
715 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
716 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
717 Durner.
718
7192006-12-24 Kevin Ryde <user42@zip.com.au>
720
721 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
722 error if pid is not our own process, instead of silently doing nothing.
723
724 * print.c (scm_write, scm_display, scm_write_char): Disable port close
725 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
726 check in configure.in unintentionally enabled it. Believe that
727 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
728 can leave errno in that state. popen.test "no duplicates" output test
729 provoked that.
730
e2bf3b19
HWN
7312006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
732
733 * numbers.c (scm_i_fraction_reduce): move logic into
734 scm_i_make_ratio(), so fractions are only read.
735 scm_i_fraction_reduce() modifies a fraction when reading it. A
736 race condition might lead to fractions being corrupted by reading
737 them concurrently.
738
739 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
740 comparisons between reduced and unreduced fractions go wrong.
741
742 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
743 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
744 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
745 SCM_FRACTION_REDUCED.
746
23d72566
KR
7472006-12-16 Kevin Ryde <user42@zip.com.au>
748
749 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
750 more direct for a procedure called raise.
751 (kill): Remove mingw fake fallback.
752
7532006-12-15 Kevin Ryde <user42@zip.com.au>
754
755 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
756 _pipe on mingw.
757
7582006-12-14 Kevin Ryde <user42@zip.com.au>
759
760 * threads.c (thread_print): Cope with the case where pthread_t is a
761 struct, as found on mingw. Can't just cast to size_t for printing.
762 Reported by Nils Durner.
763
764 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
765 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
766
7672006-12-13 Kevin Ryde <user42@zip.com.au>
768
769 * eval.c (scm_m_define): Set 'name procedure property on any
770 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
771 procedures with setters as used in srfi-17.
772
773 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
774 linux man page says is a possibility.
775
f30e1bdf
LC
7762006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
777
778 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 779 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
780 negative lower bounds.
781 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 782 Szavai Gyula).
f30e1bdf
LC
783
784 (scm_array_in_bounds_p): Iterate over S instead of always
785 comparing indices with the bounds of S[0]. This fixes
786 `array-in-bounds?' for arrays with a rank greater than one and
787 with different lower bounds for each dimension.
788
23d72566
KR
7892006-12-05 Kevin Ryde <user42@zip.com.au>
790
791 * numbers.c (scm_product): For flonum*inum and complex*inum, return
792 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
793 and as per R5RS section "Exactness".
794
7952006-12-03 Kevin Ryde <user42@zip.com.au>
796
797 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
798 allow $AWK from the environment to override. It had syntax gremlins,
799 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
800 Makefile stopped it having any effect. Use just $(AWK), which can be
801 overridden with "make AWK=xxx" in the usual way if desired.
802
22be72d3
LC
8032006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
804
805 * libguile/vectors.c (scm_vector_to_list): Fixed list
806 construction: elements were not copied when INC is zero (see
807 "shared array" example in `vectors.test'). Reported by
808 Szavai Gyula.
809
b89c4943
LC
8102006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
811
812 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
813 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
814 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
815 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
816 (DOT_X_FILES): Added `gettext.x'.
817 (DOT_DOC_FILES): Likewise.
818 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
819 (modinclude_HEADERS): Added `gettext.h'.
820 (EXTRA_DIST): Added `libgettext.h'.
821
822 * gettext.h: Renamed to...
823 * libgettext.h: New file.
824
825 * i18n.c: Renamed to...
826 * gettext.c: New file.
827
828 * i18n.h: Renamed to...
829 * gettext.h: New file.
830
831 * i18n.c, i18n.h, locale-categories.h: New files.
832
833 * init.c: Include "libguile/gettext.h" instead of
834 "libguile/i18n.h".
835 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
836 `scm_init_i18n ()'.
837
838 * posix.c: Include "libguile/gettext.h" instead of
839 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
840 (USE_GNU_LOCALE_API): New macro.
841 (scm_i_locale_mutex): New variable.
842 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
843
844 * posix.h: Include "libguile/threads.h".
845 (scm_i_locale_mutex): New declaration.
846
f3e3f530
NJ
8472006-11-17 Neil Jerram <neil@ossau.uklinux.net>
848
849 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
850
d9f71a07
LC
8512006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
852
853 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
854 "sweep_stats" arguments; use them instead of accessing the global
855 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
856
857 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
858 before each iteration of the loop.
859 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
860 (scm_i_get_new_heap_segment): Take an additional argument
861 SWEEP_STATS. Compute MIN_CELLS as a function of it.
862
863 * libguile/gc.c (scm_gc_cells_collected,
864 scm_gc_cells_collected_1): Removed.
865 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
866 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
867 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
868 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
869 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
870 `scm_gc_cells_(collected|swept)'.
871 (gc_update_stats): New.
872 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
873 `scm_i_gc_sweep_stats_1' instead of the former globals.
874 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
875 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
876 would keep allocating new segments instead of re-using collected
877 cells (because `scm_gc_cells_collected' would remain zero).
878
879 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
880 scm_gc_cell_yield_percentage): Removed.
881
882 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
883 (scm_i_adjust_min_yield): Updated.
884 (scm_i_get_new_heap_segment): Updated.
885
dd18d312
NJ
8862006-11-02 Neil Jerram <neil@ossau.uklinux.net>
887
888 * modules.c: Correct comment saying that low-level environments
889 will be used "in the next release".
890
891 * init.c: Comment out #include of environments.h.
892 (scm_i_init_guile): Comment out scm_environments_prehistory() and
893 scm_init_environments() calls.
894
895 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
896 (DOT_X_FILES): Remove environments.x.
897 (DOT_DOC_FILES): Remove environments.doc.
898 (modinclude_HEADERS): Remove environments.h.
899
9a5fa6e9
NJ
9002006-10-25 Neil Jerram <neil@ossau.uklinux.net>
901
902 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
903
904 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
905 scm_ia64_register_backing_store_base() instead of Linux-specific
906 implementations.
907
908 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
909 New declarations.
910
911 * gc.c (__libc_ia64_register_backing_store_base): Declaration
912 removed.
913 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
914 implementations for Linux and HP-UX.
915
916 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
917 and scm_ia64_register_backing_store_base() instead of
918 Linux-specific implementations.
919
920 * continuations.h (__libc_ia64_register_backing_store_base):
921 Declaration removed.
922 (scm_t_contregs): New "fresh" field.
923
924 * continuations.c (ia64_getcontext): Removed.
925 (scm_make_continuation): Use continuation fresh field instead of
926 interpreting getcontext return values (which isn't portable). Use
927 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
928 instead of Linux-specific implementations.
929 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
930 instead of Linux-specific implementation.
931
932 * _scm.h (__ia64__): Also detect __ia64.
933
8ab3d8a0
KR
9342006-10-03 Kevin Ryde <user42@zip.com.au>
935
936 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
937 arguments or 3 or more arguments. Previously 0 called proc with
938 SCM_UNDEFINED, and 3 or more silently used just the first 2.
939
9402006-09-28 Kevin Ryde <user42@zip.com.au>
941
942 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
943 for chsize fallback, instead of hard-coding mingw. Mingw in fact
944 supplies ftruncate itself these days.
945
946 * ports.c (fcntl.h): Can include this unconditionally, no need for
947 __MINGW32__.
948
949 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
950 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
951 "off_t" for parameters, per usual definition of this function, rather
952 than "char *" and "int". Use ftruncate instead of chsize. Check for
953 error on final close.
954
9552006-09-27 Kevin Ryde <user42@zip.com.au>
956
957 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
958 in mingw.
959
960 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
961 const *" for mingw to suppress warnings from gcc (which are errors
962 under the configure default -Werror). Reported by Nils Durner.
963
9642006-09-26 Kevin Ryde <user42@zip.com.au>
965
966 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
967 * fports.c (scm_open_file): Use open_or_open64.
968 (fport_seek_or_seek64): New function, adapting fport_seek.
969 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
970 functions.
971 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
972 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
973
974 * ports.c (scm_truncate_file): Update docstring per manual.
975
9762006-09-23 Kevin Ryde <user42@zip.com.au>
977
978 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
979 functions.
980
9a5fa6e9 9812006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
982
983 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
984 (make_predset, define_predset, make_strset, define_strset, false,
985 true): Removed.
986 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
987 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
988 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
989 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
990 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
991 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
992 (define_charset, scm_srfi_14_compute_char_sets): New functions.
993 (scm_init_srfi_14): Use `define_charset ()' instead of
994 `define_predset ()' and `define_strset ()'.
995
996 * srfi-14.h (scm_c_init_srfi_14): Removed.
997 (scm_srfi_14_compute_char_sets): New declaration.
998
999 * posix.h: Include "srfi-14.h".
1000 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
1001 successful `setlocale ()' call.
1002
8ab3d8a0
KR
10032006-09-08 Kevin Ryde <user42@zip.com.au>
1004
1005 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
1006 (scm_recvfrom): Update docstring from manual.
1007
418122ce
RB
10082006-08-31 Rob Browning <rlb@defaultvalue.org>
1009
1010 * ports.c (scm_c_port_for_each): Add a
1011 scm_remember_upto_here_1(ports) at the end of the function to fix
1012 a GC bug.
1013
b5944f66
NJ
10142006-08-28 Neil Jerram <neil@ossau.uklinux.net>
1015
1016 * backtrace.c (scm_display_backtrace_with_highlights): Minor
1017 improvements to docstring.
1018 (scm_backtrace_with_highlights): Analogous improvements.
1019
8ab3d8a0
KR
10202006-08-12 Kevin Ryde <user42@zip.com.au>
1021
1022 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
1023 New, set from configure.
1024 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
1025 to scmconfig.h.
1026 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
1027 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
1028 Reported by Claes Wallin.
1029
b0b0deff
NJ
10302006-08-11 Neil Jerram <neil@ossau.uklinux.net>
1031
1032 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
1033 frame, not a stack).
1034
8ab3d8a0
KR
10352006-07-25 Kevin Ryde <user42@zip.com.au>
1036
1037 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
1038 on pthreads version, since pthread_getattr_np not available on solaris
1039 and macos. Reported by Claes Wallin.
1040
10412006-07-24 Kevin Ryde <user42@zip.com.au>
1042
1043 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
1044 it's a macro on MacOS X. Reported by Claes Wallin.
1045
1046 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
1047 for the benefit of Solaris 10. Reported by Claes Wallin.
1048
1049 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
1050 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
1051
10522006-07-21 Kevin Ryde <user42@zip.com.au>
1053
1054 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
1055 autoconf recommendation. Should fix Solaris 10 reported by Claes
1056 Wallin.
1057
1058 * threads.c: Include <string.h>, needed for memset() which is used by
1059 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
1060
b4912378
RB
10612006-07-18 Rob Browning <rlb@defaultvalue.org>
1062
1063 * continuations.c: Add __attribute__ ((returns_twice)) to the
1064 ia64_getcontext prototype so that gcc will make the right
1065 arrangements and avoid an illegal instruction during
1066 call-with-current-continuation.
1067
9a5fa6e9 10682006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
1069
1070 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
1071 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
1072
8ab3d8a0
KR
10732006-07-08 Kevin Ryde <user42@zip.com.au>
1074
1075 * environments.c (core_environments_unobserve): Use if/else rather
1076 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
1077 about them not being rvalues. Reported by Mike Gran.
1078
1079 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
1080 portable and in particular fails on OpenBSD and AIX (see autoconf
1081 manual too). Reported by Mike Gran.
1082
10832006-06-25 Kevin Ryde <user42@zip.com.au>
1084
1085 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
1086 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
1087 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
1088 HAVE_TM_ZONE.
1089 (scm_strptime): Use tm_gmtoff from the strptime result when that field
1090 exists, it's set by glibc strptime "%s".
1091
9a5fa6e9 10922006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
1093
1094 * eq.c: Include "struct.h", "goops.h" and "objects.h".
1095 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
1096 are not GOOPS instances.
1097 * struct.c: Include "eq.h".
1098 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
1099 hand-written code.
1100 (scm_i_struct_equalp): New.
1101 * struct.h (scm_i_struct_equalp): New declaration.
1102
c862d0e0
KR
11032006-06-06 Kevin Ryde <user42@zip.com.au>
1104
1105 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
1106 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
1107 reported by Mattias Holm.
b4912378 1108
c862d0e0
KR
11092006-06-03 Kevin Ryde <user42@zip.com.au>
1110
1111 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
1112 unused variable warning when elisp disabled. Reported by Ryan
1113 VanderBijl.
1114
1115 * throw.c (scm_handle_by_message): Add dummy return value to avoid
1116 compiler warning on cygwin. Reported by Ryan VanderBijl.
1117
1118 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
1119 duplicate of EXTRA_DOT_DOC_FILES.
1120 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
1121 Add scmconfig.h to dependencies, since these all run cpp. Helps a
1122 parallel "make -j2". Reported by Mattias Holm.
1123
11242006-05-30 Kevin Ryde <user42@zip.com.au>
1125
1126 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
1127 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
1128 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
1129 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
1130 port type descriptor, same as scm_make_port_type return value.
1131
af4f8612
MV
11322006-05-30 Marius Vollmer <mvo@zagadka.de>
1133
1134 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
1135 of the arguments is a array. This allows vectors to be equal to
1136 one-dimensional arrays.
1137
18bffcd0
MV
11382006-05-29 Marius Vollmer <mvo@zagadka.de>
1139
1140 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
1141 that we have a pair before accessing its cdr. Thanks to Bill
1142 Schottstaedt!
1143
c862d0e0
KR
11442006-05-28 Kevin Ryde <user42@zip.com.au>
1145
1146 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
1147 by "The Senator".
1148
11492006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
1150
1151 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
1152 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
1153
c862d0e0
KR
11542006-05-26 Kevin Ryde <user42@zip.com.au>
1155
1156 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
1157 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
1158 Reported by "The Senator".
1159 For select and ioctl, move fdes into those conditionals, to avoid
1160 unused variable warning when neither of those used.
1161
11622006-05-23 Kevin Ryde <user42@zip.com.au>
1163
1164 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
1165 It's unused and will be in stdio.h anyway (if it's anywhere).
1166
11672006-05-20 Kevin Ryde <user42@zip.com.au>
1168
1169 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
1170 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
1171
1172 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
1173 symlink). Probably can't create symlinks with mknod anyway though.
1174
1175 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
1176 generation.
1177
11782006-05-15 Kevin Ryde <user42@zip.com.au>
1179
1180 * simpos.c, simpos.h (scm_primitive__exit): New function.
1181 (scm_primitive_exit): Update docstring, no longer the best exit after
1182 a fork.
1183
11842006-05-09 Kevin Ryde <user42@zip.com.au>
1185
1186 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
1187 rather than converting to doubles, to avoid inf or nan when the inputs
1188 are too big for a double but the quotient does fit. This affects
1189 conversions exact->inexact of big fractions.
1190
1191 * filesys.c (scm_open_fdes): Use open64.
1192 (scm_init_filesys): Add O_LARGEFILE.
1193
1194 * ports.c (scm_seek): Use lseek64.
1195 (scm_truncate_file): Use ftruncate64.
1196
4a342b19
MV
11972006-05-08 Marius Vollmer <mvo@zagadka.de>
1198
1199 * private-gc.h (CELL_P): Also check that the potential pointer is
1200 correctly aligned for a cell. Thanks to Miroslav Lichvar!
1201
c862d0e0
KR
12022006-04-18 Rob Browning <rlb@defaultvalue.org>
1203
1204 * _scm.h: Add back error if the size of off_t is unknown. The bug
1205 was actually in guile-readline's configuration.
1206
12072006-04-18 Kevin Ryde <user42@zip.com.au>
1208
1209 * posix.c (scm_mkstemp): Update docstring from the manual, in
1210 particular file mode 0600 is not guaranteed.
1211
281ab5e2
KR
12122006-04-17 Kevin Ryde <user42@zip.com.au>
1213
1214 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1215 size, to help the guile-readline build where off_t is unused.
1216
2b829bbb
KR
12172006-04-16 Kevin Ryde <user42@zip.com.au>
1218
1219 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1220 (scm_readdir): Use readdir64.
1221 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1222 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1223 and ftruncate take off_t not size_t.
1224 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1225 available.
1226
12272006-04-06 Kevin Ryde <user42@zip.com.au>
1228
1229 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1230 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
1231
12322006-03-26 Marius Vollmer <mvo@zagadka.de>
1233
1234 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1235 instead of accessing __libc_stack_end directly, and only do this
1236 when pthread_attr_getstack is known not to work for the main
1237 thread or when not using pthreads at all.
1238
1239 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1240 unknown instead of returning NULL.
1241
9a5fa6e9 12422006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1243
1244 * numbers.c (scm_i_mem2number): Renamed to
1245 scm_c_locale_stringn_to_number.
1246 * numbers.c, print.c, read.c: Updated callers.
1247 * numbers.h: Update function declaration.
1248
12492006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1250
1251 * unif.c (string_set): Don't return in a void function. (Reported
1252 by Mike Gran.)
1253
1254 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1255 rather than void*, so we can do pointer arithmetic on it.
1256 (Reported by Mike Gran.)
1257 (s_scm_uniform_vector_write): Ditto.
1258
12592006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1260
1261 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1262 oldra is not an array. (Reported by Steve Juranich.)
1263
1264 * threads.c (do_unlock): Renamed from "unlock", which is defined
1265 in unistd.h on QNX. (Reported by Matt Kraai.)
1266
12672006-03-04 Kevin Ryde <user42@zip.com.au>
1268
1269 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1270 not SCM_CRITICAL_SECTION_START.
1271
1272 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1273 Mike Gran.
1274
12752006-02-28 Kevin Ryde <user42@zip.com.au>
1276
1277 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1278
12792006-02-26 Kevin Ryde <user42@zip.com.au>
1280
1281 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1282 NAME_MAX is not available, which is so on Solaris 10. Report and help
1283 by Bill Schottstaedt.
1284
1285 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1286 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1287 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1288 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1289 use "unsigned char", not signed char. This ensures comparisons are
1290 the same as `char<?' etc, and is also the same as guile 1.6 did.
1291 Reported by Sven Hartrumpf.
1292
4a9f83ff
MD
12932006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1294
1295 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1296 SCM_HAVE_T_INT64.
1297 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1298 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1299 scm_t_int32.
1300
29d8c124 13012006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1302
1303 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1304 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1305 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1306 Take into account SEG->SPAN when computing CELLS_SWEPT.
1307 (scm_i_sweep_segment): Take one more argument, similarly.
1308 (scm_i_sweep_all_segments): Likewise.
1309 (scm_i_sweep_some_segments): Likewise.
1310 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1311 refer to SCM_GC_CELLS_COLLECTED.
1312
1313 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1314 argument, an `scm_i_sweep_statistics' object.
1315 Change the way DELTA is collected: don't take into account
1316 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1317
1318 * gc-malloc.c (scm_realloc): Pass an extra argument
1319 to `scm_i_sweep_all_segments ()'.
1320
1321 * gc.c (gc_start_stats): Updated accordingly.
1322 (gc_end_stats): Take an additional SWEEP_STATS argument.
1323 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1324 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1325 Decrement SCM_CELLS_ALLOCATED.
1326 (scm_i_gc): Likewise.
1327
1328 * private-gc.h (scm_i_sweep_*): Updated function
1329 prototypes accordingly.
1330 (scm_t_sweep_statistics): New type.
1331 (scm_i_sweep_statistics_init): New macro.
1332 (scm_i_sweep_statistics_sum): New macro
1333
9a5fa6e9 13342006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1335
1336 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1337 LEN. Without this, too much collectable memory gets unregistered,
1338 which results in an underflow of SCM_MALLOCATED in
1339 `decrease_mtrigger()'.
1340
1341 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1342 equal to SCM_MALLOCATED.
1343
13442006-02-13 Marius Vollmer <mvo@zagadka.de>
1345
1346 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1347 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1348 configured --without-threads.
1349 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1350
1aaa1c17
MV
13512006-02-12 Marius Vollmer <mvo@zagadka.de>
1352
1353 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1354 filling when the fill parameter is omitted, as documented, but
1355 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1356 can not store characters.
1357
d7c6575f
NJ
13582006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1359
1360 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1361 on to scm_fill_sockaddr call.
1362
43e01b1e
NJ
13632006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1364
1365 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1366 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1367
1368 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1369 (struct pre_unwind_data): New, replaces struct lazy_catch.
1370 (scm_c_catch): New, replaces scm_internal_catch as the primary
1371 catch API for C code; adds pre-unwind handler support.
1372 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1373 compatibility.
1374 (tc16_pre_unwind_data, pre_unwind_data_print,
1375 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1376 "lazy_catch" equivalents.
1377 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1378 as the primary C API for a "lazy" catch.
1379 (scm_internal_lazy_catch): Now just a wrapper for
1380 scm_c_with_throw_handler, for back compatibility.
1381 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1382 pre-unwind handler support.
1383 (scm_catch): Now just a wrapper for
1384 scm_catch_with_pre_unwind_handler, for back compatibility.
1385 (scm_with_throw_handler): New.
1386 (scm_lazy_catch): Update comment to say that the handler can
1387 return, and what happens if it does.
1388 (toggle_pre_unwind_running): New.
1389 (scm_ithrow): When identifying the throw target, take running
1390 flags into account. In general, change naming of things from
1391 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1392 don't unwind the dynamic context first. Add dynwind framing to
1393 manage the running flag of a throw handler. If a lazy catch or
1394 throw handler returns, rethrow the same exception again. Add
1395 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1396
1397 * root.c (scm_internal_cwdr): Add NULL args to
1398 scm_i_with_continuation_barrier call.
1399
1400 * dynwind.c: Change comment mentioning lazy-catch to mention
1401 pre-unwind data and throw handler also.
1402
1403 * continuations.h (scm_i_with_continuation_barrier): Add
1404 pre-unwind handler args.
1405
1406 * continuations.c (scm_i_with_continuation_barrier): Add
1407 pre-unwind handler args, and pass on to scm_c_catch (changed from
1408 scm_internal_catch).
1409 (c_handler): Remove scm_handle_by_message_noexit call.
1410 (scm_c_with_continuation_barrier): Call
1411 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1412 as the pre-unwind handler.
1413 (scm_handler): Remove scm_handle_by_message_noexit call.
1414 (s_scm_with_continuation_barrier): Call
1415 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1416 as the pre-unwind handler.
1417
2b829bbb
KR
14182006-02-04 Kevin Ryde <user42@zip.com.au>
1419
1420 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1421
72098928
KR
14222006-02-03 Kevin Ryde <user42@zip.com.au>
1423
1424 * list.c, list.h (scm_list): Restore this function for use from C.
1425 It's a complete no-op but in theory might used by someone.
1426
aa092c5d
MV
14272006-01-30 Marius Vollmer <mvo@zagadka.de>
1428
1429 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1430 so that it gets unlocked in all cases.
1431 (SCM_APPLY, CEVAL): Likewise.
1432
661ae7ab
MV
14332006-01-29 Marius Vollmer <mvo@zagadka.de>
1434
ee51ba31
MV
1435 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1436 scm_is_typed_array instead.
1437
661ae7ab
MV
1438 Renamed the "frames" that are related to dynamic-wind to "dynamic
1439 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1440 Updated documentation.
1441
99e370f6
MV
1442 Disabled "futures":
1443
1444 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1445 * eval.c, init.c: Comment out all 'future' related things.
1446
15ccf10b
MV
14472006-01-28 Marius Vollmer <mvo@zagadka.de>
1448
1449 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1450 to inline.h to make it inline.
1451
9a5fa6e9 14522005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1453
1454 * strings.c (scm_i_take_stringbufn): New.
1455 (scm_i_c_take_symbol): New.
1456 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1457
1458 * strings.h (scm_i_c_take_symbol): New.
1459 (scm_i_take_stringbufn): New.
1460
1461 * symbols.c (lookup_interned_symbol): New function.
1462 (scm_i_c_mem2symbol): New function.
1463 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1464 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1465 creating a new Scheme string.
1466 (scm_from_locale_symboln): Likewise.
1467 (scm_take_locale_symbol): New.
1468 (scm_take_locale_symboln): New.
1469
1470 * symbols.h (scm_take_locale_symbol): New.
1471 (scm_take_locale_symboln): New.
1472
2ca2ffe6
HWN
14732006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1474
1475 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1476 free_count.
1477
c255614e
HWN
14782005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1479
1480 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1481 upon error
1482
29295b0c
NJ
14832005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1484
9a5fa6e9 1485 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1486 the GC when allocated_fluids_len is zero.
1487
2824f4dc
NJ
14882005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1489
ec3a8ace
NJ
1490 * load.c (the_reader, the_reader_fluid_num): New.
1491 (scm_primitive_load): Support custom reader.
1492 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1493 the_reader as `current-reader'.
1494
2824f4dc
NJ
1495 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1496 (rather than an uninitialized pointer on the stack).
1497
d9c36d2a
MV
14982005-12-07 Marius Vollmer <mvo@zagadka.de>
1499
6a88895b
MV
1500 Reported by Bruce Korb:
1501
1502 * init.c (invoke_main_func): Don't call exit here. Throws that
1503 are only caught by scm_with_guile will bypass us and would cause
1504 scm_boot_guile to return erroneously.
1505 (scm_boot_guile): Expect scm_with_guile to return and call exit
1506 here, passing it an appropriate exit code.
1507
1508 From Andy Wingo:
d9c36d2a
MV
1509
1510 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1511 unsigned char cast to an int, or -1 for EOS.
1512
b54df254
MV
15132005-12-06 Marius Vollmer <mvo@zagadka.de>
1514
08f489c9
MV
1515 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1516 non-const.
9a5fa6e9 1517 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1518
b54df254
MV
1519 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1520 scm_enter_guile): Removed from public API. See comment at
1521 scm_without_guile for the rationale.
1522
1523 * scmsigs.c (read_without_guile): New.
1524 (signal_delivery_thread): Use it instead of
1525 scm_leave_guile/read/scm_enter_guile.
1526
9d9ce2b5
MV
1527 From Stephen Compall:
1528
1529 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1530 (CEVAL): Evaluate SRFI 61 cond clauses.
1531
9a5fa6e9 15322005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1533
1534 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1535 This was typically hit when running `gc-live-object-stats' right
1536 after starting Guile.
1537
efeac8ae
KR
15382005-11-30 Kevin Ryde <user42@zip.com.au>
1539
1540 * srfi-13.c (scm_string_append_shared): No copying if just one
1541 non-empty string in args.
1542
606183ba
KR
15432005-11-26 Kevin Ryde <user42@zip.com.au>
1544
1545 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1546 by Ludovic Courtès.
606183ba
KR
1547
1548 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1549 "register".
1550
1551 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1552 scm_malloc returning NULL, it never does that.
1553 * putenv.c (putenv): Likewise.
1554
1555 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1556 much too big to want to inline.
1557
9a5fa6e9 15582005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1559
1560 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1561 the value at its top. This fixes a reference leak.
1562 (PUSH_REF): Perform `pstate->top++' after calling
1563 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1564 effects.
1565
9a5fa6e9 15662005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1567
1568 * gc.c (scm_weak_vectors): Removed.
1569
f07d2b20
KR
15702005-11-12 Kevin Ryde <user42@zip.com.au>
1571
1572 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1573 by Ludovic Courtès.
f07d2b20 1574
bedd3f5f
MV
15752005-11-07 Marius Vollmer <mvo@zagadka.de>
1576
1577 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1578 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1579 section might exit non-locally.
1580
7c9c0169
NJ
15812005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1582
1583 * eval.c (sym_instead): New symbol.
1584 (ENTER_APPLY): Remove optional use of a continuation when making
1585 trap call.
1586 (scm_debug_opts): Change doc for 'cheap option to make clear that
1587 it is now obsolete.
1588 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1589 making trap calls, and implement substitution of eval expressions
1590 and return values using the values that the trap call handlers
1591 return.
1592
1593 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1594
9a5fa6e9 15952005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1596
1597 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1598 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1599 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1600 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1601 scm_c_make_socket_address): New functions.
1602 * socket.h: Add prototypes.
1603
fc9f596c
KR
16042005-10-24 Kevin Ryde <user42@zip.com.au>
1605
1606 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1607 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1608 POSIX spec examples, the latter are not available on for instance
1609 NetBSD.
1610
1611 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1612 posix.texi.
1613
1614 * stime.c (scm_strftime): Update docstring from posix.texi.
1615
0460c6e1
MV
16162005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1617
1618 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1619
1620 * null-threads.h, pthread-threads.h
1621 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1622 (scm_i_pthread_mutexattr_recursive): New.
1623
1624 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1625 (scm_i_critical_section_mutex): Do not initialize statically.
1626 (scm_threads_prehistory): Initialize
1627 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1628 here.
1629
1630 * eval.c (source_mutex): Do not initialiaze statically.
1631 (scm_init_eval): Do it here, using
1632 scm_i_pthread_mutexattr_recursive.
1633
7b4a9e52
MV
16342005-09-05 Marius Vollmer <mvo@zagadka.de>
1635
1636 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1637 New.
1638 (sym_reader): New.
1639 (scm_print_opts): Added "quote-keywordish-symbols" option.
1640 (quote_keywordish_symbol): New, for evaluating the option.
1641 (scm_print_symbol_name): Use it.
1642 (scm_init_print): Initialize new option to sym_reader.
1643
5defc05d
NJ
16442005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1645
1646 * eval.c (eval_letrec_inits): New.
1647 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1648
036482e9
MV
16492005-08-12 Marius Vollmer <mvo@zagadka.de>
1650
1651 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1652 Peter Gavin!
1653
5c347f8c
KR
16542005-08-12 Kevin Ryde <user42@zip.com.au>
1655
1656 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1657
bc721aa2
KR
16582005-08-06 Kevin Ryde <user42@zip.com.au>
1659
1660 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1661 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1662 scm_string_index, scm_string_index_right, scm_string_skip,
1663 scm_string_skip_right, scm_string_count, scm_string_map,
1664 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1665 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1666 procedures called in loops.
1667
126c81db
KR
16682005-08-02 Kevin Ryde <user42@zip.com.au>
1669
1670 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1671 avoid lots of copying where previoulsy growing by only 80 bytes at a
1672 time.
1673
7f278dc6
MV
16742005-08-01 Marius Vollmer <mvo@zagadka.de>
1675
1676 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1677 already have scm_lookup_closure_module, which does the same thing.
1678
cb5c4b07
MV
16792005-08-01 Marius Vollmer <mvo@zagadka.de>
1680
1681 New marking algorithm for weak hashtables that fixes the problem
1682 that references from the non-weak value to the associated weak
1683 key (for example) would prevent the entry from ever being dropped.
1684
1685 Guardians have been changed back to their original semantics and
1686 are no longer greedy and no longer drop cycles.
1687
1688 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1689 hashtable and guardian machinery but call the relevant functions
1690 directly.
1691
1692 * guardians.h, guardians.c, deprecated.h,
1693 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1694 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1695 Deprecated and moved into deprecated.[ch].
1696
1697 * guardians.h, guardians.c: Mostly rewritten.
1698 (scm_i_init_guardians_for_gc,
1699 scm_i_identify_inaccessible_guardeds,
1700 scm_i_mark_inaccessible_guardeds): New.
930888e8 1701 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1702
1703 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1704 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1705 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1706 (scm_weaks_prehistory): Removed.
1707 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1708 scm_i_mark_weak_vectors_non_weaks,
1709 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1710 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1711 scm_scan_weak_vectors): Removed.
1712
1713 * hashtab.h (scm_i_scan_weak_hashtables): New.
1714 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1715 SCM_WVECTF_NOSCAN.
1716 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1717 t->n_items.
1718 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1719 to latter. Do not scan the alists themselves, this is done by the
1720 weak vector code now. Just update the element count.
1721
1722 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1723 to latter. The type is now only part of the cell word.
1724 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1725
1726 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1727
3e2073bd
MD
17282005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1729
1730 Some changes towards making it possible to run Guile on the EM64T
1731 platform.
1732
1733 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1734 mallocating for (unsigned long *bounds).
1735
1736 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1737 scm_t_bits before storing them in the type word.
1738
1739 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1740 scm_t_bits to int.
1741
e8ac8e75
KR
17422005-07-12 Kevin Ryde <user42@zip.com.au>
1743
1744 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1745 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1746 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1747 than scm_makfrom0str.
1748 Reported by Ken Raeburn.
1749
1750 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1751 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1752 returning SCM_GC_CARD_BVEC.
1753
1754 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1755 rather than latin-1 acute accent, the latter may not print on all
1756 terminals.
1757
1758 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1759 trailing deletions, so as to return a substring if those are the only
1760 changes.
1761
adc0677d
KR
17622005-07-10 Kevin Ryde <user42@zip.com.au>
1763
1764 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1765 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1766 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1767 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1768
8fecbb19
HWN
17692005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1770
1771 * gc-card.c (scm_i_card_statistics): init tag.
1772
1773 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1774
fc9c5d06
HWN
17752005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1776
8fecbb19
HWN
1777 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1778 string.
fc9c5d06 1779
08fce816
KR
17802005-06-25 Kevin Ryde <user42@zip.com.au>
1781
1782 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1783 last change, use plain copy-on-write substrings, the individual
1784 descriptions in the srfi don't mention shared storage (only the
1785 introduction does).
1786
1787 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1788 null-terminator, rather than mallocing a whole new block.
1789 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1790
fc4abd0e
MV
17912005-06-12 Marius Vollmer <mvo@zagadka.de>
1792
e3da8a30
MV
1793 * ramap.c (scm_array_index_map_x): First test for real arrays,
1794 then check for generalized vectors. This ensures that the
1795 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1796 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1797 to access the target array, making these functions work with all
1798 kinds of arrays, not just bit arrays.
e3da8a30 1799
fc4abd0e
MV
1800 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1801 gh_list.c, gh_predicates.c: Deprecated everything.
1802
1803 * environments.c (environment_default_folder,
1804 environment_default_observer): Do not use gh_call3, gh_call1.
1805
e4da0740
HWN
18062005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1807
1808 * modules.c (s_scm_eval_closure_module): new function. Return the
1809 module inside an eval-closure.
1810
1811 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1812 table. This means that procedure properties are GC'd if the
1813 procedure dies.
1814
27667158
KR
18152005-06-11 Kevin Ryde <user42@zip.com.au>
1816
1817 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1818 charset cases, count chars kept and build a string in a second pass,
1819 rather than using a cons cell for every char kept. Use a shared
1820 substring when nothing removed (such sharing is allowed by the srfi).
1821
8a00ba71
HWN
18222005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1823
1824 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1825 string, so live object stats can be sorted with string<?.
1826
a677679f
MV
18272005-06-06 Marius Vollmer <mvo@zagadka.de>
1828
2ff668b0
MV
1829 * print.c (iprin1): When writing a string, collect all characters
1830 that can be printed directly into one call to scm_lfwrite.
1831 Previously, every character was output with its own call to
1832 write(2) on unbuffered ports.
1833
589f22f6
MV
1834 * eval.c (scm_eval_options_interface): Use
1835 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1836 and SCM_CRITICAL_SECTION_END.
1837
a677679f
MV
1838 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1839 check for generalized vectors. This ensures that the generalized
1840 vector case need only work with zero-origin ranges.
1841
f8cda9ee
KR
18422005-06-06 Kevin Ryde <user42@zip.com.au>
1843
1844 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1845 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1846 matched.
1847
cdac1be4
MV
18482005-06-05 Marius Vollmer <mvo@zagadka.de>
1849
6642f7ac
MV
1850 * eval.c: Added comment on how to make case 1.1 of
1851 r5rs_pitfall.test succeed.
1852
cdac1be4
MV
1853 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1854
1855 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1856
1857 * socket.c: Remove obsolete comment about socklen_t.
1858 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1859
1860 * numbers.h (isnan)[__MINGW32__]: Remove.
1861
1862 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1863 DEFAULT_INCLUDES when cross compiling.
1864
1865 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1866
a677679f 1867 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1868 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1869 from Jan's patch.)
1870
9e664475
MV
18712005-05-22 Marius Vollmer <mvo@zagadka.de>
1872
188d0c5e
MV
1873 * unif.c (scm_make_shared_array): Add old base to new base since
1874 scm_array_handle_pos does not include the base.
1875 (scm_aind): Likewise.
1876
9e664475
MV
1877 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1878 output port.
1879
5a6d139b
NJ
18802005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1881
1882 Mac OS X compile warning fixes, reported by Richard Todd.
1883
1884 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1885 that it is signed.
1886
1887 * strports.c (st_resize_port): Add unsigned char cast.
1888 (scm_mkstrport): Make read/write_buf cast unsigned.
1889
1890 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1891
1892 * rdelim.c (scm_read_line): Initialize slen.
1893
1894 * load.c (scm_search_path): Remove weird >=1, and add
1895 parentheses to clarify conditions.
1896
1897 * hash.c (scm_hasher): Add const unsigned char cast.
1898
1899 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1900
b01532af
NJ
19012005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1902
9a5fa6e9 1903 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1904
1905 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1906 code.
1907
1908 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1909 of code.
1910
1911 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1912 of code.
1913 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1914 and current.
1915
229a0710
NJ
19162005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1917
1918 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1919 compile warning reported by Werner Scheinast.
1920
645dd3fc
HWN
19212005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1922
80038021
HWN
1923 * list.h: remove scm_list()
1924
645dd3fc
HWN
1925 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1926 SCM_DEBUG_CELL_ACCESSES
1927 (FLUID_NEXT_LOC): idem.
1928
9a68a4a8
KR
19292005-04-30 Kevin Ryde <user42@zip.com.au>
1930
1931 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1932 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1933 zero when re==0 and im<0. Reported by Jean Crepeau.
1934
0640cdaa
KR
19352005-04-25 Kevin Ryde <user42@zip.com.au>
1936
1937 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1938 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1939 few sensible uses (like filling with a random number generator say),
1940 but has been allowed in the past and so should be kept.
0640cdaa 1941
c0b85e9c
KR
19422005-04-23 Kevin Ryde <user42@zip.com.au>
1943
1944 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1945 scm_hash_fn_remove_x.
1946
1947 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1948 the caller when cons* is reached through apply.
1949
1950 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1951 list is called using apply, under the debugging evaluator.
1952 (scm_list): Remove.
1953
c51682b4
KR
1954 * list.c, list.h (scm_make_list): New code, moving make-list from
1955 boot-9.scm.
8cb2eff8 1956
c0575bde
KR
19572005-04-14 Kevin Ryde <user42@zip.com.au>
1958
1959 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1960 converted from scheme code in boot-9.scm.
1961
47a298d9
KR
19622005-04-11 Kevin Ryde <user42@zip.com.au>
1963
1964 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1965 Validate list argument, scm_string_append and scm_string_append_shared
1966 don't do that to their rest argument (in a normal build).
1967
8ea3dc2e
MV
19682005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1969
1970 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1971 closure can not be stored since it is no longer valid at GC time.
1972 (make_hash_table): Initialize 'hash_fn' field.
1973 (scm_i_rehash): Only store hash_fn in hash table when closre is
1974 NULL.
1975 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1976 non-NULL. Always use a NULL closure.
1977 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1978 few entries.
1979
08d2020d
MV
19802005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1981
1982 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1983 argument; always use scm_delq_x. The delete_fn function works on
1984 the handle, not the key, and it therefore makes no sense to make
1985 it configurable. Changed all callers.
1986 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1987 (scm_hash_clear): Accept plain vectors as hashtables.
1988 (scm_delx_x): Removed.
1989
cb975c21
HWN
19902005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1991
1992 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1993 compatibility with gcc -std=c99.
1994
4c908f2c
MD
19952005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1996
1997 * async.h (scm_mask_ints): Removed left over reference to
1998 scm_root.
1999
2000 * threads.c: Removed fprintf debug statements.
2001
d193b04b
NJ
20022005-03-24 Neil Jerram <neil@ossau.uklinux.net>
2003
2004 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
2005
c29748cd
NJ
20062005-03-23 Neil Jerram <neil@ossau.uklinux.net>
2007
2008 * debug.c (scm_make_memoized): Remove unnecessary critical
2009 section, and simplify by using SCM_RETURN_NEWSMOB.
2010
e654b062
MD
20112005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2012
2013 * strings.h (SCM_STRING_UCHARS): Added missing argument.
2014
4bc6f1c6
KR
20152005-03-18 Kevin Ryde <user42@zip.com.au>
2016
2017 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 2018 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 2019
f1531813
KR
20202005-03-13 Kevin Ryde <user42@zip.com.au>
2021
2022 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
2023 srfi-60.
2024
2025 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
2026 because OR-ing bits into a negative can reduce the value to an inum.
2027
2028 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
2029 casting inum to double since that can lose precision.
2030
a9fae247
MV
20312005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2032
2033 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
2034 (guilify_self_1): Initialize it.
2035
2036 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
2037 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
2038 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
2039 field.
2040 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
2041 recursively.
2042 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
2043 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
2044 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
2045 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
2046 scm_after_gc_c_hook here.
2047 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
2048 scm_after_gc_c_hook when a full GC has in fact been performed.
2049 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
2050
2051 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
2052 scm_gc_heap_lock.
2053
2054 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
2055 scm_gc_running_p while the scm_i_sweep_mutex is locked.
2056
2057 * inline.h (scm_cell, scm_double_cell): Do not check
2058 scm_gc_running_p, allocation during sweeping is OK.
2059
2060 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
2061 not set scm_block_gc.
2062
2063 * init.c (scm_i_init_guile): Do not set scm_block_gc.
2064
2065 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
2066 instead of scm_malloc. The latter can not be used during GC.
2067
d1c38e11
MV
20682005-03-09 Marius Vollmer <mvo@zagadka.de>
2069
2070 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
2071 years.
2072
99ec43c1
MV
20732005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2074
2075 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
2076 scm_gc_running_p. Sweeping can happen in parallel with
2077 allocation.
2078
2079 * inline.h: Updated comments for current threading implementation.
2080
2081 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
2082 (scm_i_thread): Removed unused signal_asyncs field.
2083 (threads_mark): Do not mark it.
2084 (guilify_self_1): Do not initialize it. Do initialize
2085 continuation_root field.
2086 (do_thread_exit): Do not remove thread from all_threads list.
2087 (on_thread_exit): Do it here, after leaving guile mode.
2088 (sleep_level): Removed.
2089 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
2090 returning. Do not support recursive sleeps.
2091 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
2092 entry. Do not support recursive sleeps.
2093
2094 * fluids.c (ensure_state_size, ensure_all_state_sizes,
2095 resize_all_states): Collapsed ensure_state_size and
2096 ensure_all_state_sizes into one function named resize_all_states.
2097 Allocate new vectors outside of single threaded region. Do only
2098 simple things inside that region.
2099 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
2100 while adding to the global lists.
2101
2102
461f34aa
MV
21032005-03-08 Marius Vollmer <mvo@zagadka.de>
2104
2105 libltdl is no longer distributed. We expect it to be installed
2106 already.
2107
2108 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
2109 (libguile_la_LIBADD): Removed @LIBLTDL@.
2110
4e047c3e
MV
21112005-03-07 Marius Vollmer <mvo@zagadka.de>
2112
2113 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
2114 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
2115 they also block/unblock execution of asyncs and call
2116 scm_async_click which is declared in async.h but threads.h can not
2117 include async.h since async.h already includes threads.h.
2118 (scm_i_critical_section_level): New, for checking mistakes in the
2119 use of the SCM_CRITICAL_SECTION_* macros.
2120 (scm_i_critical_section_mutex): Make it a recursive mutex so that
2121 critical sections can be nested.
2122
2123 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
2124 not zero.
2125
2126 * threads.h, threads.c (scm_frame_lock_mutex): New.
2127 (scm_frame_critical_section): Take mutex as argument.
2128 (framed_critical_section_mutex): New, used as default for above.
2129 (scm_init_threads): Initialize it.
2130 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
2131 scm_i_critical_section_mutex; both are initialized statically.
2132
2133 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
2134 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
2135 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
2136 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
2137
2138 * debug.c (scm_debug_options): Replace
2139 SCM_CRITICAL_SECTION_START/END with a frame and
2140 scm_frame_critical_section.
2141
2142 * continuations.c (scm_make_continuation): No longer a critical
2143 section.
2144 (scm_dynthrow): Abort when scm_i_critical_section_level is
2145 not zero.
2146
d0a45bff
MV
21472005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2148
db6673e5
MV
2149 * threads.c (scm_try_mutex): Renamed argument for consistency.
2150
d0a45bff
MV
2151 * root.c (scm_call_with_dynamic_root): New docstring.
2152
2153 * eval.c: Define _GNU_SOURCE.
2154
9de87eea
MV
21552005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2156
2157 Big merge from the mvo-thread-cleanup branch. The main changes
2158 are:
2159
2160 - The dynamic roots functionality has been split into dynamic
2161 states and continuations barriers. Fluids have been
2162 reimplemented and can now be garbage collected.
2163
2164 - Initialization of Guile now works in a multi-thread friendly
2165 manner. Threads can freely enter and leave guile mode.
2166
2167 - Blocking on mutexes or condition variables or while selecting
2168 can now be reliably interrupted via system asyncs.
2169
2170 - The low-level threading interface has been removed.
2171
2172 - Signals are delivered via a pipe to a dedicated 'signal delivery
2173 thread'.
2174
2175 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
2176
2177 * throw.c (scm_handle_by_message): Exit only the current thread,
2178 not the whole process.
2179 (scm_handle_by_message_noexit): Exit when catching 'quit.
2180
2181 * scmsigs.c (take_signal, signal_delivery_thread,
2182 start_signal_delivery_thread, ensure_signal_delivery_thread,
2183 install_handler): Reimplemented signal delivery as explained in
2184 the comments.
2185
2186 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
2187 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
2188 scm_i_sched_yield, scm_i_pthread_sigmask,
2189 SCM_I_PTHREAD_MUTEX_INITIALIZER,
2190 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
2191 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
2192 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
2193 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
2194 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
2195 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
2196 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
2197 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
2198 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
2199 scm_i_pthread_key_create, scm_i_pthread_setspecific,
2200 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
2201 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
2202 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2203 when using pthreads.
2204 * null-threads.c, null-threads.h: Provide dummy definitions for
2205 the above symbols when not using pthreads.
2206
2207 * modules.h, modules.c (scm_frame_current_module): New.
2208
2209 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2210 instead of scm_internal_dynamic_wind.
2211
2212 * init.h, init.c (restart_stack, start_stack): Removed.
2213 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2214 (scm_boot_guile_1): Removed.
2215 (scm_i_init_mutex): New.
2216 (really_cleanup_for_exit, cleanup_for_exit): New.
2217 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2218 Moved around some init funcs. Call
2219 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2220 with atexit.
2221
2222 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2223 Use "!scm_is_eq" instead of "!=".
2224
2225 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2226 SCM_USE_COOP_THREADS): Removed.
2227
2228 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2229 maintained. Unlock scm_i_sweep_mutex before running
2230 scm_after_gc_c_hook.
2231 (scm_permanent_object): Allocate outside of critical section.
2232 (cleanup): Removed.
2233
2234 * fluids.h, fluids.c: Reimplemented completely.
2235 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2236 SCM_FAST_FLUID_SET): Reimplemented as functions.
2237 (scm_is_fluid): New.
2238 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2239 (scm_make_dynamic_state, scm_dynamic_state_p,
2240 scm_is_dynamic_state, scm_current_dynamic_state,
2241 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2242 scm_c_with_dynamic_state, scm_with_dynamic_state,
2243 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2244
2245 * feature.c (progargs_fluid): New.
2246 (scm_program_arguments, scm_set_program_arguments): Use it instead
2247 of scm_progargs.
2248 (scm_init_feature): Allocate it. Also, only add "threads" feature
2249 when SCM_USE_PTHREAD_THREADS is true.
2250
2251 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2252 scm_make_rec_mutex, with all the consequences.
2253 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2254 scm_internal_dynamic_wind. Handle dynamic states as second
2255 argument.
2256
2257 * threads.h, threads.c (scm_internal_select): Renamed to
2258 scm_std_select and discouraged old name.
2259 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2260 and scm_std_usleep.
2261 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2262 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2263 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2264 SCM_THREAD_DATA): Removed.
2265 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2266 (scm_i_thread): New.
2267 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2268 Use scm_assert_smob_type.
2269 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2270 scm_thread_self, scm_thread_yield, scm_mutex_init,
2271 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2272 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2273 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2274 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2275 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2276 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2277 scm_thread_select): Removed. Replaced with scm_i_pthread
2278 functions as appropriate.
2279 (scm_in_guile, scm_outside_guile): Removed.
2280 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2281 take a ticket.
2282 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2283 New.
2284 (scm_i_frame_single_threaded): New.
2285 (scm_init_threads_default_dynamic_state): New.
2286 (scm_i_create_thread): Removed.
2287 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2288 (scm_make_recursive_mutex): New.
2289 (scm_frame_critical_section): New.
2290 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2291 latter, changed all uses.
2292 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2293 scm_i_set_last_debug_frame): New, use them instead of scm_root
2294 stuff.
2295 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2296 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2297 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2298 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2299 (remqueue): Allow the removal of already removed cells. Indicate
2300 whether a real removal has happened.
2301 (scm_thread): Removed, replaced with scm_i_thread.
2302 (make_thread, init_thread_creatant): Removed.
2303 (cur_thread): Removed.
2304 (block_self, unblock_from_queue): New.
2305 (block, timed_block, unblock): Removed.
2306 (guilify_self_1, guilify_self_2, do_thread_exit,
2307 init_thread_key_once, init_thread_key,
2308 scm_i_init_thread_for_guile, get_thread_stack_base,
2309 scm_init_guile): New initialisation method.
2310 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2311 thread creation.
2312 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2313 "fair" to fat and implemented new semantics, including reliable
2314 interruption.
2315 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2316 (scm_threads_mark_stacks): Explicitly mark handle.
2317 (scm_std_select): Allow interruption by also selecting on the
2318 sleep_pipe.
2319 (scm_i_thread_put_to_sleep): Handle recursive requests for
2320 single-threadedness.
2321 (scm_threads_prehistory, scm_init_threads): Put current thread
2322 into guile mode via guileify_self_1 and guileify_self_2,
2323 respectively.
2324
2325 * fluid.h (SCM_FLUIDP): Deprecated.
2326
2327 * coop-threads.c: Removed.
2328
2329 * continuations.h, continuations.c (scm_with_continuation_barrier,
2330 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2331 New.
2332
2333 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2334 (async_mutex): New.
2335 (scm_async_click): Protected with async_mutex. Do not deal with
2336 signal_asyncs, which are gone. Set cdr of handled async cell to
2337 #f.
2338 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2339 current sleep.
2340 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2341 since that might not work during early initialization.
2342
2343 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2344 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2345 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2346 and SCM_CRITICAL_SECTION_END.
2347 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2348 SCM_CRITICAL_SECTION_START/END.
2349
2350 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2351 (libguile_la_SOURCES): Added null-threads.c
2352 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2353 threads-plugin.c.
2354 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2355
2356 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2357 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2358 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2359 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2360 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2361 scm_make_root): Removed or deprecated. Replaced with references
2362 to the current thread, dynamic state, continuation barrier, or
2363 some fluid, as appropriate.
2364 (root_mark, root_print): Removed.
2365 (scm_internal_cwdr): Reimplemented guts with
2366 scm_frame_current_dynamic_state and
2367 scm_i_with_continuation_barrier.
2368 (scm_dynamic_root): Return current continuation barrier.
2369
2370
ad3d5a65
MV
23712005-02-28 Marius Vollmer <mvo@zagadka.de>
2372
2373 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2374 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2375 cleanliness.
2376 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2377 IP_DROP_MEMBERSHIP.
2378 Thanks to Greg Troxel!
2379
73a90115
MD
23802005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2381
2382 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2383 block.
2384
5d2cb3ab
MV
23852005-02-25 Marius Vollmer <mvo@zagadka.de>
2386
2387 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2388 so that no two weak alist vectors share a spine.
2389 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2390 during GC before inserting the new alist cell.
2391
838c4126
MV
23922005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2393
2394 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2395 the hashtable.
2396 (scm_hash_fn_create_handle_x): Likewise.
2397 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2398
29fed193
MD
23992005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2400
2401 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2402 the prototypical examples mentioned in the old reference manual.
2403 Instead keep the old semantics of dispatching on type. (Yes, this
2404 is extremely ugly, but the whole point of keeping the deprecated
2405 interface is not to break old code.)
2406
9cc49060
MD
24072005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2408
2409 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2410 scm_i_array_dims.
2411
8447f463
KR
24122005-01-28 Kevin Ryde <user42@zip.com.au>
2413
2414 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2415 integer-expt and multiply/divide. Inexacts and fractions no longer
2416 supported (they happened to work before for left shifts, but not
2417 right). Don't really need inexacts and fractions, since ash is
2418 documented as a "bitwise operation", and all the rest of those only
2419 take exact integers.
2420
1367aa5e
HWN
24212005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2422
856fca7e
HWN
2423 * gc-card.c (scm_i_card_statistics): map structs, closures and
2424 subrs to one tag.
2425
1367aa5e 2426 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2427 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2428
2429 * gc-segment.c (scm_i_all_segments_statistics): new function.
2430 (scm_i_heap_segment_statistics): new function
2431
2432 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2433 statistics on the number of live objects of each type.
2434
2435 * gc-card.c (scm_i_tag_name): new function.
2436 (scm_i_card_statistics): new function.
2437
333db3b8
KR
24382005-01-24 Kevin Ryde <user42@zip.com.au>
2439
2440 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2441 POSIX and C99 don't document errno being set. Reported by Bruno
2442 Haible.
2443 (scm_flock): Update docstring from manual.
2444
8447f463
KR
2445 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2446 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2447 a 64-bit system.
2448
2449 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2450 sa_handler, needs to be a long on 64-bit systems where int is only 32
2451 bits.
2452
88f59e53
MV
24532005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2454
0eeb2611
MV
2455 * environments.c (obarray_enter, obarray_replace): Call
2456 SCM_HASHTABLE_INCREMENT when adding a new entry.
2457
88f59e53
MV
2458 * objects.c: Include goops.h for the scm_class_of prototype.
2459
2460 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2461 sizes to be smaller than the maximum lengths of vectors.
2462
219b2868
MV
24632005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2464
2465 * ports.c, smob.c: Include "libguile/goops.h".
2466
2467 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2468 scm_class_char, scm_class_pair, scm_class_procedure,
2469 scm_class_string, scm_class_symbol,
2470 scm_class_procedure_with_setter, scm_class_primitive_generic,
2471 scm_class_vector, scm_class_null, scm_class_real,
2472 scm_class_complex, scm_class_integer, scm_class_fraction,
2473 scm_class_unknown, scm_port_class, scm_smob_class,
2474 scm_no_applicable_method, scm_class_of): Moved from objects to
2475 goops since they are only useable once goops has been loaded.
2476 (scm_classes_initialized): Removed.
2477 (scm_class_of): Do not check it.
2478 (create_standard_classes): Do not set it.
2479
009c6b9c
MV
24802005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2481
50472546
MV
2482 * objects.h, objects.c (scm_classes_initialized): New.
2483 (scm_class_of): Signal error when scm_classes_initialized is zero.
2484 * goops.c (create_standard_classes): Set scm_classes_initialized
2485 to one.
2486
009c6b9c
MV
2487 * random.c (scm_random_solid_sphere_x): Use
2488 scm_c_generalized_vector_length instead of
2489 scm_uniform_vector_length.
2490
7719cbe9
MV
24912005-01-16 Marius Vollmer <mvo@zagadka.de>
2492
2493 * script.c (scm_compile_shell_switches): Removed debugging output.
2494
1ec44fed
KR
24952005-01-15 Kevin Ryde <user42@zip.com.au>
2496
2497 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2498 docstrings from manual.
2499 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2500
6e4cd850
MV
25012005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2502
0b5a0521
MV
2503 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2504 its value.
2505
2506 Implement u64 and s64 uniform numeric vectors with bignums when
2507 scm_t_uint64 and scm_t_int64 are not available.
2508
2509 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2510 scm_array_handle_u64_elements,
2511 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2512 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2513 is not available.
2514 (scm_take_s64vector, scm_array_handle_s64_elements,
2515 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2516 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2517 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2518 scm_t_int64/scm_t_uint64 are not available.
2519 (uvec_mark): New, to mark the bignums.
2520 (alloc_uvec): Initialize bignums.
2521 (uvec_fast_ref): Return bignums directly.
2522 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2523 assert_exact_integer): New.
2524 (uvec_fast_set): Use them to validate the bignums.
2525 (scm_init_srfi_4): Set mark function of smob when needed.
2526 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2527 scm_int64_max.
2528
6e4cd850
MV
2529 Recognize 1.4 -e syntax.
2530
2531 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2532 (scm_compile_shell_switches): Use them to recognize and convert
2533 1.4 "-e" syntax.
2534
3b698afe
MV
25352005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2536
2537 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2538 deprecated features that once were macros but are now functions
2539 back into macros.
2540
d6dc83a9
MV
25412005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2542
49086691
MV
2543 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2544 * deprecation.c (scm_issue_deprecation_warning,
2545 scm_c_issue_deprecation_warning_fmt): Use it.
2546 (mode): Removed.
2547 (print_summary): New.
2548 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2549 mode.
2550
d6dc83a9
MV
2551 Deprecated SCM_ARRAY* macros.
2552
2553 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2554 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2555 version. Changed all uses.
2556 (scm_tc16_array, scm_i_tc16_array,
2557 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2558 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2559 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2560 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2561 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2562 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2563 SCM_ARRAY_V, SCM_I_ARRAY_V,
2564 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2565 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2566 scm_t_array, scm_i_t_array): Likewise.
2567 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2568 Moved from unif.h to unif.c.
2569 (scm_c_array_rank): New.
2570 (scm_array_rank): Reimplement using it.
2571
2572 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2573 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2574 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2575
dc91d8de
MV
25762005-01-11 Marius Vollmer <mvo@zagadka.de>
2577
2578 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2579 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2580 scm_c_generalized_vector_ref and scm_cvref, and
2581 scm_c_generalized_vector_set_x, respectively.
2582 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2583 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2584
2585 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2586 former to latter and made public. Changed all uses.
2587 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2588 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2589 (scm_i_shap2ra): New internal version of scm_shap2ra.
2590 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2591 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2592 (scm_ra_set_contp): Deprecated, changed all uses to
2593 scm_i_ra_set_contp.
2594 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2595
66d33784
MV
25962005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2597
b06f099d
MV
2598 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2599 Trotts!
2600
5d35ad81
MV
2601 * unif.c (scm_list_to_typed_array): Allow the specification of the
2602 upper bound as well. This is needed for empty arrays.
2603 (l2ra): Give needed number of elements in error message.
2604 (scm_i_print_array): Print length information for arrays that need
2605 it.
2606 (scm_i_read_array): Parse it.
2607
66d33784
MV
2608 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2609 scm_i_object_chars, scm_i_object_length): Brought back from the
2610 dead.
2611
d7d7d401
MV
26122005-01-10 Marius Vollmer <mvo@zagadka.de>
2613
74c58fce
MV
2614 * ramap.c: Replaced single-index uses of scm_array_set_x with
2615 scm_c_generalized_vector_set_x.
2616
d7d7d401
MV
2617 * unif.c (scm_array_rank, scm_array_dimensions,
2618 scm_shared_array_offset, scm_shared_array_increments,
2619 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2620 to simplify code and make it more general.
2621 (scm_shared_array_root): Work with all kinds of arrays, including
2622 naked vectors.
2623 (indices_to_pos): New.
74c58fce
MV
2624 (scm_make_shared_array): Use it instead of scm_aind; use handle
2625 for oldra.
2626
4475d3fe
KR
26272005-01-10 Kevin Ryde <user42@zip.com.au>
2628
2629 * posix.c (scm_mkstemp): Update docstring from manual.
2630
d3ddc95e
KR
2631 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2632
8c8491f5
MV
26332005-01-09 Marius Vollmer <mvo@zagadka.de>
2634
b89ecc6f
MV
2635 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2636 scm_i_uniform_vector_set_proc): New.
2637 (u8ref, u8set, s8ref, s8set, etc): New.
2638 (uvec_reffers, uvec_setters): New.
2639 (uvec_to_list): Use generic scm_array_handle_ref instead of
2640 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2641 (coerce_to_uvec, scm_c_uniform_vector_ref,
2642 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2643
2644 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2645 New.
2646 (scm_t_array_handle): Added ref, set, elements and
2647 writable_elements for fast inline operation of
2648 scm_array_handle_ref and scm_array_handle_set.
2649 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2650 and replaced with inline code that simply calls the ref/set
2651 members of the handle.
2652 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2653 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2654 New.
2655 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2656 and memoize_set.
2657 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2658 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2659 scm_bit_invert_x): Correctly multiply index with increment in the
2660 general case.
2661
8c8491f5
MV
2662 * unif.c (scm_array_handle_set): Correctly execute only one
2663 alternative. D'Oh!
2664 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2665 the array; this covers all cases with much simpler code.
2666
2667 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2668 as well.
2669
cd5d55c7
MV
26702005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2671
2672 * srfi-4.c (uvec_type): New.
2673 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2674 scm_c_uniform_vector_x): Use it to get concrete type.
2675
2676 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2677 fit the docs.
2678
2679 * unif.c (ra2l): Handle zero rank arrays.
2680 (scm_i_print_array): Print zero rank arrays specially.
2681 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2682 (scm_i_read_array): Allow zero rank arrays.
2683
a4aad74e
MV
26842005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2685
2686 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2687 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2688 and SCM_SET_HASHTAB_BUCKET.
2689
2690 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2691 Removed ref_stack field.
2692 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2693 of a print state. Use them everywhere instead of ref_stack.
2694
3a40d5e1
MV
2695 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2696
a4aad74e
MV
2697 * srfi-4.c: Include deprecation.h.
2698
2699 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2700 deprecated.c, eq.c
2701 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2702 (scm_vector_elements, scm_vector_writable_elements,
2703 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2704 unif.[hc].
2705 (SCM_SIMPLE_VECTOR_LOC): Removed.
2706 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2707 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2708 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2709 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2710 latter. Changed use in eq.c.
2711
f01fe441
MV
27122005-01-07 Marius Vollmer <mvo@zagadka.de>
2713
2714 Make the uniform vector routines also deal with one dimensional
2715 arrays.
2716
2717 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2718 SCM_SMOB_PREDICATE in this file.
2719 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2720 of the right type.
2721 (scm_is_uniform_vector): Likewise.
2722 (uvec_fast_ref): Made BASE param const.
2723 (uvec_writable_elements, uvec_elements): New.
2724 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2725 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2726 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2727 arrays.
2728 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2729 argument convention.
2730 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2731 checking.
2732 (scm_uniform_vector_length): Use uvec_length.
2733
2aaf5726
MV
27342005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2735
2736 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2737 scm_c_uniform_vector_size): Removed.
2738 (scm_array_handle_uniform_element_size): New.
2739
2740
2741 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2742 type of POS parameter to be signed, positions can be negative.
2743 (scm_array_handle_release): New, changed all uses of
2744 scm_t_array_handle to properly call it.
2745 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2746 Renamed former to latter, changed all uses.
2747
34ae52fc
MV
27482005-01-05 Marius Vollmer <mvo@zagadka.de>
2749
2750 Updated bitvector routines to also use scm_t_array_handles.
2751
2752 * unif.h (scm_bitvector_elements,
2753 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2754 deliver offset, length and increment to caller. Changed all uses.
2755 (scm_bitvector_release_elements,
2756 scm_frame_bitvector_release_elements,
2757 scm_bitvector_release_writable_elements,
2758 scm_frame_bitvector_release_writable_elements): Removed.
2759 (scm_array_handle_bit_elements,
2760 scm_array_handle_bit_writable_elements,
2761 scm_array_handle_bit_elements_offset): New.
2762 (scm_make_typed_array): The special value for non-initialized
2763 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2764 was a valid value to fill bitvectors with, so it can't really be
2765 specialed out.
2766
c4cb7628
KR
27672005-01-04 Kevin Ryde <user42@zip.com.au>
2768
2769 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2770 Reported by Bill Schottstaedt.
2771
0356881d
MV
27722005-01-02 Marius Vollmer <mvo@zagadka.de>
2773
2774 * sort.c (quicksort): Added INC parameter for non-contigous
2775 vectors.
2776 (quicksort1): New, for contigous vectors. Both functions are
2777 generated from the same code by including "quicksort.i.c".
2778 (scm_restricted_vector_sort_x): Call one of quicksort and
2779 quicksort1, depending on increment of vector.
2780 (scm_sort): Simply call scm_sort_x on a copy of the list or
2781 vector.
2782 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2783 size_t, added inc parameter.
2784 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2785 so that it doesn't leak.
2786 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2787 list or vector.
2788
2789 * ramap.c (scm_array_map_x): Do not try to convert fill value
2790 before filling, any necessary conversion is done while storing.
2791
2792 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2793 doing it inline.
2794
2795 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2796 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2797 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2798
2799 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2800 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2801 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2802 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2803 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2804 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2805 vector elements API or simple vector API, as appropriate. Removed
2806 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2807 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2808
2809 * srfi-4.h, srfi-4.c,
2810 srfi-4.i.c (scm_array_handle_uniform_elements,
2811 scm_array_handle_uniform_writable_elements,
2812 scm_uniform_vector_elements,
2813 scm_uniform_vector_writable_elements):
2814 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2815 scm_t_array_handle, deliver length and increment.
2816 (scm_array_handle_<foo>_elements,
2817 scm_array_handle_<foo>_writable_elements): New.
2818
2819 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2820 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2821
2822 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2823 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2824 scm_array_handle_set, scm_array_handle_elements
2825 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2826 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2827 scm_dimensions_to_uniform_array): Deprecated for real.
2828 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2829 snarfing wont allow a mismatch between C and Scheme arglists.
2830 (scm_make_shared_array, scm_enclose_array): Correctly use
2831 scm_c_generalized_vector_length instead of
2832 scm_uniform_vector_length.
2833
2834 * validate.h (SCM_VALIDATE_VECTOR,
2835 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2836 of SCM_VECTORP.
2837
2838 * weaks.h, weaks.c: Use new internal weak vector API from
2839 vectors.h.
2840
2841 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2842 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2843 'extra' to being regular sources.
2844 (noinst_HEADERS): Added quicksort.i.c.
2845 * quicksort.i.c: New file.
2846
2847 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2848 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2849 and reimplemented. Replaced all uses with scm_vector_elements,
2850 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2851 appropriate.
2852 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2853 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2854 SCM_SIMPLE_VECTOR_LOC): New.
2855 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2856 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2857 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2858 Removed.
2859 (scm_vector_copy): New.
2860 (scm_vector_elements, scm_vector_writable_elements): Use
2861 scm_t_array_handle, deliver length and increment. Moved to
2862 unif.h. Changed all uses.
2863 (scm_vector_release_elements,
2864 scm_vector_release_writable_elements,
2865 (scm_frame_vector_release_elements,
2866 scm_frame_vector_release_writable_elements): Removed.
2867 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2868 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2869 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2870 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2871 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2872 weak vectors.
2873
0336d18b
MV
28742004-12-29 Marius Vollmer <mvo@zagadka.de>
2875
2876 No longer use creators to specify the type of an array. Creators
2877 expose the fact that arrays are wrapped around vectors, but that
2878 might change.
2879
2880 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2881 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2882 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2883 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2884 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2885 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2886 uvec_proc_vars): Removed.
2887 (scm_i_generalized_vector_creator): Removed.
2888 (scm_i_generalized_vector_type): New.
2889
2890 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2891 scm_make_typed_array, scm_array_type, scm_list_to_array,
2892 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2893 (scm_array_creator): Removed.
2894 (scm_array_p): Deprecated second PROT argument.
2895 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2896 Deprecated, reimplemented in terms of scm_make_typed_array and
2897 scm_list_to_typed_array.
2898 (scm_i_proc_make_vector, scm_i_proc_make_string,
2899 scm_i_proc_make_bitvector): Removed.
2900 (type_creator_table, init_type_creator_table, type_to_creator,
2901 make_typed_vector): New.
2902 (scm_i_convert_old_prototype): Removed.
2903 (prototype_to_type): New.
2904 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2905 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2906 minor added clarity.
2907 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2908 instead of scm_make_uve.
2909 (tag_creator_table, scm_i_tag_to_creator): Removed.
2910 (tag_to_type): New.
2911 (scm_i_read_array): Use scm_list_to_typed_array instead of
2912 scm_list_to_uniform_array.
2913
277e8472
MV
29142004-12-27 Marius Vollmer <mvo@zagadka.de>
2915
32b26202
MV
2916 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2917 (scm_bitvector_writable_elements): New.
2918 (scm_bitvector_release, scm_bitvector_release_elements):
2919 Renamed former to latter. Added explicit call to
2920 scm_remember_upto_here_1.
2921 (scm_frame_bitvector_release,
2922 scm_frame_bitvector_release_elements): Renamed former to latter.
2923 (scm_bitvector_release_writable_elements,
2924 scm_bitvector_release_writable_elements): New.
2925 Changed all uses as required by the changes above.
2926
2927 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2928 scm_u8vector_elements, etc): Made return value "const".
2929 (scm_uniform_vector_writable_elements,
2930 scm_u8vector_writable_elements, etc): New.
2931 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2932 Renamed former to latter. Added explicit call to
2933 scm_remember_upto_here_1.
2934 (scm_frame_uniform_vector_release,
2935 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2936 (scm_uniform_vector_release_writable_elements,
2937 scm_frame_uniform_vector_release_writable_elements): New. Takes
2938 crown of longest identifier yet.
2939 Changed all uses as required by the changes above.
2940
277e8472
MV
2941 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2942 void.
2943 (scm_is_vector, scm_vector_p, scm_vector_length,
2944 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2945 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2946 scm_vector_move_left_x, scm_vector_move_right_x,
2947 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2948 (scm_vector_elements, scm_vector_release_elements,
2949 scm_vector_frame_release_elements, scm_vector_writable_elements,
2950 scm_vector_release_writable_elements,
2951 scm_vector_frame_release_writable_elements): New.
2952 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2953 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2954
2955 * ramap.c (scm_ramapc, scm_raeql): Use
2956 scm_c_generalized_vector_length instead of
2957 scm_uniform_vector_length.
2958 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2959 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2960
49c51610
MV
29612004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2962
2963 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2964 member for relocating debug frames.
2965 (scm_make_continuation): Set it.
2966
2967 * stacks.c (read_frame, read_frames, scm_make_stack,
2968 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2969 of continuations instead of calculating the offset ourselves.
2970 Relocate 'vect' member of scm_t_debug_frame.
2971
3b2ee265
KR
29722004-12-16 Kevin Ryde <user42@zip.com.au>
2973
2974 * ramap.c (scm_array_map_x): Check for at least one source argument.
2975
e120686a
KR
29762004-12-14 Kevin Ryde <user42@zip.com.au>
2977
2978 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2979 the C code so for the final call to the predicate procedure is a tail
2980 call, per SRFI-13 spec.
2981
680b5237
KR
29822004-12-10 Kevin Ryde <user42@zip.com.au>
2983
2984 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2985 recent revision to the reference manual.
2986
2987 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2988 with "%", C99 says it's well-defined.
2989
2990 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2991 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2992 bother trying to fit scm_from_ulong, not really worth the trouble if
2993 addresses are more than 4 bytes usually.
2994
446d320c
KR
29952004-11-30 Kevin Ryde <user42@zip.com.au>
2996
2997 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2998 arm32. Reported by Greg Troxel.
2999
f2654760
MV
30002004-11-14 mvo <mvo@zagadka.de>
3001
3002 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
3003
3004 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
3005
d550e35f
MV
30062004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3007
3008 Enclosed arrays are now their own smob. This has been done to
3009 make the code more explicit about them and to prepare for the time
f2654760
MV
3010 when generalized vectors include arbitrary one-dimensional
3011 arrays. (Uptonow, enclosed arrays have been recognized by their
3012 use of an array as their storage 'vector'. When all generalized
3013 vectors are allowed as storage, including one-dimensional arrays,
3014 this will no longer work.)
d550e35f
MV
3015
3016 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
3017 New.
3018 (exactly_one_third, singp): Removed.
3019 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
3020 scm_shared_array_offset, scm_shared_array_increments): Handle
3021 enclosed arrays explicitely.
3022 (scm_array_rank): Likewise. Also, do not return zero for
3023 non-arrays, signal an error instead since arrays with rank zero do
3024 exist.
3025 (scm_i_make_ra): New, for specifying the tag of the new array.
3026 (scm_make_enclosed_array): Use it.
3027 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
3028 (scm_make_shared_array): Use scm_c_generalized_vector_length
3029 instead of scm_uniform_vector_length.
3030 (scm_array_in_bounds_p): Rewritten to be much cleaner.
3031 (scm_i_cvref): New, doing the job of scm_cvref.
3032 (scm_cvref): Use scm_i_cvref.
3033 (scm_array_ref): Do not accept non-arrays when no indices are
3034 given. Use scm_i_cvref to do the actual access.
3035 ("uniform-array-set1"): Do not register.
3036 (scm_array_set_x, scm_uniform_array_read_x,
3037 scm_uniform_array_write): Handle enclosed arrays explicitly.
3038 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
3039 handle enclosed arrays.
3040 (scm_array_to_list): Handle enclosed arrays explicitly.
3041 (rapr1): Removed.
3042 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
3043 enclosed arrays.
3044 (scm_i_print_enclosed_array): New.
3045 (tag_proto_table, tag_creator_table): Renamed former to latter.
3046 Added "a" and "b" for strings and bitvectors, resp.
3047 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
3048 latter. Tag "a" is in the table now, no need to handle it as a
3049 legacy tag.
3050 (scm_raprin1): Just call scm_iprin1.
3051 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
3052 explicitly.
3053 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
3054 Use scm_i_print_array as printer for scm_tc16_array.
3055
2ed34885
MV
30562004-11-10 Marius Vollmer <mvo@zagadka.de>
3057
823086c1
MV
3058 * ramap.c (cind): Changed second arg to be pointer to long instead
3059 of uniform vector.
3060 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 3061 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
3062 (scm_array_index_map_x): Likewise.
3063
3064 * unif.c: Changed all uses of scm_array_prototype to
3065 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
3066 prototype is known.
3067 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
3068 in terms of scm_uniform_vector_read_x and
3069 scm_uniform_vector_write, respectively. Strings and
3070 bitvector support has been dropped.
3071
2ed34885
MV
3072 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
3073 needed files directly. Include config.h, <unistd.h> and <io.h>
3074 when available.
3075 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
3076
2c72f253
MV
30772004-11-09 Marius Vollmer <mvo@zagadka.de>
3078
3079 * gh_data.c (gh_uniform_vector_length): Properly use
3080 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
3081
3cc0a296
MV
30822004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3083
3084 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
3085 New.
3086 (scm_i_uniform_vector_creator): Removed.
3087 (scm_i_generalized_vector_creator): New.
3088 (scm_uniform_vector_length, scm_uniform_element_size): Do not
3089 handle generalized vectors, only uniform numeric vectors.
3090 (alloc_uvec): Do length check here...
3091 (make_uvec): ...but not here.
3092 (coerce_to_uvec): Use new generalized vector functions to handle
3093 all kinds of vectors in one go.
3094
3095 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
3096 remaining scm_tc7_unused tags to get a neatly ordered list.
3097
3098 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
3099 longer handle scm_tc7_bvect bitvectors.
3100
3101 * ramap.c: Use the new generalized vector functions to handle all
3102 vector like things.
3103
3104 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
3105 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
3106 scm_generalized_vector_length, scm_generalized_vector_ref,
3107 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
3108 scm_is_generalized_vector, scm_c_generalized_vector_length,
3109 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
3110 New.
3111
3112 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
3113 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
3114 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
3115 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
3116 scm_c_bitvector_length, scm_c_bitvector_ref,
3117 scm_c_bitvector_set_x, scm_bitvector_elements,
3118 scm_bitvector_release, scm_frame_bitvector_release,
3119 scm_tc16_bitvector, bitvector_free, bitvector_print,
3120 bitvector_equalp, count_ones, find_first_one): New.
3121 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
3122 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
3123 using the new C API for bitvectors and maybe count_ones or
3124 find_first_one, as appropriate.
3125 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
3126 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
3127 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
3128 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
3129 new functions from above.
3130 (scm_i_proc_make_vector, scm_i_proc_make_string,
3131 scm_i_proc_make_bitvector): Made non-static for use in
3132 scm_i_generalized_vector_creator.
3133 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
3134 (scm_make_uve): Validate that the created object is a generalized
3135 vector.
3136 (scm_i_legacy_tag): Removed.
3137 (scm_i_print_array): Do it here.
3138 (scm_raprin1): Only print enclosed arrays.
3139
3140 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
3141
c24d026b
MV
31422004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3143
1f2328fe
MV
3144 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
3145 added portability.
3146
3147 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
3148 for "space". Thanks to Bruce Korb!
3149
c24d026b
MV
3150 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
3151 only after dest has been set. Thanks to Hyper Division!
3152
3153 * gh_data.c (gh_uniform_vector_length): Use
3154 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
3155
d4ea47c8
MV
31562004-11-03 Marius Vollmer <mvo@zagadka.de>
3157
3158 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
3159 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
3160 SCM_SET_UVECTOR_LENGTH): Removed.
3161
236288e2
MV
31622004-11-02 Marius Vollmer <mvo@zagadka.de>
3163
9a5fa6e9 3164 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
3165 Thanks!
3166
3167 * backtrace.c (scm_display_backtrace_with_highlights): Join the
3168 first and the second line of the SCM_DEFINE macro call, since old
3169 preprocessors cannot handle definitions that are split into two
3170 lines.
3171
3172 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
3173 declarations.
3174
3175 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
3176 scm_t_uint32 to fix the mismatch between the function declaration
3177 and definition.
3178
3179 * sort.c (quicksort): Don't use C99 variable declarations.
3180
3181 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
3182 SCM_BOOL_F if no type matches.
3183
3184 * threads.c (thread_print): Cast a pointer to size_t when printing
3185 with scm_uintprint.
3186
3187 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
3188 defined.
3189 (scm_array_prototype): Deprecated.
3190
f738b51d
MV
31912004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3192
5d1015ec
MV
3193 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
3194 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
3195 more efficient access to the u32vector.
3196
034486df
MV
3197 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
3198 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
3199 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
3200
3201 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
3202 instead of the old-style dvectors.
3203
3204 * gh_data.c: Use new-style uniform arrays in place of old-style
3205 ones.
3206
3207 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3208 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3209
3210 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3211 instead of old-sytle uvectors.
3212
3213 * convert.c, convert.i.c: Rewritten completely, using
3214 scm_any_to_u8vector, etc and other new-style uniform vector
3215 functions.
3216
3217 * random.c (scm_random_solid_sphere_x,
3218 scm_random_hollow_sphere_x): Do not validate vector argument, this
3219 is already done elsewhere.
3220
3221 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3222 scm_any_to_u8vector, etc): New.
3223 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3224 longer handle old-style uniform vectors.
3225
f738b51d
MV
3226 * read.c (scm_lreadr): Bugfix: include the last bit in the
3227 bit vector.
3228
5e9c05a1
MV
32292004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3230
327114a2
MV
3231 * unif.h, unif.c (scm_array_creator): New.
3232 (scm_i_get_old_prototype): New.
3233 (scm_array_prototype): use it to return old-style prototype, never
3234 return creators.
3235 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3236 arg of SCM_UNDEFINED. The latter is wrong.
3237
5e9c05a1
MV
3238 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3239 (make_uve): Removed.
3240 (scm_i_proc_make_vector, scm_i_proc_make_string,
3241 scm_i_proc_make_u1vector): New.
3242 (scm_init_unif): Initialize them.
3243 (scm_i_convert_old_prototype): New.
3244 (scm_make_uve): Use it to get the creator procedure. Removed all
3245 old code that created old-style uniform vectors.
3246 (scm_array_p): Handle generic vectors.
3247 (scm_dimensions_to_uniform_array): Do not fill new array with
3248 prototype when that is a procedure.
3249 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3250 the NDIM argument.
3251 (scm_i_print_array): Print rank for shared or non-zero-origin
3252 vectors.
3253 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3254 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3255 which I do not understand yet.
3256 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3257
5e9c05a1
MV
3258 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3259 (iflo2str): Use icmplx2str for complex numbers.
3260
3261 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3262 scm_i_uniform_vector_prototype): Removed.
3263 (scm_i_uniform_vector_creator): New.
3264 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3265 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3266 Updated all tables and generic functions to support them.
3267 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3268 (scm_init_srfi_4): Initialize them.
3269
3270 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3271 sizeof(CTYPE) as explained in the comment.
3272
3273 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3274 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3275 'i' and 'e' between introducing numbers and uniform vectors. Do
3276 not call scm_i_read_homogenous_vector, since that is also handled
3277 by scm_i_read_array now.
3278
f984af07
MV
32792004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3280
3281 First cut at integrating uniform vectors from srfi-4 with the rest
3282 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3283 vector. The plan is to gradually replace one type after the other
3284 until none is left and then to consider general cleanups and
3285 optimizations.
3286
3287 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3288
3289 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3290 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3291 scm_uniform_vector_to_list, scm_is_uniform_vector,
3292 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3293 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3294 scm_uniform_vector_release): New.
3295 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3296 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3297 from unif.h, unif.c and extended to handle both the old and new
3298 uniform vectors.
3299
3300 * tags.h (scm_tc7_byvect): Commented out.
3301
3302 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3303 the former to the latter.
3304 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3305 srfi-4.h, srfi-4.c.
3306 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3307 (scm_array_p, scm_array_rank, scm_array_dimensions,
3308 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3309 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3310 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3311 vectors. Removed code for scm_tc7_byvect.
3312 (scm_dimensions_to_uniform_array): Fill array with 0 when
3313 prototype is #\nul.
3314 (scm_i_print_array_dimension, scm_i_legacy_tag,
3315 scm_i_print_array): New.
3316 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3317 for scm_tc7_byvect.
3318
3319 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3320 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3321 uniform vectors. Removed code for scm_tc7_byvect
3322
3323 * print.c (iprin1): Removed code for scm_tc7_byvect.
3324 * objects.c (scm_class_of): Likewise.
3325 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3326 * gc-card.c (scm_i_sweep_card): Likewise.
3327 * evalext.c (scm_self_evaluating_p): Likewise.
3328 * eq.c (scm_equal_p): Likewise.
3329
3330 * gh_data.c (gh_chars2byvect): Reimplemented with
3331 scm_make_s8vector.
3332 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3333
3334 * srfi-4.c (take_uvec): New.
3335 (alloc_uvec): Use it.
3336 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3337
3338 * random.c (vector_scale, vector_scale_x): Renamed former to the
3339 latter, since it modifies its argument.
3340 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3341 Do not use scm_universal_vector_length for non-uniform vectors.
3342 Use scm_f64vector_elements to access innards of uniform vectors.
3343
3344 * convert.i.c: Convert srfi-4 style uniform vectors when
3345 requested.
3346 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3347 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3348
79d52182
MV
33492004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3350
3351 * numbers.h, numbers.c (scm_i_print_double): New.
3352
3353 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3354 ../srfi/ but heavily modified.
3355 * Makefile.am: Add them in all the right places.
3356 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3357 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3358 '#u', and '#s'.
3359
3360 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3361 and made non-static. Changed all uses.
3362
6191ccec
MV
33632004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3364
e64e80b0
MV
3365 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3366 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3367 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3368 scm_uintprint to print unsigned integers, raw heap words, and
3369 adresses, using a cast to scm_t_bits to turn pointers into
3370 integers.
3371
3372 * unif.c: Include "libguile/print.h".
3373
c90ac3a8
MV
3374 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3375 scm_t_intmax values.
3376 (scm_uint2str): New, for scm_t_uintmax.
3377 (scm_iint2str): Argument type changed to scm_t_intmax,
3378 reimplemented in terms of scm_uint2str.
3379
3380 * print.c, print.h (scm_uintprint): New, for printing
3381 scm_t_uintmax values.
3382 (scm_intprint): Argument type changed to scm_t_intmax.
3383
77c2594f
MV
3384 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3385 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3386 strategic places so that the loops can be interrupted.
3387
6191ccec
MV
3388 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3389 "-I$(top_srcdir)/libguile-ltdl".
3390 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3391 "../libguile-ltdl/libguile-ltdl.a".
3392
3393 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3394 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3395 instead of <libguile-ltdl.h>.
3396
77600f3e
MV
33972004-10-20 Marius Vollmer <mvo@zagadka.de>
3398
3399 * sort.c (quicksort): Copy pivot out of the array while
3400 constructing the partitions; it could get overwritten otherwise.
3401 Because of the ultimate insertion sort, this bug did not cause
3402 quicksort to fail, it just put all the burdon on the insertion
3403 sort and was thus very slow. Thanks to Rolan Orre for reporting
3404 the slowness!
3405
5000379b
MV
34062004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3407
192cd792
MV
3408 * numbers.c (scm_i_range_error): New.
3409 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3410 scm_out_of_range.
3411
3412 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3413 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3414
3415 * unif.c (scm_array_p): When no prototype is given, explicitely
3416 test for allowable types, do not simply return true. Thanks to
3417 Roland Orre for reporting this!
3418
5000379b
MV
3419 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3420
3421 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3422 segment to scm_max_segment_size.
3423
497eb0b7
HWN
34242004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3425
1367aa5e
HWN
3426 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3427
497eb0b7
HWN
3428 * inline.h (scm_double_cell): abort if GC running.
3429 (scm_cell): idem.
3430
aef0bdb4
MV
34312004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3432
3433 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3434 pos == 0.
3435
3436 Keywords no longer store a 'dash symbol'. Instead, they store a
3437 symbol with their real name.
3438
3439 * keywords.h, keywords.c, deprecated.h, deprecated.c
3440 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3441 terms of scm_is_keyword and scm_keyword_dash_symbol.
3442
3443 * keywords.h, keywords.c, discouraged.h, discouraged.c
3444 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3445 scm_c_make_keyword): Discouraged.
3446
3447 * keywords.h, keywords.c (scm_symbol_to_keyword,
3448 scm_keyword_to_symbol): Implemented in C.
3449 (scm_is_keyword, scm_from_locale_keyword,
3450 scm_from_locale_keywordn): New.
3451
3452 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3453
3454 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3455 scm_from_locale_keyword instead of scm_c_make_keyword.
3456
3457 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3458 better error message.
3459
3460 * deprecated.c: Include discouraged.h and keywords.h.
3461
3462 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3463 reading '#:' or ':'. See NEWS for consequences.
3464
818deb11
MV
34652004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3466
43c25626
MV
3467 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3468 literals are now read-write again (until SCM_STRING_CHARS is
3469 removed).
3470
3471 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3472 strings with an error message that blames SCM_STRING_CHARS.
3473
3474 * options.c (change_option_setting): Use scm_car instead of
3475 explicit type check plus SCM_CAR.
3476
3477 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3478 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3479 (scm_iprin1): Use them instead of the previoulsy hardcoded
3480 strings.
3481 (scm_init_print): Initialize them.
3482
3483 * backtrace.c (display_frame_expr): Do not remove control
3484 characters from the final string. Print it directly using
3485 scm_display.
3486
818deb11
MV
3487 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3488 Thanks to Roland Orre!
3489
d748089e
KR
34902004-09-29 Kevin Ryde <user42@zip.com.au>
3491
3492 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3493 be whole original string in match struct, not offsetted substring.
3494
0ff7e3ff
HWN
34952004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3496
3497 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3498
ad7de4b8
MV
34992004-09-24 Marius Vollmer <mvo@zagadka.de>
3500
2edf319f
MV
3501 * Makefile.am (EXTRA_DIST): Added gettext.h.
3502
d180337b
MV
3503 * smob.c, smob.h (scm_assert_smob_type): New.
3504
05d7cf89 3505 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3506 Include GUILE_CFLAGS.
3507 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3508 now.
3509 (libpath.h): Put GUILE_CFLAGS in the build-info.
3510
c9fedf8a
MV
35112004-09-23 Marius Vollmer <mvo@zagadka.de>
3512
3513 * print.h (scm_print_state): Added highlight_objects.
3514 * print.c (make_print_state, scm_free_print_state): Initialize it
3515 to SCM_EOL.
3516 (scm_iprin1): Wrap output in '{...}' when object is contained in
3517 highlight_objects.
3518
3519 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3520 scm_backtrace_with_highlights): New. Set highlight_objects of
3521 printstate.
3522
3523 * error.c (scm_error_scm): Document new meaning of data/rest
3524 argument for out-of-range and wrong-type-arg errors.
3525 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3526 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3527 exception so that it gets highlighted in the backtrace.
3528 Don't talk about "argument" when not giving a position.
3529
3530 * throw.c (handler_message): The rest argument is the fourth
3531 argument, not everything after the third. Call
3532 scm_display_backtrace_with_highlights, passing the rest argument
3533 when appropriate.
3534
d5ac9b2a
MV
35352004-09-22 Marius Vollmer <mvo@zagadka.de>
3536
3537 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3538 <bruno@clisp.org>:
3539
3540 * i18n.c: Handle --disable-nls (thanks Bruno).
3541
3542 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3543 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3544
3545 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3546 LC categories.
05d7cf89 3547 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3548
3549 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3550 scm_bind_textdomain_codeset): Make wrappers similar to C function
3551 they wrap.
3552
3553 * i18n.h: New file.
3554 * i18n.c: New file.
3555 * gettext.h: New file, taken from GNU gettext.
3556 * init.c: Include libguile/i18n.h.
3557 (scm_init_guile_1): Add call to scm_init_i18n().
3558 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3559 (DOT_X_FILES): Add i18n.x.
3560 (DOT_DOC_FILES): Add i18n.doc.
3561 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3562 (modinclude_HEADERS): Add i18n.h.
3563
d2e53ed6
MV
35642004-09-22 Marius Vollmer <mvo@zagadka.de>
3565
2cdfe016
MV
3566 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3567
d2e53ed6
MV
3568 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3569 discouraged.h. Replaced all uses with scm_is_pair.
3570 (SCM_I_CONSP): New name for SCM_CONSP.
3571
3572 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3573 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3574 scm_cadr, etc): New.
3575 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3576 uses with scm_is_null.
5dd82006 3577
d2e53ed6
MV
3578 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3579 instead of explicit code.
5dd82006 3580
5dfdf243
MV
35812004-09-22 Marius Vollmer <mvo@zagadka.de>
3582
b50c53e5
MV
3583 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3584 Reworded logic a bit so that #f is returned immediately when s1 is
3585 too short to contain s2.
3586
5dfdf243 3587 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3588 zero-terminated locale string before matching against it.
5dfdf243
MV
3589
3590 * strings.h, strings.c (scm_substring_read_only,
3591 scm_c_substring_read_only, scm_i_substring_read_only): New.
3592 (RO_STRING_TAG, IS_RO_STRING): New.
3593 (scm_i_string_writable_chars): Bail on read-only strings.
3594
3595 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3596 literals, thus making them read-only as specified by R5RS.
3597
22ab5ba3
MV
35982004-09-22 Marius Vollmer <mvo@zagadka.de>
3599
3600 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3601 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3602
2663421c
MV
36032004-09-21 Marius Vollmer <mvo@zagadka.de>
3604
0d83cb90
MV
3605 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3606 numbers.c.
3607 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3608 Thanks to Andreas Vögele!
0d83cb90 3609
2663421c
MV
3610 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3611 just on a line of its own.
3612
3613 * srfi-13.c (scm_string_any, scm_string_every,
3614 scm_string_tabulate, string_upcase_x, string_down_case_x,
3615 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3616 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3617 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3618 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3619 indices, which can also be negative.
3620
b00b73f9
MV
36212004-09-20 Marius Vollmer <mvo@zagadka.de>
3622
3623 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3624
3625 * threads.c (scm_threads_mark_stacks): Call
3626 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3627 only used once.
3628
adba74f3
HWN
36292004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3630
05d7cf89 3631 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3632 Bugfix: when subtracting unsigned values, make sure that result
3633 does not wrap.
3634
f6de32c8
KR
36352004-09-09 Kevin Ryde <user42@zip.com.au>
3636
3637 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3638 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3639 by Andreas Vögele.
f6de32c8 3640
e548be5f
MV
36412004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3642
eb8d0af1
MV
3643 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3644
e548be5f
MV
3645 * eq.c (real_eqv): Pretend that all NaNs are equal.
3646
3647 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3648
e7acba81
MV
36492004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3650
874fbad1
MV
3651 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3652 use size_t for some locals instead of int.
3653
e7acba81
MV
3654 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3655 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3656 (skip_scsh_block_comment): Use scm_input_error instead of
3657 scm_misc_error in case of EOF.
3658
5de12658
KR
36592004-09-07 Kevin Ryde <user42@zip.com.au>
3660
3661 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3662 Bug report by Bill Schottstaedt.
3663
3664 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3665 column.
3666 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3667
3668 * posix.c (scm_access): Update docstring per manual.
3669
3670 * posix.c (scm_nice): Correction to error detection. Reported by
3671 Matthias Koeppe.
3672
3673 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3674 throw error before unlocking mutex with SCM_ALLOW_INTS.
3675
e227addf
KR
36762004-09-06 Kevin Ryde <user42@zip.com.au>
3677
3678 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3679 available. This also gets around CLK_TCK being absent when
3680 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3681
edea856c
SJ
36822004-09-03 Stefan Jahn <stefan@lkcc.org>
3683
3684 * threads.c (scm_threads_mark_stacks): Fixed local variable
3685 definitions.
3686
e7acba81 3687 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3688 local variable definitions.
3689
3690 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3691 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3692 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3693 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3694 scm_makfrom0str().
3695
874fbad1 3696 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3697 part.
3698
3699 * numbers.c (scm_init_numbers): Removed check_sanity() call
3700 inside GUILE_DEBUG. The function has been removed somewhen...
3701
3702 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3703 MinGW32 because it conflicts with its pthread headers.
3704
d9eb2d67
MV
37052004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3706
3707 * strings.c (SCM_STRINGP): Accept all strings.
3708 (SCM_STRING_CHARS): Reject shared substrings here.
3709
3710 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3711 the Copyright years.
3712
c495c342
KR
37132004-08-27 Kevin Ryde <user42@zip.com.au>
3714
3715 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3716 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3717 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3718
57aa5515
MV
37192004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3720
3721 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3722 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3723 scm_i_symbol_is_interned, scm_i_mem2symbol,
3724 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3725
ce25760f
MV
37262004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3727
19ff6ffc
MV
3728 * srfi-13.c: First cut at thread-safeness and proper use of
3729 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3730 been inserted. Made sure that no internal string pointer is used
3731 across a SCM_TICK or a possible GC.
3732
ce25760f
MV
3733 * script.c (scm_compile_shell_switches): Use
3734 scm_from_locale_string instead of scm_makfrom0str.
3735
3736 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3737 always been.
3738
c5080b51
MV
37392004-08-25 Marius Vollmer <mvo@zagadka.de>
3740
3741 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3742 strop.c.
3743
3744 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3745 * strop.h, strop.c: Removed, they are now empty.
3746 * Makefile.am: Updated for new and removed files.
3747
3748 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3749 to scm_string_to_symbol.
3750
3751 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3752 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3753 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3754 charset instead of libc functions.
3755
3756 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3757 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3758 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3759 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3760 instead of explicit code.
3761
3762 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3763 "srfi-13.h" instead of "strop.h".
3764
3765 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3766 scm_init_srfi_14. Do not call scm_init_strop.
3767
4b0d27f2
MV
37682004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3769
3770 * numbers.c (scm_inf_p): Synced docstring back from manual.
3771
3ece39d6
MV
37722004-08-22 Marius Vollmer <mvo@zagadka.de>
3773
3774 * strings.c (get_str_buf_start): New helper function.
3775 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3776 scm_i_string_char, scm_i_string_writable_chars): Use it.
3777 (scm_i_substring_copy): Make START argument optional for C
3778 callers, for upcoming SRFI-13 integration.
3779
37802004-08-21 Marius Vollmer <mvo@zagadka.de>
3781
3782 From Richard Todd, Thanks!
3783
3784 * script.c (scm_compile_shell_switches): added '-L' switch to add
3785 to the %load-path.
3786
5fa0939c
DH
37872004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3788
3789 * eval.c (unmemoize_exprs): When dropping internal body markers
3790 from the output during unmemoization, also drop those that are not
3791 immediately at the beginning of a body.
3792
2146fdeb
MV
37932004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3794
c1f54b3d
MV
3795 * eval.c (scm_lookupcar1): Report "Variable used before given a
3796 value" insetad of an "Unbound" one for variables that are found
3797 but still contain SCM_UNDEFINED.
2146fdeb
MV
3798
3799 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3800 expects a null-terminated string in the locale encoding, but
3801 scm_i_string_writable_chars doesn't give that. Fixed by letting
3802 mkstemp modify a locale version of the tmpl argument and copying
3803 the result back into tmpl.
3804
3805 * strop.c (scm_substring_move_x): Store into str2, not str1.
3806
d4f76919
KR
38072004-08-20 Kevin Ryde <user42@zip.com.au>
3808
3809 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3810 to modify the input string.
3811
b5247a6b
MV
38122004-08-19 Marius Vollmer <mvo@zagadka.de>
3813
3814 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3815 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3816 scm_c_symbol_length.
3817
f26b9395
MV
38182004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3819
3820 New string implementation, with copy-on-write strings and
3821 mutation-sharing substrings, and a new internal string API.
3822 Symbols can now share memory with strings.
3823
3824 * tags.h (scm_tc7_stringbuf): New tag.
3825
3826 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3827 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3828 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3829 uses.
3830 (scm_i_make_string, scm_c_make_string): New, to replace
3831 scm_allocate_string. Updated all uses.
3832 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3833 SCM_STRING_LENGTH): Deprecated.
3834 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3835 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3836 Discouraged. Replaced all uses with scm_from_locale_string or
3837 similar, as appropriate.
3838 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3839 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3840 scm_substring_shared, scm_substring_copy): New.
3841
3842 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3843 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3844 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3845 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3846 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3847 Deprecated.
3848 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3849 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3850 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3851 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3852 Updated all uses.
3853 (scm_gensym): Generate only the number suffix in the buffer, just
3854 string-append the prefix.
3855
3856 * error.c (scm_memory_error): Do not try to throw, just abort.
3857 Throwing will not work anyway.
3858
3859 * gh.h, gh-data.c (gh_set_substr): Made src const.
3860
3861 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3862 (scm_mode_bits): Use it.
3863 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3864 a vector normally and fill that instead of consing a list with a
3865 blocked GC.
3866
3867 * read.c (scm_i_casei_streq): New, for counted strings.
3868
3869 * threads.c (gc_section_count): Removed, thread-sleeping can not
3870 be nested.
3871 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3872 admin mutex so that we can be put to sleep by other threads while
3873 blocking on that mutex. Lock all the heap mutex of all threads,
3874 including ourselves.
3875 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3876 call scm_i_enter_guile.
3877 (scm_thread_mark_stacks): Expect all threads to be suspended.
3878
3879 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3880 scm_gc_mallocated, for now.
3881 (scm_init_storage): Initialize it.
3882 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3883
3884 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3885 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3886 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3887 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3888
cd505b38
MV
3889 * strop.c (scm_string_copy): Use scm_c_substring to get a
3890 copy-on-write string.
3891
8a807b26
KR
38922004-08-18 Kevin Ryde <user42@zip.com.au>
3893
3894 * arbiters.c (FETCH_STORE): New macro.
3895 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3896 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3897 scm_try_arbiter and scm_release_arbiter.
3898 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3899 for speed on i386, otherwise using mutex.
3900
3901 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3902 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3903 exact and inexact is #f.)
3904
3905 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3906 to get thread safety of scm_ttyname.
3907
3908 * ports.c (ttyname): Remove prototype, unused.
3909
d6cd4c36 3910 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3911 Reported by Michael Tuexen.
d6cd4c36 3912
fa0c0a4b
MV
39132004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3914
3915 * load.c (scm_init_load_path): Do not pass NULL to
3916 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3917 not set. Thanks to Bill Schottstaedt.
3918
70f7ee41
MV
39192004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3920
3921 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3922 locale strings instead of accessing their internals.
3923 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3924 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3925 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3926
3927 * simpos.c (scm_system): Convert SCM strings to locale strings
3928 instead of accessing their internals.
3929
3930 * script.c (scm_compile_shell_switches): Convert version to locale
3931 string before printing it.
3932
3933 * rdelim.c (scm_read_delimited_x): Avoid
3934 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3935 of scm_from_long for the returned number of read characters.
3936
3937 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3938 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3939
3940 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3941 Use them instead of SCM_SYSCALL when one or two strings need to be
3942 converted into locale strings.
3943 (my_rename): New, gathers platform dependent code for renaming.
3944 (scm_rename): Use it.
3945 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3946 strings instead of accessing their internals.
3947 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3948 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3949 SCM_STRING_LENGTH.
3950
3951 * extensions.c (load_extension): Convert lib and init to locale
3952 strings instead of accessing the internals directly.
3953 (scm_c_load_extension): Use scm_from_locale_string instead of
3954 scm_makfrom0str.
3955
3956 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3957 scm_fdes_to_port, but take mode bits directly instead of as a C
3958 string.
3959 (scm_i_fdes_to_port): Implement using above.
3960 (scm_open_file): Use scm_i_fdes_to_port together with
3961 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3962 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3963 with scm_i_mode_bits to avoid accessing internals of SCM string
3964 from C.
3965
3966 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3967 SCM string as argument.
3968
3969 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3970 bits directly instead of C string.
3971 (scm_void_port): Implement using above.
3972 (scm_sys_make_void_port): Use scm_i_void_port together with
3973 scm_i_mode_bits to avoid accessing internals of SCM string.
3974
3975 * strings.h, strings.c (scm_i_get_substring_spec): New.
3976
3977 * socket.c, rw.c, deprecated.h, validate.h
3978 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3979 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3980 scm_to_locale_string, etc.
3981 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3982 above, plus scm_i_get_substring_spec.
3983
3984 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3985 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3986 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3987 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3988 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3989 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3990 with more explicit scm_remember_upto_here_1, etc, or introduced
3991 them in the first place.
3992
3993 * posix.c (WITH_STRING): New helper macro. Use it where one
3994 locale string is needed for a short piece of code.
3995 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3996 when one locale string is needed.
3997 (scm_mkstemp): Convert tmpl to a locale string.
3998 (scm_putenv): Rewritten to use only C strings.
3999 (scm_setlocale, scm_crpt): Convert argument strings to locale
4000 strings.
4001
40022004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4003
4004 * load.c (scm_primitive_load_path): Do not check for absolute
4005 filenames when scm_sys_search_load_path returns false, which will
4006 return absolute filenames unchanged.
4007
bb26cc2d
MV
40082004-08-11 Marius Vollmer <mvo@zagadka.de>
4009
4010 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
4011 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
4012 of an alist. Thanks to Matthias Koeppe!
4013
02573e4c
MV
40142004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4015
4016 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
4017 Moved from string.h to deprecated.h.
4018
4019 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
4020
f9751e86 4021 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
4022 SCM_I_MAKE_STRING_TAG, changed all uses.
4023 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
4024 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
4025 respectively. For a short time, the old names are still there as
4026 aliases. Not all uses have been changed yet, but the ones in
4027 strings.c have.
4028 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
4029 SCM_T_BITS_MAX.
4030 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
4031 scm_take_locale_string, scm_take_locale_stringn,
4032 scm_to_locale_string, scm_to_locale_stringn,
4033 scm_to_locale_stringbuf): New.
4034 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
4035 deprecated.[hc]. Implemented in terms of the new functions above.
4036 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
4037 scm_makfrom0str): Reimplemented in terms of the new functions from
4038 above. They will be discouraged shortly.
4039 (scm_substring): Do not use scm_mem2string.
4040 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
4041 to replace similar code from posix.c, simpos.c, and dynl.c.
4042 (scm_string_append): Use memcpy instead of explicit loop. Do not
4043 use register keyword. Use plain 'char' instead of 'unsigned
4044 char'.
4045
4046 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
4047 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
4048
4049 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
4050 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4051 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
4052 not as a pointer. Use scm_remember_upto_here_1 to protect it.
4053
4054 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
4055 string. This avoids a conversion round-trip.
4056
4057 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
4058 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4059 SCM_I_STRING_LENGTH, respectively.
4060 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
4061
4062 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
4063 of a string, call scm_display on the string itself.
4064
4065 * dynwind.c, dynwind.h (scm_frame_free): New.
4066
4067 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
4068 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
4069 Replaced uses of SCM_STRING_CHARS with proper uses of
4070 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
4071 Replaced scm_mem2string with scm_from_locale_string.
4072
4073 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
4074 Removed, replaced all uses with scm_i_allocate_string_pointers.
4075
4076 * load.h, load.c (scm_internal_parse_path): Removed.
4077 (scm_parse_path): Use scm_string_split to do the work.
4078 (scm_init_load_path): Use scm_parse_path instead of
4079 scm_internal_parse_path.
4080 (scm_search_path): Rewritten string handling part of the code in
4081 terms of scm_to_locale_stringbuf and so that it is thread safe.
4082
4083 * error.c (scm_error_scm): Throw directly instead of calling
4084 scm_error, this avoids the back and forth conversion of SUBR and
4085 MESSAGE and also plugs a memory leak.
4086 (scm_error): Call scm_error_scm.
4087
4088 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
4089 (display_header): Print FNAME when it is true, not
4090 merely when it is a string.
4091
4092 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
4093 unceremoniously. They were unused by Guile itself, and external
4094 use should stop immediately.
4095
4096
409eb4e5
MV
40972004-08-10 Marius Vollmer <mvo@zagadka.de>
4098
4099 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
4100 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
4101 deprecated versions installed in deprecated.h and deprecated.c.
4102 Changed all uses.
4103
a00eaf19
RB
41042004-08-06 Rob Browning <rlb@defaultvalue.org>
4105
4106 * net_db.c (scm_resolv_error): don't cause an exception while
4107 trying to throw an exception -- call scm_misc_error with correct
4108 arguments. The previous arguments needed a format escape that
4109 wasn't in any of the format strings.
4110
bcb88c93
KR
41112004-08-06 Kevin Ryde <user42@zip.com.au>
4112
8f094b97
KR
4113 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
4114 so as not to depend on signedness of plain char. For byvect range
4115 check, throw out-of-range rather than wrong-type-arg.
4116
bcb88c93
KR
4117 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
4118 signed byte range checks by using scm_to_schar and scm_from_schar,
4119 don't want to depend on signedness of C char.
4120
29e61124
KR
41212004-08-05 Kevin Ryde <user42@zip.com.au>
4122
4123 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
4124 SCM_DEFER_INTS.
4125 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
4126 guaranteed if multiple threads compete to unlock.
4127 Update docstrings per doc/ref/api-scheduling.texi.
4128
99de794f
KR
4129 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
4130 stat on the filename, to be certain a file rename can't mean we get
4131 info on one filesystem object but open another. This fstat usage is
4132 similar to Emacs copy-file.
4133
29e61124
KR
4134 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
4135
4136 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
4137 SIGINT and SIGQUIT, since those values are ints.
4138
759aa8f9
MV
41392004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4140
7241f213
MV
4141 * num2integral.i.c, num2float.i.c: Removed.
4142 * Makefile.am (noinst_HEADERS): Updated.
4143
f9656a9f
MV
4144 * numbers.h. numbers.c (scm_make_ratio): Renamed to
4145 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
4146 (scm_complex_p): New, export as "complex?" to Scheme.
4147 (scm_number_p): Export as "number?" to Scheme.
4148 (scm_is_complex, scm_is_number): New.
4149 (scm_c_make_rectangular, scm_c_make_polar): New.
4150 (scm_make_rectangular, scm_make_polar): Use above.
4151 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
4152 New.
4153 (scm_make_complex): Discouraged by moving to discouraged.h and
4154 discouraged.c. Replaced all uses with scm_c_make_rectangular.
4155
759aa8f9
MV
4156 * discouraged.h, discouraged.c, numbers.c, numbers.h
4157 (scm_is_rational): New.
4158 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
4159 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
4160 Removed prototypes.
4161 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
4162 Discouraged by moving to discouraged.h and discouraged.c.
4163 Replaced all uses with scm_from_double.
4164 (scm_num2float, scm_num2double): Discouraged by moving prototype
4165 to discouraged.h and rewriting in terms of scm_to_double.
4166 Replaced all uses with scm_to_double.
4167 (scm_to_double): Do not implement in terms of scm_num2dbl, use
4168 explicit code.
4169 (scm_from_double): Do not implement in terms of scm_make_real, use
4170 explicit code.
4171
531bf3e6
MV
41722004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4173
759aa8f9
MV
4174 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
4175
531bf3e6
MV
4176 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
4177 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
4178
4179 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
4180 Renamed to SCM_I_* in order to avoid collisions with the versions
4181 defined in deprecated.h.
4182
4183 * discouraged.h, discouraged.c: New files.
4184
4185 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
4186 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
4187 deprecated to being discouraged by moving to discouraged.h.
4188
4189 * numbers.h, numbers.c, discouraged.h, discouraged.c
4190 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
4191 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
4192 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
4193 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
4194 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
4195 scm_num2ulong_long): Discouraged by moving to discouraged.h and
4196 discouraged.c and reimplementing in terms of scm_from_* and
4197 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
4198 functions.
4199
4200 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
4201 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
4202 scm_i_size2big, scm_i_ptrdiff2big): Removed.
4203 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
4204 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4205 explicit code.
4206
5ec82e96
KR
42072004-08-02 Kevin Ryde <user42@zip.com.au>
4208
4209 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4210 and current usage and migration.
4211
58f28989
KR
42122004-07-31 Kevin Ryde <user42@zip.com.au>
4213
4214 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4215 it's not thread safe.
4216 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4217 advantage of this.
4218 * fports.c (scm_open_file): Use scm_strerror likewise.
4219 * filesys.c (scm_stat, scm_lstat): Ditto.
4220
4221 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4222 cannot be opened.
4223
4224 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4225 update, for thread safety.
4226 (gensym_counter): Move into scm_gensym which is its only user.
4227 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4228
03696aab
MV
42292004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4230
51fdb325
MV
4231 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4232 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4233 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4234 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4235 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4236 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4237 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4238 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4239 defined in terms of scm_to_signed_integer, etc, but in terms of
4240 scm_to_int8, etc.
4241
4242 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4243
03696aab
MV
4244 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4245 no longer used.
4246
4247 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4248 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4249
4250 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4251 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4252 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4253 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4254 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4255 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4256 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4257
4258 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4259 the functions below.
4260
4261 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4262 conv-uinteger.i.c.
4263
4264 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4265 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4266 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4267 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4268 scm_from_uint64): Turned from macros into proper functions.
4269 (scm_to_signed_integer, scm_to_unsigned_integer,
4270 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4271 conv-integer.i.c and conv-uinteger.i.c, as well.
4272
4273 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4274 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4275 the limits. Those are always defined.
4276
1f15779e
KR
42772004-07-29 Kevin Ryde <user42@zip.com.au>
4278
4279 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4280
48360eb3
KR
42812004-07-28 Kevin Ryde <user42@zip.com.au>
4282
4283 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4284 safety.
4285
c3f3c841
KR
4286 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4287 consistency with other vector types and to get arg and func name into
4288 error message.
4289
c82f8ed6
MV
42902004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4291
4292 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4293 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4294 scm_from_bool, respectively.
4295 (SCM_NINUMP): Added.
4296
4297 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4298 deprecated.h. Replaced all uses with scm_is_eq.
4299
317b4c4a
KR
43002004-07-24 Kevin Ryde <user42@zip.com.au>
4301
4302 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4303 * posix.c (scm_crypt): Use it to protect static data in crypt().
4304
e11e83f3
MV
43052004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4306
4307 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4308 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4309 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4310 versions to deprecated.h and deprecated.c. Changed all uses to
4311 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4312 scm_from_*, as appropriate.
4313
4314 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4315 the unexisting scm_cross_dynwind_binding_scope for inums on the
4316 windlist.
4317
a55c2b68
MV
43182004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4319
4320 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4321 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4322 byte-wise address to a SCM integer. Changed all uses.
4323 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4324 scm_to_ipv6 and added type and range checking, for converting from
4325 an IPv& byte-wise address to a SCM integer. Changed all uses.
4326 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4327 is now done by scm_to_ipv6.
4328
4329 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4330 not accept inexact integers.
4331
4332 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4333 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4334 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4335 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4336 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4337 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4338 fixnum/bignum distinction visible. Changed all uses to
4339 scm_to_size_t or similar.
4340
43412004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4342
4343 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4344
48a06bd5
KR
43452004-07-10 Kevin Ryde <user42@zip.com.au>
4346
4347 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4348 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4349 such a size causes divide-by-zeros in scm_hasher.
4350
052fbfd9
KR
4351 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4352 leak.
4353
43240c9c
MV
43542004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4355
4356 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4357 Rewritten using the same logic as scm_to_signed_integer and
4358 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4359 use CHAR_BIT instead of hardcoding 8.
4360 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4361 SCM_I_LLONG_MIN etc. instead.
4362
4363 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4364 SCM_I_MAKINUM and changed all uses.
4365 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4366
a3de8e7b
MV
4367 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4368 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4369 them by assuming twos-complement.
4370
c9eb03bb
MV
43712004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4372
4373 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4374 configure now produces.
4375 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4376 definitions, giving the limits of the integer types defined by
4377 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4378 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4379
4380 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4381 SHORT_MIN.
4382 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4383 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4384 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4385 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4386 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4387 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4388 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4389 scm_from_uintmax): New.
4390
7888309b
MV
43912004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4392
4393 * tags.h (scm_is_eq): New.
4394
4395 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4396 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4397 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4398 scm_from_bool, and scm_is_bool, respectively.
4399
4400 * boolean.h (scm_is_bool): Fix bug in prototype.
4401 (scm_from_bool): The argument is "x" not "f", stupid.
4402
4403 * boolean.c (scm_is_bool): Fix typo.
4404
4405 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4406 scm_is_unsigned_integer, scm_to_signed_integer,
4407 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4408 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4409 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4410 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4411 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4412 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4413 New.
4414
800570a6
MV
44152004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4416
4417 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4418 scm_to_bool): New.
4419
9fcf3cbb
DH
44202004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4421
4422 * backtrace.c (display_expression, display_frame): Call
4423 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4424 single memoized expression.
4425
4426 * debug.c (memoized_print): Don't try to unmemoize the memoized
4427 object, since we can't know whether it holds a single expression
4428 or a body.
4429
4430 (scm_mem_to_proc): Removed check for lambda expression, since it
4431 was moot anyway. Whoever uses these functions for debugging
4432 purposes should know what they do: Creating invalid memoized code
4433 will cause crashes, independent of whether this check is present
4434 or not.
4435
4436 (scm_proc_to_mem): Take the closure's code as it is and don't
4437 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4438 memoized code should not be modified.
4439
4440 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4441 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4442 available as a guile internal function instead. However,
4443 scm_i_unmemoize_expr will only work on memoized objects that hold
4444 a single memoized expression. It won't work with bodies.
4445
4446 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4447 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4448 i. e. a list of expressions.
4449
4450 * eval.c (unmemoize_exprs): Drop internal body markers from the
4451 output during unmemoization.
4452
4453 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4454 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4455 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4456 as guile internal functions instead. scm_i_unmemoize_expr will
4457 only work on a single memoized expression, while
4458 scm_i_unmemocopy_body will only work on bodies.
4459
90df793f
DH
44602004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4461
4462 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4463
4464 (scm_cons_source, scm_primitive_eval): Prefer higher level
4465 predicate SCM_FALSEP over SCM_IMP.
4466
8048c00b
RB
44672004-06-15 Rob Browning <rlb@defaultvalue.org>
4468
4469 * script.c (scm_shell_usage): minor phrasing change.
4470
4471 * gc_os_dep.c: update ifdefery for macosx.
4472 (scm_get_stack_base): separate result initialization from
4473 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4474 3.3. Thanks to Andreas Vögele.
8048c00b 4475
d93294d4
HWN
44762004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4477
4478 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4479
212e58ed
DH
44802004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4481
4482 * list.[ch] (scm_i_finite_list_copy): New internal function to
4483 copy lists that are known to be finite (though not necessarily
4484 proper).
4485
4486 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4487 a closure's argument list like an expression of a body.
4488
4489 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4490 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4491 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4492 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4493 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4494 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4495 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4496 unmemoize_builtin_macro): New static functions and symbols.
4497
4498 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4499 now has a slightly different meaning: The memoized form that is
4500 receives as its argument is now interpreted as a sequence of
4501 expressions from a body.
4502
4503 (unmemocar, scm_unmemocar): Since the whole functionality of
4504 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4505 has its old content back and is deprecated, while unmemocar has
4506 been removed.
4507
4508 (SCM_BIT7): Removed.
4509
4510 (CEVAL): For unmemoizing a single expression, call
4511 unmemoize_expression instead of scm_unmemocopy, which now expects
4512 a sequence of body expressions. Eliminated unnecessary empty
4513 environment frame when executing let* forms. Eliminated
4514 unmemoization step from evaluator.
4515
9ccea370
MV
45162004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4517
4518 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4519 macroexp and made static. Added new version of scm_macroexp that
4520 emits a deprecation warning and then calls macroexp.
4521 (scm_m_undefine): Issue deprecation warning.
4522
57d23e25
DH
45232004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4524
4525 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4526 Modified to make set! work on symbols that represent syntactic
4527 keywords.
4528
141521ad
HWN
45292004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4530
4531 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4532 compound expression as lvalue errors.
4533
7c2f56a4
MV
45342004-05-24 Marius Vollmer <mvo@zagadka.de>
4535
4536 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4537 WINDER_DATA to a SCM.
4538
366ecaec
DH
45392004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4540
4541 * goops.c (compute_getters_n_setters, create_standard_classes,
4542 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4543 lambda expression rather than creating them with scm_closure.
4544
26ecfa39
DH
45452004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4546
4547 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4548 misplaced syntactic keywords. This will not work unless guile's
4549 defmacro feature is deprecated.
4550
4551 (scm_m_case): Fixed a bug that caused the list of labels to grow
4552 with every case form.
4553
f865229a
KR
45542004-05-19 Kevin Ryde <user42@zip.com.au>
4555
4556 * numbers.c (scm_round_number): For inum and big, just return x. For
4557 real, use scm_round for 2^54-1 etc problems covered there.
4558
4559 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4560 doesn't provide trunc. This was for when `truncate' was done as a
4561 scm_tc7_dsubr, no longer required.
4562
4563 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4564 to stack marking call, two parameters and no cast on t->base.
4565
63947c7a
MV
45662004-05-18 Marius Vollmer <mvo@zagadka.de>
4567
4568 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4569 processed hashtables back into the weak_hashtables list. Thanks
4570 to Bill Schottstaedt!
4571
e7313a9d
DH
45722004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4573
4574 * eval.c (unmemoize_quote): New static function.
4575
4576 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4577 representation of 'quote' and '@slot-ref' to an improper list.
4578 This reduces execution time, the number of cells used to hold the
4579 memoized code, and thus also reduces garbage collection time.
4580
4581 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4582
4583 (SCM_CEVAL): Changed macro handling to also work with macros that
4584 return improper lists. Added an assertion, that the code returned
4585 by a macro transformer will not lead to cycles in the memoized
4586 code.
4587
e5156567
DH
45882004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4589
4590 No functional change, just rearrangements of functions within the
4591 file.
4592
4593 * eval.c (scm_ilookup, scm_unbound_variable_key,
4594 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4595 the definitions used for execution, since that's where they will
4596 belong to later.
4597
651f07f8
DH
45982004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4599
4600 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4601 throughout guile, has not been part of an official release yet,
4602 and the concept of sloppy predicates has never been a good idea.
4603
4604 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4605 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4606 Simplified.
4607
770e048f
DH
46082004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4609
4610 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4611 to make explicit what happens.
4612
2ff08405
DH
46132004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4614
4615 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4616 explicit what happens.
4617
4618 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4619 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4620
89afb9cd
MV
46212004-05-11 Marius Vollmer <mvo@zagadka.de>
4622
4623 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4624 is indeed a procedure when it isn't a number.
4625
3d5ebfa9
MV
46262004-05-10 Marius Vollmer <mvo@zagadka.de>
4627
4628 Convert floating point numbers into strings with an arbitrary
4629 radix. Thanks to Richard Todd!
4630
4631 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4632 fit.
4633 (fx): Removed.
4634 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4635 number_chars): New, to support variable radices.
4636 (idbl2str): Use above instead of the old base-10 only tables.
4637 (iflo2str): Pass on new RADIX argument to idbl2str.
4638 (scm_number_to_string): Pass radix to iflo2str.
4639 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4640 iflo2str.
4641 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4642 possible radices.
4643
3ae69bb4
KR
46442004-05-10 Kevin Ryde <user42@zip.com.au>
4645
4646 * numbers.c (scm_logbit_p): Correction to test above the end of an
4647 inum. Reported by Jan Konecny.
4648
27968825
MV
46492004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4650
4651 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4652 scm_t_bits. Updated all users.
4653 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4654 duplicating the code.
4655 (SCM_CELL_OBJECT_LOC): New.
4656 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4657 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4658
4659 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4660 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4661 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4662 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4663 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4664 SCM_SMOB_OBJECT_3_LOC): New.
4665 * smob.c (scm_i_set_smob_flags): New function.
4666
4667 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4668 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4669 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4670 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4671 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4672 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4673
4674 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4675 taking the address of SCM_CELL_WORD_1, the latter being no longer
4676 an lvalue.
4677
4678 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4679 of casting SCM_CELL_WORD_LOC.
4680
3cf17ef0
KR
46812004-05-02 Kevin Ryde <user42@zip.com.au>
4682
37026925 4683 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4684 --disable-deprecated. Reported by Andreas Vögele.
37026925 4685
3cf17ef0 4686 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4687 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4688
c5854598
KR
4689 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4690 code has support for. Fixes building with AIX cc, which is ansi but
4691 doesn't define __STDC__. Reported by Keith Crane.
4692 (var_start): Remove macro, this variation no longer required.
4693 (scm_list_n): Use va_start directly.
4694
f26c1a32
KR
46952004-05-01 Kevin Ryde <user42@zip.com.au>
4696
4697 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4698 is now gone. Reported by Andreas Vögele.
f26c1a32 4699
dfa6017e
KR
47002004-04-28 Kevin Ryde <user42@zip.com.au>
4701
4702 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4703 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4704 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4705 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4706 Also cast through unsigned char to avoid passing negatives to those
4707 macros if input contains 8-bit values.
4708
4709 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4710 corrections to range check for signed numbers. Remove
4711 scm_remember_upto_here_1(num) from these checks, since num is used
4712 subsequently anyway.
4713
4714 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4715 avoid warning from gcc 3.4. Reported by Hyperdivision.
4716
4717 * numbers.c (scm_bit_extract): Use min instead of MIN.
4718 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4719 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4720
4721 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4722 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4723
a0d06a00 4724 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4725 Reported by Andreas Vögele.
a0d06a00 4726
dfa6017e
KR
4727 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4728 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4729 by Andreas Vögele.
dfa6017e 4730
36245b66
DH
47312004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4732
4733 * eval.c (s_macro_keyword): New static identifier.
4734
4735 (scm_m_define): Change order to first create binding and
4736 evaluating the expression afterwards.
4737
4738 (scm_m_set_x): Memoize complete set! expression. Only leave
4739 symbols if no binding exists at memoization time. Throw error if
4740 assigning to a syntactic keyword.
4741
4742 (lazy_memoize_variable): New function.
4743
4744 (CEVAL): When execution set!, perform lazy memoization if
4745 unmemoized symbol is detected.
4746
4747 * modules.c (module_variable): Return variables with unbound
4748 value.
4749
4750 * tags.h: Fix comment.
4751
4d81111e
KR
47522004-04-25 Kevin Ryde <user42@zip.com.au>
4753
da8bcb2f
KR
4754 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4755 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4756 in 8-bit locales, and ensures consistency with char-upper-case? and
4757 char-lower-case? which already use ctype.h.
4758 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4759 Remove.
4760 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4761
4d81111e
KR
4762 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4763 call. Reported by Hyperdivision.
4764
4765 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4766 Reported by Hyperdivision.
4767
4768 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4769 Hyperdivision.
4770
7e6e6b37
DH
47712004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4772
4773 Hide the implementation of ilocs and isyms in eval.c.
4774
4775 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4776 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4777 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4778 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4779 eval.h to eval.c.
4780
4781 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4782 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4783 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4784 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4785 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4786 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4787 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4788 renamed to ISYMNUM.
4789
4790 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4791 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4792 Extracted printing of ilocs and isyms to guile internal functions
4793 scm_i_print_iloc, scm_i_print_isym of eval.c.
4794
caab294f
KR
47952004-04-22 Kevin Ryde <user42@zip.com.au>
4796
7aaf4758
KR
4797 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4798
caab294f
KR
4799 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4800 rounding in x+0.5 when x is a big value already an integer. In
4801 certain hardware rounding cases x+0.5 can give an adjacent integer,
4802 leading to that as the result, when we really just wanted x itself.
4803
b1cb24ff
DH
48042004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4805
4806 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4807
4808 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4809 added const qualifiers, cast intentionally unused expressions to
4810 void for emphasis, improved comment.
4811
5065b40d
DH
48122004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4813
4814 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4815 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4816 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4817 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4818 Defined the tc8-tag for flags to be 0x04, which will mean that
4819 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4820 to the reduced number of bits and the simpler bit pattern for
4821 SCM_BOOL_F, certain machines may be able to use more efficient
4822 processor instructions to deal with SCM_BOOL_F.
4823
4824 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4825 never been defined in a released version, thus no need to
4826 deprecate them.
4827
4828 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4829 instead of tc9 tags.
4830
4831 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4832 of tc9 tags.
4833
4834 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4835 could have used this definition.
4836
4837 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4838 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4839 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4840 as isyms, as special isyms don't exist any more.
4841
9fa6c119
KR
48422004-04-18 Kevin Ryde <user42@zip.com.au>
4843
e08d2eee
KR
4844 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4845 safety.
4846
9fa6c119
KR
4847 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4848 explicit swapping code.
4849
c9cdd396
KR
48502004-04-15 Kevin Ryde <user42@zip.com.au>
4851
4852 * cpp_sig_symbols.in: Add SIGSYS.
4853
4854 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4855 recursion.
4856
4857 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4858 frac/big and frac/frac, use scm_less_p for exact comparison.
4859
83ac9c59
KR
4860 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4861 with big/inum.
4862
84a4be9a
KR
4863 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4864
84fad130
HWN
48652004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4866
6b69393d
HWN
4867 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4868
84fad130
HWN
4869 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4870 scm_c_{up,down}case.
4871 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4872 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4873
c3110a30
KR
48742004-04-06 Kevin Ryde <user42@zip.com.au>
4875
0b288f36
KR
4876 * numbers.c (scm_ash): Remove stray "}" in docstring.
4877
ea2508c8
KR
4878 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4879 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4880 calling mpz_cmp_ui in most cases.
4881
c3110a30
KR
4882 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4883 for big == abs(most-negative-fixnum) special case.
4884 (abs_most_negative_fixnum): Remove, no longer used.
4885
4886 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4887 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4888 calling (sigaction NSIG).
4889
4890 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4891 and fork error cases to do this.
4892
dec40cd2
DH
48932004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4894
4895 * eval.c (CEVAL): Don't distinguish between short and long
4896 instructions when dispatching - just always dispatch on the
4897 instruction code, which is common for short and long instructions.
4898 Further, removed unnecessary goto statements and added comment.
4899
0e7bb795
DH
49002004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4901
4902 * eval.c (scm_unmemocopy): Don't distinguish between short and
4903 long instructions when dispatching - just always dispatch on the
4904 instruction code, which is common for short and long instructions.
4905 Further, removed unnecessary goto statements, fixed indentation
4906 and replaced SCM_IMP predicates by SCM_NULLP.
4907
f9986767
DH
49082004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4909
4910 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4911 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4912 'checkmacro'.
4913
fbc42231
KR
49142004-03-31 Kevin Ryde <user42@zip.com.au>
4915
4916 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4917
434f2f7a
DH
49182004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4919
4920 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4921 SCM_DEBUGGINGP:
4922
4923 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4924 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4925 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4926 single interface that also matches the naming conventions.
4927 Probably scm_debug_mode_p should be part of the private interface
4928 anyway.
4929
4930 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4931 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4932 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4933 to scm_debug_mode_p.
4934
4935
4936 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4937
4938 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4939 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4940 from debug.h to eval.h.
4941
4942 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4943 more, just leave it with setting scm_debug_mode_p, which is
4944 equivalent for practical purposes.
4945
4946 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4947 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4948
4949 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4950
4951 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4952 static and renamed it to ceval throughout. Provide a new exported
4953 but deprecated function scm_ceval as a wrapper for backwards
4954 compatibility. The same is done for the deval/scm_deval pair of
4955 functions.
4956
4957 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4958 throughout. Defined CEVAL to ceval or deval, based on compilation
4959 phase.
4960
4961 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4962 to ceval and deval instead of calling *scm_ceval_ptr.
4963
4964 * eval.c (dispatching_eval): New deprecated static function.
4965
4966 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4967 to emulate its old behaviour as closely as possible.
4968
4969
4970 Change the evaluator such that only expressions for which pair? is
4971 true are passed to CEVAL, and such that all other expressions are
4972 evaluated outside of CEVAL:
4973
4974 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4975 expression that is assumed to be memoized already. All but
4976 expressions of the form '(<form> <form> ...)' are evaluated inline
4977 without calling an evaluator.
4978
4979 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4980 expressions of the form '(<form> <form> ...)' inline without
4981 calling an evaluator.
4982
4983 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4984 the special case of unmemoized symbols passed on the top level.
4985
4986 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4987 is known that the expression passed to CEVAL is of the form
4988 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4989 now it is known that the input expression of CEVAL is a pair.
4990
49912004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4992
4993 * eval.c (is_self_quoting_p): New static function.
4994
4995 (scm_m_quote): Use is_self_quoting_p.
4996
4997 (copy_tree): Corrected typo in comment.
4998
702551e6
HWN
49992004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
5000
bfefbf18
HWN
5001 * eval.c (s_scm_copy_tree): idem.
5002
5003 * list.c (s_scm_filter): remove "pointer" from doc string.
5004
702551e6
HWN
5005 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
5006
5007 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
5008
5009 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
5010 (display_frame): idem.
5011 (display_backtrace_file_and_line): idem.
5012
5013 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
5014 arguments.
5015
3cd23214
KR
50162004-03-26 Kevin Ryde <user42@zip.com.au>
5017
88a7ae1f
KR
5018 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
5019
3cd23214
KR
5020 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
5021 big==0 since that never occurs.
5022
5023 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
5024 scm_modular_expt, matching scheme level name `modulo-expt'.
5025
5026 * numbers.c (scm_modular_expt): Return a negative remainder for a
5027 negative divisor, the same as `modulo' does.
5028
50292004-03-26 Eric Hanchrow <offby1@blarg.net>
5030
5031 * numbers.c, numbers.h (scm_modular_expt): New function.
5032
2926035a
KR
50332004-03-25 Kevin Ryde <user42@zip.com.au>
5034
5035 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
5036 return inexact as required by r5rs.
5037
62360b89
DH
50382004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5039
5040 * eval.c: Separated some definitions relevant for execution from
5041 the memoization part of the file.
5042
5043 (copy_tree): New static function
5044
5045 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
5046 structures are detected now and will lead to an exception instead
5047 of forcing guile to run in an endless loop, using up all the
5048 system's memory. Second, arrays in the cdr of an improper list
5049 are now copied. See the new test cases in eval.test.
5050
50512004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
5052
5053 * posix.c (scm_gethostname): Make sure len is initialised before
5054 it is used. Restructured to (hopefully) represent possible
5055 configurations more clearly in the code. Added unwind handler.
5056
3bd3bae8
KR
50572004-03-23 Kevin Ryde <user42@zip.com.au>
5058
5059 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
5060 MAXHOSTNAMELEN when available.
5061
254bf78d
MV
50622004-03-21 Marius Vollmer <mvo@zagadka.de>
5063
5064 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
5065 terminator. Rewritten the logic as a state machine, I must have
5066 been doing too much VHDL lately...
5067
5068 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
5069 themselves. Thanks to Han-Wen Nienhuys!
5070
5071 * list.c: Changed docstrings so that they no longer talk about
5072 returning 'pointers' to something.
5073
009c34a2
HWN
50742004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5075
5076 * gc.c: remove set_debug_cell_accesses! when
5077 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
5078 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
5079 debugging conditionally.
5080
54733c95
KR
50812004-03-21 Kevin Ryde <user42@zip.com.au>
5082
5083 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
5084
bbaf8747
KR
50852004-03-20 Kevin Ryde <user42@zip.com.au>
5086
5087 * posix.c (scm_gethostname): Preserve errno across free() call.
5088
726f82e7
HWN
50892004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
5090
5091 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
5092 free cells.
5093
e1350d6a
KR
50942004-03-14 Kevin Ryde <user42@zip.com.au>
5095
5096 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
5097 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
5098
62055253
KR
50992004-03-07 Kevin Ryde <user42@zip.com.au>
5100
5101 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
5102 than "GMT" always.
5103 (filltime): Make zname parameter "const".
5104
92e64b87
MD
51052004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
5106
5107 * threads.c, threads.h (scm_c_scm2thread): New function.
5108
004ad931
KR
51092004-02-29 Kevin Ryde <user42@zip.com.au>
5110
5111 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
5112 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
5113 particular don't assume "defined (__alpha__) && ! defined (linux)"
5114 means OSF. Remove "SCO" code, which was not really SCO specific and
5115 which John W. Eaton advises should be long past being needed.
5116
5117 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
5118 error throw.
5119
72ea45ac
KR
51202004-02-24 Kevin Ryde <user42@zip.com.au>
5121
5122 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
5123
2af0602e
KR
51242004-02-22 Kevin Ryde <user42@zip.com.au>
5125
5126 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
5127 complex, same as for two args. (Handle only inum, big, real, frac).
5128
b114eafe
KR
51292004-02-21 Kevin Ryde <user42@zip.com.au>
5130
5131 * posix.c (scm_crypt): Use new HAVE_CRYPT.
5132 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 5133 Reported by Andreas Voegele.
b114eafe 5134
1e55d288
NJ
51352004-02-20 Neil Jerram <neil@ossau.uklinux.net>
5136
5137 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
5138 validation.
5139
5140 * read.c (scm_lreadparen): Removed.
5141 (scm_lreadparen1): Renamed scm_i_lreadparen.
5142
eb741d98
HWN
51432004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5144
5145 * list.c (scm_list_n): validate non-immediate arguments;
5146 this will catch forgotten a SCM_UNDEFINED.
5147
4e28ba5e
MV
51482004-02-18 Marius Vollmer <mvo@zagadka.de>
5149
5150 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
5151 Thanks to Bill Schottstaedt!
5152
5153 * socket.h (scm_gethost): Removed prototype it is already in
5154 "net_db.h". Thanks to Bill Schottstaedt!
5155
ef861ead
KR
51562004-02-18 Kevin Ryde <user42@zip.com.au>
5157
5158 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
5159 order parameter to mpz_import, in fact with just one word there's no
5160 order to worry about at all.
5161
5162 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
5163 and frac==complex, make an exact comparison rather than converting
5164 with fraction2double.
5165
5166 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
5167 shared library, since environ is not directly available there.
5168
5169 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
5170 standard.
5171
5172 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
5173 errno EINVAL in case localtime and gmtime don't set it.
5174 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
5175 SCM_SYSERROR, since mktime and strptime generally don't set errno.
5176
ae43d08e 51772004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 5178
c9ea6462
KR
5179 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
5180 which were permitted in the past for these.
5181
292dfa7f
KR
5182 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
5183 previous change to numbers.c.
5184
ae43d08e
KR
5185 * script.c (scm_shell_usage): Print bug-guile email address, as per
5186 GNU standard. Reported by Han-Wen Nienhuys.
5187
711a9fd7
MD
51882004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5189
5190 * unif.c (scm_make_uve): Removed local variable and simplified
5191 code in order to avoid compiler used uninitialized warnings.
5192
5193 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
5194 scm_hash_map.
5195 (scm_hash_fold): Use scm_call_3 directly in the call to
5196 scm_internal_hash_fold instead of going via fold_proc (which is
5197 now removed).
5198 (scm_hash_for_each): Use a trampoline +
5199 scm_internal_hash_for_each_handle.
5200 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
5201 functions.
5202
3da7f6b2
KR
52032004-02-12 Kevin Ryde <user42@zip.com.au>
5204
344a212f
KR
5205 * ports.c (scm_port_line): In docstring, note first line is 0.
5206 (scm_set_port_line_x): In docstring, note first line is 0.
5207 (scm_port_column): In docstring, there's no default to current input
5208 port, and remove shared port-line @defun.
5209 (scm_set_port_column_x): In docstring, there's no default to current
5210 input port, note first column is 0, remove shared set-port-line!
5211 @defun.
5212
3da7f6b2
KR
5213 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5214 convert args the same way that array-set! does.
5215
5216 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5217 for dvect.
5218 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5219 for "l" not "s", fix dvect to be false for singp(prot) since such a
5220 value is for fvect.
5221 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5222 (exactly_one_third): New variable.
5223 (scm_init_unif): Initialize it.
3da7f6b2 5224
cd21f5eb
NJ
52252004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5226
5227 * read.c (scm_read_opts): Change `escaped-parens' to
5228 `elisp-strings'.
5229
16353acc
NJ
52302004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5231
5232 * read.c (scm_read_opts): New opts `elisp-vectors' and
5233 `escaped-parens'.
5234 (s_vector): New.
5235 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5236 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5237 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5238 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5239 `escaped-parens' option set.
5240 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5241 in tokens.
5242 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5243 (scm_lreadparen1): New.
5244
5245 * read.h: Remove conditionally compiled last arg to
5246 scm_lreadparen.
5247 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5248
f62b9dff
HWN
52492004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5250
5251 * eval.c (m_expand_body): remove stray variable new_body.
5252
ef5b6b61
MV
52532004-01-22 Marius Vollmer <mvo@zagadka.de>
5254
5255 * eval.c (m_expand_body): Rewrite the expression in place (by
5256 overwriting FORMS) also when a letrec is constructed, not only
5257 when no definitions are found. Do not return rewritten expression
5258 to emphasize the in-place rewriting. Changed all users.
5259
7eec4c37
HWN
52602004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5261
5262 * gc.c: add protected_object_count, a number that is dumped from
5263 gc_stats()
5264
25ffbdac
MV
52652004-01-11 Marius Vollmer <mvo@zagadka.de>
5266
5267 * dynwind.h, dynwind.c (scm_frame_unwind,
5268 scm_frame_unwind_handler): Renamed and changed all uses.
5269 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5270
08568c95
KR
52712004-01-11 Kevin Ryde <user42@zip.com.au>
5272
5273 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5274 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5275 changes made to scheme-compound.texi.
5276
5565749c
MV
52772004-01-10 Marius Vollmer <mvo@zagadka.de>
5278
25ffbdac
MV
5279 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5280 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5281
5282 * guile-snarf.in: Use mkdir to create a unique temporary directory
5283 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5284
fc6bb283
MV
52852004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5286
7ebccde8
MV
5287 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5288 argument since it is always zero now. Changed all callers.
5289 Removed code for handling fluids.
96e3b2f8
MV
5290
5291 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5292 the wind chain explicitely. Use scm_c_with_fluid for the common
5293 case of only one fluid.
5294 (scm_with_fluid): New.
5295 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5296
fc6bb283 5297 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5298 (scm_with_fluid): New.
5299 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5300
5301 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5302 do the unwinding directly. It is simple enough.
5303
5304 * dynwind.h, dynwind.c: Did the following renamings:
5305 scm_begin_frame -> scm_frame_begin,
5306 scm_end_frame -> scm_frame_end,
5307 scm_on_unwind -> scm_frame_unwind,
5308 scm_on_rewind -> scm_frame_rewind,
5309 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5310 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5311 Changed all uses.
5312
5313 * aync.h, async.c: Did the follwing renamings:
5314 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5315 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5316 Changed all uses.
5317
5318 * ports.h, ports.c: Did the follwing renamings:
5319 scm_with_current_input_port -> scm_frame_current_input_port,
5320 scm_with_current_output_port -> scm_frame_current_output_port,
5321 scm_with_current_error_port -> scm_frame_current_error_port.
5322 Changed all uses.
5323
298ab996
KR
53242004-01-07 Kevin Ryde <user42@zip.com.au>
5325
5326 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5327 Reported by Richard Todd.
5328
ba40113e
KR
5329 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5330 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5331
298ab996
KR
5332 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5333 traversing the args list, fixes segv if an improper list is given.
5334 Reported by Rouben Rostamian.
5335
aacff585
MV
53362004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5337
5338 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5339 swap_data on stack, use a 'malloc obj'.
5340
5341 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5342 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5343 scm_i_... since they are internal. Changed all uses.
5344
5345 * dynwind.c (frame_print): Removed, use the default printer.
5346 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5347 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5348 to protect SCM values.
5349
5350 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5351 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5352 Changed all uses.
5353 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5354
49c00ecc
MV
53552004-01-05 Marius Vollmer <mvo@zagadka.de>
5356
5357 * ports.h, ports.c (scm_with_current_input_port,
5358 scm_with_current_output_port, scm_with_current_error_port): New.
5359
5360 * async.h, async.c (scm_with_blocked_asyncs,
5361 scm_with_unblocked_asyncs): New.
5362
dab514a8
MV
53632004-01-03 Marius Vollmer <mvo@zagadka.de>
5364
5365 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5366 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5367 New.
5368 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5369 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5370 function when the outermost wind point has been reached. The
5371 latter is used to copy a continuation stack at the right time.
5372 scm_dowinds remains available.
5373 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5374 tc16_guard, guards_print): Removed.
5375 (scm_internal_dynamic_wind): Reimplemented using frames.
5376
5377 * continuations.c (copy_stack): New, do only the stack copying
5378 part of copy_stack_and_call.
5379 (copy_stack_and_call): Copy the stack after unwinding and before
5380 rewinding.
5381 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5382 copy_stack_and_call.
5383
441a25d9
KR
53842004-01-04 Kevin Ryde <user42@zip.com.au>
5385
5386 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5387 can give bad results due to rounding.
441a25d9 5388
e0499207
KR
5389 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5390 setzone/restorezone protection for DOS.
5391
89fcf1b4
MV
53922003-12-26 Marius Vollmer <mvo@zagadka.de>
5393
5394 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5395 and scm_t_uintmax to be defined in scmconfig.h
5396
caff34d4
KR
53972003-12-03 Kevin Ryde <user42@zip.com.au>
5398
5399 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5400
5401 * numbers.c (scm_make_ratio): Check for numerator equal to
5402 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5403 giving integer -1.
5404
5405 * numbers.c (scm_real_part): Return fraction unchanged rather than
5406 converting to flonum.
5407
2d0b85ac
DH
54082003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5409
5410 * modules.c (module_variable): Fixed (and thus simplified) the
5411 definition of SCM_BOUND_THING_P to reflect the fact that since
5412 after the 1.4 series of guile, obarrays only hold variable
5413 objects.
5414
2297981d
MV
54152003-11-30 Marius Vollmer <mvo@zagadka.de>
5416
5417 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5418
5419 From Paul Jarc:
5420
5421 * read.c (scm_lreadr): Signal an error for invalid escape
5422 sequences in strings. Code cleanups too.
5423
5424 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5425 writing control characters in strings.
5426
54272003-11-21 Marius Vollmer <mvo@zagadka.de>
5428
5429 * ports.c (scm_drain_input): Bug fix: only access the port after
5430 checking that it indeed is one.
5431
5c264007
DH
54322003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5433
5434 * eval.c (s_bad_define): New static identifier.
5435
5436 (m_body): Fixed comment.
5437
5438 (scm_m_define): Don't generate memoized code for definitions that
5439 are not on the top level. As a consequence, no memoized code at
5440 all is generated for definitions any more: Top level definitions
5441 are executed immediately during memoization and internal
5442 definitions are handled separately in m_expand_body.
5443
5444 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5445 definitions. Consequently, there is no unmemoizing code any more
5446 that might modify the environment. Thus, the old scm_unmemocopy
5447 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5448
5449 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5450 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5451 over SCM_NIMP in places, where the argument is known to be part of
5452 a proper list.
5453
018d4730
KR
54542003-11-21 Kevin Ryde <user42@zip.com.au>
5455
5456 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5457 for bignums.
5458
5459 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5460 to share some shifting.
5461
5462 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5463 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5464 since gc does this.
5465
4bca30d8
MV
54662003-11-19 Marius Vollmer <mvo@zagadka.de>
5467
fb16d26e
MV
5468 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5469 structure. Previously, not all cases with a negative denominator
5470 were covered.
5471
4bca30d8
MV
5472 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5473 scm_divide2real when forming the fractional part. This allows
5474 "#e1.2" to yield 6/5.
5475
5476 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5477 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5478 fractions were equal to each other regardless of value. Ooops.
5479
5480 * numbers.c (scm_rationalize): Return an inexact result when given
5481 inexact arguments.
5482
5483 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5484 non-numbers.
5485
bdf26b60
MV
54862003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5487
5488 Support for exact fractions from Bill Schottstaedt! Thanks!
5489
5490 * print.c (scm_iprin1): Handle fractions.
5491
5492 * objects.h (scm_class_fraction): New.
5493 * objects.c (scm_class_fraction): New.
5494 (scm_class_of): Handle fractions.
5495
5496 * hash.c (scm_hasher): Handle fractions.
5497
5498 * numbers.c: New code for handling fraction all over the place.
5499 (scm_odd_p, scm_even_p): Handle inexact integers.
5500 (scm_rational_p): New function, same as scm_real_p.
5501 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5502 New exact functions that replace the inexact 'dsubr'
5503 implementations.
5504 (scm_numerator, scm_denominator): New.
5505
5506 * numbers.h (SCM_NUMP): Recognize fractions.
5507 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5508 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5509 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5510 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5511 SCM_FRACTION_REDUCED): New.
5512 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5513 New prototypes.
5514 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5515 scm_rational_p): New prototypes.
5516 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5517 scm_i_print_fraction): New prototypes.
5518
5519 * goops.c (create_standard_classes): Create "<fraction>" class.
5520
5521 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5522
5523 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5524 case in the switch, but do nothing for now.
5525
5526 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5527 to doubles when calling 'dsubr' functions.
5528
5529 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5530
28fda544
RB
55312003-11-18 Rob Browning <rlb@defaultvalue.org>
5532
5533 * gen-scmconfig.c (main): remove public definition of
5534 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5535 direct typedef of long_long and ulong_long inside deprecated block
5536 when appropriate.
5537
5538 * deprecated.h: move long_long and ulong_long definitions to
5539 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5540 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5541
b58e7420
MV
55422003-11-17 Marius Vollmer <mvo@zagadka.de>
5543
9a1d7d7c
MV
5544 * hash.c (scm_string_hash): New hashing algorithm that takes the
5545 complete string into account.
5546
b58e7420
MV
5547 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5548 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5549 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5550 SCM_ASSYNT.
b58e7420
MV
5551
5552 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5553 the "-e" option instead of scm_str2symbol. This allows things
5554 like (@ ...) to be specified for the entry point.
5555
461bffb1
DH
55562003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5557
5558 * eval.c (scm_m_letstar): Create memoized code in place to
5559 minimize consing.
5560
6f81708a
DH
55612003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5562
5563 * eval.c (s_splicing): Commented and reformulated.
5564
5565 (lookup_global_symbol, lookup_symbol): New static functions.
5566
5567 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5568
5569 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5570 creating a temporary pair for scm_lookupcar.
5571
5572 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5573 created deprecated wrapper function scm_unmemocar.
5574
5575 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5576 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5577 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5578 undefineds, sym_three_question_marks): Moved around without
5579 modifications.
5580
5581 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5582
910b5125
DH
55832003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5584
5585 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5586 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5587 No further modifications.
5588
c86c440b
DH
55892003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5590
5591 * eval.c (s_mixed_body_forms): New static identifier.
5592
5593 (canonicalize_define, scm_m_define): The check for a bad
5594 expression is performed in canonicalize_define now.
5595
5596 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5597 static helper functions for m_expand_body.
5598
5599 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5600 expand user defined macros. Fixed handling of the definition/
5601 expression boundary. Fixed handling of definitions grouped with
5602 'begin. Use canonicalize_define to expand definitions.
5603
3890131a
MV
56042003-11-13 Marius Vollmer <mvo@zagadka.de>
5605
b58e7420
MV
5606 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5607 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5608
5df36eac
MV
5609 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5610 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5611 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5612 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5613 New macros from Paul Jarc. Thanks!
5614
3890131a
MV
5615 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5616 return NULL when the machine type is unknown. Previously,
5617 gc_os_dep.c would refuse to compile.
5618
430b8401
DH
56192003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5620
5621 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5622 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5623 scm_m_body to m_body.
5624
328dc9a3
DH
56252003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5626
5627 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5628 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5629 scm_m_expand_body to m_expand_body and made it static. Added
5630 deprecated wrapper scm_m_expand_body.
5631
5632 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5633 of scm_m_expand_body.
5634
c2337a61
KR
56352003-11-09 Kevin Ryde <user42@zip.com.au>
5636
5637 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5638 argument. Reported by Mike Gran.
5639
ced8edb0
DH
56402003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5641
5642 * eval.c (s_missing_body_expression): New static identifier.
5643
5644 (s_body): Removed.
5645
5646 (scm_m_expand_body): Fixed core dump when passing a body with
5647 defines, but without expressions (see additions to syntax.test).
5648 Use ASSERT_SYNTAX to signal syntax errors.
5649
0f572ba7
DH
56502003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5651
5652 * eval.c (canonicalize_define): New static helper function.
5653
5654 (memoize_define, canonicalize_define): Extract handling of
5655 function currying to canonicalize_define.
5656
2510c810
DH
56572003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5658
5659 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5660 Make sure that error checking in debug mode is not worse than in
5661 standard mode.
5662
34adf7ea
DH
56632003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5664
5665 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5666 handled in scm_m_body any more, but rather in scm_m_lambda.
5667
5668 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5669 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5670 calling functions of scm_m_body.
5671
5672 (scm_m_lambda): Avoid unnecessary consing when creating the
5673 memoized code.
5674
89bff2fc
DH
56752003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5676
5677 * eval.c (s_expression): Added comment.
5678
5679 (s_empty_combination, error_unbound_variable): New static
5680 identifiers.
5681
5682 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5683 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5684 signal syntax errors.
5685
5686 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5687 scheme objects.
5688
60a49842
DH
56892003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5690
5691 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5692 Grouped together with unmemocopy, without modifications.
5693
5694 (build_binding_list, unmemocopy): Renamed names of list arguments
5695 and variables to reflect the actual order of the list elements.
5696
70c1c108
DH
56972003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5698
5699 * eval.c (s_defun): New static identifier.
5700
5701 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5702 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5703 when creating the memoized code.
5704
0ee39677
KR
57052003-10-19 Kevin Ryde <user42@zip.com.au>
5706
5707 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5708
5709 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5710 in accordance with R5RS, which just mpz_get_d doesn't really give.
5711
9a848baf
DH
57122003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5713
5714 * eval.c (s_bad_slot_number): New static identifier.
5715
5716 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5717 signal syntax errors. Avoid unnecessary consing when creating the
5718 memoized code.
5719
da48db62
DH
57202003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5721
5722 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5723 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5724 errors. Avoid unnecessary consing when creating the memoized
5725 code.
5726
5727 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5728 standard case. Make sure line and file information are copied to
5729 every created expression.
5730
82b3e2c6
DH
57312003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5732
5733 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5734 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5735 when creating the memoized code.
5736
5737 (scm_m_atbind): Reversed the order, in which the init expressions
5738 are stored and executed. The order of execution is now equal to
5739 the order in which the initializers of the let-forms are executed.
5740 Use check_bindings and transform_bindings.
5741
5742 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5743 !SCM_NULLP. Added some comments.
5744
21628685
DH
57452003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5746
5747 * eval.c: Sorted include files alphabetically.
5748
5749 (scm_m_begin): Added comment.
5750
5751 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5752 unnecessary consing when creating the memoized code.
5753
5754 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5755 syntax errors. Be more specific about the kind of error that was
5756 detected.
5757
5758 (scm_m_quote, unmemocopy): As an optimization, vector constants
5759 are now inserted unquoted into the memoized code. During
5760 unmemoization the quotes are added again to provide syntactically
5761 correct code.
5762
d6754c23
DH
57632003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5764
5765 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5766 scm_m_expand_body, check_bindings): Extracted syntax checking of
5767 bindings to new static function check_bindings.
5768
5769 (scm_m_let, memoize_named_let): Extracted handling of named let to
5770 new static function memoize_named_let.
5771
5772 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5773 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5774 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5775 unnecessary consing when creating the memoized code.
5776
03a3e941
DH
57772003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5778
5779 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5780 static identifiers.
5781
5782 (s_clauses, s_formals, s_duplicate_formals): Removed.
5783
5784 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5785 specific about the kind of error that was detected. Prepare for
5786 easier integration of changes for separated memoization.
5787
da48db62 57882003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5789
5790 * eval.c (s_duplicate_binding): New static identifier.
5791
5792 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5793
5794 (scm_m_define): Added comment about how we check for duplicate
5795 formals.
5796
5797 (scm_m_do): Added check for duplicate bindings.
5798
5799 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5800 unnecessary consing when creating the memoized code.
5801
5802 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5803 scm_c_improper_memq to c_improper_memq, since it is not exported.
5804
5805 (transform_bindings): Call scm_c_memq rather than
5806 scm_c_improper_memq.
5807
5808 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5809
da48db62 58102003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5811
5812 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5813 static identifiers.
5814
5815 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5816 specific about the kind of error that was detected. Avoid use of
5817 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5818 code, this way also making sure that file name, line number
5819 information etc. remain available.
5820
da48db62 58212003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5822
5823 * eval.c (memoize_as_thunk_prototype): New static function.
5824
5825 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5826 Avoid unnecessary consing when creating the memoized code.
5827
9b9a35b6
KR
58282003-10-12 Kevin Ryde <user42@zip.com.au>
5829
5830 * list.c (scm_append): Track argument number and use in error.
5831
cc56ba80
DH
58322003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5833
5834 * eval.c (s_missing_expression, s_bad_variable): New static
5835 identifiers.
5836
5837 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5838 R5RS terminology for the naming of variables. Be more specific
5839 about the kind of error that was detected. Make sure file name,
5840 line number etc. are added to all freshly created expressions.
5841 Avoid unnecessary consing when creating the memoized code.
5842
609a8b86
DH
58432003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5844
5845 * eval.c (s_extra_expression, s_misplaced_else_clause,
5846 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5847
5848 (s_extra_case_clause): Removed.
5849
5850 (scm_m_case, scm_m_cond): If a clause appears after an else
5851 clause, report a misplaced else clause.
5852
5853 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5854 specific about the kind of error that was detected. Handle bound
5855 'else and '=>. Avoid unnecessary consing when creating the
5856 memoized code.
5857
5858 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5859 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5860 syntactic keyword '=>.
5861
58a2510b
DH
58622003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5863
5864 * eval.c (scm_m_case): Allow empty lists of case labels.
5865
2a6f7afe
DH
58662003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5867
5868 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5869
5870 * print.c (scm_isymnames): Add names for the new memoizer codes.
5871
5872 * eval.c (s_missing_clauses, s_bad_case_clause,
5873 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5874 literal_p): New static identifiers.
5875
5876 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5877 specific about the kind of error that was detected. Check for
5878 duplicate case labels. Handle bound 'else. Avoid unnecessary
5879 consing when creating the memoized code.
5880
5881 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5882 the syntactic keyword 'else.
5883
e6729603
DH
58842003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5885
5886 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5887 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5888
5889 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5890 unnecessary consing when creating the memoized code.
5891
9ddeb776
KR
58922003-10-09 Kevin Ryde <user42@zip.com.au>
5893
5894 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5895 cast gives for values bigger than a long, or for nan or inf.
5896
df5af69a
DH
58972003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5898
5899 * smob.h (scm_make_smob_type): Made the declaration match the
5900 definition.
5901
da0e6c2b
MV
59022003-10-07 Marius Vollmer <mvo@zagadka.de>
5903
5904 * goops.c, objects.h, smob.c, smob.h: Make type names char
5905 const * instead of char *. Thanks to Paul Jarc!
5906
591924eb
KR
59072003-10-02 Kevin Ryde <user42@zip.com.au>
5908
ff6ea7b9 5909 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5910 rather than scm_strport_to_string, so as to guard against the port
5911 having been closed by the called procedure. Reported by Nic Ferrier.
5912
f03314f9
DH
59132003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5914
5915 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5916
5917 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5918 tags.h to deprecated.h.
5919
534c55a9
DH
59202003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5921
5922 This set of patches introduces a new tc7 code scm_tc7_number for
5923 numbers. Bignums, reals and complex numbers are turned from smobs
5924 into subtypes of scm_tc7_number.
5925
5926 * tags.h (scm_tc7_number): New.
5927
5928 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5929 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5930 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5931 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5932 (scm_class_of), print.c (scm_iprin1), smob.c
5933 (scm_smob_prehistory): Don't handle bignums, reals and complex
5934 numbers as subtypes of scm_tc7_smob any more.
5935
5936 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5937 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5938
29c4382a
DH
59392003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5940
5941 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5942 sizeof (scm_t_complex) to determine the memory size of the
5943 malloc'd area for complex numbers.
5944
47ae1f0e
DH
59452003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5946
5947 * numbers.c (scm_bigequal): Fixed.
5948
859b6b2f
MV
59492003-09-16 Marius Vollmer <mvo@zagadka.de>
5950
5951 * stime.c (scm_current_time): 'time' does not set errno so don't
5952 use SCM_SYSERROR for reporting errors.
5953
e17d318f
DH
59542003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5955
5956 This set of patches eliminates the dependency between the
5957 implementation of evaluator specific memoization codes and special
5958 constants like #f, '() etc. ('flags'), which are not evaluator
5959 specific. The goal is to remove definitions of evaluator
5960 memoization codes completely from the public interface. This will
5961 make it possible to experiment more freely with optimizations of
5962 guile's internal representation of memoized code.
5963
5964 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5965
5966 * print.c (iflagnames): New array, holding the printed names of
5967 guile's special constants ('flags').
5968
5969 (scm_isymnames): Now holds only the printed names of the
5970 memoization codes.
5971
5972 (scm_iprin1): Separate the handling of memoization codes and
5973 guile's special constants.
5974
5975 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5976 SCM_IFLAGNUM): new
5977
5978 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5979 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5980 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5981 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5982 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5983 values.
5984
5985 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5986
5987 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5988 tc9 macros and scm_tc9_flag.
5989
eecac806
MV
59902003-09-15 Marius Vollmer <mvo@zagadka.de>
5991
5992 * posix.c (scm_setgroups): Check that the gid list is not too
5993 long. Thanks to Paul Jarc!
5994
22f2cf2d
DH
59952003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5996
5997 * tags.h: Reduced the number of short instructions from 14 to 13.
5998 The typecode of the former 14th short instruction is now used to
5999 represent long instructions. Changed some comments to reflect
6000 this fact.
6001
6002 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
6003 previously used by SCM_IM_DEFINE.
6004
6005 (SCM_IM_DEFINE): Turned into a long instruction.
6006
6007 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
6008 instruction.
6009
6010 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
6011 code that is separate from all instructions, one level of dispatch
6012 for long instructions can be eliminated.
6013
6014 * print.c (scm_isymnames): Removed some commented code.
6015
62f548e1
MV
60162003-09-12 Marius Vollmer <mvo@zagadka.de>
6017
97a61c5f
MV
6018 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
6019 compiler on IA64.
6020
50e0ba57
MV
6021 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
6022
6023 * modules.c (scm_module_reverse_lookup): Check that the obarray
6024 really is a hashtable and do nothing if not.
6025
62f548e1
MV
6026 * inline.h: Use "extern inline" only with GCC. Use "static
6027 inline" else.
6028
0d5e3480
DH
60292003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6030
6031 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
6032 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6033
6034 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
6035 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
6036 deprecated.h.
6037
6b412e91
DH
60382003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6039
6040 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
6041 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6042
6043 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
6044 0.0==some_expression to some_expression==0.0. The latter is
6045 better readable. The former is preferred by some people, since it
6046 leads to a compiler error when confusing == with =. However, when
6047 using gcc, a warning will be issued if in an if-statement an
6048 assigment appears. Since many Guile developers are using gcc,
6049 such errors will not remain unnoticed anyway. We can therefore
6050 focus on better readability.
6051
7e3b25bf
DH
60522003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6053
6054 * tags.h: Added description of Guile's type system. Removed some
6055 old and misleading comments.
6056
3ea39242
DH
60572003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6058
6059 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
6060 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6061
5d7d39ff
DH
60622003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6063
6064 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
6065
6066 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
6067 respective SLOPPY macro.
6068
baa84a20
DH
60692003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6070
6071 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
6072 type string, not SCM_TYP7S.
6073
ba15f500
KR
60742003-09-03 Kevin Ryde <user42@zip.com.au>
6075
6076 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
6077 2s-complement.
6078
53bb8782
KR
6079 * stime.c (scm_strptime): Add comment about glibc strptime %s and
6080 current timezone requiring SCM_DEFER_INTS.
6081
defdc4b4
NJ
60822003-08-30 Neil Jerram <neil@ossau.uklinux.net>
6083
6084 * script.c (scm_compile_shell_switches): Make -s switch optional
6085 if file to be loaded does not begin with a `-'. (Thanks to Aaron
6086 VanDevender for the patch!)
6087
0f008a15
KR
60882003-08-30 Kevin Ryde <user42@zip.com.au>
6089
6090 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
6091 and to have non-integer types rejected as per other logical funcs.
6092
438a3ba1
KR
60932003-08-28 Kevin Ryde <user42@zip.com.au>
6094
6095 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
6096
98dceb37
KR
60972003-08-23 Kevin Ryde <user42@zip.com.au>
6098
6099 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
6100 thread safe, and could take a long time too.
6101
1fa79a38
KR
61022003-08-22 Kevin Ryde <user42@zip.com.au>
6103
6104 * numbers.c (scm_difference): Correction to bignum - negative inum.
6105
d97f9b42
KR
61062003-08-14 Kevin Ryde <user42@zip.com.au>
6107
6108 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
6109 [__GNUC__]: Use volatile asm macros rather than a function call.
6110 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
6111 macros while defining functions.
6112
6113 * simpos.c (getenv): Use <stdlib.h> for prototype.
6114 (scm_system): In docstring, refer to status:exit-val rather than
6115 "functions above".
6116
b9052fcc
KR
61172003-08-09 Kevin Ryde <user42@zip.com.au>
6118
6119 * srcprop.c (scm_source_properties): Return plist from hash if it's a
6120 list set by source-properties! rather than an SRCPROPS object,
6121
8e5b4b9e
KR
61222003-07-29 Kevin Ryde <user42@zip.com.au>
6123
6124 * properties.c (scm_primitive_property_ref): In docstring, note
6125 parameters to not-found-proc, use hyphens rather than underscores for
6126 that parameter name.
6127 (scm_primitive_property_set_x): In docstring, VAL is the value
6128 parameter not CODE.
6129
20703ac4
MV
61302003-07-27 Marius Vollmer <mvo@zagadka.de>
6131
c6ccee34
MV
6132 * print.c (scm_print_symbol_name): handle more weird characters by
6133 escaping the symbol name properly. Thanks to Paul Jarc!
6134
2f4931bf
MV
6135 * posix.h (scm_setgroups): New prototype.
6136 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
6137 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
6138 Don't use SCM_WRITABLE_VELTS.
6139
265c456f
MV
6140 * gc.h (SCM_GC_SET_CELL_BVEC): New.
6141 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
6142 Matthias Koeppe!
6143
20703ac4
MV
6144 * __scm.h (SCM_C_INLINE_KEYWORD): New.
6145 * numbers.c: Use it in place of SCM_C_INLINE so that the code
6146 compiles when SCM_C_INLINE is undefined.
6147
59c4bb82
DH
61482003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6149
6150 * __scm.h: Reformulated the architecture and compiler properties
6151 in terms of properties of scm_t_bits and SCM variables rather than
6152 in terms of c standard types. This is since it is not known which
6153 of the standard types scm_t_bits and SCM variables will be defined
6154 to.
6155
d7850c8d
KR
61562003-07-24 Kevin Ryde <user42@zip.com.au>
6157
6158 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
6159 and real.
6160
8a0c514f
KR
61612003-07-18 Kevin Ryde <user42@zip.com.au>
6162
6163 * numbers.c (scm_product): In complex * bignum, correction to
6164 REAL/IMAG fetch, x is the complex, not y.
6165
0aacf84e
MD
61662003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6167
6168 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
6169 scm_inf_p test as Scheme values.
6170 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
6171 and a positive inum.
6172 Use GNU indentation style.
6173
192de9a4
DH
61742003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
6175
6176 * values.c (scm_values): Build lists of length 1 by using
6177 scm_list_1 instead of using scm_cons.
6178
bbb4438a
KR
61792003-07-10 Kevin Ryde <user42@zip.com.au>
6180
b58c85ce
KR
6181 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
6182 * list.c (scm_list_n): Ditto.
6183
bbb4438a
KR
6184 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
6185
287f8ad1
KR
61862003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
6187
6188 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
6189 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
6190 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
6191 the other using intptr_t.
6192
005d2366
KR
61932003-07-08 Kevin Ryde <user42@zip.com.au>
6194
0aacf84e 6195 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
6196 (scm_magnitude): Use hypot.
6197
6198 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
6199 @footnote since it doesn't go through to guile-procedures.txt.
6200
6201 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
6202 outside @var to quieten makeinfo, and use @code.
6203
cbfe8e62
HWN
62042003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6205
6206 * gc-malloc.c (decrease_mtrigger): new function
6207 (increase_mtrigger): new function, separate debug registering and
6208 mtrigger administration.
6209 (scm_gc_realloc): bugfix: do mtrigger administration before the
6210 actual realloc, for the realloc might invalidate a GC-d segment of
6211 memory. Thanks to Sam Hocevar for pointing this out.
6212 (scm_gc_realloc): use scm_malloc_reregister instead of
6213 unregistering and registering in sequence.
6214
aeb4c2e1
HWN
62152003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6216
6217 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
6218
4c27f8d2
HWN
62192003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6220
6221 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6222 clauses.
6223
983e697d
MV
62242003-06-29 Marius Vollmer <mvo@zagadka.de>
6225
6226 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6227 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6228 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6229 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6230 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6231 the release_1_6 branch.
6232
78b6566e
SJ
62332003-06-25 Stefan Jahn <stefan@lkcc.org>
6234
6235 * continuations.c: Redeclaration of getcontext() via the
6236 __asm__ ("getcontext") directive.
6237
6238 * continuations.h: Include <ucontext.h> instead of
6239 <sys/ucontext.h>.
6240
1ebb8497
KR
62412003-06-21 Kevin Ryde <user42@zip.com.au>
6242
6243 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6244 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6245 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6246 available.
6247 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6248 (isfinite): Remove, conflicts with C99 isfinite().
6249
fbf85ba4
MV
62502003-06-19 Marius Vollmer <mvo@zagadka.de>
6251
6252 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6253 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6254 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6255 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6256 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6257 the release_1_6 branch.
6258
fcc5d734
SJ
62592003-06-14 Stefan Jahn <stefan@lkcc.org>
6260
6261 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6262 to be functions instead of macros.
6263
6264 * threads.c: Conditionalized inclusion of <sys/time.h> and
6265 <unistd.h>.
6266 (scm_getspecific, scm_setspecific): Made these two function
6267 real part of the API.
6268
6269 * posix.c (s_scm_putenv): Added some code to make a
6270 (putenv "FOO="), i.e. setting an empty string, work also on
6271 Win32 systems. Thanks to Kevin Ryde for the proposal.
6272
c3ae8e07
KR
62732003-06-12 Kevin Ryde <user42@zip.com.au>
6274
75b14838
KR
6275 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6276 freebsd to comment about need to use unsetenv.
c3ae8e07 6277
9d9fa092
MV
62782003-06-02 Marius Vollmer <mvo@zagadka.de>
6279
6280 * ports.c (scm_peek_char): Safe the column of the port around the
6281 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6282
f2478375
KR
62832003-06-07 Kevin Ryde <user42@zip.com.au>
6284
6285 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6286 and friends required by scm_t_bits setups.
6287
6375e040
DH
62882003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6289
6290 * tags.h (scm_tc2_int): Added.
6291
6292 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6293 scm_tc2_int.
6294
6295 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6296 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6297
f5c6ec2f
DH
62982003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6299
6300 * eval.c: Partially undid my patch from 2003-05-31. This patch
6301 caused the segfault referenced in the previous changelog entry.
6302
47dbd81e
DH
63032003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6304
6305 * tags.h: Fixed comment about the immediate type code layout.
6306
6307 * eval.c: Fixed handling of non-special instructions. Without
6308 this patch, guile will segfault on (#\0) and similar instructions.
6309
3ec52c51
KR
63102003-06-05 Kevin Ryde <user42@zip.com.au>
6311
6312 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6313 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6314
e418bd7c
KR
6315 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6316 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6317
d0624e39
DH
63182003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6319
6320 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6321 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6322 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6323 generalized it to apply not only to C level functions but also to
6324 scheme level functions.
6325
6326 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6327 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6328 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6329 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6330 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6331 respectively.
6332
6333 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6334 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6335 eval.h into eval.c and a copy is placed into deprecated.h.
6336
6337 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6338 into eval.c. This definition was not part of the API in any
6339 officially released version of guile and thus does not need to go
6340 through a phase of deprecation.
6341
e90c3a89
DH
63422003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6343
d0624e39
DH
6344 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6345 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6346 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6347 definitions are make static and renamed from scm_s_xxx to s_xxx.
6348 In deprecated.c the original definitions are copied.
6349
d0624e39
DH
6350 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6351 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6352 eval.h into eval.c and a copy (slightly modified to work in user
6353 code) is placed into deprecated.h.
6354
6355 * eval.c: Use the local static s_xxx definitions instead of the
6356 scm_s_xxx definitions throughout.
6357
14b18ed6
DH
63582003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6359
6360 This set of patches separates the representation of the cxr family
6361 of functions (car, cdr etc.) from the dsubr family of functions
6362 (i. e. functions that take a double precision floating point
6363 argument). Further, the algorithm for handling the cxr function
6364 is improved.
6365
6366 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6367 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6368 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6369 cosh, tanh), objects.c (scm_class_of), procprop.c
6370 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6371 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6372 typecode for the dsubr family of functions.
6373
6374 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6375 ramap_dsubr.
6376
6377 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6378 (scm_init_pairs): Make use of the (now usable) second cell element
6379 of a scm_tc7_cxr function to implement the cxr family of functions
6380 more efficiently.
6381
2ca0d207
DH
63822003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6383
6384 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6385 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6386 end of an if-else-if-sequence of checks.
6387
9a069bdd
DH
63882003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6389
6390 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6391 execution. Generalize apply_closure to apply_proc and use that
6392 for call-with-values.
6393
e910e9d2
DH
63942003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6395
6396 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6397 a non closure.
6398
1e498fbd
SJ
63992003-05-30 Stefan Jahn <stefan@lkcc.org>
6400
6401 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6402 appropriately for mingw32 hosts.
6403
6404 * numbers.h: Defining copysign(), isnan() and finite() to
6405 be prefixed by a single '_' for mingw32 hosts.
6406
c47e2599
KR
64072003-05-30 Kevin Ryde <user42@zip.com.au>
6408
6409 * numbers.c (z_negative_one): New variable.
6410 (scm_init_numbers): Initialize it.
6411 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6412
2e945bcc
SJ
64132003-05-29 Stefan Jahn <stefan@lkcc.org>
6414
6415 * win32-dirent.c: Use malloc() instead of scm_malloc().
6416
6417 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6418 warning.
6419
6420 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6421 mingw32 build.
6422
6423 * modules.c (s_scm_module_import_interface): Renamed local
6424 variable interface to _interface. Seems like 'interface'
6425 is a special compiler directive for the mingw32 compiler.
6426
6427 * mkstemp.c: Provide prototype to avoid compiler warning.
6428
6429 * load.c (s_scm_search_path): Fixed absolute and relative
6430 path detections for native Windows platforms.
6431
6432 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6433 to build on mingw32).
6434
6435 * gc-freelist.c ("s_scm_map_free_list",
6436 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6437
6438 * fports.c (fport_fill_input): Disable use of
6439 fport_wait_for_input() on Win32 platforms.
6440
6441 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6442
6443 * Makefile.am: Modified some rules for cross compiling.
6444
ddd8f927
DH
64452003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6446
6447 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6448 proper function object and the correct number of arguments are now
6449 performed in the application part of SCM_CEVAL.
6450
6451 (scm_badformalsp): Removed.
6452
f8ba2197
DH
64532003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6454
6455 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6456
79f55b7c
MD
64572003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6458
a502595f
MD
6459 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6460 always being false by inserting preprocessor conditional. (Thanks
6461 to Bruce Korb.)
6462
79f55b7c
MD
6463 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6464 (void *) in order to avoid an aliasing warning; thanks to Bruce
6465 Korb.)
6466
6467 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6468
6469 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6470 SCM_STACK_PTR.
6471
6472 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6473 thread->base --> t->base.
6474
6475 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6476
47dee228
MV
64772003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6478
6479 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6480 scm_variable_set_name_hint, scm_builtin_variable,
6481 scm_internal_with_fluids, scm_make_gsubr,
6482 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6483 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6484 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6485 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6486 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6487 scm_make_subr_with_generic, scm_make_subr_opt,
6488 scm_call_catching_errors, scm_make_smob_type_mfpe,
6489 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6490 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6491 branch. Some have been slightly rewritten.
6492 (scm_i_object_chars, scm_i_object_length): New, to support
6493 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6494
e681d187
DH
64952003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6496
6497 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6498 names and inits in the memoized code of do.
6499
7e59d9d4
MD
65002003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6501
6502 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6503 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6504 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6505 a compilation error if error-on-warning is enabled).
6506
9950a42c
MV
65072003-05-17 Marius Vollmer <mvo@zagadka.de>
6508
6509 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6510 removes preprocessor directives from the snarfage that might
6511 otherwise confuse us. These directives appear when compiling with
6512 "-g3", for example.
6513
0068984b
HWN
65142003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6515
26e68795
HWN
6516 * ChangeLog: add my surname
6517
0068984b
HWN
6518 * srcprop.c (scm_finish_srcprop): use
6519 scm_gc_register_collectable_memory()
6520 (scm_make_srcprops): idem.
6521
131805f0
HWN
65222003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6523
6524 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6525 wrap-around for scm_mtrigger
6526 (scm_gc_register_collectable_memory): abort on overflowing
6527 scm_mallocated().
6528
d4611024
KR
65292003-05-13 Kevin Ryde <user42@zip.com.au>
6530
6531 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6532 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6533
7aaf8dc9
MD
65342003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6535
dfd03fb9
MD
6536 * backtrace.c (scm_display_error_message): Introduced fancy
6537 printing with max level 7 and length 10. (Purpose: avoid printing
6538 gigantic objects in error messages.)
6539
6540 * print.c, print.h (scm_i_port_with_print_state): New function.
6541
6542 * print.c (scm_iprin1, scm_printer_apply,
6543 scm_port_with_print_state): Use scm_i_port_with_print_state.
6544 (scm_simple_format): Modified not to destroy print states.
6545 (print_state_mutex): New mutex.
6546 (scm_make_print_state, scm_free_print_state, scm_prin1):
6547 Lock/unlock print_state_mutex.
6548
7aaf8dc9
MD
6549 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6550 Use current names in definitions.
6551
a4d9ffa1
KR
65522003-05-10 Kevin Ryde <user42@zip.com.au>
6553
6554 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6555
d25e96a4
KR
6556 * numbers.c (scm_integer_length): On negative bignums, adjust
6557 mpz_sizeinbase to account for it looking at absolute value where we
6558 want ones-complement.
6559
6560 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6561 since we're only using the ulong return value, and x might not fit.
6562
5bf6a6f0
DH
65632003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6564
6565 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6566 read. This will allow to make the definition in read.c static.
6567
f58c472a
DH
65682003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6569
6570 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6571 from evalext to eval. This will allow to make some of the
6572 definitions in eval.c static.
6573
90382aeb
KR
65742003-05-06 Kevin Ryde <user42@zip.com.au>
6575
6576 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6577 (scm_logcount): Use mpz_com, not mpz_neg.
6578
3b88ed2a
DH
65792003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6580
6581 The purpose of this patch is to make guile's internal memoizers
6582 distinguishable from memoizing macros created on the scheme level
6583 or from user provided primitive memoizing macros. The reason is,
6584 that the internal memoizers are the only ones that are allowed to
6585 transform their scheme input into memoizer byte code, while all
6586 other memoizing macros may only transform scheme code into new
6587 scheme code.
6588
6589 To achieve this, a new macro type 'builtin-macro!' is introduced.
6590 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6591 this will change when the memoizer and executor are separated.
6592
6593 * macros.[ch] (scm_i_makbimacro): New.
6594
6595 * macros.h (SCM_BUILTIN_MACRO_P): New.
6596
6597 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6598
6599 * eval.c, goops.c: All of guile's primitive memoizing macros are
6600 primitive builtin-macros now.
6601
6602 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6603 builtin-macros are handled equally to memoizing macros.
6604
b0780eb1
MV
66052003-05-04 Marius Vollmer <mvo@zagadka.de>
6606
6607 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6608 work around a bug in GCC 2.95.2 but is now a bug in itself.
6609
1cbf4fe9
MV
66102003-05-02 Marius Vollmer <mvo@zagadka.de>
6611
6612 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6613 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6614 scm_tcs_symbols): New.
6615
1a61d41b
MV
66162003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6617
096ecbaf
MV
6618 * deprecated.h, deprecated.c (scm_protect_object,
6619 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6620 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6621 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6622 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6623 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6624 scm_ptob_descriptor, scm_port_rw_active,
6625 scm_close_all_ports_except): New.
6626
1a61d41b
MV
6627 * ports.c (scm_c_port_for_each): New function, mostly copied from
6628 scm_port_for_each.
6629 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6630 * ports.h (scm_c_port_for_each): New prototype.
6631
c8e1d354
MD
66322003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6633
6634 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6635 macro was introduced in anticipation of GOOPS method compilation
6636 code.)
6637
6638 * goops.c: Removed binding of @dispatch.
6639
a4aa2134
DH
66402003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6641
6642 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6643 instructions that bind the macros on the scheme level back to
6644 goops.c in order to make sure again that the bindings go into the
6645 (oop goops) module and are not visible from the outside.
6646
9fbee57e
DH
66472003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6648
6649 * eval.c: Non functional change: Separated R5RS and non-R5RS
6650 macros into different sections of the file and ordered the
6651 memoizers alphabetically.
6652
12841895
DH
66532003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6654
6655 * eval.c (scm_ilookup): Rewritten to improve readability.
6656
6a3f13f0
DH
66572003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6658
6659 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6660 Partially reverted patch from 2003-04-23 in oder to find a better
6661 compromise between readability and debuggability.
6662
b0c5d67b
DH
66632003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6664
6665 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6666 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6667 definitions of the special goops memoizers from goops.[ch] to
6668 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6669 throughout guile.
6670
b9ad392e
MD
66712003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6672
6673 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6674
6675 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6676
6677 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6678
6679 * ioext.c (scm_fdes_to_ports): Ditto.
6680
6681 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6682 lock/unlock scm_i_port_table_mutex.
6683
6684 * strports.c (scm_mkstrport): Ditto.
6685
6686 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6687
6688 * fports.c (scm_fdes_to_port): Ditto.
6689
d0b07b5d
DH
66902003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6691
6692 This set of patches contains no functional changes, only debatable
6693 minor stylistic ones. Still, in order to prepare a patch between
6694 my local copy and the CVS version, I decided to submit the changes
6695 below. Then, the patch will hopefully only contain relevant
6696 modifications :-)
6697
6698 * eval.c (iqq): Added const specifier.
6699
6700 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6701 Use NULL instead of 0 to indicate that a pointer is returned.
6702 Removed some misleading 'fall through' comments.
6703
6704 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6705 Split up long expressions into smaller ones to be more debugging
6706 friendly.
6707
a98e8e98
DH
67082003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6709
6710 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6711 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6712 rather than casting to SCM.
6713
c178c3a6
DH
67142003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6715
6716 * sort.c, pairs.h: Removed unnecessary includes.
6717
d339981a
DH
67182003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6719
6720 * sort.c: Replaced hand-made trampline code by the new official
6721 mechanism from eval.c. This fixes a segfault in the new test file
6722 sort.test.
6723
6724 (quicksort, compare_function, scm_restricted_vector_sort_x,
6725 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6726 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6727 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6728 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6729 eval.c.
6730
6731 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6732 cmp_fun_t): Removed.
6733
6734 (compare_function): Added.
6735
6736 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6737 arithmetics with index arithmetics. Changed quicksort to work on
6738 an array of SCM values instead of an array of characters. Avoid
6739 bytewise copying of SCM elements. Avoid allocating memory on the
6740 stack with alloca. Fixed some comments.
6741
821f18a4
DH
67422003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6743
6744 * eval.c (EXTEND_ENV): Eliminated.
6745
6746 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6747 EXTEND_ENV.
6748
94fb5a6e
DH
67492003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6750
6751 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6752
6753 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6754 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6755
6756 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6757 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6758 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6759 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6760 functions such that they check if the object is a non-immediate.
6761 Further, renamed identifiers to use the scm_dbg_ prefix and made
6762 their inclusion into the lib dependent of the
6763 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6764
fce0b22d
DH
67652003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6766
6767 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6768 debug option.
6769
1685446c
DH
67702003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6771
821f18a4 6772 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6773 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6774 any calls to SCM_NCONSP any more.
6775
6776 * unif.c (l2ra): Eliminate redundant check.
6777
9ff1720f
DH
67782003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6779
6780 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6781 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6782 SCM_NNULLP. Now, guile itself does not include any calls to
6783 SCM_NNULLP any more.
6784
05b15362
DH
67852003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6786
6787 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6788 scm_copy_tree): Place assignment expressions which are part of
6789 other expressions into an expression of their own.
6790
0c88d7df
DH
67912003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6792
6793 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6794 compare SCM values with !=.
6795
5cb22e96
DH
67962003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6797
6798 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6799 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6800 and definition of the memoizer for the generalized set! macro from
6801 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6802 define the macro object.
6803
6804 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6805 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6806 eval.c, it is made static and renamed to s_set_x.
6807
6808 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6809 over SCM_N<foo>.
6810
a44a9715
DH
68112003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6812
6813 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6814 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6815 to undefineds and registered the object as a permanent object.
6816
6817 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6818 static in eval.c, renamed it to f_apply and registered the object
6819 as a permanent object.
6820
1b43d24c
DH
68212003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6822
5cb22e96 6823 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6824 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6825
aec16f99
DH
68262003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6827
6828 * numbers.c (scm_logtest): Fixed argument bug in the call to
6829 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6830
f96460ce
DH
68312003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6832
6833 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6834 type errors that showed up when compiling with SCM_DEBUG defined.
6835
d0f6ceb8
DH
68362003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6837
6838 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6839 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6840 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6841 fix compile errors with --disable-deprecated.
6842
19a7a089
RB
68432003-04-17 Rob Browning <rlb@defaultvalue.org>
6844
6845 * numbers.c (scm_integer_expt): fix case where we were declaring
6846 vars in the middle of a statement block. Thanks to Thamer
6847 Al-Harbash.
6848
47cd67db
MD
68492003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6850
0fd7dcd3
MD
6851 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6852 change.
6853
47cd67db
MD
6854 * eq.c (scm_eqv_p): Turned into a primitive generic.
6855
3b8b889c
RB
68562003-04-16 Rob Browning <rlb@defaultvalue.org>
6857
312006bb
RB
6858 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6859 Thanks to Boyd Gerber.
6860 Added check for __arm__ in addition to arm for LINUX and copied
6861 __s390__ defines from upstream libgc. Thanks to James Treacy for
6862 reporting the problems.
c7ef2ea1 6863
3b8b889c
RB
6864 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6865
6866 * socket.c: use SCM_CHAR_BIT.
6867
6868 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6869
6870 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6871
43261b39
MD
68722003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6873
6874 * feature.c (scm_init_feature): Always add threads feature.
6875
58241edc
MD
68762003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6877
6878 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6879 scm_at_assert_bound_ref. (We don't want the unbound check. See
6880 oop/goops/active-slot.scm.)
6881
94e91275
RB
68822003-04-14 Rob Browning <rlb@defaultvalue.org>
6883
6884 * tags.h: scm_t_intptr should have been intptr_t.
6885
3071ea27
RB
68862003-04-13 Rob Browning <rlb@defaultvalue.org>
6887
6888 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6889 test. Instead use
6890 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6891 as gc_os_dep.c suggests is appropriate.
6892
6893 * goops.c (prep_hashsets): make static to match prototype.
6894 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6895 Chin.
6896
6897 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6898 Albert Chin.
6899
6900 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6901 Klausner.
6902
21ab2aeb
MD
69032003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6904
6905 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6906 indicated through extra fields in getters-n-setters.
6907 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6908 (Thanks to Andy Wingo.)
6909
dff96e95
HWN
69102003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6911
6912 * gc-segment.c: add comment
6913
07921c76
RB
69142003-04-07 Rob Browning <rlb@defaultvalue.org>
6915
b5331f10
RB
6916 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6917 clash.
6918
07921c76
RB
6919 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6920 and add regression test to standalone/.
6921
69222003-04-06 Rob Browning <rlb@defaultvalue.org>
6923
6924 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6925 Thanks to Dale P. Smith.
6926
6927 * random.c: #include gmp.h.
6928 (scm_c_random_bignum): normalize result on return.
6929
6930 * init.c: #include gmp.h.
6931
6932 * numbers.h: remove the gmp.h #include (not needed now).
6933
6934 * posix.h: change occurences of "id" to something else so we don't
6935 cause trouble when included via objective-c (can't hurt, might
6936 help). Still have usage in debug.h, though.
6937
938f6b7c
MD
69382003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6939
372691d8
MD
6940 * random.c (scm_c_random_bignum): Don't generate a random number
6941 equal to m (the second argument of scm_c_random_bignum); only
6942 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6943 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6944 scm_var_random_state.
372691d8 6945
938f6b7c
MD
6946 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6947 clause.
6948
6cdb8c3f
RB
69492003-04-05 Rob Browning <rlb@defaultvalue.org>
6950
938f6b7c 6951 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6952 uses before any code.
6953
15635be5
MD
69542003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6955
1ecfd013
MD
6956 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6957 not top_srcdir.
6958
15635be5
MD
6959 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6960 processing it in order to avoid an infinite loop.
6961
6962 * print.c (scm_prin1): Remember old state of pstate->writingp.
6963
73be1d9e
MV
69642003-04-05 Marius Vollmer <mvo@zagadka.de>
6965
6966 * Changed license terms to the plain LGPL thru-out.
6967
ad815c06
RB
69682003-04-04 Rob Browning <rlb@defaultvalue.org>
6969
6970 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6971 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6972 rewrite to handle GMP bignums.
6973
6974
6975 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6976
6977 * ports.c (scm_getc): minor tweak.
6978
6979 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6980 rewrite to handle GMP bignums.
6981
6982 * numbers.c: rewrite *many* functions to handle GMP bignums.
6983
6984 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6985 handle GMP bignums.
6986
6987 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6988
6989 * init.c (check_config): remove SCM_BIGDIG conditionals.
6990 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6991
6992 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6993
6994 * eval.c: remove SCM_BIGDIG conditionals.
6995
6996 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6997
6cdb8c3f
RB
69982003-03-31 Rob Browning <rlb@defaultvalue.org>
6999
7000 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
7001 to Kevin Ryde.)
7002
70032003-03-27 Rob Browning <rlb@defaultvalue.org>
7004
7005 * threads.h: fix various preprocessor usages of new public
7006 symbols to expect 0 or 1 values rather than 1 or undefined.
7007 i.e. change #ifdef to #if, etc.
7008
7009 * threads.c: fix various preprocessor usages of new public
7010 symbols to expect 0 or 1 values rather than 1 or undefined.
7011 i.e. change #ifdef to #if, etc.
7012
7013 * tags.h: fix various preprocessor usages of new public
7014 symbols to expect 0 or 1 values rather than 1 or undefined.
7015 i.e. change #ifdef to #if, etc.
7016
7017 * stacks.c: fix various preprocessor usages of new public
7018 symbols to expect 0 or 1 values rather than 1 or undefined.
7019 i.e. change #ifdef to #if, etc.
7020
7021 * stackchk.h: fix various preprocessor usages of new public
7022 symbols to expect 0 or 1 values rather than 1 or undefined.
7023 i.e. change #ifdef to #if, etc.
7024
7025 * stackchk.c: fix various preprocessor usages of new public
7026 symbols to expect 0 or 1 values rather than 1 or undefined.
7027 i.e. change #ifdef to #if, etc.
7028
7029 * sort.c: fix various preprocessor usages of new public
7030 symbols to expect 0 or 1 values rather than 1 or undefined.
7031 i.e. change #ifdef to #if, etc.
7032
7033 * read.c: fix various preprocessor usages of new public
7034 symbols to expect 0 or 1 values rather than 1 or undefined.
7035 i.e. change #ifdef to #if, etc.
7036
7037 * random.c: fix various preprocessor usages of new public
7038 symbols to expect 0 or 1 values rather than 1 or undefined.
7039 i.e. change #ifdef to #if, etc.
7040
7041 * print.c: fix various preprocessor usages of new public
7042 symbols to expect 0 or 1 values rather than 1 or undefined.
7043 i.e. change #ifdef to #if, etc.
7044
7045 * objects.c: fix various preprocessor usages of new public
7046 symbols to expect 0 or 1 values rather than 1 or undefined.
7047 i.e. change #ifdef to #if, etc.
7048
7049 * numbers.h: fix various preprocessor usages of new public
7050 symbols to expect 0 or 1 values rather than 1 or undefined.
7051 i.e. change #ifdef to #if, etc.
7052
7053 * null-threads.c: fix various preprocessor usages of new public
7054 symbols to expect 0 or 1 values rather than 1 or undefined.
7055 i.e. change #ifdef to #if, etc.
7056
7057 * lang.c: fix various preprocessor usages of new public
7058 symbols to expect 0 or 1 values rather than 1 or undefined.
7059 i.e. change #ifdef to #if, etc.
7060
7061 * lang.h: fix various preprocessor usages of new public
7062 symbols to expect 0 or 1 values rather than 1 or undefined.
7063 i.e. change #ifdef to #if, etc.
7064
7065 * iselect.h: fix various preprocessor usages of new public
7066 symbols to expect 0 or 1 values rather than 1 or undefined.
7067 i.e. change #ifdef to #if, etc.
7068
7069 * init.c: fix various preprocessor usages of new public
7070 symbols to expect 0 or 1 values rather than 1 or undefined.
7071 i.e. change #ifdef to #if, etc.
7072
7073 * gh_data.c: fix various preprocessor usages of new public
7074 symbols to expect 0 or 1 values rather than 1 or undefined.
7075 i.e. change #ifdef to #if, etc.
7076
7077 * gh.h: fix various preprocessor usages of new public
7078 symbols to expect 0 or 1 values rather than 1 or undefined.
7079 i.e. change #ifdef to #if, etc.
7080
7081 * gen-scmconfig.c: change most new public symbols to be defined to
7082 0 or 1 rather than being either 1 or undefined.
7083
7084 * gc_os_dep.c: fix various preprocessor usages of new public
7085 symbols to expect 0 or 1 values rather than 1 or undefined.
7086 i.e. change #ifdef to #if, etc.
7087 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
7088
7089 * gc.h: fix various preprocessor usages of new public
7090 symbols to expect 0 or 1 values rather than 1 or undefined.
7091 i.e. change #ifdef to #if, etc.
7092
7093 * gc-card.c: fix various preprocessor usages of new public
7094 symbols to expect 0 or 1 values rather than 1 or undefined.
7095 i.e. change #ifdef to #if, etc.
7096
7097 * gc-mark.c: fix various preprocessor usages of new public
7098 symbols to expect 0 or 1 values rather than 1 or undefined.
7099 i.e. change #ifdef to #if, etc.
7100
7101 * feature.c: fix various preprocessor usages of new public
7102 symbols to expect 0 or 1 values rather than 1 or undefined.
7103 i.e. change #ifdef to #if, etc.
7104
7105 * evalext.c: fix various preprocessor usages of new public
7106 symbols to expect 0 or 1 values rather than 1 or undefined.
7107 i.e. change #ifdef to #if, etc.
7108
7109 * eval.h: fix various preprocessor usages of new public
7110 symbols to expect 0 or 1 values rather than 1 or undefined.
7111 i.e. change #ifdef to #if, etc.
7112
7113 * eval.c: fix various preprocessor usages of new public
7114 symbols to expect 0 or 1 values rather than 1 or undefined.
7115 i.e. change #ifdef to #if, etc.
7116
7117 * eq.c: fix various preprocessor usages of new public
7118 symbols to expect 0 or 1 values rather than 1 or undefined.
7119 i.e. change #ifdef to #if, etc.
7120
7121 * coop.c: fix various preprocessor usages of new public
7122 symbols to expect 0 or 1 values rather than 1 or undefined.
7123 i.e. change #ifdef to #if, etc.
7124
7125 * coop-threads.c: fix various preprocessor usages of new public
7126 symbols to expect 0 or 1 values rather than 1 or undefined.
7127 i.e. change #ifdef to #if, etc.
7128
7129 * coop-pthreads.c: fix various preprocessor usages of new public
7130 symbols to expect 0 or 1 values rather than 1 or undefined.
7131 i.e. change #ifdef to #if, etc.
7132
7133 * coop-defs.h: fix various preprocessor usages of new public
7134 symbols to expect 0 or 1 values rather than 1 or undefined.
7135 i.e. change #ifdef to #if, etc.
7136
7137 * convert.i.c: 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 * continuations.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 * _scm.h: fix various preprocessor usages of new public symbols to
7146 expect 0 or 1 values rather than 1 or undefined. i.e. change
7147 #ifdef to #if, etc.
7148
d11d697a
MV
71492003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7150
9686f86d
MV
7151 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
7152
7153 * deprecated.c, deprecated.h: New files, to collect deprecated
7154 things in one place.
7155 * Makefile.am: Added them in all the right places.
7156
d11d697a
MV
7157 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
7158 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
7159 builds work.
9686f86d
MV
7160 (DOT_X_FILES): Removed "iselect.x".
7161 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 7162
e3c0c3b9
RB
71632003-03-25 Rob Browning <rlb@defaultvalue.org>
7164
7165 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
7166 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
7167
7168 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
7169
7170 * vports.c: #include <config.h> if HAVE_CONFIG_H.
7171
7172 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
7173 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7174
7175 * threads.h: replace usage of struct timespect with
7176 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
7177 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
7178 favor of scm_t_timespec from scmconfig.h.
7179
7180 * threads.c: move libguile/_scm.h include to the top so we pick up
7181 any critical defines like _GNU_SOURCE early. Replace usage of
7182 struct timespect with scm_t_timespec. Replace usage of
7183 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
7184 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
7185
7186 * threads-plugin.h: replace usage of struct timespect with
7187 scm_t_timespec.
7188
7189 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
7190 usage of struct timespect with scm_t_timespec.
7191
7192 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
7193 HAVE_INTTYPES_H handling to scmconfig.h. #include
7194 "libguile/__scm.h". Rework handling for scm_t_bits,
7195 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7196 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
7197 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
7198 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
7199 SCM_HAVE_ARRAYS.
7200
7201 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
7202
7203 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7204
7205 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7206
7207 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7208
7209 * stime.h: move handling of time related headers to scmconfig.h.
7210
7211 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7212
7213 * stacks.c: replace usage of STACK_GROWS_UP with
7214 SCM_STACK_GROWS_UP.
7215
7216 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7217 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7218
7219 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7220 of uint32 and HAVE_UINT_32 with scm_t_int32.
7221
7222 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7223
7224 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7225
7226 * script.c: #include <config.h> if HAVE_CONFIG_H.
7227
7228 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7229
7230 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7231
7232 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7233
7234 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7235
7236 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7237
7238 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7239
7240 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7241 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7242 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7243 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7244
7245 * ramap.c: replace usage of HAVE_LONG_LONGS with
7246 "SCM_SIZEOF_LONG_LONG != 0".
7247
7248 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7249 "libguile/scmconfig.h".
7250
7251 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7252
7253 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7254 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7255
7256 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7257
7258 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7259
7260 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7261
7262 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7263 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7264 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7265 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7266 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7267 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7268 "SCM_SIZEOF_LONG_LONG != 0".
7269
7270 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7271 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7272 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7273 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7274
7275 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7276
7277 * null-threads.h: replace usage of struct timespect with
7278 scm_t_timespec.
7279
7280 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7281
7282 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7283 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7284 scm_t_uint64 and rename usages.
7285
7286 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7287
7288 * load.c: #include <config.h> if HAVE_CONFIG_H.
7289
7290 * iselect.h: move handling of time related headers to scmconfig.h.
7291 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7292 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7293 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7294
7295 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7296 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7297 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7298
7299 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7300
7301 * inline.h: #include "libguile/__scm.h" at the top. Change code
7302 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7303 what to do instead of creating a new public #define. Rename usage
7304 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7305 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7306 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7307
7308 * inline.c: rearrange handling -- now we just #define
7309 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7310 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7311 appropriate, and we use that in inline.h along with the above
7312 define to determine how to respond.
7313
7314 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7315 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7316
7317 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7318
7319 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7320 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7321
7322 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7323
7324 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7325
7326 * gen-scmconfig.c: new file -- see comments in file for details.
7327
7328 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7329
7330 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7331 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7332
7333 * gc.h: replace usage of SIZEOF_LONG with
7334 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7335 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7336 since we handle that in scmconfig.h now.
7337
7338 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7339
7340 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7341 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7342 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7343
7344 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7345
7346 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7347 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7348
7349 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7350
7351 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7352
7353 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7354 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7355
7356 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7357
7358 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7359 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7360
7361 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7362 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7363 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7364 with "SCM_SIZEOF_LONG_LONG != 0".
7365
7366 * error.c: #include <config.h> if HAVE_CONFIG_H.
7367
7368 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7369 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7370 with "SCM_SIZEOF_LONG_LONG != 0".
7371
7372 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7373
7374 * coop.c: replace usage of struct timespect with scm_t_timespec.
7375 #include <config.h> if HAVE_CONFIG_H.
7376
7377 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7378 usage of struct timespect with scm_t_timespec. Replace usage of
7379 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7380
7381 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7382 usage of struct timespect with scm_t_timespec. Replace usage of
7383 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7384
7385 * coop-defs.h: move handling of time related headers to
7386 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7387 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7388 timespect with scm_t_timespec.
7389
7390 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7391
7392 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7393
7394 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7395 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7396
7397 * continuations.c: move libguile/_scm.h include to the top so we
7398 pick up any critical defines like _GNU_SOURCE early.
7399
7400 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7401
7402 * async.c: #include <config.h> if HAVE_CONFIG_H.
7403
7404 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7405
7406 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7407 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7408
7409 * __scm.h: move libguile/scmconfig.h include up to the top, so
7410 we're sure to pick up any critical defines like _GNU_SOURCE early.
7411 #include <limits.h> removed in favor of scmconfig.h inclusion when
7412 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7413 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7414 scmconfig.h inclusion when appropriate. Various Win32 related
7415 definitions removed in favor of scmconfig.h inclusion when
7416 appropriate.
7417 (HAVE_UINTPTR_T): definition removed (see NEWS).
7418 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7419 (HAVE_LONG_LONGS): definition removed (see NEWS).
7420 (HAVE_LONG_LONG): definition removed (see NEWS).
7421 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7422
7423 * Makefile.am: scmconfig.h is now generated by building and
7424 running gen-scmconfig.h and capturing its output. gen-scmconfig
7425 uses config.h and the configure.in generated gen-scmconfig.h to
7426 decide what to output. See gen-scmconfig.c for details.
7427 (noinst_PROGRAMS): add gen-scmconfig.
7428 (gen_scmconfig_SOURCES): new variable.
7429 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7430 cross-compiling right.
7431 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7432 (BUILT_SOURCES): add scmconfig.h.
7433
25e0bf97
MV
74342003-03-19 Marius Vollmer <mvo@zagadka.de>
7435
7436 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7437 Adrian Bunk. Thanks!
7438
74b6d6e4
MD
74392003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7440
7441 * goops.c (make_class_from_template): New fourth arg:
7442 applicablep.
7443 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7444 cpls.
7445
7446 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7447
7448 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7449 second arg: applicablep.
7450 (scm_i_inherit_applicable): New function.
7451
7452 * goops.c, goops.h (scm_class_applicable,
7453 scm_class_extended_accessor): New classes.
7454
5c9e7dad
DH
74552003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7456
7457 * procs.c (scm_procedure_documentation): Removed redundant
7458 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7459 predicates.
7460
f8af5c6d
MD
74612003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7462
c614a00b
MD
7463 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7464
109c2c9f
MD
7465 * modules.c (scm_module_import_interface): New function.
7466
f8af5c6d
MD
7467 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7468 scm_class_accessor.
7469 (scm_class_accessor): New class.
7470
a48d60b1
MD
74712003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7472
7473 * goops.c (scm_primitive_generic_generic): Enable primitive
7474 generic if not enabled.
7475 (scm_sys_goops_loaded): Setup unextended primitive generics.
7476
7477 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7478
7479 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7480 snarf macros.
7481
7482 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7483 testing example. All uses of SCM_GPROC should be converted.)
7484
7485 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7486 scm_assoc.
7487
7488 * eq.c (scm_equal_p): Turned into a primitive generic.
7489
84edc049
RB
74902003-02-27 Rob Browning <rlb@defaultvalue.org>
7491
7492 * Makefile.am (scmconfig.h): new target -- generate file from
7493 ../config.h.
7494 (modinclude_HEADERS): remove version.h.
7495 (nodist_modinclude_HEADERS): add version.h.
7496
ea5c9285
MD
74972003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7498
b4a1358c
MD
7499 This fixes a serious GC bug, introduced during the latest
7500 reorganization of the GC, which disabled freeing of structs and
7501 GOOPS objects:
7502
7503 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7504 SCM_EOL.
53af8255
MD
7505 (scm_struct_prehistory): Move scm_free_structs to
7506 scm_before_mark_c_hook.
ea5c9285 7507
b4a1358c
MD
7508 * gc-card.c (sweep_card): Check that we haven't swept structs on
7509 this card before. That can happen if scm_i_sweep_all_segments has
7510 been called from some other place than scm_igc.
7511
c35738c1
MD
75122003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7513
231a4ea8
MD
7514 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7515 (since hash tables now adapt their size).
7516
7517 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7518 (current number of prehistory bindings; hashtable code will select
7519 a prime which is greater than this value).
7520
7521 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7522 (current number of initial symbols).
7523
7524 * properties.c (scm_init_properties): Don't specify size of
7525 scm_properties_whash.
7526
7527 * objprop.c (scm_init_objprop): Don't specify size of
7528 scm_object_whash.
7529
7530 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7531
c35738c1
MD
7532 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7533
7534 The following changes introduce the use of resizable hash tables
7535 throughout Guile. It also renames the old *-hash-table* functions
7536 to *-alist-vector* and places them, together with the rest of the
7537 weak vector support, in the module (ice-9 weak-vector). We should
7538 probably introduce a new, better, API for weak references, for
7539 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7540 look like and are used like ordinary pairs.)
7541
7542 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7543 leaf_environment_fold, obarray_remove_all): Use hashtable
7544 accessors.
7545
7546 * gc.c (scm_init_storage): Moved hook initialization to
7547 scm_storage_prehistory.
7548 (scm_storage_prehistory): New function.
7549 (scm_igc): Added commentary about placement of
7550 scm_after_sweep_c_hook.
7551
7552 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7553 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7554 SCM_WVECT_WEAK_VALUE_P.
7555
7556 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7557 functions.
7558 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7559 Removed.
7560 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7561 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7562
7563 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7564 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7565
7566 * modules.c (module-reverse-lookup): Use hashtable accessors.
7567
7568 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7569
7570 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7571 scm_make_weak_value_alist_vector,
7572 scm_make_doubly_weak_alist_vector): New functions.
7573
7574 * weaks.c (scm_init_weaks_builtins): New function.
7575
7576 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7577 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7578 SCM_WVECT_NOSCAN_P): New macros.
7579
7580 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7581 and SCM_WVECT_WEAK_VALUE_P.
7582
7583 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7584 allocate_weak_vector and exported.
7585
0a4c1355
MD
75862003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7587
7588 * hashtab.c: Undid thread safety. (We decided that it's better to
7589 let the user explicitly protect the tables (or not) according what
7590 is suitable for the application.)
7591
87ca11ff
MD
75922003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7593
7594 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7595 thread safe and handle resizing tables.
7596 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7597 SCM_DEFER/ALLOW_INTS.
7598
f59a096e
MD
75992003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7600
7601 * hashtab.c (scm_vector_to_hash_table,
7602 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7603 functions.
7604 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7605 safe and handle resizing tables.
7606
7607 * weaks.c (scm_make_weak_key_hash_table,
7608 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7609 Size argument made optional. Return resizable table if not
7610 specified.
7611
4b612c5b
MD
76122003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7613
7614 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7615 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7616
b3d7f6df
MD
76172003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7618
7619 * debug.c (scm_procedure_source): Handle all objects for which
7620 procedure? is #t. (Thanks to Bill Schottstaedt.)
7621
756414cf
MD
76222003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7623
361d631f
MD
7624 * futures.c (mark_futures): Don't need to mark data of recycled
7625 futures.
7626 (scan_futures, cleanup_undead): Be smarter about marking
7627 futures---avoid unnecessary passes through future lists.
7628
756414cf
MD
7629 * futures.h, futures.c: New files; Introduced recycling of
7630 futures. For fine-grained threading this lifts performance to
7631 another level. We can now use parallelization in inner loops of
7632 Guile programs without impossible overhead.
7633
7634 * threads.h, threads.c: Moved futures to their own file.
7635
7636 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7637 (DOT_X_FILES): Added futures.x.
7638 (DOT_DOC_FILES): Added futures.doc.
7639 (modinclude_HEADERS): Added futures.h.
7640
7641 * threads.c, threads.h (scm_i_create_thread): Renamed from
7642 create_thread and made global.
7643
7644 * futures.c (scm_make_future): New procedure.
7645
7646 * eval.c: #include "libguile/futures.h".
7647
7648 * init.c: #include "futures.h"
7649 (scm_init_guile_1): Call scm_init_futures.
7650
7651 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7652
7653 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7654
7655 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7656 functions.
7657
7658 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7659
b4debead
MD
76602003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7661
7662 * threads.c (create_thread): Don't unwind dynwind chain of parent
7663 thread before creation. Just start the new thread with an empty
7664 dynwind chain.
7665
93f26b7b
MD
76662003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7667
7668 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7669
38d8927c
MD
76702003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7671
41c96c32
MD
7672 * threads.c (scm_timed_wait_condition_variable): Support timed
7673 waiting also for simple condition variables.
7674
38d8927c
MD
7675 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7676 of calling the procedure change-object-class.
7677
9cf5d9b7
MD
76782003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7679
7680 * ramap.c (scm_ramapc): Typo in error message.
7681
bbf8d523
MD
76822003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7683
b46fae00
MD
7684 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7685 slots with instance allocation.
7686
bbf8d523
MD
7687 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7688 class.
7689 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7690
7691 * goops.c (scm_generic_function_methods): Support extended
7692 generic functions.
7693
ebf9b47c
MD
76942002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7695
7696 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7697 Thanks to Neil for pointing this out!
ebf9b47c 7698
14a9ba3f
NJ
76992002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7700
7701 * lang.h: Remove declarations matching definitions removed from
7702 lang.c (just below).
7703
c6a040a8
NJ
77042002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7705
6054d805
NJ
7706 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7707 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7708 and already commented out.
7709
c6a040a8
NJ
7710 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7711 scm_lreadparen): Support reading vectors with Elisp syntax if
7712 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7713 is not currently defined, and there isn't even a configure switch
7714 to enable it yet.)
7715
3742c12f
MV
77162002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7717
7718 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7719 builds work.
7720 (EXTRA_DIST): Added version.h.in.
7721
fb50ef08
MD
77222002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7723
7724 This change makes it possible for one thread to do lazy sweeping
7725 while other threads are running. Now only the mark phase need to
7726 have all threads asleep. We should look further into this issue.
7727 Presently, I've put the locking of scm_i_sweep_mutex at
7728 "conservative" places due to my current lack of knowledge about
7729 the garbage collector. Please feel free to restrict these regions
7730 further to allow for maximal parallelism!
7731
7732 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7733
7734 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7735 scm_gc_register_collectable_memory): Substitute locking of
7736 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7737 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7738 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7739 the single-thread section (which now only contains the mark
7740 phase).
7741 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7742 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7743
7744 * threads.c (gc_section_mutex): Removed.
7745
9ed24633
MD
77462002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7747
0d48aca5
MD
7748 * threads.c (create_thread): Clear parent field in root state in
7749 order not to unnecessarily remember dead threads.
7750
9ed24633
MD
7751 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7752 (scm_trampoline_1, scm_trampoline_2): Use them.
7753
29717c89
MD
77542002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7755
7756 Partial introduction of real plugin interface.
7757
7758 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7759 (EXTRA_DIST): Added threads-plugin.c.
7760
7761 * threads-plugin.h, threads-plugin.c: New files.
7762
7763 * threads.h: #include "libguile/threads-plugin.h".
7764
7765 * threads.c: #include "libguile/threads-plugin.c".
7766
7767 * pthread-threads.c: Temporarily remove debugging functions.
7768
7769 * threads.c, threads.h (scm_yield): Added back.
7770
e29e0b09
MD
77712002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7772
7773 * threads.c (really_launch): Detach before unlocking
7774 thread_admin_mutex in order not to risk being joined.
7775 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7776 thread_admin_mutex locked during GC.
7777
7778 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7779 functions.
7780
0b6843b1 77812002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7782
6da2dfc4
MD
7783 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7784 support for debugging mutex operations.
7785
1b92fb6b
MD
7786 * threads.c (scm_thread): Removed filed joining_threads.
7787 (thread_print): Print thread number as well as address of thread
7788 structure.
0b6843b1
MD
7789 (scm_join_thread): Bugfix.
7790 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7791 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7792 scm_broadcast_condition_variable): Use the low-level API.
7793 (scm_all_threads): Return copy of thread list (to prevent
7794 unintended destruction).
7795 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7796
93cd4dcd
MD
7797 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7798 pthread "native" recursive mutex support.
7799
2ff4f181
MD
78002002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7801
28d52ebb
MD
7802 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7803 Simply lock a thread C API recursive mutex.
7804 (SCM_NONREC_CRITICAL_SECTION_START,
7805 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7806 SCM_REC_CRITICAL_SECTION_END): Removed.
7807
7808 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7809 direct calls to scm_rec_mutex_lock / unlock around the three calls
7810 to scm_m_expand_body.
7811
7812 * eval.c, eval.h (promise_free): New function.
7813 (scm_force): Rewritten; Now thread-safe; Removed
7814 SCM_DEFER/ALLOW_INTS.
7815
7816 * pthread-threads.h: Added partially implemented plugin interface
7817 for recursive mutexes. These are, for now, only intended to be
7818 used internally within the Guile implementation.
7819
7820 * pthread-threads.c: New file.
7821
7822 * threads.c: Conditionally #include "pthread-threads.c".
7823
7824 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7825 thread-safe;
7826
7827 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7828 SCM_GLOBAL_REC_MUTEX): New macros.
7829
7830 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7831 macros---use mutexes instead.
7832
7833 * tags.h (SCM_IM_FUTURE): New tag.
7834
7835 * eval.c (scm_m_future): New primitive macro.
7836 (SCM_CEVAL): Support futures.
7837 (unmemocopy): Support unmemoization of futures.
7838
7839 * print.c (scm_isymnames): Name of future isym.
7840
2ff4f181
MD
7841 * version.c: Unmade some changes to my private copy that got
7842 committed by mistake.
7843
392d2833
MD
78442002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7845
e200ddee
MD
7846 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7847 2002-12-10.
7848
392d2833
MD
7849 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7850
7851 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7852 logical place.
7853
7854 * threads.c (create_thread): Remember root object until the handle
7855 of the new thread is on all_threads list.
7856
7857 * root.c (scm_make_root): Moved copying of fluids until after
7858 creation of root handle so that the fluids are GC protected. Also
7859 removed the critical section.
7860
c4c52ebe
MD
78612002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7862
960c408c
MD
7863 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7864
3cdde9d6 7865 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7866 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7867 (scm_realloc): Serialize call to realloc
7868 (scm_calloc): Same for calloc.
7869 Thanks to Wolfgang Jaehrling!
7870 (Now we have to make sure all calls to malloc/realloc are made
7871 through scm_malloc.)
7872
960c408c
MD
7873 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7874
c4c52ebe
MD
7875 * threads.c (really_launch): Release heap (to prevent deadlock).
7876 (create_thread): Release heap before locking thread admin mutex.
7877
b0dc3d71
MD
78782002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7879
7880 * threads.c (scm_i_thread_invalidate_freelists): New
7881 function.
7882
7883 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7884
7885 * modules.c (scm_export): Inserted a return statement.
7886
06e80f59
HWN
78872002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7888
7889 * modules.c (scm_export): new function
7890
7891 * gc-card.c: add a note about malloc()/free() overhead.
7892
a12611c3
MD
78932002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7894
7895 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7896 in srcdir.
7897
c7fabadf
MD
78982002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7899
7900 These changes remove scm_ints_disabled (which hasn't has any
7901 effect in Guile for quite some time).
7902
7903 * async.c, error.h (scm_ints_disabled): Removed.
7904
7905 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7906 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7907 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7908 (old_ints): Removed.
7909
7910 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7911 critical section.
7912 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7913 SCM_ALLOW_INTS.
7914
9bc4701c
MD
79152002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7916
52340b65
MD
7917 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7918 Removed accidental #if 0 around these functions.
7919
9bc4701c
MD
7920 These changes are the start of support for preemptive
7921 multithreading. Marius and I have agreed that I commit this code
7922 into the repository although it isn't thoroughly tested and surely
7923 introduces many bugs. The bugs should only be exposed when using
7924 threads, though. Signalling and error handling for threads is
7925 very likely broken. Work on making the implementation cleaner and
7926 more efficient is needed.
7927
7928 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7929 (SCM_NONREC_CRITICAL_SECTION_START,
7930 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7931 SCM_REC_CRITICAL_SECTION_END): New macros.
7932 (SCM_CRITICAL_SECTION_START/END): Defined here.
7933
7934 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7935 the three calls to scm_m_expand_body.
7936
7937 * gc.h: #include "libguile/pthread-threads.h";
7938 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7939
7940 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7941 scm_t_key;
7942
7943 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7944 access.
7945
7946 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7947
7948 * gc-freelist.c, threads.c (really_launch): Use
7949 SCM_FREELIST_CREATE.
7950
7951 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7952
7953 * gc.c (scm_i_expensive_validation_check, scm_gc,
7954 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7955 heap administration so that those pieces of code are executed
7956 single-threaded. We might consider rewriting these code sections
7957 in terms of a "call_gc_code_singly_threaded" construct instead of
7958 calling the pair of scm_i_thread_put_to_sleep () and
7959 scm_i_thread_wake_up (). Also, we would want to have as many of
7960 these sections eleminated.
7961
7962 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7963
7964 * inline.h: #include "libguile/threads.h"
7965
7966 * pthread-threads.h: Macros now conform more closely to the
7967 pthreads interface. Some of them now take a second argument.
7968
7969 * threads.c, threads.h: Many changes.
7970
79712002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7972
7973 * Makefile.am (version.h): Changed $^ --> $< in rule for
7974 version.h.
7975
b2cbe8d8
RB
79762002-12-08 Rob Browning <rlb@defaultvalue.org>
7977
7978 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7979 (SCM_MINOR_VERSION): use @--@ substitution now.
7980 (SCM_MICRO_VERSION): use @--@ substitution now.
7981 (scm_effective_version): new function prototype.
7982
7983 * version.c (scm_effective_version): new function, also add
7984 effective-version.
7985
7986 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7987 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7988 SCM_LIBRARY_DIR.
7989 (version.h): generate this here rather than configure.in. This
7990 approach tracks source edits better (i.e. more immediately).
7991 Might be worth considering for other .in files too.
7992
5441c65c
MV
79932002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7994
7995 Reorganized thread package selection. A thread package now only
7996 implements a small set of pthread like functions and Guile
7997 implements the rest on top of that. Guile's implementation is
7998 what the "coop-pthreads" package has been previously. Support for
7999 "coop" threads has been removed until I get time to add it again.
8000
8001 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
8002 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
8003 null-threads.c, coop-pthreads.c.
8004 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
8005 pthread-threads.h.
8006
8007 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
8008
8009 * threads.h: Do not include "libguile/coop-defs.h". Include
8010 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
8011 (previously deprecated) C level thread API prototypes. They are
8012 now in the thread package specific headers, "null-threads.h" and
8013 "pthread-threads.h".
8014 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
8015 New.
8016 (scm_threads_init): Removed.
8017 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
8018 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
8019 SCM_I_THREAD_SWITCH_COUNT): Define here.
8020 (scm_single_thread_p): Removed.
8021 (scm_call_with_new_thread): Take two args directly instead of list
8022 of two args.
8023 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
8024 SCM_SET_THREAD_LOCAL_DATA): Define here.
8025
8026 * threads.c: Merged with "coop-pthreads.c".
8027
8028 * null-threads.h: Implement pthread-like API as a set of macros.
8029
8030 * pthread-threads.h: New, implement pthread-like API by deferring
8031 to pthread itself.
8032
8033 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
8034 has been lost in the reorganization.
8035
504d99c5
MD
80362002-12-01 Mikael Djurfeldt <mdj@linnaeus>
8037
8038 The following change makes it possible to move procedure
8039 application dispatch outside inner loops. The motivation was
8040 clean implementation of efficient replacements of R5RS primitives
8041 in SRFI-1.
8042
8043 The semantics is clear: scm_trampoline_N returns an optimized
8044 version of scm_call_N (or NULL if the procedure isn't applicable
8045 on N args).
8046
8047 Applying the optimization to map and for-each increases efficiency
8048 noticeably. For example, (map abs ls) is 8 times faster than
8049 before.
8050
8051 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
8052
8053 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
8054
8055 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
8056 (map, for-each): Handle also application on two args as a special
8057 case; Use trampolines.
8058
8059 Other changes:
8060
8061 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
8062 (subr2oless): Removed.
8063 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
8064 vector GC protected.
8065
8066 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
8067 scm_out_of_range.
8068
63dd3413
DH
80692002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8070
8071 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
8072
4ba5f279
MD
80732002-11-17 Mikael Djurfeldt <mdj@linnaeus>
8074
8075 * debug.c (scm_make_iloc): Added missing "return".
8076
56ae231f
MV
80772002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
8078
8079 * strports.c (scm_eval_string_in_module): Validate second arg to
8080 be a module. Thanks to Arno Peters!
8081
80b28865
DH
80822002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8083
8084 * .cvsignore: remove goops.c
8085
c88b1456
DH
80862002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8087
8088 * modules.c (scm_env_top_level, scm_lookup_closure_module,
8089 module_variable, scm_module_lookup_closure,
8090 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
8091 scm_system_module_env_p): Don't compare SCM values with C
8092 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
8093 over SCM_NFALSEP.
8094
a8a19efc
DH
80952002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8096
8097 * eval.h (SCM_MAKE_ILOC): New macro.
8098
8099 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
8100 the iloc bitpattern here.
8101
76734914
MD
81022002-11-14 Mikael Djurfeldt <mdj@linnaeus>
8103
8104 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
8105 part of the API, otherwise it's difficult to write Guile
8106 extensions using non-blocking I/O => moved #include
8107 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
8108
8109 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
8110 s_unlock_mutex.
8111
8b5b4a75
MV
81122002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
8113
8114 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
8115 are defined in configure.in.
8116
8117 * threads.c: Removed SCM_API from function definitions. SCM_API
8118 is only for declarations.
8119
e5a83084
MD
81202002-11-07 Mikael Djurfeldt <mdj@linnaeus>
8121
9be8bb45
MD
8122 * coop-pthreads.h: Added support for thread specific data to the
8123 generic C API for the coop-pthreads case.
8124
e5a83084
MD
8125 * threads.c, threads.h (scm_cond_init): Undo unintentional API
8126 change.
6c214b62 8127 (scm_cond_broadcast): Added missing function.
e5a83084 8128
7edf178e
MV
81292002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8130
8131 * coop.c (coop_next_runnable_thread): Removed, wich should have
8132 happened when GUILE_ISELECT was hard-wired.
8133
7f5b1b77
MV
81342002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8135
7caa1b07
MV
8136 * Makefile.am (libguile_la_SOURCES): Added threads.c
8137 (DOT_DOC_FILES): Added threads.doc.
8138 (DOT_X_FILES): Added threads.x.
8139 (EXTRA_libguile_la_SOURCES): Removed threads.c.
8140 (noinst_HEADERS): Added coop-pthreads.c.
8141 (modinclude_HEADERS): Added coop-pthreads.h.
8142
8143 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
8144 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
8145
bb11cbf4
MV
8146 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
8147 Thanks to Bill Schottstaedt!
8148
1d4cbbed
MV
8149 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
8150
7f5b1b77
MV
8151 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
8152 SCM_COPT_THREADS is defined.
8153 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
8154 is defined.
8155
8156 * coop-pthreads.c: Some harmless renamings of internal stuff.
8157 (create_thread): New, generalized version of
8158 scm_call_with_new_thread.
8159 (scm_call_with_new_thread): Use it.
8160 (scm_spawn_thread): New, use create_thread.
8161
d52f53b1
MV
81622002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8163
8164 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
8165 start testing it now.
8166
8167 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
8168 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
8169 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
8170 is defined.
8171
30f920c3
MV
81722002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
8173
8174 * scmsigs.c (signal_cell_handlers, install_handler_data,
8175 scm_delq_spine_x, really_install_handler, install_handler): New
8176 scheme for triggering signal handlers, to simplify take_signal.
8177 (take_signal): Simplified, to avoid race conditions.
8178 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
8179 hasn't exited yet.
8180
8181 * async.c (scm_async_click): Reset pending_asyncs, handle
8182 signal_asyncs. Don't set cdr of a non-signal async to #f.
8183 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
8184 always. Set pending_asyncs.
8185 (scm_system_async_mark_for_thread): Check that thread has not
8186 exited.
8187 (scm_unmask_signals, decrease_block): Call scm_async_click after
8188 block_asyncs becomes zero.
8189
8190 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
8191 active_asyncs.
8192
8193 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
8194 fields.
8195 * root.c (root_mark): Mark them.
8196 (make_root): Initialize them.
8197
8198 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
8199 USE_COOP_THREADS.
8200 (scm_internal_select): Define one version for USE_COOP_THREADS and
8201 one for USE_NULL_THREADS.
8202 (scm_init_iselect): Likewise.
8203
8204 * inline.h (scm_cell, scm_double_cell): Also allow
8205 USE_COPT_THREADS to not protect the slot initializers.
8206
8207 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8208 because threads need to be initialized before the stack, but
8209 gsubrs such as scm_timed_condition_variable_wait can only be
8210 created later.
8211
8212 * threads.h: Include "coop-pthreads.h" when requested.
8213 (scm_threads_make_mutex, scm_threads_lock_mutex,
8214 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8215 not implemented anyway.
8216 (scm_init_thread_procs, scm_try_mutex,
8217 scm_timed_condition_variable_wait,
8218 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8219 scm_thread_exited_p): New prototypes.
8220 (struct timespec): Define if not already defined.
8221 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8222 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8223 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8224 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8225 deprecated.
8226
8227 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8228 requested.
8229 (scm_thread_exited_p): New.
8230 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8231 registered procedures.
8232 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8233 Use the latter as the procedure for "wait-condition-variable",
8234 thus offering a optional timeout parameter to Scheme.
8235 (scm_wait_condition_variable): Implement in terms of
8236 scm_timed_wait_condition_variable.
8237 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8238 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8239 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8240 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8241 scm_make_mutex, etc, and deprecate.
8242 (scm_init_threads): Do not create smobs, leave this to
8243 scm_threads_init. Do not include "threads.x" file.
8244 (scm_init_thread_procs): New, include "threads.x" here.
8245
8246 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8247 scm_null_mutex_lock, scm_null_mutex_unlock,
8248 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8249 scm_null_condvar_wait, scm_null_condvar_signal,
8250 scm_null_condvar_destroy): Removed.
8251 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8252 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8253 scm_cond_destory): Do not define, they are now deprecated and
8254 handled by threads.{h,c}.
8255
8256 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8257 (scm_threads_init): Create smobs here, using the appropriate
8258 sizes.
8259 (block): Removed, now unused.
8260 (scm_c_thread_exited_p): New.
8261 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8262 scm_null_mutex_destroy, scm_null_condvar_init,
8263 scm_null_condvar_wait, scm_null_condvar_signal,
8264 scm_null_condvar_destroy): Removed and updated users to do their
8265 task directly.
8266 (scm_try_mutex, timeval_subtract,
8267 scm_timed_wait_condition_variable,
8268 scm_broadcast_condition_variable): New.
8269 (scm_wait_condition_variable): Removed.
8270
8271 * coop-defs.h (coop_m): Added 'level' field.
8272 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8273 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8274 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8275 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8276 define.
8277 (coop_condition_variable_broadcast): New.
8278
8279 * coop-threads.c (scm_threads_init): Create smobs here, using the
8280 appropriate sizes.
8281 (scm_c_thread_exited_p, scm_try_mutex,
8282 scm_timed_wait_condition_variable,
8283 scm_broadcast_condition_variable): New.
8284 (scm_wait_condition_variable): Removed.
8285
8286 * coop.c (coop_new_mutex_init): Initialize level.
8287 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8288 level.
8289 (coop_condition_variable_signal): Renamed to
8290 coop_condition_variable_broadcast and reimplemented in terms of
8291 that. Thus...
8292 (coop_condition_variable_broadcast): New.
8293
8294 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8295
8296 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8297
087ed40d
MV
82982002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8299
65a23095
MV
8300 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8301 of system headers.
8302
087ed40d
MV
8303 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8304 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8305 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8306
5ec1d2c8
DH
83072002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8308
8309 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8310 scm_definedp to scm_defined_p and deprecated scm_definedp.
8311
100ae50d
DH
83122002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8313
8314 * async.h, async.c (scm_system_async): Fixed deprecation to work
8315 correctly when deprecated features are excluded.
8316
2794cb50
MV
83172002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8318
8319 * async.c (scm_system_async_mark_for_thread): Validate thread
8320 argument.
8321
8322 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8323
8324 * feature.c (scm_init_feature): Don't add 'threads' for
8325 USE_NULL_THREADS.
8326
8327 * inline.h (scm_cell, scm_double_cell): Also allow
8328 USE_NULL_THREADS to not protect the slot initializers.
8329
8330 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8331 "USE_THREAD".
8332
8333 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8334 (modinclude_HEADERS): Added null-threads.h.
8335
8336 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8337 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8338 (scm_init_threads): Use generic type names scm_t_mutex and
8339 scm_t_cond instead of coop_m and coop_c.
8340
8341 * null-threads.c, null-threads.h: New files.
8342
ff810d7a
MV
83432002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8344
8345 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8346 This is to support makes that know about "$<" only in pattern
8347 rules, like Sun's make.
8348
a90bdb73
MV
83492002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8350
8351 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8352 substitution. Thanks to David Allouche!
8353
e71a8bf2
DH
83542002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8355
8356 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8357 !SCM_ENABLE_DEPRECATED.
8358
41f77ff5
MV
83592002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8360
504d99c5 8361 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8362 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8363 otherwise.
8364
8365 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8366 USE_THREADS is defined. Use scm_root otherwise.
8367 (scm_sigaction_for_thread): Ignore THREAD argument when
8368 USE_THREADS is not defined. Also, move THREAD argument defaulting
8369 out of HAVE_SIGACTION section, which was a bug.
8370
6d16b125
MV
83712002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8372
8373 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8374 signal_handlers, not the closure that is used as the async.
8375 The closure is stored in signal_handler_cells, as previously.
8376
acfa1f52
MV
83772002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8378
8379 * root.h (scm_root_state): Added 'block_async' slot.
8380 (scm_active_asyncs): Removed abbrev.
8381 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8382
8383 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8384 abbrev.
8385
8386 * async.h (scm_call_with_blocked_asyncs,
8387 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8388 scm_c_call_with_unblocked_asyncs): New prototypes.
8389 (scm_mask_signals, scm_unmask_signals): Deprecated.
8390 (scm_mask_ints): Turned into a macro.
8391 * async.c (scm_mask_ints): Removed.
8392 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8393 this should not be necessary.
8394 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8395 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8396 deprecation warning and check for errornous use. Set block_asyncs
8397 instead of scm_mask_ints.
8398 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8399 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8400 scm_c_call_with_unblocked_asyncs): New.
8401
8402 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8403 Asyncs are enabled by default.
8404
34010f56
NJ
84052002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8406
8407 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8408 6th element: an input waiting thunk.
8409 (sf_input_waiting): New.
8410
9310d6f2
MV
84112002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8412
8413 * root.c (root_mark): Mark active_asyncs slot.
8414
8415 * async.c (scm_async_click): Set the cdr of a executed handler
8416 cell to SCM_BOOL_F, not SCM_EOL.
8417 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8418 and only if the handler procedure is not already present.
8419 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8420 with SCM_BOOL_F.
8421 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8422
ac48c719
RB
84232002-10-04 Rob Browning <rlb@defaultvalue.org>
8424
1360a142
RB
8425 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8426
8427 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8428 scm_lt_dlopenext, and scm_lt_dlerror.
8429 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8430 and scm_lt_dlerror.
8431 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8432 and scm_lt_dlerror.
8433 (sysdep_dynl_init): switch to scm_lt_dlinit();
8434
8435 * Makefile.am (libguile_la_LIBADD): switch to use
8436 libguile-ltdl.la.
8437
504d99c5 8438 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8439
497092c9
MV
84402002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8441
8442 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8443 * scmsigs.c (got_signal): Removed.
8444 (signal_handler_cells, signal_handler_threads): New.
8445 (take_signal): Queue the cell of the signal for the specified
8446 thread. Reset the signal handler on systems that don't have
8447 sigaction.
8448 (sys_deliver_signals): Removed.
8449 (close_1): New.
8450 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8451 extended to also set the thread of a signal and allocate a cell
8452 for it. Keep the Scheme name "sigaction". Check that signum is
8453 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8454 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8455 (scm_init_scmsigs): Allocate signal_handler_cells and
8456 signal_handler_threads vectors.
8457
8458 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8459 that system asnycs and user asyncs are separated. Reimplemented
8460 system asyncs to work per-thread.
8461
8462 * gc.c (scm_init_gc): Do not use scm_system_async.
8463
8464 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8465 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8466 Removed prototypes.
8467 (scm_i_queue_async_cell): New.
8468
8469 * __scm.h (scm_asyncs_pending_p): Removed.
8470 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8471 scm_asyncs_pending_p.
8472
8473 * async.h (scm_system_async_mark_for_thread): New prototype.
8474
8475 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8476
8477 * root.h (scm_root_state): Added new "active_asyncs" slot.
8478 * root.c (scm_make_root): Initialize it to SCM_EOL.
8479
8480 * coop-defs.h (coop_t): Added new "handle" slot.
8481 * coop-threads.c (all_threads, scm_current_thread,
8482 scm_all_threads, scm_i_thread_root): New.
8483 (scm_threads_init): Add main thread to all_threads.
8484 (scheme_launch_thread): Remove thread from all_threads when it
8485 terminates.
8486 (scm_call_with_new_thread): Initialize handle slot of coop_t
8487 structure and add new thread to all_threads.
8488 (scm_spawn_thread): Likewise.
8489
8490 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8491 * threads.c (scm_current_thread, scm_all_threads): Register as
8492 primitives.
8493
8494 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8495
480fa28d
NJ
84962002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8497
8498 * script.c (scm_compile_shell_switches): Fix bad spelling of
8499 `explicitly' in comment.
8500
85012002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8502
8503 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8504 Refer to provided? in doc string rather than deprecated feature?.
8505
3553e1d1
GH
85062002-09-24 Gary Houston <ghouston@arglist.com>
8507
8508 * inline.h (scm_double_cell): prevent reordering of statements
8509 with any following code (for GCC 3 strict-aliasing).
8510 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8511 the earlier version of the reordering prevention.
8512
4ad0814a
HWN
85132002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8514
8515 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8516
e88e4f2e
HWN
85172002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8518
8519 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8520 protection.
8521
1e71eafb
HWN
85222002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8523
8524 * inline.h: include stdio.h
8525
8526 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8527
61ef9c1f
HWN
85282002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8529
dac04e9f
HWN
8530 * gc-segment.c (scm_i_make_initial_segment): check user settings
8531 for sanity.
8532
8533 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8534 sanity.
dac04e9f
HWN
8535
8536 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8537
ffd72400
HWN
8538 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8539
8540 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8541 these won't ever wrap around with high memory usage. Thanks to
8542 Sven Hartrumpf for finding this.
ffd72400 8543
5bd4a949
HWN
8544 * gc-freelist.c: include <stdio.h>
8545
61ef9c1f
HWN
8546 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8547
ffd0ef3b
MV
85482002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8549
a27e3d14
MV
8550 * vectors.h (SCM_VECTOR_REF): New.
8551
ffd0ef3b
MV
8552 * snarf.h (SCM_DEFINE_PUBLIC): New.
8553
f8a1712b
MV
85542002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8555
8556 * socket.c (scm_addr_vector): Added size of address to arguments.
8557 Use it to avoid accessing a non-existent path in a sockaddr_un.
8558 Changed all callers.
8559
7200a36b
HWN
85602002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8561
1383773b
HWN
8562 * gc.h: remove DOUBLECELL card flags.
8563
8564 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8565 scm_realloc().
8566
8567 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8568 init loop; handle this from scm_init_card_freelist()
8569
8570 * gc-card.c (scm_init_card_freelist): init bit vector here.
8571
7200a36b 8572 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8573 num2float.i.c (FLOAT2NUM): idem
7200a36b 8574
9981de3a
HWN
85752002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8576
8577 * eval.h: prepend libguile/ to include path
8578
19647556
MV
85792002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8580
8581 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8582 years. Thanks to Martin Grabmüller!
19647556 8583
38d1262a
HWN
85842002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8585
8586 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8587 unsigned numbers for computing minimum heap increment. This
8588 prevents weird results when a a negative minimum increment is
8589 computed.
8590
f800ebfb
MV
85912002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8592
8593 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8594 instead of the old tricks.
f800ebfb
MV
8595
8596 * guile-snarf.in: Do not expect the input file to be the first
8597 argument after the optional "-o" option, just pass everything to
8598 the pre-processor without extracting the input file name.
8599
4a5309c9
HWN
86002002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8601
8602 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8603 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8604
f2893a25
HWN
86052002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8606
8607 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8608 Bill Schottstaedt for the bug report
8609
483f518b
MV
86102002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8611
8612 * print.c (scm_iprin1): Print primitives generics always as
8613 "primitive-generic" even when they have no primitive methods yet.
8614
917adc55
GH
86152002-08-17 Gary Houston <ghouston@arglist.com>
8616
8617 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8618 call.
8619
67329a9e
HWN
86202002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8621
85835e59 8622 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8623
8624 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8625 malloc.
8626
8627 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8628 only use SCM_MIN_HEAP_SEG_SIZE.
8629
8630 * ports.c (scm_add_to_port_table): add backwards compatibility
8631 function
8632
8633 * ports.h: use scm_i_ prefix for port table and port table size.
8634
f07c886a
MD
86352002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8636
8637 * vports.c (scm_make_soft_port): Initialize pt variable.
8638
dc61cbc6
MV
86392002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8640
8641 * strports.h (scm_c_eval_string_in_module,
8642 scm_eval_string_in_module): New prototypes.
8643 * strports.c (scm_eval_string_in_module): New, but use
8644 "eval-string" as the Scheme name and make second parameter
8645 optional.
8646 (scm_eval_string): Implement using scm_eval_string_in_module.
8647 (scm_c_eval_string_in_module): New.
8648 Thanks to Ralf Mattes for the suggestion!
8649
da220f27
HWN
86502002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8651
be3ff021
HWN
8652 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8653 message and abort.
8654
8655 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8656
da220f27
HWN
8657 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8658 stead of scm_t_port*. The function now takes a tag argument.
8659
eab1b259
HWN
86602002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8661
8662 * gc.h: add scm_debug_cells_gc_interval to public interface
8663
8664 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8665
8666 * gc.c (scm_i_expensive_validation_check): separate expensive
8667 validation checks from cheap ones.
8668
ba1b2226
HWN
86692002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8670
8671 * read.c (scm_input_error): new function: give meaningful error
8672 messages, and throw read-error
8673
8674 * gc-malloc.c (scm_calloc): add scm_calloc.
8675
39e8f371
HWN
86762002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8677
33138b05
HWN
8678 * tags.h: remove GC bits documentation from the tags table.
8679
39e8f371
HWN
8680 * read.c (INPUT_ERROR): Prepare for file:line:column error
8681 messages for errors in scm_lreadr() and friends.
8682
86832002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8684
8685 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8686 implementation).
8687 (scm_gc_calloc): new function
8688
26e68795 86892002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8690
5f16b897
HWN
8691 * ports.c (scm_new_port_table_entry): init port entry to 0
8692 completely.
402788a9
HWN
8693
8694 * ports.c (scm_new_port_table_entry): change function from
8695 scm_add_to_port_table. This prevents cells with null-pointers from
8696 being exposed to GC.
8697
504d99c5 8698 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8699 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8700
504d99c5 8701 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8702 to gc-stats.
8703
c8a1bdc4
HWN
8704 * numbers.c (big2str): return "0" for 0 iso. ""
8705
c2cbcc57
HWN
8706 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8707 private-gc.h: new file
c8a1bdc4
HWN
8708
8709 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8710 sweeping. More documentation in workbook/newgc.text
8711
aea06b34
MV
87122002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8713
8714 * random.c (rstate_free): Return zero.
8715
35060ae9
DH
87162002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8717
8718 * environments.c (remove_key_from_alist): Removed.
8719
8720 (obarray_remove): Simplified.
8721
6a535440
SJ
87222002-07-24 Stefan Jahn <stefan@lkcc.org>
8723
8724 * continuations.h: ia64: Include <signal.h> before
8725 <sys/ucontext.h>.
8726
bcbd25b7
DH
87272002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8728
8729 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8730
26e68795 87312002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8732
8733 * goops.c (scm_compute_applicable_methods): use
8734 scm_remember_upto_here_1 iso scm_remember_upto_here
8735
8736 * macros.c: include deprecation.h
8737
504d99c5 8738 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8739 macro arg.
504d99c5 8740 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8741
8742 * net_db.c, posix.c, socket.c: variable naming: change ans to
8743 result.
8744
8745 * sort.c (scm_merge_vector_x): accept vector as argument
8746 iso. SCM*. This is needed for full GC correctness.
8747
8748 * gc.h: undo previous undocumented changes related to #ifdef
8749 GENGC.
8750
26e68795 87512002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8752
8753 * *.c: add space after commas everywhere.
8754
8755 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8756 Document cases where SCM_WRITABLE_VELTS() is used.
8757
8758 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8759 SCM_VELTS() return a const pointer
8760 (SCM_VECTOR_SET): add macro.
8761
3063e30a
DH
87622002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8763
8764 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8765 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8766 Deprecated the special kind of built-in dynamic syntax transformer
8767 that was inaccurately named "macro". Note: The built-in syntax
8768 transformers that are named "mmacro" or "memoizing-macro" still
8769 exist, and it is these which come much closer to what one would
8770 call a macro.
8771
4c5f8e8f
NJ
87722002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8773
8774 * eval.c (unmemocopy): Fix for
8775 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8776 with internal definitions and local-eval).
8777
4f6f9ae3
GH
87782002-07-12 Gary Houston <ghouston@arglist.com>
8779
8780 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8781 defined. They don't do anything useful, especially since the
8782 only case where DYNAMIC_LINKING is undefined seems to be
8783 when --with-modules=no is given to configure, which is basically
8784 requesting that the "dynamic linking module" be omitted.
8785
8786 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8787 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8788
8789 * extensions.c (load_extension): check DYNAMIC_LINKING for
8790 scm_dynamic_call.
8791 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8792 scm_init_dynamic_linking.
8793
c21935e6
MV
87942002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8795
8796 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8797 check for Cygwin when including <winsock2.h>, this is already
8798 check for by configure. Thus, revert change from 2002-07-07.
8799
ee95d597
GH
88002002-07-10 Gary Houston <ghouston@arglist.com>
8801
9540b68f 8802 * eq.c: include <string.h>
ee95d597
GH
8803 * dynl.c: docstring editing.
8804
46732b54
GH
88052002-07-09 Gary Houston <ghouston@arglist.com>
8806
8807 * dynl.c (scm_dynamic_call): docstring editing.
8808
c09d12e0
RB
88092002-07-08 Rob Browning <rlb@defaultvalue.org>
8810
8811 * gc_os_dep.c: HURD fixes.
8812
3f6571eb
MV
88132002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8814
8815 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8816
8817 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8818 this should be compiled for BUILD host.
8819 Override default rule for
8820 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8821 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8822 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8823
8824 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8825 <winsock2.h> on Cygwin even when we have it.
8826
bd987b8e
DH
88272002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8828
8829 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8830 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8831 the code. Full number of arguments checking of closures is
8832 mandatory now. However, the option to disable the checking has
8833 most probably not been used anyway.
8834
8505e285
DH
88352002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8836
bd987b8e
DH
8837 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8838 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8839 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8840 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8841 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8842 (scm_source_properties, scm_set_source_properties_x,
8843 scm_source_property): Removed compile time option SCM_RECKLESS to
8844 clean up the code. Full number of arguments checking of closures
8845 is mandatory now. However, the option to disable the checking has
8846 most probably not been used anyway.
8505e285
DH
8847
8848 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8849 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8850
2ee08a28
GH
88512002-06-30 Gary Houston <ghouston@arglist.com>
8852
732b9327
GH
8853 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8854 do anything useful. Added a comment about need for a mutex if
8855 pre-emptive threading is supported.
8856
2ee08a28
GH
8857 * posix.c (scm_convert_exec_args), dynl.c
8858 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8859 allocate_string_pointers. 2) simplified: don't reallocate the
8860 strings, just make an array of pointers 3) avoid memory leaks on
8861 error 4) let the procedure report errors in its own name.
8862 Consequences: 1) the procedures now assume that SCM strings are
8863 nul-terminated, which should always be the case. 2) Since strings
8864 are not reallocated, it's now possible for strings passed to
8865 dynamic-args-call to be mutated.
8866
c136c920
DH
88672002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8868
8869 * __scm.h, eval.c, eval.h: Removed compile time option
8870 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8871 variable positions during memoization is mandatory. However, the
8872 option to disable the caching has most probably not been used
8873 anyway.
8874
e540802f
MV
88752002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8876
8877 * print.c (scm_simple_format): Print missing part of format before
8878 ~% control. Thanks to Daniel Skarda!
8879
4c1ffcdd
MV
88802002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8881
8882 * mkstemp.c: Added exception notice to license statement.
8883
ba1b077b
MV
88842002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8885
8dc434c7
MV
8886 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8887 it is represented as a floating point value so that we can change
8888 its sign.
8889
ba1b077b
MV
8890 From John W. Eaton <jwe@bevo.che.wisc.edu>
8891
8892 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8893
74c58131
TTN
88942002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8895
8896 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8897 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8898
8766d4b5
MV
88992002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8900
8901 * eq.c (real_eqv): New.
8902 (scm_eqv_p): Use it when comparing reals and complexes.
8903
8904 * numbers.c: Include <string.h>, for strncmp.
8905 (mem2complex): Do not create negative NaNs.
8906 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8907 NaN.
8908 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8909
1d8c3cad
MV
89102002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8911
8912 * posix.c (scm_putenv): Handle removing variables explicitely by
8913 calling unsetenv.
8914
8915 From John W. Eaton.
74c58131 8916
1d8c3cad
MV
8917 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8918 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8919 and scm_nan.
8920 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8921 [SCO && ! HAVE_ISINF] (isinf): New function.
8922 (xisinf, xisnan): New functions.
8923 (IS_INF): Delete.
8924 (isfinite): Define in terms of xisinf.
8925 (scm_inf_p, scm_nan_p): New functions.
8926 (guile_Inf, guile_NaN): New file-scope vars.
8927 (guile_ieee_init): New function.
8928 (scm_inf, scm_nan): New functions.
8929 (idbl2str): Handle Inf and NaN. Remove funny label and
8930 corresponding gotos.
8931 (ALLOW_DIVIDE_BY_ZERO): New macro.
8932 (scm_divide): Allow division by zero to occur if
8933 ALLOW_DIVIDE_BY_ZERO is defined.
8934 Handle bignums and ints as special cases.
8935
8936 Additional stuff by me:
8937
8938 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8939 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8940 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8941 NaN. They will provide their own sign.
8942 (scm_divide): Only allow divides by inexact zeros. Dividing by
8943 exact zeros still signals an errors.
74c58131 8944
7a0c65eb
TTN
89452002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8946
87b72063 8947 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8948 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8949 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8950 Thanks to Andreas Rottmann.
8951
5e423a39
GH
89522002-04-20 Gary Houston <ghouston@arglist.com>
8953
8954 * removal of unused fields in root state (thanks to Christopher
8955 Cramer for pointing out the disuse.)
8956 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8957 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8958
5e423a39
GH
8959 * root.c (root_mark): don't mark them.
8960 (scm_make_root): don't set them to #f.
8961 * init.c (scm_init_standard_ports): don't initialise with the
8962 default ports.
8963
9d2cce76
MV
89642002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8965
8966 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8967 cpp_sig_symbols.c.
8968
89692002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8970
8971 * guile-snarf.in: Do not clean input file. This would write to
8972 the $(srcdir) during a VPATH build, which is not allowed. It also
8973 isn't needed since it only works when an output filename has been
8974 specified and in that case we don't need to clean the input file
8975 because the output file will already exist.
8976
6f79b6cc
MV
89772002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8978
8979 * guile-snarf: Install the trap for removing $cleanfile only when
8980 the value of $cleanfile is actually known.
8981
21550b10
RB
89822002-04-10 Rob Browning <rlb@defaultvalue.org>
8983
8984 * .cvsignore: add versiondat.h and *.c.clean.c.
8985
bc76d628
DH
89862002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8987
8988 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8989 function, replaces macro SRCBRKP.
8990
8991 (SRCBRKP): Deprecated.
8992
8993 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8994 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8995 temporary variable.
8996
5132eef0
DH
89972002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8998
8999 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
9000 CHECK_EXIT and removed all references to them.
9001
680516ba
DH
90022002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
9003
9004 * debug.h (scm_ready_p, debug_print): Removed declarations.
9005
9006 * eval.c (EVALCELLCAR): Removed.
9007
9008 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
9009 operation from condition.
9010
e2bd68e0
MV
90112002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
9012
9013 * guile-snarf.in: When the output filename is "-", write to
9014 stdout. When no "-o" option is given, use "-" as the output
9015 filename (i.e., stdout). Only 'clean' the inputfile or remove the
9016 output file on error when the output file name is not "-". Define
9017 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
9018
9019 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
9020
ab1f1094
DH
90212002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9022
9023 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
9024 and the corresponding goto statements. Removed redundant code.
9025
42030fb2
DH
90262002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9027
9028 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
9029 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
9030 Re-enabled handing of rpsubrs and asubrs.
9031
e050d4f8
DH
90322002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
9033
9034 * eval.c (SIDEVAL): Removed.
9035
9036 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
9037 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
9038 argument checking order for set! to locals, variables and symbols.
9039 Improvements to control structure. Removed some uses of arg1 and
9040 arg2 as temporary variables.
9041
a6d344d3
TTN
90422002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
9043
9044 * guile-snarf.in: Remove "--compat=1.4" support.
9045 Add "-d" and "-D" support.
9046
9047 (deprecated_list): New var.
9048 (compat_mode_clean_xxx): Delete.
9049 (grep_deprecated): New func.
9050 ("main"): If "-d" or "-D", call `grep_deprecated'.
9051
3939e9df
NJ
90522002-03-15 Neil Jerram <neil@ossau.uklinux.net>
9053
387d418c
NJ
9054 * hooks.h: Change scm_t_c_hookype_t everywhere to
9055 scm_t_c_hook_type.
9056
bb2c02f2 9057 Docstring fixes:
a6d344d3 9058
bb2c02f2
NJ
9059 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
9060
9061 * ports.c (scm_sys_make_void_port): Use `@file'.
9062
9063 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
9064 than `else'.
9065
9066 * macros.c (scm_makmacro): Don't say that the form replaces its
9067 source, because it doesn't.
9068 (scm_makmmacro): Clarify difference between this and scm_makmacro.
9069
9070 * backtrace.c (scm_display_error), filesys.c (scm_umask,
9071 scm_select, scm_basename), goops.c (scm_method_generic_function),
9072 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
9073 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
9074 spelling mistakes.
9075
3939e9df
NJ
9076 * debug.c (scm_debug_options), eval.c
9077 (scm_eval_options_interface), read.c (scm_read_options): Change
9078 incorrect @var in docstring to @code.
9079
3b3cc781
MV
90802002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
9081
500b0d5b
MV
9082 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
9083
3b3cc781
MV
9084 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
9085 guile-snarf can remove trailing non-init code.
9086
9087 * guile-snarf.in (modern_snarf): Remove everything following and
9088 including "^:^" from the output.
9089
dff98306
DH
90902002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9091
9092 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
9093
9094 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
9095
2287fb53
TTN
90962002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
9097
9098 * guile-snarf.in: Update copyright.
9099 Rewrite to internalize error handling.
9100 Add "--compat=1.4" handling.
9101 Add commentary.
9102
9103 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
9104 (snarfcppopts): New var.
9105 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
9106 (.c.doc): Use $(snarfcppopts).
9107
822250a4
TTN
9108 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
9109 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
9110 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
9111 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
9112 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9113 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
9114 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
9115 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
9116 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
9117 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
9118 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
9119 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
9120 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
9121 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
9122
b7798e10
DH
91232002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9124
9125 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
9126 The next step will be to remove the union 't' and simplify the
9127 code of SCM_CEVAL that way.
9128
04a98cff
NJ
91292002-03-12 Neil Jerram <neil@ossau.uklinux.net>
9130
9131 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
9132 rreadfds, rwritefds, rexceptfds): Made static.
9133
9134 * gc.c (terminating), fports.c (terminating): Renamed
9135 scm_i_terminating.
9136
16d98032
MV
91372002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
9138
5046250e
MV
9139 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
9140 potential overflow problems. Thanks to John W Eaton!
9141
8794207d
MV
9142 * strop.c (string_capitalize_x): Treat characters as unsigned so
9143 that 8-bit chars work. Thanks to David Pirotte!
16d98032 9144
1d15ecd3
DH
91452002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9146
9147 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
9148 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
9149 proc as temporary variables. Introduced temporary variables with
9150 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9151 by a more explicit predicate in some places.
9152
91532002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
9154
9155 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
9156 Added lots of comments regarding the implementation of #@dispatch.
9157 Changed intra-procedure communication to use t.arg1 instead of
9158 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
9159 variables. Introduced temporary variables with hopefully
9160 descriptive names for clarification. Replaced SCM_N?IMP by a more
9161 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
9162 of computing the expression explicitly. Eliminate now unused
9163 label nontoplevel_cdrxbegin.
9164
9165 * goops.h (SCM_INSTANCE_HASH): New macro.
9166
9167 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
9168
1ebf1566
TTN
91692002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9170
9171 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
9172 "guile-snarf" moved back from `noinst_SCRIPTS'.
9173
020c890c
NJ
91742002-03-08 Neil Jerram <neil@ossau.uklinux.net>
9175
58d233cc
NJ
9176 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
9177 exists when adding a source property other than those that are
9178 handled explicitly, add the new property to the SRCPROPS obj's
9179 plist.
9180
020c890c
NJ
9181 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
9182 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
9183
9184 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
9185 debug.status. It isn't needed, and it can overflow the bits
9186 reserved for it (which may lead to a segv or a GC abort).
9187
3f04400d
DH
91882002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9189
9190 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
9191 side-effecting operations from conditions and macro calls.
9192 Replaced SCM_N?IMP by a more explicit predicate in some places.
9193 Minimized the scope of some variables.
9194
97820583
SJ
91952002-03-02 Stefan Jahn <stefan@lkcc.org>
9196
9197 * convert.i.c: Fixed int <-> long conversions which would have
9198 failed if their sizes were different.
9199
38ace99e
DH
92002002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9201
9202 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9203 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9204 as temporary variables. Removed side-effecting operations from
9205 conditions and macro calls. Introduced temporary variables with
9206 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9207 by a more explicit predicate in some places. Removed code that
9208 was conditionally compiled if SICP was defined - which it never
9209 is.
9210
e5cb71a0
DH
92112002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9212
9213 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9214 Removed some uses of t.arg1 and proc as temporary variables.
9215 Removed side-effecting operations from conditions and macro calls.
9216 Introduced temporary variables with hopefully descriptive names
9217 for clarification. Replaced SCM_N?IMP by a more explicit
9218 predicate in some places.
9219
6a0f6ff3
DH
92202002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9221
9222 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9223 explicit predicate in some places.
9224
9225 (CHECK_EQVISH): Removed.
9226
9227 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9228 variables. Removed side-effecting operations from conditions and
9229 macro calls. Introduced temporary variables for clarification.
9230 Sorted if-else-if check for the type of the last form in a list by
9231 frequency. Avoided some unnecessary tail-recursion calls.
9232
228a24ef
DH
92332002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9234
9235 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9236 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9237 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9238 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9239 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9240 naming scheme for types.
9241
9242 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9243 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9244 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9245 (scm_make_environment), eval.c (scm_closure), fports.c
9246 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9247 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9248 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9249 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9250 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9251 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9252 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9253 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9254 scm_alloc_cell to scm_cell.
9255
9256 * environments.c (core_environments_observe), gc.c
9257 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9258 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9259 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9260 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9261 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9262 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9263 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9264 scm_double_cell.
9265
edb810bb
SJ
92662002-02-27 Stefan Jahn <stefan@lkcc.org>
9267
9268 * convert.i.c, convert.c: Better range checking.
9269
9270 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9271
1ebf1566 9272 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9273 Windows (MinGW).
9274
327d4dd3
TTN
92752002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9276
9277 * Makefile.am: Update path to pre-inst-guile automake frag.
9278
89d7a92c 92792002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9280
9281 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9282 features are excluded.
9283
89d7a92c 92842002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9285
9286 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9287
4f2716b6
GH
92882002-02-25 Gary Houston <ghouston@arglist.com>
9289
9290 * convert.c: include <string.h> for convert_i.c.
9291
46151112
RB
92922002-02-24 Rob Browning <rlb@defaultvalue.org>
9293
9294 * .cvsignore: add stamp-h1.
9295
cd328b4f
NJ
92962002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9297
9298 * unif.c (scm_array_to_list): Correct name, which had been
9299 accidentally changed to scm_t_arrayo_list!
9300
c709de7f
MD
93012002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9302
9303 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9304 underflowing scm_mallocated.
9305
c1965d31
MV
93062002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9307
9308 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9309 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9310 Reimplemented using the new scm_gc_malloc, etc., functions and
9311 deprecated.
9312
b606945b
TTN
93132002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9314
9315 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9316 to `noinst_PROGRAMS'.
9317 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9318 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9319
7c686ba8
MV
93202002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9321
9322 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9323 non-zero is returned from a port or smob free function.
9324 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9325 scm_gc_register_collectable_memory,
9326 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9327 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9328
9329 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9330 debug-malloc.c, dynl.c, environments.c, environments.h,
9331 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9332 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9333 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9334 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9335 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9336 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9337 appropriate. Return zero from smob and port free functions.
9338
9339 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9340
9341 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9342 messages while the GC is running.
9343 (scm_c_issue_deprecation_warning_fmt): New.
9344
9345 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9346 it is pointing to the putback buffer.
9347
66adc0a6
TTN
93482002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9349
9350 * gsubr.c (create_gsubr): On "too many args" error,
9351 also display arg count and name. Thanks to Bill Schottstaedt.
9352
0187b4f4
TTN
93532002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9354
9355 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9356
9357 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9358 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9359 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9360
9361 * guile-snarf-docs-texi.in: Bye bye.
9362
402e687c
MV
93632002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9364
9365 * symbols.c (scm_make_symbol): Fix typo in docstring.
9366
9367 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9368 scm_make_symbol): New prototypes.
9369
319b98ed
MV
93702002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9371
9372 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9373 (SCM_SYMBOL_INTERNED_P): New.
9374 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9375 SCM_MAKINUM since hash values can well be bignums.
9376 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9377 This signals a interned symbol.
9378 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9379 scm_make_symbol): New.
0187b4f4 9380
319b98ed
MV
9381 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9382
34472dfe
TTN
93832002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9384
9385 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9386 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9387 Thanks to Dave Love.
34472dfe 9388
1b39c2e3
MV
93892002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9390
9391 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9392 This might help to make unintended clashes less likely.
1b39c2e3
MV
9393 (scm_string_to_symbol): Protect the string until the symbols is
9394 created.
9395
1fa86ca5
SJ
93962002-01-31 Stefan Jahn <stefan@lkcc.org>
9397
9398 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9399 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9400 functions for the deprecated gh interface.
9401
9402 * Makefile.am: Setup rules for new `convert.*' files.
9403
af68e5e5
SJ
94042002-01-28 Stefan Jahn <stefan@lkcc.org>
9405
9406 * symbols.c (scm_c_symbol2str): New function, replacement for
9407 `gh_scm2newsymbol()'.
9408
34472dfe 9409 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9410 replacement for `gh_get_substr()'.
9411
9412 * socket.c: Include `stdint.h' if available for the `uint32_t'
9413 declaration.
9414
504d99c5 9415 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9416 compiler warning).
9417
9418 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9419
c96d76b8 94202002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9421
c96d76b8 9422 Other changes unrelated to Elisp...
34472dfe 9423
c96d76b8
NJ
9424 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9425 "if".
9426 (comments): Fix a few typos.
9427 (scm_for_each): Add parentheses around oddly unparenthesized
9428 if/while conditions.
9429
9430 * read.c (scm_read_opts): Add full stop at end of doc for
9431 `keywords' option.
9432
9433 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9434 instead of gh_symbol2scm.
9435
9436 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9437 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9438
9439 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9440 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9441
9442 First batch of changes for Elisp support...
9443
9444 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9445 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9446 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9447
9448 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9449 conditionalize compilation and initialization of Elisp support
9450 function.
34472dfe 9451
c96d76b8
NJ
9452 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9453 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9454 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9455 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9456 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9457 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9458 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9459 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9460 options.c (change_option_setting, scm_options), posix.c
9461 (environ_list_to_c), print.c (scm_iprlist), throw.c
9462 (scm_exit_status), vectors.c (scm_vector), weaks.c
9463 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9464
9465 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9466 just SCM_FALSEP.
34472dfe 9467
c96d76b8
NJ
9468 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9469 of just SCM_BOOLP.
9470
9471 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9472 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9473 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9474 (scm_m_atfop): Support function aliasing. Support both function
9475 args, which need transformation, and macro args, which do not.
9476 Add explanatory comments.
9477 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9478 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9479 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9480 SCM_NULLP || SCM_NILP instead of checks against (removed)
9481 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9482 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9483
9484 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9485 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9486 these, but I don't want to remove them yet, just in case.
9487 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9488 Elisp nil value.
9489
9490 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9491 against (removed) scm_lisp_nil.
9492 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9493 (SCM_NULL_OR_NIL_P): New.
9494
9495 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9496 SCM_VALIDATE_NULL.
9497
9498 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9499 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9500 value).
9501
9502 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9503 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9504 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9505 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9506
9507 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9508 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9509 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9510 Numbering shifted down accordingly.
9511 (SCM_ELISP_NIL): New IFLAG.
9512
9513 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9514
a392ee15
DH
95152002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9516
9517 * eval.c: Removed outdated references to "everr". Improved some
9518 comments.
9519
9520 (scm_deval_args, deval_args): Renamed scm_deval_args to
9521 deval_args, since it is not part of the interface.
9522
9523 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9524 use references to debug.vect[0] before it exists. Add parentheses
9525 to switch statement.
9526
9527 * goops.h: Added local emacs variables.
9528
24933780
DH
95292002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9530
9531 * eval.[ch] (scm_deval_args): Made static.
9532
9533 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9534 test.
9535
9536 * strings.c (scm_c_string2str): Clarified comment. Replaced
9537 THINKME by FIXME for uniformness. Removed question about whether
9538 arguments need to be protected from garbage collection: Arguments
9539 must be protected as any other variable.
9540
f9450cdb
DH
95412002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9542
9543 * procs.h (SCM_CLOSURE_BODY): New Macro.
9544
9545 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9546 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9547 get_slot_value, set_slot_value), procs.c
9548 (scm_procedure_documentation), sort.c (closureless), stacks.c
9549 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9550 SCM_CLOSURE_BODY.
9551
9552 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9553
5dc64f64
MV
95542001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9555
9556 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9557 use "cp" instead.
9558
197ee3d3
MV
95592001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9560
9561 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9562 everywhere.
9563
9564 * continuations.c (scm_make_continuation): Do not retain the
9565 throw_value when the continuation is invoked.
9566
4d4528e7
SJ
95672001-12-08 Stefan Jahn <stefan@lkcc.org>
9568
9569 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9570 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9571 THINKME's regarding the malloc policy for the missing converter
9572 routines.
9573
98347362
NJ
95742001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9575
9576 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9577 gh_symbol2scm.
9578
1fc8902f
DH
95792001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9580
9581 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9582 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9583
9584 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9585 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9586 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9587 macros.
9588
9589 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9590
9591 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9592 SCM_GC_CELL_* macros when accessing free cells.
9593
4878beec
MV
95942001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9595
9596 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9597 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9598 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9599 * strings.h (SCM_MAKE_STRING_TAG): New.
9600 * procs.h (SCM_MAKE_CCLO_TAG): New.
9601 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9602
9603 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9604 !SCM_ENABLE_DEPRECATED.
9605
9606 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9607 New.
9608
9609 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9610 signal handlers are allowed to divert the flow of control. Call
9611 scm_system_async_mark_from_signal_handler instead of
9612 scm_system_async_mark.
9613
9614
9615 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9616 scm_alloc_double_cell in their place.
34472dfe 9617
4878beec
MV
9618 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9619 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9620 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9621 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9622 scm_deprecated_newcell and scm_deprecated_newcell2.
9623
9624 gc.c (scm_tc16_allocated): Only define when including deprecated
9625 features.
9626 (scm_debug_newcell, scm_debug_newcell2): Removed.
9627 (scm_init_storage): Do not initialize scm_tc16_allocated.
9628 (scm_init_gc): Do it here.
9629 (allocated_mark): New, from old code.
9630 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9631
4878beec 9632 * inline.c, inline.h: New files.
34472dfe 9633 * Makefile.am: Added them in all the right places.
4878beec 9634
34472dfe 9635 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9636
9637 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9638 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9639 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9640 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9641 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9642 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9643 scm_alloc_double_cell, respectively.
9644
d2bc7fae
MV
96452001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9646
9647 * modules.c (scm_c_use_module): Adapt to changes to
9648 `process-use-modules'.
9649
5eec27e9
DH
96502001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9651
9652 * numbers.c (scm_divide): Fix more division by zero errors.
9653
8978878f
GH
96542001-11-21 Gary Houston <ghouston@arglist.com>
9655
9656 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9657 obsolete. autogen.sh says:
9658 invalid unused variable name: `OMIT_DEPENDENCIES'
9659
164826d3
DH
96602001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9661
9662 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9663 reporting the bug.
9664
84aff7a7
MV
96652001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9666
9667 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9668 Thanks to Eric Gillespie, Jr!
34472dfe 9669
6063dc1d
SJ
96702001-11-21 Stefan Jahn <stefan@lkcc.org>
9671
34472dfe
TTN
9672 * win32-socket.c (getservent, setservent, endservent,
9673 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9674 Appropriate replacements for M$-Windows.
9675
9676 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9677 these definitions for GUILE_DEBUG.
9678
9679 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9680 M$-Windows compiler. Include some pieces of code (protoent and
9681 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9682 native M$-Windows compiler.
9683
351982f6
MV
96842001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9685
9686 * modules.c (scm_c_export): Do nothing when the first argument is
9687 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9688
849038b5
TTN
96892001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9690
9691 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9692 also include `buildstamp'.
9693
5c790b44
RB
96942001-11-18 Rob Browning <rlb@defaultvalue.org>
9695
9696 * version.c
9697 (s_scm_major_version): use SCM_MAJOR_VERSION.
9698 (s_scm_minor_version): use SCM_MINOR_VERSION.
9699 (s_scm_micro_version): use SCM_MICRO_VERSION.
9700 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9701 SCM_MICRO_VERSION.
9702
9703 * version.h.in
9704 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9705 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9706 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9707
694a9bb3
NJ
97082001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9709
9710 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9711 Rewrite docstrings without reference to substring-move-left/right,
9712 since the latter no longer exist.
9713
302c12b4
DH
97142001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9715
9716 * eval.c: Removed bogus comment about acros.
9717
9718 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9719 Minimize scope of local variable. Eliminate dependency on
9720 macro DEBUG_EXTENSIONS.
9721
9722 (s_splicing): New error message string.
9723
9724 (scm_m_body): Issue 'bad body' message rather than 'missing
9725 expression' message.
9726
9727 (scm_m_quote): Eliminate unnecessary copying.
9728
9729 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9730 checking of the body to scm_m_body.
9731
9732 (scm_m_do): Move comment to function header. Rename arg1 to
9733 binding. Made the code a bit easier to read.
9734
9735 (evalcar): Removed.
9736
9737 (iqq): Added a comment. Changed the depth parameter to
9738 unsigned. Use size_t for vector lengths. Make sure vector object
9739 is gc protected as long as its contents are read. Add some syntax
9740 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9741 control structure a bit.
9742
9743 (scm_m_delay): Added comment about the implementation of
9744 scm_m_delay.
9745
9746 (scm_m_define): Add comment about guile's currying define
9747 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9748 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9749
9750 (scm_m_letrec1): Removed. Part of the functionality is taken
9751 over by the new function 'transform_bindings'.
9752
9753 (transform_bindings): New function. Takes over some of the
9754 functionality of removed function 'scm_m_letrec1', namely to split
9755 a list of bindings into a reversed list of variables and a list of
9756 initializers.
9757
9758 (scm_m_letrec): Call 'transform_bindings'.
9759
9760 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9761 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9762 test. Use 'transform_bindings'. Fixed scoping error with named
9763 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9764 Jerram for suggesting the fix). Cleaned up the control structure
9765 a bit.
9766
9767 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9768 unnecessary consing. Eliminated unnecessary
9769 SCM_DEFER/ALLOW_INTS.
9770
9771 (SCM_CEVAL): Un-obfuscated some loops.
9772
cecb4a5e
NJ
97732001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9774
8f85c0c6
NJ
9775 * gc.h (scm_unhash_name): Old declaration removed.
9776
9777 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9778 @code{primitive-eval}.
9779
9780 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9781 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9782 Change @deffnx lines in docstrings to say {Scheme Procedure}
9783 rather than primitive or procedure.
9784
9785 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9786 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9787 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9788 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9789 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9790 (scm_string_split, scm_string_ci_to_symbol), strings.c
9791 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9792 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9793 Docstring fixes and improvements reflecting edits that have been
9794 made in the reference manual source.
9795
9796 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9797 scm_object_property, scm_set_object_property_x): Remove invalid
9798 @deffnx lines for corresponding procedure property primitives.
9799
cecb4a5e
NJ
9800 These changes add a @deffnx C function declaration and function
9801 index entries for each Guile primitive to the copy of the doc
9802 snarf output that is used for reference manual synchronization.
9803 Online help is unchanged.
849038b5 9804
cecb4a5e
NJ
9805 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9806 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9807 name to SCM_SNARF_DOCS.
849038b5 9808
cecb4a5e
NJ
9809 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9810 snarf-check-and-output-texi.
9811
9812 * Makefile.am (guile-procedures.texi): New rule.
9813 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9814 Changed so that the last stage of doc snarfing is now performed
9815 twice, once to produce guile-procedures.txt for online help, and
9816 once to produce guile.texi for reference manual synchronization.
9817
ddea3325
DH
98182001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9819
9820 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9821 safely usable as a single statement followed by a ';', for example
9822 in an if statement.
9823
9824 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9825
72dd0a03
NJ
98262001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9827
9828 * random.c (scm_random_solid_sphere_x,
9829 scm_random_hollow_sphere_x): Correct "shere" typos.
9830
9831 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9832
9833 * version.c (scm_version): Update docstring to include
9834 `micro-version'.
9835
6558eda6
MV
98362001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9837
409b8588
MV
9838 * modules.c (scm_c_export): Call va_end after collecting the
9839 symbols.
9840
adb8c0f2
MV
9841 * strop.h, strop.c (scm_substring_move_left_x,
9842 scm_substring_move_right_x): Removed.
9843
6558eda6
MV
9844 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9845 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9846 configure does.
9847
5d8fc640
MV
98482001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9849
9850 * numbers.c: Document macros to define when including
9851 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9852 now rely on SIZEOF_ macros that have been figured out at
9853 configure time.
9854
9855 * num2integral.i.c: Adapt to new interface.
9856 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9857 target type by casting it and checking whether it is still the
9858 same. Do not try to handle bignums for integral types that are
9859 smaller than fixnums. When handling bignums, collect the
9860 magnituse first into a unsigned type, and correctly check for
9861 overflow.
9862 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9863 only -MIN_VALUE can still be negative of all negative numbers (in
9864 twos-complement).
9865
849038b5 9866 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9867
9868 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9869 HAVE_LONG_LONG depending on whether their size is non-zero.
9870
d6b8cf11
TTN
98712001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9872
9873 * strop.c (scm_string_null_p): Docfix; nfc.
9874 Thanks to Scott Lenser.
9875
9401323e
NJ
98762001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9877
9878 * extensions.c (scm_load_extension): Canonicalize docstring
9879 whitespace.
9880
9881 * unif.c (scm_uniform_array_write), ports.c
9882 (scm_current_output_port, scm_force_output), dynwind.c
9883 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9884 filesys.c (scm_open, scm_lstat), struct.c
9885 (scm_make_struct_layout), random.c (scm_random,
9886 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9887 (scm_i_index): Remove superfluous whitespace from end of docstring
9888 lines.
9889
9890 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9891 strings.c (scm_make_string), variable.c (scm_make_variable,
9892 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9893 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9894 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9895 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9896 newline at end of docstrings.
9897
9898 * modules.c (scm_set_current_module): Add missing newline to
9899 docstring.
9900
b4e15479
SJ
99012001-11-07 Stefan Jahn <stefan@lkcc.org>
9902
9903 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9904 and makes them available through Guile. That is because the
9905 Winsock-API does not store its errors in `errno' and thus cannot
9906 return error messages via `strerror (errno)'.
9907
9908 * socket.c (scm_init_socket): Initialize `win32-socket' part
9909 here under M$-Windows.
9910
d6b8cf11 9911 * numbers.h: Added missing declaration of
b4e15479
SJ
9912 `scm_sys_check_number_conversions()'.
9913
9914 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9915 and use in `(strerror)' and `(system-error)'.
9916
d6b8cf11 9917 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9918 `win32-socket.[ch]' to extra source and header files.
9919
7ab89df1
MV
99202001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9921
9922 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9923 a call to turn-on-debugging when --debug has been given instead of
9924 turning it on directly. Also, handle new `--no-debug' option,
9925 which might suppress the call to turn-on-debugging.
9926
0233bfc1
SJ
99272001-11-05 Stefan Jahn <stefan@lkcc.org>
9928
9929 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9930
8f99e3f3
SJ
99312001-11-04 Stefan Jahn <stefan@lkcc.org>
9932
9933 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9934 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9935 correctly and allows a clean build on Win32.
9936
d6b8cf11 9937 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9938 into FOO.
9939
9940 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9941 import macros for external libraries (libcrypt, libqthreads,
9942 libreadline and libregex).
9943
9944 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9945
9946 * posix.c (flock): Added support for flock() in M$-Windows.
9947
9948 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9949 of __SCM_IMPORT__.
9950
9951 * fports.c (getflags): Differentiate reading and writing pipes
9952 descriptors.
9953
9954 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9955 M$-Windows.
9956
9957 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9958 conditionalized error code if `ETIMEDOUT' is not available.
9959 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9960 timeout'.
9961
9962 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9963 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9964 each inclusion of `num2integral.i.c'.
9965 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9966
4e21fa60
MV
99672001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9968
9969 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9970 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9971
08112c95
MD
99722001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9973
7663c008
MD
9974 * print.c (scm_iprin1): Mark print state as revealed when
9975 dispatching to generic write or display.
9976
08112c95
MD
9977 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9978
f712d833
MV
99792001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9980
9981 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9982
f712d833
MV
9983 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9984 and win32-dirent.h to extra source and header files. These
9985 include the uname() and the POSIX dirent interface implementation
9986 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9987 linkers which do not allow unresolved symbols inside shared
9988 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9989 dependency.
9990
d6b8cf11
TTN
9991 * __scm.h: Defined SCM_API. This macro gets prepended to all
9992 function and data definitions which should be exported or imported
f712d833
MV
9993 in the resulting dynamic link library in the Win32 port.
9994
9995 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9996 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9997 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9998 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9999 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
10000 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
10001 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 10002 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
10003 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
10004 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
10005 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
10006 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
10007 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
10008 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
10009 vports.h, weaks.h:
10010 Prefixed each each exported symbol with SCM_API.
10011
d6b8cf11 10012 * continuations.c: Added comment about the use of the extern
f712d833
MV
10013 declarations of {get,set}context() functions used in the ia64 port.
10014
10015 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
10016 is meant to be a `unsigned long *'.
10017
10018 * filesys.c: Include `direct.h' if possible. Use local
10019 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
10020 macros for M$-Windows. Implementation of `fstat_Win32()' which is
10021 able to differentiate between sockets and other file descriptors.
10022 Use this function as wrapper in `scm_fstat()'. Fixed typo in
10023 `scm_dirname()'.
10024
10025 * fports.c: Include `io.h' is possible. Put `*fp' into referring
10026 statement block in `scm_fport_buffer_add()'.
10027 Some corrections in `getflags()'.
d6b8cf11 10028
f712d833
MV
10029 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
10030
10031 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
10032 build on Win32. Disable preloaded symbols on Win2 platforms.
10033
10034 * ioext.c, ports.c: Include `io.h' is possible.
10035
10036 * mkstemp.c: Include `process.h' is possible.
10037
10038 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
10039 too.
10040 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
10041
10042 * posix.c: Remove unnecessary dirent includes and defines. Include
10043 local `win32-uname.h' for MinGW. Extern declaration of
10044 `mkstemp()' for systems where it does not exists. Make
10045 `getlogin()' available on M$-Windows.
10046
10047 * scmsigs.c: Made `usleep()' avalable on MinGW.
10048
10049 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
10050
10051 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
10052
10053 * win32-uname.c: Include "win32-uname.h", not "uname.h".
10054
d245ce23
MD
100552001-10-28 Mikael Djurfeldt <mdj@linnaeus>
10056
10057 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
10058 Don't apply scm_uniform_vector_length on arrays.
10059
8ea46249
DH
100602001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10061
10062 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
10063 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
10064 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
10065 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
10066 scm_list_<n> over scm_cons[2]?.
10067
10068 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
10069 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
10070 SCM_C[AD][AD]R instead of explicit form.
10071
10072 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
10073 comparison parameters.
10074
10075 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
10076 !SCM_NULLP instead of SCM_NIMP.
10077
10078 (scm_m_case): Don't copy the form. Renamed proc to clause and
10079 minimized its scope. Renamed x to clauses. Removed side
10080 effecting operation from macro call.
10081
10082 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
10083 minimized its scope. Renamed x to clauses. Minimized the scope
10084 of variable 'len'. Make sure the else clause is treated specially
10085 even in case of '=>' occurences. Don't change the else to #t in
10086 order to be able to distinguish this case in the evaluator. Leave
10087 type checking of the recipient to the evaluator.
10088
10089 (scm_c_improper_memq): Made the comment somewhat clearer.
10090
10091 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
10092 test for SCM_IM_LET at the place of the formal parameters.
10093 Simplified the formal parameter checking.
10094
10095 (scm_m_letstar): Added Comment. Renamed proc to bindings.
10096 Renamed arg1 to binding and minimized its scope. Eliminated
10097 unnecessary consing.
10098
10099 (scm_m_do): Renamed proc to bindings. Minimized the scope of
10100 variable 'len'.
10101
10102 (build_binding_list): New static function.
10103
10104 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
10105 Further, split up the 'letrec' unmemoizing code to the
10106 corresponding parts for 'do', 'let' and 'letrec', adding comments
10107 to each form. Cleanup the handling of the do form (This removes
10108 some *real* code :-).
10109
10110 (SCM_CEVAL): Removed side effecting operation from macro call.
10111 Handle the 'else clause of the 'cond form specially - the symbol
10112 'else is not replaced with #t any more.
10113
8186c4f5
GH
101142001-10-14 Gary Houston <ghouston@arglist.com>
10115
10116 * version.c (scm_version): use sprintf instead of snprintf,
10117 for portability. thanks to Bill Schottstaedt.
10118
89759084
MD
101192001-10-14 Mikael Djurfeldt <mdj@linnaeus>
10120
10121 * read.c (scm_lreadr): When user-defined hash procedure returns
10122 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
10123 an exception. (This prevents parsing of uniform vectors from
10124 interfering with parsing of numbers.)
10125
9c7ce563
MV
101262001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
10127
10128 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
10129 PTRDIFF_MIN. Thanks to Ken Raeburn.
10130
101312001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
10132
10133 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
10134
10135 * eval.c (scm_m_atbind): First try to find the variable without
10136 defining it locally; when it has not been found, define it
10137 locally.
10138
10139 * modules.c (module_variable): Pass over variables that exist but
10140 are unbound.
10141
101422001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10143
10144 * backtrace.c (display_backtrace_file_and_line): Only use
10145 scm_basename when POSIX support is compiled in. Thanks to Chris
10146 Cramer.
10147
1fe5e088
DH
101482001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10149
10150 * numbers.c (mem2uinteger): Return number read so far when coming
10151 across a hexdigit after having read a # or if not reading a hex
10152 value. This will enable the calling code to correctly handle
10153 forms like 1e2. (The background is, that the exponent markers d,
10154 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
10155 providing this patch.
10156
10157 (mem2complex): Fix erroneous double-negation. Now, numbers like
10158 1-i will be read correctly.
10159
68665a97
MD
101602001-10-12 Mikael Djurfeldt <mdj@linnaeus>
10161
10162 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
10163
10164 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
10165
d5cf5324
DH
101662001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
10167
10168 * print.c (scm_print_state_vtable, print_state_pool):
10169 Initialize. These variables are now registered as gc roots.
10170
10171 (scm_current_pstate): Update documentation.
10172
10173 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
10174 scm_prin1, scm_init_print): print_state_pool is registered as a
10175 gc root and thus does not need to be protected by a surrounding
10176 pair any more.
10177
10178 (make_print_state): The car of print_state_pool no longer holds
10179 the scm_print_state_vtable.
10180
10181 (scm_current_pstate, scm_make_print_state, print_circref,
10182 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
10183 SCM_N<foo>.
10184
10185 (scm_prin1): When building lists, prefer scm_list_<n> over
10186 scm_cons[2]?.
10187
10188 (scm_iprlist): Removed a redundant SCM_IMP test.
10189
10190 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
10191
37c56aec
DH
101922001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10193
10194 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
10195
10196 (scm_memcons, scm_mem_to_proc): When building lists, prefer
10197 scm_list_<n> over scm_cons[2]?.
10198
10199 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
10200
10201 (scm_procedure_name): Use SCM_CADR instead of explicit form.
10202
10203 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10204 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10205 for some reason his patch didn't make it into the cvs.
10206
79d34f68
DH
102072001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10208
10209 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10210 little bit - should even be somewhat more accurate now.
10211
5e137c65
RB
102122001-10-08 Rob Browning <rlb@defaultvalue.org>
10213
10214 * gc.c: support ia64 register backing store.
10215 (SCM_MARK_BACKING_STORE): new macro.
10216
10217 * continuations.h: support ia64 register backing store.
10218 (struct scm_t_contregs): add ia64 register backing store.
10219
10220 * continuations.c: support ia64 register backing store.
10221 (continuation_mark): mark ia64 register backing store.
10222 (continuation_free): free ia64 register backing store.
10223 (scm_make_continuation): capture ia64 register backing store.
10224 (copy_stack_and_call): copy ia64 register backing store.
10225
ee083ac2
DH
102262001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10227
10228 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10229 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10230 instead of SCM_NIMP to test for that case.
10231
10232 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10233 scm_t_bits instead of long.
10234
71dcdbf9
MV
102352001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10236
10237 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10238 SCM_T_SIGNED_BITS_MIN): New.
10239 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10240 Use them to make these macros computable by the preprocessor.
10241
10242 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10243 whether the integral type fits in a fixnum, not the compiler.
10244 This removes a spurious compiler warning. Also, honor the
10245 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10246 needed for `long long's.
10247
10248 * numbers.c: Define NO_PREPRO_MAGOC when including
10249 num2integral.c.i for `long long' and `signed long long'.
10250
152812c0
MD
102512001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10252
10253 These changes fixes a race condition in the Guile coop - pthread
10254 compatibility code.
d6b8cf11 10255
152812c0
MD
10256 * coop.c (mother_awake_p): New variable.
10257 (coop_create): Set mother_awake_p before creating or signalling
10258 mother; wait until mother is going to sleep before returning.
10259 (mother): Reset mother_awake_p before going to sleep.
10260
11d49f54
DH
102612001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10262
10263 * options.c (protected_objects, scm_init_options): The content of
10264 protected_objects is now protected from garbage collection using
10265 scm_gc_register_root instead of scm_permanent_object.
10266
10267 (get_option_setting): New static function that computes an option
10268 setting as it was formerly done in the function scm_options.
10269
10270 (get_documented_option_setting): New static function that
10271 returns option documentation as it was formerly done in the
10272 function scm_options. Note that documentation C strings are no
10273 longer precomputed into SCM objects. Instead, they are converted
10274 into SCM strings every time get_documented_option_setting is
10275 called.
10276
10277 (change_option_setting): New static functions that modifies the
10278 option setting as it was formerly done in the function
10279 scm_options. The function is now exception safe, i. e. won't
10280 cause a memory leak when interrupted. Further, only non-immediate
10281 option values are added to the protection list.
10282
10283 (scm_options): This function now has only the purpose to dispatch
10284 to to get_option_setting, get_documented_option_setting or
10285 change_option_setting, depending on the arguments given to
10286 scm_options.
10287
10288 (scm_init_opts): Don't convert documentation C strings into SCM
10289 strings. Further, don't protect any object values: They _must_
10290 be immediate values, otherwise there is no guarantee that they
10291 have not been collected before anyway.
10292
10293 * options.[ch] (scm_t_option): Made type unsigned, name into a
10294 constant char* and val into a scm_t_bits type.
10295
10296 (scm_options, scm_init_opts): The number of options is guaranteed
10297 to be larger or equal to zero. Thus, the type is changed to
10298 unsigned.
10299
3dbacabc
DH
103002001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10301
10302 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10303 testing an unsigned value for being >= 0.
10304
14282d0f
DH
103052001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10306
10307 * numbers.h: Removed old comment about using SCM_CAR to access
10308 non-pair cells.
10309
10310 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10311 the return value is signed. Thanks to Brian Crowder for the bug
10312 report.
10313
10314 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10315 values. With this patch, SCM_SRS can be safely used for other
10316 types than scm_t_signed_bits. However, it should still better be
10317 an internal macro and thus be renamed to SCM_I_SRS.
10318
10319 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10320
2dbec7b5
GH
103212001-10-03 Gary Houston <ghouston@arglist.com>
10322
10323 * continuations.h, unif.h: in the descriptions of the bit patterns
10324 of the heap cells, make bit 0 the least significant.
10325
cf4ee841
TTN
103262001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10327
10328 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10329 Thanks to Golubev I. N.
10330
4a151b3d
GH
103312001-09-25 Gary Houston <ghouston@arglist.com>
10332
10333 * ports.c (scm_drain_input): extended the docstring. thanks to
10334 Alex Schroeder and Thien-Thi Nguyen.
10335
581ded70
MD
103362001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10337
10338 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10339 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10340 macros. (The NUM names might soon change.)
10341
10342 * numbers.h: Added missing declarations.
10343
5437598b
MD
103442001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10345
10346 * Makefile.am: Distribute num2float.i.c.
10347
10348 * num2float.i.c: New file, multiply included by numbers.c, used
10349 to "templatize" the float <-> num conversion routines.
10350
10351 * numbers.c: New functions: scm_num2float, scm_float2num,
10352 scm_num2double, scm_double2num.
10353
0b073f0f
RB
103542001-09-21 Rob Browning <rlb@defaultvalue.org>
10355
10356 * .cvsignore: really add version.h
10357
10358 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10359 Otherwise it fails on the alpha. However, we might rather choose
10360 this size conditionally.
10361
10362 * numbers.c (scm_gcd): change "k" to a long from an int.
10363 Otherwise it fails on the alpha. However, we might rather choose
10364 this size conditionally.
10365
10366 * error.c (scm_wta): coerce char* to intptr_t before int
10367 assignment.
10368
10369 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10370 int.
10371
10372 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10373
2830fd91
MD
103742001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10375
10376 * numbers.c (scm_integer_expt): Accept inexact integer in second
10377 argument. (Thanks to Bill Schottstaedt.)
10378
c13f0a90
RB
103792001-09-20 Rob Browning <rlb@defaultvalue.org>
10380
10381 * .cvsignore: add version.h
10382
10383 * versiondat.h.in: removed (obsolete).
10384
10385 * version.h.in: renamed from version.h.
10386 (SCM_GUILE_MAJOR_VERSION): new public macro.
10387 (SCM_GUILE_MINOR_VERSION): new public macro.
10388 (SCM_GUILE_MICRO_VERSION): new public macro.
10389
10390 * version.h: renamed to version.h.in.
10391
10392 * version.c
10393 (scm_major_version): support integer *_VERSION macros.
10394 (scm_minor_version): support integer *_VERSION macros.
10395 (scm_micro_version): support integer *_VERSION macros.
10396 (scm_version): support integer *_VERSION macros.
10397
147c18a0
MD
103982001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10399
10400 * error.c, error.h: Made error keys globally accessible.
10401 Applications might want to test for these or use them in a direct
10402 call to scm_error.
10403
10404 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10405 routines are passed an inexact. This change in behavior is
10406 motivated by concordance with R5RS: It is more common that a
10407 primitive doesn't want to accept an inexact for an exact.
10408
662c5539
DH
104092001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10410
10411 The following patch partially undoes my patch from 2001-06-30,
10412 where I added the function scm_gc_mark_cell_conservatively. The
10413 function is buggy, since it breaks guile during conservative
10414 marking if a pointer on the stack points directly into the list of
10415 free cells on the heap: With conservative cell marking this will
10416 cause the whole free list to be scanned and marked - boom!
10417
10418 * gc.c (allocated_mark, MARK, heap_segment,
10419 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10420 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10421 scm_gc_mark_cell_conservatively and update the corresponding
10422 comments and uses accordingly. Thanks to Christopher Cramer for
10423 the patch. (Minor corrections by me.)
10424
6c1b7628
GH
104252001-09-15 Gary Houston <ghouston@arglist.com>
10426
10427 * root.h (scm_root_state): removed the continuation_stack and
10428 continuation_stack_ptr members, which have no apparent purpose.
10429 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10430 removed.
662c5539 10431
6c1b7628
GH
10432 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10433 (scm_igc): remove all references to contination_stack and
10434 continuation_stack_ptr, avoiding allocation of a vector and
10435 useless processing during gc.
10436
455c0ac8
DH
104372001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10438
10439 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10440
10441 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10442
10443 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10444
10445 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10446
10447 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10448 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10449
22ba637b
DH
104502001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10451
10452 * guardians.c (mark_dependencies_in_tconc,
10453 whine_about_self_centered_zombies, scm_init_guardians): Register
10454 the static global variable `self_centered_zombies' via
10455 scm_gc_register_root, to make some cdr-ing unnecessary.
10456
c3c4d801
DH
104572001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10458
10459 * backtrace.c (display_backtrace_file,
10460 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10461 values, use SCM_FALSEP when comparing SCM values against #f.
10462 Thanks to Rob Browning for the bug report.
10463
b00418df
DH
104642001-09-12 Martin Baulig <martin@home-of-linux.org>
10465
10466 * strings.[ch] (scm_str2string): New function.
10467
a0d34a0b
MV
104682001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10469
10470 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10471 when computing nm, even if it's negative.
10472 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10473 (scm_must_realloc): Likewise.
10474
b10586f0
ML
104752001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10476
10477 * numbers.c (scm_sys_check_number_conversions): new function,
10478 defined if Guile is compiled in debugging mode. currently checks
10479 `scm_num2ulong', should check much much more.
10480
10481 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10482 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10483
8c494e99
DH
104842001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10485
10486 * __scm.h: Added new section about compile time selectable
10487 features.
10488
10489 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10490 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10491 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10492 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10493 Removed.
10494
10495 * deprecation.c (scm_include_deprecated_features): Simplified.
10496
10497 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10498 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10499
10500 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10501 Extract side-effecting operations from macros.
10502
10503 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10504 scm_top_level_lookup_closure_var and scm_system_transformer.
10505
10506 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10507
10508 (heap_segment): Use CELL_P instead of SCM_CELLP.
10509
10510 * init.c (start_stack): Don't initialize
10511 scm_top_level_lookup_closure_var and scm_system_transformer.
10512
10513 * modules.c (scm_set_current_module): Don't access
10514 scm_top_level_lookup_closure_var and scm_system_transformer.
10515
10516 (scm_sym2var): Don't call scm_variable_set_name_hint.
10517
10518 (scm_post_boot_init_modules): Removed deprecated initializations.
10519
10520 * print.c (scm_ipruk): Don't access cell contents of non cells.
10521
10522 * strings.c (scm_string_set_x): All strings are writable.
10523
10524 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10525 type. There is only one string type now.
10526
10527 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10528
10529 * tags.h: Remove comments about two different string types.
10530
10531 (SCM_CELLP, SCM_NCELLP): Deprecated.
10532
10533 * variable.c (make_variable): Remove code variant for vcells.
10534
10535 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10536 SCM_VARIABLE_LOC): Remove code variant for vcells.
10537
10538 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10539 SCM_ENABLE_DEPRECATED with the logic reversed.
10540
10541 * dynl.c (moddata, registered_mods), dynl.[ch]
10542 (scm_register_module_xxx, scm_registered_modules,
10543 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10544 (*top-level-lookup-closure*), eval.[ch]
10545 (scm_top_level_lookup_closure_var, scm_system_transformer,
10546 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10547 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10548 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10549 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10550 scm_unprotect_object), modules.c (root_module_lookup_closure,
10551 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10552 beautify_user_module_x_var, try_module_autoload_var,
10553 scm_module_full_name), modules.[ch] (scm_the_root_module,
10554 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10555 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10556 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10557 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10558 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10559 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10560 scm_make_shared_substring), tags.h (scm_tc7_substring,
10561 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10562 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10563 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10564 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10565 Removed.
10566
10567 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10568 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10569 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10570 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10571 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10572 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10573 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10574 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10575 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10576 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10577 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10578 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10579 (setzone, scm_strftime, scm_strptime), vports.c
10580 (scm_make_soft_port): Remove calls to
10581 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10582 gone, all strings are 0-terminated anyway.
10583
10584 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10585 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10586 double inclusion of the same headers to the SCM_<filename>_H
10587 format.
10588
10589 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10590 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10591 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10592 any more.
10593
10594 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10595 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10596 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10597 !SCM_<foo> over SCM_N<foo>.
10598
dee01b01
DH
105992001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10600
10601 * Makefile.am: Remove references to symbols-deprecated.c.
10602
10603 * symbols.c (scm_init_symbols): Don't initialize deprecated
10604 symbol functions.
10605
10606 * symbols-deprecated.c: Removed.
10607
10608 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10609 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10610 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10611 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10612 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10613 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10614 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10615 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10616 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10617 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10618 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10619 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10620 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10621 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10622 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10623 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10624 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10625 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10626 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10627 scm_intern0, scm_sysintern, scm_sysintern0,
10628 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10629 scm_string_to_obarray_symbol, scm_intern_symbol,
10630 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10631 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10632 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10633 vectors.[ch] (scm_vector_set_length_x): Removed.
10634
10635 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10636 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10637 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10638 Renamed the macros that are defined to inhibit double inclusion of
10639 the same headers to the SCM_<filename>_H format.
10640
10641 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10642 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10643 SCM_N<foo>.
10644
b29058ff
DH
106452001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10646
10647 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10648 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10649 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10650 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10651 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10652 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10653 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10654 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10655 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10656 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10657 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10658 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10659
10660 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10661 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10662 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10663 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10664 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10665 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10666 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10667 double inclusion of the same headers to the SCM_<filename>_H
10668 format.
10669
10670 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10671 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10672 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10673 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10674 !SCM_<foo> over SCM_N<foo>.
10675
0527e687
DH
106762001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10677
10678 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10679 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10680 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10681 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10682 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10683 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10684 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10685 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10686 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10687 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10688 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10689 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10690 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10691 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10692 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10693 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10694 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10695 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10696 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10697 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10698 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10699 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10700 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10701 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10702 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10703 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10704 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10705 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10706 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10707 the macros that are defined to inhibit double inclusion of the
10708 same headers to the SCM_<filename>_H format.
10709
fada26b2
MV
107102001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10711
10712 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10713 "scm_t_portable" with "scm_port_table" which was an artifact from
10714 the great "scm_*_t -> scm_t_" renaming.
10715
e4d1c1ea
TTN
107162001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10717
10718 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10719 used; nfc. Thanks to Bill Schottstaedt.
10720
10721 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10722 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10723 Thanks to Chris Cramer.
10724
b573e744
MV
107252001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10726
10727 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10728
10729 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10730 dynamic scope.
10731 * dynwind.h (scm_swap_bindings): Declare.
10732 * dynwind.c (scm_swap_bindings): Make non-static.
10733
8a3e715b
ML
107342001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10735
10736 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10737 doing exactly nothing about them). thanks Neil!
10738
cf504ee0
NJ
107392001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10740
10741 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10742
43b83b54
TTN
107432001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10744
10745 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10746 (proto) in the case when either `GUILE_DEBUG' or
10747 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10748
10749 (map_free_list): Fix typo: Ref `f' correctly.
10750
10751 Thanks to Chris Cramer.
10752
ab4cd34b
RB
107532001-08-15 Rob Browning <rlb@defaultvalue.org>
10754
10755 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10756 variables.
10757 (libpath.h): change libguileversion to libguileinterface.
10758
b754e3d1
MV
107592001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10760
10761 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10762 ChangeLog-2000. Thanks to Daniel Skarda!
10763
8b1d12c7
ML
107642001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10765
10766 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10767 do it from the Makefile.
10768
10769 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10770 are of a reasonable size.
10771
baffb19f
NJ
107722001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10773
10774 * stacks.c (scm_make_stack): Improve docstring by explaining use
10775 of cutting args.
10776
c1151355
MV
107772001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10778
10779 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10780 scm_char_whitespace_p, scm_char_upper_case_p,
10781 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10782 characters to fulfill isascii in addition to the primary
10783 predicate.
10784
3c9a524f
DH
107852001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10786
10787 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10788 scm_istr2flo, scm_istring2number): Removed.
10789
10790 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10791 SCM_SLOPPY_<foo>.
10792
10793 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10794 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10795 Added.
10796
10797 (scm_string_to_number): Use new number parser.
10798
10799 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10800 handles complex numbers.
10801
10802 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10803 SCM_<foo>_H.
10804
10805 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10806 SCM_N<pred>.
10807
10808 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10809
10810 (scm_i_mem2number): Added.
10811
10812 (scm_exact_to_inexact): Changed signature.
10813
10814 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10815 here instead of within scm_i_mem2number. Call scm_i_mem2number
10816 instead of scm_istr2int and scm_istring2number.
10817
01f11e02
DH
108182001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10819
10820 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10821 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10822 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10823 !SCM_<pred> over SCM_N<pred>.
10824
10825 (scm_eval_body): Remove side effecting code from macro call.
10826
10827 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10828 SCM_NIMP test.
10829
6cf69537
DH
108302001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10831
10832 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10833
54866b6c
MV
108342001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10835
10836 Removed vcell slot from structs.
43b83b54 10837
54866b6c
MV
10838 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10839 subsequent indices.
10840
10841 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10842 zero. Use scm_vtable_index_layout instead of "0" when accessing
10843 said slot.
10844 (scm_init_struct): Remove vcell slot layout code from
10845 required_vtable_fields.
10846
10847 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10848
10849 * goops.c (build_class_class_slots): Removed vcell slot
10850 definition.
10851
10852 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10853 Removed vcell slot layout code.
10854 (scm_si_vcell): Removed.
10855
5b54c4da
MV
108562001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10857
a0f5718e 10858 "Glocs" have been removed.
43b83b54 10859
a0f5718e
MV
10860 * tags.h: Update tag system docs.
10861 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10862 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10863 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10864 or SCM_NCONSP, respectively.
10865
10866 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10867 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10868 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10869
10870 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10871 tell glocs from structs.
43b83b54 10872
a0f5718e
MV
10873 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10874
10875 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10876 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10877 instead of with glocs.
10878 (EVALCAR): Do not test for glocs.
10879 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10880 condition.
10881 (scm_unmemocar): Do not handle glocs.
10882 (scm_m_atfop): Memoize as a variable, not as a gloc.
10883 (scm_eval_args, scm_deval_args): Do not handle glocs.
10884 (scm_ceval, scm_deval): Likewise.
43b83b54 10885
a0f5718e
MV
10886 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10887 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10888 Removed.
10889
10890 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10891
10892 * dynwind.c (scm_swap_bindings): Likewise.
10893 (scm_dowinds): Updated to recognize lists of variables instead of
10894 lists of glocs.
10895
10896 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10897
43b83b54 10898
5b54c4da
MV
10899 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10900 where it is needed.
43b83b54 10901
3c3db128
GH
109022001-07-25 Gary Houston <ghouston@arglist.com>
10903
10904 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10905 docstrings to reflect the n-ary implementation.
10906
dd29a169
MV
109072001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10908
10909 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10910 value of a variable, not the plain "return" statement.
10911
f5fe6c2f
MV
109122001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10913
10914 * eval.c: Allow variables in memoized code (in addition to glocs).
10915 (scm_lookupcar): Handle variables in lost races. Replace symbol
10916 with variable directly, do not make a gloc.
10917 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10918 like glocs.
10919 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10920 the main switch.
10921
ee0c7345
MV
109222001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10923
6d9ad98a
MV
10924 * variable.c (scm_i_variable_print): Use "value" instead of
10925 "binding" since a binding is the mapping between symbols and
10926 variables, not between variables and their values.
10927
ee0c7345
MV
10928 * tags.h (scm_tc7_variable): New.
10929 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10930 * print.c (scm_iprin1): Likewise.
10931
10932 * variable.h (scm_tc16_variable): Removed.
10933 (SCM_VARIABLEP): Test for new tc7 code.
10934 (scm_i_variable_print): New.
10935 * variable.c (scm_tc16_variable): Removed.
10936 (variable_print): Renamed to scm_i_variable_print and made
10937 non-static.
10938 (variable_equal_p): Removed.
10939 (make_variable): Construct a tc7 object instead of a smob.
10940 (scm_init_variable): Do not register smob.
43b83b54 10941
f3805ebb
MV
109422001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10943
10944 * tags.h: Include inttypes.h when we have it.
10945
109462001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10947
10948 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10949 is taken by the new SCM_IM_CALL_WITH_VALUES.
10950 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10951
6a1677a3
GH
109522001-07-22 Gary Houston <ghouston@arglist.com>
10953
10954 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10955 SCM_MAKINUM to convert regoff_t value to SCM.
10956
1bed8c28
GH
109572001-07-21 Gary Houston <ghouston@arglist.com>
10958
10959 * scmsigs.c: include sys/time.h for itimer stuff.
10960
e658215a
RB
109612001-07-19 Rob Browning <rlb@defaultvalue.org>
10962
10963 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10964
10965 * c-tokenize.lex: add option %nounput to quiet warning.
10966 Add prototype for yylex to quiet warning.
10967
10968 * scmconfig.h.in: add flags for setitimer and getitimer.
10969
10970 * scmsigs.h (scm_init_scmsigs): new prototype.
10971 (scm_init_scmsigs): new prototype.
10972
10973 * scmsigs.c (s_scm_setitimer): new function.
10974 (s_scm_setitimer): new function.
10975
58ade102
MG
109762001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10977
10978 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10979 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10980 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10981 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10982 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10983 guile-func-name-check.in, guile-snarf-docs-texi.in,
10984 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10985 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10986 objprop.c, objprop.h, options.c, options.h, random.h,
10987 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10988 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10989 version.c, version.h: Updated copyright notice.
10990
6b80d352
DH
109912001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10992
10993 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10994 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10995 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10996 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10997 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10998 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10999 sym_environment, scm_sym_change_class): New static variables to
11000 hold predefined symbols.
11001
11002 (build_class_class_slots): Build the list using scm_list_n
11003 instead of cons. Also, slots are already created as lists, thus
11004 making a call to maplist unnecessary.
11005
11006 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
11007 scm_class_direct_subclasses, scm_class_direct_methods,
11008 scm_class_precedence_list, scm_class_slots, scm_class_environment,
11009 scm_method_procedure, create_standard_classes, purgatory): Use
11010 predefined symbols.
11011
11012 (build_slots_list, compute_getters_n_setters,
11013 scm_sys_initialize_object, scm_sys_inherit_magic_x,
11014 get_slot_value_using_name, set_slot_value_using_name,
11015 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
11016 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
11017 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
11018
11019 (scm_sys_prep_layout_x): Minimize variable scopes.
11020
11021 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
11022 scm_sys_fast_slot_set_x): Fix signedness.
11023
11024 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
11025 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
11026 scm_memoize_method, scm_wrap_object): Use packing and unpacking
11027 when converting to and from SCM values.
11028
11029 (scm_enable_primitive_generic_x): Add rest argument checking.
11030
11031 (map, filter_cpl, maplist, scm_sys_initialize_object,
11032 scm_sys_prep_layout_x, slot_definition_using_name,
11033 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
11034 call_memoize_method, scm_make, scm_make_class): Prefer explicit
11035 predicates over SCM_N?IMP tests.
11036
11037 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
11038 checking.
11039
11040 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
11041 alias.
11042
63bcad19
DH
110432001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11044
11045 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
11046
11047 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
11048
11049 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
11050
11051 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
11052
4d6aae71
ML
110532001-07-12 Michael Livshin <mlivshin@bigfoot.com>
11054
11055 * strings.c (s_scm_string): fix arg position in assert.
11056
4b8ec619
GH
110572001-07-11 Gary Houston <ghouston@arglist.com>
11058
11059 * strports.c (st_write): use memcpy, not strncpy. thanks to
11060 Dale P. Smith.
11061
dbb640bd
TTN
110622001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
11063
11064 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
11065 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
11066 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
11067 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
11068 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
11069 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
11070 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
11071 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
11072 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
11073 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
11074 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
11075 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
11076 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
11077 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
11078 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
11079 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
11080 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
11081 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
11082 weaks.c, weaks.h: Remove "face-lift" comment.
11083
fd6c6321
RB
110842001-07-08 Rob Browning <rlb@defaultvalue.org>
11085
11086 * .cvsignore: add stamp-h.in.
11087
f91e4547
MG
110882001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11089
11090 * hooks.c (scm_make_hook, scm_add_hook_x),
11091 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
11092 value info to the docstrings.
11093
7beabedb
MG
110942001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11095
11096 Some more compatibility patches for Windows.
dbb640bd 11097
7beabedb
MG
11098 * posix.c (getlogin): getlogin() implementation for Windows.
11099
11100 * backtrace.c, ioext.c: Include <stdio.h>.
11101
11102 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
11103 exist.
11104
11105 * cpp_sig_symbols.in: Added SIGBREAK.
11106
0d0560d0
MV
111072001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
11108
11109 * strports.c (scm_read_0str, scm_eval_0str): Call
11110 scm_c_read_string and scm_c_eval_string respectively, not
11111 themselves. Thanks to Dale P. Smith!
11112
9a97e362
DH
111132001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11114
11115 * unif.c (scm_array_set_x): The variable args does not
11116 necessarily have to be a list. Further, got rid of a redundant
11117 SCM_NIMP test.
11118
592996c9
DH
111192001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11120
11121 * list.c (SCM_I_CONS): Make sure the cell type is initialized
11122 last.
11123
11124 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 11125 init_heap_seg): Fixed signedness.
592996c9
DH
11126
11127 (init_heap_seg): Replaced strange for-loop with a while loop.
11128
11129 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
11130
11131 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
11132
11133 The following patch adds conservative marking for the elements of
11134 free or allocated cells.
11135
11136 * gc.c (allocated_mark, heap_segment): New static functions.
11137
11138 (which_seg): Deleted, since the functionality is now provided by
11139 function heap_segment.
11140
11141 (map_free_list): Use heap_segment instead of which_seg.
11142
11143 (MARK): If cell debugging is disabled, mark free cells
11144 conservatively.
11145
11146 (scm_mark_locations, scm_cellp): Extracted the search for the
11147 heap segment of a SCM value into function heap_segment.
11148
11149 (scm_init_storage): Allocated cells must be marked
11150 conservatively.
11151
11152 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
11153
11154 The following patch changes the representation of weak vectors to
11155 double cells instead of using an extension of the vector's
11156 allocated memory.
11157
11158 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
11159 the result of SCM_WVECT_GC_CHAIN.
11160
11161 (scm_gc_sweep): Weak vectors don't have extra fields any more.
11162
11163 * weaks.c (allocate_weak_vector): New static function. It does
11164 not patch any previously created vector object during the
11165 construction of a weak vector, and thus doesn't need to switch
11166 off interrupts during vector creation.
11167
11168 (scm_make_weak_vector, scm_make_weak_key_hash_table,
11169 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11170 Use allocate_weak_vector to provide the new weak vector object.
11171
11172 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
11173 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
11174 now stored in the double cell.
11175
11176 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
11177 Use SCM_WVECT_TYPE.
11178
11179 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
11180 using an entry of the double cell.
11181
4dadf664
TTN
111822001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
11183
11184 * stamp-h.in: bye bye
11185
02202352
MV
111862001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
11187
11188 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
11189 scm_eval_0str.
11190
11191 * load.c, load.h (scm_c_primitive_load,
11192 scm_c_primitive_load_path): New.
11193
11194 * strports.c, strports.h (scm_c_read_string): Renamed from
11195 scm_read_0str. Also, added "const" qualifier to argument.
11196 (scm_c_eval_string): Renamed from scm_eval_0str.
11197 (scm_read_0str, scm_eval_0str): Deprecated.
11198
df1ad0d1
MG
111992001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11200
11201 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
11202 SCM_LIST1.
11203
1afff620
KN
112042001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11205
11206 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11207 scm_list_n): New functions.
11208 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11209 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11210 (lots of files): Use the new functions.
4dadf664 11211
1afff620
KN
11212 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11213
11214 * strings.c: #include "libguile/deprecation.h".
11215
b858464a
MG
112162001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11217
11218 * read.c (scm_lreadr): When reading a hash token, check for a
11219 user-defined hash procedure first, so that overriding the builtin
11220 hash characters is possible (this was needed for implementing
11221 SRFI-4's read synax `f32(...)').
4dadf664 11222
b858464a
MG
11223 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11224 because the latter is unsigned now and breaks comparisons like
11225 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11226
d95c0b76
NJ
112272001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11228
11229 * eval.h, eval.c (scm_call_4): New function.
11230
11231 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11232 directly rather than dispatching to them via scm_ithrow and a lazy
11233 catch.
4dadf664 11234
d95c0b76
NJ
11235 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11236 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11237 for trap handler procedures.
11238
11239 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11240 procedures not being #f.
11241
30e3be5a
ML
112422001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11243
11244 * Makefile.am (c-tokenize.c): add rule to generate it.
11245 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11246
11247 filter-doc-snarfage.c: remove.
11248
82893676
MG
112492001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11250
11251 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11252
11253 The following set of changes makes compiling Guile under various
11254 Windows compilers easier. Compilation under GNU systems should
11255 not be affected at all.
11256
11257 Thanks to Stefan Jahn for all necessary information, patches and
11258 testing.
4dadf664 11259
82893676
MG
11260 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11261 getpgrp, ttyname, primitive-fork and some header inclusion for
11262 Windows.
11263
11264 * random.c: Define M_PI, if not predefined and use __int64 for
11265 LONG64 under Windows.
11266
11267 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11268 Windows and conditionalize some signal names.
11269
4dadf664 11270 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11271 Include socket library header under Windows.
11272
11273 * stime.c (CLKTCK): Add cast to int, to make it compile under
11274 Windows.
11275
11276 * ports.c (truncate): New function, compiled only under Windows.
11277
11278 * net_db.c: Do not declare errno under Windows.
11279
11280 * iselect.h, inet_aton.c: Include socket library headers under
11281 Windows.
11282
11283 * guile.c (inner_main): Under Windows, initialize socket library
11284 and initialize gdb_interface data structures.
11285
11286 * gdb_interface.h: Under Windows, gdb_interface cannot be
11287 initialized statically. Initialize at runtime instead.
11288
11289 * fports.c (write_all): ssize_t -> size_t.
11290 (fport_print): Conditionalize call to ttyname().
11291 (getflags): New function, compiled only under Windows.
11292
11293 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11294 primitives chown, link, fcntl.
11295 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11296 as path seperator.
11297
11298 * backtrace.c: Include <io.h> under Windows.
11299
11300 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11301
11302 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11303 declaration.
11304
fdc28395
KN
113052001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11306
11307 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11308 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11309 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11310 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11311 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11312 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11313 (scm_dynamic_wind, scm_dowinds), environments.c
11314 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11315 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11316 goops.c (GETVAR, purgatory, make_class_from_template,
11317 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11318 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11319 (scm_primitive_load), modules.c (scm_resolve_module,
11320 scm_c_define_module, scm_c_use_module, scm_c_export,
11321 module_variable, scm_eval_closure_lookup, scm_sym2var,
11322 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11323 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11324 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11325 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11326 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11327 (scm_object_to_string, scm_call_with_output_string,
11328 scm_call_with_input_string), throw.c (scm_body_thunk,
11329 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11330 scm_make_shared_array), vports.c (sf_flush, sf_write,
11331 sf_fill_input, sf_close): Use one of the above functions.
11332 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11333
36284627
DH
113342001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11335
11336 * filesys.c (scm_close), ports.c (scm_close_port,
11337 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11338 instead of SCM_NEGATE_BOOL.
11339
11340 * filesys.c (scm_stat): Clean up type dispatch.
11341
11342 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11343 scm_output_port_p): Get rid of redundant IM type check.
11344
11345 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11346 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11347 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11348 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11349 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11350 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11351 scm_addr_vector), stime.c (scm_strftime), strings.c
11352 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11353 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11354 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11355 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11356 instead of scm_makfromstr.
11357
11358 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11359 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11360 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11361 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11362 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11363 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11364 !SCM_<pred> over SCM_N<pred>.
11365
11366 * strings.[ch] (scm_makfromstr): Deprecated.
11367
11368 (scm_mem2string): New function, replaces scm_makfromstr.
11369
11370 * strings.c (scm_substring), strop.c (string_copy,
11371 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11372 (scm_symbol_to_string): Fix gc problem.
11373
11374 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11375 SCM_<foo>_H.
11376
11377 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11378 warning about comparing signed and unsigned values. This fix is
11379 not optimal, since it won't work reliably if sizeof (c_start) >
11380 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11381 solution is to define this macro as an inline function, thus
11382 allowing to specifiy the types of c_start and c_end.
11383
13dcb666
DH
113842001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11385
11386 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11387 scm_t_debug_frame*.
11388
11389 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11390 Rename <foo>H to SCM_<foo>_H.
11391
11392 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11393 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11394
11395 (narrow_stack): Make i unsigned. Don't use side-effecting
11396 operations in conditions.
11397
11398 (narrow_stack, scm_make_stack, scm_stack_id,
11399 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11400
11401 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11402 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11403 more.
11404
11405 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11406 signedness.
11407
ea2c3968 11408 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11409
11410 * stacks.h (SCM_FRAMEP): Fix type check.
11411
ac13d9d2
ML
114122001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11413
ee0c0e03
ML
11414 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11415 c-tokenize.c when doing maintainer-clean.
11416
ac13d9d2
ML
11417 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11418
11419 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11420 simplify.
11421
11422 * eval.c: all hash signs are in column 0.
11423
11424 * Makefile.am (guile_filter_doc_snarfage): build using
11425 c-tokenize.c, not filter-doc-snarfage.c.
11426 rearrange snarfing dependencies a bit.
11427
11428 * c-tokenize.lex: new file.
11429
16be44e5
MV
114302001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11431
11432 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11433 scm_t_srcpropso_plist. See the big type renaming.
11434 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11435 Thanks to Seth Alves!
4dadf664 11436
16be44e5
MV
11437 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11438 they aren't defined already.
11439
5843e5c9
DH
114402001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11441
11442 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11443 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11444 problem.
11445
11446 * backtrace.c (display_expression, scm_set_print_params_x,
11447 display_application, display_frame, scm_backtrace), numbers.c
11448 (scm_istring2number), objects.c (scm_class_of,
11449 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11450 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11451
11452 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11453 always positive.
11454
11455 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11456 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11457
11458 * objects.c (scm_class_of): Type fix.
11459
11460 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11461 eliminated goto.
11462
11463 * pairs.h (scm_error_pair_access): The function can return if
11464 called recursively.
11465
6b41a313
MG
114662001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11467
11468 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11469
11470 * gdbint.c, init.c: Removed inclusion of tag.h.
11471
11472 * tag.h, tag.c: Removed files.
11473
11474 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11475
fbbdb121
GH
114762001-06-20 Gary Houston <ghouston@arglist.com>
11477
11478 * deprecation.c, extensions.c, rw.c: include string.h.
11479
72c17ed0
GH
114802001-06-19 Gary Houston <ghouston@arglist.com>
11481
11482 * filter-doc-snarfage.c (process): added ungetc in
11483 MULTILINE_COOKIE case since otherwise it fails when there's no
11484 space between the '(' and the quote of the following string
11485 (gcc 3.0).
11486
4ff9f825
MV
114872001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11488
4927dd28
MV
11489 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11490
b629af45
MV
114912001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11492
11493 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11494 extension takes place.
11495 * strings.h (SCM_STRING_LENGTH): Likewise.
11496 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11497
4ff9f825
MV
11498 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11499 it.
11500
11501 * tags.h: Include <stdint.h> when we have it.
11502 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11503 available. Else use "unsigned long".
11504 (scm_signed_bits_t): New.
11505
11506 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11507 (SCM_INUM): Cast result to scm_signed_bits_t.
11508
58bee6a8
TTN
115092001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11510
11511 * mkstemp.c: Update path to #include file scmconfig.h.
11512 Thanks to Golubev I. N.
11513
00d8d838
DH
115142001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11515
11516 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11517
ea2c3968 11518 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11519 the macro definition.
11520
11521 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11522 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11523 instead of SCM_INST_TYPE.
11524
11525 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11526 the object is a struct before accessing its struct flags.
11527
11528 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11529
495c67e5
GH
115302001-06-10 Gary Houston <ghouston@arglist.com>
11531
11532 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11533 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11534 work reliably anymore. try it from boot-9.scm instead.
11535
6a9003d3
MV
115362001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11537
11538 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11539 Thanks to Matthias Köppe!
58bee6a8 11540
47bcd646
ML
115412001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11542
a88ff5b6
ML
11543 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11544 space-happy C preprocessors.
11545
47bcd646 11546 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11547 inside cookies. thanks to Matthias Köppe!
47bcd646 11548
bab246f3
DH
115492001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11550
11551 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11552 keywords. Fix gc protection.
11553
11554 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11555 operations in macro calls.
11556
11557 * pairs.c (scm_error_pair_access): Avoid recursion.
11558
11559 Thanks to Matthias Koeppe for reporting the bugs that correspond
11560 to the following set of patches.
11561
11562 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11563 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11564 bitvector base address using SCM_BITVECTOR_BASE.
11565
11566 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11567 unsigned long*.
11568
dcb410ec
DH
115692001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11570
11571 * goops.c (SCM_CLASS_REDEF): Removed.
11572
11573 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11574 SCM_<foo>_H.
11575
11576 Thanks to Matthias Koeppe for reporting the bugs that correspond
11577 to the following set of patches.
11578
11579 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11580 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11581 scm_sys_allocate_instance, clear_method_cache,
11582 scm_sys_invalidate_method_cache_x, scm_make,
11583 create_standard_classes, scm_make_port_classes, scm_make_class,
11584 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11585
11586 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11587
11588 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11589
11590 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11591 UNARY_ELTS_CODE): Remove bogus break statement.
11592
11593 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11594 Don't access bit vectors elements as SCM objects.
11595
11596 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11597 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11598 Don't assign to an unpacked value.
11599
e81d98ec
DH
116002001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11601
11602 * __scm.h (SCM_NORETURN): Moved here from error.h.
11603
11604 (SCM_UNUSED): New macro.
11605
11606 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11607
11608 * backtrace.c (display_error_handler), continuations.c
11609 (continuation_print), debug.c (debugobj_print), dynwind.c
11610 (guards_print), environments.c (observer_print,
11611 core_environments_finalize, leaf_environment_cell,
11612 leaf_environment_print, eval_environment_print,
11613 eval_environment_observer, import_environment_define,
11614 import_environment_undefine, import_environment_print,
11615 import_environment_observer, export_environment_define,
11616 export_environment_undefine, export_environment_print,
11617 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11618 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11619 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11620 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11621 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11622 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11623 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11624 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11625 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11626 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11627 set_slot_value, test_slot_existence, scm_change_object_class,
11628 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11629 default_setter), guardians.c (guardian_print, guardian_gc_init,
11630 guardian_zombify, whine_about_self_centered_zombies), guile.c
11631 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11632 mallocs.c (malloc_print), numbers.c (scm_print_real,
11633 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11634 end_input_default, scm_port_print, fill_input_void_port,
11635 write_void_port), root.c (root_print), smob.c (scm_mark0,
11636 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11637 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11638 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11639 (scm_struct_free_0, scm_struct_free_standard,
11640 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11641 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11642 scm_handle_by_throw, scm_ithrow), weaks.c
11643 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11644 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11645 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11646
11647 * error.h (SCM_NORETURN): Moved to __scm.h.
11648
11649 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11650 Renamed <foo>H to SCM_<foo>_H.
11651
11652 * gc.c (debug_cells_gc_interval): New static variable.
11653
11654 (scm_assert_cell_valid): If selected by the user, perform
11655 additional garbage collections.
11656
11657 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11658 if additional garbage collections are desired.
11659
11660 (mark_gc_async): If additional garbage collections are selected
11661 by the user, don't call the after-gc-hook. Instead require the
11662 user to run the hook manually.
11663
11664 * pairs.c (scm_error_pair_access): New function. Only compiled
11665 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11666
11667 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11668
11669 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11670 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11671 is a real pair object. (Glocs are also accepted, but that may
11672 change.) If not, abort with an error message.
11673
17fa3fcf
DH
116742001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11675
11676 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11677
11678 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11679 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11680
feeedafb
MV
116812001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11682
11683 * extensions.c (scm_c_register_extension): Allow NULL as library
11684 name.
11685 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11686
feeedafb
MV
11687 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11688 non-pointers are being compared. Thanks to Alexander Klimov!
11689
4bcdfe46
GH
116902001-06-04 Gary Houston <ghouston@arglist.com>
11691
11692 * rw.c (scm_write_string_partial): new procedure implementing
11693 write-string/partial in (ice-9 rw).
11694 * rw.h: declare scm_write_string_partial.
58bee6a8 11695
f480396b
MV
116962001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11697
feeedafb
MV
11698 * keywords.c (keyword_print): Substract 1 from length of symbol
11699 name, accounting for the silly dash.
11700
11701 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11702 Do not emit deprecation warning.
11703
f480396b
MV
11704 Added exception notice to all files.
11705
11706 * dynl.c: Include "deprecation.h".
11707
c794483c
MV
117082001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11709
11710 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11711 scm_clear_registered_modules): Deprecated.
11712
9454d8d5
RB
117132001-06-02 Rob Browning <rlb@cs.utexas.edu>
11714
11715 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11716 guile-snarf-docs-texi.
11717
11718 * fports.c: HAVE_ST_BLKSIZE changed to
11719 HAVE_STRUCT_STAT_ST_BLKSIZE.
11720 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11721 HAVE_STRUCT_STAT_ST_BLKSIZE.
11722
11723 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11724 HAVE_STRUCT_STAT_ST_RDEV.
11725 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11726 HAVE_STRUCT_STAT_ST_BLKSIZE.
11727 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11728 HAVE_STRUCT_STAT_ST_BLOCKS.
11729
114f9bab
MV
117302001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11731
b0c16cd9
MV
11732 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11733 of scm_eval_x to allow module changes between the forms in the
11734 string. Set/restore module using scm_c_call_with_current_module.
11735
114f9bab
MV
11736 * mkstemp.c: New file, slightly modified from libiberties
11737 mkstemps.c.
11738
c99f9605
ML
117392001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11740
11741 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11742 filter-doc-snarfage.c: new files.
11743
11744 * Makefile.am: add stuff to [build,] use and distribute
11745 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11746
11747 * guile-snarf.in: grok the new snarf output.
11748
11749 * snarf.h: make the output both texttools- and `read'-friendly.
11750
47bcd646
ML
11751 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11752 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11753
7eb5d7b2
MV
117542001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11755
11756 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11757 error for unsupported format controls and for superflous
ec2667f0 11758 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11759
11760 * print.h, print.c (scm_print_symbol_name): Factored out of
11761 scm_iprin1.
11762 (scm_iprin1): Call it.
58bee6a8 11763
7eb5d7b2
MV
11764 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11765 weird names are printed correctly.
11766
11767 * print.c (scm_print_symbol_name): Symbols whose name starts with
11768 `#' or `:' or ends with `:' are considered weird.
11769
609c3d30
MG
117702001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11771
11772 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11773 and /.
11774
117752001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11776
11777 * debug.h: Removed prototype for scm_eval_string.
11778
8d09eb04
MG
117792001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11780
11781 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11782 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11783
11784 Change strncpy to memcpy to allow embedded NUL characters in
11785 symbol prefix.
11786
dd85ce47
ML
117872001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11788
fde50407
ML
11789 * hooks.c (scm_create_hook): deprecated.
11790 (make_hook): deleted.
11791 (scm_make_hook): all the hook creation code is now here.
11792
11793 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11794 a hook, make it permanent, and do a `scm_c_define' on it.
11795
dd85ce47
ML
11796 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11797
11798 * socket.c (s_scm_inet_pton): fix docstring quoting.
11799 (s_scm_inet_ntop): ditto.
11800
11801 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11802
11803 * hashtab.c (scm_internal_hash_fold): fix argument position in
11804 SCM_ASSERT.
11805
11806 * environments.c (s_scm_import_environment_set_imports_x): fix
11807 argument position in SCM_ASSERT.
11808
11809 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11810 (s_scm_make_iloc): ditto.
11811
729dbac3
DH
118122001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11813
11814 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11815
11816 * eval.c (promise_print): Read the promise's value as an object.
11817
11818 (SCM_CEVAL): Don't perform side-effecting operations in macro
11819 parameters.
11820
11821 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11822 conditional expression.
11823
11824 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11825 initializer.
11826
11827 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11828 text, removed redundant computation of effective_length and fixed
11829 the overflow check.
11830
11831 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11832 values.
11833
11834 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11835
11836 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11837
11838 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11839 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11840
11841 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11842
11843 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11844 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11845 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11846 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11847
11848 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11849
11850 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11851
ea2c3968 11852 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11853
11854 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11855 problem.
11856
11857 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11858 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11859 Read SCM objects rather than scm_bits_t values.
11860
11861 * tags.h (SCM_VOIDP_TEST): Removed.
11862
11863 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11864 value of 2 now corresponds to the former 1, the current 1
11865 corresponds to the former situation that SCM_VOIDP_TEST was
11866 defined.
11867
58bee6a8
TTN
11868 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11869 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11870 typedef struct scm_unused_struct { } * SCM;
11871 Thanks to Han-Wen Nienhuys for the suggestion.
11872
11873 * unif.c (scm_array_set_x): Fix typing problem, and use
11874 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11875 dealing with uniform vectors.
11876
6b1b030e
ML
118772001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11878
11879 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11880 (scm_igc): mark from them, too (precisely, not conservatively!).
11881
11882 * root.h (scm_gc_registered_roots): new object in
11883 scm_sys_protects.
11884
11885 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11886 `scm_protect_object'. shouldn't call it at all, though, it seems.
11887
11888 * gc.c (scm_[un]protect_object): deprecated.
11889 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11890 (scm_gc_[un]register_root[s]): new.
11891
11892 * gc.h: add prototypes for scm_gc_[un]protect_object,
11893 scm_gc_[un]register_root[s].
11894
c014a02e
ML
118952001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11896
11897 revert the controversial part of the 2001-05-24 changes.
11898
0120801d
MV
118992001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11900
f4e0611e
MV
11901 * modules.c (scm_env_module): Exported to Scheme.
11902
0120801d 11903 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11904
0120801d 11905 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11906
0120801d
MV
11907 * backtrace.c: Include "libguile/filesys.h".
11908 (sym_base, display_backtrace_get_file_line,
11909 display_backtrace_file, display_backtrace_file_and_line): New.
11910 (display_frame): Call display_backtrace_file_and_line if that is
11911 requested.
11912 (display_backtrace_body): Call scm_display_backtrace_file if
11913 requested.
11914
11915 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11916 Prototypes removed since there's no definition for these
11917 functions.
11918
880a7d13
MG
119192001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11920
11921 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11922 Changed use of scm_array->scm_array_t and
11923 scm_array_dim->scm_array_dim_t to enable build with
11924 --disable-deprecated.
11925
1be6b49c
ML
119262001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11927
11928 The purpose of this set of changes is to regularize Guile's usage
11929 of ANSI C integral types, with the following ideas in mind:
11930
d69c867a
ML
11931 - SCM does not nesessarily have to be long.
11932 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11933 - long is not nesessarily the same size as int.
11934
11935 The changes are incomplete and possibly buggy. Please test on
11936 something exotic.
11937
11938 * validate.h
11939 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11940 new macros.
11941
11942 * unif.h: type renaming:
11943 scm_array -> scm_array_t
11944 scm_array_dim -> scm_array_dim_t
11945 the old names are deprecated, all in-Guile uses changed.
11946
11947 * tags.h (scm_ubits_t): new typedef, representing unsigned
11948 scm_bits_t.
11949
11950 * stacks.h: type renaming:
11951 scm_info_frame -> scm_info_frame_t
11952 scm_stack -> scm_stack_t
11953 the old names are deprecated, all in-Guile uses changed.
11954
11955 * srcprop.h: type renaming:
11956 scm_srcprops -> scm_srcprops_t
11957 scm_srcprops_chunk -> scm_srcprops_chunk_t
11958 the old names are deprecated, all in-Guile uses changed.
11959
11960 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11961 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11962 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11963 vectors.c, vports.c, weaks.c:
11964 various int/size_t -> size_t/scm_bits_t changes.
11965
11966 * random.h: type renaming:
11967 scm_rstate -> scm_rstate_t
11968 scm_rng -> scm_rng_t
11969 scm_i_rstate -> scm_i_rstate_t
11970 the old names are deprecated, all in-Guile uses changed.
11971
11972 * procs.h: type renaming:
11973 scm_subr_entry -> scm_subr_entry_t
11974 the old name is deprecated, all in-Guile uses changed.
11975
11976 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11977 type renaming:
11978 scm_option -> scm_option_t
11979 the old name is deprecated, all in-Guile uses changed.
11980
11981 * objects.c: various long -> scm_bits_t changes.
11982 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11983
11984 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11985 SCM_I_FIXNUM_BIT.
11986
11987 * num2integral.i.c: new file, multiply included by numbers.c, used
11988 to "templatize" the various integral <-> num conversion routines.
11989
11990 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11991 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11992 deprecated.
11993 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11994 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11995 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11996 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11997 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11998 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11999 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
12000 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
12001 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
12002 scm_num2size): new functions.
12003
d69c867a 12004 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
12005
12006 * load.c: change int -> size_t in various places (where the
12007 variable is used to store a string length).
12008 (search-path): call scm_done_free, not scm_done_malloc.
12009
12010 * list.c (scm_ilength): return a scm_bits_t, not long.
12011 some other {int,long} -> scm_bits_t changes.
12012
12013 * hashtab.c: various [u]int -> scm_bits_t changes.
12014 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
12015 (scm_ihashx): n: uint -> scm_bits_t
12016 use scm_bits2num instead of scm_ulong2num.
12017
12018 * gsubr.c: various int -> scm_bits_t changes.
12019
12020 * goops.[hc]: various {int,long} -> scm_bits_t changes.
12021
d69c867a 12022 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
12023
12024 * gh.h (gh_str2scm): len: int -> size_t
12025 (gh_{get,set}_substr): start: int -> scm_bits_t,
12026 len: int -> size_t
12027 (gh_<num>2scm): n: int -> scm_bits_t
12028 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
12029 (gh_length): return scm_bits_t, not unsigned long.
12030
12031 * gc.[hc]: various small changes relating to many things stopping
12032 being long and starting being scm_[u]bits_t instead.
12033 scm_mallocated should no longer wrap around.
12034
12035 * fports.h: type renaming:
12036 scm_fport -> scm_fport_t
12037 the old name is deprecated, all in-Guile uses changed.
12038
12039 * fports.c (fport_fill_input): count: int -> scm_bits_t
12040 (fport_flush): init_size, remaining, count: int -> scm_bits_t
12041
12042 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
12043 those prototypes, as the functions they prototype don't exist.
12044
12045 * fports.c (default_buffer_size): int -> size_t
12046 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
12047 default_size: int -> size_t
12048 (scm_setvbuf): csize: int -> scm_bits_t
12049
12050 * fluids.c (n_fluids): int -> scm_bits_t
12051 (grow_fluids): old_length, i: int -> scm_bits_t
12052 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
12053 scm_bits_t
12054 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
12055
12056 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
12057 the new and shiny SCM_NUM2INT.
12058
12059 * extensions.c: extension -> extension_t (and made a typedef).
12060
12061 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
12062 there are no nasty surprises if/when the various deeply magic tag
12063 bits move somewhere else.
12064
12065 * eval.c: changed the locals used to store results of SCM_IFRAME,
12066 scm_ilength and such to be of type scm_bits_t (and not int/long).
12067 (iqq): depth, edepth: int -> scm_bits_t
12068 (scm_eval_stack): int -> scm_bits_t
12069 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
12070 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
12071 i: int -> scm_bits_t
12072
12073 * environments.c: changed the many calls to scm_ulong2num to
12074 scm_ubits2num.
12075 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
12076
12077 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
12078
12079 * debug.h: type renaming:
12080 scm_debug_info -> scm_debug_info_t
12081 scm_debug_frame -> scm_debug_frame_t
12082 the old names are deprecated, all in-Guile uses changed.
12083 (scm_debug_eframe_size): int -> scm_bits_t
12084
12085 * debug.c (scm_init_debug): use scm_c_define instead of the
12086 deprecated scm_define.
12087
12088 * continuations.h: type renaming:
12089 scm_contregs -> scm_contregs_t
12090 the old name is deprecated, all in-Guile uses changed.
12091 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
12092 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
12093
12094 * continuations.c (scm_make_continuation): change the type of
d69c867a 12095 stack_size from long to scm_bits_t.
1be6b49c
ML
12096
12097 * ports.h: type renaming:
12098 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
12099 scm_port -> scm_port_t
12100 scm_ptob_descriptor -> scm_ptob_descriptor_t
12101 the old names are deprecated, all in-Guile uses changed.
12102 (scm_port_t.entry): int -> scm_bits_t.
12103 (scm_port_t.line_number): int -> long.
12104 (scm_port_t.putback_buf_size): int -> size_t.
12105
12106 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 12107 global namespace and have little value beside that).
1be6b49c
ML
12108 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
12109 SCM handle).
12110 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 12111 exist (for size_t & ptrdiff_t).
1be6b49c
ML
12112 (scm_sizet): deprecated.
12113
12114 * Makefile.am (noinst_HEADERS): add num2integral.i.c
12115
a6219f22
MV
121162001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
12117
12118 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
12119 SCM_VARIABLE_INIT since that it what it used to be.
12120
12121 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 12122 ANSIsh. Thanks to Matthias Köppe!
a6219f22 12123
311b6a3c
MV
121242001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
12125
9dfc4faa
MV
12126 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
12127 needed for weak-key hashtables.
12128
12129 * procs.c (scm_make_subr_with_generic): Add missing last argument
12130 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
12131
12132 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
12133 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
12134
12135 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
12136
2fc933fe
MV
121372001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
12138
57ae112d
MV
12139 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
12140 `duplicate_string'. Do not use an indirect cell, store symbol
12141 directly in collision list of hash table.
12142 (duplicate_string): Removed.
58bee6a8 12143
57ae112d
MV
12144 * init.c (scm_init_guile_1): Call scm_init_extensions.
12145
12146 * Makefile.am: Add "extensions.c" and related files in all the
12147 right places.
12148
12149 * extensions.h, extension.c: New files.
12150
12151 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
12152
2fc933fe
MV
12153 * modules.h (scm_system_module_env_p): Move out of deprecated
12154 section.
12155
12156 * rw.h (scm_init_rw): Added prototype.
12157
12158 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
12159 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
12160 New functions. They replace scm_make_gsubr and
12161 scm_make_gsubr_with_generic. The `make' variants only create the
12162 gsubr object, while the `define' variants also put it into the
12163 current module. Changed all callers.
12164 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
12165
12166 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
12167 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
12168 functions. They replace scm_make_subr, scm_make_subr_opt and
12169 scm_make_subr_with_generic. The `make' variants only create the
12170 subr object, while the `define' variants also put it into the
12171 current module. Changed all callers.
12172 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
12173 Deprecated.
12174
12175 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
12176 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
12177 the comments above.
58bee6a8 12178
18928596
NJ
121792001-05-19 Neil Jerram <neil@ossau.uklinux.net>
12180
12181 * throw.c (scm_lazy_catch): Slight docstring clarification.
12182
21a13beb
MV
121832001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
12184
e2b6ddc6
MV
12185 * throw.c: Lazy-catch handlers are no longer allowed to return.
12186 Fixed comments throughout.
12187 (scm_ithrow): Signal an error when a lazy-catch handler returns.
12188 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
12189 recognized as such.
12190
21a13beb
MV
12191 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
12192 refered to s_scm_minor_version previously.
12193
12194 * modules.h, modules.c: Moved around a lot of code so that
12195 deprecated features appear at the bottom.
12196 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
12197 module_prefix, make_modules_in_var, beautify_user_module_x_var,
12198 scm_the_root_module, scm_make_module, scm_ensure_user_module,
12199 scm_load_scheme_module): Deprecated.
12200 (scm_system_module_env_p): Return SCM_BOOL_T directly for
12201 environments corresponding to the root module.
12202 (convert_module_name, scm_c_resolve_module,
12203 scm_c_call_with_current_module, scm_c_define_module,
12204 scm_c_use_module, scm_c_export): New.
12205 (the_root_module): New static variant of scm_the_root_module. Use
12206 it everywhere instead of scm_the_root_module.
58bee6a8 12207
21a13beb
MV
12208 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12209 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12210 (scm_c_with_fluid): New.
12211 (scm_with_fluids): Use scm_c_with_fluids instead of
12212 scm_internal_with_fluids.
58bee6a8 12213
21a13beb
MV
12214 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12215 `scm_init_goops'. Do not explicitly create/switch modules.
12216 Return SCM_UNSPECIFIED.
12217 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12218 (scm_load_goops): Use scm_c_resolve_module instead of
12219 scm_resolve_module.
58bee6a8 12220
21a13beb
MV
12221 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12222 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12223 `scm_init_rw' prior to loading the startup files.
12224
12225 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12226 scm_init_rdelim. Do not explicitly create/switch modules.
12227 Return SCM_UNSPECIFIED.
12228 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12229 procedure.
58bee6a8 12230
21a13beb
MV
12231 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12232 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12233 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12234
12235 * script.c (scm_shell): Evaluate the compiled switches in the
12236 current module, not in the root module.
12237
122382001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12239
12240 * fluids.c (scm_c_with_fluids): Rename from
12241 scm_internal_with_fluids.
12242 (scm_internal_with_fluids): Deprecated.
12243 (scm_c_with_fluid): New.
12244
09cb9e73
DH
122452001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12246
12247 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12248
12249 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12250 accessed with SCM_C[AD]R.
12251
12252 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12253
c81ea65d
RB
122542001-05-16 Rob Browning <rlb@cs.utexas.edu>
12255
12256 * version.c (s_scm_major_version): doc fixes.
12257 (s_scm_minor_version): doc fixes.
12258 (s_scm_minor_version): new function.
12259
12260 * version.h (scm_init_version): new function.
12261
12262 * versiondat.h.in: add GUILE_MICRO_VERSION.
12263
887dfa7d
DH
122642001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12265
12266 * deprecation.c (scm_init_deprecation): Renamed
12267 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12268
78930a69
MV
122692001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12270
12271 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12272 dependent on cpp_cnvt.awk
12273
39cde5c5
MG
122742001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12275
12276 * script.c (scm_compile_shell_switches): New command line option
12277 `--use-srfi' for loading a list of SRFIs on startup.
12278 (scm_shell_usage): Added `--use-srfi' to help message.
12279
f3f9dcbc
MV
122802001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12281
78930a69 12282 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12283
f3f9dcbc
MV
12284 The concept of vcells has been removed from Guile. With it,
12285 explicit obarrays and associated operations are gone. Use
12286 hashtables instead of obarrays.
887dfa7d 12287
f3f9dcbc
MV
12288 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12289 result as variable instead of vcell. Glocs no longer point to a
12290 vcell but to a variable. Use scm_c_define instead of
12291 scm_sysintern and treat the result as a variable (which it is),
12292 not a vcell.
887dfa7d 12293
f3f9dcbc
MV
12294 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12295 SCM_DEFVARIABLEP): Deprecated.
12296 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12297 (variable_print): Do not print name of variable.
12298 (variable_equalp): Compare values, not vcells.
12299 (anonymous_variable_sym): Removed.
12300 (make_vcell_variable): Removed.
12301 (make_variable): New, as replacement.
12302 (scm_make_variable, scm_make_undefined_variable): Do not take name
12303 hint parameter.
12304 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12305 error in that case.
12306 (scm_builtin_variable): Deprecated.
12307
12308 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12309 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12310 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12311 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12312 scm_string_to_obarray_symbol, scm_intern_symbol,
12313 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12314 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12315 Deprecated and moved to "symbols-deprecated.c".
12316 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12317 (scm_init_symbols): Call scm_init_symbols_deprecated.
12318 * symbols-deprecated.c: New file.
12319 * Makefile.am: Added symbols-deprecated.c and related files in all
12320 the right places.
887dfa7d 12321
f3f9dcbc
MV
12322 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12323 SCM_GLOBAL_VCELL_INIT): Deprecated.
12324 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12325 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12326
f3f9dcbc
MV
12327 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12328 SCM_GLOC_SYM.
12329
12330 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12331 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12332 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12333 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12334 Changed according to the `throughout' comments.
12335
12336 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12337 to `int'.
12338 (scm_module_type): Removed.
12339 (the_root_module): Renamed to the_root_module_var. Now points to
12340 a variable instead of a vcell. Updated all uses.
12341 (scm_the_root_module): Return SCM_BOOL_F when module systems
12342 hasn't been booted yet.
12343 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12344 (scm_post_boot_init_modules): Made static.
12345 (scm_set_current_module): Call scm_post_boot_init_modules on first
12346 call.
12347 (make_modules_in, beautify_user_module_x, resolve_module,
12348 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12349 suffix. Now point to variables instead of vcells. Updated all
12350 uses.
12351 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12352 and return SCM_BOOL_F in that case.
12353 (scm_module_transformer): Likewise.
12354 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12355 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12356 (scm_eval_closure_lookup): Do not allow new definitions when
12357 `interface' flag is set.
12358 (scm_standard_interface_eval_closure): New.
12359 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12360 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12361 scm_c_lookup, scm_c_module_define, scm_c_define,
12362 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12363 scm_modules_prehistory): New.
12364 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12365 instead of scm_intern0.
887dfa7d 12366
f3f9dcbc
MV
12367 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12368 symbol.
12369
12370 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12371 hashtable operations to maintain the keywords, not obarray ones.
12372
12373 * init.c (scm_load_startup_files): Do not call
12374 scm_post_boot_init_modules. This is done by
12375 scm_set_current_module now.
12376 (scm_init_guile_1): Call scm_modules_prehistory. Call
12377 scm_init_variable early on.
12378
12379 * goops.c (s_scm_sys_goops_loaded): Get
12380 var_compute_applicable_methods from scm_sym2var, not from a direct
12381 invocation of scm_goops_lookup_closure.
12382
12383 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12384
12385 * gc.c: Added simple debugging hack to mark phase of GC: When
12386 activated, do not tail-call scm_gc_mark. This gives nice
12387 backtraces.
12388 (scm_unhash_name): Removed.
12389
12390 * feature.c (features): Renamed to features_var. Now points to a
12391 variable instead of a vcell. Updated all uses.
12392
12393 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12394 `scm_current_module_lookup_closure' which will do the right thing
12395 when the module system hasn't been booted yet.
12396 (SCM_GLOC_SYM): Removed.
12397 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12398 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12399
f3f9dcbc
MV
12400 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12401 instead of with vcells. Do not overwrite `var' with the result of
12402 the lookup, use the new `real_var' instead. Remove `var2' in
12403 exchange (which was only used with threads).
12404 (sym_three_question_marks): New.
12405 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12406 `SCM_GLOC_SYM'.
12407 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12408 (scm_m_atfop): Expect the function definition to be a variable
12409 instead of a vcell.
12410 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12411 symbol instead.
12412 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12413 (scm_eval_args): Use more explicit code in the gloc branch of the
12414 atrocious struct ambiguity test. The optimizer will sort this
12415 out.
12416 (scm_deval_args): Likewise.
12417 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12418 remember the symbol instead. Added some comments where
12419 scm_tc3_cons_gloc really exclusively refers to structs.
12420 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12421 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12422 of scm_sysintern in general.
12423
12424 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12425 explicit magic.
12426
12427 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12428 pairs. Put the variable directly in the gloc.
12429 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12430 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12431
12432 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12433
12434 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12435 scm_the_last_stack_fluid_var. It now points to a variable instead
12436 of a vcell. Updated all uses.
12437 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12438 instead of a vcell. Updated all uses.
12439
12440 * _scm.h: Include "variables.h" and "modules.h" since almost
12441 everybody needs them now.
12442
12443 * root.h (scm_symhash, scm_symhash_vars): Removed.
12444 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12445
7c33806a
DH
124462001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12447
12448 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12449 scm_listofnull.
7c33806a
DH
12450
12451 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12452 like the SCM_NEWCELL macro counterparts.
12453
12454 (scm_init_storage, scm_init_gc): Moved initialization of
12455 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12456
12457 (scm_init_storage): Moved initialization of scm_undefineds and
12458 scm_listofnull to eval.c, initializion of scm_nullstr to
12459 strings.c, initializion of scm_nullvect to vectors.c.
12460
12461 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12462 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12463
12464 * init.c (scm_init_guile_1): Reordered some initializations and
12465 added dependcy information comments.
12466
12467 * load.c (scm_init_load): Use scm_nullstr.
12468
12469 * strings.c (scm_init_strings): Initialize scm_nullstr.
12470
12471 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12472
11bbab47
MV
124732001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12474
12475 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12476 multiple lines. Thanks to Matthias Köppe!
11bbab47 12477
5cd06d5e
DH
124782001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12479
12480 * deprecation.c: Fixed copyright date.
12481
12482 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12483 DEPRECATION_H to SCM_DEPRECATION_H.
12484
32bac999
TTN
124852001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12486
12487 * guile-doc-snarf.in: Update copyright.
12488 Fix relative path bug. Thanks to Sergey Poznyakoff.
12489
c9dcc5ae
MV
124902001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12491
12492 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12493 accept open ports. Thanks to Quetzalcoatl Bradley!
12494
7c582ec9
MG
124952001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12496
12497 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12498 has 779 primitives on startup.
12499
284ab601
MV
125002001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12501
12502 * eval.c (scm_i_eval): Copy expression before passing it to
12503 SCM_XEVAL. The copy operation was removed unintendedly during my
12504 change on 2001-03-25.
12505
910d1e40
ML
125062001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12507
9a5fa6e9 12508 from Matthias Köppe (thanks!):
910d1e40
ML
12509
12510 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12511 portable.
12512
12513 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12514 docstring.
12515
56e55ac7
DH
125162001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12517
12518 * gc.c (scm_init_gc): Added FIXME comment.
12519
12520 * hooks.c: Since hooks don't have a name any more, it is not
12521 necessary to include objprop.h.
12522
12523 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12524
12525 (symbol_name, scm_make_hook_with_name): Removed.
12526
12527 (scm_create_hook): Don't set the hook's name property.
12528
12529 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12530
12531 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12532
12533 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12534
12535 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12536 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12537 FLOBUFLEN and define it unconditionally.
12538
d204b24c
MV
125392001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12540
438201b4
MV
12541 * gh_data.c (gh_lookup): Call gh_module_lookup with
12542 `scm_current_module ()', not `#f'.
12543 (gh_module_lookup): Expect a module instead of an obarray as first
12544 argument and do lookup in that module.
56e55ac7 12545
d204b24c
MV
12546 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12547 arrays. The length of array is already determined differently and
12548 scm_uniform_vector_length does not work on arrays.
12549
26c1d549
MV
125502001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12551
fe7c2f88
MV
12552 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12553 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12554
26c1d549
MV
12555 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12556 they are not used. Changed `wrong type' error into `wrong num
12557 args' error. Changed all callers.
56e55ac7 12558
26c1d549
MV
12559 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12560 arguments are supplied.
12561
1c938eb8
TTN
125622001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12563
12564 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12565 describe `regexp/notbol' and `regexp/noteol' execution flags.
12566
3a6379f7
TTN
12567 * strop.c (scm_substring_move_x): Doc fix; nfc.
12568
c10ecc4c
MV
125692001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12570
12571 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12572 (scm_set_object_procedure_x): Use it to check argument. Fix
12573 docstring.
12574
12575 * evalext.c (scm_definedp): Fix docstring.
12576
a57a0b1e
GH
125772001-05-05 Gary Houston <ghouston@arglist.com>
12578
12579 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12580 support.
12581
7a095584
NJ
125822001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12583
12584 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12585 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12586 Change R4RS references to R5RS.
12587
12588 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12589 docstring source are correctly reproduced in the output (ii)
12590 we don't anymore get occasional trailing quotes. Also reorganized
12591 and commented the code a little.
12592
12593 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12594 fixes.
12595
dd2a6f3a
MG
125962001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12597
12598 * strop.c (scm_string_split): New procedure.
12599
12600 * strop.h (scm_string_split): Added prototype.
12601
00120130
GH
126022001-05-04 Gary Houston <ghouston@arglist.com>
12603
12604 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12605 Dale P. Smith.
12606
b65e6bfe
MV
126072001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12608
12609 * rw.c: Include "modules.h" and "strports.h".
12610
12611 * net_db.h (scm_gethost): Added prototype.
12612
12613 * deprecation.h, deprecation.c: New.
12614 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12615 (DOT_X_FILES): Added "deprecation.x".
12616 (modinclude_HEADERS): Added "deprecation.h".
12617
12618 * init.c: Include "deprecation.h".
12619 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12620
b65e6bfe
MV
126212001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12622
12623 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12624 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12625 New.
12626
b0e5fd8c
GH
126272001-04-29 Gary Houston <ghouston@arglist.com>
12628
12629 * rw.c: new file, implementing C part of module (ice-9 rw).
12630 (scm_read_string_x_partial): moved from ioext.c
12631 (scm_init_rw): new proc.
12632 * rw.h: new file.
12633 init.c: include rw.h and call scm_init_rw.
12634 Makefile.am: include rw.c and rw.h.
12635
0b2da99c
RB
126362001-04-28 Rob Browning <rlb@cs.utexas.edu>
12637
12638 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12639 know what's supposed to happen to it.
12640
12641 * list.h (scm_list_star): deprecation expired - removed.
12642
12643 * numbers.h (scm_dblproc): deprecation expired - removed.
12644 (SCM_UNEGFIXABLE): deprecation expired - removed.
12645 (SCM_FLOBUFLEN): deprecation expired - removed.
12646 (SCM_INEXP): deprecation expired - removed.
12647 (SCM_CPLXP): deprecation expired - removed.
12648 (SCM_REAL): deprecation expired - removed.
12649 (SCM_IMAG): deprecation expired - removed.
12650 (SCM_REALPART): deprecation expired - removed.
12651 (scm_makdbl): deprecation expired - removed.
12652 (SCM_SINGP): deprecation expired - removed.
12653 (SCM_NUM2DBL): deprecation expired - removed.
12654 (SCM_NO_BIGDIG): deprecation expired - removed.
12655
12656 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12657 (scm_tc_dblr): deprecation expired - removed.
12658 (scm_tc_dblc): deprecation expired - removed.
12659 (scm_tc16_flo): deprecation expired - removed.
12660 (scm_tc_flo): deprecation expired - removed.
12661
12662 * tag.h (scm_tag): deprecation expired - removed.
12663
12664 * tag.c: (scm_tag): deprecation expired - removed.
12665
12666 * ioext.c: (scm_fseek): deprecation expired - removed.
12667
12668 * ioext.h (scm_fseek): deprecation expired - removed.
12669
12670 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12671
12672 * gh.h (gh_int2scmb): deprecation expired - removed.
12673
e3334972
NJ
126742001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12675
12676 * stacks.c (scm_make_stack): Fix typo in docstring.
12677
a0f979ac
RB
126782001-04-27 Rob Browning <rlb@cs.utexas.edu>
12679
12680 * error.c (scm_sysmissing): deprecation expired - removed.
12681
12682 * error.h (scm_sysmissing): deprecation expired - removed.
12683
12684 * gc.c
12685 (scm_init_gc): gc-thunk deprecation expired - removed.
12686 (scm_gc_vcell): deprecation expired - removed.
12687 (gc_async_thunk): scm_gc_vcell related code removed.
12688
12689 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12690
12691 * strings.h
12692 (SCM_NSTRINGP): deprecation expired - removed.
12693 (SCM_NRWSTRINGP): deprecation expired - removed.
12694
12695 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12696
12697 * chars.h
12698 (SCM_ICHRP): deprecation expired - removed.
12699 (SCM_ICHR): deprecation expired - removed.
12700 (SCM_MAKICHR): deprecation expired - removed.
12701
12702 * ports.h
12703 (SCM_INPORTP): deprecation expired - removed.
12704 (SCM_OUTPORTP): deprecation expired - removed.
12705
253081cf
MV
127062001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12707
12708 * modules.c (scm_module_type): New.
12709 (scm_post_boot_init_modules): Initialize from Scheme value.
12710 (the_module, scm_current_module, scm_init_modules): the_module is
12711 now a C only fluid.
12712 (scm_current_module): Export to Scheme.
12713 (scm_set_current_module): Do not call out to Scheme, do all the
12714 work in C. Export procedure to Scheme. Only accept modules, `#f'
12715 is no longer valid as the current module. Only set
12716 scm_top_level_lookup_closure_var and scm_system_transformer when
12717 they are not deprecated.
12718 (scm_module_transformer, scm_current_module_transformer): New.
12719
12720 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12721 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12722
253081cf
MV
12723 * gh_data.c: Removed FIXME comment about gh_lookup returning
12724 SCM_UNDEFINED. That's the right thing to do.
12725
12726 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12727 into the conditionally compiled sections.
12728 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12729 scm_current_module_transformer instead of scm_system_transformer.
12730 * init.c (start_stack): Move initialization of
12731 scm_system_transformer to the deprecated section.
1c938eb8 12732
1f7f9ed4
NJ
127332001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12734
12735 * throw.c (scm_throw): Correct docstring.
12736
66c73b76
GH
127372001-04-22 Gary Houston <ghouston@arglist.com>
12738
eefae538
GH
12739 * socket.c: attempted to improve the docstrings slightly.
12740
66c73b76
GH
12741 * net_db.c: remove bogus "close" declaration.
12742 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12743 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12744 moved to socket.c.
12745 * net_db.h: declarations moved too.
12746
12747 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12748 long.
12749 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12750 (VALIDATE_INET6): new macro.
12751 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12752 inet-pton and inet-ntop.
12753 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12754 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12755
7a7f7c53
DH
127562001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12757
12758 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12759 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12760
12761 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12762 when compiled in debug mode.
12763
12764 (scm_gc_sweep): Only call smob's free function if it is defined.
12765
12766 * print.c (scm_iprin1): No need to check for validity of smob
12767 type or existence of print function.
12768
12769 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12770 Resizing will not work well with preemptive threading.
12771
12772 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12773
12774 (scm_make_smob_type): Extracted initialization of smob
12775 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12776 of the critical section.
12777
12778 (scm_smob_prehistory): Initialize all smob descriptors. By
12779 default, don't assign a smob free function: Most smob types don't
12780 need one.
12781
12782 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12783
e1368a8d
GH
127842001-04-21 Gary Houston <ghouston@arglist.com>
12785
12786 * socket.c (FLIP_NET_HOST_128): new macro.
12787 (scm_fill_sockaddr): use new macro.
12788 (scm_addr_vector): completed IPv6 address support. added const
12789 to the address parameter.
12790
5a525b84
GH
127912001-04-20 Gary Houston <ghouston@arglist.com>
12792
12793 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12794 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12795 is defined.
12796 (scm_addr_vector): use a switch instead of multiple if statements.
12797 Add support for IPv6 (incomplete) .
e1368a8d 12798 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12799
1a551638
DH
128002001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12801
12802 * struct.c (scm_free_structs): Only pairs may be accessed with
12803 SCM_C[AD]R.
12804
c07b3fef
MD
128052001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12806
a9d861e3
MD
12807 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12808
c07b3fef
MD
12809 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12810 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12811 parentheses in order to get the correct associativity.
12812
af7546eb
DH
128132001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12814
12815 * unif.c (scm_array_to_list): Added missing handling of arrays of
12816 bytes. Thanks to Masao Uebayashi for the bug report.
12817
4daecfee
DH
128182001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12819
12820 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12821 consistently.
12822
726d810a
DH
128232001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12824
12825 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12826
12827 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12828 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12829 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12830 SCM_CLOSURE_FORMALS.
12831
12832 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12833 (scm_i_procedure_arity): Prefer stronger predicates like
12834 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12835
12836 * macros.c (macro_print): Extracted macro printing code from
12837 print.c and simplified it.
12838
12839 (scm_macro_type): Use SCM_MACRO_TYPE;
12840
12841 (scm_init_macros): Use macro_print for printing macros.
12842
12843 * print.c (scm_print_opts): Improved option documentation.
12844
12845 (scm_iprin1): Extracted printing of macros to macros.c.
12846 Simplified printing of ordinary closures.
12847
12848 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12849 Martin Grabmueller for the bug report.
12850
e038c042
DH
128512001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12852
12853 This patch eliminates some further applications of SCM_C[AD]R to
12854 non pair cells.
12855
12856 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12857 never been applied to real pairs.
12858
12859 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12860
12861 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12862
12863 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12864 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12865 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12866
12867 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12868 Added.
12869
12870 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12871 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12872
12873 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12874 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12875 SCM_SET{AND,OR}_CAR.
12876
3453619b
GH
128772001-04-17 Gary Houston <ghouston@arglist.com>
12878
12879 * some initial support for IPv6:
1c938eb8 12880
3453619b
GH
12881 * socket.c (scm_fill_sockaddr): improve the argument validation.
12882 don't allocate memory until all args are checked. instead of
12883 unconditional memset of soka, try setting sin_len to 0 if
12884 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12885 (scm_socket, scm_connect): extend docstrings for IPv6.
12886 (scm_init_socket): intern AF_INET6 and PF_INET6.
12887
216eedfc
DH
128882001-04-17 Niibe Yutaka <gniibe@m17n.org>
12889
12890 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12891 matches SCM_DEFER_INTS at the beginning of the function.
12892
12893 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12894
12895 * gc.c (scm_igc): Unconditionally call
12896 SCM_CRITICAL_SECTION_START/END.
12897
12898 * fluids.c (next_fluid_num): Unconditionally call
12899 SCM_CRITICAL_SECTION_START/END.
12900 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12901
12902 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12903 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12904 Removed.
12905
12906 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12907 Defined as nothing for the case of !defined(USE_THREADS).
12908 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12909 Removed.
12910 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12911 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12912 LINE.
12913 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12914 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12915 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12916 SCM_CRITICAL_SECTION_START/END.
12917 (SCM_REALLOW_INTS: Bug fix. Don't call
12918 SCM_THREAD_SWITCHING_CODE.
12919 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12920 SCM_THREAD_SWITCHING_CODE directly.
12921 (SCM_ENTER_A_SECTION): Unconditionally use
12922 SCM_CRITICAL_SECTION_START/END. (was:
12923 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12924
129252001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12926
12927 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12928 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12929 allowed to explicitly set this macro via the CFLAGS variable
12930 during make.
12931
12932 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12933 (SCM_THREAD_CRITICAL_SECTION_START,
12934 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12935 SCM_THREAD_CRITICAL_SECTION_START/END to
12936 SCM_CRITICAL_SECTION_START/END.
12937
f22ed5a0
KN
129382001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12939
12940 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12941 instead of bzero.
1c938eb8 12942
f22ed5a0 12943 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12944 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12945
12946 Thanks to NIIBE Yutaka.
12947
508ded1c
MD
129482001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12949
a087ba81
MD
12950 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12951 goops module should be registered in order to work for an
12952 application which uses libguile statically linked.)
508ded1c 12953
e4b265d8
DH
129542001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12955
12956 * numbers.[ch] (scm_num2long, scm_num2long_long,
12957 scm_num2ulong_long, scm_num2ulong): Argument position is an
12958 unsigned integer.
12959
12960 * environments.c (eval_environment_folder,
12961 import_environment_folder), gh_data.c (gh_scm2longs,
12962 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12963 for integers and pointers, respectively.
12964
12965 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12966 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12967 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12968 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12969
12970 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12971 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12972 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12973 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12974 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12975 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12976
89d04205
NJ
129772001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12978
12979 * strings.c (scm_read_only_string_p): Update docstring to reflect
12980 current (non-)usage of "read only" strings.
40f83c3e
NJ
12981 (scm_make_shared_substring): Clarify docstring by changing
12982 "semantics" to "arguments".
89d04205 12983
4d66be54
MG
129842001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12985
12986 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12987 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12988 improvements.
12989
1e6808ea
MG
129902001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12991
12992 The following changes make the documentation more consistent.
1c938eb8 12993
1e6808ea
MG
12994 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12995 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12996 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12997 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12998 ... @end lisp.
12999
13000 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
13001 (scm_array_dimensions, scm_make_shared_array),
13002 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
13003 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
13004 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
13005 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
13006 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
13007 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
13008 macros.c (scm_makmmacro), list.c (scm_append), environments.c
13009 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
13010 @example ... @end example to @lisp ... @end lisp.
13011
13012 * weaks.c (scm_weak_vector): Corrected docstring.
13013
13014 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
13015 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
13016 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
13017 (scm_hashx_set_x, scm_hashx_get_handle),
13018 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
13019 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
13020 vectors.c (scm_vector_fill_x), strings.c
13021 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
13022 objprop.c (scm_set_object_properties_x):
13023 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
13024 strports.c (scm_call_with_input_string), ports.c
13025 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
13026 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
13027 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
13028 (scm_make_weak_vector,scm_weak_vector_p),
13029 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
13030 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
13031 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13032 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
13033 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
13034 Made parameter names match documentation by renaming parameters
13035 and/or fixing docstrings.
1c938eb8 13036
1e6808ea
MG
13037 * numbers.c (scm_ash): Corrected Texinfo markup.
13038
13039 * strop.c (scm_string_index, scm_string_rindex),
13040 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
13041
13042 * vports.c (scm_make_soft_port), unif.c
13043 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
13044 (scm_dimensions_to_uniform_array, scm_transpose_array),
13045 (scm_array_in_bounds_p, scm_uniform_vector_ref),
13046 (scm_bit_count, scm_bit_position, scm_bit_count_star),
13047 (scm_array_to_list, scm_list_to_uniform_array),
13048 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
13049 (scm_open_input_string, scm_open_output_string),
13050 (scm_get_output_string), strop.c (scm_string_copy),
13051 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
13052 (scm_get_internal_real_time, scm_times),
13053 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
13054 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
13055 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
13056 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
13057 simpos.c (scm_system), random.c (scm_random_uniform),
13058 (scm_random_normal, scm_random_exp), ramap.c
13059 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
13060 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
13061 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
13062 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
13063 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
13064 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
13065 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
13066 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
13067 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
13068 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
13069 (scm_logand, scm_logior, scm_logxor, scm_lognot),
13070 (scm_integer_expt, scm_bit_extract, scm_logcount),
13071 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
13072 net_db.c (scm_inet_netof, scm_lnaof), modules.c
13073 (scm_interaction_environment), macros.c (scm_makacro),
13074 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
13075 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
13076 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
13077 (scm_fluid_ref), filesys.c (scm_open_fdes),
13078 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
13079 Docstring correction: `Returns' -> `Return'
13080
1c938eb8
TTN
13081 * gc.c (scm_set_debug_cell_accesses_x):
13082 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
13083 * fluids.c (scm_fluid_p): Added texinfo markup.
13084
13085 * error.c (scm_strerror): Made docstring more precise.
13086
13087 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
13088 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
13089 (scm_symbol_p, scm_symbol_to_string), strorder.c
13090 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
13091 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
13092 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
13093 (scm_string_ci_geq_p), strop.c (scm_string_copy),
13094 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
13095
9a6976cd
DH
130962001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
13097
13098 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
13099 mode, as suggested by Michael Livshin.
13100
463b2219
ML
131012001-03-31 Michael Livshin <mlivshin@bigfoot.com>
13102
13103 * backtrace.c (display_backtrace_body): since the `print_state'
13104 variable is not used (instead its data field is used directly as
13105 `pstate'), protect it from the hungry compiler optimizations.
13106 thanks to Bill Schottstaedt for the report.
13107
61045190
DH
131082001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13109
13110 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
13111 It is only defined and used if guile is compiled with
13112 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
13113 let cells with a free_cell type tag be visible outside of the
13114 garbage collector when in debug mode.
13115
13116 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
13117
13118 (scm_assert_cell_valid): Use a local static variable to avoid
13119 recursion.
13120
13121 (MARK): Only check for rogue cell pointers in debug mode. Use
13122 scm_cellp for this purpose and place all checks for rogue pointers
13123 into that function. Further, since due to conservative scanning
13124 we may encounter free cells during marking, don't use the standard
13125 cell type accessor macro to determine the cell type.
13126
13127 (scm_cellp): Check if the cell pointer actually points into a
13128 card header.
13129
13130 (scm_init_gc): Initalize scm_tc16_allocated.
13131
13132 * gc.h (GCH): Renamed to SCM_GC_H.
13133
13134 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
13135 might be unnecessary, but I feel better this way :-)
13136
13137 (SCM_GC_CELL_TYPE): New macro.
13138
13139 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
13140 in guile, and it is unlikely that they will be applied to real
13141 pairs anyway.
13142
13143 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
13144
13145 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
13146 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
13147
13148 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
13149 make sure that in debug mode no free cell will ever be visible
13150 outside of the garbage collector.
13151
85d6df6a
DH
131522001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13153
13154 * async.c (scm_asyncs_pending): Don't use != to compare SCM
13155 values.
13156
13157 * async.c (scm_system_async), variable.c (scm_make_variable,
13158 scm_make_undefined_variable): Use scm_cons to create a pair.
13159
13160 * debug.c (scm_reverse_lookup): Perform proper type checking.
13161 Remove suspicious use of SCM_SLOPPY_CONSP.
13162
13163 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
13164 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
13165 the corresponding optimization.
13166
13167 * eval.c (iqq): Use proper type check.
13168
13169 (scm_m_expand_body): Remove redundant type checks.
13170
13171 (promise_print): Don't access promise cells as pairs.
13172
13173 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
13174 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
13175 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
13176 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
13177 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
13178
13179 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
13180 (scm_iprin1): Use new macro predicate and accessors.
13181
13182 * eval.h (scm_tc16_macro): Removed declaration. It is declared
13183 in macros.h.
13184
13185 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
13186 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
13187 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
13188 SCM_VARIABLE_H. Even the macros that are used to inhibit
13189 including a header file twice should be in the SCM_ namespace.
13190
13191 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
13192 properties.c (scm_primitive_property_ref,
13193 scm_primitive_property_del_x): Prefer stronger predicates like
13194 SCM_NULLP or SCM_FALSEP over SCM_IMP.
13195
13196 * gc.c (MARK): Use proper macros to access procedure-with-setter
13197 cell elements and closure cell elements.
13198
13199 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
13200 access free cells as pairs.
13201
13202 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13203 no hashtab entry is found.
13204
13205 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13206 SCM_CLR_PORT_OPEN_FLAG.
13207
13208 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13209 use SCM_SET_C[AD]R for uninitialized cells.
13210
13211 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13212 If the hashtable has no slots, return #f instead of '(). This
13213 unifies the return value with most assoc-functions.
13214
13215 (scm_hash_fn_ref): Use proper type check.
13216
13217 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13218 Removed references to non-existing functions from documentation.
13219
13220 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13221 access keyword cell elements.
13222
13223 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13224 macros.
13225
13226 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13227
13228 * print.c (scm_iprlist): Added comment. Improved loop
13229 conditions.
13230
13231 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13232 pairs.
13233
13234 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13235
13236 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13237
13238 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13239 cells as pairs.
13240
13241 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13242 scm_variable_set_x): Use proper macros to access variable cell
13243 elements.
13244
13245 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13246
13247 * variable.h (SCM_VARVCELL): Don't access variable cells as
13248 pairs.
13249
13250 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13251 added FIXME comment, removed register specifier.
13252
1b27e91a
KN
132532001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13254
13255 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13256 * init.c (scm_init_guile_1): Don't init goopscore module.
13257
16c634ec
MV
132582001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13259
13260 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13261
91344ceb
MG
132622001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13263
13264 * strop.c (scm_string_to_list): Fixed docstring markup.
13265 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13266 (scm_string_downcase, scm_string_capitalize_x),
13267 (scm_string_capitalize): Rewrote and corrected docstrings.
13268 (scm_string_ci_to_symbol): Made docstring more explicit.
13269
07576812
MV
132702001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13271
13272 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13273 eval.c can use it.
13274 (scm_call_with_values): Removed.
13275 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13276 so that it can be exported.
13277 (scm_call_with_values): Removed.
1c938eb8 13278
07576812
MV
13279 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13280 * eval.c: Include "libguile/values.h"
13281 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13282 New.
13283 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13284 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13285 New delcarations to support above change.
13286
13287 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13288 errors with last change.
1c938eb8 13289
07576812
MV
132902001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13291
13292 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13293 scm_i_eval): Moved the application of the system transformer from
13294 scm_i_eval to scm_primitive_eval.
13295
a17bb5fd
NJ
132962001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13297
a6be01a4
NJ
13298 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13299
a17bb5fd
NJ
13300 * strop.c (scm_string_index): Fix docstring line break
13301 regression.
13302
13303 * list.c (scm_cons_star): Fix docstring typo.
13304
be54b15d
DH
133052001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13306
13307 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13308 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13309 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13310 scm_make_string, scm_string_append), strports.c (st_resize_port,
13311 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13312 scm_makstr with calls to scm_allocate_string.
13313
13314 * strings.[ch] (scm_allocate_string): New function.
13315
13316 * strings.[ch] (scm_makstr): Deprecated.
13317
789ecc05
GH
133182001-03-18 Gary Houston <ghouston@arglist.com>
13319
6d163216
GH
13320 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13321 NULL. rewrote the docstring.
13322 (scm_mkstemp): new procedure implementing "mkstemp!".
13323 * posix.h: declare scm_mkstemp.
13324
789ecc05
GH
13325 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13326 normally it would be found in netdb.h.
13327
c6c79933
GH
133282001-03-17 Gary Houston <ghouston@arglist.com>
13329
e9e225e5
GH
13330 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13331 warning when HAVE_ARRAYS is not defined. move len too.
13332
13333 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13334 (EXTRA_DOT_X_FILES): let configure set the value.
13335 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13336
c6c79933
GH
13337 * gc.c (scm_must_malloc): changed the comment explaining when
13338 scm_must variants of malloc/free etc., should be used, based on
13339 explanation from Dirk Herrmann.
13340 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13341 string with procedure name. use scm_must_malloc instead of malloc.
13342 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13343 of malloc/free.
13344 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13345 scm_ungetc): use scm_must variants of malloc/realloc/free.
13346 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13347
b3fcac34
DH
133482001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13349
13350 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13351 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13352 scm_wrong_type_arg instead.
13353
13354 (SCM_WNA): Deprecated.
13355
13356 * error.[ch] (scm_wta): Deprecated.
13357
13358 * numbers.c (s_i_log): Minor comment fix.
13359
13360 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13361 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13362 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13363 wrong-num-args or misc errors.
13364
13365 * unif.c (scm_make_shared_array, scm_transpose_array,
13366 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13367 Validate the rest argument (note: this is only done when guile is
13368 built with SCM_DEBUG_REST_ARGUMENT=1)
13369
13370 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13371 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13372
13373 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13374 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13375
68baa7e7
DH
133762001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13377
13378 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13379 instead of scm_wrong_num_args.
13380
13381 * coop-threads.c: Don't include libguile/strings.h. (Was only
13382 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13383
13384 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13385 wrong-num-args errors.
13386
9f40cd87
DH
133872001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13388
13389 * error.[ch] (scm_error_num_args_subr): New function.
13390
5352393c
MG
133912001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13392
13393 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13394 (scm_length, scm_append, scm_reverse, scm_list_ref),
13395 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13396 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13397 (scm_delete1_x), gc.c (scm_map_free_list),
13398 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13399 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13400 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13401 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13402 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13403 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13404 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13405
13406 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13407 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13408 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13409 symbols.c (scm_symbol_interned_p), numbers.c
13410 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13411 markup.
13412
a9205f07
KN
134132001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13414
13415 * snarf.h (SCM_CONST_LONG): Deprecated.
13416 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13417
6d583887
MV
134182001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13419
13420 * numbers.c (scm_num2ulong): Check that a bignum is positive
13421 before looking at the magnitude. Correctly check for overflow
13422 during conversion.
13423 (scm_num2long_long): Likewise.
13424 (scm_num2ulong_long): New.
13425 (ULONG_LONG_MAX): Define if not already defined.
13426 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13427
e87a03fc
MG
134282001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13429
13430 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13431
13432 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13433 (SCM_OPOUTSTRPORTP): New predicate macros.
13434 (scm_open_input_string, scm_open_output_string),
13435 (scm_get_output_string): New prototypes.
1c938eb8 13436
e87a03fc
MG
13437 * strports.c (scm_open_input_string, scm_open_output_string),
13438 (scm_get_output_string): New procedures (SRFI-6 compliant).
13439 Made scm_tc16_strport non-static.
13440
160bb34a
DH
134412001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13442
13443 * macros.h (SCM_ASSYNT): Removed unused object argument from
13444 signature.
13445
13446 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13447 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13448 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13449 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13450 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13451 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13452 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13453 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13454 scm_m_atdispatch): Removed unused object argument from call to
13455 SCM_ASSYNT.
13456
80dee77b
DH
134572001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13458
13459 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13460 const int* to reflect that the input array of integers remains
13461 unchanged. Thanks to Brett Viren for the hint.
13462
d3dd80ab
MG
134632001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13464
13465 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13466 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13467 in various places.
13468 (gh_scm2newstr, gh_symbol2newstr): Change call to
13469 scm_must_malloc() to malloc(), because user-free()able memory is
13470 allocated.
13471
13472 * gc.c: Added declaration of `scm_debug_check_freelist'.
13473
26a3038d
MG
134742001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13475
13476 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13477
1f3908c4
KN
134782001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13479
13480 * strports.c (scm_object_to_string): New procedure.
13481 (scm_strprint_obj): Deprecated.
13482 * strports.h: Reflect the changes.
13483
e11208ca
DH
134842001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13485
13486 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13487
13488 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13489 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13490 SCM_ASSYNT to check for correct argument types. Either use some
13491 SCM_VALIDATE_* macro or an explicit test.
13492
13493 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13494 misc-errors.
13495
13496 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13497 instead of calling scm_wta.
13498
67e8151b
MG
134992001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13500
13501 * load.c (scm_primitive_load, scm_primitive_load_path),
13502 (scm_sys_search_load_path): Corrected docstrings (file ->
13503 filename).
13504
13505 * eval.c (scm_force): Added texinfo markup to docstring.
13506 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13507
13508 * debug-malloc.c: Reinserted #include <stdio.h>.
13509
e0c08f17
KN
135102001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13511
e39c3de4
KN
13512 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13513
e0c08f17
KN
13514 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13515 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13516 Use SCM_LISTn instead of scm_listify.
13517
e6e2e95a
MD
135182001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13519
13520 * _scm.h: Removed #include <errno.h>.
13521
13522 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13523 errno variable (can be a macro on some systems, for example when
13524 using linux libc with threads).
13525
13526 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13527 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13528 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13529 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13530
97d0e20b
GH
135312001-03-10 Gary Houston <ghouston@arglist.com>
13532
13533 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13534 not already defined.
13535
e75341b3
MD
135362001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13537
13538 * coop.c: Inserted #include <stdio.h>.
13539
13540 * iselect.c: Reinserted #include <stdio.h>.
13541
74355186
MV
135422001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13543
13544 * posix.c: Replaced `#define' of __USE_XOPEN right before
13545 including unistd.h with a define of _GNU_SOURCE at the very top of
13546 the file.
13547
783e7774
KN
135482001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13549
13550 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13551 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13552 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13553 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13554 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13555 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13556 print.c, procprop.c, procs.c, properties.c, ramap.c,
13557 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13558 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13559 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13560 Remove #include <stdio.h>
783e7774
KN
13561 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13562
13563 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13564
9a677c37
MG
135652001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13566
13567 * posix.c (scm_gethostname): Set initial name length to 256 for
13568 Solaris.
13569
94e6d793
MG
135702001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13571
13572 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13573 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13574 (scm_sethostname, scm_gethostname): New prototypes.
13575
13576 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13577 <sys/file.h>, if present.
13578 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13579 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13580 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13581 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13582 (scm_sethostname, scm_gethostname): New procedures.
13583
650a1cf9
NJ
135842001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13585
13586 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13587 not optional (ii) "recommend" spelling correction.
13588
9636b49c
MD
135892001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13590
5e4a4d09
MD
13591 * ramap.c (racp): Removed optimization which caused array copying
13592 to fail if the two arrays shared storage. Re-inserted the IVDEP
13593 macros removed in the change of 2000-03-09. (Don't really have a
13594 complete grasp of what they are for, but they seem to be necessary
13595 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13596
9636b49c
MD
13597 * hash.c (scm_string_hash): Don't downcase characters.
13598
04a4d666
MD
135992001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13600
9636b49c 13601 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13602 size from 277 --> 1009.
13603
13604 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13605 function.
13606
13607 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13608
04a4d666
MD
13609 * validate.h: Code formatting.
13610
66418d34
KN
136112001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13612
13613 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13614 (*.doc): Add dependency on guile-snarf.awk.in.
13615
13616 * guile-snarf.awk.in: Neglect spaces at the end of
13617 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13618 middle of docstrings. (To avoid the problem with gcc-2.96.)
13619
2ade72d7
DH
136202001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13621
13622 * coop-threads.c (scm_call_with_new_thread), load.c
13623 (scm_primitive_load, scm_sys_search_load_path), random.c
13624 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13625 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13626 (potentially) issue a scm-misc-error or wrong-num-args error
13627 message.
13628
13629 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13630 about the expected type with the wrong-type-arg error message.
13631
13632 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13633 a C level bug that can't be fixed from scheme anyway.
13634
586d7da2
MD
136352001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13636
13637 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13638 Duplicate bindings are OK in a let* since a let* is semantically
13639 equivalent to a nested set of let:s.
13640
1dd05fd8
MG
136412001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13642
13643 * print.c (scm_print_options): Fixed texinfo in docstring.
13644
13645 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13646 the underlying functions getservent, getprotoent or getnetent
13647 return NULL instead of signalling an error.
13648
439006bf
GH
136492001-03-04 Gary Houston <ghouston@arglist.com>
13650
13651 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13652 taking an unexpectedly large filename for an AF_UNIX socket from
13653 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13654
439006bf
GH
13655 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13656 former and adjusted the latter.
13657 (scm_socket, scm_socketpair): cosmetic changes.
13658 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13659 size_t as socklen_t substitute. don't restrict args/return values
13660 to INUM: allow full range of int or size_t.
13661 (scm_fill_sockaddr): check arguments before allocating memory, to
13662 avoid leakage. use malloc, not scm_must_malloc.
13663 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13664 substitute. free the sockaddr structure before throwing an error.
13665 (scm_init_add_buffer): procedure removed, together with its static
13666 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13667 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13668 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13669 scm_sendto): use a local buffer instead of scm_addr_buffer.
13670 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13671 not size_t.
13672 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13673 call to detect whether recvfrom could be bothered to set the address.
13674 (scm_init_socket): don't call scm_init_addr_buffer.
13675
276dd677
DH
136762001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13677
13678 * debug.c (scm_procedure_source, scm_procedure_environment),
13679 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13680 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13681 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13682 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13683 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13684 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13685 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13686 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13687 scm_array_to_list, scm_array_prototype), validate.h
13688 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13689 scm_misc_error or scm_wrong_type_arg instead.
13690
13691 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13692
5e03762c
MD
136932001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13694
13695 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13696 (scm_sys_tag_body): Added.
13697
db4b4ca6
DH
136982001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13699
13700 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13701 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13702 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13703 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13704 options.c (scm_options), ports.c (scm_remove_from_port_table),
13705 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13706 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13707 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13708 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13709 instead.
13710
87e7741d
MD
137112001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13712
13713 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13714
d19b0aac
MV
137152001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13716
13717 * eval.c (scm_s_duplicate_bindings): New error message.
13718 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13719
2fd945df
MV
137202001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13721
13722 * eval.h (SCM_EVALIM2): New macro. Use it when a
13723 immediate, literal constant should be evaluated.
13724 * eval.c (scm_s_duplicate_formals): New error message string.
13725 (scm_c_improper_memq): New function.
13726 (scm_m_lambda): Check for duplicate arguments.
13727 (scm_ceval, scm_deval): When executing a body: only cons a new
13728 toplevel environment frame when it is different from the
13729 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13730 check for empty combinations; use SCM_EVALIM2 for the same reason
13731 in the non-toplevel loop.
13732 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13733 New labels with the meaning of their non-"nontoplevel" partners,
13734 but they are used when it is known that the body is not evaluated at
13735 top-level.
13736 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13737 reporting for empty combinations.
13738
9e6fc585
KN
137392001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13740
13741 * Remove dump facilities.
13742 * dump.c, dump.h: Removed.
13743 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13744 * init.c: Remove #include "libguile/dump.h".
13745 (scm_init_guile_1): Remove scm_init_dump.
13746 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13747 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13748 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13749 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13750
13751 * keywords.c: Remove #include "libguile/dump.h".
13752 (keyword_dump, keyword_undump): Removed.
13753 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13754
eae54bf0
MG
137552001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13756
13757 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13758 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13759 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13760 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13761 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13762 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13763 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13764 to @code{} as the texinfo manual recommends, converted the
13765 examples to use a @lisp{}-environment.
13766
13767 * strports.c (scm_eval_string): Cleaned up the docstring.
13768
13769 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13770 markup.
13771
13772 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13773 (scm_number_to_string, scm_string_to_number, scm_number_p)
13774 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13775 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13776 (scm_ash): Added texinfo markup and removed obsolete @refill.
13777 (scm_gr_p): Corrected comment.
13778 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13779 docstring) comments.
13780 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13781 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13782 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13783 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13784 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13785 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13786 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13787 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13788
23deee81
DH
137892001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13790
13791 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13792 (Obviously nobody compiles with SCM_RECKLESS defined...)
13793
13794 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13795
6fe692e9
MD
137962001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13797
13798 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13799
13800 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13801
27c37006
NJ
138022001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13803
13804 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13805 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13806 since use of `z' suggests that the arguments may be complex.
13807
13808 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13809 typos.
13810
2069af38
NJ
138112001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13812
13813 * dump.c (scm_binary_write, scm_binary_read), eval.c
13814 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13815 scm_guardian_greedy_p, scm_make_guardian), fports.c
13816 (scm_file_port_p): Minor docstring fixes.
13817
b42ff180
MV
138182001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13819
2069af38 13820 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13821
13822 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13823 scm_i_eval.
13824 (make_class_from_template): Do not bother to set the current
13825 module around the call to DEFVAR, scm_eval takes care of that.
13826 (scm_init_goops): Make scm_module_goops and
13827 scm_goops_lookup_closure permanent objects.
1c938eb8 13828
97ea55f8
MV
13829 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13830 top level, create a fresh top-level environment for each
13831 expression instead of mutating the exisint frame. This is
13832 important when that frame is closed over.
13833
b42ff180
MV
13834 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13835 SCM_DIGSPERLONG instead of DIGSPERLONG.
13836
09f2ab1e
MV
138372001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13838
13839 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13840 before applying arrow procedure in `cond' and before applying
13841 receiver procedure in call-with-current-continuation.
13842 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13843 macro. The argument is expanded more than one time.
13844
13845 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13846 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13847
138482001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13849
13850 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13851 notice and license.
13852
7090240c
MG
138532001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13854
13855 * variable.c (scm_make_variable, scm_make_undefined_variable)
13856 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13857 (scm_variable_bound_p), values.c (scm_values)
13858 (scm_call_with_values), unif.c (scm_bit_count)
13859 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13860 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13861 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13862 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13863 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13864 (scm_copy_random_state, scm_random), print.c (scm_newline)
13865 (scm_write_char, scm_simple_format), debug-malloc.c
13866 (scm_malloc_stats), environments.c (scm_environment_p)
13867 (scm_environment_bound_p, scm_environment_ref)
13868 (scm_environment_fold, scm_environment_define)
13869 (scm_environment_undefine, scm_environment_set_x)
13870 (scm_environment_cell, scm_environment_observe)
13871 (scm_environment_observe_weak, scm_environment_unobserve)
13872 (scm_make_eval_environment, scm_eval_environment_p)
13873 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13874 (scm_eval_environment_imported)
13875 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13876 (scm_import_environment_p, scm_import_environment_imports)
13877 (scm_import_environment_set_imports_x, scm_make_export_environment)
13878 (scm_export_environment_p, scm_export_environment_private)
13879 (scm_export_environment_set_private_x)
13880 (scm_export_environment_signature)
13881 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13882 Added texinfo markup.
13883
13884 * ports.c (scm_drain_input): Lowercased argument to @var.
13885 (scm_current_input_port, scm_current_output_port): Filled in
13886 missing explanation.
13887 (scm_current_load_port, scm_set_current_output_port)
13888 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13889 Added texinfo markup.
13890
13891 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13892 (scm_release_arbiter): Added texinfo markup to docstrings.
13893 Changed `Returns' to `Return'.
13894 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13895
25703850
NJ
138962001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13897
13898 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13899 by doubling them to `@@'.
13900
73c0fdce
MG
139012001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13902
13903 * numbers.c (scm_lognot), random.c (scm_random,
13904 scm_random_normal, scm_random_solid_sphere_x,
13905 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13906 scm_random_exp), dynwind.c
13907 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13908
73c0fdce
MG
13909 * goops.c (scm_sys_initialize_object, scm_instance_p,
13910 scm_class_name, scm_class_precedence_list, scm_class_slots,
13911 scm_class_environment, scm_generic_function_name,
13912 scm_generic_function_methods, scm_method_generic_function,
13913 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13914 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13915 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13916 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13917 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13918 scm_class_direct_supers, scm_class_direct_slots,
13919 scm_class_direct_subclasses, scm_class_direct_methods,
13920 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13921 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13922 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13923 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13924 scm_memoized_environment, scm_procedure_name,
13925 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13926 objects.c
13927 (scm_class_of, scm_entity_p, scm_operator_p,
13928 scm_set_object_procedure_x, scm_object_procedure,
13929 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13930 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13931 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13932 scm_hook_to_list), lang.c
13933 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13934 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13935 (scm_print_options, scm_port_with_print_state,
13936 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13937 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13938 scm_make_procedure_with_setter, scm_procedure), throw.c
13939 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13940 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13941 scm_stack_ref, scm_stack_length, scm_frame_p,
13942 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13943 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13944 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13945 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13946 (scm_dirname, scm_basename), dynwind.c
13947 (scm_wind_chain), read.c (scm_read_options, scm_read,
13948 scm_read_hash_extend), gc.c
13949 (scm_unhash_name), eval.c (scm_eval_options_interface,
13950 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13951 (scm_display_error, scm_set_print_params_x,
13952 scm_display_application, scm_display_backtrace, scm_backtrace),
13953 async.c (scm_async, scm_system_async, scm_async_mark,
13954 scm_system_async_mark, scm_run_asyncs, scm_noop,
13955 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13956 scm_mask_signals): Added docstrings.
13957
e228a203
KN
139582001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13959
13960 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13961 address of car/cdr. (Thanks to Dirk Herrmann)
13962 Use scm_sizet to obtain the length of strings.
13963 (Thanks to Matthias Koeppe)
13964
1552a59d
MV
139652001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13966
13967 * symbols.c (scm_mem2symbol): Put a empty statement after the
13968 next_symbol label. This is mandated by ANSI, appearantly.
13969
3178f751
MV
139702001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13971
13972 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13973 sense to compile for a specific kernel version. Do not include
13974 <asm/signal.h> while defining __KERNEL__. This hack should no
13975 longer be needed and caused problems.
13976
7af4defe
MV
139772001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13978
13979 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13980 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13981 can not deal with immediates.
13982
5d6bb349
KN
139832001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13984
13985 * list.c (scm_list_copy): Validate the first argument.
13986
ec9709f0
MV
139872001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13988
13989 Fix evaluator so that top-level expressions are correctly
13990 evaluated with respect to the module system.
1c938eb8 13991
ec9709f0
MV
13992 * modules.h. modules.c (scm_current_module_lookup_closure): New
13993 function.
13994
13995 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13996 prototypes.
13997 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13998 names to better reflect their meaning.
13999
14000 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
14001 evaluated at top-level and synronize lookup closure before
14002 executing every subform.
14003 (scm_primitve_eval_x, scm_primitive_eval): New functions.
14004 (scm_eval_x, scm_eval): Reimplement in terms of
14005 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 14006
ec9709f0
MV
140072001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
14008
14009 * macros.c (scm_macro_name, scm_macro_transformer): Use
14010 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
14011 Thanks!
14012
42417394
KN
140132001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
14014
14015 * dump.c (scm_store_bytes): Store data size before data.
14016 (scm_restore_bytes): Restore data size. Takes a pointer to size.
14017 * dump.h (scm_restore_bytes): Updated.
14018
bf942687
KN
140192001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
14020
14021 * dump.c: Use double cells for update schedule.
14022
1be4270a
KN
140232001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
14024
14025 * ports.c (scm_unread_char): Take an optional argument.
14026
548728ea
MV
140272001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
14028
14029 * modules.h (scm_selected_module, scm_current_module): Renamed
14030 scm_selected_module to scm_current_module to synchronize Scheme
14031 and C names.
14032 (scm_select_module, scm_set_current_module): Likewise. Changed
14033 all uses.
1c938eb8 14034
548728ea
MV
14035 * ports.c (scm_port_for_each): Make a snapshot of the port table
14036 before iterating over it. The table might change while the user
14037 code is running. With the snapshot, the user can depend on the
c5408bc3 14038 fact that each port that existed at the start of the iteration is
548728ea
MV
14039 encountered exactly once. (ice-9 popen) depends on this.
14040
cb0d8be2
DH
140412001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14042
14043 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
14044
14045 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
14046 range checking for the size parameter. Thanks to Martin
14047 Grabmueller for the hint.
14048
14049 (scm_makstr): Reordered string initialization to make interrupt
14050 deferring unnecessary.
14051
14052 * vectors.c (scm_make_vector): Fixed range checking.
14053
e382fdbe
DH
140542001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14055
14056 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
14057
14058 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
14059 checking of the size parameter for type correctness and valid
14060 range. Thanks to Rob Browning for reporting the problem. Instead
14061 of deferring interrupts, scm_remember_upto_here_1 is used.
14062
bf8f0922
KN
140632001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14064
14065 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
14066 (scm_dump_cell_update): Removed.
14067 (scm_dump_update): Renamed from scm_dump_object_update.
14068 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
14069 a pointer instead of returning a value.
14070 * keywords.c (keyword_undump): Updated.
14071
914cceec
KN
140722001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14073
14074 * dump.c, dump.h: Modified a lot.
5f17c66f 14075 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
14076 (scm_dump_mark): Removed.
14077 (scm_restore_cell_object, scm_store_cell_object): New functions.
14078
14079 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
14080 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
14081 New slots: dump, undump.
14082 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
14083 Updated.
14084
14085 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
14086 (keyword_undump): Renamed from keyword_alloc.
14087 (scm_init_keywords): Set keyword_dump and keyword_undump.
14088
ecf470a2
ML
140892001-02-03 Michael Livshin <mlivshin@bigfoot.com>
14090
14091 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
14092 the deprecated SCM_DOUBLE_CELLP.
14093
14094 * tags.h (SCM_DOUBLE_CELLP): deprecated.
14095
03416a99
KN
140962001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
14097
14098 * dump.c, dump.h: New files.
14099 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
14100 * init.c: #include "libguile/dump.h".
14101 (scm_init_guile_1): Call scm_init_dump.
14102 * smob.h (scm_smob_descriptor): New slots: dump_mark,
14103 dump_dealloc, dump_store, undump_alloc, undump_restore,
14104 undump_init.
14105 * smob.c (scm_make_smob_type): Init the new slots.
14106 (scm_set_smob_dump, scm_set_smob_undump): New functions.
14107 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
14108
14109 * keywords.c: #include "libguile/dump.h".
14110 (keyword_dealloc, keyword_alloc): New functions.
14111 (scm_init_keywords): Set smob_dump and smob_undump.
14112
00ffa0e7
KN
141132001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
14114
14115 * vectors.c (scm_c_make_vector): New function.
14116 * vectors.h (scm_c_make_vector): Declared.
14117 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
14118 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
14119 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
14120 (scm_make_method_cache, scm_i_vector2list,
14121 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
14122 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
14123 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
14124 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
14125 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
14126 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
14127 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
14128 (scm_vector, scm_make_vector): Use scm_c_make_vector.
14129
14130 * hashtab.c (scm_c_make_hash_table): New function.
14131 * hashtab.h (scm_c_make_hash_table): Declared.
14132 * environments.c (scm_make_leaf_environment,
14133 scm_make_eval_environment), gc.c (scm_init_storage),
14134 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
14135 Use scm_c_make_hash_table.
14136
b8446ce8
MD
141372001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14138
14139 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
14140
e3239868
DH
141412001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
14142
14143 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
14144 end of docstring.
14145
14146 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
14147 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
14148 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
14149 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
14150 srcprop.c (scm_source_properties, scm_set_source_properties_x,
14151 scm_source_property, scm_set_source_property_x), sort.c
14152 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
14153 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
14154 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
14155 docstrings.
14156
41ee56dd
MD
141572001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14158
14159 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
14160 really get that arg.
14161
b6311c08
KN
141622001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
14163
14164 * goops.c (s_scm_get_keyword): Bug fix.
14165
a49af0c0
DH
141662001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14167
14168 The following patch was sent by Martin Grabmueller. It makes sure
14169 that in case of parameter errors the correct function name is
14170 shown, and that parameter types are only checked once.
14171
14172 * strop.c (string_copy, string_upcase_x, string_downcase_x,
14173 string_capitalize_x): New functions. Each one performs the core
14174 functionality of the corresponding scm_* function.
14175
14176 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
14177 scm_string_downcase_x, scm_string_downcase,
14178 scm_string_capitalize_x, scm_string_capitalize): Reduced to
14179 parameter checking wrappers of the above functions.
14180
13070bd3
DH
141812001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14182
14183 * continuations.c, dynl.c, keywords.c, load.c: Include
14184 strings.h. Thanks to Bill Schottstaedt for the bug report.
14185
2f2b390c
DH
141862001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14187
14188 * backtrace.c (display_header): Make sure that line and column
14189 information is shown independent of whether the port the code was
14190 read from had an associated filename. Thanks to Martin
14191 Grabmueller for providing this patch.
14192
efa40607
DH
141932001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14194
14195 * fports.[ch] (scm_file_port_p): New primitive.
14196
a98bddfd
DH
141972001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14198
14199 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
14200 These are now defined in fports.c, strports.c and vports.c.
14201
14202 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14203 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14204 tags.h).
14205
14206 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14207 (scm_make_sfptob): Made static. These return a type code now.
14208
14209 fports.c (scm_init_fports), strports.c (scm_init_strports),
14210 vports.c (scm_init_vports): Create the corresponding port types.
14211
14212 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14213 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14214
14215 * init.c (scm_init_guile_1): Make sure strports are initialized
14216 before gdbint.
14217
14218 * ports.[ch] (scm_make_port_type): Changed the return type to
14219 scm_bits_t.
14220
14221 * ports.c (scm_ports_prehistory): Don't create any port types
14222 here.
14223
14224 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14225 against scm_tc16_fport directly.
14226
0419a528
DH
142272001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14228
14229 * srcprop.c (scm_set_source_property_x): Fix to handle
14230 (set-source-property! <obj> 'copy <datum>) correctly.
14231
6d36532c
GH
142322001-01-24 Gary Houston <ghouston@arglist.com>
14233
14234 * filesys.c (scm_link): docstring fix.
14235 * fports.h (scm_setfileno): obsolete declaration removed.
14236 * posix.c: bogus popen declaration removed.
14237
14238 * rdelim.c: new file, split from ioext.c.
14239 * rdelim.h: new file, split from ioext.h
14240 * Makefile.am: add rdelim.c and related files.
14241 * init.c: call scm_init_rdelim. include rdelim.h.
14242
3ba5a6c2
DH
142432001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14244
14245 This patch was sent by Martin Grabmueller and makes sure that
14246 parameter errors are reported correctly by the lexicographic
14247 ordering predicates.
14248
14249 * strorder.c (string_less_p, string_ci_less_p): New functions.
14250
14251 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14252 functionality into string_less_p, string_ci_less_p respectively.
14253 The remaining code is just a wrapper to do the parameter
14254 checking.
14255
14256 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14257 parameters and call string_less_p instead of scm_string_less_p.
14258
14259 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14260 Check the parameters and call string_less_ci_p instead of
14261 scm_string_ci_less_p.
14262
e40a4095
DH
142632001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14264
ed6a2db9
DH
14265 This patch modifies scm_display_error to perform parameter
14266 checking. Thanks to Neil Jerram for the bug report.
14267
e40a4095
DH
14268 * backtrace.[ch] (scm_i_display_error): New function.
14269
14270 * backtrace.c (scm_display_error): Added parameter check and
14271 extracted the core functionality into function
14272 scm_i_display_error.
14273
14274 * throw.c (handler_message): Call scm_i_display_error to display
14275 the error message.
14276
f1e06a96
MD
142772001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14278
14279 * eval.c (SCM_APPLY): Added # args check for application of
14280 procedures with arity 3. (Thanks to Anders Holst.)
14281
30ea841d
DH
142822001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14283
14284 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14285
14286 (SCM_OPDIRP): Deprecated.
14287
14288 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14289 SCM_OPN.
14290
14291 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14292 Instead, give an explicit error message in case the directory is
14293 closed.
14294
14295 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14296 instead of SCM_OPENP and SCM_CLOSEDP.
14297
14298 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14299
312ae976
DH
143002001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14301
14302 * eval.c (inner_eval, scm_eval): Move all real functionality into
14303 inner_eval. Avoid to copy the expression twice by inlining some
14304 code from scm_i_eval.
14305
4567ed78
DH
143062001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14307
14308 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14309 now has to be the last clause, as required by R5RS. Thanks to
14310 Martin Grabmueller for the patch.
14311
10288a09
GH
143122001-01-18 Gary Houston <ghouston@arglist.com>
14313
14314 * ioext.c: further simplify scm_read_string_x_partial by defining
14315 a macro SCM_EBLOCK.
14316
8f379a8f
DH
143172001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14318
14319 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14320
5c75b29f
DH
143212001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14322
14323 * __scm.h: Added comment about architecture and compiler
14324 properties that are required by guile.
14325
14326 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14327 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14328
14329 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14330
14331 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14332
14333 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14334 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14335
ac0c002c
DH
143362001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14337
14338 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14339 to the names in limits.h.
14340
14341 * numbers.c (abs_most_negative_fixnum): Added.
14342
14343 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14344 fixnum-min) special case.
14345
14346 (scm_big_and): Fix for negative first parameter.
14347
14348 (scm_bit_extract): Fix for fixnum paramters.
14349 Thanks to Rob Browning for the bug report.
14350
14351 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14352
debe0dc2
DH
143532001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14354
14355 * symbols.c (scm_symbol_bound_p): Fixed comment.
14356 Thanks to Chris Cramer.
14357
8a39e3fc
DH
143582001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14359
14360 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14361 Thanks to Bill Schottstaedt.
14362
322ec19d
ML
143632001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14364
9a5fa6e9 14365 from Matthias Köppe:
1c938eb8 14366
322ec19d
ML
14367 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14368 casts its result, so doesn't yield an lvalue per ANSI C.
14369
14370 * goops.c (s_scm_sys_set_object_setter_x): use
14371 SCM_SET_ENTITY_SETTER.
14372 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14373
14374 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14375 its result, so doesn't yield an lvalue per ANSI C.
14376 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14377 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14378 SCM_GC_SET_CARD_FLAGS.
14379 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14380
14381 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14382
60d02d09
GH
143832001-01-08 Gary Houston <ghouston@arglist.com>
14384
14385 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14386 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14387 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14388 changes.
14389 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14390 for fdes. if current input port is used, check that it's a file
14391 port.
14392
c2da2648
GH
143932001-01-06 Gary Houston <ghouston@arglist.com>
14394
14395 * ioext.c (scm_read_string_x_partial): new procedure, implements
14396 read-string!/partial.
14397 * ports.c (scm_take_from_input_buffers): new procedure used by
14398 scm_read_string_x_partial.
14399 (scm_drain_input): use scm_take_from_input_buffers.
14400
4651d663
MV
144012001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14402
14403 * validate.h (SCM_VALIDATE_NUMBER): New.
14404
c0a5d888
ML
144052001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14406
14407 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14408 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14409 SET_DESTROYED): new defines/macros.
14410 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14411 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14412 (guardian_print): print more info.
14413 (guardian_apply): check if the guardian is destroyed, and throw an
14414 error if so. take one more optional argument `throw_p'.
14415 (scm_guard): depending on the value of `throw_p', return a boolean
14416 result.
14417 (scm_get_one_zombie): remove redundant property test.
14418 (guardian_t): represent the various (currently 3, I hope nothing
14419 more gets added) boolean fields as bit flags.
14420 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14421 (scm_destroy_guardian_x): new procedure.
14422
14423 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14424 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14425
0c6d2191
GH
144262001-01-01 Gary Houston <ghouston@arglist.com>
14427
14428 * fports.c (fport_write): bugfix: handle short writes for
14429 unbuffered ports too. optimize the buffered case by minimizing
14430 the number of write/flush calls.
14431 (write_all): new helper procedure.
14432
a51fe247 14433The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14434
14435;; Local Variables:
14436;; coding: utf-8
14437;; End: