Fix continuation problems on IA64.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
346e4402
NJ
12008-05-08 Neil Jerram <neil@ossau.uklinux.net>
2
3 * throw.c (scm_ithrow): For IA64 add a return statement, to
4 appease GCC.
5
6 * threads.h (scm_i_thread): New IA64 fields:
7 register_backing_store_base and pending_rbs_continuation.
8
9 * threads.c (guilify_self_1): For IA64: cap RBS base address at
10 the current value of scm_ia64_ar_bsp, and store the capped value
11 in thread state.
12 (SCM_MARK_BACKING_STORE): Use thread->register_backing_store_base
13 instead of scm_ia64_register_backing_store_base().
14 (scm_threads_mark_stacks): Add "&" in "&t->regs", so that the code
15 works both for jmp_buf defined as an array, and jmp_buf defined as
16 a struct.
17
18 * continuations.h (scm_t_contregs): Remove `fresh' and `ctx'
19 fields; these are now inside the IA64 definition of `jmp_buf'.
20
21 * continuations.c (scm_make_continuation): Simplify, by moving
22 some of the IA64 code inside the definition of "setjmp", and by
23 some obvious commonizations. For IA64 register backing store
24 (RBS) stack base, use thread->register_backing_store_base instead
25 of scm_ia64_register_backing_store_base().
26 (copy_stack): For IA64, store pointer to continuation being
27 invoked in thread state, so we can restore the continuation's RBS
28 stack just before the next setcontext call.
29 (copy_stack_and_call): Don't restore RBS stack explicitly here.
30 It will be restored, if appropriate, inside the longjmp call.
31 (scm_ia64_longjmp): New function.
32
33 * __scm.h (setjmp, longjmp, jmp_buf): For IA64, implement using
34 getcontext and setcontext.
35
7a35784c
LC
362008-05-07 Ludovic Courtès <ludo@gnu.org>
37
38 * numbers.c (scm_from_complex_double): Mark as `SCM_UNUSED'.
39 This fixes compilation with `-Werror' on FreeBSD 6.2 (i386).
40
6d4e1f62
NJ
412008-05-05 Neil Jerram <neil@ossau.uklinux.net>
42
43 * c-tokenize.lex: #define YY_NO_INPUT.
44
bd22f1c7
LC
452008-04-26 Ludovic Courtès <ludo@gnu.org>
46
47 * read.c (scm_read_sexp): Remove extraneous semi-colon at
48 end-of-line, which broke compilation with GCC 2.7. Reported by
49 Alain Guibert <alguibert+bts@free.fr>.
50
535b3592
LC
512008-04-24 Ludovic Courtès <ludo@gnu.org>
52
53 * Makefile.am (DEFAULT_INCLUDES): New. Fixes compilation on
54 Tru64 where our "random.h" would shadown libc's one.
55 (INCLUDES): Add "-I$(top_buildir)", which is normally in
56 `DEFAULT_INCLUDES'.
57 * gen-scmconfig.c: Include <libguile/gen-scmconfig.h>, not
58 "gen-scmconfig.h" since that file is under `$(builddir)'.
59
f5c2af4b
LC
602008-04-16 Ludovic Courtès <ludo@gnu.org>
61
62 * ports.c (scm_getc, scm_putc, scm_puts): Moved...
63 * inline.h: ... here. Noticeably improves `read' performance.
64
ef4cbc08
LC
652008-04-15 Ludovic Courtès <ludo@gnu.org>
66 Julian Graham <joolean@gmail.com>
67
68 * read.c (scm_keyword_postfix): New.
69 (scm_read_opts): Update docstring for `keywords'.
70 (scm_read_mixed_case_symbol): Add support for postfix keywords.
71
07db6fcd
LC
722008-04-13 Ludovic Courtès <ludo@gnu.org>
73
74 * inline.h (SCM_C_USE_EXTERN_INLINE): New macro. Use it to make
75 sure "extern" declarations are produced when "extern inline" is
9dca8935 76 used. Simplify macrology around inline definitions.
07db6fcd 77
7dc9ae71
LC
782008-04-10 Ludovic Courtès <ludo@gnu.org>
79
80 * inline.h (SCM_C_EXTERN_INLINE): Special-case Apple's GCC
81 4.0-based compiler, which doesn't support GNU inline semantics
82 at all in C99 mode but doesn't define `__GNUC_STDC_INLINE__'.
83 See http://thread.gmane.org/gmane.network.gnutls.general/1135 .
84
54ee7cdf
AW
852008-04-10 Andy Wingo <wingo@pobox.com>
86
4650d115
AW
87 * struct.c (scm_struct_ref, scm_struct_set_x): "Light" structs
88 have no hidden words (members of the SCM_STRUCT_DATA(x) array
89 accessed with negative indices). In that case, determine the
90 number of fields from the length of the struct layout
91 descriptor. (Most GOOPS instances are light structs.)
92
4125c767
AW
93 * goops.c (wrap_init): Initialize 'u' slots to 0, not some random
94 SCM value.
95
96 * goops.c (get_slot_value, set_slot_value): In the struct
54ee7cdf
AW
97 allocation case, don't poke the slots array directly -- we should
98 go through struct-ref/struct-set! code so that we get the
99 permissions and allocation ('u' versus 'p') correct.
100
979eade6
LC
1012008-04-03 Ludovic Courtès <ludo@gnu.org>
102
103 * inline.h (SCM_C_EXTERN_INLINE): New macro, addresses the
104 "extern inline" semantic change in C99 mode with GCC 4.3 and
105 later and the warning in C99 mode with GCC 4.2. Use it in the
106 inline function definitions.
107
2a1d0688
NJ
1082008-03-24 Neil Jerram <neil@ossau.uklinux.net>
109
110 Applying patch from Julian Graham, containing minor fixes to his
111 thread enhancements:
112
113 * threads.c (to_timespec): Change 1000000 multiplier to
114 1000000000.
115 (unchecked_unlock_sym, allow_external_unlock_sym,
116 recursive_sym): Use SCM_SYMBOL.
117 (scm_make_mutex_with_flags): When raising unsupported option
118 error, report what the unsupported option was.
119 (fat_mutex_unlock): When raising errors, unlock m->lock first.
120 (fat_cond_timedwait): Removed.
121 (scm_timed_wait_condition_variable): Call fat_mutex_unlock
122 directly instead of via fat_cond_timedwait.
123
c2ad98ad
LC
1242008-03-10 Ludovic Courtès <ludo@gnu.org>
125
126 * eval.c, filesys.c: Enclose `alloca' blob in `#ifndef alloca',
127 as per Gnulib's `alloca'. This should fix compilation on
128 FreeBSD 6.
129
bca69a9f
NJ
1302008-03-09 Neil Jerram <neil@ossau.uklinux.net>
131
132 * numbers.c: Only define scm_from_complex_double if it will
133 actually be used.
134
6180e336
NJ
1352008-03-08 Julian Graham <joolean@gmail.com>
136
137 * threads.c (scm_join_thread_timed, scm_thread_p,
138 scm_make_mutex_with_flags, scm_lock_mutex_timed,
139 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p): New
140 functions.
141 (thread_mark): Updated to mark new struct field `mutexes'.
142 (do_thread_exit): Notify threads waiting on mutexes locked by exiting
143 thread.
144 (scm_join_thread, scm_make_mutex, scm_make_recursive_mutex,
145 scm_mutex_lock): Reimplement in terms of their newer
146 counterparts.
147 (scm_abandoned_mutex_error_key): New symbol.
148 (fat_mutex)[unchecked_unlock, allow_external_unlock]: New fields.
149 (fat_mutex_lock): Reimplement to support timeouts and abandonment.
150 (fat_mutex_trylock, scm_try_mutex): Remove fat_mutex_trylock and
151 reimplement scm_try_mutex as a lock attempt with a timeout of zero.
152 (fat_mutex_unlock): Allow unlocking from other threads and unchecked
153 unlocking; implement in terms of condition variable wait.
154 (scm_timed_wait_condition_variable): Reimplement in terms of
155 fat_mutex_unlock.
156 * threads.h (scm_i_thread)[mutexes]: New field.
157 (scm_join_thread_timed, scm_thread_p, scm_lock_mutex_timed,
158 scm_unlock_mutex_timed, scm_mutex_p, scm_condition_variable_p):
159 Prototypes for new functions.
160
61b6542a
LC
1612008-03-06 Ludovic Courtès <ludo@gnu.org>
162
163 * eval.c (scm_eval): If MODULE_OR_STATE is not a dynamic state,
164 make sure it's a module. Reported by David I. Lehn.
165
3f520967
LC
1662008-03-02 Ludovic Courtès <ludo@gnu.org>
167
168 * pairs.h (scm_is_pair): Moved declaration to `inline.h'.
169 * inline.h: Make sure `extern' declarations are not produced
170 when `inline' is supported but GCC is not used. This
171 fixes "mixed linkage" errors with compilers such as
172 DEC/Compaq/HP CC.
173
fa80e280
NJ
1742008-02-27 Neil Jerram <neil@ossau.uklinux.net>
175
176 * _scm.h (errno): Remove declarations that have been there
177 forever, and are known to conflict on some platforms with that
178 provided by <errno.h>, which we include unconditionally. If
179 <errno.h> doesn't provide a errno declaration, what is the point
180 of it?
181
a2c25234
LC
1822008-02-23 Ludovic Courtès <ludo@gnu.org>
183
184 * numbers.c (scm_make_rectangular): Rename argument to
185 `real_part' and `imaginary_part' to work around Solaris 2.10
186 headers which define `imaginary' as a macro. Patch by Tim
187 Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>.
188
bfb64eb4
LC
1892008-02-22 Ludovic Courtès <ludo@gnu.org>
190
4fcb27c4
LC
191 * read.c (strncasecmp): Add declaration when
192 `HAVE_DECL_STRNCASECMP' is undefined. Fixes compilation on
193 NetBSD 1.6.
194
bfb64eb4
LC
195 * gc.c (scm_ia64_ar_bsp)[linux]: Don't discard `const' qualifier
196 of OPAQUE.
197
5305df84
LC
1982008-02-21 Ludovic Courtès <ludo@gnu.org>
199
200 Fix bug #22369.
201
202 * goops.c (scm_add_slot): Add `SCM_UNDEFINED' as last argument
a2c25234
LC
203 to `scm_list_n ()'. Thanks to René Köcher
204 <shirk87@googlemail.com>.
5305df84 205
25a640ca
LC
2062008-02-17 Ludovic Courtès <ludo@gnu.org>
207
208 * script.c (scm_compile_shell_switches): Update copyright year.
209
9a6fac59
LC
2102008-02-16 Ludovic Courtès <ludo@gnu.org>
211
212 * gc_os_dep.c: Add NetBSD/alpha support. Patch by Greg Troxel
213 <gdt@ir.bbn.com>.
214
5b5179f8
LC
2152008-02-12 Ludovic Courtès <ludo@gnu.org>
216
217 * guile-snarf.in (tempdir): Honor `$TMPDIR'.
218
4b26c03e
NJ
2192008-02-11 Neil Jerram <neil@ossau.uklinux.net>
220
221 * numbers.c (SCM_COMPLEX_VALUE): Use GUILE_I instead of _Complex_I
222 directly, and only if GUILE_I was defined by the configure step.
223 (scm_log, scm_log10, scm_exp, scm_sqrt): Use SCM_COMPLEX_VALUE
224 code only if SCM_COMPLEX_VALUE is defined.
225
7f74cf9a
LC
2262008-02-07 Ludovic Courtès <ludo@gnu.org>
227
228 Fix bug #21378.
229 Thanks to David Diffenbaugh <davediff@nbcs.rutgers.edu>.
230
231 * read.c (scm_read_quote): Don't use `__FUNCTION__' since it is
232 not supported by Sun CC on Solaris 9.
233 (scm_read_keyword): Likewise.
234 * strings.c (scm_take_locale_stringn): Remove
235 `SCM_C_INLINE_KEYWORD' to allow compilation with Sun CC.
236
86a597f8
NJ
2372008-02-07 Julian Graham <joolean@gmail.com>
238
239 * threads.c (do_thread_exit, scm_cancel_thread,
240 scm_set_thread_cleanup_x, scm_thread_cleanup): Lock on thread-specific
241 admin mutex instead of `thread_admin_mutex'.
242 * threads.h (scm_i_thread)[admin_mutex]: New field.
243 * throw.c (make_jmpbuf): Don't enter critical section during thread
244 spawn -- there is a possibility of deadlock if other threads are
245 exiting.
246
4a19ed04
NJ
2472008-02-06 Neil Jerram <neil@ossau.uklinux.net>
248
249 * gc-malloc.c (scm_gc_malloc): Return NULL if requested size is 0.
250 (scm_gc_free): Don't call `free' if mem is NULL.
251
189171c5
LC
2522008-02-06 Ludovic Courtès <ludo@gnu.org>
253
254 * numbers.c (scm_i_mkbig, scm_i_long2big, scm_i_ulong2big,
255 scm_i_clonebig, scm_i_bigcmp, scm_i_dbl2big, scm_i_dbl2num,
256 scm_i_normbig): Remove `SCM_C_INLINE_KEYWORD' since these are
257 declared as `extern' in `numbers.h'. This precluded compilation
258 on Solaris 9 with Sun CC (reported by David Halik
259 <dhalik@nbcs.rutgers.edu>).
260
d05bcb2e
NJ
2612008-02-05 Neil Jerram <neil@ossau.uklinux.net>
262
263 * fports.c (fport_seek): Make dependent on GUILE_USE_64_CALLS.
264
265 * _scm.h: Make definition of CHOOSE_LARGEFILE depend on
266 GUILE_USE_64_CALLS.
267
3ac8359a
NJ
2682008-02-01 Neil Jerram <neil@ossau.uklinux.net>
269
270 * modules.c (the_root_module): Moved before scm_current_module.
271 (scm_current_module): Return the root module if `the-module' fluid
272 gives #f.
273
d3cf93bc
NJ
2742008-01-22 Neil Jerram <neil@ossau.uklinux.net>
275
7df13834
NJ
276 * COPYING: Removed.
277
d3cf93bc
NJ
278 * __scm.h, _scm.h, weaks.c: Update copyright statement to LGPL.
279
15bd90ea
NJ
2802008-01-18 Neil Jerram <neil@ossau.uklinux.net>
281
282 * hashtab.c (scm_hash_fn_create_handle_x): If supplied assoc_fn
283 returns neither a pair nor #f, signal a wrong-type-arg error.
284 (Thanks to Gregory Marton for reporting this.)
285
5c004b6d
NJ
2862007-12-29 Neil Jerram <neil@ossau.uklinux.net>
287
288 * gc.c (mark_gc_async): Change "func_data" to "fn_data", to avoid
289 clash with AIX header file.
290 * hooks.c (scm_c_hook_add, scm_c_hook_remove): Same again.
291 * hooks.h (scm_t_c_hook_function, scm_c_hook_add,
292 scm_c_hook_remove): Same again.
293
9cc37597
LC
2942007-12-08 Ludovic Courtès <ludo@gnu.org>
295
296 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
297 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
298 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
299 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
300 * eval.i.c (CEVAL): Use branch prediction hints for syntax
301 errors, wrong number of arguments and similar.
302 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
303 immediate numbers.
304 (scm_difference, scm_product, scm_i_divide): Likewise.
305 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
306
7d1fc872
LC
3072007-12-04 Ludovic Courtès <ludo@gnu.org>
308
693758d5
LC
309 * ports.c (scm_c_read): Validate PORT as an open input port.
310 (scm_c_write): Validate PORT as an open output port.
311
7d1fc872
LC
312 * socket.c (scm_accept): Leave guile mode using
313 `scm_std_select ()' before calling `accept(2)'. Reported by
314 dskr <dskr@mac.com>.
315
ee834df4
LC
3162007-10-27 Ludovic Courtès <ludo@gnu.org>
317
318 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
319 containing the port. Fixes a bug in the new port table (2007-08-26).
320 (scm_evict_ports): Use `scm_c_port_for_each ()'.
321
acbfb594
NJ
3222007-10-21 Neil Jerram <neil@ossau.uklinux.net>
323
324 * eval.c (unmemoize_delay): Extend the environment before
325 unmemoizing the promise thunk. This fixes a segmentation fault
326 reported by Frank Schwidom.
327
2e77f720
LC
3282007-10-20 Julian Graham <joolean@gmail.com>
329
330 Add support for thread cancellation and user-defined thread
331 cleanup handlers. Small rework by Ludovic Courtès.
332
333 * null-threads.h (scm_i_pthread_cancel,
334 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
335 * pthread-threads.h (scm_i_pthread_cancel,
336 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
337 * scmsigs.c (scm_i_signal_delivery_thread,
338 signal_delivery_thread_mutex): New.
339 (signal_delivery_thread): Leave when `read_without_guile ()'
340 returns zero.
341 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
342 before spawning the thread. Initialize
343 SCM_I_SIGNAL_DELIVERY_THREAD.
344 (ensure_signal_delivery_thread): Renamed to...
345 (scm_i_ensure_signal_delivery_thread): this.
346 (scm_i_close_signal_pipe): New.
347 * scmsigs.h: Updated.
348 * threads.c (thread_mark): Mark `t->cleanup_handler'.
349 (guilify_self_1): Initialize `t->cleanup_handler' and
350 `t->canceled'.
351 (do_thread_exit): Invoke `t->cleanup_handler'.
352 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
353 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
354 vanishes.
355 (scm_leave_guile_cleanup): New.
356 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
357 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
358 than call `scm_leave_guile ()' after FUNC.
359 (scm_cancel_thread, scm_set_thread_cleanup_x,
360 scm_threads_cleanup): New.
361 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
362 returned list.
363 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
364 fields.
365 Add declarations of new functions.
366
d41668fa
LC
3672007-10-17 Ludovic Courtès <ludo@gnu.org>
368
369 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
370 regression compared to 1.8.2. Reported by Puneet
371 <schemer@gmail.com>.
372
66302618
LC
3732007-10-10 Ludovic Courtès <ludo@gnu.org>
374
375 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
376 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
377 * gen-scmconfig.h.in
378 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
379 * gen-scmconfig.c (main): Define
380 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
381
1445e449
LC
3822007-10-04 Ludovic Courtès <ludo@gnu.org>
383
384 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
385 `leave_locale_section ()' on failure of
386 `enter_locale_section ()' since the mutex is not held and locale
387 settings are unchanged.
388 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
389 `restore_locale_settings ()' instead of `leave_locale_section ()'
390 since the mutex is not held.
391
29776e85
LC
3922007-10-02 Ludovic Courtès <ludo@gnu.org>
393
394 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
395 since we're already in non-guile mode. Reported by Greg Toxel
396 for NetBSD.
397
61d3568b
LC
3982007-10-01 Ludovic Courtès <ludo@gnu.org>
399
400 * ports.c (flush_output_port): Expect directly a port instead of
401 a pair. Fixes a bug in the new port table (2007-08-26).
402
68eccd8b
KR
4032007-09-11 Kevin Ryde <user42@zip.com.au>
404
405 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
406 putenv("NAME") as the fallback everywhere else. In particular this is
407 needed for solaris 9. Reported by Frank Storbeck.
408
454866e0
LC
4092007-09-03 Ludovic Courtès <ludo@gnu.org>
410
411 * read.c (flush_ws): Handle SCSH block comments.
412
f43f3620
LC
4132007-09-03 Ludovic Courtès <ludo@gnu.org>
414
415 Fix alignment issues which showed up at least on SPARC.
416
417 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
418 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
419 alignment.
420 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
421 correct alignment.
422 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
423 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
424 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
425 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
426 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
427
8d4d5dfc
KR
4282007-09-03 Kevin Ryde <user42@zip.com.au>
429
430 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
431 before using clog(). It's possible for gcc to provide the "complex
432 double" type, but for the system not to have the complex funcs.
433 (scm_exp): Ditto HAVE_CEXP for cexp().
434 (clog, cexp, carg): Remove fallback definitions. These only
435 duplicated the code within scm_log and scm_exp, and the latter have to
436 exist for the case when there's no "complex double". So better just
437 fix up the conditionals selecting between the complex funcs and plain
438 doubles than worry about fallbacks.
439
1ac5fb45
LC
4402007-09-02 Ludovic Courtès <ludo@gnu.org>
441
442 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
443 This fixes a memory leak.
444
b87e6d04
HWN
4452007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
446
5dbc6c06
HWN
447 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
448 gc.c: replace port table with weak hash table. This simplifies
449 memory management, and fixes freed cells appearing in
450 port-for-each output.
451
b87e6d04
HWN
452 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
453 held.
454
2baec6a9
LC
4552007-08-23 Ludovic Courtès <ludo@gnu.org>
456
492faee1 457 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 458 expression when asked to. Reported by Kevin.
492faee1 459
2baec6a9
LC
460 * stime.c: Define `_REENTRANT' only if not already defined.
461
1f11c61a
KR
4622007-08-21 Kevin Ryde <user42@zip.com.au>
463
464 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
465 tc16 values so big, real, complex and fraction can be distinguished.
466
467 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
468 was making numbers come out as "type 23" in gc-live-object-stats.
469 Fix tests of the tc16 number types, they were checked under
470 scm_tc7_number, but the values went down the tag>=255 smob case.
471 Put smob case under scm_tc7_smob instead of using tag>=255, per
472 recommendation in comments with scm_tc7_smob to use symbolic values.
473 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
474 code. Lose some unnecessary "break" statements.
475
476 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
477 element returned, rather than two lookups scm_hashq_ref and
478 scm_hashq_set_x.
479
949ec9f9
KR
4802007-08-17 Kevin Ryde <user42@zip.com.au>
481
482 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
483 solaris 2.6. Reported by anirkko.
484
6caac03c
LC
4852007-07-29 Ludovic Courtès <ludo@gnu.org>
486
487 * Makefile.am (INCLUDES): Added Gnulib includes.
488 (gnulib_library): New.
489 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
490 `$(gnulib_library)'.
491 (libguile_la_LIBADD): Likewise.
492
493 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
494 to define it when available.
495 * srfi-14.c: Likewise.
f7439099
LC
496 * i18n.c: Likewise. Include Gnulib's <alloca.h>
497 * eval.c: Include Gnulib's <alloca.h>.
498 * filesys.c: Likewise.
499 * read.c: Don't include <strings.h> and don't provide an
500 `strncasecmp ()' replacement; use Gnulib's <string.h> and
501 `strncasecmp ()' instead.
6caac03c 502
e08f3f7a
LC
5032007-07-25 Ludovic Courtès <ludo@gnu.org>
504
505 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
506 immediately. This used to produce a circular memoized
507 expression, e.g., for `(set (quote x) #t)'.
508
7337d56d
LC
5092007-07-22 Ludovic Courtès <ludo@gnu.org>
510
511 Overhauled the reader, making it faster.
512
513 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
514 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
515 of `scm_lreadr ()'.
516
517 * read.c: Overhauled. No longer use a token buffer. Use a
518 on-stack C buffer in the common case and use Scheme strings when
519 larger buffers are needed.
520 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
521 scm_lreadr, scm_lreadrecparen): Removed.
522 (scm_i_input_error): Marked as `SCM_NORETURN'.
523
df449722
LC
5242007-07-15 Ludovic Courtès <ludo@gnu.org>
525
526 * script.c (scm_compile_shell_switches): Updated copyright year.
527
b1f57ea4
LC
5282007-07-11 Ludovic Courtès <ludo@gnu.org>
529
530 * goops.c (scm_sys_method_more_specific_p): Added docstring.
531 Make sure LEN is greater than or equal to the minimum length of
532 specializers of M1 and M2. This fixes a segfault later on in
533 `more_specificp ()' if TARGS is too small. Reported by Marco
534 Maggi <marco.maggi-ipsu@poste.it>.
535
d3075c52
LC
5362007-06-26 Ludovic Courtès <ludo@gnu.org>
537
538 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
539 sure to free the previous array after the new one has been
540 installed. This leak is made visible by running
541 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
542 from the REPL within Valgrind.
543
7a5fb796
LC
5442007-06-12 Ludovic Courtès <ludo@chbouib.org>
545
546 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
547 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
548 bus error on SPARC (and possibly others) due to unaligned access.
549
a1ef7406
LC
5502007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
551
552 * posix.c (scm_ttyname): Check whether RESULT is NULL before
553 making a string from it (reported by Dan McMahill). Don't call
554 `scm_from_locale_string ()' before the mutex is released.
555
3dcf3373
LC
5562007-05-26 Ludovic Courtès <ludo@chbouib.org>
557
558 * eval.c (scm_m_define): Updated comment. Changed order for value
559 evaluation and `scm_sym2var ()' call, which is perfectly valid per
560 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
561
608860a5
LC
5622007-05-05 Ludovic Courtès <ludo@chbouib.org>
563
564 Implemented lazy duplicate binding handling.
565
566 * modules.c (scm_export): Renamed to...
567 (scm_module_export): This. Now public.
568 (module_variable): Removed.
569 (default_duplicate_binding_procedures_var): New variable.
570 (default_duplicate_binding_handlers, resolve_duplicate_binding,
571 module_imported_variable, scm_module_local_variable,
572 scm_module_variable): New functions.
573 (scm_module_import_interface): Rewritten.
574 (scm_module_reverse_lookup): Exported as a Scheme function.
575 * modules.h (scm_module_index_duplicate_handlers,
576 scm_module_index_import_obarray): New macros.
577 (scm_module_variable, scm_module_local_variable,
578 scm_module_export): New declarations.
579
1911e3da
LC
5802007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
581
582 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
583 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
584
1d8ce4c0
HWN
5852007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
586
587 * numbers.c (carg): provide carg, cexp, clog in case they are
588 missing.
589
afb49959
LC
5902007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
591
592 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
593 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
594 Steven Wu.
595
b3aa4626
KR
5962007-03-08 Kevin Ryde <user42@zip.com.au>
597
598 * struct.c, struct.h (scm_make_vtable): New function, providing
599 `make-vtable'.
600 * stacks.c (scm_init_stacks): Use it.
601
6022007-03-06 Kevin Ryde <user42@zip.com.au>
603
604 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
605 allocating a tail array. If there's no such then those tail fields
606 are uninitialized and garbage SCMs there can cause a segv if printed
607 (after fetching with struct-ref).
608
6092007-02-22 Kevin Ryde <user42@zip.com.au>
610
611 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
612 (scm_usleep): Update docstring per manual, cross reference sleep.
613
614 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
615 scm_struct_init is not within that section. scm_struct_init can
616 thrown an error, which within a critical section results in an
617 abort().
618
03291373
NJ
6192007-02-19 Neil Jerram <neil@ossau.uklinux.net>
620
621 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
622 is included in the distribution.
652dbce6 623 (noinst_HEADERS): And the same for eval.i.c.
03291373 624
a2f00b9b
LC
6252007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
626
627 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
628 unconditionally. Include <langinfo.h> and <nl_types.h> when
629 available.
630 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
631 SCM_LIST_OR_INTEGER_P): New macros.
632 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
633 as powers of two instead of `(1 << LC_*)'.
634 (scm_i_locale_free): New function/macro.
635 (scm_global_locale): New global variable.
636 (smob_locale_free): Use `scm_i_locale_free ()'.
637 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
638 (get_current_locale_settings): Return `EINVAL' instead of `errno'
639 when `setlocale' fails.
640 (restore_locale_settings): Likewise.
641 (install_locale_categories): Likewise.
642 (install_locale): Likewise. Stop the locale stack traversal when
643 all categories have been handled.
644 (get_current_locale, category_to_category_mask,
645 category_list_to_category_mask): New function.
646 (scm_make_locale): Use them. Accept both lists of `LC_*' values
647 and single `LC_*' values as the first argument. Handle the case
648 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
649 duplicate C_BASE_LOCALE before using it.
650 (scm_nl_langinfo, define_langinfo_items): New functions.
651 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
652 `nl-langinfo' and invoke `define_langinfo_items ()'.
653 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
654 * posix.c: Include <xlocale.h> when available.
655 (scm_i_locale_mutex): Always define it. Statically initialized.
656 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
657 acquiring the locale mutex.
658 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
659
b3aa4626
KR
6602007-01-27 Kevin Ryde <user42@zip.com.au>
661
662 * ports.c (scm_port_line, scm_set_port_line_x), read.c
663 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
664 port line number type, should be "long" not "int", as per line_number
665 field of scm_t_port. (Makes a difference only on 64-bit systems, and
666 only then for a linenum above 2Gig.)
667
2a8d66b0
HWN
6682007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
669
670 * vector.c: remove comment as per kryde's request.
671
b3aa4626
KR
6722007-01-25 Kevin Ryde <user42@zip.com.au>
673
674 * sort.c (scm_stable_sort): Return empty list for input empty list, as
675 done in guile 1.6 and as always done by plain `sort'. Was falling
676 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
677
cb90e2cb
HWN
6782007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
679
8cb7939c
HWN
680 * vectors.c (s_scm_vector_move_right_x): complain about naming.
681
d00a0704
HWN
682 * srcprop.c: regularize comments.
683
3d178652
HWN
684 * eval.c: remove superfluous ifndef DEVAL.
685
243ebb61
HWN
686 * private-options.h: idem.
687
688 * eval.i.c: copyright nitpicking.
689
0ee05b85
HWN
690 * eval.c: distangle. move duplicate code to eval.i.c and include
691 twice.
692
693 * eval.i.c: new file.
694
22fc179a
HWN
695 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
696 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
697 read.h, stacks.c, symbols.c, throw.c: use private-options.h
698
699 * private-options.h: new file: contain hardcoded option
700 definitions.
701
cb90e2cb
HWN
702 * private-gc.h: add FSF header.
703
62560650
HWN
7042007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
705
72f19c26
HWN
706 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
707 memoize-symbol is set.
708
709 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
710
711 * eval.c (CEVAL): add memoize_symbol trap.
712
03347a97
HWN
713 * options.c (scm_options_try): new function. This allows error
714 reporting before changing options in a critical section.
715
b0763985
HWN
716 * srcprop.c: use double cell for storing source-properties. Put
717 filename in the plist, and share between srcprops if possible.
718 Remove specialized storage.
719
720 * srcprop.h: remove macros without SCM_ prefix from
721 interface. Remove specialized storage/type definitions.
722
62560650
HWN
723 * read.c: idem.
724
725 * print.c: idem.
726
727 * eval.c: terminate option lists with 0.
728
729 * options.c: remove n (for length) from scm_option_X
730 functions. Detect option list length by looking for NULL name.
731
42ddb3cb
LC
7322007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
733
734 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
735 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
736 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
737 added by `make-vtable-vtable'. Reported by Marco Maggi.
738
937038e8
HWN
7392007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
740
741 * throw.c (scm_ithrow): more refined error message: print symbols
742 too.
743
23d72566
KR
7442007-01-16 Kevin Ryde <user42@zip.com.au>
745
746 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
747 implementing `set-program-arguments'.
748
749 * filesys.c (scm_init_filesys): Use scm_from_int rather than
750 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
751 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
752 O_LARGEFILE. These are all int not long, per arg to open().
753 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
754 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
755 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
756 an int arg to fcntl.
757
758 * posix.c (scm_putenv): Correction to "len" variable, was defined only
759 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
760 Move it to where it's used. Reported by Hugh Sasse.
761
762 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
763 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
764 meant #\nul in the input (detected by scm_to_locale_string) and a bad
765 flags arg (detected by scm_to_int) would throw from a critical
766 section, causing an abort().
767
768 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
769 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
770 REG_NOTEOL; they're all ints not longs (per args to regcomp and
771 regexec).
772
a2c40dc7
HWN
7732007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
774
775 * throw.c (scm_ithrow): print out key symbol and string arguments
776 when error happens inside a critical section, and document why.
777
391f57e6
HWN
7782007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
779
780 * read.c (s_scm_read_hash_extend): document #f argument to
781 read-hash-extend.
782
23d72566
KR
7832007-01-04 Kevin Ryde <user42@zip.com.au>
784
785 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
786 scm_minor_version, scm_micro_version, scm_effective_version,
787 scm_version, scm_init_version): Use SCM_API instead of just extern,
788 for the benefit of mingw. Reported by Cesar Strauss.
789
93632e3c
HWN
7902007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
791
792 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
793 too.
794 (gc_update_stats): update scm_gc_cells_allocated_acc too.
795
23d72566
KR
7962006-12-27 Kevin Ryde <user42@zip.com.au>
797
798 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
799 the basic scm_get_stack_base. As advised by Nils Durner.
800
801 * threads.c (get_thread_stack_base): Add a version using
802 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
803 As advised by Heikki Lindholm.
804
805 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
806 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
807 Durner.
808
8092006-12-24 Kevin Ryde <user42@zip.com.au>
810
811 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
812 error if pid is not our own process, instead of silently doing nothing.
813
814 * print.c (scm_write, scm_display, scm_write_char): Disable port close
815 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
816 check in configure.in unintentionally enabled it. Believe that
817 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
818 can leave errno in that state. popen.test "no duplicates" output test
819 provoked that.
820
e2bf3b19
HWN
8212006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
822
823 * numbers.c (scm_i_fraction_reduce): move logic into
824 scm_i_make_ratio(), so fractions are only read.
825 scm_i_fraction_reduce() modifies a fraction when reading it. A
826 race condition might lead to fractions being corrupted by reading
827 them concurrently.
828
829 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
830 comparisons between reduced and unreduced fractions go wrong.
831
832 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
833 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
834 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
835 SCM_FRACTION_REDUCED.
836
23d72566
KR
8372006-12-16 Kevin Ryde <user42@zip.com.au>
838
839 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
840 more direct for a procedure called raise.
841 (kill): Remove mingw fake fallback.
842
8432006-12-15 Kevin Ryde <user42@zip.com.au>
844
845 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
846 _pipe on mingw.
847
8482006-12-14 Kevin Ryde <user42@zip.com.au>
849
850 * threads.c (thread_print): Cope with the case where pthread_t is a
851 struct, as found on mingw. Can't just cast to size_t for printing.
852 Reported by Nils Durner.
853
854 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
855 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
856
8572006-12-13 Kevin Ryde <user42@zip.com.au>
858
859 * eval.c (scm_m_define): Set 'name procedure property on any
860 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
861 procedures with setters as used in srfi-17.
862
863 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
864 linux man page says is a possibility.
865
f30e1bdf
LC
8662006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
867
868 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 869 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
870 negative lower bounds.
871 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 872 Szavai Gyula).
f30e1bdf
LC
873
874 (scm_array_in_bounds_p): Iterate over S instead of always
875 comparing indices with the bounds of S[0]. This fixes
876 `array-in-bounds?' for arrays with a rank greater than one and
877 with different lower bounds for each dimension.
878
23d72566
KR
8792006-12-05 Kevin Ryde <user42@zip.com.au>
880
881 * numbers.c (scm_product): For flonum*inum and complex*inum, return
882 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
883 and as per R5RS section "Exactness".
884
8852006-12-03 Kevin Ryde <user42@zip.com.au>
886
887 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
888 allow $AWK from the environment to override. It had syntax gremlins,
889 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
890 Makefile stopped it having any effect. Use just $(AWK), which can be
891 overridden with "make AWK=xxx" in the usual way if desired.
892
22be72d3
LC
8932006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
894
895 * libguile/vectors.c (scm_vector_to_list): Fixed list
896 construction: elements were not copied when INC is zero (see
897 "shared array" example in `vectors.test'). Reported by
898 Szavai Gyula.
899
b89c4943
LC
9002006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
901
902 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
903 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
904 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
905 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
906 (DOT_X_FILES): Added `gettext.x'.
907 (DOT_DOC_FILES): Likewise.
908 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
909 (modinclude_HEADERS): Added `gettext.h'.
910 (EXTRA_DIST): Added `libgettext.h'.
911
912 * gettext.h: Renamed to...
913 * libgettext.h: New file.
914
915 * i18n.c: Renamed to...
916 * gettext.c: New file.
917
918 * i18n.h: Renamed to...
919 * gettext.h: New file.
920
921 * i18n.c, i18n.h, locale-categories.h: New files.
922
923 * init.c: Include "libguile/gettext.h" instead of
924 "libguile/i18n.h".
925 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
926 `scm_init_i18n ()'.
927
928 * posix.c: Include "libguile/gettext.h" instead of
929 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
930 (USE_GNU_LOCALE_API): New macro.
931 (scm_i_locale_mutex): New variable.
932 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
933
934 * posix.h: Include "libguile/threads.h".
935 (scm_i_locale_mutex): New declaration.
936
f3e3f530
NJ
9372006-11-17 Neil Jerram <neil@ossau.uklinux.net>
938
939 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
940
d9f71a07
LC
9412006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
942
943 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
944 "sweep_stats" arguments; use them instead of accessing the global
945 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
946
947 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
948 before each iteration of the loop.
949 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
950 (scm_i_get_new_heap_segment): Take an additional argument
951 SWEEP_STATS. Compute MIN_CELLS as a function of it.
952
953 * libguile/gc.c (scm_gc_cells_collected,
954 scm_gc_cells_collected_1): Removed.
955 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
956 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
957 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
958 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
959 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
960 `scm_gc_cells_(collected|swept)'.
961 (gc_update_stats): New.
962 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
963 `scm_i_gc_sweep_stats_1' instead of the former globals.
964 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
965 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
966 would keep allocating new segments instead of re-using collected
967 cells (because `scm_gc_cells_collected' would remain zero).
968
969 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
970 scm_gc_cell_yield_percentage): Removed.
971
972 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
973 (scm_i_adjust_min_yield): Updated.
974 (scm_i_get_new_heap_segment): Updated.
975
dd18d312
NJ
9762006-11-02 Neil Jerram <neil@ossau.uklinux.net>
977
978 * modules.c: Correct comment saying that low-level environments
979 will be used "in the next release".
980
981 * init.c: Comment out #include of environments.h.
982 (scm_i_init_guile): Comment out scm_environments_prehistory() and
983 scm_init_environments() calls.
984
985 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
986 (DOT_X_FILES): Remove environments.x.
987 (DOT_DOC_FILES): Remove environments.doc.
988 (modinclude_HEADERS): Remove environments.h.
989
9a5fa6e9
NJ
9902006-10-25 Neil Jerram <neil@ossau.uklinux.net>
991
992 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
993
994 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
995 scm_ia64_register_backing_store_base() instead of Linux-specific
996 implementations.
997
998 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
999 New declarations.
1000
1001 * gc.c (__libc_ia64_register_backing_store_base): Declaration
1002 removed.
1003 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
1004 implementations for Linux and HP-UX.
1005
1006 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
1007 and scm_ia64_register_backing_store_base() instead of
1008 Linux-specific implementations.
1009
1010 * continuations.h (__libc_ia64_register_backing_store_base):
1011 Declaration removed.
1012 (scm_t_contregs): New "fresh" field.
1013
1014 * continuations.c (ia64_getcontext): Removed.
1015 (scm_make_continuation): Use continuation fresh field instead of
1016 interpreting getcontext return values (which isn't portable). Use
1017 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
1018 instead of Linux-specific implementations.
1019 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
1020 instead of Linux-specific implementation.
1021
1022 * _scm.h (__ia64__): Also detect __ia64.
1023
8ab3d8a0
KR
10242006-10-03 Kevin Ryde <user42@zip.com.au>
1025
1026 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
1027 arguments or 3 or more arguments. Previously 0 called proc with
1028 SCM_UNDEFINED, and 3 or more silently used just the first 2.
1029
10302006-09-28 Kevin Ryde <user42@zip.com.au>
1031
1032 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
1033 for chsize fallback, instead of hard-coding mingw. Mingw in fact
1034 supplies ftruncate itself these days.
1035
1036 * ports.c (fcntl.h): Can include this unconditionally, no need for
1037 __MINGW32__.
1038
1039 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
1040 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
1041 "off_t" for parameters, per usual definition of this function, rather
1042 than "char *" and "int". Use ftruncate instead of chsize. Check for
1043 error on final close.
1044
10452006-09-27 Kevin Ryde <user42@zip.com.au>
1046
1047 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
1048 in mingw.
1049
1050 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
1051 const *" for mingw to suppress warnings from gcc (which are errors
1052 under the configure default -Werror). Reported by Nils Durner.
1053
10542006-09-26 Kevin Ryde <user42@zip.com.au>
1055
1056 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
1057 * fports.c (scm_open_file): Use open_or_open64.
1058 (fport_seek_or_seek64): New function, adapting fport_seek.
1059 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
1060 functions.
1061 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
1062 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
1063
1064 * ports.c (scm_truncate_file): Update docstring per manual.
1065
10662006-09-23 Kevin Ryde <user42@zip.com.au>
1067
1068 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
1069 functions.
1070
9a5fa6e9 10712006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
1072
1073 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
1074 (make_predset, define_predset, make_strset, define_strset, false,
1075 true): Removed.
1076 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
1077 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
1078 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
1079 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
1080 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
1081 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
1082 (define_charset, scm_srfi_14_compute_char_sets): New functions.
1083 (scm_init_srfi_14): Use `define_charset ()' instead of
1084 `define_predset ()' and `define_strset ()'.
1085
1086 * srfi-14.h (scm_c_init_srfi_14): Removed.
1087 (scm_srfi_14_compute_char_sets): New declaration.
1088
1089 * posix.h: Include "srfi-14.h".
1090 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
1091 successful `setlocale ()' call.
1092
8ab3d8a0
KR
10932006-09-08 Kevin Ryde <user42@zip.com.au>
1094
1095 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
1096 (scm_recvfrom): Update docstring from manual.
1097
418122ce
RB
10982006-08-31 Rob Browning <rlb@defaultvalue.org>
1099
1100 * ports.c (scm_c_port_for_each): Add a
1101 scm_remember_upto_here_1(ports) at the end of the function to fix
1102 a GC bug.
1103
b5944f66
NJ
11042006-08-28 Neil Jerram <neil@ossau.uklinux.net>
1105
1106 * backtrace.c (scm_display_backtrace_with_highlights): Minor
1107 improvements to docstring.
1108 (scm_backtrace_with_highlights): Analogous improvements.
1109
8ab3d8a0
KR
11102006-08-12 Kevin Ryde <user42@zip.com.au>
1111
1112 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
1113 New, set from configure.
1114 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
1115 to scmconfig.h.
1116 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
1117 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
1118 Reported by Claes Wallin.
1119
b0b0deff
NJ
11202006-08-11 Neil Jerram <neil@ossau.uklinux.net>
1121
1122 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
1123 frame, not a stack).
1124
8ab3d8a0
KR
11252006-07-25 Kevin Ryde <user42@zip.com.au>
1126
1127 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
1128 on pthreads version, since pthread_getattr_np not available on solaris
1129 and macos. Reported by Claes Wallin.
1130
11312006-07-24 Kevin Ryde <user42@zip.com.au>
1132
1133 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
1134 it's a macro on MacOS X. Reported by Claes Wallin.
1135
1136 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
1137 for the benefit of Solaris 10. Reported by Claes Wallin.
1138
1139 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
1140 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
1141
11422006-07-21 Kevin Ryde <user42@zip.com.au>
1143
1144 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
1145 autoconf recommendation. Should fix Solaris 10 reported by Claes
1146 Wallin.
1147
1148 * threads.c: Include <string.h>, needed for memset() which is used by
1149 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
1150
b4912378
RB
11512006-07-18 Rob Browning <rlb@defaultvalue.org>
1152
1153 * continuations.c: Add __attribute__ ((returns_twice)) to the
1154 ia64_getcontext prototype so that gcc will make the right
1155 arrangements and avoid an illegal instruction during
1156 call-with-current-continuation.
1157
9a5fa6e9 11582006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
1159
1160 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
1161 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
1162
8ab3d8a0
KR
11632006-07-08 Kevin Ryde <user42@zip.com.au>
1164
1165 * environments.c (core_environments_unobserve): Use if/else rather
1166 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
1167 about them not being rvalues. Reported by Mike Gran.
1168
1169 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
1170 portable and in particular fails on OpenBSD and AIX (see autoconf
1171 manual too). Reported by Mike Gran.
1172
11732006-06-25 Kevin Ryde <user42@zip.com.au>
1174
1175 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
1176 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
1177 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
1178 HAVE_TM_ZONE.
1179 (scm_strptime): Use tm_gmtoff from the strptime result when that field
1180 exists, it's set by glibc strptime "%s".
1181
9a5fa6e9 11822006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
1183
1184 * eq.c: Include "struct.h", "goops.h" and "objects.h".
1185 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
1186 are not GOOPS instances.
1187 * struct.c: Include "eq.h".
1188 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
1189 hand-written code.
1190 (scm_i_struct_equalp): New.
1191 * struct.h (scm_i_struct_equalp): New declaration.
1192
c862d0e0
KR
11932006-06-06 Kevin Ryde <user42@zip.com.au>
1194
1195 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
1196 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
1197 reported by Mattias Holm.
b4912378 1198
c862d0e0
KR
11992006-06-03 Kevin Ryde <user42@zip.com.au>
1200
1201 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
1202 unused variable warning when elisp disabled. Reported by Ryan
1203 VanderBijl.
1204
1205 * throw.c (scm_handle_by_message): Add dummy return value to avoid
1206 compiler warning on cygwin. Reported by Ryan VanderBijl.
1207
1208 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
1209 duplicate of EXTRA_DOT_DOC_FILES.
1210 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
1211 Add scmconfig.h to dependencies, since these all run cpp. Helps a
1212 parallel "make -j2". Reported by Mattias Holm.
1213
12142006-05-30 Kevin Ryde <user42@zip.com.au>
1215
1216 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
1217 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
1218 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
1219 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
1220 port type descriptor, same as scm_make_port_type return value.
1221
af4f8612
MV
12222006-05-30 Marius Vollmer <mvo@zagadka.de>
1223
1224 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
1225 of the arguments is a array. This allows vectors to be equal to
1226 one-dimensional arrays.
1227
18bffcd0
MV
12282006-05-29 Marius Vollmer <mvo@zagadka.de>
1229
1230 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
1231 that we have a pair before accessing its cdr. Thanks to Bill
1232 Schottstaedt!
1233
c862d0e0
KR
12342006-05-28 Kevin Ryde <user42@zip.com.au>
1235
1236 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
1237 by "The Senator".
1238
12392006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
1240
1241 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
1242 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
1243
c862d0e0
KR
12442006-05-26 Kevin Ryde <user42@zip.com.au>
1245
1246 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
1247 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
1248 Reported by "The Senator".
1249 For select and ioctl, move fdes into those conditionals, to avoid
1250 unused variable warning when neither of those used.
1251
12522006-05-23 Kevin Ryde <user42@zip.com.au>
1253
1254 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
1255 It's unused and will be in stdio.h anyway (if it's anywhere).
1256
12572006-05-20 Kevin Ryde <user42@zip.com.au>
1258
1259 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
1260 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
1261
1262 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
1263 symlink). Probably can't create symlinks with mknod anyway though.
1264
1265 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
1266 generation.
1267
12682006-05-15 Kevin Ryde <user42@zip.com.au>
1269
1270 * simpos.c, simpos.h (scm_primitive__exit): New function.
1271 (scm_primitive_exit): Update docstring, no longer the best exit after
1272 a fork.
1273
12742006-05-09 Kevin Ryde <user42@zip.com.au>
1275
1276 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
1277 rather than converting to doubles, to avoid inf or nan when the inputs
1278 are too big for a double but the quotient does fit. This affects
1279 conversions exact->inexact of big fractions.
1280
1281 * filesys.c (scm_open_fdes): Use open64.
1282 (scm_init_filesys): Add O_LARGEFILE.
1283
1284 * ports.c (scm_seek): Use lseek64.
1285 (scm_truncate_file): Use ftruncate64.
1286
4a342b19
MV
12872006-05-08 Marius Vollmer <mvo@zagadka.de>
1288
1289 * private-gc.h (CELL_P): Also check that the potential pointer is
1290 correctly aligned for a cell. Thanks to Miroslav Lichvar!
1291
c862d0e0
KR
12922006-04-18 Rob Browning <rlb@defaultvalue.org>
1293
1294 * _scm.h: Add back error if the size of off_t is unknown. The bug
1295 was actually in guile-readline's configuration.
1296
12972006-04-18 Kevin Ryde <user42@zip.com.au>
1298
1299 * posix.c (scm_mkstemp): Update docstring from the manual, in
1300 particular file mode 0600 is not guaranteed.
1301
281ab5e2
KR
13022006-04-17 Kevin Ryde <user42@zip.com.au>
1303
1304 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1305 size, to help the guile-readline build where off_t is unused.
1306
2b829bbb
KR
13072006-04-16 Kevin Ryde <user42@zip.com.au>
1308
1309 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1310 (scm_readdir): Use readdir64.
1311 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1312 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1313 and ftruncate take off_t not size_t.
1314 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1315 available.
1316
13172006-04-06 Kevin Ryde <user42@zip.com.au>
1318
1319 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1320 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
1321
13222006-03-26 Marius Vollmer <mvo@zagadka.de>
1323
1324 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1325 instead of accessing __libc_stack_end directly, and only do this
1326 when pthread_attr_getstack is known not to work for the main
1327 thread or when not using pthreads at all.
1328
1329 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1330 unknown instead of returning NULL.
1331
9a5fa6e9 13322006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1333
1334 * numbers.c (scm_i_mem2number): Renamed to
1335 scm_c_locale_stringn_to_number.
1336 * numbers.c, print.c, read.c: Updated callers.
1337 * numbers.h: Update function declaration.
1338
13392006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1340
1341 * unif.c (string_set): Don't return in a void function. (Reported
1342 by Mike Gran.)
1343
1344 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1345 rather than void*, so we can do pointer arithmetic on it.
1346 (Reported by Mike Gran.)
1347 (s_scm_uniform_vector_write): Ditto.
1348
13492006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1350
1351 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1352 oldra is not an array. (Reported by Steve Juranich.)
1353
1354 * threads.c (do_unlock): Renamed from "unlock", which is defined
1355 in unistd.h on QNX. (Reported by Matt Kraai.)
1356
13572006-03-04 Kevin Ryde <user42@zip.com.au>
1358
1359 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1360 not SCM_CRITICAL_SECTION_START.
1361
1362 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1363 Mike Gran.
1364
13652006-02-28 Kevin Ryde <user42@zip.com.au>
1366
1367 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1368
13692006-02-26 Kevin Ryde <user42@zip.com.au>
1370
1371 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1372 NAME_MAX is not available, which is so on Solaris 10. Report and help
1373 by Bill Schottstaedt.
1374
1375 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1376 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1377 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1378 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1379 use "unsigned char", not signed char. This ensures comparisons are
1380 the same as `char<?' etc, and is also the same as guile 1.6 did.
1381 Reported by Sven Hartrumpf.
1382
4a9f83ff
MD
13832006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1384
1385 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1386 SCM_HAVE_T_INT64.
1387 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1388 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1389 scm_t_int32.
1390
29d8c124 13912006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1392
1393 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1394 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1395 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1396 Take into account SEG->SPAN when computing CELLS_SWEPT.
1397 (scm_i_sweep_segment): Take one more argument, similarly.
1398 (scm_i_sweep_all_segments): Likewise.
1399 (scm_i_sweep_some_segments): Likewise.
1400 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1401 refer to SCM_GC_CELLS_COLLECTED.
1402
1403 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1404 argument, an `scm_i_sweep_statistics' object.
1405 Change the way DELTA is collected: don't take into account
1406 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1407
1408 * gc-malloc.c (scm_realloc): Pass an extra argument
1409 to `scm_i_sweep_all_segments ()'.
1410
1411 * gc.c (gc_start_stats): Updated accordingly.
1412 (gc_end_stats): Take an additional SWEEP_STATS argument.
1413 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1414 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1415 Decrement SCM_CELLS_ALLOCATED.
1416 (scm_i_gc): Likewise.
1417
1418 * private-gc.h (scm_i_sweep_*): Updated function
1419 prototypes accordingly.
1420 (scm_t_sweep_statistics): New type.
1421 (scm_i_sweep_statistics_init): New macro.
1422 (scm_i_sweep_statistics_sum): New macro
1423
9a5fa6e9 14242006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1425
1426 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1427 LEN. Without this, too much collectable memory gets unregistered,
1428 which results in an underflow of SCM_MALLOCATED in
1429 `decrease_mtrigger()'.
1430
1431 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1432 equal to SCM_MALLOCATED.
1433
14342006-02-13 Marius Vollmer <mvo@zagadka.de>
1435
1436 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1437 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1438 configured --without-threads.
1439 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1440
1aaa1c17
MV
14412006-02-12 Marius Vollmer <mvo@zagadka.de>
1442
1443 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1444 filling when the fill parameter is omitted, as documented, but
1445 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1446 can not store characters.
1447
d7c6575f
NJ
14482006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1449
1450 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1451 on to scm_fill_sockaddr call.
1452
43e01b1e
NJ
14532006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1454
1455 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1456 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1457
1458 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1459 (struct pre_unwind_data): New, replaces struct lazy_catch.
1460 (scm_c_catch): New, replaces scm_internal_catch as the primary
1461 catch API for C code; adds pre-unwind handler support.
1462 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1463 compatibility.
1464 (tc16_pre_unwind_data, pre_unwind_data_print,
1465 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1466 "lazy_catch" equivalents.
1467 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1468 as the primary C API for a "lazy" catch.
1469 (scm_internal_lazy_catch): Now just a wrapper for
1470 scm_c_with_throw_handler, for back compatibility.
1471 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1472 pre-unwind handler support.
1473 (scm_catch): Now just a wrapper for
1474 scm_catch_with_pre_unwind_handler, for back compatibility.
1475 (scm_with_throw_handler): New.
1476 (scm_lazy_catch): Update comment to say that the handler can
1477 return, and what happens if it does.
1478 (toggle_pre_unwind_running): New.
1479 (scm_ithrow): When identifying the throw target, take running
1480 flags into account. In general, change naming of things from
1481 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1482 don't unwind the dynamic context first. Add dynwind framing to
1483 manage the running flag of a throw handler. If a lazy catch or
1484 throw handler returns, rethrow the same exception again. Add
1485 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1486
1487 * root.c (scm_internal_cwdr): Add NULL args to
1488 scm_i_with_continuation_barrier call.
1489
1490 * dynwind.c: Change comment mentioning lazy-catch to mention
1491 pre-unwind data and throw handler also.
1492
1493 * continuations.h (scm_i_with_continuation_barrier): Add
1494 pre-unwind handler args.
1495
1496 * continuations.c (scm_i_with_continuation_barrier): Add
1497 pre-unwind handler args, and pass on to scm_c_catch (changed from
1498 scm_internal_catch).
1499 (c_handler): Remove scm_handle_by_message_noexit call.
1500 (scm_c_with_continuation_barrier): Call
1501 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1502 as the pre-unwind handler.
1503 (scm_handler): Remove scm_handle_by_message_noexit call.
1504 (s_scm_with_continuation_barrier): Call
1505 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1506 as the pre-unwind handler.
1507
2b829bbb
KR
15082006-02-04 Kevin Ryde <user42@zip.com.au>
1509
1510 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1511
72098928
KR
15122006-02-03 Kevin Ryde <user42@zip.com.au>
1513
1514 * list.c, list.h (scm_list): Restore this function for use from C.
1515 It's a complete no-op but in theory might used by someone.
1516
aa092c5d
MV
15172006-01-30 Marius Vollmer <mvo@zagadka.de>
1518
1519 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1520 so that it gets unlocked in all cases.
1521 (SCM_APPLY, CEVAL): Likewise.
1522
661ae7ab
MV
15232006-01-29 Marius Vollmer <mvo@zagadka.de>
1524
ee51ba31
MV
1525 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1526 scm_is_typed_array instead.
1527
661ae7ab
MV
1528 Renamed the "frames" that are related to dynamic-wind to "dynamic
1529 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1530 Updated documentation.
1531
99e370f6
MV
1532 Disabled "futures":
1533
1534 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1535 * eval.c, init.c: Comment out all 'future' related things.
1536
15ccf10b
MV
15372006-01-28 Marius Vollmer <mvo@zagadka.de>
1538
1539 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1540 to inline.h to make it inline.
1541
9a5fa6e9 15422005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1543
1544 * strings.c (scm_i_take_stringbufn): New.
1545 (scm_i_c_take_symbol): New.
1546 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1547
1548 * strings.h (scm_i_c_take_symbol): New.
1549 (scm_i_take_stringbufn): New.
1550
1551 * symbols.c (lookup_interned_symbol): New function.
1552 (scm_i_c_mem2symbol): New function.
1553 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1554 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1555 creating a new Scheme string.
1556 (scm_from_locale_symboln): Likewise.
1557 (scm_take_locale_symbol): New.
1558 (scm_take_locale_symboln): New.
1559
1560 * symbols.h (scm_take_locale_symbol): New.
1561 (scm_take_locale_symboln): New.
1562
2ca2ffe6
HWN
15632006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1564
1565 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1566 free_count.
1567
c255614e
HWN
15682005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1569
1570 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1571 upon error
1572
29295b0c
NJ
15732005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1574
9a5fa6e9 1575 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1576 the GC when allocated_fluids_len is zero.
1577
2824f4dc
NJ
15782005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1579
ec3a8ace
NJ
1580 * load.c (the_reader, the_reader_fluid_num): New.
1581 (scm_primitive_load): Support custom reader.
1582 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1583 the_reader as `current-reader'.
1584
2824f4dc
NJ
1585 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1586 (rather than an uninitialized pointer on the stack).
1587
d9c36d2a
MV
15882005-12-07 Marius Vollmer <mvo@zagadka.de>
1589
6a88895b
MV
1590 Reported by Bruce Korb:
1591
1592 * init.c (invoke_main_func): Don't call exit here. Throws that
1593 are only caught by scm_with_guile will bypass us and would cause
1594 scm_boot_guile to return erroneously.
1595 (scm_boot_guile): Expect scm_with_guile to return and call exit
1596 here, passing it an appropriate exit code.
1597
1598 From Andy Wingo:
d9c36d2a
MV
1599
1600 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1601 unsigned char cast to an int, or -1 for EOS.
1602
b54df254
MV
16032005-12-06 Marius Vollmer <mvo@zagadka.de>
1604
08f489c9
MV
1605 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1606 non-const.
9a5fa6e9 1607 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1608
b54df254
MV
1609 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1610 scm_enter_guile): Removed from public API. See comment at
1611 scm_without_guile for the rationale.
1612
1613 * scmsigs.c (read_without_guile): New.
1614 (signal_delivery_thread): Use it instead of
1615 scm_leave_guile/read/scm_enter_guile.
1616
9d9ce2b5
MV
1617 From Stephen Compall:
1618
1619 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1620 (CEVAL): Evaluate SRFI 61 cond clauses.
1621
9a5fa6e9 16222005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1623
1624 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1625 This was typically hit when running `gc-live-object-stats' right
1626 after starting Guile.
1627
efeac8ae
KR
16282005-11-30 Kevin Ryde <user42@zip.com.au>
1629
1630 * srfi-13.c (scm_string_append_shared): No copying if just one
1631 non-empty string in args.
1632
606183ba
KR
16332005-11-26 Kevin Ryde <user42@zip.com.au>
1634
1635 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1636 by Ludovic Courtès.
606183ba
KR
1637
1638 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1639 "register".
1640
1641 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1642 scm_malloc returning NULL, it never does that.
1643 * putenv.c (putenv): Likewise.
1644
1645 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1646 much too big to want to inline.
1647
9a5fa6e9 16482005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1649
1650 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1651 the value at its top. This fixes a reference leak.
1652 (PUSH_REF): Perform `pstate->top++' after calling
1653 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1654 effects.
1655
9a5fa6e9 16562005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1657
1658 * gc.c (scm_weak_vectors): Removed.
1659
f07d2b20
KR
16602005-11-12 Kevin Ryde <user42@zip.com.au>
1661
1662 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1663 by Ludovic Courtès.
f07d2b20 1664
bedd3f5f
MV
16652005-11-07 Marius Vollmer <mvo@zagadka.de>
1666
1667 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1668 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1669 section might exit non-locally.
1670
7c9c0169
NJ
16712005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1672
1673 * eval.c (sym_instead): New symbol.
1674 (ENTER_APPLY): Remove optional use of a continuation when making
1675 trap call.
1676 (scm_debug_opts): Change doc for 'cheap option to make clear that
1677 it is now obsolete.
1678 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1679 making trap calls, and implement substitution of eval expressions
1680 and return values using the values that the trap call handlers
1681 return.
1682
1683 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1684
9a5fa6e9 16852005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1686
1687 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1688 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1689 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1690 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1691 scm_c_make_socket_address): New functions.
1692 * socket.h: Add prototypes.
1693
fc9f596c
KR
16942005-10-24 Kevin Ryde <user42@zip.com.au>
1695
1696 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1697 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1698 POSIX spec examples, the latter are not available on for instance
1699 NetBSD.
1700
1701 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1702 posix.texi.
1703
1704 * stime.c (scm_strftime): Update docstring from posix.texi.
1705
0460c6e1
MV
17062005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1707
1708 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1709
1710 * null-threads.h, pthread-threads.h
1711 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1712 (scm_i_pthread_mutexattr_recursive): New.
1713
1714 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1715 (scm_i_critical_section_mutex): Do not initialize statically.
1716 (scm_threads_prehistory): Initialize
1717 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1718 here.
1719
1720 * eval.c (source_mutex): Do not initialiaze statically.
1721 (scm_init_eval): Do it here, using
1722 scm_i_pthread_mutexattr_recursive.
1723
7b4a9e52
MV
17242005-09-05 Marius Vollmer <mvo@zagadka.de>
1725
1726 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1727 New.
1728 (sym_reader): New.
1729 (scm_print_opts): Added "quote-keywordish-symbols" option.
1730 (quote_keywordish_symbol): New, for evaluating the option.
1731 (scm_print_symbol_name): Use it.
1732 (scm_init_print): Initialize new option to sym_reader.
1733
5defc05d
NJ
17342005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1735
1736 * eval.c (eval_letrec_inits): New.
1737 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1738
036482e9
MV
17392005-08-12 Marius Vollmer <mvo@zagadka.de>
1740
1741 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1742 Peter Gavin!
1743
5c347f8c
KR
17442005-08-12 Kevin Ryde <user42@zip.com.au>
1745
1746 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1747
bc721aa2
KR
17482005-08-06 Kevin Ryde <user42@zip.com.au>
1749
1750 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1751 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1752 scm_string_index, scm_string_index_right, scm_string_skip,
1753 scm_string_skip_right, scm_string_count, scm_string_map,
1754 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1755 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1756 procedures called in loops.
1757
126c81db
KR
17582005-08-02 Kevin Ryde <user42@zip.com.au>
1759
1760 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1761 avoid lots of copying where previoulsy growing by only 80 bytes at a
1762 time.
1763
7f278dc6
MV
17642005-08-01 Marius Vollmer <mvo@zagadka.de>
1765
1766 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1767 already have scm_lookup_closure_module, which does the same thing.
1768
cb5c4b07
MV
17692005-08-01 Marius Vollmer <mvo@zagadka.de>
1770
1771 New marking algorithm for weak hashtables that fixes the problem
1772 that references from the non-weak value to the associated weak
1773 key (for example) would prevent the entry from ever being dropped.
1774
1775 Guardians have been changed back to their original semantics and
1776 are no longer greedy and no longer drop cycles.
1777
1778 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1779 hashtable and guardian machinery but call the relevant functions
1780 directly.
1781
1782 * guardians.h, guardians.c, deprecated.h,
1783 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1784 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1785 Deprecated and moved into deprecated.[ch].
1786
1787 * guardians.h, guardians.c: Mostly rewritten.
1788 (scm_i_init_guardians_for_gc,
1789 scm_i_identify_inaccessible_guardeds,
1790 scm_i_mark_inaccessible_guardeds): New.
930888e8 1791 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1792
1793 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1794 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1795 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1796 (scm_weaks_prehistory): Removed.
1797 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1798 scm_i_mark_weak_vectors_non_weaks,
1799 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1800 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1801 scm_scan_weak_vectors): Removed.
1802
1803 * hashtab.h (scm_i_scan_weak_hashtables): New.
1804 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1805 SCM_WVECTF_NOSCAN.
1806 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1807 t->n_items.
1808 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1809 to latter. Do not scan the alists themselves, this is done by the
1810 weak vector code now. Just update the element count.
1811
1812 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1813 to latter. The type is now only part of the cell word.
1814 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1815
1816 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1817
3e2073bd
MD
18182005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1819
1820 Some changes towards making it possible to run Guile on the EM64T
1821 platform.
1822
1823 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1824 mallocating for (unsigned long *bounds).
1825
1826 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1827 scm_t_bits before storing them in the type word.
1828
1829 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1830 scm_t_bits to int.
1831
e8ac8e75
KR
18322005-07-12 Kevin Ryde <user42@zip.com.au>
1833
1834 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1835 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1836 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1837 than scm_makfrom0str.
1838 Reported by Ken Raeburn.
1839
1840 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1841 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1842 returning SCM_GC_CARD_BVEC.
1843
1844 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1845 rather than latin-1 acute accent, the latter may not print on all
1846 terminals.
1847
1848 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1849 trailing deletions, so as to return a substring if those are the only
1850 changes.
1851
adc0677d
KR
18522005-07-10 Kevin Ryde <user42@zip.com.au>
1853
1854 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1855 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1856 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1857 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1858
8fecbb19
HWN
18592005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1860
1861 * gc-card.c (scm_i_card_statistics): init tag.
1862
1863 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1864
fc9c5d06
HWN
18652005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1866
8fecbb19
HWN
1867 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1868 string.
fc9c5d06 1869
08fce816
KR
18702005-06-25 Kevin Ryde <user42@zip.com.au>
1871
1872 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1873 last change, use plain copy-on-write substrings, the individual
1874 descriptions in the srfi don't mention shared storage (only the
1875 introduction does).
1876
1877 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1878 null-terminator, rather than mallocing a whole new block.
1879 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1880
fc4abd0e
MV
18812005-06-12 Marius Vollmer <mvo@zagadka.de>
1882
e3da8a30
MV
1883 * ramap.c (scm_array_index_map_x): First test for real arrays,
1884 then check for generalized vectors. This ensures that the
1885 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1886 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1887 to access the target array, making these functions work with all
1888 kinds of arrays, not just bit arrays.
e3da8a30 1889
fc4abd0e
MV
1890 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1891 gh_list.c, gh_predicates.c: Deprecated everything.
1892
1893 * environments.c (environment_default_folder,
1894 environment_default_observer): Do not use gh_call3, gh_call1.
1895
e4da0740
HWN
18962005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1897
1898 * modules.c (s_scm_eval_closure_module): new function. Return the
1899 module inside an eval-closure.
1900
1901 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1902 table. This means that procedure properties are GC'd if the
1903 procedure dies.
1904
27667158
KR
19052005-06-11 Kevin Ryde <user42@zip.com.au>
1906
1907 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1908 charset cases, count chars kept and build a string in a second pass,
1909 rather than using a cons cell for every char kept. Use a shared
1910 substring when nothing removed (such sharing is allowed by the srfi).
1911
8a00ba71
HWN
19122005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1913
1914 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1915 string, so live object stats can be sorted with string<?.
1916
a677679f
MV
19172005-06-06 Marius Vollmer <mvo@zagadka.de>
1918
2ff668b0
MV
1919 * print.c (iprin1): When writing a string, collect all characters
1920 that can be printed directly into one call to scm_lfwrite.
1921 Previously, every character was output with its own call to
1922 write(2) on unbuffered ports.
1923
589f22f6
MV
1924 * eval.c (scm_eval_options_interface): Use
1925 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1926 and SCM_CRITICAL_SECTION_END.
1927
a677679f
MV
1928 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1929 check for generalized vectors. This ensures that the generalized
1930 vector case need only work with zero-origin ranges.
1931
f8cda9ee
KR
19322005-06-06 Kevin Ryde <user42@zip.com.au>
1933
1934 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1935 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1936 matched.
1937
cdac1be4
MV
19382005-06-05 Marius Vollmer <mvo@zagadka.de>
1939
6642f7ac
MV
1940 * eval.c: Added comment on how to make case 1.1 of
1941 r5rs_pitfall.test succeed.
1942
cdac1be4
MV
1943 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1944
1945 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1946
1947 * socket.c: Remove obsolete comment about socklen_t.
1948 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1949
1950 * numbers.h (isnan)[__MINGW32__]: Remove.
1951
1952 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1953 DEFAULT_INCLUDES when cross compiling.
1954
1955 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1956
a677679f 1957 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1958 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1959 from Jan's patch.)
1960
9e664475
MV
19612005-05-22 Marius Vollmer <mvo@zagadka.de>
1962
188d0c5e
MV
1963 * unif.c (scm_make_shared_array): Add old base to new base since
1964 scm_array_handle_pos does not include the base.
1965 (scm_aind): Likewise.
1966
9e664475
MV
1967 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1968 output port.
1969
5a6d139b
NJ
19702005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1971
1972 Mac OS X compile warning fixes, reported by Richard Todd.
1973
1974 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1975 that it is signed.
1976
1977 * strports.c (st_resize_port): Add unsigned char cast.
1978 (scm_mkstrport): Make read/write_buf cast unsigned.
1979
1980 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1981
1982 * rdelim.c (scm_read_line): Initialize slen.
1983
1984 * load.c (scm_search_path): Remove weird >=1, and add
1985 parentheses to clarify conditions.
1986
1987 * hash.c (scm_hasher): Add const unsigned char cast.
1988
1989 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1990
b01532af
NJ
19912005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1992
9a5fa6e9 1993 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1994
1995 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1996 code.
1997
1998 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1999 of code.
2000
2001 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
2002 of code.
2003 (scm_i_card_statistics): Add block for declarations of tag_as_scm
2004 and current.
2005
229a0710
NJ
20062005-05-10 Neil Jerram <neil@ossau.uklinux.net>
2007
2008 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
2009 compile warning reported by Werner Scheinast.
2010
645dd3fc
HWN
20112005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
2012
80038021
HWN
2013 * list.h: remove scm_list()
2014
645dd3fc
HWN
2015 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
2016 SCM_DEBUG_CELL_ACCESSES
2017 (FLUID_NEXT_LOC): idem.
2018
9a68a4a8
KR
20192005-04-30 Kevin Ryde <user42@zip.com.au>
2020
2021 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
2022 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
2023 zero when re==0 and im<0. Reported by Jean Crepeau.
2024
0640cdaa
KR
20252005-04-25 Kevin Ryde <user42@zip.com.au>
2026
2027 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
2028 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
2029 few sensible uses (like filling with a random number generator say),
2030 but has been allowed in the past and so should be kept.
0640cdaa 2031
c0b85e9c
KR
20322005-04-23 Kevin Ryde <user42@zip.com.au>
2033
2034 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
2035 scm_hash_fn_remove_x.
2036
2037 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
2038 the caller when cons* is reached through apply.
2039
2040 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
2041 list is called using apply, under the debugging evaluator.
2042 (scm_list): Remove.
2043
c51682b4
KR
2044 * list.c, list.h (scm_make_list): New code, moving make-list from
2045 boot-9.scm.
8cb2eff8 2046
c0575bde
KR
20472005-04-14 Kevin Ryde <user42@zip.com.au>
2048
2049 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
2050 converted from scheme code in boot-9.scm.
2051
47a298d9
KR
20522005-04-11 Kevin Ryde <user42@zip.com.au>
2053
2054 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
2055 Validate list argument, scm_string_append and scm_string_append_shared
2056 don't do that to their rest argument (in a normal build).
2057
8ea3dc2e
MV
20582005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2059
2060 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
2061 closure can not be stored since it is no longer valid at GC time.
2062 (make_hash_table): Initialize 'hash_fn' field.
2063 (scm_i_rehash): Only store hash_fn in hash table when closre is
2064 NULL.
2065 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
2066 non-NULL. Always use a NULL closure.
2067 (scm_hash_fn_create_handle_x): Also rehash when table contains too
2068 few entries.
2069
08d2020d
MV
20702005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2071
2072 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
2073 argument; always use scm_delq_x. The delete_fn function works on
2074 the handle, not the key, and it therefore makes no sense to make
2075 it configurable. Changed all callers.
2076 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
2077 (scm_hash_clear): Accept plain vectors as hashtables.
2078 (scm_delx_x): Removed.
2079
cb975c21
HWN
20802005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
2081
2082 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
2083 compatibility with gcc -std=c99.
2084
4c908f2c
MD
20852005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2086
2087 * async.h (scm_mask_ints): Removed left over reference to
2088 scm_root.
2089
2090 * threads.c: Removed fprintf debug statements.
2091
d193b04b
NJ
20922005-03-24 Neil Jerram <neil@ossau.uklinux.net>
2093
2094 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
2095
c29748cd
NJ
20962005-03-23 Neil Jerram <neil@ossau.uklinux.net>
2097
2098 * debug.c (scm_make_memoized): Remove unnecessary critical
2099 section, and simplify by using SCM_RETURN_NEWSMOB.
2100
e654b062
MD
21012005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2102
2103 * strings.h (SCM_STRING_UCHARS): Added missing argument.
2104
4bc6f1c6
KR
21052005-03-18 Kevin Ryde <user42@zip.com.au>
2106
2107 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 2108 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 2109
f1531813
KR
21102005-03-13 Kevin Ryde <user42@zip.com.au>
2111
2112 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
2113 srfi-60.
2114
2115 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
2116 because OR-ing bits into a negative can reduce the value to an inum.
2117
2118 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
2119 casting inum to double since that can lose precision.
2120
a9fae247
MV
21212005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2122
2123 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
2124 (guilify_self_1): Initialize it.
2125
2126 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
2127 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
2128 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
2129 field.
2130 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
2131 recursively.
2132 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
2133 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
2134 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
2135 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
2136 scm_after_gc_c_hook here.
2137 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
2138 scm_after_gc_c_hook when a full GC has in fact been performed.
2139 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
2140
2141 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
2142 scm_gc_heap_lock.
2143
2144 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
2145 scm_gc_running_p while the scm_i_sweep_mutex is locked.
2146
2147 * inline.h (scm_cell, scm_double_cell): Do not check
2148 scm_gc_running_p, allocation during sweeping is OK.
2149
2150 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
2151 not set scm_block_gc.
2152
2153 * init.c (scm_i_init_guile): Do not set scm_block_gc.
2154
2155 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
2156 instead of scm_malloc. The latter can not be used during GC.
2157
d1c38e11
MV
21582005-03-09 Marius Vollmer <mvo@zagadka.de>
2159
2160 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
2161 years.
2162
99ec43c1
MV
21632005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2164
2165 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
2166 scm_gc_running_p. Sweeping can happen in parallel with
2167 allocation.
2168
2169 * inline.h: Updated comments for current threading implementation.
2170
2171 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
2172 (scm_i_thread): Removed unused signal_asyncs field.
2173 (threads_mark): Do not mark it.
2174 (guilify_self_1): Do not initialize it. Do initialize
2175 continuation_root field.
2176 (do_thread_exit): Do not remove thread from all_threads list.
2177 (on_thread_exit): Do it here, after leaving guile mode.
2178 (sleep_level): Removed.
2179 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
2180 returning. Do not support recursive sleeps.
2181 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
2182 entry. Do not support recursive sleeps.
2183
2184 * fluids.c (ensure_state_size, ensure_all_state_sizes,
2185 resize_all_states): Collapsed ensure_state_size and
2186 ensure_all_state_sizes into one function named resize_all_states.
2187 Allocate new vectors outside of single threaded region. Do only
2188 simple things inside that region.
2189 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
2190 while adding to the global lists.
2191
2192
461f34aa
MV
21932005-03-08 Marius Vollmer <mvo@zagadka.de>
2194
2195 libltdl is no longer distributed. We expect it to be installed
2196 already.
2197
2198 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
2199 (libguile_la_LIBADD): Removed @LIBLTDL@.
2200
4e047c3e
MV
22012005-03-07 Marius Vollmer <mvo@zagadka.de>
2202
2203 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
2204 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
2205 they also block/unblock execution of asyncs and call
2206 scm_async_click which is declared in async.h but threads.h can not
2207 include async.h since async.h already includes threads.h.
2208 (scm_i_critical_section_level): New, for checking mistakes in the
2209 use of the SCM_CRITICAL_SECTION_* macros.
2210 (scm_i_critical_section_mutex): Make it a recursive mutex so that
2211 critical sections can be nested.
2212
2213 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
2214 not zero.
2215
2216 * threads.h, threads.c (scm_frame_lock_mutex): New.
2217 (scm_frame_critical_section): Take mutex as argument.
2218 (framed_critical_section_mutex): New, used as default for above.
2219 (scm_init_threads): Initialize it.
2220 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
2221 scm_i_critical_section_mutex; both are initialized statically.
2222
2223 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
2224 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
2225 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
2226 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
2227
2228 * debug.c (scm_debug_options): Replace
2229 SCM_CRITICAL_SECTION_START/END with a frame and
2230 scm_frame_critical_section.
2231
2232 * continuations.c (scm_make_continuation): No longer a critical
2233 section.
2234 (scm_dynthrow): Abort when scm_i_critical_section_level is
2235 not zero.
2236
d0a45bff
MV
22372005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2238
db6673e5
MV
2239 * threads.c (scm_try_mutex): Renamed argument for consistency.
2240
d0a45bff
MV
2241 * root.c (scm_call_with_dynamic_root): New docstring.
2242
2243 * eval.c: Define _GNU_SOURCE.
2244
9de87eea
MV
22452005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2246
2247 Big merge from the mvo-thread-cleanup branch. The main changes
2248 are:
2249
2250 - The dynamic roots functionality has been split into dynamic
2251 states and continuations barriers. Fluids have been
2252 reimplemented and can now be garbage collected.
2253
2254 - Initialization of Guile now works in a multi-thread friendly
2255 manner. Threads can freely enter and leave guile mode.
2256
2257 - Blocking on mutexes or condition variables or while selecting
2258 can now be reliably interrupted via system asyncs.
2259
2260 - The low-level threading interface has been removed.
2261
2262 - Signals are delivered via a pipe to a dedicated 'signal delivery
2263 thread'.
2264
2265 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
2266
2267 * throw.c (scm_handle_by_message): Exit only the current thread,
2268 not the whole process.
2269 (scm_handle_by_message_noexit): Exit when catching 'quit.
2270
2271 * scmsigs.c (take_signal, signal_delivery_thread,
2272 start_signal_delivery_thread, ensure_signal_delivery_thread,
2273 install_handler): Reimplemented signal delivery as explained in
2274 the comments.
2275
2276 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
2277 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
2278 scm_i_sched_yield, scm_i_pthread_sigmask,
2279 SCM_I_PTHREAD_MUTEX_INITIALIZER,
2280 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
2281 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
2282 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
2283 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
2284 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
2285 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
2286 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
2287 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
2288 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
2289 scm_i_pthread_key_create, scm_i_pthread_setspecific,
2290 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
2291 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
2292 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2293 when using pthreads.
2294 * null-threads.c, null-threads.h: Provide dummy definitions for
2295 the above symbols when not using pthreads.
2296
2297 * modules.h, modules.c (scm_frame_current_module): New.
2298
2299 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2300 instead of scm_internal_dynamic_wind.
2301
2302 * init.h, init.c (restart_stack, start_stack): Removed.
2303 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2304 (scm_boot_guile_1): Removed.
2305 (scm_i_init_mutex): New.
2306 (really_cleanup_for_exit, cleanup_for_exit): New.
2307 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2308 Moved around some init funcs. Call
2309 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2310 with atexit.
2311
2312 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2313 Use "!scm_is_eq" instead of "!=".
2314
2315 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2316 SCM_USE_COOP_THREADS): Removed.
2317
2318 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2319 maintained. Unlock scm_i_sweep_mutex before running
2320 scm_after_gc_c_hook.
2321 (scm_permanent_object): Allocate outside of critical section.
2322 (cleanup): Removed.
2323
2324 * fluids.h, fluids.c: Reimplemented completely.
2325 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2326 SCM_FAST_FLUID_SET): Reimplemented as functions.
2327 (scm_is_fluid): New.
2328 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2329 (scm_make_dynamic_state, scm_dynamic_state_p,
2330 scm_is_dynamic_state, scm_current_dynamic_state,
2331 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2332 scm_c_with_dynamic_state, scm_with_dynamic_state,
2333 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2334
2335 * feature.c (progargs_fluid): New.
2336 (scm_program_arguments, scm_set_program_arguments): Use it instead
2337 of scm_progargs.
2338 (scm_init_feature): Allocate it. Also, only add "threads" feature
2339 when SCM_USE_PTHREAD_THREADS is true.
2340
2341 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2342 scm_make_rec_mutex, with all the consequences.
2343 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2344 scm_internal_dynamic_wind. Handle dynamic states as second
2345 argument.
2346
2347 * threads.h, threads.c (scm_internal_select): Renamed to
2348 scm_std_select and discouraged old name.
2349 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2350 and scm_std_usleep.
2351 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2352 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2353 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2354 SCM_THREAD_DATA): Removed.
2355 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2356 (scm_i_thread): New.
2357 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2358 Use scm_assert_smob_type.
2359 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2360 scm_thread_self, scm_thread_yield, scm_mutex_init,
2361 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2362 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2363 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2364 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2365 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2366 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2367 scm_thread_select): Removed. Replaced with scm_i_pthread
2368 functions as appropriate.
2369 (scm_in_guile, scm_outside_guile): Removed.
2370 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2371 take a ticket.
2372 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2373 New.
2374 (scm_i_frame_single_threaded): New.
2375 (scm_init_threads_default_dynamic_state): New.
2376 (scm_i_create_thread): Removed.
2377 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2378 (scm_make_recursive_mutex): New.
2379 (scm_frame_critical_section): New.
2380 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2381 latter, changed all uses.
2382 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2383 scm_i_set_last_debug_frame): New, use them instead of scm_root
2384 stuff.
2385 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2386 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2387 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2388 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2389 (remqueue): Allow the removal of already removed cells. Indicate
2390 whether a real removal has happened.
2391 (scm_thread): Removed, replaced with scm_i_thread.
2392 (make_thread, init_thread_creatant): Removed.
2393 (cur_thread): Removed.
2394 (block_self, unblock_from_queue): New.
2395 (block, timed_block, unblock): Removed.
2396 (guilify_self_1, guilify_self_2, do_thread_exit,
2397 init_thread_key_once, init_thread_key,
2398 scm_i_init_thread_for_guile, get_thread_stack_base,
2399 scm_init_guile): New initialisation method.
2400 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2401 thread creation.
2402 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2403 "fair" to fat and implemented new semantics, including reliable
2404 interruption.
2405 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2406 (scm_threads_mark_stacks): Explicitly mark handle.
2407 (scm_std_select): Allow interruption by also selecting on the
2408 sleep_pipe.
2409 (scm_i_thread_put_to_sleep): Handle recursive requests for
2410 single-threadedness.
2411 (scm_threads_prehistory, scm_init_threads): Put current thread
2412 into guile mode via guileify_self_1 and guileify_self_2,
2413 respectively.
2414
2415 * fluid.h (SCM_FLUIDP): Deprecated.
2416
2417 * coop-threads.c: Removed.
2418
2419 * continuations.h, continuations.c (scm_with_continuation_barrier,
2420 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2421 New.
2422
2423 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2424 (async_mutex): New.
2425 (scm_async_click): Protected with async_mutex. Do not deal with
2426 signal_asyncs, which are gone. Set cdr of handled async cell to
2427 #f.
2428 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2429 current sleep.
2430 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2431 since that might not work during early initialization.
2432
2433 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2434 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2435 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2436 and SCM_CRITICAL_SECTION_END.
2437 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2438 SCM_CRITICAL_SECTION_START/END.
2439
2440 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2441 (libguile_la_SOURCES): Added null-threads.c
2442 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2443 threads-plugin.c.
2444 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2445
2446 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2447 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2448 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2449 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2450 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2451 scm_make_root): Removed or deprecated. Replaced with references
2452 to the current thread, dynamic state, continuation barrier, or
2453 some fluid, as appropriate.
2454 (root_mark, root_print): Removed.
2455 (scm_internal_cwdr): Reimplemented guts with
2456 scm_frame_current_dynamic_state and
2457 scm_i_with_continuation_barrier.
2458 (scm_dynamic_root): Return current continuation barrier.
2459
2460
ad3d5a65
MV
24612005-02-28 Marius Vollmer <mvo@zagadka.de>
2462
2463 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2464 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2465 cleanliness.
2466 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2467 IP_DROP_MEMBERSHIP.
2468 Thanks to Greg Troxel!
2469
73a90115
MD
24702005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2471
2472 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2473 block.
2474
5d2cb3ab
MV
24752005-02-25 Marius Vollmer <mvo@zagadka.de>
2476
2477 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2478 so that no two weak alist vectors share a spine.
2479 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2480 during GC before inserting the new alist cell.
2481
838c4126
MV
24822005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2483
2484 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2485 the hashtable.
2486 (scm_hash_fn_create_handle_x): Likewise.
2487 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2488
29fed193
MD
24892005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2490
2491 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2492 the prototypical examples mentioned in the old reference manual.
2493 Instead keep the old semantics of dispatching on type. (Yes, this
2494 is extremely ugly, but the whole point of keeping the deprecated
2495 interface is not to break old code.)
2496
9cc49060
MD
24972005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2498
2499 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2500 scm_i_array_dims.
2501
8447f463
KR
25022005-01-28 Kevin Ryde <user42@zip.com.au>
2503
2504 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2505 integer-expt and multiply/divide. Inexacts and fractions no longer
2506 supported (they happened to work before for left shifts, but not
2507 right). Don't really need inexacts and fractions, since ash is
2508 documented as a "bitwise operation", and all the rest of those only
2509 take exact integers.
2510
1367aa5e
HWN
25112005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2512
856fca7e
HWN
2513 * gc-card.c (scm_i_card_statistics): map structs, closures and
2514 subrs to one tag.
2515
1367aa5e 2516 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2517 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2518
2519 * gc-segment.c (scm_i_all_segments_statistics): new function.
2520 (scm_i_heap_segment_statistics): new function
2521
2522 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2523 statistics on the number of live objects of each type.
2524
2525 * gc-card.c (scm_i_tag_name): new function.
2526 (scm_i_card_statistics): new function.
2527
333db3b8
KR
25282005-01-24 Kevin Ryde <user42@zip.com.au>
2529
2530 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2531 POSIX and C99 don't document errno being set. Reported by Bruno
2532 Haible.
2533 (scm_flock): Update docstring from manual.
2534
8447f463
KR
2535 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2536 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2537 a 64-bit system.
2538
2539 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2540 sa_handler, needs to be a long on 64-bit systems where int is only 32
2541 bits.
2542
88f59e53
MV
25432005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2544
0eeb2611
MV
2545 * environments.c (obarray_enter, obarray_replace): Call
2546 SCM_HASHTABLE_INCREMENT when adding a new entry.
2547
88f59e53
MV
2548 * objects.c: Include goops.h for the scm_class_of prototype.
2549
2550 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2551 sizes to be smaller than the maximum lengths of vectors.
2552
219b2868
MV
25532005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2554
2555 * ports.c, smob.c: Include "libguile/goops.h".
2556
2557 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2558 scm_class_char, scm_class_pair, scm_class_procedure,
2559 scm_class_string, scm_class_symbol,
2560 scm_class_procedure_with_setter, scm_class_primitive_generic,
2561 scm_class_vector, scm_class_null, scm_class_real,
2562 scm_class_complex, scm_class_integer, scm_class_fraction,
2563 scm_class_unknown, scm_port_class, scm_smob_class,
2564 scm_no_applicable_method, scm_class_of): Moved from objects to
2565 goops since they are only useable once goops has been loaded.
2566 (scm_classes_initialized): Removed.
2567 (scm_class_of): Do not check it.
2568 (create_standard_classes): Do not set it.
2569
009c6b9c
MV
25702005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2571
50472546
MV
2572 * objects.h, objects.c (scm_classes_initialized): New.
2573 (scm_class_of): Signal error when scm_classes_initialized is zero.
2574 * goops.c (create_standard_classes): Set scm_classes_initialized
2575 to one.
2576
009c6b9c
MV
2577 * random.c (scm_random_solid_sphere_x): Use
2578 scm_c_generalized_vector_length instead of
2579 scm_uniform_vector_length.
2580
7719cbe9
MV
25812005-01-16 Marius Vollmer <mvo@zagadka.de>
2582
2583 * script.c (scm_compile_shell_switches): Removed debugging output.
2584
1ec44fed
KR
25852005-01-15 Kevin Ryde <user42@zip.com.au>
2586
2587 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2588 docstrings from manual.
2589 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2590
6e4cd850
MV
25912005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2592
0b5a0521
MV
2593 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2594 its value.
2595
2596 Implement u64 and s64 uniform numeric vectors with bignums when
2597 scm_t_uint64 and scm_t_int64 are not available.
2598
2599 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2600 scm_array_handle_u64_elements,
2601 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2602 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2603 is not available.
2604 (scm_take_s64vector, scm_array_handle_s64_elements,
2605 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2606 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2607 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2608 scm_t_int64/scm_t_uint64 are not available.
2609 (uvec_mark): New, to mark the bignums.
2610 (alloc_uvec): Initialize bignums.
2611 (uvec_fast_ref): Return bignums directly.
2612 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2613 assert_exact_integer): New.
2614 (uvec_fast_set): Use them to validate the bignums.
2615 (scm_init_srfi_4): Set mark function of smob when needed.
2616 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2617 scm_int64_max.
2618
6e4cd850
MV
2619 Recognize 1.4 -e syntax.
2620
2621 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2622 (scm_compile_shell_switches): Use them to recognize and convert
2623 1.4 "-e" syntax.
2624
3b698afe
MV
26252005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2626
2627 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2628 deprecated features that once were macros but are now functions
2629 back into macros.
2630
d6dc83a9
MV
26312005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2632
49086691
MV
2633 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2634 * deprecation.c (scm_issue_deprecation_warning,
2635 scm_c_issue_deprecation_warning_fmt): Use it.
2636 (mode): Removed.
2637 (print_summary): New.
2638 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2639 mode.
2640
d6dc83a9
MV
2641 Deprecated SCM_ARRAY* macros.
2642
2643 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2644 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2645 version. Changed all uses.
2646 (scm_tc16_array, scm_i_tc16_array,
2647 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2648 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2649 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2650 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2651 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2652 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2653 SCM_ARRAY_V, SCM_I_ARRAY_V,
2654 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2655 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2656 scm_t_array, scm_i_t_array): Likewise.
2657 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2658 Moved from unif.h to unif.c.
2659 (scm_c_array_rank): New.
2660 (scm_array_rank): Reimplement using it.
2661
2662 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2663 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2664 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2665
dc91d8de
MV
26662005-01-11 Marius Vollmer <mvo@zagadka.de>
2667
2668 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2669 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2670 scm_c_generalized_vector_ref and scm_cvref, and
2671 scm_c_generalized_vector_set_x, respectively.
2672 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2673 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2674
2675 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2676 former to latter and made public. Changed all uses.
2677 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2678 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2679 (scm_i_shap2ra): New internal version of scm_shap2ra.
2680 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2681 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2682 (scm_ra_set_contp): Deprecated, changed all uses to
2683 scm_i_ra_set_contp.
2684 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2685
66d33784
MV
26862005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2687
b06f099d
MV
2688 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2689 Trotts!
2690
5d35ad81
MV
2691 * unif.c (scm_list_to_typed_array): Allow the specification of the
2692 upper bound as well. This is needed for empty arrays.
2693 (l2ra): Give needed number of elements in error message.
2694 (scm_i_print_array): Print length information for arrays that need
2695 it.
2696 (scm_i_read_array): Parse it.
2697
66d33784
MV
2698 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2699 scm_i_object_chars, scm_i_object_length): Brought back from the
2700 dead.
2701
d7d7d401
MV
27022005-01-10 Marius Vollmer <mvo@zagadka.de>
2703
74c58fce
MV
2704 * ramap.c: Replaced single-index uses of scm_array_set_x with
2705 scm_c_generalized_vector_set_x.
2706
d7d7d401
MV
2707 * unif.c (scm_array_rank, scm_array_dimensions,
2708 scm_shared_array_offset, scm_shared_array_increments,
2709 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2710 to simplify code and make it more general.
2711 (scm_shared_array_root): Work with all kinds of arrays, including
2712 naked vectors.
2713 (indices_to_pos): New.
74c58fce
MV
2714 (scm_make_shared_array): Use it instead of scm_aind; use handle
2715 for oldra.
2716
4475d3fe
KR
27172005-01-10 Kevin Ryde <user42@zip.com.au>
2718
2719 * posix.c (scm_mkstemp): Update docstring from manual.
2720
d3ddc95e
KR
2721 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2722
8c8491f5
MV
27232005-01-09 Marius Vollmer <mvo@zagadka.de>
2724
b89ecc6f
MV
2725 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2726 scm_i_uniform_vector_set_proc): New.
2727 (u8ref, u8set, s8ref, s8set, etc): New.
2728 (uvec_reffers, uvec_setters): New.
2729 (uvec_to_list): Use generic scm_array_handle_ref instead of
2730 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2731 (coerce_to_uvec, scm_c_uniform_vector_ref,
2732 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2733
2734 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2735 New.
2736 (scm_t_array_handle): Added ref, set, elements and
2737 writable_elements for fast inline operation of
2738 scm_array_handle_ref and scm_array_handle_set.
2739 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2740 and replaced with inline code that simply calls the ref/set
2741 members of the handle.
2742 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2743 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2744 New.
2745 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2746 and memoize_set.
2747 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2748 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2749 scm_bit_invert_x): Correctly multiply index with increment in the
2750 general case.
2751
8c8491f5
MV
2752 * unif.c (scm_array_handle_set): Correctly execute only one
2753 alternative. D'Oh!
2754 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2755 the array; this covers all cases with much simpler code.
2756
2757 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2758 as well.
2759
cd5d55c7
MV
27602005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2761
2762 * srfi-4.c (uvec_type): New.
2763 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2764 scm_c_uniform_vector_x): Use it to get concrete type.
2765
2766 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2767 fit the docs.
2768
2769 * unif.c (ra2l): Handle zero rank arrays.
2770 (scm_i_print_array): Print zero rank arrays specially.
2771 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2772 (scm_i_read_array): Allow zero rank arrays.
2773
a4aad74e
MV
27742005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2775
2776 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2777 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2778 and SCM_SET_HASHTAB_BUCKET.
2779
2780 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2781 Removed ref_stack field.
2782 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2783 of a print state. Use them everywhere instead of ref_stack.
2784
3a40d5e1
MV
2785 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2786
a4aad74e
MV
2787 * srfi-4.c: Include deprecation.h.
2788
2789 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2790 deprecated.c, eq.c
2791 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2792 (scm_vector_elements, scm_vector_writable_elements,
2793 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2794 unif.[hc].
2795 (SCM_SIMPLE_VECTOR_LOC): Removed.
2796 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2797 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2798 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2799 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2800 latter. Changed use in eq.c.
2801
f01fe441
MV
28022005-01-07 Marius Vollmer <mvo@zagadka.de>
2803
2804 Make the uniform vector routines also deal with one dimensional
2805 arrays.
2806
2807 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2808 SCM_SMOB_PREDICATE in this file.
2809 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2810 of the right type.
2811 (scm_is_uniform_vector): Likewise.
2812 (uvec_fast_ref): Made BASE param const.
2813 (uvec_writable_elements, uvec_elements): New.
2814 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2815 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2816 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2817 arrays.
2818 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2819 argument convention.
2820 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2821 checking.
2822 (scm_uniform_vector_length): Use uvec_length.
2823
2aaf5726
MV
28242005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2825
2826 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2827 scm_c_uniform_vector_size): Removed.
2828 (scm_array_handle_uniform_element_size): New.
2829
2830
2831 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2832 type of POS parameter to be signed, positions can be negative.
2833 (scm_array_handle_release): New, changed all uses of
2834 scm_t_array_handle to properly call it.
2835 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2836 Renamed former to latter, changed all uses.
2837
34ae52fc
MV
28382005-01-05 Marius Vollmer <mvo@zagadka.de>
2839
2840 Updated bitvector routines to also use scm_t_array_handles.
2841
2842 * unif.h (scm_bitvector_elements,
2843 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2844 deliver offset, length and increment to caller. Changed all uses.
2845 (scm_bitvector_release_elements,
2846 scm_frame_bitvector_release_elements,
2847 scm_bitvector_release_writable_elements,
2848 scm_frame_bitvector_release_writable_elements): Removed.
2849 (scm_array_handle_bit_elements,
2850 scm_array_handle_bit_writable_elements,
2851 scm_array_handle_bit_elements_offset): New.
2852 (scm_make_typed_array): The special value for non-initialized
2853 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2854 was a valid value to fill bitvectors with, so it can't really be
2855 specialed out.
2856
c4cb7628
KR
28572005-01-04 Kevin Ryde <user42@zip.com.au>
2858
2859 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2860 Reported by Bill Schottstaedt.
2861
0356881d
MV
28622005-01-02 Marius Vollmer <mvo@zagadka.de>
2863
2864 * sort.c (quicksort): Added INC parameter for non-contigous
2865 vectors.
2866 (quicksort1): New, for contigous vectors. Both functions are
2867 generated from the same code by including "quicksort.i.c".
2868 (scm_restricted_vector_sort_x): Call one of quicksort and
2869 quicksort1, depending on increment of vector.
2870 (scm_sort): Simply call scm_sort_x on a copy of the list or
2871 vector.
2872 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2873 size_t, added inc parameter.
2874 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2875 so that it doesn't leak.
2876 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2877 list or vector.
2878
2879 * ramap.c (scm_array_map_x): Do not try to convert fill value
2880 before filling, any necessary conversion is done while storing.
2881
2882 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2883 doing it inline.
2884
2885 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2886 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2887 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2888
2889 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2890 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2891 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2892 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2893 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2894 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2895 vector elements API or simple vector API, as appropriate. Removed
2896 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2897 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2898
2899 * srfi-4.h, srfi-4.c,
2900 srfi-4.i.c (scm_array_handle_uniform_elements,
2901 scm_array_handle_uniform_writable_elements,
2902 scm_uniform_vector_elements,
2903 scm_uniform_vector_writable_elements):
2904 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2905 scm_t_array_handle, deliver length and increment.
2906 (scm_array_handle_<foo>_elements,
2907 scm_array_handle_<foo>_writable_elements): New.
2908
2909 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2910 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2911
2912 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2913 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2914 scm_array_handle_set, scm_array_handle_elements
2915 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2916 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2917 scm_dimensions_to_uniform_array): Deprecated for real.
2918 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2919 snarfing wont allow a mismatch between C and Scheme arglists.
2920 (scm_make_shared_array, scm_enclose_array): Correctly use
2921 scm_c_generalized_vector_length instead of
2922 scm_uniform_vector_length.
2923
2924 * validate.h (SCM_VALIDATE_VECTOR,
2925 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2926 of SCM_VECTORP.
2927
2928 * weaks.h, weaks.c: Use new internal weak vector API from
2929 vectors.h.
2930
2931 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2932 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2933 'extra' to being regular sources.
2934 (noinst_HEADERS): Added quicksort.i.c.
2935 * quicksort.i.c: New file.
2936
2937 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2938 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2939 and reimplemented. Replaced all uses with scm_vector_elements,
2940 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2941 appropriate.
2942 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2943 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2944 SCM_SIMPLE_VECTOR_LOC): New.
2945 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2946 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2947 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2948 Removed.
2949 (scm_vector_copy): New.
2950 (scm_vector_elements, scm_vector_writable_elements): Use
2951 scm_t_array_handle, deliver length and increment. Moved to
2952 unif.h. Changed all uses.
2953 (scm_vector_release_elements,
2954 scm_vector_release_writable_elements,
2955 (scm_frame_vector_release_elements,
2956 scm_frame_vector_release_writable_elements): Removed.
2957 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2958 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2959 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2960 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2961 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2962 weak vectors.
2963
0336d18b
MV
29642004-12-29 Marius Vollmer <mvo@zagadka.de>
2965
2966 No longer use creators to specify the type of an array. Creators
2967 expose the fact that arrays are wrapped around vectors, but that
2968 might change.
2969
2970 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2971 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2972 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2973 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2974 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2975 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2976 uvec_proc_vars): Removed.
2977 (scm_i_generalized_vector_creator): Removed.
2978 (scm_i_generalized_vector_type): New.
2979
2980 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2981 scm_make_typed_array, scm_array_type, scm_list_to_array,
2982 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2983 (scm_array_creator): Removed.
2984 (scm_array_p): Deprecated second PROT argument.
2985 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2986 Deprecated, reimplemented in terms of scm_make_typed_array and
2987 scm_list_to_typed_array.
2988 (scm_i_proc_make_vector, scm_i_proc_make_string,
2989 scm_i_proc_make_bitvector): Removed.
2990 (type_creator_table, init_type_creator_table, type_to_creator,
2991 make_typed_vector): New.
2992 (scm_i_convert_old_prototype): Removed.
2993 (prototype_to_type): New.
2994 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2995 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2996 minor added clarity.
2997 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2998 instead of scm_make_uve.
2999 (tag_creator_table, scm_i_tag_to_creator): Removed.
3000 (tag_to_type): New.
3001 (scm_i_read_array): Use scm_list_to_typed_array instead of
3002 scm_list_to_uniform_array.
3003
277e8472
MV
30042004-12-27 Marius Vollmer <mvo@zagadka.de>
3005
32b26202
MV
3006 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
3007 (scm_bitvector_writable_elements): New.
3008 (scm_bitvector_release, scm_bitvector_release_elements):
3009 Renamed former to latter. Added explicit call to
3010 scm_remember_upto_here_1.
3011 (scm_frame_bitvector_release,
3012 scm_frame_bitvector_release_elements): Renamed former to latter.
3013 (scm_bitvector_release_writable_elements,
3014 scm_bitvector_release_writable_elements): New.
3015 Changed all uses as required by the changes above.
3016
3017 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
3018 scm_u8vector_elements, etc): Made return value "const".
3019 (scm_uniform_vector_writable_elements,
3020 scm_u8vector_writable_elements, etc): New.
3021 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
3022 Renamed former to latter. Added explicit call to
3023 scm_remember_upto_here_1.
3024 (scm_frame_uniform_vector_release,
3025 scm_frame_uniform_vector_release_elements): Renamed former to latter.
3026 (scm_uniform_vector_release_writable_elements,
3027 scm_frame_uniform_vector_release_writable_elements): New. Takes
3028 crown of longest identifier yet.
3029 Changed all uses as required by the changes above.
3030
277e8472
MV
3031 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
3032 void.
3033 (scm_is_vector, scm_vector_p, scm_vector_length,
3034 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
3035 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
3036 scm_vector_move_left_x, scm_vector_move_right_x,
3037 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
3038 (scm_vector_elements, scm_vector_release_elements,
3039 scm_vector_frame_release_elements, scm_vector_writable_elements,
3040 scm_vector_release_writable_elements,
3041 scm_vector_frame_release_writable_elements): New.
3042 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
3043 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
3044
3045 * ramap.c (scm_ramapc, scm_raeql): Use
3046 scm_c_generalized_vector_length instead of
3047 scm_uniform_vector_length.
3048 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
3049 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
3050
49c51610
MV
30512004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3052
3053 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
3054 member for relocating debug frames.
3055 (scm_make_continuation): Set it.
3056
3057 * stacks.c (read_frame, read_frames, scm_make_stack,
3058 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
3059 of continuations instead of calculating the offset ourselves.
3060 Relocate 'vect' member of scm_t_debug_frame.
3061
3b2ee265
KR
30622004-12-16 Kevin Ryde <user42@zip.com.au>
3063
3064 * ramap.c (scm_array_map_x): Check for at least one source argument.
3065
e120686a
KR
30662004-12-14 Kevin Ryde <user42@zip.com.au>
3067
3068 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
3069 the C code so for the final call to the predicate procedure is a tail
3070 call, per SRFI-13 spec.
3071
680b5237
KR
30722004-12-10 Kevin Ryde <user42@zip.com.au>
3073
3074 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
3075 recent revision to the reference manual.
3076
3077 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
3078 with "%", C99 says it's well-defined.
3079
3080 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
3081 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
3082 bother trying to fit scm_from_ulong, not really worth the trouble if
3083 addresses are more than 4 bytes usually.
3084
446d320c
KR
30852004-11-30 Kevin Ryde <user42@zip.com.au>
3086
3087 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
3088 arm32. Reported by Greg Troxel.
3089
f2654760
MV
30902004-11-14 mvo <mvo@zagadka.de>
3091
3092 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
3093
3094 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
3095
d550e35f
MV
30962004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3097
3098 Enclosed arrays are now their own smob. This has been done to
3099 make the code more explicit about them and to prepare for the time
f2654760
MV
3100 when generalized vectors include arbitrary one-dimensional
3101 arrays. (Uptonow, enclosed arrays have been recognized by their
3102 use of an array as their storage 'vector'. When all generalized
3103 vectors are allowed as storage, including one-dimensional arrays,
3104 this will no longer work.)
d550e35f
MV
3105
3106 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
3107 New.
3108 (exactly_one_third, singp): Removed.
3109 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
3110 scm_shared_array_offset, scm_shared_array_increments): Handle
3111 enclosed arrays explicitely.
3112 (scm_array_rank): Likewise. Also, do not return zero for
3113 non-arrays, signal an error instead since arrays with rank zero do
3114 exist.
3115 (scm_i_make_ra): New, for specifying the tag of the new array.
3116 (scm_make_enclosed_array): Use it.
3117 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
3118 (scm_make_shared_array): Use scm_c_generalized_vector_length
3119 instead of scm_uniform_vector_length.
3120 (scm_array_in_bounds_p): Rewritten to be much cleaner.
3121 (scm_i_cvref): New, doing the job of scm_cvref.
3122 (scm_cvref): Use scm_i_cvref.
3123 (scm_array_ref): Do not accept non-arrays when no indices are
3124 given. Use scm_i_cvref to do the actual access.
3125 ("uniform-array-set1"): Do not register.
3126 (scm_array_set_x, scm_uniform_array_read_x,
3127 scm_uniform_array_write): Handle enclosed arrays explicitly.
3128 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
3129 handle enclosed arrays.
3130 (scm_array_to_list): Handle enclosed arrays explicitly.
3131 (rapr1): Removed.
3132 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
3133 enclosed arrays.
3134 (scm_i_print_enclosed_array): New.
3135 (tag_proto_table, tag_creator_table): Renamed former to latter.
3136 Added "a" and "b" for strings and bitvectors, resp.
3137 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
3138 latter. Tag "a" is in the table now, no need to handle it as a
3139 legacy tag.
3140 (scm_raprin1): Just call scm_iprin1.
3141 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
3142 explicitly.
3143 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
3144 Use scm_i_print_array as printer for scm_tc16_array.
3145
2ed34885
MV
31462004-11-10 Marius Vollmer <mvo@zagadka.de>
3147
823086c1
MV
3148 * ramap.c (cind): Changed second arg to be pointer to long instead
3149 of uniform vector.
3150 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 3151 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
3152 (scm_array_index_map_x): Likewise.
3153
3154 * unif.c: Changed all uses of scm_array_prototype to
3155 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
3156 prototype is known.
3157 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
3158 in terms of scm_uniform_vector_read_x and
3159 scm_uniform_vector_write, respectively. Strings and
3160 bitvector support has been dropped.
3161
2ed34885
MV
3162 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
3163 needed files directly. Include config.h, <unistd.h> and <io.h>
3164 when available.
3165 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
3166
2c72f253
MV
31672004-11-09 Marius Vollmer <mvo@zagadka.de>
3168
3169 * gh_data.c (gh_uniform_vector_length): Properly use
3170 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
3171
3cc0a296
MV
31722004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3173
3174 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
3175 New.
3176 (scm_i_uniform_vector_creator): Removed.
3177 (scm_i_generalized_vector_creator): New.
3178 (scm_uniform_vector_length, scm_uniform_element_size): Do not
3179 handle generalized vectors, only uniform numeric vectors.
3180 (alloc_uvec): Do length check here...
3181 (make_uvec): ...but not here.
3182 (coerce_to_uvec): Use new generalized vector functions to handle
3183 all kinds of vectors in one go.
3184
3185 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
3186 remaining scm_tc7_unused tags to get a neatly ordered list.
3187
3188 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
3189 longer handle scm_tc7_bvect bitvectors.
3190
3191 * ramap.c: Use the new generalized vector functions to handle all
3192 vector like things.
3193
3194 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
3195 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
3196 scm_generalized_vector_length, scm_generalized_vector_ref,
3197 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
3198 scm_is_generalized_vector, scm_c_generalized_vector_length,
3199 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
3200 New.
3201
3202 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
3203 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
3204 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
3205 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
3206 scm_c_bitvector_length, scm_c_bitvector_ref,
3207 scm_c_bitvector_set_x, scm_bitvector_elements,
3208 scm_bitvector_release, scm_frame_bitvector_release,
3209 scm_tc16_bitvector, bitvector_free, bitvector_print,
3210 bitvector_equalp, count_ones, find_first_one): New.
3211 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
3212 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
3213 using the new C API for bitvectors and maybe count_ones or
3214 find_first_one, as appropriate.
3215 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
3216 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
3217 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
3218 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
3219 new functions from above.
3220 (scm_i_proc_make_vector, scm_i_proc_make_string,
3221 scm_i_proc_make_bitvector): Made non-static for use in
3222 scm_i_generalized_vector_creator.
3223 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
3224 (scm_make_uve): Validate that the created object is a generalized
3225 vector.
3226 (scm_i_legacy_tag): Removed.
3227 (scm_i_print_array): Do it here.
3228 (scm_raprin1): Only print enclosed arrays.
3229
3230 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
3231
c24d026b
MV
32322004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3233
1f2328fe
MV
3234 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
3235 added portability.
3236
3237 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
3238 for "space". Thanks to Bruce Korb!
3239
c24d026b
MV
3240 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
3241 only after dest has been set. Thanks to Hyper Division!
3242
3243 * gh_data.c (gh_uniform_vector_length): Use
3244 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
3245
d4ea47c8
MV
32462004-11-03 Marius Vollmer <mvo@zagadka.de>
3247
3248 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
3249 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
3250 SCM_SET_UVECTOR_LENGTH): Removed.
3251
236288e2
MV
32522004-11-02 Marius Vollmer <mvo@zagadka.de>
3253
9a5fa6e9 3254 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
3255 Thanks!
3256
3257 * backtrace.c (scm_display_backtrace_with_highlights): Join the
3258 first and the second line of the SCM_DEFINE macro call, since old
3259 preprocessors cannot handle definitions that are split into two
3260 lines.
3261
3262 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
3263 declarations.
3264
3265 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
3266 scm_t_uint32 to fix the mismatch between the function declaration
3267 and definition.
3268
3269 * sort.c (quicksort): Don't use C99 variable declarations.
3270
3271 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
3272 SCM_BOOL_F if no type matches.
3273
3274 * threads.c (thread_print): Cast a pointer to size_t when printing
3275 with scm_uintprint.
3276
3277 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
3278 defined.
3279 (scm_array_prototype): Deprecated.
3280
f738b51d
MV
32812004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3282
5d1015ec
MV
3283 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
3284 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
3285 more efficient access to the u32vector.
3286
034486df
MV
3287 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
3288 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
3289 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
3290
3291 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
3292 instead of the old-style dvectors.
3293
3294 * gh_data.c: Use new-style uniform arrays in place of old-style
3295 ones.
3296
3297 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3298 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3299
3300 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3301 instead of old-sytle uvectors.
3302
3303 * convert.c, convert.i.c: Rewritten completely, using
3304 scm_any_to_u8vector, etc and other new-style uniform vector
3305 functions.
3306
3307 * random.c (scm_random_solid_sphere_x,
3308 scm_random_hollow_sphere_x): Do not validate vector argument, this
3309 is already done elsewhere.
3310
3311 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3312 scm_any_to_u8vector, etc): New.
3313 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3314 longer handle old-style uniform vectors.
3315
f738b51d
MV
3316 * read.c (scm_lreadr): Bugfix: include the last bit in the
3317 bit vector.
3318
5e9c05a1
MV
33192004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3320
327114a2
MV
3321 * unif.h, unif.c (scm_array_creator): New.
3322 (scm_i_get_old_prototype): New.
3323 (scm_array_prototype): use it to return old-style prototype, never
3324 return creators.
3325 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3326 arg of SCM_UNDEFINED. The latter is wrong.
3327
5e9c05a1
MV
3328 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3329 (make_uve): Removed.
3330 (scm_i_proc_make_vector, scm_i_proc_make_string,
3331 scm_i_proc_make_u1vector): New.
3332 (scm_init_unif): Initialize them.
3333 (scm_i_convert_old_prototype): New.
3334 (scm_make_uve): Use it to get the creator procedure. Removed all
3335 old code that created old-style uniform vectors.
3336 (scm_array_p): Handle generic vectors.
3337 (scm_dimensions_to_uniform_array): Do not fill new array with
3338 prototype when that is a procedure.
3339 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3340 the NDIM argument.
3341 (scm_i_print_array): Print rank for shared or non-zero-origin
3342 vectors.
3343 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3344 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3345 which I do not understand yet.
3346 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3347
5e9c05a1
MV
3348 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3349 (iflo2str): Use icmplx2str for complex numbers.
3350
3351 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3352 scm_i_uniform_vector_prototype): Removed.
3353 (scm_i_uniform_vector_creator): New.
3354 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3355 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3356 Updated all tables and generic functions to support them.
3357 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3358 (scm_init_srfi_4): Initialize them.
3359
3360 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3361 sizeof(CTYPE) as explained in the comment.
3362
3363 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3364 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3365 'i' and 'e' between introducing numbers and uniform vectors. Do
3366 not call scm_i_read_homogenous_vector, since that is also handled
3367 by scm_i_read_array now.
3368
f984af07
MV
33692004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3370
3371 First cut at integrating uniform vectors from srfi-4 with the rest
3372 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3373 vector. The plan is to gradually replace one type after the other
3374 until none is left and then to consider general cleanups and
3375 optimizations.
3376
3377 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3378
3379 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3380 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3381 scm_uniform_vector_to_list, scm_is_uniform_vector,
3382 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3383 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3384 scm_uniform_vector_release): New.
3385 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3386 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3387 from unif.h, unif.c and extended to handle both the old and new
3388 uniform vectors.
3389
3390 * tags.h (scm_tc7_byvect): Commented out.
3391
3392 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3393 the former to the latter.
3394 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3395 srfi-4.h, srfi-4.c.
3396 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3397 (scm_array_p, scm_array_rank, scm_array_dimensions,
3398 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3399 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3400 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3401 vectors. Removed code for scm_tc7_byvect.
3402 (scm_dimensions_to_uniform_array): Fill array with 0 when
3403 prototype is #\nul.
3404 (scm_i_print_array_dimension, scm_i_legacy_tag,
3405 scm_i_print_array): New.
3406 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3407 for scm_tc7_byvect.
3408
3409 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3410 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3411 uniform vectors. Removed code for scm_tc7_byvect
3412
3413 * print.c (iprin1): Removed code for scm_tc7_byvect.
3414 * objects.c (scm_class_of): Likewise.
3415 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3416 * gc-card.c (scm_i_sweep_card): Likewise.
3417 * evalext.c (scm_self_evaluating_p): Likewise.
3418 * eq.c (scm_equal_p): Likewise.
3419
3420 * gh_data.c (gh_chars2byvect): Reimplemented with
3421 scm_make_s8vector.
3422 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3423
3424 * srfi-4.c (take_uvec): New.
3425 (alloc_uvec): Use it.
3426 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3427
3428 * random.c (vector_scale, vector_scale_x): Renamed former to the
3429 latter, since it modifies its argument.
3430 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3431 Do not use scm_universal_vector_length for non-uniform vectors.
3432 Use scm_f64vector_elements to access innards of uniform vectors.
3433
3434 * convert.i.c: Convert srfi-4 style uniform vectors when
3435 requested.
3436 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3437 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3438
79d52182
MV
34392004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3440
3441 * numbers.h, numbers.c (scm_i_print_double): New.
3442
3443 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3444 ../srfi/ but heavily modified.
3445 * Makefile.am: Add them in all the right places.
3446 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3447 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3448 '#u', and '#s'.
3449
3450 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3451 and made non-static. Changed all uses.
3452
6191ccec
MV
34532004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3454
e64e80b0
MV
3455 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3456 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3457 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3458 scm_uintprint to print unsigned integers, raw heap words, and
3459 adresses, using a cast to scm_t_bits to turn pointers into
3460 integers.
3461
3462 * unif.c: Include "libguile/print.h".
3463
c90ac3a8
MV
3464 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3465 scm_t_intmax values.
3466 (scm_uint2str): New, for scm_t_uintmax.
3467 (scm_iint2str): Argument type changed to scm_t_intmax,
3468 reimplemented in terms of scm_uint2str.
3469
3470 * print.c, print.h (scm_uintprint): New, for printing
3471 scm_t_uintmax values.
3472 (scm_intprint): Argument type changed to scm_t_intmax.
3473
77c2594f
MV
3474 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3475 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3476 strategic places so that the loops can be interrupted.
3477
6191ccec
MV
3478 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3479 "-I$(top_srcdir)/libguile-ltdl".
3480 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3481 "../libguile-ltdl/libguile-ltdl.a".
3482
3483 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3484 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3485 instead of <libguile-ltdl.h>.
3486
77600f3e
MV
34872004-10-20 Marius Vollmer <mvo@zagadka.de>
3488
3489 * sort.c (quicksort): Copy pivot out of the array while
3490 constructing the partitions; it could get overwritten otherwise.
3491 Because of the ultimate insertion sort, this bug did not cause
3492 quicksort to fail, it just put all the burdon on the insertion
3493 sort and was thus very slow. Thanks to Rolan Orre for reporting
3494 the slowness!
3495
5000379b
MV
34962004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3497
192cd792
MV
3498 * numbers.c (scm_i_range_error): New.
3499 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3500 scm_out_of_range.
3501
3502 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3503 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3504
3505 * unif.c (scm_array_p): When no prototype is given, explicitely
3506 test for allowable types, do not simply return true. Thanks to
3507 Roland Orre for reporting this!
3508
5000379b
MV
3509 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3510
3511 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3512 segment to scm_max_segment_size.
3513
497eb0b7
HWN
35142004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3515
1367aa5e
HWN
3516 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3517
497eb0b7
HWN
3518 * inline.h (scm_double_cell): abort if GC running.
3519 (scm_cell): idem.
3520
aef0bdb4
MV
35212004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3522
3523 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3524 pos == 0.
3525
3526 Keywords no longer store a 'dash symbol'. Instead, they store a
3527 symbol with their real name.
3528
3529 * keywords.h, keywords.c, deprecated.h, deprecated.c
3530 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3531 terms of scm_is_keyword and scm_keyword_dash_symbol.
3532
3533 * keywords.h, keywords.c, discouraged.h, discouraged.c
3534 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3535 scm_c_make_keyword): Discouraged.
3536
3537 * keywords.h, keywords.c (scm_symbol_to_keyword,
3538 scm_keyword_to_symbol): Implemented in C.
3539 (scm_is_keyword, scm_from_locale_keyword,
3540 scm_from_locale_keywordn): New.
3541
3542 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3543
3544 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3545 scm_from_locale_keyword instead of scm_c_make_keyword.
3546
3547 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3548 better error message.
3549
3550 * deprecated.c: Include discouraged.h and keywords.h.
3551
3552 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3553 reading '#:' or ':'. See NEWS for consequences.
3554
818deb11
MV
35552004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3556
43c25626
MV
3557 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3558 literals are now read-write again (until SCM_STRING_CHARS is
3559 removed).
3560
3561 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3562 strings with an error message that blames SCM_STRING_CHARS.
3563
3564 * options.c (change_option_setting): Use scm_car instead of
3565 explicit type check plus SCM_CAR.
3566
3567 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3568 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3569 (scm_iprin1): Use them instead of the previoulsy hardcoded
3570 strings.
3571 (scm_init_print): Initialize them.
3572
3573 * backtrace.c (display_frame_expr): Do not remove control
3574 characters from the final string. Print it directly using
3575 scm_display.
3576
818deb11
MV
3577 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3578 Thanks to Roland Orre!
3579
d748089e
KR
35802004-09-29 Kevin Ryde <user42@zip.com.au>
3581
3582 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3583 be whole original string in match struct, not offsetted substring.
3584
0ff7e3ff
HWN
35852004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3586
3587 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3588
ad7de4b8
MV
35892004-09-24 Marius Vollmer <mvo@zagadka.de>
3590
2edf319f
MV
3591 * Makefile.am (EXTRA_DIST): Added gettext.h.
3592
d180337b
MV
3593 * smob.c, smob.h (scm_assert_smob_type): New.
3594
05d7cf89 3595 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3596 Include GUILE_CFLAGS.
3597 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3598 now.
3599 (libpath.h): Put GUILE_CFLAGS in the build-info.
3600
c9fedf8a
MV
36012004-09-23 Marius Vollmer <mvo@zagadka.de>
3602
3603 * print.h (scm_print_state): Added highlight_objects.
3604 * print.c (make_print_state, scm_free_print_state): Initialize it
3605 to SCM_EOL.
3606 (scm_iprin1): Wrap output in '{...}' when object is contained in
3607 highlight_objects.
3608
3609 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3610 scm_backtrace_with_highlights): New. Set highlight_objects of
3611 printstate.
3612
3613 * error.c (scm_error_scm): Document new meaning of data/rest
3614 argument for out-of-range and wrong-type-arg errors.
3615 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3616 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3617 exception so that it gets highlighted in the backtrace.
3618 Don't talk about "argument" when not giving a position.
3619
3620 * throw.c (handler_message): The rest argument is the fourth
3621 argument, not everything after the third. Call
3622 scm_display_backtrace_with_highlights, passing the rest argument
3623 when appropriate.
3624
d5ac9b2a
MV
36252004-09-22 Marius Vollmer <mvo@zagadka.de>
3626
3627 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3628 <bruno@clisp.org>:
3629
3630 * i18n.c: Handle --disable-nls (thanks Bruno).
3631
3632 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3633 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3634
3635 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3636 LC categories.
05d7cf89 3637 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3638
3639 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3640 scm_bind_textdomain_codeset): Make wrappers similar to C function
3641 they wrap.
3642
3643 * i18n.h: New file.
3644 * i18n.c: New file.
3645 * gettext.h: New file, taken from GNU gettext.
3646 * init.c: Include libguile/i18n.h.
3647 (scm_init_guile_1): Add call to scm_init_i18n().
3648 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3649 (DOT_X_FILES): Add i18n.x.
3650 (DOT_DOC_FILES): Add i18n.doc.
3651 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3652 (modinclude_HEADERS): Add i18n.h.
3653
d2e53ed6
MV
36542004-09-22 Marius Vollmer <mvo@zagadka.de>
3655
2cdfe016
MV
3656 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3657
d2e53ed6
MV
3658 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3659 discouraged.h. Replaced all uses with scm_is_pair.
3660 (SCM_I_CONSP): New name for SCM_CONSP.
3661
3662 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3663 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3664 scm_cadr, etc): New.
3665 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3666 uses with scm_is_null.
5dd82006 3667
d2e53ed6
MV
3668 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3669 instead of explicit code.
5dd82006 3670
5dfdf243
MV
36712004-09-22 Marius Vollmer <mvo@zagadka.de>
3672
b50c53e5
MV
3673 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3674 Reworded logic a bit so that #f is returned immediately when s1 is
3675 too short to contain s2.
3676
5dfdf243 3677 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3678 zero-terminated locale string before matching against it.
5dfdf243
MV
3679
3680 * strings.h, strings.c (scm_substring_read_only,
3681 scm_c_substring_read_only, scm_i_substring_read_only): New.
3682 (RO_STRING_TAG, IS_RO_STRING): New.
3683 (scm_i_string_writable_chars): Bail on read-only strings.
3684
3685 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3686 literals, thus making them read-only as specified by R5RS.
3687
22ab5ba3
MV
36882004-09-22 Marius Vollmer <mvo@zagadka.de>
3689
3690 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3691 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3692
2663421c
MV
36932004-09-21 Marius Vollmer <mvo@zagadka.de>
3694
0d83cb90
MV
3695 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3696 numbers.c.
3697 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3698 Thanks to Andreas Vögele!
0d83cb90 3699
2663421c
MV
3700 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3701 just on a line of its own.
3702
3703 * srfi-13.c (scm_string_any, scm_string_every,
3704 scm_string_tabulate, string_upcase_x, string_down_case_x,
3705 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3706 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3707 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3708 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3709 indices, which can also be negative.
3710
b00b73f9
MV
37112004-09-20 Marius Vollmer <mvo@zagadka.de>
3712
3713 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3714
3715 * threads.c (scm_threads_mark_stacks): Call
3716 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3717 only used once.
3718
adba74f3
HWN
37192004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3720
05d7cf89 3721 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3722 Bugfix: when subtracting unsigned values, make sure that result
3723 does not wrap.
3724
f6de32c8
KR
37252004-09-09 Kevin Ryde <user42@zip.com.au>
3726
3727 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3728 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3729 by Andreas Vögele.
f6de32c8 3730
e548be5f
MV
37312004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3732
eb8d0af1
MV
3733 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3734
e548be5f
MV
3735 * eq.c (real_eqv): Pretend that all NaNs are equal.
3736
3737 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3738
e7acba81
MV
37392004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3740
874fbad1
MV
3741 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3742 use size_t for some locals instead of int.
3743
e7acba81
MV
3744 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3745 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3746 (skip_scsh_block_comment): Use scm_input_error instead of
3747 scm_misc_error in case of EOF.
3748
5de12658
KR
37492004-09-07 Kevin Ryde <user42@zip.com.au>
3750
3751 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3752 Bug report by Bill Schottstaedt.
3753
3754 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3755 column.
3756 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3757
3758 * posix.c (scm_access): Update docstring per manual.
3759
3760 * posix.c (scm_nice): Correction to error detection. Reported by
3761 Matthias Koeppe.
3762
3763 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3764 throw error before unlocking mutex with SCM_ALLOW_INTS.
3765
e227addf
KR
37662004-09-06 Kevin Ryde <user42@zip.com.au>
3767
3768 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3769 available. This also gets around CLK_TCK being absent when
3770 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3771
edea856c
SJ
37722004-09-03 Stefan Jahn <stefan@lkcc.org>
3773
3774 * threads.c (scm_threads_mark_stacks): Fixed local variable
3775 definitions.
3776
e7acba81 3777 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3778 local variable definitions.
3779
3780 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3781 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3782 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3783 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3784 scm_makfrom0str().
3785
874fbad1 3786 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3787 part.
3788
3789 * numbers.c (scm_init_numbers): Removed check_sanity() call
3790 inside GUILE_DEBUG. The function has been removed somewhen...
3791
3792 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3793 MinGW32 because it conflicts with its pthread headers.
3794
d9eb2d67
MV
37952004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3796
3797 * strings.c (SCM_STRINGP): Accept all strings.
3798 (SCM_STRING_CHARS): Reject shared substrings here.
3799
3800 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3801 the Copyright years.
3802
c495c342
KR
38032004-08-27 Kevin Ryde <user42@zip.com.au>
3804
3805 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3806 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3807 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3808
57aa5515
MV
38092004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3810
3811 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3812 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3813 scm_i_symbol_is_interned, scm_i_mem2symbol,
3814 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3815
ce25760f
MV
38162004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3817
19ff6ffc
MV
3818 * srfi-13.c: First cut at thread-safeness and proper use of
3819 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3820 been inserted. Made sure that no internal string pointer is used
3821 across a SCM_TICK or a possible GC.
3822
ce25760f
MV
3823 * script.c (scm_compile_shell_switches): Use
3824 scm_from_locale_string instead of scm_makfrom0str.
3825
3826 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3827 always been.
3828
c5080b51
MV
38292004-08-25 Marius Vollmer <mvo@zagadka.de>
3830
3831 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3832 strop.c.
3833
3834 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3835 * strop.h, strop.c: Removed, they are now empty.
3836 * Makefile.am: Updated for new and removed files.
3837
3838 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3839 to scm_string_to_symbol.
3840
3841 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3842 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3843 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3844 charset instead of libc functions.
3845
3846 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3847 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3848 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3849 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3850 instead of explicit code.
3851
3852 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3853 "srfi-13.h" instead of "strop.h".
3854
3855 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3856 scm_init_srfi_14. Do not call scm_init_strop.
3857
4b0d27f2
MV
38582004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3859
3860 * numbers.c (scm_inf_p): Synced docstring back from manual.
3861
3ece39d6
MV
38622004-08-22 Marius Vollmer <mvo@zagadka.de>
3863
3864 * strings.c (get_str_buf_start): New helper function.
3865 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3866 scm_i_string_char, scm_i_string_writable_chars): Use it.
3867 (scm_i_substring_copy): Make START argument optional for C
3868 callers, for upcoming SRFI-13 integration.
3869
38702004-08-21 Marius Vollmer <mvo@zagadka.de>
3871
3872 From Richard Todd, Thanks!
3873
3874 * script.c (scm_compile_shell_switches): added '-L' switch to add
3875 to the %load-path.
3876
5fa0939c
DH
38772004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3878
3879 * eval.c (unmemoize_exprs): When dropping internal body markers
3880 from the output during unmemoization, also drop those that are not
3881 immediately at the beginning of a body.
3882
2146fdeb
MV
38832004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3884
c1f54b3d
MV
3885 * eval.c (scm_lookupcar1): Report "Variable used before given a
3886 value" insetad of an "Unbound" one for variables that are found
3887 but still contain SCM_UNDEFINED.
2146fdeb
MV
3888
3889 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3890 expects a null-terminated string in the locale encoding, but
3891 scm_i_string_writable_chars doesn't give that. Fixed by letting
3892 mkstemp modify a locale version of the tmpl argument and copying
3893 the result back into tmpl.
3894
3895 * strop.c (scm_substring_move_x): Store into str2, not str1.
3896
d4f76919
KR
38972004-08-20 Kevin Ryde <user42@zip.com.au>
3898
3899 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3900 to modify the input string.
3901
b5247a6b
MV
39022004-08-19 Marius Vollmer <mvo@zagadka.de>
3903
3904 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3905 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3906 scm_c_symbol_length.
3907
f26b9395
MV
39082004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3909
3910 New string implementation, with copy-on-write strings and
3911 mutation-sharing substrings, and a new internal string API.
3912 Symbols can now share memory with strings.
3913
3914 * tags.h (scm_tc7_stringbuf): New tag.
3915
3916 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3917 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3918 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3919 uses.
3920 (scm_i_make_string, scm_c_make_string): New, to replace
3921 scm_allocate_string. Updated all uses.
3922 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3923 SCM_STRING_LENGTH): Deprecated.
3924 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3925 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3926 Discouraged. Replaced all uses with scm_from_locale_string or
3927 similar, as appropriate.
3928 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3929 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3930 scm_substring_shared, scm_substring_copy): New.
3931
3932 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3933 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3934 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3935 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3936 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3937 Deprecated.
3938 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3939 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3940 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3941 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3942 Updated all uses.
3943 (scm_gensym): Generate only the number suffix in the buffer, just
3944 string-append the prefix.
3945
3946 * error.c (scm_memory_error): Do not try to throw, just abort.
3947 Throwing will not work anyway.
3948
3949 * gh.h, gh-data.c (gh_set_substr): Made src const.
3950
3951 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3952 (scm_mode_bits): Use it.
3953 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3954 a vector normally and fill that instead of consing a list with a
3955 blocked GC.
3956
3957 * read.c (scm_i_casei_streq): New, for counted strings.
3958
3959 * threads.c (gc_section_count): Removed, thread-sleeping can not
3960 be nested.
3961 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3962 admin mutex so that we can be put to sleep by other threads while
3963 blocking on that mutex. Lock all the heap mutex of all threads,
3964 including ourselves.
3965 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3966 call scm_i_enter_guile.
3967 (scm_thread_mark_stacks): Expect all threads to be suspended.
3968
3969 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3970 scm_gc_mallocated, for now.
3971 (scm_init_storage): Initialize it.
3972 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3973
3974 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3975 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3976 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3977 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3978
cd505b38
MV
3979 * strop.c (scm_string_copy): Use scm_c_substring to get a
3980 copy-on-write string.
3981
8a807b26
KR
39822004-08-18 Kevin Ryde <user42@zip.com.au>
3983
3984 * arbiters.c (FETCH_STORE): New macro.
3985 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3986 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3987 scm_try_arbiter and scm_release_arbiter.
3988 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3989 for speed on i386, otherwise using mutex.
3990
3991 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3992 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3993 exact and inexact is #f.)
3994
3995 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3996 to get thread safety of scm_ttyname.
3997
3998 * ports.c (ttyname): Remove prototype, unused.
3999
d6cd4c36 4000 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 4001 Reported by Michael Tuexen.
d6cd4c36 4002
fa0c0a4b
MV
40032004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4004
4005 * load.c (scm_init_load_path): Do not pass NULL to
4006 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
4007 not set. Thanks to Bill Schottstaedt.
4008
70f7ee41
MV
40092004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4010
4011 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
4012 locale strings instead of accessing their internals.
4013 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
4014 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
4015 SCM_STRING_CHARS and SCM_STRING_LENGTH.
4016
4017 * simpos.c (scm_system): Convert SCM strings to locale strings
4018 instead of accessing their internals.
4019
4020 * script.c (scm_compile_shell_switches): Convert version to locale
4021 string before printing it.
4022
4023 * rdelim.c (scm_read_delimited_x): Avoid
4024 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
4025 of scm_from_long for the returned number of read characters.
4026
4027 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
4028 scm_i_mode_bits to avoid accessing internals of SCM string from C.
4029
4030 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
4031 Use them instead of SCM_SYSCALL when one or two strings need to be
4032 converted into locale strings.
4033 (my_rename): New, gathers platform dependent code for renaming.
4034 (scm_rename): Use it.
4035 (scm_readlink, scm_copy_file): Convert SCM strings to locale
4036 strings instead of accessing their internals.
4037 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
4038 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
4039 SCM_STRING_LENGTH.
4040
4041 * extensions.c (load_extension): Convert lib and init to locale
4042 strings instead of accessing the internals directly.
4043 (scm_c_load_extension): Use scm_from_locale_string instead of
4044 scm_makfrom0str.
4045
4046 * fports.h, fports.c (scm_i_fdes_to_port): New, like
4047 scm_fdes_to_port, but take mode bits directly instead of as a C
4048 string.
4049 (scm_i_fdes_to_port): Implement using above.
4050 (scm_open_file): Use scm_i_fdes_to_port together with
4051 scm_i_mode_bits to avoid accessing internals of SCM string from C.
4052 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
4053 with scm_i_mode_bits to avoid accessing internals of SCM string
4054 from C.
4055
4056 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
4057 SCM string as argument.
4058
4059 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
4060 bits directly instead of C string.
4061 (scm_void_port): Implement using above.
4062 (scm_sys_make_void_port): Use scm_i_void_port together with
4063 scm_i_mode_bits to avoid accessing internals of SCM string.
4064
4065 * strings.h, strings.c (scm_i_get_substring_spec): New.
4066
4067 * socket.c, rw.c, deprecated.h, validate.h
4068 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
4069 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
4070 scm_to_locale_string, etc.
4071 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
4072 above, plus scm_i_get_substring_spec.
4073
4074 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
4075 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
4076 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
4077 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
4078 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
4079 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
4080 with more explicit scm_remember_upto_here_1, etc, or introduced
4081 them in the first place.
4082
4083 * posix.c (WITH_STRING): New helper macro. Use it where one
4084 locale string is needed for a short piece of code.
4085 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
4086 when one locale string is needed.
4087 (scm_mkstemp): Convert tmpl to a locale string.
4088 (scm_putenv): Rewritten to use only C strings.
4089 (scm_setlocale, scm_crpt): Convert argument strings to locale
4090 strings.
4091
40922004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4093
4094 * load.c (scm_primitive_load_path): Do not check for absolute
4095 filenames when scm_sys_search_load_path returns false, which will
4096 return absolute filenames unchanged.
4097
bb26cc2d
MV
40982004-08-11 Marius Vollmer <mvo@zagadka.de>
4099
4100 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
4101 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
4102 of an alist. Thanks to Matthias Koeppe!
4103
02573e4c
MV
41042004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4105
4106 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
4107 Moved from string.h to deprecated.h.
4108
4109 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
4110
f9751e86 4111 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
4112 SCM_I_MAKE_STRING_TAG, changed all uses.
4113 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
4114 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
4115 respectively. For a short time, the old names are still there as
4116 aliases. Not all uses have been changed yet, but the ones in
4117 strings.c have.
4118 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
4119 SCM_T_BITS_MAX.
4120 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
4121 scm_take_locale_string, scm_take_locale_stringn,
4122 scm_to_locale_string, scm_to_locale_stringn,
4123 scm_to_locale_stringbuf): New.
4124 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
4125 deprecated.[hc]. Implemented in terms of the new functions above.
4126 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
4127 scm_makfrom0str): Reimplemented in terms of the new functions from
4128 above. They will be discouraged shortly.
4129 (scm_substring): Do not use scm_mem2string.
4130 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
4131 to replace similar code from posix.c, simpos.c, and dynl.c.
4132 (scm_string_append): Use memcpy instead of explicit loop. Do not
4133 use register keyword. Use plain 'char' instead of 'unsigned
4134 char'.
4135
4136 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
4137 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
4138
4139 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
4140 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4141 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
4142 not as a pointer. Use scm_remember_upto_here_1 to protect it.
4143
4144 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
4145 string. This avoids a conversion round-trip.
4146
4147 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
4148 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
4149 SCM_I_STRING_LENGTH, respectively.
4150 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
4151
4152 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
4153 of a string, call scm_display on the string itself.
4154
4155 * dynwind.c, dynwind.h (scm_frame_free): New.
4156
4157 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
4158 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
4159 Replaced uses of SCM_STRING_CHARS with proper uses of
4160 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
4161 Replaced scm_mem2string with scm_from_locale_string.
4162
4163 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
4164 Removed, replaced all uses with scm_i_allocate_string_pointers.
4165
4166 * load.h, load.c (scm_internal_parse_path): Removed.
4167 (scm_parse_path): Use scm_string_split to do the work.
4168 (scm_init_load_path): Use scm_parse_path instead of
4169 scm_internal_parse_path.
4170 (scm_search_path): Rewritten string handling part of the code in
4171 terms of scm_to_locale_stringbuf and so that it is thread safe.
4172
4173 * error.c (scm_error_scm): Throw directly instead of calling
4174 scm_error, this avoids the back and forth conversion of SUBR and
4175 MESSAGE and also plugs a memory leak.
4176 (scm_error): Call scm_error_scm.
4177
4178 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
4179 (display_header): Print FNAME when it is true, not
4180 merely when it is a string.
4181
4182 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
4183 unceremoniously. They were unused by Guile itself, and external
4184 use should stop immediately.
4185
4186
409eb4e5
MV
41872004-08-10 Marius Vollmer <mvo@zagadka.de>
4188
4189 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
4190 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
4191 deprecated versions installed in deprecated.h and deprecated.c.
4192 Changed all uses.
4193
a00eaf19
RB
41942004-08-06 Rob Browning <rlb@defaultvalue.org>
4195
4196 * net_db.c (scm_resolv_error): don't cause an exception while
4197 trying to throw an exception -- call scm_misc_error with correct
4198 arguments. The previous arguments needed a format escape that
4199 wasn't in any of the format strings.
4200
bcb88c93
KR
42012004-08-06 Kevin Ryde <user42@zip.com.au>
4202
8f094b97
KR
4203 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
4204 so as not to depend on signedness of plain char. For byvect range
4205 check, throw out-of-range rather than wrong-type-arg.
4206
bcb88c93
KR
4207 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
4208 signed byte range checks by using scm_to_schar and scm_from_schar,
4209 don't want to depend on signedness of C char.
4210
29e61124
KR
42112004-08-05 Kevin Ryde <user42@zip.com.au>
4212
4213 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
4214 SCM_DEFER_INTS.
4215 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
4216 guaranteed if multiple threads compete to unlock.
4217 Update docstrings per doc/ref/api-scheduling.texi.
4218
99de794f
KR
4219 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
4220 stat on the filename, to be certain a file rename can't mean we get
4221 info on one filesystem object but open another. This fstat usage is
4222 similar to Emacs copy-file.
4223
29e61124
KR
4224 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
4225
4226 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
4227 SIGINT and SIGQUIT, since those values are ints.
4228
759aa8f9
MV
42292004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4230
7241f213
MV
4231 * num2integral.i.c, num2float.i.c: Removed.
4232 * Makefile.am (noinst_HEADERS): Updated.
4233
f9656a9f
MV
4234 * numbers.h. numbers.c (scm_make_ratio): Renamed to
4235 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
4236 (scm_complex_p): New, export as "complex?" to Scheme.
4237 (scm_number_p): Export as "number?" to Scheme.
4238 (scm_is_complex, scm_is_number): New.
4239 (scm_c_make_rectangular, scm_c_make_polar): New.
4240 (scm_make_rectangular, scm_make_polar): Use above.
4241 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
4242 New.
4243 (scm_make_complex): Discouraged by moving to discouraged.h and
4244 discouraged.c. Replaced all uses with scm_c_make_rectangular.
4245
759aa8f9
MV
4246 * discouraged.h, discouraged.c, numbers.c, numbers.h
4247 (scm_is_rational): New.
4248 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
4249 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
4250 Removed prototypes.
4251 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
4252 Discouraged by moving to discouraged.h and discouraged.c.
4253 Replaced all uses with scm_from_double.
4254 (scm_num2float, scm_num2double): Discouraged by moving prototype
4255 to discouraged.h and rewriting in terms of scm_to_double.
4256 Replaced all uses with scm_to_double.
4257 (scm_to_double): Do not implement in terms of scm_num2dbl, use
4258 explicit code.
4259 (scm_from_double): Do not implement in terms of scm_make_real, use
4260 explicit code.
4261
531bf3e6
MV
42622004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4263
759aa8f9
MV
4264 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
4265
531bf3e6
MV
4266 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
4267 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
4268
4269 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
4270 Renamed to SCM_I_* in order to avoid collisions with the versions
4271 defined in deprecated.h.
4272
4273 * discouraged.h, discouraged.c: New files.
4274
4275 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
4276 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
4277 deprecated to being discouraged by moving to discouraged.h.
4278
4279 * numbers.h, numbers.c, discouraged.h, discouraged.c
4280 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
4281 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
4282 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
4283 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
4284 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
4285 scm_num2ulong_long): Discouraged by moving to discouraged.h and
4286 discouraged.c and reimplementing in terms of scm_from_* and
4287 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
4288 functions.
4289
4290 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
4291 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
4292 scm_i_size2big, scm_i_ptrdiff2big): Removed.
4293 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
4294 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4295 explicit code.
4296
5ec82e96
KR
42972004-08-02 Kevin Ryde <user42@zip.com.au>
4298
4299 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4300 and current usage and migration.
4301
58f28989
KR
43022004-07-31 Kevin Ryde <user42@zip.com.au>
4303
4304 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4305 it's not thread safe.
4306 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4307 advantage of this.
4308 * fports.c (scm_open_file): Use scm_strerror likewise.
4309 * filesys.c (scm_stat, scm_lstat): Ditto.
4310
4311 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4312 cannot be opened.
4313
4314 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4315 update, for thread safety.
4316 (gensym_counter): Move into scm_gensym which is its only user.
4317 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4318
03696aab
MV
43192004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4320
51fdb325
MV
4321 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4322 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4323 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4324 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4325 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4326 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4327 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4328 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4329 defined in terms of scm_to_signed_integer, etc, but in terms of
4330 scm_to_int8, etc.
4331
4332 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4333
03696aab
MV
4334 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4335 no longer used.
4336
4337 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4338 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4339
4340 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4341 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4342 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4343 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4344 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4345 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4346 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4347
4348 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4349 the functions below.
4350
4351 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4352 conv-uinteger.i.c.
4353
4354 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4355 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4356 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4357 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4358 scm_from_uint64): Turned from macros into proper functions.
4359 (scm_to_signed_integer, scm_to_unsigned_integer,
4360 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4361 conv-integer.i.c and conv-uinteger.i.c, as well.
4362
4363 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4364 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4365 the limits. Those are always defined.
4366
1f15779e
KR
43672004-07-29 Kevin Ryde <user42@zip.com.au>
4368
4369 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4370
48360eb3
KR
43712004-07-28 Kevin Ryde <user42@zip.com.au>
4372
4373 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4374 safety.
4375
c3f3c841
KR
4376 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4377 consistency with other vector types and to get arg and func name into
4378 error message.
4379
c82f8ed6
MV
43802004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4381
4382 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4383 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4384 scm_from_bool, respectively.
4385 (SCM_NINUMP): Added.
4386
4387 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4388 deprecated.h. Replaced all uses with scm_is_eq.
4389
317b4c4a
KR
43902004-07-24 Kevin Ryde <user42@zip.com.au>
4391
4392 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4393 * posix.c (scm_crypt): Use it to protect static data in crypt().
4394
e11e83f3
MV
43952004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4396
4397 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4398 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4399 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4400 versions to deprecated.h and deprecated.c. Changed all uses to
4401 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4402 scm_from_*, as appropriate.
4403
4404 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4405 the unexisting scm_cross_dynwind_binding_scope for inums on the
4406 windlist.
4407
a55c2b68
MV
44082004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4409
4410 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4411 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4412 byte-wise address to a SCM integer. Changed all uses.
4413 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4414 scm_to_ipv6 and added type and range checking, for converting from
4415 an IPv& byte-wise address to a SCM integer. Changed all uses.
4416 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4417 is now done by scm_to_ipv6.
4418
4419 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4420 not accept inexact integers.
4421
4422 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4423 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4424 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4425 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4426 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4427 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4428 fixnum/bignum distinction visible. Changed all uses to
4429 scm_to_size_t or similar.
4430
44312004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4432
4433 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4434
48a06bd5
KR
44352004-07-10 Kevin Ryde <user42@zip.com.au>
4436
4437 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4438 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4439 such a size causes divide-by-zeros in scm_hasher.
4440
052fbfd9
KR
4441 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4442 leak.
4443
43240c9c
MV
44442004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4445
4446 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4447 Rewritten using the same logic as scm_to_signed_integer and
4448 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4449 use CHAR_BIT instead of hardcoding 8.
4450 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4451 SCM_I_LLONG_MIN etc. instead.
4452
4453 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4454 SCM_I_MAKINUM and changed all uses.
4455 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4456
a3de8e7b
MV
4457 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4458 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4459 them by assuming twos-complement.
4460
c9eb03bb
MV
44612004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4462
4463 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4464 configure now produces.
4465 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4466 definitions, giving the limits of the integer types defined by
4467 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4468 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4469
4470 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4471 SHORT_MIN.
4472 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4473 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4474 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4475 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4476 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4477 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4478 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4479 scm_from_uintmax): New.
4480
7888309b
MV
44812004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4482
4483 * tags.h (scm_is_eq): New.
4484
4485 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4486 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4487 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4488 scm_from_bool, and scm_is_bool, respectively.
4489
4490 * boolean.h (scm_is_bool): Fix bug in prototype.
4491 (scm_from_bool): The argument is "x" not "f", stupid.
4492
4493 * boolean.c (scm_is_bool): Fix typo.
4494
4495 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4496 scm_is_unsigned_integer, scm_to_signed_integer,
4497 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4498 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4499 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4500 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4501 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4502 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4503 New.
4504
800570a6
MV
45052004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4506
4507 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4508 scm_to_bool): New.
4509
9fcf3cbb
DH
45102004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4511
4512 * backtrace.c (display_expression, display_frame): Call
4513 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4514 single memoized expression.
4515
4516 * debug.c (memoized_print): Don't try to unmemoize the memoized
4517 object, since we can't know whether it holds a single expression
4518 or a body.
4519
4520 (scm_mem_to_proc): Removed check for lambda expression, since it
4521 was moot anyway. Whoever uses these functions for debugging
4522 purposes should know what they do: Creating invalid memoized code
4523 will cause crashes, independent of whether this check is present
4524 or not.
4525
4526 (scm_proc_to_mem): Take the closure's code as it is and don't
4527 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4528 memoized code should not be modified.
4529
4530 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4531 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4532 available as a guile internal function instead. However,
4533 scm_i_unmemoize_expr will only work on memoized objects that hold
4534 a single memoized expression. It won't work with bodies.
4535
4536 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4537 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4538 i. e. a list of expressions.
4539
4540 * eval.c (unmemoize_exprs): Drop internal body markers from the
4541 output during unmemoization.
4542
4543 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4544 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4545 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4546 as guile internal functions instead. scm_i_unmemoize_expr will
4547 only work on a single memoized expression, while
4548 scm_i_unmemocopy_body will only work on bodies.
4549
90df793f
DH
45502004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4551
4552 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4553
4554 (scm_cons_source, scm_primitive_eval): Prefer higher level
4555 predicate SCM_FALSEP over SCM_IMP.
4556
8048c00b
RB
45572004-06-15 Rob Browning <rlb@defaultvalue.org>
4558
4559 * script.c (scm_shell_usage): minor phrasing change.
4560
4561 * gc_os_dep.c: update ifdefery for macosx.
4562 (scm_get_stack_base): separate result initialization from
4563 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4564 3.3. Thanks to Andreas Vögele.
8048c00b 4565
d93294d4
HWN
45662004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4567
4568 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4569
212e58ed
DH
45702004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4571
4572 * list.[ch] (scm_i_finite_list_copy): New internal function to
4573 copy lists that are known to be finite (though not necessarily
4574 proper).
4575
4576 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4577 a closure's argument list like an expression of a body.
4578
4579 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4580 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4581 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4582 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4583 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4584 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4585 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4586 unmemoize_builtin_macro): New static functions and symbols.
4587
4588 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4589 now has a slightly different meaning: The memoized form that is
4590 receives as its argument is now interpreted as a sequence of
4591 expressions from a body.
4592
4593 (unmemocar, scm_unmemocar): Since the whole functionality of
4594 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4595 has its old content back and is deprecated, while unmemocar has
4596 been removed.
4597
4598 (SCM_BIT7): Removed.
4599
4600 (CEVAL): For unmemoizing a single expression, call
4601 unmemoize_expression instead of scm_unmemocopy, which now expects
4602 a sequence of body expressions. Eliminated unnecessary empty
4603 environment frame when executing let* forms. Eliminated
4604 unmemoization step from evaluator.
4605
9ccea370
MV
46062004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4607
4608 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4609 macroexp and made static. Added new version of scm_macroexp that
4610 emits a deprecation warning and then calls macroexp.
4611 (scm_m_undefine): Issue deprecation warning.
4612
57d23e25
DH
46132004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4614
4615 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4616 Modified to make set! work on symbols that represent syntactic
4617 keywords.
4618
141521ad
HWN
46192004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4620
4621 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4622 compound expression as lvalue errors.
4623
7c2f56a4
MV
46242004-05-24 Marius Vollmer <mvo@zagadka.de>
4625
4626 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4627 WINDER_DATA to a SCM.
4628
366ecaec
DH
46292004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4630
4631 * goops.c (compute_getters_n_setters, create_standard_classes,
4632 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4633 lambda expression rather than creating them with scm_closure.
4634
26ecfa39
DH
46352004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4636
4637 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4638 misplaced syntactic keywords. This will not work unless guile's
4639 defmacro feature is deprecated.
4640
4641 (scm_m_case): Fixed a bug that caused the list of labels to grow
4642 with every case form.
4643
f865229a
KR
46442004-05-19 Kevin Ryde <user42@zip.com.au>
4645
4646 * numbers.c (scm_round_number): For inum and big, just return x. For
4647 real, use scm_round for 2^54-1 etc problems covered there.
4648
4649 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4650 doesn't provide trunc. This was for when `truncate' was done as a
4651 scm_tc7_dsubr, no longer required.
4652
4653 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4654 to stack marking call, two parameters and no cast on t->base.
4655
63947c7a
MV
46562004-05-18 Marius Vollmer <mvo@zagadka.de>
4657
4658 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4659 processed hashtables back into the weak_hashtables list. Thanks
4660 to Bill Schottstaedt!
4661
e7313a9d
DH
46622004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4663
4664 * eval.c (unmemoize_quote): New static function.
4665
4666 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4667 representation of 'quote' and '@slot-ref' to an improper list.
4668 This reduces execution time, the number of cells used to hold the
4669 memoized code, and thus also reduces garbage collection time.
4670
4671 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4672
4673 (SCM_CEVAL): Changed macro handling to also work with macros that
4674 return improper lists. Added an assertion, that the code returned
4675 by a macro transformer will not lead to cycles in the memoized
4676 code.
4677
e5156567
DH
46782004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4679
4680 No functional change, just rearrangements of functions within the
4681 file.
4682
4683 * eval.c (scm_ilookup, scm_unbound_variable_key,
4684 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4685 the definitions used for execution, since that's where they will
4686 belong to later.
4687
651f07f8
DH
46882004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4689
4690 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4691 throughout guile, has not been part of an official release yet,
4692 and the concept of sloppy predicates has never been a good idea.
4693
4694 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4695 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4696 Simplified.
4697
770e048f
DH
46982004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4699
4700 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4701 to make explicit what happens.
4702
2ff08405
DH
47032004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4704
4705 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4706 explicit what happens.
4707
4708 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4709 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4710
89afb9cd
MV
47112004-05-11 Marius Vollmer <mvo@zagadka.de>
4712
4713 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4714 is indeed a procedure when it isn't a number.
4715
3d5ebfa9
MV
47162004-05-10 Marius Vollmer <mvo@zagadka.de>
4717
4718 Convert floating point numbers into strings with an arbitrary
4719 radix. Thanks to Richard Todd!
4720
4721 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4722 fit.
4723 (fx): Removed.
4724 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4725 number_chars): New, to support variable radices.
4726 (idbl2str): Use above instead of the old base-10 only tables.
4727 (iflo2str): Pass on new RADIX argument to idbl2str.
4728 (scm_number_to_string): Pass radix to iflo2str.
4729 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4730 iflo2str.
4731 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4732 possible radices.
4733
3ae69bb4
KR
47342004-05-10 Kevin Ryde <user42@zip.com.au>
4735
4736 * numbers.c (scm_logbit_p): Correction to test above the end of an
4737 inum. Reported by Jan Konecny.
4738
27968825
MV
47392004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4740
4741 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4742 scm_t_bits. Updated all users.
4743 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4744 duplicating the code.
4745 (SCM_CELL_OBJECT_LOC): New.
4746 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4747 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4748
4749 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4750 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4751 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4752 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4753 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4754 SCM_SMOB_OBJECT_3_LOC): New.
4755 * smob.c (scm_i_set_smob_flags): New function.
4756
4757 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4758 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4759 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4760 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4761 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4762 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4763
4764 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4765 taking the address of SCM_CELL_WORD_1, the latter being no longer
4766 an lvalue.
4767
4768 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4769 of casting SCM_CELL_WORD_LOC.
4770
3cf17ef0
KR
47712004-05-02 Kevin Ryde <user42@zip.com.au>
4772
37026925 4773 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4774 --disable-deprecated. Reported by Andreas Vögele.
37026925 4775
3cf17ef0 4776 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4777 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4778
c5854598
KR
4779 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4780 code has support for. Fixes building with AIX cc, which is ansi but
4781 doesn't define __STDC__. Reported by Keith Crane.
4782 (var_start): Remove macro, this variation no longer required.
4783 (scm_list_n): Use va_start directly.
4784
f26c1a32
KR
47852004-05-01 Kevin Ryde <user42@zip.com.au>
4786
4787 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4788 is now gone. Reported by Andreas Vögele.
f26c1a32 4789
dfa6017e
KR
47902004-04-28 Kevin Ryde <user42@zip.com.au>
4791
4792 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4793 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4794 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4795 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4796 Also cast through unsigned char to avoid passing negatives to those
4797 macros if input contains 8-bit values.
4798
4799 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4800 corrections to range check for signed numbers. Remove
4801 scm_remember_upto_here_1(num) from these checks, since num is used
4802 subsequently anyway.
4803
4804 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4805 avoid warning from gcc 3.4. Reported by Hyperdivision.
4806
4807 * numbers.c (scm_bit_extract): Use min instead of MIN.
4808 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4809 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4810
4811 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4812 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4813
a0d06a00 4814 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4815 Reported by Andreas Vögele.
a0d06a00 4816
dfa6017e
KR
4817 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4818 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4819 by Andreas Vögele.
dfa6017e 4820
36245b66
DH
48212004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4822
4823 * eval.c (s_macro_keyword): New static identifier.
4824
4825 (scm_m_define): Change order to first create binding and
4826 evaluating the expression afterwards.
4827
4828 (scm_m_set_x): Memoize complete set! expression. Only leave
4829 symbols if no binding exists at memoization time. Throw error if
4830 assigning to a syntactic keyword.
4831
4832 (lazy_memoize_variable): New function.
4833
4834 (CEVAL): When execution set!, perform lazy memoization if
4835 unmemoized symbol is detected.
4836
4837 * modules.c (module_variable): Return variables with unbound
4838 value.
4839
4840 * tags.h: Fix comment.
4841
4d81111e
KR
48422004-04-25 Kevin Ryde <user42@zip.com.au>
4843
da8bcb2f
KR
4844 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4845 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4846 in 8-bit locales, and ensures consistency with char-upper-case? and
4847 char-lower-case? which already use ctype.h.
4848 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4849 Remove.
4850 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4851
4d81111e
KR
4852 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4853 call. Reported by Hyperdivision.
4854
4855 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4856 Reported by Hyperdivision.
4857
4858 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4859 Hyperdivision.
4860
7e6e6b37
DH
48612004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4862
4863 Hide the implementation of ilocs and isyms in eval.c.
4864
4865 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4866 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4867 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4868 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4869 eval.h to eval.c.
4870
4871 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4872 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4873 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4874 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4875 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4876 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4877 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4878 renamed to ISYMNUM.
4879
4880 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4881 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4882 Extracted printing of ilocs and isyms to guile internal functions
4883 scm_i_print_iloc, scm_i_print_isym of eval.c.
4884
caab294f
KR
48852004-04-22 Kevin Ryde <user42@zip.com.au>
4886
7aaf4758
KR
4887 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4888
caab294f
KR
4889 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4890 rounding in x+0.5 when x is a big value already an integer. In
4891 certain hardware rounding cases x+0.5 can give an adjacent integer,
4892 leading to that as the result, when we really just wanted x itself.
4893
b1cb24ff
DH
48942004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4895
4896 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4897
4898 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4899 added const qualifiers, cast intentionally unused expressions to
4900 void for emphasis, improved comment.
4901
5065b40d
DH
49022004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4903
4904 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4905 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4906 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4907 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4908 Defined the tc8-tag for flags to be 0x04, which will mean that
4909 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4910 to the reduced number of bits and the simpler bit pattern for
4911 SCM_BOOL_F, certain machines may be able to use more efficient
4912 processor instructions to deal with SCM_BOOL_F.
4913
4914 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4915 never been defined in a released version, thus no need to
4916 deprecate them.
4917
4918 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4919 instead of tc9 tags.
4920
4921 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4922 of tc9 tags.
4923
4924 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4925 could have used this definition.
4926
4927 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4928 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4929 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4930 as isyms, as special isyms don't exist any more.
4931
9fa6c119
KR
49322004-04-18 Kevin Ryde <user42@zip.com.au>
4933
e08d2eee
KR
4934 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4935 safety.
4936
9fa6c119
KR
4937 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4938 explicit swapping code.
4939
c9cdd396
KR
49402004-04-15 Kevin Ryde <user42@zip.com.au>
4941
4942 * cpp_sig_symbols.in: Add SIGSYS.
4943
4944 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4945 recursion.
4946
4947 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4948 frac/big and frac/frac, use scm_less_p for exact comparison.
4949
83ac9c59
KR
4950 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4951 with big/inum.
4952
84a4be9a
KR
4953 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4954
84fad130
HWN
49552004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4956
6b69393d
HWN
4957 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4958
84fad130
HWN
4959 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4960 scm_c_{up,down}case.
4961 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4962 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4963
c3110a30
KR
49642004-04-06 Kevin Ryde <user42@zip.com.au>
4965
0b288f36
KR
4966 * numbers.c (scm_ash): Remove stray "}" in docstring.
4967
ea2508c8
KR
4968 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4969 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4970 calling mpz_cmp_ui in most cases.
4971
c3110a30
KR
4972 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4973 for big == abs(most-negative-fixnum) special case.
4974 (abs_most_negative_fixnum): Remove, no longer used.
4975
4976 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4977 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4978 calling (sigaction NSIG).
4979
4980 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4981 and fork error cases to do this.
4982
dec40cd2
DH
49832004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4984
4985 * eval.c (CEVAL): Don't distinguish between short and long
4986 instructions when dispatching - just always dispatch on the
4987 instruction code, which is common for short and long instructions.
4988 Further, removed unnecessary goto statements and added comment.
4989
0e7bb795
DH
49902004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4991
4992 * eval.c (scm_unmemocopy): Don't distinguish between short and
4993 long instructions when dispatching - just always dispatch on the
4994 instruction code, which is common for short and long instructions.
4995 Further, removed unnecessary goto statements, fixed indentation
4996 and replaced SCM_IMP predicates by SCM_NULLP.
4997
f9986767
DH
49982004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4999
5000 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
5001 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
5002 'checkmacro'.
5003
fbc42231
KR
50042004-03-31 Kevin Ryde <user42@zip.com.au>
5005
5006 * simpos.c: Include <signal.h> for SIG_IGN and friends.
5007
434f2f7a
DH
50082004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5009
5010 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
5011 SCM_DEBUGGINGP:
5012
5013 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
5014 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
5015 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
5016 single interface that also matches the naming conventions.
5017 Probably scm_debug_mode_p should be part of the private interface
5018 anyway.
5019
5020 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
5021 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
5022 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
5023 to scm_debug_mode_p.
5024
5025
5026 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
5027
5028 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
5029 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
5030 from debug.h to eval.h.
5031
5032 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
5033 more, just leave it with setting scm_debug_mode_p, which is
5034 equivalent for practical purposes.
5035
5036 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
5037 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
5038
5039 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
5040
5041 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
5042 static and renamed it to ceval throughout. Provide a new exported
5043 but deprecated function scm_ceval as a wrapper for backwards
5044 compatibility. The same is done for the deval/scm_deval pair of
5045 functions.
5046
5047 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
5048 throughout. Defined CEVAL to ceval or deval, based on compilation
5049 phase.
5050
5051 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
5052 to ceval and deval instead of calling *scm_ceval_ptr.
5053
5054 * eval.c (dispatching_eval): New deprecated static function.
5055
5056 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
5057 to emulate its old behaviour as closely as possible.
5058
5059
5060 Change the evaluator such that only expressions for which pair? is
5061 true are passed to CEVAL, and such that all other expressions are
5062 evaluated outside of CEVAL:
5063
5064 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
5065 expression that is assumed to be memoized already. All but
5066 expressions of the form '(<form> <form> ...)' are evaluated inline
5067 without calling an evaluator.
5068
5069 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
5070 expressions of the form '(<form> <form> ...)' inline without
5071 calling an evaluator.
5072
5073 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
5074 the special case of unmemoized symbols passed on the top level.
5075
5076 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
5077 is known that the expression passed to CEVAL is of the form
5078 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
5079 now it is known that the input expression of CEVAL is a pair.
5080
50812004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
5082
5083 * eval.c (is_self_quoting_p): New static function.
5084
5085 (scm_m_quote): Use is_self_quoting_p.
5086
5087 (copy_tree): Corrected typo in comment.
5088
702551e6
HWN
50892004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
5090
bfefbf18
HWN
5091 * eval.c (s_scm_copy_tree): idem.
5092
5093 * list.c (s_scm_filter): remove "pointer" from doc string.
5094
702551e6
HWN
5095 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
5096
5097 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
5098
5099 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
5100 (display_frame): idem.
5101 (display_backtrace_file_and_line): idem.
5102
5103 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
5104 arguments.
5105
3cd23214
KR
51062004-03-26 Kevin Ryde <user42@zip.com.au>
5107
88a7ae1f
KR
5108 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
5109
3cd23214
KR
5110 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
5111 big==0 since that never occurs.
5112
5113 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
5114 scm_modular_expt, matching scheme level name `modulo-expt'.
5115
5116 * numbers.c (scm_modular_expt): Return a negative remainder for a
5117 negative divisor, the same as `modulo' does.
5118
51192004-03-26 Eric Hanchrow <offby1@blarg.net>
5120
5121 * numbers.c, numbers.h (scm_modular_expt): New function.
5122
2926035a
KR
51232004-03-25 Kevin Ryde <user42@zip.com.au>
5124
5125 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
5126 return inexact as required by r5rs.
5127
62360b89
DH
51282004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5129
5130 * eval.c: Separated some definitions relevant for execution from
5131 the memoization part of the file.
5132
5133 (copy_tree): New static function
5134
5135 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
5136 structures are detected now and will lead to an exception instead
5137 of forcing guile to run in an endless loop, using up all the
5138 system's memory. Second, arrays in the cdr of an improper list
5139 are now copied. See the new test cases in eval.test.
5140
51412004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
5142
5143 * posix.c (scm_gethostname): Make sure len is initialised before
5144 it is used. Restructured to (hopefully) represent possible
5145 configurations more clearly in the code. Added unwind handler.
5146
3bd3bae8
KR
51472004-03-23 Kevin Ryde <user42@zip.com.au>
5148
5149 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
5150 MAXHOSTNAMELEN when available.
5151
254bf78d
MV
51522004-03-21 Marius Vollmer <mvo@zagadka.de>
5153
5154 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
5155 terminator. Rewritten the logic as a state machine, I must have
5156 been doing too much VHDL lately...
5157
5158 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
5159 themselves. Thanks to Han-Wen Nienhuys!
5160
5161 * list.c: Changed docstrings so that they no longer talk about
5162 returning 'pointers' to something.
5163
009c34a2
HWN
51642004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5165
5166 * gc.c: remove set_debug_cell_accesses! when
5167 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
5168 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
5169 debugging conditionally.
5170
54733c95
KR
51712004-03-21 Kevin Ryde <user42@zip.com.au>
5172
5173 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
5174
bbaf8747
KR
51752004-03-20 Kevin Ryde <user42@zip.com.au>
5176
5177 * posix.c (scm_gethostname): Preserve errno across free() call.
5178
726f82e7
HWN
51792004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
5180
5181 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
5182 free cells.
5183
e1350d6a
KR
51842004-03-14 Kevin Ryde <user42@zip.com.au>
5185
5186 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
5187 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
5188
62055253
KR
51892004-03-07 Kevin Ryde <user42@zip.com.au>
5190
5191 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
5192 than "GMT" always.
5193 (filltime): Make zname parameter "const".
5194
92e64b87
MD
51952004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
5196
5197 * threads.c, threads.h (scm_c_scm2thread): New function.
5198
004ad931
KR
51992004-02-29 Kevin Ryde <user42@zip.com.au>
5200
5201 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
5202 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
5203 particular don't assume "defined (__alpha__) && ! defined (linux)"
5204 means OSF. Remove "SCO" code, which was not really SCO specific and
5205 which John W. Eaton advises should be long past being needed.
5206
5207 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
5208 error throw.
5209
72ea45ac
KR
52102004-02-24 Kevin Ryde <user42@zip.com.au>
5211
5212 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
5213
2af0602e
KR
52142004-02-22 Kevin Ryde <user42@zip.com.au>
5215
5216 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
5217 complex, same as for two args. (Handle only inum, big, real, frac).
5218
b114eafe
KR
52192004-02-21 Kevin Ryde <user42@zip.com.au>
5220
5221 * posix.c (scm_crypt): Use new HAVE_CRYPT.
5222 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 5223 Reported by Andreas Voegele.
b114eafe 5224
1e55d288
NJ
52252004-02-20 Neil Jerram <neil@ossau.uklinux.net>
5226
5227 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
5228 validation.
5229
5230 * read.c (scm_lreadparen): Removed.
5231 (scm_lreadparen1): Renamed scm_i_lreadparen.
5232
eb741d98
HWN
52332004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
5234
5235 * list.c (scm_list_n): validate non-immediate arguments;
5236 this will catch forgotten a SCM_UNDEFINED.
5237
4e28ba5e
MV
52382004-02-18 Marius Vollmer <mvo@zagadka.de>
5239
5240 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
5241 Thanks to Bill Schottstaedt!
5242
5243 * socket.h (scm_gethost): Removed prototype it is already in
5244 "net_db.h". Thanks to Bill Schottstaedt!
5245
ef861ead
KR
52462004-02-18 Kevin Ryde <user42@zip.com.au>
5247
5248 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
5249 order parameter to mpz_import, in fact with just one word there's no
5250 order to worry about at all.
5251
5252 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
5253 and frac==complex, make an exact comparison rather than converting
5254 with fraction2double.
5255
5256 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
5257 shared library, since environ is not directly available there.
5258
5259 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
5260 standard.
5261
5262 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
5263 errno EINVAL in case localtime and gmtime don't set it.
5264 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
5265 SCM_SYSERROR, since mktime and strptime generally don't set errno.
5266
ae43d08e 52672004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 5268
c9ea6462
KR
5269 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
5270 which were permitted in the past for these.
5271
292dfa7f
KR
5272 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
5273 previous change to numbers.c.
5274
ae43d08e
KR
5275 * script.c (scm_shell_usage): Print bug-guile email address, as per
5276 GNU standard. Reported by Han-Wen Nienhuys.
5277
711a9fd7
MD
52782004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5279
5280 * unif.c (scm_make_uve): Removed local variable and simplified
5281 code in order to avoid compiler used uninitialized warnings.
5282
5283 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
5284 scm_hash_map.
5285 (scm_hash_fold): Use scm_call_3 directly in the call to
5286 scm_internal_hash_fold instead of going via fold_proc (which is
5287 now removed).
5288 (scm_hash_for_each): Use a trampoline +
5289 scm_internal_hash_for_each_handle.
5290 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
5291 functions.
5292
3da7f6b2
KR
52932004-02-12 Kevin Ryde <user42@zip.com.au>
5294
344a212f
KR
5295 * ports.c (scm_port_line): In docstring, note first line is 0.
5296 (scm_set_port_line_x): In docstring, note first line is 0.
5297 (scm_port_column): In docstring, there's no default to current input
5298 port, and remove shared port-line @defun.
5299 (scm_set_port_column_x): In docstring, there's no default to current
5300 input port, note first column is 0, remove shared set-port-line!
5301 @defun.
5302
3da7f6b2
KR
5303 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5304 convert args the same way that array-set! does.
5305
5306 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5307 for dvect.
5308 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5309 for "l" not "s", fix dvect to be false for singp(prot) since such a
5310 value is for fvect.
5311 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5312 (exactly_one_third): New variable.
5313 (scm_init_unif): Initialize it.
3da7f6b2 5314
cd21f5eb
NJ
53152004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5316
5317 * read.c (scm_read_opts): Change `escaped-parens' to
5318 `elisp-strings'.
5319
16353acc
NJ
53202004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5321
5322 * read.c (scm_read_opts): New opts `elisp-vectors' and
5323 `escaped-parens'.
5324 (s_vector): New.
5325 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5326 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5327 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5328 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5329 `escaped-parens' option set.
5330 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5331 in tokens.
5332 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5333 (scm_lreadparen1): New.
5334
5335 * read.h: Remove conditionally compiled last arg to
5336 scm_lreadparen.
5337 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5338
f62b9dff
HWN
53392004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5340
5341 * eval.c (m_expand_body): remove stray variable new_body.
5342
ef5b6b61
MV
53432004-01-22 Marius Vollmer <mvo@zagadka.de>
5344
5345 * eval.c (m_expand_body): Rewrite the expression in place (by
5346 overwriting FORMS) also when a letrec is constructed, not only
5347 when no definitions are found. Do not return rewritten expression
5348 to emphasize the in-place rewriting. Changed all users.
5349
7eec4c37
HWN
53502004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5351
5352 * gc.c: add protected_object_count, a number that is dumped from
5353 gc_stats()
5354
25ffbdac
MV
53552004-01-11 Marius Vollmer <mvo@zagadka.de>
5356
5357 * dynwind.h, dynwind.c (scm_frame_unwind,
5358 scm_frame_unwind_handler): Renamed and changed all uses.
5359 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5360
08568c95
KR
53612004-01-11 Kevin Ryde <user42@zip.com.au>
5362
5363 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5364 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5365 changes made to scheme-compound.texi.
5366
5565749c
MV
53672004-01-10 Marius Vollmer <mvo@zagadka.de>
5368
25ffbdac
MV
5369 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5370 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5371
5372 * guile-snarf.in: Use mkdir to create a unique temporary directory
5373 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5374
fc6bb283
MV
53752004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5376
7ebccde8
MV
5377 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5378 argument since it is always zero now. Changed all callers.
5379 Removed code for handling fluids.
96e3b2f8
MV
5380
5381 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5382 the wind chain explicitely. Use scm_c_with_fluid for the common
5383 case of only one fluid.
5384 (scm_with_fluid): New.
5385 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5386
fc6bb283 5387 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5388 (scm_with_fluid): New.
5389 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5390
5391 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5392 do the unwinding directly. It is simple enough.
5393
5394 * dynwind.h, dynwind.c: Did the following renamings:
5395 scm_begin_frame -> scm_frame_begin,
5396 scm_end_frame -> scm_frame_end,
5397 scm_on_unwind -> scm_frame_unwind,
5398 scm_on_rewind -> scm_frame_rewind,
5399 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5400 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5401 Changed all uses.
5402
5403 * aync.h, async.c: Did the follwing renamings:
5404 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5405 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5406 Changed all uses.
5407
5408 * ports.h, ports.c: Did the follwing renamings:
5409 scm_with_current_input_port -> scm_frame_current_input_port,
5410 scm_with_current_output_port -> scm_frame_current_output_port,
5411 scm_with_current_error_port -> scm_frame_current_error_port.
5412 Changed all uses.
5413
298ab996
KR
54142004-01-07 Kevin Ryde <user42@zip.com.au>
5415
5416 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5417 Reported by Richard Todd.
5418
ba40113e
KR
5419 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5420 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5421
298ab996
KR
5422 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5423 traversing the args list, fixes segv if an improper list is given.
5424 Reported by Rouben Rostamian.
5425
aacff585
MV
54262004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5427
5428 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5429 swap_data on stack, use a 'malloc obj'.
5430
5431 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5432 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5433 scm_i_... since they are internal. Changed all uses.
5434
5435 * dynwind.c (frame_print): Removed, use the default printer.
5436 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5437 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5438 to protect SCM values.
5439
5440 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5441 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5442 Changed all uses.
5443 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5444
49c00ecc
MV
54452004-01-05 Marius Vollmer <mvo@zagadka.de>
5446
5447 * ports.h, ports.c (scm_with_current_input_port,
5448 scm_with_current_output_port, scm_with_current_error_port): New.
5449
5450 * async.h, async.c (scm_with_blocked_asyncs,
5451 scm_with_unblocked_asyncs): New.
5452
dab514a8
MV
54532004-01-03 Marius Vollmer <mvo@zagadka.de>
5454
5455 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5456 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5457 New.
5458 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5459 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5460 function when the outermost wind point has been reached. The
5461 latter is used to copy a continuation stack at the right time.
5462 scm_dowinds remains available.
5463 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5464 tc16_guard, guards_print): Removed.
5465 (scm_internal_dynamic_wind): Reimplemented using frames.
5466
5467 * continuations.c (copy_stack): New, do only the stack copying
5468 part of copy_stack_and_call.
5469 (copy_stack_and_call): Copy the stack after unwinding and before
5470 rewinding.
5471 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5472 copy_stack_and_call.
5473
441a25d9
KR
54742004-01-04 Kevin Ryde <user42@zip.com.au>
5475
5476 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5477 can give bad results due to rounding.
441a25d9 5478
e0499207
KR
5479 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5480 setzone/restorezone protection for DOS.
5481
89fcf1b4
MV
54822003-12-26 Marius Vollmer <mvo@zagadka.de>
5483
5484 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5485 and scm_t_uintmax to be defined in scmconfig.h
5486
caff34d4
KR
54872003-12-03 Kevin Ryde <user42@zip.com.au>
5488
5489 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5490
5491 * numbers.c (scm_make_ratio): Check for numerator equal to
5492 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5493 giving integer -1.
5494
5495 * numbers.c (scm_real_part): Return fraction unchanged rather than
5496 converting to flonum.
5497
2d0b85ac
DH
54982003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5499
5500 * modules.c (module_variable): Fixed (and thus simplified) the
5501 definition of SCM_BOUND_THING_P to reflect the fact that since
5502 after the 1.4 series of guile, obarrays only hold variable
5503 objects.
5504
2297981d
MV
55052003-11-30 Marius Vollmer <mvo@zagadka.de>
5506
5507 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5508
5509 From Paul Jarc:
5510
5511 * read.c (scm_lreadr): Signal an error for invalid escape
5512 sequences in strings. Code cleanups too.
5513
5514 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5515 writing control characters in strings.
5516
55172003-11-21 Marius Vollmer <mvo@zagadka.de>
5518
5519 * ports.c (scm_drain_input): Bug fix: only access the port after
5520 checking that it indeed is one.
5521
5c264007
DH
55222003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5523
5524 * eval.c (s_bad_define): New static identifier.
5525
5526 (m_body): Fixed comment.
5527
5528 (scm_m_define): Don't generate memoized code for definitions that
5529 are not on the top level. As a consequence, no memoized code at
5530 all is generated for definitions any more: Top level definitions
5531 are executed immediately during memoization and internal
5532 definitions are handled separately in m_expand_body.
5533
5534 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5535 definitions. Consequently, there is no unmemoizing code any more
5536 that might modify the environment. Thus, the old scm_unmemocopy
5537 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5538
5539 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5540 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5541 over SCM_NIMP in places, where the argument is known to be part of
5542 a proper list.
5543
018d4730
KR
55442003-11-21 Kevin Ryde <user42@zip.com.au>
5545
5546 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5547 for bignums.
5548
5549 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5550 to share some shifting.
5551
5552 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5553 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5554 since gc does this.
5555
4bca30d8
MV
55562003-11-19 Marius Vollmer <mvo@zagadka.de>
5557
fb16d26e
MV
5558 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5559 structure. Previously, not all cases with a negative denominator
5560 were covered.
5561
4bca30d8
MV
5562 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5563 scm_divide2real when forming the fractional part. This allows
5564 "#e1.2" to yield 6/5.
5565
5566 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5567 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5568 fractions were equal to each other regardless of value. Ooops.
5569
5570 * numbers.c (scm_rationalize): Return an inexact result when given
5571 inexact arguments.
5572
5573 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5574 non-numbers.
5575
bdf26b60
MV
55762003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5577
5578 Support for exact fractions from Bill Schottstaedt! Thanks!
5579
5580 * print.c (scm_iprin1): Handle fractions.
5581
5582 * objects.h (scm_class_fraction): New.
5583 * objects.c (scm_class_fraction): New.
5584 (scm_class_of): Handle fractions.
5585
5586 * hash.c (scm_hasher): Handle fractions.
5587
5588 * numbers.c: New code for handling fraction all over the place.
5589 (scm_odd_p, scm_even_p): Handle inexact integers.
5590 (scm_rational_p): New function, same as scm_real_p.
5591 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5592 New exact functions that replace the inexact 'dsubr'
5593 implementations.
5594 (scm_numerator, scm_denominator): New.
5595
5596 * numbers.h (SCM_NUMP): Recognize fractions.
5597 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5598 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5599 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5600 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5601 SCM_FRACTION_REDUCED): New.
5602 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5603 New prototypes.
5604 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5605 scm_rational_p): New prototypes.
5606 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5607 scm_i_print_fraction): New prototypes.
5608
5609 * goops.c (create_standard_classes): Create "<fraction>" class.
5610
5611 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5612
5613 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5614 case in the switch, but do nothing for now.
5615
5616 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5617 to doubles when calling 'dsubr' functions.
5618
5619 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5620
28fda544
RB
56212003-11-18 Rob Browning <rlb@defaultvalue.org>
5622
5623 * gen-scmconfig.c (main): remove public definition of
5624 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5625 direct typedef of long_long and ulong_long inside deprecated block
5626 when appropriate.
5627
5628 * deprecated.h: move long_long and ulong_long definitions to
5629 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5630 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5631
b58e7420
MV
56322003-11-17 Marius Vollmer <mvo@zagadka.de>
5633
9a1d7d7c
MV
5634 * hash.c (scm_string_hash): New hashing algorithm that takes the
5635 complete string into account.
5636
b58e7420
MV
5637 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5638 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5639 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5640 SCM_ASSYNT.
b58e7420
MV
5641
5642 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5643 the "-e" option instead of scm_str2symbol. This allows things
5644 like (@ ...) to be specified for the entry point.
5645
461bffb1
DH
56462003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5647
5648 * eval.c (scm_m_letstar): Create memoized code in place to
5649 minimize consing.
5650
6f81708a
DH
56512003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5652
5653 * eval.c (s_splicing): Commented and reformulated.
5654
5655 (lookup_global_symbol, lookup_symbol): New static functions.
5656
5657 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5658
5659 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5660 creating a temporary pair for scm_lookupcar.
5661
5662 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5663 created deprecated wrapper function scm_unmemocar.
5664
5665 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5666 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5667 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5668 undefineds, sym_three_question_marks): Moved around without
5669 modifications.
5670
5671 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5672
910b5125
DH
56732003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5674
5675 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5676 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5677 No further modifications.
5678
c86c440b
DH
56792003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5680
5681 * eval.c (s_mixed_body_forms): New static identifier.
5682
5683 (canonicalize_define, scm_m_define): The check for a bad
5684 expression is performed in canonicalize_define now.
5685
5686 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5687 static helper functions for m_expand_body.
5688
5689 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5690 expand user defined macros. Fixed handling of the definition/
5691 expression boundary. Fixed handling of definitions grouped with
5692 'begin. Use canonicalize_define to expand definitions.
5693
3890131a
MV
56942003-11-13 Marius Vollmer <mvo@zagadka.de>
5695
b58e7420
MV
5696 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5697 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5698
5df36eac
MV
5699 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5700 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5701 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5702 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5703 New macros from Paul Jarc. Thanks!
5704
3890131a
MV
5705 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5706 return NULL when the machine type is unknown. Previously,
5707 gc_os_dep.c would refuse to compile.
5708
430b8401
DH
57092003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5710
5711 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5712 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5713 scm_m_body to m_body.
5714
328dc9a3
DH
57152003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5716
5717 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5718 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5719 scm_m_expand_body to m_expand_body and made it static. Added
5720 deprecated wrapper scm_m_expand_body.
5721
5722 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5723 of scm_m_expand_body.
5724
c2337a61
KR
57252003-11-09 Kevin Ryde <user42@zip.com.au>
5726
5727 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5728 argument. Reported by Mike Gran.
5729
ced8edb0
DH
57302003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5731
5732 * eval.c (s_missing_body_expression): New static identifier.
5733
5734 (s_body): Removed.
5735
5736 (scm_m_expand_body): Fixed core dump when passing a body with
5737 defines, but without expressions (see additions to syntax.test).
5738 Use ASSERT_SYNTAX to signal syntax errors.
5739
0f572ba7
DH
57402003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5741
5742 * eval.c (canonicalize_define): New static helper function.
5743
5744 (memoize_define, canonicalize_define): Extract handling of
5745 function currying to canonicalize_define.
5746
2510c810
DH
57472003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5748
5749 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5750 Make sure that error checking in debug mode is not worse than in
5751 standard mode.
5752
34adf7ea
DH
57532003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5754
5755 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5756 handled in scm_m_body any more, but rather in scm_m_lambda.
5757
5758 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5759 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5760 calling functions of scm_m_body.
5761
5762 (scm_m_lambda): Avoid unnecessary consing when creating the
5763 memoized code.
5764
89bff2fc
DH
57652003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5766
5767 * eval.c (s_expression): Added comment.
5768
5769 (s_empty_combination, error_unbound_variable): New static
5770 identifiers.
5771
5772 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5773 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5774 signal syntax errors.
5775
5776 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5777 scheme objects.
5778
60a49842
DH
57792003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5780
5781 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5782 Grouped together with unmemocopy, without modifications.
5783
5784 (build_binding_list, unmemocopy): Renamed names of list arguments
5785 and variables to reflect the actual order of the list elements.
5786
70c1c108
DH
57872003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5788
5789 * eval.c (s_defun): New static identifier.
5790
5791 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5792 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5793 when creating the memoized code.
5794
0ee39677
KR
57952003-10-19 Kevin Ryde <user42@zip.com.au>
5796
5797 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5798
5799 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5800 in accordance with R5RS, which just mpz_get_d doesn't really give.
5801
9a848baf
DH
58022003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5803
5804 * eval.c (s_bad_slot_number): New static identifier.
5805
5806 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5807 signal syntax errors. Avoid unnecessary consing when creating the
5808 memoized code.
5809
da48db62
DH
58102003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5811
5812 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5813 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5814 errors. Avoid unnecessary consing when creating the memoized
5815 code.
5816
5817 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5818 standard case. Make sure line and file information are copied to
5819 every created expression.
5820
82b3e2c6
DH
58212003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5822
5823 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5824 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5825 when creating the memoized code.
5826
5827 (scm_m_atbind): Reversed the order, in which the init expressions
5828 are stored and executed. The order of execution is now equal to
5829 the order in which the initializers of the let-forms are executed.
5830 Use check_bindings and transform_bindings.
5831
5832 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5833 !SCM_NULLP. Added some comments.
5834
21628685
DH
58352003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5836
5837 * eval.c: Sorted include files alphabetically.
5838
5839 (scm_m_begin): Added comment.
5840
5841 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5842 unnecessary consing when creating the memoized code.
5843
5844 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5845 syntax errors. Be more specific about the kind of error that was
5846 detected.
5847
5848 (scm_m_quote, unmemocopy): As an optimization, vector constants
5849 are now inserted unquoted into the memoized code. During
5850 unmemoization the quotes are added again to provide syntactically
5851 correct code.
5852
d6754c23
DH
58532003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5854
5855 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5856 scm_m_expand_body, check_bindings): Extracted syntax checking of
5857 bindings to new static function check_bindings.
5858
5859 (scm_m_let, memoize_named_let): Extracted handling of named let to
5860 new static function memoize_named_let.
5861
5862 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5863 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5864 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5865 unnecessary consing when creating the memoized code.
5866
03a3e941
DH
58672003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5868
5869 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5870 static identifiers.
5871
5872 (s_clauses, s_formals, s_duplicate_formals): Removed.
5873
5874 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5875 specific about the kind of error that was detected. Prepare for
5876 easier integration of changes for separated memoization.
5877
da48db62 58782003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5879
5880 * eval.c (s_duplicate_binding): New static identifier.
5881
5882 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5883
5884 (scm_m_define): Added comment about how we check for duplicate
5885 formals.
5886
5887 (scm_m_do): Added check for duplicate bindings.
5888
5889 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5890 unnecessary consing when creating the memoized code.
5891
5892 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5893 scm_c_improper_memq to c_improper_memq, since it is not exported.
5894
5895 (transform_bindings): Call scm_c_memq rather than
5896 scm_c_improper_memq.
5897
5898 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5899
da48db62 59002003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5901
5902 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5903 static identifiers.
5904
5905 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5906 specific about the kind of error that was detected. Avoid use of
5907 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5908 code, this way also making sure that file name, line number
5909 information etc. remain available.
5910
da48db62 59112003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5912
5913 * eval.c (memoize_as_thunk_prototype): New static function.
5914
5915 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5916 Avoid unnecessary consing when creating the memoized code.
5917
9b9a35b6
KR
59182003-10-12 Kevin Ryde <user42@zip.com.au>
5919
5920 * list.c (scm_append): Track argument number and use in error.
5921
cc56ba80
DH
59222003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5923
5924 * eval.c (s_missing_expression, s_bad_variable): New static
5925 identifiers.
5926
5927 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5928 R5RS terminology for the naming of variables. Be more specific
5929 about the kind of error that was detected. Make sure file name,
5930 line number etc. are added to all freshly created expressions.
5931 Avoid unnecessary consing when creating the memoized code.
5932
609a8b86
DH
59332003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5934
5935 * eval.c (s_extra_expression, s_misplaced_else_clause,
5936 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5937
5938 (s_extra_case_clause): Removed.
5939
5940 (scm_m_case, scm_m_cond): If a clause appears after an else
5941 clause, report a misplaced else clause.
5942
5943 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5944 specific about the kind of error that was detected. Handle bound
5945 'else and '=>. Avoid unnecessary consing when creating the
5946 memoized code.
5947
5948 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5949 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5950 syntactic keyword '=>.
5951
58a2510b
DH
59522003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5953
5954 * eval.c (scm_m_case): Allow empty lists of case labels.
5955
2a6f7afe
DH
59562003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5957
5958 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5959
5960 * print.c (scm_isymnames): Add names for the new memoizer codes.
5961
5962 * eval.c (s_missing_clauses, s_bad_case_clause,
5963 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5964 literal_p): New static identifiers.
5965
5966 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5967 specific about the kind of error that was detected. Check for
5968 duplicate case labels. Handle bound 'else. Avoid unnecessary
5969 consing when creating the memoized code.
5970
5971 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5972 the syntactic keyword 'else.
5973
e6729603
DH
59742003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5975
5976 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5977 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5978
5979 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5980 unnecessary consing when creating the memoized code.
5981
9ddeb776
KR
59822003-10-09 Kevin Ryde <user42@zip.com.au>
5983
5984 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5985 cast gives for values bigger than a long, or for nan or inf.
5986
df5af69a
DH
59872003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5988
5989 * smob.h (scm_make_smob_type): Made the declaration match the
5990 definition.
5991
da0e6c2b
MV
59922003-10-07 Marius Vollmer <mvo@zagadka.de>
5993
5994 * goops.c, objects.h, smob.c, smob.h: Make type names char
5995 const * instead of char *. Thanks to Paul Jarc!
5996
591924eb
KR
59972003-10-02 Kevin Ryde <user42@zip.com.au>
5998
ff6ea7b9 5999 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
6000 rather than scm_strport_to_string, so as to guard against the port
6001 having been closed by the called procedure. Reported by Nic Ferrier.
6002
f03314f9
DH
60032003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6004
6005 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
6006
6007 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
6008 tags.h to deprecated.h.
6009
534c55a9
DH
60102003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6011
6012 This set of patches introduces a new tc7 code scm_tc7_number for
6013 numbers. Bignums, reals and complex numbers are turned from smobs
6014 into subtypes of scm_tc7_number.
6015
6016 * tags.h (scm_tc7_number): New.
6017
6018 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
6019 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
6020 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
6021 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
6022 (scm_class_of), print.c (scm_iprin1), smob.c
6023 (scm_smob_prehistory): Don't handle bignums, reals and complex
6024 numbers as subtypes of scm_tc7_smob any more.
6025
6026 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
6027 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
6028
29c4382a
DH
60292003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
6030
6031 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
6032 sizeof (scm_t_complex) to determine the memory size of the
6033 malloc'd area for complex numbers.
6034
47ae1f0e
DH
60352003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
6036
6037 * numbers.c (scm_bigequal): Fixed.
6038
859b6b2f
MV
60392003-09-16 Marius Vollmer <mvo@zagadka.de>
6040
6041 * stime.c (scm_current_time): 'time' does not set errno so don't
6042 use SCM_SYSERROR for reporting errors.
6043
e17d318f
DH
60442003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6045
6046 This set of patches eliminates the dependency between the
6047 implementation of evaluator specific memoization codes and special
6048 constants like #f, '() etc. ('flags'), which are not evaluator
6049 specific. The goal is to remove definitions of evaluator
6050 memoization codes completely from the public interface. This will
6051 make it possible to experiment more freely with optimizations of
6052 guile's internal representation of memoized code.
6053
6054 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
6055
6056 * print.c (iflagnames): New array, holding the printed names of
6057 guile's special constants ('flags').
6058
6059 (scm_isymnames): Now holds only the printed names of the
6060 memoization codes.
6061
6062 (scm_iprin1): Separate the handling of memoization codes and
6063 guile's special constants.
6064
6065 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
6066 SCM_IFLAGNUM): new
6067
6068 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
6069 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
6070 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
6071 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
6072 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
6073 values.
6074
6075 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
6076
6077 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
6078 tc9 macros and scm_tc9_flag.
6079
eecac806
MV
60802003-09-15 Marius Vollmer <mvo@zagadka.de>
6081
6082 * posix.c (scm_setgroups): Check that the gid list is not too
6083 long. Thanks to Paul Jarc!
6084
22f2cf2d
DH
60852003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
6086
6087 * tags.h: Reduced the number of short instructions from 14 to 13.
6088 The typecode of the former 14th short instruction is now used to
6089 represent long instructions. Changed some comments to reflect
6090 this fact.
6091
6092 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
6093 previously used by SCM_IM_DEFINE.
6094
6095 (SCM_IM_DEFINE): Turned into a long instruction.
6096
6097 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
6098 instruction.
6099
6100 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
6101 code that is separate from all instructions, one level of dispatch
6102 for long instructions can be eliminated.
6103
6104 * print.c (scm_isymnames): Removed some commented code.
6105
62f548e1
MV
61062003-09-12 Marius Vollmer <mvo@zagadka.de>
6107
97a61c5f
MV
6108 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
6109 compiler on IA64.
6110
50e0ba57
MV
6111 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
6112
6113 * modules.c (scm_module_reverse_lookup): Check that the obarray
6114 really is a hashtable and do nothing if not.
6115
62f548e1
MV
6116 * inline.h: Use "extern inline" only with GCC. Use "static
6117 inline" else.
6118
0d5e3480
DH
61192003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6120
6121 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
6122 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6123
6124 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
6125 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
6126 deprecated.h.
6127
6b412e91
DH
61282003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6129
6130 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
6131 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6132
6133 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
6134 0.0==some_expression to some_expression==0.0. The latter is
6135 better readable. The former is preferred by some people, since it
6136 leads to a compiler error when confusing == with =. However, when
6137 using gcc, a warning will be issued if in an if-statement an
6138 assigment appears. Since many Guile developers are using gcc,
6139 such errors will not remain unnoticed anyway. We can therefore
6140 focus on better readability.
6141
7e3b25bf
DH
61422003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6143
6144 * tags.h: Added description of Guile's type system. Removed some
6145 old and misleading comments.
6146
3ea39242
DH
61472003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6148
6149 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
6150 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
6151
5d7d39ff
DH
61522003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6153
6154 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
6155
6156 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
6157 respective SLOPPY macro.
6158
baa84a20
DH
61592003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6160
6161 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
6162 type string, not SCM_TYP7S.
6163
ba15f500
KR
61642003-09-03 Kevin Ryde <user42@zip.com.au>
6165
6166 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
6167 2s-complement.
6168
53bb8782
KR
6169 * stime.c (scm_strptime): Add comment about glibc strptime %s and
6170 current timezone requiring SCM_DEFER_INTS.
6171
defdc4b4
NJ
61722003-08-30 Neil Jerram <neil@ossau.uklinux.net>
6173
6174 * script.c (scm_compile_shell_switches): Make -s switch optional
6175 if file to be loaded does not begin with a `-'. (Thanks to Aaron
6176 VanDevender for the patch!)
6177
0f008a15
KR
61782003-08-30 Kevin Ryde <user42@zip.com.au>
6179
6180 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
6181 and to have non-integer types rejected as per other logical funcs.
6182
438a3ba1
KR
61832003-08-28 Kevin Ryde <user42@zip.com.au>
6184
6185 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
6186
98dceb37
KR
61872003-08-23 Kevin Ryde <user42@zip.com.au>
6188
6189 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
6190 thread safe, and could take a long time too.
6191
1fa79a38
KR
61922003-08-22 Kevin Ryde <user42@zip.com.au>
6193
6194 * numbers.c (scm_difference): Correction to bignum - negative inum.
6195
d97f9b42
KR
61962003-08-14 Kevin Ryde <user42@zip.com.au>
6197
6198 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
6199 [__GNUC__]: Use volatile asm macros rather than a function call.
6200 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
6201 macros while defining functions.
6202
6203 * simpos.c (getenv): Use <stdlib.h> for prototype.
6204 (scm_system): In docstring, refer to status:exit-val rather than
6205 "functions above".
6206
b9052fcc
KR
62072003-08-09 Kevin Ryde <user42@zip.com.au>
6208
6209 * srcprop.c (scm_source_properties): Return plist from hash if it's a
6210 list set by source-properties! rather than an SRCPROPS object,
6211
8e5b4b9e
KR
62122003-07-29 Kevin Ryde <user42@zip.com.au>
6213
6214 * properties.c (scm_primitive_property_ref): In docstring, note
6215 parameters to not-found-proc, use hyphens rather than underscores for
6216 that parameter name.
6217 (scm_primitive_property_set_x): In docstring, VAL is the value
6218 parameter not CODE.
6219
20703ac4
MV
62202003-07-27 Marius Vollmer <mvo@zagadka.de>
6221
c6ccee34
MV
6222 * print.c (scm_print_symbol_name): handle more weird characters by
6223 escaping the symbol name properly. Thanks to Paul Jarc!
6224
2f4931bf
MV
6225 * posix.h (scm_setgroups): New prototype.
6226 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
6227 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
6228 Don't use SCM_WRITABLE_VELTS.
6229
265c456f
MV
6230 * gc.h (SCM_GC_SET_CELL_BVEC): New.
6231 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
6232 Matthias Koeppe!
6233
20703ac4
MV
6234 * __scm.h (SCM_C_INLINE_KEYWORD): New.
6235 * numbers.c: Use it in place of SCM_C_INLINE so that the code
6236 compiles when SCM_C_INLINE is undefined.
6237
59c4bb82
DH
62382003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6239
6240 * __scm.h: Reformulated the architecture and compiler properties
6241 in terms of properties of scm_t_bits and SCM variables rather than
6242 in terms of c standard types. This is since it is not known which
6243 of the standard types scm_t_bits and SCM variables will be defined
6244 to.
6245
d7850c8d
KR
62462003-07-24 Kevin Ryde <user42@zip.com.au>
6247
6248 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
6249 and real.
6250
8a0c514f
KR
62512003-07-18 Kevin Ryde <user42@zip.com.au>
6252
6253 * numbers.c (scm_product): In complex * bignum, correction to
6254 REAL/IMAG fetch, x is the complex, not y.
6255
0aacf84e
MD
62562003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6257
6258 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
6259 scm_inf_p test as Scheme values.
6260 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
6261 and a positive inum.
6262 Use GNU indentation style.
6263
192de9a4
DH
62642003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
6265
6266 * values.c (scm_values): Build lists of length 1 by using
6267 scm_list_1 instead of using scm_cons.
6268
bbb4438a
KR
62692003-07-10 Kevin Ryde <user42@zip.com.au>
6270
b58c85ce
KR
6271 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
6272 * list.c (scm_list_n): Ditto.
6273
bbb4438a
KR
6274 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
6275
287f8ad1
KR
62762003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
6277
6278 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
6279 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
6280 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
6281 the other using intptr_t.
6282
005d2366
KR
62832003-07-08 Kevin Ryde <user42@zip.com.au>
6284
0aacf84e 6285 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
6286 (scm_magnitude): Use hypot.
6287
6288 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
6289 @footnote since it doesn't go through to guile-procedures.txt.
6290
6291 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
6292 outside @var to quieten makeinfo, and use @code.
6293
cbfe8e62
HWN
62942003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6295
6296 * gc-malloc.c (decrease_mtrigger): new function
6297 (increase_mtrigger): new function, separate debug registering and
6298 mtrigger administration.
6299 (scm_gc_realloc): bugfix: do mtrigger administration before the
6300 actual realloc, for the realloc might invalidate a GC-d segment of
6301 memory. Thanks to Sam Hocevar for pointing this out.
6302 (scm_gc_realloc): use scm_malloc_reregister instead of
6303 unregistering and registering in sequence.
6304
aeb4c2e1
HWN
63052003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6306
6307 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
6308
4c27f8d2
HWN
63092003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6310
6311 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6312 clauses.
6313
983e697d
MV
63142003-06-29 Marius Vollmer <mvo@zagadka.de>
6315
6316 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6317 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6318 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6319 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6320 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6321 the release_1_6 branch.
6322
78b6566e
SJ
63232003-06-25 Stefan Jahn <stefan@lkcc.org>
6324
6325 * continuations.c: Redeclaration of getcontext() via the
6326 __asm__ ("getcontext") directive.
6327
6328 * continuations.h: Include <ucontext.h> instead of
6329 <sys/ucontext.h>.
6330
1ebb8497
KR
63312003-06-21 Kevin Ryde <user42@zip.com.au>
6332
6333 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6334 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6335 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6336 available.
6337 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6338 (isfinite): Remove, conflicts with C99 isfinite().
6339
fbf85ba4
MV
63402003-06-19 Marius Vollmer <mvo@zagadka.de>
6341
6342 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6343 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6344 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6345 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6346 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6347 the release_1_6 branch.
6348
fcc5d734
SJ
63492003-06-14 Stefan Jahn <stefan@lkcc.org>
6350
6351 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6352 to be functions instead of macros.
6353
6354 * threads.c: Conditionalized inclusion of <sys/time.h> and
6355 <unistd.h>.
6356 (scm_getspecific, scm_setspecific): Made these two function
6357 real part of the API.
6358
6359 * posix.c (s_scm_putenv): Added some code to make a
6360 (putenv "FOO="), i.e. setting an empty string, work also on
6361 Win32 systems. Thanks to Kevin Ryde for the proposal.
6362
c3ae8e07
KR
63632003-06-12 Kevin Ryde <user42@zip.com.au>
6364
75b14838
KR
6365 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6366 freebsd to comment about need to use unsetenv.
c3ae8e07 6367
9d9fa092
MV
63682003-06-02 Marius Vollmer <mvo@zagadka.de>
6369
6370 * ports.c (scm_peek_char): Safe the column of the port around the
6371 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6372
f2478375
KR
63732003-06-07 Kevin Ryde <user42@zip.com.au>
6374
6375 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6376 and friends required by scm_t_bits setups.
6377
6375e040
DH
63782003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6379
6380 * tags.h (scm_tc2_int): Added.
6381
6382 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6383 scm_tc2_int.
6384
6385 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6386 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6387
f5c6ec2f
DH
63882003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6389
6390 * eval.c: Partially undid my patch from 2003-05-31. This patch
6391 caused the segfault referenced in the previous changelog entry.
6392
47dbd81e
DH
63932003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6394
6395 * tags.h: Fixed comment about the immediate type code layout.
6396
6397 * eval.c: Fixed handling of non-special instructions. Without
6398 this patch, guile will segfault on (#\0) and similar instructions.
6399
3ec52c51
KR
64002003-06-05 Kevin Ryde <user42@zip.com.au>
6401
6402 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6403 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6404
e418bd7c
KR
6405 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6406 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6407
d0624e39
DH
64082003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6409
6410 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6411 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6412 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6413 generalized it to apply not only to C level functions but also to
6414 scheme level functions.
6415
6416 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6417 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6418 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6419 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6420 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6421 respectively.
6422
6423 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6424 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6425 eval.h into eval.c and a copy is placed into deprecated.h.
6426
6427 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6428 into eval.c. This definition was not part of the API in any
6429 officially released version of guile and thus does not need to go
6430 through a phase of deprecation.
6431
e90c3a89
DH
64322003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6433
d0624e39
DH
6434 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6435 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6436 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6437 definitions are make static and renamed from scm_s_xxx to s_xxx.
6438 In deprecated.c the original definitions are copied.
6439
d0624e39
DH
6440 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6441 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6442 eval.h into eval.c and a copy (slightly modified to work in user
6443 code) is placed into deprecated.h.
6444
6445 * eval.c: Use the local static s_xxx definitions instead of the
6446 scm_s_xxx definitions throughout.
6447
14b18ed6
DH
64482003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6449
6450 This set of patches separates the representation of the cxr family
6451 of functions (car, cdr etc.) from the dsubr family of functions
6452 (i. e. functions that take a double precision floating point
6453 argument). Further, the algorithm for handling the cxr function
6454 is improved.
6455
6456 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6457 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6458 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6459 cosh, tanh), objects.c (scm_class_of), procprop.c
6460 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6461 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6462 typecode for the dsubr family of functions.
6463
6464 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6465 ramap_dsubr.
6466
6467 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6468 (scm_init_pairs): Make use of the (now usable) second cell element
6469 of a scm_tc7_cxr function to implement the cxr family of functions
6470 more efficiently.
6471
2ca0d207
DH
64722003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6473
6474 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6475 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6476 end of an if-else-if-sequence of checks.
6477
9a069bdd
DH
64782003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6479
6480 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6481 execution. Generalize apply_closure to apply_proc and use that
6482 for call-with-values.
6483
e910e9d2
DH
64842003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6485
6486 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6487 a non closure.
6488
1e498fbd
SJ
64892003-05-30 Stefan Jahn <stefan@lkcc.org>
6490
6491 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6492 appropriately for mingw32 hosts.
6493
6494 * numbers.h: Defining copysign(), isnan() and finite() to
6495 be prefixed by a single '_' for mingw32 hosts.
6496
c47e2599
KR
64972003-05-30 Kevin Ryde <user42@zip.com.au>
6498
6499 * numbers.c (z_negative_one): New variable.
6500 (scm_init_numbers): Initialize it.
6501 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6502
2e945bcc
SJ
65032003-05-29 Stefan Jahn <stefan@lkcc.org>
6504
6505 * win32-dirent.c: Use malloc() instead of scm_malloc().
6506
6507 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6508 warning.
6509
6510 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6511 mingw32 build.
6512
6513 * modules.c (s_scm_module_import_interface): Renamed local
6514 variable interface to _interface. Seems like 'interface'
6515 is a special compiler directive for the mingw32 compiler.
6516
6517 * mkstemp.c: Provide prototype to avoid compiler warning.
6518
6519 * load.c (s_scm_search_path): Fixed absolute and relative
6520 path detections for native Windows platforms.
6521
6522 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6523 to build on mingw32).
6524
6525 * gc-freelist.c ("s_scm_map_free_list",
6526 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6527
6528 * fports.c (fport_fill_input): Disable use of
6529 fport_wait_for_input() on Win32 platforms.
6530
6531 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6532
6533 * Makefile.am: Modified some rules for cross compiling.
6534
ddd8f927
DH
65352003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6536
6537 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6538 proper function object and the correct number of arguments are now
6539 performed in the application part of SCM_CEVAL.
6540
6541 (scm_badformalsp): Removed.
6542
f8ba2197
DH
65432003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6544
6545 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6546
79f55b7c
MD
65472003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6548
a502595f
MD
6549 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6550 always being false by inserting preprocessor conditional. (Thanks
6551 to Bruce Korb.)
6552
79f55b7c
MD
6553 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6554 (void *) in order to avoid an aliasing warning; thanks to Bruce
6555 Korb.)
6556
6557 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6558
6559 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6560 SCM_STACK_PTR.
6561
6562 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6563 thread->base --> t->base.
6564
6565 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6566
47dee228
MV
65672003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6568
6569 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6570 scm_variable_set_name_hint, scm_builtin_variable,
6571 scm_internal_with_fluids, scm_make_gsubr,
6572 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6573 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6574 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6575 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6576 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6577 scm_make_subr_with_generic, scm_make_subr_opt,
6578 scm_call_catching_errors, scm_make_smob_type_mfpe,
6579 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6580 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6581 branch. Some have been slightly rewritten.
6582 (scm_i_object_chars, scm_i_object_length): New, to support
6583 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6584
e681d187
DH
65852003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6586
6587 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6588 names and inits in the memoized code of do.
6589
7e59d9d4
MD
65902003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6591
6592 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6593 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6594 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6595 a compilation error if error-on-warning is enabled).
6596
9950a42c
MV
65972003-05-17 Marius Vollmer <mvo@zagadka.de>
6598
6599 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6600 removes preprocessor directives from the snarfage that might
6601 otherwise confuse us. These directives appear when compiling with
6602 "-g3", for example.
6603
0068984b
HWN
66042003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6605
26e68795
HWN
6606 * ChangeLog: add my surname
6607
0068984b
HWN
6608 * srcprop.c (scm_finish_srcprop): use
6609 scm_gc_register_collectable_memory()
6610 (scm_make_srcprops): idem.
6611
131805f0
HWN
66122003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6613
6614 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6615 wrap-around for scm_mtrigger
6616 (scm_gc_register_collectable_memory): abort on overflowing
6617 scm_mallocated().
6618
d4611024
KR
66192003-05-13 Kevin Ryde <user42@zip.com.au>
6620
6621 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6622 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6623
7aaf8dc9
MD
66242003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6625
dfd03fb9
MD
6626 * backtrace.c (scm_display_error_message): Introduced fancy
6627 printing with max level 7 and length 10. (Purpose: avoid printing
6628 gigantic objects in error messages.)
6629
6630 * print.c, print.h (scm_i_port_with_print_state): New function.
6631
6632 * print.c (scm_iprin1, scm_printer_apply,
6633 scm_port_with_print_state): Use scm_i_port_with_print_state.
6634 (scm_simple_format): Modified not to destroy print states.
6635 (print_state_mutex): New mutex.
6636 (scm_make_print_state, scm_free_print_state, scm_prin1):
6637 Lock/unlock print_state_mutex.
6638
7aaf8dc9
MD
6639 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6640 Use current names in definitions.
6641
a4d9ffa1
KR
66422003-05-10 Kevin Ryde <user42@zip.com.au>
6643
6644 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6645
d25e96a4
KR
6646 * numbers.c (scm_integer_length): On negative bignums, adjust
6647 mpz_sizeinbase to account for it looking at absolute value where we
6648 want ones-complement.
6649
6650 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6651 since we're only using the ulong return value, and x might not fit.
6652
5bf6a6f0
DH
66532003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6654
6655 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6656 read. This will allow to make the definition in read.c static.
6657
f58c472a
DH
66582003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6659
6660 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6661 from evalext to eval. This will allow to make some of the
6662 definitions in eval.c static.
6663
90382aeb
KR
66642003-05-06 Kevin Ryde <user42@zip.com.au>
6665
6666 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6667 (scm_logcount): Use mpz_com, not mpz_neg.
6668
3b88ed2a
DH
66692003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6670
6671 The purpose of this patch is to make guile's internal memoizers
6672 distinguishable from memoizing macros created on the scheme level
6673 or from user provided primitive memoizing macros. The reason is,
6674 that the internal memoizers are the only ones that are allowed to
6675 transform their scheme input into memoizer byte code, while all
6676 other memoizing macros may only transform scheme code into new
6677 scheme code.
6678
6679 To achieve this, a new macro type 'builtin-macro!' is introduced.
6680 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6681 this will change when the memoizer and executor are separated.
6682
6683 * macros.[ch] (scm_i_makbimacro): New.
6684
6685 * macros.h (SCM_BUILTIN_MACRO_P): New.
6686
6687 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6688
6689 * eval.c, goops.c: All of guile's primitive memoizing macros are
6690 primitive builtin-macros now.
6691
6692 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6693 builtin-macros are handled equally to memoizing macros.
6694
b0780eb1
MV
66952003-05-04 Marius Vollmer <mvo@zagadka.de>
6696
6697 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6698 work around a bug in GCC 2.95.2 but is now a bug in itself.
6699
1cbf4fe9
MV
67002003-05-02 Marius Vollmer <mvo@zagadka.de>
6701
6702 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6703 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6704 scm_tcs_symbols): New.
6705
1a61d41b
MV
67062003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6707
096ecbaf
MV
6708 * deprecated.h, deprecated.c (scm_protect_object,
6709 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6710 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6711 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6712 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6713 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6714 scm_ptob_descriptor, scm_port_rw_active,
6715 scm_close_all_ports_except): New.
6716
1a61d41b
MV
6717 * ports.c (scm_c_port_for_each): New function, mostly copied from
6718 scm_port_for_each.
6719 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6720 * ports.h (scm_c_port_for_each): New prototype.
6721
c8e1d354
MD
67222003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6723
6724 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6725 macro was introduced in anticipation of GOOPS method compilation
6726 code.)
6727
6728 * goops.c: Removed binding of @dispatch.
6729
a4aa2134
DH
67302003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6731
6732 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6733 instructions that bind the macros on the scheme level back to
6734 goops.c in order to make sure again that the bindings go into the
6735 (oop goops) module and are not visible from the outside.
6736
9fbee57e
DH
67372003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6738
6739 * eval.c: Non functional change: Separated R5RS and non-R5RS
6740 macros into different sections of the file and ordered the
6741 memoizers alphabetically.
6742
12841895
DH
67432003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6744
6745 * eval.c (scm_ilookup): Rewritten to improve readability.
6746
6a3f13f0
DH
67472003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6748
6749 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6750 Partially reverted patch from 2003-04-23 in oder to find a better
6751 compromise between readability and debuggability.
6752
b0c5d67b
DH
67532003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6754
6755 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6756 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6757 definitions of the special goops memoizers from goops.[ch] to
6758 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6759 throughout guile.
6760
b9ad392e
MD
67612003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6762
6763 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6764
6765 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6766
6767 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6768
6769 * ioext.c (scm_fdes_to_ports): Ditto.
6770
6771 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6772 lock/unlock scm_i_port_table_mutex.
6773
6774 * strports.c (scm_mkstrport): Ditto.
6775
6776 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6777
6778 * fports.c (scm_fdes_to_port): Ditto.
6779
d0b07b5d
DH
67802003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6781
6782 This set of patches contains no functional changes, only debatable
6783 minor stylistic ones. Still, in order to prepare a patch between
6784 my local copy and the CVS version, I decided to submit the changes
6785 below. Then, the patch will hopefully only contain relevant
6786 modifications :-)
6787
6788 * eval.c (iqq): Added const specifier.
6789
6790 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6791 Use NULL instead of 0 to indicate that a pointer is returned.
6792 Removed some misleading 'fall through' comments.
6793
6794 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6795 Split up long expressions into smaller ones to be more debugging
6796 friendly.
6797
a98e8e98
DH
67982003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6799
6800 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6801 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6802 rather than casting to SCM.
6803
c178c3a6
DH
68042003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6805
6806 * sort.c, pairs.h: Removed unnecessary includes.
6807
d339981a
DH
68082003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6809
6810 * sort.c: Replaced hand-made trampline code by the new official
6811 mechanism from eval.c. This fixes a segfault in the new test file
6812 sort.test.
6813
6814 (quicksort, compare_function, scm_restricted_vector_sort_x,
6815 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6816 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6817 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6818 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6819 eval.c.
6820
6821 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6822 cmp_fun_t): Removed.
6823
6824 (compare_function): Added.
6825
6826 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6827 arithmetics with index arithmetics. Changed quicksort to work on
6828 an array of SCM values instead of an array of characters. Avoid
6829 bytewise copying of SCM elements. Avoid allocating memory on the
6830 stack with alloca. Fixed some comments.
6831
821f18a4
DH
68322003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6833
6834 * eval.c (EXTEND_ENV): Eliminated.
6835
6836 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6837 EXTEND_ENV.
6838
94fb5a6e
DH
68392003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6840
6841 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6842
6843 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6844 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6845
6846 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6847 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6848 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6849 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6850 functions such that they check if the object is a non-immediate.
6851 Further, renamed identifiers to use the scm_dbg_ prefix and made
6852 their inclusion into the lib dependent of the
6853 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6854
fce0b22d
DH
68552003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6856
6857 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6858 debug option.
6859
1685446c
DH
68602003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6861
821f18a4 6862 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6863 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6864 any calls to SCM_NCONSP any more.
6865
6866 * unif.c (l2ra): Eliminate redundant check.
6867
9ff1720f
DH
68682003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6869
6870 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6871 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6872 SCM_NNULLP. Now, guile itself does not include any calls to
6873 SCM_NNULLP any more.
6874
05b15362
DH
68752003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6876
6877 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6878 scm_copy_tree): Place assignment expressions which are part of
6879 other expressions into an expression of their own.
6880
0c88d7df
DH
68812003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6882
6883 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6884 compare SCM values with !=.
6885
5cb22e96
DH
68862003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6887
6888 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6889 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6890 and definition of the memoizer for the generalized set! macro from
6891 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6892 define the macro object.
6893
6894 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6895 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6896 eval.c, it is made static and renamed to s_set_x.
6897
6898 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6899 over SCM_N<foo>.
6900
a44a9715
DH
69012003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6902
6903 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6904 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6905 to undefineds and registered the object as a permanent object.
6906
6907 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6908 static in eval.c, renamed it to f_apply and registered the object
6909 as a permanent object.
6910
1b43d24c
DH
69112003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6912
5cb22e96 6913 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6914 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6915
aec16f99
DH
69162003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6917
6918 * numbers.c (scm_logtest): Fixed argument bug in the call to
6919 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6920
f96460ce
DH
69212003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6922
6923 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6924 type errors that showed up when compiling with SCM_DEBUG defined.
6925
d0f6ceb8
DH
69262003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6927
6928 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6929 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6930 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6931 fix compile errors with --disable-deprecated.
6932
19a7a089
RB
69332003-04-17 Rob Browning <rlb@defaultvalue.org>
6934
6935 * numbers.c (scm_integer_expt): fix case where we were declaring
6936 vars in the middle of a statement block. Thanks to Thamer
6937 Al-Harbash.
6938
47cd67db
MD
69392003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6940
0fd7dcd3
MD
6941 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6942 change.
6943
47cd67db
MD
6944 * eq.c (scm_eqv_p): Turned into a primitive generic.
6945
3b8b889c
RB
69462003-04-16 Rob Browning <rlb@defaultvalue.org>
6947
312006bb
RB
6948 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6949 Thanks to Boyd Gerber.
6950 Added check for __arm__ in addition to arm for LINUX and copied
6951 __s390__ defines from upstream libgc. Thanks to James Treacy for
6952 reporting the problems.
c7ef2ea1 6953
3b8b889c
RB
6954 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6955
6956 * socket.c: use SCM_CHAR_BIT.
6957
6958 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6959
6960 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6961
43261b39
MD
69622003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6963
6964 * feature.c (scm_init_feature): Always add threads feature.
6965
58241edc
MD
69662003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6967
6968 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6969 scm_at_assert_bound_ref. (We don't want the unbound check. See
6970 oop/goops/active-slot.scm.)
6971
94e91275
RB
69722003-04-14 Rob Browning <rlb@defaultvalue.org>
6973
6974 * tags.h: scm_t_intptr should have been intptr_t.
6975
3071ea27
RB
69762003-04-13 Rob Browning <rlb@defaultvalue.org>
6977
6978 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6979 test. Instead use
6980 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6981 as gc_os_dep.c suggests is appropriate.
6982
6983 * goops.c (prep_hashsets): make static to match prototype.
6984 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6985 Chin.
6986
6987 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6988 Albert Chin.
6989
6990 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6991 Klausner.
6992
21ab2aeb
MD
69932003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6994
6995 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6996 indicated through extra fields in getters-n-setters.
6997 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6998 (Thanks to Andy Wingo.)
6999
dff96e95
HWN
70002003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7001
7002 * gc-segment.c: add comment
7003
07921c76
RB
70042003-04-07 Rob Browning <rlb@defaultvalue.org>
7005
b5331f10
RB
7006 * debug.h: change "id" arg name to "info_id" to avoid objective-c
7007 clash.
7008
07921c76
RB
7009 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
7010 and add regression test to standalone/.
7011
70122003-04-06 Rob Browning <rlb@defaultvalue.org>
7013
7014 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
7015 Thanks to Dale P. Smith.
7016
7017 * random.c: #include gmp.h.
7018 (scm_c_random_bignum): normalize result on return.
7019
7020 * init.c: #include gmp.h.
7021
7022 * numbers.h: remove the gmp.h #include (not needed now).
7023
7024 * posix.h: change occurences of "id" to something else so we don't
7025 cause trouble when included via objective-c (can't hurt, might
7026 help). Still have usage in debug.h, though.
7027
938f6b7c
MD
70282003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7029
372691d8
MD
7030 * random.c (scm_c_random_bignum): Don't generate a random number
7031 equal to m (the second argument of scm_c_random_bignum); only
7032 generate numbers in the range 0 <= r < m.
c5f268f8
MD
7033 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
7034 scm_var_random_state.
372691d8 7035
938f6b7c
MD
7036 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
7037 clause.
7038
6cdb8c3f
RB
70392003-04-05 Rob Browning <rlb@defaultvalue.org>
7040
938f6b7c 7041 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
7042 uses before any code.
7043
15635be5
MD
70442003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7045
1ecfd013
MD
7046 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
7047 not top_srcdir.
7048
15635be5
MD
7049 * hashtab.c (rehash_after_gc): Clear to_rehash list before
7050 processing it in order to avoid an infinite loop.
7051
7052 * print.c (scm_prin1): Remember old state of pstate->writingp.
7053
73be1d9e
MV
70542003-04-05 Marius Vollmer <mvo@zagadka.de>
7055
7056 * Changed license terms to the plain LGPL thru-out.
7057
ad815c06
RB
70582003-04-04 Rob Browning <rlb@defaultvalue.org>
7059
7060 * socket.c (FLIPCPY_NET_HOST_128): new macro.
7061 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
7062 rewrite to handle GMP bignums.
7063
7064
7065 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
7066
7067 * ports.c (scm_getc): minor tweak.
7068
7069 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
7070 rewrite to handle GMP bignums.
7071
7072 * numbers.c: rewrite *many* functions to handle GMP bignums.
7073
7074 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
7075 handle GMP bignums.
7076
7077 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
7078
7079 * init.c (check_config): remove SCM_BIGDIG conditionals.
7080 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
7081
7082 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
7083
7084 * eval.c: remove SCM_BIGDIG conditionals.
7085
7086 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
7087
6cdb8c3f
RB
70882003-03-31 Rob Browning <rlb@defaultvalue.org>
7089
7090 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
7091 to Kevin Ryde.)
7092
70932003-03-27 Rob Browning <rlb@defaultvalue.org>
7094
7095 * threads.h: 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 * threads.c: 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 * tags.h: 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 * stacks.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 * stackchk.h: 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 * stackchk.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 * sort.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 * read.c: 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 * random.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 * print.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 * objects.c: fix various preprocessor usages of new public
7136 symbols to expect 0 or 1 values rather than 1 or undefined.
7137 i.e. change #ifdef to #if, etc.
7138
7139 * numbers.h: fix various preprocessor usages of new public
7140 symbols to expect 0 or 1 values rather than 1 or undefined.
7141 i.e. change #ifdef to #if, etc.
7142
7143 * null-threads.c: fix various preprocessor usages of new public
7144 symbols to expect 0 or 1 values rather than 1 or undefined.
7145 i.e. change #ifdef to #if, etc.
7146
7147 * lang.c: fix various preprocessor usages of new public
7148 symbols to expect 0 or 1 values rather than 1 or undefined.
7149 i.e. change #ifdef to #if, etc.
7150
7151 * lang.h: fix various preprocessor usages of new public
7152 symbols to expect 0 or 1 values rather than 1 or undefined.
7153 i.e. change #ifdef to #if, etc.
7154
7155 * iselect.h: fix various preprocessor usages of new public
7156 symbols to expect 0 or 1 values rather than 1 or undefined.
7157 i.e. change #ifdef to #if, etc.
7158
7159 * init.c: fix various preprocessor usages of new public
7160 symbols to expect 0 or 1 values rather than 1 or undefined.
7161 i.e. change #ifdef to #if, etc.
7162
7163 * gh_data.c: fix various preprocessor usages of new public
7164 symbols to expect 0 or 1 values rather than 1 or undefined.
7165 i.e. change #ifdef to #if, etc.
7166
7167 * gh.h: fix various preprocessor usages of new public
7168 symbols to expect 0 or 1 values rather than 1 or undefined.
7169 i.e. change #ifdef to #if, etc.
7170
7171 * gen-scmconfig.c: change most new public symbols to be defined to
7172 0 or 1 rather than being either 1 or undefined.
7173
7174 * gc_os_dep.c: fix various preprocessor usages of new public
7175 symbols to expect 0 or 1 values rather than 1 or undefined.
7176 i.e. change #ifdef to #if, etc.
7177 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
7178
7179 * gc.h: fix various preprocessor usages of new public
7180 symbols to expect 0 or 1 values rather than 1 or undefined.
7181 i.e. change #ifdef to #if, etc.
7182
7183 * gc-card.c: fix various preprocessor usages of new public
7184 symbols to expect 0 or 1 values rather than 1 or undefined.
7185 i.e. change #ifdef to #if, etc.
7186
7187 * gc-mark.c: fix various preprocessor usages of new public
7188 symbols to expect 0 or 1 values rather than 1 or undefined.
7189 i.e. change #ifdef to #if, etc.
7190
7191 * feature.c: fix various preprocessor usages of new public
7192 symbols to expect 0 or 1 values rather than 1 or undefined.
7193 i.e. change #ifdef to #if, etc.
7194
7195 * evalext.c: fix various preprocessor usages of new public
7196 symbols to expect 0 or 1 values rather than 1 or undefined.
7197 i.e. change #ifdef to #if, etc.
7198
7199 * eval.h: fix various preprocessor usages of new public
7200 symbols to expect 0 or 1 values rather than 1 or undefined.
7201 i.e. change #ifdef to #if, etc.
7202
7203 * eval.c: fix various preprocessor usages of new public
7204 symbols to expect 0 or 1 values rather than 1 or undefined.
7205 i.e. change #ifdef to #if, etc.
7206
7207 * eq.c: fix various preprocessor usages of new public
7208 symbols to expect 0 or 1 values rather than 1 or undefined.
7209 i.e. change #ifdef to #if, etc.
7210
7211 * coop.c: fix various preprocessor usages of new public
7212 symbols to expect 0 or 1 values rather than 1 or undefined.
7213 i.e. change #ifdef to #if, etc.
7214
7215 * coop-threads.c: fix various preprocessor usages of new public
7216 symbols to expect 0 or 1 values rather than 1 or undefined.
7217 i.e. change #ifdef to #if, etc.
7218
7219 * coop-pthreads.c: fix various preprocessor usages of new public
7220 symbols to expect 0 or 1 values rather than 1 or undefined.
7221 i.e. change #ifdef to #if, etc.
7222
7223 * coop-defs.h: fix various preprocessor usages of new public
7224 symbols to expect 0 or 1 values rather than 1 or undefined.
7225 i.e. change #ifdef to #if, etc.
7226
7227 * convert.i.c: fix various preprocessor usages of new public
7228 symbols to expect 0 or 1 values rather than 1 or undefined.
7229 i.e. change #ifdef to #if, etc.
7230
7231 * continuations.c: fix various preprocessor usages of new public
7232 symbols to expect 0 or 1 values rather than 1 or undefined.
7233 i.e. change #ifdef to #if, etc.
7234
7235 * _scm.h: fix various preprocessor usages of new public symbols to
7236 expect 0 or 1 values rather than 1 or undefined. i.e. change
7237 #ifdef to #if, etc.
7238
d11d697a
MV
72392003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7240
9686f86d
MV
7241 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
7242
7243 * deprecated.c, deprecated.h: New files, to collect deprecated
7244 things in one place.
7245 * Makefile.am: Added them in all the right places.
7246
d11d697a
MV
7247 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
7248 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
7249 builds work.
9686f86d
MV
7250 (DOT_X_FILES): Removed "iselect.x".
7251 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 7252
e3c0c3b9
RB
72532003-03-25 Rob Browning <rlb@defaultvalue.org>
7254
7255 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
7256 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
7257
7258 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
7259
7260 * vports.c: #include <config.h> if HAVE_CONFIG_H.
7261
7262 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
7263 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7264
7265 * threads.h: replace usage of struct timespect with
7266 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
7267 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
7268 favor of scm_t_timespec from scmconfig.h.
7269
7270 * threads.c: move libguile/_scm.h include to the top so we pick up
7271 any critical defines like _GNU_SOURCE early. Replace usage of
7272 struct timespect with scm_t_timespec. Replace usage of
7273 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
7274 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
7275
7276 * threads-plugin.h: replace usage of struct timespect with
7277 scm_t_timespec.
7278
7279 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
7280 usage of struct timespect with scm_t_timespec.
7281
7282 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
7283 HAVE_INTTYPES_H handling to scmconfig.h. #include
7284 "libguile/__scm.h". Rework handling for scm_t_bits,
7285 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7286 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
7287 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
7288 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
7289 SCM_HAVE_ARRAYS.
7290
7291 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
7292
7293 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7294
7295 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7296
7297 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7298
7299 * stime.h: move handling of time related headers to scmconfig.h.
7300
7301 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7302
7303 * stacks.c: replace usage of STACK_GROWS_UP with
7304 SCM_STACK_GROWS_UP.
7305
7306 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7307 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7308
7309 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7310 of uint32 and HAVE_UINT_32 with scm_t_int32.
7311
7312 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7313
7314 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7315
7316 * script.c: #include <config.h> if HAVE_CONFIG_H.
7317
7318 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7319
7320 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7321
7322 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7323
7324 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7325
7326 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7327
7328 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7329
7330 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7331 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7332 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7333 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7334
7335 * ramap.c: replace usage of HAVE_LONG_LONGS with
7336 "SCM_SIZEOF_LONG_LONG != 0".
7337
7338 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7339 "libguile/scmconfig.h".
7340
7341 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7342
7343 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7344 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7345
7346 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7347
7348 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7349
7350 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7351
7352 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7353 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7354 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7355 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7356 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7357 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7358 "SCM_SIZEOF_LONG_LONG != 0".
7359
7360 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7361 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7362 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7363 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7364
7365 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7366
7367 * null-threads.h: replace usage of struct timespect with
7368 scm_t_timespec.
7369
7370 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7371
7372 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7373 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7374 scm_t_uint64 and rename usages.
7375
7376 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7377
7378 * load.c: #include <config.h> if HAVE_CONFIG_H.
7379
7380 * iselect.h: move handling of time related headers to scmconfig.h.
7381 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7382 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7383 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7384
7385 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7386 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7387 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7388
7389 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7390
7391 * inline.h: #include "libguile/__scm.h" at the top. Change code
7392 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7393 what to do instead of creating a new public #define. Rename usage
7394 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7395 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7396 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7397
7398 * inline.c: rearrange handling -- now we just #define
7399 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7400 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7401 appropriate, and we use that in inline.h along with the above
7402 define to determine how to respond.
7403
7404 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7405 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7406
7407 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7408
7409 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7410 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7411
7412 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7413
7414 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7415
7416 * gen-scmconfig.c: new file -- see comments in file for details.
7417
7418 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7419
7420 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7421 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7422
7423 * gc.h: replace usage of SIZEOF_LONG with
7424 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7425 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7426 since we handle that in scmconfig.h now.
7427
7428 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7429
7430 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7431 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7432 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7433
7434 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7435
7436 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7437 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7438
7439 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7440
7441 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7442
7443 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7444 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7445
7446 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7447
7448 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7449 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7450
7451 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7452 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7453 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7454 with "SCM_SIZEOF_LONG_LONG != 0".
7455
7456 * error.c: #include <config.h> if HAVE_CONFIG_H.
7457
7458 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7459 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7460 with "SCM_SIZEOF_LONG_LONG != 0".
7461
7462 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7463
7464 * coop.c: replace usage of struct timespect with scm_t_timespec.
7465 #include <config.h> if HAVE_CONFIG_H.
7466
7467 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7468 usage of struct timespect with scm_t_timespec. Replace usage of
7469 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7470
7471 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7472 usage of struct timespect with scm_t_timespec. Replace usage of
7473 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7474
7475 * coop-defs.h: move handling of time related headers to
7476 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7477 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7478 timespect with scm_t_timespec.
7479
7480 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7481
7482 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7483
7484 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7485 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7486
7487 * continuations.c: move libguile/_scm.h include to the top so we
7488 pick up any critical defines like _GNU_SOURCE early.
7489
7490 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7491
7492 * async.c: #include <config.h> if HAVE_CONFIG_H.
7493
7494 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7495
7496 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7497 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7498
7499 * __scm.h: move libguile/scmconfig.h include up to the top, so
7500 we're sure to pick up any critical defines like _GNU_SOURCE early.
7501 #include <limits.h> removed in favor of scmconfig.h inclusion when
7502 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7503 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7504 scmconfig.h inclusion when appropriate. Various Win32 related
7505 definitions removed in favor of scmconfig.h inclusion when
7506 appropriate.
7507 (HAVE_UINTPTR_T): definition removed (see NEWS).
7508 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7509 (HAVE_LONG_LONGS): definition removed (see NEWS).
7510 (HAVE_LONG_LONG): definition removed (see NEWS).
7511 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7512
7513 * Makefile.am: scmconfig.h is now generated by building and
7514 running gen-scmconfig.h and capturing its output. gen-scmconfig
7515 uses config.h and the configure.in generated gen-scmconfig.h to
7516 decide what to output. See gen-scmconfig.c for details.
7517 (noinst_PROGRAMS): add gen-scmconfig.
7518 (gen_scmconfig_SOURCES): new variable.
7519 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7520 cross-compiling right.
7521 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7522 (BUILT_SOURCES): add scmconfig.h.
7523
25e0bf97
MV
75242003-03-19 Marius Vollmer <mvo@zagadka.de>
7525
7526 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7527 Adrian Bunk. Thanks!
7528
74b6d6e4
MD
75292003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7530
7531 * goops.c (make_class_from_template): New fourth arg:
7532 applicablep.
7533 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7534 cpls.
7535
7536 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7537
7538 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7539 second arg: applicablep.
7540 (scm_i_inherit_applicable): New function.
7541
7542 * goops.c, goops.h (scm_class_applicable,
7543 scm_class_extended_accessor): New classes.
7544
5c9e7dad
DH
75452003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7546
7547 * procs.c (scm_procedure_documentation): Removed redundant
7548 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7549 predicates.
7550
f8af5c6d
MD
75512003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7552
c614a00b
MD
7553 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7554
109c2c9f
MD
7555 * modules.c (scm_module_import_interface): New function.
7556
f8af5c6d
MD
7557 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7558 scm_class_accessor.
7559 (scm_class_accessor): New class.
7560
a48d60b1
MD
75612003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7562
7563 * goops.c (scm_primitive_generic_generic): Enable primitive
7564 generic if not enabled.
7565 (scm_sys_goops_loaded): Setup unextended primitive generics.
7566
7567 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7568
7569 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7570 snarf macros.
7571
7572 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7573 testing example. All uses of SCM_GPROC should be converted.)
7574
7575 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7576 scm_assoc.
7577
7578 * eq.c (scm_equal_p): Turned into a primitive generic.
7579
84edc049
RB
75802003-02-27 Rob Browning <rlb@defaultvalue.org>
7581
7582 * Makefile.am (scmconfig.h): new target -- generate file from
7583 ../config.h.
7584 (modinclude_HEADERS): remove version.h.
7585 (nodist_modinclude_HEADERS): add version.h.
7586
ea5c9285
MD
75872003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7588
b4a1358c
MD
7589 This fixes a serious GC bug, introduced during the latest
7590 reorganization of the GC, which disabled freeing of structs and
7591 GOOPS objects:
7592
7593 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7594 SCM_EOL.
53af8255
MD
7595 (scm_struct_prehistory): Move scm_free_structs to
7596 scm_before_mark_c_hook.
ea5c9285 7597
b4a1358c
MD
7598 * gc-card.c (sweep_card): Check that we haven't swept structs on
7599 this card before. That can happen if scm_i_sweep_all_segments has
7600 been called from some other place than scm_igc.
7601
c35738c1
MD
76022003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7603
231a4ea8
MD
7604 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7605 (since hash tables now adapt their size).
7606
7607 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7608 (current number of prehistory bindings; hashtable code will select
7609 a prime which is greater than this value).
7610
7611 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7612 (current number of initial symbols).
7613
7614 * properties.c (scm_init_properties): Don't specify size of
7615 scm_properties_whash.
7616
7617 * objprop.c (scm_init_objprop): Don't specify size of
7618 scm_object_whash.
7619
7620 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7621
c35738c1
MD
7622 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7623
7624 The following changes introduce the use of resizable hash tables
7625 throughout Guile. It also renames the old *-hash-table* functions
7626 to *-alist-vector* and places them, together with the rest of the
7627 weak vector support, in the module (ice-9 weak-vector). We should
7628 probably introduce a new, better, API for weak references, for
7629 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7630 look like and are used like ordinary pairs.)
7631
7632 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7633 leaf_environment_fold, obarray_remove_all): Use hashtable
7634 accessors.
7635
7636 * gc.c (scm_init_storage): Moved hook initialization to
7637 scm_storage_prehistory.
7638 (scm_storage_prehistory): New function.
7639 (scm_igc): Added commentary about placement of
7640 scm_after_sweep_c_hook.
7641
7642 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7643 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7644 SCM_WVECT_WEAK_VALUE_P.
7645
7646 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7647 functions.
7648 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7649 Removed.
7650 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7651 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7652
7653 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7654 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7655
7656 * modules.c (module-reverse-lookup): Use hashtable accessors.
7657
7658 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7659
7660 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7661 scm_make_weak_value_alist_vector,
7662 scm_make_doubly_weak_alist_vector): New functions.
7663
7664 * weaks.c (scm_init_weaks_builtins): New function.
7665
7666 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7667 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7668 SCM_WVECT_NOSCAN_P): New macros.
7669
7670 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7671 and SCM_WVECT_WEAK_VALUE_P.
7672
7673 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7674 allocate_weak_vector and exported.
7675
0a4c1355
MD
76762003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7677
7678 * hashtab.c: Undid thread safety. (We decided that it's better to
7679 let the user explicitly protect the tables (or not) according what
7680 is suitable for the application.)
7681
87ca11ff
MD
76822003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7683
7684 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7685 thread safe and handle resizing tables.
7686 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7687 SCM_DEFER/ALLOW_INTS.
7688
f59a096e
MD
76892003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7690
7691 * hashtab.c (scm_vector_to_hash_table,
7692 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7693 functions.
7694 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7695 safe and handle resizing tables.
7696
7697 * weaks.c (scm_make_weak_key_hash_table,
7698 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7699 Size argument made optional. Return resizable table if not
7700 specified.
7701
4b612c5b
MD
77022003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7703
7704 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7705 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7706
b3d7f6df
MD
77072003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7708
7709 * debug.c (scm_procedure_source): Handle all objects for which
7710 procedure? is #t. (Thanks to Bill Schottstaedt.)
7711
756414cf
MD
77122003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7713
361d631f
MD
7714 * futures.c (mark_futures): Don't need to mark data of recycled
7715 futures.
7716 (scan_futures, cleanup_undead): Be smarter about marking
7717 futures---avoid unnecessary passes through future lists.
7718
756414cf
MD
7719 * futures.h, futures.c: New files; Introduced recycling of
7720 futures. For fine-grained threading this lifts performance to
7721 another level. We can now use parallelization in inner loops of
7722 Guile programs without impossible overhead.
7723
7724 * threads.h, threads.c: Moved futures to their own file.
7725
7726 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7727 (DOT_X_FILES): Added futures.x.
7728 (DOT_DOC_FILES): Added futures.doc.
7729 (modinclude_HEADERS): Added futures.h.
7730
7731 * threads.c, threads.h (scm_i_create_thread): Renamed from
7732 create_thread and made global.
7733
7734 * futures.c (scm_make_future): New procedure.
7735
7736 * eval.c: #include "libguile/futures.h".
7737
7738 * init.c: #include "futures.h"
7739 (scm_init_guile_1): Call scm_init_futures.
7740
7741 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7742
7743 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7744
7745 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7746 functions.
7747
7748 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7749
b4debead
MD
77502003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7751
7752 * threads.c (create_thread): Don't unwind dynwind chain of parent
7753 thread before creation. Just start the new thread with an empty
7754 dynwind chain.
7755
93f26b7b
MD
77562003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7757
7758 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7759
38d8927c
MD
77602003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7761
41c96c32
MD
7762 * threads.c (scm_timed_wait_condition_variable): Support timed
7763 waiting also for simple condition variables.
7764
38d8927c
MD
7765 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7766 of calling the procedure change-object-class.
7767
9cf5d9b7
MD
77682003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7769
7770 * ramap.c (scm_ramapc): Typo in error message.
7771
bbf8d523
MD
77722003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7773
b46fae00
MD
7774 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7775 slots with instance allocation.
7776
bbf8d523
MD
7777 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7778 class.
7779 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7780
7781 * goops.c (scm_generic_function_methods): Support extended
7782 generic functions.
7783
ebf9b47c
MD
77842002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7785
7786 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7787 Thanks to Neil for pointing this out!
ebf9b47c 7788
14a9ba3f
NJ
77892002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7790
7791 * lang.h: Remove declarations matching definitions removed from
7792 lang.c (just below).
7793
c6a040a8
NJ
77942002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7795
6054d805
NJ
7796 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7797 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7798 and already commented out.
7799
c6a040a8
NJ
7800 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7801 scm_lreadparen): Support reading vectors with Elisp syntax if
7802 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7803 is not currently defined, and there isn't even a configure switch
7804 to enable it yet.)
7805
3742c12f
MV
78062002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7807
7808 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7809 builds work.
7810 (EXTRA_DIST): Added version.h.in.
7811
fb50ef08
MD
78122002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7813
7814 This change makes it possible for one thread to do lazy sweeping
7815 while other threads are running. Now only the mark phase need to
7816 have all threads asleep. We should look further into this issue.
7817 Presently, I've put the locking of scm_i_sweep_mutex at
7818 "conservative" places due to my current lack of knowledge about
7819 the garbage collector. Please feel free to restrict these regions
7820 further to allow for maximal parallelism!
7821
7822 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7823
7824 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7825 scm_gc_register_collectable_memory): Substitute locking of
7826 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7827 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7828 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7829 the single-thread section (which now only contains the mark
7830 phase).
7831 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7832 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7833
7834 * threads.c (gc_section_mutex): Removed.
7835
9ed24633
MD
78362002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7837
0d48aca5
MD
7838 * threads.c (create_thread): Clear parent field in root state in
7839 order not to unnecessarily remember dead threads.
7840
9ed24633
MD
7841 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7842 (scm_trampoline_1, scm_trampoline_2): Use them.
7843
29717c89
MD
78442002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7845
7846 Partial introduction of real plugin interface.
7847
7848 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7849 (EXTRA_DIST): Added threads-plugin.c.
7850
7851 * threads-plugin.h, threads-plugin.c: New files.
7852
7853 * threads.h: #include "libguile/threads-plugin.h".
7854
7855 * threads.c: #include "libguile/threads-plugin.c".
7856
7857 * pthread-threads.c: Temporarily remove debugging functions.
7858
7859 * threads.c, threads.h (scm_yield): Added back.
7860
e29e0b09
MD
78612002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7862
7863 * threads.c (really_launch): Detach before unlocking
7864 thread_admin_mutex in order not to risk being joined.
7865 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7866 thread_admin_mutex locked during GC.
7867
7868 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7869 functions.
7870
0b6843b1 78712002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7872
6da2dfc4
MD
7873 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7874 support for debugging mutex operations.
7875
1b92fb6b
MD
7876 * threads.c (scm_thread): Removed filed joining_threads.
7877 (thread_print): Print thread number as well as address of thread
7878 structure.
0b6843b1
MD
7879 (scm_join_thread): Bugfix.
7880 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7881 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7882 scm_broadcast_condition_variable): Use the low-level API.
7883 (scm_all_threads): Return copy of thread list (to prevent
7884 unintended destruction).
7885 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7886
93cd4dcd
MD
7887 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7888 pthread "native" recursive mutex support.
7889
2ff4f181
MD
78902002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7891
28d52ebb
MD
7892 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7893 Simply lock a thread C API recursive mutex.
7894 (SCM_NONREC_CRITICAL_SECTION_START,
7895 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7896 SCM_REC_CRITICAL_SECTION_END): Removed.
7897
7898 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7899 direct calls to scm_rec_mutex_lock / unlock around the three calls
7900 to scm_m_expand_body.
7901
7902 * eval.c, eval.h (promise_free): New function.
7903 (scm_force): Rewritten; Now thread-safe; Removed
7904 SCM_DEFER/ALLOW_INTS.
7905
7906 * pthread-threads.h: Added partially implemented plugin interface
7907 for recursive mutexes. These are, for now, only intended to be
7908 used internally within the Guile implementation.
7909
7910 * pthread-threads.c: New file.
7911
7912 * threads.c: Conditionally #include "pthread-threads.c".
7913
7914 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7915 thread-safe;
7916
7917 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7918 SCM_GLOBAL_REC_MUTEX): New macros.
7919
7920 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7921 macros---use mutexes instead.
7922
7923 * tags.h (SCM_IM_FUTURE): New tag.
7924
7925 * eval.c (scm_m_future): New primitive macro.
7926 (SCM_CEVAL): Support futures.
7927 (unmemocopy): Support unmemoization of futures.
7928
7929 * print.c (scm_isymnames): Name of future isym.
7930
2ff4f181
MD
7931 * version.c: Unmade some changes to my private copy that got
7932 committed by mistake.
7933
392d2833
MD
79342002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7935
e200ddee
MD
7936 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7937 2002-12-10.
7938
392d2833
MD
7939 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7940
7941 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7942 logical place.
7943
7944 * threads.c (create_thread): Remember root object until the handle
7945 of the new thread is on all_threads list.
7946
7947 * root.c (scm_make_root): Moved copying of fluids until after
7948 creation of root handle so that the fluids are GC protected. Also
7949 removed the critical section.
7950
c4c52ebe
MD
79512002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7952
960c408c
MD
7953 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7954
3cdde9d6 7955 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7956 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7957 (scm_realloc): Serialize call to realloc
7958 (scm_calloc): Same for calloc.
7959 Thanks to Wolfgang Jaehrling!
7960 (Now we have to make sure all calls to malloc/realloc are made
7961 through scm_malloc.)
7962
960c408c
MD
7963 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7964
c4c52ebe
MD
7965 * threads.c (really_launch): Release heap (to prevent deadlock).
7966 (create_thread): Release heap before locking thread admin mutex.
7967
b0dc3d71
MD
79682002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7969
7970 * threads.c (scm_i_thread_invalidate_freelists): New
7971 function.
7972
7973 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7974
7975 * modules.c (scm_export): Inserted a return statement.
7976
06e80f59
HWN
79772002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7978
7979 * modules.c (scm_export): new function
7980
7981 * gc-card.c: add a note about malloc()/free() overhead.
7982
a12611c3
MD
79832002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7984
7985 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7986 in srcdir.
7987
c7fabadf
MD
79882002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7989
7990 These changes remove scm_ints_disabled (which hasn't has any
7991 effect in Guile for quite some time).
7992
7993 * async.c, error.h (scm_ints_disabled): Removed.
7994
7995 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7996 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7997 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7998 (old_ints): Removed.
7999
8000 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
8001 critical section.
8002 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
8003 SCM_ALLOW_INTS.
8004
9bc4701c
MD
80052002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8006
52340b65
MD
8007 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
8008 Removed accidental #if 0 around these functions.
8009
9bc4701c
MD
8010 These changes are the start of support for preemptive
8011 multithreading. Marius and I have agreed that I commit this code
8012 into the repository although it isn't thoroughly tested and surely
8013 introduces many bugs. The bugs should only be exposed when using
8014 threads, though. Signalling and error handling for threads is
8015 very likely broken. Work on making the implementation cleaner and
8016 more efficient is needed.
8017
8018 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
8019 (SCM_NONREC_CRITICAL_SECTION_START,
8020 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
8021 SCM_REC_CRITICAL_SECTION_END): New macros.
8022 (SCM_CRITICAL_SECTION_START/END): Defined here.
8023
8024 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
8025 the three calls to scm_m_expand_body.
8026
8027 * gc.h: #include "libguile/pthread-threads.h";
8028 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
8029
8030 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
8031 scm_t_key;
8032
8033 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
8034 access.
8035
8036 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
8037
8038 * gc-freelist.c, threads.c (really_launch): Use
8039 SCM_FREELIST_CREATE.
8040
8041 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
8042
8043 * gc.c (scm_i_expensive_validation_check, scm_gc,
8044 scm_gc_for_newcell): Put threads to sleep before doing GC-related
8045 heap administration so that those pieces of code are executed
8046 single-threaded. We might consider rewriting these code sections
8047 in terms of a "call_gc_code_singly_threaded" construct instead of
8048 calling the pair of scm_i_thread_put_to_sleep () and
8049 scm_i_thread_wake_up (). Also, we would want to have as many of
8050 these sections eleminated.
8051
8052 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
8053
8054 * inline.h: #include "libguile/threads.h"
8055
8056 * pthread-threads.h: Macros now conform more closely to the
8057 pthreads interface. Some of them now take a second argument.
8058
8059 * threads.c, threads.h: Many changes.
8060
80612002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8062
8063 * Makefile.am (version.h): Changed $^ --> $< in rule for
8064 version.h.
8065
b2cbe8d8
RB
80662002-12-08 Rob Browning <rlb@defaultvalue.org>
8067
8068 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
8069 (SCM_MINOR_VERSION): use @--@ substitution now.
8070 (SCM_MICRO_VERSION): use @--@ substitution now.
8071 (scm_effective_version): new function prototype.
8072
8073 * version.c (scm_effective_version): new function, also add
8074 effective-version.
8075
8076 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
8077 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
8078 SCM_LIBRARY_DIR.
8079 (version.h): generate this here rather than configure.in. This
8080 approach tracks source edits better (i.e. more immediately).
8081 Might be worth considering for other .in files too.
8082
5441c65c
MV
80832002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
8084
8085 Reorganized thread package selection. A thread package now only
8086 implements a small set of pthread like functions and Guile
8087 implements the rest on top of that. Guile's implementation is
8088 what the "coop-pthreads" package has been previously. Support for
8089 "coop" threads has been removed until I get time to add it again.
8090
8091 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
8092 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
8093 null-threads.c, coop-pthreads.c.
8094 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
8095 pthread-threads.h.
8096
8097 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
8098
8099 * threads.h: Do not include "libguile/coop-defs.h". Include
8100 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
8101 (previously deprecated) C level thread API prototypes. They are
8102 now in the thread package specific headers, "null-threads.h" and
8103 "pthread-threads.h".
8104 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
8105 New.
8106 (scm_threads_init): Removed.
8107 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
8108 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
8109 SCM_I_THREAD_SWITCH_COUNT): Define here.
8110 (scm_single_thread_p): Removed.
8111 (scm_call_with_new_thread): Take two args directly instead of list
8112 of two args.
8113 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
8114 SCM_SET_THREAD_LOCAL_DATA): Define here.
8115
8116 * threads.c: Merged with "coop-pthreads.c".
8117
8118 * null-threads.h: Implement pthread-like API as a set of macros.
8119
8120 * pthread-threads.h: New, implement pthread-like API by deferring
8121 to pthread itself.
8122
8123 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
8124 has been lost in the reorganization.
8125
504d99c5
MD
81262002-12-01 Mikael Djurfeldt <mdj@linnaeus>
8127
8128 The following change makes it possible to move procedure
8129 application dispatch outside inner loops. The motivation was
8130 clean implementation of efficient replacements of R5RS primitives
8131 in SRFI-1.
8132
8133 The semantics is clear: scm_trampoline_N returns an optimized
8134 version of scm_call_N (or NULL if the procedure isn't applicable
8135 on N args).
8136
8137 Applying the optimization to map and for-each increases efficiency
8138 noticeably. For example, (map abs ls) is 8 times faster than
8139 before.
8140
8141 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
8142
8143 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
8144
8145 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
8146 (map, for-each): Handle also application on two args as a special
8147 case; Use trampolines.
8148
8149 Other changes:
8150
8151 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
8152 (subr2oless): Removed.
8153 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
8154 vector GC protected.
8155
8156 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
8157 scm_out_of_range.
8158
63dd3413
DH
81592002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8160
8161 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
8162
4ba5f279
MD
81632002-11-17 Mikael Djurfeldt <mdj@linnaeus>
8164
8165 * debug.c (scm_make_iloc): Added missing "return".
8166
56ae231f
MV
81672002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
8168
8169 * strports.c (scm_eval_string_in_module): Validate second arg to
8170 be a module. Thanks to Arno Peters!
8171
80b28865
DH
81722002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8173
8174 * .cvsignore: remove goops.c
8175
c88b1456
DH
81762002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8177
8178 * modules.c (scm_env_top_level, scm_lookup_closure_module,
8179 module_variable, scm_module_lookup_closure,
8180 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
8181 scm_system_module_env_p): Don't compare SCM values with C
8182 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
8183 over SCM_NFALSEP.
8184
a8a19efc
DH
81852002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8186
8187 * eval.h (SCM_MAKE_ILOC): New macro.
8188
8189 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
8190 the iloc bitpattern here.
8191
76734914
MD
81922002-11-14 Mikael Djurfeldt <mdj@linnaeus>
8193
8194 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
8195 part of the API, otherwise it's difficult to write Guile
8196 extensions using non-blocking I/O => moved #include
8197 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
8198
8199 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
8200 s_unlock_mutex.
8201
8b5b4a75
MV
82022002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
8203
8204 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
8205 are defined in configure.in.
8206
8207 * threads.c: Removed SCM_API from function definitions. SCM_API
8208 is only for declarations.
8209
e5a83084
MD
82102002-11-07 Mikael Djurfeldt <mdj@linnaeus>
8211
9be8bb45
MD
8212 * coop-pthreads.h: Added support for thread specific data to the
8213 generic C API for the coop-pthreads case.
8214
e5a83084
MD
8215 * threads.c, threads.h (scm_cond_init): Undo unintentional API
8216 change.
6c214b62 8217 (scm_cond_broadcast): Added missing function.
e5a83084 8218
7edf178e
MV
82192002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8220
8221 * coop.c (coop_next_runnable_thread): Removed, wich should have
8222 happened when GUILE_ISELECT was hard-wired.
8223
7f5b1b77
MV
82242002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8225
7caa1b07
MV
8226 * Makefile.am (libguile_la_SOURCES): Added threads.c
8227 (DOT_DOC_FILES): Added threads.doc.
8228 (DOT_X_FILES): Added threads.x.
8229 (EXTRA_libguile_la_SOURCES): Removed threads.c.
8230 (noinst_HEADERS): Added coop-pthreads.c.
8231 (modinclude_HEADERS): Added coop-pthreads.h.
8232
8233 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
8234 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
8235
bb11cbf4
MV
8236 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
8237 Thanks to Bill Schottstaedt!
8238
1d4cbbed
MV
8239 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
8240
7f5b1b77
MV
8241 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
8242 SCM_COPT_THREADS is defined.
8243 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
8244 is defined.
8245
8246 * coop-pthreads.c: Some harmless renamings of internal stuff.
8247 (create_thread): New, generalized version of
8248 scm_call_with_new_thread.
8249 (scm_call_with_new_thread): Use it.
8250 (scm_spawn_thread): New, use create_thread.
8251
d52f53b1
MV
82522002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8253
8254 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
8255 start testing it now.
8256
8257 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
8258 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
8259 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
8260 is defined.
8261
30f920c3
MV
82622002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
8263
8264 * scmsigs.c (signal_cell_handlers, install_handler_data,
8265 scm_delq_spine_x, really_install_handler, install_handler): New
8266 scheme for triggering signal handlers, to simplify take_signal.
8267 (take_signal): Simplified, to avoid race conditions.
8268 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
8269 hasn't exited yet.
8270
8271 * async.c (scm_async_click): Reset pending_asyncs, handle
8272 signal_asyncs. Don't set cdr of a non-signal async to #f.
8273 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
8274 always. Set pending_asyncs.
8275 (scm_system_async_mark_for_thread): Check that thread has not
8276 exited.
8277 (scm_unmask_signals, decrease_block): Call scm_async_click after
8278 block_asyncs becomes zero.
8279
8280 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
8281 active_asyncs.
8282
8283 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
8284 fields.
8285 * root.c (root_mark): Mark them.
8286 (make_root): Initialize them.
8287
8288 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
8289 USE_COOP_THREADS.
8290 (scm_internal_select): Define one version for USE_COOP_THREADS and
8291 one for USE_NULL_THREADS.
8292 (scm_init_iselect): Likewise.
8293
8294 * inline.h (scm_cell, scm_double_cell): Also allow
8295 USE_COPT_THREADS to not protect the slot initializers.
8296
8297 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8298 because threads need to be initialized before the stack, but
8299 gsubrs such as scm_timed_condition_variable_wait can only be
8300 created later.
8301
8302 * threads.h: Include "coop-pthreads.h" when requested.
8303 (scm_threads_make_mutex, scm_threads_lock_mutex,
8304 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8305 not implemented anyway.
8306 (scm_init_thread_procs, scm_try_mutex,
8307 scm_timed_condition_variable_wait,
8308 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8309 scm_thread_exited_p): New prototypes.
8310 (struct timespec): Define if not already defined.
8311 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8312 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8313 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8314 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8315 deprecated.
8316
8317 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8318 requested.
8319 (scm_thread_exited_p): New.
8320 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8321 registered procedures.
8322 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8323 Use the latter as the procedure for "wait-condition-variable",
8324 thus offering a optional timeout parameter to Scheme.
8325 (scm_wait_condition_variable): Implement in terms of
8326 scm_timed_wait_condition_variable.
8327 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8328 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8329 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8330 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8331 scm_make_mutex, etc, and deprecate.
8332 (scm_init_threads): Do not create smobs, leave this to
8333 scm_threads_init. Do not include "threads.x" file.
8334 (scm_init_thread_procs): New, include "threads.x" here.
8335
8336 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8337 scm_null_mutex_lock, scm_null_mutex_unlock,
8338 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8339 scm_null_condvar_wait, scm_null_condvar_signal,
8340 scm_null_condvar_destroy): Removed.
8341 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8342 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8343 scm_cond_destory): Do not define, they are now deprecated and
8344 handled by threads.{h,c}.
8345
8346 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8347 (scm_threads_init): Create smobs here, using the appropriate
8348 sizes.
8349 (block): Removed, now unused.
8350 (scm_c_thread_exited_p): New.
8351 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8352 scm_null_mutex_destroy, scm_null_condvar_init,
8353 scm_null_condvar_wait, scm_null_condvar_signal,
8354 scm_null_condvar_destroy): Removed and updated users to do their
8355 task directly.
8356 (scm_try_mutex, timeval_subtract,
8357 scm_timed_wait_condition_variable,
8358 scm_broadcast_condition_variable): New.
8359 (scm_wait_condition_variable): Removed.
8360
8361 * coop-defs.h (coop_m): Added 'level' field.
8362 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8363 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8364 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8365 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8366 define.
8367 (coop_condition_variable_broadcast): New.
8368
8369 * coop-threads.c (scm_threads_init): Create smobs here, using the
8370 appropriate sizes.
8371 (scm_c_thread_exited_p, scm_try_mutex,
8372 scm_timed_wait_condition_variable,
8373 scm_broadcast_condition_variable): New.
8374 (scm_wait_condition_variable): Removed.
8375
8376 * coop.c (coop_new_mutex_init): Initialize level.
8377 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8378 level.
8379 (coop_condition_variable_signal): Renamed to
8380 coop_condition_variable_broadcast and reimplemented in terms of
8381 that. Thus...
8382 (coop_condition_variable_broadcast): New.
8383
8384 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8385
8386 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8387
087ed40d
MV
83882002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8389
65a23095
MV
8390 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8391 of system headers.
8392
087ed40d
MV
8393 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8394 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8395 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8396
5ec1d2c8
DH
83972002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8398
8399 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8400 scm_definedp to scm_defined_p and deprecated scm_definedp.
8401
100ae50d
DH
84022002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8403
8404 * async.h, async.c (scm_system_async): Fixed deprecation to work
8405 correctly when deprecated features are excluded.
8406
2794cb50
MV
84072002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8408
8409 * async.c (scm_system_async_mark_for_thread): Validate thread
8410 argument.
8411
8412 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8413
8414 * feature.c (scm_init_feature): Don't add 'threads' for
8415 USE_NULL_THREADS.
8416
8417 * inline.h (scm_cell, scm_double_cell): Also allow
8418 USE_NULL_THREADS to not protect the slot initializers.
8419
8420 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8421 "USE_THREAD".
8422
8423 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8424 (modinclude_HEADERS): Added null-threads.h.
8425
8426 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8427 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8428 (scm_init_threads): Use generic type names scm_t_mutex and
8429 scm_t_cond instead of coop_m and coop_c.
8430
8431 * null-threads.c, null-threads.h: New files.
8432
ff810d7a
MV
84332002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8434
8435 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8436 This is to support makes that know about "$<" only in pattern
8437 rules, like Sun's make.
8438
a90bdb73
MV
84392002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8440
8441 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8442 substitution. Thanks to David Allouche!
8443
e71a8bf2
DH
84442002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8445
8446 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8447 !SCM_ENABLE_DEPRECATED.
8448
41f77ff5
MV
84492002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8450
504d99c5 8451 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8452 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8453 otherwise.
8454
8455 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8456 USE_THREADS is defined. Use scm_root otherwise.
8457 (scm_sigaction_for_thread): Ignore THREAD argument when
8458 USE_THREADS is not defined. Also, move THREAD argument defaulting
8459 out of HAVE_SIGACTION section, which was a bug.
8460
6d16b125
MV
84612002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8462
8463 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8464 signal_handlers, not the closure that is used as the async.
8465 The closure is stored in signal_handler_cells, as previously.
8466
acfa1f52
MV
84672002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8468
8469 * root.h (scm_root_state): Added 'block_async' slot.
8470 (scm_active_asyncs): Removed abbrev.
8471 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8472
8473 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8474 abbrev.
8475
8476 * async.h (scm_call_with_blocked_asyncs,
8477 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8478 scm_c_call_with_unblocked_asyncs): New prototypes.
8479 (scm_mask_signals, scm_unmask_signals): Deprecated.
8480 (scm_mask_ints): Turned into a macro.
8481 * async.c (scm_mask_ints): Removed.
8482 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8483 this should not be necessary.
8484 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8485 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8486 deprecation warning and check for errornous use. Set block_asyncs
8487 instead of scm_mask_ints.
8488 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8489 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8490 scm_c_call_with_unblocked_asyncs): New.
8491
8492 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8493 Asyncs are enabled by default.
8494
34010f56
NJ
84952002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8496
8497 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8498 6th element: an input waiting thunk.
8499 (sf_input_waiting): New.
8500
9310d6f2
MV
85012002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8502
8503 * root.c (root_mark): Mark active_asyncs slot.
8504
8505 * async.c (scm_async_click): Set the cdr of a executed handler
8506 cell to SCM_BOOL_F, not SCM_EOL.
8507 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8508 and only if the handler procedure is not already present.
8509 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8510 with SCM_BOOL_F.
8511 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8512
ac48c719
RB
85132002-10-04 Rob Browning <rlb@defaultvalue.org>
8514
1360a142
RB
8515 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8516
8517 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8518 scm_lt_dlopenext, and scm_lt_dlerror.
8519 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8520 and scm_lt_dlerror.
8521 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8522 and scm_lt_dlerror.
8523 (sysdep_dynl_init): switch to scm_lt_dlinit();
8524
8525 * Makefile.am (libguile_la_LIBADD): switch to use
8526 libguile-ltdl.la.
8527
504d99c5 8528 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8529
497092c9
MV
85302002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8531
8532 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8533 * scmsigs.c (got_signal): Removed.
8534 (signal_handler_cells, signal_handler_threads): New.
8535 (take_signal): Queue the cell of the signal for the specified
8536 thread. Reset the signal handler on systems that don't have
8537 sigaction.
8538 (sys_deliver_signals): Removed.
8539 (close_1): New.
8540 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8541 extended to also set the thread of a signal and allocate a cell
8542 for it. Keep the Scheme name "sigaction". Check that signum is
8543 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8544 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8545 (scm_init_scmsigs): Allocate signal_handler_cells and
8546 signal_handler_threads vectors.
8547
8548 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8549 that system asnycs and user asyncs are separated. Reimplemented
8550 system asyncs to work per-thread.
8551
8552 * gc.c (scm_init_gc): Do not use scm_system_async.
8553
8554 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8555 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8556 Removed prototypes.
8557 (scm_i_queue_async_cell): New.
8558
8559 * __scm.h (scm_asyncs_pending_p): Removed.
8560 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8561 scm_asyncs_pending_p.
8562
8563 * async.h (scm_system_async_mark_for_thread): New prototype.
8564
8565 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8566
8567 * root.h (scm_root_state): Added new "active_asyncs" slot.
8568 * root.c (scm_make_root): Initialize it to SCM_EOL.
8569
8570 * coop-defs.h (coop_t): Added new "handle" slot.
8571 * coop-threads.c (all_threads, scm_current_thread,
8572 scm_all_threads, scm_i_thread_root): New.
8573 (scm_threads_init): Add main thread to all_threads.
8574 (scheme_launch_thread): Remove thread from all_threads when it
8575 terminates.
8576 (scm_call_with_new_thread): Initialize handle slot of coop_t
8577 structure and add new thread to all_threads.
8578 (scm_spawn_thread): Likewise.
8579
8580 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8581 * threads.c (scm_current_thread, scm_all_threads): Register as
8582 primitives.
8583
8584 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8585
480fa28d
NJ
85862002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8587
8588 * script.c (scm_compile_shell_switches): Fix bad spelling of
8589 `explicitly' in comment.
8590
85912002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8592
8593 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8594 Refer to provided? in doc string rather than deprecated feature?.
8595
3553e1d1
GH
85962002-09-24 Gary Houston <ghouston@arglist.com>
8597
8598 * inline.h (scm_double_cell): prevent reordering of statements
8599 with any following code (for GCC 3 strict-aliasing).
8600 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8601 the earlier version of the reordering prevention.
8602
4ad0814a
HWN
86032002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8604
8605 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8606
e88e4f2e
HWN
86072002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8608
8609 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8610 protection.
8611
1e71eafb
HWN
86122002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8613
8614 * inline.h: include stdio.h
8615
8616 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8617
61ef9c1f
HWN
86182002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8619
dac04e9f
HWN
8620 * gc-segment.c (scm_i_make_initial_segment): check user settings
8621 for sanity.
8622
8623 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8624 sanity.
dac04e9f
HWN
8625
8626 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8627
ffd72400
HWN
8628 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8629
8630 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8631 these won't ever wrap around with high memory usage. Thanks to
8632 Sven Hartrumpf for finding this.
ffd72400 8633
5bd4a949
HWN
8634 * gc-freelist.c: include <stdio.h>
8635
61ef9c1f
HWN
8636 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8637
ffd0ef3b
MV
86382002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8639
a27e3d14
MV
8640 * vectors.h (SCM_VECTOR_REF): New.
8641
ffd0ef3b
MV
8642 * snarf.h (SCM_DEFINE_PUBLIC): New.
8643
f8a1712b
MV
86442002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8645
8646 * socket.c (scm_addr_vector): Added size of address to arguments.
8647 Use it to avoid accessing a non-existent path in a sockaddr_un.
8648 Changed all callers.
8649
7200a36b
HWN
86502002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8651
1383773b
HWN
8652 * gc.h: remove DOUBLECELL card flags.
8653
8654 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8655 scm_realloc().
8656
8657 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8658 init loop; handle this from scm_init_card_freelist()
8659
8660 * gc-card.c (scm_init_card_freelist): init bit vector here.
8661
7200a36b 8662 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8663 num2float.i.c (FLOAT2NUM): idem
7200a36b 8664
9981de3a
HWN
86652002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8666
8667 * eval.h: prepend libguile/ to include path
8668
19647556
MV
86692002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8670
8671 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8672 years. Thanks to Martin Grabmüller!
19647556 8673
38d1262a
HWN
86742002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8675
8676 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8677 unsigned numbers for computing minimum heap increment. This
8678 prevents weird results when a a negative minimum increment is
8679 computed.
8680
f800ebfb
MV
86812002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8682
8683 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8684 instead of the old tricks.
f800ebfb
MV
8685
8686 * guile-snarf.in: Do not expect the input file to be the first
8687 argument after the optional "-o" option, just pass everything to
8688 the pre-processor without extracting the input file name.
8689
4a5309c9
HWN
86902002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8691
8692 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8693 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8694
f2893a25
HWN
86952002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8696
8697 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8698 Bill Schottstaedt for the bug report
8699
483f518b
MV
87002002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8701
8702 * print.c (scm_iprin1): Print primitives generics always as
8703 "primitive-generic" even when they have no primitive methods yet.
8704
917adc55
GH
87052002-08-17 Gary Houston <ghouston@arglist.com>
8706
8707 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8708 call.
8709
67329a9e
HWN
87102002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8711
85835e59 8712 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8713
8714 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8715 malloc.
8716
8717 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8718 only use SCM_MIN_HEAP_SEG_SIZE.
8719
8720 * ports.c (scm_add_to_port_table): add backwards compatibility
8721 function
8722
8723 * ports.h: use scm_i_ prefix for port table and port table size.
8724
f07c886a
MD
87252002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8726
8727 * vports.c (scm_make_soft_port): Initialize pt variable.
8728
dc61cbc6
MV
87292002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8730
8731 * strports.h (scm_c_eval_string_in_module,
8732 scm_eval_string_in_module): New prototypes.
8733 * strports.c (scm_eval_string_in_module): New, but use
8734 "eval-string" as the Scheme name and make second parameter
8735 optional.
8736 (scm_eval_string): Implement using scm_eval_string_in_module.
8737 (scm_c_eval_string_in_module): New.
8738 Thanks to Ralf Mattes for the suggestion!
8739
da220f27
HWN
87402002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8741
be3ff021
HWN
8742 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8743 message and abort.
8744
8745 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8746
da220f27
HWN
8747 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8748 stead of scm_t_port*. The function now takes a tag argument.
8749
eab1b259
HWN
87502002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8751
8752 * gc.h: add scm_debug_cells_gc_interval to public interface
8753
8754 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8755
8756 * gc.c (scm_i_expensive_validation_check): separate expensive
8757 validation checks from cheap ones.
8758
ba1b2226
HWN
87592002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8760
8761 * read.c (scm_input_error): new function: give meaningful error
8762 messages, and throw read-error
8763
8764 * gc-malloc.c (scm_calloc): add scm_calloc.
8765
39e8f371
HWN
87662002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8767
33138b05
HWN
8768 * tags.h: remove GC bits documentation from the tags table.
8769
39e8f371
HWN
8770 * read.c (INPUT_ERROR): Prepare for file:line:column error
8771 messages for errors in scm_lreadr() and friends.
8772
87732002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8774
8775 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8776 implementation).
8777 (scm_gc_calloc): new function
8778
26e68795 87792002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8780
5f16b897
HWN
8781 * ports.c (scm_new_port_table_entry): init port entry to 0
8782 completely.
402788a9
HWN
8783
8784 * ports.c (scm_new_port_table_entry): change function from
8785 scm_add_to_port_table. This prevents cells with null-pointers from
8786 being exposed to GC.
8787
504d99c5 8788 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8789 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8790
504d99c5 8791 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8792 to gc-stats.
8793
c8a1bdc4
HWN
8794 * numbers.c (big2str): return "0" for 0 iso. ""
8795
c2cbcc57
HWN
8796 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8797 private-gc.h: new file
c8a1bdc4
HWN
8798
8799 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8800 sweeping. More documentation in workbook/newgc.text
8801
aea06b34
MV
88022002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8803
8804 * random.c (rstate_free): Return zero.
8805
35060ae9
DH
88062002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8807
8808 * environments.c (remove_key_from_alist): Removed.
8809
8810 (obarray_remove): Simplified.
8811
6a535440
SJ
88122002-07-24 Stefan Jahn <stefan@lkcc.org>
8813
8814 * continuations.h: ia64: Include <signal.h> before
8815 <sys/ucontext.h>.
8816
bcbd25b7
DH
88172002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8818
8819 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8820
26e68795 88212002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8822
8823 * goops.c (scm_compute_applicable_methods): use
8824 scm_remember_upto_here_1 iso scm_remember_upto_here
8825
8826 * macros.c: include deprecation.h
8827
504d99c5 8828 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8829 macro arg.
504d99c5 8830 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8831
8832 * net_db.c, posix.c, socket.c: variable naming: change ans to
8833 result.
8834
8835 * sort.c (scm_merge_vector_x): accept vector as argument
8836 iso. SCM*. This is needed for full GC correctness.
8837
8838 * gc.h: undo previous undocumented changes related to #ifdef
8839 GENGC.
8840
26e68795 88412002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8842
8843 * *.c: add space after commas everywhere.
8844
8845 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8846 Document cases where SCM_WRITABLE_VELTS() is used.
8847
8848 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8849 SCM_VELTS() return a const pointer
8850 (SCM_VECTOR_SET): add macro.
8851
3063e30a
DH
88522002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8853
8854 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8855 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8856 Deprecated the special kind of built-in dynamic syntax transformer
8857 that was inaccurately named "macro". Note: The built-in syntax
8858 transformers that are named "mmacro" or "memoizing-macro" still
8859 exist, and it is these which come much closer to what one would
8860 call a macro.
8861
4c5f8e8f
NJ
88622002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8863
8864 * eval.c (unmemocopy): Fix for
8865 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8866 with internal definitions and local-eval).
8867
4f6f9ae3
GH
88682002-07-12 Gary Houston <ghouston@arglist.com>
8869
8870 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8871 defined. They don't do anything useful, especially since the
8872 only case where DYNAMIC_LINKING is undefined seems to be
8873 when --with-modules=no is given to configure, which is basically
8874 requesting that the "dynamic linking module" be omitted.
8875
8876 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8877 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8878
8879 * extensions.c (load_extension): check DYNAMIC_LINKING for
8880 scm_dynamic_call.
8881 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8882 scm_init_dynamic_linking.
8883
c21935e6
MV
88842002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8885
8886 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8887 check for Cygwin when including <winsock2.h>, this is already
8888 check for by configure. Thus, revert change from 2002-07-07.
8889
ee95d597
GH
88902002-07-10 Gary Houston <ghouston@arglist.com>
8891
9540b68f 8892 * eq.c: include <string.h>
ee95d597
GH
8893 * dynl.c: docstring editing.
8894
46732b54
GH
88952002-07-09 Gary Houston <ghouston@arglist.com>
8896
8897 * dynl.c (scm_dynamic_call): docstring editing.
8898
c09d12e0
RB
88992002-07-08 Rob Browning <rlb@defaultvalue.org>
8900
8901 * gc_os_dep.c: HURD fixes.
8902
3f6571eb
MV
89032002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8904
8905 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8906
8907 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8908 this should be compiled for BUILD host.
8909 Override default rule for
8910 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8911 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8912 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8913
8914 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8915 <winsock2.h> on Cygwin even when we have it.
8916
bd987b8e
DH
89172002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8918
8919 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8920 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8921 the code. Full number of arguments checking of closures is
8922 mandatory now. However, the option to disable the checking has
8923 most probably not been used anyway.
8924
8505e285
DH
89252002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8926
bd987b8e
DH
8927 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8928 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8929 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8930 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8931 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8932 (scm_source_properties, scm_set_source_properties_x,
8933 scm_source_property): Removed compile time option SCM_RECKLESS to
8934 clean up the code. Full number of arguments checking of closures
8935 is mandatory now. However, the option to disable the checking has
8936 most probably not been used anyway.
8505e285
DH
8937
8938 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8939 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8940
2ee08a28
GH
89412002-06-30 Gary Houston <ghouston@arglist.com>
8942
732b9327
GH
8943 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8944 do anything useful. Added a comment about need for a mutex if
8945 pre-emptive threading is supported.
8946
2ee08a28
GH
8947 * posix.c (scm_convert_exec_args), dynl.c
8948 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8949 allocate_string_pointers. 2) simplified: don't reallocate the
8950 strings, just make an array of pointers 3) avoid memory leaks on
8951 error 4) let the procedure report errors in its own name.
8952 Consequences: 1) the procedures now assume that SCM strings are
8953 nul-terminated, which should always be the case. 2) Since strings
8954 are not reallocated, it's now possible for strings passed to
8955 dynamic-args-call to be mutated.
8956
c136c920
DH
89572002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8958
8959 * __scm.h, eval.c, eval.h: Removed compile time option
8960 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8961 variable positions during memoization is mandatory. However, the
8962 option to disable the caching has most probably not been used
8963 anyway.
8964
e540802f
MV
89652002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8966
8967 * print.c (scm_simple_format): Print missing part of format before
8968 ~% control. Thanks to Daniel Skarda!
8969
4c1ffcdd
MV
89702002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8971
8972 * mkstemp.c: Added exception notice to license statement.
8973
ba1b077b
MV
89742002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8975
8dc434c7
MV
8976 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8977 it is represented as a floating point value so that we can change
8978 its sign.
8979
ba1b077b
MV
8980 From John W. Eaton <jwe@bevo.che.wisc.edu>
8981
8982 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8983
74c58131
TTN
89842002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8985
8986 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8987 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8988
8766d4b5
MV
89892002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8990
8991 * eq.c (real_eqv): New.
8992 (scm_eqv_p): Use it when comparing reals and complexes.
8993
8994 * numbers.c: Include <string.h>, for strncmp.
8995 (mem2complex): Do not create negative NaNs.
8996 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8997 NaN.
8998 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8999
1d8c3cad
MV
90002002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
9001
9002 * posix.c (scm_putenv): Handle removing variables explicitely by
9003 calling unsetenv.
9004
9005 From John W. Eaton.
74c58131 9006
1d8c3cad
MV
9007 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
9008 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
9009 and scm_nan.
9010 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
9011 [SCO && ! HAVE_ISINF] (isinf): New function.
9012 (xisinf, xisnan): New functions.
9013 (IS_INF): Delete.
9014 (isfinite): Define in terms of xisinf.
9015 (scm_inf_p, scm_nan_p): New functions.
9016 (guile_Inf, guile_NaN): New file-scope vars.
9017 (guile_ieee_init): New function.
9018 (scm_inf, scm_nan): New functions.
9019 (idbl2str): Handle Inf and NaN. Remove funny label and
9020 corresponding gotos.
9021 (ALLOW_DIVIDE_BY_ZERO): New macro.
9022 (scm_divide): Allow division by zero to occur if
9023 ALLOW_DIVIDE_BY_ZERO is defined.
9024 Handle bignums and ints as special cases.
9025
9026 Additional stuff by me:
9027
9028 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
9029 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
9030 (iflo2str): Don't output a '+' for negative numbers or for Inf and
9031 NaN. They will provide their own sign.
9032 (scm_divide): Only allow divides by inexact zeros. Dividing by
9033 exact zeros still signals an errors.
74c58131 9034
7a0c65eb
TTN
90352002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
9036
87b72063 9037 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 9038 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 9039 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
9040 Thanks to Andreas Rottmann.
9041
5e423a39
GH
90422002-04-20 Gary Houston <ghouston@arglist.com>
9043
9044 * removal of unused fields in root state (thanks to Christopher
9045 Cramer for pointing out the disuse.)
9046 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 9047 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 9048
5e423a39
GH
9049 * root.c (root_mark): don't mark them.
9050 (scm_make_root): don't set them to #f.
9051 * init.c (scm_init_standard_ports): don't initialise with the
9052 default ports.
9053
9d2cce76
MV
90542002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
9055
9056 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
9057 cpp_sig_symbols.c.
9058
90592002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
9060
9061 * guile-snarf.in: Do not clean input file. This would write to
9062 the $(srcdir) during a VPATH build, which is not allowed. It also
9063 isn't needed since it only works when an output filename has been
9064 specified and in that case we don't need to clean the input file
9065 because the output file will already exist.
9066
6f79b6cc
MV
90672002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
9068
9069 * guile-snarf: Install the trap for removing $cleanfile only when
9070 the value of $cleanfile is actually known.
9071
21550b10
RB
90722002-04-10 Rob Browning <rlb@defaultvalue.org>
9073
9074 * .cvsignore: add versiondat.h and *.c.clean.c.
9075
bc76d628
DH
90762002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9077
9078 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
9079 function, replaces macro SRCBRKP.
9080
9081 (SRCBRKP): Deprecated.
9082
9083 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
9084 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
9085 temporary variable.
9086
5132eef0
DH
90872002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9088
9089 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
9090 CHECK_EXIT and removed all references to them.
9091
680516ba
DH
90922002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
9093
9094 * debug.h (scm_ready_p, debug_print): Removed declarations.
9095
9096 * eval.c (EVALCELLCAR): Removed.
9097
9098 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
9099 operation from condition.
9100
e2bd68e0
MV
91012002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
9102
9103 * guile-snarf.in: When the output filename is "-", write to
9104 stdout. When no "-o" option is given, use "-" as the output
9105 filename (i.e., stdout). Only 'clean' the inputfile or remove the
9106 output file on error when the output file name is not "-". Define
9107 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
9108
9109 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
9110
ab1f1094
DH
91112002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9112
9113 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
9114 and the corresponding goto statements. Removed redundant code.
9115
42030fb2
DH
91162002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9117
9118 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
9119 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
9120 Re-enabled handing of rpsubrs and asubrs.
9121
e050d4f8
DH
91222002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
9123
9124 * eval.c (SIDEVAL): Removed.
9125
9126 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
9127 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
9128 argument checking order for set! to locals, variables and symbols.
9129 Improvements to control structure. Removed some uses of arg1 and
9130 arg2 as temporary variables.
9131
a6d344d3
TTN
91322002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
9133
9134 * guile-snarf.in: Remove "--compat=1.4" support.
9135 Add "-d" and "-D" support.
9136
9137 (deprecated_list): New var.
9138 (compat_mode_clean_xxx): Delete.
9139 (grep_deprecated): New func.
9140 ("main"): If "-d" or "-D", call `grep_deprecated'.
9141
3939e9df
NJ
91422002-03-15 Neil Jerram <neil@ossau.uklinux.net>
9143
387d418c
NJ
9144 * hooks.h: Change scm_t_c_hookype_t everywhere to
9145 scm_t_c_hook_type.
9146
bb2c02f2 9147 Docstring fixes:
a6d344d3 9148
bb2c02f2
NJ
9149 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
9150
9151 * ports.c (scm_sys_make_void_port): Use `@file'.
9152
9153 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
9154 than `else'.
9155
9156 * macros.c (scm_makmacro): Don't say that the form replaces its
9157 source, because it doesn't.
9158 (scm_makmmacro): Clarify difference between this and scm_makmacro.
9159
9160 * backtrace.c (scm_display_error), filesys.c (scm_umask,
9161 scm_select, scm_basename), goops.c (scm_method_generic_function),
9162 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
9163 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
9164 spelling mistakes.
9165
3939e9df
NJ
9166 * debug.c (scm_debug_options), eval.c
9167 (scm_eval_options_interface), read.c (scm_read_options): Change
9168 incorrect @var in docstring to @code.
9169
3b3cc781
MV
91702002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
9171
500b0d5b
MV
9172 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
9173
3b3cc781
MV
9174 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
9175 guile-snarf can remove trailing non-init code.
9176
9177 * guile-snarf.in (modern_snarf): Remove everything following and
9178 including "^:^" from the output.
9179
dff98306
DH
91802002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9181
9182 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
9183
9184 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
9185
2287fb53
TTN
91862002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
9187
9188 * guile-snarf.in: Update copyright.
9189 Rewrite to internalize error handling.
9190 Add "--compat=1.4" handling.
9191 Add commentary.
9192
9193 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
9194 (snarfcppopts): New var.
9195 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
9196 (.c.doc): Use $(snarfcppopts).
9197
822250a4
TTN
9198 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
9199 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
9200 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
9201 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
9202 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9203 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
9204 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
9205 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
9206 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
9207 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
9208 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
9209 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
9210 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
9211 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
9212
b7798e10
DH
92132002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9214
9215 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
9216 The next step will be to remove the union 't' and simplify the
9217 code of SCM_CEVAL that way.
9218
04a98cff
NJ
92192002-03-12 Neil Jerram <neil@ossau.uklinux.net>
9220
9221 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
9222 rreadfds, rwritefds, rexceptfds): Made static.
9223
9224 * gc.c (terminating), fports.c (terminating): Renamed
9225 scm_i_terminating.
9226
16d98032
MV
92272002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
9228
5046250e
MV
9229 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
9230 potential overflow problems. Thanks to John W Eaton!
9231
8794207d
MV
9232 * strop.c (string_capitalize_x): Treat characters as unsigned so
9233 that 8-bit chars work. Thanks to David Pirotte!
16d98032 9234
1d15ecd3
DH
92352002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9236
9237 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
9238 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
9239 proc as temporary variables. Introduced temporary variables with
9240 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9241 by a more explicit predicate in some places.
9242
92432002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
9244
9245 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
9246 Added lots of comments regarding the implementation of #@dispatch.
9247 Changed intra-procedure communication to use t.arg1 instead of
9248 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
9249 variables. Introduced temporary variables with hopefully
9250 descriptive names for clarification. Replaced SCM_N?IMP by a more
9251 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
9252 of computing the expression explicitly. Eliminate now unused
9253 label nontoplevel_cdrxbegin.
9254
9255 * goops.h (SCM_INSTANCE_HASH): New macro.
9256
9257 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
9258
1ebf1566
TTN
92592002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9260
9261 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
9262 "guile-snarf" moved back from `noinst_SCRIPTS'.
9263
020c890c
NJ
92642002-03-08 Neil Jerram <neil@ossau.uklinux.net>
9265
58d233cc
NJ
9266 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
9267 exists when adding a source property other than those that are
9268 handled explicitly, add the new property to the SRCPROPS obj's
9269 plist.
9270
020c890c
NJ
9271 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
9272 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
9273
9274 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
9275 debug.status. It isn't needed, and it can overflow the bits
9276 reserved for it (which may lead to a segv or a GC abort).
9277
3f04400d
DH
92782002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9279
9280 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
9281 side-effecting operations from conditions and macro calls.
9282 Replaced SCM_N?IMP by a more explicit predicate in some places.
9283 Minimized the scope of some variables.
9284
97820583
SJ
92852002-03-02 Stefan Jahn <stefan@lkcc.org>
9286
9287 * convert.i.c: Fixed int <-> long conversions which would have
9288 failed if their sizes were different.
9289
38ace99e
DH
92902002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9291
9292 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9293 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9294 as temporary variables. Removed side-effecting operations from
9295 conditions and macro calls. Introduced temporary variables with
9296 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9297 by a more explicit predicate in some places. Removed code that
9298 was conditionally compiled if SICP was defined - which it never
9299 is.
9300
e5cb71a0
DH
93012002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9302
9303 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9304 Removed some uses of t.arg1 and proc as temporary variables.
9305 Removed side-effecting operations from conditions and macro calls.
9306 Introduced temporary variables with hopefully descriptive names
9307 for clarification. Replaced SCM_N?IMP by a more explicit
9308 predicate in some places.
9309
6a0f6ff3
DH
93102002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9311
9312 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9313 explicit predicate in some places.
9314
9315 (CHECK_EQVISH): Removed.
9316
9317 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9318 variables. Removed side-effecting operations from conditions and
9319 macro calls. Introduced temporary variables for clarification.
9320 Sorted if-else-if check for the type of the last form in a list by
9321 frequency. Avoided some unnecessary tail-recursion calls.
9322
228a24ef
DH
93232002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9324
9325 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9326 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9327 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9328 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9329 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9330 naming scheme for types.
9331
9332 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9333 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9334 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9335 (scm_make_environment), eval.c (scm_closure), fports.c
9336 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9337 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9338 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9339 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9340 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9341 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9342 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9343 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9344 scm_alloc_cell to scm_cell.
9345
9346 * environments.c (core_environments_observe), gc.c
9347 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9348 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9349 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9350 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9351 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9352 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9353 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9354 scm_double_cell.
9355
edb810bb
SJ
93562002-02-27 Stefan Jahn <stefan@lkcc.org>
9357
9358 * convert.i.c, convert.c: Better range checking.
9359
9360 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9361
1ebf1566 9362 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9363 Windows (MinGW).
9364
327d4dd3
TTN
93652002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9366
9367 * Makefile.am: Update path to pre-inst-guile automake frag.
9368
89d7a92c 93692002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9370
9371 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9372 features are excluded.
9373
89d7a92c 93742002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9375
9376 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9377
4f2716b6
GH
93782002-02-25 Gary Houston <ghouston@arglist.com>
9379
9380 * convert.c: include <string.h> for convert_i.c.
9381
46151112
RB
93822002-02-24 Rob Browning <rlb@defaultvalue.org>
9383
9384 * .cvsignore: add stamp-h1.
9385
cd328b4f
NJ
93862002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9387
9388 * unif.c (scm_array_to_list): Correct name, which had been
9389 accidentally changed to scm_t_arrayo_list!
9390
c709de7f
MD
93912002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9392
9393 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9394 underflowing scm_mallocated.
9395
c1965d31
MV
93962002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9397
9398 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9399 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9400 Reimplemented using the new scm_gc_malloc, etc., functions and
9401 deprecated.
9402
b606945b
TTN
94032002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9404
9405 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9406 to `noinst_PROGRAMS'.
9407 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9408 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9409
7c686ba8
MV
94102002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9411
9412 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9413 non-zero is returned from a port or smob free function.
9414 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9415 scm_gc_register_collectable_memory,
9416 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9417 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9418
9419 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9420 debug-malloc.c, dynl.c, environments.c, environments.h,
9421 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9422 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9423 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9424 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9425 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9426 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9427 appropriate. Return zero from smob and port free functions.
9428
9429 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9430
9431 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9432 messages while the GC is running.
9433 (scm_c_issue_deprecation_warning_fmt): New.
9434
9435 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9436 it is pointing to the putback buffer.
9437
66adc0a6
TTN
94382002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9439
9440 * gsubr.c (create_gsubr): On "too many args" error,
9441 also display arg count and name. Thanks to Bill Schottstaedt.
9442
0187b4f4
TTN
94432002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9444
9445 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9446
9447 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9448 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9449 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9450
9451 * guile-snarf-docs-texi.in: Bye bye.
9452
402e687c
MV
94532002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9454
9455 * symbols.c (scm_make_symbol): Fix typo in docstring.
9456
9457 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9458 scm_make_symbol): New prototypes.
9459
319b98ed
MV
94602002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9461
9462 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9463 (SCM_SYMBOL_INTERNED_P): New.
9464 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9465 SCM_MAKINUM since hash values can well be bignums.
9466 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9467 This signals a interned symbol.
9468 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9469 scm_make_symbol): New.
0187b4f4 9470
319b98ed
MV
9471 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9472
34472dfe
TTN
94732002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9474
9475 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9476 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9477 Thanks to Dave Love.
34472dfe 9478
1b39c2e3
MV
94792002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9480
9481 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9482 This might help to make unintended clashes less likely.
1b39c2e3
MV
9483 (scm_string_to_symbol): Protect the string until the symbols is
9484 created.
9485
1fa86ca5
SJ
94862002-01-31 Stefan Jahn <stefan@lkcc.org>
9487
9488 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9489 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9490 functions for the deprecated gh interface.
9491
9492 * Makefile.am: Setup rules for new `convert.*' files.
9493
af68e5e5
SJ
94942002-01-28 Stefan Jahn <stefan@lkcc.org>
9495
9496 * symbols.c (scm_c_symbol2str): New function, replacement for
9497 `gh_scm2newsymbol()'.
9498
34472dfe 9499 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9500 replacement for `gh_get_substr()'.
9501
9502 * socket.c: Include `stdint.h' if available for the `uint32_t'
9503 declaration.
9504
504d99c5 9505 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9506 compiler warning).
9507
9508 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9509
c96d76b8 95102002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9511
c96d76b8 9512 Other changes unrelated to Elisp...
34472dfe 9513
c96d76b8
NJ
9514 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9515 "if".
9516 (comments): Fix a few typos.
9517 (scm_for_each): Add parentheses around oddly unparenthesized
9518 if/while conditions.
9519
9520 * read.c (scm_read_opts): Add full stop at end of doc for
9521 `keywords' option.
9522
9523 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9524 instead of gh_symbol2scm.
9525
9526 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9527 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9528
9529 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9530 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9531
9532 First batch of changes for Elisp support...
9533
9534 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9535 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9536 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9537
9538 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9539 conditionalize compilation and initialization of Elisp support
9540 function.
34472dfe 9541
c96d76b8
NJ
9542 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9543 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9544 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9545 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9546 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9547 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9548 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9549 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9550 options.c (change_option_setting, scm_options), posix.c
9551 (environ_list_to_c), print.c (scm_iprlist), throw.c
9552 (scm_exit_status), vectors.c (scm_vector), weaks.c
9553 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9554
9555 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9556 just SCM_FALSEP.
34472dfe 9557
c96d76b8
NJ
9558 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9559 of just SCM_BOOLP.
9560
9561 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9562 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9563 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9564 (scm_m_atfop): Support function aliasing. Support both function
9565 args, which need transformation, and macro args, which do not.
9566 Add explanatory comments.
9567 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9568 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9569 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9570 SCM_NULLP || SCM_NILP instead of checks against (removed)
9571 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9572 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9573
9574 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9575 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9576 these, but I don't want to remove them yet, just in case.
9577 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9578 Elisp nil value.
9579
9580 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9581 against (removed) scm_lisp_nil.
9582 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9583 (SCM_NULL_OR_NIL_P): New.
9584
9585 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9586 SCM_VALIDATE_NULL.
9587
9588 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9589 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9590 value).
9591
9592 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9593 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9594 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9595 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9596
9597 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9598 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9599 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9600 Numbering shifted down accordingly.
9601 (SCM_ELISP_NIL): New IFLAG.
9602
9603 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9604
a392ee15
DH
96052002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9606
9607 * eval.c: Removed outdated references to "everr". Improved some
9608 comments.
9609
9610 (scm_deval_args, deval_args): Renamed scm_deval_args to
9611 deval_args, since it is not part of the interface.
9612
9613 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9614 use references to debug.vect[0] before it exists. Add parentheses
9615 to switch statement.
9616
9617 * goops.h: Added local emacs variables.
9618
24933780
DH
96192002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9620
9621 * eval.[ch] (scm_deval_args): Made static.
9622
9623 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9624 test.
9625
9626 * strings.c (scm_c_string2str): Clarified comment. Replaced
9627 THINKME by FIXME for uniformness. Removed question about whether
9628 arguments need to be protected from garbage collection: Arguments
9629 must be protected as any other variable.
9630
f9450cdb
DH
96312002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9632
9633 * procs.h (SCM_CLOSURE_BODY): New Macro.
9634
9635 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9636 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9637 get_slot_value, set_slot_value), procs.c
9638 (scm_procedure_documentation), sort.c (closureless), stacks.c
9639 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9640 SCM_CLOSURE_BODY.
9641
9642 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9643
5dc64f64
MV
96442001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9645
9646 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9647 use "cp" instead.
9648
197ee3d3
MV
96492001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9650
9651 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9652 everywhere.
9653
9654 * continuations.c (scm_make_continuation): Do not retain the
9655 throw_value when the continuation is invoked.
9656
4d4528e7
SJ
96572001-12-08 Stefan Jahn <stefan@lkcc.org>
9658
9659 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9660 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9661 THINKME's regarding the malloc policy for the missing converter
9662 routines.
9663
98347362
NJ
96642001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9665
9666 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9667 gh_symbol2scm.
9668
1fc8902f
DH
96692001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9670
9671 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9672 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9673
9674 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9675 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9676 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9677 macros.
9678
9679 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9680
9681 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9682 SCM_GC_CELL_* macros when accessing free cells.
9683
4878beec
MV
96842001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9685
9686 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9687 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9688 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9689 * strings.h (SCM_MAKE_STRING_TAG): New.
9690 * procs.h (SCM_MAKE_CCLO_TAG): New.
9691 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9692
9693 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9694 !SCM_ENABLE_DEPRECATED.
9695
9696 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9697 New.
9698
9699 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9700 signal handlers are allowed to divert the flow of control. Call
9701 scm_system_async_mark_from_signal_handler instead of
9702 scm_system_async_mark.
9703
9704
9705 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9706 scm_alloc_double_cell in their place.
34472dfe 9707
4878beec
MV
9708 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9709 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9710 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9711 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9712 scm_deprecated_newcell and scm_deprecated_newcell2.
9713
9714 gc.c (scm_tc16_allocated): Only define when including deprecated
9715 features.
9716 (scm_debug_newcell, scm_debug_newcell2): Removed.
9717 (scm_init_storage): Do not initialize scm_tc16_allocated.
9718 (scm_init_gc): Do it here.
9719 (allocated_mark): New, from old code.
9720 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9721
4878beec 9722 * inline.c, inline.h: New files.
34472dfe 9723 * Makefile.am: Added them in all the right places.
4878beec 9724
34472dfe 9725 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9726
9727 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9728 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9729 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9730 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9731 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9732 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9733 scm_alloc_double_cell, respectively.
9734
d2bc7fae
MV
97352001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9736
9737 * modules.c (scm_c_use_module): Adapt to changes to
9738 `process-use-modules'.
9739
5eec27e9
DH
97402001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9741
9742 * numbers.c (scm_divide): Fix more division by zero errors.
9743
8978878f
GH
97442001-11-21 Gary Houston <ghouston@arglist.com>
9745
9746 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9747 obsolete. autogen.sh says:
9748 invalid unused variable name: `OMIT_DEPENDENCIES'
9749
164826d3
DH
97502001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9751
9752 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9753 reporting the bug.
9754
84aff7a7
MV
97552001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9756
9757 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9758 Thanks to Eric Gillespie, Jr!
34472dfe 9759
6063dc1d
SJ
97602001-11-21 Stefan Jahn <stefan@lkcc.org>
9761
34472dfe
TTN
9762 * win32-socket.c (getservent, setservent, endservent,
9763 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9764 Appropriate replacements for M$-Windows.
9765
9766 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9767 these definitions for GUILE_DEBUG.
9768
9769 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9770 M$-Windows compiler. Include some pieces of code (protoent and
9771 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9772 native M$-Windows compiler.
9773
351982f6
MV
97742001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9775
9776 * modules.c (scm_c_export): Do nothing when the first argument is
9777 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9778
849038b5
TTN
97792001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9780
9781 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9782 also include `buildstamp'.
9783
5c790b44
RB
97842001-11-18 Rob Browning <rlb@defaultvalue.org>
9785
9786 * version.c
9787 (s_scm_major_version): use SCM_MAJOR_VERSION.
9788 (s_scm_minor_version): use SCM_MINOR_VERSION.
9789 (s_scm_micro_version): use SCM_MICRO_VERSION.
9790 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9791 SCM_MICRO_VERSION.
9792
9793 * version.h.in
9794 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9795 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9796 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9797
694a9bb3
NJ
97982001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9799
9800 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9801 Rewrite docstrings without reference to substring-move-left/right,
9802 since the latter no longer exist.
9803
302c12b4
DH
98042001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9805
9806 * eval.c: Removed bogus comment about acros.
9807
9808 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9809 Minimize scope of local variable. Eliminate dependency on
9810 macro DEBUG_EXTENSIONS.
9811
9812 (s_splicing): New error message string.
9813
9814 (scm_m_body): Issue 'bad body' message rather than 'missing
9815 expression' message.
9816
9817 (scm_m_quote): Eliminate unnecessary copying.
9818
9819 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9820 checking of the body to scm_m_body.
9821
9822 (scm_m_do): Move comment to function header. Rename arg1 to
9823 binding. Made the code a bit easier to read.
9824
9825 (evalcar): Removed.
9826
9827 (iqq): Added a comment. Changed the depth parameter to
9828 unsigned. Use size_t for vector lengths. Make sure vector object
9829 is gc protected as long as its contents are read. Add some syntax
9830 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9831 control structure a bit.
9832
9833 (scm_m_delay): Added comment about the implementation of
9834 scm_m_delay.
9835
9836 (scm_m_define): Add comment about guile's currying define
9837 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9838 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9839
9840 (scm_m_letrec1): Removed. Part of the functionality is taken
9841 over by the new function 'transform_bindings'.
9842
9843 (transform_bindings): New function. Takes over some of the
9844 functionality of removed function 'scm_m_letrec1', namely to split
9845 a list of bindings into a reversed list of variables and a list of
9846 initializers.
9847
9848 (scm_m_letrec): Call 'transform_bindings'.
9849
9850 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9851 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9852 test. Use 'transform_bindings'. Fixed scoping error with named
9853 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9854 Jerram for suggesting the fix). Cleaned up the control structure
9855 a bit.
9856
9857 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9858 unnecessary consing. Eliminated unnecessary
9859 SCM_DEFER/ALLOW_INTS.
9860
9861 (SCM_CEVAL): Un-obfuscated some loops.
9862
cecb4a5e
NJ
98632001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9864
8f85c0c6
NJ
9865 * gc.h (scm_unhash_name): Old declaration removed.
9866
9867 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9868 @code{primitive-eval}.
9869
9870 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9871 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9872 Change @deffnx lines in docstrings to say {Scheme Procedure}
9873 rather than primitive or procedure.
9874
9875 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9876 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9877 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9878 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9879 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9880 (scm_string_split, scm_string_ci_to_symbol), strings.c
9881 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9882 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9883 Docstring fixes and improvements reflecting edits that have been
9884 made in the reference manual source.
9885
9886 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9887 scm_object_property, scm_set_object_property_x): Remove invalid
9888 @deffnx lines for corresponding procedure property primitives.
9889
cecb4a5e
NJ
9890 These changes add a @deffnx C function declaration and function
9891 index entries for each Guile primitive to the copy of the doc
9892 snarf output that is used for reference manual synchronization.
9893 Online help is unchanged.
849038b5 9894
cecb4a5e
NJ
9895 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9896 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9897 name to SCM_SNARF_DOCS.
849038b5 9898
cecb4a5e
NJ
9899 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9900 snarf-check-and-output-texi.
9901
9902 * Makefile.am (guile-procedures.texi): New rule.
9903 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9904 Changed so that the last stage of doc snarfing is now performed
9905 twice, once to produce guile-procedures.txt for online help, and
9906 once to produce guile.texi for reference manual synchronization.
9907
ddea3325
DH
99082001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9909
9910 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9911 safely usable as a single statement followed by a ';', for example
9912 in an if statement.
9913
9914 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9915
72dd0a03
NJ
99162001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9917
9918 * random.c (scm_random_solid_sphere_x,
9919 scm_random_hollow_sphere_x): Correct "shere" typos.
9920
9921 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9922
9923 * version.c (scm_version): Update docstring to include
9924 `micro-version'.
9925
6558eda6
MV
99262001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9927
409b8588
MV
9928 * modules.c (scm_c_export): Call va_end after collecting the
9929 symbols.
9930
adb8c0f2
MV
9931 * strop.h, strop.c (scm_substring_move_left_x,
9932 scm_substring_move_right_x): Removed.
9933
6558eda6
MV
9934 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9935 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9936 configure does.
9937
5d8fc640
MV
99382001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9939
9940 * numbers.c: Document macros to define when including
9941 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9942 now rely on SIZEOF_ macros that have been figured out at
9943 configure time.
9944
9945 * num2integral.i.c: Adapt to new interface.
9946 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9947 target type by casting it and checking whether it is still the
9948 same. Do not try to handle bignums for integral types that are
9949 smaller than fixnums. When handling bignums, collect the
9950 magnituse first into a unsigned type, and correctly check for
9951 overflow.
9952 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9953 only -MIN_VALUE can still be negative of all negative numbers (in
9954 twos-complement).
9955
849038b5 9956 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9957
9958 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9959 HAVE_LONG_LONG depending on whether their size is non-zero.
9960
d6b8cf11
TTN
99612001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9962
9963 * strop.c (scm_string_null_p): Docfix; nfc.
9964 Thanks to Scott Lenser.
9965
9401323e
NJ
99662001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9967
9968 * extensions.c (scm_load_extension): Canonicalize docstring
9969 whitespace.
9970
9971 * unif.c (scm_uniform_array_write), ports.c
9972 (scm_current_output_port, scm_force_output), dynwind.c
9973 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9974 filesys.c (scm_open, scm_lstat), struct.c
9975 (scm_make_struct_layout), random.c (scm_random,
9976 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9977 (scm_i_index): Remove superfluous whitespace from end of docstring
9978 lines.
9979
9980 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9981 strings.c (scm_make_string), variable.c (scm_make_variable,
9982 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9983 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9984 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9985 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9986 newline at end of docstrings.
9987
9988 * modules.c (scm_set_current_module): Add missing newline to
9989 docstring.
9990
b4e15479
SJ
99912001-11-07 Stefan Jahn <stefan@lkcc.org>
9992
9993 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9994 and makes them available through Guile. That is because the
9995 Winsock-API does not store its errors in `errno' and thus cannot
9996 return error messages via `strerror (errno)'.
9997
9998 * socket.c (scm_init_socket): Initialize `win32-socket' part
9999 here under M$-Windows.
10000
d6b8cf11 10001 * numbers.h: Added missing declaration of
b4e15479
SJ
10002 `scm_sys_check_number_conversions()'.
10003
10004 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
10005 and use in `(strerror)' and `(system-error)'.
10006
d6b8cf11 10007 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
10008 `win32-socket.[ch]' to extra source and header files.
10009
7ab89df1
MV
100102001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
10011
10012 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
10013 a call to turn-on-debugging when --debug has been given instead of
10014 turning it on directly. Also, handle new `--no-debug' option,
10015 which might suppress the call to turn-on-debugging.
10016
0233bfc1
SJ
100172001-11-05 Stefan Jahn <stefan@lkcc.org>
10018
10019 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
10020
8f99e3f3
SJ
100212001-11-04 Stefan Jahn <stefan@lkcc.org>
10022
10023 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 10024 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
10025 correctly and allows a clean build on Win32.
10026
d6b8cf11 10027 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
10028 into FOO.
10029
10030 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
10031 import macros for external libraries (libcrypt, libqthreads,
10032 libreadline and libregex).
10033
10034 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
10035
10036 * posix.c (flock): Added support for flock() in M$-Windows.
10037
10038 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
10039 of __SCM_IMPORT__.
10040
10041 * fports.c (getflags): Differentiate reading and writing pipes
10042 descriptors.
10043
10044 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
10045 M$-Windows.
10046
10047 * coop.c (coop_condition_variable_timed_wait_mutex): Use
10048 conditionalized error code if `ETIMEDOUT' is not available.
10049 (scm_thread_usleep): Remove bogus declaration of `struct timeval
10050 timeout'.
10051
10052 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
10053 belongs. That is because NO_PREPRO_MAGIC gets undefined after
10054 each inclusion of `num2integral.i.c'.
10055 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
10056
4e21fa60
MV
100572001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
10058
10059 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
10060 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
10061
08112c95
MD
100622001-11-02 Mikael Djurfeldt <mdj@linnaeus>
10063
7663c008
MD
10064 * print.c (scm_iprin1): Mark print state as revealed when
10065 dispatching to generic write or display.
10066
08112c95
MD
10067 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
10068
f712d833
MV
100692001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
10070
10071 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 10072
f712d833
MV
10073 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
10074 and win32-dirent.h to extra source and header files. These
10075 include the uname() and the POSIX dirent interface implementation
10076 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
10077 linkers which do not allow unresolved symbols inside shared
10078 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
10079 dependency.
10080
d6b8cf11
TTN
10081 * __scm.h: Defined SCM_API. This macro gets prepended to all
10082 function and data definitions which should be exported or imported
f712d833
MV
10083 in the resulting dynamic link library in the Win32 port.
10084
10085 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 10086 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
10087 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
10088 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
10089 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
10090 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
10091 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 10092 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
10093 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
10094 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
10095 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
10096 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
10097 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
10098 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
10099 vports.h, weaks.h:
10100 Prefixed each each exported symbol with SCM_API.
10101
d6b8cf11 10102 * continuations.c: Added comment about the use of the extern
f712d833
MV
10103 declarations of {get,set}context() functions used in the ia64 port.
10104
10105 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
10106 is meant to be a `unsigned long *'.
10107
10108 * filesys.c: Include `direct.h' if possible. Use local
10109 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
10110 macros for M$-Windows. Implementation of `fstat_Win32()' which is
10111 able to differentiate between sockets and other file descriptors.
10112 Use this function as wrapper in `scm_fstat()'. Fixed typo in
10113 `scm_dirname()'.
10114
10115 * fports.c: Include `io.h' is possible. Put `*fp' into referring
10116 statement block in `scm_fport_buffer_add()'.
10117 Some corrections in `getflags()'.
d6b8cf11 10118
f712d833
MV
10119 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
10120
10121 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
10122 build on Win32. Disable preloaded symbols on Win2 platforms.
10123
10124 * ioext.c, ports.c: Include `io.h' is possible.
10125
10126 * mkstemp.c: Include `process.h' is possible.
10127
10128 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
10129 too.
10130 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
10131
10132 * posix.c: Remove unnecessary dirent includes and defines. Include
10133 local `win32-uname.h' for MinGW. Extern declaration of
10134 `mkstemp()' for systems where it does not exists. Make
10135 `getlogin()' available on M$-Windows.
10136
10137 * scmsigs.c: Made `usleep()' avalable on MinGW.
10138
10139 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
10140
10141 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
10142
10143 * win32-uname.c: Include "win32-uname.h", not "uname.h".
10144
d245ce23
MD
101452001-10-28 Mikael Djurfeldt <mdj@linnaeus>
10146
10147 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
10148 Don't apply scm_uniform_vector_length on arrays.
10149
8ea46249
DH
101502001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10151
10152 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
10153 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
10154 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
10155 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
10156 scm_list_<n> over scm_cons[2]?.
10157
10158 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
10159 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
10160 SCM_C[AD][AD]R instead of explicit form.
10161
10162 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
10163 comparison parameters.
10164
10165 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
10166 !SCM_NULLP instead of SCM_NIMP.
10167
10168 (scm_m_case): Don't copy the form. Renamed proc to clause and
10169 minimized its scope. Renamed x to clauses. Removed side
10170 effecting operation from macro call.
10171
10172 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
10173 minimized its scope. Renamed x to clauses. Minimized the scope
10174 of variable 'len'. Make sure the else clause is treated specially
10175 even in case of '=>' occurences. Don't change the else to #t in
10176 order to be able to distinguish this case in the evaluator. Leave
10177 type checking of the recipient to the evaluator.
10178
10179 (scm_c_improper_memq): Made the comment somewhat clearer.
10180
10181 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
10182 test for SCM_IM_LET at the place of the formal parameters.
10183 Simplified the formal parameter checking.
10184
10185 (scm_m_letstar): Added Comment. Renamed proc to bindings.
10186 Renamed arg1 to binding and minimized its scope. Eliminated
10187 unnecessary consing.
10188
10189 (scm_m_do): Renamed proc to bindings. Minimized the scope of
10190 variable 'len'.
10191
10192 (build_binding_list): New static function.
10193
10194 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
10195 Further, split up the 'letrec' unmemoizing code to the
10196 corresponding parts for 'do', 'let' and 'letrec', adding comments
10197 to each form. Cleanup the handling of the do form (This removes
10198 some *real* code :-).
10199
10200 (SCM_CEVAL): Removed side effecting operation from macro call.
10201 Handle the 'else clause of the 'cond form specially - the symbol
10202 'else is not replaced with #t any more.
10203
8186c4f5
GH
102042001-10-14 Gary Houston <ghouston@arglist.com>
10205
10206 * version.c (scm_version): use sprintf instead of snprintf,
10207 for portability. thanks to Bill Schottstaedt.
10208
89759084
MD
102092001-10-14 Mikael Djurfeldt <mdj@linnaeus>
10210
10211 * read.c (scm_lreadr): When user-defined hash procedure returns
10212 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
10213 an exception. (This prevents parsing of uniform vectors from
10214 interfering with parsing of numbers.)
10215
9c7ce563
MV
102162001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
10217
10218 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
10219 PTRDIFF_MIN. Thanks to Ken Raeburn.
10220
102212001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
10222
10223 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
10224
10225 * eval.c (scm_m_atbind): First try to find the variable without
10226 defining it locally; when it has not been found, define it
10227 locally.
10228
10229 * modules.c (module_variable): Pass over variables that exist but
10230 are unbound.
10231
102322001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10233
10234 * backtrace.c (display_backtrace_file_and_line): Only use
10235 scm_basename when POSIX support is compiled in. Thanks to Chris
10236 Cramer.
10237
1fe5e088
DH
102382001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10239
10240 * numbers.c (mem2uinteger): Return number read so far when coming
10241 across a hexdigit after having read a # or if not reading a hex
10242 value. This will enable the calling code to correctly handle
10243 forms like 1e2. (The background is, that the exponent markers d,
10244 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
10245 providing this patch.
10246
10247 (mem2complex): Fix erroneous double-negation. Now, numbers like
10248 1-i will be read correctly.
10249
68665a97
MD
102502001-10-12 Mikael Djurfeldt <mdj@linnaeus>
10251
10252 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
10253
10254 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
10255
d5cf5324
DH
102562001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
10257
10258 * print.c (scm_print_state_vtable, print_state_pool):
10259 Initialize. These variables are now registered as gc roots.
10260
10261 (scm_current_pstate): Update documentation.
10262
10263 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
10264 scm_prin1, scm_init_print): print_state_pool is registered as a
10265 gc root and thus does not need to be protected by a surrounding
10266 pair any more.
10267
10268 (make_print_state): The car of print_state_pool no longer holds
10269 the scm_print_state_vtable.
10270
10271 (scm_current_pstate, scm_make_print_state, print_circref,
10272 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
10273 SCM_N<foo>.
10274
10275 (scm_prin1): When building lists, prefer scm_list_<n> over
10276 scm_cons[2]?.
10277
10278 (scm_iprlist): Removed a redundant SCM_IMP test.
10279
10280 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
10281
37c56aec
DH
102822001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10283
10284 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
10285
10286 (scm_memcons, scm_mem_to_proc): When building lists, prefer
10287 scm_list_<n> over scm_cons[2]?.
10288
10289 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
10290
10291 (scm_procedure_name): Use SCM_CADR instead of explicit form.
10292
10293 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10294 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10295 for some reason his patch didn't make it into the cvs.
10296
79d34f68
DH
102972001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10298
10299 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10300 little bit - should even be somewhat more accurate now.
10301
5e137c65
RB
103022001-10-08 Rob Browning <rlb@defaultvalue.org>
10303
10304 * gc.c: support ia64 register backing store.
10305 (SCM_MARK_BACKING_STORE): new macro.
10306
10307 * continuations.h: support ia64 register backing store.
10308 (struct scm_t_contregs): add ia64 register backing store.
10309
10310 * continuations.c: support ia64 register backing store.
10311 (continuation_mark): mark ia64 register backing store.
10312 (continuation_free): free ia64 register backing store.
10313 (scm_make_continuation): capture ia64 register backing store.
10314 (copy_stack_and_call): copy ia64 register backing store.
10315
ee083ac2
DH
103162001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10317
10318 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10319 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10320 instead of SCM_NIMP to test for that case.
10321
10322 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10323 scm_t_bits instead of long.
10324
71dcdbf9
MV
103252001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10326
10327 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10328 SCM_T_SIGNED_BITS_MIN): New.
10329 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10330 Use them to make these macros computable by the preprocessor.
10331
10332 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10333 whether the integral type fits in a fixnum, not the compiler.
10334 This removes a spurious compiler warning. Also, honor the
10335 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10336 needed for `long long's.
10337
10338 * numbers.c: Define NO_PREPRO_MAGOC when including
10339 num2integral.c.i for `long long' and `signed long long'.
10340
152812c0
MD
103412001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10342
10343 These changes fixes a race condition in the Guile coop - pthread
10344 compatibility code.
d6b8cf11 10345
152812c0
MD
10346 * coop.c (mother_awake_p): New variable.
10347 (coop_create): Set mother_awake_p before creating or signalling
10348 mother; wait until mother is going to sleep before returning.
10349 (mother): Reset mother_awake_p before going to sleep.
10350
11d49f54
DH
103512001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10352
10353 * options.c (protected_objects, scm_init_options): The content of
10354 protected_objects is now protected from garbage collection using
10355 scm_gc_register_root instead of scm_permanent_object.
10356
10357 (get_option_setting): New static function that computes an option
10358 setting as it was formerly done in the function scm_options.
10359
10360 (get_documented_option_setting): New static function that
10361 returns option documentation as it was formerly done in the
10362 function scm_options. Note that documentation C strings are no
10363 longer precomputed into SCM objects. Instead, they are converted
10364 into SCM strings every time get_documented_option_setting is
10365 called.
10366
10367 (change_option_setting): New static functions that modifies the
10368 option setting as it was formerly done in the function
10369 scm_options. The function is now exception safe, i. e. won't
10370 cause a memory leak when interrupted. Further, only non-immediate
10371 option values are added to the protection list.
10372
10373 (scm_options): This function now has only the purpose to dispatch
10374 to to get_option_setting, get_documented_option_setting or
10375 change_option_setting, depending on the arguments given to
10376 scm_options.
10377
10378 (scm_init_opts): Don't convert documentation C strings into SCM
10379 strings. Further, don't protect any object values: They _must_
10380 be immediate values, otherwise there is no guarantee that they
10381 have not been collected before anyway.
10382
10383 * options.[ch] (scm_t_option): Made type unsigned, name into a
10384 constant char* and val into a scm_t_bits type.
10385
10386 (scm_options, scm_init_opts): The number of options is guaranteed
10387 to be larger or equal to zero. Thus, the type is changed to
10388 unsigned.
10389
3dbacabc
DH
103902001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10391
10392 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10393 testing an unsigned value for being >= 0.
10394
14282d0f
DH
103952001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10396
10397 * numbers.h: Removed old comment about using SCM_CAR to access
10398 non-pair cells.
10399
10400 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10401 the return value is signed. Thanks to Brian Crowder for the bug
10402 report.
10403
10404 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10405 values. With this patch, SCM_SRS can be safely used for other
10406 types than scm_t_signed_bits. However, it should still better be
10407 an internal macro and thus be renamed to SCM_I_SRS.
10408
10409 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10410
2dbec7b5
GH
104112001-10-03 Gary Houston <ghouston@arglist.com>
10412
10413 * continuations.h, unif.h: in the descriptions of the bit patterns
10414 of the heap cells, make bit 0 the least significant.
10415
cf4ee841
TTN
104162001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10417
10418 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10419 Thanks to Golubev I. N.
10420
4a151b3d
GH
104212001-09-25 Gary Houston <ghouston@arglist.com>
10422
10423 * ports.c (scm_drain_input): extended the docstring. thanks to
10424 Alex Schroeder and Thien-Thi Nguyen.
10425
581ded70
MD
104262001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10427
10428 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10429 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10430 macros. (The NUM names might soon change.)
10431
10432 * numbers.h: Added missing declarations.
10433
5437598b
MD
104342001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10435
10436 * Makefile.am: Distribute num2float.i.c.
10437
10438 * num2float.i.c: New file, multiply included by numbers.c, used
10439 to "templatize" the float <-> num conversion routines.
10440
10441 * numbers.c: New functions: scm_num2float, scm_float2num,
10442 scm_num2double, scm_double2num.
10443
0b073f0f
RB
104442001-09-21 Rob Browning <rlb@defaultvalue.org>
10445
10446 * .cvsignore: really add version.h
10447
10448 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10449 Otherwise it fails on the alpha. However, we might rather choose
10450 this size conditionally.
10451
10452 * numbers.c (scm_gcd): change "k" to a long from an int.
10453 Otherwise it fails on the alpha. However, we might rather choose
10454 this size conditionally.
10455
10456 * error.c (scm_wta): coerce char* to intptr_t before int
10457 assignment.
10458
10459 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10460 int.
10461
10462 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10463
2830fd91
MD
104642001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10465
10466 * numbers.c (scm_integer_expt): Accept inexact integer in second
10467 argument. (Thanks to Bill Schottstaedt.)
10468
c13f0a90
RB
104692001-09-20 Rob Browning <rlb@defaultvalue.org>
10470
10471 * .cvsignore: add version.h
10472
10473 * versiondat.h.in: removed (obsolete).
10474
10475 * version.h.in: renamed from version.h.
10476 (SCM_GUILE_MAJOR_VERSION): new public macro.
10477 (SCM_GUILE_MINOR_VERSION): new public macro.
10478 (SCM_GUILE_MICRO_VERSION): new public macro.
10479
10480 * version.h: renamed to version.h.in.
10481
10482 * version.c
10483 (scm_major_version): support integer *_VERSION macros.
10484 (scm_minor_version): support integer *_VERSION macros.
10485 (scm_micro_version): support integer *_VERSION macros.
10486 (scm_version): support integer *_VERSION macros.
10487
147c18a0
MD
104882001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10489
10490 * error.c, error.h: Made error keys globally accessible.
10491 Applications might want to test for these or use them in a direct
10492 call to scm_error.
10493
10494 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10495 routines are passed an inexact. This change in behavior is
10496 motivated by concordance with R5RS: It is more common that a
10497 primitive doesn't want to accept an inexact for an exact.
10498
662c5539
DH
104992001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10500
10501 The following patch partially undoes my patch from 2001-06-30,
10502 where I added the function scm_gc_mark_cell_conservatively. The
10503 function is buggy, since it breaks guile during conservative
10504 marking if a pointer on the stack points directly into the list of
10505 free cells on the heap: With conservative cell marking this will
10506 cause the whole free list to be scanned and marked - boom!
10507
10508 * gc.c (allocated_mark, MARK, heap_segment,
10509 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10510 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10511 scm_gc_mark_cell_conservatively and update the corresponding
10512 comments and uses accordingly. Thanks to Christopher Cramer for
10513 the patch. (Minor corrections by me.)
10514
6c1b7628
GH
105152001-09-15 Gary Houston <ghouston@arglist.com>
10516
10517 * root.h (scm_root_state): removed the continuation_stack and
10518 continuation_stack_ptr members, which have no apparent purpose.
10519 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10520 removed.
662c5539 10521
6c1b7628
GH
10522 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10523 (scm_igc): remove all references to contination_stack and
10524 continuation_stack_ptr, avoiding allocation of a vector and
10525 useless processing during gc.
10526
455c0ac8
DH
105272001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10528
10529 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10530
10531 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10532
10533 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10534
10535 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10536
10537 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10538 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10539
22ba637b
DH
105402001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10541
10542 * guardians.c (mark_dependencies_in_tconc,
10543 whine_about_self_centered_zombies, scm_init_guardians): Register
10544 the static global variable `self_centered_zombies' via
10545 scm_gc_register_root, to make some cdr-ing unnecessary.
10546
c3c4d801
DH
105472001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10548
10549 * backtrace.c (display_backtrace_file,
10550 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10551 values, use SCM_FALSEP when comparing SCM values against #f.
10552 Thanks to Rob Browning for the bug report.
10553
b00418df
DH
105542001-09-12 Martin Baulig <martin@home-of-linux.org>
10555
10556 * strings.[ch] (scm_str2string): New function.
10557
a0d34a0b
MV
105582001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10559
10560 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10561 when computing nm, even if it's negative.
10562 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10563 (scm_must_realloc): Likewise.
10564
b10586f0
ML
105652001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10566
10567 * numbers.c (scm_sys_check_number_conversions): new function,
10568 defined if Guile is compiled in debugging mode. currently checks
10569 `scm_num2ulong', should check much much more.
10570
10571 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10572 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10573
8c494e99
DH
105742001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10575
10576 * __scm.h: Added new section about compile time selectable
10577 features.
10578
10579 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10580 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10581 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10582 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10583 Removed.
10584
10585 * deprecation.c (scm_include_deprecated_features): Simplified.
10586
10587 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10588 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10589
10590 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10591 Extract side-effecting operations from macros.
10592
10593 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10594 scm_top_level_lookup_closure_var and scm_system_transformer.
10595
10596 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10597
10598 (heap_segment): Use CELL_P instead of SCM_CELLP.
10599
10600 * init.c (start_stack): Don't initialize
10601 scm_top_level_lookup_closure_var and scm_system_transformer.
10602
10603 * modules.c (scm_set_current_module): Don't access
10604 scm_top_level_lookup_closure_var and scm_system_transformer.
10605
10606 (scm_sym2var): Don't call scm_variable_set_name_hint.
10607
10608 (scm_post_boot_init_modules): Removed deprecated initializations.
10609
10610 * print.c (scm_ipruk): Don't access cell contents of non cells.
10611
10612 * strings.c (scm_string_set_x): All strings are writable.
10613
10614 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10615 type. There is only one string type now.
10616
10617 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10618
10619 * tags.h: Remove comments about two different string types.
10620
10621 (SCM_CELLP, SCM_NCELLP): Deprecated.
10622
10623 * variable.c (make_variable): Remove code variant for vcells.
10624
10625 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10626 SCM_VARIABLE_LOC): Remove code variant for vcells.
10627
10628 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10629 SCM_ENABLE_DEPRECATED with the logic reversed.
10630
10631 * dynl.c (moddata, registered_mods), dynl.[ch]
10632 (scm_register_module_xxx, scm_registered_modules,
10633 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10634 (*top-level-lookup-closure*), eval.[ch]
10635 (scm_top_level_lookup_closure_var, scm_system_transformer,
10636 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10637 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10638 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10639 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10640 scm_unprotect_object), modules.c (root_module_lookup_closure,
10641 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10642 beautify_user_module_x_var, try_module_autoload_var,
10643 scm_module_full_name), modules.[ch] (scm_the_root_module,
10644 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10645 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10646 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10647 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10648 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10649 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10650 scm_make_shared_substring), tags.h (scm_tc7_substring,
10651 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10652 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10653 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10654 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10655 Removed.
10656
10657 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10658 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10659 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10660 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10661 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10662 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10663 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10664 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10665 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10666 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10667 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10668 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10669 (setzone, scm_strftime, scm_strptime), vports.c
10670 (scm_make_soft_port): Remove calls to
10671 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10672 gone, all strings are 0-terminated anyway.
10673
10674 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10675 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10676 double inclusion of the same headers to the SCM_<filename>_H
10677 format.
10678
10679 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10680 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10681 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10682 any more.
10683
10684 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10685 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10686 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10687 !SCM_<foo> over SCM_N<foo>.
10688
dee01b01
DH
106892001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10690
10691 * Makefile.am: Remove references to symbols-deprecated.c.
10692
10693 * symbols.c (scm_init_symbols): Don't initialize deprecated
10694 symbol functions.
10695
10696 * symbols-deprecated.c: Removed.
10697
10698 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10699 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10700 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10701 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10702 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10703 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10704 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10705 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10706 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10707 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10708 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10709 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10710 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10711 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10712 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10713 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10714 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10715 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10716 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10717 scm_intern0, scm_sysintern, scm_sysintern0,
10718 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10719 scm_string_to_obarray_symbol, scm_intern_symbol,
10720 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10721 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10722 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10723 vectors.[ch] (scm_vector_set_length_x): Removed.
10724
10725 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10726 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10727 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10728 Renamed the macros that are defined to inhibit double inclusion of
10729 the same headers to the SCM_<filename>_H format.
10730
10731 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10732 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10733 SCM_N<foo>.
10734
b29058ff
DH
107352001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10736
10737 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10738 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10739 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10740 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10741 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10742 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10743 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10744 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10745 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10746 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10747 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10748 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10749
10750 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10751 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10752 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10753 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10754 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10755 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10756 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10757 double inclusion of the same headers to the SCM_<filename>_H
10758 format.
10759
10760 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10761 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10762 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10763 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10764 !SCM_<foo> over SCM_N<foo>.
10765
0527e687
DH
107662001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10767
10768 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10769 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10770 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10771 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10772 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10773 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10774 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10775 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10776 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10777 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10778 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10779 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10780 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10781 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10782 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10783 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10784 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10785 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10786 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10787 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10788 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10789 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10790 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10791 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10792 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10793 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10794 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10795 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10796 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10797 the macros that are defined to inhibit double inclusion of the
10798 same headers to the SCM_<filename>_H format.
10799
fada26b2
MV
108002001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10801
10802 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10803 "scm_t_portable" with "scm_port_table" which was an artifact from
10804 the great "scm_*_t -> scm_t_" renaming.
10805
e4d1c1ea
TTN
108062001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10807
10808 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10809 used; nfc. Thanks to Bill Schottstaedt.
10810
10811 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10812 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10813 Thanks to Chris Cramer.
10814
b573e744
MV
108152001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10816
10817 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10818
10819 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10820 dynamic scope.
10821 * dynwind.h (scm_swap_bindings): Declare.
10822 * dynwind.c (scm_swap_bindings): Make non-static.
10823
8a3e715b
ML
108242001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10825
10826 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10827 doing exactly nothing about them). thanks Neil!
10828
cf504ee0
NJ
108292001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10830
10831 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10832
43b83b54
TTN
108332001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10834
10835 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10836 (proto) in the case when either `GUILE_DEBUG' or
10837 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10838
10839 (map_free_list): Fix typo: Ref `f' correctly.
10840
10841 Thanks to Chris Cramer.
10842
ab4cd34b
RB
108432001-08-15 Rob Browning <rlb@defaultvalue.org>
10844
10845 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10846 variables.
10847 (libpath.h): change libguileversion to libguileinterface.
10848
b754e3d1
MV
108492001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10850
10851 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10852 ChangeLog-2000. Thanks to Daniel Skarda!
10853
8b1d12c7
ML
108542001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10855
10856 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10857 do it from the Makefile.
10858
10859 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10860 are of a reasonable size.
10861
baffb19f
NJ
108622001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10863
10864 * stacks.c (scm_make_stack): Improve docstring by explaining use
10865 of cutting args.
10866
c1151355
MV
108672001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10868
10869 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10870 scm_char_whitespace_p, scm_char_upper_case_p,
10871 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10872 characters to fulfill isascii in addition to the primary
10873 predicate.
10874
3c9a524f
DH
108752001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10876
10877 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10878 scm_istr2flo, scm_istring2number): Removed.
10879
10880 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10881 SCM_SLOPPY_<foo>.
10882
10883 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10884 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10885 Added.
10886
10887 (scm_string_to_number): Use new number parser.
10888
10889 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10890 handles complex numbers.
10891
10892 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10893 SCM_<foo>_H.
10894
10895 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10896 SCM_N<pred>.
10897
10898 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10899
10900 (scm_i_mem2number): Added.
10901
10902 (scm_exact_to_inexact): Changed signature.
10903
10904 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10905 here instead of within scm_i_mem2number. Call scm_i_mem2number
10906 instead of scm_istr2int and scm_istring2number.
10907
01f11e02
DH
109082001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10909
10910 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10911 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10912 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10913 !SCM_<pred> over SCM_N<pred>.
10914
10915 (scm_eval_body): Remove side effecting code from macro call.
10916
10917 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10918 SCM_NIMP test.
10919
6cf69537
DH
109202001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10921
10922 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10923
54866b6c
MV
109242001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10925
10926 Removed vcell slot from structs.
43b83b54 10927
54866b6c
MV
10928 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10929 subsequent indices.
10930
10931 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10932 zero. Use scm_vtable_index_layout instead of "0" when accessing
10933 said slot.
10934 (scm_init_struct): Remove vcell slot layout code from
10935 required_vtable_fields.
10936
10937 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10938
10939 * goops.c (build_class_class_slots): Removed vcell slot
10940 definition.
10941
10942 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10943 Removed vcell slot layout code.
10944 (scm_si_vcell): Removed.
10945
5b54c4da
MV
109462001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10947
a0f5718e 10948 "Glocs" have been removed.
43b83b54 10949
a0f5718e
MV
10950 * tags.h: Update tag system docs.
10951 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10952 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10953 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10954 or SCM_NCONSP, respectively.
10955
10956 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10957 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10958 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10959
10960 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10961 tell glocs from structs.
43b83b54 10962
a0f5718e
MV
10963 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10964
10965 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10966 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10967 instead of with glocs.
10968 (EVALCAR): Do not test for glocs.
10969 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10970 condition.
10971 (scm_unmemocar): Do not handle glocs.
10972 (scm_m_atfop): Memoize as a variable, not as a gloc.
10973 (scm_eval_args, scm_deval_args): Do not handle glocs.
10974 (scm_ceval, scm_deval): Likewise.
43b83b54 10975
a0f5718e
MV
10976 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10977 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10978 Removed.
10979
10980 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10981
10982 * dynwind.c (scm_swap_bindings): Likewise.
10983 (scm_dowinds): Updated to recognize lists of variables instead of
10984 lists of glocs.
10985
10986 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10987
43b83b54 10988
5b54c4da
MV
10989 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10990 where it is needed.
43b83b54 10991
3c3db128
GH
109922001-07-25 Gary Houston <ghouston@arglist.com>
10993
10994 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10995 docstrings to reflect the n-ary implementation.
10996
dd29a169
MV
109972001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10998
10999 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
11000 value of a variable, not the plain "return" statement.
11001
f5fe6c2f
MV
110022001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
11003
11004 * eval.c: Allow variables in memoized code (in addition to glocs).
11005 (scm_lookupcar): Handle variables in lost races. Replace symbol
11006 with variable directly, do not make a gloc.
11007 (scm_unmemocar): Rewrite variables using a reverse lookup, just
11008 like glocs.
11009 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
11010 the main switch.
11011
ee0c7345
MV
110122001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11013
6d9ad98a
MV
11014 * variable.c (scm_i_variable_print): Use "value" instead of
11015 "binding" since a binding is the mapping between symbols and
11016 variables, not between variables and their values.
11017
ee0c7345
MV
11018 * tags.h (scm_tc7_variable): New.
11019 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
11020 * print.c (scm_iprin1): Likewise.
11021
11022 * variable.h (scm_tc16_variable): Removed.
11023 (SCM_VARIABLEP): Test for new tc7 code.
11024 (scm_i_variable_print): New.
11025 * variable.c (scm_tc16_variable): Removed.
11026 (variable_print): Renamed to scm_i_variable_print and made
11027 non-static.
11028 (variable_equal_p): Removed.
11029 (make_variable): Construct a tc7 object instead of a smob.
11030 (scm_init_variable): Do not register smob.
43b83b54 11031
f3805ebb
MV
110322001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
11033
11034 * tags.h: Include inttypes.h when we have it.
11035
110362001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
11037
11038 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
11039 is taken by the new SCM_IM_CALL_WITH_VALUES.
11040 * print.c (scm_isymnames): Update table accordingly.
43b83b54 11041
6a1677a3
GH
110422001-07-22 Gary Houston <ghouston@arglist.com>
11043
11044 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
11045 SCM_MAKINUM to convert regoff_t value to SCM.
11046
1bed8c28
GH
110472001-07-21 Gary Houston <ghouston@arglist.com>
11048
11049 * scmsigs.c: include sys/time.h for itimer stuff.
11050
e658215a
RB
110512001-07-19 Rob Browning <rlb@defaultvalue.org>
11052
11053 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
11054
11055 * c-tokenize.lex: add option %nounput to quiet warning.
11056 Add prototype for yylex to quiet warning.
11057
11058 * scmconfig.h.in: add flags for setitimer and getitimer.
11059
11060 * scmsigs.h (scm_init_scmsigs): new prototype.
11061 (scm_init_scmsigs): new prototype.
11062
11063 * scmsigs.c (s_scm_setitimer): new function.
11064 (s_scm_setitimer): new function.
11065
58ade102
MG
110662001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11067
11068 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
11069 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
11070 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
11071 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
11072 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
11073 guile-func-name-check.in, guile-snarf-docs-texi.in,
11074 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
11075 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
11076 objprop.c, objprop.h, options.c, options.h, random.h,
11077 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
11078 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
11079 version.c, version.h: Updated copyright notice.
11080
6b80d352
DH
110812001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11082
11083 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
11084 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
11085 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
11086 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
11087 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
11088 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
11089 sym_environment, scm_sym_change_class): New static variables to
11090 hold predefined symbols.
11091
11092 (build_class_class_slots): Build the list using scm_list_n
11093 instead of cons. Also, slots are already created as lists, thus
11094 making a call to maplist unnecessary.
11095
11096 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
11097 scm_class_direct_subclasses, scm_class_direct_methods,
11098 scm_class_precedence_list, scm_class_slots, scm_class_environment,
11099 scm_method_procedure, create_standard_classes, purgatory): Use
11100 predefined symbols.
11101
11102 (build_slots_list, compute_getters_n_setters,
11103 scm_sys_initialize_object, scm_sys_inherit_magic_x,
11104 get_slot_value_using_name, set_slot_value_using_name,
11105 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
11106 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
11107 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
11108
11109 (scm_sys_prep_layout_x): Minimize variable scopes.
11110
11111 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
11112 scm_sys_fast_slot_set_x): Fix signedness.
11113
11114 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
11115 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
11116 scm_memoize_method, scm_wrap_object): Use packing and unpacking
11117 when converting to and from SCM values.
11118
11119 (scm_enable_primitive_generic_x): Add rest argument checking.
11120
11121 (map, filter_cpl, maplist, scm_sys_initialize_object,
11122 scm_sys_prep_layout_x, slot_definition_using_name,
11123 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
11124 call_memoize_method, scm_make, scm_make_class): Prefer explicit
11125 predicates over SCM_N?IMP tests.
11126
11127 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
11128 checking.
11129
11130 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
11131 alias.
11132
63bcad19
DH
111332001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
11134
11135 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
11136
11137 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
11138
11139 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
11140
11141 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
11142
4d6aae71
ML
111432001-07-12 Michael Livshin <mlivshin@bigfoot.com>
11144
11145 * strings.c (s_scm_string): fix arg position in assert.
11146
4b8ec619
GH
111472001-07-11 Gary Houston <ghouston@arglist.com>
11148
11149 * strports.c (st_write): use memcpy, not strncpy. thanks to
11150 Dale P. Smith.
11151
dbb640bd
TTN
111522001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
11153
11154 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
11155 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
11156 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
11157 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
11158 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
11159 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
11160 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
11161 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
11162 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
11163 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
11164 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
11165 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
11166 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
11167 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
11168 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
11169 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
11170 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
11171 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
11172 weaks.c, weaks.h: Remove "face-lift" comment.
11173
fd6c6321
RB
111742001-07-08 Rob Browning <rlb@defaultvalue.org>
11175
11176 * .cvsignore: add stamp-h.in.
11177
f91e4547
MG
111782001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11179
11180 * hooks.c (scm_make_hook, scm_add_hook_x),
11181 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
11182 value info to the docstrings.
11183
7beabedb
MG
111842001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11185
11186 Some more compatibility patches for Windows.
dbb640bd 11187
7beabedb
MG
11188 * posix.c (getlogin): getlogin() implementation for Windows.
11189
11190 * backtrace.c, ioext.c: Include <stdio.h>.
11191
11192 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
11193 exist.
11194
11195 * cpp_sig_symbols.in: Added SIGBREAK.
11196
0d0560d0
MV
111972001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
11198
11199 * strports.c (scm_read_0str, scm_eval_0str): Call
11200 scm_c_read_string and scm_c_eval_string respectively, not
11201 themselves. Thanks to Dale P. Smith!
11202
9a97e362
DH
112032001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11204
11205 * unif.c (scm_array_set_x): The variable args does not
11206 necessarily have to be a list. Further, got rid of a redundant
11207 SCM_NIMP test.
11208
592996c9
DH
112092001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11210
11211 * list.c (SCM_I_CONS): Make sure the cell type is initialized
11212 last.
11213
11214 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 11215 init_heap_seg): Fixed signedness.
592996c9
DH
11216
11217 (init_heap_seg): Replaced strange for-loop with a while loop.
11218
11219 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
11220
11221 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
11222
11223 The following patch adds conservative marking for the elements of
11224 free or allocated cells.
11225
11226 * gc.c (allocated_mark, heap_segment): New static functions.
11227
11228 (which_seg): Deleted, since the functionality is now provided by
11229 function heap_segment.
11230
11231 (map_free_list): Use heap_segment instead of which_seg.
11232
11233 (MARK): If cell debugging is disabled, mark free cells
11234 conservatively.
11235
11236 (scm_mark_locations, scm_cellp): Extracted the search for the
11237 heap segment of a SCM value into function heap_segment.
11238
11239 (scm_init_storage): Allocated cells must be marked
11240 conservatively.
11241
11242 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
11243
11244 The following patch changes the representation of weak vectors to
11245 double cells instead of using an extension of the vector's
11246 allocated memory.
11247
11248 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
11249 the result of SCM_WVECT_GC_CHAIN.
11250
11251 (scm_gc_sweep): Weak vectors don't have extra fields any more.
11252
11253 * weaks.c (allocate_weak_vector): New static function. It does
11254 not patch any previously created vector object during the
11255 construction of a weak vector, and thus doesn't need to switch
11256 off interrupts during vector creation.
11257
11258 (scm_make_weak_vector, scm_make_weak_key_hash_table,
11259 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11260 Use allocate_weak_vector to provide the new weak vector object.
11261
11262 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
11263 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
11264 now stored in the double cell.
11265
11266 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
11267 Use SCM_WVECT_TYPE.
11268
11269 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
11270 using an entry of the double cell.
11271
4dadf664
TTN
112722001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
11273
11274 * stamp-h.in: bye bye
11275
02202352
MV
112762001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
11277
11278 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
11279 scm_eval_0str.
11280
11281 * load.c, load.h (scm_c_primitive_load,
11282 scm_c_primitive_load_path): New.
11283
11284 * strports.c, strports.h (scm_c_read_string): Renamed from
11285 scm_read_0str. Also, added "const" qualifier to argument.
11286 (scm_c_eval_string): Renamed from scm_eval_0str.
11287 (scm_read_0str, scm_eval_0str): Deprecated.
11288
df1ad0d1
MG
112892001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11290
11291 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
11292 SCM_LIST1.
11293
1afff620
KN
112942001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11295
11296 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11297 scm_list_n): New functions.
11298 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11299 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11300 (lots of files): Use the new functions.
4dadf664 11301
1afff620
KN
11302 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11303
11304 * strings.c: #include "libguile/deprecation.h".
11305
b858464a
MG
113062001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11307
11308 * read.c (scm_lreadr): When reading a hash token, check for a
11309 user-defined hash procedure first, so that overriding the builtin
11310 hash characters is possible (this was needed for implementing
11311 SRFI-4's read synax `f32(...)').
4dadf664 11312
b858464a
MG
11313 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11314 because the latter is unsigned now and breaks comparisons like
11315 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11316
d95c0b76
NJ
113172001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11318
11319 * eval.h, eval.c (scm_call_4): New function.
11320
11321 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11322 directly rather than dispatching to them via scm_ithrow and a lazy
11323 catch.
4dadf664 11324
d95c0b76
NJ
11325 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11326 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11327 for trap handler procedures.
11328
11329 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11330 procedures not being #f.
11331
30e3be5a
ML
113322001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11333
11334 * Makefile.am (c-tokenize.c): add rule to generate it.
11335 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11336
11337 filter-doc-snarfage.c: remove.
11338
82893676
MG
113392001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11340
11341 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11342
11343 The following set of changes makes compiling Guile under various
11344 Windows compilers easier. Compilation under GNU systems should
11345 not be affected at all.
11346
11347 Thanks to Stefan Jahn for all necessary information, patches and
11348 testing.
4dadf664 11349
82893676
MG
11350 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11351 getpgrp, ttyname, primitive-fork and some header inclusion for
11352 Windows.
11353
11354 * random.c: Define M_PI, if not predefined and use __int64 for
11355 LONG64 under Windows.
11356
11357 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11358 Windows and conditionalize some signal names.
11359
4dadf664 11360 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11361 Include socket library header under Windows.
11362
11363 * stime.c (CLKTCK): Add cast to int, to make it compile under
11364 Windows.
11365
11366 * ports.c (truncate): New function, compiled only under Windows.
11367
11368 * net_db.c: Do not declare errno under Windows.
11369
11370 * iselect.h, inet_aton.c: Include socket library headers under
11371 Windows.
11372
11373 * guile.c (inner_main): Under Windows, initialize socket library
11374 and initialize gdb_interface data structures.
11375
11376 * gdb_interface.h: Under Windows, gdb_interface cannot be
11377 initialized statically. Initialize at runtime instead.
11378
11379 * fports.c (write_all): ssize_t -> size_t.
11380 (fport_print): Conditionalize call to ttyname().
11381 (getflags): New function, compiled only under Windows.
11382
11383 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11384 primitives chown, link, fcntl.
11385 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11386 as path seperator.
11387
11388 * backtrace.c: Include <io.h> under Windows.
11389
11390 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11391
11392 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11393 declaration.
11394
fdc28395
KN
113952001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11396
11397 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11398 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11399 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11400 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11401 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11402 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11403 (scm_dynamic_wind, scm_dowinds), environments.c
11404 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11405 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11406 goops.c (GETVAR, purgatory, make_class_from_template,
11407 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11408 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11409 (scm_primitive_load), modules.c (scm_resolve_module,
11410 scm_c_define_module, scm_c_use_module, scm_c_export,
11411 module_variable, scm_eval_closure_lookup, scm_sym2var,
11412 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11413 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11414 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11415 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11416 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11417 (scm_object_to_string, scm_call_with_output_string,
11418 scm_call_with_input_string), throw.c (scm_body_thunk,
11419 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11420 scm_make_shared_array), vports.c (sf_flush, sf_write,
11421 sf_fill_input, sf_close): Use one of the above functions.
11422 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11423
36284627
DH
114242001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11425
11426 * filesys.c (scm_close), ports.c (scm_close_port,
11427 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11428 instead of SCM_NEGATE_BOOL.
11429
11430 * filesys.c (scm_stat): Clean up type dispatch.
11431
11432 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11433 scm_output_port_p): Get rid of redundant IM type check.
11434
11435 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11436 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11437 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11438 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11439 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11440 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11441 scm_addr_vector), stime.c (scm_strftime), strings.c
11442 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11443 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11444 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11445 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11446 instead of scm_makfromstr.
11447
11448 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11449 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11450 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11451 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11452 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11453 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11454 !SCM_<pred> over SCM_N<pred>.
11455
11456 * strings.[ch] (scm_makfromstr): Deprecated.
11457
11458 (scm_mem2string): New function, replaces scm_makfromstr.
11459
11460 * strings.c (scm_substring), strop.c (string_copy,
11461 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11462 (scm_symbol_to_string): Fix gc problem.
11463
11464 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11465 SCM_<foo>_H.
11466
11467 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11468 warning about comparing signed and unsigned values. This fix is
11469 not optimal, since it won't work reliably if sizeof (c_start) >
11470 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11471 solution is to define this macro as an inline function, thus
11472 allowing to specifiy the types of c_start and c_end.
11473
13dcb666
DH
114742001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11475
11476 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11477 scm_t_debug_frame*.
11478
11479 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11480 Rename <foo>H to SCM_<foo>_H.
11481
11482 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11483 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11484
11485 (narrow_stack): Make i unsigned. Don't use side-effecting
11486 operations in conditions.
11487
11488 (narrow_stack, scm_make_stack, scm_stack_id,
11489 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11490
11491 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11492 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11493 more.
11494
11495 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11496 signedness.
11497
ea2c3968 11498 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11499
11500 * stacks.h (SCM_FRAMEP): Fix type check.
11501
ac13d9d2
ML
115022001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11503
ee0c0e03
ML
11504 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11505 c-tokenize.c when doing maintainer-clean.
11506
ac13d9d2
ML
11507 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11508
11509 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11510 simplify.
11511
11512 * eval.c: all hash signs are in column 0.
11513
11514 * Makefile.am (guile_filter_doc_snarfage): build using
11515 c-tokenize.c, not filter-doc-snarfage.c.
11516 rearrange snarfing dependencies a bit.
11517
11518 * c-tokenize.lex: new file.
11519
16be44e5
MV
115202001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11521
11522 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11523 scm_t_srcpropso_plist. See the big type renaming.
11524 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11525 Thanks to Seth Alves!
4dadf664 11526
16be44e5
MV
11527 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11528 they aren't defined already.
11529
5843e5c9
DH
115302001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11531
11532 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11533 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11534 problem.
11535
11536 * backtrace.c (display_expression, scm_set_print_params_x,
11537 display_application, display_frame, scm_backtrace), numbers.c
11538 (scm_istring2number), objects.c (scm_class_of,
11539 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11540 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11541
11542 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11543 always positive.
11544
11545 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11546 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11547
11548 * objects.c (scm_class_of): Type fix.
11549
11550 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11551 eliminated goto.
11552
11553 * pairs.h (scm_error_pair_access): The function can return if
11554 called recursively.
11555
6b41a313
MG
115562001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11557
11558 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11559
11560 * gdbint.c, init.c: Removed inclusion of tag.h.
11561
11562 * tag.h, tag.c: Removed files.
11563
11564 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11565
fbbdb121
GH
115662001-06-20 Gary Houston <ghouston@arglist.com>
11567
11568 * deprecation.c, extensions.c, rw.c: include string.h.
11569
72c17ed0
GH
115702001-06-19 Gary Houston <ghouston@arglist.com>
11571
11572 * filter-doc-snarfage.c (process): added ungetc in
11573 MULTILINE_COOKIE case since otherwise it fails when there's no
11574 space between the '(' and the quote of the following string
11575 (gcc 3.0).
11576
4ff9f825
MV
115772001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11578
4927dd28
MV
11579 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11580
b629af45
MV
115812001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11582
11583 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11584 extension takes place.
11585 * strings.h (SCM_STRING_LENGTH): Likewise.
11586 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11587
4ff9f825
MV
11588 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11589 it.
11590
11591 * tags.h: Include <stdint.h> when we have it.
11592 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11593 available. Else use "unsigned long".
11594 (scm_signed_bits_t): New.
11595
11596 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11597 (SCM_INUM): Cast result to scm_signed_bits_t.
11598
58bee6a8
TTN
115992001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11600
11601 * mkstemp.c: Update path to #include file scmconfig.h.
11602 Thanks to Golubev I. N.
11603
00d8d838
DH
116042001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11605
11606 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11607
ea2c3968 11608 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11609 the macro definition.
11610
11611 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11612 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11613 instead of SCM_INST_TYPE.
11614
11615 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11616 the object is a struct before accessing its struct flags.
11617
11618 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11619
495c67e5
GH
116202001-06-10 Gary Houston <ghouston@arglist.com>
11621
11622 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11623 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11624 work reliably anymore. try it from boot-9.scm instead.
11625
6a9003d3
MV
116262001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11627
11628 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11629 Thanks to Matthias Köppe!
58bee6a8 11630
47bcd646
ML
116312001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11632
a88ff5b6
ML
11633 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11634 space-happy C preprocessors.
11635
47bcd646 11636 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11637 inside cookies. thanks to Matthias Köppe!
47bcd646 11638
bab246f3
DH
116392001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11640
11641 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11642 keywords. Fix gc protection.
11643
11644 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11645 operations in macro calls.
11646
11647 * pairs.c (scm_error_pair_access): Avoid recursion.
11648
11649 Thanks to Matthias Koeppe for reporting the bugs that correspond
11650 to the following set of patches.
11651
11652 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11653 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11654 bitvector base address using SCM_BITVECTOR_BASE.
11655
11656 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11657 unsigned long*.
11658
dcb410ec
DH
116592001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11660
11661 * goops.c (SCM_CLASS_REDEF): Removed.
11662
11663 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11664 SCM_<foo>_H.
11665
11666 Thanks to Matthias Koeppe for reporting the bugs that correspond
11667 to the following set of patches.
11668
11669 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11670 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11671 scm_sys_allocate_instance, clear_method_cache,
11672 scm_sys_invalidate_method_cache_x, scm_make,
11673 create_standard_classes, scm_make_port_classes, scm_make_class,
11674 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11675
11676 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11677
11678 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11679
11680 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11681 UNARY_ELTS_CODE): Remove bogus break statement.
11682
11683 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11684 Don't access bit vectors elements as SCM objects.
11685
11686 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11687 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11688 Don't assign to an unpacked value.
11689
e81d98ec
DH
116902001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11691
11692 * __scm.h (SCM_NORETURN): Moved here from error.h.
11693
11694 (SCM_UNUSED): New macro.
11695
11696 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11697
11698 * backtrace.c (display_error_handler), continuations.c
11699 (continuation_print), debug.c (debugobj_print), dynwind.c
11700 (guards_print), environments.c (observer_print,
11701 core_environments_finalize, leaf_environment_cell,
11702 leaf_environment_print, eval_environment_print,
11703 eval_environment_observer, import_environment_define,
11704 import_environment_undefine, import_environment_print,
11705 import_environment_observer, export_environment_define,
11706 export_environment_undefine, export_environment_print,
11707 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11708 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11709 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11710 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11711 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11712 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11713 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11714 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11715 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11716 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11717 set_slot_value, test_slot_existence, scm_change_object_class,
11718 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11719 default_setter), guardians.c (guardian_print, guardian_gc_init,
11720 guardian_zombify, whine_about_self_centered_zombies), guile.c
11721 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11722 mallocs.c (malloc_print), numbers.c (scm_print_real,
11723 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11724 end_input_default, scm_port_print, fill_input_void_port,
11725 write_void_port), root.c (root_print), smob.c (scm_mark0,
11726 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11727 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11728 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11729 (scm_struct_free_0, scm_struct_free_standard,
11730 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11731 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11732 scm_handle_by_throw, scm_ithrow), weaks.c
11733 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11734 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11735 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11736
11737 * error.h (SCM_NORETURN): Moved to __scm.h.
11738
11739 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11740 Renamed <foo>H to SCM_<foo>_H.
11741
11742 * gc.c (debug_cells_gc_interval): New static variable.
11743
11744 (scm_assert_cell_valid): If selected by the user, perform
11745 additional garbage collections.
11746
11747 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11748 if additional garbage collections are desired.
11749
11750 (mark_gc_async): If additional garbage collections are selected
11751 by the user, don't call the after-gc-hook. Instead require the
11752 user to run the hook manually.
11753
11754 * pairs.c (scm_error_pair_access): New function. Only compiled
11755 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11756
11757 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11758
11759 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11760 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11761 is a real pair object. (Glocs are also accepted, but that may
11762 change.) If not, abort with an error message.
11763
17fa3fcf
DH
117642001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11765
11766 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11767
11768 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11769 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11770
feeedafb
MV
117712001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11772
11773 * extensions.c (scm_c_register_extension): Allow NULL as library
11774 name.
11775 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11776
feeedafb
MV
11777 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11778 non-pointers are being compared. Thanks to Alexander Klimov!
11779
4bcdfe46
GH
117802001-06-04 Gary Houston <ghouston@arglist.com>
11781
11782 * rw.c (scm_write_string_partial): new procedure implementing
11783 write-string/partial in (ice-9 rw).
11784 * rw.h: declare scm_write_string_partial.
58bee6a8 11785
f480396b
MV
117862001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11787
feeedafb
MV
11788 * keywords.c (keyword_print): Substract 1 from length of symbol
11789 name, accounting for the silly dash.
11790
11791 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11792 Do not emit deprecation warning.
11793
f480396b
MV
11794 Added exception notice to all files.
11795
11796 * dynl.c: Include "deprecation.h".
11797
c794483c
MV
117982001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11799
11800 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11801 scm_clear_registered_modules): Deprecated.
11802
9454d8d5
RB
118032001-06-02 Rob Browning <rlb@cs.utexas.edu>
11804
11805 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11806 guile-snarf-docs-texi.
11807
11808 * fports.c: HAVE_ST_BLKSIZE changed to
11809 HAVE_STRUCT_STAT_ST_BLKSIZE.
11810 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11811 HAVE_STRUCT_STAT_ST_BLKSIZE.
11812
11813 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11814 HAVE_STRUCT_STAT_ST_RDEV.
11815 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11816 HAVE_STRUCT_STAT_ST_BLKSIZE.
11817 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11818 HAVE_STRUCT_STAT_ST_BLOCKS.
11819
114f9bab
MV
118202001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11821
b0c16cd9
MV
11822 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11823 of scm_eval_x to allow module changes between the forms in the
11824 string. Set/restore module using scm_c_call_with_current_module.
11825
114f9bab
MV
11826 * mkstemp.c: New file, slightly modified from libiberties
11827 mkstemps.c.
11828
c99f9605
ML
118292001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11830
11831 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11832 filter-doc-snarfage.c: new files.
11833
11834 * Makefile.am: add stuff to [build,] use and distribute
11835 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11836
11837 * guile-snarf.in: grok the new snarf output.
11838
11839 * snarf.h: make the output both texttools- and `read'-friendly.
11840
47bcd646
ML
11841 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11842 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11843
7eb5d7b2
MV
118442001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11845
11846 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11847 error for unsupported format controls and for superflous
ec2667f0 11848 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11849
11850 * print.h, print.c (scm_print_symbol_name): Factored out of
11851 scm_iprin1.
11852 (scm_iprin1): Call it.
58bee6a8 11853
7eb5d7b2
MV
11854 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11855 weird names are printed correctly.
11856
11857 * print.c (scm_print_symbol_name): Symbols whose name starts with
11858 `#' or `:' or ends with `:' are considered weird.
11859
609c3d30
MG
118602001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11861
11862 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11863 and /.
11864
118652001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11866
11867 * debug.h: Removed prototype for scm_eval_string.
11868
8d09eb04
MG
118692001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11870
11871 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11872 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11873
11874 Change strncpy to memcpy to allow embedded NUL characters in
11875 symbol prefix.
11876
dd85ce47
ML
118772001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11878
fde50407
ML
11879 * hooks.c (scm_create_hook): deprecated.
11880 (make_hook): deleted.
11881 (scm_make_hook): all the hook creation code is now here.
11882
11883 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11884 a hook, make it permanent, and do a `scm_c_define' on it.
11885
dd85ce47
ML
11886 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11887
11888 * socket.c (s_scm_inet_pton): fix docstring quoting.
11889 (s_scm_inet_ntop): ditto.
11890
11891 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11892
11893 * hashtab.c (scm_internal_hash_fold): fix argument position in
11894 SCM_ASSERT.
11895
11896 * environments.c (s_scm_import_environment_set_imports_x): fix
11897 argument position in SCM_ASSERT.
11898
11899 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11900 (s_scm_make_iloc): ditto.
11901
729dbac3
DH
119022001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11903
11904 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11905
11906 * eval.c (promise_print): Read the promise's value as an object.
11907
11908 (SCM_CEVAL): Don't perform side-effecting operations in macro
11909 parameters.
11910
11911 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11912 conditional expression.
11913
11914 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11915 initializer.
11916
11917 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11918 text, removed redundant computation of effective_length and fixed
11919 the overflow check.
11920
11921 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11922 values.
11923
11924 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11925
11926 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11927
11928 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11929 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11930
11931 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11932
11933 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11934 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11935 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11936 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11937
11938 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11939
11940 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11941
ea2c3968 11942 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11943
11944 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11945 problem.
11946
11947 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11948 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11949 Read SCM objects rather than scm_bits_t values.
11950
11951 * tags.h (SCM_VOIDP_TEST): Removed.
11952
11953 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11954 value of 2 now corresponds to the former 1, the current 1
11955 corresponds to the former situation that SCM_VOIDP_TEST was
11956 defined.
11957
58bee6a8
TTN
11958 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11959 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11960 typedef struct scm_unused_struct { } * SCM;
11961 Thanks to Han-Wen Nienhuys for the suggestion.
11962
11963 * unif.c (scm_array_set_x): Fix typing problem, and use
11964 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11965 dealing with uniform vectors.
11966
6b1b030e
ML
119672001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11968
11969 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11970 (scm_igc): mark from them, too (precisely, not conservatively!).
11971
11972 * root.h (scm_gc_registered_roots): new object in
11973 scm_sys_protects.
11974
11975 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11976 `scm_protect_object'. shouldn't call it at all, though, it seems.
11977
11978 * gc.c (scm_[un]protect_object): deprecated.
11979 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11980 (scm_gc_[un]register_root[s]): new.
11981
11982 * gc.h: add prototypes for scm_gc_[un]protect_object,
11983 scm_gc_[un]register_root[s].
11984
c014a02e
ML
119852001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11986
11987 revert the controversial part of the 2001-05-24 changes.
11988
0120801d
MV
119892001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11990
f4e0611e
MV
11991 * modules.c (scm_env_module): Exported to Scheme.
11992
0120801d 11993 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11994
0120801d 11995 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11996
0120801d
MV
11997 * backtrace.c: Include "libguile/filesys.h".
11998 (sym_base, display_backtrace_get_file_line,
11999 display_backtrace_file, display_backtrace_file_and_line): New.
12000 (display_frame): Call display_backtrace_file_and_line if that is
12001 requested.
12002 (display_backtrace_body): Call scm_display_backtrace_file if
12003 requested.
12004
12005 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
12006 Prototypes removed since there's no definition for these
12007 functions.
12008
880a7d13
MG
120092001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12010
12011 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
12012 Changed use of scm_array->scm_array_t and
12013 scm_array_dim->scm_array_dim_t to enable build with
12014 --disable-deprecated.
12015
1be6b49c
ML
120162001-05-24 Michael Livshin <mlivshin@bigfoot.com>
12017
12018 The purpose of this set of changes is to regularize Guile's usage
12019 of ANSI C integral types, with the following ideas in mind:
12020
d69c867a
ML
12021 - SCM does not nesessarily have to be long.
12022 - long is not nesessarily enough to store pointers.
1be6b49c
ML
12023 - long is not nesessarily the same size as int.
12024
12025 The changes are incomplete and possibly buggy. Please test on
12026 something exotic.
12027
12028 * validate.h
12029 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
12030 new macros.
12031
12032 * unif.h: type renaming:
12033 scm_array -> scm_array_t
12034 scm_array_dim -> scm_array_dim_t
12035 the old names are deprecated, all in-Guile uses changed.
12036
12037 * tags.h (scm_ubits_t): new typedef, representing unsigned
12038 scm_bits_t.
12039
12040 * stacks.h: type renaming:
12041 scm_info_frame -> scm_info_frame_t
12042 scm_stack -> scm_stack_t
12043 the old names are deprecated, all in-Guile uses changed.
12044
12045 * srcprop.h: type renaming:
12046 scm_srcprops -> scm_srcprops_t
12047 scm_srcprops_chunk -> scm_srcprops_chunk_t
12048 the old names are deprecated, all in-Guile uses changed.
12049
12050 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
12051 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
12052 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
12053 vectors.c, vports.c, weaks.c:
12054 various int/size_t -> size_t/scm_bits_t changes.
12055
12056 * random.h: type renaming:
12057 scm_rstate -> scm_rstate_t
12058 scm_rng -> scm_rng_t
12059 scm_i_rstate -> scm_i_rstate_t
12060 the old names are deprecated, all in-Guile uses changed.
12061
12062 * procs.h: type renaming:
12063 scm_subr_entry -> scm_subr_entry_t
12064 the old name is deprecated, all in-Guile uses changed.
12065
12066 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
12067 type renaming:
12068 scm_option -> scm_option_t
12069 the old name is deprecated, all in-Guile uses changed.
12070
12071 * objects.c: various long -> scm_bits_t changes.
12072 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
12073
12074 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
12075 SCM_I_FIXNUM_BIT.
12076
12077 * num2integral.i.c: new file, multiply included by numbers.c, used
12078 to "templatize" the various integral <-> num conversion routines.
12079
12080 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
12081 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
12082 deprecated.
12083 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
12084 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
12085 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
12086 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
12087 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
12088 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
12089 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
12090 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
12091 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
12092 scm_num2size): new functions.
12093
d69c867a 12094 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
12095
12096 * load.c: change int -> size_t in various places (where the
12097 variable is used to store a string length).
12098 (search-path): call scm_done_free, not scm_done_malloc.
12099
12100 * list.c (scm_ilength): return a scm_bits_t, not long.
12101 some other {int,long} -> scm_bits_t changes.
12102
12103 * hashtab.c: various [u]int -> scm_bits_t changes.
12104 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
12105 (scm_ihashx): n: uint -> scm_bits_t
12106 use scm_bits2num instead of scm_ulong2num.
12107
12108 * gsubr.c: various int -> scm_bits_t changes.
12109
12110 * goops.[hc]: various {int,long} -> scm_bits_t changes.
12111
d69c867a 12112 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
12113
12114 * gh.h (gh_str2scm): len: int -> size_t
12115 (gh_{get,set}_substr): start: int -> scm_bits_t,
12116 len: int -> size_t
12117 (gh_<num>2scm): n: int -> scm_bits_t
12118 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
12119 (gh_length): return scm_bits_t, not unsigned long.
12120
12121 * gc.[hc]: various small changes relating to many things stopping
12122 being long and starting being scm_[u]bits_t instead.
12123 scm_mallocated should no longer wrap around.
12124
12125 * fports.h: type renaming:
12126 scm_fport -> scm_fport_t
12127 the old name is deprecated, all in-Guile uses changed.
12128
12129 * fports.c (fport_fill_input): count: int -> scm_bits_t
12130 (fport_flush): init_size, remaining, count: int -> scm_bits_t
12131
12132 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
12133 those prototypes, as the functions they prototype don't exist.
12134
12135 * fports.c (default_buffer_size): int -> size_t
12136 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
12137 default_size: int -> size_t
12138 (scm_setvbuf): csize: int -> scm_bits_t
12139
12140 * fluids.c (n_fluids): int -> scm_bits_t
12141 (grow_fluids): old_length, i: int -> scm_bits_t
12142 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
12143 scm_bits_t
12144 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
12145
12146 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
12147 the new and shiny SCM_NUM2INT.
12148
12149 * extensions.c: extension -> extension_t (and made a typedef).
12150
12151 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
12152 there are no nasty surprises if/when the various deeply magic tag
12153 bits move somewhere else.
12154
12155 * eval.c: changed the locals used to store results of SCM_IFRAME,
12156 scm_ilength and such to be of type scm_bits_t (and not int/long).
12157 (iqq): depth, edepth: int -> scm_bits_t
12158 (scm_eval_stack): int -> scm_bits_t
12159 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
12160 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
12161 i: int -> scm_bits_t
12162
12163 * environments.c: changed the many calls to scm_ulong2num to
12164 scm_ubits2num.
12165 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
12166
12167 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
12168
12169 * debug.h: type renaming:
12170 scm_debug_info -> scm_debug_info_t
12171 scm_debug_frame -> scm_debug_frame_t
12172 the old names are deprecated, all in-Guile uses changed.
12173 (scm_debug_eframe_size): int -> scm_bits_t
12174
12175 * debug.c (scm_init_debug): use scm_c_define instead of the
12176 deprecated scm_define.
12177
12178 * continuations.h: type renaming:
12179 scm_contregs -> scm_contregs_t
12180 the old name is deprecated, all in-Guile uses changed.
12181 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
12182 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
12183
12184 * continuations.c (scm_make_continuation): change the type of
d69c867a 12185 stack_size from long to scm_bits_t.
1be6b49c
ML
12186
12187 * ports.h: type renaming:
12188 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
12189 scm_port -> scm_port_t
12190 scm_ptob_descriptor -> scm_ptob_descriptor_t
12191 the old names are deprecated, all in-Guile uses changed.
12192 (scm_port_t.entry): int -> scm_bits_t.
12193 (scm_port_t.line_number): int -> long.
12194 (scm_port_t.putback_buf_size): int -> size_t.
12195
12196 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 12197 global namespace and have little value beside that).
1be6b49c
ML
12198 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
12199 SCM handle).
12200 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 12201 exist (for size_t & ptrdiff_t).
1be6b49c
ML
12202 (scm_sizet): deprecated.
12203
12204 * Makefile.am (noinst_HEADERS): add num2integral.i.c
12205
a6219f22
MV
122062001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
12207
12208 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
12209 SCM_VARIABLE_INIT since that it what it used to be.
12210
12211 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 12212 ANSIsh. Thanks to Matthias Köppe!
a6219f22 12213
311b6a3c
MV
122142001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
12215
9dfc4faa
MV
12216 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
12217 needed for weak-key hashtables.
12218
12219 * procs.c (scm_make_subr_with_generic): Add missing last argument
12220 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
12221
12222 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
12223 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
12224
12225 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
12226
2fc933fe
MV
122272001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
12228
57ae112d
MV
12229 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
12230 `duplicate_string'. Do not use an indirect cell, store symbol
12231 directly in collision list of hash table.
12232 (duplicate_string): Removed.
58bee6a8 12233
57ae112d
MV
12234 * init.c (scm_init_guile_1): Call scm_init_extensions.
12235
12236 * Makefile.am: Add "extensions.c" and related files in all the
12237 right places.
12238
12239 * extensions.h, extension.c: New files.
12240
12241 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
12242
2fc933fe
MV
12243 * modules.h (scm_system_module_env_p): Move out of deprecated
12244 section.
12245
12246 * rw.h (scm_init_rw): Added prototype.
12247
12248 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
12249 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
12250 New functions. They replace scm_make_gsubr and
12251 scm_make_gsubr_with_generic. The `make' variants only create the
12252 gsubr object, while the `define' variants also put it into the
12253 current module. Changed all callers.
12254 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
12255
12256 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
12257 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
12258 functions. They replace scm_make_subr, scm_make_subr_opt and
12259 scm_make_subr_with_generic. The `make' variants only create the
12260 subr object, while the `define' variants also put it into the
12261 current module. Changed all callers.
12262 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
12263 Deprecated.
12264
12265 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
12266 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
12267 the comments above.
58bee6a8 12268
18928596
NJ
122692001-05-19 Neil Jerram <neil@ossau.uklinux.net>
12270
12271 * throw.c (scm_lazy_catch): Slight docstring clarification.
12272
21a13beb
MV
122732001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
12274
e2b6ddc6
MV
12275 * throw.c: Lazy-catch handlers are no longer allowed to return.
12276 Fixed comments throughout.
12277 (scm_ithrow): Signal an error when a lazy-catch handler returns.
12278 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
12279 recognized as such.
12280
21a13beb
MV
12281 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
12282 refered to s_scm_minor_version previously.
12283
12284 * modules.h, modules.c: Moved around a lot of code so that
12285 deprecated features appear at the bottom.
12286 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
12287 module_prefix, make_modules_in_var, beautify_user_module_x_var,
12288 scm_the_root_module, scm_make_module, scm_ensure_user_module,
12289 scm_load_scheme_module): Deprecated.
12290 (scm_system_module_env_p): Return SCM_BOOL_T directly for
12291 environments corresponding to the root module.
12292 (convert_module_name, scm_c_resolve_module,
12293 scm_c_call_with_current_module, scm_c_define_module,
12294 scm_c_use_module, scm_c_export): New.
12295 (the_root_module): New static variant of scm_the_root_module. Use
12296 it everywhere instead of scm_the_root_module.
58bee6a8 12297
21a13beb
MV
12298 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12299 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12300 (scm_c_with_fluid): New.
12301 (scm_with_fluids): Use scm_c_with_fluids instead of
12302 scm_internal_with_fluids.
58bee6a8 12303
21a13beb
MV
12304 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12305 `scm_init_goops'. Do not explicitly create/switch modules.
12306 Return SCM_UNSPECIFIED.
12307 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12308 (scm_load_goops): Use scm_c_resolve_module instead of
12309 scm_resolve_module.
58bee6a8 12310
21a13beb
MV
12311 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12312 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12313 `scm_init_rw' prior to loading the startup files.
12314
12315 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12316 scm_init_rdelim. Do not explicitly create/switch modules.
12317 Return SCM_UNSPECIFIED.
12318 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12319 procedure.
58bee6a8 12320
21a13beb
MV
12321 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12322 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12323 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12324
12325 * script.c (scm_shell): Evaluate the compiled switches in the
12326 current module, not in the root module.
12327
123282001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12329
12330 * fluids.c (scm_c_with_fluids): Rename from
12331 scm_internal_with_fluids.
12332 (scm_internal_with_fluids): Deprecated.
12333 (scm_c_with_fluid): New.
12334
09cb9e73
DH
123352001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12336
12337 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12338
12339 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12340 accessed with SCM_C[AD]R.
12341
12342 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12343
c81ea65d
RB
123442001-05-16 Rob Browning <rlb@cs.utexas.edu>
12345
12346 * version.c (s_scm_major_version): doc fixes.
12347 (s_scm_minor_version): doc fixes.
12348 (s_scm_minor_version): new function.
12349
12350 * version.h (scm_init_version): new function.
12351
12352 * versiondat.h.in: add GUILE_MICRO_VERSION.
12353
887dfa7d
DH
123542001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12355
12356 * deprecation.c (scm_init_deprecation): Renamed
12357 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12358
78930a69
MV
123592001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12360
12361 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12362 dependent on cpp_cnvt.awk
12363
39cde5c5
MG
123642001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12365
12366 * script.c (scm_compile_shell_switches): New command line option
12367 `--use-srfi' for loading a list of SRFIs on startup.
12368 (scm_shell_usage): Added `--use-srfi' to help message.
12369
f3f9dcbc
MV
123702001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12371
78930a69 12372 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12373
f3f9dcbc
MV
12374 The concept of vcells has been removed from Guile. With it,
12375 explicit obarrays and associated operations are gone. Use
12376 hashtables instead of obarrays.
887dfa7d 12377
f3f9dcbc
MV
12378 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12379 result as variable instead of vcell. Glocs no longer point to a
12380 vcell but to a variable. Use scm_c_define instead of
12381 scm_sysintern and treat the result as a variable (which it is),
12382 not a vcell.
887dfa7d 12383
f3f9dcbc
MV
12384 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12385 SCM_DEFVARIABLEP): Deprecated.
12386 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12387 (variable_print): Do not print name of variable.
12388 (variable_equalp): Compare values, not vcells.
12389 (anonymous_variable_sym): Removed.
12390 (make_vcell_variable): Removed.
12391 (make_variable): New, as replacement.
12392 (scm_make_variable, scm_make_undefined_variable): Do not take name
12393 hint parameter.
12394 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12395 error in that case.
12396 (scm_builtin_variable): Deprecated.
12397
12398 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12399 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12400 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12401 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12402 scm_string_to_obarray_symbol, scm_intern_symbol,
12403 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12404 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12405 Deprecated and moved to "symbols-deprecated.c".
12406 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12407 (scm_init_symbols): Call scm_init_symbols_deprecated.
12408 * symbols-deprecated.c: New file.
12409 * Makefile.am: Added symbols-deprecated.c and related files in all
12410 the right places.
887dfa7d 12411
f3f9dcbc
MV
12412 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12413 SCM_GLOBAL_VCELL_INIT): Deprecated.
12414 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12415 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12416
f3f9dcbc
MV
12417 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12418 SCM_GLOC_SYM.
12419
12420 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12421 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12422 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12423 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12424 Changed according to the `throughout' comments.
12425
12426 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12427 to `int'.
12428 (scm_module_type): Removed.
12429 (the_root_module): Renamed to the_root_module_var. Now points to
12430 a variable instead of a vcell. Updated all uses.
12431 (scm_the_root_module): Return SCM_BOOL_F when module systems
12432 hasn't been booted yet.
12433 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12434 (scm_post_boot_init_modules): Made static.
12435 (scm_set_current_module): Call scm_post_boot_init_modules on first
12436 call.
12437 (make_modules_in, beautify_user_module_x, resolve_module,
12438 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12439 suffix. Now point to variables instead of vcells. Updated all
12440 uses.
12441 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12442 and return SCM_BOOL_F in that case.
12443 (scm_module_transformer): Likewise.
12444 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12445 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12446 (scm_eval_closure_lookup): Do not allow new definitions when
12447 `interface' flag is set.
12448 (scm_standard_interface_eval_closure): New.
12449 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12450 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12451 scm_c_lookup, scm_c_module_define, scm_c_define,
12452 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12453 scm_modules_prehistory): New.
12454 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12455 instead of scm_intern0.
887dfa7d 12456
f3f9dcbc
MV
12457 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12458 symbol.
12459
12460 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12461 hashtable operations to maintain the keywords, not obarray ones.
12462
12463 * init.c (scm_load_startup_files): Do not call
12464 scm_post_boot_init_modules. This is done by
12465 scm_set_current_module now.
12466 (scm_init_guile_1): Call scm_modules_prehistory. Call
12467 scm_init_variable early on.
12468
12469 * goops.c (s_scm_sys_goops_loaded): Get
12470 var_compute_applicable_methods from scm_sym2var, not from a direct
12471 invocation of scm_goops_lookup_closure.
12472
12473 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12474
12475 * gc.c: Added simple debugging hack to mark phase of GC: When
12476 activated, do not tail-call scm_gc_mark. This gives nice
12477 backtraces.
12478 (scm_unhash_name): Removed.
12479
12480 * feature.c (features): Renamed to features_var. Now points to a
12481 variable instead of a vcell. Updated all uses.
12482
12483 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12484 `scm_current_module_lookup_closure' which will do the right thing
12485 when the module system hasn't been booted yet.
12486 (SCM_GLOC_SYM): Removed.
12487 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12488 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12489
f3f9dcbc
MV
12490 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12491 instead of with vcells. Do not overwrite `var' with the result of
12492 the lookup, use the new `real_var' instead. Remove `var2' in
12493 exchange (which was only used with threads).
12494 (sym_three_question_marks): New.
12495 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12496 `SCM_GLOC_SYM'.
12497 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12498 (scm_m_atfop): Expect the function definition to be a variable
12499 instead of a vcell.
12500 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12501 symbol instead.
12502 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12503 (scm_eval_args): Use more explicit code in the gloc branch of the
12504 atrocious struct ambiguity test. The optimizer will sort this
12505 out.
12506 (scm_deval_args): Likewise.
12507 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12508 remember the symbol instead. Added some comments where
12509 scm_tc3_cons_gloc really exclusively refers to structs.
12510 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12511 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12512 of scm_sysintern in general.
12513
12514 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12515 explicit magic.
12516
12517 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12518 pairs. Put the variable directly in the gloc.
12519 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12520 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12521
12522 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12523
12524 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12525 scm_the_last_stack_fluid_var. It now points to a variable instead
12526 of a vcell. Updated all uses.
12527 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12528 instead of a vcell. Updated all uses.
12529
12530 * _scm.h: Include "variables.h" and "modules.h" since almost
12531 everybody needs them now.
12532
12533 * root.h (scm_symhash, scm_symhash_vars): Removed.
12534 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12535
7c33806a
DH
125362001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12537
12538 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12539 scm_listofnull.
7c33806a
DH
12540
12541 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12542 like the SCM_NEWCELL macro counterparts.
12543
12544 (scm_init_storage, scm_init_gc): Moved initialization of
12545 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12546
12547 (scm_init_storage): Moved initialization of scm_undefineds and
12548 scm_listofnull to eval.c, initializion of scm_nullstr to
12549 strings.c, initializion of scm_nullvect to vectors.c.
12550
12551 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12552 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12553
12554 * init.c (scm_init_guile_1): Reordered some initializations and
12555 added dependcy information comments.
12556
12557 * load.c (scm_init_load): Use scm_nullstr.
12558
12559 * strings.c (scm_init_strings): Initialize scm_nullstr.
12560
12561 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12562
11bbab47
MV
125632001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12564
12565 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12566 multiple lines. Thanks to Matthias Köppe!
11bbab47 12567
5cd06d5e
DH
125682001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12569
12570 * deprecation.c: Fixed copyright date.
12571
12572 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12573 DEPRECATION_H to SCM_DEPRECATION_H.
12574
32bac999
TTN
125752001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12576
12577 * guile-doc-snarf.in: Update copyright.
12578 Fix relative path bug. Thanks to Sergey Poznyakoff.
12579
c9dcc5ae
MV
125802001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12581
12582 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12583 accept open ports. Thanks to Quetzalcoatl Bradley!
12584
7c582ec9
MG
125852001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12586
12587 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12588 has 779 primitives on startup.
12589
284ab601
MV
125902001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12591
12592 * eval.c (scm_i_eval): Copy expression before passing it to
12593 SCM_XEVAL. The copy operation was removed unintendedly during my
12594 change on 2001-03-25.
12595
910d1e40
ML
125962001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12597
9a5fa6e9 12598 from Matthias Köppe (thanks!):
910d1e40
ML
12599
12600 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12601 portable.
12602
12603 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12604 docstring.
12605
56e55ac7
DH
126062001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12607
12608 * gc.c (scm_init_gc): Added FIXME comment.
12609
12610 * hooks.c: Since hooks don't have a name any more, it is not
12611 necessary to include objprop.h.
12612
12613 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12614
12615 (symbol_name, scm_make_hook_with_name): Removed.
12616
12617 (scm_create_hook): Don't set the hook's name property.
12618
12619 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12620
12621 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12622
12623 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12624
12625 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12626 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12627 FLOBUFLEN and define it unconditionally.
12628
d204b24c
MV
126292001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12630
438201b4
MV
12631 * gh_data.c (gh_lookup): Call gh_module_lookup with
12632 `scm_current_module ()', not `#f'.
12633 (gh_module_lookup): Expect a module instead of an obarray as first
12634 argument and do lookup in that module.
56e55ac7 12635
d204b24c
MV
12636 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12637 arrays. The length of array is already determined differently and
12638 scm_uniform_vector_length does not work on arrays.
12639
26c1d549
MV
126402001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12641
fe7c2f88
MV
12642 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12643 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12644
26c1d549
MV
12645 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12646 they are not used. Changed `wrong type' error into `wrong num
12647 args' error. Changed all callers.
56e55ac7 12648
26c1d549
MV
12649 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12650 arguments are supplied.
12651
1c938eb8
TTN
126522001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12653
12654 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12655 describe `regexp/notbol' and `regexp/noteol' execution flags.
12656
3a6379f7
TTN
12657 * strop.c (scm_substring_move_x): Doc fix; nfc.
12658
c10ecc4c
MV
126592001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12660
12661 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12662 (scm_set_object_procedure_x): Use it to check argument. Fix
12663 docstring.
12664
12665 * evalext.c (scm_definedp): Fix docstring.
12666
a57a0b1e
GH
126672001-05-05 Gary Houston <ghouston@arglist.com>
12668
12669 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12670 support.
12671
7a095584
NJ
126722001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12673
12674 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12675 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12676 Change R4RS references to R5RS.
12677
12678 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12679 docstring source are correctly reproduced in the output (ii)
12680 we don't anymore get occasional trailing quotes. Also reorganized
12681 and commented the code a little.
12682
12683 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12684 fixes.
12685
dd2a6f3a
MG
126862001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12687
12688 * strop.c (scm_string_split): New procedure.
12689
12690 * strop.h (scm_string_split): Added prototype.
12691
00120130
GH
126922001-05-04 Gary Houston <ghouston@arglist.com>
12693
12694 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12695 Dale P. Smith.
12696
b65e6bfe
MV
126972001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12698
12699 * rw.c: Include "modules.h" and "strports.h".
12700
12701 * net_db.h (scm_gethost): Added prototype.
12702
12703 * deprecation.h, deprecation.c: New.
12704 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12705 (DOT_X_FILES): Added "deprecation.x".
12706 (modinclude_HEADERS): Added "deprecation.h".
12707
12708 * init.c: Include "deprecation.h".
12709 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12710
b65e6bfe
MV
127112001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12712
12713 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12714 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12715 New.
12716
b0e5fd8c
GH
127172001-04-29 Gary Houston <ghouston@arglist.com>
12718
12719 * rw.c: new file, implementing C part of module (ice-9 rw).
12720 (scm_read_string_x_partial): moved from ioext.c
12721 (scm_init_rw): new proc.
12722 * rw.h: new file.
12723 init.c: include rw.h and call scm_init_rw.
12724 Makefile.am: include rw.c and rw.h.
12725
0b2da99c
RB
127262001-04-28 Rob Browning <rlb@cs.utexas.edu>
12727
12728 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12729 know what's supposed to happen to it.
12730
12731 * list.h (scm_list_star): deprecation expired - removed.
12732
12733 * numbers.h (scm_dblproc): deprecation expired - removed.
12734 (SCM_UNEGFIXABLE): deprecation expired - removed.
12735 (SCM_FLOBUFLEN): deprecation expired - removed.
12736 (SCM_INEXP): deprecation expired - removed.
12737 (SCM_CPLXP): deprecation expired - removed.
12738 (SCM_REAL): deprecation expired - removed.
12739 (SCM_IMAG): deprecation expired - removed.
12740 (SCM_REALPART): deprecation expired - removed.
12741 (scm_makdbl): deprecation expired - removed.
12742 (SCM_SINGP): deprecation expired - removed.
12743 (SCM_NUM2DBL): deprecation expired - removed.
12744 (SCM_NO_BIGDIG): deprecation expired - removed.
12745
12746 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12747 (scm_tc_dblr): deprecation expired - removed.
12748 (scm_tc_dblc): deprecation expired - removed.
12749 (scm_tc16_flo): deprecation expired - removed.
12750 (scm_tc_flo): deprecation expired - removed.
12751
12752 * tag.h (scm_tag): deprecation expired - removed.
12753
12754 * tag.c: (scm_tag): deprecation expired - removed.
12755
12756 * ioext.c: (scm_fseek): deprecation expired - removed.
12757
12758 * ioext.h (scm_fseek): deprecation expired - removed.
12759
12760 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12761
12762 * gh.h (gh_int2scmb): deprecation expired - removed.
12763
e3334972
NJ
127642001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12765
12766 * stacks.c (scm_make_stack): Fix typo in docstring.
12767
a0f979ac
RB
127682001-04-27 Rob Browning <rlb@cs.utexas.edu>
12769
12770 * error.c (scm_sysmissing): deprecation expired - removed.
12771
12772 * error.h (scm_sysmissing): deprecation expired - removed.
12773
12774 * gc.c
12775 (scm_init_gc): gc-thunk deprecation expired - removed.
12776 (scm_gc_vcell): deprecation expired - removed.
12777 (gc_async_thunk): scm_gc_vcell related code removed.
12778
12779 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12780
12781 * strings.h
12782 (SCM_NSTRINGP): deprecation expired - removed.
12783 (SCM_NRWSTRINGP): deprecation expired - removed.
12784
12785 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12786
12787 * chars.h
12788 (SCM_ICHRP): deprecation expired - removed.
12789 (SCM_ICHR): deprecation expired - removed.
12790 (SCM_MAKICHR): deprecation expired - removed.
12791
12792 * ports.h
12793 (SCM_INPORTP): deprecation expired - removed.
12794 (SCM_OUTPORTP): deprecation expired - removed.
12795
253081cf
MV
127962001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12797
12798 * modules.c (scm_module_type): New.
12799 (scm_post_boot_init_modules): Initialize from Scheme value.
12800 (the_module, scm_current_module, scm_init_modules): the_module is
12801 now a C only fluid.
12802 (scm_current_module): Export to Scheme.
12803 (scm_set_current_module): Do not call out to Scheme, do all the
12804 work in C. Export procedure to Scheme. Only accept modules, `#f'
12805 is no longer valid as the current module. Only set
12806 scm_top_level_lookup_closure_var and scm_system_transformer when
12807 they are not deprecated.
12808 (scm_module_transformer, scm_current_module_transformer): New.
12809
12810 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12811 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12812
253081cf
MV
12813 * gh_data.c: Removed FIXME comment about gh_lookup returning
12814 SCM_UNDEFINED. That's the right thing to do.
12815
12816 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12817 into the conditionally compiled sections.
12818 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12819 scm_current_module_transformer instead of scm_system_transformer.
12820 * init.c (start_stack): Move initialization of
12821 scm_system_transformer to the deprecated section.
1c938eb8 12822
1f7f9ed4
NJ
128232001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12824
12825 * throw.c (scm_throw): Correct docstring.
12826
66c73b76
GH
128272001-04-22 Gary Houston <ghouston@arglist.com>
12828
eefae538
GH
12829 * socket.c: attempted to improve the docstrings slightly.
12830
66c73b76
GH
12831 * net_db.c: remove bogus "close" declaration.
12832 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12833 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12834 moved to socket.c.
12835 * net_db.h: declarations moved too.
12836
12837 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12838 long.
12839 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12840 (VALIDATE_INET6): new macro.
12841 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12842 inet-pton and inet-ntop.
12843 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12844 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12845
7a7f7c53
DH
128462001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12847
12848 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12849 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12850
12851 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12852 when compiled in debug mode.
12853
12854 (scm_gc_sweep): Only call smob's free function if it is defined.
12855
12856 * print.c (scm_iprin1): No need to check for validity of smob
12857 type or existence of print function.
12858
12859 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12860 Resizing will not work well with preemptive threading.
12861
12862 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12863
12864 (scm_make_smob_type): Extracted initialization of smob
12865 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12866 of the critical section.
12867
12868 (scm_smob_prehistory): Initialize all smob descriptors. By
12869 default, don't assign a smob free function: Most smob types don't
12870 need one.
12871
12872 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12873
e1368a8d
GH
128742001-04-21 Gary Houston <ghouston@arglist.com>
12875
12876 * socket.c (FLIP_NET_HOST_128): new macro.
12877 (scm_fill_sockaddr): use new macro.
12878 (scm_addr_vector): completed IPv6 address support. added const
12879 to the address parameter.
12880
5a525b84
GH
128812001-04-20 Gary Houston <ghouston@arglist.com>
12882
12883 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12884 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12885 is defined.
12886 (scm_addr_vector): use a switch instead of multiple if statements.
12887 Add support for IPv6 (incomplete) .
e1368a8d 12888 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12889
1a551638
DH
128902001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12891
12892 * struct.c (scm_free_structs): Only pairs may be accessed with
12893 SCM_C[AD]R.
12894
c07b3fef
MD
128952001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12896
a9d861e3
MD
12897 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12898
c07b3fef
MD
12899 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12900 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12901 parentheses in order to get the correct associativity.
12902
af7546eb
DH
129032001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12904
12905 * unif.c (scm_array_to_list): Added missing handling of arrays of
12906 bytes. Thanks to Masao Uebayashi for the bug report.
12907
4daecfee
DH
129082001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12909
12910 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12911 consistently.
12912
726d810a
DH
129132001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12914
12915 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12916
12917 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12918 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12919 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12920 SCM_CLOSURE_FORMALS.
12921
12922 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12923 (scm_i_procedure_arity): Prefer stronger predicates like
12924 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12925
12926 * macros.c (macro_print): Extracted macro printing code from
12927 print.c and simplified it.
12928
12929 (scm_macro_type): Use SCM_MACRO_TYPE;
12930
12931 (scm_init_macros): Use macro_print for printing macros.
12932
12933 * print.c (scm_print_opts): Improved option documentation.
12934
12935 (scm_iprin1): Extracted printing of macros to macros.c.
12936 Simplified printing of ordinary closures.
12937
12938 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12939 Martin Grabmueller for the bug report.
12940
e038c042
DH
129412001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12942
12943 This patch eliminates some further applications of SCM_C[AD]R to
12944 non pair cells.
12945
12946 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12947 never been applied to real pairs.
12948
12949 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12950
12951 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12952
12953 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12954 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12955 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12956
12957 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12958 Added.
12959
12960 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12961 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12962
12963 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12964 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12965 SCM_SET{AND,OR}_CAR.
12966
3453619b
GH
129672001-04-17 Gary Houston <ghouston@arglist.com>
12968
12969 * some initial support for IPv6:
1c938eb8 12970
3453619b
GH
12971 * socket.c (scm_fill_sockaddr): improve the argument validation.
12972 don't allocate memory until all args are checked. instead of
12973 unconditional memset of soka, try setting sin_len to 0 if
12974 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12975 (scm_socket, scm_connect): extend docstrings for IPv6.
12976 (scm_init_socket): intern AF_INET6 and PF_INET6.
12977
216eedfc
DH
129782001-04-17 Niibe Yutaka <gniibe@m17n.org>
12979
12980 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12981 matches SCM_DEFER_INTS at the beginning of the function.
12982
12983 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12984
12985 * gc.c (scm_igc): Unconditionally call
12986 SCM_CRITICAL_SECTION_START/END.
12987
12988 * fluids.c (next_fluid_num): Unconditionally call
12989 SCM_CRITICAL_SECTION_START/END.
12990 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12991
12992 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12993 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12994 Removed.
12995
12996 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12997 Defined as nothing for the case of !defined(USE_THREADS).
12998 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12999 Removed.
13000 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
13001 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
13002 LINE.
13003 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
13004 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
13005 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
13006 SCM_CRITICAL_SECTION_START/END.
13007 (SCM_REALLOW_INTS: Bug fix. Don't call
13008 SCM_THREAD_SWITCHING_CODE.
13009 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
13010 SCM_THREAD_SWITCHING_CODE directly.
13011 (SCM_ENTER_A_SECTION): Unconditionally use
13012 SCM_CRITICAL_SECTION_START/END. (was:
13013 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
13014
130152001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13016
13017 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
13018 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
13019 allowed to explicitly set this macro via the CFLAGS variable
13020 during make.
13021
13022 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
13023 (SCM_THREAD_CRITICAL_SECTION_START,
13024 SCM_THREAD_CRITICAL_SECTION_END): Renamed
13025 SCM_THREAD_CRITICAL_SECTION_START/END to
13026 SCM_CRITICAL_SECTION_START/END.
13027
f22ed5a0
KN
130282001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
13029
13030 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
13031 instead of bzero.
1c938eb8 13032
f22ed5a0 13033 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 13034 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
13035
13036 Thanks to NIIBE Yutaka.
13037
508ded1c
MD
130382001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13039
a087ba81
MD
13040 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
13041 goops module should be registered in order to work for an
13042 application which uses libguile statically linked.)
508ded1c 13043
e4b265d8
DH
130442001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
13045
13046 * numbers.[ch] (scm_num2long, scm_num2long_long,
13047 scm_num2ulong_long, scm_num2ulong): Argument position is an
13048 unsigned integer.
13049
13050 * environments.c (eval_environment_folder,
13051 import_environment_folder), gh_data.c (gh_scm2longs,
13052 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
13053 for integers and pointers, respectively.
13054
13055 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
13056 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
13057 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
13058 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
13059
13060 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
13061 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
13062 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
13063 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
13064 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
13065 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
13066
89d04205
NJ
130672001-04-09 Neil Jerram <neil@ossau.uklinux.net>
13068
13069 * strings.c (scm_read_only_string_p): Update docstring to reflect
13070 current (non-)usage of "read only" strings.
40f83c3e
NJ
13071 (scm_make_shared_substring): Clarify docstring by changing
13072 "semantics" to "arguments".
89d04205 13073
4d66be54
MG
130742001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13075
13076 * hooks.c (scm_make_hook, scm_make_hook_with_name),
13077 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
13078 improvements.
13079
1e6808ea
MG
130802001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13081
13082 The following changes make the documentation more consistent.
1c938eb8 13083
1e6808ea
MG
13084 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
13085 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
13086 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
13087 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
13088 ... @end lisp.
13089
13090 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
13091 (scm_array_dimensions, scm_make_shared_array),
13092 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
13093 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
13094 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
13095 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
13096 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
13097 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
13098 macros.c (scm_makmmacro), list.c (scm_append), environments.c
13099 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
13100 @example ... @end example to @lisp ... @end lisp.
13101
13102 * weaks.c (scm_weak_vector): Corrected docstring.
13103
13104 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
13105 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
13106 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
13107 (scm_hashx_set_x, scm_hashx_get_handle),
13108 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
13109 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
13110 vectors.c (scm_vector_fill_x), strings.c
13111 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
13112 objprop.c (scm_set_object_properties_x):
13113 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
13114 strports.c (scm_call_with_input_string), ports.c
13115 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
13116 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
13117 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
13118 (scm_make_weak_vector,scm_weak_vector_p),
13119 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
13120 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
13121 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13122 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
13123 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
13124 Made parameter names match documentation by renaming parameters
13125 and/or fixing docstrings.
1c938eb8 13126
1e6808ea
MG
13127 * numbers.c (scm_ash): Corrected Texinfo markup.
13128
13129 * strop.c (scm_string_index, scm_string_rindex),
13130 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
13131
13132 * vports.c (scm_make_soft_port), unif.c
13133 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
13134 (scm_dimensions_to_uniform_array, scm_transpose_array),
13135 (scm_array_in_bounds_p, scm_uniform_vector_ref),
13136 (scm_bit_count, scm_bit_position, scm_bit_count_star),
13137 (scm_array_to_list, scm_list_to_uniform_array),
13138 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
13139 (scm_open_input_string, scm_open_output_string),
13140 (scm_get_output_string), strop.c (scm_string_copy),
13141 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
13142 (scm_get_internal_real_time, scm_times),
13143 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
13144 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
13145 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
13146 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
13147 simpos.c (scm_system), random.c (scm_random_uniform),
13148 (scm_random_normal, scm_random_exp), ramap.c
13149 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
13150 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
13151 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
13152 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
13153 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
13154 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
13155 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
13156 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
13157 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
13158 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
13159 (scm_logand, scm_logior, scm_logxor, scm_lognot),
13160 (scm_integer_expt, scm_bit_extract, scm_logcount),
13161 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
13162 net_db.c (scm_inet_netof, scm_lnaof), modules.c
13163 (scm_interaction_environment), macros.c (scm_makacro),
13164 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
13165 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
13166 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
13167 (scm_fluid_ref), filesys.c (scm_open_fdes),
13168 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
13169 Docstring correction: `Returns' -> `Return'
13170
1c938eb8
TTN
13171 * gc.c (scm_set_debug_cell_accesses_x):
13172 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
13173 * fluids.c (scm_fluid_p): Added texinfo markup.
13174
13175 * error.c (scm_strerror): Made docstring more precise.
13176
13177 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
13178 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
13179 (scm_symbol_p, scm_symbol_to_string), strorder.c
13180 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
13181 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
13182 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
13183 (scm_string_ci_geq_p), strop.c (scm_string_copy),
13184 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
13185
9a6976cd
DH
131862001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
13187
13188 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
13189 mode, as suggested by Michael Livshin.
13190
463b2219
ML
131912001-03-31 Michael Livshin <mlivshin@bigfoot.com>
13192
13193 * backtrace.c (display_backtrace_body): since the `print_state'
13194 variable is not used (instead its data field is used directly as
13195 `pstate'), protect it from the hungry compiler optimizations.
13196 thanks to Bill Schottstaedt for the report.
13197
61045190
DH
131982001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13199
13200 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
13201 It is only defined and used if guile is compiled with
13202 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
13203 let cells with a free_cell type tag be visible outside of the
13204 garbage collector when in debug mode.
13205
13206 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
13207
13208 (scm_assert_cell_valid): Use a local static variable to avoid
13209 recursion.
13210
13211 (MARK): Only check for rogue cell pointers in debug mode. Use
13212 scm_cellp for this purpose and place all checks for rogue pointers
13213 into that function. Further, since due to conservative scanning
13214 we may encounter free cells during marking, don't use the standard
13215 cell type accessor macro to determine the cell type.
13216
13217 (scm_cellp): Check if the cell pointer actually points into a
13218 card header.
13219
13220 (scm_init_gc): Initalize scm_tc16_allocated.
13221
13222 * gc.h (GCH): Renamed to SCM_GC_H.
13223
13224 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
13225 might be unnecessary, but I feel better this way :-)
13226
13227 (SCM_GC_CELL_TYPE): New macro.
13228
13229 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
13230 in guile, and it is unlikely that they will be applied to real
13231 pairs anyway.
13232
13233 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
13234
13235 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
13236 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
13237
13238 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
13239 make sure that in debug mode no free cell will ever be visible
13240 outside of the garbage collector.
13241
85d6df6a
DH
132422001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
13243
13244 * async.c (scm_asyncs_pending): Don't use != to compare SCM
13245 values.
13246
13247 * async.c (scm_system_async), variable.c (scm_make_variable,
13248 scm_make_undefined_variable): Use scm_cons to create a pair.
13249
13250 * debug.c (scm_reverse_lookup): Perform proper type checking.
13251 Remove suspicious use of SCM_SLOPPY_CONSP.
13252
13253 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
13254 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
13255 the corresponding optimization.
13256
13257 * eval.c (iqq): Use proper type check.
13258
13259 (scm_m_expand_body): Remove redundant type checks.
13260
13261 (promise_print): Don't access promise cells as pairs.
13262
13263 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
13264 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
13265 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
13266 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
13267 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
13268
13269 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
13270 (scm_iprin1): Use new macro predicate and accessors.
13271
13272 * eval.h (scm_tc16_macro): Removed declaration. It is declared
13273 in macros.h.
13274
13275 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
13276 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
13277 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
13278 SCM_VARIABLE_H. Even the macros that are used to inhibit
13279 including a header file twice should be in the SCM_ namespace.
13280
13281 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
13282 properties.c (scm_primitive_property_ref,
13283 scm_primitive_property_del_x): Prefer stronger predicates like
13284 SCM_NULLP or SCM_FALSEP over SCM_IMP.
13285
13286 * gc.c (MARK): Use proper macros to access procedure-with-setter
13287 cell elements and closure cell elements.
13288
13289 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
13290 access free cells as pairs.
13291
13292 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13293 no hashtab entry is found.
13294
13295 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13296 SCM_CLR_PORT_OPEN_FLAG.
13297
13298 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13299 use SCM_SET_C[AD]R for uninitialized cells.
13300
13301 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13302 If the hashtable has no slots, return #f instead of '(). This
13303 unifies the return value with most assoc-functions.
13304
13305 (scm_hash_fn_ref): Use proper type check.
13306
13307 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13308 Removed references to non-existing functions from documentation.
13309
13310 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13311 access keyword cell elements.
13312
13313 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13314 macros.
13315
13316 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13317
13318 * print.c (scm_iprlist): Added comment. Improved loop
13319 conditions.
13320
13321 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13322 pairs.
13323
13324 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13325
13326 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13327
13328 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13329 cells as pairs.
13330
13331 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13332 scm_variable_set_x): Use proper macros to access variable cell
13333 elements.
13334
13335 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13336
13337 * variable.h (SCM_VARVCELL): Don't access variable cells as
13338 pairs.
13339
13340 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13341 added FIXME comment, removed register specifier.
13342
1b27e91a
KN
133432001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13344
13345 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13346 * init.c (scm_init_guile_1): Don't init goopscore module.
13347
16c634ec
MV
133482001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13349
13350 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13351
91344ceb
MG
133522001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13353
13354 * strop.c (scm_string_to_list): Fixed docstring markup.
13355 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13356 (scm_string_downcase, scm_string_capitalize_x),
13357 (scm_string_capitalize): Rewrote and corrected docstrings.
13358 (scm_string_ci_to_symbol): Made docstring more explicit.
13359
07576812
MV
133602001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13361
13362 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13363 eval.c can use it.
13364 (scm_call_with_values): Removed.
13365 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13366 so that it can be exported.
13367 (scm_call_with_values): Removed.
1c938eb8 13368
07576812
MV
13369 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13370 * eval.c: Include "libguile/values.h"
13371 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13372 New.
13373 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13374 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13375 New delcarations to support above change.
13376
13377 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13378 errors with last change.
1c938eb8 13379
07576812
MV
133802001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13381
13382 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13383 scm_i_eval): Moved the application of the system transformer from
13384 scm_i_eval to scm_primitive_eval.
13385
a17bb5fd
NJ
133862001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13387
a6be01a4
NJ
13388 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13389
a17bb5fd
NJ
13390 * strop.c (scm_string_index): Fix docstring line break
13391 regression.
13392
13393 * list.c (scm_cons_star): Fix docstring typo.
13394
be54b15d
DH
133952001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13396
13397 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13398 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13399 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13400 scm_make_string, scm_string_append), strports.c (st_resize_port,
13401 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13402 scm_makstr with calls to scm_allocate_string.
13403
13404 * strings.[ch] (scm_allocate_string): New function.
13405
13406 * strings.[ch] (scm_makstr): Deprecated.
13407
789ecc05
GH
134082001-03-18 Gary Houston <ghouston@arglist.com>
13409
6d163216
GH
13410 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13411 NULL. rewrote the docstring.
13412 (scm_mkstemp): new procedure implementing "mkstemp!".
13413 * posix.h: declare scm_mkstemp.
13414
789ecc05
GH
13415 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13416 normally it would be found in netdb.h.
13417
c6c79933
GH
134182001-03-17 Gary Houston <ghouston@arglist.com>
13419
e9e225e5
GH
13420 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13421 warning when HAVE_ARRAYS is not defined. move len too.
13422
13423 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13424 (EXTRA_DOT_X_FILES): let configure set the value.
13425 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13426
c6c79933
GH
13427 * gc.c (scm_must_malloc): changed the comment explaining when
13428 scm_must variants of malloc/free etc., should be used, based on
13429 explanation from Dirk Herrmann.
13430 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13431 string with procedure name. use scm_must_malloc instead of malloc.
13432 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13433 of malloc/free.
13434 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13435 scm_ungetc): use scm_must variants of malloc/realloc/free.
13436 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13437
b3fcac34
DH
134382001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13439
13440 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13441 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13442 scm_wrong_type_arg instead.
13443
13444 (SCM_WNA): Deprecated.
13445
13446 * error.[ch] (scm_wta): Deprecated.
13447
13448 * numbers.c (s_i_log): Minor comment fix.
13449
13450 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13451 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13452 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13453 wrong-num-args or misc errors.
13454
13455 * unif.c (scm_make_shared_array, scm_transpose_array,
13456 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13457 Validate the rest argument (note: this is only done when guile is
13458 built with SCM_DEBUG_REST_ARGUMENT=1)
13459
13460 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13461 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13462
13463 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13464 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13465
68baa7e7
DH
134662001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13467
13468 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13469 instead of scm_wrong_num_args.
13470
13471 * coop-threads.c: Don't include libguile/strings.h. (Was only
13472 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13473
13474 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13475 wrong-num-args errors.
13476
9f40cd87
DH
134772001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13478
13479 * error.[ch] (scm_error_num_args_subr): New function.
13480
5352393c
MG
134812001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13482
13483 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13484 (scm_length, scm_append, scm_reverse, scm_list_ref),
13485 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13486 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13487 (scm_delete1_x), gc.c (scm_map_free_list),
13488 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13489 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13490 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13491 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13492 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13493 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13494 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13495
13496 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13497 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13498 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13499 symbols.c (scm_symbol_interned_p), numbers.c
13500 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13501 markup.
13502
a9205f07
KN
135032001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13504
13505 * snarf.h (SCM_CONST_LONG): Deprecated.
13506 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13507
6d583887
MV
135082001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13509
13510 * numbers.c (scm_num2ulong): Check that a bignum is positive
13511 before looking at the magnitude. Correctly check for overflow
13512 during conversion.
13513 (scm_num2long_long): Likewise.
13514 (scm_num2ulong_long): New.
13515 (ULONG_LONG_MAX): Define if not already defined.
13516 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13517
e87a03fc
MG
135182001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13519
13520 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13521
13522 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13523 (SCM_OPOUTSTRPORTP): New predicate macros.
13524 (scm_open_input_string, scm_open_output_string),
13525 (scm_get_output_string): New prototypes.
1c938eb8 13526
e87a03fc
MG
13527 * strports.c (scm_open_input_string, scm_open_output_string),
13528 (scm_get_output_string): New procedures (SRFI-6 compliant).
13529 Made scm_tc16_strport non-static.
13530
160bb34a
DH
135312001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13532
13533 * macros.h (SCM_ASSYNT): Removed unused object argument from
13534 signature.
13535
13536 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13537 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13538 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13539 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13540 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13541 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13542 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13543 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13544 scm_m_atdispatch): Removed unused object argument from call to
13545 SCM_ASSYNT.
13546
80dee77b
DH
135472001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13548
13549 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13550 const int* to reflect that the input array of integers remains
13551 unchanged. Thanks to Brett Viren for the hint.
13552
d3dd80ab
MG
135532001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13554
13555 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13556 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13557 in various places.
13558 (gh_scm2newstr, gh_symbol2newstr): Change call to
13559 scm_must_malloc() to malloc(), because user-free()able memory is
13560 allocated.
13561
13562 * gc.c: Added declaration of `scm_debug_check_freelist'.
13563
26a3038d
MG
135642001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13565
13566 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13567
1f3908c4
KN
135682001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13569
13570 * strports.c (scm_object_to_string): New procedure.
13571 (scm_strprint_obj): Deprecated.
13572 * strports.h: Reflect the changes.
13573
e11208ca
DH
135742001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13575
13576 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13577
13578 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13579 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13580 SCM_ASSYNT to check for correct argument types. Either use some
13581 SCM_VALIDATE_* macro or an explicit test.
13582
13583 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13584 misc-errors.
13585
13586 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13587 instead of calling scm_wta.
13588
67e8151b
MG
135892001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13590
13591 * load.c (scm_primitive_load, scm_primitive_load_path),
13592 (scm_sys_search_load_path): Corrected docstrings (file ->
13593 filename).
13594
13595 * eval.c (scm_force): Added texinfo markup to docstring.
13596 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13597
13598 * debug-malloc.c: Reinserted #include <stdio.h>.
13599
e0c08f17
KN
136002001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13601
e39c3de4
KN
13602 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13603
e0c08f17
KN
13604 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13605 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13606 Use SCM_LISTn instead of scm_listify.
13607
e6e2e95a
MD
136082001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13609
13610 * _scm.h: Removed #include <errno.h>.
13611
13612 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13613 errno variable (can be a macro on some systems, for example when
13614 using linux libc with threads).
13615
13616 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13617 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13618 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13619 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13620
97d0e20b
GH
136212001-03-10 Gary Houston <ghouston@arglist.com>
13622
13623 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13624 not already defined.
13625
e75341b3
MD
136262001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13627
13628 * coop.c: Inserted #include <stdio.h>.
13629
13630 * iselect.c: Reinserted #include <stdio.h>.
13631
74355186
MV
136322001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13633
13634 * posix.c: Replaced `#define' of __USE_XOPEN right before
13635 including unistd.h with a define of _GNU_SOURCE at the very top of
13636 the file.
13637
783e7774
KN
136382001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13639
13640 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13641 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13642 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13643 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13644 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13645 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13646 print.c, procprop.c, procs.c, properties.c, ramap.c,
13647 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13648 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13649 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13650 Remove #include <stdio.h>
783e7774
KN
13651 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13652
13653 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13654
9a677c37
MG
136552001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13656
13657 * posix.c (scm_gethostname): Set initial name length to 256 for
13658 Solaris.
13659
94e6d793
MG
136602001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13661
13662 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13663 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13664 (scm_sethostname, scm_gethostname): New prototypes.
13665
13666 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13667 <sys/file.h>, if present.
13668 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13669 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13670 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13671 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13672 (scm_sethostname, scm_gethostname): New procedures.
13673
650a1cf9
NJ
136742001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13675
13676 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13677 not optional (ii) "recommend" spelling correction.
13678
9636b49c
MD
136792001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13680
5e4a4d09
MD
13681 * ramap.c (racp): Removed optimization which caused array copying
13682 to fail if the two arrays shared storage. Re-inserted the IVDEP
13683 macros removed in the change of 2000-03-09. (Don't really have a
13684 complete grasp of what they are for, but they seem to be necessary
13685 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13686
9636b49c
MD
13687 * hash.c (scm_string_hash): Don't downcase characters.
13688
04a4d666
MD
136892001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13690
9636b49c 13691 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13692 size from 277 --> 1009.
13693
13694 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13695 function.
13696
13697 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13698
04a4d666
MD
13699 * validate.h: Code formatting.
13700
66418d34
KN
137012001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13702
13703 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13704 (*.doc): Add dependency on guile-snarf.awk.in.
13705
13706 * guile-snarf.awk.in: Neglect spaces at the end of
13707 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13708 middle of docstrings. (To avoid the problem with gcc-2.96.)
13709
2ade72d7
DH
137102001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13711
13712 * coop-threads.c (scm_call_with_new_thread), load.c
13713 (scm_primitive_load, scm_sys_search_load_path), random.c
13714 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13715 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13716 (potentially) issue a scm-misc-error or wrong-num-args error
13717 message.
13718
13719 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13720 about the expected type with the wrong-type-arg error message.
13721
13722 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13723 a C level bug that can't be fixed from scheme anyway.
13724
586d7da2
MD
137252001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13726
13727 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13728 Duplicate bindings are OK in a let* since a let* is semantically
13729 equivalent to a nested set of let:s.
13730
1dd05fd8
MG
137312001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13732
13733 * print.c (scm_print_options): Fixed texinfo in docstring.
13734
13735 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13736 the underlying functions getservent, getprotoent or getnetent
13737 return NULL instead of signalling an error.
13738
439006bf
GH
137392001-03-04 Gary Houston <ghouston@arglist.com>
13740
13741 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13742 taking an unexpectedly large filename for an AF_UNIX socket from
13743 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13744
439006bf
GH
13745 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13746 former and adjusted the latter.
13747 (scm_socket, scm_socketpair): cosmetic changes.
13748 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13749 size_t as socklen_t substitute. don't restrict args/return values
13750 to INUM: allow full range of int or size_t.
13751 (scm_fill_sockaddr): check arguments before allocating memory, to
13752 avoid leakage. use malloc, not scm_must_malloc.
13753 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13754 substitute. free the sockaddr structure before throwing an error.
13755 (scm_init_add_buffer): procedure removed, together with its static
13756 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13757 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13758 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13759 scm_sendto): use a local buffer instead of scm_addr_buffer.
13760 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13761 not size_t.
13762 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13763 call to detect whether recvfrom could be bothered to set the address.
13764 (scm_init_socket): don't call scm_init_addr_buffer.
13765
276dd677
DH
137662001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13767
13768 * debug.c (scm_procedure_source, scm_procedure_environment),
13769 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13770 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13771 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13772 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13773 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13774 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13775 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13776 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13777 scm_array_to_list, scm_array_prototype), validate.h
13778 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13779 scm_misc_error or scm_wrong_type_arg instead.
13780
13781 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13782
5e03762c
MD
137832001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13784
13785 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13786 (scm_sys_tag_body): Added.
13787
db4b4ca6
DH
137882001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13789
13790 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13791 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13792 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13793 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13794 options.c (scm_options), ports.c (scm_remove_from_port_table),
13795 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13796 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13797 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13798 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13799 instead.
13800
87e7741d
MD
138012001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13802
13803 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13804
d19b0aac
MV
138052001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13806
13807 * eval.c (scm_s_duplicate_bindings): New error message.
13808 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13809
2fd945df
MV
138102001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13811
13812 * eval.h (SCM_EVALIM2): New macro. Use it when a
13813 immediate, literal constant should be evaluated.
13814 * eval.c (scm_s_duplicate_formals): New error message string.
13815 (scm_c_improper_memq): New function.
13816 (scm_m_lambda): Check for duplicate arguments.
13817 (scm_ceval, scm_deval): When executing a body: only cons a new
13818 toplevel environment frame when it is different from the
13819 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13820 check for empty combinations; use SCM_EVALIM2 for the same reason
13821 in the non-toplevel loop.
13822 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13823 New labels with the meaning of their non-"nontoplevel" partners,
13824 but they are used when it is known that the body is not evaluated at
13825 top-level.
13826 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13827 reporting for empty combinations.
13828
9e6fc585
KN
138292001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13830
13831 * Remove dump facilities.
13832 * dump.c, dump.h: Removed.
13833 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13834 * init.c: Remove #include "libguile/dump.h".
13835 (scm_init_guile_1): Remove scm_init_dump.
13836 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13837 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13838 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13839 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13840
13841 * keywords.c: Remove #include "libguile/dump.h".
13842 (keyword_dump, keyword_undump): Removed.
13843 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13844
eae54bf0
MG
138452001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13846
13847 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13848 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13849 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13850 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13851 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13852 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13853 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13854 to @code{} as the texinfo manual recommends, converted the
13855 examples to use a @lisp{}-environment.
13856
13857 * strports.c (scm_eval_string): Cleaned up the docstring.
13858
13859 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13860 markup.
13861
13862 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13863 (scm_number_to_string, scm_string_to_number, scm_number_p)
13864 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13865 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13866 (scm_ash): Added texinfo markup and removed obsolete @refill.
13867 (scm_gr_p): Corrected comment.
13868 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13869 docstring) comments.
13870 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13871 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13872 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13873 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13874 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13875 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13876 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13877 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13878
23deee81
DH
138792001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13880
13881 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13882 (Obviously nobody compiles with SCM_RECKLESS defined...)
13883
13884 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13885
6fe692e9
MD
138862001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13887
13888 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13889
13890 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13891
27c37006
NJ
138922001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13893
13894 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13895 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13896 since use of `z' suggests that the arguments may be complex.
13897
13898 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13899 typos.
13900
2069af38
NJ
139012001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13902
13903 * dump.c (scm_binary_write, scm_binary_read), eval.c
13904 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13905 scm_guardian_greedy_p, scm_make_guardian), fports.c
13906 (scm_file_port_p): Minor docstring fixes.
13907
b42ff180
MV
139082001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13909
2069af38 13910 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13911
13912 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13913 scm_i_eval.
13914 (make_class_from_template): Do not bother to set the current
13915 module around the call to DEFVAR, scm_eval takes care of that.
13916 (scm_init_goops): Make scm_module_goops and
13917 scm_goops_lookup_closure permanent objects.
1c938eb8 13918
97ea55f8
MV
13919 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13920 top level, create a fresh top-level environment for each
13921 expression instead of mutating the exisint frame. This is
13922 important when that frame is closed over.
13923
b42ff180
MV
13924 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13925 SCM_DIGSPERLONG instead of DIGSPERLONG.
13926
09f2ab1e
MV
139272001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13928
13929 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13930 before applying arrow procedure in `cond' and before applying
13931 receiver procedure in call-with-current-continuation.
13932 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13933 macro. The argument is expanded more than one time.
13934
13935 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13936 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13937
139382001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13939
13940 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13941 notice and license.
13942
7090240c
MG
139432001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13944
13945 * variable.c (scm_make_variable, scm_make_undefined_variable)
13946 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13947 (scm_variable_bound_p), values.c (scm_values)
13948 (scm_call_with_values), unif.c (scm_bit_count)
13949 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13950 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13951 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13952 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13953 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13954 (scm_copy_random_state, scm_random), print.c (scm_newline)
13955 (scm_write_char, scm_simple_format), debug-malloc.c
13956 (scm_malloc_stats), environments.c (scm_environment_p)
13957 (scm_environment_bound_p, scm_environment_ref)
13958 (scm_environment_fold, scm_environment_define)
13959 (scm_environment_undefine, scm_environment_set_x)
13960 (scm_environment_cell, scm_environment_observe)
13961 (scm_environment_observe_weak, scm_environment_unobserve)
13962 (scm_make_eval_environment, scm_eval_environment_p)
13963 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13964 (scm_eval_environment_imported)
13965 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13966 (scm_import_environment_p, scm_import_environment_imports)
13967 (scm_import_environment_set_imports_x, scm_make_export_environment)
13968 (scm_export_environment_p, scm_export_environment_private)
13969 (scm_export_environment_set_private_x)
13970 (scm_export_environment_signature)
13971 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13972 Added texinfo markup.
13973
13974 * ports.c (scm_drain_input): Lowercased argument to @var.
13975 (scm_current_input_port, scm_current_output_port): Filled in
13976 missing explanation.
13977 (scm_current_load_port, scm_set_current_output_port)
13978 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13979 Added texinfo markup.
13980
13981 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13982 (scm_release_arbiter): Added texinfo markup to docstrings.
13983 Changed `Returns' to `Return'.
13984 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13985
25703850
NJ
139862001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13987
13988 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13989 by doubling them to `@@'.
13990
73c0fdce
MG
139912001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13992
13993 * numbers.c (scm_lognot), random.c (scm_random,
13994 scm_random_normal, scm_random_solid_sphere_x,
13995 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13996 scm_random_exp), dynwind.c
13997 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13998
73c0fdce
MG
13999 * goops.c (scm_sys_initialize_object, scm_instance_p,
14000 scm_class_name, scm_class_precedence_list, scm_class_slots,
14001 scm_class_environment, scm_generic_function_name,
14002 scm_generic_function_methods, scm_method_generic_function,
14003 scm_method_specializers, scm_method_procedure, scm_make_unbound,
14004 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
14005 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
14006 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
14007 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
14008 scm_class_direct_supers, scm_class_direct_slots,
14009 scm_class_direct_subclasses, scm_class_direct_methods,
14010 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
14011 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
14012 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
14013 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
14014 scm_memoized_environment, scm_procedure_name,
14015 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
14016 objects.c
14017 (scm_class_of, scm_entity_p, scm_operator_p,
14018 scm_set_object_procedure_x, scm_object_procedure,
14019 scm_make_class_object), hooks.c (scm_make_hook_with_name,
14020 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
14021 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
14022 scm_hook_to_list), lang.c
14023 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
14024 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
14025 (scm_print_options, scm_port_with_print_state,
14026 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
14027 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
14028 scm_make_procedure_with_setter, scm_procedure), throw.c
14029 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
14030 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
14031 scm_stack_ref, scm_stack_length, scm_frame_p,
14032 scm_last_stack_frame, scm_frame_number, scm_frame_source,
14033 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
14034 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
14035 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
14036 (scm_dirname, scm_basename), dynwind.c
14037 (scm_wind_chain), read.c (scm_read_options, scm_read,
14038 scm_read_hash_extend), gc.c
14039 (scm_unhash_name), eval.c (scm_eval_options_interface,
14040 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
14041 (scm_display_error, scm_set_print_params_x,
14042 scm_display_application, scm_display_backtrace, scm_backtrace),
14043 async.c (scm_async, scm_system_async, scm_async_mark,
14044 scm_system_async_mark, scm_run_asyncs, scm_noop,
14045 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
14046 scm_mask_signals): Added docstrings.
14047
e228a203
KN
140482001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
14049
14050 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
14051 address of car/cdr. (Thanks to Dirk Herrmann)
14052 Use scm_sizet to obtain the length of strings.
14053 (Thanks to Matthias Koeppe)
14054
1552a59d
MV
140552001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
14056
14057 * symbols.c (scm_mem2symbol): Put a empty statement after the
14058 next_symbol label. This is mandated by ANSI, appearantly.
14059
3178f751
MV
140602001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
14061
14062 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
14063 sense to compile for a specific kernel version. Do not include
14064 <asm/signal.h> while defining __KERNEL__. This hack should no
14065 longer be needed and caused problems.
14066
7af4defe
MV
140672001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
14068
14069 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
14070 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
14071 can not deal with immediates.
14072
5d6bb349
KN
140732001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
14074
14075 * list.c (scm_list_copy): Validate the first argument.
14076
ec9709f0
MV
140772001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
14078
14079 Fix evaluator so that top-level expressions are correctly
14080 evaluated with respect to the module system.
1c938eb8 14081
ec9709f0
MV
14082 * modules.h. modules.c (scm_current_module_lookup_closure): New
14083 function.
14084
14085 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
14086 prototypes.
14087 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
14088 names to better reflect their meaning.
14089
14090 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
14091 evaluated at top-level and synronize lookup closure before
14092 executing every subform.
14093 (scm_primitve_eval_x, scm_primitive_eval): New functions.
14094 (scm_eval_x, scm_eval): Reimplement in terms of
14095 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 14096
ec9709f0
MV
140972001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
14098
14099 * macros.c (scm_macro_name, scm_macro_transformer): Use
14100 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
14101 Thanks!
14102
42417394
KN
141032001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
14104
14105 * dump.c (scm_store_bytes): Store data size before data.
14106 (scm_restore_bytes): Restore data size. Takes a pointer to size.
14107 * dump.h (scm_restore_bytes): Updated.
14108
bf942687
KN
141092001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
14110
14111 * dump.c: Use double cells for update schedule.
14112
1be4270a
KN
141132001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
14114
14115 * ports.c (scm_unread_char): Take an optional argument.
14116
548728ea
MV
141172001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
14118
14119 * modules.h (scm_selected_module, scm_current_module): Renamed
14120 scm_selected_module to scm_current_module to synchronize Scheme
14121 and C names.
14122 (scm_select_module, scm_set_current_module): Likewise. Changed
14123 all uses.
1c938eb8 14124
548728ea
MV
14125 * ports.c (scm_port_for_each): Make a snapshot of the port table
14126 before iterating over it. The table might change while the user
14127 code is running. With the snapshot, the user can depend on the
c5408bc3 14128 fact that each port that existed at the start of the iteration is
548728ea
MV
14129 encountered exactly once. (ice-9 popen) depends on this.
14130
cb0d8be2
DH
141312001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14132
14133 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
14134
14135 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
14136 range checking for the size parameter. Thanks to Martin
14137 Grabmueller for the hint.
14138
14139 (scm_makstr): Reordered string initialization to make interrupt
14140 deferring unnecessary.
14141
14142 * vectors.c (scm_make_vector): Fixed range checking.
14143
e382fdbe
DH
141442001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
14145
14146 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
14147
14148 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
14149 checking of the size parameter for type correctness and valid
14150 range. Thanks to Rob Browning for reporting the problem. Instead
14151 of deferring interrupts, scm_remember_upto_here_1 is used.
14152
bf8f0922
KN
141532001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14154
14155 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
14156 (scm_dump_cell_update): Removed.
14157 (scm_dump_update): Renamed from scm_dump_object_update.
14158 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
14159 a pointer instead of returning a value.
14160 * keywords.c (keyword_undump): Updated.
14161
914cceec
KN
141622001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
14163
14164 * dump.c, dump.h: Modified a lot.
5f17c66f 14165 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
14166 (scm_dump_mark): Removed.
14167 (scm_restore_cell_object, scm_store_cell_object): New functions.
14168
14169 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
14170 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
14171 New slots: dump, undump.
14172 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
14173 Updated.
14174
14175 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
14176 (keyword_undump): Renamed from keyword_alloc.
14177 (scm_init_keywords): Set keyword_dump and keyword_undump.
14178
ecf470a2
ML
141792001-02-03 Michael Livshin <mlivshin@bigfoot.com>
14180
14181 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
14182 the deprecated SCM_DOUBLE_CELLP.
14183
14184 * tags.h (SCM_DOUBLE_CELLP): deprecated.
14185
03416a99
KN
141862001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
14187
14188 * dump.c, dump.h: New files.
14189 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
14190 * init.c: #include "libguile/dump.h".
14191 (scm_init_guile_1): Call scm_init_dump.
14192 * smob.h (scm_smob_descriptor): New slots: dump_mark,
14193 dump_dealloc, dump_store, undump_alloc, undump_restore,
14194 undump_init.
14195 * smob.c (scm_make_smob_type): Init the new slots.
14196 (scm_set_smob_dump, scm_set_smob_undump): New functions.
14197 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
14198
14199 * keywords.c: #include "libguile/dump.h".
14200 (keyword_dealloc, keyword_alloc): New functions.
14201 (scm_init_keywords): Set smob_dump and smob_undump.
14202
00ffa0e7
KN
142032001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
14204
14205 * vectors.c (scm_c_make_vector): New function.
14206 * vectors.h (scm_c_make_vector): Declared.
14207 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
14208 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
14209 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
14210 (scm_make_method_cache, scm_i_vector2list,
14211 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
14212 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
14213 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
14214 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
14215 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
14216 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
14217 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
14218 (scm_vector, scm_make_vector): Use scm_c_make_vector.
14219
14220 * hashtab.c (scm_c_make_hash_table): New function.
14221 * hashtab.h (scm_c_make_hash_table): Declared.
14222 * environments.c (scm_make_leaf_environment,
14223 scm_make_eval_environment), gc.c (scm_init_storage),
14224 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
14225 Use scm_c_make_hash_table.
14226
b8446ce8
MD
142272001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14228
14229 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
14230
e3239868
DH
142312001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
14232
14233 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
14234 end of docstring.
14235
14236 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
14237 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
14238 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
14239 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
14240 srcprop.c (scm_source_properties, scm_set_source_properties_x,
14241 scm_source_property, scm_set_source_property_x), sort.c
14242 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
14243 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
14244 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
14245 docstrings.
14246
41ee56dd
MD
142472001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14248
14249 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
14250 really get that arg.
14251
b6311c08
KN
142522001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
14253
14254 * goops.c (s_scm_get_keyword): Bug fix.
14255
a49af0c0
DH
142562001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14257
14258 The following patch was sent by Martin Grabmueller. It makes sure
14259 that in case of parameter errors the correct function name is
14260 shown, and that parameter types are only checked once.
14261
14262 * strop.c (string_copy, string_upcase_x, string_downcase_x,
14263 string_capitalize_x): New functions. Each one performs the core
14264 functionality of the corresponding scm_* function.
14265
14266 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
14267 scm_string_downcase_x, scm_string_downcase,
14268 scm_string_capitalize_x, scm_string_capitalize): Reduced to
14269 parameter checking wrappers of the above functions.
14270
13070bd3
DH
142712001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
14272
14273 * continuations.c, dynl.c, keywords.c, load.c: Include
14274 strings.h. Thanks to Bill Schottstaedt for the bug report.
14275
2f2b390c
DH
142762001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14277
14278 * backtrace.c (display_header): Make sure that line and column
14279 information is shown independent of whether the port the code was
14280 read from had an associated filename. Thanks to Martin
14281 Grabmueller for providing this patch.
14282
efa40607
DH
142832001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14284
14285 * fports.[ch] (scm_file_port_p): New primitive.
14286
a98bddfd
DH
142872001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14288
14289 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
14290 These are now defined in fports.c, strports.c and vports.c.
14291
14292 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14293 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14294 tags.h).
14295
14296 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14297 (scm_make_sfptob): Made static. These return a type code now.
14298
14299 fports.c (scm_init_fports), strports.c (scm_init_strports),
14300 vports.c (scm_init_vports): Create the corresponding port types.
14301
14302 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14303 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14304
14305 * init.c (scm_init_guile_1): Make sure strports are initialized
14306 before gdbint.
14307
14308 * ports.[ch] (scm_make_port_type): Changed the return type to
14309 scm_bits_t.
14310
14311 * ports.c (scm_ports_prehistory): Don't create any port types
14312 here.
14313
14314 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14315 against scm_tc16_fport directly.
14316
0419a528
DH
143172001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14318
14319 * srcprop.c (scm_set_source_property_x): Fix to handle
14320 (set-source-property! <obj> 'copy <datum>) correctly.
14321
6d36532c
GH
143222001-01-24 Gary Houston <ghouston@arglist.com>
14323
14324 * filesys.c (scm_link): docstring fix.
14325 * fports.h (scm_setfileno): obsolete declaration removed.
14326 * posix.c: bogus popen declaration removed.
14327
14328 * rdelim.c: new file, split from ioext.c.
14329 * rdelim.h: new file, split from ioext.h
14330 * Makefile.am: add rdelim.c and related files.
14331 * init.c: call scm_init_rdelim. include rdelim.h.
14332
3ba5a6c2
DH
143332001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14334
14335 This patch was sent by Martin Grabmueller and makes sure that
14336 parameter errors are reported correctly by the lexicographic
14337 ordering predicates.
14338
14339 * strorder.c (string_less_p, string_ci_less_p): New functions.
14340
14341 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14342 functionality into string_less_p, string_ci_less_p respectively.
14343 The remaining code is just a wrapper to do the parameter
14344 checking.
14345
14346 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14347 parameters and call string_less_p instead of scm_string_less_p.
14348
14349 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14350 Check the parameters and call string_less_ci_p instead of
14351 scm_string_ci_less_p.
14352
e40a4095
DH
143532001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14354
ed6a2db9
DH
14355 This patch modifies scm_display_error to perform parameter
14356 checking. Thanks to Neil Jerram for the bug report.
14357
e40a4095
DH
14358 * backtrace.[ch] (scm_i_display_error): New function.
14359
14360 * backtrace.c (scm_display_error): Added parameter check and
14361 extracted the core functionality into function
14362 scm_i_display_error.
14363
14364 * throw.c (handler_message): Call scm_i_display_error to display
14365 the error message.
14366
f1e06a96
MD
143672001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14368
14369 * eval.c (SCM_APPLY): Added # args check for application of
14370 procedures with arity 3. (Thanks to Anders Holst.)
14371
30ea841d
DH
143722001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14373
14374 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14375
14376 (SCM_OPDIRP): Deprecated.
14377
14378 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14379 SCM_OPN.
14380
14381 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14382 Instead, give an explicit error message in case the directory is
14383 closed.
14384
14385 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14386 instead of SCM_OPENP and SCM_CLOSEDP.
14387
14388 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14389
312ae976
DH
143902001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14391
14392 * eval.c (inner_eval, scm_eval): Move all real functionality into
14393 inner_eval. Avoid to copy the expression twice by inlining some
14394 code from scm_i_eval.
14395
4567ed78
DH
143962001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14397
14398 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14399 now has to be the last clause, as required by R5RS. Thanks to
14400 Martin Grabmueller for the patch.
14401
10288a09
GH
144022001-01-18 Gary Houston <ghouston@arglist.com>
14403
14404 * ioext.c: further simplify scm_read_string_x_partial by defining
14405 a macro SCM_EBLOCK.
14406
8f379a8f
DH
144072001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14408
14409 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14410
5c75b29f
DH
144112001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14412
14413 * __scm.h: Added comment about architecture and compiler
14414 properties that are required by guile.
14415
14416 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14417 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14418
14419 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14420
14421 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14422
14423 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14424 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14425
ac0c002c
DH
144262001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14427
14428 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14429 to the names in limits.h.
14430
14431 * numbers.c (abs_most_negative_fixnum): Added.
14432
14433 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14434 fixnum-min) special case.
14435
14436 (scm_big_and): Fix for negative first parameter.
14437
14438 (scm_bit_extract): Fix for fixnum paramters.
14439 Thanks to Rob Browning for the bug report.
14440
14441 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14442
debe0dc2
DH
144432001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14444
14445 * symbols.c (scm_symbol_bound_p): Fixed comment.
14446 Thanks to Chris Cramer.
14447
8a39e3fc
DH
144482001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14449
14450 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14451 Thanks to Bill Schottstaedt.
14452
322ec19d
ML
144532001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14454
9a5fa6e9 14455 from Matthias Köppe:
1c938eb8 14456
322ec19d
ML
14457 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14458 casts its result, so doesn't yield an lvalue per ANSI C.
14459
14460 * goops.c (s_scm_sys_set_object_setter_x): use
14461 SCM_SET_ENTITY_SETTER.
14462 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14463
14464 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14465 its result, so doesn't yield an lvalue per ANSI C.
14466 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14467 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14468 SCM_GC_SET_CARD_FLAGS.
14469 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14470
14471 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14472
60d02d09
GH
144732001-01-08 Gary Houston <ghouston@arglist.com>
14474
14475 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14476 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14477 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14478 changes.
14479 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14480 for fdes. if current input port is used, check that it's a file
14481 port.
14482
c2da2648
GH
144832001-01-06 Gary Houston <ghouston@arglist.com>
14484
14485 * ioext.c (scm_read_string_x_partial): new procedure, implements
14486 read-string!/partial.
14487 * ports.c (scm_take_from_input_buffers): new procedure used by
14488 scm_read_string_x_partial.
14489 (scm_drain_input): use scm_take_from_input_buffers.
14490
4651d663
MV
144912001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14492
14493 * validate.h (SCM_VALIDATE_NUMBER): New.
14494
c0a5d888
ML
144952001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14496
14497 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14498 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14499 SET_DESTROYED): new defines/macros.
14500 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14501 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14502 (guardian_print): print more info.
14503 (guardian_apply): check if the guardian is destroyed, and throw an
14504 error if so. take one more optional argument `throw_p'.
14505 (scm_guard): depending on the value of `throw_p', return a boolean
14506 result.
14507 (scm_get_one_zombie): remove redundant property test.
14508 (guardian_t): represent the various (currently 3, I hope nothing
14509 more gets added) boolean fields as bit flags.
14510 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14511 (scm_destroy_guardian_x): new procedure.
14512
14513 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14514 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14515
0c6d2191
GH
145162001-01-01 Gary Houston <ghouston@arglist.com>
14517
14518 * fports.c (fport_write): bugfix: handle short writes for
14519 unbuffered ports too. optimize the buffered case by minimizing
14520 the number of write/flush calls.
14521 (write_all): new helper procedure.
14522
a51fe247 14523The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14524
14525;; Local Variables:
14526;; coding: utf-8
14527;; End: