Fix manual typo.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
979eade6
LC
12008-04-03 Ludovic Courtès <ludo@gnu.org>
2
3 * inline.h (SCM_C_EXTERN_INLINE): New macro, addresses the
4 "extern inline" semantic change in C99 mode with GCC 4.3 and
5 later and the warning in C99 mode with GCC 4.2. Use it in the
6 inline function definitions.
7
2a1d0688
NJ
82008-03-24 Neil Jerram <neil@ossau.uklinux.net>
9
10 Applying patch from Julian Graham, containing minor fixes to his
11 thread enhancements:
12
13 * threads.c (to_timespec): Change 1000000 multiplier to
14 1000000000.
15 (unchecked_unlock_sym, allow_external_unlock_sym,
16 recursive_sym): Use SCM_SYMBOL.
17 (scm_make_mutex_with_flags): When raising unsupported option
18 error, report what the unsupported option was.
19 (fat_mutex_unlock): When raising errors, unlock m->lock first.
20 (fat_cond_timedwait): Removed.
21 (scm_timed_wait_condition_variable): Call fat_mutex_unlock
22 directly instead of via fat_cond_timedwait.
23
c2ad98ad
LC
242008-03-10 Ludovic Courtès <ludo@gnu.org>
25
26 * eval.c, filesys.c: Enclose `alloca' blob in `#ifndef alloca',
27 as per Gnulib's `alloca'. This should fix compilation on
28 FreeBSD 6.
29
bca69a9f
NJ
302008-03-09 Neil Jerram <neil@ossau.uklinux.net>
31
32 * numbers.c: Only define scm_from_complex_double if it will
33 actually be used.
34
6180e336
NJ
352008-03-08 Julian Graham <joolean@gmail.com>
36
37 * threads.c (scm_join_thread_timed, scm_thread_p,
38 scm_make_mutex_with_flags, scm_lock_mutex_timed,
39 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p): New
40 functions.
41 (thread_mark): Updated to mark new struct field `mutexes'.
42 (do_thread_exit): Notify threads waiting on mutexes locked by exiting
43 thread.
44 (scm_join_thread, scm_make_mutex, scm_make_recursive_mutex,
45 scm_mutex_lock): Reimplement in terms of their newer
46 counterparts.
47 (scm_abandoned_mutex_error_key): New symbol.
48 (fat_mutex)[unchecked_unlock, allow_external_unlock]: New fields.
49 (fat_mutex_lock): Reimplement to support timeouts and abandonment.
50 (fat_mutex_trylock, scm_try_mutex): Remove fat_mutex_trylock and
51 reimplement scm_try_mutex as a lock attempt with a timeout of zero.
52 (fat_mutex_unlock): Allow unlocking from other threads and unchecked
53 unlocking; implement in terms of condition variable wait.
54 (scm_timed_wait_condition_variable): Reimplement in terms of
55 fat_mutex_unlock.
56 * threads.h (scm_i_thread)[mutexes]: New field.
57 (scm_join_thread_timed, scm_thread_p, scm_lock_mutex_timed,
58 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p):
59 Prototypes for new functions.
60
61b6542a
LC
612008-03-06 Ludovic Courtès <ludo@gnu.org>
62
63 * eval.c (scm_eval): If MODULE_OR_STATE is not a dynamic state,
64 make sure it's a module. Reported by David I. Lehn.
65
3f520967
LC
662008-03-02 Ludovic Courtès <ludo@gnu.org>
67
68 * pairs.h (scm_is_pair): Moved declaration to `inline.h'.
69 * inline.h: Make sure `extern' declarations are not produced
70 when `inline' is supported but GCC is not used. This
71 fixes "mixed linkage" errors with compilers such as
72 DEC/Compaq/HP CC.
73
fa80e280
NJ
742008-02-27 Neil Jerram <neil@ossau.uklinux.net>
75
76 * _scm.h (errno): Remove declarations that have been there
77 forever, and are known to conflict on some platforms with that
78 provided by <errno.h>, which we include unconditionally. If
79 <errno.h> doesn't provide a errno declaration, what is the point
80 of it?
81
a2c25234
LC
822008-02-23 Ludovic Courtès <ludo@gnu.org>
83
84 * numbers.c (scm_make_rectangular): Rename argument to
85 `real_part' and `imaginary_part' to work around Solaris 2.10
86 headers which define `imaginary' as a macro. Patch by Tim
87 Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>.
88
bfb64eb4
LC
892008-02-22 Ludovic Courtès <ludo@gnu.org>
90
4fcb27c4
LC
91 * read.c (strncasecmp): Add declaration when
92 `HAVE_DECL_STRNCASECMP' is undefined. Fixes compilation on
93 NetBSD 1.6.
94
bfb64eb4
LC
95 * gc.c (scm_ia64_ar_bsp)[linux]: Don't discard `const' qualifier
96 of OPAQUE.
97
5305df84
LC
982008-02-21 Ludovic Courtès <ludo@gnu.org>
99
100 Fix bug #22369.
101
102 * goops.c (scm_add_slot): Add `SCM_UNDEFINED' as last argument
a2c25234
LC
103 to `scm_list_n ()'. Thanks to René Köcher
104 <shirk87@googlemail.com>.
5305df84 105
25a640ca
LC
1062008-02-17 Ludovic Courtès <ludo@gnu.org>
107
108 * script.c (scm_compile_shell_switches): Update copyright year.
109
9a6fac59
LC
1102008-02-16 Ludovic Courtès <ludo@gnu.org>
111
112 * gc_os_dep.c: Add NetBSD/alpha support. Patch by Greg Troxel
113 <gdt@ir.bbn.com>.
114
5b5179f8
LC
1152008-02-12 Ludovic Courtès <ludo@gnu.org>
116
117 * guile-snarf.in (tempdir): Honor `$TMPDIR'.
118
4b26c03e
NJ
1192008-02-11 Neil Jerram <neil@ossau.uklinux.net>
120
121 * numbers.c (SCM_COMPLEX_VALUE): Use GUILE_I instead of _Complex_I
122 directly, and only if GUILE_I was defined by the configure step.
123 (scm_log, scm_log10, scm_exp, scm_sqrt): Use SCM_COMPLEX_VALUE
124 code only if SCM_COMPLEX_VALUE is defined.
125
7f74cf9a
LC
1262008-02-07 Ludovic Courtès <ludo@gnu.org>
127
128 Fix bug #21378.
129 Thanks to David Diffenbaugh <davediff@nbcs.rutgers.edu>.
130
131 * read.c (scm_read_quote): Don't use `__FUNCTION__' since it is
132 not supported by Sun CC on Solaris 9.
133 (scm_read_keyword): Likewise.
134 * strings.c (scm_take_locale_stringn): Remove
135 `SCM_C_INLINE_KEYWORD' to allow compilation with Sun CC.
136
86a597f8
NJ
1372008-02-07 Julian Graham <joolean@gmail.com>
138
139 * threads.c (do_thread_exit, scm_cancel_thread,
140 scm_set_thread_cleanup_x, scm_thread_cleanup): Lock on thread-specific
141 admin mutex instead of `thread_admin_mutex'.
142 * threads.h (scm_i_thread)[admin_mutex]: New field.
143 * throw.c (make_jmpbuf): Don't enter critical section during thread
144 spawn -- there is a possibility of deadlock if other threads are
145 exiting.
146
4a19ed04
NJ
1472008-02-06 Neil Jerram <neil@ossau.uklinux.net>
148
149 * gc-malloc.c (scm_gc_malloc): Return NULL if requested size is 0.
150 (scm_gc_free): Don't call `free' if mem is NULL.
151
189171c5
LC
1522008-02-06 Ludovic Courtès <ludo@gnu.org>
153
154 * numbers.c (scm_i_mkbig, scm_i_long2big, scm_i_ulong2big,
155 scm_i_clonebig, scm_i_bigcmp, scm_i_dbl2big, scm_i_dbl2num,
156 scm_i_normbig): Remove `SCM_C_INLINE_KEYWORD' since these are
157 declared as `extern' in `numbers.h'. This precluded compilation
158 on Solaris 9 with Sun CC (reported by David Halik
159 <dhalik@nbcs.rutgers.edu>).
160
d05bcb2e
NJ
1612008-02-05 Neil Jerram <neil@ossau.uklinux.net>
162
163 * fports.c (fport_seek): Make dependent on GUILE_USE_64_CALLS.
164
165 * _scm.h: Make definition of CHOOSE_LARGEFILE depend on
166 GUILE_USE_64_CALLS.
167
3ac8359a
NJ
1682008-02-01 Neil Jerram <neil@ossau.uklinux.net>
169
170 * modules.c (the_root_module): Moved before scm_current_module.
171 (scm_current_module): Return the root module if `the-module' fluid
172 gives #f.
173
d3cf93bc
NJ
1742008-01-22 Neil Jerram <neil@ossau.uklinux.net>
175
7df13834
NJ
176 * COPYING: Removed.
177
d3cf93bc
NJ
178 * __scm.h, _scm.h, weaks.c: Update copyright statement to LGPL.
179
15bd90ea
NJ
1802008-01-18 Neil Jerram <neil@ossau.uklinux.net>
181
182 * hashtab.c (scm_hash_fn_create_handle_x): If supplied assoc_fn
183 returns neither a pair nor #f, signal a wrong-type-arg error.
184 (Thanks to Gregory Marton for reporting this.)
185
5c004b6d
NJ
1862007-12-29 Neil Jerram <neil@ossau.uklinux.net>
187
188 * gc.c (mark_gc_async): Change "func_data" to "fn_data", to avoid
189 clash with AIX header file.
190 * hooks.c (scm_c_hook_add, scm_c_hook_remove): Same again.
191 * hooks.h (scm_t_c_hook_function, scm_c_hook_add,
192 scm_c_hook_remove): Same again.
193
9cc37597
LC
1942007-12-08 Ludovic Courtès <ludo@gnu.org>
195
196 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
197 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
198 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
199 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
200 * eval.i.c (CEVAL): Use branch prediction hints for syntax
201 errors, wrong number of arguments and similar.
202 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
203 immediate numbers.
204 (scm_difference, scm_product, scm_i_divide): Likewise.
205 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
206
7d1fc872
LC
2072007-12-04 Ludovic Courtès <ludo@gnu.org>
208
693758d5
LC
209 * ports.c (scm_c_read): Validate PORT as an open input port.
210 (scm_c_write): Validate PORT as an open output port.
211
7d1fc872
LC
212 * socket.c (scm_accept): Leave guile mode using
213 `scm_std_select ()' before calling `accept(2)'. Reported by
214 dskr <dskr@mac.com>.
215
ee834df4
LC
2162007-10-27 Ludovic Courtès <ludo@gnu.org>
217
218 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
219 containing the port. Fixes a bug in the new port table (2007-08-26).
220 (scm_evict_ports): Use `scm_c_port_for_each ()'.
221
acbfb594
NJ
2222007-10-21 Neil Jerram <neil@ossau.uklinux.net>
223
224 * eval.c (unmemoize_delay): Extend the environment before
225 unmemoizing the promise thunk. This fixes a segmentation fault
226 reported by Frank Schwidom.
227
2e77f720
LC
2282007-10-20 Julian Graham <joolean@gmail.com>
229
230 Add support for thread cancellation and user-defined thread
231 cleanup handlers. Small rework by Ludovic Courtès.
232
233 * null-threads.h (scm_i_pthread_cancel,
234 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
235 * pthread-threads.h (scm_i_pthread_cancel,
236 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
237 * scmsigs.c (scm_i_signal_delivery_thread,
238 signal_delivery_thread_mutex): New.
239 (signal_delivery_thread): Leave when `read_without_guile ()'
240 returns zero.
241 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
242 before spawning the thread. Initialize
243 SCM_I_SIGNAL_DELIVERY_THREAD.
244 (ensure_signal_delivery_thread): Renamed to...
245 (scm_i_ensure_signal_delivery_thread): this.
246 (scm_i_close_signal_pipe): New.
247 * scmsigs.h: Updated.
248 * threads.c (thread_mark): Mark `t->cleanup_handler'.
249 (guilify_self_1): Initialize `t->cleanup_handler' and
250 `t->canceled'.
251 (do_thread_exit): Invoke `t->cleanup_handler'.
252 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
253 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
254 vanishes.
255 (scm_leave_guile_cleanup): New.
256 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
257 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
258 than call `scm_leave_guile ()' after FUNC.
259 (scm_cancel_thread, scm_set_thread_cleanup_x,
260 scm_threads_cleanup): New.
261 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
262 returned list.
263 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
264 fields.
265 Add declarations of new functions.
266
d41668fa
LC
2672007-10-17 Ludovic Courtès <ludo@gnu.org>
268
269 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
270 regression compared to 1.8.2. Reported by Puneet
271 <schemer@gmail.com>.
272
66302618
LC
2732007-10-10 Ludovic Courtès <ludo@gnu.org>
274
275 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
276 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
277 * gen-scmconfig.h.in
278 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
279 * gen-scmconfig.c (main): Define
280 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
281
1445e449
LC
2822007-10-04 Ludovic Courtès <ludo@gnu.org>
283
284 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
285 `leave_locale_section ()' on failure of
286 `enter_locale_section ()' since the mutex is not held and locale
287 settings are unchanged.
288 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
289 `restore_locale_settings ()' instead of `leave_locale_section ()'
290 since the mutex is not held.
291
29776e85
LC
2922007-10-02 Ludovic Courtès <ludo@gnu.org>
293
294 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
295 since we're already in non-guile mode. Reported by Greg Toxel
296 for NetBSD.
297
61d3568b
LC
2982007-10-01 Ludovic Courtès <ludo@gnu.org>
299
300 * ports.c (flush_output_port): Expect directly a port instead of
301 a pair. Fixes a bug in the new port table (2007-08-26).
302
68eccd8b
KR
3032007-09-11 Kevin Ryde <user42@zip.com.au>
304
305 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
306 putenv("NAME") as the fallback everywhere else. In particular this is
307 needed for solaris 9. Reported by Frank Storbeck.
308
454866e0
LC
3092007-09-03 Ludovic Courtès <ludo@gnu.org>
310
311 * read.c (flush_ws): Handle SCSH block comments.
312
f43f3620
LC
3132007-09-03 Ludovic Courtès <ludo@gnu.org>
314
315 Fix alignment issues which showed up at least on SPARC.
316
317 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
318 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
319 alignment.
320 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
321 correct alignment.
322 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
323 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
324 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
325 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
326 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
327
8d4d5dfc
KR
3282007-09-03 Kevin Ryde <user42@zip.com.au>
329
330 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
331 before using clog(). It's possible for gcc to provide the "complex
332 double" type, but for the system not to have the complex funcs.
333 (scm_exp): Ditto HAVE_CEXP for cexp().
334 (clog, cexp, carg): Remove fallback definitions. These only
335 duplicated the code within scm_log and scm_exp, and the latter have to
336 exist for the case when there's no "complex double". So better just
337 fix up the conditionals selecting between the complex funcs and plain
338 doubles than worry about fallbacks.
339
1ac5fb45
LC
3402007-09-02 Ludovic Courtès <ludo@gnu.org>
341
342 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
343 This fixes a memory leak.
344
b87e6d04
HWN
3452007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
346
5dbc6c06
HWN
347 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
348 gc.c: replace port table with weak hash table. This simplifies
349 memory management, and fixes freed cells appearing in
350 port-for-each output.
351
b87e6d04
HWN
352 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
353 held.
354
2baec6a9
LC
3552007-08-23 Ludovic Courtès <ludo@gnu.org>
356
492faee1 357 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 358 expression when asked to. Reported by Kevin.
492faee1 359
2baec6a9
LC
360 * stime.c: Define `_REENTRANT' only if not already defined.
361
1f11c61a
KR
3622007-08-21 Kevin Ryde <user42@zip.com.au>
363
364 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
365 tc16 values so big, real, complex and fraction can be distinguished.
366
367 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
368 was making numbers come out as "type 23" in gc-live-object-stats.
369 Fix tests of the tc16 number types, they were checked under
370 scm_tc7_number, but the values went down the tag>=255 smob case.
371 Put smob case under scm_tc7_smob instead of using tag>=255, per
372 recommendation in comments with scm_tc7_smob to use symbolic values.
373 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
374 code. Lose some unnecessary "break" statements.
375
376 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
377 element returned, rather than two lookups scm_hashq_ref and
378 scm_hashq_set_x.
379
949ec9f9
KR
3802007-08-17 Kevin Ryde <user42@zip.com.au>
381
382 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
383 solaris 2.6. Reported by anirkko.
384
6caac03c
LC
3852007-07-29 Ludovic Courtès <ludo@gnu.org>
386
387 * Makefile.am (INCLUDES): Added Gnulib includes.
388 (gnulib_library): New.
389 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
390 `$(gnulib_library)'.
391 (libguile_la_LIBADD): Likewise.
392
393 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
394 to define it when available.
395 * srfi-14.c: Likewise.
f7439099
LC
396 * i18n.c: Likewise. Include Gnulib's <alloca.h>
397 * eval.c: Include Gnulib's <alloca.h>.
398 * filesys.c: Likewise.
399 * read.c: Don't include <strings.h> and don't provide an
400 `strncasecmp ()' replacement; use Gnulib's <string.h> and
401 `strncasecmp ()' instead.
6caac03c 402
e08f3f7a
LC
4032007-07-25 Ludovic Courtès <ludo@gnu.org>
404
405 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
406 immediately. This used to produce a circular memoized
407 expression, e.g., for `(set (quote x) #t)'.
408
7337d56d
LC
4092007-07-22 Ludovic Courtès <ludo@gnu.org>
410
411 Overhauled the reader, making it faster.
412
413 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
414 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
415 of `scm_lreadr ()'.
416
417 * read.c: Overhauled. No longer use a token buffer. Use a
418 on-stack C buffer in the common case and use Scheme strings when
419 larger buffers are needed.
420 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
421 scm_lreadr, scm_lreadrecparen): Removed.
422 (scm_i_input_error): Marked as `SCM_NORETURN'.
423
df449722
LC
4242007-07-15 Ludovic Courtès <ludo@gnu.org>
425
426 * script.c (scm_compile_shell_switches): Updated copyright year.
427
b1f57ea4
LC
4282007-07-11 Ludovic Courtès <ludo@gnu.org>
429
430 * goops.c (scm_sys_method_more_specific_p): Added docstring.
431 Make sure LEN is greater than or equal to the minimum length of
432 specializers of M1 and M2. This fixes a segfault later on in
433 `more_specificp ()' if TARGS is too small. Reported by Marco
434 Maggi <marco.maggi-ipsu@poste.it>.
435
d3075c52
LC
4362007-06-26 Ludovic Courtès <ludo@gnu.org>
437
438 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
439 sure to free the previous array after the new one has been
440 installed. This leak is made visible by running
441 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
442 from the REPL within Valgrind.
443
7a5fb796
LC
4442007-06-12 Ludovic Courtès <ludo@chbouib.org>
445
446 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
447 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
448 bus error on SPARC (and possibly others) due to unaligned access.
449
a1ef7406
LC
4502007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
451
452 * posix.c (scm_ttyname): Check whether RESULT is NULL before
453 making a string from it (reported by Dan McMahill). Don't call
454 `scm_from_locale_string ()' before the mutex is released.
455
3dcf3373
LC
4562007-05-26 Ludovic Courtès <ludo@chbouib.org>
457
458 * eval.c (scm_m_define): Updated comment. Changed order for value
459 evaluation and `scm_sym2var ()' call, which is perfectly valid per
460 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
461
608860a5
LC
4622007-05-05 Ludovic Courtès <ludo@chbouib.org>
463
464 Implemented lazy duplicate binding handling.
465
466 * modules.c (scm_export): Renamed to...
467 (scm_module_export): This. Now public.
468 (module_variable): Removed.
469 (default_duplicate_binding_procedures_var): New variable.
470 (default_duplicate_binding_handlers, resolve_duplicate_binding,
471 module_imported_variable, scm_module_local_variable,
472 scm_module_variable): New functions.
473 (scm_module_import_interface): Rewritten.
474 (scm_module_reverse_lookup): Exported as a Scheme function.
475 * modules.h (scm_module_index_duplicate_handlers,
476 scm_module_index_import_obarray): New macros.
477 (scm_module_variable, scm_module_local_variable,
478 scm_module_export): New declarations.
479
1911e3da
LC
4802007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
481
482 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
483 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
484
1d8ce4c0
HWN
4852007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
486
487 * numbers.c (carg): provide carg, cexp, clog in case they are
488 missing.
489
afb49959
LC
4902007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
491
492 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
493 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
494 Steven Wu.
495
b3aa4626
KR
4962007-03-08 Kevin Ryde <user42@zip.com.au>
497
498 * struct.c, struct.h (scm_make_vtable): New function, providing
499 `make-vtable'.
500 * stacks.c (scm_init_stacks): Use it.
501
5022007-03-06 Kevin Ryde <user42@zip.com.au>
503
504 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
505 allocating a tail array. If there's no such then those tail fields
506 are uninitialized and garbage SCMs there can cause a segv if printed
507 (after fetching with struct-ref).
508
5092007-02-22 Kevin Ryde <user42@zip.com.au>
510
511 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
512 (scm_usleep): Update docstring per manual, cross reference sleep.
513
514 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
515 scm_struct_init is not within that section. scm_struct_init can
516 thrown an error, which within a critical section results in an
517 abort().
518
03291373
NJ
5192007-02-19 Neil Jerram <neil@ossau.uklinux.net>
520
521 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
522 is included in the distribution.
652dbce6 523 (noinst_HEADERS): And the same for eval.i.c.
03291373 524
a2f00b9b
LC
5252007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
526
527 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
528 unconditionally. Include <langinfo.h> and <nl_types.h> when
529 available.
530 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
531 SCM_LIST_OR_INTEGER_P): New macros.
532 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
533 as powers of two instead of `(1 << LC_*)'.
534 (scm_i_locale_free): New function/macro.
535 (scm_global_locale): New global variable.
536 (smob_locale_free): Use `scm_i_locale_free ()'.
537 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
538 (get_current_locale_settings): Return `EINVAL' instead of `errno'
539 when `setlocale' fails.
540 (restore_locale_settings): Likewise.
541 (install_locale_categories): Likewise.
542 (install_locale): Likewise. Stop the locale stack traversal when
543 all categories have been handled.
544 (get_current_locale, category_to_category_mask,
545 category_list_to_category_mask): New function.
546 (scm_make_locale): Use them. Accept both lists of `LC_*' values
547 and single `LC_*' values as the first argument. Handle the case
548 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
549 duplicate C_BASE_LOCALE before using it.
550 (scm_nl_langinfo, define_langinfo_items): New functions.
551 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
552 `nl-langinfo' and invoke `define_langinfo_items ()'.
553 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
554 * posix.c: Include <xlocale.h> when available.
555 (scm_i_locale_mutex): Always define it. Statically initialized.
556 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
557 acquiring the locale mutex.
558 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
559
b3aa4626
KR
5602007-01-27 Kevin Ryde <user42@zip.com.au>
561
562 * ports.c (scm_port_line, scm_set_port_line_x), read.c
563 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
564 port line number type, should be "long" not "int", as per line_number
565 field of scm_t_port. (Makes a difference only on 64-bit systems, and
566 only then for a linenum above 2Gig.)
567
2a8d66b0
HWN
5682007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
569
570 * vector.c: remove comment as per kryde's request.
571
b3aa4626
KR
5722007-01-25 Kevin Ryde <user42@zip.com.au>
573
574 * sort.c (scm_stable_sort): Return empty list for input empty list, as
575 done in guile 1.6 and as always done by plain `sort'. Was falling
576 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
577
cb90e2cb
HWN
5782007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
579
8cb7939c
HWN
580 * vectors.c (s_scm_vector_move_right_x): complain about naming.
581
d00a0704
HWN
582 * srcprop.c: regularize comments.
583
3d178652
HWN
584 * eval.c: remove superfluous ifndef DEVAL.
585
243ebb61
HWN
586 * private-options.h: idem.
587
588 * eval.i.c: copyright nitpicking.
589
0ee05b85
HWN
590 * eval.c: distangle. move duplicate code to eval.i.c and include
591 twice.
592
593 * eval.i.c: new file.
594
22fc179a
HWN
595 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
596 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
597 read.h, stacks.c, symbols.c, throw.c: use private-options.h
598
599 * private-options.h: new file: contain hardcoded option
600 definitions.
601
cb90e2cb
HWN
602 * private-gc.h: add FSF header.
603
62560650
HWN
6042007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
605
72f19c26
HWN
606 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
607 memoize-symbol is set.
608
609 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
610
611 * eval.c (CEVAL): add memoize_symbol trap.
612
03347a97
HWN
613 * options.c (scm_options_try): new function. This allows error
614 reporting before changing options in a critical section.
615
b0763985
HWN
616 * srcprop.c: use double cell for storing source-properties. Put
617 filename in the plist, and share between srcprops if possible.
618 Remove specialized storage.
619
620 * srcprop.h: remove macros without SCM_ prefix from
621 interface. Remove specialized storage/type definitions.
622
62560650
HWN
623 * read.c: idem.
624
625 * print.c: idem.
626
627 * eval.c: terminate option lists with 0.
628
629 * options.c: remove n (for length) from scm_option_X
630 functions. Detect option list length by looking for NULL name.
631
42ddb3cb
LC
6322007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
633
634 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
635 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
636 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
637 added by `make-vtable-vtable'. Reported by Marco Maggi.
638
937038e8
HWN
6392007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
640
641 * throw.c (scm_ithrow): more refined error message: print symbols
642 too.
643
23d72566
KR
6442007-01-16 Kevin Ryde <user42@zip.com.au>
645
646 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
647 implementing `set-program-arguments'.
648
649 * filesys.c (scm_init_filesys): Use scm_from_int rather than
650 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
651 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
652 O_LARGEFILE. These are all int not long, per arg to open().
653 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
654 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
655 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
656 an int arg to fcntl.
657
658 * posix.c (scm_putenv): Correction to "len" variable, was defined only
659 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
660 Move it to where it's used. Reported by Hugh Sasse.
661
662 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
663 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
664 meant #\nul in the input (detected by scm_to_locale_string) and a bad
665 flags arg (detected by scm_to_int) would throw from a critical
666 section, causing an abort().
667
668 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
669 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
670 REG_NOTEOL; they're all ints not longs (per args to regcomp and
671 regexec).
672
a2c40dc7
HWN
6732007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
674
675 * throw.c (scm_ithrow): print out key symbol and string arguments
676 when error happens inside a critical section, and document why.
677
391f57e6
HWN
6782007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
679
680 * read.c (s_scm_read_hash_extend): document #f argument to
681 read-hash-extend.
682
23d72566
KR
6832007-01-04 Kevin Ryde <user42@zip.com.au>
684
685 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
686 scm_minor_version, scm_micro_version, scm_effective_version,
687 scm_version, scm_init_version): Use SCM_API instead of just extern,
688 for the benefit of mingw. Reported by Cesar Strauss.
689
93632e3c
HWN
6902007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
691
692 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
693 too.
694 (gc_update_stats): update scm_gc_cells_allocated_acc too.
695
23d72566
KR
6962006-12-27 Kevin Ryde <user42@zip.com.au>
697
698 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
699 the basic scm_get_stack_base. As advised by Nils Durner.
700
701 * threads.c (get_thread_stack_base): Add a version using
702 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
703 As advised by Heikki Lindholm.
704
705 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
706 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
707 Durner.
708
7092006-12-24 Kevin Ryde <user42@zip.com.au>
710
711 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
712 error if pid is not our own process, instead of silently doing nothing.
713
714 * print.c (scm_write, scm_display, scm_write_char): Disable port close
715 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
716 check in configure.in unintentionally enabled it. Believe that
717 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
718 can leave errno in that state. popen.test "no duplicates" output test
719 provoked that.
720
e2bf3b19
HWN
7212006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
722
723 * numbers.c (scm_i_fraction_reduce): move logic into
724 scm_i_make_ratio(), so fractions are only read.
725 scm_i_fraction_reduce() modifies a fraction when reading it. A
726 race condition might lead to fractions being corrupted by reading
727 them concurrently.
728
729 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
730 comparisons between reduced and unreduced fractions go wrong.
731
732 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
733 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
734 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
735 SCM_FRACTION_REDUCED.
736
23d72566
KR
7372006-12-16 Kevin Ryde <user42@zip.com.au>
738
739 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
740 more direct for a procedure called raise.
741 (kill): Remove mingw fake fallback.
742
7432006-12-15 Kevin Ryde <user42@zip.com.au>
744
745 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
746 _pipe on mingw.
747
7482006-12-14 Kevin Ryde <user42@zip.com.au>
749
750 * threads.c (thread_print): Cope with the case where pthread_t is a
751 struct, as found on mingw. Can't just cast to size_t for printing.
752 Reported by Nils Durner.
753
754 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
755 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
756
7572006-12-13 Kevin Ryde <user42@zip.com.au>
758
759 * eval.c (scm_m_define): Set 'name procedure property on any
760 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
761 procedures with setters as used in srfi-17.
762
763 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
764 linux man page says is a possibility.
765
f30e1bdf
LC
7662006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
767
768 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 769 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
770 negative lower bounds.
771 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 772 Szavai Gyula).
f30e1bdf
LC
773
774 (scm_array_in_bounds_p): Iterate over S instead of always
775 comparing indices with the bounds of S[0]. This fixes
776 `array-in-bounds?' for arrays with a rank greater than one and
777 with different lower bounds for each dimension.
778
23d72566
KR
7792006-12-05 Kevin Ryde <user42@zip.com.au>
780
781 * numbers.c (scm_product): For flonum*inum and complex*inum, return
782 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
783 and as per R5RS section "Exactness".
784
7852006-12-03 Kevin Ryde <user42@zip.com.au>
786
787 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
788 allow $AWK from the environment to override. It had syntax gremlins,
789 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
790 Makefile stopped it having any effect. Use just $(AWK), which can be
791 overridden with "make AWK=xxx" in the usual way if desired.
792
22be72d3
LC
7932006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
794
795 * libguile/vectors.c (scm_vector_to_list): Fixed list
796 construction: elements were not copied when INC is zero (see
797 "shared array" example in `vectors.test'). Reported by
798 Szavai Gyula.
799
b89c4943
LC
8002006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
801
802 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
803 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
804 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
805 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
806 (DOT_X_FILES): Added `gettext.x'.
807 (DOT_DOC_FILES): Likewise.
808 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
809 (modinclude_HEADERS): Added `gettext.h'.
810 (EXTRA_DIST): Added `libgettext.h'.
811
812 * gettext.h: Renamed to...
813 * libgettext.h: New file.
814
815 * i18n.c: Renamed to...
816 * gettext.c: New file.
817
818 * i18n.h: Renamed to...
819 * gettext.h: New file.
820
821 * i18n.c, i18n.h, locale-categories.h: New files.
822
823 * init.c: Include "libguile/gettext.h" instead of
824 "libguile/i18n.h".
825 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
826 `scm_init_i18n ()'.
827
828 * posix.c: Include "libguile/gettext.h" instead of
829 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
830 (USE_GNU_LOCALE_API): New macro.
831 (scm_i_locale_mutex): New variable.
832 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
833
834 * posix.h: Include "libguile/threads.h".
835 (scm_i_locale_mutex): New declaration.
836
f3e3f530
NJ
8372006-11-17 Neil Jerram <neil@ossau.uklinux.net>
838
839 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
840
d9f71a07
LC
8412006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
842
843 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
844 "sweep_stats" arguments; use them instead of accessing the global
845 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
846
847 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
848 before each iteration of the loop.
849 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
850 (scm_i_get_new_heap_segment): Take an additional argument
851 SWEEP_STATS. Compute MIN_CELLS as a function of it.
852
853 * libguile/gc.c (scm_gc_cells_collected,
854 scm_gc_cells_collected_1): Removed.
855 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
856 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
857 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
858 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
859 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
860 `scm_gc_cells_(collected|swept)'.
861 (gc_update_stats): New.
862 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
863 `scm_i_gc_sweep_stats_1' instead of the former globals.
864 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
865 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
866 would keep allocating new segments instead of re-using collected
867 cells (because `scm_gc_cells_collected' would remain zero).
868
869 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
870 scm_gc_cell_yield_percentage): Removed.
871
872 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
873 (scm_i_adjust_min_yield): Updated.
874 (scm_i_get_new_heap_segment): Updated.
875
dd18d312
NJ
8762006-11-02 Neil Jerram <neil@ossau.uklinux.net>
877
878 * modules.c: Correct comment saying that low-level environments
879 will be used "in the next release".
880
881 * init.c: Comment out #include of environments.h.
882 (scm_i_init_guile): Comment out scm_environments_prehistory() and
883 scm_init_environments() calls.
884
885 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
886 (DOT_X_FILES): Remove environments.x.
887 (DOT_DOC_FILES): Remove environments.doc.
888 (modinclude_HEADERS): Remove environments.h.
889
9a5fa6e9
NJ
8902006-10-25 Neil Jerram <neil@ossau.uklinux.net>
891
892 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
893
894 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
895 scm_ia64_register_backing_store_base() instead of Linux-specific
896 implementations.
897
898 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
899 New declarations.
900
901 * gc.c (__libc_ia64_register_backing_store_base): Declaration
902 removed.
903 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
904 implementations for Linux and HP-UX.
905
906 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
907 and scm_ia64_register_backing_store_base() instead of
908 Linux-specific implementations.
909
910 * continuations.h (__libc_ia64_register_backing_store_base):
911 Declaration removed.
912 (scm_t_contregs): New "fresh" field.
913
914 * continuations.c (ia64_getcontext): Removed.
915 (scm_make_continuation): Use continuation fresh field instead of
916 interpreting getcontext return values (which isn't portable). Use
917 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
918 instead of Linux-specific implementations.
919 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
920 instead of Linux-specific implementation.
921
922 * _scm.h (__ia64__): Also detect __ia64.
923
8ab3d8a0
KR
9242006-10-03 Kevin Ryde <user42@zip.com.au>
925
926 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
927 arguments or 3 or more arguments. Previously 0 called proc with
928 SCM_UNDEFINED, and 3 or more silently used just the first 2.
929
9302006-09-28 Kevin Ryde <user42@zip.com.au>
931
932 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
933 for chsize fallback, instead of hard-coding mingw. Mingw in fact
934 supplies ftruncate itself these days.
935
936 * ports.c (fcntl.h): Can include this unconditionally, no need for
937 __MINGW32__.
938
939 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
940 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
941 "off_t" for parameters, per usual definition of this function, rather
942 than "char *" and "int". Use ftruncate instead of chsize. Check for
943 error on final close.
944
9452006-09-27 Kevin Ryde <user42@zip.com.au>
946
947 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
948 in mingw.
949
950 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
951 const *" for mingw to suppress warnings from gcc (which are errors
952 under the configure default -Werror). Reported by Nils Durner.
953
9542006-09-26 Kevin Ryde <user42@zip.com.au>
955
956 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
957 * fports.c (scm_open_file): Use open_or_open64.
958 (fport_seek_or_seek64): New function, adapting fport_seek.
959 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
960 functions.
961 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
962 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
963
964 * ports.c (scm_truncate_file): Update docstring per manual.
965
9662006-09-23 Kevin Ryde <user42@zip.com.au>
967
968 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
969 functions.
970
9a5fa6e9 9712006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
972
973 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
974 (make_predset, define_predset, make_strset, define_strset, false,
975 true): Removed.
976 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
977 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
978 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
979 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
980 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
981 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
982 (define_charset, scm_srfi_14_compute_char_sets): New functions.
983 (scm_init_srfi_14): Use `define_charset ()' instead of
984 `define_predset ()' and `define_strset ()'.
985
986 * srfi-14.h (scm_c_init_srfi_14): Removed.
987 (scm_srfi_14_compute_char_sets): New declaration.
988
989 * posix.h: Include "srfi-14.h".
990 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
991 successful `setlocale ()' call.
992
8ab3d8a0
KR
9932006-09-08 Kevin Ryde <user42@zip.com.au>
994
995 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
996 (scm_recvfrom): Update docstring from manual.
997
418122ce
RB
9982006-08-31 Rob Browning <rlb@defaultvalue.org>
999
1000 * ports.c (scm_c_port_for_each): Add a
1001 scm_remember_upto_here_1(ports) at the end of the function to fix
1002 a GC bug.
1003
b5944f66
NJ
10042006-08-28 Neil Jerram <neil@ossau.uklinux.net>
1005
1006 * backtrace.c (scm_display_backtrace_with_highlights): Minor
1007 improvements to docstring.
1008 (scm_backtrace_with_highlights): Analogous improvements.
1009
8ab3d8a0
KR
10102006-08-12 Kevin Ryde <user42@zip.com.au>
1011
1012 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
1013 New, set from configure.
1014 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
1015 to scmconfig.h.
1016 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
1017 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
1018 Reported by Claes Wallin.
1019
b0b0deff
NJ
10202006-08-11 Neil Jerram <neil@ossau.uklinux.net>
1021
1022 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
1023 frame, not a stack).
1024
8ab3d8a0
KR
10252006-07-25 Kevin Ryde <user42@zip.com.au>
1026
1027 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
1028 on pthreads version, since pthread_getattr_np not available on solaris
1029 and macos. Reported by Claes Wallin.
1030
10312006-07-24 Kevin Ryde <user42@zip.com.au>
1032
1033 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
1034 it's a macro on MacOS X. Reported by Claes Wallin.
1035
1036 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
1037 for the benefit of Solaris 10. Reported by Claes Wallin.
1038
1039 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
1040 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
1041
10422006-07-21 Kevin Ryde <user42@zip.com.au>
1043
1044 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
1045 autoconf recommendation. Should fix Solaris 10 reported by Claes
1046 Wallin.
1047
1048 * threads.c: Include <string.h>, needed for memset() which is used by
1049 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
1050
b4912378
RB
10512006-07-18 Rob Browning <rlb@defaultvalue.org>
1052
1053 * continuations.c: Add __attribute__ ((returns_twice)) to the
1054 ia64_getcontext prototype so that gcc will make the right
1055 arrangements and avoid an illegal instruction during
1056 call-with-current-continuation.
1057
9a5fa6e9 10582006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
1059
1060 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
1061 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
1062
8ab3d8a0
KR
10632006-07-08 Kevin Ryde <user42@zip.com.au>
1064
1065 * environments.c (core_environments_unobserve): Use if/else rather
1066 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
1067 about them not being rvalues. Reported by Mike Gran.
1068
1069 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
1070 portable and in particular fails on OpenBSD and AIX (see autoconf
1071 manual too). Reported by Mike Gran.
1072
10732006-06-25 Kevin Ryde <user42@zip.com.au>
1074
1075 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
1076 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
1077 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
1078 HAVE_TM_ZONE.
1079 (scm_strptime): Use tm_gmtoff from the strptime result when that field
1080 exists, it's set by glibc strptime "%s".
1081
9a5fa6e9 10822006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
1083
1084 * eq.c: Include "struct.h", "goops.h" and "objects.h".
1085 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
1086 are not GOOPS instances.
1087 * struct.c: Include "eq.h".
1088 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
1089 hand-written code.
1090 (scm_i_struct_equalp): New.
1091 * struct.h (scm_i_struct_equalp): New declaration.
1092
c862d0e0
KR
10932006-06-06 Kevin Ryde <user42@zip.com.au>
1094
1095 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
1096 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
1097 reported by Mattias Holm.
b4912378 1098
c862d0e0
KR
10992006-06-03 Kevin Ryde <user42@zip.com.au>
1100
1101 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
1102 unused variable warning when elisp disabled. Reported by Ryan
1103 VanderBijl.
1104
1105 * throw.c (scm_handle_by_message): Add dummy return value to avoid
1106 compiler warning on cygwin. Reported by Ryan VanderBijl.
1107
1108 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
1109 duplicate of EXTRA_DOT_DOC_FILES.
1110 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
1111 Add scmconfig.h to dependencies, since these all run cpp. Helps a
1112 parallel "make -j2". Reported by Mattias Holm.
1113
11142006-05-30 Kevin Ryde <user42@zip.com.au>
1115
1116 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
1117 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
1118 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
1119 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
1120 port type descriptor, same as scm_make_port_type return value.
1121
af4f8612
MV
11222006-05-30 Marius Vollmer <mvo@zagadka.de>
1123
1124 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
1125 of the arguments is a array. This allows vectors to be equal to
1126 one-dimensional arrays.
1127
18bffcd0
MV
11282006-05-29 Marius Vollmer <mvo@zagadka.de>
1129
1130 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
1131 that we have a pair before accessing its cdr. Thanks to Bill
1132 Schottstaedt!
1133
c862d0e0
KR
11342006-05-28 Kevin Ryde <user42@zip.com.au>
1135
1136 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
1137 by "The Senator".
1138
11392006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
1140
1141 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
1142 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
1143
c862d0e0
KR
11442006-05-26 Kevin Ryde <user42@zip.com.au>
1145
1146 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
1147 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
1148 Reported by "The Senator".
1149 For select and ioctl, move fdes into those conditionals, to avoid
1150 unused variable warning when neither of those used.
1151
11522006-05-23 Kevin Ryde <user42@zip.com.au>
1153
1154 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
1155 It's unused and will be in stdio.h anyway (if it's anywhere).
1156
11572006-05-20 Kevin Ryde <user42@zip.com.au>
1158
1159 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
1160 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
1161
1162 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
1163 symlink). Probably can't create symlinks with mknod anyway though.
1164
1165 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
1166 generation.
1167
11682006-05-15 Kevin Ryde <user42@zip.com.au>
1169
1170 * simpos.c, simpos.h (scm_primitive__exit): New function.
1171 (scm_primitive_exit): Update docstring, no longer the best exit after
1172 a fork.
1173
11742006-05-09 Kevin Ryde <user42@zip.com.au>
1175
1176 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
1177 rather than converting to doubles, to avoid inf or nan when the inputs
1178 are too big for a double but the quotient does fit. This affects
1179 conversions exact->inexact of big fractions.
1180
1181 * filesys.c (scm_open_fdes): Use open64.
1182 (scm_init_filesys): Add O_LARGEFILE.
1183
1184 * ports.c (scm_seek): Use lseek64.
1185 (scm_truncate_file): Use ftruncate64.
1186
4a342b19
MV
11872006-05-08 Marius Vollmer <mvo@zagadka.de>
1188
1189 * private-gc.h (CELL_P): Also check that the potential pointer is
1190 correctly aligned for a cell. Thanks to Miroslav Lichvar!
1191
c862d0e0
KR
11922006-04-18 Rob Browning <rlb@defaultvalue.org>
1193
1194 * _scm.h: Add back error if the size of off_t is unknown. The bug
1195 was actually in guile-readline's configuration.
1196
11972006-04-18 Kevin Ryde <user42@zip.com.au>
1198
1199 * posix.c (scm_mkstemp): Update docstring from the manual, in
1200 particular file mode 0600 is not guaranteed.
1201
281ab5e2
KR
12022006-04-17 Kevin Ryde <user42@zip.com.au>
1203
1204 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1205 size, to help the guile-readline build where off_t is unused.
1206
2b829bbb
KR
12072006-04-16 Kevin Ryde <user42@zip.com.au>
1208
1209 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1210 (scm_readdir): Use readdir64.
1211 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1212 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1213 and ftruncate take off_t not size_t.
1214 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1215 available.
1216
12172006-04-06 Kevin Ryde <user42@zip.com.au>
1218
1219 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1220 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
1221
12222006-03-26 Marius Vollmer <mvo@zagadka.de>
1223
1224 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1225 instead of accessing __libc_stack_end directly, and only do this
1226 when pthread_attr_getstack is known not to work for the main
1227 thread or when not using pthreads at all.
1228
1229 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1230 unknown instead of returning NULL.
1231
9a5fa6e9 12322006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1233
1234 * numbers.c (scm_i_mem2number): Renamed to
1235 scm_c_locale_stringn_to_number.
1236 * numbers.c, print.c, read.c: Updated callers.
1237 * numbers.h: Update function declaration.
1238
12392006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1240
1241 * unif.c (string_set): Don't return in a void function. (Reported
1242 by Mike Gran.)
1243
1244 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1245 rather than void*, so we can do pointer arithmetic on it.
1246 (Reported by Mike Gran.)
1247 (s_scm_uniform_vector_write): Ditto.
1248
12492006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1250
1251 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1252 oldra is not an array. (Reported by Steve Juranich.)
1253
1254 * threads.c (do_unlock): Renamed from "unlock", which is defined
1255 in unistd.h on QNX. (Reported by Matt Kraai.)
1256
12572006-03-04 Kevin Ryde <user42@zip.com.au>
1258
1259 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1260 not SCM_CRITICAL_SECTION_START.
1261
1262 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1263 Mike Gran.
1264
12652006-02-28 Kevin Ryde <user42@zip.com.au>
1266
1267 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1268
12692006-02-26 Kevin Ryde <user42@zip.com.au>
1270
1271 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1272 NAME_MAX is not available, which is so on Solaris 10. Report and help
1273 by Bill Schottstaedt.
1274
1275 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1276 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1277 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1278 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1279 use "unsigned char", not signed char. This ensures comparisons are
1280 the same as `char<?' etc, and is also the same as guile 1.6 did.
1281 Reported by Sven Hartrumpf.
1282
4a9f83ff
MD
12832006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1284
1285 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1286 SCM_HAVE_T_INT64.
1287 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1288 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1289 scm_t_int32.
1290
29d8c124 12912006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1292
1293 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1294 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1295 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1296 Take into account SEG->SPAN when computing CELLS_SWEPT.
1297 (scm_i_sweep_segment): Take one more argument, similarly.
1298 (scm_i_sweep_all_segments): Likewise.
1299 (scm_i_sweep_some_segments): Likewise.
1300 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1301 refer to SCM_GC_CELLS_COLLECTED.
1302
1303 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1304 argument, an `scm_i_sweep_statistics' object.
1305 Change the way DELTA is collected: don't take into account
1306 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1307
1308 * gc-malloc.c (scm_realloc): Pass an extra argument
1309 to `scm_i_sweep_all_segments ()'.
1310
1311 * gc.c (gc_start_stats): Updated accordingly.
1312 (gc_end_stats): Take an additional SWEEP_STATS argument.
1313 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1314 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1315 Decrement SCM_CELLS_ALLOCATED.
1316 (scm_i_gc): Likewise.
1317
1318 * private-gc.h (scm_i_sweep_*): Updated function
1319 prototypes accordingly.
1320 (scm_t_sweep_statistics): New type.
1321 (scm_i_sweep_statistics_init): New macro.
1322 (scm_i_sweep_statistics_sum): New macro
1323
9a5fa6e9 13242006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1325
1326 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1327 LEN. Without this, too much collectable memory gets unregistered,
1328 which results in an underflow of SCM_MALLOCATED in
1329 `decrease_mtrigger()'.
1330
1331 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1332 equal to SCM_MALLOCATED.
1333
13342006-02-13 Marius Vollmer <mvo@zagadka.de>
1335
1336 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1337 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1338 configured --without-threads.
1339 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1340
1aaa1c17
MV
13412006-02-12 Marius Vollmer <mvo@zagadka.de>
1342
1343 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1344 filling when the fill parameter is omitted, as documented, but
1345 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1346 can not store characters.
1347
d7c6575f
NJ
13482006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1349
1350 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1351 on to scm_fill_sockaddr call.
1352
43e01b1e
NJ
13532006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1354
1355 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1356 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1357
1358 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1359 (struct pre_unwind_data): New, replaces struct lazy_catch.
1360 (scm_c_catch): New, replaces scm_internal_catch as the primary
1361 catch API for C code; adds pre-unwind handler support.
1362 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1363 compatibility.
1364 (tc16_pre_unwind_data, pre_unwind_data_print,
1365 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1366 "lazy_catch" equivalents.
1367 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1368 as the primary C API for a "lazy" catch.
1369 (scm_internal_lazy_catch): Now just a wrapper for
1370 scm_c_with_throw_handler, for back compatibility.
1371 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1372 pre-unwind handler support.
1373 (scm_catch): Now just a wrapper for
1374 scm_catch_with_pre_unwind_handler, for back compatibility.
1375 (scm_with_throw_handler): New.
1376 (scm_lazy_catch): Update comment to say that the handler can
1377 return, and what happens if it does.
1378 (toggle_pre_unwind_running): New.
1379 (scm_ithrow): When identifying the throw target, take running
1380 flags into account. In general, change naming of things from
1381 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1382 don't unwind the dynamic context first. Add dynwind framing to
1383 manage the running flag of a throw handler. If a lazy catch or
1384 throw handler returns, rethrow the same exception again. Add
1385 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1386
1387 * root.c (scm_internal_cwdr): Add NULL args to
1388 scm_i_with_continuation_barrier call.
1389
1390 * dynwind.c: Change comment mentioning lazy-catch to mention
1391 pre-unwind data and throw handler also.
1392
1393 * continuations.h (scm_i_with_continuation_barrier): Add
1394 pre-unwind handler args.
1395
1396 * continuations.c (scm_i_with_continuation_barrier): Add
1397 pre-unwind handler args, and pass on to scm_c_catch (changed from
1398 scm_internal_catch).
1399 (c_handler): Remove scm_handle_by_message_noexit call.
1400 (scm_c_with_continuation_barrier): Call
1401 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1402 as the pre-unwind handler.
1403 (scm_handler): Remove scm_handle_by_message_noexit call.
1404 (s_scm_with_continuation_barrier): Call
1405 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1406 as the pre-unwind handler.
1407
2b829bbb
KR
14082006-02-04 Kevin Ryde <user42@zip.com.au>
1409
1410 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1411
72098928
KR
14122006-02-03 Kevin Ryde <user42@zip.com.au>
1413
1414 * list.c, list.h (scm_list): Restore this function for use from C.
1415 It's a complete no-op but in theory might used by someone.
1416
aa092c5d
MV
14172006-01-30 Marius Vollmer <mvo@zagadka.de>
1418
1419 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1420 so that it gets unlocked in all cases.
1421 (SCM_APPLY, CEVAL): Likewise.
1422
661ae7ab
MV
14232006-01-29 Marius Vollmer <mvo@zagadka.de>
1424
ee51ba31
MV
1425 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1426 scm_is_typed_array instead.
1427
661ae7ab
MV
1428 Renamed the "frames" that are related to dynamic-wind to "dynamic
1429 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1430 Updated documentation.
1431
99e370f6
MV
1432 Disabled "futures":
1433
1434 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1435 * eval.c, init.c: Comment out all 'future' related things.
1436
15ccf10b
MV
14372006-01-28 Marius Vollmer <mvo@zagadka.de>
1438
1439 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1440 to inline.h to make it inline.
1441
9a5fa6e9 14422005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1443
1444 * strings.c (scm_i_take_stringbufn): New.
1445 (scm_i_c_take_symbol): New.
1446 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1447
1448 * strings.h (scm_i_c_take_symbol): New.
1449 (scm_i_take_stringbufn): New.
1450
1451 * symbols.c (lookup_interned_symbol): New function.
1452 (scm_i_c_mem2symbol): New function.
1453 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1454 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1455 creating a new Scheme string.
1456 (scm_from_locale_symboln): Likewise.
1457 (scm_take_locale_symbol): New.
1458 (scm_take_locale_symboln): New.
1459
1460 * symbols.h (scm_take_locale_symbol): New.
1461 (scm_take_locale_symboln): New.
1462
2ca2ffe6
HWN
14632006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1464
1465 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1466 free_count.
1467
c255614e
HWN
14682005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1469
1470 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1471 upon error
1472
29295b0c
NJ
14732005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1474
9a5fa6e9 1475 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1476 the GC when allocated_fluids_len is zero.
1477
2824f4dc
NJ
14782005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1479
ec3a8ace
NJ
1480 * load.c (the_reader, the_reader_fluid_num): New.
1481 (scm_primitive_load): Support custom reader.
1482 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1483 the_reader as `current-reader'.
1484
2824f4dc
NJ
1485 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1486 (rather than an uninitialized pointer on the stack).
1487
d9c36d2a
MV
14882005-12-07 Marius Vollmer <mvo@zagadka.de>
1489
6a88895b
MV
1490 Reported by Bruce Korb:
1491
1492 * init.c (invoke_main_func): Don't call exit here. Throws that
1493 are only caught by scm_with_guile will bypass us and would cause
1494 scm_boot_guile to return erroneously.
1495 (scm_boot_guile): Expect scm_with_guile to return and call exit
1496 here, passing it an appropriate exit code.
1497
1498 From Andy Wingo:
d9c36d2a
MV
1499
1500 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1501 unsigned char cast to an int, or -1 for EOS.
1502
b54df254
MV
15032005-12-06 Marius Vollmer <mvo@zagadka.de>
1504
08f489c9
MV
1505 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1506 non-const.
9a5fa6e9 1507 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1508
b54df254
MV
1509 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1510 scm_enter_guile): Removed from public API. See comment at
1511 scm_without_guile for the rationale.
1512
1513 * scmsigs.c (read_without_guile): New.
1514 (signal_delivery_thread): Use it instead of
1515 scm_leave_guile/read/scm_enter_guile.
1516
9d9ce2b5
MV
1517 From Stephen Compall:
1518
1519 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1520 (CEVAL): Evaluate SRFI 61 cond clauses.
1521
9a5fa6e9 15222005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1523
1524 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1525 This was typically hit when running `gc-live-object-stats' right
1526 after starting Guile.
1527
efeac8ae
KR
15282005-11-30 Kevin Ryde <user42@zip.com.au>
1529
1530 * srfi-13.c (scm_string_append_shared): No copying if just one
1531 non-empty string in args.
1532
606183ba
KR
15332005-11-26 Kevin Ryde <user42@zip.com.au>
1534
1535 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1536 by Ludovic Courtès.
606183ba
KR
1537
1538 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1539 "register".
1540
1541 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1542 scm_malloc returning NULL, it never does that.
1543 * putenv.c (putenv): Likewise.
1544
1545 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1546 much too big to want to inline.
1547
9a5fa6e9 15482005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1549
1550 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1551 the value at its top. This fixes a reference leak.
1552 (PUSH_REF): Perform `pstate->top++' after calling
1553 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1554 effects.
1555
9a5fa6e9 15562005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1557
1558 * gc.c (scm_weak_vectors): Removed.
1559
f07d2b20
KR
15602005-11-12 Kevin Ryde <user42@zip.com.au>
1561
1562 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1563 by Ludovic Courtès.
f07d2b20 1564
bedd3f5f
MV
15652005-11-07 Marius Vollmer <mvo@zagadka.de>
1566
1567 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1568 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1569 section might exit non-locally.
1570
7c9c0169
NJ
15712005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1572
1573 * eval.c (sym_instead): New symbol.
1574 (ENTER_APPLY): Remove optional use of a continuation when making
1575 trap call.
1576 (scm_debug_opts): Change doc for 'cheap option to make clear that
1577 it is now obsolete.
1578 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1579 making trap calls, and implement substitution of eval expressions
1580 and return values using the values that the trap call handlers
1581 return.
1582
1583 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1584
9a5fa6e9 15852005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1586
1587 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1588 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1589 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1590 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1591 scm_c_make_socket_address): New functions.
1592 * socket.h: Add prototypes.
1593
fc9f596c
KR
15942005-10-24 Kevin Ryde <user42@zip.com.au>
1595
1596 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1597 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1598 POSIX spec examples, the latter are not available on for instance
1599 NetBSD.
1600
1601 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1602 posix.texi.
1603
1604 * stime.c (scm_strftime): Update docstring from posix.texi.
1605
0460c6e1
MV
16062005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1607
1608 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1609
1610 * null-threads.h, pthread-threads.h
1611 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1612 (scm_i_pthread_mutexattr_recursive): New.
1613
1614 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1615 (scm_i_critical_section_mutex): Do not initialize statically.
1616 (scm_threads_prehistory): Initialize
1617 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1618 here.
1619
1620 * eval.c (source_mutex): Do not initialiaze statically.
1621 (scm_init_eval): Do it here, using
1622 scm_i_pthread_mutexattr_recursive.
1623
7b4a9e52
MV
16242005-09-05 Marius Vollmer <mvo@zagadka.de>
1625
1626 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1627 New.
1628 (sym_reader): New.
1629 (scm_print_opts): Added "quote-keywordish-symbols" option.
1630 (quote_keywordish_symbol): New, for evaluating the option.
1631 (scm_print_symbol_name): Use it.
1632 (scm_init_print): Initialize new option to sym_reader.
1633
5defc05d
NJ
16342005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1635
1636 * eval.c (eval_letrec_inits): New.
1637 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1638
036482e9
MV
16392005-08-12 Marius Vollmer <mvo@zagadka.de>
1640
1641 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1642 Peter Gavin!
1643
5c347f8c
KR
16442005-08-12 Kevin Ryde <user42@zip.com.au>
1645
1646 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1647
bc721aa2
KR
16482005-08-06 Kevin Ryde <user42@zip.com.au>
1649
1650 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1651 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1652 scm_string_index, scm_string_index_right, scm_string_skip,
1653 scm_string_skip_right, scm_string_count, scm_string_map,
1654 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1655 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1656 procedures called in loops.
1657
126c81db
KR
16582005-08-02 Kevin Ryde <user42@zip.com.au>
1659
1660 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1661 avoid lots of copying where previoulsy growing by only 80 bytes at a
1662 time.
1663
7f278dc6
MV
16642005-08-01 Marius Vollmer <mvo@zagadka.de>
1665
1666 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1667 already have scm_lookup_closure_module, which does the same thing.
1668
cb5c4b07
MV
16692005-08-01 Marius Vollmer <mvo@zagadka.de>
1670
1671 New marking algorithm for weak hashtables that fixes the problem
1672 that references from the non-weak value to the associated weak
1673 key (for example) would prevent the entry from ever being dropped.
1674
1675 Guardians have been changed back to their original semantics and
1676 are no longer greedy and no longer drop cycles.
1677
1678 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1679 hashtable and guardian machinery but call the relevant functions
1680 directly.
1681
1682 * guardians.h, guardians.c, deprecated.h,
1683 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1684 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1685 Deprecated and moved into deprecated.[ch].
1686
1687 * guardians.h, guardians.c: Mostly rewritten.
1688 (scm_i_init_guardians_for_gc,
1689 scm_i_identify_inaccessible_guardeds,
1690 scm_i_mark_inaccessible_guardeds): New.
930888e8 1691 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1692
1693 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1694 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1695 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1696 (scm_weaks_prehistory): Removed.
1697 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1698 scm_i_mark_weak_vectors_non_weaks,
1699 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1700 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1701 scm_scan_weak_vectors): Removed.
1702
1703 * hashtab.h (scm_i_scan_weak_hashtables): New.
1704 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1705 SCM_WVECTF_NOSCAN.
1706 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1707 t->n_items.
1708 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1709 to latter. Do not scan the alists themselves, this is done by the
1710 weak vector code now. Just update the element count.
1711
1712 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1713 to latter. The type is now only part of the cell word.
1714 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1715
1716 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1717
3e2073bd
MD
17182005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1719
1720 Some changes towards making it possible to run Guile on the EM64T
1721 platform.
1722
1723 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1724 mallocating for (unsigned long *bounds).
1725
1726 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1727 scm_t_bits before storing them in the type word.
1728
1729 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1730 scm_t_bits to int.
1731
e8ac8e75
KR
17322005-07-12 Kevin Ryde <user42@zip.com.au>
1733
1734 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1735 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1736 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1737 than scm_makfrom0str.
1738 Reported by Ken Raeburn.
1739
1740 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1741 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1742 returning SCM_GC_CARD_BVEC.
1743
1744 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1745 rather than latin-1 acute accent, the latter may not print on all
1746 terminals.
1747
1748 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1749 trailing deletions, so as to return a substring if those are the only
1750 changes.
1751
adc0677d
KR
17522005-07-10 Kevin Ryde <user42@zip.com.au>
1753
1754 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1755 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1756 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1757 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1758
8fecbb19
HWN
17592005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1760
1761 * gc-card.c (scm_i_card_statistics): init tag.
1762
1763 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1764
fc9c5d06
HWN
17652005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1766
8fecbb19
HWN
1767 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1768 string.
fc9c5d06 1769
08fce816
KR
17702005-06-25 Kevin Ryde <user42@zip.com.au>
1771
1772 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1773 last change, use plain copy-on-write substrings, the individual
1774 descriptions in the srfi don't mention shared storage (only the
1775 introduction does).
1776
1777 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1778 null-terminator, rather than mallocing a whole new block.
1779 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1780
fc4abd0e
MV
17812005-06-12 Marius Vollmer <mvo@zagadka.de>
1782
e3da8a30
MV
1783 * ramap.c (scm_array_index_map_x): First test for real arrays,
1784 then check for generalized vectors. This ensures that the
1785 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1786 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1787 to access the target array, making these functions work with all
1788 kinds of arrays, not just bit arrays.
e3da8a30 1789
fc4abd0e
MV
1790 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1791 gh_list.c, gh_predicates.c: Deprecated everything.
1792
1793 * environments.c (environment_default_folder,
1794 environment_default_observer): Do not use gh_call3, gh_call1.
1795
e4da0740
HWN
17962005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1797
1798 * modules.c (s_scm_eval_closure_module): new function. Return the
1799 module inside an eval-closure.
1800
1801 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1802 table. This means that procedure properties are GC'd if the
1803 procedure dies.
1804
27667158
KR
18052005-06-11 Kevin Ryde <user42@zip.com.au>
1806
1807 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1808 charset cases, count chars kept and build a string in a second pass,
1809 rather than using a cons cell for every char kept. Use a shared
1810 substring when nothing removed (such sharing is allowed by the srfi).
1811
8a00ba71
HWN
18122005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1813
1814 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1815 string, so live object stats can be sorted with string<?.
1816
a677679f
MV
18172005-06-06 Marius Vollmer <mvo@zagadka.de>
1818
2ff668b0
MV
1819 * print.c (iprin1): When writing a string, collect all characters
1820 that can be printed directly into one call to scm_lfwrite.
1821 Previously, every character was output with its own call to
1822 write(2) on unbuffered ports.
1823
589f22f6
MV
1824 * eval.c (scm_eval_options_interface): Use
1825 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1826 and SCM_CRITICAL_SECTION_END.
1827
a677679f
MV
1828 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1829 check for generalized vectors. This ensures that the generalized
1830 vector case need only work with zero-origin ranges.
1831
f8cda9ee
KR
18322005-06-06 Kevin Ryde <user42@zip.com.au>
1833
1834 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1835 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1836 matched.
1837
cdac1be4
MV
18382005-06-05 Marius Vollmer <mvo@zagadka.de>
1839
6642f7ac
MV
1840 * eval.c: Added comment on how to make case 1.1 of
1841 r5rs_pitfall.test succeed.
1842
cdac1be4
MV
1843 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1844
1845 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1846
1847 * socket.c: Remove obsolete comment about socklen_t.
1848 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1849
1850 * numbers.h (isnan)[__MINGW32__]: Remove.
1851
1852 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1853 DEFAULT_INCLUDES when cross compiling.
1854
1855 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1856
a677679f 1857 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1858 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1859 from Jan's patch.)
1860
9e664475
MV
18612005-05-22 Marius Vollmer <mvo@zagadka.de>
1862
188d0c5e
MV
1863 * unif.c (scm_make_shared_array): Add old base to new base since
1864 scm_array_handle_pos does not include the base.
1865 (scm_aind): Likewise.
1866
9e664475
MV
1867 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1868 output port.
1869
5a6d139b
NJ
18702005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1871
1872 Mac OS X compile warning fixes, reported by Richard Todd.
1873
1874 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1875 that it is signed.
1876
1877 * strports.c (st_resize_port): Add unsigned char cast.
1878 (scm_mkstrport): Make read/write_buf cast unsigned.
1879
1880 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1881
1882 * rdelim.c (scm_read_line): Initialize slen.
1883
1884 * load.c (scm_search_path): Remove weird >=1, and add
1885 parentheses to clarify conditions.
1886
1887 * hash.c (scm_hasher): Add const unsigned char cast.
1888
1889 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1890
b01532af
NJ
18912005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1892
9a5fa6e9 1893 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1894
1895 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1896 code.
1897
1898 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1899 of code.
1900
1901 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1902 of code.
1903 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1904 and current.
1905
229a0710
NJ
19062005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1907
1908 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1909 compile warning reported by Werner Scheinast.
1910
645dd3fc
HWN
19112005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1912
80038021
HWN
1913 * list.h: remove scm_list()
1914
645dd3fc
HWN
1915 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1916 SCM_DEBUG_CELL_ACCESSES
1917 (FLUID_NEXT_LOC): idem.
1918
9a68a4a8
KR
19192005-04-30 Kevin Ryde <user42@zip.com.au>
1920
1921 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1922 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1923 zero when re==0 and im<0. Reported by Jean Crepeau.
1924
0640cdaa
KR
19252005-04-25 Kevin Ryde <user42@zip.com.au>
1926
1927 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1928 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1929 few sensible uses (like filling with a random number generator say),
1930 but has been allowed in the past and so should be kept.
0640cdaa 1931
c0b85e9c
KR
19322005-04-23 Kevin Ryde <user42@zip.com.au>
1933
1934 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1935 scm_hash_fn_remove_x.
1936
1937 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1938 the caller when cons* is reached through apply.
1939
1940 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1941 list is called using apply, under the debugging evaluator.
1942 (scm_list): Remove.
1943
c51682b4
KR
1944 * list.c, list.h (scm_make_list): New code, moving make-list from
1945 boot-9.scm.
8cb2eff8 1946
c0575bde
KR
19472005-04-14 Kevin Ryde <user42@zip.com.au>
1948
1949 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1950 converted from scheme code in boot-9.scm.
1951
47a298d9
KR
19522005-04-11 Kevin Ryde <user42@zip.com.au>
1953
1954 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1955 Validate list argument, scm_string_append and scm_string_append_shared
1956 don't do that to their rest argument (in a normal build).
1957
8ea3dc2e
MV
19582005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1959
1960 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1961 closure can not be stored since it is no longer valid at GC time.
1962 (make_hash_table): Initialize 'hash_fn' field.
1963 (scm_i_rehash): Only store hash_fn in hash table when closre is
1964 NULL.
1965 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1966 non-NULL. Always use a NULL closure.
1967 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1968 few entries.
1969
08d2020d
MV
19702005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1971
1972 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1973 argument; always use scm_delq_x. The delete_fn function works on
1974 the handle, not the key, and it therefore makes no sense to make
1975 it configurable. Changed all callers.
1976 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1977 (scm_hash_clear): Accept plain vectors as hashtables.
1978 (scm_delx_x): Removed.
1979
cb975c21
HWN
19802005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1981
1982 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1983 compatibility with gcc -std=c99.
1984
4c908f2c
MD
19852005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1986
1987 * async.h (scm_mask_ints): Removed left over reference to
1988 scm_root.
1989
1990 * threads.c: Removed fprintf debug statements.
1991
d193b04b
NJ
19922005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1993
1994 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1995
c29748cd
NJ
19962005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1997
1998 * debug.c (scm_make_memoized): Remove unnecessary critical
1999 section, and simplify by using SCM_RETURN_NEWSMOB.
2000
e654b062
MD
20012005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2002
2003 * strings.h (SCM_STRING_UCHARS): Added missing argument.
2004
4bc6f1c6
KR
20052005-03-18 Kevin Ryde <user42@zip.com.au>
2006
2007 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 2008 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 2009
f1531813
KR
20102005-03-13 Kevin Ryde <user42@zip.com.au>
2011
2012 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
2013 srfi-60.
2014
2015 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
2016 because OR-ing bits into a negative can reduce the value to an inum.
2017
2018 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
2019 casting inum to double since that can lose precision.
2020
a9fae247
MV
20212005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2022
2023 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
2024 (guilify_self_1): Initialize it.
2025
2026 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
2027 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
2028 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
2029 field.
2030 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
2031 recursively.
2032 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
2033 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
2034 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
2035 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
2036 scm_after_gc_c_hook here.
2037 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
2038 scm_after_gc_c_hook when a full GC has in fact been performed.
2039 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
2040
2041 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
2042 scm_gc_heap_lock.
2043
2044 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
2045 scm_gc_running_p while the scm_i_sweep_mutex is locked.
2046
2047 * inline.h (scm_cell, scm_double_cell): Do not check
2048 scm_gc_running_p, allocation during sweeping is OK.
2049
2050 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
2051 not set scm_block_gc.
2052
2053 * init.c (scm_i_init_guile): Do not set scm_block_gc.
2054
2055 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
2056 instead of scm_malloc. The latter can not be used during GC.
2057
d1c38e11
MV
20582005-03-09 Marius Vollmer <mvo@zagadka.de>
2059
2060 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
2061 years.
2062
99ec43c1
MV
20632005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2064
2065 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
2066 scm_gc_running_p. Sweeping can happen in parallel with
2067 allocation.
2068
2069 * inline.h: Updated comments for current threading implementation.
2070
2071 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
2072 (scm_i_thread): Removed unused signal_asyncs field.
2073 (threads_mark): Do not mark it.
2074 (guilify_self_1): Do not initialize it. Do initialize
2075 continuation_root field.
2076 (do_thread_exit): Do not remove thread from all_threads list.
2077 (on_thread_exit): Do it here, after leaving guile mode.
2078 (sleep_level): Removed.
2079 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
2080 returning. Do not support recursive sleeps.
2081 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
2082 entry. Do not support recursive sleeps.
2083
2084 * fluids.c (ensure_state_size, ensure_all_state_sizes,
2085 resize_all_states): Collapsed ensure_state_size and
2086 ensure_all_state_sizes into one function named resize_all_states.
2087 Allocate new vectors outside of single threaded region. Do only
2088 simple things inside that region.
2089 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
2090 while adding to the global lists.
2091
2092
461f34aa
MV
20932005-03-08 Marius Vollmer <mvo@zagadka.de>
2094
2095 libltdl is no longer distributed. We expect it to be installed
2096 already.
2097
2098 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
2099 (libguile_la_LIBADD): Removed @LIBLTDL@.
2100
4e047c3e
MV
21012005-03-07 Marius Vollmer <mvo@zagadka.de>
2102
2103 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
2104 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
2105 they also block/unblock execution of asyncs and call
2106 scm_async_click which is declared in async.h but threads.h can not
2107 include async.h since async.h already includes threads.h.
2108 (scm_i_critical_section_level): New, for checking mistakes in the
2109 use of the SCM_CRITICAL_SECTION_* macros.
2110 (scm_i_critical_section_mutex): Make it a recursive mutex so that
2111 critical sections can be nested.
2112
2113 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
2114 not zero.
2115
2116 * threads.h, threads.c (scm_frame_lock_mutex): New.
2117 (scm_frame_critical_section): Take mutex as argument.
2118 (framed_critical_section_mutex): New, used as default for above.
2119 (scm_init_threads): Initialize it.
2120 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
2121 scm_i_critical_section_mutex; both are initialized statically.
2122
2123 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
2124 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
2125 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
2126 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
2127
2128 * debug.c (scm_debug_options): Replace
2129 SCM_CRITICAL_SECTION_START/END with a frame and
2130 scm_frame_critical_section.
2131
2132 * continuations.c (scm_make_continuation): No longer a critical
2133 section.
2134 (scm_dynthrow): Abort when scm_i_critical_section_level is
2135 not zero.
2136
d0a45bff
MV
21372005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2138
db6673e5
MV
2139 * threads.c (scm_try_mutex): Renamed argument for consistency.
2140
d0a45bff
MV
2141 * root.c (scm_call_with_dynamic_root): New docstring.
2142
2143 * eval.c: Define _GNU_SOURCE.
2144
9de87eea
MV
21452005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2146
2147 Big merge from the mvo-thread-cleanup branch. The main changes
2148 are:
2149
2150 - The dynamic roots functionality has been split into dynamic
2151 states and continuations barriers. Fluids have been
2152 reimplemented and can now be garbage collected.
2153
2154 - Initialization of Guile now works in a multi-thread friendly
2155 manner. Threads can freely enter and leave guile mode.
2156
2157 - Blocking on mutexes or condition variables or while selecting
2158 can now be reliably interrupted via system asyncs.
2159
2160 - The low-level threading interface has been removed.
2161
2162 - Signals are delivered via a pipe to a dedicated 'signal delivery
2163 thread'.
2164
2165 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
2166
2167 * throw.c (scm_handle_by_message): Exit only the current thread,
2168 not the whole process.
2169 (scm_handle_by_message_noexit): Exit when catching 'quit.
2170
2171 * scmsigs.c (take_signal, signal_delivery_thread,
2172 start_signal_delivery_thread, ensure_signal_delivery_thread,
2173 install_handler): Reimplemented signal delivery as explained in
2174 the comments.
2175
2176 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
2177 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
2178 scm_i_sched_yield, scm_i_pthread_sigmask,
2179 SCM_I_PTHREAD_MUTEX_INITIALIZER,
2180 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
2181 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
2182 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
2183 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
2184 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
2185 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
2186 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
2187 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
2188 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
2189 scm_i_pthread_key_create, scm_i_pthread_setspecific,
2190 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
2191 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
2192 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2193 when using pthreads.
2194 * null-threads.c, null-threads.h: Provide dummy definitions for
2195 the above symbols when not using pthreads.
2196
2197 * modules.h, modules.c (scm_frame_current_module): New.
2198
2199 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2200 instead of scm_internal_dynamic_wind.
2201
2202 * init.h, init.c (restart_stack, start_stack): Removed.
2203 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2204 (scm_boot_guile_1): Removed.
2205 (scm_i_init_mutex): New.
2206 (really_cleanup_for_exit, cleanup_for_exit): New.
2207 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2208 Moved around some init funcs. Call
2209 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2210 with atexit.
2211
2212 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2213 Use "!scm_is_eq" instead of "!=".
2214
2215 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2216 SCM_USE_COOP_THREADS): Removed.
2217
2218 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2219 maintained. Unlock scm_i_sweep_mutex before running
2220 scm_after_gc_c_hook.
2221 (scm_permanent_object): Allocate outside of critical section.
2222 (cleanup): Removed.
2223
2224 * fluids.h, fluids.c: Reimplemented completely.
2225 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2226 SCM_FAST_FLUID_SET): Reimplemented as functions.
2227 (scm_is_fluid): New.
2228 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2229 (scm_make_dynamic_state, scm_dynamic_state_p,
2230 scm_is_dynamic_state, scm_current_dynamic_state,
2231 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2232 scm_c_with_dynamic_state, scm_with_dynamic_state,
2233 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2234
2235 * feature.c (progargs_fluid): New.
2236 (scm_program_arguments, scm_set_program_arguments): Use it instead
2237 of scm_progargs.
2238 (scm_init_feature): Allocate it. Also, only add "threads" feature
2239 when SCM_USE_PTHREAD_THREADS is true.
2240
2241 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2242 scm_make_rec_mutex, with all the consequences.
2243 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2244 scm_internal_dynamic_wind. Handle dynamic states as second
2245 argument.
2246
2247 * threads.h, threads.c (scm_internal_select): Renamed to
2248 scm_std_select and discouraged old name.
2249 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2250 and scm_std_usleep.
2251 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2252 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2253 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2254 SCM_THREAD_DATA): Removed.
2255 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2256 (scm_i_thread): New.
2257 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2258 Use scm_assert_smob_type.
2259 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2260 scm_thread_self, scm_thread_yield, scm_mutex_init,
2261 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2262 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2263 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2264 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2265 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2266 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2267 scm_thread_select): Removed. Replaced with scm_i_pthread
2268 functions as appropriate.
2269 (scm_in_guile, scm_outside_guile): Removed.
2270 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2271 take a ticket.
2272 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2273 New.
2274 (scm_i_frame_single_threaded): New.
2275 (scm_init_threads_default_dynamic_state): New.
2276 (scm_i_create_thread): Removed.
2277 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2278 (scm_make_recursive_mutex): New.
2279 (scm_frame_critical_section): New.
2280 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2281 latter, changed all uses.
2282 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2283 scm_i_set_last_debug_frame): New, use them instead of scm_root
2284 stuff.
2285 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2286 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2287 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2288 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2289 (remqueue): Allow the removal of already removed cells. Indicate
2290 whether a real removal has happened.
2291 (scm_thread): Removed, replaced with scm_i_thread.
2292 (make_thread, init_thread_creatant): Removed.
2293 (cur_thread): Removed.
2294 (block_self, unblock_from_queue): New.
2295 (block, timed_block, unblock): Removed.
2296 (guilify_self_1, guilify_self_2, do_thread_exit,
2297 init_thread_key_once, init_thread_key,
2298 scm_i_init_thread_for_guile, get_thread_stack_base,
2299 scm_init_guile): New initialisation method.
2300 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2301 thread creation.
2302 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2303 "fair" to fat and implemented new semantics, including reliable
2304 interruption.
2305 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2306 (scm_threads_mark_stacks): Explicitly mark handle.
2307 (scm_std_select): Allow interruption by also selecting on the
2308 sleep_pipe.
2309 (scm_i_thread_put_to_sleep): Handle recursive requests for
2310 single-threadedness.
2311 (scm_threads_prehistory, scm_init_threads): Put current thread
2312 into guile mode via guileify_self_1 and guileify_self_2,
2313 respectively.
2314
2315 * fluid.h (SCM_FLUIDP): Deprecated.
2316
2317 * coop-threads.c: Removed.
2318
2319 * continuations.h, continuations.c (scm_with_continuation_barrier,
2320 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2321 New.
2322
2323 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2324 (async_mutex): New.
2325 (scm_async_click): Protected with async_mutex. Do not deal with
2326 signal_asyncs, which are gone. Set cdr of handled async cell to
2327 #f.
2328 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2329 current sleep.
2330 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2331 since that might not work during early initialization.
2332
2333 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2334 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2335 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2336 and SCM_CRITICAL_SECTION_END.
2337 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2338 SCM_CRITICAL_SECTION_START/END.
2339
2340 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2341 (libguile_la_SOURCES): Added null-threads.c
2342 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2343 threads-plugin.c.
2344 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2345
2346 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2347 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2348 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2349 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2350 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2351 scm_make_root): Removed or deprecated. Replaced with references
2352 to the current thread, dynamic state, continuation barrier, or
2353 some fluid, as appropriate.
2354 (root_mark, root_print): Removed.
2355 (scm_internal_cwdr): Reimplemented guts with
2356 scm_frame_current_dynamic_state and
2357 scm_i_with_continuation_barrier.
2358 (scm_dynamic_root): Return current continuation barrier.
2359
2360
ad3d5a65
MV
23612005-02-28 Marius Vollmer <mvo@zagadka.de>
2362
2363 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2364 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2365 cleanliness.
2366 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2367 IP_DROP_MEMBERSHIP.
2368 Thanks to Greg Troxel!
2369
73a90115
MD
23702005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2371
2372 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2373 block.
2374
5d2cb3ab
MV
23752005-02-25 Marius Vollmer <mvo@zagadka.de>
2376
2377 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2378 so that no two weak alist vectors share a spine.
2379 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2380 during GC before inserting the new alist cell.
2381
838c4126
MV
23822005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2383
2384 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2385 the hashtable.
2386 (scm_hash_fn_create_handle_x): Likewise.
2387 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2388
29fed193
MD
23892005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2390
2391 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2392 the prototypical examples mentioned in the old reference manual.
2393 Instead keep the old semantics of dispatching on type. (Yes, this
2394 is extremely ugly, but the whole point of keeping the deprecated
2395 interface is not to break old code.)
2396
9cc49060
MD
23972005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2398
2399 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2400 scm_i_array_dims.
2401
8447f463
KR
24022005-01-28 Kevin Ryde <user42@zip.com.au>
2403
2404 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2405 integer-expt and multiply/divide. Inexacts and fractions no longer
2406 supported (they happened to work before for left shifts, but not
2407 right). Don't really need inexacts and fractions, since ash is
2408 documented as a "bitwise operation", and all the rest of those only
2409 take exact integers.
2410
1367aa5e
HWN
24112005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2412
856fca7e
HWN
2413 * gc-card.c (scm_i_card_statistics): map structs, closures and
2414 subrs to one tag.
2415
1367aa5e 2416 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2417 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2418
2419 * gc-segment.c (scm_i_all_segments_statistics): new function.
2420 (scm_i_heap_segment_statistics): new function
2421
2422 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2423 statistics on the number of live objects of each type.
2424
2425 * gc-card.c (scm_i_tag_name): new function.
2426 (scm_i_card_statistics): new function.
2427
333db3b8
KR
24282005-01-24 Kevin Ryde <user42@zip.com.au>
2429
2430 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2431 POSIX and C99 don't document errno being set. Reported by Bruno
2432 Haible.
2433 (scm_flock): Update docstring from manual.
2434
8447f463
KR
2435 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2436 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2437 a 64-bit system.
2438
2439 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2440 sa_handler, needs to be a long on 64-bit systems where int is only 32
2441 bits.
2442
88f59e53
MV
24432005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2444
0eeb2611
MV
2445 * environments.c (obarray_enter, obarray_replace): Call
2446 SCM_HASHTABLE_INCREMENT when adding a new entry.
2447
88f59e53
MV
2448 * objects.c: Include goops.h for the scm_class_of prototype.
2449
2450 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2451 sizes to be smaller than the maximum lengths of vectors.
2452
219b2868
MV
24532005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2454
2455 * ports.c, smob.c: Include "libguile/goops.h".
2456
2457 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2458 scm_class_char, scm_class_pair, scm_class_procedure,
2459 scm_class_string, scm_class_symbol,
2460 scm_class_procedure_with_setter, scm_class_primitive_generic,
2461 scm_class_vector, scm_class_null, scm_class_real,
2462 scm_class_complex, scm_class_integer, scm_class_fraction,
2463 scm_class_unknown, scm_port_class, scm_smob_class,
2464 scm_no_applicable_method, scm_class_of): Moved from objects to
2465 goops since they are only useable once goops has been loaded.
2466 (scm_classes_initialized): Removed.
2467 (scm_class_of): Do not check it.
2468 (create_standard_classes): Do not set it.
2469
009c6b9c
MV
24702005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2471
50472546
MV
2472 * objects.h, objects.c (scm_classes_initialized): New.
2473 (scm_class_of): Signal error when scm_classes_initialized is zero.
2474 * goops.c (create_standard_classes): Set scm_classes_initialized
2475 to one.
2476
009c6b9c
MV
2477 * random.c (scm_random_solid_sphere_x): Use
2478 scm_c_generalized_vector_length instead of
2479 scm_uniform_vector_length.
2480
7719cbe9
MV
24812005-01-16 Marius Vollmer <mvo@zagadka.de>
2482
2483 * script.c (scm_compile_shell_switches): Removed debugging output.
2484
1ec44fed
KR
24852005-01-15 Kevin Ryde <user42@zip.com.au>
2486
2487 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2488 docstrings from manual.
2489 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2490
6e4cd850
MV
24912005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2492
0b5a0521
MV
2493 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2494 its value.
2495
2496 Implement u64 and s64 uniform numeric vectors with bignums when
2497 scm_t_uint64 and scm_t_int64 are not available.
2498
2499 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2500 scm_array_handle_u64_elements,
2501 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2502 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2503 is not available.
2504 (scm_take_s64vector, scm_array_handle_s64_elements,
2505 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2506 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2507 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2508 scm_t_int64/scm_t_uint64 are not available.
2509 (uvec_mark): New, to mark the bignums.
2510 (alloc_uvec): Initialize bignums.
2511 (uvec_fast_ref): Return bignums directly.
2512 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2513 assert_exact_integer): New.
2514 (uvec_fast_set): Use them to validate the bignums.
2515 (scm_init_srfi_4): Set mark function of smob when needed.
2516 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2517 scm_int64_max.
2518
6e4cd850
MV
2519 Recognize 1.4 -e syntax.
2520
2521 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2522 (scm_compile_shell_switches): Use them to recognize and convert
2523 1.4 "-e" syntax.
2524
3b698afe
MV
25252005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2526
2527 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2528 deprecated features that once were macros but are now functions
2529 back into macros.
2530
d6dc83a9
MV
25312005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2532
49086691
MV
2533 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2534 * deprecation.c (scm_issue_deprecation_warning,
2535 scm_c_issue_deprecation_warning_fmt): Use it.
2536 (mode): Removed.
2537 (print_summary): New.
2538 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2539 mode.
2540
d6dc83a9
MV
2541 Deprecated SCM_ARRAY* macros.
2542
2543 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2544 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2545 version. Changed all uses.
2546 (scm_tc16_array, scm_i_tc16_array,
2547 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2548 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2549 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2550 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2551 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2552 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2553 SCM_ARRAY_V, SCM_I_ARRAY_V,
2554 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2555 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2556 scm_t_array, scm_i_t_array): Likewise.
2557 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2558 Moved from unif.h to unif.c.
2559 (scm_c_array_rank): New.
2560 (scm_array_rank): Reimplement using it.
2561
2562 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2563 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2564 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2565
dc91d8de
MV
25662005-01-11 Marius Vollmer <mvo@zagadka.de>
2567
2568 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2569 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2570 scm_c_generalized_vector_ref and scm_cvref, and
2571 scm_c_generalized_vector_set_x, respectively.
2572 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2573 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2574
2575 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2576 former to latter and made public. Changed all uses.
2577 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2578 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2579 (scm_i_shap2ra): New internal version of scm_shap2ra.
2580 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2581 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2582 (scm_ra_set_contp): Deprecated, changed all uses to
2583 scm_i_ra_set_contp.
2584 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2585
66d33784
MV
25862005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2587
b06f099d
MV
2588 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2589 Trotts!
2590
5d35ad81
MV
2591 * unif.c (scm_list_to_typed_array): Allow the specification of the
2592 upper bound as well. This is needed for empty arrays.
2593 (l2ra): Give needed number of elements in error message.
2594 (scm_i_print_array): Print length information for arrays that need
2595 it.
2596 (scm_i_read_array): Parse it.
2597
66d33784
MV
2598 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2599 scm_i_object_chars, scm_i_object_length): Brought back from the
2600 dead.
2601
d7d7d401
MV
26022005-01-10 Marius Vollmer <mvo@zagadka.de>
2603
74c58fce
MV
2604 * ramap.c: Replaced single-index uses of scm_array_set_x with
2605 scm_c_generalized_vector_set_x.
2606
d7d7d401
MV
2607 * unif.c (scm_array_rank, scm_array_dimensions,
2608 scm_shared_array_offset, scm_shared_array_increments,
2609 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2610 to simplify code and make it more general.
2611 (scm_shared_array_root): Work with all kinds of arrays, including
2612 naked vectors.
2613 (indices_to_pos): New.
74c58fce
MV
2614 (scm_make_shared_array): Use it instead of scm_aind; use handle
2615 for oldra.
2616
4475d3fe
KR
26172005-01-10 Kevin Ryde <user42@zip.com.au>
2618
2619 * posix.c (scm_mkstemp): Update docstring from manual.
2620
d3ddc95e
KR
2621 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2622
8c8491f5
MV
26232005-01-09 Marius Vollmer <mvo@zagadka.de>
2624
b89ecc6f
MV
2625 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2626 scm_i_uniform_vector_set_proc): New.
2627 (u8ref, u8set, s8ref, s8set, etc): New.
2628 (uvec_reffers, uvec_setters): New.
2629 (uvec_to_list): Use generic scm_array_handle_ref instead of
2630 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2631 (coerce_to_uvec, scm_c_uniform_vector_ref,
2632 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2633
2634 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2635 New.
2636 (scm_t_array_handle): Added ref, set, elements and
2637 writable_elements for fast inline operation of
2638 scm_array_handle_ref and scm_array_handle_set.
2639 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2640 and replaced with inline code that simply calls the ref/set
2641 members of the handle.
2642 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2643 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2644 New.
2645 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2646 and memoize_set.
2647 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2648 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2649 scm_bit_invert_x): Correctly multiply index with increment in the
2650 general case.
2651
8c8491f5
MV
2652 * unif.c (scm_array_handle_set): Correctly execute only one
2653 alternative. D'Oh!
2654 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2655 the array; this covers all cases with much simpler code.
2656
2657 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2658 as well.
2659
cd5d55c7
MV
26602005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2661
2662 * srfi-4.c (uvec_type): New.
2663 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2664 scm_c_uniform_vector_x): Use it to get concrete type.
2665
2666 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2667 fit the docs.
2668
2669 * unif.c (ra2l): Handle zero rank arrays.
2670 (scm_i_print_array): Print zero rank arrays specially.
2671 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2672 (scm_i_read_array): Allow zero rank arrays.
2673
a4aad74e
MV
26742005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2675
2676 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2677 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2678 and SCM_SET_HASHTAB_BUCKET.
2679
2680 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2681 Removed ref_stack field.
2682 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2683 of a print state. Use them everywhere instead of ref_stack.
2684
3a40d5e1
MV
2685 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2686
a4aad74e
MV
2687 * srfi-4.c: Include deprecation.h.
2688
2689 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2690 deprecated.c, eq.c
2691 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2692 (scm_vector_elements, scm_vector_writable_elements,
2693 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2694 unif.[hc].
2695 (SCM_SIMPLE_VECTOR_LOC): Removed.
2696 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2697 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2698 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2699 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2700 latter. Changed use in eq.c.
2701
f01fe441
MV
27022005-01-07 Marius Vollmer <mvo@zagadka.de>
2703
2704 Make the uniform vector routines also deal with one dimensional
2705 arrays.
2706
2707 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2708 SCM_SMOB_PREDICATE in this file.
2709 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2710 of the right type.
2711 (scm_is_uniform_vector): Likewise.
2712 (uvec_fast_ref): Made BASE param const.
2713 (uvec_writable_elements, uvec_elements): New.
2714 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2715 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2716 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2717 arrays.
2718 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2719 argument convention.
2720 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2721 checking.
2722 (scm_uniform_vector_length): Use uvec_length.
2723
2aaf5726
MV
27242005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2725
2726 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2727 scm_c_uniform_vector_size): Removed.
2728 (scm_array_handle_uniform_element_size): New.
2729
2730
2731 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2732 type of POS parameter to be signed, positions can be negative.
2733 (scm_array_handle_release): New, changed all uses of
2734 scm_t_array_handle to properly call it.
2735 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2736 Renamed former to latter, changed all uses.
2737
34ae52fc
MV
27382005-01-05 Marius Vollmer <mvo@zagadka.de>
2739
2740 Updated bitvector routines to also use scm_t_array_handles.
2741
2742 * unif.h (scm_bitvector_elements,
2743 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2744 deliver offset, length and increment to caller. Changed all uses.
2745 (scm_bitvector_release_elements,
2746 scm_frame_bitvector_release_elements,
2747 scm_bitvector_release_writable_elements,
2748 scm_frame_bitvector_release_writable_elements): Removed.
2749 (scm_array_handle_bit_elements,
2750 scm_array_handle_bit_writable_elements,
2751 scm_array_handle_bit_elements_offset): New.
2752 (scm_make_typed_array): The special value for non-initialized
2753 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2754 was a valid value to fill bitvectors with, so it can't really be
2755 specialed out.
2756
c4cb7628
KR
27572005-01-04 Kevin Ryde <user42@zip.com.au>
2758
2759 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2760 Reported by Bill Schottstaedt.
2761
0356881d
MV
27622005-01-02 Marius Vollmer <mvo@zagadka.de>
2763
2764 * sort.c (quicksort): Added INC parameter for non-contigous
2765 vectors.
2766 (quicksort1): New, for contigous vectors. Both functions are
2767 generated from the same code by including "quicksort.i.c".
2768 (scm_restricted_vector_sort_x): Call one of quicksort and
2769 quicksort1, depending on increment of vector.
2770 (scm_sort): Simply call scm_sort_x on a copy of the list or
2771 vector.
2772 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2773 size_t, added inc parameter.
2774 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2775 so that it doesn't leak.
2776 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2777 list or vector.
2778
2779 * ramap.c (scm_array_map_x): Do not try to convert fill value
2780 before filling, any necessary conversion is done while storing.
2781
2782 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2783 doing it inline.
2784
2785 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2786 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2787 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2788
2789 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2790 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2791 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2792 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2793 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2794 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2795 vector elements API or simple vector API, as appropriate. Removed
2796 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2797 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2798
2799 * srfi-4.h, srfi-4.c,
2800 srfi-4.i.c (scm_array_handle_uniform_elements,
2801 scm_array_handle_uniform_writable_elements,
2802 scm_uniform_vector_elements,
2803 scm_uniform_vector_writable_elements):
2804 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2805 scm_t_array_handle, deliver length and increment.
2806 (scm_array_handle_<foo>_elements,
2807 scm_array_handle_<foo>_writable_elements): New.
2808
2809 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2810 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2811
2812 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2813 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2814 scm_array_handle_set, scm_array_handle_elements
2815 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2816 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2817 scm_dimensions_to_uniform_array): Deprecated for real.
2818 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2819 snarfing wont allow a mismatch between C and Scheme arglists.
2820 (scm_make_shared_array, scm_enclose_array): Correctly use
2821 scm_c_generalized_vector_length instead of
2822 scm_uniform_vector_length.
2823
2824 * validate.h (SCM_VALIDATE_VECTOR,
2825 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2826 of SCM_VECTORP.
2827
2828 * weaks.h, weaks.c: Use new internal weak vector API from
2829 vectors.h.
2830
2831 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2832 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2833 'extra' to being regular sources.
2834 (noinst_HEADERS): Added quicksort.i.c.
2835 * quicksort.i.c: New file.
2836
2837 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2838 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2839 and reimplemented. Replaced all uses with scm_vector_elements,
2840 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2841 appropriate.
2842 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2843 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2844 SCM_SIMPLE_VECTOR_LOC): New.
2845 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2846 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2847 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2848 Removed.
2849 (scm_vector_copy): New.
2850 (scm_vector_elements, scm_vector_writable_elements): Use
2851 scm_t_array_handle, deliver length and increment. Moved to
2852 unif.h. Changed all uses.
2853 (scm_vector_release_elements,
2854 scm_vector_release_writable_elements,
2855 (scm_frame_vector_release_elements,
2856 scm_frame_vector_release_writable_elements): Removed.
2857 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2858 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2859 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2860 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2861 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2862 weak vectors.
2863
0336d18b
MV
28642004-12-29 Marius Vollmer <mvo@zagadka.de>
2865
2866 No longer use creators to specify the type of an array. Creators
2867 expose the fact that arrays are wrapped around vectors, but that
2868 might change.
2869
2870 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2871 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2872 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2873 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2874 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2875 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2876 uvec_proc_vars): Removed.
2877 (scm_i_generalized_vector_creator): Removed.
2878 (scm_i_generalized_vector_type): New.
2879
2880 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2881 scm_make_typed_array, scm_array_type, scm_list_to_array,
2882 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2883 (scm_array_creator): Removed.
2884 (scm_array_p): Deprecated second PROT argument.
2885 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2886 Deprecated, reimplemented in terms of scm_make_typed_array and
2887 scm_list_to_typed_array.
2888 (scm_i_proc_make_vector, scm_i_proc_make_string,
2889 scm_i_proc_make_bitvector): Removed.
2890 (type_creator_table, init_type_creator_table, type_to_creator,
2891 make_typed_vector): New.
2892 (scm_i_convert_old_prototype): Removed.
2893 (prototype_to_type): New.
2894 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2895 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2896 minor added clarity.
2897 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2898 instead of scm_make_uve.
2899 (tag_creator_table, scm_i_tag_to_creator): Removed.
2900 (tag_to_type): New.
2901 (scm_i_read_array): Use scm_list_to_typed_array instead of
2902 scm_list_to_uniform_array.
2903
277e8472
MV
29042004-12-27 Marius Vollmer <mvo@zagadka.de>
2905
32b26202
MV
2906 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2907 (scm_bitvector_writable_elements): New.
2908 (scm_bitvector_release, scm_bitvector_release_elements):
2909 Renamed former to latter. Added explicit call to
2910 scm_remember_upto_here_1.
2911 (scm_frame_bitvector_release,
2912 scm_frame_bitvector_release_elements): Renamed former to latter.
2913 (scm_bitvector_release_writable_elements,
2914 scm_bitvector_release_writable_elements): New.
2915 Changed all uses as required by the changes above.
2916
2917 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2918 scm_u8vector_elements, etc): Made return value "const".
2919 (scm_uniform_vector_writable_elements,
2920 scm_u8vector_writable_elements, etc): New.
2921 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2922 Renamed former to latter. Added explicit call to
2923 scm_remember_upto_here_1.
2924 (scm_frame_uniform_vector_release,
2925 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2926 (scm_uniform_vector_release_writable_elements,
2927 scm_frame_uniform_vector_release_writable_elements): New. Takes
2928 crown of longest identifier yet.
2929 Changed all uses as required by the changes above.
2930
277e8472
MV
2931 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2932 void.
2933 (scm_is_vector, scm_vector_p, scm_vector_length,
2934 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2935 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2936 scm_vector_move_left_x, scm_vector_move_right_x,
2937 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2938 (scm_vector_elements, scm_vector_release_elements,
2939 scm_vector_frame_release_elements, scm_vector_writable_elements,
2940 scm_vector_release_writable_elements,
2941 scm_vector_frame_release_writable_elements): New.
2942 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2943 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2944
2945 * ramap.c (scm_ramapc, scm_raeql): Use
2946 scm_c_generalized_vector_length instead of
2947 scm_uniform_vector_length.
2948 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2949 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2950
49c51610
MV
29512004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2952
2953 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2954 member for relocating debug frames.
2955 (scm_make_continuation): Set it.
2956
2957 * stacks.c (read_frame, read_frames, scm_make_stack,
2958 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2959 of continuations instead of calculating the offset ourselves.
2960 Relocate 'vect' member of scm_t_debug_frame.
2961
3b2ee265
KR
29622004-12-16 Kevin Ryde <user42@zip.com.au>
2963
2964 * ramap.c (scm_array_map_x): Check for at least one source argument.
2965
e120686a
KR
29662004-12-14 Kevin Ryde <user42@zip.com.au>
2967
2968 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2969 the C code so for the final call to the predicate procedure is a tail
2970 call, per SRFI-13 spec.
2971
680b5237
KR
29722004-12-10 Kevin Ryde <user42@zip.com.au>
2973
2974 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2975 recent revision to the reference manual.
2976
2977 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2978 with "%", C99 says it's well-defined.
2979
2980 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2981 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2982 bother trying to fit scm_from_ulong, not really worth the trouble if
2983 addresses are more than 4 bytes usually.
2984
446d320c
KR
29852004-11-30 Kevin Ryde <user42@zip.com.au>
2986
2987 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2988 arm32. Reported by Greg Troxel.
2989
f2654760
MV
29902004-11-14 mvo <mvo@zagadka.de>
2991
2992 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2993
2994 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2995
d550e35f
MV
29962004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2997
2998 Enclosed arrays are now their own smob. This has been done to
2999 make the code more explicit about them and to prepare for the time
f2654760
MV
3000 when generalized vectors include arbitrary one-dimensional
3001 arrays. (Uptonow, enclosed arrays have been recognized by their
3002 use of an array as their storage 'vector'. When all generalized
3003 vectors are allowed as storage, including one-dimensional arrays,
3004 this will no longer work.)
d550e35f
MV
3005
3006 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
3007 New.
3008 (exactly_one_third, singp): Removed.
3009 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
3010 scm_shared_array_offset, scm_shared_array_increments): Handle
3011 enclosed arrays explicitely.
3012 (scm_array_rank): Likewise. Also, do not return zero for
3013 non-arrays, signal an error instead since arrays with rank zero do
3014 exist.
3015 (scm_i_make_ra): New, for specifying the tag of the new array.
3016 (scm_make_enclosed_array): Use it.
3017 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
3018 (scm_make_shared_array): Use scm_c_generalized_vector_length
3019 instead of scm_uniform_vector_length.
3020 (scm_array_in_bounds_p): Rewritten to be much cleaner.
3021 (scm_i_cvref): New, doing the job of scm_cvref.
3022 (scm_cvref): Use scm_i_cvref.
3023 (scm_array_ref): Do not accept non-arrays when no indices are
3024 given. Use scm_i_cvref to do the actual access.
3025 ("uniform-array-set1"): Do not register.
3026 (scm_array_set_x, scm_uniform_array_read_x,
3027 scm_uniform_array_write): Handle enclosed arrays explicitly.
3028 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
3029 handle enclosed arrays.
3030 (scm_array_to_list): Handle enclosed arrays explicitly.
3031 (rapr1): Removed.
3032 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
3033 enclosed arrays.
3034 (scm_i_print_enclosed_array): New.
3035 (tag_proto_table, tag_creator_table): Renamed former to latter.
3036 Added "a" and "b" for strings and bitvectors, resp.
3037 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
3038 latter. Tag "a" is in the table now, no need to handle it as a
3039 legacy tag.
3040 (scm_raprin1): Just call scm_iprin1.
3041 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
3042 explicitly.
3043 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
3044 Use scm_i_print_array as printer for scm_tc16_array.
3045
2ed34885
MV
30462004-11-10 Marius Vollmer <mvo@zagadka.de>
3047
823086c1
MV
3048 * ramap.c (cind): Changed second arg to be pointer to long instead
3049 of uniform vector.
3050 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 3051 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
3052 (scm_array_index_map_x): Likewise.
3053
3054 * unif.c: Changed all uses of scm_array_prototype to
3055 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
3056 prototype is known.
3057 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
3058 in terms of scm_uniform_vector_read_x and
3059 scm_uniform_vector_write, respectively. Strings and
3060 bitvector support has been dropped.
3061
2ed34885
MV
3062 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
3063 needed files directly. Include config.h, <unistd.h> and <io.h>
3064 when available.
3065 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
3066
2c72f253
MV
30672004-11-09 Marius Vollmer <mvo@zagadka.de>
3068
3069 * gh_data.c (gh_uniform_vector_length): Properly use
3070 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
3071
3cc0a296
MV
30722004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3073
3074 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
3075 New.
3076 (scm_i_uniform_vector_creator): Removed.
3077 (scm_i_generalized_vector_creator): New.
3078 (scm_uniform_vector_length, scm_uniform_element_size): Do not
3079 handle generalized vectors, only uniform numeric vectors.
3080 (alloc_uvec): Do length check here...
3081 (make_uvec): ...but not here.
3082 (coerce_to_uvec): Use new generalized vector functions to handle
3083 all kinds of vectors in one go.
3084
3085 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
3086 remaining scm_tc7_unused tags to get a neatly ordered list.
3087
3088 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
3089 longer handle scm_tc7_bvect bitvectors.
3090
3091 * ramap.c: Use the new generalized vector functions to handle all
3092 vector like things.
3093
3094 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
3095 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
3096 scm_generalized_vector_length, scm_generalized_vector_ref,
3097 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
3098 scm_is_generalized_vector, scm_c_generalized_vector_length,
3099 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
3100 New.
3101
3102 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
3103 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
3104 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
3105 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
3106 scm_c_bitvector_length, scm_c_bitvector_ref,
3107 scm_c_bitvector_set_x, scm_bitvector_elements,
3108 scm_bitvector_release, scm_frame_bitvector_release,
3109 scm_tc16_bitvector, bitvector_free, bitvector_print,
3110 bitvector_equalp, count_ones, find_first_one): New.
3111 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
3112 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
3113 using the new C API for bitvectors and maybe count_ones or
3114 find_first_one, as appropriate.
3115 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
3116 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
3117 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
3118 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
3119 new functions from above.
3120 (scm_i_proc_make_vector, scm_i_proc_make_string,
3121 scm_i_proc_make_bitvector): Made non-static for use in
3122 scm_i_generalized_vector_creator.
3123 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
3124 (scm_make_uve): Validate that the created object is a generalized
3125 vector.
3126 (scm_i_legacy_tag): Removed.
3127 (scm_i_print_array): Do it here.
3128 (scm_raprin1): Only print enclosed arrays.
3129
3130 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
3131
c24d026b
MV
31322004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3133
1f2328fe
MV
3134 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
3135 added portability.
3136
3137 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
3138 for "space". Thanks to Bruce Korb!
3139
c24d026b
MV
3140 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
3141 only after dest has been set. Thanks to Hyper Division!
3142
3143 * gh_data.c (gh_uniform_vector_length): Use
3144 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
3145
d4ea47c8
MV
31462004-11-03 Marius Vollmer <mvo@zagadka.de>
3147
3148 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
3149 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
3150 SCM_SET_UVECTOR_LENGTH): Removed.
3151
236288e2
MV
31522004-11-02 Marius Vollmer <mvo@zagadka.de>
3153
9a5fa6e9 3154 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
3155 Thanks!
3156
3157 * backtrace.c (scm_display_backtrace_with_highlights): Join the
3158 first and the second line of the SCM_DEFINE macro call, since old
3159 preprocessors cannot handle definitions that are split into two
3160 lines.
3161
3162 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
3163 declarations.
3164
3165 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
3166 scm_t_uint32 to fix the mismatch between the function declaration
3167 and definition.
3168
3169 * sort.c (quicksort): Don't use C99 variable declarations.
3170
3171 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
3172 SCM_BOOL_F if no type matches.
3173
3174 * threads.c (thread_print): Cast a pointer to size_t when printing
3175 with scm_uintprint.
3176
3177 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
3178 defined.
3179 (scm_array_prototype): Deprecated.
3180
f738b51d
MV
31812004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3182
5d1015ec
MV
3183 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
3184 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
3185 more efficient access to the u32vector.
3186
034486df
MV
3187 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
3188 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
3189 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
3190
3191 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
3192 instead of the old-style dvectors.
3193
3194 * gh_data.c: Use new-style uniform arrays in place of old-style
3195 ones.
3196
3197 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3198 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3199
3200 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3201 instead of old-sytle uvectors.
3202
3203 * convert.c, convert.i.c: Rewritten completely, using
3204 scm_any_to_u8vector, etc and other new-style uniform vector
3205 functions.
3206
3207 * random.c (scm_random_solid_sphere_x,
3208 scm_random_hollow_sphere_x): Do not validate vector argument, this
3209 is already done elsewhere.
3210
3211 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3212 scm_any_to_u8vector, etc): New.
3213 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3214 longer handle old-style uniform vectors.
3215
f738b51d
MV
3216 * read.c (scm_lreadr): Bugfix: include the last bit in the
3217 bit vector.
3218
5e9c05a1
MV
32192004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3220
327114a2
MV
3221 * unif.h, unif.c (scm_array_creator): New.
3222 (scm_i_get_old_prototype): New.
3223 (scm_array_prototype): use it to return old-style prototype, never
3224 return creators.
3225 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3226 arg of SCM_UNDEFINED. The latter is wrong.
3227
5e9c05a1
MV
3228 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3229 (make_uve): Removed.
3230 (scm_i_proc_make_vector, scm_i_proc_make_string,
3231 scm_i_proc_make_u1vector): New.
3232 (scm_init_unif): Initialize them.
3233 (scm_i_convert_old_prototype): New.
3234 (scm_make_uve): Use it to get the creator procedure. Removed all
3235 old code that created old-style uniform vectors.
3236 (scm_array_p): Handle generic vectors.
3237 (scm_dimensions_to_uniform_array): Do not fill new array with
3238 prototype when that is a procedure.
3239 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3240 the NDIM argument.
3241 (scm_i_print_array): Print rank for shared or non-zero-origin
3242 vectors.
3243 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3244 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3245 which I do not understand yet.
3246 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3247
5e9c05a1
MV
3248 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3249 (iflo2str): Use icmplx2str for complex numbers.
3250
3251 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3252 scm_i_uniform_vector_prototype): Removed.
3253 (scm_i_uniform_vector_creator): New.
3254 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3255 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3256 Updated all tables and generic functions to support them.
3257 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3258 (scm_init_srfi_4): Initialize them.
3259
3260 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3261 sizeof(CTYPE) as explained in the comment.
3262
3263 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3264 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3265 'i' and 'e' between introducing numbers and uniform vectors. Do
3266 not call scm_i_read_homogenous_vector, since that is also handled
3267 by scm_i_read_array now.
3268
f984af07
MV
32692004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3270
3271 First cut at integrating uniform vectors from srfi-4 with the rest
3272 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3273 vector. The plan is to gradually replace one type after the other
3274 until none is left and then to consider general cleanups and
3275 optimizations.
3276
3277 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3278
3279 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3280 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3281 scm_uniform_vector_to_list, scm_is_uniform_vector,
3282 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3283 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3284 scm_uniform_vector_release): New.
3285 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3286 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3287 from unif.h, unif.c and extended to handle both the old and new
3288 uniform vectors.
3289
3290 * tags.h (scm_tc7_byvect): Commented out.
3291
3292 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3293 the former to the latter.
3294 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3295 srfi-4.h, srfi-4.c.
3296 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3297 (scm_array_p, scm_array_rank, scm_array_dimensions,
3298 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3299 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3300 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3301 vectors. Removed code for scm_tc7_byvect.
3302 (scm_dimensions_to_uniform_array): Fill array with 0 when
3303 prototype is #\nul.
3304 (scm_i_print_array_dimension, scm_i_legacy_tag,
3305 scm_i_print_array): New.
3306 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3307 for scm_tc7_byvect.
3308
3309 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3310 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3311 uniform vectors. Removed code for scm_tc7_byvect
3312
3313 * print.c (iprin1): Removed code for scm_tc7_byvect.
3314 * objects.c (scm_class_of): Likewise.
3315 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3316 * gc-card.c (scm_i_sweep_card): Likewise.
3317 * evalext.c (scm_self_evaluating_p): Likewise.
3318 * eq.c (scm_equal_p): Likewise.
3319
3320 * gh_data.c (gh_chars2byvect): Reimplemented with
3321 scm_make_s8vector.
3322 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3323
3324 * srfi-4.c (take_uvec): New.
3325 (alloc_uvec): Use it.
3326 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3327
3328 * random.c (vector_scale, vector_scale_x): Renamed former to the
3329 latter, since it modifies its argument.
3330 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3331 Do not use scm_universal_vector_length for non-uniform vectors.
3332 Use scm_f64vector_elements to access innards of uniform vectors.
3333
3334 * convert.i.c: Convert srfi-4 style uniform vectors when
3335 requested.
3336 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3337 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3338
79d52182
MV
33392004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3340
3341 * numbers.h, numbers.c (scm_i_print_double): New.
3342
3343 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3344 ../srfi/ but heavily modified.
3345 * Makefile.am: Add them in all the right places.
3346 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3347 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3348 '#u', and '#s'.
3349
3350 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3351 and made non-static. Changed all uses.
3352
6191ccec
MV
33532004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3354
e64e80b0
MV
3355 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3356 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3357 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3358 scm_uintprint to print unsigned integers, raw heap words, and
3359 adresses, using a cast to scm_t_bits to turn pointers into
3360 integers.
3361
3362 * unif.c: Include "libguile/print.h".
3363
c90ac3a8
MV
3364 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3365 scm_t_intmax values.
3366 (scm_uint2str): New, for scm_t_uintmax.
3367 (scm_iint2str): Argument type changed to scm_t_intmax,
3368 reimplemented in terms of scm_uint2str.
3369
3370 * print.c, print.h (scm_uintprint): New, for printing
3371 scm_t_uintmax values.
3372 (scm_intprint): Argument type changed to scm_t_intmax.
3373
77c2594f
MV
3374 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3375 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3376 strategic places so that the loops can be interrupted.
3377
6191ccec
MV
3378 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3379 "-I$(top_srcdir)/libguile-ltdl".
3380 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3381 "../libguile-ltdl/libguile-ltdl.a".
3382
3383 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3384 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3385 instead of <libguile-ltdl.h>.
3386
77600f3e
MV
33872004-10-20 Marius Vollmer <mvo@zagadka.de>
3388
3389 * sort.c (quicksort): Copy pivot out of the array while
3390 constructing the partitions; it could get overwritten otherwise.
3391 Because of the ultimate insertion sort, this bug did not cause
3392 quicksort to fail, it just put all the burdon on the insertion
3393 sort and was thus very slow. Thanks to Rolan Orre for reporting
3394 the slowness!
3395
5000379b
MV
33962004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3397
192cd792
MV
3398 * numbers.c (scm_i_range_error): New.
3399 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3400 scm_out_of_range.
3401
3402 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3403 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3404
3405 * unif.c (scm_array_p): When no prototype is given, explicitely
3406 test for allowable types, do not simply return true. Thanks to
3407 Roland Orre for reporting this!
3408
5000379b
MV
3409 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3410
3411 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3412 segment to scm_max_segment_size.
3413
497eb0b7
HWN
34142004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3415
1367aa5e
HWN
3416 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3417
497eb0b7
HWN
3418 * inline.h (scm_double_cell): abort if GC running.
3419 (scm_cell): idem.
3420
aef0bdb4
MV
34212004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3422
3423 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3424 pos == 0.
3425
3426 Keywords no longer store a 'dash symbol'. Instead, they store a
3427 symbol with their real name.
3428
3429 * keywords.h, keywords.c, deprecated.h, deprecated.c
3430 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3431 terms of scm_is_keyword and scm_keyword_dash_symbol.
3432
3433 * keywords.h, keywords.c, discouraged.h, discouraged.c
3434 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3435 scm_c_make_keyword): Discouraged.
3436
3437 * keywords.h, keywords.c (scm_symbol_to_keyword,
3438 scm_keyword_to_symbol): Implemented in C.
3439 (scm_is_keyword, scm_from_locale_keyword,
3440 scm_from_locale_keywordn): New.
3441
3442 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3443
3444 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3445 scm_from_locale_keyword instead of scm_c_make_keyword.
3446
3447 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3448 better error message.
3449
3450 * deprecated.c: Include discouraged.h and keywords.h.
3451
3452 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3453 reading '#:' or ':'. See NEWS for consequences.
3454
818deb11
MV
34552004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3456
43c25626
MV
3457 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3458 literals are now read-write again (until SCM_STRING_CHARS is
3459 removed).
3460
3461 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3462 strings with an error message that blames SCM_STRING_CHARS.
3463
3464 * options.c (change_option_setting): Use scm_car instead of
3465 explicit type check plus SCM_CAR.
3466
3467 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3468 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3469 (scm_iprin1): Use them instead of the previoulsy hardcoded
3470 strings.
3471 (scm_init_print): Initialize them.
3472
3473 * backtrace.c (display_frame_expr): Do not remove control
3474 characters from the final string. Print it directly using
3475 scm_display.
3476
818deb11
MV
3477 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3478 Thanks to Roland Orre!
3479
d748089e
KR
34802004-09-29 Kevin Ryde <user42@zip.com.au>
3481
3482 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3483 be whole original string in match struct, not offsetted substring.
3484
0ff7e3ff
HWN
34852004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3486
3487 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3488
ad7de4b8
MV
34892004-09-24 Marius Vollmer <mvo@zagadka.de>
3490
2edf319f
MV
3491 * Makefile.am (EXTRA_DIST): Added gettext.h.
3492
d180337b
MV
3493 * smob.c, smob.h (scm_assert_smob_type): New.
3494
05d7cf89 3495 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3496 Include GUILE_CFLAGS.
3497 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3498 now.
3499 (libpath.h): Put GUILE_CFLAGS in the build-info.
3500
c9fedf8a
MV
35012004-09-23 Marius Vollmer <mvo@zagadka.de>
3502
3503 * print.h (scm_print_state): Added highlight_objects.
3504 * print.c (make_print_state, scm_free_print_state): Initialize it
3505 to SCM_EOL.
3506 (scm_iprin1): Wrap output in '{...}' when object is contained in
3507 highlight_objects.
3508
3509 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3510 scm_backtrace_with_highlights): New. Set highlight_objects of
3511 printstate.
3512
3513 * error.c (scm_error_scm): Document new meaning of data/rest
3514 argument for out-of-range and wrong-type-arg errors.
3515 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3516 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3517 exception so that it gets highlighted in the backtrace.
3518 Don't talk about "argument" when not giving a position.
3519
3520 * throw.c (handler_message): The rest argument is the fourth
3521 argument, not everything after the third. Call
3522 scm_display_backtrace_with_highlights, passing the rest argument
3523 when appropriate.
3524
d5ac9b2a
MV
35252004-09-22 Marius Vollmer <mvo@zagadka.de>
3526
3527 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3528 <bruno@clisp.org>:
3529
3530 * i18n.c: Handle --disable-nls (thanks Bruno).
3531
3532 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3533 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3534
3535 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3536 LC categories.
05d7cf89 3537 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3538
3539 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3540 scm_bind_textdomain_codeset): Make wrappers similar to C function
3541 they wrap.
3542
3543 * i18n.h: New file.
3544 * i18n.c: New file.
3545 * gettext.h: New file, taken from GNU gettext.
3546 * init.c: Include libguile/i18n.h.
3547 (scm_init_guile_1): Add call to scm_init_i18n().
3548 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3549 (DOT_X_FILES): Add i18n.x.
3550 (DOT_DOC_FILES): Add i18n.doc.
3551 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3552 (modinclude_HEADERS): Add i18n.h.
3553
d2e53ed6
MV
35542004-09-22 Marius Vollmer <mvo@zagadka.de>
3555
2cdfe016
MV
3556 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3557
d2e53ed6
MV
3558 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3559 discouraged.h. Replaced all uses with scm_is_pair.
3560 (SCM_I_CONSP): New name for SCM_CONSP.
3561
3562 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3563 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3564 scm_cadr, etc): New.
3565 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3566 uses with scm_is_null.
5dd82006 3567
d2e53ed6
MV
3568 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3569 instead of explicit code.
5dd82006 3570
5dfdf243
MV
35712004-09-22 Marius Vollmer <mvo@zagadka.de>
3572
b50c53e5
MV
3573 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3574 Reworded logic a bit so that #f is returned immediately when s1 is
3575 too short to contain s2.
3576
5dfdf243 3577 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3578 zero-terminated locale string before matching against it.
5dfdf243
MV
3579
3580 * strings.h, strings.c (scm_substring_read_only,
3581 scm_c_substring_read_only, scm_i_substring_read_only): New.
3582 (RO_STRING_TAG, IS_RO_STRING): New.
3583 (scm_i_string_writable_chars): Bail on read-only strings.
3584
3585 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3586 literals, thus making them read-only as specified by R5RS.
3587
22ab5ba3
MV
35882004-09-22 Marius Vollmer <mvo@zagadka.de>
3589
3590 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3591 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3592
2663421c
MV
35932004-09-21 Marius Vollmer <mvo@zagadka.de>
3594
0d83cb90
MV
3595 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3596 numbers.c.
3597 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3598 Thanks to Andreas Vögele!
0d83cb90 3599
2663421c
MV
3600 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3601 just on a line of its own.
3602
3603 * srfi-13.c (scm_string_any, scm_string_every,
3604 scm_string_tabulate, string_upcase_x, string_down_case_x,
3605 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3606 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3607 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3608 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3609 indices, which can also be negative.
3610
b00b73f9
MV
36112004-09-20 Marius Vollmer <mvo@zagadka.de>
3612
3613 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3614
3615 * threads.c (scm_threads_mark_stacks): Call
3616 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3617 only used once.
3618
adba74f3
HWN
36192004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3620
05d7cf89 3621 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3622 Bugfix: when subtracting unsigned values, make sure that result
3623 does not wrap.
3624
f6de32c8
KR
36252004-09-09 Kevin Ryde <user42@zip.com.au>
3626
3627 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3628 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3629 by Andreas Vögele.
f6de32c8 3630
e548be5f
MV
36312004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3632
eb8d0af1
MV
3633 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3634
e548be5f
MV
3635 * eq.c (real_eqv): Pretend that all NaNs are equal.
3636
3637 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3638
e7acba81
MV
36392004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3640
874fbad1
MV
3641 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3642 use size_t for some locals instead of int.
3643
e7acba81
MV
3644 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3645 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3646 (skip_scsh_block_comment): Use scm_input_error instead of
3647 scm_misc_error in case of EOF.
3648
5de12658
KR
36492004-09-07 Kevin Ryde <user42@zip.com.au>
3650
3651 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3652 Bug report by Bill Schottstaedt.
3653
3654 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3655 column.
3656 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3657
3658 * posix.c (scm_access): Update docstring per manual.
3659
3660 * posix.c (scm_nice): Correction to error detection. Reported by
3661 Matthias Koeppe.
3662
3663 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3664 throw error before unlocking mutex with SCM_ALLOW_INTS.
3665
e227addf
KR
36662004-09-06 Kevin Ryde <user42@zip.com.au>
3667
3668 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3669 available. This also gets around CLK_TCK being absent when
3670 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3671
edea856c
SJ
36722004-09-03 Stefan Jahn <stefan@lkcc.org>
3673
3674 * threads.c (scm_threads_mark_stacks): Fixed local variable
3675 definitions.
3676
e7acba81 3677 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3678 local variable definitions.
3679
3680 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3681 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3682 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3683 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3684 scm_makfrom0str().
3685
874fbad1 3686 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3687 part.
3688
3689 * numbers.c (scm_init_numbers): Removed check_sanity() call
3690 inside GUILE_DEBUG. The function has been removed somewhen...
3691
3692 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3693 MinGW32 because it conflicts with its pthread headers.
3694
d9eb2d67
MV
36952004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3696
3697 * strings.c (SCM_STRINGP): Accept all strings.
3698 (SCM_STRING_CHARS): Reject shared substrings here.
3699
3700 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3701 the Copyright years.
3702
c495c342
KR
37032004-08-27 Kevin Ryde <user42@zip.com.au>
3704
3705 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3706 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3707 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3708
57aa5515
MV
37092004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3710
3711 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3712 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3713 scm_i_symbol_is_interned, scm_i_mem2symbol,
3714 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3715
ce25760f
MV
37162004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3717
19ff6ffc
MV
3718 * srfi-13.c: First cut at thread-safeness and proper use of
3719 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3720 been inserted. Made sure that no internal string pointer is used
3721 across a SCM_TICK or a possible GC.
3722
ce25760f
MV
3723 * script.c (scm_compile_shell_switches): Use
3724 scm_from_locale_string instead of scm_makfrom0str.
3725
3726 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3727 always been.
3728
c5080b51
MV
37292004-08-25 Marius Vollmer <mvo@zagadka.de>
3730
3731 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3732 strop.c.
3733
3734 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3735 * strop.h, strop.c: Removed, they are now empty.
3736 * Makefile.am: Updated for new and removed files.
3737
3738 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3739 to scm_string_to_symbol.
3740
3741 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3742 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3743 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3744 charset instead of libc functions.
3745
3746 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3747 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3748 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3749 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3750 instead of explicit code.
3751
3752 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3753 "srfi-13.h" instead of "strop.h".
3754
3755 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3756 scm_init_srfi_14. Do not call scm_init_strop.
3757
4b0d27f2
MV
37582004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3759
3760 * numbers.c (scm_inf_p): Synced docstring back from manual.
3761
3ece39d6
MV
37622004-08-22 Marius Vollmer <mvo@zagadka.de>
3763
3764 * strings.c (get_str_buf_start): New helper function.
3765 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3766 scm_i_string_char, scm_i_string_writable_chars): Use it.
3767 (scm_i_substring_copy): Make START argument optional for C
3768 callers, for upcoming SRFI-13 integration.
3769
37702004-08-21 Marius Vollmer <mvo@zagadka.de>
3771
3772 From Richard Todd, Thanks!
3773
3774 * script.c (scm_compile_shell_switches): added '-L' switch to add
3775 to the %load-path.
3776
5fa0939c
DH
37772004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3778
3779 * eval.c (unmemoize_exprs): When dropping internal body markers
3780 from the output during unmemoization, also drop those that are not
3781 immediately at the beginning of a body.
3782
2146fdeb
MV
37832004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3784
c1f54b3d
MV
3785 * eval.c (scm_lookupcar1): Report "Variable used before given a
3786 value" insetad of an "Unbound" one for variables that are found
3787 but still contain SCM_UNDEFINED.
2146fdeb
MV
3788
3789 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3790 expects a null-terminated string in the locale encoding, but
3791 scm_i_string_writable_chars doesn't give that. Fixed by letting
3792 mkstemp modify a locale version of the tmpl argument and copying
3793 the result back into tmpl.
3794
3795 * strop.c (scm_substring_move_x): Store into str2, not str1.
3796
d4f76919
KR
37972004-08-20 Kevin Ryde <user42@zip.com.au>
3798
3799 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3800 to modify the input string.
3801
b5247a6b
MV
38022004-08-19 Marius Vollmer <mvo@zagadka.de>
3803
3804 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3805 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3806 scm_c_symbol_length.
3807
f26b9395
MV
38082004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3809
3810 New string implementation, with copy-on-write strings and
3811 mutation-sharing substrings, and a new internal string API.
3812 Symbols can now share memory with strings.
3813
3814 * tags.h (scm_tc7_stringbuf): New tag.
3815
3816 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3817 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3818 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3819 uses.
3820 (scm_i_make_string, scm_c_make_string): New, to replace
3821 scm_allocate_string. Updated all uses.
3822 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3823 SCM_STRING_LENGTH): Deprecated.
3824 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3825 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3826 Discouraged. Replaced all uses with scm_from_locale_string or
3827 similar, as appropriate.
3828 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3829 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3830 scm_substring_shared, scm_substring_copy): New.
3831
3832 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3833 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3834 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3835 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3836 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3837 Deprecated.
3838 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3839 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3840 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3841 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3842 Updated all uses.
3843 (scm_gensym): Generate only the number suffix in the buffer, just
3844 string-append the prefix.
3845
3846 * error.c (scm_memory_error): Do not try to throw, just abort.
3847 Throwing will not work anyway.
3848
3849 * gh.h, gh-data.c (gh_set_substr): Made src const.
3850
3851 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3852 (scm_mode_bits): Use it.
3853 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3854 a vector normally and fill that instead of consing a list with a
3855 blocked GC.
3856
3857 * read.c (scm_i_casei_streq): New, for counted strings.
3858
3859 * threads.c (gc_section_count): Removed, thread-sleeping can not
3860 be nested.
3861 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3862 admin mutex so that we can be put to sleep by other threads while
3863 blocking on that mutex. Lock all the heap mutex of all threads,
3864 including ourselves.
3865 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3866 call scm_i_enter_guile.
3867 (scm_thread_mark_stacks): Expect all threads to be suspended.
3868
3869 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3870 scm_gc_mallocated, for now.
3871 (scm_init_storage): Initialize it.
3872 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3873
3874 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3875 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3876 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3877 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3878
cd505b38
MV
3879 * strop.c (scm_string_copy): Use scm_c_substring to get a
3880 copy-on-write string.
3881
8a807b26
KR
38822004-08-18 Kevin Ryde <user42@zip.com.au>
3883
3884 * arbiters.c (FETCH_STORE): New macro.
3885 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3886 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3887 scm_try_arbiter and scm_release_arbiter.
3888 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3889 for speed on i386, otherwise using mutex.
3890
3891 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3892 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3893 exact and inexact is #f.)
3894
3895 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3896 to get thread safety of scm_ttyname.
3897
3898 * ports.c (ttyname): Remove prototype, unused.
3899
d6cd4c36 3900 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3901 Reported by Michael Tuexen.
d6cd4c36 3902
fa0c0a4b
MV
39032004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3904
3905 * load.c (scm_init_load_path): Do not pass NULL to
3906 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3907 not set. Thanks to Bill Schottstaedt.
3908
70f7ee41
MV
39092004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3910
3911 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3912 locale strings instead of accessing their internals.
3913 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3914 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3915 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3916
3917 * simpos.c (scm_system): Convert SCM strings to locale strings
3918 instead of accessing their internals.
3919
3920 * script.c (scm_compile_shell_switches): Convert version to locale
3921 string before printing it.
3922
3923 * rdelim.c (scm_read_delimited_x): Avoid
3924 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3925 of scm_from_long for the returned number of read characters.
3926
3927 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3928 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3929
3930 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3931 Use them instead of SCM_SYSCALL when one or two strings need to be
3932 converted into locale strings.
3933 (my_rename): New, gathers platform dependent code for renaming.
3934 (scm_rename): Use it.
3935 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3936 strings instead of accessing their internals.
3937 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3938 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3939 SCM_STRING_LENGTH.
3940
3941 * extensions.c (load_extension): Convert lib and init to locale
3942 strings instead of accessing the internals directly.
3943 (scm_c_load_extension): Use scm_from_locale_string instead of
3944 scm_makfrom0str.
3945
3946 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3947 scm_fdes_to_port, but take mode bits directly instead of as a C
3948 string.
3949 (scm_i_fdes_to_port): Implement using above.
3950 (scm_open_file): Use scm_i_fdes_to_port together with
3951 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3952 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3953 with scm_i_mode_bits to avoid accessing internals of SCM string
3954 from C.
3955
3956 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3957 SCM string as argument.
3958
3959 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3960 bits directly instead of C string.
3961 (scm_void_port): Implement using above.
3962 (scm_sys_make_void_port): Use scm_i_void_port together with
3963 scm_i_mode_bits to avoid accessing internals of SCM string.
3964
3965 * strings.h, strings.c (scm_i_get_substring_spec): New.
3966
3967 * socket.c, rw.c, deprecated.h, validate.h
3968 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3969 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3970 scm_to_locale_string, etc.
3971 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3972 above, plus scm_i_get_substring_spec.
3973
3974 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3975 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3976 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3977 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3978 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3979 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3980 with more explicit scm_remember_upto_here_1, etc, or introduced
3981 them in the first place.
3982
3983 * posix.c (WITH_STRING): New helper macro. Use it where one
3984 locale string is needed for a short piece of code.
3985 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3986 when one locale string is needed.
3987 (scm_mkstemp): Convert tmpl to a locale string.
3988 (scm_putenv): Rewritten to use only C strings.
3989 (scm_setlocale, scm_crpt): Convert argument strings to locale
3990 strings.
3991
39922004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3993
3994 * load.c (scm_primitive_load_path): Do not check for absolute
3995 filenames when scm_sys_search_load_path returns false, which will
3996 return absolute filenames unchanged.
3997
bb26cc2d
MV
39982004-08-11 Marius Vollmer <mvo@zagadka.de>
3999
4000 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
4001 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
4002 of an alist. Thanks to Matthias Koeppe!
4003
02573e4c
MV
40042004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4005
4006 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
4007 Moved from string.h to deprecated.h.
4008
4009 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
4010
f9751e86 4011 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
4012 SCM_I_MAKE_STRING_TAG, changed all uses.
4013 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
4014 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
4015 respectively. For a short time, the old names are still there as
4016 aliases. Not all uses have been changed yet, but the ones in
4017 strings.c have.
4018 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
4019 SCM_T_BITS_MAX.
4020 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
4021 scm_take_locale_string, scm_take_locale_stringn,
4022 scm_to_locale_string, scm_to_locale_stringn,
4023 scm_to_locale_stringbuf): New.
4024 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
4025 deprecated.[hc]. Implemented in terms of the new functions above.
4026 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
4027 scm_makfrom0str): Reimplemented in terms of the new functions from
4028 above. They will be discouraged shortly.
4029 (scm_substring): Do not use scm_mem2string.
4030 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
4031 to replace similar code from posix.c, simpos.c, and dynl.c.
4032 (scm_string_append): Use memcpy instead of explicit loop. Do not
4033 use register keyword. Use plain 'char' instead of 'unsigned
4034 char'.
4035
4036 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
4037 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
4038
4039 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
4040 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4041 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
4042 not as a pointer. Use scm_remember_upto_here_1 to protect it.
4043
4044 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
4045 string. This avoids a conversion round-trip.
4046
4047 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
4048 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4049 SCM_I_STRING_LENGTH, respectively.
4050 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
4051
4052 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
4053 of a string, call scm_display on the string itself.
4054
4055 * dynwind.c, dynwind.h (scm_frame_free): New.
4056
4057 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
4058 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
4059 Replaced uses of SCM_STRING_CHARS with proper uses of
4060 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
4061 Replaced scm_mem2string with scm_from_locale_string.
4062
4063 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
4064 Removed, replaced all uses with scm_i_allocate_string_pointers.
4065
4066 * load.h, load.c (scm_internal_parse_path): Removed.
4067 (scm_parse_path): Use scm_string_split to do the work.
4068 (scm_init_load_path): Use scm_parse_path instead of
4069 scm_internal_parse_path.
4070 (scm_search_path): Rewritten string handling part of the code in
4071 terms of scm_to_locale_stringbuf and so that it is thread safe.
4072
4073 * error.c (scm_error_scm): Throw directly instead of calling
4074 scm_error, this avoids the back and forth conversion of SUBR and
4075 MESSAGE and also plugs a memory leak.
4076 (scm_error): Call scm_error_scm.
4077
4078 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
4079 (display_header): Print FNAME when it is true, not
4080 merely when it is a string.
4081
4082 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
4083 unceremoniously. They were unused by Guile itself, and external
4084 use should stop immediately.
4085
4086
409eb4e5
MV
40872004-08-10 Marius Vollmer <mvo@zagadka.de>
4088
4089 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
4090 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
4091 deprecated versions installed in deprecated.h and deprecated.c.
4092 Changed all uses.
4093
a00eaf19
RB
40942004-08-06 Rob Browning <rlb@defaultvalue.org>
4095
4096 * net_db.c (scm_resolv_error): don't cause an exception while
4097 trying to throw an exception -- call scm_misc_error with correct
4098 arguments. The previous arguments needed a format escape that
4099 wasn't in any of the format strings.
4100
bcb88c93
KR
41012004-08-06 Kevin Ryde <user42@zip.com.au>
4102
8f094b97
KR
4103 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
4104 so as not to depend on signedness of plain char. For byvect range
4105 check, throw out-of-range rather than wrong-type-arg.
4106
bcb88c93
KR
4107 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
4108 signed byte range checks by using scm_to_schar and scm_from_schar,
4109 don't want to depend on signedness of C char.
4110
29e61124
KR
41112004-08-05 Kevin Ryde <user42@zip.com.au>
4112
4113 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
4114 SCM_DEFER_INTS.
4115 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
4116 guaranteed if multiple threads compete to unlock.
4117 Update docstrings per doc/ref/api-scheduling.texi.
4118
99de794f
KR
4119 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
4120 stat on the filename, to be certain a file rename can't mean we get
4121 info on one filesystem object but open another. This fstat usage is
4122 similar to Emacs copy-file.
4123
29e61124
KR
4124 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
4125
4126 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
4127 SIGINT and SIGQUIT, since those values are ints.
4128
759aa8f9
MV
41292004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4130
7241f213
MV
4131 * num2integral.i.c, num2float.i.c: Removed.
4132 * Makefile.am (noinst_HEADERS): Updated.
4133
f9656a9f
MV
4134 * numbers.h. numbers.c (scm_make_ratio): Renamed to
4135 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
4136 (scm_complex_p): New, export as "complex?" to Scheme.
4137 (scm_number_p): Export as "number?" to Scheme.
4138 (scm_is_complex, scm_is_number): New.
4139 (scm_c_make_rectangular, scm_c_make_polar): New.
4140 (scm_make_rectangular, scm_make_polar): Use above.
4141 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
4142 New.
4143 (scm_make_complex): Discouraged by moving to discouraged.h and
4144 discouraged.c. Replaced all uses with scm_c_make_rectangular.
4145
759aa8f9
MV
4146 * discouraged.h, discouraged.c, numbers.c, numbers.h
4147 (scm_is_rational): New.
4148 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
4149 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
4150 Removed prototypes.
4151 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
4152 Discouraged by moving to discouraged.h and discouraged.c.
4153 Replaced all uses with scm_from_double.
4154 (scm_num2float, scm_num2double): Discouraged by moving prototype
4155 to discouraged.h and rewriting in terms of scm_to_double.
4156 Replaced all uses with scm_to_double.
4157 (scm_to_double): Do not implement in terms of scm_num2dbl, use
4158 explicit code.
4159 (scm_from_double): Do not implement in terms of scm_make_real, use
4160 explicit code.
4161
531bf3e6
MV
41622004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4163
759aa8f9
MV
4164 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
4165
531bf3e6
MV
4166 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
4167 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
4168
4169 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
4170 Renamed to SCM_I_* in order to avoid collisions with the versions
4171 defined in deprecated.h.
4172
4173 * discouraged.h, discouraged.c: New files.
4174
4175 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
4176 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
4177 deprecated to being discouraged by moving to discouraged.h.
4178
4179 * numbers.h, numbers.c, discouraged.h, discouraged.c
4180 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
4181 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
4182 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
4183 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
4184 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
4185 scm_num2ulong_long): Discouraged by moving to discouraged.h and
4186 discouraged.c and reimplementing in terms of scm_from_* and
4187 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
4188 functions.
4189
4190 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
4191 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
4192 scm_i_size2big, scm_i_ptrdiff2big): Removed.
4193 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
4194 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4195 explicit code.
4196
5ec82e96
KR
41972004-08-02 Kevin Ryde <user42@zip.com.au>
4198
4199 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4200 and current usage and migration.
4201
58f28989
KR
42022004-07-31 Kevin Ryde <user42@zip.com.au>
4203
4204 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4205 it's not thread safe.
4206 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4207 advantage of this.
4208 * fports.c (scm_open_file): Use scm_strerror likewise.
4209 * filesys.c (scm_stat, scm_lstat): Ditto.
4210
4211 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4212 cannot be opened.
4213
4214 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4215 update, for thread safety.
4216 (gensym_counter): Move into scm_gensym which is its only user.
4217 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4218
03696aab
MV
42192004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4220
51fdb325
MV
4221 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4222 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4223 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4224 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4225 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4226 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4227 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4228 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4229 defined in terms of scm_to_signed_integer, etc, but in terms of
4230 scm_to_int8, etc.
4231
4232 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4233
03696aab
MV
4234 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4235 no longer used.
4236
4237 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4238 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4239
4240 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4241 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4242 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4243 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4244 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4245 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4246 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4247
4248 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4249 the functions below.
4250
4251 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4252 conv-uinteger.i.c.
4253
4254 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4255 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4256 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4257 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4258 scm_from_uint64): Turned from macros into proper functions.
4259 (scm_to_signed_integer, scm_to_unsigned_integer,
4260 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4261 conv-integer.i.c and conv-uinteger.i.c, as well.
4262
4263 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4264 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4265 the limits. Those are always defined.
4266
1f15779e
KR
42672004-07-29 Kevin Ryde <user42@zip.com.au>
4268
4269 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4270
48360eb3
KR
42712004-07-28 Kevin Ryde <user42@zip.com.au>
4272
4273 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4274 safety.
4275
c3f3c841
KR
4276 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4277 consistency with other vector types and to get arg and func name into
4278 error message.
4279
c82f8ed6
MV
42802004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4281
4282 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4283 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4284 scm_from_bool, respectively.
4285 (SCM_NINUMP): Added.
4286
4287 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4288 deprecated.h. Replaced all uses with scm_is_eq.
4289
317b4c4a
KR
42902004-07-24 Kevin Ryde <user42@zip.com.au>
4291
4292 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4293 * posix.c (scm_crypt): Use it to protect static data in crypt().
4294
e11e83f3
MV
42952004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4296
4297 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4298 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4299 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4300 versions to deprecated.h and deprecated.c. Changed all uses to
4301 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4302 scm_from_*, as appropriate.
4303
4304 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4305 the unexisting scm_cross_dynwind_binding_scope for inums on the
4306 windlist.
4307
a55c2b68
MV
43082004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4309
4310 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4311 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4312 byte-wise address to a SCM integer. Changed all uses.
4313 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4314 scm_to_ipv6 and added type and range checking, for converting from
4315 an IPv& byte-wise address to a SCM integer. Changed all uses.
4316 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4317 is now done by scm_to_ipv6.
4318
4319 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4320 not accept inexact integers.
4321
4322 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4323 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4324 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4325 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4326 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4327 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4328 fixnum/bignum distinction visible. Changed all uses to
4329 scm_to_size_t or similar.
4330
43312004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4332
4333 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4334
48a06bd5
KR
43352004-07-10 Kevin Ryde <user42@zip.com.au>
4336
4337 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4338 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4339 such a size causes divide-by-zeros in scm_hasher.
4340
052fbfd9
KR
4341 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4342 leak.
4343
43240c9c
MV
43442004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4345
4346 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4347 Rewritten using the same logic as scm_to_signed_integer and
4348 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4349 use CHAR_BIT instead of hardcoding 8.
4350 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4351 SCM_I_LLONG_MIN etc. instead.
4352
4353 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4354 SCM_I_MAKINUM and changed all uses.
4355 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4356
a3de8e7b
MV
4357 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4358 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4359 them by assuming twos-complement.
4360
c9eb03bb
MV
43612004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4362
4363 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4364 configure now produces.
4365 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4366 definitions, giving the limits of the integer types defined by
4367 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4368 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4369
4370 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4371 SHORT_MIN.
4372 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4373 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4374 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4375 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4376 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4377 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4378 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4379 scm_from_uintmax): New.
4380
7888309b
MV
43812004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4382
4383 * tags.h (scm_is_eq): New.
4384
4385 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4386 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4387 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4388 scm_from_bool, and scm_is_bool, respectively.
4389
4390 * boolean.h (scm_is_bool): Fix bug in prototype.
4391 (scm_from_bool): The argument is "x" not "f", stupid.
4392
4393 * boolean.c (scm_is_bool): Fix typo.
4394
4395 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4396 scm_is_unsigned_integer, scm_to_signed_integer,
4397 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4398 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4399 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4400 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4401 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4402 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4403 New.
4404
800570a6
MV
44052004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4406
4407 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4408 scm_to_bool): New.
4409
9fcf3cbb
DH
44102004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4411
4412 * backtrace.c (display_expression, display_frame): Call
4413 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4414 single memoized expression.
4415
4416 * debug.c (memoized_print): Don't try to unmemoize the memoized
4417 object, since we can't know whether it holds a single expression
4418 or a body.
4419
4420 (scm_mem_to_proc): Removed check for lambda expression, since it
4421 was moot anyway. Whoever uses these functions for debugging
4422 purposes should know what they do: Creating invalid memoized code
4423 will cause crashes, independent of whether this check is present
4424 or not.
4425
4426 (scm_proc_to_mem): Take the closure's code as it is and don't
4427 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4428 memoized code should not be modified.
4429
4430 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4431 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4432 available as a guile internal function instead. However,
4433 scm_i_unmemoize_expr will only work on memoized objects that hold
4434 a single memoized expression. It won't work with bodies.
4435
4436 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4437 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4438 i. e. a list of expressions.
4439
4440 * eval.c (unmemoize_exprs): Drop internal body markers from the
4441 output during unmemoization.
4442
4443 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4444 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4445 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4446 as guile internal functions instead. scm_i_unmemoize_expr will
4447 only work on a single memoized expression, while
4448 scm_i_unmemocopy_body will only work on bodies.
4449
90df793f
DH
44502004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4451
4452 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4453
4454 (scm_cons_source, scm_primitive_eval): Prefer higher level
4455 predicate SCM_FALSEP over SCM_IMP.
4456
8048c00b
RB
44572004-06-15 Rob Browning <rlb@defaultvalue.org>
4458
4459 * script.c (scm_shell_usage): minor phrasing change.
4460
4461 * gc_os_dep.c: update ifdefery for macosx.
4462 (scm_get_stack_base): separate result initialization from
4463 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4464 3.3. Thanks to Andreas Vögele.
8048c00b 4465
d93294d4
HWN
44662004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4467
4468 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4469
212e58ed
DH
44702004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4471
4472 * list.[ch] (scm_i_finite_list_copy): New internal function to
4473 copy lists that are known to be finite (though not necessarily
4474 proper).
4475
4476 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4477 a closure's argument list like an expression of a body.
4478
4479 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4480 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4481 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4482 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4483 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4484 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4485 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4486 unmemoize_builtin_macro): New static functions and symbols.
4487
4488 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4489 now has a slightly different meaning: The memoized form that is
4490 receives as its argument is now interpreted as a sequence of
4491 expressions from a body.
4492
4493 (unmemocar, scm_unmemocar): Since the whole functionality of
4494 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4495 has its old content back and is deprecated, while unmemocar has
4496 been removed.
4497
4498 (SCM_BIT7): Removed.
4499
4500 (CEVAL): For unmemoizing a single expression, call
4501 unmemoize_expression instead of scm_unmemocopy, which now expects
4502 a sequence of body expressions. Eliminated unnecessary empty
4503 environment frame when executing let* forms. Eliminated
4504 unmemoization step from evaluator.
4505
9ccea370
MV
45062004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4507
4508 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4509 macroexp and made static. Added new version of scm_macroexp that
4510 emits a deprecation warning and then calls macroexp.
4511 (scm_m_undefine): Issue deprecation warning.
4512
57d23e25
DH
45132004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4514
4515 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4516 Modified to make set! work on symbols that represent syntactic
4517 keywords.
4518
141521ad
HWN
45192004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4520
4521 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4522 compound expression as lvalue errors.
4523
7c2f56a4
MV
45242004-05-24 Marius Vollmer <mvo@zagadka.de>
4525
4526 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4527 WINDER_DATA to a SCM.
4528
366ecaec
DH
45292004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4530
4531 * goops.c (compute_getters_n_setters, create_standard_classes,
4532 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4533 lambda expression rather than creating them with scm_closure.
4534
26ecfa39
DH
45352004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4536
4537 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4538 misplaced syntactic keywords. This will not work unless guile's
4539 defmacro feature is deprecated.
4540
4541 (scm_m_case): Fixed a bug that caused the list of labels to grow
4542 with every case form.
4543
f865229a
KR
45442004-05-19 Kevin Ryde <user42@zip.com.au>
4545
4546 * numbers.c (scm_round_number): For inum and big, just return x. For
4547 real, use scm_round for 2^54-1 etc problems covered there.
4548
4549 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4550 doesn't provide trunc. This was for when `truncate' was done as a
4551 scm_tc7_dsubr, no longer required.
4552
4553 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4554 to stack marking call, two parameters and no cast on t->base.
4555
63947c7a
MV
45562004-05-18 Marius Vollmer <mvo@zagadka.de>
4557
4558 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4559 processed hashtables back into the weak_hashtables list. Thanks
4560 to Bill Schottstaedt!
4561
e7313a9d
DH
45622004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4563
4564 * eval.c (unmemoize_quote): New static function.
4565
4566 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4567 representation of 'quote' and '@slot-ref' to an improper list.
4568 This reduces execution time, the number of cells used to hold the
4569 memoized code, and thus also reduces garbage collection time.
4570
4571 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4572
4573 (SCM_CEVAL): Changed macro handling to also work with macros that
4574 return improper lists. Added an assertion, that the code returned
4575 by a macro transformer will not lead to cycles in the memoized
4576 code.
4577
e5156567
DH
45782004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4579
4580 No functional change, just rearrangements of functions within the
4581 file.
4582
4583 * eval.c (scm_ilookup, scm_unbound_variable_key,
4584 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4585 the definitions used for execution, since that's where they will
4586 belong to later.
4587
651f07f8
DH
45882004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4589
4590 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4591 throughout guile, has not been part of an official release yet,
4592 and the concept of sloppy predicates has never been a good idea.
4593
4594 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4595 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4596 Simplified.
4597
770e048f
DH
45982004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4599
4600 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4601 to make explicit what happens.
4602
2ff08405
DH
46032004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4604
4605 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4606 explicit what happens.
4607
4608 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4609 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4610
89afb9cd
MV
46112004-05-11 Marius Vollmer <mvo@zagadka.de>
4612
4613 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4614 is indeed a procedure when it isn't a number.
4615
3d5ebfa9
MV
46162004-05-10 Marius Vollmer <mvo@zagadka.de>
4617
4618 Convert floating point numbers into strings with an arbitrary
4619 radix. Thanks to Richard Todd!
4620
4621 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4622 fit.
4623 (fx): Removed.
4624 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4625 number_chars): New, to support variable radices.
4626 (idbl2str): Use above instead of the old base-10 only tables.
4627 (iflo2str): Pass on new RADIX argument to idbl2str.
4628 (scm_number_to_string): Pass radix to iflo2str.
4629 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4630 iflo2str.
4631 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4632 possible radices.
4633
3ae69bb4
KR
46342004-05-10 Kevin Ryde <user42@zip.com.au>
4635
4636 * numbers.c (scm_logbit_p): Correction to test above the end of an
4637 inum. Reported by Jan Konecny.
4638
27968825
MV
46392004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4640
4641 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4642 scm_t_bits. Updated all users.
4643 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4644 duplicating the code.
4645 (SCM_CELL_OBJECT_LOC): New.
4646 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4647 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4648
4649 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4650 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4651 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4652 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4653 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4654 SCM_SMOB_OBJECT_3_LOC): New.
4655 * smob.c (scm_i_set_smob_flags): New function.
4656
4657 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4658 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4659 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4660 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4661 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4662 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4663
4664 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4665 taking the address of SCM_CELL_WORD_1, the latter being no longer
4666 an lvalue.
4667
4668 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4669 of casting SCM_CELL_WORD_LOC.
4670
3cf17ef0
KR
46712004-05-02 Kevin Ryde <user42@zip.com.au>
4672
37026925 4673 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4674 --disable-deprecated. Reported by Andreas Vögele.
37026925 4675
3cf17ef0 4676 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4677 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4678
c5854598
KR
4679 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4680 code has support for. Fixes building with AIX cc, which is ansi but
4681 doesn't define __STDC__. Reported by Keith Crane.
4682 (var_start): Remove macro, this variation no longer required.
4683 (scm_list_n): Use va_start directly.
4684
f26c1a32
KR
46852004-05-01 Kevin Ryde <user42@zip.com.au>
4686
4687 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4688 is now gone. Reported by Andreas Vögele.
f26c1a32 4689
dfa6017e
KR
46902004-04-28 Kevin Ryde <user42@zip.com.au>
4691
4692 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4693 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4694 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4695 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4696 Also cast through unsigned char to avoid passing negatives to those
4697 macros if input contains 8-bit values.
4698
4699 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4700 corrections to range check for signed numbers. Remove
4701 scm_remember_upto_here_1(num) from these checks, since num is used
4702 subsequently anyway.
4703
4704 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4705 avoid warning from gcc 3.4. Reported by Hyperdivision.
4706
4707 * numbers.c (scm_bit_extract): Use min instead of MIN.
4708 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4709 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4710
4711 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4712 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4713
a0d06a00 4714 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4715 Reported by Andreas Vögele.
a0d06a00 4716
dfa6017e
KR
4717 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4718 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4719 by Andreas Vögele.
dfa6017e 4720
36245b66
DH
47212004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4722
4723 * eval.c (s_macro_keyword): New static identifier.
4724
4725 (scm_m_define): Change order to first create binding and
4726 evaluating the expression afterwards.
4727
4728 (scm_m_set_x): Memoize complete set! expression. Only leave
4729 symbols if no binding exists at memoization time. Throw error if
4730 assigning to a syntactic keyword.
4731
4732 (lazy_memoize_variable): New function.
4733
4734 (CEVAL): When execution set!, perform lazy memoization if
4735 unmemoized symbol is detected.
4736
4737 * modules.c (module_variable): Return variables with unbound
4738 value.
4739
4740 * tags.h: Fix comment.
4741
4d81111e
KR
47422004-04-25 Kevin Ryde <user42@zip.com.au>
4743
da8bcb2f
KR
4744 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4745 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4746 in 8-bit locales, and ensures consistency with char-upper-case? and
4747 char-lower-case? which already use ctype.h.
4748 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4749 Remove.
4750 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4751
4d81111e
KR
4752 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4753 call. Reported by Hyperdivision.
4754
4755 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4756 Reported by Hyperdivision.
4757
4758 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4759 Hyperdivision.
4760
7e6e6b37
DH
47612004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4762
4763 Hide the implementation of ilocs and isyms in eval.c.
4764
4765 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4766 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4767 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4768 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4769 eval.h to eval.c.
4770
4771 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4772 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4773 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4774 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4775 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4776 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4777 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4778 renamed to ISYMNUM.
4779
4780 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4781 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4782 Extracted printing of ilocs and isyms to guile internal functions
4783 scm_i_print_iloc, scm_i_print_isym of eval.c.
4784
caab294f
KR
47852004-04-22 Kevin Ryde <user42@zip.com.au>
4786
7aaf4758
KR
4787 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4788
caab294f
KR
4789 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4790 rounding in x+0.5 when x is a big value already an integer. In
4791 certain hardware rounding cases x+0.5 can give an adjacent integer,
4792 leading to that as the result, when we really just wanted x itself.
4793
b1cb24ff
DH
47942004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4795
4796 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4797
4798 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4799 added const qualifiers, cast intentionally unused expressions to
4800 void for emphasis, improved comment.
4801
5065b40d
DH
48022004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4803
4804 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4805 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4806 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4807 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4808 Defined the tc8-tag for flags to be 0x04, which will mean that
4809 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4810 to the reduced number of bits and the simpler bit pattern for
4811 SCM_BOOL_F, certain machines may be able to use more efficient
4812 processor instructions to deal with SCM_BOOL_F.
4813
4814 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4815 never been defined in a released version, thus no need to
4816 deprecate them.
4817
4818 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4819 instead of tc9 tags.
4820
4821 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4822 of tc9 tags.
4823
4824 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4825 could have used this definition.
4826
4827 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4828 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4829 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4830 as isyms, as special isyms don't exist any more.
4831
9fa6c119
KR
48322004-04-18 Kevin Ryde <user42@zip.com.au>
4833
e08d2eee
KR
4834 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4835 safety.
4836
9fa6c119
KR
4837 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4838 explicit swapping code.
4839
c9cdd396
KR
48402004-04-15 Kevin Ryde <user42@zip.com.au>
4841
4842 * cpp_sig_symbols.in: Add SIGSYS.
4843
4844 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4845 recursion.
4846
4847 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4848 frac/big and frac/frac, use scm_less_p for exact comparison.
4849
83ac9c59
KR
4850 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4851 with big/inum.
4852
84a4be9a
KR
4853 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4854
84fad130
HWN
48552004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4856
6b69393d
HWN
4857 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4858
84fad130
HWN
4859 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4860 scm_c_{up,down}case.
4861 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4862 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4863
c3110a30
KR
48642004-04-06 Kevin Ryde <user42@zip.com.au>
4865
0b288f36
KR
4866 * numbers.c (scm_ash): Remove stray "}" in docstring.
4867
ea2508c8
KR
4868 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4869 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4870 calling mpz_cmp_ui in most cases.
4871
c3110a30
KR
4872 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4873 for big == abs(most-negative-fixnum) special case.
4874 (abs_most_negative_fixnum): Remove, no longer used.
4875
4876 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4877 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4878 calling (sigaction NSIG).
4879
4880 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4881 and fork error cases to do this.
4882
dec40cd2
DH
48832004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4884
4885 * eval.c (CEVAL): Don't distinguish between short and long
4886 instructions when dispatching - just always dispatch on the
4887 instruction code, which is common for short and long instructions.
4888 Further, removed unnecessary goto statements and added comment.
4889
0e7bb795
DH
48902004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4891
4892 * eval.c (scm_unmemocopy): Don't distinguish between short and
4893 long instructions when dispatching - just always dispatch on the
4894 instruction code, which is common for short and long instructions.
4895 Further, removed unnecessary goto statements, fixed indentation
4896 and replaced SCM_IMP predicates by SCM_NULLP.
4897
f9986767
DH
48982004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4899
4900 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4901 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4902 'checkmacro'.
4903
fbc42231
KR
49042004-03-31 Kevin Ryde <user42@zip.com.au>
4905
4906 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4907
434f2f7a
DH
49082004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4909
4910 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4911 SCM_DEBUGGINGP:
4912
4913 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4914 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4915 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4916 single interface that also matches the naming conventions.
4917 Probably scm_debug_mode_p should be part of the private interface
4918 anyway.
4919
4920 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4921 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4922 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4923 to scm_debug_mode_p.
4924
4925
4926 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4927
4928 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4929 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4930 from debug.h to eval.h.
4931
4932 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4933 more, just leave it with setting scm_debug_mode_p, which is
4934 equivalent for practical purposes.
4935
4936 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4937 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4938
4939 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4940
4941 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4942 static and renamed it to ceval throughout. Provide a new exported
4943 but deprecated function scm_ceval as a wrapper for backwards
4944 compatibility. The same is done for the deval/scm_deval pair of
4945 functions.
4946
4947 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4948 throughout. Defined CEVAL to ceval or deval, based on compilation
4949 phase.
4950
4951 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4952 to ceval and deval instead of calling *scm_ceval_ptr.
4953
4954 * eval.c (dispatching_eval): New deprecated static function.
4955
4956 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4957 to emulate its old behaviour as closely as possible.
4958
4959
4960 Change the evaluator such that only expressions for which pair? is
4961 true are passed to CEVAL, and such that all other expressions are
4962 evaluated outside of CEVAL:
4963
4964 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4965 expression that is assumed to be memoized already. All but
4966 expressions of the form '(<form> <form> ...)' are evaluated inline
4967 without calling an evaluator.
4968
4969 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4970 expressions of the form '(<form> <form> ...)' inline without
4971 calling an evaluator.
4972
4973 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4974 the special case of unmemoized symbols passed on the top level.
4975
4976 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4977 is known that the expression passed to CEVAL is of the form
4978 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4979 now it is known that the input expression of CEVAL is a pair.
4980
49812004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4982
4983 * eval.c (is_self_quoting_p): New static function.
4984
4985 (scm_m_quote): Use is_self_quoting_p.
4986
4987 (copy_tree): Corrected typo in comment.
4988
702551e6
HWN
49892004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4990
bfefbf18
HWN
4991 * eval.c (s_scm_copy_tree): idem.
4992
4993 * list.c (s_scm_filter): remove "pointer" from doc string.
4994
702551e6
HWN
4995 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4996
4997 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4998
4999 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
5000 (display_frame): idem.
5001 (display_backtrace_file_and_line): idem.
5002
5003 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
5004 arguments.
5005
3cd23214
KR
50062004-03-26 Kevin Ryde <user42@zip.com.au>
5007
88a7ae1f
KR
5008 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
5009
3cd23214
KR
5010 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
5011 big==0 since that never occurs.
5012
5013 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
5014 scm_modular_expt, matching scheme level name `modulo-expt'.
5015
5016 * numbers.c (scm_modular_expt): Return a negative remainder for a
5017 negative divisor, the same as `modulo' does.
5018
50192004-03-26 Eric Hanchrow <offby1@blarg.net>
5020
5021 * numbers.c, numbers.h (scm_modular_expt): New function.
5022
2926035a
KR
50232004-03-25 Kevin Ryde <user42@zip.com.au>
5024
5025 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
5026 return inexact as required by r5rs.
5027
62360b89
DH
50282004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5029
5030 * eval.c: Separated some definitions relevant for execution from
5031 the memoization part of the file.
5032
5033 (copy_tree): New static function
5034
5035 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
5036 structures are detected now and will lead to an exception instead
5037 of forcing guile to run in an endless loop, using up all the
5038 system's memory. Second, arrays in the cdr of an improper list
5039 are now copied. See the new test cases in eval.test.
5040
50412004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
5042
5043 * posix.c (scm_gethostname): Make sure len is initialised before
5044 it is used. Restructured to (hopefully) represent possible
5045 configurations more clearly in the code. Added unwind handler.
5046
3bd3bae8
KR
50472004-03-23 Kevin Ryde <user42@zip.com.au>
5048
5049 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
5050 MAXHOSTNAMELEN when available.
5051
254bf78d
MV
50522004-03-21 Marius Vollmer <mvo@zagadka.de>
5053
5054 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
5055 terminator. Rewritten the logic as a state machine, I must have
5056 been doing too much VHDL lately...
5057
5058 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
5059 themselves. Thanks to Han-Wen Nienhuys!
5060
5061 * list.c: Changed docstrings so that they no longer talk about
5062 returning 'pointers' to something.
5063
009c34a2
HWN
50642004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5065
5066 * gc.c: remove set_debug_cell_accesses! when
5067 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
5068 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
5069 debugging conditionally.
5070
54733c95
KR
50712004-03-21 Kevin Ryde <user42@zip.com.au>
5072
5073 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
5074
bbaf8747
KR
50752004-03-20 Kevin Ryde <user42@zip.com.au>
5076
5077 * posix.c (scm_gethostname): Preserve errno across free() call.
5078
726f82e7
HWN
50792004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
5080
5081 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
5082 free cells.
5083
e1350d6a
KR
50842004-03-14 Kevin Ryde <user42@zip.com.au>
5085
5086 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
5087 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
5088
62055253
KR
50892004-03-07 Kevin Ryde <user42@zip.com.au>
5090
5091 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
5092 than "GMT" always.
5093 (filltime): Make zname parameter "const".
5094
92e64b87
MD
50952004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
5096
5097 * threads.c, threads.h (scm_c_scm2thread): New function.
5098
004ad931
KR
50992004-02-29 Kevin Ryde <user42@zip.com.au>
5100
5101 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
5102 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
5103 particular don't assume "defined (__alpha__) && ! defined (linux)"
5104 means OSF. Remove "SCO" code, which was not really SCO specific and
5105 which John W. Eaton advises should be long past being needed.
5106
5107 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
5108 error throw.
5109
72ea45ac
KR
51102004-02-24 Kevin Ryde <user42@zip.com.au>
5111
5112 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
5113
2af0602e
KR
51142004-02-22 Kevin Ryde <user42@zip.com.au>
5115
5116 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
5117 complex, same as for two args. (Handle only inum, big, real, frac).
5118
b114eafe
KR
51192004-02-21 Kevin Ryde <user42@zip.com.au>
5120
5121 * posix.c (scm_crypt): Use new HAVE_CRYPT.
5122 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 5123 Reported by Andreas Voegele.
b114eafe 5124
1e55d288
NJ
51252004-02-20 Neil Jerram <neil@ossau.uklinux.net>
5126
5127 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
5128 validation.
5129
5130 * read.c (scm_lreadparen): Removed.
5131 (scm_lreadparen1): Renamed scm_i_lreadparen.
5132
eb741d98
HWN
51332004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5134
5135 * list.c (scm_list_n): validate non-immediate arguments;
5136 this will catch forgotten a SCM_UNDEFINED.
5137
4e28ba5e
MV
51382004-02-18 Marius Vollmer <mvo@zagadka.de>
5139
5140 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
5141 Thanks to Bill Schottstaedt!
5142
5143 * socket.h (scm_gethost): Removed prototype it is already in
5144 "net_db.h". Thanks to Bill Schottstaedt!
5145
ef861ead
KR
51462004-02-18 Kevin Ryde <user42@zip.com.au>
5147
5148 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
5149 order parameter to mpz_import, in fact with just one word there's no
5150 order to worry about at all.
5151
5152 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
5153 and frac==complex, make an exact comparison rather than converting
5154 with fraction2double.
5155
5156 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
5157 shared library, since environ is not directly available there.
5158
5159 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
5160 standard.
5161
5162 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
5163 errno EINVAL in case localtime and gmtime don't set it.
5164 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
5165 SCM_SYSERROR, since mktime and strptime generally don't set errno.
5166
ae43d08e 51672004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 5168
c9ea6462
KR
5169 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
5170 which were permitted in the past for these.
5171
292dfa7f
KR
5172 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
5173 previous change to numbers.c.
5174
ae43d08e
KR
5175 * script.c (scm_shell_usage): Print bug-guile email address, as per
5176 GNU standard. Reported by Han-Wen Nienhuys.
5177
711a9fd7
MD
51782004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5179
5180 * unif.c (scm_make_uve): Removed local variable and simplified
5181 code in order to avoid compiler used uninitialized warnings.
5182
5183 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
5184 scm_hash_map.
5185 (scm_hash_fold): Use scm_call_3 directly in the call to
5186 scm_internal_hash_fold instead of going via fold_proc (which is
5187 now removed).
5188 (scm_hash_for_each): Use a trampoline +
5189 scm_internal_hash_for_each_handle.
5190 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
5191 functions.
5192
3da7f6b2
KR
51932004-02-12 Kevin Ryde <user42@zip.com.au>
5194
344a212f
KR
5195 * ports.c (scm_port_line): In docstring, note first line is 0.
5196 (scm_set_port_line_x): In docstring, note first line is 0.
5197 (scm_port_column): In docstring, there's no default to current input
5198 port, and remove shared port-line @defun.
5199 (scm_set_port_column_x): In docstring, there's no default to current
5200 input port, note first column is 0, remove shared set-port-line!
5201 @defun.
5202
3da7f6b2
KR
5203 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5204 convert args the same way that array-set! does.
5205
5206 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5207 for dvect.
5208 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5209 for "l" not "s", fix dvect to be false for singp(prot) since such a
5210 value is for fvect.
5211 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5212 (exactly_one_third): New variable.
5213 (scm_init_unif): Initialize it.
3da7f6b2 5214
cd21f5eb
NJ
52152004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5216
5217 * read.c (scm_read_opts): Change `escaped-parens' to
5218 `elisp-strings'.
5219
16353acc
NJ
52202004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5221
5222 * read.c (scm_read_opts): New opts `elisp-vectors' and
5223 `escaped-parens'.
5224 (s_vector): New.
5225 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5226 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5227 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5228 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5229 `escaped-parens' option set.
5230 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5231 in tokens.
5232 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5233 (scm_lreadparen1): New.
5234
5235 * read.h: Remove conditionally compiled last arg to
5236 scm_lreadparen.
5237 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5238
f62b9dff
HWN
52392004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5240
5241 * eval.c (m_expand_body): remove stray variable new_body.
5242
ef5b6b61
MV
52432004-01-22 Marius Vollmer <mvo@zagadka.de>
5244
5245 * eval.c (m_expand_body): Rewrite the expression in place (by
5246 overwriting FORMS) also when a letrec is constructed, not only
5247 when no definitions are found. Do not return rewritten expression
5248 to emphasize the in-place rewriting. Changed all users.
5249
7eec4c37
HWN
52502004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5251
5252 * gc.c: add protected_object_count, a number that is dumped from
5253 gc_stats()
5254
25ffbdac
MV
52552004-01-11 Marius Vollmer <mvo@zagadka.de>
5256
5257 * dynwind.h, dynwind.c (scm_frame_unwind,
5258 scm_frame_unwind_handler): Renamed and changed all uses.
5259 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5260
08568c95
KR
52612004-01-11 Kevin Ryde <user42@zip.com.au>
5262
5263 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5264 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5265 changes made to scheme-compound.texi.
5266
5565749c
MV
52672004-01-10 Marius Vollmer <mvo@zagadka.de>
5268
25ffbdac
MV
5269 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5270 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5271
5272 * guile-snarf.in: Use mkdir to create a unique temporary directory
5273 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5274
fc6bb283
MV
52752004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5276
7ebccde8
MV
5277 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5278 argument since it is always zero now. Changed all callers.
5279 Removed code for handling fluids.
96e3b2f8
MV
5280
5281 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5282 the wind chain explicitely. Use scm_c_with_fluid for the common
5283 case of only one fluid.
5284 (scm_with_fluid): New.
5285 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5286
fc6bb283 5287 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5288 (scm_with_fluid): New.
5289 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5290
5291 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5292 do the unwinding directly. It is simple enough.
5293
5294 * dynwind.h, dynwind.c: Did the following renamings:
5295 scm_begin_frame -> scm_frame_begin,
5296 scm_end_frame -> scm_frame_end,
5297 scm_on_unwind -> scm_frame_unwind,
5298 scm_on_rewind -> scm_frame_rewind,
5299 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5300 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5301 Changed all uses.
5302
5303 * aync.h, async.c: Did the follwing renamings:
5304 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5305 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5306 Changed all uses.
5307
5308 * ports.h, ports.c: Did the follwing renamings:
5309 scm_with_current_input_port -> scm_frame_current_input_port,
5310 scm_with_current_output_port -> scm_frame_current_output_port,
5311 scm_with_current_error_port -> scm_frame_current_error_port.
5312 Changed all uses.
5313
298ab996
KR
53142004-01-07 Kevin Ryde <user42@zip.com.au>
5315
5316 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5317 Reported by Richard Todd.
5318
ba40113e
KR
5319 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5320 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5321
298ab996
KR
5322 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5323 traversing the args list, fixes segv if an improper list is given.
5324 Reported by Rouben Rostamian.
5325
aacff585
MV
53262004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5327
5328 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5329 swap_data on stack, use a 'malloc obj'.
5330
5331 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5332 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5333 scm_i_... since they are internal. Changed all uses.
5334
5335 * dynwind.c (frame_print): Removed, use the default printer.
5336 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5337 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5338 to protect SCM values.
5339
5340 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5341 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5342 Changed all uses.
5343 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5344
49c00ecc
MV
53452004-01-05 Marius Vollmer <mvo@zagadka.de>
5346
5347 * ports.h, ports.c (scm_with_current_input_port,
5348 scm_with_current_output_port, scm_with_current_error_port): New.
5349
5350 * async.h, async.c (scm_with_blocked_asyncs,
5351 scm_with_unblocked_asyncs): New.
5352
dab514a8
MV
53532004-01-03 Marius Vollmer <mvo@zagadka.de>
5354
5355 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5356 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5357 New.
5358 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5359 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5360 function when the outermost wind point has been reached. The
5361 latter is used to copy a continuation stack at the right time.
5362 scm_dowinds remains available.
5363 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5364 tc16_guard, guards_print): Removed.
5365 (scm_internal_dynamic_wind): Reimplemented using frames.
5366
5367 * continuations.c (copy_stack): New, do only the stack copying
5368 part of copy_stack_and_call.
5369 (copy_stack_and_call): Copy the stack after unwinding and before
5370 rewinding.
5371 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5372 copy_stack_and_call.
5373
441a25d9
KR
53742004-01-04 Kevin Ryde <user42@zip.com.au>
5375
5376 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5377 can give bad results due to rounding.
441a25d9 5378
e0499207
KR
5379 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5380 setzone/restorezone protection for DOS.
5381
89fcf1b4
MV
53822003-12-26 Marius Vollmer <mvo@zagadka.de>
5383
5384 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5385 and scm_t_uintmax to be defined in scmconfig.h
5386
caff34d4
KR
53872003-12-03 Kevin Ryde <user42@zip.com.au>
5388
5389 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5390
5391 * numbers.c (scm_make_ratio): Check for numerator equal to
5392 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5393 giving integer -1.
5394
5395 * numbers.c (scm_real_part): Return fraction unchanged rather than
5396 converting to flonum.
5397
2d0b85ac
DH
53982003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5399
5400 * modules.c (module_variable): Fixed (and thus simplified) the
5401 definition of SCM_BOUND_THING_P to reflect the fact that since
5402 after the 1.4 series of guile, obarrays only hold variable
5403 objects.
5404
2297981d
MV
54052003-11-30 Marius Vollmer <mvo@zagadka.de>
5406
5407 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5408
5409 From Paul Jarc:
5410
5411 * read.c (scm_lreadr): Signal an error for invalid escape
5412 sequences in strings. Code cleanups too.
5413
5414 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5415 writing control characters in strings.
5416
54172003-11-21 Marius Vollmer <mvo@zagadka.de>
5418
5419 * ports.c (scm_drain_input): Bug fix: only access the port after
5420 checking that it indeed is one.
5421
5c264007
DH
54222003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5423
5424 * eval.c (s_bad_define): New static identifier.
5425
5426 (m_body): Fixed comment.
5427
5428 (scm_m_define): Don't generate memoized code for definitions that
5429 are not on the top level. As a consequence, no memoized code at
5430 all is generated for definitions any more: Top level definitions
5431 are executed immediately during memoization and internal
5432 definitions are handled separately in m_expand_body.
5433
5434 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5435 definitions. Consequently, there is no unmemoizing code any more
5436 that might modify the environment. Thus, the old scm_unmemocopy
5437 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5438
5439 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5440 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5441 over SCM_NIMP in places, where the argument is known to be part of
5442 a proper list.
5443
018d4730
KR
54442003-11-21 Kevin Ryde <user42@zip.com.au>
5445
5446 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5447 for bignums.
5448
5449 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5450 to share some shifting.
5451
5452 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5453 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5454 since gc does this.
5455
4bca30d8
MV
54562003-11-19 Marius Vollmer <mvo@zagadka.de>
5457
fb16d26e
MV
5458 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5459 structure. Previously, not all cases with a negative denominator
5460 were covered.
5461
4bca30d8
MV
5462 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5463 scm_divide2real when forming the fractional part. This allows
5464 "#e1.2" to yield 6/5.
5465
5466 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5467 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5468 fractions were equal to each other regardless of value. Ooops.
5469
5470 * numbers.c (scm_rationalize): Return an inexact result when given
5471 inexact arguments.
5472
5473 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5474 non-numbers.
5475
bdf26b60
MV
54762003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5477
5478 Support for exact fractions from Bill Schottstaedt! Thanks!
5479
5480 * print.c (scm_iprin1): Handle fractions.
5481
5482 * objects.h (scm_class_fraction): New.
5483 * objects.c (scm_class_fraction): New.
5484 (scm_class_of): Handle fractions.
5485
5486 * hash.c (scm_hasher): Handle fractions.
5487
5488 * numbers.c: New code for handling fraction all over the place.
5489 (scm_odd_p, scm_even_p): Handle inexact integers.
5490 (scm_rational_p): New function, same as scm_real_p.
5491 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5492 New exact functions that replace the inexact 'dsubr'
5493 implementations.
5494 (scm_numerator, scm_denominator): New.
5495
5496 * numbers.h (SCM_NUMP): Recognize fractions.
5497 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5498 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5499 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5500 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5501 SCM_FRACTION_REDUCED): New.
5502 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5503 New prototypes.
5504 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5505 scm_rational_p): New prototypes.
5506 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5507 scm_i_print_fraction): New prototypes.
5508
5509 * goops.c (create_standard_classes): Create "<fraction>" class.
5510
5511 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5512
5513 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5514 case in the switch, but do nothing for now.
5515
5516 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5517 to doubles when calling 'dsubr' functions.
5518
5519 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5520
28fda544
RB
55212003-11-18 Rob Browning <rlb@defaultvalue.org>
5522
5523 * gen-scmconfig.c (main): remove public definition of
5524 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5525 direct typedef of long_long and ulong_long inside deprecated block
5526 when appropriate.
5527
5528 * deprecated.h: move long_long and ulong_long definitions to
5529 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5530 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5531
b58e7420
MV
55322003-11-17 Marius Vollmer <mvo@zagadka.de>
5533
9a1d7d7c
MV
5534 * hash.c (scm_string_hash): New hashing algorithm that takes the
5535 complete string into account.
5536
b58e7420
MV
5537 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5538 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5539 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5540 SCM_ASSYNT.
b58e7420
MV
5541
5542 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5543 the "-e" option instead of scm_str2symbol. This allows things
5544 like (@ ...) to be specified for the entry point.
5545
461bffb1
DH
55462003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5547
5548 * eval.c (scm_m_letstar): Create memoized code in place to
5549 minimize consing.
5550
6f81708a
DH
55512003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5552
5553 * eval.c (s_splicing): Commented and reformulated.
5554
5555 (lookup_global_symbol, lookup_symbol): New static functions.
5556
5557 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5558
5559 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5560 creating a temporary pair for scm_lookupcar.
5561
5562 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5563 created deprecated wrapper function scm_unmemocar.
5564
5565 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5566 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5567 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5568 undefineds, sym_three_question_marks): Moved around without
5569 modifications.
5570
5571 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5572
910b5125
DH
55732003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5574
5575 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5576 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5577 No further modifications.
5578
c86c440b
DH
55792003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5580
5581 * eval.c (s_mixed_body_forms): New static identifier.
5582
5583 (canonicalize_define, scm_m_define): The check for a bad
5584 expression is performed in canonicalize_define now.
5585
5586 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5587 static helper functions for m_expand_body.
5588
5589 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5590 expand user defined macros. Fixed handling of the definition/
5591 expression boundary. Fixed handling of definitions grouped with
5592 'begin. Use canonicalize_define to expand definitions.
5593
3890131a
MV
55942003-11-13 Marius Vollmer <mvo@zagadka.de>
5595
b58e7420
MV
5596 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5597 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5598
5df36eac
MV
5599 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5600 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5601 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5602 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5603 New macros from Paul Jarc. Thanks!
5604
3890131a
MV
5605 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5606 return NULL when the machine type is unknown. Previously,
5607 gc_os_dep.c would refuse to compile.
5608
430b8401
DH
56092003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5610
5611 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5612 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5613 scm_m_body to m_body.
5614
328dc9a3
DH
56152003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5616
5617 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5618 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5619 scm_m_expand_body to m_expand_body and made it static. Added
5620 deprecated wrapper scm_m_expand_body.
5621
5622 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5623 of scm_m_expand_body.
5624
c2337a61
KR
56252003-11-09 Kevin Ryde <user42@zip.com.au>
5626
5627 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5628 argument. Reported by Mike Gran.
5629
ced8edb0
DH
56302003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5631
5632 * eval.c (s_missing_body_expression): New static identifier.
5633
5634 (s_body): Removed.
5635
5636 (scm_m_expand_body): Fixed core dump when passing a body with
5637 defines, but without expressions (see additions to syntax.test).
5638 Use ASSERT_SYNTAX to signal syntax errors.
5639
0f572ba7
DH
56402003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5641
5642 * eval.c (canonicalize_define): New static helper function.
5643
5644 (memoize_define, canonicalize_define): Extract handling of
5645 function currying to canonicalize_define.
5646
2510c810
DH
56472003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5648
5649 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5650 Make sure that error checking in debug mode is not worse than in
5651 standard mode.
5652
34adf7ea
DH
56532003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5654
5655 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5656 handled in scm_m_body any more, but rather in scm_m_lambda.
5657
5658 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5659 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5660 calling functions of scm_m_body.
5661
5662 (scm_m_lambda): Avoid unnecessary consing when creating the
5663 memoized code.
5664
89bff2fc
DH
56652003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5666
5667 * eval.c (s_expression): Added comment.
5668
5669 (s_empty_combination, error_unbound_variable): New static
5670 identifiers.
5671
5672 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5673 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5674 signal syntax errors.
5675
5676 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5677 scheme objects.
5678
60a49842
DH
56792003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5680
5681 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5682 Grouped together with unmemocopy, without modifications.
5683
5684 (build_binding_list, unmemocopy): Renamed names of list arguments
5685 and variables to reflect the actual order of the list elements.
5686
70c1c108
DH
56872003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5688
5689 * eval.c (s_defun): New static identifier.
5690
5691 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5692 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5693 when creating the memoized code.
5694
0ee39677
KR
56952003-10-19 Kevin Ryde <user42@zip.com.au>
5696
5697 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5698
5699 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5700 in accordance with R5RS, which just mpz_get_d doesn't really give.
5701
9a848baf
DH
57022003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5703
5704 * eval.c (s_bad_slot_number): New static identifier.
5705
5706 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5707 signal syntax errors. Avoid unnecessary consing when creating the
5708 memoized code.
5709
da48db62
DH
57102003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5711
5712 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5713 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5714 errors. Avoid unnecessary consing when creating the memoized
5715 code.
5716
5717 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5718 standard case. Make sure line and file information are copied to
5719 every created expression.
5720
82b3e2c6
DH
57212003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5722
5723 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5724 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5725 when creating the memoized code.
5726
5727 (scm_m_atbind): Reversed the order, in which the init expressions
5728 are stored and executed. The order of execution is now equal to
5729 the order in which the initializers of the let-forms are executed.
5730 Use check_bindings and transform_bindings.
5731
5732 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5733 !SCM_NULLP. Added some comments.
5734
21628685
DH
57352003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5736
5737 * eval.c: Sorted include files alphabetically.
5738
5739 (scm_m_begin): Added comment.
5740
5741 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5742 unnecessary consing when creating the memoized code.
5743
5744 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5745 syntax errors. Be more specific about the kind of error that was
5746 detected.
5747
5748 (scm_m_quote, unmemocopy): As an optimization, vector constants
5749 are now inserted unquoted into the memoized code. During
5750 unmemoization the quotes are added again to provide syntactically
5751 correct code.
5752
d6754c23
DH
57532003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5754
5755 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5756 scm_m_expand_body, check_bindings): Extracted syntax checking of
5757 bindings to new static function check_bindings.
5758
5759 (scm_m_let, memoize_named_let): Extracted handling of named let to
5760 new static function memoize_named_let.
5761
5762 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5763 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5764 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5765 unnecessary consing when creating the memoized code.
5766
03a3e941
DH
57672003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5768
5769 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5770 static identifiers.
5771
5772 (s_clauses, s_formals, s_duplicate_formals): Removed.
5773
5774 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5775 specific about the kind of error that was detected. Prepare for
5776 easier integration of changes for separated memoization.
5777
da48db62 57782003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5779
5780 * eval.c (s_duplicate_binding): New static identifier.
5781
5782 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5783
5784 (scm_m_define): Added comment about how we check for duplicate
5785 formals.
5786
5787 (scm_m_do): Added check for duplicate bindings.
5788
5789 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5790 unnecessary consing when creating the memoized code.
5791
5792 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5793 scm_c_improper_memq to c_improper_memq, since it is not exported.
5794
5795 (transform_bindings): Call scm_c_memq rather than
5796 scm_c_improper_memq.
5797
5798 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5799
da48db62 58002003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5801
5802 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5803 static identifiers.
5804
5805 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5806 specific about the kind of error that was detected. Avoid use of
5807 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5808 code, this way also making sure that file name, line number
5809 information etc. remain available.
5810
da48db62 58112003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5812
5813 * eval.c (memoize_as_thunk_prototype): New static function.
5814
5815 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5816 Avoid unnecessary consing when creating the memoized code.
5817
9b9a35b6
KR
58182003-10-12 Kevin Ryde <user42@zip.com.au>
5819
5820 * list.c (scm_append): Track argument number and use in error.
5821
cc56ba80
DH
58222003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5823
5824 * eval.c (s_missing_expression, s_bad_variable): New static
5825 identifiers.
5826
5827 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5828 R5RS terminology for the naming of variables. Be more specific
5829 about the kind of error that was detected. Make sure file name,
5830 line number etc. are added to all freshly created expressions.
5831 Avoid unnecessary consing when creating the memoized code.
5832
609a8b86
DH
58332003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5834
5835 * eval.c (s_extra_expression, s_misplaced_else_clause,
5836 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5837
5838 (s_extra_case_clause): Removed.
5839
5840 (scm_m_case, scm_m_cond): If a clause appears after an else
5841 clause, report a misplaced else clause.
5842
5843 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5844 specific about the kind of error that was detected. Handle bound
5845 'else and '=>. Avoid unnecessary consing when creating the
5846 memoized code.
5847
5848 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5849 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5850 syntactic keyword '=>.
5851
58a2510b
DH
58522003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5853
5854 * eval.c (scm_m_case): Allow empty lists of case labels.
5855
2a6f7afe
DH
58562003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5857
5858 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5859
5860 * print.c (scm_isymnames): Add names for the new memoizer codes.
5861
5862 * eval.c (s_missing_clauses, s_bad_case_clause,
5863 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5864 literal_p): New static identifiers.
5865
5866 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5867 specific about the kind of error that was detected. Check for
5868 duplicate case labels. Handle bound 'else. Avoid unnecessary
5869 consing when creating the memoized code.
5870
5871 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5872 the syntactic keyword 'else.
5873
e6729603
DH
58742003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5875
5876 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5877 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5878
5879 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5880 unnecessary consing when creating the memoized code.
5881
9ddeb776
KR
58822003-10-09 Kevin Ryde <user42@zip.com.au>
5883
5884 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5885 cast gives for values bigger than a long, or for nan or inf.
5886
df5af69a
DH
58872003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5888
5889 * smob.h (scm_make_smob_type): Made the declaration match the
5890 definition.
5891
da0e6c2b
MV
58922003-10-07 Marius Vollmer <mvo@zagadka.de>
5893
5894 * goops.c, objects.h, smob.c, smob.h: Make type names char
5895 const * instead of char *. Thanks to Paul Jarc!
5896
591924eb
KR
58972003-10-02 Kevin Ryde <user42@zip.com.au>
5898
ff6ea7b9 5899 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5900 rather than scm_strport_to_string, so as to guard against the port
5901 having been closed by the called procedure. Reported by Nic Ferrier.
5902
f03314f9
DH
59032003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5904
5905 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5906
5907 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5908 tags.h to deprecated.h.
5909
534c55a9
DH
59102003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5911
5912 This set of patches introduces a new tc7 code scm_tc7_number for
5913 numbers. Bignums, reals and complex numbers are turned from smobs
5914 into subtypes of scm_tc7_number.
5915
5916 * tags.h (scm_tc7_number): New.
5917
5918 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5919 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5920 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5921 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5922 (scm_class_of), print.c (scm_iprin1), smob.c
5923 (scm_smob_prehistory): Don't handle bignums, reals and complex
5924 numbers as subtypes of scm_tc7_smob any more.
5925
5926 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5927 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5928
29c4382a
DH
59292003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5930
5931 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5932 sizeof (scm_t_complex) to determine the memory size of the
5933 malloc'd area for complex numbers.
5934
47ae1f0e
DH
59352003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5936
5937 * numbers.c (scm_bigequal): Fixed.
5938
859b6b2f
MV
59392003-09-16 Marius Vollmer <mvo@zagadka.de>
5940
5941 * stime.c (scm_current_time): 'time' does not set errno so don't
5942 use SCM_SYSERROR for reporting errors.
5943
e17d318f
DH
59442003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5945
5946 This set of patches eliminates the dependency between the
5947 implementation of evaluator specific memoization codes and special
5948 constants like #f, '() etc. ('flags'), which are not evaluator
5949 specific. The goal is to remove definitions of evaluator
5950 memoization codes completely from the public interface. This will
5951 make it possible to experiment more freely with optimizations of
5952 guile's internal representation of memoized code.
5953
5954 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5955
5956 * print.c (iflagnames): New array, holding the printed names of
5957 guile's special constants ('flags').
5958
5959 (scm_isymnames): Now holds only the printed names of the
5960 memoization codes.
5961
5962 (scm_iprin1): Separate the handling of memoization codes and
5963 guile's special constants.
5964
5965 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5966 SCM_IFLAGNUM): new
5967
5968 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5969 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5970 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5971 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5972 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5973 values.
5974
5975 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5976
5977 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5978 tc9 macros and scm_tc9_flag.
5979
eecac806
MV
59802003-09-15 Marius Vollmer <mvo@zagadka.de>
5981
5982 * posix.c (scm_setgroups): Check that the gid list is not too
5983 long. Thanks to Paul Jarc!
5984
22f2cf2d
DH
59852003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5986
5987 * tags.h: Reduced the number of short instructions from 14 to 13.
5988 The typecode of the former 14th short instruction is now used to
5989 represent long instructions. Changed some comments to reflect
5990 this fact.
5991
5992 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5993 previously used by SCM_IM_DEFINE.
5994
5995 (SCM_IM_DEFINE): Turned into a long instruction.
5996
5997 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5998 instruction.
5999
6000 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
6001 code that is separate from all instructions, one level of dispatch
6002 for long instructions can be eliminated.
6003
6004 * print.c (scm_isymnames): Removed some commented code.
6005
62f548e1
MV
60062003-09-12 Marius Vollmer <mvo@zagadka.de>
6007
97a61c5f
MV
6008 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
6009 compiler on IA64.
6010
50e0ba57
MV
6011 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
6012
6013 * modules.c (scm_module_reverse_lookup): Check that the obarray
6014 really is a hashtable and do nothing if not.
6015
62f548e1
MV
6016 * inline.h: Use "extern inline" only with GCC. Use "static
6017 inline" else.
6018
0d5e3480
DH
60192003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6020
6021 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
6022 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6023
6024 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
6025 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
6026 deprecated.h.
6027
6b412e91
DH
60282003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6029
6030 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
6031 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6032
6033 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
6034 0.0==some_expression to some_expression==0.0. The latter is
6035 better readable. The former is preferred by some people, since it
6036 leads to a compiler error when confusing == with =. However, when
6037 using gcc, a warning will be issued if in an if-statement an
6038 assigment appears. Since many Guile developers are using gcc,
6039 such errors will not remain unnoticed anyway. We can therefore
6040 focus on better readability.
6041
7e3b25bf
DH
60422003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6043
6044 * tags.h: Added description of Guile's type system. Removed some
6045 old and misleading comments.
6046
3ea39242
DH
60472003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6048
6049 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
6050 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6051
5d7d39ff
DH
60522003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6053
6054 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
6055
6056 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
6057 respective SLOPPY macro.
6058
baa84a20
DH
60592003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6060
6061 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
6062 type string, not SCM_TYP7S.
6063
ba15f500
KR
60642003-09-03 Kevin Ryde <user42@zip.com.au>
6065
6066 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
6067 2s-complement.
6068
53bb8782
KR
6069 * stime.c (scm_strptime): Add comment about glibc strptime %s and
6070 current timezone requiring SCM_DEFER_INTS.
6071
defdc4b4
NJ
60722003-08-30 Neil Jerram <neil@ossau.uklinux.net>
6073
6074 * script.c (scm_compile_shell_switches): Make -s switch optional
6075 if file to be loaded does not begin with a `-'. (Thanks to Aaron
6076 VanDevender for the patch!)
6077
0f008a15
KR
60782003-08-30 Kevin Ryde <user42@zip.com.au>
6079
6080 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
6081 and to have non-integer types rejected as per other logical funcs.
6082
438a3ba1
KR
60832003-08-28 Kevin Ryde <user42@zip.com.au>
6084
6085 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
6086
98dceb37
KR
60872003-08-23 Kevin Ryde <user42@zip.com.au>
6088
6089 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
6090 thread safe, and could take a long time too.
6091
1fa79a38
KR
60922003-08-22 Kevin Ryde <user42@zip.com.au>
6093
6094 * numbers.c (scm_difference): Correction to bignum - negative inum.
6095
d97f9b42
KR
60962003-08-14 Kevin Ryde <user42@zip.com.au>
6097
6098 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
6099 [__GNUC__]: Use volatile asm macros rather than a function call.
6100 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
6101 macros while defining functions.
6102
6103 * simpos.c (getenv): Use <stdlib.h> for prototype.
6104 (scm_system): In docstring, refer to status:exit-val rather than
6105 "functions above".
6106
b9052fcc
KR
61072003-08-09 Kevin Ryde <user42@zip.com.au>
6108
6109 * srcprop.c (scm_source_properties): Return plist from hash if it's a
6110 list set by source-properties! rather than an SRCPROPS object,
6111
8e5b4b9e
KR
61122003-07-29 Kevin Ryde <user42@zip.com.au>
6113
6114 * properties.c (scm_primitive_property_ref): In docstring, note
6115 parameters to not-found-proc, use hyphens rather than underscores for
6116 that parameter name.
6117 (scm_primitive_property_set_x): In docstring, VAL is the value
6118 parameter not CODE.
6119
20703ac4
MV
61202003-07-27 Marius Vollmer <mvo@zagadka.de>
6121
c6ccee34
MV
6122 * print.c (scm_print_symbol_name): handle more weird characters by
6123 escaping the symbol name properly. Thanks to Paul Jarc!
6124
2f4931bf
MV
6125 * posix.h (scm_setgroups): New prototype.
6126 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
6127 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
6128 Don't use SCM_WRITABLE_VELTS.
6129
265c456f
MV
6130 * gc.h (SCM_GC_SET_CELL_BVEC): New.
6131 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
6132 Matthias Koeppe!
6133
20703ac4
MV
6134 * __scm.h (SCM_C_INLINE_KEYWORD): New.
6135 * numbers.c: Use it in place of SCM_C_INLINE so that the code
6136 compiles when SCM_C_INLINE is undefined.
6137
59c4bb82
DH
61382003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6139
6140 * __scm.h: Reformulated the architecture and compiler properties
6141 in terms of properties of scm_t_bits and SCM variables rather than
6142 in terms of c standard types. This is since it is not known which
6143 of the standard types scm_t_bits and SCM variables will be defined
6144 to.
6145
d7850c8d
KR
61462003-07-24 Kevin Ryde <user42@zip.com.au>
6147
6148 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
6149 and real.
6150
8a0c514f
KR
61512003-07-18 Kevin Ryde <user42@zip.com.au>
6152
6153 * numbers.c (scm_product): In complex * bignum, correction to
6154 REAL/IMAG fetch, x is the complex, not y.
6155
0aacf84e
MD
61562003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6157
6158 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
6159 scm_inf_p test as Scheme values.
6160 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
6161 and a positive inum.
6162 Use GNU indentation style.
6163
192de9a4
DH
61642003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
6165
6166 * values.c (scm_values): Build lists of length 1 by using
6167 scm_list_1 instead of using scm_cons.
6168
bbb4438a
KR
61692003-07-10 Kevin Ryde <user42@zip.com.au>
6170
b58c85ce
KR
6171 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
6172 * list.c (scm_list_n): Ditto.
6173
bbb4438a
KR
6174 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
6175
287f8ad1
KR
61762003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
6177
6178 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
6179 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
6180 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
6181 the other using intptr_t.
6182
005d2366
KR
61832003-07-08 Kevin Ryde <user42@zip.com.au>
6184
0aacf84e 6185 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
6186 (scm_magnitude): Use hypot.
6187
6188 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
6189 @footnote since it doesn't go through to guile-procedures.txt.
6190
6191 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
6192 outside @var to quieten makeinfo, and use @code.
6193
cbfe8e62
HWN
61942003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6195
6196 * gc-malloc.c (decrease_mtrigger): new function
6197 (increase_mtrigger): new function, separate debug registering and
6198 mtrigger administration.
6199 (scm_gc_realloc): bugfix: do mtrigger administration before the
6200 actual realloc, for the realloc might invalidate a GC-d segment of
6201 memory. Thanks to Sam Hocevar for pointing this out.
6202 (scm_gc_realloc): use scm_malloc_reregister instead of
6203 unregistering and registering in sequence.
6204
aeb4c2e1
HWN
62052003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6206
6207 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
6208
4c27f8d2
HWN
62092003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6210
6211 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6212 clauses.
6213
983e697d
MV
62142003-06-29 Marius Vollmer <mvo@zagadka.de>
6215
6216 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6217 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6218 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6219 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6220 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6221 the release_1_6 branch.
6222
78b6566e
SJ
62232003-06-25 Stefan Jahn <stefan@lkcc.org>
6224
6225 * continuations.c: Redeclaration of getcontext() via the
6226 __asm__ ("getcontext") directive.
6227
6228 * continuations.h: Include <ucontext.h> instead of
6229 <sys/ucontext.h>.
6230
1ebb8497
KR
62312003-06-21 Kevin Ryde <user42@zip.com.au>
6232
6233 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6234 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6235 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6236 available.
6237 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6238 (isfinite): Remove, conflicts with C99 isfinite().
6239
fbf85ba4
MV
62402003-06-19 Marius Vollmer <mvo@zagadka.de>
6241
6242 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6243 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6244 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6245 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6246 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6247 the release_1_6 branch.
6248
fcc5d734
SJ
62492003-06-14 Stefan Jahn <stefan@lkcc.org>
6250
6251 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6252 to be functions instead of macros.
6253
6254 * threads.c: Conditionalized inclusion of <sys/time.h> and
6255 <unistd.h>.
6256 (scm_getspecific, scm_setspecific): Made these two function
6257 real part of the API.
6258
6259 * posix.c (s_scm_putenv): Added some code to make a
6260 (putenv "FOO="), i.e. setting an empty string, work also on
6261 Win32 systems. Thanks to Kevin Ryde for the proposal.
6262
c3ae8e07
KR
62632003-06-12 Kevin Ryde <user42@zip.com.au>
6264
75b14838
KR
6265 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6266 freebsd to comment about need to use unsetenv.
c3ae8e07 6267
9d9fa092
MV
62682003-06-02 Marius Vollmer <mvo@zagadka.de>
6269
6270 * ports.c (scm_peek_char): Safe the column of the port around the
6271 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6272
f2478375
KR
62732003-06-07 Kevin Ryde <user42@zip.com.au>
6274
6275 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6276 and friends required by scm_t_bits setups.
6277
6375e040
DH
62782003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6279
6280 * tags.h (scm_tc2_int): Added.
6281
6282 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6283 scm_tc2_int.
6284
6285 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6286 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6287
f5c6ec2f
DH
62882003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6289
6290 * eval.c: Partially undid my patch from 2003-05-31. This patch
6291 caused the segfault referenced in the previous changelog entry.
6292
47dbd81e
DH
62932003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6294
6295 * tags.h: Fixed comment about the immediate type code layout.
6296
6297 * eval.c: Fixed handling of non-special instructions. Without
6298 this patch, guile will segfault on (#\0) and similar instructions.
6299
3ec52c51
KR
63002003-06-05 Kevin Ryde <user42@zip.com.au>
6301
6302 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6303 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6304
e418bd7c
KR
6305 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6306 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6307
d0624e39
DH
63082003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6309
6310 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6311 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6312 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6313 generalized it to apply not only to C level functions but also to
6314 scheme level functions.
6315
6316 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6317 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6318 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6319 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6320 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6321 respectively.
6322
6323 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6324 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6325 eval.h into eval.c and a copy is placed into deprecated.h.
6326
6327 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6328 into eval.c. This definition was not part of the API in any
6329 officially released version of guile and thus does not need to go
6330 through a phase of deprecation.
6331
e90c3a89
DH
63322003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6333
d0624e39
DH
6334 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6335 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6336 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6337 definitions are make static and renamed from scm_s_xxx to s_xxx.
6338 In deprecated.c the original definitions are copied.
6339
d0624e39
DH
6340 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6341 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6342 eval.h into eval.c and a copy (slightly modified to work in user
6343 code) is placed into deprecated.h.
6344
6345 * eval.c: Use the local static s_xxx definitions instead of the
6346 scm_s_xxx definitions throughout.
6347
14b18ed6
DH
63482003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6349
6350 This set of patches separates the representation of the cxr family
6351 of functions (car, cdr etc.) from the dsubr family of functions
6352 (i. e. functions that take a double precision floating point
6353 argument). Further, the algorithm for handling the cxr function
6354 is improved.
6355
6356 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6357 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6358 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6359 cosh, tanh), objects.c (scm_class_of), procprop.c
6360 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6361 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6362 typecode for the dsubr family of functions.
6363
6364 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6365 ramap_dsubr.
6366
6367 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6368 (scm_init_pairs): Make use of the (now usable) second cell element
6369 of a scm_tc7_cxr function to implement the cxr family of functions
6370 more efficiently.
6371
2ca0d207
DH
63722003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6373
6374 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6375 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6376 end of an if-else-if-sequence of checks.
6377
9a069bdd
DH
63782003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6379
6380 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6381 execution. Generalize apply_closure to apply_proc and use that
6382 for call-with-values.
6383
e910e9d2
DH
63842003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6385
6386 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6387 a non closure.
6388
1e498fbd
SJ
63892003-05-30 Stefan Jahn <stefan@lkcc.org>
6390
6391 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6392 appropriately for mingw32 hosts.
6393
6394 * numbers.h: Defining copysign(), isnan() and finite() to
6395 be prefixed by a single '_' for mingw32 hosts.
6396
c47e2599
KR
63972003-05-30 Kevin Ryde <user42@zip.com.au>
6398
6399 * numbers.c (z_negative_one): New variable.
6400 (scm_init_numbers): Initialize it.
6401 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6402
2e945bcc
SJ
64032003-05-29 Stefan Jahn <stefan@lkcc.org>
6404
6405 * win32-dirent.c: Use malloc() instead of scm_malloc().
6406
6407 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6408 warning.
6409
6410 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6411 mingw32 build.
6412
6413 * modules.c (s_scm_module_import_interface): Renamed local
6414 variable interface to _interface. Seems like 'interface'
6415 is a special compiler directive for the mingw32 compiler.
6416
6417 * mkstemp.c: Provide prototype to avoid compiler warning.
6418
6419 * load.c (s_scm_search_path): Fixed absolute and relative
6420 path detections for native Windows platforms.
6421
6422 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6423 to build on mingw32).
6424
6425 * gc-freelist.c ("s_scm_map_free_list",
6426 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6427
6428 * fports.c (fport_fill_input): Disable use of
6429 fport_wait_for_input() on Win32 platforms.
6430
6431 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6432
6433 * Makefile.am: Modified some rules for cross compiling.
6434
ddd8f927
DH
64352003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6436
6437 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6438 proper function object and the correct number of arguments are now
6439 performed in the application part of SCM_CEVAL.
6440
6441 (scm_badformalsp): Removed.
6442
f8ba2197
DH
64432003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6444
6445 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6446
79f55b7c
MD
64472003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6448
a502595f
MD
6449 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6450 always being false by inserting preprocessor conditional. (Thanks
6451 to Bruce Korb.)
6452
79f55b7c
MD
6453 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6454 (void *) in order to avoid an aliasing warning; thanks to Bruce
6455 Korb.)
6456
6457 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6458
6459 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6460 SCM_STACK_PTR.
6461
6462 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6463 thread->base --> t->base.
6464
6465 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6466
47dee228
MV
64672003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6468
6469 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6470 scm_variable_set_name_hint, scm_builtin_variable,
6471 scm_internal_with_fluids, scm_make_gsubr,
6472 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6473 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6474 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6475 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6476 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6477 scm_make_subr_with_generic, scm_make_subr_opt,
6478 scm_call_catching_errors, scm_make_smob_type_mfpe,
6479 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6480 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6481 branch. Some have been slightly rewritten.
6482 (scm_i_object_chars, scm_i_object_length): New, to support
6483 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6484
e681d187
DH
64852003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6486
6487 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6488 names and inits in the memoized code of do.
6489
7e59d9d4
MD
64902003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6491
6492 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6493 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6494 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6495 a compilation error if error-on-warning is enabled).
6496
9950a42c
MV
64972003-05-17 Marius Vollmer <mvo@zagadka.de>
6498
6499 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6500 removes preprocessor directives from the snarfage that might
6501 otherwise confuse us. These directives appear when compiling with
6502 "-g3", for example.
6503
0068984b
HWN
65042003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6505
26e68795
HWN
6506 * ChangeLog: add my surname
6507
0068984b
HWN
6508 * srcprop.c (scm_finish_srcprop): use
6509 scm_gc_register_collectable_memory()
6510 (scm_make_srcprops): idem.
6511
131805f0
HWN
65122003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6513
6514 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6515 wrap-around for scm_mtrigger
6516 (scm_gc_register_collectable_memory): abort on overflowing
6517 scm_mallocated().
6518
d4611024
KR
65192003-05-13 Kevin Ryde <user42@zip.com.au>
6520
6521 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6522 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6523
7aaf8dc9
MD
65242003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6525
dfd03fb9
MD
6526 * backtrace.c (scm_display_error_message): Introduced fancy
6527 printing with max level 7 and length 10. (Purpose: avoid printing
6528 gigantic objects in error messages.)
6529
6530 * print.c, print.h (scm_i_port_with_print_state): New function.
6531
6532 * print.c (scm_iprin1, scm_printer_apply,
6533 scm_port_with_print_state): Use scm_i_port_with_print_state.
6534 (scm_simple_format): Modified not to destroy print states.
6535 (print_state_mutex): New mutex.
6536 (scm_make_print_state, scm_free_print_state, scm_prin1):
6537 Lock/unlock print_state_mutex.
6538
7aaf8dc9
MD
6539 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6540 Use current names in definitions.
6541
a4d9ffa1
KR
65422003-05-10 Kevin Ryde <user42@zip.com.au>
6543
6544 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6545
d25e96a4
KR
6546 * numbers.c (scm_integer_length): On negative bignums, adjust
6547 mpz_sizeinbase to account for it looking at absolute value where we
6548 want ones-complement.
6549
6550 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6551 since we're only using the ulong return value, and x might not fit.
6552
5bf6a6f0
DH
65532003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6554
6555 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6556 read. This will allow to make the definition in read.c static.
6557
f58c472a
DH
65582003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6559
6560 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6561 from evalext to eval. This will allow to make some of the
6562 definitions in eval.c static.
6563
90382aeb
KR
65642003-05-06 Kevin Ryde <user42@zip.com.au>
6565
6566 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6567 (scm_logcount): Use mpz_com, not mpz_neg.
6568
3b88ed2a
DH
65692003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6570
6571 The purpose of this patch is to make guile's internal memoizers
6572 distinguishable from memoizing macros created on the scheme level
6573 or from user provided primitive memoizing macros. The reason is,
6574 that the internal memoizers are the only ones that are allowed to
6575 transform their scheme input into memoizer byte code, while all
6576 other memoizing macros may only transform scheme code into new
6577 scheme code.
6578
6579 To achieve this, a new macro type 'builtin-macro!' is introduced.
6580 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6581 this will change when the memoizer and executor are separated.
6582
6583 * macros.[ch] (scm_i_makbimacro): New.
6584
6585 * macros.h (SCM_BUILTIN_MACRO_P): New.
6586
6587 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6588
6589 * eval.c, goops.c: All of guile's primitive memoizing macros are
6590 primitive builtin-macros now.
6591
6592 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6593 builtin-macros are handled equally to memoizing macros.
6594
b0780eb1
MV
65952003-05-04 Marius Vollmer <mvo@zagadka.de>
6596
6597 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6598 work around a bug in GCC 2.95.2 but is now a bug in itself.
6599
1cbf4fe9
MV
66002003-05-02 Marius Vollmer <mvo@zagadka.de>
6601
6602 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6603 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6604 scm_tcs_symbols): New.
6605
1a61d41b
MV
66062003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6607
096ecbaf
MV
6608 * deprecated.h, deprecated.c (scm_protect_object,
6609 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6610 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6611 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6612 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6613 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6614 scm_ptob_descriptor, scm_port_rw_active,
6615 scm_close_all_ports_except): New.
6616
1a61d41b
MV
6617 * ports.c (scm_c_port_for_each): New function, mostly copied from
6618 scm_port_for_each.
6619 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6620 * ports.h (scm_c_port_for_each): New prototype.
6621
c8e1d354
MD
66222003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6623
6624 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6625 macro was introduced in anticipation of GOOPS method compilation
6626 code.)
6627
6628 * goops.c: Removed binding of @dispatch.
6629
a4aa2134
DH
66302003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6631
6632 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6633 instructions that bind the macros on the scheme level back to
6634 goops.c in order to make sure again that the bindings go into the
6635 (oop goops) module and are not visible from the outside.
6636
9fbee57e
DH
66372003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6638
6639 * eval.c: Non functional change: Separated R5RS and non-R5RS
6640 macros into different sections of the file and ordered the
6641 memoizers alphabetically.
6642
12841895
DH
66432003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6644
6645 * eval.c (scm_ilookup): Rewritten to improve readability.
6646
6a3f13f0
DH
66472003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6648
6649 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6650 Partially reverted patch from 2003-04-23 in oder to find a better
6651 compromise between readability and debuggability.
6652
b0c5d67b
DH
66532003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6654
6655 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6656 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6657 definitions of the special goops memoizers from goops.[ch] to
6658 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6659 throughout guile.
6660
b9ad392e
MD
66612003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6662
6663 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6664
6665 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6666
6667 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6668
6669 * ioext.c (scm_fdes_to_ports): Ditto.
6670
6671 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6672 lock/unlock scm_i_port_table_mutex.
6673
6674 * strports.c (scm_mkstrport): Ditto.
6675
6676 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6677
6678 * fports.c (scm_fdes_to_port): Ditto.
6679
d0b07b5d
DH
66802003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6681
6682 This set of patches contains no functional changes, only debatable
6683 minor stylistic ones. Still, in order to prepare a patch between
6684 my local copy and the CVS version, I decided to submit the changes
6685 below. Then, the patch will hopefully only contain relevant
6686 modifications :-)
6687
6688 * eval.c (iqq): Added const specifier.
6689
6690 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6691 Use NULL instead of 0 to indicate that a pointer is returned.
6692 Removed some misleading 'fall through' comments.
6693
6694 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6695 Split up long expressions into smaller ones to be more debugging
6696 friendly.
6697
a98e8e98
DH
66982003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6699
6700 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6701 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6702 rather than casting to SCM.
6703
c178c3a6
DH
67042003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6705
6706 * sort.c, pairs.h: Removed unnecessary includes.
6707
d339981a
DH
67082003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6709
6710 * sort.c: Replaced hand-made trampline code by the new official
6711 mechanism from eval.c. This fixes a segfault in the new test file
6712 sort.test.
6713
6714 (quicksort, compare_function, scm_restricted_vector_sort_x,
6715 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6716 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6717 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6718 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6719 eval.c.
6720
6721 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6722 cmp_fun_t): Removed.
6723
6724 (compare_function): Added.
6725
6726 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6727 arithmetics with index arithmetics. Changed quicksort to work on
6728 an array of SCM values instead of an array of characters. Avoid
6729 bytewise copying of SCM elements. Avoid allocating memory on the
6730 stack with alloca. Fixed some comments.
6731
821f18a4
DH
67322003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6733
6734 * eval.c (EXTEND_ENV): Eliminated.
6735
6736 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6737 EXTEND_ENV.
6738
94fb5a6e
DH
67392003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6740
6741 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6742
6743 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6744 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6745
6746 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6747 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6748 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6749 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6750 functions such that they check if the object is a non-immediate.
6751 Further, renamed identifiers to use the scm_dbg_ prefix and made
6752 their inclusion into the lib dependent of the
6753 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6754
fce0b22d
DH
67552003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6756
6757 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6758 debug option.
6759
1685446c
DH
67602003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6761
821f18a4 6762 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6763 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6764 any calls to SCM_NCONSP any more.
6765
6766 * unif.c (l2ra): Eliminate redundant check.
6767
9ff1720f
DH
67682003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6769
6770 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6771 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6772 SCM_NNULLP. Now, guile itself does not include any calls to
6773 SCM_NNULLP any more.
6774
05b15362
DH
67752003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6776
6777 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6778 scm_copy_tree): Place assignment expressions which are part of
6779 other expressions into an expression of their own.
6780
0c88d7df
DH
67812003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6782
6783 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6784 compare SCM values with !=.
6785
5cb22e96
DH
67862003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6787
6788 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6789 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6790 and definition of the memoizer for the generalized set! macro from
6791 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6792 define the macro object.
6793
6794 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6795 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6796 eval.c, it is made static and renamed to s_set_x.
6797
6798 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6799 over SCM_N<foo>.
6800
a44a9715
DH
68012003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6802
6803 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6804 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6805 to undefineds and registered the object as a permanent object.
6806
6807 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6808 static in eval.c, renamed it to f_apply and registered the object
6809 as a permanent object.
6810
1b43d24c
DH
68112003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6812
5cb22e96 6813 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6814 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6815
aec16f99
DH
68162003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6817
6818 * numbers.c (scm_logtest): Fixed argument bug in the call to
6819 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6820
f96460ce
DH
68212003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6822
6823 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6824 type errors that showed up when compiling with SCM_DEBUG defined.
6825
d0f6ceb8
DH
68262003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6827
6828 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6829 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6830 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6831 fix compile errors with --disable-deprecated.
6832
19a7a089
RB
68332003-04-17 Rob Browning <rlb@defaultvalue.org>
6834
6835 * numbers.c (scm_integer_expt): fix case where we were declaring
6836 vars in the middle of a statement block. Thanks to Thamer
6837 Al-Harbash.
6838
47cd67db
MD
68392003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6840
0fd7dcd3
MD
6841 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6842 change.
6843
47cd67db
MD
6844 * eq.c (scm_eqv_p): Turned into a primitive generic.
6845
3b8b889c
RB
68462003-04-16 Rob Browning <rlb@defaultvalue.org>
6847
312006bb
RB
6848 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6849 Thanks to Boyd Gerber.
6850 Added check for __arm__ in addition to arm for LINUX and copied
6851 __s390__ defines from upstream libgc. Thanks to James Treacy for
6852 reporting the problems.
c7ef2ea1 6853
3b8b889c
RB
6854 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6855
6856 * socket.c: use SCM_CHAR_BIT.
6857
6858 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6859
6860 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6861
43261b39
MD
68622003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6863
6864 * feature.c (scm_init_feature): Always add threads feature.
6865
58241edc
MD
68662003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6867
6868 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6869 scm_at_assert_bound_ref. (We don't want the unbound check. See
6870 oop/goops/active-slot.scm.)
6871
94e91275
RB
68722003-04-14 Rob Browning <rlb@defaultvalue.org>
6873
6874 * tags.h: scm_t_intptr should have been intptr_t.
6875
3071ea27
RB
68762003-04-13 Rob Browning <rlb@defaultvalue.org>
6877
6878 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6879 test. Instead use
6880 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6881 as gc_os_dep.c suggests is appropriate.
6882
6883 * goops.c (prep_hashsets): make static to match prototype.
6884 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6885 Chin.
6886
6887 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6888 Albert Chin.
6889
6890 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6891 Klausner.
6892
21ab2aeb
MD
68932003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6894
6895 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6896 indicated through extra fields in getters-n-setters.
6897 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6898 (Thanks to Andy Wingo.)
6899
dff96e95
HWN
69002003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6901
6902 * gc-segment.c: add comment
6903
07921c76
RB
69042003-04-07 Rob Browning <rlb@defaultvalue.org>
6905
b5331f10
RB
6906 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6907 clash.
6908
07921c76
RB
6909 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6910 and add regression test to standalone/.
6911
69122003-04-06 Rob Browning <rlb@defaultvalue.org>
6913
6914 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6915 Thanks to Dale P. Smith.
6916
6917 * random.c: #include gmp.h.
6918 (scm_c_random_bignum): normalize result on return.
6919
6920 * init.c: #include gmp.h.
6921
6922 * numbers.h: remove the gmp.h #include (not needed now).
6923
6924 * posix.h: change occurences of "id" to something else so we don't
6925 cause trouble when included via objective-c (can't hurt, might
6926 help). Still have usage in debug.h, though.
6927
938f6b7c
MD
69282003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6929
372691d8
MD
6930 * random.c (scm_c_random_bignum): Don't generate a random number
6931 equal to m (the second argument of scm_c_random_bignum); only
6932 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6933 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6934 scm_var_random_state.
372691d8 6935
938f6b7c
MD
6936 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6937 clause.
6938
6cdb8c3f
RB
69392003-04-05 Rob Browning <rlb@defaultvalue.org>
6940
938f6b7c 6941 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6942 uses before any code.
6943
15635be5
MD
69442003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6945
1ecfd013
MD
6946 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6947 not top_srcdir.
6948
15635be5
MD
6949 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6950 processing it in order to avoid an infinite loop.
6951
6952 * print.c (scm_prin1): Remember old state of pstate->writingp.
6953
73be1d9e
MV
69542003-04-05 Marius Vollmer <mvo@zagadka.de>
6955
6956 * Changed license terms to the plain LGPL thru-out.
6957
ad815c06
RB
69582003-04-04 Rob Browning <rlb@defaultvalue.org>
6959
6960 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6961 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6962 rewrite to handle GMP bignums.
6963
6964
6965 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6966
6967 * ports.c (scm_getc): minor tweak.
6968
6969 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6970 rewrite to handle GMP bignums.
6971
6972 * numbers.c: rewrite *many* functions to handle GMP bignums.
6973
6974 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6975 handle GMP bignums.
6976
6977 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6978
6979 * init.c (check_config): remove SCM_BIGDIG conditionals.
6980 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6981
6982 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6983
6984 * eval.c: remove SCM_BIGDIG conditionals.
6985
6986 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6987
6cdb8c3f
RB
69882003-03-31 Rob Browning <rlb@defaultvalue.org>
6989
6990 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6991 to Kevin Ryde.)
6992
69932003-03-27 Rob Browning <rlb@defaultvalue.org>
6994
6995 * threads.h: fix various preprocessor usages of new public
6996 symbols to expect 0 or 1 values rather than 1 or undefined.
6997 i.e. change #ifdef to #if, etc.
6998
6999 * threads.c: fix various preprocessor usages of new public
7000 symbols to expect 0 or 1 values rather than 1 or undefined.
7001 i.e. change #ifdef to #if, etc.
7002
7003 * tags.h: fix various preprocessor usages of new public
7004 symbols to expect 0 or 1 values rather than 1 or undefined.
7005 i.e. change #ifdef to #if, etc.
7006
7007 * stacks.c: fix various preprocessor usages of new public
7008 symbols to expect 0 or 1 values rather than 1 or undefined.
7009 i.e. change #ifdef to #if, etc.
7010
7011 * stackchk.h: fix various preprocessor usages of new public
7012 symbols to expect 0 or 1 values rather than 1 or undefined.
7013 i.e. change #ifdef to #if, etc.
7014
7015 * stackchk.c: fix various preprocessor usages of new public
7016 symbols to expect 0 or 1 values rather than 1 or undefined.
7017 i.e. change #ifdef to #if, etc.
7018
7019 * sort.c: fix various preprocessor usages of new public
7020 symbols to expect 0 or 1 values rather than 1 or undefined.
7021 i.e. change #ifdef to #if, etc.
7022
7023 * read.c: fix various preprocessor usages of new public
7024 symbols to expect 0 or 1 values rather than 1 or undefined.
7025 i.e. change #ifdef to #if, etc.
7026
7027 * random.c: fix various preprocessor usages of new public
7028 symbols to expect 0 or 1 values rather than 1 or undefined.
7029 i.e. change #ifdef to #if, etc.
7030
7031 * print.c: fix various preprocessor usages of new public
7032 symbols to expect 0 or 1 values rather than 1 or undefined.
7033 i.e. change #ifdef to #if, etc.
7034
7035 * objects.c: fix various preprocessor usages of new public
7036 symbols to expect 0 or 1 values rather than 1 or undefined.
7037 i.e. change #ifdef to #if, etc.
7038
7039 * numbers.h: fix various preprocessor usages of new public
7040 symbols to expect 0 or 1 values rather than 1 or undefined.
7041 i.e. change #ifdef to #if, etc.
7042
7043 * null-threads.c: fix various preprocessor usages of new public
7044 symbols to expect 0 or 1 values rather than 1 or undefined.
7045 i.e. change #ifdef to #if, etc.
7046
7047 * lang.c: fix various preprocessor usages of new public
7048 symbols to expect 0 or 1 values rather than 1 or undefined.
7049 i.e. change #ifdef to #if, etc.
7050
7051 * lang.h: fix various preprocessor usages of new public
7052 symbols to expect 0 or 1 values rather than 1 or undefined.
7053 i.e. change #ifdef to #if, etc.
7054
7055 * iselect.h: fix various preprocessor usages of new public
7056 symbols to expect 0 or 1 values rather than 1 or undefined.
7057 i.e. change #ifdef to #if, etc.
7058
7059 * init.c: fix various preprocessor usages of new public
7060 symbols to expect 0 or 1 values rather than 1 or undefined.
7061 i.e. change #ifdef to #if, etc.
7062
7063 * gh_data.c: fix various preprocessor usages of new public
7064 symbols to expect 0 or 1 values rather than 1 or undefined.
7065 i.e. change #ifdef to #if, etc.
7066
7067 * gh.h: fix various preprocessor usages of new public
7068 symbols to expect 0 or 1 values rather than 1 or undefined.
7069 i.e. change #ifdef to #if, etc.
7070
7071 * gen-scmconfig.c: change most new public symbols to be defined to
7072 0 or 1 rather than being either 1 or undefined.
7073
7074 * gc_os_dep.c: fix various preprocessor usages of new public
7075 symbols to expect 0 or 1 values rather than 1 or undefined.
7076 i.e. change #ifdef to #if, etc.
7077 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
7078
7079 * gc.h: fix various preprocessor usages of new public
7080 symbols to expect 0 or 1 values rather than 1 or undefined.
7081 i.e. change #ifdef to #if, etc.
7082
7083 * gc-card.c: fix various preprocessor usages of new public
7084 symbols to expect 0 or 1 values rather than 1 or undefined.
7085 i.e. change #ifdef to #if, etc.
7086
7087 * gc-mark.c: fix various preprocessor usages of new public
7088 symbols to expect 0 or 1 values rather than 1 or undefined.
7089 i.e. change #ifdef to #if, etc.
7090
7091 * feature.c: fix various preprocessor usages of new public
7092 symbols to expect 0 or 1 values rather than 1 or undefined.
7093 i.e. change #ifdef to #if, etc.
7094
7095 * evalext.c: fix various preprocessor usages of new public
7096 symbols to expect 0 or 1 values rather than 1 or undefined.
7097 i.e. change #ifdef to #if, etc.
7098
7099 * eval.h: fix various preprocessor usages of new public
7100 symbols to expect 0 or 1 values rather than 1 or undefined.
7101 i.e. change #ifdef to #if, etc.
7102
7103 * eval.c: fix various preprocessor usages of new public
7104 symbols to expect 0 or 1 values rather than 1 or undefined.
7105 i.e. change #ifdef to #if, etc.
7106
7107 * eq.c: fix various preprocessor usages of new public
7108 symbols to expect 0 or 1 values rather than 1 or undefined.
7109 i.e. change #ifdef to #if, etc.
7110
7111 * coop.c: fix various preprocessor usages of new public
7112 symbols to expect 0 or 1 values rather than 1 or undefined.
7113 i.e. change #ifdef to #if, etc.
7114
7115 * coop-threads.c: fix various preprocessor usages of new public
7116 symbols to expect 0 or 1 values rather than 1 or undefined.
7117 i.e. change #ifdef to #if, etc.
7118
7119 * coop-pthreads.c: fix various preprocessor usages of new public
7120 symbols to expect 0 or 1 values rather than 1 or undefined.
7121 i.e. change #ifdef to #if, etc.
7122
7123 * coop-defs.h: fix various preprocessor usages of new public
7124 symbols to expect 0 or 1 values rather than 1 or undefined.
7125 i.e. change #ifdef to #if, etc.
7126
7127 * convert.i.c: fix various preprocessor usages of new public
7128 symbols to expect 0 or 1 values rather than 1 or undefined.
7129 i.e. change #ifdef to #if, etc.
7130
7131 * continuations.c: fix various preprocessor usages of new public
7132 symbols to expect 0 or 1 values rather than 1 or undefined.
7133 i.e. change #ifdef to #if, etc.
7134
7135 * _scm.h: fix various preprocessor usages of new public symbols to
7136 expect 0 or 1 values rather than 1 or undefined. i.e. change
7137 #ifdef to #if, etc.
7138
d11d697a
MV
71392003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7140
9686f86d
MV
7141 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
7142
7143 * deprecated.c, deprecated.h: New files, to collect deprecated
7144 things in one place.
7145 * Makefile.am: Added them in all the right places.
7146
d11d697a
MV
7147 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
7148 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
7149 builds work.
9686f86d
MV
7150 (DOT_X_FILES): Removed "iselect.x".
7151 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 7152
e3c0c3b9
RB
71532003-03-25 Rob Browning <rlb@defaultvalue.org>
7154
7155 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
7156 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
7157
7158 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
7159
7160 * vports.c: #include <config.h> if HAVE_CONFIG_H.
7161
7162 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
7163 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7164
7165 * threads.h: replace usage of struct timespect with
7166 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
7167 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
7168 favor of scm_t_timespec from scmconfig.h.
7169
7170 * threads.c: move libguile/_scm.h include to the top so we pick up
7171 any critical defines like _GNU_SOURCE early. Replace usage of
7172 struct timespect with scm_t_timespec. Replace usage of
7173 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
7174 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
7175
7176 * threads-plugin.h: replace usage of struct timespect with
7177 scm_t_timespec.
7178
7179 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
7180 usage of struct timespect with scm_t_timespec.
7181
7182 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
7183 HAVE_INTTYPES_H handling to scmconfig.h. #include
7184 "libguile/__scm.h". Rework handling for scm_t_bits,
7185 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7186 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
7187 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
7188 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
7189 SCM_HAVE_ARRAYS.
7190
7191 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
7192
7193 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7194
7195 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7196
7197 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7198
7199 * stime.h: move handling of time related headers to scmconfig.h.
7200
7201 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7202
7203 * stacks.c: replace usage of STACK_GROWS_UP with
7204 SCM_STACK_GROWS_UP.
7205
7206 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7207 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7208
7209 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7210 of uint32 and HAVE_UINT_32 with scm_t_int32.
7211
7212 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7213
7214 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7215
7216 * script.c: #include <config.h> if HAVE_CONFIG_H.
7217
7218 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7219
7220 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7221
7222 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7223
7224 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7225
7226 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7227
7228 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7229
7230 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7231 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7232 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7233 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7234
7235 * ramap.c: replace usage of HAVE_LONG_LONGS with
7236 "SCM_SIZEOF_LONG_LONG != 0".
7237
7238 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7239 "libguile/scmconfig.h".
7240
7241 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7242
7243 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7244 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7245
7246 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7247
7248 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7249
7250 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7251
7252 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7253 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7254 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7255 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7256 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7257 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7258 "SCM_SIZEOF_LONG_LONG != 0".
7259
7260 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7261 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7262 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7263 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7264
7265 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7266
7267 * null-threads.h: replace usage of struct timespect with
7268 scm_t_timespec.
7269
7270 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7271
7272 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7273 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7274 scm_t_uint64 and rename usages.
7275
7276 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7277
7278 * load.c: #include <config.h> if HAVE_CONFIG_H.
7279
7280 * iselect.h: move handling of time related headers to scmconfig.h.
7281 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7282 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7283 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7284
7285 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7286 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7287 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7288
7289 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7290
7291 * inline.h: #include "libguile/__scm.h" at the top. Change code
7292 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7293 what to do instead of creating a new public #define. Rename usage
7294 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7295 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7296 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7297
7298 * inline.c: rearrange handling -- now we just #define
7299 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7300 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7301 appropriate, and we use that in inline.h along with the above
7302 define to determine how to respond.
7303
7304 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7305 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7306
7307 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7308
7309 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7310 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7311
7312 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7313
7314 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7315
7316 * gen-scmconfig.c: new file -- see comments in file for details.
7317
7318 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7319
7320 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7321 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7322
7323 * gc.h: replace usage of SIZEOF_LONG with
7324 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7325 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7326 since we handle that in scmconfig.h now.
7327
7328 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7329
7330 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7331 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7332 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7333
7334 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7335
7336 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7337 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7338
7339 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7340
7341 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7342
7343 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7344 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7345
7346 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7347
7348 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7349 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7350
7351 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7352 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7353 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7354 with "SCM_SIZEOF_LONG_LONG != 0".
7355
7356 * error.c: #include <config.h> if HAVE_CONFIG_H.
7357
7358 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7359 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7360 with "SCM_SIZEOF_LONG_LONG != 0".
7361
7362 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7363
7364 * coop.c: replace usage of struct timespect with scm_t_timespec.
7365 #include <config.h> if HAVE_CONFIG_H.
7366
7367 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7368 usage of struct timespect with scm_t_timespec. Replace usage of
7369 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7370
7371 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7372 usage of struct timespect with scm_t_timespec. Replace usage of
7373 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7374
7375 * coop-defs.h: move handling of time related headers to
7376 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7377 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7378 timespect with scm_t_timespec.
7379
7380 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7381
7382 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7383
7384 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7385 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7386
7387 * continuations.c: move libguile/_scm.h include to the top so we
7388 pick up any critical defines like _GNU_SOURCE early.
7389
7390 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7391
7392 * async.c: #include <config.h> if HAVE_CONFIG_H.
7393
7394 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7395
7396 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7397 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7398
7399 * __scm.h: move libguile/scmconfig.h include up to the top, so
7400 we're sure to pick up any critical defines like _GNU_SOURCE early.
7401 #include <limits.h> removed in favor of scmconfig.h inclusion when
7402 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7403 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7404 scmconfig.h inclusion when appropriate. Various Win32 related
7405 definitions removed in favor of scmconfig.h inclusion when
7406 appropriate.
7407 (HAVE_UINTPTR_T): definition removed (see NEWS).
7408 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7409 (HAVE_LONG_LONGS): definition removed (see NEWS).
7410 (HAVE_LONG_LONG): definition removed (see NEWS).
7411 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7412
7413 * Makefile.am: scmconfig.h is now generated by building and
7414 running gen-scmconfig.h and capturing its output. gen-scmconfig
7415 uses config.h and the configure.in generated gen-scmconfig.h to
7416 decide what to output. See gen-scmconfig.c for details.
7417 (noinst_PROGRAMS): add gen-scmconfig.
7418 (gen_scmconfig_SOURCES): new variable.
7419 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7420 cross-compiling right.
7421 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7422 (BUILT_SOURCES): add scmconfig.h.
7423
25e0bf97
MV
74242003-03-19 Marius Vollmer <mvo@zagadka.de>
7425
7426 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7427 Adrian Bunk. Thanks!
7428
74b6d6e4
MD
74292003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7430
7431 * goops.c (make_class_from_template): New fourth arg:
7432 applicablep.
7433 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7434 cpls.
7435
7436 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7437
7438 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7439 second arg: applicablep.
7440 (scm_i_inherit_applicable): New function.
7441
7442 * goops.c, goops.h (scm_class_applicable,
7443 scm_class_extended_accessor): New classes.
7444
5c9e7dad
DH
74452003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7446
7447 * procs.c (scm_procedure_documentation): Removed redundant
7448 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7449 predicates.
7450
f8af5c6d
MD
74512003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7452
c614a00b
MD
7453 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7454
109c2c9f
MD
7455 * modules.c (scm_module_import_interface): New function.
7456
f8af5c6d
MD
7457 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7458 scm_class_accessor.
7459 (scm_class_accessor): New class.
7460
a48d60b1
MD
74612003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7462
7463 * goops.c (scm_primitive_generic_generic): Enable primitive
7464 generic if not enabled.
7465 (scm_sys_goops_loaded): Setup unextended primitive generics.
7466
7467 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7468
7469 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7470 snarf macros.
7471
7472 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7473 testing example. All uses of SCM_GPROC should be converted.)
7474
7475 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7476 scm_assoc.
7477
7478 * eq.c (scm_equal_p): Turned into a primitive generic.
7479
84edc049
RB
74802003-02-27 Rob Browning <rlb@defaultvalue.org>
7481
7482 * Makefile.am (scmconfig.h): new target -- generate file from
7483 ../config.h.
7484 (modinclude_HEADERS): remove version.h.
7485 (nodist_modinclude_HEADERS): add version.h.
7486
ea5c9285
MD
74872003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7488
b4a1358c
MD
7489 This fixes a serious GC bug, introduced during the latest
7490 reorganization of the GC, which disabled freeing of structs and
7491 GOOPS objects:
7492
7493 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7494 SCM_EOL.
53af8255
MD
7495 (scm_struct_prehistory): Move scm_free_structs to
7496 scm_before_mark_c_hook.
ea5c9285 7497
b4a1358c
MD
7498 * gc-card.c (sweep_card): Check that we haven't swept structs on
7499 this card before. That can happen if scm_i_sweep_all_segments has
7500 been called from some other place than scm_igc.
7501
c35738c1
MD
75022003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7503
231a4ea8
MD
7504 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7505 (since hash tables now adapt their size).
7506
7507 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7508 (current number of prehistory bindings; hashtable code will select
7509 a prime which is greater than this value).
7510
7511 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7512 (current number of initial symbols).
7513
7514 * properties.c (scm_init_properties): Don't specify size of
7515 scm_properties_whash.
7516
7517 * objprop.c (scm_init_objprop): Don't specify size of
7518 scm_object_whash.
7519
7520 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7521
c35738c1
MD
7522 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7523
7524 The following changes introduce the use of resizable hash tables
7525 throughout Guile. It also renames the old *-hash-table* functions
7526 to *-alist-vector* and places them, together with the rest of the
7527 weak vector support, in the module (ice-9 weak-vector). We should
7528 probably introduce a new, better, API for weak references, for
7529 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7530 look like and are used like ordinary pairs.)
7531
7532 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7533 leaf_environment_fold, obarray_remove_all): Use hashtable
7534 accessors.
7535
7536 * gc.c (scm_init_storage): Moved hook initialization to
7537 scm_storage_prehistory.
7538 (scm_storage_prehistory): New function.
7539 (scm_igc): Added commentary about placement of
7540 scm_after_sweep_c_hook.
7541
7542 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7543 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7544 SCM_WVECT_WEAK_VALUE_P.
7545
7546 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7547 functions.
7548 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7549 Removed.
7550 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7551 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7552
7553 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7554 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7555
7556 * modules.c (module-reverse-lookup): Use hashtable accessors.
7557
7558 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7559
7560 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7561 scm_make_weak_value_alist_vector,
7562 scm_make_doubly_weak_alist_vector): New functions.
7563
7564 * weaks.c (scm_init_weaks_builtins): New function.
7565
7566 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7567 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7568 SCM_WVECT_NOSCAN_P): New macros.
7569
7570 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7571 and SCM_WVECT_WEAK_VALUE_P.
7572
7573 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7574 allocate_weak_vector and exported.
7575
0a4c1355
MD
75762003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7577
7578 * hashtab.c: Undid thread safety. (We decided that it's better to
7579 let the user explicitly protect the tables (or not) according what
7580 is suitable for the application.)
7581
87ca11ff
MD
75822003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7583
7584 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7585 thread safe and handle resizing tables.
7586 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7587 SCM_DEFER/ALLOW_INTS.
7588
f59a096e
MD
75892003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7590
7591 * hashtab.c (scm_vector_to_hash_table,
7592 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7593 functions.
7594 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7595 safe and handle resizing tables.
7596
7597 * weaks.c (scm_make_weak_key_hash_table,
7598 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7599 Size argument made optional. Return resizable table if not
7600 specified.
7601
4b612c5b
MD
76022003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7603
7604 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7605 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7606
b3d7f6df
MD
76072003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7608
7609 * debug.c (scm_procedure_source): Handle all objects for which
7610 procedure? is #t. (Thanks to Bill Schottstaedt.)
7611
756414cf
MD
76122003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7613
361d631f
MD
7614 * futures.c (mark_futures): Don't need to mark data of recycled
7615 futures.
7616 (scan_futures, cleanup_undead): Be smarter about marking
7617 futures---avoid unnecessary passes through future lists.
7618
756414cf
MD
7619 * futures.h, futures.c: New files; Introduced recycling of
7620 futures. For fine-grained threading this lifts performance to
7621 another level. We can now use parallelization in inner loops of
7622 Guile programs without impossible overhead.
7623
7624 * threads.h, threads.c: Moved futures to their own file.
7625
7626 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7627 (DOT_X_FILES): Added futures.x.
7628 (DOT_DOC_FILES): Added futures.doc.
7629 (modinclude_HEADERS): Added futures.h.
7630
7631 * threads.c, threads.h (scm_i_create_thread): Renamed from
7632 create_thread and made global.
7633
7634 * futures.c (scm_make_future): New procedure.
7635
7636 * eval.c: #include "libguile/futures.h".
7637
7638 * init.c: #include "futures.h"
7639 (scm_init_guile_1): Call scm_init_futures.
7640
7641 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7642
7643 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7644
7645 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7646 functions.
7647
7648 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7649
b4debead
MD
76502003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7651
7652 * threads.c (create_thread): Don't unwind dynwind chain of parent
7653 thread before creation. Just start the new thread with an empty
7654 dynwind chain.
7655
93f26b7b
MD
76562003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7657
7658 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7659
38d8927c
MD
76602003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7661
41c96c32
MD
7662 * threads.c (scm_timed_wait_condition_variable): Support timed
7663 waiting also for simple condition variables.
7664
38d8927c
MD
7665 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7666 of calling the procedure change-object-class.
7667
9cf5d9b7
MD
76682003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7669
7670 * ramap.c (scm_ramapc): Typo in error message.
7671
bbf8d523
MD
76722003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7673
b46fae00
MD
7674 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7675 slots with instance allocation.
7676
bbf8d523
MD
7677 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7678 class.
7679 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7680
7681 * goops.c (scm_generic_function_methods): Support extended
7682 generic functions.
7683
ebf9b47c
MD
76842002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7685
7686 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7687 Thanks to Neil for pointing this out!
ebf9b47c 7688
14a9ba3f
NJ
76892002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7690
7691 * lang.h: Remove declarations matching definitions removed from
7692 lang.c (just below).
7693
c6a040a8
NJ
76942002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7695
6054d805
NJ
7696 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7697 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7698 and already commented out.
7699
c6a040a8
NJ
7700 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7701 scm_lreadparen): Support reading vectors with Elisp syntax if
7702 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7703 is not currently defined, and there isn't even a configure switch
7704 to enable it yet.)
7705
3742c12f
MV
77062002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7707
7708 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7709 builds work.
7710 (EXTRA_DIST): Added version.h.in.
7711
fb50ef08
MD
77122002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7713
7714 This change makes it possible for one thread to do lazy sweeping
7715 while other threads are running. Now only the mark phase need to
7716 have all threads asleep. We should look further into this issue.
7717 Presently, I've put the locking of scm_i_sweep_mutex at
7718 "conservative" places due to my current lack of knowledge about
7719 the garbage collector. Please feel free to restrict these regions
7720 further to allow for maximal parallelism!
7721
7722 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7723
7724 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7725 scm_gc_register_collectable_memory): Substitute locking of
7726 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7727 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7728 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7729 the single-thread section (which now only contains the mark
7730 phase).
7731 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7732 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7733
7734 * threads.c (gc_section_mutex): Removed.
7735
9ed24633
MD
77362002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7737
0d48aca5
MD
7738 * threads.c (create_thread): Clear parent field in root state in
7739 order not to unnecessarily remember dead threads.
7740
9ed24633
MD
7741 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7742 (scm_trampoline_1, scm_trampoline_2): Use them.
7743
29717c89
MD
77442002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7745
7746 Partial introduction of real plugin interface.
7747
7748 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7749 (EXTRA_DIST): Added threads-plugin.c.
7750
7751 * threads-plugin.h, threads-plugin.c: New files.
7752
7753 * threads.h: #include "libguile/threads-plugin.h".
7754
7755 * threads.c: #include "libguile/threads-plugin.c".
7756
7757 * pthread-threads.c: Temporarily remove debugging functions.
7758
7759 * threads.c, threads.h (scm_yield): Added back.
7760
e29e0b09
MD
77612002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7762
7763 * threads.c (really_launch): Detach before unlocking
7764 thread_admin_mutex in order not to risk being joined.
7765 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7766 thread_admin_mutex locked during GC.
7767
7768 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7769 functions.
7770
0b6843b1 77712002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7772
6da2dfc4
MD
7773 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7774 support for debugging mutex operations.
7775
1b92fb6b
MD
7776 * threads.c (scm_thread): Removed filed joining_threads.
7777 (thread_print): Print thread number as well as address of thread
7778 structure.
0b6843b1
MD
7779 (scm_join_thread): Bugfix.
7780 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7781 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7782 scm_broadcast_condition_variable): Use the low-level API.
7783 (scm_all_threads): Return copy of thread list (to prevent
7784 unintended destruction).
7785 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7786
93cd4dcd
MD
7787 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7788 pthread "native" recursive mutex support.
7789
2ff4f181
MD
77902002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7791
28d52ebb
MD
7792 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7793 Simply lock a thread C API recursive mutex.
7794 (SCM_NONREC_CRITICAL_SECTION_START,
7795 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7796 SCM_REC_CRITICAL_SECTION_END): Removed.
7797
7798 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7799 direct calls to scm_rec_mutex_lock / unlock around the three calls
7800 to scm_m_expand_body.
7801
7802 * eval.c, eval.h (promise_free): New function.
7803 (scm_force): Rewritten; Now thread-safe; Removed
7804 SCM_DEFER/ALLOW_INTS.
7805
7806 * pthread-threads.h: Added partially implemented plugin interface
7807 for recursive mutexes. These are, for now, only intended to be
7808 used internally within the Guile implementation.
7809
7810 * pthread-threads.c: New file.
7811
7812 * threads.c: Conditionally #include "pthread-threads.c".
7813
7814 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7815 thread-safe;
7816
7817 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7818 SCM_GLOBAL_REC_MUTEX): New macros.
7819
7820 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7821 macros---use mutexes instead.
7822
7823 * tags.h (SCM_IM_FUTURE): New tag.
7824
7825 * eval.c (scm_m_future): New primitive macro.
7826 (SCM_CEVAL): Support futures.
7827 (unmemocopy): Support unmemoization of futures.
7828
7829 * print.c (scm_isymnames): Name of future isym.
7830
2ff4f181
MD
7831 * version.c: Unmade some changes to my private copy that got
7832 committed by mistake.
7833
392d2833
MD
78342002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7835
e200ddee
MD
7836 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7837 2002-12-10.
7838
392d2833
MD
7839 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7840
7841 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7842 logical place.
7843
7844 * threads.c (create_thread): Remember root object until the handle
7845 of the new thread is on all_threads list.
7846
7847 * root.c (scm_make_root): Moved copying of fluids until after
7848 creation of root handle so that the fluids are GC protected. Also
7849 removed the critical section.
7850
c4c52ebe
MD
78512002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7852
960c408c
MD
7853 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7854
3cdde9d6 7855 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7856 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7857 (scm_realloc): Serialize call to realloc
7858 (scm_calloc): Same for calloc.
7859 Thanks to Wolfgang Jaehrling!
7860 (Now we have to make sure all calls to malloc/realloc are made
7861 through scm_malloc.)
7862
960c408c
MD
7863 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7864
c4c52ebe
MD
7865 * threads.c (really_launch): Release heap (to prevent deadlock).
7866 (create_thread): Release heap before locking thread admin mutex.
7867
b0dc3d71
MD
78682002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7869
7870 * threads.c (scm_i_thread_invalidate_freelists): New
7871 function.
7872
7873 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7874
7875 * modules.c (scm_export): Inserted a return statement.
7876
06e80f59
HWN
78772002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7878
7879 * modules.c (scm_export): new function
7880
7881 * gc-card.c: add a note about malloc()/free() overhead.
7882
a12611c3
MD
78832002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7884
7885 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7886 in srcdir.
7887
c7fabadf
MD
78882002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7889
7890 These changes remove scm_ints_disabled (which hasn't has any
7891 effect in Guile for quite some time).
7892
7893 * async.c, error.h (scm_ints_disabled): Removed.
7894
7895 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7896 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7897 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7898 (old_ints): Removed.
7899
7900 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7901 critical section.
7902 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7903 SCM_ALLOW_INTS.
7904
9bc4701c
MD
79052002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7906
52340b65
MD
7907 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7908 Removed accidental #if 0 around these functions.
7909
9bc4701c
MD
7910 These changes are the start of support for preemptive
7911 multithreading. Marius and I have agreed that I commit this code
7912 into the repository although it isn't thoroughly tested and surely
7913 introduces many bugs. The bugs should only be exposed when using
7914 threads, though. Signalling and error handling for threads is
7915 very likely broken. Work on making the implementation cleaner and
7916 more efficient is needed.
7917
7918 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7919 (SCM_NONREC_CRITICAL_SECTION_START,
7920 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7921 SCM_REC_CRITICAL_SECTION_END): New macros.
7922 (SCM_CRITICAL_SECTION_START/END): Defined here.
7923
7924 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7925 the three calls to scm_m_expand_body.
7926
7927 * gc.h: #include "libguile/pthread-threads.h";
7928 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7929
7930 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7931 scm_t_key;
7932
7933 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7934 access.
7935
7936 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7937
7938 * gc-freelist.c, threads.c (really_launch): Use
7939 SCM_FREELIST_CREATE.
7940
7941 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7942
7943 * gc.c (scm_i_expensive_validation_check, scm_gc,
7944 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7945 heap administration so that those pieces of code are executed
7946 single-threaded. We might consider rewriting these code sections
7947 in terms of a "call_gc_code_singly_threaded" construct instead of
7948 calling the pair of scm_i_thread_put_to_sleep () and
7949 scm_i_thread_wake_up (). Also, we would want to have as many of
7950 these sections eleminated.
7951
7952 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7953
7954 * inline.h: #include "libguile/threads.h"
7955
7956 * pthread-threads.h: Macros now conform more closely to the
7957 pthreads interface. Some of them now take a second argument.
7958
7959 * threads.c, threads.h: Many changes.
7960
79612002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7962
7963 * Makefile.am (version.h): Changed $^ --> $< in rule for
7964 version.h.
7965
b2cbe8d8
RB
79662002-12-08 Rob Browning <rlb@defaultvalue.org>
7967
7968 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7969 (SCM_MINOR_VERSION): use @--@ substitution now.
7970 (SCM_MICRO_VERSION): use @--@ substitution now.
7971 (scm_effective_version): new function prototype.
7972
7973 * version.c (scm_effective_version): new function, also add
7974 effective-version.
7975
7976 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7977 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7978 SCM_LIBRARY_DIR.
7979 (version.h): generate this here rather than configure.in. This
7980 approach tracks source edits better (i.e. more immediately).
7981 Might be worth considering for other .in files too.
7982
5441c65c
MV
79832002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7984
7985 Reorganized thread package selection. A thread package now only
7986 implements a small set of pthread like functions and Guile
7987 implements the rest on top of that. Guile's implementation is
7988 what the "coop-pthreads" package has been previously. Support for
7989 "coop" threads has been removed until I get time to add it again.
7990
7991 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7992 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7993 null-threads.c, coop-pthreads.c.
7994 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7995 pthread-threads.h.
7996
7997 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7998
7999 * threads.h: Do not include "libguile/coop-defs.h". Include
8000 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
8001 (previously deprecated) C level thread API prototypes. They are
8002 now in the thread package specific headers, "null-threads.h" and
8003 "pthread-threads.h".
8004 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
8005 New.
8006 (scm_threads_init): Removed.
8007 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
8008 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
8009 SCM_I_THREAD_SWITCH_COUNT): Define here.
8010 (scm_single_thread_p): Removed.
8011 (scm_call_with_new_thread): Take two args directly instead of list
8012 of two args.
8013 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
8014 SCM_SET_THREAD_LOCAL_DATA): Define here.
8015
8016 * threads.c: Merged with "coop-pthreads.c".
8017
8018 * null-threads.h: Implement pthread-like API as a set of macros.
8019
8020 * pthread-threads.h: New, implement pthread-like API by deferring
8021 to pthread itself.
8022
8023 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
8024 has been lost in the reorganization.
8025
504d99c5
MD
80262002-12-01 Mikael Djurfeldt <mdj@linnaeus>
8027
8028 The following change makes it possible to move procedure
8029 application dispatch outside inner loops. The motivation was
8030 clean implementation of efficient replacements of R5RS primitives
8031 in SRFI-1.
8032
8033 The semantics is clear: scm_trampoline_N returns an optimized
8034 version of scm_call_N (or NULL if the procedure isn't applicable
8035 on N args).
8036
8037 Applying the optimization to map and for-each increases efficiency
8038 noticeably. For example, (map abs ls) is 8 times faster than
8039 before.
8040
8041 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
8042
8043 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
8044
8045 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
8046 (map, for-each): Handle also application on two args as a special
8047 case; Use trampolines.
8048
8049 Other changes:
8050
8051 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
8052 (subr2oless): Removed.
8053 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
8054 vector GC protected.
8055
8056 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
8057 scm_out_of_range.
8058
63dd3413
DH
80592002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8060
8061 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
8062
4ba5f279
MD
80632002-11-17 Mikael Djurfeldt <mdj@linnaeus>
8064
8065 * debug.c (scm_make_iloc): Added missing "return".
8066
56ae231f
MV
80672002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
8068
8069 * strports.c (scm_eval_string_in_module): Validate second arg to
8070 be a module. Thanks to Arno Peters!
8071
80b28865
DH
80722002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8073
8074 * .cvsignore: remove goops.c
8075
c88b1456
DH
80762002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8077
8078 * modules.c (scm_env_top_level, scm_lookup_closure_module,
8079 module_variable, scm_module_lookup_closure,
8080 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
8081 scm_system_module_env_p): Don't compare SCM values with C
8082 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
8083 over SCM_NFALSEP.
8084
a8a19efc
DH
80852002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8086
8087 * eval.h (SCM_MAKE_ILOC): New macro.
8088
8089 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
8090 the iloc bitpattern here.
8091
76734914
MD
80922002-11-14 Mikael Djurfeldt <mdj@linnaeus>
8093
8094 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
8095 part of the API, otherwise it's difficult to write Guile
8096 extensions using non-blocking I/O => moved #include
8097 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
8098
8099 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
8100 s_unlock_mutex.
8101
8b5b4a75
MV
81022002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
8103
8104 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
8105 are defined in configure.in.
8106
8107 * threads.c: Removed SCM_API from function definitions. SCM_API
8108 is only for declarations.
8109
e5a83084
MD
81102002-11-07 Mikael Djurfeldt <mdj@linnaeus>
8111
9be8bb45
MD
8112 * coop-pthreads.h: Added support for thread specific data to the
8113 generic C API for the coop-pthreads case.
8114
e5a83084
MD
8115 * threads.c, threads.h (scm_cond_init): Undo unintentional API
8116 change.
6c214b62 8117 (scm_cond_broadcast): Added missing function.
e5a83084 8118
7edf178e
MV
81192002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8120
8121 * coop.c (coop_next_runnable_thread): Removed, wich should have
8122 happened when GUILE_ISELECT was hard-wired.
8123
7f5b1b77
MV
81242002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8125
7caa1b07
MV
8126 * Makefile.am (libguile_la_SOURCES): Added threads.c
8127 (DOT_DOC_FILES): Added threads.doc.
8128 (DOT_X_FILES): Added threads.x.
8129 (EXTRA_libguile_la_SOURCES): Removed threads.c.
8130 (noinst_HEADERS): Added coop-pthreads.c.
8131 (modinclude_HEADERS): Added coop-pthreads.h.
8132
8133 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
8134 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
8135
bb11cbf4
MV
8136 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
8137 Thanks to Bill Schottstaedt!
8138
1d4cbbed
MV
8139 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
8140
7f5b1b77
MV
8141 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
8142 SCM_COPT_THREADS is defined.
8143 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
8144 is defined.
8145
8146 * coop-pthreads.c: Some harmless renamings of internal stuff.
8147 (create_thread): New, generalized version of
8148 scm_call_with_new_thread.
8149 (scm_call_with_new_thread): Use it.
8150 (scm_spawn_thread): New, use create_thread.
8151
d52f53b1
MV
81522002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8153
8154 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
8155 start testing it now.
8156
8157 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
8158 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
8159 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
8160 is defined.
8161
30f920c3
MV
81622002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
8163
8164 * scmsigs.c (signal_cell_handlers, install_handler_data,
8165 scm_delq_spine_x, really_install_handler, install_handler): New
8166 scheme for triggering signal handlers, to simplify take_signal.
8167 (take_signal): Simplified, to avoid race conditions.
8168 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
8169 hasn't exited yet.
8170
8171 * async.c (scm_async_click): Reset pending_asyncs, handle
8172 signal_asyncs. Don't set cdr of a non-signal async to #f.
8173 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
8174 always. Set pending_asyncs.
8175 (scm_system_async_mark_for_thread): Check that thread has not
8176 exited.
8177 (scm_unmask_signals, decrease_block): Call scm_async_click after
8178 block_asyncs becomes zero.
8179
8180 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
8181 active_asyncs.
8182
8183 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
8184 fields.
8185 * root.c (root_mark): Mark them.
8186 (make_root): Initialize them.
8187
8188 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
8189 USE_COOP_THREADS.
8190 (scm_internal_select): Define one version for USE_COOP_THREADS and
8191 one for USE_NULL_THREADS.
8192 (scm_init_iselect): Likewise.
8193
8194 * inline.h (scm_cell, scm_double_cell): Also allow
8195 USE_COPT_THREADS to not protect the slot initializers.
8196
8197 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8198 because threads need to be initialized before the stack, but
8199 gsubrs such as scm_timed_condition_variable_wait can only be
8200 created later.
8201
8202 * threads.h: Include "coop-pthreads.h" when requested.
8203 (scm_threads_make_mutex, scm_threads_lock_mutex,
8204 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8205 not implemented anyway.
8206 (scm_init_thread_procs, scm_try_mutex,
8207 scm_timed_condition_variable_wait,
8208 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8209 scm_thread_exited_p): New prototypes.
8210 (struct timespec): Define if not already defined.
8211 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8212 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8213 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8214 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8215 deprecated.
8216
8217 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8218 requested.
8219 (scm_thread_exited_p): New.
8220 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8221 registered procedures.
8222 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8223 Use the latter as the procedure for "wait-condition-variable",
8224 thus offering a optional timeout parameter to Scheme.
8225 (scm_wait_condition_variable): Implement in terms of
8226 scm_timed_wait_condition_variable.
8227 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8228 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8229 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8230 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8231 scm_make_mutex, etc, and deprecate.
8232 (scm_init_threads): Do not create smobs, leave this to
8233 scm_threads_init. Do not include "threads.x" file.
8234 (scm_init_thread_procs): New, include "threads.x" here.
8235
8236 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8237 scm_null_mutex_lock, scm_null_mutex_unlock,
8238 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8239 scm_null_condvar_wait, scm_null_condvar_signal,
8240 scm_null_condvar_destroy): Removed.
8241 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8242 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8243 scm_cond_destory): Do not define, they are now deprecated and
8244 handled by threads.{h,c}.
8245
8246 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8247 (scm_threads_init): Create smobs here, using the appropriate
8248 sizes.
8249 (block): Removed, now unused.
8250 (scm_c_thread_exited_p): New.
8251 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8252 scm_null_mutex_destroy, scm_null_condvar_init,
8253 scm_null_condvar_wait, scm_null_condvar_signal,
8254 scm_null_condvar_destroy): Removed and updated users to do their
8255 task directly.
8256 (scm_try_mutex, timeval_subtract,
8257 scm_timed_wait_condition_variable,
8258 scm_broadcast_condition_variable): New.
8259 (scm_wait_condition_variable): Removed.
8260
8261 * coop-defs.h (coop_m): Added 'level' field.
8262 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8263 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8264 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8265 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8266 define.
8267 (coop_condition_variable_broadcast): New.
8268
8269 * coop-threads.c (scm_threads_init): Create smobs here, using the
8270 appropriate sizes.
8271 (scm_c_thread_exited_p, scm_try_mutex,
8272 scm_timed_wait_condition_variable,
8273 scm_broadcast_condition_variable): New.
8274 (scm_wait_condition_variable): Removed.
8275
8276 * coop.c (coop_new_mutex_init): Initialize level.
8277 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8278 level.
8279 (coop_condition_variable_signal): Renamed to
8280 coop_condition_variable_broadcast and reimplemented in terms of
8281 that. Thus...
8282 (coop_condition_variable_broadcast): New.
8283
8284 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8285
8286 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8287
087ed40d
MV
82882002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8289
65a23095
MV
8290 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8291 of system headers.
8292
087ed40d
MV
8293 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8294 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8295 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8296
5ec1d2c8
DH
82972002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8298
8299 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8300 scm_definedp to scm_defined_p and deprecated scm_definedp.
8301
100ae50d
DH
83022002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8303
8304 * async.h, async.c (scm_system_async): Fixed deprecation to work
8305 correctly when deprecated features are excluded.
8306
2794cb50
MV
83072002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8308
8309 * async.c (scm_system_async_mark_for_thread): Validate thread
8310 argument.
8311
8312 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8313
8314 * feature.c (scm_init_feature): Don't add 'threads' for
8315 USE_NULL_THREADS.
8316
8317 * inline.h (scm_cell, scm_double_cell): Also allow
8318 USE_NULL_THREADS to not protect the slot initializers.
8319
8320 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8321 "USE_THREAD".
8322
8323 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8324 (modinclude_HEADERS): Added null-threads.h.
8325
8326 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8327 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8328 (scm_init_threads): Use generic type names scm_t_mutex and
8329 scm_t_cond instead of coop_m and coop_c.
8330
8331 * null-threads.c, null-threads.h: New files.
8332
ff810d7a
MV
83332002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8334
8335 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8336 This is to support makes that know about "$<" only in pattern
8337 rules, like Sun's make.
8338
a90bdb73
MV
83392002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8340
8341 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8342 substitution. Thanks to David Allouche!
8343
e71a8bf2
DH
83442002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8345
8346 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8347 !SCM_ENABLE_DEPRECATED.
8348
41f77ff5
MV
83492002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8350
504d99c5 8351 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8352 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8353 otherwise.
8354
8355 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8356 USE_THREADS is defined. Use scm_root otherwise.
8357 (scm_sigaction_for_thread): Ignore THREAD argument when
8358 USE_THREADS is not defined. Also, move THREAD argument defaulting
8359 out of HAVE_SIGACTION section, which was a bug.
8360
6d16b125
MV
83612002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8362
8363 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8364 signal_handlers, not the closure that is used as the async.
8365 The closure is stored in signal_handler_cells, as previously.
8366
acfa1f52
MV
83672002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8368
8369 * root.h (scm_root_state): Added 'block_async' slot.
8370 (scm_active_asyncs): Removed abbrev.
8371 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8372
8373 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8374 abbrev.
8375
8376 * async.h (scm_call_with_blocked_asyncs,
8377 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8378 scm_c_call_with_unblocked_asyncs): New prototypes.
8379 (scm_mask_signals, scm_unmask_signals): Deprecated.
8380 (scm_mask_ints): Turned into a macro.
8381 * async.c (scm_mask_ints): Removed.
8382 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8383 this should not be necessary.
8384 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8385 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8386 deprecation warning and check for errornous use. Set block_asyncs
8387 instead of scm_mask_ints.
8388 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8389 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8390 scm_c_call_with_unblocked_asyncs): New.
8391
8392 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8393 Asyncs are enabled by default.
8394
34010f56
NJ
83952002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8396
8397 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8398 6th element: an input waiting thunk.
8399 (sf_input_waiting): New.
8400
9310d6f2
MV
84012002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8402
8403 * root.c (root_mark): Mark active_asyncs slot.
8404
8405 * async.c (scm_async_click): Set the cdr of a executed handler
8406 cell to SCM_BOOL_F, not SCM_EOL.
8407 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8408 and only if the handler procedure is not already present.
8409 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8410 with SCM_BOOL_F.
8411 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8412
ac48c719
RB
84132002-10-04 Rob Browning <rlb@defaultvalue.org>
8414
1360a142
RB
8415 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8416
8417 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8418 scm_lt_dlopenext, and scm_lt_dlerror.
8419 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8420 and scm_lt_dlerror.
8421 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8422 and scm_lt_dlerror.
8423 (sysdep_dynl_init): switch to scm_lt_dlinit();
8424
8425 * Makefile.am (libguile_la_LIBADD): switch to use
8426 libguile-ltdl.la.
8427
504d99c5 8428 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8429
497092c9
MV
84302002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8431
8432 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8433 * scmsigs.c (got_signal): Removed.
8434 (signal_handler_cells, signal_handler_threads): New.
8435 (take_signal): Queue the cell of the signal for the specified
8436 thread. Reset the signal handler on systems that don't have
8437 sigaction.
8438 (sys_deliver_signals): Removed.
8439 (close_1): New.
8440 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8441 extended to also set the thread of a signal and allocate a cell
8442 for it. Keep the Scheme name "sigaction". Check that signum is
8443 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8444 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8445 (scm_init_scmsigs): Allocate signal_handler_cells and
8446 signal_handler_threads vectors.
8447
8448 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8449 that system asnycs and user asyncs are separated. Reimplemented
8450 system asyncs to work per-thread.
8451
8452 * gc.c (scm_init_gc): Do not use scm_system_async.
8453
8454 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8455 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8456 Removed prototypes.
8457 (scm_i_queue_async_cell): New.
8458
8459 * __scm.h (scm_asyncs_pending_p): Removed.
8460 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8461 scm_asyncs_pending_p.
8462
8463 * async.h (scm_system_async_mark_for_thread): New prototype.
8464
8465 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8466
8467 * root.h (scm_root_state): Added new "active_asyncs" slot.
8468 * root.c (scm_make_root): Initialize it to SCM_EOL.
8469
8470 * coop-defs.h (coop_t): Added new "handle" slot.
8471 * coop-threads.c (all_threads, scm_current_thread,
8472 scm_all_threads, scm_i_thread_root): New.
8473 (scm_threads_init): Add main thread to all_threads.
8474 (scheme_launch_thread): Remove thread from all_threads when it
8475 terminates.
8476 (scm_call_with_new_thread): Initialize handle slot of coop_t
8477 structure and add new thread to all_threads.
8478 (scm_spawn_thread): Likewise.
8479
8480 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8481 * threads.c (scm_current_thread, scm_all_threads): Register as
8482 primitives.
8483
8484 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8485
480fa28d
NJ
84862002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8487
8488 * script.c (scm_compile_shell_switches): Fix bad spelling of
8489 `explicitly' in comment.
8490
84912002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8492
8493 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8494 Refer to provided? in doc string rather than deprecated feature?.
8495
3553e1d1
GH
84962002-09-24 Gary Houston <ghouston@arglist.com>
8497
8498 * inline.h (scm_double_cell): prevent reordering of statements
8499 with any following code (for GCC 3 strict-aliasing).
8500 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8501 the earlier version of the reordering prevention.
8502
4ad0814a
HWN
85032002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8504
8505 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8506
e88e4f2e
HWN
85072002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8508
8509 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8510 protection.
8511
1e71eafb
HWN
85122002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8513
8514 * inline.h: include stdio.h
8515
8516 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8517
61ef9c1f
HWN
85182002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8519
dac04e9f
HWN
8520 * gc-segment.c (scm_i_make_initial_segment): check user settings
8521 for sanity.
8522
8523 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8524 sanity.
dac04e9f
HWN
8525
8526 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8527
ffd72400
HWN
8528 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8529
8530 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8531 these won't ever wrap around with high memory usage. Thanks to
8532 Sven Hartrumpf for finding this.
ffd72400 8533
5bd4a949
HWN
8534 * gc-freelist.c: include <stdio.h>
8535
61ef9c1f
HWN
8536 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8537
ffd0ef3b
MV
85382002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8539
a27e3d14
MV
8540 * vectors.h (SCM_VECTOR_REF): New.
8541
ffd0ef3b
MV
8542 * snarf.h (SCM_DEFINE_PUBLIC): New.
8543
f8a1712b
MV
85442002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8545
8546 * socket.c (scm_addr_vector): Added size of address to arguments.
8547 Use it to avoid accessing a non-existent path in a sockaddr_un.
8548 Changed all callers.
8549
7200a36b
HWN
85502002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8551
1383773b
HWN
8552 * gc.h: remove DOUBLECELL card flags.
8553
8554 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8555 scm_realloc().
8556
8557 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8558 init loop; handle this from scm_init_card_freelist()
8559
8560 * gc-card.c (scm_init_card_freelist): init bit vector here.
8561
7200a36b 8562 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8563 num2float.i.c (FLOAT2NUM): idem
7200a36b 8564
9981de3a
HWN
85652002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8566
8567 * eval.h: prepend libguile/ to include path
8568
19647556
MV
85692002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8570
8571 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8572 years. Thanks to Martin Grabmüller!
19647556 8573
38d1262a
HWN
85742002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8575
8576 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8577 unsigned numbers for computing minimum heap increment. This
8578 prevents weird results when a a negative minimum increment is
8579 computed.
8580
f800ebfb
MV
85812002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8582
8583 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8584 instead of the old tricks.
f800ebfb
MV
8585
8586 * guile-snarf.in: Do not expect the input file to be the first
8587 argument after the optional "-o" option, just pass everything to
8588 the pre-processor without extracting the input file name.
8589
4a5309c9
HWN
85902002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8591
8592 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8593 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8594
f2893a25
HWN
85952002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8596
8597 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8598 Bill Schottstaedt for the bug report
8599
483f518b
MV
86002002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8601
8602 * print.c (scm_iprin1): Print primitives generics always as
8603 "primitive-generic" even when they have no primitive methods yet.
8604
917adc55
GH
86052002-08-17 Gary Houston <ghouston@arglist.com>
8606
8607 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8608 call.
8609
67329a9e
HWN
86102002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8611
85835e59 8612 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8613
8614 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8615 malloc.
8616
8617 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8618 only use SCM_MIN_HEAP_SEG_SIZE.
8619
8620 * ports.c (scm_add_to_port_table): add backwards compatibility
8621 function
8622
8623 * ports.h: use scm_i_ prefix for port table and port table size.
8624
f07c886a
MD
86252002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8626
8627 * vports.c (scm_make_soft_port): Initialize pt variable.
8628
dc61cbc6
MV
86292002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8630
8631 * strports.h (scm_c_eval_string_in_module,
8632 scm_eval_string_in_module): New prototypes.
8633 * strports.c (scm_eval_string_in_module): New, but use
8634 "eval-string" as the Scheme name and make second parameter
8635 optional.
8636 (scm_eval_string): Implement using scm_eval_string_in_module.
8637 (scm_c_eval_string_in_module): New.
8638 Thanks to Ralf Mattes for the suggestion!
8639
da220f27
HWN
86402002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8641
be3ff021
HWN
8642 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8643 message and abort.
8644
8645 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8646
da220f27
HWN
8647 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8648 stead of scm_t_port*. The function now takes a tag argument.
8649
eab1b259
HWN
86502002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8651
8652 * gc.h: add scm_debug_cells_gc_interval to public interface
8653
8654 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8655
8656 * gc.c (scm_i_expensive_validation_check): separate expensive
8657 validation checks from cheap ones.
8658
ba1b2226
HWN
86592002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8660
8661 * read.c (scm_input_error): new function: give meaningful error
8662 messages, and throw read-error
8663
8664 * gc-malloc.c (scm_calloc): add scm_calloc.
8665
39e8f371
HWN
86662002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8667
33138b05
HWN
8668 * tags.h: remove GC bits documentation from the tags table.
8669
39e8f371
HWN
8670 * read.c (INPUT_ERROR): Prepare for file:line:column error
8671 messages for errors in scm_lreadr() and friends.
8672
86732002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8674
8675 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8676 implementation).
8677 (scm_gc_calloc): new function
8678
26e68795 86792002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8680
5f16b897
HWN
8681 * ports.c (scm_new_port_table_entry): init port entry to 0
8682 completely.
402788a9
HWN
8683
8684 * ports.c (scm_new_port_table_entry): change function from
8685 scm_add_to_port_table. This prevents cells with null-pointers from
8686 being exposed to GC.
8687
504d99c5 8688 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8689 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8690
504d99c5 8691 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8692 to gc-stats.
8693
c8a1bdc4
HWN
8694 * numbers.c (big2str): return "0" for 0 iso. ""
8695
c2cbcc57
HWN
8696 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8697 private-gc.h: new file
c8a1bdc4
HWN
8698
8699 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8700 sweeping. More documentation in workbook/newgc.text
8701
aea06b34
MV
87022002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8703
8704 * random.c (rstate_free): Return zero.
8705
35060ae9
DH
87062002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8707
8708 * environments.c (remove_key_from_alist): Removed.
8709
8710 (obarray_remove): Simplified.
8711
6a535440
SJ
87122002-07-24 Stefan Jahn <stefan@lkcc.org>
8713
8714 * continuations.h: ia64: Include <signal.h> before
8715 <sys/ucontext.h>.
8716
bcbd25b7
DH
87172002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8718
8719 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8720
26e68795 87212002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8722
8723 * goops.c (scm_compute_applicable_methods): use
8724 scm_remember_upto_here_1 iso scm_remember_upto_here
8725
8726 * macros.c: include deprecation.h
8727
504d99c5 8728 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8729 macro arg.
504d99c5 8730 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8731
8732 * net_db.c, posix.c, socket.c: variable naming: change ans to
8733 result.
8734
8735 * sort.c (scm_merge_vector_x): accept vector as argument
8736 iso. SCM*. This is needed for full GC correctness.
8737
8738 * gc.h: undo previous undocumented changes related to #ifdef
8739 GENGC.
8740
26e68795 87412002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8742
8743 * *.c: add space after commas everywhere.
8744
8745 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8746 Document cases where SCM_WRITABLE_VELTS() is used.
8747
8748 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8749 SCM_VELTS() return a const pointer
8750 (SCM_VECTOR_SET): add macro.
8751
3063e30a
DH
87522002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8753
8754 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8755 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8756 Deprecated the special kind of built-in dynamic syntax transformer
8757 that was inaccurately named "macro". Note: The built-in syntax
8758 transformers that are named "mmacro" or "memoizing-macro" still
8759 exist, and it is these which come much closer to what one would
8760 call a macro.
8761
4c5f8e8f
NJ
87622002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8763
8764 * eval.c (unmemocopy): Fix for
8765 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8766 with internal definitions and local-eval).
8767
4f6f9ae3
GH
87682002-07-12 Gary Houston <ghouston@arglist.com>
8769
8770 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8771 defined. They don't do anything useful, especially since the
8772 only case where DYNAMIC_LINKING is undefined seems to be
8773 when --with-modules=no is given to configure, which is basically
8774 requesting that the "dynamic linking module" be omitted.
8775
8776 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8777 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8778
8779 * extensions.c (load_extension): check DYNAMIC_LINKING for
8780 scm_dynamic_call.
8781 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8782 scm_init_dynamic_linking.
8783
c21935e6
MV
87842002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8785
8786 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8787 check for Cygwin when including <winsock2.h>, this is already
8788 check for by configure. Thus, revert change from 2002-07-07.
8789
ee95d597
GH
87902002-07-10 Gary Houston <ghouston@arglist.com>
8791
9540b68f 8792 * eq.c: include <string.h>
ee95d597
GH
8793 * dynl.c: docstring editing.
8794
46732b54
GH
87952002-07-09 Gary Houston <ghouston@arglist.com>
8796
8797 * dynl.c (scm_dynamic_call): docstring editing.
8798
c09d12e0
RB
87992002-07-08 Rob Browning <rlb@defaultvalue.org>
8800
8801 * gc_os_dep.c: HURD fixes.
8802
3f6571eb
MV
88032002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8804
8805 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8806
8807 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8808 this should be compiled for BUILD host.
8809 Override default rule for
8810 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8811 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8812 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8813
8814 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8815 <winsock2.h> on Cygwin even when we have it.
8816
bd987b8e
DH
88172002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8818
8819 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8820 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8821 the code. Full number of arguments checking of closures is
8822 mandatory now. However, the option to disable the checking has
8823 most probably not been used anyway.
8824
8505e285
DH
88252002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8826
bd987b8e
DH
8827 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8828 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8829 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8830 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8831 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8832 (scm_source_properties, scm_set_source_properties_x,
8833 scm_source_property): Removed compile time option SCM_RECKLESS to
8834 clean up the code. Full number of arguments checking of closures
8835 is mandatory now. However, the option to disable the checking has
8836 most probably not been used anyway.
8505e285
DH
8837
8838 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8839 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8840
2ee08a28
GH
88412002-06-30 Gary Houston <ghouston@arglist.com>
8842
732b9327
GH
8843 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8844 do anything useful. Added a comment about need for a mutex if
8845 pre-emptive threading is supported.
8846
2ee08a28
GH
8847 * posix.c (scm_convert_exec_args), dynl.c
8848 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8849 allocate_string_pointers. 2) simplified: don't reallocate the
8850 strings, just make an array of pointers 3) avoid memory leaks on
8851 error 4) let the procedure report errors in its own name.
8852 Consequences: 1) the procedures now assume that SCM strings are
8853 nul-terminated, which should always be the case. 2) Since strings
8854 are not reallocated, it's now possible for strings passed to
8855 dynamic-args-call to be mutated.
8856
c136c920
DH
88572002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8858
8859 * __scm.h, eval.c, eval.h: Removed compile time option
8860 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8861 variable positions during memoization is mandatory. However, the
8862 option to disable the caching has most probably not been used
8863 anyway.
8864
e540802f
MV
88652002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8866
8867 * print.c (scm_simple_format): Print missing part of format before
8868 ~% control. Thanks to Daniel Skarda!
8869
4c1ffcdd
MV
88702002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8871
8872 * mkstemp.c: Added exception notice to license statement.
8873
ba1b077b
MV
88742002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8875
8dc434c7
MV
8876 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8877 it is represented as a floating point value so that we can change
8878 its sign.
8879
ba1b077b
MV
8880 From John W. Eaton <jwe@bevo.che.wisc.edu>
8881
8882 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8883
74c58131
TTN
88842002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8885
8886 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8887 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8888
8766d4b5
MV
88892002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8890
8891 * eq.c (real_eqv): New.
8892 (scm_eqv_p): Use it when comparing reals and complexes.
8893
8894 * numbers.c: Include <string.h>, for strncmp.
8895 (mem2complex): Do not create negative NaNs.
8896 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8897 NaN.
8898 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8899
1d8c3cad
MV
89002002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8901
8902 * posix.c (scm_putenv): Handle removing variables explicitely by
8903 calling unsetenv.
8904
8905 From John W. Eaton.
74c58131 8906
1d8c3cad
MV
8907 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8908 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8909 and scm_nan.
8910 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8911 [SCO && ! HAVE_ISINF] (isinf): New function.
8912 (xisinf, xisnan): New functions.
8913 (IS_INF): Delete.
8914 (isfinite): Define in terms of xisinf.
8915 (scm_inf_p, scm_nan_p): New functions.
8916 (guile_Inf, guile_NaN): New file-scope vars.
8917 (guile_ieee_init): New function.
8918 (scm_inf, scm_nan): New functions.
8919 (idbl2str): Handle Inf and NaN. Remove funny label and
8920 corresponding gotos.
8921 (ALLOW_DIVIDE_BY_ZERO): New macro.
8922 (scm_divide): Allow division by zero to occur if
8923 ALLOW_DIVIDE_BY_ZERO is defined.
8924 Handle bignums and ints as special cases.
8925
8926 Additional stuff by me:
8927
8928 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8929 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8930 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8931 NaN. They will provide their own sign.
8932 (scm_divide): Only allow divides by inexact zeros. Dividing by
8933 exact zeros still signals an errors.
74c58131 8934
7a0c65eb
TTN
89352002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8936
87b72063 8937 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8938 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8939 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8940 Thanks to Andreas Rottmann.
8941
5e423a39
GH
89422002-04-20 Gary Houston <ghouston@arglist.com>
8943
8944 * removal of unused fields in root state (thanks to Christopher
8945 Cramer for pointing out the disuse.)
8946 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8947 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8948
5e423a39
GH
8949 * root.c (root_mark): don't mark them.
8950 (scm_make_root): don't set them to #f.
8951 * init.c (scm_init_standard_ports): don't initialise with the
8952 default ports.
8953
9d2cce76
MV
89542002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8955
8956 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8957 cpp_sig_symbols.c.
8958
89592002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8960
8961 * guile-snarf.in: Do not clean input file. This would write to
8962 the $(srcdir) during a VPATH build, which is not allowed. It also
8963 isn't needed since it only works when an output filename has been
8964 specified and in that case we don't need to clean the input file
8965 because the output file will already exist.
8966
6f79b6cc
MV
89672002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8968
8969 * guile-snarf: Install the trap for removing $cleanfile only when
8970 the value of $cleanfile is actually known.
8971
21550b10
RB
89722002-04-10 Rob Browning <rlb@defaultvalue.org>
8973
8974 * .cvsignore: add versiondat.h and *.c.clean.c.
8975
bc76d628
DH
89762002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8977
8978 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8979 function, replaces macro SRCBRKP.
8980
8981 (SRCBRKP): Deprecated.
8982
8983 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8984 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8985 temporary variable.
8986
5132eef0
DH
89872002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8988
8989 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8990 CHECK_EXIT and removed all references to them.
8991
680516ba
DH
89922002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8993
8994 * debug.h (scm_ready_p, debug_print): Removed declarations.
8995
8996 * eval.c (EVALCELLCAR): Removed.
8997
8998 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8999 operation from condition.
9000
e2bd68e0
MV
90012002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
9002
9003 * guile-snarf.in: When the output filename is "-", write to
9004 stdout. When no "-o" option is given, use "-" as the output
9005 filename (i.e., stdout). Only 'clean' the inputfile or remove the
9006 output file on error when the output file name is not "-". Define
9007 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
9008
9009 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
9010
ab1f1094
DH
90112002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9012
9013 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
9014 and the corresponding goto statements. Removed redundant code.
9015
42030fb2
DH
90162002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9017
9018 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
9019 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
9020 Re-enabled handing of rpsubrs and asubrs.
9021
e050d4f8
DH
90222002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
9023
9024 * eval.c (SIDEVAL): Removed.
9025
9026 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
9027 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
9028 argument checking order for set! to locals, variables and symbols.
9029 Improvements to control structure. Removed some uses of arg1 and
9030 arg2 as temporary variables.
9031
a6d344d3
TTN
90322002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
9033
9034 * guile-snarf.in: Remove "--compat=1.4" support.
9035 Add "-d" and "-D" support.
9036
9037 (deprecated_list): New var.
9038 (compat_mode_clean_xxx): Delete.
9039 (grep_deprecated): New func.
9040 ("main"): If "-d" or "-D", call `grep_deprecated'.
9041
3939e9df
NJ
90422002-03-15 Neil Jerram <neil@ossau.uklinux.net>
9043
387d418c
NJ
9044 * hooks.h: Change scm_t_c_hookype_t everywhere to
9045 scm_t_c_hook_type.
9046
bb2c02f2 9047 Docstring fixes:
a6d344d3 9048
bb2c02f2
NJ
9049 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
9050
9051 * ports.c (scm_sys_make_void_port): Use `@file'.
9052
9053 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
9054 than `else'.
9055
9056 * macros.c (scm_makmacro): Don't say that the form replaces its
9057 source, because it doesn't.
9058 (scm_makmmacro): Clarify difference between this and scm_makmacro.
9059
9060 * backtrace.c (scm_display_error), filesys.c (scm_umask,
9061 scm_select, scm_basename), goops.c (scm_method_generic_function),
9062 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
9063 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
9064 spelling mistakes.
9065
3939e9df
NJ
9066 * debug.c (scm_debug_options), eval.c
9067 (scm_eval_options_interface), read.c (scm_read_options): Change
9068 incorrect @var in docstring to @code.
9069
3b3cc781
MV
90702002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
9071
500b0d5b
MV
9072 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
9073
3b3cc781
MV
9074 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
9075 guile-snarf can remove trailing non-init code.
9076
9077 * guile-snarf.in (modern_snarf): Remove everything following and
9078 including "^:^" from the output.
9079
dff98306
DH
90802002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9081
9082 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
9083
9084 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
9085
2287fb53
TTN
90862002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
9087
9088 * guile-snarf.in: Update copyright.
9089 Rewrite to internalize error handling.
9090 Add "--compat=1.4" handling.
9091 Add commentary.
9092
9093 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
9094 (snarfcppopts): New var.
9095 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
9096 (.c.doc): Use $(snarfcppopts).
9097
822250a4
TTN
9098 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
9099 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
9100 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
9101 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
9102 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9103 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
9104 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
9105 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
9106 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
9107 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
9108 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
9109 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
9110 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
9111 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
9112
b7798e10
DH
91132002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9114
9115 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
9116 The next step will be to remove the union 't' and simplify the
9117 code of SCM_CEVAL that way.
9118
04a98cff
NJ
91192002-03-12 Neil Jerram <neil@ossau.uklinux.net>
9120
9121 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
9122 rreadfds, rwritefds, rexceptfds): Made static.
9123
9124 * gc.c (terminating), fports.c (terminating): Renamed
9125 scm_i_terminating.
9126
16d98032
MV
91272002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
9128
5046250e
MV
9129 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
9130 potential overflow problems. Thanks to John W Eaton!
9131
8794207d
MV
9132 * strop.c (string_capitalize_x): Treat characters as unsigned so
9133 that 8-bit chars work. Thanks to David Pirotte!
16d98032 9134
1d15ecd3
DH
91352002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9136
9137 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
9138 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
9139 proc as temporary variables. Introduced temporary variables with
9140 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9141 by a more explicit predicate in some places.
9142
91432002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
9144
9145 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
9146 Added lots of comments regarding the implementation of #@dispatch.
9147 Changed intra-procedure communication to use t.arg1 instead of
9148 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
9149 variables. Introduced temporary variables with hopefully
9150 descriptive names for clarification. Replaced SCM_N?IMP by a more
9151 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
9152 of computing the expression explicitly. Eliminate now unused
9153 label nontoplevel_cdrxbegin.
9154
9155 * goops.h (SCM_INSTANCE_HASH): New macro.
9156
9157 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
9158
1ebf1566
TTN
91592002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9160
9161 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
9162 "guile-snarf" moved back from `noinst_SCRIPTS'.
9163
020c890c
NJ
91642002-03-08 Neil Jerram <neil@ossau.uklinux.net>
9165
58d233cc
NJ
9166 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
9167 exists when adding a source property other than those that are
9168 handled explicitly, add the new property to the SRCPROPS obj's
9169 plist.
9170
020c890c
NJ
9171 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
9172 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
9173
9174 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
9175 debug.status. It isn't needed, and it can overflow the bits
9176 reserved for it (which may lead to a segv or a GC abort).
9177
3f04400d
DH
91782002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9179
9180 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
9181 side-effecting operations from conditions and macro calls.
9182 Replaced SCM_N?IMP by a more explicit predicate in some places.
9183 Minimized the scope of some variables.
9184
97820583
SJ
91852002-03-02 Stefan Jahn <stefan@lkcc.org>
9186
9187 * convert.i.c: Fixed int <-> long conversions which would have
9188 failed if their sizes were different.
9189
38ace99e
DH
91902002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9191
9192 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9193 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9194 as temporary variables. Removed side-effecting operations from
9195 conditions and macro calls. Introduced temporary variables with
9196 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9197 by a more explicit predicate in some places. Removed code that
9198 was conditionally compiled if SICP was defined - which it never
9199 is.
9200
e5cb71a0
DH
92012002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9202
9203 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9204 Removed some uses of t.arg1 and proc as temporary variables.
9205 Removed side-effecting operations from conditions and macro calls.
9206 Introduced temporary variables with hopefully descriptive names
9207 for clarification. Replaced SCM_N?IMP by a more explicit
9208 predicate in some places.
9209
6a0f6ff3
DH
92102002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9211
9212 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9213 explicit predicate in some places.
9214
9215 (CHECK_EQVISH): Removed.
9216
9217 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9218 variables. Removed side-effecting operations from conditions and
9219 macro calls. Introduced temporary variables for clarification.
9220 Sorted if-else-if check for the type of the last form in a list by
9221 frequency. Avoided some unnecessary tail-recursion calls.
9222
228a24ef
DH
92232002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9224
9225 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9226 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9227 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9228 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9229 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9230 naming scheme for types.
9231
9232 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9233 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9234 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9235 (scm_make_environment), eval.c (scm_closure), fports.c
9236 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9237 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9238 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9239 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9240 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9241 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9242 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9243 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9244 scm_alloc_cell to scm_cell.
9245
9246 * environments.c (core_environments_observe), gc.c
9247 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9248 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9249 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9250 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9251 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9252 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9253 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9254 scm_double_cell.
9255
edb810bb
SJ
92562002-02-27 Stefan Jahn <stefan@lkcc.org>
9257
9258 * convert.i.c, convert.c: Better range checking.
9259
9260 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9261
1ebf1566 9262 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9263 Windows (MinGW).
9264
327d4dd3
TTN
92652002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9266
9267 * Makefile.am: Update path to pre-inst-guile automake frag.
9268
89d7a92c 92692002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9270
9271 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9272 features are excluded.
9273
89d7a92c 92742002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9275
9276 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9277
4f2716b6
GH
92782002-02-25 Gary Houston <ghouston@arglist.com>
9279
9280 * convert.c: include <string.h> for convert_i.c.
9281
46151112
RB
92822002-02-24 Rob Browning <rlb@defaultvalue.org>
9283
9284 * .cvsignore: add stamp-h1.
9285
cd328b4f
NJ
92862002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9287
9288 * unif.c (scm_array_to_list): Correct name, which had been
9289 accidentally changed to scm_t_arrayo_list!
9290
c709de7f
MD
92912002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9292
9293 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9294 underflowing scm_mallocated.
9295
c1965d31
MV
92962002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9297
9298 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9299 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9300 Reimplemented using the new scm_gc_malloc, etc., functions and
9301 deprecated.
9302
b606945b
TTN
93032002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9304
9305 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9306 to `noinst_PROGRAMS'.
9307 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9308 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9309
7c686ba8
MV
93102002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9311
9312 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9313 non-zero is returned from a port or smob free function.
9314 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9315 scm_gc_register_collectable_memory,
9316 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9317 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9318
9319 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9320 debug-malloc.c, dynl.c, environments.c, environments.h,
9321 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9322 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9323 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9324 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9325 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9326 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9327 appropriate. Return zero from smob and port free functions.
9328
9329 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9330
9331 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9332 messages while the GC is running.
9333 (scm_c_issue_deprecation_warning_fmt): New.
9334
9335 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9336 it is pointing to the putback buffer.
9337
66adc0a6
TTN
93382002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9339
9340 * gsubr.c (create_gsubr): On "too many args" error,
9341 also display arg count and name. Thanks to Bill Schottstaedt.
9342
0187b4f4
TTN
93432002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9344
9345 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9346
9347 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9348 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9349 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9350
9351 * guile-snarf-docs-texi.in: Bye bye.
9352
402e687c
MV
93532002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9354
9355 * symbols.c (scm_make_symbol): Fix typo in docstring.
9356
9357 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9358 scm_make_symbol): New prototypes.
9359
319b98ed
MV
93602002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9361
9362 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9363 (SCM_SYMBOL_INTERNED_P): New.
9364 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9365 SCM_MAKINUM since hash values can well be bignums.
9366 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9367 This signals a interned symbol.
9368 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9369 scm_make_symbol): New.
0187b4f4 9370
319b98ed
MV
9371 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9372
34472dfe
TTN
93732002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9374
9375 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9376 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9377 Thanks to Dave Love.
34472dfe 9378
1b39c2e3
MV
93792002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9380
9381 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9382 This might help to make unintended clashes less likely.
1b39c2e3
MV
9383 (scm_string_to_symbol): Protect the string until the symbols is
9384 created.
9385
1fa86ca5
SJ
93862002-01-31 Stefan Jahn <stefan@lkcc.org>
9387
9388 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9389 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9390 functions for the deprecated gh interface.
9391
9392 * Makefile.am: Setup rules for new `convert.*' files.
9393
af68e5e5
SJ
93942002-01-28 Stefan Jahn <stefan@lkcc.org>
9395
9396 * symbols.c (scm_c_symbol2str): New function, replacement for
9397 `gh_scm2newsymbol()'.
9398
34472dfe 9399 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9400 replacement for `gh_get_substr()'.
9401
9402 * socket.c: Include `stdint.h' if available for the `uint32_t'
9403 declaration.
9404
504d99c5 9405 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9406 compiler warning).
9407
9408 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9409
c96d76b8 94102002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9411
c96d76b8 9412 Other changes unrelated to Elisp...
34472dfe 9413
c96d76b8
NJ
9414 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9415 "if".
9416 (comments): Fix a few typos.
9417 (scm_for_each): Add parentheses around oddly unparenthesized
9418 if/while conditions.
9419
9420 * read.c (scm_read_opts): Add full stop at end of doc for
9421 `keywords' option.
9422
9423 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9424 instead of gh_symbol2scm.
9425
9426 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9427 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9428
9429 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9430 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9431
9432 First batch of changes for Elisp support...
9433
9434 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9435 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9436 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9437
9438 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9439 conditionalize compilation and initialization of Elisp support
9440 function.
34472dfe 9441
c96d76b8
NJ
9442 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9443 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9444 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9445 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9446 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9447 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9448 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9449 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9450 options.c (change_option_setting, scm_options), posix.c
9451 (environ_list_to_c), print.c (scm_iprlist), throw.c
9452 (scm_exit_status), vectors.c (scm_vector), weaks.c
9453 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9454
9455 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9456 just SCM_FALSEP.
34472dfe 9457
c96d76b8
NJ
9458 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9459 of just SCM_BOOLP.
9460
9461 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9462 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9463 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9464 (scm_m_atfop): Support function aliasing. Support both function
9465 args, which need transformation, and macro args, which do not.
9466 Add explanatory comments.
9467 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9468 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9469 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9470 SCM_NULLP || SCM_NILP instead of checks against (removed)
9471 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9472 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9473
9474 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9475 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9476 these, but I don't want to remove them yet, just in case.
9477 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9478 Elisp nil value.
9479
9480 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9481 against (removed) scm_lisp_nil.
9482 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9483 (SCM_NULL_OR_NIL_P): New.
9484
9485 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9486 SCM_VALIDATE_NULL.
9487
9488 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9489 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9490 value).
9491
9492 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9493 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9494 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9495 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9496
9497 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9498 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9499 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9500 Numbering shifted down accordingly.
9501 (SCM_ELISP_NIL): New IFLAG.
9502
9503 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9504
a392ee15
DH
95052002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9506
9507 * eval.c: Removed outdated references to "everr". Improved some
9508 comments.
9509
9510 (scm_deval_args, deval_args): Renamed scm_deval_args to
9511 deval_args, since it is not part of the interface.
9512
9513 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9514 use references to debug.vect[0] before it exists. Add parentheses
9515 to switch statement.
9516
9517 * goops.h: Added local emacs variables.
9518
24933780
DH
95192002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9520
9521 * eval.[ch] (scm_deval_args): Made static.
9522
9523 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9524 test.
9525
9526 * strings.c (scm_c_string2str): Clarified comment. Replaced
9527 THINKME by FIXME for uniformness. Removed question about whether
9528 arguments need to be protected from garbage collection: Arguments
9529 must be protected as any other variable.
9530
f9450cdb
DH
95312002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9532
9533 * procs.h (SCM_CLOSURE_BODY): New Macro.
9534
9535 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9536 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9537 get_slot_value, set_slot_value), procs.c
9538 (scm_procedure_documentation), sort.c (closureless), stacks.c
9539 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9540 SCM_CLOSURE_BODY.
9541
9542 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9543
5dc64f64
MV
95442001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9545
9546 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9547 use "cp" instead.
9548
197ee3d3
MV
95492001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9550
9551 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9552 everywhere.
9553
9554 * continuations.c (scm_make_continuation): Do not retain the
9555 throw_value when the continuation is invoked.
9556
4d4528e7
SJ
95572001-12-08 Stefan Jahn <stefan@lkcc.org>
9558
9559 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9560 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9561 THINKME's regarding the malloc policy for the missing converter
9562 routines.
9563
98347362
NJ
95642001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9565
9566 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9567 gh_symbol2scm.
9568
1fc8902f
DH
95692001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9570
9571 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9572 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9573
9574 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9575 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9576 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9577 macros.
9578
9579 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9580
9581 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9582 SCM_GC_CELL_* macros when accessing free cells.
9583
4878beec
MV
95842001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9585
9586 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9587 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9588 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9589 * strings.h (SCM_MAKE_STRING_TAG): New.
9590 * procs.h (SCM_MAKE_CCLO_TAG): New.
9591 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9592
9593 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9594 !SCM_ENABLE_DEPRECATED.
9595
9596 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9597 New.
9598
9599 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9600 signal handlers are allowed to divert the flow of control. Call
9601 scm_system_async_mark_from_signal_handler instead of
9602 scm_system_async_mark.
9603
9604
9605 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9606 scm_alloc_double_cell in their place.
34472dfe 9607
4878beec
MV
9608 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9609 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9610 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9611 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9612 scm_deprecated_newcell and scm_deprecated_newcell2.
9613
9614 gc.c (scm_tc16_allocated): Only define when including deprecated
9615 features.
9616 (scm_debug_newcell, scm_debug_newcell2): Removed.
9617 (scm_init_storage): Do not initialize scm_tc16_allocated.
9618 (scm_init_gc): Do it here.
9619 (allocated_mark): New, from old code.
9620 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9621
4878beec 9622 * inline.c, inline.h: New files.
34472dfe 9623 * Makefile.am: Added them in all the right places.
4878beec 9624
34472dfe 9625 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9626
9627 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9628 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9629 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9630 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9631 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9632 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9633 scm_alloc_double_cell, respectively.
9634
d2bc7fae
MV
96352001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9636
9637 * modules.c (scm_c_use_module): Adapt to changes to
9638 `process-use-modules'.
9639
5eec27e9
DH
96402001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9641
9642 * numbers.c (scm_divide): Fix more division by zero errors.
9643
8978878f
GH
96442001-11-21 Gary Houston <ghouston@arglist.com>
9645
9646 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9647 obsolete. autogen.sh says:
9648 invalid unused variable name: `OMIT_DEPENDENCIES'
9649
164826d3
DH
96502001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9651
9652 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9653 reporting the bug.
9654
84aff7a7
MV
96552001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9656
9657 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9658 Thanks to Eric Gillespie, Jr!
34472dfe 9659
6063dc1d
SJ
96602001-11-21 Stefan Jahn <stefan@lkcc.org>
9661
34472dfe
TTN
9662 * win32-socket.c (getservent, setservent, endservent,
9663 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9664 Appropriate replacements for M$-Windows.
9665
9666 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9667 these definitions for GUILE_DEBUG.
9668
9669 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9670 M$-Windows compiler. Include some pieces of code (protoent and
9671 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9672 native M$-Windows compiler.
9673
351982f6
MV
96742001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9675
9676 * modules.c (scm_c_export): Do nothing when the first argument is
9677 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9678
849038b5
TTN
96792001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9680
9681 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9682 also include `buildstamp'.
9683
5c790b44
RB
96842001-11-18 Rob Browning <rlb@defaultvalue.org>
9685
9686 * version.c
9687 (s_scm_major_version): use SCM_MAJOR_VERSION.
9688 (s_scm_minor_version): use SCM_MINOR_VERSION.
9689 (s_scm_micro_version): use SCM_MICRO_VERSION.
9690 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9691 SCM_MICRO_VERSION.
9692
9693 * version.h.in
9694 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9695 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9696 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9697
694a9bb3
NJ
96982001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9699
9700 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9701 Rewrite docstrings without reference to substring-move-left/right,
9702 since the latter no longer exist.
9703
302c12b4
DH
97042001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9705
9706 * eval.c: Removed bogus comment about acros.
9707
9708 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9709 Minimize scope of local variable. Eliminate dependency on
9710 macro DEBUG_EXTENSIONS.
9711
9712 (s_splicing): New error message string.
9713
9714 (scm_m_body): Issue 'bad body' message rather than 'missing
9715 expression' message.
9716
9717 (scm_m_quote): Eliminate unnecessary copying.
9718
9719 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9720 checking of the body to scm_m_body.
9721
9722 (scm_m_do): Move comment to function header. Rename arg1 to
9723 binding. Made the code a bit easier to read.
9724
9725 (evalcar): Removed.
9726
9727 (iqq): Added a comment. Changed the depth parameter to
9728 unsigned. Use size_t for vector lengths. Make sure vector object
9729 is gc protected as long as its contents are read. Add some syntax
9730 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9731 control structure a bit.
9732
9733 (scm_m_delay): Added comment about the implementation of
9734 scm_m_delay.
9735
9736 (scm_m_define): Add comment about guile's currying define
9737 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9738 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9739
9740 (scm_m_letrec1): Removed. Part of the functionality is taken
9741 over by the new function 'transform_bindings'.
9742
9743 (transform_bindings): New function. Takes over some of the
9744 functionality of removed function 'scm_m_letrec1', namely to split
9745 a list of bindings into a reversed list of variables and a list of
9746 initializers.
9747
9748 (scm_m_letrec): Call 'transform_bindings'.
9749
9750 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9751 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9752 test. Use 'transform_bindings'. Fixed scoping error with named
9753 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9754 Jerram for suggesting the fix). Cleaned up the control structure
9755 a bit.
9756
9757 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9758 unnecessary consing. Eliminated unnecessary
9759 SCM_DEFER/ALLOW_INTS.
9760
9761 (SCM_CEVAL): Un-obfuscated some loops.
9762
cecb4a5e
NJ
97632001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9764
8f85c0c6
NJ
9765 * gc.h (scm_unhash_name): Old declaration removed.
9766
9767 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9768 @code{primitive-eval}.
9769
9770 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9771 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9772 Change @deffnx lines in docstrings to say {Scheme Procedure}
9773 rather than primitive or procedure.
9774
9775 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9776 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9777 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9778 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9779 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9780 (scm_string_split, scm_string_ci_to_symbol), strings.c
9781 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9782 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9783 Docstring fixes and improvements reflecting edits that have been
9784 made in the reference manual source.
9785
9786 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9787 scm_object_property, scm_set_object_property_x): Remove invalid
9788 @deffnx lines for corresponding procedure property primitives.
9789
cecb4a5e
NJ
9790 These changes add a @deffnx C function declaration and function
9791 index entries for each Guile primitive to the copy of the doc
9792 snarf output that is used for reference manual synchronization.
9793 Online help is unchanged.
849038b5 9794
cecb4a5e
NJ
9795 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9796 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9797 name to SCM_SNARF_DOCS.
849038b5 9798
cecb4a5e
NJ
9799 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9800 snarf-check-and-output-texi.
9801
9802 * Makefile.am (guile-procedures.texi): New rule.
9803 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9804 Changed so that the last stage of doc snarfing is now performed
9805 twice, once to produce guile-procedures.txt for online help, and
9806 once to produce guile.texi for reference manual synchronization.
9807
ddea3325
DH
98082001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9809
9810 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9811 safely usable as a single statement followed by a ';', for example
9812 in an if statement.
9813
9814 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9815
72dd0a03
NJ
98162001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9817
9818 * random.c (scm_random_solid_sphere_x,
9819 scm_random_hollow_sphere_x): Correct "shere" typos.
9820
9821 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9822
9823 * version.c (scm_version): Update docstring to include
9824 `micro-version'.
9825
6558eda6
MV
98262001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9827
409b8588
MV
9828 * modules.c (scm_c_export): Call va_end after collecting the
9829 symbols.
9830
adb8c0f2
MV
9831 * strop.h, strop.c (scm_substring_move_left_x,
9832 scm_substring_move_right_x): Removed.
9833
6558eda6
MV
9834 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9835 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9836 configure does.
9837
5d8fc640
MV
98382001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9839
9840 * numbers.c: Document macros to define when including
9841 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9842 now rely on SIZEOF_ macros that have been figured out at
9843 configure time.
9844
9845 * num2integral.i.c: Adapt to new interface.
9846 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9847 target type by casting it and checking whether it is still the
9848 same. Do not try to handle bignums for integral types that are
9849 smaller than fixnums. When handling bignums, collect the
9850 magnituse first into a unsigned type, and correctly check for
9851 overflow.
9852 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9853 only -MIN_VALUE can still be negative of all negative numbers (in
9854 twos-complement).
9855
849038b5 9856 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9857
9858 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9859 HAVE_LONG_LONG depending on whether their size is non-zero.
9860
d6b8cf11
TTN
98612001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9862
9863 * strop.c (scm_string_null_p): Docfix; nfc.
9864 Thanks to Scott Lenser.
9865
9401323e
NJ
98662001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9867
9868 * extensions.c (scm_load_extension): Canonicalize docstring
9869 whitespace.
9870
9871 * unif.c (scm_uniform_array_write), ports.c
9872 (scm_current_output_port, scm_force_output), dynwind.c
9873 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9874 filesys.c (scm_open, scm_lstat), struct.c
9875 (scm_make_struct_layout), random.c (scm_random,
9876 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9877 (scm_i_index): Remove superfluous whitespace from end of docstring
9878 lines.
9879
9880 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9881 strings.c (scm_make_string), variable.c (scm_make_variable,
9882 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9883 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9884 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9885 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9886 newline at end of docstrings.
9887
9888 * modules.c (scm_set_current_module): Add missing newline to
9889 docstring.
9890
b4e15479
SJ
98912001-11-07 Stefan Jahn <stefan@lkcc.org>
9892
9893 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9894 and makes them available through Guile. That is because the
9895 Winsock-API does not store its errors in `errno' and thus cannot
9896 return error messages via `strerror (errno)'.
9897
9898 * socket.c (scm_init_socket): Initialize `win32-socket' part
9899 here under M$-Windows.
9900
d6b8cf11 9901 * numbers.h: Added missing declaration of
b4e15479
SJ
9902 `scm_sys_check_number_conversions()'.
9903
9904 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9905 and use in `(strerror)' and `(system-error)'.
9906
d6b8cf11 9907 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9908 `win32-socket.[ch]' to extra source and header files.
9909
7ab89df1
MV
99102001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9911
9912 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9913 a call to turn-on-debugging when --debug has been given instead of
9914 turning it on directly. Also, handle new `--no-debug' option,
9915 which might suppress the call to turn-on-debugging.
9916
0233bfc1
SJ
99172001-11-05 Stefan Jahn <stefan@lkcc.org>
9918
9919 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9920
8f99e3f3
SJ
99212001-11-04 Stefan Jahn <stefan@lkcc.org>
9922
9923 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9924 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9925 correctly and allows a clean build on Win32.
9926
d6b8cf11 9927 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9928 into FOO.
9929
9930 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9931 import macros for external libraries (libcrypt, libqthreads,
9932 libreadline and libregex).
9933
9934 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9935
9936 * posix.c (flock): Added support for flock() in M$-Windows.
9937
9938 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9939 of __SCM_IMPORT__.
9940
9941 * fports.c (getflags): Differentiate reading and writing pipes
9942 descriptors.
9943
9944 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9945 M$-Windows.
9946
9947 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9948 conditionalized error code if `ETIMEDOUT' is not available.
9949 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9950 timeout'.
9951
9952 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9953 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9954 each inclusion of `num2integral.i.c'.
9955 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9956
4e21fa60
MV
99572001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9958
9959 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9960 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9961
08112c95
MD
99622001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9963
7663c008
MD
9964 * print.c (scm_iprin1): Mark print state as revealed when
9965 dispatching to generic write or display.
9966
08112c95
MD
9967 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9968
f712d833
MV
99692001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9970
9971 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9972
f712d833
MV
9973 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9974 and win32-dirent.h to extra source and header files. These
9975 include the uname() and the POSIX dirent interface implementation
9976 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9977 linkers which do not allow unresolved symbols inside shared
9978 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9979 dependency.
9980
d6b8cf11
TTN
9981 * __scm.h: Defined SCM_API. This macro gets prepended to all
9982 function and data definitions which should be exported or imported
f712d833
MV
9983 in the resulting dynamic link library in the Win32 port.
9984
9985 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9986 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9987 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9988 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9989 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9990 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9991 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9992 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9993 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9994 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9995 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9996 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9997 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9998 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9999 vports.h, weaks.h:
10000 Prefixed each each exported symbol with SCM_API.
10001
d6b8cf11 10002 * continuations.c: Added comment about the use of the extern
f712d833
MV
10003 declarations of {get,set}context() functions used in the ia64 port.
10004
10005 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
10006 is meant to be a `unsigned long *'.
10007
10008 * filesys.c: Include `direct.h' if possible. Use local
10009 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
10010 macros for M$-Windows. Implementation of `fstat_Win32()' which is
10011 able to differentiate between sockets and other file descriptors.
10012 Use this function as wrapper in `scm_fstat()'. Fixed typo in
10013 `scm_dirname()'.
10014
10015 * fports.c: Include `io.h' is possible. Put `*fp' into referring
10016 statement block in `scm_fport_buffer_add()'.
10017 Some corrections in `getflags()'.
d6b8cf11 10018
f712d833
MV
10019 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
10020
10021 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
10022 build on Win32. Disable preloaded symbols on Win2 platforms.
10023
10024 * ioext.c, ports.c: Include `io.h' is possible.
10025
10026 * mkstemp.c: Include `process.h' is possible.
10027
10028 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
10029 too.
10030 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
10031
10032 * posix.c: Remove unnecessary dirent includes and defines. Include
10033 local `win32-uname.h' for MinGW. Extern declaration of
10034 `mkstemp()' for systems where it does not exists. Make
10035 `getlogin()' available on M$-Windows.
10036
10037 * scmsigs.c: Made `usleep()' avalable on MinGW.
10038
10039 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
10040
10041 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
10042
10043 * win32-uname.c: Include "win32-uname.h", not "uname.h".
10044
d245ce23
MD
100452001-10-28 Mikael Djurfeldt <mdj@linnaeus>
10046
10047 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
10048 Don't apply scm_uniform_vector_length on arrays.
10049
8ea46249
DH
100502001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10051
10052 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
10053 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
10054 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
10055 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
10056 scm_list_<n> over scm_cons[2]?.
10057
10058 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
10059 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
10060 SCM_C[AD][AD]R instead of explicit form.
10061
10062 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
10063 comparison parameters.
10064
10065 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
10066 !SCM_NULLP instead of SCM_NIMP.
10067
10068 (scm_m_case): Don't copy the form. Renamed proc to clause and
10069 minimized its scope. Renamed x to clauses. Removed side
10070 effecting operation from macro call.
10071
10072 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
10073 minimized its scope. Renamed x to clauses. Minimized the scope
10074 of variable 'len'. Make sure the else clause is treated specially
10075 even in case of '=>' occurences. Don't change the else to #t in
10076 order to be able to distinguish this case in the evaluator. Leave
10077 type checking of the recipient to the evaluator.
10078
10079 (scm_c_improper_memq): Made the comment somewhat clearer.
10080
10081 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
10082 test for SCM_IM_LET at the place of the formal parameters.
10083 Simplified the formal parameter checking.
10084
10085 (scm_m_letstar): Added Comment. Renamed proc to bindings.
10086 Renamed arg1 to binding and minimized its scope. Eliminated
10087 unnecessary consing.
10088
10089 (scm_m_do): Renamed proc to bindings. Minimized the scope of
10090 variable 'len'.
10091
10092 (build_binding_list): New static function.
10093
10094 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
10095 Further, split up the 'letrec' unmemoizing code to the
10096 corresponding parts for 'do', 'let' and 'letrec', adding comments
10097 to each form. Cleanup the handling of the do form (This removes
10098 some *real* code :-).
10099
10100 (SCM_CEVAL): Removed side effecting operation from macro call.
10101 Handle the 'else clause of the 'cond form specially - the symbol
10102 'else is not replaced with #t any more.
10103
8186c4f5
GH
101042001-10-14 Gary Houston <ghouston@arglist.com>
10105
10106 * version.c (scm_version): use sprintf instead of snprintf,
10107 for portability. thanks to Bill Schottstaedt.
10108
89759084
MD
101092001-10-14 Mikael Djurfeldt <mdj@linnaeus>
10110
10111 * read.c (scm_lreadr): When user-defined hash procedure returns
10112 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
10113 an exception. (This prevents parsing of uniform vectors from
10114 interfering with parsing of numbers.)
10115
9c7ce563
MV
101162001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
10117
10118 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
10119 PTRDIFF_MIN. Thanks to Ken Raeburn.
10120
101212001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
10122
10123 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
10124
10125 * eval.c (scm_m_atbind): First try to find the variable without
10126 defining it locally; when it has not been found, define it
10127 locally.
10128
10129 * modules.c (module_variable): Pass over variables that exist but
10130 are unbound.
10131
101322001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10133
10134 * backtrace.c (display_backtrace_file_and_line): Only use
10135 scm_basename when POSIX support is compiled in. Thanks to Chris
10136 Cramer.
10137
1fe5e088
DH
101382001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10139
10140 * numbers.c (mem2uinteger): Return number read so far when coming
10141 across a hexdigit after having read a # or if not reading a hex
10142 value. This will enable the calling code to correctly handle
10143 forms like 1e2. (The background is, that the exponent markers d,
10144 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
10145 providing this patch.
10146
10147 (mem2complex): Fix erroneous double-negation. Now, numbers like
10148 1-i will be read correctly.
10149
68665a97
MD
101502001-10-12 Mikael Djurfeldt <mdj@linnaeus>
10151
10152 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
10153
10154 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
10155
d5cf5324
DH
101562001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
10157
10158 * print.c (scm_print_state_vtable, print_state_pool):
10159 Initialize. These variables are now registered as gc roots.
10160
10161 (scm_current_pstate): Update documentation.
10162
10163 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
10164 scm_prin1, scm_init_print): print_state_pool is registered as a
10165 gc root and thus does not need to be protected by a surrounding
10166 pair any more.
10167
10168 (make_print_state): The car of print_state_pool no longer holds
10169 the scm_print_state_vtable.
10170
10171 (scm_current_pstate, scm_make_print_state, print_circref,
10172 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
10173 SCM_N<foo>.
10174
10175 (scm_prin1): When building lists, prefer scm_list_<n> over
10176 scm_cons[2]?.
10177
10178 (scm_iprlist): Removed a redundant SCM_IMP test.
10179
10180 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
10181
37c56aec
DH
101822001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10183
10184 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
10185
10186 (scm_memcons, scm_mem_to_proc): When building lists, prefer
10187 scm_list_<n> over scm_cons[2]?.
10188
10189 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
10190
10191 (scm_procedure_name): Use SCM_CADR instead of explicit form.
10192
10193 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10194 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10195 for some reason his patch didn't make it into the cvs.
10196
79d34f68
DH
101972001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10198
10199 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10200 little bit - should even be somewhat more accurate now.
10201
5e137c65
RB
102022001-10-08 Rob Browning <rlb@defaultvalue.org>
10203
10204 * gc.c: support ia64 register backing store.
10205 (SCM_MARK_BACKING_STORE): new macro.
10206
10207 * continuations.h: support ia64 register backing store.
10208 (struct scm_t_contregs): add ia64 register backing store.
10209
10210 * continuations.c: support ia64 register backing store.
10211 (continuation_mark): mark ia64 register backing store.
10212 (continuation_free): free ia64 register backing store.
10213 (scm_make_continuation): capture ia64 register backing store.
10214 (copy_stack_and_call): copy ia64 register backing store.
10215
ee083ac2
DH
102162001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10217
10218 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10219 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10220 instead of SCM_NIMP to test for that case.
10221
10222 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10223 scm_t_bits instead of long.
10224
71dcdbf9
MV
102252001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10226
10227 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10228 SCM_T_SIGNED_BITS_MIN): New.
10229 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10230 Use them to make these macros computable by the preprocessor.
10231
10232 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10233 whether the integral type fits in a fixnum, not the compiler.
10234 This removes a spurious compiler warning. Also, honor the
10235 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10236 needed for `long long's.
10237
10238 * numbers.c: Define NO_PREPRO_MAGOC when including
10239 num2integral.c.i for `long long' and `signed long long'.
10240
152812c0
MD
102412001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10242
10243 These changes fixes a race condition in the Guile coop - pthread
10244 compatibility code.
d6b8cf11 10245
152812c0
MD
10246 * coop.c (mother_awake_p): New variable.
10247 (coop_create): Set mother_awake_p before creating or signalling
10248 mother; wait until mother is going to sleep before returning.
10249 (mother): Reset mother_awake_p before going to sleep.
10250
11d49f54
DH
102512001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10252
10253 * options.c (protected_objects, scm_init_options): The content of
10254 protected_objects is now protected from garbage collection using
10255 scm_gc_register_root instead of scm_permanent_object.
10256
10257 (get_option_setting): New static function that computes an option
10258 setting as it was formerly done in the function scm_options.
10259
10260 (get_documented_option_setting): New static function that
10261 returns option documentation as it was formerly done in the
10262 function scm_options. Note that documentation C strings are no
10263 longer precomputed into SCM objects. Instead, they are converted
10264 into SCM strings every time get_documented_option_setting is
10265 called.
10266
10267 (change_option_setting): New static functions that modifies the
10268 option setting as it was formerly done in the function
10269 scm_options. The function is now exception safe, i. e. won't
10270 cause a memory leak when interrupted. Further, only non-immediate
10271 option values are added to the protection list.
10272
10273 (scm_options): This function now has only the purpose to dispatch
10274 to to get_option_setting, get_documented_option_setting or
10275 change_option_setting, depending on the arguments given to
10276 scm_options.
10277
10278 (scm_init_opts): Don't convert documentation C strings into SCM
10279 strings. Further, don't protect any object values: They _must_
10280 be immediate values, otherwise there is no guarantee that they
10281 have not been collected before anyway.
10282
10283 * options.[ch] (scm_t_option): Made type unsigned, name into a
10284 constant char* and val into a scm_t_bits type.
10285
10286 (scm_options, scm_init_opts): The number of options is guaranteed
10287 to be larger or equal to zero. Thus, the type is changed to
10288 unsigned.
10289
3dbacabc
DH
102902001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10291
10292 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10293 testing an unsigned value for being >= 0.
10294
14282d0f
DH
102952001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10296
10297 * numbers.h: Removed old comment about using SCM_CAR to access
10298 non-pair cells.
10299
10300 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10301 the return value is signed. Thanks to Brian Crowder for the bug
10302 report.
10303
10304 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10305 values. With this patch, SCM_SRS can be safely used for other
10306 types than scm_t_signed_bits. However, it should still better be
10307 an internal macro and thus be renamed to SCM_I_SRS.
10308
10309 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10310
2dbec7b5
GH
103112001-10-03 Gary Houston <ghouston@arglist.com>
10312
10313 * continuations.h, unif.h: in the descriptions of the bit patterns
10314 of the heap cells, make bit 0 the least significant.
10315
cf4ee841
TTN
103162001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10317
10318 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10319 Thanks to Golubev I. N.
10320
4a151b3d
GH
103212001-09-25 Gary Houston <ghouston@arglist.com>
10322
10323 * ports.c (scm_drain_input): extended the docstring. thanks to
10324 Alex Schroeder and Thien-Thi Nguyen.
10325
581ded70
MD
103262001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10327
10328 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10329 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10330 macros. (The NUM names might soon change.)
10331
10332 * numbers.h: Added missing declarations.
10333
5437598b
MD
103342001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10335
10336 * Makefile.am: Distribute num2float.i.c.
10337
10338 * num2float.i.c: New file, multiply included by numbers.c, used
10339 to "templatize" the float <-> num conversion routines.
10340
10341 * numbers.c: New functions: scm_num2float, scm_float2num,
10342 scm_num2double, scm_double2num.
10343
0b073f0f
RB
103442001-09-21 Rob Browning <rlb@defaultvalue.org>
10345
10346 * .cvsignore: really add version.h
10347
10348 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10349 Otherwise it fails on the alpha. However, we might rather choose
10350 this size conditionally.
10351
10352 * numbers.c (scm_gcd): change "k" to a long from an int.
10353 Otherwise it fails on the alpha. However, we might rather choose
10354 this size conditionally.
10355
10356 * error.c (scm_wta): coerce char* to intptr_t before int
10357 assignment.
10358
10359 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10360 int.
10361
10362 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10363
2830fd91
MD
103642001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10365
10366 * numbers.c (scm_integer_expt): Accept inexact integer in second
10367 argument. (Thanks to Bill Schottstaedt.)
10368
c13f0a90
RB
103692001-09-20 Rob Browning <rlb@defaultvalue.org>
10370
10371 * .cvsignore: add version.h
10372
10373 * versiondat.h.in: removed (obsolete).
10374
10375 * version.h.in: renamed from version.h.
10376 (SCM_GUILE_MAJOR_VERSION): new public macro.
10377 (SCM_GUILE_MINOR_VERSION): new public macro.
10378 (SCM_GUILE_MICRO_VERSION): new public macro.
10379
10380 * version.h: renamed to version.h.in.
10381
10382 * version.c
10383 (scm_major_version): support integer *_VERSION macros.
10384 (scm_minor_version): support integer *_VERSION macros.
10385 (scm_micro_version): support integer *_VERSION macros.
10386 (scm_version): support integer *_VERSION macros.
10387
147c18a0
MD
103882001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10389
10390 * error.c, error.h: Made error keys globally accessible.
10391 Applications might want to test for these or use them in a direct
10392 call to scm_error.
10393
10394 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10395 routines are passed an inexact. This change in behavior is
10396 motivated by concordance with R5RS: It is more common that a
10397 primitive doesn't want to accept an inexact for an exact.
10398
662c5539
DH
103992001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10400
10401 The following patch partially undoes my patch from 2001-06-30,
10402 where I added the function scm_gc_mark_cell_conservatively. The
10403 function is buggy, since it breaks guile during conservative
10404 marking if a pointer on the stack points directly into the list of
10405 free cells on the heap: With conservative cell marking this will
10406 cause the whole free list to be scanned and marked - boom!
10407
10408 * gc.c (allocated_mark, MARK, heap_segment,
10409 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10410 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10411 scm_gc_mark_cell_conservatively and update the corresponding
10412 comments and uses accordingly. Thanks to Christopher Cramer for
10413 the patch. (Minor corrections by me.)
10414
6c1b7628
GH
104152001-09-15 Gary Houston <ghouston@arglist.com>
10416
10417 * root.h (scm_root_state): removed the continuation_stack and
10418 continuation_stack_ptr members, which have no apparent purpose.
10419 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10420 removed.
662c5539 10421
6c1b7628
GH
10422 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10423 (scm_igc): remove all references to contination_stack and
10424 continuation_stack_ptr, avoiding allocation of a vector and
10425 useless processing during gc.
10426
455c0ac8
DH
104272001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10428
10429 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10430
10431 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10432
10433 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10434
10435 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10436
10437 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10438 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10439
22ba637b
DH
104402001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10441
10442 * guardians.c (mark_dependencies_in_tconc,
10443 whine_about_self_centered_zombies, scm_init_guardians): Register
10444 the static global variable `self_centered_zombies' via
10445 scm_gc_register_root, to make some cdr-ing unnecessary.
10446
c3c4d801
DH
104472001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10448
10449 * backtrace.c (display_backtrace_file,
10450 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10451 values, use SCM_FALSEP when comparing SCM values against #f.
10452 Thanks to Rob Browning for the bug report.
10453
b00418df
DH
104542001-09-12 Martin Baulig <martin@home-of-linux.org>
10455
10456 * strings.[ch] (scm_str2string): New function.
10457
a0d34a0b
MV
104582001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10459
10460 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10461 when computing nm, even if it's negative.
10462 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10463 (scm_must_realloc): Likewise.
10464
b10586f0
ML
104652001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10466
10467 * numbers.c (scm_sys_check_number_conversions): new function,
10468 defined if Guile is compiled in debugging mode. currently checks
10469 `scm_num2ulong', should check much much more.
10470
10471 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10472 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10473
8c494e99
DH
104742001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10475
10476 * __scm.h: Added new section about compile time selectable
10477 features.
10478
10479 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10480 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10481 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10482 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10483 Removed.
10484
10485 * deprecation.c (scm_include_deprecated_features): Simplified.
10486
10487 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10488 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10489
10490 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10491 Extract side-effecting operations from macros.
10492
10493 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10494 scm_top_level_lookup_closure_var and scm_system_transformer.
10495
10496 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10497
10498 (heap_segment): Use CELL_P instead of SCM_CELLP.
10499
10500 * init.c (start_stack): Don't initialize
10501 scm_top_level_lookup_closure_var and scm_system_transformer.
10502
10503 * modules.c (scm_set_current_module): Don't access
10504 scm_top_level_lookup_closure_var and scm_system_transformer.
10505
10506 (scm_sym2var): Don't call scm_variable_set_name_hint.
10507
10508 (scm_post_boot_init_modules): Removed deprecated initializations.
10509
10510 * print.c (scm_ipruk): Don't access cell contents of non cells.
10511
10512 * strings.c (scm_string_set_x): All strings are writable.
10513
10514 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10515 type. There is only one string type now.
10516
10517 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10518
10519 * tags.h: Remove comments about two different string types.
10520
10521 (SCM_CELLP, SCM_NCELLP): Deprecated.
10522
10523 * variable.c (make_variable): Remove code variant for vcells.
10524
10525 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10526 SCM_VARIABLE_LOC): Remove code variant for vcells.
10527
10528 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10529 SCM_ENABLE_DEPRECATED with the logic reversed.
10530
10531 * dynl.c (moddata, registered_mods), dynl.[ch]
10532 (scm_register_module_xxx, scm_registered_modules,
10533 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10534 (*top-level-lookup-closure*), eval.[ch]
10535 (scm_top_level_lookup_closure_var, scm_system_transformer,
10536 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10537 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10538 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10539 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10540 scm_unprotect_object), modules.c (root_module_lookup_closure,
10541 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10542 beautify_user_module_x_var, try_module_autoload_var,
10543 scm_module_full_name), modules.[ch] (scm_the_root_module,
10544 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10545 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10546 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10547 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10548 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10549 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10550 scm_make_shared_substring), tags.h (scm_tc7_substring,
10551 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10552 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10553 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10554 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10555 Removed.
10556
10557 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10558 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10559 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10560 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10561 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10562 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10563 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10564 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10565 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10566 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10567 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10568 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10569 (setzone, scm_strftime, scm_strptime), vports.c
10570 (scm_make_soft_port): Remove calls to
10571 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10572 gone, all strings are 0-terminated anyway.
10573
10574 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10575 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10576 double inclusion of the same headers to the SCM_<filename>_H
10577 format.
10578
10579 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10580 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10581 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10582 any more.
10583
10584 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10585 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10586 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10587 !SCM_<foo> over SCM_N<foo>.
10588
dee01b01
DH
105892001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10590
10591 * Makefile.am: Remove references to symbols-deprecated.c.
10592
10593 * symbols.c (scm_init_symbols): Don't initialize deprecated
10594 symbol functions.
10595
10596 * symbols-deprecated.c: Removed.
10597
10598 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10599 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10600 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10601 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10602 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10603 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10604 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10605 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10606 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10607 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10608 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10609 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10610 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10611 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10612 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10613 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10614 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10615 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10616 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10617 scm_intern0, scm_sysintern, scm_sysintern0,
10618 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10619 scm_string_to_obarray_symbol, scm_intern_symbol,
10620 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10621 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10622 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10623 vectors.[ch] (scm_vector_set_length_x): Removed.
10624
10625 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10626 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10627 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10628 Renamed the macros that are defined to inhibit double inclusion of
10629 the same headers to the SCM_<filename>_H format.
10630
10631 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10632 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10633 SCM_N<foo>.
10634
b29058ff
DH
106352001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10636
10637 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10638 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10639 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10640 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10641 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10642 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10643 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10644 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10645 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10646 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10647 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10648 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10649
10650 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10651 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10652 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10653 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10654 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10655 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10656 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10657 double inclusion of the same headers to the SCM_<filename>_H
10658 format.
10659
10660 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10661 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10662 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10663 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10664 !SCM_<foo> over SCM_N<foo>.
10665
0527e687
DH
106662001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10667
10668 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10669 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10670 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10671 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10672 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10673 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10674 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10675 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10676 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10677 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10678 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10679 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10680 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10681 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10682 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10683 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10684 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10685 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10686 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10687 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10688 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10689 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10690 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10691 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10692 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10693 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10694 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10695 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10696 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10697 the macros that are defined to inhibit double inclusion of the
10698 same headers to the SCM_<filename>_H format.
10699
fada26b2
MV
107002001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10701
10702 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10703 "scm_t_portable" with "scm_port_table" which was an artifact from
10704 the great "scm_*_t -> scm_t_" renaming.
10705
e4d1c1ea
TTN
107062001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10707
10708 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10709 used; nfc. Thanks to Bill Schottstaedt.
10710
10711 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10712 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10713 Thanks to Chris Cramer.
10714
b573e744
MV
107152001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10716
10717 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10718
10719 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10720 dynamic scope.
10721 * dynwind.h (scm_swap_bindings): Declare.
10722 * dynwind.c (scm_swap_bindings): Make non-static.
10723
8a3e715b
ML
107242001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10725
10726 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10727 doing exactly nothing about them). thanks Neil!
10728
cf504ee0
NJ
107292001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10730
10731 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10732
43b83b54
TTN
107332001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10734
10735 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10736 (proto) in the case when either `GUILE_DEBUG' or
10737 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10738
10739 (map_free_list): Fix typo: Ref `f' correctly.
10740
10741 Thanks to Chris Cramer.
10742
ab4cd34b
RB
107432001-08-15 Rob Browning <rlb@defaultvalue.org>
10744
10745 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10746 variables.
10747 (libpath.h): change libguileversion to libguileinterface.
10748
b754e3d1
MV
107492001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10750
10751 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10752 ChangeLog-2000. Thanks to Daniel Skarda!
10753
8b1d12c7
ML
107542001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10755
10756 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10757 do it from the Makefile.
10758
10759 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10760 are of a reasonable size.
10761
baffb19f
NJ
107622001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10763
10764 * stacks.c (scm_make_stack): Improve docstring by explaining use
10765 of cutting args.
10766
c1151355
MV
107672001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10768
10769 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10770 scm_char_whitespace_p, scm_char_upper_case_p,
10771 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10772 characters to fulfill isascii in addition to the primary
10773 predicate.
10774
3c9a524f
DH
107752001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10776
10777 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10778 scm_istr2flo, scm_istring2number): Removed.
10779
10780 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10781 SCM_SLOPPY_<foo>.
10782
10783 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10784 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10785 Added.
10786
10787 (scm_string_to_number): Use new number parser.
10788
10789 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10790 handles complex numbers.
10791
10792 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10793 SCM_<foo>_H.
10794
10795 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10796 SCM_N<pred>.
10797
10798 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10799
10800 (scm_i_mem2number): Added.
10801
10802 (scm_exact_to_inexact): Changed signature.
10803
10804 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10805 here instead of within scm_i_mem2number. Call scm_i_mem2number
10806 instead of scm_istr2int and scm_istring2number.
10807
01f11e02
DH
108082001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10809
10810 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10811 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10812 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10813 !SCM_<pred> over SCM_N<pred>.
10814
10815 (scm_eval_body): Remove side effecting code from macro call.
10816
10817 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10818 SCM_NIMP test.
10819
6cf69537
DH
108202001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10821
10822 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10823
54866b6c
MV
108242001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10825
10826 Removed vcell slot from structs.
43b83b54 10827
54866b6c
MV
10828 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10829 subsequent indices.
10830
10831 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10832 zero. Use scm_vtable_index_layout instead of "0" when accessing
10833 said slot.
10834 (scm_init_struct): Remove vcell slot layout code from
10835 required_vtable_fields.
10836
10837 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10838
10839 * goops.c (build_class_class_slots): Removed vcell slot
10840 definition.
10841
10842 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10843 Removed vcell slot layout code.
10844 (scm_si_vcell): Removed.
10845
5b54c4da
MV
108462001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10847
a0f5718e 10848 "Glocs" have been removed.
43b83b54 10849
a0f5718e
MV
10850 * tags.h: Update tag system docs.
10851 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10852 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10853 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10854 or SCM_NCONSP, respectively.
10855
10856 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10857 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10858 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10859
10860 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10861 tell glocs from structs.
43b83b54 10862
a0f5718e
MV
10863 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10864
10865 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10866 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10867 instead of with glocs.
10868 (EVALCAR): Do not test for glocs.
10869 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10870 condition.
10871 (scm_unmemocar): Do not handle glocs.
10872 (scm_m_atfop): Memoize as a variable, not as a gloc.
10873 (scm_eval_args, scm_deval_args): Do not handle glocs.
10874 (scm_ceval, scm_deval): Likewise.
43b83b54 10875
a0f5718e
MV
10876 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10877 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10878 Removed.
10879
10880 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10881
10882 * dynwind.c (scm_swap_bindings): Likewise.
10883 (scm_dowinds): Updated to recognize lists of variables instead of
10884 lists of glocs.
10885
10886 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10887
43b83b54 10888
5b54c4da
MV
10889 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10890 where it is needed.
43b83b54 10891
3c3db128
GH
108922001-07-25 Gary Houston <ghouston@arglist.com>
10893
10894 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10895 docstrings to reflect the n-ary implementation.
10896
dd29a169
MV
108972001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10898
10899 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10900 value of a variable, not the plain "return" statement.
10901
f5fe6c2f
MV
109022001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10903
10904 * eval.c: Allow variables in memoized code (in addition to glocs).
10905 (scm_lookupcar): Handle variables in lost races. Replace symbol
10906 with variable directly, do not make a gloc.
10907 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10908 like glocs.
10909 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10910 the main switch.
10911
ee0c7345
MV
109122001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10913
6d9ad98a
MV
10914 * variable.c (scm_i_variable_print): Use "value" instead of
10915 "binding" since a binding is the mapping between symbols and
10916 variables, not between variables and their values.
10917
ee0c7345
MV
10918 * tags.h (scm_tc7_variable): New.
10919 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10920 * print.c (scm_iprin1): Likewise.
10921
10922 * variable.h (scm_tc16_variable): Removed.
10923 (SCM_VARIABLEP): Test for new tc7 code.
10924 (scm_i_variable_print): New.
10925 * variable.c (scm_tc16_variable): Removed.
10926 (variable_print): Renamed to scm_i_variable_print and made
10927 non-static.
10928 (variable_equal_p): Removed.
10929 (make_variable): Construct a tc7 object instead of a smob.
10930 (scm_init_variable): Do not register smob.
43b83b54 10931
f3805ebb
MV
109322001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10933
10934 * tags.h: Include inttypes.h when we have it.
10935
109362001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10937
10938 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10939 is taken by the new SCM_IM_CALL_WITH_VALUES.
10940 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10941
6a1677a3
GH
109422001-07-22 Gary Houston <ghouston@arglist.com>
10943
10944 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10945 SCM_MAKINUM to convert regoff_t value to SCM.
10946
1bed8c28
GH
109472001-07-21 Gary Houston <ghouston@arglist.com>
10948
10949 * scmsigs.c: include sys/time.h for itimer stuff.
10950
e658215a
RB
109512001-07-19 Rob Browning <rlb@defaultvalue.org>
10952
10953 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10954
10955 * c-tokenize.lex: add option %nounput to quiet warning.
10956 Add prototype for yylex to quiet warning.
10957
10958 * scmconfig.h.in: add flags for setitimer and getitimer.
10959
10960 * scmsigs.h (scm_init_scmsigs): new prototype.
10961 (scm_init_scmsigs): new prototype.
10962
10963 * scmsigs.c (s_scm_setitimer): new function.
10964 (s_scm_setitimer): new function.
10965
58ade102
MG
109662001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10967
10968 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10969 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10970 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10971 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10972 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10973 guile-func-name-check.in, guile-snarf-docs-texi.in,
10974 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10975 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10976 objprop.c, objprop.h, options.c, options.h, random.h,
10977 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10978 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10979 version.c, version.h: Updated copyright notice.
10980
6b80d352
DH
109812001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10982
10983 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10984 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10985 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10986 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10987 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10988 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10989 sym_environment, scm_sym_change_class): New static variables to
10990 hold predefined symbols.
10991
10992 (build_class_class_slots): Build the list using scm_list_n
10993 instead of cons. Also, slots are already created as lists, thus
10994 making a call to maplist unnecessary.
10995
10996 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10997 scm_class_direct_subclasses, scm_class_direct_methods,
10998 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10999 scm_method_procedure, create_standard_classes, purgatory): Use
11000 predefined symbols.
11001
11002 (build_slots_list, compute_getters_n_setters,
11003 scm_sys_initialize_object, scm_sys_inherit_magic_x,
11004 get_slot_value_using_name, set_slot_value_using_name,
11005 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
11006 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
11007 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
11008
11009 (scm_sys_prep_layout_x): Minimize variable scopes.
11010
11011 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
11012 scm_sys_fast_slot_set_x): Fix signedness.
11013
11014 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
11015 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
11016 scm_memoize_method, scm_wrap_object): Use packing and unpacking
11017 when converting to and from SCM values.
11018
11019 (scm_enable_primitive_generic_x): Add rest argument checking.
11020
11021 (map, filter_cpl, maplist, scm_sys_initialize_object,
11022 scm_sys_prep_layout_x, slot_definition_using_name,
11023 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
11024 call_memoize_method, scm_make, scm_make_class): Prefer explicit
11025 predicates over SCM_N?IMP tests.
11026
11027 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
11028 checking.
11029
11030 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
11031 alias.
11032
63bcad19
DH
110332001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11034
11035 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
11036
11037 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
11038
11039 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
11040
11041 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
11042
4d6aae71
ML
110432001-07-12 Michael Livshin <mlivshin@bigfoot.com>
11044
11045 * strings.c (s_scm_string): fix arg position in assert.
11046
4b8ec619
GH
110472001-07-11 Gary Houston <ghouston@arglist.com>
11048
11049 * strports.c (st_write): use memcpy, not strncpy. thanks to
11050 Dale P. Smith.
11051
dbb640bd
TTN
110522001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
11053
11054 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
11055 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
11056 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
11057 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
11058 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
11059 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
11060 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
11061 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
11062 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
11063 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
11064 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
11065 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
11066 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
11067 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
11068 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
11069 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
11070 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
11071 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
11072 weaks.c, weaks.h: Remove "face-lift" comment.
11073
fd6c6321
RB
110742001-07-08 Rob Browning <rlb@defaultvalue.org>
11075
11076 * .cvsignore: add stamp-h.in.
11077
f91e4547
MG
110782001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11079
11080 * hooks.c (scm_make_hook, scm_add_hook_x),
11081 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
11082 value info to the docstrings.
11083
7beabedb
MG
110842001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11085
11086 Some more compatibility patches for Windows.
dbb640bd 11087
7beabedb
MG
11088 * posix.c (getlogin): getlogin() implementation for Windows.
11089
11090 * backtrace.c, ioext.c: Include <stdio.h>.
11091
11092 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
11093 exist.
11094
11095 * cpp_sig_symbols.in: Added SIGBREAK.
11096
0d0560d0
MV
110972001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
11098
11099 * strports.c (scm_read_0str, scm_eval_0str): Call
11100 scm_c_read_string and scm_c_eval_string respectively, not
11101 themselves. Thanks to Dale P. Smith!
11102
9a97e362
DH
111032001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11104
11105 * unif.c (scm_array_set_x): The variable args does not
11106 necessarily have to be a list. Further, got rid of a redundant
11107 SCM_NIMP test.
11108
592996c9
DH
111092001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11110
11111 * list.c (SCM_I_CONS): Make sure the cell type is initialized
11112 last.
11113
11114 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 11115 init_heap_seg): Fixed signedness.
592996c9
DH
11116
11117 (init_heap_seg): Replaced strange for-loop with a while loop.
11118
11119 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
11120
11121 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
11122
11123 The following patch adds conservative marking for the elements of
11124 free or allocated cells.
11125
11126 * gc.c (allocated_mark, heap_segment): New static functions.
11127
11128 (which_seg): Deleted, since the functionality is now provided by
11129 function heap_segment.
11130
11131 (map_free_list): Use heap_segment instead of which_seg.
11132
11133 (MARK): If cell debugging is disabled, mark free cells
11134 conservatively.
11135
11136 (scm_mark_locations, scm_cellp): Extracted the search for the
11137 heap segment of a SCM value into function heap_segment.
11138
11139 (scm_init_storage): Allocated cells must be marked
11140 conservatively.
11141
11142 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
11143
11144 The following patch changes the representation of weak vectors to
11145 double cells instead of using an extension of the vector's
11146 allocated memory.
11147
11148 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
11149 the result of SCM_WVECT_GC_CHAIN.
11150
11151 (scm_gc_sweep): Weak vectors don't have extra fields any more.
11152
11153 * weaks.c (allocate_weak_vector): New static function. It does
11154 not patch any previously created vector object during the
11155 construction of a weak vector, and thus doesn't need to switch
11156 off interrupts during vector creation.
11157
11158 (scm_make_weak_vector, scm_make_weak_key_hash_table,
11159 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11160 Use allocate_weak_vector to provide the new weak vector object.
11161
11162 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
11163 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
11164 now stored in the double cell.
11165
11166 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
11167 Use SCM_WVECT_TYPE.
11168
11169 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
11170 using an entry of the double cell.
11171
4dadf664
TTN
111722001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
11173
11174 * stamp-h.in: bye bye
11175
02202352
MV
111762001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
11177
11178 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
11179 scm_eval_0str.
11180
11181 * load.c, load.h (scm_c_primitive_load,
11182 scm_c_primitive_load_path): New.
11183
11184 * strports.c, strports.h (scm_c_read_string): Renamed from
11185 scm_read_0str. Also, added "const" qualifier to argument.
11186 (scm_c_eval_string): Renamed from scm_eval_0str.
11187 (scm_read_0str, scm_eval_0str): Deprecated.
11188
df1ad0d1
MG
111892001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11190
11191 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
11192 SCM_LIST1.
11193
1afff620
KN
111942001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11195
11196 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11197 scm_list_n): New functions.
11198 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11199 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11200 (lots of files): Use the new functions.
4dadf664 11201
1afff620
KN
11202 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11203
11204 * strings.c: #include "libguile/deprecation.h".
11205
b858464a
MG
112062001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11207
11208 * read.c (scm_lreadr): When reading a hash token, check for a
11209 user-defined hash procedure first, so that overriding the builtin
11210 hash characters is possible (this was needed for implementing
11211 SRFI-4's read synax `f32(...)').
4dadf664 11212
b858464a
MG
11213 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11214 because the latter is unsigned now and breaks comparisons like
11215 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11216
d95c0b76
NJ
112172001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11218
11219 * eval.h, eval.c (scm_call_4): New function.
11220
11221 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11222 directly rather than dispatching to them via scm_ithrow and a lazy
11223 catch.
4dadf664 11224
d95c0b76
NJ
11225 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11226 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11227 for trap handler procedures.
11228
11229 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11230 procedures not being #f.
11231
30e3be5a
ML
112322001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11233
11234 * Makefile.am (c-tokenize.c): add rule to generate it.
11235 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11236
11237 filter-doc-snarfage.c: remove.
11238
82893676
MG
112392001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11240
11241 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11242
11243 The following set of changes makes compiling Guile under various
11244 Windows compilers easier. Compilation under GNU systems should
11245 not be affected at all.
11246
11247 Thanks to Stefan Jahn for all necessary information, patches and
11248 testing.
4dadf664 11249
82893676
MG
11250 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11251 getpgrp, ttyname, primitive-fork and some header inclusion for
11252 Windows.
11253
11254 * random.c: Define M_PI, if not predefined and use __int64 for
11255 LONG64 under Windows.
11256
11257 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11258 Windows and conditionalize some signal names.
11259
4dadf664 11260 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11261 Include socket library header under Windows.
11262
11263 * stime.c (CLKTCK): Add cast to int, to make it compile under
11264 Windows.
11265
11266 * ports.c (truncate): New function, compiled only under Windows.
11267
11268 * net_db.c: Do not declare errno under Windows.
11269
11270 * iselect.h, inet_aton.c: Include socket library headers under
11271 Windows.
11272
11273 * guile.c (inner_main): Under Windows, initialize socket library
11274 and initialize gdb_interface data structures.
11275
11276 * gdb_interface.h: Under Windows, gdb_interface cannot be
11277 initialized statically. Initialize at runtime instead.
11278
11279 * fports.c (write_all): ssize_t -> size_t.
11280 (fport_print): Conditionalize call to ttyname().
11281 (getflags): New function, compiled only under Windows.
11282
11283 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11284 primitives chown, link, fcntl.
11285 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11286 as path seperator.
11287
11288 * backtrace.c: Include <io.h> under Windows.
11289
11290 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11291
11292 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11293 declaration.
11294
fdc28395
KN
112952001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11296
11297 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11298 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11299 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11300 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11301 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11302 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11303 (scm_dynamic_wind, scm_dowinds), environments.c
11304 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11305 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11306 goops.c (GETVAR, purgatory, make_class_from_template,
11307 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11308 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11309 (scm_primitive_load), modules.c (scm_resolve_module,
11310 scm_c_define_module, scm_c_use_module, scm_c_export,
11311 module_variable, scm_eval_closure_lookup, scm_sym2var,
11312 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11313 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11314 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11315 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11316 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11317 (scm_object_to_string, scm_call_with_output_string,
11318 scm_call_with_input_string), throw.c (scm_body_thunk,
11319 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11320 scm_make_shared_array), vports.c (sf_flush, sf_write,
11321 sf_fill_input, sf_close): Use one of the above functions.
11322 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11323
36284627
DH
113242001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11325
11326 * filesys.c (scm_close), ports.c (scm_close_port,
11327 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11328 instead of SCM_NEGATE_BOOL.
11329
11330 * filesys.c (scm_stat): Clean up type dispatch.
11331
11332 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11333 scm_output_port_p): Get rid of redundant IM type check.
11334
11335 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11336 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11337 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11338 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11339 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11340 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11341 scm_addr_vector), stime.c (scm_strftime), strings.c
11342 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11343 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11344 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11345 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11346 instead of scm_makfromstr.
11347
11348 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11349 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11350 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11351 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11352 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11353 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11354 !SCM_<pred> over SCM_N<pred>.
11355
11356 * strings.[ch] (scm_makfromstr): Deprecated.
11357
11358 (scm_mem2string): New function, replaces scm_makfromstr.
11359
11360 * strings.c (scm_substring), strop.c (string_copy,
11361 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11362 (scm_symbol_to_string): Fix gc problem.
11363
11364 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11365 SCM_<foo>_H.
11366
11367 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11368 warning about comparing signed and unsigned values. This fix is
11369 not optimal, since it won't work reliably if sizeof (c_start) >
11370 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11371 solution is to define this macro as an inline function, thus
11372 allowing to specifiy the types of c_start and c_end.
11373
13dcb666
DH
113742001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11375
11376 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11377 scm_t_debug_frame*.
11378
11379 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11380 Rename <foo>H to SCM_<foo>_H.
11381
11382 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11383 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11384
11385 (narrow_stack): Make i unsigned. Don't use side-effecting
11386 operations in conditions.
11387
11388 (narrow_stack, scm_make_stack, scm_stack_id,
11389 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11390
11391 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11392 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11393 more.
11394
11395 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11396 signedness.
11397
ea2c3968 11398 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11399
11400 * stacks.h (SCM_FRAMEP): Fix type check.
11401
ac13d9d2
ML
114022001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11403
ee0c0e03
ML
11404 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11405 c-tokenize.c when doing maintainer-clean.
11406
ac13d9d2
ML
11407 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11408
11409 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11410 simplify.
11411
11412 * eval.c: all hash signs are in column 0.
11413
11414 * Makefile.am (guile_filter_doc_snarfage): build using
11415 c-tokenize.c, not filter-doc-snarfage.c.
11416 rearrange snarfing dependencies a bit.
11417
11418 * c-tokenize.lex: new file.
11419
16be44e5
MV
114202001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11421
11422 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11423 scm_t_srcpropso_plist. See the big type renaming.
11424 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11425 Thanks to Seth Alves!
4dadf664 11426
16be44e5
MV
11427 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11428 they aren't defined already.
11429
5843e5c9
DH
114302001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11431
11432 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11433 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11434 problem.
11435
11436 * backtrace.c (display_expression, scm_set_print_params_x,
11437 display_application, display_frame, scm_backtrace), numbers.c
11438 (scm_istring2number), objects.c (scm_class_of,
11439 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11440 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11441
11442 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11443 always positive.
11444
11445 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11446 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11447
11448 * objects.c (scm_class_of): Type fix.
11449
11450 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11451 eliminated goto.
11452
11453 * pairs.h (scm_error_pair_access): The function can return if
11454 called recursively.
11455
6b41a313
MG
114562001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11457
11458 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11459
11460 * gdbint.c, init.c: Removed inclusion of tag.h.
11461
11462 * tag.h, tag.c: Removed files.
11463
11464 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11465
fbbdb121
GH
114662001-06-20 Gary Houston <ghouston@arglist.com>
11467
11468 * deprecation.c, extensions.c, rw.c: include string.h.
11469
72c17ed0
GH
114702001-06-19 Gary Houston <ghouston@arglist.com>
11471
11472 * filter-doc-snarfage.c (process): added ungetc in
11473 MULTILINE_COOKIE case since otherwise it fails when there's no
11474 space between the '(' and the quote of the following string
11475 (gcc 3.0).
11476
4ff9f825
MV
114772001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11478
4927dd28
MV
11479 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11480
b629af45
MV
114812001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11482
11483 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11484 extension takes place.
11485 * strings.h (SCM_STRING_LENGTH): Likewise.
11486 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11487
4ff9f825
MV
11488 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11489 it.
11490
11491 * tags.h: Include <stdint.h> when we have it.
11492 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11493 available. Else use "unsigned long".
11494 (scm_signed_bits_t): New.
11495
11496 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11497 (SCM_INUM): Cast result to scm_signed_bits_t.
11498
58bee6a8
TTN
114992001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11500
11501 * mkstemp.c: Update path to #include file scmconfig.h.
11502 Thanks to Golubev I. N.
11503
00d8d838
DH
115042001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11505
11506 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11507
ea2c3968 11508 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11509 the macro definition.
11510
11511 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11512 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11513 instead of SCM_INST_TYPE.
11514
11515 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11516 the object is a struct before accessing its struct flags.
11517
11518 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11519
495c67e5
GH
115202001-06-10 Gary Houston <ghouston@arglist.com>
11521
11522 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11523 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11524 work reliably anymore. try it from boot-9.scm instead.
11525
6a9003d3
MV
115262001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11527
11528 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11529 Thanks to Matthias Köppe!
58bee6a8 11530
47bcd646
ML
115312001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11532
a88ff5b6
ML
11533 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11534 space-happy C preprocessors.
11535
47bcd646 11536 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11537 inside cookies. thanks to Matthias Köppe!
47bcd646 11538
bab246f3
DH
115392001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11540
11541 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11542 keywords. Fix gc protection.
11543
11544 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11545 operations in macro calls.
11546
11547 * pairs.c (scm_error_pair_access): Avoid recursion.
11548
11549 Thanks to Matthias Koeppe for reporting the bugs that correspond
11550 to the following set of patches.
11551
11552 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11553 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11554 bitvector base address using SCM_BITVECTOR_BASE.
11555
11556 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11557 unsigned long*.
11558
dcb410ec
DH
115592001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11560
11561 * goops.c (SCM_CLASS_REDEF): Removed.
11562
11563 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11564 SCM_<foo>_H.
11565
11566 Thanks to Matthias Koeppe for reporting the bugs that correspond
11567 to the following set of patches.
11568
11569 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11570 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11571 scm_sys_allocate_instance, clear_method_cache,
11572 scm_sys_invalidate_method_cache_x, scm_make,
11573 create_standard_classes, scm_make_port_classes, scm_make_class,
11574 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11575
11576 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11577
11578 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11579
11580 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11581 UNARY_ELTS_CODE): Remove bogus break statement.
11582
11583 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11584 Don't access bit vectors elements as SCM objects.
11585
11586 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11587 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11588 Don't assign to an unpacked value.
11589
e81d98ec
DH
115902001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11591
11592 * __scm.h (SCM_NORETURN): Moved here from error.h.
11593
11594 (SCM_UNUSED): New macro.
11595
11596 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11597
11598 * backtrace.c (display_error_handler), continuations.c
11599 (continuation_print), debug.c (debugobj_print), dynwind.c
11600 (guards_print), environments.c (observer_print,
11601 core_environments_finalize, leaf_environment_cell,
11602 leaf_environment_print, eval_environment_print,
11603 eval_environment_observer, import_environment_define,
11604 import_environment_undefine, import_environment_print,
11605 import_environment_observer, export_environment_define,
11606 export_environment_undefine, export_environment_print,
11607 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11608 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11609 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11610 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11611 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11612 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11613 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11614 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11615 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11616 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11617 set_slot_value, test_slot_existence, scm_change_object_class,
11618 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11619 default_setter), guardians.c (guardian_print, guardian_gc_init,
11620 guardian_zombify, whine_about_self_centered_zombies), guile.c
11621 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11622 mallocs.c (malloc_print), numbers.c (scm_print_real,
11623 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11624 end_input_default, scm_port_print, fill_input_void_port,
11625 write_void_port), root.c (root_print), smob.c (scm_mark0,
11626 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11627 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11628 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11629 (scm_struct_free_0, scm_struct_free_standard,
11630 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11631 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11632 scm_handle_by_throw, scm_ithrow), weaks.c
11633 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11634 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11635 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11636
11637 * error.h (SCM_NORETURN): Moved to __scm.h.
11638
11639 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11640 Renamed <foo>H to SCM_<foo>_H.
11641
11642 * gc.c (debug_cells_gc_interval): New static variable.
11643
11644 (scm_assert_cell_valid): If selected by the user, perform
11645 additional garbage collections.
11646
11647 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11648 if additional garbage collections are desired.
11649
11650 (mark_gc_async): If additional garbage collections are selected
11651 by the user, don't call the after-gc-hook. Instead require the
11652 user to run the hook manually.
11653
11654 * pairs.c (scm_error_pair_access): New function. Only compiled
11655 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11656
11657 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11658
11659 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11660 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11661 is a real pair object. (Glocs are also accepted, but that may
11662 change.) If not, abort with an error message.
11663
17fa3fcf
DH
116642001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11665
11666 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11667
11668 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11669 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11670
feeedafb
MV
116712001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11672
11673 * extensions.c (scm_c_register_extension): Allow NULL as library
11674 name.
11675 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11676
feeedafb
MV
11677 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11678 non-pointers are being compared. Thanks to Alexander Klimov!
11679
4bcdfe46
GH
116802001-06-04 Gary Houston <ghouston@arglist.com>
11681
11682 * rw.c (scm_write_string_partial): new procedure implementing
11683 write-string/partial in (ice-9 rw).
11684 * rw.h: declare scm_write_string_partial.
58bee6a8 11685
f480396b
MV
116862001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11687
feeedafb
MV
11688 * keywords.c (keyword_print): Substract 1 from length of symbol
11689 name, accounting for the silly dash.
11690
11691 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11692 Do not emit deprecation warning.
11693
f480396b
MV
11694 Added exception notice to all files.
11695
11696 * dynl.c: Include "deprecation.h".
11697
c794483c
MV
116982001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11699
11700 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11701 scm_clear_registered_modules): Deprecated.
11702
9454d8d5
RB
117032001-06-02 Rob Browning <rlb@cs.utexas.edu>
11704
11705 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11706 guile-snarf-docs-texi.
11707
11708 * fports.c: HAVE_ST_BLKSIZE changed to
11709 HAVE_STRUCT_STAT_ST_BLKSIZE.
11710 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11711 HAVE_STRUCT_STAT_ST_BLKSIZE.
11712
11713 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11714 HAVE_STRUCT_STAT_ST_RDEV.
11715 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11716 HAVE_STRUCT_STAT_ST_BLKSIZE.
11717 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11718 HAVE_STRUCT_STAT_ST_BLOCKS.
11719
114f9bab
MV
117202001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11721
b0c16cd9
MV
11722 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11723 of scm_eval_x to allow module changes between the forms in the
11724 string. Set/restore module using scm_c_call_with_current_module.
11725
114f9bab
MV
11726 * mkstemp.c: New file, slightly modified from libiberties
11727 mkstemps.c.
11728
c99f9605
ML
117292001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11730
11731 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11732 filter-doc-snarfage.c: new files.
11733
11734 * Makefile.am: add stuff to [build,] use and distribute
11735 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11736
11737 * guile-snarf.in: grok the new snarf output.
11738
11739 * snarf.h: make the output both texttools- and `read'-friendly.
11740
47bcd646
ML
11741 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11742 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11743
7eb5d7b2
MV
117442001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11745
11746 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11747 error for unsupported format controls and for superflous
ec2667f0 11748 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11749
11750 * print.h, print.c (scm_print_symbol_name): Factored out of
11751 scm_iprin1.
11752 (scm_iprin1): Call it.
58bee6a8 11753
7eb5d7b2
MV
11754 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11755 weird names are printed correctly.
11756
11757 * print.c (scm_print_symbol_name): Symbols whose name starts with
11758 `#' or `:' or ends with `:' are considered weird.
11759
609c3d30
MG
117602001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11761
11762 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11763 and /.
11764
117652001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11766
11767 * debug.h: Removed prototype for scm_eval_string.
11768
8d09eb04
MG
117692001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11770
11771 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11772 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11773
11774 Change strncpy to memcpy to allow embedded NUL characters in
11775 symbol prefix.
11776
dd85ce47
ML
117772001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11778
fde50407
ML
11779 * hooks.c (scm_create_hook): deprecated.
11780 (make_hook): deleted.
11781 (scm_make_hook): all the hook creation code is now here.
11782
11783 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11784 a hook, make it permanent, and do a `scm_c_define' on it.
11785
dd85ce47
ML
11786 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11787
11788 * socket.c (s_scm_inet_pton): fix docstring quoting.
11789 (s_scm_inet_ntop): ditto.
11790
11791 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11792
11793 * hashtab.c (scm_internal_hash_fold): fix argument position in
11794 SCM_ASSERT.
11795
11796 * environments.c (s_scm_import_environment_set_imports_x): fix
11797 argument position in SCM_ASSERT.
11798
11799 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11800 (s_scm_make_iloc): ditto.
11801
729dbac3
DH
118022001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11803
11804 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11805
11806 * eval.c (promise_print): Read the promise's value as an object.
11807
11808 (SCM_CEVAL): Don't perform side-effecting operations in macro
11809 parameters.
11810
11811 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11812 conditional expression.
11813
11814 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11815 initializer.
11816
11817 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11818 text, removed redundant computation of effective_length and fixed
11819 the overflow check.
11820
11821 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11822 values.
11823
11824 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11825
11826 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11827
11828 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11829 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11830
11831 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11832
11833 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11834 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11835 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11836 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11837
11838 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11839
11840 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11841
ea2c3968 11842 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11843
11844 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11845 problem.
11846
11847 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11848 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11849 Read SCM objects rather than scm_bits_t values.
11850
11851 * tags.h (SCM_VOIDP_TEST): Removed.
11852
11853 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11854 value of 2 now corresponds to the former 1, the current 1
11855 corresponds to the former situation that SCM_VOIDP_TEST was
11856 defined.
11857
58bee6a8
TTN
11858 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11859 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11860 typedef struct scm_unused_struct { } * SCM;
11861 Thanks to Han-Wen Nienhuys for the suggestion.
11862
11863 * unif.c (scm_array_set_x): Fix typing problem, and use
11864 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11865 dealing with uniform vectors.
11866
6b1b030e
ML
118672001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11868
11869 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11870 (scm_igc): mark from them, too (precisely, not conservatively!).
11871
11872 * root.h (scm_gc_registered_roots): new object in
11873 scm_sys_protects.
11874
11875 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11876 `scm_protect_object'. shouldn't call it at all, though, it seems.
11877
11878 * gc.c (scm_[un]protect_object): deprecated.
11879 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11880 (scm_gc_[un]register_root[s]): new.
11881
11882 * gc.h: add prototypes for scm_gc_[un]protect_object,
11883 scm_gc_[un]register_root[s].
11884
c014a02e
ML
118852001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11886
11887 revert the controversial part of the 2001-05-24 changes.
11888
0120801d
MV
118892001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11890
f4e0611e
MV
11891 * modules.c (scm_env_module): Exported to Scheme.
11892
0120801d 11893 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11894
0120801d 11895 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11896
0120801d
MV
11897 * backtrace.c: Include "libguile/filesys.h".
11898 (sym_base, display_backtrace_get_file_line,
11899 display_backtrace_file, display_backtrace_file_and_line): New.
11900 (display_frame): Call display_backtrace_file_and_line if that is
11901 requested.
11902 (display_backtrace_body): Call scm_display_backtrace_file if
11903 requested.
11904
11905 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11906 Prototypes removed since there's no definition for these
11907 functions.
11908
880a7d13
MG
119092001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11910
11911 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11912 Changed use of scm_array->scm_array_t and
11913 scm_array_dim->scm_array_dim_t to enable build with
11914 --disable-deprecated.
11915
1be6b49c
ML
119162001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11917
11918 The purpose of this set of changes is to regularize Guile's usage
11919 of ANSI C integral types, with the following ideas in mind:
11920
d69c867a
ML
11921 - SCM does not nesessarily have to be long.
11922 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11923 - long is not nesessarily the same size as int.
11924
11925 The changes are incomplete and possibly buggy. Please test on
11926 something exotic.
11927
11928 * validate.h
11929 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11930 new macros.
11931
11932 * unif.h: type renaming:
11933 scm_array -> scm_array_t
11934 scm_array_dim -> scm_array_dim_t
11935 the old names are deprecated, all in-Guile uses changed.
11936
11937 * tags.h (scm_ubits_t): new typedef, representing unsigned
11938 scm_bits_t.
11939
11940 * stacks.h: type renaming:
11941 scm_info_frame -> scm_info_frame_t
11942 scm_stack -> scm_stack_t
11943 the old names are deprecated, all in-Guile uses changed.
11944
11945 * srcprop.h: type renaming:
11946 scm_srcprops -> scm_srcprops_t
11947 scm_srcprops_chunk -> scm_srcprops_chunk_t
11948 the old names are deprecated, all in-Guile uses changed.
11949
11950 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11951 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11952 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11953 vectors.c, vports.c, weaks.c:
11954 various int/size_t -> size_t/scm_bits_t changes.
11955
11956 * random.h: type renaming:
11957 scm_rstate -> scm_rstate_t
11958 scm_rng -> scm_rng_t
11959 scm_i_rstate -> scm_i_rstate_t
11960 the old names are deprecated, all in-Guile uses changed.
11961
11962 * procs.h: type renaming:
11963 scm_subr_entry -> scm_subr_entry_t
11964 the old name is deprecated, all in-Guile uses changed.
11965
11966 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11967 type renaming:
11968 scm_option -> scm_option_t
11969 the old name is deprecated, all in-Guile uses changed.
11970
11971 * objects.c: various long -> scm_bits_t changes.
11972 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11973
11974 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11975 SCM_I_FIXNUM_BIT.
11976
11977 * num2integral.i.c: new file, multiply included by numbers.c, used
11978 to "templatize" the various integral <-> num conversion routines.
11979
11980 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11981 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11982 deprecated.
11983 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11984 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11985 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11986 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11987 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11988 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11989 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11990 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11991 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11992 scm_num2size): new functions.
11993
d69c867a 11994 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11995
11996 * load.c: change int -> size_t in various places (where the
11997 variable is used to store a string length).
11998 (search-path): call scm_done_free, not scm_done_malloc.
11999
12000 * list.c (scm_ilength): return a scm_bits_t, not long.
12001 some other {int,long} -> scm_bits_t changes.
12002
12003 * hashtab.c: various [u]int -> scm_bits_t changes.
12004 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
12005 (scm_ihashx): n: uint -> scm_bits_t
12006 use scm_bits2num instead of scm_ulong2num.
12007
12008 * gsubr.c: various int -> scm_bits_t changes.
12009
12010 * goops.[hc]: various {int,long} -> scm_bits_t changes.
12011
d69c867a 12012 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
12013
12014 * gh.h (gh_str2scm): len: int -> size_t
12015 (gh_{get,set}_substr): start: int -> scm_bits_t,
12016 len: int -> size_t
12017 (gh_<num>2scm): n: int -> scm_bits_t
12018 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
12019 (gh_length): return scm_bits_t, not unsigned long.
12020
12021 * gc.[hc]: various small changes relating to many things stopping
12022 being long and starting being scm_[u]bits_t instead.
12023 scm_mallocated should no longer wrap around.
12024
12025 * fports.h: type renaming:
12026 scm_fport -> scm_fport_t
12027 the old name is deprecated, all in-Guile uses changed.
12028
12029 * fports.c (fport_fill_input): count: int -> scm_bits_t
12030 (fport_flush): init_size, remaining, count: int -> scm_bits_t
12031
12032 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
12033 those prototypes, as the functions they prototype don't exist.
12034
12035 * fports.c (default_buffer_size): int -> size_t
12036 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
12037 default_size: int -> size_t
12038 (scm_setvbuf): csize: int -> scm_bits_t
12039
12040 * fluids.c (n_fluids): int -> scm_bits_t
12041 (grow_fluids): old_length, i: int -> scm_bits_t
12042 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
12043 scm_bits_t
12044 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
12045
12046 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
12047 the new and shiny SCM_NUM2INT.
12048
12049 * extensions.c: extension -> extension_t (and made a typedef).
12050
12051 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
12052 there are no nasty surprises if/when the various deeply magic tag
12053 bits move somewhere else.
12054
12055 * eval.c: changed the locals used to store results of SCM_IFRAME,
12056 scm_ilength and such to be of type scm_bits_t (and not int/long).
12057 (iqq): depth, edepth: int -> scm_bits_t
12058 (scm_eval_stack): int -> scm_bits_t
12059 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
12060 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
12061 i: int -> scm_bits_t
12062
12063 * environments.c: changed the many calls to scm_ulong2num to
12064 scm_ubits2num.
12065 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
12066
12067 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
12068
12069 * debug.h: type renaming:
12070 scm_debug_info -> scm_debug_info_t
12071 scm_debug_frame -> scm_debug_frame_t
12072 the old names are deprecated, all in-Guile uses changed.
12073 (scm_debug_eframe_size): int -> scm_bits_t
12074
12075 * debug.c (scm_init_debug): use scm_c_define instead of the
12076 deprecated scm_define.
12077
12078 * continuations.h: type renaming:
12079 scm_contregs -> scm_contregs_t
12080 the old name is deprecated, all in-Guile uses changed.
12081 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
12082 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
12083
12084 * continuations.c (scm_make_continuation): change the type of
d69c867a 12085 stack_size from long to scm_bits_t.
1be6b49c
ML
12086
12087 * ports.h: type renaming:
12088 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
12089 scm_port -> scm_port_t
12090 scm_ptob_descriptor -> scm_ptob_descriptor_t
12091 the old names are deprecated, all in-Guile uses changed.
12092 (scm_port_t.entry): int -> scm_bits_t.
12093 (scm_port_t.line_number): int -> long.
12094 (scm_port_t.putback_buf_size): int -> size_t.
12095
12096 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 12097 global namespace and have little value beside that).
1be6b49c
ML
12098 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
12099 SCM handle).
12100 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 12101 exist (for size_t & ptrdiff_t).
1be6b49c
ML
12102 (scm_sizet): deprecated.
12103
12104 * Makefile.am (noinst_HEADERS): add num2integral.i.c
12105
a6219f22
MV
121062001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
12107
12108 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
12109 SCM_VARIABLE_INIT since that it what it used to be.
12110
12111 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 12112 ANSIsh. Thanks to Matthias Köppe!
a6219f22 12113
311b6a3c
MV
121142001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
12115
9dfc4faa
MV
12116 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
12117 needed for weak-key hashtables.
12118
12119 * procs.c (scm_make_subr_with_generic): Add missing last argument
12120 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
12121
12122 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
12123 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
12124
12125 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
12126
2fc933fe
MV
121272001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
12128
57ae112d
MV
12129 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
12130 `duplicate_string'. Do not use an indirect cell, store symbol
12131 directly in collision list of hash table.
12132 (duplicate_string): Removed.
58bee6a8 12133
57ae112d
MV
12134 * init.c (scm_init_guile_1): Call scm_init_extensions.
12135
12136 * Makefile.am: Add "extensions.c" and related files in all the
12137 right places.
12138
12139 * extensions.h, extension.c: New files.
12140
12141 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
12142
2fc933fe
MV
12143 * modules.h (scm_system_module_env_p): Move out of deprecated
12144 section.
12145
12146 * rw.h (scm_init_rw): Added prototype.
12147
12148 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
12149 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
12150 New functions. They replace scm_make_gsubr and
12151 scm_make_gsubr_with_generic. The `make' variants only create the
12152 gsubr object, while the `define' variants also put it into the
12153 current module. Changed all callers.
12154 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
12155
12156 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
12157 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
12158 functions. They replace scm_make_subr, scm_make_subr_opt and
12159 scm_make_subr_with_generic. The `make' variants only create the
12160 subr object, while the `define' variants also put it into the
12161 current module. Changed all callers.
12162 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
12163 Deprecated.
12164
12165 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
12166 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
12167 the comments above.
58bee6a8 12168
18928596
NJ
121692001-05-19 Neil Jerram <neil@ossau.uklinux.net>
12170
12171 * throw.c (scm_lazy_catch): Slight docstring clarification.
12172
21a13beb
MV
121732001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
12174
e2b6ddc6
MV
12175 * throw.c: Lazy-catch handlers are no longer allowed to return.
12176 Fixed comments throughout.
12177 (scm_ithrow): Signal an error when a lazy-catch handler returns.
12178 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
12179 recognized as such.
12180
21a13beb
MV
12181 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
12182 refered to s_scm_minor_version previously.
12183
12184 * modules.h, modules.c: Moved around a lot of code so that
12185 deprecated features appear at the bottom.
12186 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
12187 module_prefix, make_modules_in_var, beautify_user_module_x_var,
12188 scm_the_root_module, scm_make_module, scm_ensure_user_module,
12189 scm_load_scheme_module): Deprecated.
12190 (scm_system_module_env_p): Return SCM_BOOL_T directly for
12191 environments corresponding to the root module.
12192 (convert_module_name, scm_c_resolve_module,
12193 scm_c_call_with_current_module, scm_c_define_module,
12194 scm_c_use_module, scm_c_export): New.
12195 (the_root_module): New static variant of scm_the_root_module. Use
12196 it everywhere instead of scm_the_root_module.
58bee6a8 12197
21a13beb
MV
12198 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12199 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12200 (scm_c_with_fluid): New.
12201 (scm_with_fluids): Use scm_c_with_fluids instead of
12202 scm_internal_with_fluids.
58bee6a8 12203
21a13beb
MV
12204 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12205 `scm_init_goops'. Do not explicitly create/switch modules.
12206 Return SCM_UNSPECIFIED.
12207 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12208 (scm_load_goops): Use scm_c_resolve_module instead of
12209 scm_resolve_module.
58bee6a8 12210
21a13beb
MV
12211 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12212 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12213 `scm_init_rw' prior to loading the startup files.
12214
12215 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12216 scm_init_rdelim. Do not explicitly create/switch modules.
12217 Return SCM_UNSPECIFIED.
12218 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12219 procedure.
58bee6a8 12220
21a13beb
MV
12221 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12222 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12223 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12224
12225 * script.c (scm_shell): Evaluate the compiled switches in the
12226 current module, not in the root module.
12227
122282001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12229
12230 * fluids.c (scm_c_with_fluids): Rename from
12231 scm_internal_with_fluids.
12232 (scm_internal_with_fluids): Deprecated.
12233 (scm_c_with_fluid): New.
12234
09cb9e73
DH
122352001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12236
12237 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12238
12239 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12240 accessed with SCM_C[AD]R.
12241
12242 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12243
c81ea65d
RB
122442001-05-16 Rob Browning <rlb@cs.utexas.edu>
12245
12246 * version.c (s_scm_major_version): doc fixes.
12247 (s_scm_minor_version): doc fixes.
12248 (s_scm_minor_version): new function.
12249
12250 * version.h (scm_init_version): new function.
12251
12252 * versiondat.h.in: add GUILE_MICRO_VERSION.
12253
887dfa7d
DH
122542001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12255
12256 * deprecation.c (scm_init_deprecation): Renamed
12257 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12258
78930a69
MV
122592001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12260
12261 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12262 dependent on cpp_cnvt.awk
12263
39cde5c5
MG
122642001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12265
12266 * script.c (scm_compile_shell_switches): New command line option
12267 `--use-srfi' for loading a list of SRFIs on startup.
12268 (scm_shell_usage): Added `--use-srfi' to help message.
12269
f3f9dcbc
MV
122702001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12271
78930a69 12272 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12273
f3f9dcbc
MV
12274 The concept of vcells has been removed from Guile. With it,
12275 explicit obarrays and associated operations are gone. Use
12276 hashtables instead of obarrays.
887dfa7d 12277
f3f9dcbc
MV
12278 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12279 result as variable instead of vcell. Glocs no longer point to a
12280 vcell but to a variable. Use scm_c_define instead of
12281 scm_sysintern and treat the result as a variable (which it is),
12282 not a vcell.
887dfa7d 12283
f3f9dcbc
MV
12284 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12285 SCM_DEFVARIABLEP): Deprecated.
12286 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12287 (variable_print): Do not print name of variable.
12288 (variable_equalp): Compare values, not vcells.
12289 (anonymous_variable_sym): Removed.
12290 (make_vcell_variable): Removed.
12291 (make_variable): New, as replacement.
12292 (scm_make_variable, scm_make_undefined_variable): Do not take name
12293 hint parameter.
12294 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12295 error in that case.
12296 (scm_builtin_variable): Deprecated.
12297
12298 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12299 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12300 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12301 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12302 scm_string_to_obarray_symbol, scm_intern_symbol,
12303 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12304 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12305 Deprecated and moved to "symbols-deprecated.c".
12306 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12307 (scm_init_symbols): Call scm_init_symbols_deprecated.
12308 * symbols-deprecated.c: New file.
12309 * Makefile.am: Added symbols-deprecated.c and related files in all
12310 the right places.
887dfa7d 12311
f3f9dcbc
MV
12312 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12313 SCM_GLOBAL_VCELL_INIT): Deprecated.
12314 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12315 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12316
f3f9dcbc
MV
12317 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12318 SCM_GLOC_SYM.
12319
12320 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12321 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12322 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12323 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12324 Changed according to the `throughout' comments.
12325
12326 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12327 to `int'.
12328 (scm_module_type): Removed.
12329 (the_root_module): Renamed to the_root_module_var. Now points to
12330 a variable instead of a vcell. Updated all uses.
12331 (scm_the_root_module): Return SCM_BOOL_F when module systems
12332 hasn't been booted yet.
12333 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12334 (scm_post_boot_init_modules): Made static.
12335 (scm_set_current_module): Call scm_post_boot_init_modules on first
12336 call.
12337 (make_modules_in, beautify_user_module_x, resolve_module,
12338 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12339 suffix. Now point to variables instead of vcells. Updated all
12340 uses.
12341 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12342 and return SCM_BOOL_F in that case.
12343 (scm_module_transformer): Likewise.
12344 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12345 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12346 (scm_eval_closure_lookup): Do not allow new definitions when
12347 `interface' flag is set.
12348 (scm_standard_interface_eval_closure): New.
12349 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12350 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12351 scm_c_lookup, scm_c_module_define, scm_c_define,
12352 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12353 scm_modules_prehistory): New.
12354 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12355 instead of scm_intern0.
887dfa7d 12356
f3f9dcbc
MV
12357 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12358 symbol.
12359
12360 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12361 hashtable operations to maintain the keywords, not obarray ones.
12362
12363 * init.c (scm_load_startup_files): Do not call
12364 scm_post_boot_init_modules. This is done by
12365 scm_set_current_module now.
12366 (scm_init_guile_1): Call scm_modules_prehistory. Call
12367 scm_init_variable early on.
12368
12369 * goops.c (s_scm_sys_goops_loaded): Get
12370 var_compute_applicable_methods from scm_sym2var, not from a direct
12371 invocation of scm_goops_lookup_closure.
12372
12373 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12374
12375 * gc.c: Added simple debugging hack to mark phase of GC: When
12376 activated, do not tail-call scm_gc_mark. This gives nice
12377 backtraces.
12378 (scm_unhash_name): Removed.
12379
12380 * feature.c (features): Renamed to features_var. Now points to a
12381 variable instead of a vcell. Updated all uses.
12382
12383 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12384 `scm_current_module_lookup_closure' which will do the right thing
12385 when the module system hasn't been booted yet.
12386 (SCM_GLOC_SYM): Removed.
12387 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12388 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12389
f3f9dcbc
MV
12390 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12391 instead of with vcells. Do not overwrite `var' with the result of
12392 the lookup, use the new `real_var' instead. Remove `var2' in
12393 exchange (which was only used with threads).
12394 (sym_three_question_marks): New.
12395 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12396 `SCM_GLOC_SYM'.
12397 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12398 (scm_m_atfop): Expect the function definition to be a variable
12399 instead of a vcell.
12400 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12401 symbol instead.
12402 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12403 (scm_eval_args): Use more explicit code in the gloc branch of the
12404 atrocious struct ambiguity test. The optimizer will sort this
12405 out.
12406 (scm_deval_args): Likewise.
12407 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12408 remember the symbol instead. Added some comments where
12409 scm_tc3_cons_gloc really exclusively refers to structs.
12410 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12411 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12412 of scm_sysintern in general.
12413
12414 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12415 explicit magic.
12416
12417 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12418 pairs. Put the variable directly in the gloc.
12419 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12420 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12421
12422 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12423
12424 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12425 scm_the_last_stack_fluid_var. It now points to a variable instead
12426 of a vcell. Updated all uses.
12427 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12428 instead of a vcell. Updated all uses.
12429
12430 * _scm.h: Include "variables.h" and "modules.h" since almost
12431 everybody needs them now.
12432
12433 * root.h (scm_symhash, scm_symhash_vars): Removed.
12434 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12435
7c33806a
DH
124362001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12437
12438 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12439 scm_listofnull.
7c33806a
DH
12440
12441 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12442 like the SCM_NEWCELL macro counterparts.
12443
12444 (scm_init_storage, scm_init_gc): Moved initialization of
12445 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12446
12447 (scm_init_storage): Moved initialization of scm_undefineds and
12448 scm_listofnull to eval.c, initializion of scm_nullstr to
12449 strings.c, initializion of scm_nullvect to vectors.c.
12450
12451 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12452 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12453
12454 * init.c (scm_init_guile_1): Reordered some initializations and
12455 added dependcy information comments.
12456
12457 * load.c (scm_init_load): Use scm_nullstr.
12458
12459 * strings.c (scm_init_strings): Initialize scm_nullstr.
12460
12461 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12462
11bbab47
MV
124632001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12464
12465 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12466 multiple lines. Thanks to Matthias Köppe!
11bbab47 12467
5cd06d5e
DH
124682001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12469
12470 * deprecation.c: Fixed copyright date.
12471
12472 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12473 DEPRECATION_H to SCM_DEPRECATION_H.
12474
32bac999
TTN
124752001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12476
12477 * guile-doc-snarf.in: Update copyright.
12478 Fix relative path bug. Thanks to Sergey Poznyakoff.
12479
c9dcc5ae
MV
124802001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12481
12482 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12483 accept open ports. Thanks to Quetzalcoatl Bradley!
12484
7c582ec9
MG
124852001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12486
12487 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12488 has 779 primitives on startup.
12489
284ab601
MV
124902001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12491
12492 * eval.c (scm_i_eval): Copy expression before passing it to
12493 SCM_XEVAL. The copy operation was removed unintendedly during my
12494 change on 2001-03-25.
12495
910d1e40
ML
124962001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12497
9a5fa6e9 12498 from Matthias Köppe (thanks!):
910d1e40
ML
12499
12500 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12501 portable.
12502
12503 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12504 docstring.
12505
56e55ac7
DH
125062001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12507
12508 * gc.c (scm_init_gc): Added FIXME comment.
12509
12510 * hooks.c: Since hooks don't have a name any more, it is not
12511 necessary to include objprop.h.
12512
12513 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12514
12515 (symbol_name, scm_make_hook_with_name): Removed.
12516
12517 (scm_create_hook): Don't set the hook's name property.
12518
12519 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12520
12521 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12522
12523 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12524
12525 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12526 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12527 FLOBUFLEN and define it unconditionally.
12528
d204b24c
MV
125292001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12530
438201b4
MV
12531 * gh_data.c (gh_lookup): Call gh_module_lookup with
12532 `scm_current_module ()', not `#f'.
12533 (gh_module_lookup): Expect a module instead of an obarray as first
12534 argument and do lookup in that module.
56e55ac7 12535
d204b24c
MV
12536 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12537 arrays. The length of array is already determined differently and
12538 scm_uniform_vector_length does not work on arrays.
12539
26c1d549
MV
125402001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12541
fe7c2f88
MV
12542 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12543 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12544
26c1d549
MV
12545 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12546 they are not used. Changed `wrong type' error into `wrong num
12547 args' error. Changed all callers.
56e55ac7 12548
26c1d549
MV
12549 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12550 arguments are supplied.
12551
1c938eb8
TTN
125522001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12553
12554 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12555 describe `regexp/notbol' and `regexp/noteol' execution flags.
12556
3a6379f7
TTN
12557 * strop.c (scm_substring_move_x): Doc fix; nfc.
12558
c10ecc4c
MV
125592001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12560
12561 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12562 (scm_set_object_procedure_x): Use it to check argument. Fix
12563 docstring.
12564
12565 * evalext.c (scm_definedp): Fix docstring.
12566
a57a0b1e
GH
125672001-05-05 Gary Houston <ghouston@arglist.com>
12568
12569 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12570 support.
12571
7a095584
NJ
125722001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12573
12574 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12575 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12576 Change R4RS references to R5RS.
12577
12578 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12579 docstring source are correctly reproduced in the output (ii)
12580 we don't anymore get occasional trailing quotes. Also reorganized
12581 and commented the code a little.
12582
12583 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12584 fixes.
12585
dd2a6f3a
MG
125862001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12587
12588 * strop.c (scm_string_split): New procedure.
12589
12590 * strop.h (scm_string_split): Added prototype.
12591
00120130
GH
125922001-05-04 Gary Houston <ghouston@arglist.com>
12593
12594 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12595 Dale P. Smith.
12596
b65e6bfe
MV
125972001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12598
12599 * rw.c: Include "modules.h" and "strports.h".
12600
12601 * net_db.h (scm_gethost): Added prototype.
12602
12603 * deprecation.h, deprecation.c: New.
12604 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12605 (DOT_X_FILES): Added "deprecation.x".
12606 (modinclude_HEADERS): Added "deprecation.h".
12607
12608 * init.c: Include "deprecation.h".
12609 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12610
b65e6bfe
MV
126112001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12612
12613 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12614 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12615 New.
12616
b0e5fd8c
GH
126172001-04-29 Gary Houston <ghouston@arglist.com>
12618
12619 * rw.c: new file, implementing C part of module (ice-9 rw).
12620 (scm_read_string_x_partial): moved from ioext.c
12621 (scm_init_rw): new proc.
12622 * rw.h: new file.
12623 init.c: include rw.h and call scm_init_rw.
12624 Makefile.am: include rw.c and rw.h.
12625
0b2da99c
RB
126262001-04-28 Rob Browning <rlb@cs.utexas.edu>
12627
12628 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12629 know what's supposed to happen to it.
12630
12631 * list.h (scm_list_star): deprecation expired - removed.
12632
12633 * numbers.h (scm_dblproc): deprecation expired - removed.
12634 (SCM_UNEGFIXABLE): deprecation expired - removed.
12635 (SCM_FLOBUFLEN): deprecation expired - removed.
12636 (SCM_INEXP): deprecation expired - removed.
12637 (SCM_CPLXP): deprecation expired - removed.
12638 (SCM_REAL): deprecation expired - removed.
12639 (SCM_IMAG): deprecation expired - removed.
12640 (SCM_REALPART): deprecation expired - removed.
12641 (scm_makdbl): deprecation expired - removed.
12642 (SCM_SINGP): deprecation expired - removed.
12643 (SCM_NUM2DBL): deprecation expired - removed.
12644 (SCM_NO_BIGDIG): deprecation expired - removed.
12645
12646 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12647 (scm_tc_dblr): deprecation expired - removed.
12648 (scm_tc_dblc): deprecation expired - removed.
12649 (scm_tc16_flo): deprecation expired - removed.
12650 (scm_tc_flo): deprecation expired - removed.
12651
12652 * tag.h (scm_tag): deprecation expired - removed.
12653
12654 * tag.c: (scm_tag): deprecation expired - removed.
12655
12656 * ioext.c: (scm_fseek): deprecation expired - removed.
12657
12658 * ioext.h (scm_fseek): deprecation expired - removed.
12659
12660 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12661
12662 * gh.h (gh_int2scmb): deprecation expired - removed.
12663
e3334972
NJ
126642001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12665
12666 * stacks.c (scm_make_stack): Fix typo in docstring.
12667
a0f979ac
RB
126682001-04-27 Rob Browning <rlb@cs.utexas.edu>
12669
12670 * error.c (scm_sysmissing): deprecation expired - removed.
12671
12672 * error.h (scm_sysmissing): deprecation expired - removed.
12673
12674 * gc.c
12675 (scm_init_gc): gc-thunk deprecation expired - removed.
12676 (scm_gc_vcell): deprecation expired - removed.
12677 (gc_async_thunk): scm_gc_vcell related code removed.
12678
12679 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12680
12681 * strings.h
12682 (SCM_NSTRINGP): deprecation expired - removed.
12683 (SCM_NRWSTRINGP): deprecation expired - removed.
12684
12685 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12686
12687 * chars.h
12688 (SCM_ICHRP): deprecation expired - removed.
12689 (SCM_ICHR): deprecation expired - removed.
12690 (SCM_MAKICHR): deprecation expired - removed.
12691
12692 * ports.h
12693 (SCM_INPORTP): deprecation expired - removed.
12694 (SCM_OUTPORTP): deprecation expired - removed.
12695
253081cf
MV
126962001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12697
12698 * modules.c (scm_module_type): New.
12699 (scm_post_boot_init_modules): Initialize from Scheme value.
12700 (the_module, scm_current_module, scm_init_modules): the_module is
12701 now a C only fluid.
12702 (scm_current_module): Export to Scheme.
12703 (scm_set_current_module): Do not call out to Scheme, do all the
12704 work in C. Export procedure to Scheme. Only accept modules, `#f'
12705 is no longer valid as the current module. Only set
12706 scm_top_level_lookup_closure_var and scm_system_transformer when
12707 they are not deprecated.
12708 (scm_module_transformer, scm_current_module_transformer): New.
12709
12710 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12711 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12712
253081cf
MV
12713 * gh_data.c: Removed FIXME comment about gh_lookup returning
12714 SCM_UNDEFINED. That's the right thing to do.
12715
12716 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12717 into the conditionally compiled sections.
12718 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12719 scm_current_module_transformer instead of scm_system_transformer.
12720 * init.c (start_stack): Move initialization of
12721 scm_system_transformer to the deprecated section.
1c938eb8 12722
1f7f9ed4
NJ
127232001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12724
12725 * throw.c (scm_throw): Correct docstring.
12726
66c73b76
GH
127272001-04-22 Gary Houston <ghouston@arglist.com>
12728
eefae538
GH
12729 * socket.c: attempted to improve the docstrings slightly.
12730
66c73b76
GH
12731 * net_db.c: remove bogus "close" declaration.
12732 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12733 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12734 moved to socket.c.
12735 * net_db.h: declarations moved too.
12736
12737 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12738 long.
12739 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12740 (VALIDATE_INET6): new macro.
12741 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12742 inet-pton and inet-ntop.
12743 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12744 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12745
7a7f7c53
DH
127462001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12747
12748 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12749 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12750
12751 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12752 when compiled in debug mode.
12753
12754 (scm_gc_sweep): Only call smob's free function if it is defined.
12755
12756 * print.c (scm_iprin1): No need to check for validity of smob
12757 type or existence of print function.
12758
12759 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12760 Resizing will not work well with preemptive threading.
12761
12762 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12763
12764 (scm_make_smob_type): Extracted initialization of smob
12765 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12766 of the critical section.
12767
12768 (scm_smob_prehistory): Initialize all smob descriptors. By
12769 default, don't assign a smob free function: Most smob types don't
12770 need one.
12771
12772 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12773
e1368a8d
GH
127742001-04-21 Gary Houston <ghouston@arglist.com>
12775
12776 * socket.c (FLIP_NET_HOST_128): new macro.
12777 (scm_fill_sockaddr): use new macro.
12778 (scm_addr_vector): completed IPv6 address support. added const
12779 to the address parameter.
12780
5a525b84
GH
127812001-04-20 Gary Houston <ghouston@arglist.com>
12782
12783 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12784 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12785 is defined.
12786 (scm_addr_vector): use a switch instead of multiple if statements.
12787 Add support for IPv6 (incomplete) .
e1368a8d 12788 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12789
1a551638
DH
127902001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12791
12792 * struct.c (scm_free_structs): Only pairs may be accessed with
12793 SCM_C[AD]R.
12794
c07b3fef
MD
127952001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12796
a9d861e3
MD
12797 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12798
c07b3fef
MD
12799 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12800 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12801 parentheses in order to get the correct associativity.
12802
af7546eb
DH
128032001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12804
12805 * unif.c (scm_array_to_list): Added missing handling of arrays of
12806 bytes. Thanks to Masao Uebayashi for the bug report.
12807
4daecfee
DH
128082001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12809
12810 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12811 consistently.
12812
726d810a
DH
128132001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12814
12815 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12816
12817 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12818 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12819 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12820 SCM_CLOSURE_FORMALS.
12821
12822 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12823 (scm_i_procedure_arity): Prefer stronger predicates like
12824 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12825
12826 * macros.c (macro_print): Extracted macro printing code from
12827 print.c and simplified it.
12828
12829 (scm_macro_type): Use SCM_MACRO_TYPE;
12830
12831 (scm_init_macros): Use macro_print for printing macros.
12832
12833 * print.c (scm_print_opts): Improved option documentation.
12834
12835 (scm_iprin1): Extracted printing of macros to macros.c.
12836 Simplified printing of ordinary closures.
12837
12838 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12839 Martin Grabmueller for the bug report.
12840
e038c042
DH
128412001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12842
12843 This patch eliminates some further applications of SCM_C[AD]R to
12844 non pair cells.
12845
12846 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12847 never been applied to real pairs.
12848
12849 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12850
12851 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12852
12853 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12854 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12855 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12856
12857 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12858 Added.
12859
12860 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12861 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12862
12863 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12864 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12865 SCM_SET{AND,OR}_CAR.
12866
3453619b
GH
128672001-04-17 Gary Houston <ghouston@arglist.com>
12868
12869 * some initial support for IPv6:
1c938eb8 12870
3453619b
GH
12871 * socket.c (scm_fill_sockaddr): improve the argument validation.
12872 don't allocate memory until all args are checked. instead of
12873 unconditional memset of soka, try setting sin_len to 0 if
12874 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12875 (scm_socket, scm_connect): extend docstrings for IPv6.
12876 (scm_init_socket): intern AF_INET6 and PF_INET6.
12877
216eedfc
DH
128782001-04-17 Niibe Yutaka <gniibe@m17n.org>
12879
12880 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12881 matches SCM_DEFER_INTS at the beginning of the function.
12882
12883 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12884
12885 * gc.c (scm_igc): Unconditionally call
12886 SCM_CRITICAL_SECTION_START/END.
12887
12888 * fluids.c (next_fluid_num): Unconditionally call
12889 SCM_CRITICAL_SECTION_START/END.
12890 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12891
12892 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12893 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12894 Removed.
12895
12896 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12897 Defined as nothing for the case of !defined(USE_THREADS).
12898 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12899 Removed.
12900 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12901 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12902 LINE.
12903 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12904 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12905 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12906 SCM_CRITICAL_SECTION_START/END.
12907 (SCM_REALLOW_INTS: Bug fix. Don't call
12908 SCM_THREAD_SWITCHING_CODE.
12909 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12910 SCM_THREAD_SWITCHING_CODE directly.
12911 (SCM_ENTER_A_SECTION): Unconditionally use
12912 SCM_CRITICAL_SECTION_START/END. (was:
12913 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12914
129152001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12916
12917 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12918 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12919 allowed to explicitly set this macro via the CFLAGS variable
12920 during make.
12921
12922 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12923 (SCM_THREAD_CRITICAL_SECTION_START,
12924 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12925 SCM_THREAD_CRITICAL_SECTION_START/END to
12926 SCM_CRITICAL_SECTION_START/END.
12927
f22ed5a0
KN
129282001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12929
12930 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12931 instead of bzero.
1c938eb8 12932
f22ed5a0 12933 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12934 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12935
12936 Thanks to NIIBE Yutaka.
12937
508ded1c
MD
129382001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12939
a087ba81
MD
12940 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12941 goops module should be registered in order to work for an
12942 application which uses libguile statically linked.)
508ded1c 12943
e4b265d8
DH
129442001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12945
12946 * numbers.[ch] (scm_num2long, scm_num2long_long,
12947 scm_num2ulong_long, scm_num2ulong): Argument position is an
12948 unsigned integer.
12949
12950 * environments.c (eval_environment_folder,
12951 import_environment_folder), gh_data.c (gh_scm2longs,
12952 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12953 for integers and pointers, respectively.
12954
12955 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12956 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12957 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12958 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12959
12960 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12961 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12962 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12963 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12964 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12965 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12966
89d04205
NJ
129672001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12968
12969 * strings.c (scm_read_only_string_p): Update docstring to reflect
12970 current (non-)usage of "read only" strings.
40f83c3e
NJ
12971 (scm_make_shared_substring): Clarify docstring by changing
12972 "semantics" to "arguments".
89d04205 12973
4d66be54
MG
129742001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12975
12976 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12977 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12978 improvements.
12979
1e6808ea
MG
129802001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12981
12982 The following changes make the documentation more consistent.
1c938eb8 12983
1e6808ea
MG
12984 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12985 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12986 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12987 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12988 ... @end lisp.
12989
12990 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12991 (scm_array_dimensions, scm_make_shared_array),
12992 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12993 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12994 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12995 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12996 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12997 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12998 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12999 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
13000 @example ... @end example to @lisp ... @end lisp.
13001
13002 * weaks.c (scm_weak_vector): Corrected docstring.
13003
13004 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
13005 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
13006 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
13007 (scm_hashx_set_x, scm_hashx_get_handle),
13008 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
13009 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
13010 vectors.c (scm_vector_fill_x), strings.c
13011 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
13012 objprop.c (scm_set_object_properties_x):
13013 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
13014 strports.c (scm_call_with_input_string), ports.c
13015 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
13016 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
13017 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
13018 (scm_make_weak_vector,scm_weak_vector_p),
13019 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
13020 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
13021 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13022 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
13023 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
13024 Made parameter names match documentation by renaming parameters
13025 and/or fixing docstrings.
1c938eb8 13026
1e6808ea
MG
13027 * numbers.c (scm_ash): Corrected Texinfo markup.
13028
13029 * strop.c (scm_string_index, scm_string_rindex),
13030 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
13031
13032 * vports.c (scm_make_soft_port), unif.c
13033 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
13034 (scm_dimensions_to_uniform_array, scm_transpose_array),
13035 (scm_array_in_bounds_p, scm_uniform_vector_ref),
13036 (scm_bit_count, scm_bit_position, scm_bit_count_star),
13037 (scm_array_to_list, scm_list_to_uniform_array),
13038 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
13039 (scm_open_input_string, scm_open_output_string),
13040 (scm_get_output_string), strop.c (scm_string_copy),
13041 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
13042 (scm_get_internal_real_time, scm_times),
13043 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
13044 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
13045 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
13046 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
13047 simpos.c (scm_system), random.c (scm_random_uniform),
13048 (scm_random_normal, scm_random_exp), ramap.c
13049 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
13050 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
13051 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
13052 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
13053 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
13054 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
13055 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
13056 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
13057 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
13058 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
13059 (scm_logand, scm_logior, scm_logxor, scm_lognot),
13060 (scm_integer_expt, scm_bit_extract, scm_logcount),
13061 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
13062 net_db.c (scm_inet_netof, scm_lnaof), modules.c
13063 (scm_interaction_environment), macros.c (scm_makacro),
13064 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
13065 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
13066 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
13067 (scm_fluid_ref), filesys.c (scm_open_fdes),
13068 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
13069 Docstring correction: `Returns' -> `Return'
13070
1c938eb8
TTN
13071 * gc.c (scm_set_debug_cell_accesses_x):
13072 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
13073 * fluids.c (scm_fluid_p): Added texinfo markup.
13074
13075 * error.c (scm_strerror): Made docstring more precise.
13076
13077 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
13078 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
13079 (scm_symbol_p, scm_symbol_to_string), strorder.c
13080 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
13081 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
13082 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
13083 (scm_string_ci_geq_p), strop.c (scm_string_copy),
13084 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
13085
9a6976cd
DH
130862001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
13087
13088 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
13089 mode, as suggested by Michael Livshin.
13090
463b2219
ML
130912001-03-31 Michael Livshin <mlivshin@bigfoot.com>
13092
13093 * backtrace.c (display_backtrace_body): since the `print_state'
13094 variable is not used (instead its data field is used directly as
13095 `pstate'), protect it from the hungry compiler optimizations.
13096 thanks to Bill Schottstaedt for the report.
13097
61045190
DH
130982001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13099
13100 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
13101 It is only defined and used if guile is compiled with
13102 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
13103 let cells with a free_cell type tag be visible outside of the
13104 garbage collector when in debug mode.
13105
13106 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
13107
13108 (scm_assert_cell_valid): Use a local static variable to avoid
13109 recursion.
13110
13111 (MARK): Only check for rogue cell pointers in debug mode. Use
13112 scm_cellp for this purpose and place all checks for rogue pointers
13113 into that function. Further, since due to conservative scanning
13114 we may encounter free cells during marking, don't use the standard
13115 cell type accessor macro to determine the cell type.
13116
13117 (scm_cellp): Check if the cell pointer actually points into a
13118 card header.
13119
13120 (scm_init_gc): Initalize scm_tc16_allocated.
13121
13122 * gc.h (GCH): Renamed to SCM_GC_H.
13123
13124 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
13125 might be unnecessary, but I feel better this way :-)
13126
13127 (SCM_GC_CELL_TYPE): New macro.
13128
13129 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
13130 in guile, and it is unlikely that they will be applied to real
13131 pairs anyway.
13132
13133 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
13134
13135 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
13136 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
13137
13138 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
13139 make sure that in debug mode no free cell will ever be visible
13140 outside of the garbage collector.
13141
85d6df6a
DH
131422001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13143
13144 * async.c (scm_asyncs_pending): Don't use != to compare SCM
13145 values.
13146
13147 * async.c (scm_system_async), variable.c (scm_make_variable,
13148 scm_make_undefined_variable): Use scm_cons to create a pair.
13149
13150 * debug.c (scm_reverse_lookup): Perform proper type checking.
13151 Remove suspicious use of SCM_SLOPPY_CONSP.
13152
13153 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
13154 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
13155 the corresponding optimization.
13156
13157 * eval.c (iqq): Use proper type check.
13158
13159 (scm_m_expand_body): Remove redundant type checks.
13160
13161 (promise_print): Don't access promise cells as pairs.
13162
13163 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
13164 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
13165 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
13166 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
13167 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
13168
13169 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
13170 (scm_iprin1): Use new macro predicate and accessors.
13171
13172 * eval.h (scm_tc16_macro): Removed declaration. It is declared
13173 in macros.h.
13174
13175 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
13176 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
13177 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
13178 SCM_VARIABLE_H. Even the macros that are used to inhibit
13179 including a header file twice should be in the SCM_ namespace.
13180
13181 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
13182 properties.c (scm_primitive_property_ref,
13183 scm_primitive_property_del_x): Prefer stronger predicates like
13184 SCM_NULLP or SCM_FALSEP over SCM_IMP.
13185
13186 * gc.c (MARK): Use proper macros to access procedure-with-setter
13187 cell elements and closure cell elements.
13188
13189 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
13190 access free cells as pairs.
13191
13192 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13193 no hashtab entry is found.
13194
13195 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13196 SCM_CLR_PORT_OPEN_FLAG.
13197
13198 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13199 use SCM_SET_C[AD]R for uninitialized cells.
13200
13201 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13202 If the hashtable has no slots, return #f instead of '(). This
13203 unifies the return value with most assoc-functions.
13204
13205 (scm_hash_fn_ref): Use proper type check.
13206
13207 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13208 Removed references to non-existing functions from documentation.
13209
13210 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13211 access keyword cell elements.
13212
13213 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13214 macros.
13215
13216 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13217
13218 * print.c (scm_iprlist): Added comment. Improved loop
13219 conditions.
13220
13221 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13222 pairs.
13223
13224 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13225
13226 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13227
13228 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13229 cells as pairs.
13230
13231 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13232 scm_variable_set_x): Use proper macros to access variable cell
13233 elements.
13234
13235 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13236
13237 * variable.h (SCM_VARVCELL): Don't access variable cells as
13238 pairs.
13239
13240 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13241 added FIXME comment, removed register specifier.
13242
1b27e91a
KN
132432001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13244
13245 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13246 * init.c (scm_init_guile_1): Don't init goopscore module.
13247
16c634ec
MV
132482001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13249
13250 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13251
91344ceb
MG
132522001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13253
13254 * strop.c (scm_string_to_list): Fixed docstring markup.
13255 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13256 (scm_string_downcase, scm_string_capitalize_x),
13257 (scm_string_capitalize): Rewrote and corrected docstrings.
13258 (scm_string_ci_to_symbol): Made docstring more explicit.
13259
07576812
MV
132602001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13261
13262 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13263 eval.c can use it.
13264 (scm_call_with_values): Removed.
13265 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13266 so that it can be exported.
13267 (scm_call_with_values): Removed.
1c938eb8 13268
07576812
MV
13269 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13270 * eval.c: Include "libguile/values.h"
13271 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13272 New.
13273 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13274 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13275 New delcarations to support above change.
13276
13277 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13278 errors with last change.
1c938eb8 13279
07576812
MV
132802001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13281
13282 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13283 scm_i_eval): Moved the application of the system transformer from
13284 scm_i_eval to scm_primitive_eval.
13285
a17bb5fd
NJ
132862001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13287
a6be01a4
NJ
13288 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13289
a17bb5fd
NJ
13290 * strop.c (scm_string_index): Fix docstring line break
13291 regression.
13292
13293 * list.c (scm_cons_star): Fix docstring typo.
13294
be54b15d
DH
132952001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13296
13297 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13298 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13299 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13300 scm_make_string, scm_string_append), strports.c (st_resize_port,
13301 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13302 scm_makstr with calls to scm_allocate_string.
13303
13304 * strings.[ch] (scm_allocate_string): New function.
13305
13306 * strings.[ch] (scm_makstr): Deprecated.
13307
789ecc05
GH
133082001-03-18 Gary Houston <ghouston@arglist.com>
13309
6d163216
GH
13310 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13311 NULL. rewrote the docstring.
13312 (scm_mkstemp): new procedure implementing "mkstemp!".
13313 * posix.h: declare scm_mkstemp.
13314
789ecc05
GH
13315 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13316 normally it would be found in netdb.h.
13317
c6c79933
GH
133182001-03-17 Gary Houston <ghouston@arglist.com>
13319
e9e225e5
GH
13320 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13321 warning when HAVE_ARRAYS is not defined. move len too.
13322
13323 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13324 (EXTRA_DOT_X_FILES): let configure set the value.
13325 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13326
c6c79933
GH
13327 * gc.c (scm_must_malloc): changed the comment explaining when
13328 scm_must variants of malloc/free etc., should be used, based on
13329 explanation from Dirk Herrmann.
13330 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13331 string with procedure name. use scm_must_malloc instead of malloc.
13332 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13333 of malloc/free.
13334 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13335 scm_ungetc): use scm_must variants of malloc/realloc/free.
13336 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13337
b3fcac34
DH
133382001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13339
13340 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13341 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13342 scm_wrong_type_arg instead.
13343
13344 (SCM_WNA): Deprecated.
13345
13346 * error.[ch] (scm_wta): Deprecated.
13347
13348 * numbers.c (s_i_log): Minor comment fix.
13349
13350 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13351 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13352 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13353 wrong-num-args or misc errors.
13354
13355 * unif.c (scm_make_shared_array, scm_transpose_array,
13356 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13357 Validate the rest argument (note: this is only done when guile is
13358 built with SCM_DEBUG_REST_ARGUMENT=1)
13359
13360 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13361 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13362
13363 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13364 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13365
68baa7e7
DH
133662001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13367
13368 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13369 instead of scm_wrong_num_args.
13370
13371 * coop-threads.c: Don't include libguile/strings.h. (Was only
13372 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13373
13374 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13375 wrong-num-args errors.
13376
9f40cd87
DH
133772001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13378
13379 * error.[ch] (scm_error_num_args_subr): New function.
13380
5352393c
MG
133812001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13382
13383 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13384 (scm_length, scm_append, scm_reverse, scm_list_ref),
13385 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13386 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13387 (scm_delete1_x), gc.c (scm_map_free_list),
13388 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13389 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13390 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13391 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13392 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13393 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13394 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13395
13396 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13397 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13398 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13399 symbols.c (scm_symbol_interned_p), numbers.c
13400 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13401 markup.
13402
a9205f07
KN
134032001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13404
13405 * snarf.h (SCM_CONST_LONG): Deprecated.
13406 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13407
6d583887
MV
134082001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13409
13410 * numbers.c (scm_num2ulong): Check that a bignum is positive
13411 before looking at the magnitude. Correctly check for overflow
13412 during conversion.
13413 (scm_num2long_long): Likewise.
13414 (scm_num2ulong_long): New.
13415 (ULONG_LONG_MAX): Define if not already defined.
13416 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13417
e87a03fc
MG
134182001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13419
13420 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13421
13422 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13423 (SCM_OPOUTSTRPORTP): New predicate macros.
13424 (scm_open_input_string, scm_open_output_string),
13425 (scm_get_output_string): New prototypes.
1c938eb8 13426
e87a03fc
MG
13427 * strports.c (scm_open_input_string, scm_open_output_string),
13428 (scm_get_output_string): New procedures (SRFI-6 compliant).
13429 Made scm_tc16_strport non-static.
13430
160bb34a
DH
134312001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13432
13433 * macros.h (SCM_ASSYNT): Removed unused object argument from
13434 signature.
13435
13436 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13437 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13438 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13439 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13440 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13441 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13442 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13443 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13444 scm_m_atdispatch): Removed unused object argument from call to
13445 SCM_ASSYNT.
13446
80dee77b
DH
134472001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13448
13449 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13450 const int* to reflect that the input array of integers remains
13451 unchanged. Thanks to Brett Viren for the hint.
13452
d3dd80ab
MG
134532001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13454
13455 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13456 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13457 in various places.
13458 (gh_scm2newstr, gh_symbol2newstr): Change call to
13459 scm_must_malloc() to malloc(), because user-free()able memory is
13460 allocated.
13461
13462 * gc.c: Added declaration of `scm_debug_check_freelist'.
13463
26a3038d
MG
134642001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13465
13466 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13467
1f3908c4
KN
134682001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13469
13470 * strports.c (scm_object_to_string): New procedure.
13471 (scm_strprint_obj): Deprecated.
13472 * strports.h: Reflect the changes.
13473
e11208ca
DH
134742001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13475
13476 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13477
13478 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13479 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13480 SCM_ASSYNT to check for correct argument types. Either use some
13481 SCM_VALIDATE_* macro or an explicit test.
13482
13483 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13484 misc-errors.
13485
13486 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13487 instead of calling scm_wta.
13488
67e8151b
MG
134892001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13490
13491 * load.c (scm_primitive_load, scm_primitive_load_path),
13492 (scm_sys_search_load_path): Corrected docstrings (file ->
13493 filename).
13494
13495 * eval.c (scm_force): Added texinfo markup to docstring.
13496 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13497
13498 * debug-malloc.c: Reinserted #include <stdio.h>.
13499
e0c08f17
KN
135002001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13501
e39c3de4
KN
13502 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13503
e0c08f17
KN
13504 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13505 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13506 Use SCM_LISTn instead of scm_listify.
13507
e6e2e95a
MD
135082001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13509
13510 * _scm.h: Removed #include <errno.h>.
13511
13512 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13513 errno variable (can be a macro on some systems, for example when
13514 using linux libc with threads).
13515
13516 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13517 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13518 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13519 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13520
97d0e20b
GH
135212001-03-10 Gary Houston <ghouston@arglist.com>
13522
13523 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13524 not already defined.
13525
e75341b3
MD
135262001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13527
13528 * coop.c: Inserted #include <stdio.h>.
13529
13530 * iselect.c: Reinserted #include <stdio.h>.
13531
74355186
MV
135322001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13533
13534 * posix.c: Replaced `#define' of __USE_XOPEN right before
13535 including unistd.h with a define of _GNU_SOURCE at the very top of
13536 the file.
13537
783e7774
KN
135382001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13539
13540 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13541 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13542 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13543 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13544 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13545 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13546 print.c, procprop.c, procs.c, properties.c, ramap.c,
13547 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13548 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13549 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13550 Remove #include <stdio.h>
783e7774
KN
13551 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13552
13553 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13554
9a677c37
MG
135552001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13556
13557 * posix.c (scm_gethostname): Set initial name length to 256 for
13558 Solaris.
13559
94e6d793
MG
135602001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13561
13562 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13563 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13564 (scm_sethostname, scm_gethostname): New prototypes.
13565
13566 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13567 <sys/file.h>, if present.
13568 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13569 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13570 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13571 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13572 (scm_sethostname, scm_gethostname): New procedures.
13573
650a1cf9
NJ
135742001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13575
13576 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13577 not optional (ii) "recommend" spelling correction.
13578
9636b49c
MD
135792001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13580
5e4a4d09
MD
13581 * ramap.c (racp): Removed optimization which caused array copying
13582 to fail if the two arrays shared storage. Re-inserted the IVDEP
13583 macros removed in the change of 2000-03-09. (Don't really have a
13584 complete grasp of what they are for, but they seem to be necessary
13585 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13586
9636b49c
MD
13587 * hash.c (scm_string_hash): Don't downcase characters.
13588
04a4d666
MD
135892001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13590
9636b49c 13591 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13592 size from 277 --> 1009.
13593
13594 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13595 function.
13596
13597 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13598
04a4d666
MD
13599 * validate.h: Code formatting.
13600
66418d34
KN
136012001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13602
13603 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13604 (*.doc): Add dependency on guile-snarf.awk.in.
13605
13606 * guile-snarf.awk.in: Neglect spaces at the end of
13607 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13608 middle of docstrings. (To avoid the problem with gcc-2.96.)
13609
2ade72d7
DH
136102001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13611
13612 * coop-threads.c (scm_call_with_new_thread), load.c
13613 (scm_primitive_load, scm_sys_search_load_path), random.c
13614 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13615 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13616 (potentially) issue a scm-misc-error or wrong-num-args error
13617 message.
13618
13619 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13620 about the expected type with the wrong-type-arg error message.
13621
13622 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13623 a C level bug that can't be fixed from scheme anyway.
13624
586d7da2
MD
136252001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13626
13627 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13628 Duplicate bindings are OK in a let* since a let* is semantically
13629 equivalent to a nested set of let:s.
13630
1dd05fd8
MG
136312001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13632
13633 * print.c (scm_print_options): Fixed texinfo in docstring.
13634
13635 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13636 the underlying functions getservent, getprotoent or getnetent
13637 return NULL instead of signalling an error.
13638
439006bf
GH
136392001-03-04 Gary Houston <ghouston@arglist.com>
13640
13641 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13642 taking an unexpectedly large filename for an AF_UNIX socket from
13643 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13644
439006bf
GH
13645 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13646 former and adjusted the latter.
13647 (scm_socket, scm_socketpair): cosmetic changes.
13648 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13649 size_t as socklen_t substitute. don't restrict args/return values
13650 to INUM: allow full range of int or size_t.
13651 (scm_fill_sockaddr): check arguments before allocating memory, to
13652 avoid leakage. use malloc, not scm_must_malloc.
13653 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13654 substitute. free the sockaddr structure before throwing an error.
13655 (scm_init_add_buffer): procedure removed, together with its static
13656 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13657 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13658 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13659 scm_sendto): use a local buffer instead of scm_addr_buffer.
13660 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13661 not size_t.
13662 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13663 call to detect whether recvfrom could be bothered to set the address.
13664 (scm_init_socket): don't call scm_init_addr_buffer.
13665
276dd677
DH
136662001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13667
13668 * debug.c (scm_procedure_source, scm_procedure_environment),
13669 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13670 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13671 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13672 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13673 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13674 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13675 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13676 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13677 scm_array_to_list, scm_array_prototype), validate.h
13678 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13679 scm_misc_error or scm_wrong_type_arg instead.
13680
13681 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13682
5e03762c
MD
136832001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13684
13685 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13686 (scm_sys_tag_body): Added.
13687
db4b4ca6
DH
136882001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13689
13690 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13691 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13692 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13693 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13694 options.c (scm_options), ports.c (scm_remove_from_port_table),
13695 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13696 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13697 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13698 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13699 instead.
13700
87e7741d
MD
137012001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13702
13703 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13704
d19b0aac
MV
137052001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13706
13707 * eval.c (scm_s_duplicate_bindings): New error message.
13708 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13709
2fd945df
MV
137102001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13711
13712 * eval.h (SCM_EVALIM2): New macro. Use it when a
13713 immediate, literal constant should be evaluated.
13714 * eval.c (scm_s_duplicate_formals): New error message string.
13715 (scm_c_improper_memq): New function.
13716 (scm_m_lambda): Check for duplicate arguments.
13717 (scm_ceval, scm_deval): When executing a body: only cons a new
13718 toplevel environment frame when it is different from the
13719 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13720 check for empty combinations; use SCM_EVALIM2 for the same reason
13721 in the non-toplevel loop.
13722 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13723 New labels with the meaning of their non-"nontoplevel" partners,
13724 but they are used when it is known that the body is not evaluated at
13725 top-level.
13726 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13727 reporting for empty combinations.
13728
9e6fc585
KN
137292001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13730
13731 * Remove dump facilities.
13732 * dump.c, dump.h: Removed.
13733 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13734 * init.c: Remove #include "libguile/dump.h".
13735 (scm_init_guile_1): Remove scm_init_dump.
13736 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13737 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13738 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13739 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13740
13741 * keywords.c: Remove #include "libguile/dump.h".
13742 (keyword_dump, keyword_undump): Removed.
13743 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13744
eae54bf0
MG
137452001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13746
13747 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13748 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13749 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13750 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13751 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13752 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13753 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13754 to @code{} as the texinfo manual recommends, converted the
13755 examples to use a @lisp{}-environment.
13756
13757 * strports.c (scm_eval_string): Cleaned up the docstring.
13758
13759 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13760 markup.
13761
13762 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13763 (scm_number_to_string, scm_string_to_number, scm_number_p)
13764 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13765 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13766 (scm_ash): Added texinfo markup and removed obsolete @refill.
13767 (scm_gr_p): Corrected comment.
13768 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13769 docstring) comments.
13770 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13771 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13772 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13773 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13774 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13775 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13776 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13777 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13778
23deee81
DH
137792001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13780
13781 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13782 (Obviously nobody compiles with SCM_RECKLESS defined...)
13783
13784 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13785
6fe692e9
MD
137862001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13787
13788 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13789
13790 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13791
27c37006
NJ
137922001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13793
13794 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13795 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13796 since use of `z' suggests that the arguments may be complex.
13797
13798 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13799 typos.
13800
2069af38
NJ
138012001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13802
13803 * dump.c (scm_binary_write, scm_binary_read), eval.c
13804 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13805 scm_guardian_greedy_p, scm_make_guardian), fports.c
13806 (scm_file_port_p): Minor docstring fixes.
13807
b42ff180
MV
138082001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13809
2069af38 13810 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13811
13812 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13813 scm_i_eval.
13814 (make_class_from_template): Do not bother to set the current
13815 module around the call to DEFVAR, scm_eval takes care of that.
13816 (scm_init_goops): Make scm_module_goops and
13817 scm_goops_lookup_closure permanent objects.
1c938eb8 13818
97ea55f8
MV
13819 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13820 top level, create a fresh top-level environment for each
13821 expression instead of mutating the exisint frame. This is
13822 important when that frame is closed over.
13823
b42ff180
MV
13824 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13825 SCM_DIGSPERLONG instead of DIGSPERLONG.
13826
09f2ab1e
MV
138272001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13828
13829 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13830 before applying arrow procedure in `cond' and before applying
13831 receiver procedure in call-with-current-continuation.
13832 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13833 macro. The argument is expanded more than one time.
13834
13835 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13836 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13837
138382001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13839
13840 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13841 notice and license.
13842
7090240c
MG
138432001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13844
13845 * variable.c (scm_make_variable, scm_make_undefined_variable)
13846 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13847 (scm_variable_bound_p), values.c (scm_values)
13848 (scm_call_with_values), unif.c (scm_bit_count)
13849 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13850 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13851 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13852 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13853 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13854 (scm_copy_random_state, scm_random), print.c (scm_newline)
13855 (scm_write_char, scm_simple_format), debug-malloc.c
13856 (scm_malloc_stats), environments.c (scm_environment_p)
13857 (scm_environment_bound_p, scm_environment_ref)
13858 (scm_environment_fold, scm_environment_define)
13859 (scm_environment_undefine, scm_environment_set_x)
13860 (scm_environment_cell, scm_environment_observe)
13861 (scm_environment_observe_weak, scm_environment_unobserve)
13862 (scm_make_eval_environment, scm_eval_environment_p)
13863 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13864 (scm_eval_environment_imported)
13865 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13866 (scm_import_environment_p, scm_import_environment_imports)
13867 (scm_import_environment_set_imports_x, scm_make_export_environment)
13868 (scm_export_environment_p, scm_export_environment_private)
13869 (scm_export_environment_set_private_x)
13870 (scm_export_environment_signature)
13871 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13872 Added texinfo markup.
13873
13874 * ports.c (scm_drain_input): Lowercased argument to @var.
13875 (scm_current_input_port, scm_current_output_port): Filled in
13876 missing explanation.
13877 (scm_current_load_port, scm_set_current_output_port)
13878 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13879 Added texinfo markup.
13880
13881 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13882 (scm_release_arbiter): Added texinfo markup to docstrings.
13883 Changed `Returns' to `Return'.
13884 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13885
25703850
NJ
138862001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13887
13888 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13889 by doubling them to `@@'.
13890
73c0fdce
MG
138912001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13892
13893 * numbers.c (scm_lognot), random.c (scm_random,
13894 scm_random_normal, scm_random_solid_sphere_x,
13895 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13896 scm_random_exp), dynwind.c
13897 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13898
73c0fdce
MG
13899 * goops.c (scm_sys_initialize_object, scm_instance_p,
13900 scm_class_name, scm_class_precedence_list, scm_class_slots,
13901 scm_class_environment, scm_generic_function_name,
13902 scm_generic_function_methods, scm_method_generic_function,
13903 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13904 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13905 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13906 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13907 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13908 scm_class_direct_supers, scm_class_direct_slots,
13909 scm_class_direct_subclasses, scm_class_direct_methods,
13910 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13911 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13912 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13913 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13914 scm_memoized_environment, scm_procedure_name,
13915 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13916 objects.c
13917 (scm_class_of, scm_entity_p, scm_operator_p,
13918 scm_set_object_procedure_x, scm_object_procedure,
13919 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13920 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13921 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13922 scm_hook_to_list), lang.c
13923 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13924 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13925 (scm_print_options, scm_port_with_print_state,
13926 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13927 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13928 scm_make_procedure_with_setter, scm_procedure), throw.c
13929 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13930 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13931 scm_stack_ref, scm_stack_length, scm_frame_p,
13932 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13933 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13934 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13935 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13936 (scm_dirname, scm_basename), dynwind.c
13937 (scm_wind_chain), read.c (scm_read_options, scm_read,
13938 scm_read_hash_extend), gc.c
13939 (scm_unhash_name), eval.c (scm_eval_options_interface,
13940 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13941 (scm_display_error, scm_set_print_params_x,
13942 scm_display_application, scm_display_backtrace, scm_backtrace),
13943 async.c (scm_async, scm_system_async, scm_async_mark,
13944 scm_system_async_mark, scm_run_asyncs, scm_noop,
13945 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13946 scm_mask_signals): Added docstrings.
13947
e228a203
KN
139482001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13949
13950 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13951 address of car/cdr. (Thanks to Dirk Herrmann)
13952 Use scm_sizet to obtain the length of strings.
13953 (Thanks to Matthias Koeppe)
13954
1552a59d
MV
139552001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13956
13957 * symbols.c (scm_mem2symbol): Put a empty statement after the
13958 next_symbol label. This is mandated by ANSI, appearantly.
13959
3178f751
MV
139602001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13961
13962 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13963 sense to compile for a specific kernel version. Do not include
13964 <asm/signal.h> while defining __KERNEL__. This hack should no
13965 longer be needed and caused problems.
13966
7af4defe
MV
139672001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13968
13969 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13970 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13971 can not deal with immediates.
13972
5d6bb349
KN
139732001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13974
13975 * list.c (scm_list_copy): Validate the first argument.
13976
ec9709f0
MV
139772001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13978
13979 Fix evaluator so that top-level expressions are correctly
13980 evaluated with respect to the module system.
1c938eb8 13981
ec9709f0
MV
13982 * modules.h. modules.c (scm_current_module_lookup_closure): New
13983 function.
13984
13985 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13986 prototypes.
13987 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13988 names to better reflect their meaning.
13989
13990 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13991 evaluated at top-level and synronize lookup closure before
13992 executing every subform.
13993 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13994 (scm_eval_x, scm_eval): Reimplement in terms of
13995 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13996
ec9709f0
MV
139972001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13998
13999 * macros.c (scm_macro_name, scm_macro_transformer): Use
14000 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
14001 Thanks!
14002
42417394
KN
140032001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
14004
14005 * dump.c (scm_store_bytes): Store data size before data.
14006 (scm_restore_bytes): Restore data size. Takes a pointer to size.
14007 * dump.h (scm_restore_bytes): Updated.
14008
bf942687
KN
140092001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
14010
14011 * dump.c: Use double cells for update schedule.
14012
1be4270a
KN
140132001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
14014
14015 * ports.c (scm_unread_char): Take an optional argument.
14016
548728ea
MV
140172001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
14018
14019 * modules.h (scm_selected_module, scm_current_module): Renamed
14020 scm_selected_module to scm_current_module to synchronize Scheme
14021 and C names.
14022 (scm_select_module, scm_set_current_module): Likewise. Changed
14023 all uses.
1c938eb8 14024
548728ea
MV
14025 * ports.c (scm_port_for_each): Make a snapshot of the port table
14026 before iterating over it. The table might change while the user
14027 code is running. With the snapshot, the user can depend on the
c5408bc3 14028 fact that each port that existed at the start of the iteration is
548728ea
MV
14029 encountered exactly once. (ice-9 popen) depends on this.
14030
cb0d8be2
DH
140312001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14032
14033 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
14034
14035 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
14036 range checking for the size parameter. Thanks to Martin
14037 Grabmueller for the hint.
14038
14039 (scm_makstr): Reordered string initialization to make interrupt
14040 deferring unnecessary.
14041
14042 * vectors.c (scm_make_vector): Fixed range checking.
14043
e382fdbe
DH
140442001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14045
14046 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
14047
14048 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
14049 checking of the size parameter for type correctness and valid
14050 range. Thanks to Rob Browning for reporting the problem. Instead
14051 of deferring interrupts, scm_remember_upto_here_1 is used.
14052
bf8f0922
KN
140532001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14054
14055 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
14056 (scm_dump_cell_update): Removed.
14057 (scm_dump_update): Renamed from scm_dump_object_update.
14058 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
14059 a pointer instead of returning a value.
14060 * keywords.c (keyword_undump): Updated.
14061
914cceec
KN
140622001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14063
14064 * dump.c, dump.h: Modified a lot.
5f17c66f 14065 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
14066 (scm_dump_mark): Removed.
14067 (scm_restore_cell_object, scm_store_cell_object): New functions.
14068
14069 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
14070 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
14071 New slots: dump, undump.
14072 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
14073 Updated.
14074
14075 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
14076 (keyword_undump): Renamed from keyword_alloc.
14077 (scm_init_keywords): Set keyword_dump and keyword_undump.
14078
ecf470a2
ML
140792001-02-03 Michael Livshin <mlivshin@bigfoot.com>
14080
14081 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
14082 the deprecated SCM_DOUBLE_CELLP.
14083
14084 * tags.h (SCM_DOUBLE_CELLP): deprecated.
14085
03416a99
KN
140862001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
14087
14088 * dump.c, dump.h: New files.
14089 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
14090 * init.c: #include "libguile/dump.h".
14091 (scm_init_guile_1): Call scm_init_dump.
14092 * smob.h (scm_smob_descriptor): New slots: dump_mark,
14093 dump_dealloc, dump_store, undump_alloc, undump_restore,
14094 undump_init.
14095 * smob.c (scm_make_smob_type): Init the new slots.
14096 (scm_set_smob_dump, scm_set_smob_undump): New functions.
14097 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
14098
14099 * keywords.c: #include "libguile/dump.h".
14100 (keyword_dealloc, keyword_alloc): New functions.
14101 (scm_init_keywords): Set smob_dump and smob_undump.
14102
00ffa0e7
KN
141032001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
14104
14105 * vectors.c (scm_c_make_vector): New function.
14106 * vectors.h (scm_c_make_vector): Declared.
14107 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
14108 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
14109 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
14110 (scm_make_method_cache, scm_i_vector2list,
14111 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
14112 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
14113 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
14114 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
14115 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
14116 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
14117 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
14118 (scm_vector, scm_make_vector): Use scm_c_make_vector.
14119
14120 * hashtab.c (scm_c_make_hash_table): New function.
14121 * hashtab.h (scm_c_make_hash_table): Declared.
14122 * environments.c (scm_make_leaf_environment,
14123 scm_make_eval_environment), gc.c (scm_init_storage),
14124 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
14125 Use scm_c_make_hash_table.
14126
b8446ce8
MD
141272001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14128
14129 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
14130
e3239868
DH
141312001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
14132
14133 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
14134 end of docstring.
14135
14136 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
14137 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
14138 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
14139 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
14140 srcprop.c (scm_source_properties, scm_set_source_properties_x,
14141 scm_source_property, scm_set_source_property_x), sort.c
14142 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
14143 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
14144 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
14145 docstrings.
14146
41ee56dd
MD
141472001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14148
14149 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
14150 really get that arg.
14151
b6311c08
KN
141522001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
14153
14154 * goops.c (s_scm_get_keyword): Bug fix.
14155
a49af0c0
DH
141562001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14157
14158 The following patch was sent by Martin Grabmueller. It makes sure
14159 that in case of parameter errors the correct function name is
14160 shown, and that parameter types are only checked once.
14161
14162 * strop.c (string_copy, string_upcase_x, string_downcase_x,
14163 string_capitalize_x): New functions. Each one performs the core
14164 functionality of the corresponding scm_* function.
14165
14166 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
14167 scm_string_downcase_x, scm_string_downcase,
14168 scm_string_capitalize_x, scm_string_capitalize): Reduced to
14169 parameter checking wrappers of the above functions.
14170
13070bd3
DH
141712001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14172
14173 * continuations.c, dynl.c, keywords.c, load.c: Include
14174 strings.h. Thanks to Bill Schottstaedt for the bug report.
14175
2f2b390c
DH
141762001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14177
14178 * backtrace.c (display_header): Make sure that line and column
14179 information is shown independent of whether the port the code was
14180 read from had an associated filename. Thanks to Martin
14181 Grabmueller for providing this patch.
14182
efa40607
DH
141832001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14184
14185 * fports.[ch] (scm_file_port_p): New primitive.
14186
a98bddfd
DH
141872001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14188
14189 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
14190 These are now defined in fports.c, strports.c and vports.c.
14191
14192 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14193 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14194 tags.h).
14195
14196 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14197 (scm_make_sfptob): Made static. These return a type code now.
14198
14199 fports.c (scm_init_fports), strports.c (scm_init_strports),
14200 vports.c (scm_init_vports): Create the corresponding port types.
14201
14202 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14203 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14204
14205 * init.c (scm_init_guile_1): Make sure strports are initialized
14206 before gdbint.
14207
14208 * ports.[ch] (scm_make_port_type): Changed the return type to
14209 scm_bits_t.
14210
14211 * ports.c (scm_ports_prehistory): Don't create any port types
14212 here.
14213
14214 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14215 against scm_tc16_fport directly.
14216
0419a528
DH
142172001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14218
14219 * srcprop.c (scm_set_source_property_x): Fix to handle
14220 (set-source-property! <obj> 'copy <datum>) correctly.
14221
6d36532c
GH
142222001-01-24 Gary Houston <ghouston@arglist.com>
14223
14224 * filesys.c (scm_link): docstring fix.
14225 * fports.h (scm_setfileno): obsolete declaration removed.
14226 * posix.c: bogus popen declaration removed.
14227
14228 * rdelim.c: new file, split from ioext.c.
14229 * rdelim.h: new file, split from ioext.h
14230 * Makefile.am: add rdelim.c and related files.
14231 * init.c: call scm_init_rdelim. include rdelim.h.
14232
3ba5a6c2
DH
142332001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14234
14235 This patch was sent by Martin Grabmueller and makes sure that
14236 parameter errors are reported correctly by the lexicographic
14237 ordering predicates.
14238
14239 * strorder.c (string_less_p, string_ci_less_p): New functions.
14240
14241 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14242 functionality into string_less_p, string_ci_less_p respectively.
14243 The remaining code is just a wrapper to do the parameter
14244 checking.
14245
14246 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14247 parameters and call string_less_p instead of scm_string_less_p.
14248
14249 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14250 Check the parameters and call string_less_ci_p instead of
14251 scm_string_ci_less_p.
14252
e40a4095
DH
142532001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14254
ed6a2db9
DH
14255 This patch modifies scm_display_error to perform parameter
14256 checking. Thanks to Neil Jerram for the bug report.
14257
e40a4095
DH
14258 * backtrace.[ch] (scm_i_display_error): New function.
14259
14260 * backtrace.c (scm_display_error): Added parameter check and
14261 extracted the core functionality into function
14262 scm_i_display_error.
14263
14264 * throw.c (handler_message): Call scm_i_display_error to display
14265 the error message.
14266
f1e06a96
MD
142672001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14268
14269 * eval.c (SCM_APPLY): Added # args check for application of
14270 procedures with arity 3. (Thanks to Anders Holst.)
14271
30ea841d
DH
142722001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14273
14274 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14275
14276 (SCM_OPDIRP): Deprecated.
14277
14278 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14279 SCM_OPN.
14280
14281 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14282 Instead, give an explicit error message in case the directory is
14283 closed.
14284
14285 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14286 instead of SCM_OPENP and SCM_CLOSEDP.
14287
14288 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14289
312ae976
DH
142902001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14291
14292 * eval.c (inner_eval, scm_eval): Move all real functionality into
14293 inner_eval. Avoid to copy the expression twice by inlining some
14294 code from scm_i_eval.
14295
4567ed78
DH
142962001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14297
14298 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14299 now has to be the last clause, as required by R5RS. Thanks to
14300 Martin Grabmueller for the patch.
14301
10288a09
GH
143022001-01-18 Gary Houston <ghouston@arglist.com>
14303
14304 * ioext.c: further simplify scm_read_string_x_partial by defining
14305 a macro SCM_EBLOCK.
14306
8f379a8f
DH
143072001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14308
14309 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14310
5c75b29f
DH
143112001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14312
14313 * __scm.h: Added comment about architecture and compiler
14314 properties that are required by guile.
14315
14316 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14317 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14318
14319 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14320
14321 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14322
14323 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14324 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14325
ac0c002c
DH
143262001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14327
14328 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14329 to the names in limits.h.
14330
14331 * numbers.c (abs_most_negative_fixnum): Added.
14332
14333 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14334 fixnum-min) special case.
14335
14336 (scm_big_and): Fix for negative first parameter.
14337
14338 (scm_bit_extract): Fix for fixnum paramters.
14339 Thanks to Rob Browning for the bug report.
14340
14341 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14342
debe0dc2
DH
143432001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14344
14345 * symbols.c (scm_symbol_bound_p): Fixed comment.
14346 Thanks to Chris Cramer.
14347
8a39e3fc
DH
143482001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14349
14350 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14351 Thanks to Bill Schottstaedt.
14352
322ec19d
ML
143532001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14354
9a5fa6e9 14355 from Matthias Köppe:
1c938eb8 14356
322ec19d
ML
14357 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14358 casts its result, so doesn't yield an lvalue per ANSI C.
14359
14360 * goops.c (s_scm_sys_set_object_setter_x): use
14361 SCM_SET_ENTITY_SETTER.
14362 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14363
14364 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14365 its result, so doesn't yield an lvalue per ANSI C.
14366 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14367 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14368 SCM_GC_SET_CARD_FLAGS.
14369 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14370
14371 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14372
60d02d09
GH
143732001-01-08 Gary Houston <ghouston@arglist.com>
14374
14375 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14376 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14377 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14378 changes.
14379 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14380 for fdes. if current input port is used, check that it's a file
14381 port.
14382
c2da2648
GH
143832001-01-06 Gary Houston <ghouston@arglist.com>
14384
14385 * ioext.c (scm_read_string_x_partial): new procedure, implements
14386 read-string!/partial.
14387 * ports.c (scm_take_from_input_buffers): new procedure used by
14388 scm_read_string_x_partial.
14389 (scm_drain_input): use scm_take_from_input_buffers.
14390
4651d663
MV
143912001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14392
14393 * validate.h (SCM_VALIDATE_NUMBER): New.
14394
c0a5d888
ML
143952001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14396
14397 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14398 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14399 SET_DESTROYED): new defines/macros.
14400 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14401 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14402 (guardian_print): print more info.
14403 (guardian_apply): check if the guardian is destroyed, and throw an
14404 error if so. take one more optional argument `throw_p'.
14405 (scm_guard): depending on the value of `throw_p', return a boolean
14406 result.
14407 (scm_get_one_zombie): remove redundant property test.
14408 (guardian_t): represent the various (currently 3, I hope nothing
14409 more gets added) boolean fields as bit flags.
14410 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14411 (scm_destroy_guardian_x): new procedure.
14412
14413 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14414 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14415
0c6d2191
GH
144162001-01-01 Gary Houston <ghouston@arglist.com>
14417
14418 * fports.c (fport_write): bugfix: handle short writes for
14419 unbuffered ports too. optimize the buffered case by minimizing
14420 the number of write/flush calls.
14421 (write_all): new helper procedure.
14422
a51fe247 14423The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14424
14425;; Local Variables:
14426;; coding: utf-8
14427;; End: