* LICENSE: Change COPYING.LIB to COPYING.LESSER.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
d3cf93bc
NJ
12008-01-22 Neil Jerram <neil@ossau.uklinux.net>
2
7df13834
NJ
3 * COPYING: Removed.
4
d3cf93bc
NJ
5 * __scm.h, _scm.h, weaks.c: Update copyright statement to LGPL.
6
15bd90ea
NJ
72008-01-18 Neil Jerram <neil@ossau.uklinux.net>
8
9 * hashtab.c (scm_hash_fn_create_handle_x): If supplied assoc_fn
10 returns neither a pair nor #f, signal a wrong-type-arg error.
11 (Thanks to Gregory Marton for reporting this.)
12
5c004b6d
NJ
132007-12-29 Neil Jerram <neil@ossau.uklinux.net>
14
15 * gc.c (mark_gc_async): Change "func_data" to "fn_data", to avoid
16 clash with AIX header file.
17 * hooks.c (scm_c_hook_add, scm_c_hook_remove): Same again.
18 * hooks.h (scm_t_c_hook_function, scm_c_hook_add,
19 scm_c_hook_remove): Same again.
20
9cc37597
LC
212007-12-08 Ludovic Courtès <ludo@gnu.org>
22
23 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
24 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
25 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
26 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
27 * eval.i.c (CEVAL): Use branch prediction hints for syntax
28 errors, wrong number of arguments and similar.
29 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
30 immediate numbers.
31 (scm_difference, scm_product, scm_i_divide): Likewise.
32 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
33
7d1fc872
LC
342007-12-04 Ludovic Courtès <ludo@gnu.org>
35
693758d5
LC
36 * ports.c (scm_c_read): Validate PORT as an open input port.
37 (scm_c_write): Validate PORT as an open output port.
38
7d1fc872
LC
39 * socket.c (scm_accept): Leave guile mode using
40 `scm_std_select ()' before calling `accept(2)'. Reported by
41 dskr <dskr@mac.com>.
42
ee834df4
LC
432007-10-27 Ludovic Courtès <ludo@gnu.org>
44
45 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
46 containing the port. Fixes a bug in the new port table (2007-08-26).
47 (scm_evict_ports): Use `scm_c_port_for_each ()'.
48
acbfb594
NJ
492007-10-21 Neil Jerram <neil@ossau.uklinux.net>
50
51 * eval.c (unmemoize_delay): Extend the environment before
52 unmemoizing the promise thunk. This fixes a segmentation fault
53 reported by Frank Schwidom.
54
2e77f720
LC
552007-10-20 Julian Graham <joolean@gmail.com>
56
57 Add support for thread cancellation and user-defined thread
58 cleanup handlers. Small rework by Ludovic Courtès.
59
60 * null-threads.h (scm_i_pthread_cancel,
61 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
62 * pthread-threads.h (scm_i_pthread_cancel,
63 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
64 * scmsigs.c (scm_i_signal_delivery_thread,
65 signal_delivery_thread_mutex): New.
66 (signal_delivery_thread): Leave when `read_without_guile ()'
67 returns zero.
68 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
69 before spawning the thread. Initialize
70 SCM_I_SIGNAL_DELIVERY_THREAD.
71 (ensure_signal_delivery_thread): Renamed to...
72 (scm_i_ensure_signal_delivery_thread): this.
73 (scm_i_close_signal_pipe): New.
74 * scmsigs.h: Updated.
75 * threads.c (thread_mark): Mark `t->cleanup_handler'.
76 (guilify_self_1): Initialize `t->cleanup_handler' and
77 `t->canceled'.
78 (do_thread_exit): Invoke `t->cleanup_handler'.
79 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
80 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
81 vanishes.
82 (scm_leave_guile_cleanup): New.
83 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
84 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
85 than call `scm_leave_guile ()' after FUNC.
86 (scm_cancel_thread, scm_set_thread_cleanup_x,
87 scm_threads_cleanup): New.
88 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
89 returned list.
90 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
91 fields.
92 Add declarations of new functions.
93
d41668fa
LC
942007-10-17 Ludovic Courtès <ludo@gnu.org>
95
96 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
97 regression compared to 1.8.2. Reported by Puneet
98 <schemer@gmail.com>.
99
66302618
LC
1002007-10-10 Ludovic Courtès <ludo@gnu.org>
101
102 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
103 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
104 * gen-scmconfig.h.in
105 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
106 * gen-scmconfig.c (main): Define
107 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
108
1445e449
LC
1092007-10-04 Ludovic Courtès <ludo@gnu.org>
110
111 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
112 `leave_locale_section ()' on failure of
113 `enter_locale_section ()' since the mutex is not held and locale
114 settings are unchanged.
115 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
116 `restore_locale_settings ()' instead of `leave_locale_section ()'
117 since the mutex is not held.
118
29776e85
LC
1192007-10-02 Ludovic Courtès <ludo@gnu.org>
120
121 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
122 since we're already in non-guile mode. Reported by Greg Toxel
123 for NetBSD.
124
61d3568b
LC
1252007-10-01 Ludovic Courtès <ludo@gnu.org>
126
127 * ports.c (flush_output_port): Expect directly a port instead of
128 a pair. Fixes a bug in the new port table (2007-08-26).
129
68eccd8b
KR
1302007-09-11 Kevin Ryde <user42@zip.com.au>
131
132 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
133 putenv("NAME") as the fallback everywhere else. In particular this is
134 needed for solaris 9. Reported by Frank Storbeck.
135
454866e0
LC
1362007-09-03 Ludovic Courtès <ludo@gnu.org>
137
138 * read.c (flush_ws): Handle SCSH block comments.
139
f43f3620
LC
1402007-09-03 Ludovic Courtès <ludo@gnu.org>
141
142 Fix alignment issues which showed up at least on SPARC.
143
144 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
145 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
146 alignment.
147 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
148 correct alignment.
149 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
150 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
151 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
152 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
153 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
154
8d4d5dfc
KR
1552007-09-03 Kevin Ryde <user42@zip.com.au>
156
157 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
158 before using clog(). It's possible for gcc to provide the "complex
159 double" type, but for the system not to have the complex funcs.
160 (scm_exp): Ditto HAVE_CEXP for cexp().
161 (clog, cexp, carg): Remove fallback definitions. These only
162 duplicated the code within scm_log and scm_exp, and the latter have to
163 exist for the case when there's no "complex double". So better just
164 fix up the conditionals selecting between the complex funcs and plain
165 doubles than worry about fallbacks.
166
1ac5fb45
LC
1672007-09-02 Ludovic Courtès <ludo@gnu.org>
168
169 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
170 This fixes a memory leak.
171
b87e6d04
HWN
1722007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
173
5dbc6c06
HWN
174 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
175 gc.c: replace port table with weak hash table. This simplifies
176 memory management, and fixes freed cells appearing in
177 port-for-each output.
178
b87e6d04
HWN
179 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
180 held.
181
2baec6a9
LC
1822007-08-23 Ludovic Courtès <ludo@gnu.org>
183
492faee1 184 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 185 expression when asked to. Reported by Kevin.
492faee1 186
2baec6a9
LC
187 * stime.c: Define `_REENTRANT' only if not already defined.
188
1f11c61a
KR
1892007-08-21 Kevin Ryde <user42@zip.com.au>
190
191 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
192 tc16 values so big, real, complex and fraction can be distinguished.
193
194 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
195 was making numbers come out as "type 23" in gc-live-object-stats.
196 Fix tests of the tc16 number types, they were checked under
197 scm_tc7_number, but the values went down the tag>=255 smob case.
198 Put smob case under scm_tc7_smob instead of using tag>=255, per
199 recommendation in comments with scm_tc7_smob to use symbolic values.
200 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
201 code. Lose some unnecessary "break" statements.
202
203 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
204 element returned, rather than two lookups scm_hashq_ref and
205 scm_hashq_set_x.
206
949ec9f9
KR
2072007-08-17 Kevin Ryde <user42@zip.com.au>
208
209 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
210 solaris 2.6. Reported by anirkko.
211
6caac03c
LC
2122007-07-29 Ludovic Courtès <ludo@gnu.org>
213
214 * Makefile.am (INCLUDES): Added Gnulib includes.
215 (gnulib_library): New.
216 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
217 `$(gnulib_library)'.
218 (libguile_la_LIBADD): Likewise.
219
220 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
221 to define it when available.
222 * srfi-14.c: Likewise.
f7439099
LC
223 * i18n.c: Likewise. Include Gnulib's <alloca.h>
224 * eval.c: Include Gnulib's <alloca.h>.
225 * filesys.c: Likewise.
226 * read.c: Don't include <strings.h> and don't provide an
227 `strncasecmp ()' replacement; use Gnulib's <string.h> and
228 `strncasecmp ()' instead.
6caac03c 229
e08f3f7a
LC
2302007-07-25 Ludovic Courtès <ludo@gnu.org>
231
232 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
233 immediately. This used to produce a circular memoized
234 expression, e.g., for `(set (quote x) #t)'.
235
7337d56d
LC
2362007-07-22 Ludovic Courtès <ludo@gnu.org>
237
238 Overhauled the reader, making it faster.
239
240 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
241 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
242 of `scm_lreadr ()'.
243
244 * read.c: Overhauled. No longer use a token buffer. Use a
245 on-stack C buffer in the common case and use Scheme strings when
246 larger buffers are needed.
247 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
248 scm_lreadr, scm_lreadrecparen): Removed.
249 (scm_i_input_error): Marked as `SCM_NORETURN'.
250
df449722
LC
2512007-07-15 Ludovic Courtès <ludo@gnu.org>
252
253 * script.c (scm_compile_shell_switches): Updated copyright year.
254
b1f57ea4
LC
2552007-07-11 Ludovic Courtès <ludo@gnu.org>
256
257 * goops.c (scm_sys_method_more_specific_p): Added docstring.
258 Make sure LEN is greater than or equal to the minimum length of
259 specializers of M1 and M2. This fixes a segfault later on in
260 `more_specificp ()' if TARGS is too small. Reported by Marco
261 Maggi <marco.maggi-ipsu@poste.it>.
262
d3075c52
LC
2632007-06-26 Ludovic Courtès <ludo@gnu.org>
264
265 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
266 sure to free the previous array after the new one has been
267 installed. This leak is made visible by running
268 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
269 from the REPL within Valgrind.
270
7a5fb796
LC
2712007-06-12 Ludovic Courtès <ludo@chbouib.org>
272
273 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
274 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
275 bus error on SPARC (and possibly others) due to unaligned access.
276
a1ef7406
LC
2772007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
278
279 * posix.c (scm_ttyname): Check whether RESULT is NULL before
280 making a string from it (reported by Dan McMahill). Don't call
281 `scm_from_locale_string ()' before the mutex is released.
282
3dcf3373
LC
2832007-05-26 Ludovic Courtès <ludo@chbouib.org>
284
285 * eval.c (scm_m_define): Updated comment. Changed order for value
286 evaluation and `scm_sym2var ()' call, which is perfectly valid per
287 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
288
608860a5
LC
2892007-05-05 Ludovic Courtès <ludo@chbouib.org>
290
291 Implemented lazy duplicate binding handling.
292
293 * modules.c (scm_export): Renamed to...
294 (scm_module_export): This. Now public.
295 (module_variable): Removed.
296 (default_duplicate_binding_procedures_var): New variable.
297 (default_duplicate_binding_handlers, resolve_duplicate_binding,
298 module_imported_variable, scm_module_local_variable,
299 scm_module_variable): New functions.
300 (scm_module_import_interface): Rewritten.
301 (scm_module_reverse_lookup): Exported as a Scheme function.
302 * modules.h (scm_module_index_duplicate_handlers,
303 scm_module_index_import_obarray): New macros.
304 (scm_module_variable, scm_module_local_variable,
305 scm_module_export): New declarations.
306
1911e3da
LC
3072007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
308
309 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
310 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
311
1d8ce4c0
HWN
3122007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
313
314 * numbers.c (carg): provide carg, cexp, clog in case they are
315 missing.
316
afb49959
LC
3172007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
318
319 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
320 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
321 Steven Wu.
322
b3aa4626
KR
3232007-03-08 Kevin Ryde <user42@zip.com.au>
324
325 * struct.c, struct.h (scm_make_vtable): New function, providing
326 `make-vtable'.
327 * stacks.c (scm_init_stacks): Use it.
328
3292007-03-06 Kevin Ryde <user42@zip.com.au>
330
331 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
332 allocating a tail array. If there's no such then those tail fields
333 are uninitialized and garbage SCMs there can cause a segv if printed
334 (after fetching with struct-ref).
335
3362007-02-22 Kevin Ryde <user42@zip.com.au>
337
338 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
339 (scm_usleep): Update docstring per manual, cross reference sleep.
340
341 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
342 scm_struct_init is not within that section. scm_struct_init can
343 thrown an error, which within a critical section results in an
344 abort().
345
03291373
NJ
3462007-02-19 Neil Jerram <neil@ossau.uklinux.net>
347
348 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
349 is included in the distribution.
652dbce6 350 (noinst_HEADERS): And the same for eval.i.c.
03291373 351
a2f00b9b
LC
3522007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
353
354 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
355 unconditionally. Include <langinfo.h> and <nl_types.h> when
356 available.
357 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
358 SCM_LIST_OR_INTEGER_P): New macros.
359 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
360 as powers of two instead of `(1 << LC_*)'.
361 (scm_i_locale_free): New function/macro.
362 (scm_global_locale): New global variable.
363 (smob_locale_free): Use `scm_i_locale_free ()'.
364 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
365 (get_current_locale_settings): Return `EINVAL' instead of `errno'
366 when `setlocale' fails.
367 (restore_locale_settings): Likewise.
368 (install_locale_categories): Likewise.
369 (install_locale): Likewise. Stop the locale stack traversal when
370 all categories have been handled.
371 (get_current_locale, category_to_category_mask,
372 category_list_to_category_mask): New function.
373 (scm_make_locale): Use them. Accept both lists of `LC_*' values
374 and single `LC_*' values as the first argument. Handle the case
375 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
376 duplicate C_BASE_LOCALE before using it.
377 (scm_nl_langinfo, define_langinfo_items): New functions.
378 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
379 `nl-langinfo' and invoke `define_langinfo_items ()'.
380 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
381 * posix.c: Include <xlocale.h> when available.
382 (scm_i_locale_mutex): Always define it. Statically initialized.
383 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
384 acquiring the locale mutex.
385 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
386
b3aa4626
KR
3872007-01-27 Kevin Ryde <user42@zip.com.au>
388
389 * ports.c (scm_port_line, scm_set_port_line_x), read.c
390 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
391 port line number type, should be "long" not "int", as per line_number
392 field of scm_t_port. (Makes a difference only on 64-bit systems, and
393 only then for a linenum above 2Gig.)
394
2a8d66b0
HWN
3952007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
396
397 * vector.c: remove comment as per kryde's request.
398
b3aa4626
KR
3992007-01-25 Kevin Ryde <user42@zip.com.au>
400
401 * sort.c (scm_stable_sort): Return empty list for input empty list, as
402 done in guile 1.6 and as always done by plain `sort'. Was falling
403 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
404
cb90e2cb
HWN
4052007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
406
8cb7939c
HWN
407 * vectors.c (s_scm_vector_move_right_x): complain about naming.
408
d00a0704
HWN
409 * srcprop.c: regularize comments.
410
3d178652
HWN
411 * eval.c: remove superfluous ifndef DEVAL.
412
243ebb61
HWN
413 * private-options.h: idem.
414
415 * eval.i.c: copyright nitpicking.
416
0ee05b85
HWN
417 * eval.c: distangle. move duplicate code to eval.i.c and include
418 twice.
419
420 * eval.i.c: new file.
421
22fc179a
HWN
422 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
423 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
424 read.h, stacks.c, symbols.c, throw.c: use private-options.h
425
426 * private-options.h: new file: contain hardcoded option
427 definitions.
428
cb90e2cb
HWN
429 * private-gc.h: add FSF header.
430
62560650
HWN
4312007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
432
72f19c26
HWN
433 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
434 memoize-symbol is set.
435
436 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
437
438 * eval.c (CEVAL): add memoize_symbol trap.
439
03347a97
HWN
440 * options.c (scm_options_try): new function. This allows error
441 reporting before changing options in a critical section.
442
b0763985
HWN
443 * srcprop.c: use double cell for storing source-properties. Put
444 filename in the plist, and share between srcprops if possible.
445 Remove specialized storage.
446
447 * srcprop.h: remove macros without SCM_ prefix from
448 interface. Remove specialized storage/type definitions.
449
62560650
HWN
450 * read.c: idem.
451
452 * print.c: idem.
453
454 * eval.c: terminate option lists with 0.
455
456 * options.c: remove n (for length) from scm_option_X
457 functions. Detect option list length by looking for NULL name.
458
42ddb3cb
LC
4592007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
460
461 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
462 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
463 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
464 added by `make-vtable-vtable'. Reported by Marco Maggi.
465
937038e8
HWN
4662007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
467
468 * throw.c (scm_ithrow): more refined error message: print symbols
469 too.
470
23d72566
KR
4712007-01-16 Kevin Ryde <user42@zip.com.au>
472
473 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
474 implementing `set-program-arguments'.
475
476 * filesys.c (scm_init_filesys): Use scm_from_int rather than
477 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
478 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
479 O_LARGEFILE. These are all int not long, per arg to open().
480 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
481 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
482 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
483 an int arg to fcntl.
484
485 * posix.c (scm_putenv): Correction to "len" variable, was defined only
486 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
487 Move it to where it's used. Reported by Hugh Sasse.
488
489 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
490 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
491 meant #\nul in the input (detected by scm_to_locale_string) and a bad
492 flags arg (detected by scm_to_int) would throw from a critical
493 section, causing an abort().
494
495 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
496 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
497 REG_NOTEOL; they're all ints not longs (per args to regcomp and
498 regexec).
499
a2c40dc7
HWN
5002007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
501
502 * throw.c (scm_ithrow): print out key symbol and string arguments
503 when error happens inside a critical section, and document why.
504
391f57e6
HWN
5052007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
506
507 * read.c (s_scm_read_hash_extend): document #f argument to
508 read-hash-extend.
509
23d72566
KR
5102007-01-04 Kevin Ryde <user42@zip.com.au>
511
512 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
513 scm_minor_version, scm_micro_version, scm_effective_version,
514 scm_version, scm_init_version): Use SCM_API instead of just extern,
515 for the benefit of mingw. Reported by Cesar Strauss.
516
93632e3c
HWN
5172007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
518
519 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
520 too.
521 (gc_update_stats): update scm_gc_cells_allocated_acc too.
522
23d72566
KR
5232006-12-27 Kevin Ryde <user42@zip.com.au>
524
525 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
526 the basic scm_get_stack_base. As advised by Nils Durner.
527
528 * threads.c (get_thread_stack_base): Add a version using
529 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
530 As advised by Heikki Lindholm.
531
532 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
533 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
534 Durner.
535
5362006-12-24 Kevin Ryde <user42@zip.com.au>
537
538 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
539 error if pid is not our own process, instead of silently doing nothing.
540
541 * print.c (scm_write, scm_display, scm_write_char): Disable port close
542 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
543 check in configure.in unintentionally enabled it. Believe that
544 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
545 can leave errno in that state. popen.test "no duplicates" output test
546 provoked that.
547
e2bf3b19
HWN
5482006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
549
550 * numbers.c (scm_i_fraction_reduce): move logic into
551 scm_i_make_ratio(), so fractions are only read.
552 scm_i_fraction_reduce() modifies a fraction when reading it. A
553 race condition might lead to fractions being corrupted by reading
554 them concurrently.
555
556 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
557 comparisons between reduced and unreduced fractions go wrong.
558
559 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
560 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
561 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
562 SCM_FRACTION_REDUCED.
563
23d72566
KR
5642006-12-16 Kevin Ryde <user42@zip.com.au>
565
566 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
567 more direct for a procedure called raise.
568 (kill): Remove mingw fake fallback.
569
5702006-12-15 Kevin Ryde <user42@zip.com.au>
571
572 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
573 _pipe on mingw.
574
5752006-12-14 Kevin Ryde <user42@zip.com.au>
576
577 * threads.c (thread_print): Cope with the case where pthread_t is a
578 struct, as found on mingw. Can't just cast to size_t for printing.
579 Reported by Nils Durner.
580
581 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
582 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
583
5842006-12-13 Kevin Ryde <user42@zip.com.au>
585
586 * eval.c (scm_m_define): Set 'name procedure property on any
587 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
588 procedures with setters as used in srfi-17.
589
590 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
591 linux man page says is a possibility.
592
f30e1bdf
LC
5932006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
594
595 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 596 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
597 negative lower bounds.
598 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 599 Szavai Gyula).
f30e1bdf
LC
600
601 (scm_array_in_bounds_p): Iterate over S instead of always
602 comparing indices with the bounds of S[0]. This fixes
603 `array-in-bounds?' for arrays with a rank greater than one and
604 with different lower bounds for each dimension.
605
23d72566
KR
6062006-12-05 Kevin Ryde <user42@zip.com.au>
607
608 * numbers.c (scm_product): For flonum*inum and complex*inum, return
609 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
610 and as per R5RS section "Exactness".
611
6122006-12-03 Kevin Ryde <user42@zip.com.au>
613
614 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
615 allow $AWK from the environment to override. It had syntax gremlins,
616 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
617 Makefile stopped it having any effect. Use just $(AWK), which can be
618 overridden with "make AWK=xxx" in the usual way if desired.
619
22be72d3
LC
6202006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
621
622 * libguile/vectors.c (scm_vector_to_list): Fixed list
623 construction: elements were not copied when INC is zero (see
624 "shared array" example in `vectors.test'). Reported by
625 Szavai Gyula.
626
b89c4943
LC
6272006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
628
629 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
630 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
631 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
632 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
633 (DOT_X_FILES): Added `gettext.x'.
634 (DOT_DOC_FILES): Likewise.
635 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
636 (modinclude_HEADERS): Added `gettext.h'.
637 (EXTRA_DIST): Added `libgettext.h'.
638
639 * gettext.h: Renamed to...
640 * libgettext.h: New file.
641
642 * i18n.c: Renamed to...
643 * gettext.c: New file.
644
645 * i18n.h: Renamed to...
646 * gettext.h: New file.
647
648 * i18n.c, i18n.h, locale-categories.h: New files.
649
650 * init.c: Include "libguile/gettext.h" instead of
651 "libguile/i18n.h".
652 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
653 `scm_init_i18n ()'.
654
655 * posix.c: Include "libguile/gettext.h" instead of
656 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
657 (USE_GNU_LOCALE_API): New macro.
658 (scm_i_locale_mutex): New variable.
659 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
660
661 * posix.h: Include "libguile/threads.h".
662 (scm_i_locale_mutex): New declaration.
663
f3e3f530
NJ
6642006-11-17 Neil Jerram <neil@ossau.uklinux.net>
665
666 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
667
d9f71a07
LC
6682006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
669
670 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
671 "sweep_stats" arguments; use them instead of accessing the global
672 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
673
674 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
675 before each iteration of the loop.
676 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
677 (scm_i_get_new_heap_segment): Take an additional argument
678 SWEEP_STATS. Compute MIN_CELLS as a function of it.
679
680 * libguile/gc.c (scm_gc_cells_collected,
681 scm_gc_cells_collected_1): Removed.
682 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
683 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
684 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
685 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
686 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
687 `scm_gc_cells_(collected|swept)'.
688 (gc_update_stats): New.
689 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
690 `scm_i_gc_sweep_stats_1' instead of the former globals.
691 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
692 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
693 would keep allocating new segments instead of re-using collected
694 cells (because `scm_gc_cells_collected' would remain zero).
695
696 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
697 scm_gc_cell_yield_percentage): Removed.
698
699 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
700 (scm_i_adjust_min_yield): Updated.
701 (scm_i_get_new_heap_segment): Updated.
702
dd18d312
NJ
7032006-11-02 Neil Jerram <neil@ossau.uklinux.net>
704
705 * modules.c: Correct comment saying that low-level environments
706 will be used "in the next release".
707
708 * init.c: Comment out #include of environments.h.
709 (scm_i_init_guile): Comment out scm_environments_prehistory() and
710 scm_init_environments() calls.
711
712 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
713 (DOT_X_FILES): Remove environments.x.
714 (DOT_DOC_FILES): Remove environments.doc.
715 (modinclude_HEADERS): Remove environments.h.
716
9a5fa6e9
NJ
7172006-10-25 Neil Jerram <neil@ossau.uklinux.net>
718
719 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
720
721 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
722 scm_ia64_register_backing_store_base() instead of Linux-specific
723 implementations.
724
725 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
726 New declarations.
727
728 * gc.c (__libc_ia64_register_backing_store_base): Declaration
729 removed.
730 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
731 implementations for Linux and HP-UX.
732
733 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
734 and scm_ia64_register_backing_store_base() instead of
735 Linux-specific implementations.
736
737 * continuations.h (__libc_ia64_register_backing_store_base):
738 Declaration removed.
739 (scm_t_contregs): New "fresh" field.
740
741 * continuations.c (ia64_getcontext): Removed.
742 (scm_make_continuation): Use continuation fresh field instead of
743 interpreting getcontext return values (which isn't portable). Use
744 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
745 instead of Linux-specific implementations.
746 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
747 instead of Linux-specific implementation.
748
749 * _scm.h (__ia64__): Also detect __ia64.
750
8ab3d8a0
KR
7512006-10-03 Kevin Ryde <user42@zip.com.au>
752
753 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
754 arguments or 3 or more arguments. Previously 0 called proc with
755 SCM_UNDEFINED, and 3 or more silently used just the first 2.
756
7572006-09-28 Kevin Ryde <user42@zip.com.au>
758
759 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
760 for chsize fallback, instead of hard-coding mingw. Mingw in fact
761 supplies ftruncate itself these days.
762
763 * ports.c (fcntl.h): Can include this unconditionally, no need for
764 __MINGW32__.
765
766 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
767 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
768 "off_t" for parameters, per usual definition of this function, rather
769 than "char *" and "int". Use ftruncate instead of chsize. Check for
770 error on final close.
771
7722006-09-27 Kevin Ryde <user42@zip.com.au>
773
774 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
775 in mingw.
776
777 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
778 const *" for mingw to suppress warnings from gcc (which are errors
779 under the configure default -Werror). Reported by Nils Durner.
780
7812006-09-26 Kevin Ryde <user42@zip.com.au>
782
783 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
784 * fports.c (scm_open_file): Use open_or_open64.
785 (fport_seek_or_seek64): New function, adapting fport_seek.
786 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
787 functions.
788 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
789 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
790
791 * ports.c (scm_truncate_file): Update docstring per manual.
792
7932006-09-23 Kevin Ryde <user42@zip.com.au>
794
795 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
796 functions.
797
9a5fa6e9 7982006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
799
800 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
801 (make_predset, define_predset, make_strset, define_strset, false,
802 true): Removed.
803 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
804 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
805 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
806 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
807 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
808 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
809 (define_charset, scm_srfi_14_compute_char_sets): New functions.
810 (scm_init_srfi_14): Use `define_charset ()' instead of
811 `define_predset ()' and `define_strset ()'.
812
813 * srfi-14.h (scm_c_init_srfi_14): Removed.
814 (scm_srfi_14_compute_char_sets): New declaration.
815
816 * posix.h: Include "srfi-14.h".
817 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
818 successful `setlocale ()' call.
819
8ab3d8a0
KR
8202006-09-08 Kevin Ryde <user42@zip.com.au>
821
822 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
823 (scm_recvfrom): Update docstring from manual.
824
418122ce
RB
8252006-08-31 Rob Browning <rlb@defaultvalue.org>
826
827 * ports.c (scm_c_port_for_each): Add a
828 scm_remember_upto_here_1(ports) at the end of the function to fix
829 a GC bug.
830
b5944f66
NJ
8312006-08-28 Neil Jerram <neil@ossau.uklinux.net>
832
833 * backtrace.c (scm_display_backtrace_with_highlights): Minor
834 improvements to docstring.
835 (scm_backtrace_with_highlights): Analogous improvements.
836
8ab3d8a0
KR
8372006-08-12 Kevin Ryde <user42@zip.com.au>
838
839 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
840 New, set from configure.
841 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
842 to scmconfig.h.
843 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
844 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
845 Reported by Claes Wallin.
846
b0b0deff
NJ
8472006-08-11 Neil Jerram <neil@ossau.uklinux.net>
848
849 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
850 frame, not a stack).
851
8ab3d8a0
KR
8522006-07-25 Kevin Ryde <user42@zip.com.au>
853
854 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
855 on pthreads version, since pthread_getattr_np not available on solaris
856 and macos. Reported by Claes Wallin.
857
8582006-07-24 Kevin Ryde <user42@zip.com.au>
859
860 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
861 it's a macro on MacOS X. Reported by Claes Wallin.
862
863 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
864 for the benefit of Solaris 10. Reported by Claes Wallin.
865
866 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
867 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
868
8692006-07-21 Kevin Ryde <user42@zip.com.au>
870
871 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
872 autoconf recommendation. Should fix Solaris 10 reported by Claes
873 Wallin.
874
875 * threads.c: Include <string.h>, needed for memset() which is used by
876 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
877
b4912378
RB
8782006-07-18 Rob Browning <rlb@defaultvalue.org>
879
880 * continuations.c: Add __attribute__ ((returns_twice)) to the
881 ia64_getcontext prototype so that gcc will make the right
882 arrangements and avoid an illegal instruction during
883 call-with-current-continuation.
884
9a5fa6e9 8852006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
886
887 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
888 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
889
8ab3d8a0
KR
8902006-07-08 Kevin Ryde <user42@zip.com.au>
891
892 * environments.c (core_environments_unobserve): Use if/else rather
893 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
894 about them not being rvalues. Reported by Mike Gran.
895
896 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
897 portable and in particular fails on OpenBSD and AIX (see autoconf
898 manual too). Reported by Mike Gran.
899
9002006-06-25 Kevin Ryde <user42@zip.com.au>
901
902 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
903 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
904 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
905 HAVE_TM_ZONE.
906 (scm_strptime): Use tm_gmtoff from the strptime result when that field
907 exists, it's set by glibc strptime "%s".
908
9a5fa6e9 9092006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
910
911 * eq.c: Include "struct.h", "goops.h" and "objects.h".
912 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
913 are not GOOPS instances.
914 * struct.c: Include "eq.h".
915 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
916 hand-written code.
917 (scm_i_struct_equalp): New.
918 * struct.h (scm_i_struct_equalp): New declaration.
919
c862d0e0
KR
9202006-06-06 Kevin Ryde <user42@zip.com.au>
921
922 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
923 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
924 reported by Mattias Holm.
b4912378 925
c862d0e0
KR
9262006-06-03 Kevin Ryde <user42@zip.com.au>
927
928 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
929 unused variable warning when elisp disabled. Reported by Ryan
930 VanderBijl.
931
932 * throw.c (scm_handle_by_message): Add dummy return value to avoid
933 compiler warning on cygwin. Reported by Ryan VanderBijl.
934
935 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
936 duplicate of EXTRA_DOT_DOC_FILES.
937 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
938 Add scmconfig.h to dependencies, since these all run cpp. Helps a
939 parallel "make -j2". Reported by Mattias Holm.
940
9412006-05-30 Kevin Ryde <user42@zip.com.au>
942
943 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
944 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
945 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
946 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
947 port type descriptor, same as scm_make_port_type return value.
948
af4f8612
MV
9492006-05-30 Marius Vollmer <mvo@zagadka.de>
950
951 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
952 of the arguments is a array. This allows vectors to be equal to
953 one-dimensional arrays.
954
18bffcd0
MV
9552006-05-29 Marius Vollmer <mvo@zagadka.de>
956
957 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
958 that we have a pair before accessing its cdr. Thanks to Bill
959 Schottstaedt!
960
c862d0e0
KR
9612006-05-28 Kevin Ryde <user42@zip.com.au>
962
963 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
964 by "The Senator".
965
9662006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
967
968 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
969 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
970
c862d0e0
KR
9712006-05-26 Kevin Ryde <user42@zip.com.au>
972
973 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
974 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
975 Reported by "The Senator".
976 For select and ioctl, move fdes into those conditionals, to avoid
977 unused variable warning when neither of those used.
978
9792006-05-23 Kevin Ryde <user42@zip.com.au>
980
981 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
982 It's unused and will be in stdio.h anyway (if it's anywhere).
983
9842006-05-20 Kevin Ryde <user42@zip.com.au>
985
986 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
987 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
988
989 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
990 symlink). Probably can't create symlinks with mknod anyway though.
991
992 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
993 generation.
994
9952006-05-15 Kevin Ryde <user42@zip.com.au>
996
997 * simpos.c, simpos.h (scm_primitive__exit): New function.
998 (scm_primitive_exit): Update docstring, no longer the best exit after
999 a fork.
1000
10012006-05-09 Kevin Ryde <user42@zip.com.au>
1002
1003 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
1004 rather than converting to doubles, to avoid inf or nan when the inputs
1005 are too big for a double but the quotient does fit. This affects
1006 conversions exact->inexact of big fractions.
1007
1008 * filesys.c (scm_open_fdes): Use open64.
1009 (scm_init_filesys): Add O_LARGEFILE.
1010
1011 * ports.c (scm_seek): Use lseek64.
1012 (scm_truncate_file): Use ftruncate64.
1013
4a342b19
MV
10142006-05-08 Marius Vollmer <mvo@zagadka.de>
1015
1016 * private-gc.h (CELL_P): Also check that the potential pointer is
1017 correctly aligned for a cell. Thanks to Miroslav Lichvar!
1018
c862d0e0
KR
10192006-04-18 Rob Browning <rlb@defaultvalue.org>
1020
1021 * _scm.h: Add back error if the size of off_t is unknown. The bug
1022 was actually in guile-readline's configuration.
1023
10242006-04-18 Kevin Ryde <user42@zip.com.au>
1025
1026 * posix.c (scm_mkstemp): Update docstring from the manual, in
1027 particular file mode 0600 is not guaranteed.
1028
281ab5e2
KR
10292006-04-17 Kevin Ryde <user42@zip.com.au>
1030
1031 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1032 size, to help the guile-readline build where off_t is unused.
1033
2b829bbb
KR
10342006-04-16 Kevin Ryde <user42@zip.com.au>
1035
1036 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1037 (scm_readdir): Use readdir64.
1038 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1039 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1040 and ftruncate take off_t not size_t.
1041 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1042 available.
1043
10442006-04-06 Kevin Ryde <user42@zip.com.au>
1045
1046 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1047 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
1048
10492006-03-26 Marius Vollmer <mvo@zagadka.de>
1050
1051 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1052 instead of accessing __libc_stack_end directly, and only do this
1053 when pthread_attr_getstack is known not to work for the main
1054 thread or when not using pthreads at all.
1055
1056 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1057 unknown instead of returning NULL.
1058
9a5fa6e9 10592006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1060
1061 * numbers.c (scm_i_mem2number): Renamed to
1062 scm_c_locale_stringn_to_number.
1063 * numbers.c, print.c, read.c: Updated callers.
1064 * numbers.h: Update function declaration.
1065
10662006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1067
1068 * unif.c (string_set): Don't return in a void function. (Reported
1069 by Mike Gran.)
1070
1071 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1072 rather than void*, so we can do pointer arithmetic on it.
1073 (Reported by Mike Gran.)
1074 (s_scm_uniform_vector_write): Ditto.
1075
10762006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1077
1078 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1079 oldra is not an array. (Reported by Steve Juranich.)
1080
1081 * threads.c (do_unlock): Renamed from "unlock", which is defined
1082 in unistd.h on QNX. (Reported by Matt Kraai.)
1083
10842006-03-04 Kevin Ryde <user42@zip.com.au>
1085
1086 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1087 not SCM_CRITICAL_SECTION_START.
1088
1089 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1090 Mike Gran.
1091
10922006-02-28 Kevin Ryde <user42@zip.com.au>
1093
1094 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1095
10962006-02-26 Kevin Ryde <user42@zip.com.au>
1097
1098 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1099 NAME_MAX is not available, which is so on Solaris 10. Report and help
1100 by Bill Schottstaedt.
1101
1102 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1103 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1104 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1105 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1106 use "unsigned char", not signed char. This ensures comparisons are
1107 the same as `char<?' etc, and is also the same as guile 1.6 did.
1108 Reported by Sven Hartrumpf.
1109
4a9f83ff
MD
11102006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1111
1112 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1113 SCM_HAVE_T_INT64.
1114 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1115 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1116 scm_t_int32.
1117
29d8c124 11182006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1119
1120 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1121 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1122 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1123 Take into account SEG->SPAN when computing CELLS_SWEPT.
1124 (scm_i_sweep_segment): Take one more argument, similarly.
1125 (scm_i_sweep_all_segments): Likewise.
1126 (scm_i_sweep_some_segments): Likewise.
1127 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1128 refer to SCM_GC_CELLS_COLLECTED.
1129
1130 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1131 argument, an `scm_i_sweep_statistics' object.
1132 Change the way DELTA is collected: don't take into account
1133 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1134
1135 * gc-malloc.c (scm_realloc): Pass an extra argument
1136 to `scm_i_sweep_all_segments ()'.
1137
1138 * gc.c (gc_start_stats): Updated accordingly.
1139 (gc_end_stats): Take an additional SWEEP_STATS argument.
1140 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1141 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1142 Decrement SCM_CELLS_ALLOCATED.
1143 (scm_i_gc): Likewise.
1144
1145 * private-gc.h (scm_i_sweep_*): Updated function
1146 prototypes accordingly.
1147 (scm_t_sweep_statistics): New type.
1148 (scm_i_sweep_statistics_init): New macro.
1149 (scm_i_sweep_statistics_sum): New macro
1150
9a5fa6e9 11512006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1152
1153 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1154 LEN. Without this, too much collectable memory gets unregistered,
1155 which results in an underflow of SCM_MALLOCATED in
1156 `decrease_mtrigger()'.
1157
1158 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1159 equal to SCM_MALLOCATED.
1160
11612006-02-13 Marius Vollmer <mvo@zagadka.de>
1162
1163 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1164 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1165 configured --without-threads.
1166 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1167
1aaa1c17
MV
11682006-02-12 Marius Vollmer <mvo@zagadka.de>
1169
1170 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1171 filling when the fill parameter is omitted, as documented, but
1172 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1173 can not store characters.
1174
d7c6575f
NJ
11752006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1176
1177 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1178 on to scm_fill_sockaddr call.
1179
43e01b1e
NJ
11802006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1181
1182 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1183 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1184
1185 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1186 (struct pre_unwind_data): New, replaces struct lazy_catch.
1187 (scm_c_catch): New, replaces scm_internal_catch as the primary
1188 catch API for C code; adds pre-unwind handler support.
1189 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1190 compatibility.
1191 (tc16_pre_unwind_data, pre_unwind_data_print,
1192 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1193 "lazy_catch" equivalents.
1194 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1195 as the primary C API for a "lazy" catch.
1196 (scm_internal_lazy_catch): Now just a wrapper for
1197 scm_c_with_throw_handler, for back compatibility.
1198 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1199 pre-unwind handler support.
1200 (scm_catch): Now just a wrapper for
1201 scm_catch_with_pre_unwind_handler, for back compatibility.
1202 (scm_with_throw_handler): New.
1203 (scm_lazy_catch): Update comment to say that the handler can
1204 return, and what happens if it does.
1205 (toggle_pre_unwind_running): New.
1206 (scm_ithrow): When identifying the throw target, take running
1207 flags into account. In general, change naming of things from
1208 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1209 don't unwind the dynamic context first. Add dynwind framing to
1210 manage the running flag of a throw handler. If a lazy catch or
1211 throw handler returns, rethrow the same exception again. Add
1212 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1213
1214 * root.c (scm_internal_cwdr): Add NULL args to
1215 scm_i_with_continuation_barrier call.
1216
1217 * dynwind.c: Change comment mentioning lazy-catch to mention
1218 pre-unwind data and throw handler also.
1219
1220 * continuations.h (scm_i_with_continuation_barrier): Add
1221 pre-unwind handler args.
1222
1223 * continuations.c (scm_i_with_continuation_barrier): Add
1224 pre-unwind handler args, and pass on to scm_c_catch (changed from
1225 scm_internal_catch).
1226 (c_handler): Remove scm_handle_by_message_noexit call.
1227 (scm_c_with_continuation_barrier): Call
1228 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1229 as the pre-unwind handler.
1230 (scm_handler): Remove scm_handle_by_message_noexit call.
1231 (s_scm_with_continuation_barrier): Call
1232 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1233 as the pre-unwind handler.
1234
2b829bbb
KR
12352006-02-04 Kevin Ryde <user42@zip.com.au>
1236
1237 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1238
72098928
KR
12392006-02-03 Kevin Ryde <user42@zip.com.au>
1240
1241 * list.c, list.h (scm_list): Restore this function for use from C.
1242 It's a complete no-op but in theory might used by someone.
1243
aa092c5d
MV
12442006-01-30 Marius Vollmer <mvo@zagadka.de>
1245
1246 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1247 so that it gets unlocked in all cases.
1248 (SCM_APPLY, CEVAL): Likewise.
1249
661ae7ab
MV
12502006-01-29 Marius Vollmer <mvo@zagadka.de>
1251
ee51ba31
MV
1252 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1253 scm_is_typed_array instead.
1254
661ae7ab
MV
1255 Renamed the "frames" that are related to dynamic-wind to "dynamic
1256 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1257 Updated documentation.
1258
99e370f6
MV
1259 Disabled "futures":
1260
1261 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1262 * eval.c, init.c: Comment out all 'future' related things.
1263
15ccf10b
MV
12642006-01-28 Marius Vollmer <mvo@zagadka.de>
1265
1266 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1267 to inline.h to make it inline.
1268
9a5fa6e9 12692005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1270
1271 * strings.c (scm_i_take_stringbufn): New.
1272 (scm_i_c_take_symbol): New.
1273 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1274
1275 * strings.h (scm_i_c_take_symbol): New.
1276 (scm_i_take_stringbufn): New.
1277
1278 * symbols.c (lookup_interned_symbol): New function.
1279 (scm_i_c_mem2symbol): New function.
1280 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1281 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1282 creating a new Scheme string.
1283 (scm_from_locale_symboln): Likewise.
1284 (scm_take_locale_symbol): New.
1285 (scm_take_locale_symboln): New.
1286
1287 * symbols.h (scm_take_locale_symbol): New.
1288 (scm_take_locale_symboln): New.
1289
2ca2ffe6
HWN
12902006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1291
1292 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1293 free_count.
1294
c255614e
HWN
12952005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1296
1297 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1298 upon error
1299
29295b0c
NJ
13002005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1301
9a5fa6e9 1302 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1303 the GC when allocated_fluids_len is zero.
1304
2824f4dc
NJ
13052005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1306
ec3a8ace
NJ
1307 * load.c (the_reader, the_reader_fluid_num): New.
1308 (scm_primitive_load): Support custom reader.
1309 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1310 the_reader as `current-reader'.
1311
2824f4dc
NJ
1312 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1313 (rather than an uninitialized pointer on the stack).
1314
d9c36d2a
MV
13152005-12-07 Marius Vollmer <mvo@zagadka.de>
1316
6a88895b
MV
1317 Reported by Bruce Korb:
1318
1319 * init.c (invoke_main_func): Don't call exit here. Throws that
1320 are only caught by scm_with_guile will bypass us and would cause
1321 scm_boot_guile to return erroneously.
1322 (scm_boot_guile): Expect scm_with_guile to return and call exit
1323 here, passing it an appropriate exit code.
1324
1325 From Andy Wingo:
d9c36d2a
MV
1326
1327 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1328 unsigned char cast to an int, or -1 for EOS.
1329
b54df254
MV
13302005-12-06 Marius Vollmer <mvo@zagadka.de>
1331
08f489c9
MV
1332 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1333 non-const.
9a5fa6e9 1334 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1335
b54df254
MV
1336 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1337 scm_enter_guile): Removed from public API. See comment at
1338 scm_without_guile for the rationale.
1339
1340 * scmsigs.c (read_without_guile): New.
1341 (signal_delivery_thread): Use it instead of
1342 scm_leave_guile/read/scm_enter_guile.
1343
9d9ce2b5
MV
1344 From Stephen Compall:
1345
1346 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1347 (CEVAL): Evaluate SRFI 61 cond clauses.
1348
9a5fa6e9 13492005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1350
1351 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1352 This was typically hit when running `gc-live-object-stats' right
1353 after starting Guile.
1354
efeac8ae
KR
13552005-11-30 Kevin Ryde <user42@zip.com.au>
1356
1357 * srfi-13.c (scm_string_append_shared): No copying if just one
1358 non-empty string in args.
1359
606183ba
KR
13602005-11-26 Kevin Ryde <user42@zip.com.au>
1361
1362 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1363 by Ludovic Courtès.
606183ba
KR
1364
1365 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1366 "register".
1367
1368 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1369 scm_malloc returning NULL, it never does that.
1370 * putenv.c (putenv): Likewise.
1371
1372 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1373 much too big to want to inline.
1374
9a5fa6e9 13752005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1376
1377 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1378 the value at its top. This fixes a reference leak.
1379 (PUSH_REF): Perform `pstate->top++' after calling
1380 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1381 effects.
1382
9a5fa6e9 13832005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1384
1385 * gc.c (scm_weak_vectors): Removed.
1386
f07d2b20
KR
13872005-11-12 Kevin Ryde <user42@zip.com.au>
1388
1389 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1390 by Ludovic Courtès.
f07d2b20 1391
bedd3f5f
MV
13922005-11-07 Marius Vollmer <mvo@zagadka.de>
1393
1394 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1395 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1396 section might exit non-locally.
1397
7c9c0169
NJ
13982005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1399
1400 * eval.c (sym_instead): New symbol.
1401 (ENTER_APPLY): Remove optional use of a continuation when making
1402 trap call.
1403 (scm_debug_opts): Change doc for 'cheap option to make clear that
1404 it is now obsolete.
1405 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1406 making trap calls, and implement substitution of eval expressions
1407 and return values using the values that the trap call handlers
1408 return.
1409
1410 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1411
9a5fa6e9 14122005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1413
1414 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1415 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1416 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1417 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1418 scm_c_make_socket_address): New functions.
1419 * socket.h: Add prototypes.
1420
fc9f596c
KR
14212005-10-24 Kevin Ryde <user42@zip.com.au>
1422
1423 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1424 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1425 POSIX spec examples, the latter are not available on for instance
1426 NetBSD.
1427
1428 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1429 posix.texi.
1430
1431 * stime.c (scm_strftime): Update docstring from posix.texi.
1432
0460c6e1
MV
14332005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1434
1435 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1436
1437 * null-threads.h, pthread-threads.h
1438 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1439 (scm_i_pthread_mutexattr_recursive): New.
1440
1441 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1442 (scm_i_critical_section_mutex): Do not initialize statically.
1443 (scm_threads_prehistory): Initialize
1444 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1445 here.
1446
1447 * eval.c (source_mutex): Do not initialiaze statically.
1448 (scm_init_eval): Do it here, using
1449 scm_i_pthread_mutexattr_recursive.
1450
7b4a9e52
MV
14512005-09-05 Marius Vollmer <mvo@zagadka.de>
1452
1453 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1454 New.
1455 (sym_reader): New.
1456 (scm_print_opts): Added "quote-keywordish-symbols" option.
1457 (quote_keywordish_symbol): New, for evaluating the option.
1458 (scm_print_symbol_name): Use it.
1459 (scm_init_print): Initialize new option to sym_reader.
1460
5defc05d
NJ
14612005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1462
1463 * eval.c (eval_letrec_inits): New.
1464 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1465
036482e9
MV
14662005-08-12 Marius Vollmer <mvo@zagadka.de>
1467
1468 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1469 Peter Gavin!
1470
5c347f8c
KR
14712005-08-12 Kevin Ryde <user42@zip.com.au>
1472
1473 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1474
bc721aa2
KR
14752005-08-06 Kevin Ryde <user42@zip.com.au>
1476
1477 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1478 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1479 scm_string_index, scm_string_index_right, scm_string_skip,
1480 scm_string_skip_right, scm_string_count, scm_string_map,
1481 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1482 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1483 procedures called in loops.
1484
126c81db
KR
14852005-08-02 Kevin Ryde <user42@zip.com.au>
1486
1487 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1488 avoid lots of copying where previoulsy growing by only 80 bytes at a
1489 time.
1490
7f278dc6
MV
14912005-08-01 Marius Vollmer <mvo@zagadka.de>
1492
1493 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1494 already have scm_lookup_closure_module, which does the same thing.
1495
cb5c4b07
MV
14962005-08-01 Marius Vollmer <mvo@zagadka.de>
1497
1498 New marking algorithm for weak hashtables that fixes the problem
1499 that references from the non-weak value to the associated weak
1500 key (for example) would prevent the entry from ever being dropped.
1501
1502 Guardians have been changed back to their original semantics and
1503 are no longer greedy and no longer drop cycles.
1504
1505 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1506 hashtable and guardian machinery but call the relevant functions
1507 directly.
1508
1509 * guardians.h, guardians.c, deprecated.h,
1510 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1511 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1512 Deprecated and moved into deprecated.[ch].
1513
1514 * guardians.h, guardians.c: Mostly rewritten.
1515 (scm_i_init_guardians_for_gc,
1516 scm_i_identify_inaccessible_guardeds,
1517 scm_i_mark_inaccessible_guardeds): New.
930888e8 1518 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1519
1520 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1521 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1522 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1523 (scm_weaks_prehistory): Removed.
1524 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1525 scm_i_mark_weak_vectors_non_weaks,
1526 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1527 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1528 scm_scan_weak_vectors): Removed.
1529
1530 * hashtab.h (scm_i_scan_weak_hashtables): New.
1531 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1532 SCM_WVECTF_NOSCAN.
1533 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1534 t->n_items.
1535 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1536 to latter. Do not scan the alists themselves, this is done by the
1537 weak vector code now. Just update the element count.
1538
1539 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1540 to latter. The type is now only part of the cell word.
1541 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1542
1543 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1544
3e2073bd
MD
15452005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1546
1547 Some changes towards making it possible to run Guile on the EM64T
1548 platform.
1549
1550 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1551 mallocating for (unsigned long *bounds).
1552
1553 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1554 scm_t_bits before storing them in the type word.
1555
1556 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1557 scm_t_bits to int.
1558
e8ac8e75
KR
15592005-07-12 Kevin Ryde <user42@zip.com.au>
1560
1561 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1562 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1563 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1564 than scm_makfrom0str.
1565 Reported by Ken Raeburn.
1566
1567 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1568 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1569 returning SCM_GC_CARD_BVEC.
1570
1571 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1572 rather than latin-1 acute accent, the latter may not print on all
1573 terminals.
1574
1575 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1576 trailing deletions, so as to return a substring if those are the only
1577 changes.
1578
adc0677d
KR
15792005-07-10 Kevin Ryde <user42@zip.com.au>
1580
1581 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1582 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1583 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1584 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1585
8fecbb19
HWN
15862005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1587
1588 * gc-card.c (scm_i_card_statistics): init tag.
1589
1590 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1591
fc9c5d06
HWN
15922005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1593
8fecbb19
HWN
1594 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1595 string.
fc9c5d06 1596
08fce816
KR
15972005-06-25 Kevin Ryde <user42@zip.com.au>
1598
1599 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1600 last change, use plain copy-on-write substrings, the individual
1601 descriptions in the srfi don't mention shared storage (only the
1602 introduction does).
1603
1604 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1605 null-terminator, rather than mallocing a whole new block.
1606 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1607
fc4abd0e
MV
16082005-06-12 Marius Vollmer <mvo@zagadka.de>
1609
e3da8a30
MV
1610 * ramap.c (scm_array_index_map_x): First test for real arrays,
1611 then check for generalized vectors. This ensures that the
1612 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1613 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1614 to access the target array, making these functions work with all
1615 kinds of arrays, not just bit arrays.
e3da8a30 1616
fc4abd0e
MV
1617 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1618 gh_list.c, gh_predicates.c: Deprecated everything.
1619
1620 * environments.c (environment_default_folder,
1621 environment_default_observer): Do not use gh_call3, gh_call1.
1622
e4da0740
HWN
16232005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1624
1625 * modules.c (s_scm_eval_closure_module): new function. Return the
1626 module inside an eval-closure.
1627
1628 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1629 table. This means that procedure properties are GC'd if the
1630 procedure dies.
1631
27667158
KR
16322005-06-11 Kevin Ryde <user42@zip.com.au>
1633
1634 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1635 charset cases, count chars kept and build a string in a second pass,
1636 rather than using a cons cell for every char kept. Use a shared
1637 substring when nothing removed (such sharing is allowed by the srfi).
1638
8a00ba71
HWN
16392005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1640
1641 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1642 string, so live object stats can be sorted with string<?.
1643
a677679f
MV
16442005-06-06 Marius Vollmer <mvo@zagadka.de>
1645
2ff668b0
MV
1646 * print.c (iprin1): When writing a string, collect all characters
1647 that can be printed directly into one call to scm_lfwrite.
1648 Previously, every character was output with its own call to
1649 write(2) on unbuffered ports.
1650
589f22f6
MV
1651 * eval.c (scm_eval_options_interface): Use
1652 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1653 and SCM_CRITICAL_SECTION_END.
1654
a677679f
MV
1655 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1656 check for generalized vectors. This ensures that the generalized
1657 vector case need only work with zero-origin ranges.
1658
f8cda9ee
KR
16592005-06-06 Kevin Ryde <user42@zip.com.au>
1660
1661 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1662 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1663 matched.
1664
cdac1be4
MV
16652005-06-05 Marius Vollmer <mvo@zagadka.de>
1666
6642f7ac
MV
1667 * eval.c: Added comment on how to make case 1.1 of
1668 r5rs_pitfall.test succeed.
1669
cdac1be4
MV
1670 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1671
1672 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1673
1674 * socket.c: Remove obsolete comment about socklen_t.
1675 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1676
1677 * numbers.h (isnan)[__MINGW32__]: Remove.
1678
1679 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1680 DEFAULT_INCLUDES when cross compiling.
1681
1682 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1683
a677679f 1684 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1685 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1686 from Jan's patch.)
1687
9e664475
MV
16882005-05-22 Marius Vollmer <mvo@zagadka.de>
1689
188d0c5e
MV
1690 * unif.c (scm_make_shared_array): Add old base to new base since
1691 scm_array_handle_pos does not include the base.
1692 (scm_aind): Likewise.
1693
9e664475
MV
1694 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1695 output port.
1696
5a6d139b
NJ
16972005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1698
1699 Mac OS X compile warning fixes, reported by Richard Todd.
1700
1701 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1702 that it is signed.
1703
1704 * strports.c (st_resize_port): Add unsigned char cast.
1705 (scm_mkstrport): Make read/write_buf cast unsigned.
1706
1707 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1708
1709 * rdelim.c (scm_read_line): Initialize slen.
1710
1711 * load.c (scm_search_path): Remove weird >=1, and add
1712 parentheses to clarify conditions.
1713
1714 * hash.c (scm_hasher): Add const unsigned char cast.
1715
1716 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1717
b01532af
NJ
17182005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1719
9a5fa6e9 1720 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1721
1722 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1723 code.
1724
1725 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1726 of code.
1727
1728 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1729 of code.
1730 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1731 and current.
1732
229a0710
NJ
17332005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1734
1735 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1736 compile warning reported by Werner Scheinast.
1737
645dd3fc
HWN
17382005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1739
80038021
HWN
1740 * list.h: remove scm_list()
1741
645dd3fc
HWN
1742 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1743 SCM_DEBUG_CELL_ACCESSES
1744 (FLUID_NEXT_LOC): idem.
1745
9a68a4a8
KR
17462005-04-30 Kevin Ryde <user42@zip.com.au>
1747
1748 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1749 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1750 zero when re==0 and im<0. Reported by Jean Crepeau.
1751
0640cdaa
KR
17522005-04-25 Kevin Ryde <user42@zip.com.au>
1753
1754 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1755 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1756 few sensible uses (like filling with a random number generator say),
1757 but has been allowed in the past and so should be kept.
0640cdaa 1758
c0b85e9c
KR
17592005-04-23 Kevin Ryde <user42@zip.com.au>
1760
1761 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1762 scm_hash_fn_remove_x.
1763
1764 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1765 the caller when cons* is reached through apply.
1766
1767 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1768 list is called using apply, under the debugging evaluator.
1769 (scm_list): Remove.
1770
c51682b4
KR
1771 * list.c, list.h (scm_make_list): New code, moving make-list from
1772 boot-9.scm.
8cb2eff8 1773
c0575bde
KR
17742005-04-14 Kevin Ryde <user42@zip.com.au>
1775
1776 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1777 converted from scheme code in boot-9.scm.
1778
47a298d9
KR
17792005-04-11 Kevin Ryde <user42@zip.com.au>
1780
1781 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1782 Validate list argument, scm_string_append and scm_string_append_shared
1783 don't do that to their rest argument (in a normal build).
1784
8ea3dc2e
MV
17852005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1786
1787 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1788 closure can not be stored since it is no longer valid at GC time.
1789 (make_hash_table): Initialize 'hash_fn' field.
1790 (scm_i_rehash): Only store hash_fn in hash table when closre is
1791 NULL.
1792 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1793 non-NULL. Always use a NULL closure.
1794 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1795 few entries.
1796
08d2020d
MV
17972005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1798
1799 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1800 argument; always use scm_delq_x. The delete_fn function works on
1801 the handle, not the key, and it therefore makes no sense to make
1802 it configurable. Changed all callers.
1803 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1804 (scm_hash_clear): Accept plain vectors as hashtables.
1805 (scm_delx_x): Removed.
1806
cb975c21
HWN
18072005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1808
1809 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1810 compatibility with gcc -std=c99.
1811
4c908f2c
MD
18122005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1813
1814 * async.h (scm_mask_ints): Removed left over reference to
1815 scm_root.
1816
1817 * threads.c: Removed fprintf debug statements.
1818
d193b04b
NJ
18192005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1820
1821 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1822
c29748cd
NJ
18232005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1824
1825 * debug.c (scm_make_memoized): Remove unnecessary critical
1826 section, and simplify by using SCM_RETURN_NEWSMOB.
1827
e654b062
MD
18282005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1829
1830 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1831
4bc6f1c6
KR
18322005-03-18 Kevin Ryde <user42@zip.com.au>
1833
1834 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 1835 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 1836
f1531813
KR
18372005-03-13 Kevin Ryde <user42@zip.com.au>
1838
1839 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1840 srfi-60.
1841
1842 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1843 because OR-ing bits into a negative can reduce the value to an inum.
1844
1845 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1846 casting inum to double since that can lose precision.
1847
a9fae247
MV
18482005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1849
1850 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1851 (guilify_self_1): Initialize it.
1852
1853 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1854 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1855 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1856 field.
1857 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1858 recursively.
1859 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1860 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1861 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1862 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1863 scm_after_gc_c_hook here.
1864 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1865 scm_after_gc_c_hook when a full GC has in fact been performed.
1866 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1867
1868 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1869 scm_gc_heap_lock.
1870
1871 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1872 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1873
1874 * inline.h (scm_cell, scm_double_cell): Do not check
1875 scm_gc_running_p, allocation during sweeping is OK.
1876
1877 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1878 not set scm_block_gc.
1879
1880 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1881
1882 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1883 instead of scm_malloc. The latter can not be used during GC.
1884
d1c38e11
MV
18852005-03-09 Marius Vollmer <mvo@zagadka.de>
1886
1887 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1888 years.
1889
99ec43c1
MV
18902005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1891
1892 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1893 scm_gc_running_p. Sweeping can happen in parallel with
1894 allocation.
1895
1896 * inline.h: Updated comments for current threading implementation.
1897
1898 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1899 (scm_i_thread): Removed unused signal_asyncs field.
1900 (threads_mark): Do not mark it.
1901 (guilify_self_1): Do not initialize it. Do initialize
1902 continuation_root field.
1903 (do_thread_exit): Do not remove thread from all_threads list.
1904 (on_thread_exit): Do it here, after leaving guile mode.
1905 (sleep_level): Removed.
1906 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1907 returning. Do not support recursive sleeps.
1908 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1909 entry. Do not support recursive sleeps.
1910
1911 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1912 resize_all_states): Collapsed ensure_state_size and
1913 ensure_all_state_sizes into one function named resize_all_states.
1914 Allocate new vectors outside of single threaded region. Do only
1915 simple things inside that region.
1916 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1917 while adding to the global lists.
1918
1919
461f34aa
MV
19202005-03-08 Marius Vollmer <mvo@zagadka.de>
1921
1922 libltdl is no longer distributed. We expect it to be installed
1923 already.
1924
1925 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1926 (libguile_la_LIBADD): Removed @LIBLTDL@.
1927
4e047c3e
MV
19282005-03-07 Marius Vollmer <mvo@zagadka.de>
1929
1930 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1931 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1932 they also block/unblock execution of asyncs and call
1933 scm_async_click which is declared in async.h but threads.h can not
1934 include async.h since async.h already includes threads.h.
1935 (scm_i_critical_section_level): New, for checking mistakes in the
1936 use of the SCM_CRITICAL_SECTION_* macros.
1937 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1938 critical sections can be nested.
1939
1940 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1941 not zero.
1942
1943 * threads.h, threads.c (scm_frame_lock_mutex): New.
1944 (scm_frame_critical_section): Take mutex as argument.
1945 (framed_critical_section_mutex): New, used as default for above.
1946 (scm_init_threads): Initialize it.
1947 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1948 scm_i_critical_section_mutex; both are initialized statically.
1949
1950 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1951 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
1952 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1953 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
1954
1955 * debug.c (scm_debug_options): Replace
1956 SCM_CRITICAL_SECTION_START/END with a frame and
1957 scm_frame_critical_section.
1958
1959 * continuations.c (scm_make_continuation): No longer a critical
1960 section.
1961 (scm_dynthrow): Abort when scm_i_critical_section_level is
1962 not zero.
1963
d0a45bff
MV
19642005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1965
db6673e5
MV
1966 * threads.c (scm_try_mutex): Renamed argument for consistency.
1967
d0a45bff
MV
1968 * root.c (scm_call_with_dynamic_root): New docstring.
1969
1970 * eval.c: Define _GNU_SOURCE.
1971
9de87eea
MV
19722005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1973
1974 Big merge from the mvo-thread-cleanup branch. The main changes
1975 are:
1976
1977 - The dynamic roots functionality has been split into dynamic
1978 states and continuations barriers. Fluids have been
1979 reimplemented and can now be garbage collected.
1980
1981 - Initialization of Guile now works in a multi-thread friendly
1982 manner. Threads can freely enter and leave guile mode.
1983
1984 - Blocking on mutexes or condition variables or while selecting
1985 can now be reliably interrupted via system asyncs.
1986
1987 - The low-level threading interface has been removed.
1988
1989 - Signals are delivered via a pipe to a dedicated 'signal delivery
1990 thread'.
1991
1992 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1993
1994 * throw.c (scm_handle_by_message): Exit only the current thread,
1995 not the whole process.
1996 (scm_handle_by_message_noexit): Exit when catching 'quit.
1997
1998 * scmsigs.c (take_signal, signal_delivery_thread,
1999 start_signal_delivery_thread, ensure_signal_delivery_thread,
2000 install_handler): Reimplemented signal delivery as explained in
2001 the comments.
2002
2003 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
2004 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
2005 scm_i_sched_yield, scm_i_pthread_sigmask,
2006 SCM_I_PTHREAD_MUTEX_INITIALIZER,
2007 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
2008 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
2009 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
2010 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
2011 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
2012 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
2013 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
2014 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
2015 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
2016 scm_i_pthread_key_create, scm_i_pthread_setspecific,
2017 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
2018 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
2019 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2020 when using pthreads.
2021 * null-threads.c, null-threads.h: Provide dummy definitions for
2022 the above symbols when not using pthreads.
2023
2024 * modules.h, modules.c (scm_frame_current_module): New.
2025
2026 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2027 instead of scm_internal_dynamic_wind.
2028
2029 * init.h, init.c (restart_stack, start_stack): Removed.
2030 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2031 (scm_boot_guile_1): Removed.
2032 (scm_i_init_mutex): New.
2033 (really_cleanup_for_exit, cleanup_for_exit): New.
2034 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2035 Moved around some init funcs. Call
2036 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2037 with atexit.
2038
2039 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2040 Use "!scm_is_eq" instead of "!=".
2041
2042 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2043 SCM_USE_COOP_THREADS): Removed.
2044
2045 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2046 maintained. Unlock scm_i_sweep_mutex before running
2047 scm_after_gc_c_hook.
2048 (scm_permanent_object): Allocate outside of critical section.
2049 (cleanup): Removed.
2050
2051 * fluids.h, fluids.c: Reimplemented completely.
2052 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2053 SCM_FAST_FLUID_SET): Reimplemented as functions.
2054 (scm_is_fluid): New.
2055 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2056 (scm_make_dynamic_state, scm_dynamic_state_p,
2057 scm_is_dynamic_state, scm_current_dynamic_state,
2058 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2059 scm_c_with_dynamic_state, scm_with_dynamic_state,
2060 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2061
2062 * feature.c (progargs_fluid): New.
2063 (scm_program_arguments, scm_set_program_arguments): Use it instead
2064 of scm_progargs.
2065 (scm_init_feature): Allocate it. Also, only add "threads" feature
2066 when SCM_USE_PTHREAD_THREADS is true.
2067
2068 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2069 scm_make_rec_mutex, with all the consequences.
2070 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2071 scm_internal_dynamic_wind. Handle dynamic states as second
2072 argument.
2073
2074 * threads.h, threads.c (scm_internal_select): Renamed to
2075 scm_std_select and discouraged old name.
2076 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2077 and scm_std_usleep.
2078 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2079 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2080 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2081 SCM_THREAD_DATA): Removed.
2082 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2083 (scm_i_thread): New.
2084 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2085 Use scm_assert_smob_type.
2086 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2087 scm_thread_self, scm_thread_yield, scm_mutex_init,
2088 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2089 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2090 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2091 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2092 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2093 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2094 scm_thread_select): Removed. Replaced with scm_i_pthread
2095 functions as appropriate.
2096 (scm_in_guile, scm_outside_guile): Removed.
2097 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2098 take a ticket.
2099 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2100 New.
2101 (scm_i_frame_single_threaded): New.
2102 (scm_init_threads_default_dynamic_state): New.
2103 (scm_i_create_thread): Removed.
2104 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2105 (scm_make_recursive_mutex): New.
2106 (scm_frame_critical_section): New.
2107 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2108 latter, changed all uses.
2109 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2110 scm_i_set_last_debug_frame): New, use them instead of scm_root
2111 stuff.
2112 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2113 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2114 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2115 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2116 (remqueue): Allow the removal of already removed cells. Indicate
2117 whether a real removal has happened.
2118 (scm_thread): Removed, replaced with scm_i_thread.
2119 (make_thread, init_thread_creatant): Removed.
2120 (cur_thread): Removed.
2121 (block_self, unblock_from_queue): New.
2122 (block, timed_block, unblock): Removed.
2123 (guilify_self_1, guilify_self_2, do_thread_exit,
2124 init_thread_key_once, init_thread_key,
2125 scm_i_init_thread_for_guile, get_thread_stack_base,
2126 scm_init_guile): New initialisation method.
2127 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2128 thread creation.
2129 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2130 "fair" to fat and implemented new semantics, including reliable
2131 interruption.
2132 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2133 (scm_threads_mark_stacks): Explicitly mark handle.
2134 (scm_std_select): Allow interruption by also selecting on the
2135 sleep_pipe.
2136 (scm_i_thread_put_to_sleep): Handle recursive requests for
2137 single-threadedness.
2138 (scm_threads_prehistory, scm_init_threads): Put current thread
2139 into guile mode via guileify_self_1 and guileify_self_2,
2140 respectively.
2141
2142 * fluid.h (SCM_FLUIDP): Deprecated.
2143
2144 * coop-threads.c: Removed.
2145
2146 * continuations.h, continuations.c (scm_with_continuation_barrier,
2147 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2148 New.
2149
2150 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2151 (async_mutex): New.
2152 (scm_async_click): Protected with async_mutex. Do not deal with
2153 signal_asyncs, which are gone. Set cdr of handled async cell to
2154 #f.
2155 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2156 current sleep.
2157 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2158 since that might not work during early initialization.
2159
2160 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2161 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2162 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2163 and SCM_CRITICAL_SECTION_END.
2164 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2165 SCM_CRITICAL_SECTION_START/END.
2166
2167 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2168 (libguile_la_SOURCES): Added null-threads.c
2169 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2170 threads-plugin.c.
2171 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2172
2173 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2174 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2175 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2176 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2177 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2178 scm_make_root): Removed or deprecated. Replaced with references
2179 to the current thread, dynamic state, continuation barrier, or
2180 some fluid, as appropriate.
2181 (root_mark, root_print): Removed.
2182 (scm_internal_cwdr): Reimplemented guts with
2183 scm_frame_current_dynamic_state and
2184 scm_i_with_continuation_barrier.
2185 (scm_dynamic_root): Return current continuation barrier.
2186
2187
ad3d5a65
MV
21882005-02-28 Marius Vollmer <mvo@zagadka.de>
2189
2190 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2191 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2192 cleanliness.
2193 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2194 IP_DROP_MEMBERSHIP.
2195 Thanks to Greg Troxel!
2196
73a90115
MD
21972005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2198
2199 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2200 block.
2201
5d2cb3ab
MV
22022005-02-25 Marius Vollmer <mvo@zagadka.de>
2203
2204 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2205 so that no two weak alist vectors share a spine.
2206 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2207 during GC before inserting the new alist cell.
2208
838c4126
MV
22092005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2210
2211 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2212 the hashtable.
2213 (scm_hash_fn_create_handle_x): Likewise.
2214 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2215
29fed193
MD
22162005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2217
2218 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2219 the prototypical examples mentioned in the old reference manual.
2220 Instead keep the old semantics of dispatching on type. (Yes, this
2221 is extremely ugly, but the whole point of keeping the deprecated
2222 interface is not to break old code.)
2223
9cc49060
MD
22242005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2225
2226 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2227 scm_i_array_dims.
2228
8447f463
KR
22292005-01-28 Kevin Ryde <user42@zip.com.au>
2230
2231 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2232 integer-expt and multiply/divide. Inexacts and fractions no longer
2233 supported (they happened to work before for left shifts, but not
2234 right). Don't really need inexacts and fractions, since ash is
2235 documented as a "bitwise operation", and all the rest of those only
2236 take exact integers.
2237
1367aa5e
HWN
22382005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2239
856fca7e
HWN
2240 * gc-card.c (scm_i_card_statistics): map structs, closures and
2241 subrs to one tag.
2242
1367aa5e 2243 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2244 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2245
2246 * gc-segment.c (scm_i_all_segments_statistics): new function.
2247 (scm_i_heap_segment_statistics): new function
2248
2249 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2250 statistics on the number of live objects of each type.
2251
2252 * gc-card.c (scm_i_tag_name): new function.
2253 (scm_i_card_statistics): new function.
2254
333db3b8
KR
22552005-01-24 Kevin Ryde <user42@zip.com.au>
2256
2257 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2258 POSIX and C99 don't document errno being set. Reported by Bruno
2259 Haible.
2260 (scm_flock): Update docstring from manual.
2261
8447f463
KR
2262 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2263 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2264 a 64-bit system.
2265
2266 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2267 sa_handler, needs to be a long on 64-bit systems where int is only 32
2268 bits.
2269
88f59e53
MV
22702005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2271
0eeb2611
MV
2272 * environments.c (obarray_enter, obarray_replace): Call
2273 SCM_HASHTABLE_INCREMENT when adding a new entry.
2274
88f59e53
MV
2275 * objects.c: Include goops.h for the scm_class_of prototype.
2276
2277 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2278 sizes to be smaller than the maximum lengths of vectors.
2279
219b2868
MV
22802005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2281
2282 * ports.c, smob.c: Include "libguile/goops.h".
2283
2284 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2285 scm_class_char, scm_class_pair, scm_class_procedure,
2286 scm_class_string, scm_class_symbol,
2287 scm_class_procedure_with_setter, scm_class_primitive_generic,
2288 scm_class_vector, scm_class_null, scm_class_real,
2289 scm_class_complex, scm_class_integer, scm_class_fraction,
2290 scm_class_unknown, scm_port_class, scm_smob_class,
2291 scm_no_applicable_method, scm_class_of): Moved from objects to
2292 goops since they are only useable once goops has been loaded.
2293 (scm_classes_initialized): Removed.
2294 (scm_class_of): Do not check it.
2295 (create_standard_classes): Do not set it.
2296
009c6b9c
MV
22972005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2298
50472546
MV
2299 * objects.h, objects.c (scm_classes_initialized): New.
2300 (scm_class_of): Signal error when scm_classes_initialized is zero.
2301 * goops.c (create_standard_classes): Set scm_classes_initialized
2302 to one.
2303
009c6b9c
MV
2304 * random.c (scm_random_solid_sphere_x): Use
2305 scm_c_generalized_vector_length instead of
2306 scm_uniform_vector_length.
2307
7719cbe9
MV
23082005-01-16 Marius Vollmer <mvo@zagadka.de>
2309
2310 * script.c (scm_compile_shell_switches): Removed debugging output.
2311
1ec44fed
KR
23122005-01-15 Kevin Ryde <user42@zip.com.au>
2313
2314 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2315 docstrings from manual.
2316 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2317
6e4cd850
MV
23182005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2319
0b5a0521
MV
2320 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2321 its value.
2322
2323 Implement u64 and s64 uniform numeric vectors with bignums when
2324 scm_t_uint64 and scm_t_int64 are not available.
2325
2326 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2327 scm_array_handle_u64_elements,
2328 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2329 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2330 is not available.
2331 (scm_take_s64vector, scm_array_handle_s64_elements,
2332 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2333 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2334 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2335 scm_t_int64/scm_t_uint64 are not available.
2336 (uvec_mark): New, to mark the bignums.
2337 (alloc_uvec): Initialize bignums.
2338 (uvec_fast_ref): Return bignums directly.
2339 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2340 assert_exact_integer): New.
2341 (uvec_fast_set): Use them to validate the bignums.
2342 (scm_init_srfi_4): Set mark function of smob when needed.
2343 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2344 scm_int64_max.
2345
6e4cd850
MV
2346 Recognize 1.4 -e syntax.
2347
2348 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2349 (scm_compile_shell_switches): Use them to recognize and convert
2350 1.4 "-e" syntax.
2351
3b698afe
MV
23522005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2353
2354 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2355 deprecated features that once were macros but are now functions
2356 back into macros.
2357
d6dc83a9
MV
23582005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2359
49086691
MV
2360 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2361 * deprecation.c (scm_issue_deprecation_warning,
2362 scm_c_issue_deprecation_warning_fmt): Use it.
2363 (mode): Removed.
2364 (print_summary): New.
2365 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2366 mode.
2367
d6dc83a9
MV
2368 Deprecated SCM_ARRAY* macros.
2369
2370 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2371 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2372 version. Changed all uses.
2373 (scm_tc16_array, scm_i_tc16_array,
2374 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2375 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2376 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2377 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2378 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2379 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2380 SCM_ARRAY_V, SCM_I_ARRAY_V,
2381 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2382 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2383 scm_t_array, scm_i_t_array): Likewise.
2384 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2385 Moved from unif.h to unif.c.
2386 (scm_c_array_rank): New.
2387 (scm_array_rank): Reimplement using it.
2388
2389 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2390 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2391 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2392
dc91d8de
MV
23932005-01-11 Marius Vollmer <mvo@zagadka.de>
2394
2395 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2396 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2397 scm_c_generalized_vector_ref and scm_cvref, and
2398 scm_c_generalized_vector_set_x, respectively.
2399 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2400 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2401
2402 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2403 former to latter and made public. Changed all uses.
2404 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2405 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2406 (scm_i_shap2ra): New internal version of scm_shap2ra.
2407 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2408 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2409 (scm_ra_set_contp): Deprecated, changed all uses to
2410 scm_i_ra_set_contp.
2411 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2412
66d33784
MV
24132005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2414
b06f099d
MV
2415 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2416 Trotts!
2417
5d35ad81
MV
2418 * unif.c (scm_list_to_typed_array): Allow the specification of the
2419 upper bound as well. This is needed for empty arrays.
2420 (l2ra): Give needed number of elements in error message.
2421 (scm_i_print_array): Print length information for arrays that need
2422 it.
2423 (scm_i_read_array): Parse it.
2424
66d33784
MV
2425 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2426 scm_i_object_chars, scm_i_object_length): Brought back from the
2427 dead.
2428
d7d7d401
MV
24292005-01-10 Marius Vollmer <mvo@zagadka.de>
2430
74c58fce
MV
2431 * ramap.c: Replaced single-index uses of scm_array_set_x with
2432 scm_c_generalized_vector_set_x.
2433
d7d7d401
MV
2434 * unif.c (scm_array_rank, scm_array_dimensions,
2435 scm_shared_array_offset, scm_shared_array_increments,
2436 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2437 to simplify code and make it more general.
2438 (scm_shared_array_root): Work with all kinds of arrays, including
2439 naked vectors.
2440 (indices_to_pos): New.
74c58fce
MV
2441 (scm_make_shared_array): Use it instead of scm_aind; use handle
2442 for oldra.
2443
4475d3fe
KR
24442005-01-10 Kevin Ryde <user42@zip.com.au>
2445
2446 * posix.c (scm_mkstemp): Update docstring from manual.
2447
d3ddc95e
KR
2448 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2449
8c8491f5
MV
24502005-01-09 Marius Vollmer <mvo@zagadka.de>
2451
b89ecc6f
MV
2452 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2453 scm_i_uniform_vector_set_proc): New.
2454 (u8ref, u8set, s8ref, s8set, etc): New.
2455 (uvec_reffers, uvec_setters): New.
2456 (uvec_to_list): Use generic scm_array_handle_ref instead of
2457 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2458 (coerce_to_uvec, scm_c_uniform_vector_ref,
2459 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2460
2461 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2462 New.
2463 (scm_t_array_handle): Added ref, set, elements and
2464 writable_elements for fast inline operation of
2465 scm_array_handle_ref and scm_array_handle_set.
2466 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2467 and replaced with inline code that simply calls the ref/set
2468 members of the handle.
2469 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2470 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2471 New.
2472 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2473 and memoize_set.
2474 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2475 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2476 scm_bit_invert_x): Correctly multiply index with increment in the
2477 general case.
2478
8c8491f5
MV
2479 * unif.c (scm_array_handle_set): Correctly execute only one
2480 alternative. D'Oh!
2481 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2482 the array; this covers all cases with much simpler code.
2483
2484 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2485 as well.
2486
cd5d55c7
MV
24872005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2488
2489 * srfi-4.c (uvec_type): New.
2490 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2491 scm_c_uniform_vector_x): Use it to get concrete type.
2492
2493 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2494 fit the docs.
2495
2496 * unif.c (ra2l): Handle zero rank arrays.
2497 (scm_i_print_array): Print zero rank arrays specially.
2498 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2499 (scm_i_read_array): Allow zero rank arrays.
2500
a4aad74e
MV
25012005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2502
2503 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2504 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2505 and SCM_SET_HASHTAB_BUCKET.
2506
2507 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2508 Removed ref_stack field.
2509 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2510 of a print state. Use them everywhere instead of ref_stack.
2511
3a40d5e1
MV
2512 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2513
a4aad74e
MV
2514 * srfi-4.c: Include deprecation.h.
2515
2516 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2517 deprecated.c, eq.c
2518 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2519 (scm_vector_elements, scm_vector_writable_elements,
2520 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2521 unif.[hc].
2522 (SCM_SIMPLE_VECTOR_LOC): Removed.
2523 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2524 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2525 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2526 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2527 latter. Changed use in eq.c.
2528
f01fe441
MV
25292005-01-07 Marius Vollmer <mvo@zagadka.de>
2530
2531 Make the uniform vector routines also deal with one dimensional
2532 arrays.
2533
2534 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2535 SCM_SMOB_PREDICATE in this file.
2536 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2537 of the right type.
2538 (scm_is_uniform_vector): Likewise.
2539 (uvec_fast_ref): Made BASE param const.
2540 (uvec_writable_elements, uvec_elements): New.
2541 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2542 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2543 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2544 arrays.
2545 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2546 argument convention.
2547 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2548 checking.
2549 (scm_uniform_vector_length): Use uvec_length.
2550
2aaf5726
MV
25512005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2552
2553 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2554 scm_c_uniform_vector_size): Removed.
2555 (scm_array_handle_uniform_element_size): New.
2556
2557
2558 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2559 type of POS parameter to be signed, positions can be negative.
2560 (scm_array_handle_release): New, changed all uses of
2561 scm_t_array_handle to properly call it.
2562 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2563 Renamed former to latter, changed all uses.
2564
34ae52fc
MV
25652005-01-05 Marius Vollmer <mvo@zagadka.de>
2566
2567 Updated bitvector routines to also use scm_t_array_handles.
2568
2569 * unif.h (scm_bitvector_elements,
2570 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2571 deliver offset, length and increment to caller. Changed all uses.
2572 (scm_bitvector_release_elements,
2573 scm_frame_bitvector_release_elements,
2574 scm_bitvector_release_writable_elements,
2575 scm_frame_bitvector_release_writable_elements): Removed.
2576 (scm_array_handle_bit_elements,
2577 scm_array_handle_bit_writable_elements,
2578 scm_array_handle_bit_elements_offset): New.
2579 (scm_make_typed_array): The special value for non-initialized
2580 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2581 was a valid value to fill bitvectors with, so it can't really be
2582 specialed out.
2583
c4cb7628
KR
25842005-01-04 Kevin Ryde <user42@zip.com.au>
2585
2586 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2587 Reported by Bill Schottstaedt.
2588
0356881d
MV
25892005-01-02 Marius Vollmer <mvo@zagadka.de>
2590
2591 * sort.c (quicksort): Added INC parameter for non-contigous
2592 vectors.
2593 (quicksort1): New, for contigous vectors. Both functions are
2594 generated from the same code by including "quicksort.i.c".
2595 (scm_restricted_vector_sort_x): Call one of quicksort and
2596 quicksort1, depending on increment of vector.
2597 (scm_sort): Simply call scm_sort_x on a copy of the list or
2598 vector.
2599 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2600 size_t, added inc parameter.
2601 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2602 so that it doesn't leak.
2603 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2604 list or vector.
2605
2606 * ramap.c (scm_array_map_x): Do not try to convert fill value
2607 before filling, any necessary conversion is done while storing.
2608
2609 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2610 doing it inline.
2611
2612 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2613 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2614 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2615
2616 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2617 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2618 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2619 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2620 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2621 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2622 vector elements API or simple vector API, as appropriate. Removed
2623 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2624 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2625
2626 * srfi-4.h, srfi-4.c,
2627 srfi-4.i.c (scm_array_handle_uniform_elements,
2628 scm_array_handle_uniform_writable_elements,
2629 scm_uniform_vector_elements,
2630 scm_uniform_vector_writable_elements):
2631 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2632 scm_t_array_handle, deliver length and increment.
2633 (scm_array_handle_<foo>_elements,
2634 scm_array_handle_<foo>_writable_elements): New.
2635
2636 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2637 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2638
2639 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2640 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2641 scm_array_handle_set, scm_array_handle_elements
2642 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2643 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2644 scm_dimensions_to_uniform_array): Deprecated for real.
2645 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2646 snarfing wont allow a mismatch between C and Scheme arglists.
2647 (scm_make_shared_array, scm_enclose_array): Correctly use
2648 scm_c_generalized_vector_length instead of
2649 scm_uniform_vector_length.
2650
2651 * validate.h (SCM_VALIDATE_VECTOR,
2652 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2653 of SCM_VECTORP.
2654
2655 * weaks.h, weaks.c: Use new internal weak vector API from
2656 vectors.h.
2657
2658 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2659 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2660 'extra' to being regular sources.
2661 (noinst_HEADERS): Added quicksort.i.c.
2662 * quicksort.i.c: New file.
2663
2664 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2665 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2666 and reimplemented. Replaced all uses with scm_vector_elements,
2667 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2668 appropriate.
2669 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2670 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2671 SCM_SIMPLE_VECTOR_LOC): New.
2672 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2673 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2674 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2675 Removed.
2676 (scm_vector_copy): New.
2677 (scm_vector_elements, scm_vector_writable_elements): Use
2678 scm_t_array_handle, deliver length and increment. Moved to
2679 unif.h. Changed all uses.
2680 (scm_vector_release_elements,
2681 scm_vector_release_writable_elements,
2682 (scm_frame_vector_release_elements,
2683 scm_frame_vector_release_writable_elements): Removed.
2684 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2685 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2686 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2687 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2688 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2689 weak vectors.
2690
0336d18b
MV
26912004-12-29 Marius Vollmer <mvo@zagadka.de>
2692
2693 No longer use creators to specify the type of an array. Creators
2694 expose the fact that arrays are wrapped around vectors, but that
2695 might change.
2696
2697 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2698 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2699 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2700 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2701 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2702 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2703 uvec_proc_vars): Removed.
2704 (scm_i_generalized_vector_creator): Removed.
2705 (scm_i_generalized_vector_type): New.
2706
2707 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2708 scm_make_typed_array, scm_array_type, scm_list_to_array,
2709 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2710 (scm_array_creator): Removed.
2711 (scm_array_p): Deprecated second PROT argument.
2712 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2713 Deprecated, reimplemented in terms of scm_make_typed_array and
2714 scm_list_to_typed_array.
2715 (scm_i_proc_make_vector, scm_i_proc_make_string,
2716 scm_i_proc_make_bitvector): Removed.
2717 (type_creator_table, init_type_creator_table, type_to_creator,
2718 make_typed_vector): New.
2719 (scm_i_convert_old_prototype): Removed.
2720 (prototype_to_type): New.
2721 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2722 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2723 minor added clarity.
2724 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2725 instead of scm_make_uve.
2726 (tag_creator_table, scm_i_tag_to_creator): Removed.
2727 (tag_to_type): New.
2728 (scm_i_read_array): Use scm_list_to_typed_array instead of
2729 scm_list_to_uniform_array.
2730
277e8472
MV
27312004-12-27 Marius Vollmer <mvo@zagadka.de>
2732
32b26202
MV
2733 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2734 (scm_bitvector_writable_elements): New.
2735 (scm_bitvector_release, scm_bitvector_release_elements):
2736 Renamed former to latter. Added explicit call to
2737 scm_remember_upto_here_1.
2738 (scm_frame_bitvector_release,
2739 scm_frame_bitvector_release_elements): Renamed former to latter.
2740 (scm_bitvector_release_writable_elements,
2741 scm_bitvector_release_writable_elements): New.
2742 Changed all uses as required by the changes above.
2743
2744 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2745 scm_u8vector_elements, etc): Made return value "const".
2746 (scm_uniform_vector_writable_elements,
2747 scm_u8vector_writable_elements, etc): New.
2748 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2749 Renamed former to latter. Added explicit call to
2750 scm_remember_upto_here_1.
2751 (scm_frame_uniform_vector_release,
2752 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2753 (scm_uniform_vector_release_writable_elements,
2754 scm_frame_uniform_vector_release_writable_elements): New. Takes
2755 crown of longest identifier yet.
2756 Changed all uses as required by the changes above.
2757
277e8472
MV
2758 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2759 void.
2760 (scm_is_vector, scm_vector_p, scm_vector_length,
2761 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2762 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2763 scm_vector_move_left_x, scm_vector_move_right_x,
2764 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2765 (scm_vector_elements, scm_vector_release_elements,
2766 scm_vector_frame_release_elements, scm_vector_writable_elements,
2767 scm_vector_release_writable_elements,
2768 scm_vector_frame_release_writable_elements): New.
2769 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2770 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2771
2772 * ramap.c (scm_ramapc, scm_raeql): Use
2773 scm_c_generalized_vector_length instead of
2774 scm_uniform_vector_length.
2775 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2776 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2777
49c51610
MV
27782004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2779
2780 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2781 member for relocating debug frames.
2782 (scm_make_continuation): Set it.
2783
2784 * stacks.c (read_frame, read_frames, scm_make_stack,
2785 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2786 of continuations instead of calculating the offset ourselves.
2787 Relocate 'vect' member of scm_t_debug_frame.
2788
3b2ee265
KR
27892004-12-16 Kevin Ryde <user42@zip.com.au>
2790
2791 * ramap.c (scm_array_map_x): Check for at least one source argument.
2792
e120686a
KR
27932004-12-14 Kevin Ryde <user42@zip.com.au>
2794
2795 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2796 the C code so for the final call to the predicate procedure is a tail
2797 call, per SRFI-13 spec.
2798
680b5237
KR
27992004-12-10 Kevin Ryde <user42@zip.com.au>
2800
2801 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2802 recent revision to the reference manual.
2803
2804 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2805 with "%", C99 says it's well-defined.
2806
2807 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2808 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2809 bother trying to fit scm_from_ulong, not really worth the trouble if
2810 addresses are more than 4 bytes usually.
2811
446d320c
KR
28122004-11-30 Kevin Ryde <user42@zip.com.au>
2813
2814 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2815 arm32. Reported by Greg Troxel.
2816
f2654760
MV
28172004-11-14 mvo <mvo@zagadka.de>
2818
2819 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2820
2821 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2822
d550e35f
MV
28232004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2824
2825 Enclosed arrays are now their own smob. This has been done to
2826 make the code more explicit about them and to prepare for the time
f2654760
MV
2827 when generalized vectors include arbitrary one-dimensional
2828 arrays. (Uptonow, enclosed arrays have been recognized by their
2829 use of an array as their storage 'vector'. When all generalized
2830 vectors are allowed as storage, including one-dimensional arrays,
2831 this will no longer work.)
d550e35f
MV
2832
2833 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2834 New.
2835 (exactly_one_third, singp): Removed.
2836 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2837 scm_shared_array_offset, scm_shared_array_increments): Handle
2838 enclosed arrays explicitely.
2839 (scm_array_rank): Likewise. Also, do not return zero for
2840 non-arrays, signal an error instead since arrays with rank zero do
2841 exist.
2842 (scm_i_make_ra): New, for specifying the tag of the new array.
2843 (scm_make_enclosed_array): Use it.
2844 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2845 (scm_make_shared_array): Use scm_c_generalized_vector_length
2846 instead of scm_uniform_vector_length.
2847 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2848 (scm_i_cvref): New, doing the job of scm_cvref.
2849 (scm_cvref): Use scm_i_cvref.
2850 (scm_array_ref): Do not accept non-arrays when no indices are
2851 given. Use scm_i_cvref to do the actual access.
2852 ("uniform-array-set1"): Do not register.
2853 (scm_array_set_x, scm_uniform_array_read_x,
2854 scm_uniform_array_write): Handle enclosed arrays explicitly.
2855 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2856 handle enclosed arrays.
2857 (scm_array_to_list): Handle enclosed arrays explicitly.
2858 (rapr1): Removed.
2859 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2860 enclosed arrays.
2861 (scm_i_print_enclosed_array): New.
2862 (tag_proto_table, tag_creator_table): Renamed former to latter.
2863 Added "a" and "b" for strings and bitvectors, resp.
2864 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2865 latter. Tag "a" is in the table now, no need to handle it as a
2866 legacy tag.
2867 (scm_raprin1): Just call scm_iprin1.
2868 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2869 explicitly.
2870 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2871 Use scm_i_print_array as printer for scm_tc16_array.
2872
2ed34885
MV
28732004-11-10 Marius Vollmer <mvo@zagadka.de>
2874
823086c1
MV
2875 * ramap.c (cind): Changed second arg to be pointer to long instead
2876 of uniform vector.
2877 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 2878 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
2879 (scm_array_index_map_x): Likewise.
2880
2881 * unif.c: Changed all uses of scm_array_prototype to
2882 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2883 prototype is known.
2884 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2885 in terms of scm_uniform_vector_read_x and
2886 scm_uniform_vector_write, respectively. Strings and
2887 bitvector support has been dropped.
2888
2ed34885
MV
2889 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2890 needed files directly. Include config.h, <unistd.h> and <io.h>
2891 when available.
2892 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2893
2c72f253
MV
28942004-11-09 Marius Vollmer <mvo@zagadka.de>
2895
2896 * gh_data.c (gh_uniform_vector_length): Properly use
2897 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2898
3cc0a296
MV
28992004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2900
2901 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2902 New.
2903 (scm_i_uniform_vector_creator): Removed.
2904 (scm_i_generalized_vector_creator): New.
2905 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2906 handle generalized vectors, only uniform numeric vectors.
2907 (alloc_uvec): Do length check here...
2908 (make_uvec): ...but not here.
2909 (coerce_to_uvec): Use new generalized vector functions to handle
2910 all kinds of vectors in one go.
2911
2912 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2913 remaining scm_tc7_unused tags to get a neatly ordered list.
2914
2915 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2916 longer handle scm_tc7_bvect bitvectors.
2917
2918 * ramap.c: Use the new generalized vector functions to handle all
2919 vector like things.
2920
2921 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2922 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2923 scm_generalized_vector_length, scm_generalized_vector_ref,
2924 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2925 scm_is_generalized_vector, scm_c_generalized_vector_length,
2926 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2927 New.
2928
2929 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2930 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2931 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2932 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2933 scm_c_bitvector_length, scm_c_bitvector_ref,
2934 scm_c_bitvector_set_x, scm_bitvector_elements,
2935 scm_bitvector_release, scm_frame_bitvector_release,
2936 scm_tc16_bitvector, bitvector_free, bitvector_print,
2937 bitvector_equalp, count_ones, find_first_one): New.
2938 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2939 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2940 using the new C API for bitvectors and maybe count_ones or
2941 find_first_one, as appropriate.
2942 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2943 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2944 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2945 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2946 new functions from above.
2947 (scm_i_proc_make_vector, scm_i_proc_make_string,
2948 scm_i_proc_make_bitvector): Made non-static for use in
2949 scm_i_generalized_vector_creator.
2950 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2951 (scm_make_uve): Validate that the created object is a generalized
2952 vector.
2953 (scm_i_legacy_tag): Removed.
2954 (scm_i_print_array): Do it here.
2955 (scm_raprin1): Only print enclosed arrays.
2956
2957 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2958
c24d026b
MV
29592004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2960
1f2328fe
MV
2961 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2962 added portability.
2963
2964 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2965 for "space". Thanks to Bruce Korb!
2966
c24d026b
MV
2967 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2968 only after dest has been set. Thanks to Hyper Division!
2969
2970 * gh_data.c (gh_uniform_vector_length): Use
2971 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2972
d4ea47c8
MV
29732004-11-03 Marius Vollmer <mvo@zagadka.de>
2974
2975 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2976 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2977 SCM_SET_UVECTOR_LENGTH): Removed.
2978
236288e2
MV
29792004-11-02 Marius Vollmer <mvo@zagadka.de>
2980
9a5fa6e9 2981 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
2982 Thanks!
2983
2984 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2985 first and the second line of the SCM_DEFINE macro call, since old
2986 preprocessors cannot handle definitions that are split into two
2987 lines.
2988
2989 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2990 declarations.
2991
2992 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2993 scm_t_uint32 to fix the mismatch between the function declaration
2994 and definition.
2995
2996 * sort.c (quicksort): Don't use C99 variable declarations.
2997
2998 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2999 SCM_BOOL_F if no type matches.
3000
3001 * threads.c (thread_print): Cast a pointer to size_t when printing
3002 with scm_uintprint.
3003
3004 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
3005 defined.
3006 (scm_array_prototype): Deprecated.
3007
f738b51d
MV
30082004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3009
5d1015ec
MV
3010 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
3011 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
3012 more efficient access to the u32vector.
3013
034486df
MV
3014 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
3015 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
3016 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
3017
3018 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
3019 instead of the old-style dvectors.
3020
3021 * gh_data.c: Use new-style uniform arrays in place of old-style
3022 ones.
3023
3024 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3025 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3026
3027 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3028 instead of old-sytle uvectors.
3029
3030 * convert.c, convert.i.c: Rewritten completely, using
3031 scm_any_to_u8vector, etc and other new-style uniform vector
3032 functions.
3033
3034 * random.c (scm_random_solid_sphere_x,
3035 scm_random_hollow_sphere_x): Do not validate vector argument, this
3036 is already done elsewhere.
3037
3038 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3039 scm_any_to_u8vector, etc): New.
3040 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3041 longer handle old-style uniform vectors.
3042
f738b51d
MV
3043 * read.c (scm_lreadr): Bugfix: include the last bit in the
3044 bit vector.
3045
5e9c05a1
MV
30462004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3047
327114a2
MV
3048 * unif.h, unif.c (scm_array_creator): New.
3049 (scm_i_get_old_prototype): New.
3050 (scm_array_prototype): use it to return old-style prototype, never
3051 return creators.
3052 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3053 arg of SCM_UNDEFINED. The latter is wrong.
3054
5e9c05a1
MV
3055 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3056 (make_uve): Removed.
3057 (scm_i_proc_make_vector, scm_i_proc_make_string,
3058 scm_i_proc_make_u1vector): New.
3059 (scm_init_unif): Initialize them.
3060 (scm_i_convert_old_prototype): New.
3061 (scm_make_uve): Use it to get the creator procedure. Removed all
3062 old code that created old-style uniform vectors.
3063 (scm_array_p): Handle generic vectors.
3064 (scm_dimensions_to_uniform_array): Do not fill new array with
3065 prototype when that is a procedure.
3066 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3067 the NDIM argument.
3068 (scm_i_print_array): Print rank for shared or non-zero-origin
3069 vectors.
3070 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3071 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3072 which I do not understand yet.
3073 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3074
5e9c05a1
MV
3075 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3076 (iflo2str): Use icmplx2str for complex numbers.
3077
3078 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3079 scm_i_uniform_vector_prototype): Removed.
3080 (scm_i_uniform_vector_creator): New.
3081 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3082 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3083 Updated all tables and generic functions to support them.
3084 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3085 (scm_init_srfi_4): Initialize them.
3086
3087 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3088 sizeof(CTYPE) as explained in the comment.
3089
3090 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3091 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3092 'i' and 'e' between introducing numbers and uniform vectors. Do
3093 not call scm_i_read_homogenous_vector, since that is also handled
3094 by scm_i_read_array now.
3095
f984af07
MV
30962004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3097
3098 First cut at integrating uniform vectors from srfi-4 with the rest
3099 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3100 vector. The plan is to gradually replace one type after the other
3101 until none is left and then to consider general cleanups and
3102 optimizations.
3103
3104 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3105
3106 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3107 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3108 scm_uniform_vector_to_list, scm_is_uniform_vector,
3109 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3110 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3111 scm_uniform_vector_release): New.
3112 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3113 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3114 from unif.h, unif.c and extended to handle both the old and new
3115 uniform vectors.
3116
3117 * tags.h (scm_tc7_byvect): Commented out.
3118
3119 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3120 the former to the latter.
3121 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3122 srfi-4.h, srfi-4.c.
3123 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3124 (scm_array_p, scm_array_rank, scm_array_dimensions,
3125 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3126 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3127 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3128 vectors. Removed code for scm_tc7_byvect.
3129 (scm_dimensions_to_uniform_array): Fill array with 0 when
3130 prototype is #\nul.
3131 (scm_i_print_array_dimension, scm_i_legacy_tag,
3132 scm_i_print_array): New.
3133 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3134 for scm_tc7_byvect.
3135
3136 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3137 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3138 uniform vectors. Removed code for scm_tc7_byvect
3139
3140 * print.c (iprin1): Removed code for scm_tc7_byvect.
3141 * objects.c (scm_class_of): Likewise.
3142 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3143 * gc-card.c (scm_i_sweep_card): Likewise.
3144 * evalext.c (scm_self_evaluating_p): Likewise.
3145 * eq.c (scm_equal_p): Likewise.
3146
3147 * gh_data.c (gh_chars2byvect): Reimplemented with
3148 scm_make_s8vector.
3149 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3150
3151 * srfi-4.c (take_uvec): New.
3152 (alloc_uvec): Use it.
3153 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3154
3155 * random.c (vector_scale, vector_scale_x): Renamed former to the
3156 latter, since it modifies its argument.
3157 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3158 Do not use scm_universal_vector_length for non-uniform vectors.
3159 Use scm_f64vector_elements to access innards of uniform vectors.
3160
3161 * convert.i.c: Convert srfi-4 style uniform vectors when
3162 requested.
3163 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3164 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3165
79d52182
MV
31662004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3167
3168 * numbers.h, numbers.c (scm_i_print_double): New.
3169
3170 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3171 ../srfi/ but heavily modified.
3172 * Makefile.am: Add them in all the right places.
3173 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3174 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3175 '#u', and '#s'.
3176
3177 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3178 and made non-static. Changed all uses.
3179
6191ccec
MV
31802004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3181
e64e80b0
MV
3182 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3183 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3184 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3185 scm_uintprint to print unsigned integers, raw heap words, and
3186 adresses, using a cast to scm_t_bits to turn pointers into
3187 integers.
3188
3189 * unif.c: Include "libguile/print.h".
3190
c90ac3a8
MV
3191 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3192 scm_t_intmax values.
3193 (scm_uint2str): New, for scm_t_uintmax.
3194 (scm_iint2str): Argument type changed to scm_t_intmax,
3195 reimplemented in terms of scm_uint2str.
3196
3197 * print.c, print.h (scm_uintprint): New, for printing
3198 scm_t_uintmax values.
3199 (scm_intprint): Argument type changed to scm_t_intmax.
3200
77c2594f
MV
3201 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3202 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3203 strategic places so that the loops can be interrupted.
3204
6191ccec
MV
3205 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3206 "-I$(top_srcdir)/libguile-ltdl".
3207 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3208 "../libguile-ltdl/libguile-ltdl.a".
3209
3210 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3211 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3212 instead of <libguile-ltdl.h>.
3213
77600f3e
MV
32142004-10-20 Marius Vollmer <mvo@zagadka.de>
3215
3216 * sort.c (quicksort): Copy pivot out of the array while
3217 constructing the partitions; it could get overwritten otherwise.
3218 Because of the ultimate insertion sort, this bug did not cause
3219 quicksort to fail, it just put all the burdon on the insertion
3220 sort and was thus very slow. Thanks to Rolan Orre for reporting
3221 the slowness!
3222
5000379b
MV
32232004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3224
192cd792
MV
3225 * numbers.c (scm_i_range_error): New.
3226 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3227 scm_out_of_range.
3228
3229 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3230 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3231
3232 * unif.c (scm_array_p): When no prototype is given, explicitely
3233 test for allowable types, do not simply return true. Thanks to
3234 Roland Orre for reporting this!
3235
5000379b
MV
3236 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3237
3238 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3239 segment to scm_max_segment_size.
3240
497eb0b7
HWN
32412004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3242
1367aa5e
HWN
3243 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3244
497eb0b7
HWN
3245 * inline.h (scm_double_cell): abort if GC running.
3246 (scm_cell): idem.
3247
aef0bdb4
MV
32482004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3249
3250 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3251 pos == 0.
3252
3253 Keywords no longer store a 'dash symbol'. Instead, they store a
3254 symbol with their real name.
3255
3256 * keywords.h, keywords.c, deprecated.h, deprecated.c
3257 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3258 terms of scm_is_keyword and scm_keyword_dash_symbol.
3259
3260 * keywords.h, keywords.c, discouraged.h, discouraged.c
3261 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3262 scm_c_make_keyword): Discouraged.
3263
3264 * keywords.h, keywords.c (scm_symbol_to_keyword,
3265 scm_keyword_to_symbol): Implemented in C.
3266 (scm_is_keyword, scm_from_locale_keyword,
3267 scm_from_locale_keywordn): New.
3268
3269 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3270
3271 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3272 scm_from_locale_keyword instead of scm_c_make_keyword.
3273
3274 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3275 better error message.
3276
3277 * deprecated.c: Include discouraged.h and keywords.h.
3278
3279 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3280 reading '#:' or ':'. See NEWS for consequences.
3281
818deb11
MV
32822004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3283
43c25626
MV
3284 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3285 literals are now read-write again (until SCM_STRING_CHARS is
3286 removed).
3287
3288 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3289 strings with an error message that blames SCM_STRING_CHARS.
3290
3291 * options.c (change_option_setting): Use scm_car instead of
3292 explicit type check plus SCM_CAR.
3293
3294 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3295 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3296 (scm_iprin1): Use them instead of the previoulsy hardcoded
3297 strings.
3298 (scm_init_print): Initialize them.
3299
3300 * backtrace.c (display_frame_expr): Do not remove control
3301 characters from the final string. Print it directly using
3302 scm_display.
3303
818deb11
MV
3304 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3305 Thanks to Roland Orre!
3306
d748089e
KR
33072004-09-29 Kevin Ryde <user42@zip.com.au>
3308
3309 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3310 be whole original string in match struct, not offsetted substring.
3311
0ff7e3ff
HWN
33122004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3313
3314 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3315
ad7de4b8
MV
33162004-09-24 Marius Vollmer <mvo@zagadka.de>
3317
2edf319f
MV
3318 * Makefile.am (EXTRA_DIST): Added gettext.h.
3319
d180337b
MV
3320 * smob.c, smob.h (scm_assert_smob_type): New.
3321
05d7cf89 3322 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3323 Include GUILE_CFLAGS.
3324 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3325 now.
3326 (libpath.h): Put GUILE_CFLAGS in the build-info.
3327
c9fedf8a
MV
33282004-09-23 Marius Vollmer <mvo@zagadka.de>
3329
3330 * print.h (scm_print_state): Added highlight_objects.
3331 * print.c (make_print_state, scm_free_print_state): Initialize it
3332 to SCM_EOL.
3333 (scm_iprin1): Wrap output in '{...}' when object is contained in
3334 highlight_objects.
3335
3336 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3337 scm_backtrace_with_highlights): New. Set highlight_objects of
3338 printstate.
3339
3340 * error.c (scm_error_scm): Document new meaning of data/rest
3341 argument for out-of-range and wrong-type-arg errors.
3342 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3343 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3344 exception so that it gets highlighted in the backtrace.
3345 Don't talk about "argument" when not giving a position.
3346
3347 * throw.c (handler_message): The rest argument is the fourth
3348 argument, not everything after the third. Call
3349 scm_display_backtrace_with_highlights, passing the rest argument
3350 when appropriate.
3351
d5ac9b2a
MV
33522004-09-22 Marius Vollmer <mvo@zagadka.de>
3353
3354 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3355 <bruno@clisp.org>:
3356
3357 * i18n.c: Handle --disable-nls (thanks Bruno).
3358
3359 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3360 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3361
3362 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3363 LC categories.
05d7cf89 3364 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3365
3366 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3367 scm_bind_textdomain_codeset): Make wrappers similar to C function
3368 they wrap.
3369
3370 * i18n.h: New file.
3371 * i18n.c: New file.
3372 * gettext.h: New file, taken from GNU gettext.
3373 * init.c: Include libguile/i18n.h.
3374 (scm_init_guile_1): Add call to scm_init_i18n().
3375 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3376 (DOT_X_FILES): Add i18n.x.
3377 (DOT_DOC_FILES): Add i18n.doc.
3378 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3379 (modinclude_HEADERS): Add i18n.h.
3380
d2e53ed6
MV
33812004-09-22 Marius Vollmer <mvo@zagadka.de>
3382
2cdfe016
MV
3383 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3384
d2e53ed6
MV
3385 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3386 discouraged.h. Replaced all uses with scm_is_pair.
3387 (SCM_I_CONSP): New name for SCM_CONSP.
3388
3389 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3390 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3391 scm_cadr, etc): New.
3392 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3393 uses with scm_is_null.
5dd82006 3394
d2e53ed6
MV
3395 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3396 instead of explicit code.
5dd82006 3397
5dfdf243
MV
33982004-09-22 Marius Vollmer <mvo@zagadka.de>
3399
b50c53e5
MV
3400 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3401 Reworded logic a bit so that #f is returned immediately when s1 is
3402 too short to contain s2.
3403
5dfdf243 3404 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3405 zero-terminated locale string before matching against it.
5dfdf243
MV
3406
3407 * strings.h, strings.c (scm_substring_read_only,
3408 scm_c_substring_read_only, scm_i_substring_read_only): New.
3409 (RO_STRING_TAG, IS_RO_STRING): New.
3410 (scm_i_string_writable_chars): Bail on read-only strings.
3411
3412 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3413 literals, thus making them read-only as specified by R5RS.
3414
22ab5ba3
MV
34152004-09-22 Marius Vollmer <mvo@zagadka.de>
3416
3417 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3418 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3419
2663421c
MV
34202004-09-21 Marius Vollmer <mvo@zagadka.de>
3421
0d83cb90
MV
3422 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3423 numbers.c.
3424 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3425 Thanks to Andreas Vögele!
0d83cb90 3426
2663421c
MV
3427 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3428 just on a line of its own.
3429
3430 * srfi-13.c (scm_string_any, scm_string_every,
3431 scm_string_tabulate, string_upcase_x, string_down_case_x,
3432 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3433 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3434 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3435 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3436 indices, which can also be negative.
3437
b00b73f9
MV
34382004-09-20 Marius Vollmer <mvo@zagadka.de>
3439
3440 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3441
3442 * threads.c (scm_threads_mark_stacks): Call
3443 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3444 only used once.
3445
adba74f3
HWN
34462004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3447
05d7cf89 3448 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3449 Bugfix: when subtracting unsigned values, make sure that result
3450 does not wrap.
3451
f6de32c8
KR
34522004-09-09 Kevin Ryde <user42@zip.com.au>
3453
3454 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3455 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3456 by Andreas Vögele.
f6de32c8 3457
e548be5f
MV
34582004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3459
eb8d0af1
MV
3460 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3461
e548be5f
MV
3462 * eq.c (real_eqv): Pretend that all NaNs are equal.
3463
3464 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3465
e7acba81
MV
34662004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3467
874fbad1
MV
3468 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3469 use size_t for some locals instead of int.
3470
e7acba81
MV
3471 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3472 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3473 (skip_scsh_block_comment): Use scm_input_error instead of
3474 scm_misc_error in case of EOF.
3475
5de12658
KR
34762004-09-07 Kevin Ryde <user42@zip.com.au>
3477
3478 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3479 Bug report by Bill Schottstaedt.
3480
3481 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3482 column.
3483 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3484
3485 * posix.c (scm_access): Update docstring per manual.
3486
3487 * posix.c (scm_nice): Correction to error detection. Reported by
3488 Matthias Koeppe.
3489
3490 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3491 throw error before unlocking mutex with SCM_ALLOW_INTS.
3492
e227addf
KR
34932004-09-06 Kevin Ryde <user42@zip.com.au>
3494
3495 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3496 available. This also gets around CLK_TCK being absent when
3497 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3498
edea856c
SJ
34992004-09-03 Stefan Jahn <stefan@lkcc.org>
3500
3501 * threads.c (scm_threads_mark_stacks): Fixed local variable
3502 definitions.
3503
e7acba81 3504 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3505 local variable definitions.
3506
3507 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3508 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3509 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3510 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3511 scm_makfrom0str().
3512
874fbad1 3513 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3514 part.
3515
3516 * numbers.c (scm_init_numbers): Removed check_sanity() call
3517 inside GUILE_DEBUG. The function has been removed somewhen...
3518
3519 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3520 MinGW32 because it conflicts with its pthread headers.
3521
d9eb2d67
MV
35222004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3523
3524 * strings.c (SCM_STRINGP): Accept all strings.
3525 (SCM_STRING_CHARS): Reject shared substrings here.
3526
3527 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3528 the Copyright years.
3529
c495c342
KR
35302004-08-27 Kevin Ryde <user42@zip.com.au>
3531
3532 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3533 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3534 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3535
57aa5515
MV
35362004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3537
3538 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3539 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3540 scm_i_symbol_is_interned, scm_i_mem2symbol,
3541 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3542
ce25760f
MV
35432004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3544
19ff6ffc
MV
3545 * srfi-13.c: First cut at thread-safeness and proper use of
3546 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3547 been inserted. Made sure that no internal string pointer is used
3548 across a SCM_TICK or a possible GC.
3549
ce25760f
MV
3550 * script.c (scm_compile_shell_switches): Use
3551 scm_from_locale_string instead of scm_makfrom0str.
3552
3553 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3554 always been.
3555
c5080b51
MV
35562004-08-25 Marius Vollmer <mvo@zagadka.de>
3557
3558 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3559 strop.c.
3560
3561 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3562 * strop.h, strop.c: Removed, they are now empty.
3563 * Makefile.am: Updated for new and removed files.
3564
3565 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3566 to scm_string_to_symbol.
3567
3568 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3569 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3570 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3571 charset instead of libc functions.
3572
3573 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3574 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3575 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3576 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3577 instead of explicit code.
3578
3579 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3580 "srfi-13.h" instead of "strop.h".
3581
3582 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3583 scm_init_srfi_14. Do not call scm_init_strop.
3584
4b0d27f2
MV
35852004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3586
3587 * numbers.c (scm_inf_p): Synced docstring back from manual.
3588
3ece39d6
MV
35892004-08-22 Marius Vollmer <mvo@zagadka.de>
3590
3591 * strings.c (get_str_buf_start): New helper function.
3592 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3593 scm_i_string_char, scm_i_string_writable_chars): Use it.
3594 (scm_i_substring_copy): Make START argument optional for C
3595 callers, for upcoming SRFI-13 integration.
3596
35972004-08-21 Marius Vollmer <mvo@zagadka.de>
3598
3599 From Richard Todd, Thanks!
3600
3601 * script.c (scm_compile_shell_switches): added '-L' switch to add
3602 to the %load-path.
3603
5fa0939c
DH
36042004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3605
3606 * eval.c (unmemoize_exprs): When dropping internal body markers
3607 from the output during unmemoization, also drop those that are not
3608 immediately at the beginning of a body.
3609
2146fdeb
MV
36102004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3611
c1f54b3d
MV
3612 * eval.c (scm_lookupcar1): Report "Variable used before given a
3613 value" insetad of an "Unbound" one for variables that are found
3614 but still contain SCM_UNDEFINED.
2146fdeb
MV
3615
3616 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3617 expects a null-terminated string in the locale encoding, but
3618 scm_i_string_writable_chars doesn't give that. Fixed by letting
3619 mkstemp modify a locale version of the tmpl argument and copying
3620 the result back into tmpl.
3621
3622 * strop.c (scm_substring_move_x): Store into str2, not str1.
3623
d4f76919
KR
36242004-08-20 Kevin Ryde <user42@zip.com.au>
3625
3626 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3627 to modify the input string.
3628
b5247a6b
MV
36292004-08-19 Marius Vollmer <mvo@zagadka.de>
3630
3631 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3632 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3633 scm_c_symbol_length.
3634
f26b9395
MV
36352004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3636
3637 New string implementation, with copy-on-write strings and
3638 mutation-sharing substrings, and a new internal string API.
3639 Symbols can now share memory with strings.
3640
3641 * tags.h (scm_tc7_stringbuf): New tag.
3642
3643 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3644 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3645 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3646 uses.
3647 (scm_i_make_string, scm_c_make_string): New, to replace
3648 scm_allocate_string. Updated all uses.
3649 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3650 SCM_STRING_LENGTH): Deprecated.
3651 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3652 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3653 Discouraged. Replaced all uses with scm_from_locale_string or
3654 similar, as appropriate.
3655 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3656 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3657 scm_substring_shared, scm_substring_copy): New.
3658
3659 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3660 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3661 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3662 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3663 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3664 Deprecated.
3665 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3666 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3667 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3668 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3669 Updated all uses.
3670 (scm_gensym): Generate only the number suffix in the buffer, just
3671 string-append the prefix.
3672
3673 * error.c (scm_memory_error): Do not try to throw, just abort.
3674 Throwing will not work anyway.
3675
3676 * gh.h, gh-data.c (gh_set_substr): Made src const.
3677
3678 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3679 (scm_mode_bits): Use it.
3680 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3681 a vector normally and fill that instead of consing a list with a
3682 blocked GC.
3683
3684 * read.c (scm_i_casei_streq): New, for counted strings.
3685
3686 * threads.c (gc_section_count): Removed, thread-sleeping can not
3687 be nested.
3688 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3689 admin mutex so that we can be put to sleep by other threads while
3690 blocking on that mutex. Lock all the heap mutex of all threads,
3691 including ourselves.
3692 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3693 call scm_i_enter_guile.
3694 (scm_thread_mark_stacks): Expect all threads to be suspended.
3695
3696 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3697 scm_gc_mallocated, for now.
3698 (scm_init_storage): Initialize it.
3699 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3700
3701 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3702 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3703 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3704 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3705
cd505b38
MV
3706 * strop.c (scm_string_copy): Use scm_c_substring to get a
3707 copy-on-write string.
3708
8a807b26
KR
37092004-08-18 Kevin Ryde <user42@zip.com.au>
3710
3711 * arbiters.c (FETCH_STORE): New macro.
3712 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3713 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3714 scm_try_arbiter and scm_release_arbiter.
3715 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3716 for speed on i386, otherwise using mutex.
3717
3718 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3719 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3720 exact and inexact is #f.)
3721
3722 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3723 to get thread safety of scm_ttyname.
3724
3725 * ports.c (ttyname): Remove prototype, unused.
3726
d6cd4c36 3727 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3728 Reported by Michael Tuexen.
d6cd4c36 3729
fa0c0a4b
MV
37302004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3731
3732 * load.c (scm_init_load_path): Do not pass NULL to
3733 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3734 not set. Thanks to Bill Schottstaedt.
3735
70f7ee41
MV
37362004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3737
3738 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3739 locale strings instead of accessing their internals.
3740 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3741 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3742 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3743
3744 * simpos.c (scm_system): Convert SCM strings to locale strings
3745 instead of accessing their internals.
3746
3747 * script.c (scm_compile_shell_switches): Convert version to locale
3748 string before printing it.
3749
3750 * rdelim.c (scm_read_delimited_x): Avoid
3751 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3752 of scm_from_long for the returned number of read characters.
3753
3754 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3755 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3756
3757 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3758 Use them instead of SCM_SYSCALL when one or two strings need to be
3759 converted into locale strings.
3760 (my_rename): New, gathers platform dependent code for renaming.
3761 (scm_rename): Use it.
3762 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3763 strings instead of accessing their internals.
3764 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3765 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3766 SCM_STRING_LENGTH.
3767
3768 * extensions.c (load_extension): Convert lib and init to locale
3769 strings instead of accessing the internals directly.
3770 (scm_c_load_extension): Use scm_from_locale_string instead of
3771 scm_makfrom0str.
3772
3773 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3774 scm_fdes_to_port, but take mode bits directly instead of as a C
3775 string.
3776 (scm_i_fdes_to_port): Implement using above.
3777 (scm_open_file): Use scm_i_fdes_to_port together with
3778 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3779 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3780 with scm_i_mode_bits to avoid accessing internals of SCM string
3781 from C.
3782
3783 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3784 SCM string as argument.
3785
3786 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3787 bits directly instead of C string.
3788 (scm_void_port): Implement using above.
3789 (scm_sys_make_void_port): Use scm_i_void_port together with
3790 scm_i_mode_bits to avoid accessing internals of SCM string.
3791
3792 * strings.h, strings.c (scm_i_get_substring_spec): New.
3793
3794 * socket.c, rw.c, deprecated.h, validate.h
3795 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3796 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3797 scm_to_locale_string, etc.
3798 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3799 above, plus scm_i_get_substring_spec.
3800
3801 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3802 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3803 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3804 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3805 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3806 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3807 with more explicit scm_remember_upto_here_1, etc, or introduced
3808 them in the first place.
3809
3810 * posix.c (WITH_STRING): New helper macro. Use it where one
3811 locale string is needed for a short piece of code.
3812 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3813 when one locale string is needed.
3814 (scm_mkstemp): Convert tmpl to a locale string.
3815 (scm_putenv): Rewritten to use only C strings.
3816 (scm_setlocale, scm_crpt): Convert argument strings to locale
3817 strings.
3818
38192004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3820
3821 * load.c (scm_primitive_load_path): Do not check for absolute
3822 filenames when scm_sys_search_load_path returns false, which will
3823 return absolute filenames unchanged.
3824
bb26cc2d
MV
38252004-08-11 Marius Vollmer <mvo@zagadka.de>
3826
3827 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3828 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3829 of an alist. Thanks to Matthias Koeppe!
3830
02573e4c
MV
38312004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3832
3833 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3834 Moved from string.h to deprecated.h.
3835
3836 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3837
f9751e86 3838 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
3839 SCM_I_MAKE_STRING_TAG, changed all uses.
3840 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3841 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3842 respectively. For a short time, the old names are still there as
3843 aliases. Not all uses have been changed yet, but the ones in
3844 strings.c have.
3845 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3846 SCM_T_BITS_MAX.
3847 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3848 scm_take_locale_string, scm_take_locale_stringn,
3849 scm_to_locale_string, scm_to_locale_stringn,
3850 scm_to_locale_stringbuf): New.
3851 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3852 deprecated.[hc]. Implemented in terms of the new functions above.
3853 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3854 scm_makfrom0str): Reimplemented in terms of the new functions from
3855 above. They will be discouraged shortly.
3856 (scm_substring): Do not use scm_mem2string.
3857 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3858 to replace similar code from posix.c, simpos.c, and dynl.c.
3859 (scm_string_append): Use memcpy instead of explicit loop. Do not
3860 use register keyword. Use plain 'char' instead of 'unsigned
3861 char'.
3862
3863 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3864 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3865
3866 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3867 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3868 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3869 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3870
3871 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3872 string. This avoids a conversion round-trip.
3873
3874 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3875 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3876 SCM_I_STRING_LENGTH, respectively.
3877 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3878
3879 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3880 of a string, call scm_display on the string itself.
3881
3882 * dynwind.c, dynwind.h (scm_frame_free): New.
3883
3884 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3885 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3886 Replaced uses of SCM_STRING_CHARS with proper uses of
3887 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3888 Replaced scm_mem2string with scm_from_locale_string.
3889
3890 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3891 Removed, replaced all uses with scm_i_allocate_string_pointers.
3892
3893 * load.h, load.c (scm_internal_parse_path): Removed.
3894 (scm_parse_path): Use scm_string_split to do the work.
3895 (scm_init_load_path): Use scm_parse_path instead of
3896 scm_internal_parse_path.
3897 (scm_search_path): Rewritten string handling part of the code in
3898 terms of scm_to_locale_stringbuf and so that it is thread safe.
3899
3900 * error.c (scm_error_scm): Throw directly instead of calling
3901 scm_error, this avoids the back and forth conversion of SUBR and
3902 MESSAGE and also plugs a memory leak.
3903 (scm_error): Call scm_error_scm.
3904
3905 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3906 (display_header): Print FNAME when it is true, not
3907 merely when it is a string.
3908
3909 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3910 unceremoniously. They were unused by Guile itself, and external
3911 use should stop immediately.
3912
3913
409eb4e5
MV
39142004-08-10 Marius Vollmer <mvo@zagadka.de>
3915
3916 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3917 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3918 deprecated versions installed in deprecated.h and deprecated.c.
3919 Changed all uses.
3920
a00eaf19
RB
39212004-08-06 Rob Browning <rlb@defaultvalue.org>
3922
3923 * net_db.c (scm_resolv_error): don't cause an exception while
3924 trying to throw an exception -- call scm_misc_error with correct
3925 arguments. The previous arguments needed a format escape that
3926 wasn't in any of the format strings.
3927
bcb88c93
KR
39282004-08-06 Kevin Ryde <user42@zip.com.au>
3929
8f094b97
KR
3930 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3931 so as not to depend on signedness of plain char. For byvect range
3932 check, throw out-of-range rather than wrong-type-arg.
3933
bcb88c93
KR
3934 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3935 signed byte range checks by using scm_to_schar and scm_from_schar,
3936 don't want to depend on signedness of C char.
3937
29e61124
KR
39382004-08-05 Kevin Ryde <user42@zip.com.au>
3939
3940 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3941 SCM_DEFER_INTS.
3942 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3943 guaranteed if multiple threads compete to unlock.
3944 Update docstrings per doc/ref/api-scheduling.texi.
3945
99de794f
KR
3946 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3947 stat on the filename, to be certain a file rename can't mean we get
3948 info on one filesystem object but open another. This fstat usage is
3949 similar to Emacs copy-file.
3950
29e61124
KR
3951 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3952
3953 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3954 SIGINT and SIGQUIT, since those values are ints.
3955
759aa8f9
MV
39562004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3957
7241f213
MV
3958 * num2integral.i.c, num2float.i.c: Removed.
3959 * Makefile.am (noinst_HEADERS): Updated.
3960
f9656a9f
MV
3961 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3962 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
3963 (scm_complex_p): New, export as "complex?" to Scheme.
3964 (scm_number_p): Export as "number?" to Scheme.
3965 (scm_is_complex, scm_is_number): New.
3966 (scm_c_make_rectangular, scm_c_make_polar): New.
3967 (scm_make_rectangular, scm_make_polar): Use above.
3968 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3969 New.
3970 (scm_make_complex): Discouraged by moving to discouraged.h and
3971 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3972
759aa8f9
MV
3973 * discouraged.h, discouraged.c, numbers.c, numbers.h
3974 (scm_is_rational): New.
3975 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3976 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3977 Removed prototypes.
3978 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3979 Discouraged by moving to discouraged.h and discouraged.c.
3980 Replaced all uses with scm_from_double.
3981 (scm_num2float, scm_num2double): Discouraged by moving prototype
3982 to discouraged.h and rewriting in terms of scm_to_double.
3983 Replaced all uses with scm_to_double.
3984 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3985 explicit code.
3986 (scm_from_double): Do not implement in terms of scm_make_real, use
3987 explicit code.
3988
531bf3e6
MV
39892004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3990
759aa8f9
MV
3991 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3992
531bf3e6
MV
3993 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3994 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3995
3996 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3997 Renamed to SCM_I_* in order to avoid collisions with the versions
3998 defined in deprecated.h.
3999
4000 * discouraged.h, discouraged.c: New files.
4001
4002 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
4003 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
4004 deprecated to being discouraged by moving to discouraged.h.
4005
4006 * numbers.h, numbers.c, discouraged.h, discouraged.c
4007 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
4008 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
4009 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
4010 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
4011 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
4012 scm_num2ulong_long): Discouraged by moving to discouraged.h and
4013 discouraged.c and reimplementing in terms of scm_from_* and
4014 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
4015 functions.
4016
4017 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
4018 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
4019 scm_i_size2big, scm_i_ptrdiff2big): Removed.
4020 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
4021 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4022 explicit code.
4023
5ec82e96
KR
40242004-08-02 Kevin Ryde <user42@zip.com.au>
4025
4026 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4027 and current usage and migration.
4028
58f28989
KR
40292004-07-31 Kevin Ryde <user42@zip.com.au>
4030
4031 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4032 it's not thread safe.
4033 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4034 advantage of this.
4035 * fports.c (scm_open_file): Use scm_strerror likewise.
4036 * filesys.c (scm_stat, scm_lstat): Ditto.
4037
4038 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4039 cannot be opened.
4040
4041 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4042 update, for thread safety.
4043 (gensym_counter): Move into scm_gensym which is its only user.
4044 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4045
03696aab
MV
40462004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4047
51fdb325
MV
4048 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4049 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4050 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4051 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4052 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4053 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4054 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4055 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4056 defined in terms of scm_to_signed_integer, etc, but in terms of
4057 scm_to_int8, etc.
4058
4059 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4060
03696aab
MV
4061 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4062 no longer used.
4063
4064 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4065 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4066
4067 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4068 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4069 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4070 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4071 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4072 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4073 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4074
4075 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4076 the functions below.
4077
4078 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4079 conv-uinteger.i.c.
4080
4081 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4082 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4083 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4084 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4085 scm_from_uint64): Turned from macros into proper functions.
4086 (scm_to_signed_integer, scm_to_unsigned_integer,
4087 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4088 conv-integer.i.c and conv-uinteger.i.c, as well.
4089
4090 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4091 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4092 the limits. Those are always defined.
4093
1f15779e
KR
40942004-07-29 Kevin Ryde <user42@zip.com.au>
4095
4096 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4097
48360eb3
KR
40982004-07-28 Kevin Ryde <user42@zip.com.au>
4099
4100 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4101 safety.
4102
c3f3c841
KR
4103 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4104 consistency with other vector types and to get arg and func name into
4105 error message.
4106
c82f8ed6
MV
41072004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4108
4109 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4110 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4111 scm_from_bool, respectively.
4112 (SCM_NINUMP): Added.
4113
4114 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4115 deprecated.h. Replaced all uses with scm_is_eq.
4116
317b4c4a
KR
41172004-07-24 Kevin Ryde <user42@zip.com.au>
4118
4119 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4120 * posix.c (scm_crypt): Use it to protect static data in crypt().
4121
e11e83f3
MV
41222004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4123
4124 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4125 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4126 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4127 versions to deprecated.h and deprecated.c. Changed all uses to
4128 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4129 scm_from_*, as appropriate.
4130
4131 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4132 the unexisting scm_cross_dynwind_binding_scope for inums on the
4133 windlist.
4134
a55c2b68
MV
41352004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4136
4137 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4138 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4139 byte-wise address to a SCM integer. Changed all uses.
4140 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4141 scm_to_ipv6 and added type and range checking, for converting from
4142 an IPv& byte-wise address to a SCM integer. Changed all uses.
4143 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4144 is now done by scm_to_ipv6.
4145
4146 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4147 not accept inexact integers.
4148
4149 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4150 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4151 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4152 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4153 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4154 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4155 fixnum/bignum distinction visible. Changed all uses to
4156 scm_to_size_t or similar.
4157
41582004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4159
4160 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4161
48a06bd5
KR
41622004-07-10 Kevin Ryde <user42@zip.com.au>
4163
4164 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4165 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4166 such a size causes divide-by-zeros in scm_hasher.
4167
052fbfd9
KR
4168 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4169 leak.
4170
43240c9c
MV
41712004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4172
4173 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4174 Rewritten using the same logic as scm_to_signed_integer and
4175 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4176 use CHAR_BIT instead of hardcoding 8.
4177 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4178 SCM_I_LLONG_MIN etc. instead.
4179
4180 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4181 SCM_I_MAKINUM and changed all uses.
4182 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4183
a3de8e7b
MV
4184 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4185 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4186 them by assuming twos-complement.
4187
c9eb03bb
MV
41882004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4189
4190 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4191 configure now produces.
4192 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4193 definitions, giving the limits of the integer types defined by
4194 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4195 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4196
4197 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4198 SHORT_MIN.
4199 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4200 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4201 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4202 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4203 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4204 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4205 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4206 scm_from_uintmax): New.
4207
7888309b
MV
42082004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4209
4210 * tags.h (scm_is_eq): New.
4211
4212 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4213 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4214 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4215 scm_from_bool, and scm_is_bool, respectively.
4216
4217 * boolean.h (scm_is_bool): Fix bug in prototype.
4218 (scm_from_bool): The argument is "x" not "f", stupid.
4219
4220 * boolean.c (scm_is_bool): Fix typo.
4221
4222 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4223 scm_is_unsigned_integer, scm_to_signed_integer,
4224 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4225 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4226 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4227 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4228 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4229 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4230 New.
4231
800570a6
MV
42322004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4233
4234 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4235 scm_to_bool): New.
4236
9fcf3cbb
DH
42372004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4238
4239 * backtrace.c (display_expression, display_frame): Call
4240 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4241 single memoized expression.
4242
4243 * debug.c (memoized_print): Don't try to unmemoize the memoized
4244 object, since we can't know whether it holds a single expression
4245 or a body.
4246
4247 (scm_mem_to_proc): Removed check for lambda expression, since it
4248 was moot anyway. Whoever uses these functions for debugging
4249 purposes should know what they do: Creating invalid memoized code
4250 will cause crashes, independent of whether this check is present
4251 or not.
4252
4253 (scm_proc_to_mem): Take the closure's code as it is and don't
4254 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4255 memoized code should not be modified.
4256
4257 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4258 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4259 available as a guile internal function instead. However,
4260 scm_i_unmemoize_expr will only work on memoized objects that hold
4261 a single memoized expression. It won't work with bodies.
4262
4263 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4264 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4265 i. e. a list of expressions.
4266
4267 * eval.c (unmemoize_exprs): Drop internal body markers from the
4268 output during unmemoization.
4269
4270 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4271 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4272 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4273 as guile internal functions instead. scm_i_unmemoize_expr will
4274 only work on a single memoized expression, while
4275 scm_i_unmemocopy_body will only work on bodies.
4276
90df793f
DH
42772004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4278
4279 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4280
4281 (scm_cons_source, scm_primitive_eval): Prefer higher level
4282 predicate SCM_FALSEP over SCM_IMP.
4283
8048c00b
RB
42842004-06-15 Rob Browning <rlb@defaultvalue.org>
4285
4286 * script.c (scm_shell_usage): minor phrasing change.
4287
4288 * gc_os_dep.c: update ifdefery for macosx.
4289 (scm_get_stack_base): separate result initialization from
4290 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4291 3.3. Thanks to Andreas Vögele.
8048c00b 4292
d93294d4
HWN
42932004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4294
4295 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4296
212e58ed
DH
42972004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4298
4299 * list.[ch] (scm_i_finite_list_copy): New internal function to
4300 copy lists that are known to be finite (though not necessarily
4301 proper).
4302
4303 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4304 a closure's argument list like an expression of a body.
4305
4306 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4307 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4308 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4309 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4310 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4311 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4312 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4313 unmemoize_builtin_macro): New static functions and symbols.
4314
4315 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4316 now has a slightly different meaning: The memoized form that is
4317 receives as its argument is now interpreted as a sequence of
4318 expressions from a body.
4319
4320 (unmemocar, scm_unmemocar): Since the whole functionality of
4321 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4322 has its old content back and is deprecated, while unmemocar has
4323 been removed.
4324
4325 (SCM_BIT7): Removed.
4326
4327 (CEVAL): For unmemoizing a single expression, call
4328 unmemoize_expression instead of scm_unmemocopy, which now expects
4329 a sequence of body expressions. Eliminated unnecessary empty
4330 environment frame when executing let* forms. Eliminated
4331 unmemoization step from evaluator.
4332
9ccea370
MV
43332004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4334
4335 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4336 macroexp and made static. Added new version of scm_macroexp that
4337 emits a deprecation warning and then calls macroexp.
4338 (scm_m_undefine): Issue deprecation warning.
4339
57d23e25
DH
43402004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4341
4342 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4343 Modified to make set! work on symbols that represent syntactic
4344 keywords.
4345
141521ad
HWN
43462004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4347
4348 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4349 compound expression as lvalue errors.
4350
7c2f56a4
MV
43512004-05-24 Marius Vollmer <mvo@zagadka.de>
4352
4353 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4354 WINDER_DATA to a SCM.
4355
366ecaec
DH
43562004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4357
4358 * goops.c (compute_getters_n_setters, create_standard_classes,
4359 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4360 lambda expression rather than creating them with scm_closure.
4361
26ecfa39
DH
43622004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4363
4364 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4365 misplaced syntactic keywords. This will not work unless guile's
4366 defmacro feature is deprecated.
4367
4368 (scm_m_case): Fixed a bug that caused the list of labels to grow
4369 with every case form.
4370
f865229a
KR
43712004-05-19 Kevin Ryde <user42@zip.com.au>
4372
4373 * numbers.c (scm_round_number): For inum and big, just return x. For
4374 real, use scm_round for 2^54-1 etc problems covered there.
4375
4376 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4377 doesn't provide trunc. This was for when `truncate' was done as a
4378 scm_tc7_dsubr, no longer required.
4379
4380 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4381 to stack marking call, two parameters and no cast on t->base.
4382
63947c7a
MV
43832004-05-18 Marius Vollmer <mvo@zagadka.de>
4384
4385 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4386 processed hashtables back into the weak_hashtables list. Thanks
4387 to Bill Schottstaedt!
4388
e7313a9d
DH
43892004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4390
4391 * eval.c (unmemoize_quote): New static function.
4392
4393 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4394 representation of 'quote' and '@slot-ref' to an improper list.
4395 This reduces execution time, the number of cells used to hold the
4396 memoized code, and thus also reduces garbage collection time.
4397
4398 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4399
4400 (SCM_CEVAL): Changed macro handling to also work with macros that
4401 return improper lists. Added an assertion, that the code returned
4402 by a macro transformer will not lead to cycles in the memoized
4403 code.
4404
e5156567
DH
44052004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4406
4407 No functional change, just rearrangements of functions within the
4408 file.
4409
4410 * eval.c (scm_ilookup, scm_unbound_variable_key,
4411 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4412 the definitions used for execution, since that's where they will
4413 belong to later.
4414
651f07f8
DH
44152004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4416
4417 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4418 throughout guile, has not been part of an official release yet,
4419 and the concept of sloppy predicates has never been a good idea.
4420
4421 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4422 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4423 Simplified.
4424
770e048f
DH
44252004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4426
4427 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4428 to make explicit what happens.
4429
2ff08405
DH
44302004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4431
4432 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4433 explicit what happens.
4434
4435 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4436 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4437
89afb9cd
MV
44382004-05-11 Marius Vollmer <mvo@zagadka.de>
4439
4440 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4441 is indeed a procedure when it isn't a number.
4442
3d5ebfa9
MV
44432004-05-10 Marius Vollmer <mvo@zagadka.de>
4444
4445 Convert floating point numbers into strings with an arbitrary
4446 radix. Thanks to Richard Todd!
4447
4448 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4449 fit.
4450 (fx): Removed.
4451 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4452 number_chars): New, to support variable radices.
4453 (idbl2str): Use above instead of the old base-10 only tables.
4454 (iflo2str): Pass on new RADIX argument to idbl2str.
4455 (scm_number_to_string): Pass radix to iflo2str.
4456 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4457 iflo2str.
4458 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4459 possible radices.
4460
3ae69bb4
KR
44612004-05-10 Kevin Ryde <user42@zip.com.au>
4462
4463 * numbers.c (scm_logbit_p): Correction to test above the end of an
4464 inum. Reported by Jan Konecny.
4465
27968825
MV
44662004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4467
4468 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4469 scm_t_bits. Updated all users.
4470 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4471 duplicating the code.
4472 (SCM_CELL_OBJECT_LOC): New.
4473 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4474 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4475
4476 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4477 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4478 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4479 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4480 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4481 SCM_SMOB_OBJECT_3_LOC): New.
4482 * smob.c (scm_i_set_smob_flags): New function.
4483
4484 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4485 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4486 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4487 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4488 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4489 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4490
4491 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4492 taking the address of SCM_CELL_WORD_1, the latter being no longer
4493 an lvalue.
4494
4495 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4496 of casting SCM_CELL_WORD_LOC.
4497
3cf17ef0
KR
44982004-05-02 Kevin Ryde <user42@zip.com.au>
4499
37026925 4500 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4501 --disable-deprecated. Reported by Andreas Vögele.
37026925 4502
3cf17ef0 4503 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4504 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4505
c5854598
KR
4506 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4507 code has support for. Fixes building with AIX cc, which is ansi but
4508 doesn't define __STDC__. Reported by Keith Crane.
4509 (var_start): Remove macro, this variation no longer required.
4510 (scm_list_n): Use va_start directly.
4511
f26c1a32
KR
45122004-05-01 Kevin Ryde <user42@zip.com.au>
4513
4514 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4515 is now gone. Reported by Andreas Vögele.
f26c1a32 4516
dfa6017e
KR
45172004-04-28 Kevin Ryde <user42@zip.com.au>
4518
4519 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4520 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4521 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4522 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4523 Also cast through unsigned char to avoid passing negatives to those
4524 macros if input contains 8-bit values.
4525
4526 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4527 corrections to range check for signed numbers. Remove
4528 scm_remember_upto_here_1(num) from these checks, since num is used
4529 subsequently anyway.
4530
4531 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4532 avoid warning from gcc 3.4. Reported by Hyperdivision.
4533
4534 * numbers.c (scm_bit_extract): Use min instead of MIN.
4535 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4536 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4537
4538 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4539 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4540
a0d06a00 4541 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4542 Reported by Andreas Vögele.
a0d06a00 4543
dfa6017e
KR
4544 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4545 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4546 by Andreas Vögele.
dfa6017e 4547
36245b66
DH
45482004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4549
4550 * eval.c (s_macro_keyword): New static identifier.
4551
4552 (scm_m_define): Change order to first create binding and
4553 evaluating the expression afterwards.
4554
4555 (scm_m_set_x): Memoize complete set! expression. Only leave
4556 symbols if no binding exists at memoization time. Throw error if
4557 assigning to a syntactic keyword.
4558
4559 (lazy_memoize_variable): New function.
4560
4561 (CEVAL): When execution set!, perform lazy memoization if
4562 unmemoized symbol is detected.
4563
4564 * modules.c (module_variable): Return variables with unbound
4565 value.
4566
4567 * tags.h: Fix comment.
4568
4d81111e
KR
45692004-04-25 Kevin Ryde <user42@zip.com.au>
4570
da8bcb2f
KR
4571 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4572 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4573 in 8-bit locales, and ensures consistency with char-upper-case? and
4574 char-lower-case? which already use ctype.h.
4575 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4576 Remove.
4577 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4578
4d81111e
KR
4579 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4580 call. Reported by Hyperdivision.
4581
4582 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4583 Reported by Hyperdivision.
4584
4585 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4586 Hyperdivision.
4587
7e6e6b37
DH
45882004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4589
4590 Hide the implementation of ilocs and isyms in eval.c.
4591
4592 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4593 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4594 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4595 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4596 eval.h to eval.c.
4597
4598 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4599 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4600 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4601 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4602 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4603 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4604 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4605 renamed to ISYMNUM.
4606
4607 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4608 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4609 Extracted printing of ilocs and isyms to guile internal functions
4610 scm_i_print_iloc, scm_i_print_isym of eval.c.
4611
caab294f
KR
46122004-04-22 Kevin Ryde <user42@zip.com.au>
4613
7aaf4758
KR
4614 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4615
caab294f
KR
4616 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4617 rounding in x+0.5 when x is a big value already an integer. In
4618 certain hardware rounding cases x+0.5 can give an adjacent integer,
4619 leading to that as the result, when we really just wanted x itself.
4620
b1cb24ff
DH
46212004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4622
4623 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4624
4625 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4626 added const qualifiers, cast intentionally unused expressions to
4627 void for emphasis, improved comment.
4628
5065b40d
DH
46292004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4630
4631 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4632 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4633 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4634 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4635 Defined the tc8-tag for flags to be 0x04, which will mean that
4636 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4637 to the reduced number of bits and the simpler bit pattern for
4638 SCM_BOOL_F, certain machines may be able to use more efficient
4639 processor instructions to deal with SCM_BOOL_F.
4640
4641 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4642 never been defined in a released version, thus no need to
4643 deprecate them.
4644
4645 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4646 instead of tc9 tags.
4647
4648 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4649 of tc9 tags.
4650
4651 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4652 could have used this definition.
4653
4654 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4655 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4656 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4657 as isyms, as special isyms don't exist any more.
4658
9fa6c119
KR
46592004-04-18 Kevin Ryde <user42@zip.com.au>
4660
e08d2eee
KR
4661 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4662 safety.
4663
9fa6c119
KR
4664 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4665 explicit swapping code.
4666
c9cdd396
KR
46672004-04-15 Kevin Ryde <user42@zip.com.au>
4668
4669 * cpp_sig_symbols.in: Add SIGSYS.
4670
4671 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4672 recursion.
4673
4674 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4675 frac/big and frac/frac, use scm_less_p for exact comparison.
4676
83ac9c59
KR
4677 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4678 with big/inum.
4679
84a4be9a
KR
4680 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4681
84fad130
HWN
46822004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4683
6b69393d
HWN
4684 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4685
84fad130
HWN
4686 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4687 scm_c_{up,down}case.
4688 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4689 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4690
c3110a30
KR
46912004-04-06 Kevin Ryde <user42@zip.com.au>
4692
0b288f36
KR
4693 * numbers.c (scm_ash): Remove stray "}" in docstring.
4694
ea2508c8
KR
4695 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4696 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4697 calling mpz_cmp_ui in most cases.
4698
c3110a30
KR
4699 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4700 for big == abs(most-negative-fixnum) special case.
4701 (abs_most_negative_fixnum): Remove, no longer used.
4702
4703 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4704 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4705 calling (sigaction NSIG).
4706
4707 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4708 and fork error cases to do this.
4709
dec40cd2
DH
47102004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4711
4712 * eval.c (CEVAL): Don't distinguish between short and long
4713 instructions when dispatching - just always dispatch on the
4714 instruction code, which is common for short and long instructions.
4715 Further, removed unnecessary goto statements and added comment.
4716
0e7bb795
DH
47172004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4718
4719 * eval.c (scm_unmemocopy): Don't distinguish between short and
4720 long instructions when dispatching - just always dispatch on the
4721 instruction code, which is common for short and long instructions.
4722 Further, removed unnecessary goto statements, fixed indentation
4723 and replaced SCM_IMP predicates by SCM_NULLP.
4724
f9986767
DH
47252004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4726
4727 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4728 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4729 'checkmacro'.
4730
fbc42231
KR
47312004-03-31 Kevin Ryde <user42@zip.com.au>
4732
4733 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4734
434f2f7a
DH
47352004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4736
4737 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4738 SCM_DEBUGGINGP:
4739
4740 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4741 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4742 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4743 single interface that also matches the naming conventions.
4744 Probably scm_debug_mode_p should be part of the private interface
4745 anyway.
4746
4747 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4748 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4749 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4750 to scm_debug_mode_p.
4751
4752
4753 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4754
4755 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4756 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4757 from debug.h to eval.h.
4758
4759 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4760 more, just leave it with setting scm_debug_mode_p, which is
4761 equivalent for practical purposes.
4762
4763 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4764 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4765
4766 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4767
4768 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4769 static and renamed it to ceval throughout. Provide a new exported
4770 but deprecated function scm_ceval as a wrapper for backwards
4771 compatibility. The same is done for the deval/scm_deval pair of
4772 functions.
4773
4774 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4775 throughout. Defined CEVAL to ceval or deval, based on compilation
4776 phase.
4777
4778 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4779 to ceval and deval instead of calling *scm_ceval_ptr.
4780
4781 * eval.c (dispatching_eval): New deprecated static function.
4782
4783 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4784 to emulate its old behaviour as closely as possible.
4785
4786
4787 Change the evaluator such that only expressions for which pair? is
4788 true are passed to CEVAL, and such that all other expressions are
4789 evaluated outside of CEVAL:
4790
4791 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4792 expression that is assumed to be memoized already. All but
4793 expressions of the form '(<form> <form> ...)' are evaluated inline
4794 without calling an evaluator.
4795
4796 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4797 expressions of the form '(<form> <form> ...)' inline without
4798 calling an evaluator.
4799
4800 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4801 the special case of unmemoized symbols passed on the top level.
4802
4803 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4804 is known that the expression passed to CEVAL is of the form
4805 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4806 now it is known that the input expression of CEVAL is a pair.
4807
48082004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4809
4810 * eval.c (is_self_quoting_p): New static function.
4811
4812 (scm_m_quote): Use is_self_quoting_p.
4813
4814 (copy_tree): Corrected typo in comment.
4815
702551e6
HWN
48162004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4817
bfefbf18
HWN
4818 * eval.c (s_scm_copy_tree): idem.
4819
4820 * list.c (s_scm_filter): remove "pointer" from doc string.
4821
702551e6
HWN
4822 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4823
4824 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4825
4826 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4827 (display_frame): idem.
4828 (display_backtrace_file_and_line): idem.
4829
4830 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4831 arguments.
4832
3cd23214
KR
48332004-03-26 Kevin Ryde <user42@zip.com.au>
4834
88a7ae1f
KR
4835 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4836
3cd23214
KR
4837 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4838 big==0 since that never occurs.
4839
4840 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4841 scm_modular_expt, matching scheme level name `modulo-expt'.
4842
4843 * numbers.c (scm_modular_expt): Return a negative remainder for a
4844 negative divisor, the same as `modulo' does.
4845
48462004-03-26 Eric Hanchrow <offby1@blarg.net>
4847
4848 * numbers.c, numbers.h (scm_modular_expt): New function.
4849
2926035a
KR
48502004-03-25 Kevin Ryde <user42@zip.com.au>
4851
4852 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4853 return inexact as required by r5rs.
4854
62360b89
DH
48552004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4856
4857 * eval.c: Separated some definitions relevant for execution from
4858 the memoization part of the file.
4859
4860 (copy_tree): New static function
4861
4862 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4863 structures are detected now and will lead to an exception instead
4864 of forcing guile to run in an endless loop, using up all the
4865 system's memory. Second, arrays in the cdr of an improper list
4866 are now copied. See the new test cases in eval.test.
4867
48682004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
4869
4870 * posix.c (scm_gethostname): Make sure len is initialised before
4871 it is used. Restructured to (hopefully) represent possible
4872 configurations more clearly in the code. Added unwind handler.
4873
3bd3bae8
KR
48742004-03-23 Kevin Ryde <user42@zip.com.au>
4875
4876 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4877 MAXHOSTNAMELEN when available.
4878
254bf78d
MV
48792004-03-21 Marius Vollmer <mvo@zagadka.de>
4880
4881 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4882 terminator. Rewritten the logic as a state machine, I must have
4883 been doing too much VHDL lately...
4884
4885 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4886 themselves. Thanks to Han-Wen Nienhuys!
4887
4888 * list.c: Changed docstrings so that they no longer talk about
4889 returning 'pointers' to something.
4890
009c34a2
HWN
48912004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4892
4893 * gc.c: remove set_debug_cell_accesses! when
4894 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4895 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4896 debugging conditionally.
4897
54733c95
KR
48982004-03-21 Kevin Ryde <user42@zip.com.au>
4899
4900 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4901
bbaf8747
KR
49022004-03-20 Kevin Ryde <user42@zip.com.au>
4903
4904 * posix.c (scm_gethostname): Preserve errno across free() call.
4905
726f82e7
HWN
49062004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4907
4908 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4909 free cells.
4910
e1350d6a
KR
49112004-03-14 Kevin Ryde <user42@zip.com.au>
4912
4913 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4914 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4915
62055253
KR
49162004-03-07 Kevin Ryde <user42@zip.com.au>
4917
4918 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4919 than "GMT" always.
4920 (filltime): Make zname parameter "const".
4921
92e64b87
MD
49222004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4923
4924 * threads.c, threads.h (scm_c_scm2thread): New function.
4925
004ad931
KR
49262004-02-29 Kevin Ryde <user42@zip.com.au>
4927
4928 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4929 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4930 particular don't assume "defined (__alpha__) && ! defined (linux)"
4931 means OSF. Remove "SCO" code, which was not really SCO specific and
4932 which John W. Eaton advises should be long past being needed.
4933
4934 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4935 error throw.
4936
72ea45ac
KR
49372004-02-24 Kevin Ryde <user42@zip.com.au>
4938
4939 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4940
2af0602e
KR
49412004-02-22 Kevin Ryde <user42@zip.com.au>
4942
4943 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4944 complex, same as for two args. (Handle only inum, big, real, frac).
4945
b114eafe
KR
49462004-02-21 Kevin Ryde <user42@zip.com.au>
4947
4948 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4949 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 4950 Reported by Andreas Voegele.
b114eafe 4951
1e55d288
NJ
49522004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4953
4954 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4955 validation.
4956
4957 * read.c (scm_lreadparen): Removed.
4958 (scm_lreadparen1): Renamed scm_i_lreadparen.
4959
eb741d98
HWN
49602004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4961
4962 * list.c (scm_list_n): validate non-immediate arguments;
4963 this will catch forgotten a SCM_UNDEFINED.
4964
4e28ba5e
MV
49652004-02-18 Marius Vollmer <mvo@zagadka.de>
4966
4967 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4968 Thanks to Bill Schottstaedt!
4969
4970 * socket.h (scm_gethost): Removed prototype it is already in
4971 "net_db.h". Thanks to Bill Schottstaedt!
4972
ef861ead
KR
49732004-02-18 Kevin Ryde <user42@zip.com.au>
4974
4975 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4976 order parameter to mpz_import, in fact with just one word there's no
4977 order to worry about at all.
4978
4979 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4980 and frac==complex, make an exact comparison rather than converting
4981 with fraction2double.
4982
4983 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4984 shared library, since environ is not directly available there.
4985
4986 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4987 standard.
4988
4989 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4990 errno EINVAL in case localtime and gmtime don't set it.
4991 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4992 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4993
ae43d08e 49942004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 4995
c9ea6462
KR
4996 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4997 which were permitted in the past for these.
4998
292dfa7f
KR
4999 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
5000 previous change to numbers.c.
5001
ae43d08e
KR
5002 * script.c (scm_shell_usage): Print bug-guile email address, as per
5003 GNU standard. Reported by Han-Wen Nienhuys.
5004
711a9fd7
MD
50052004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5006
5007 * unif.c (scm_make_uve): Removed local variable and simplified
5008 code in order to avoid compiler used uninitialized warnings.
5009
5010 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
5011 scm_hash_map.
5012 (scm_hash_fold): Use scm_call_3 directly in the call to
5013 scm_internal_hash_fold instead of going via fold_proc (which is
5014 now removed).
5015 (scm_hash_for_each): Use a trampoline +
5016 scm_internal_hash_for_each_handle.
5017 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
5018 functions.
5019
3da7f6b2
KR
50202004-02-12 Kevin Ryde <user42@zip.com.au>
5021
344a212f
KR
5022 * ports.c (scm_port_line): In docstring, note first line is 0.
5023 (scm_set_port_line_x): In docstring, note first line is 0.
5024 (scm_port_column): In docstring, there's no default to current input
5025 port, and remove shared port-line @defun.
5026 (scm_set_port_column_x): In docstring, there's no default to current
5027 input port, note first column is 0, remove shared set-port-line!
5028 @defun.
5029
3da7f6b2
KR
5030 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5031 convert args the same way that array-set! does.
5032
5033 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5034 for dvect.
5035 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5036 for "l" not "s", fix dvect to be false for singp(prot) since such a
5037 value is for fvect.
5038 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5039 (exactly_one_third): New variable.
5040 (scm_init_unif): Initialize it.
3da7f6b2 5041
cd21f5eb
NJ
50422004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5043
5044 * read.c (scm_read_opts): Change `escaped-parens' to
5045 `elisp-strings'.
5046
16353acc
NJ
50472004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5048
5049 * read.c (scm_read_opts): New opts `elisp-vectors' and
5050 `escaped-parens'.
5051 (s_vector): New.
5052 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5053 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5054 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5055 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5056 `escaped-parens' option set.
5057 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5058 in tokens.
5059 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5060 (scm_lreadparen1): New.
5061
5062 * read.h: Remove conditionally compiled last arg to
5063 scm_lreadparen.
5064 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5065
f62b9dff
HWN
50662004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5067
5068 * eval.c (m_expand_body): remove stray variable new_body.
5069
ef5b6b61
MV
50702004-01-22 Marius Vollmer <mvo@zagadka.de>
5071
5072 * eval.c (m_expand_body): Rewrite the expression in place (by
5073 overwriting FORMS) also when a letrec is constructed, not only
5074 when no definitions are found. Do not return rewritten expression
5075 to emphasize the in-place rewriting. Changed all users.
5076
7eec4c37
HWN
50772004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5078
5079 * gc.c: add protected_object_count, a number that is dumped from
5080 gc_stats()
5081
25ffbdac
MV
50822004-01-11 Marius Vollmer <mvo@zagadka.de>
5083
5084 * dynwind.h, dynwind.c (scm_frame_unwind,
5085 scm_frame_unwind_handler): Renamed and changed all uses.
5086 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5087
08568c95
KR
50882004-01-11 Kevin Ryde <user42@zip.com.au>
5089
5090 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5091 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5092 changes made to scheme-compound.texi.
5093
5565749c
MV
50942004-01-10 Marius Vollmer <mvo@zagadka.de>
5095
25ffbdac
MV
5096 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5097 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5098
5099 * guile-snarf.in: Use mkdir to create a unique temporary directory
5100 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5101
fc6bb283
MV
51022004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5103
7ebccde8
MV
5104 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5105 argument since it is always zero now. Changed all callers.
5106 Removed code for handling fluids.
96e3b2f8
MV
5107
5108 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5109 the wind chain explicitely. Use scm_c_with_fluid for the common
5110 case of only one fluid.
5111 (scm_with_fluid): New.
5112 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5113
fc6bb283 5114 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5115 (scm_with_fluid): New.
5116 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5117
5118 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5119 do the unwinding directly. It is simple enough.
5120
5121 * dynwind.h, dynwind.c: Did the following renamings:
5122 scm_begin_frame -> scm_frame_begin,
5123 scm_end_frame -> scm_frame_end,
5124 scm_on_unwind -> scm_frame_unwind,
5125 scm_on_rewind -> scm_frame_rewind,
5126 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5127 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5128 Changed all uses.
5129
5130 * aync.h, async.c: Did the follwing renamings:
5131 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5132 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5133 Changed all uses.
5134
5135 * ports.h, ports.c: Did the follwing renamings:
5136 scm_with_current_input_port -> scm_frame_current_input_port,
5137 scm_with_current_output_port -> scm_frame_current_output_port,
5138 scm_with_current_error_port -> scm_frame_current_error_port.
5139 Changed all uses.
5140
298ab996
KR
51412004-01-07 Kevin Ryde <user42@zip.com.au>
5142
5143 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5144 Reported by Richard Todd.
5145
ba40113e
KR
5146 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5147 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5148
298ab996
KR
5149 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5150 traversing the args list, fixes segv if an improper list is given.
5151 Reported by Rouben Rostamian.
5152
aacff585
MV
51532004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5154
5155 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5156 swap_data on stack, use a 'malloc obj'.
5157
5158 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5159 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5160 scm_i_... since they are internal. Changed all uses.
5161
5162 * dynwind.c (frame_print): Removed, use the default printer.
5163 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5164 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5165 to protect SCM values.
5166
5167 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5168 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5169 Changed all uses.
5170 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5171
49c00ecc
MV
51722004-01-05 Marius Vollmer <mvo@zagadka.de>
5173
5174 * ports.h, ports.c (scm_with_current_input_port,
5175 scm_with_current_output_port, scm_with_current_error_port): New.
5176
5177 * async.h, async.c (scm_with_blocked_asyncs,
5178 scm_with_unblocked_asyncs): New.
5179
dab514a8
MV
51802004-01-03 Marius Vollmer <mvo@zagadka.de>
5181
5182 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5183 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5184 New.
5185 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5186 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5187 function when the outermost wind point has been reached. The
5188 latter is used to copy a continuation stack at the right time.
5189 scm_dowinds remains available.
5190 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5191 tc16_guard, guards_print): Removed.
5192 (scm_internal_dynamic_wind): Reimplemented using frames.
5193
5194 * continuations.c (copy_stack): New, do only the stack copying
5195 part of copy_stack_and_call.
5196 (copy_stack_and_call): Copy the stack after unwinding and before
5197 rewinding.
5198 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5199 copy_stack_and_call.
5200
441a25d9
KR
52012004-01-04 Kevin Ryde <user42@zip.com.au>
5202
5203 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5204 can give bad results due to rounding.
441a25d9 5205
e0499207
KR
5206 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5207 setzone/restorezone protection for DOS.
5208
89fcf1b4
MV
52092003-12-26 Marius Vollmer <mvo@zagadka.de>
5210
5211 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5212 and scm_t_uintmax to be defined in scmconfig.h
5213
caff34d4
KR
52142003-12-03 Kevin Ryde <user42@zip.com.au>
5215
5216 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5217
5218 * numbers.c (scm_make_ratio): Check for numerator equal to
5219 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5220 giving integer -1.
5221
5222 * numbers.c (scm_real_part): Return fraction unchanged rather than
5223 converting to flonum.
5224
2d0b85ac
DH
52252003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5226
5227 * modules.c (module_variable): Fixed (and thus simplified) the
5228 definition of SCM_BOUND_THING_P to reflect the fact that since
5229 after the 1.4 series of guile, obarrays only hold variable
5230 objects.
5231
2297981d
MV
52322003-11-30 Marius Vollmer <mvo@zagadka.de>
5233
5234 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5235
5236 From Paul Jarc:
5237
5238 * read.c (scm_lreadr): Signal an error for invalid escape
5239 sequences in strings. Code cleanups too.
5240
5241 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5242 writing control characters in strings.
5243
52442003-11-21 Marius Vollmer <mvo@zagadka.de>
5245
5246 * ports.c (scm_drain_input): Bug fix: only access the port after
5247 checking that it indeed is one.
5248
5c264007
DH
52492003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5250
5251 * eval.c (s_bad_define): New static identifier.
5252
5253 (m_body): Fixed comment.
5254
5255 (scm_m_define): Don't generate memoized code for definitions that
5256 are not on the top level. As a consequence, no memoized code at
5257 all is generated for definitions any more: Top level definitions
5258 are executed immediately during memoization and internal
5259 definitions are handled separately in m_expand_body.
5260
5261 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5262 definitions. Consequently, there is no unmemoizing code any more
5263 that might modify the environment. Thus, the old scm_unmemocopy
5264 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5265
5266 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5267 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5268 over SCM_NIMP in places, where the argument is known to be part of
5269 a proper list.
5270
018d4730
KR
52712003-11-21 Kevin Ryde <user42@zip.com.au>
5272
5273 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5274 for bignums.
5275
5276 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5277 to share some shifting.
5278
5279 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5280 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5281 since gc does this.
5282
4bca30d8
MV
52832003-11-19 Marius Vollmer <mvo@zagadka.de>
5284
fb16d26e
MV
5285 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5286 structure. Previously, not all cases with a negative denominator
5287 were covered.
5288
4bca30d8
MV
5289 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5290 scm_divide2real when forming the fractional part. This allows
5291 "#e1.2" to yield 6/5.
5292
5293 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5294 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5295 fractions were equal to each other regardless of value. Ooops.
5296
5297 * numbers.c (scm_rationalize): Return an inexact result when given
5298 inexact arguments.
5299
5300 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5301 non-numbers.
5302
bdf26b60
MV
53032003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5304
5305 Support for exact fractions from Bill Schottstaedt! Thanks!
5306
5307 * print.c (scm_iprin1): Handle fractions.
5308
5309 * objects.h (scm_class_fraction): New.
5310 * objects.c (scm_class_fraction): New.
5311 (scm_class_of): Handle fractions.
5312
5313 * hash.c (scm_hasher): Handle fractions.
5314
5315 * numbers.c: New code for handling fraction all over the place.
5316 (scm_odd_p, scm_even_p): Handle inexact integers.
5317 (scm_rational_p): New function, same as scm_real_p.
5318 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5319 New exact functions that replace the inexact 'dsubr'
5320 implementations.
5321 (scm_numerator, scm_denominator): New.
5322
5323 * numbers.h (SCM_NUMP): Recognize fractions.
5324 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5325 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5326 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5327 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5328 SCM_FRACTION_REDUCED): New.
5329 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5330 New prototypes.
5331 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5332 scm_rational_p): New prototypes.
5333 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5334 scm_i_print_fraction): New prototypes.
5335
5336 * goops.c (create_standard_classes): Create "<fraction>" class.
5337
5338 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5339
5340 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5341 case in the switch, but do nothing for now.
5342
5343 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5344 to doubles when calling 'dsubr' functions.
5345
5346 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5347
28fda544
RB
53482003-11-18 Rob Browning <rlb@defaultvalue.org>
5349
5350 * gen-scmconfig.c (main): remove public definition of
5351 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5352 direct typedef of long_long and ulong_long inside deprecated block
5353 when appropriate.
5354
5355 * deprecated.h: move long_long and ulong_long definitions to
5356 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5357 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5358
b58e7420
MV
53592003-11-17 Marius Vollmer <mvo@zagadka.de>
5360
9a1d7d7c
MV
5361 * hash.c (scm_string_hash): New hashing algorithm that takes the
5362 complete string into account.
5363
b58e7420
MV
5364 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5365 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5366 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5367 SCM_ASSYNT.
b58e7420
MV
5368
5369 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5370 the "-e" option instead of scm_str2symbol. This allows things
5371 like (@ ...) to be specified for the entry point.
5372
461bffb1
DH
53732003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5374
5375 * eval.c (scm_m_letstar): Create memoized code in place to
5376 minimize consing.
5377
6f81708a
DH
53782003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5379
5380 * eval.c (s_splicing): Commented and reformulated.
5381
5382 (lookup_global_symbol, lookup_symbol): New static functions.
5383
5384 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5385
5386 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5387 creating a temporary pair for scm_lookupcar.
5388
5389 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5390 created deprecated wrapper function scm_unmemocar.
5391
5392 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5393 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5394 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5395 undefineds, sym_three_question_marks): Moved around without
5396 modifications.
5397
5398 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5399
910b5125
DH
54002003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5401
5402 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5403 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5404 No further modifications.
5405
c86c440b
DH
54062003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5407
5408 * eval.c (s_mixed_body_forms): New static identifier.
5409
5410 (canonicalize_define, scm_m_define): The check for a bad
5411 expression is performed in canonicalize_define now.
5412
5413 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5414 static helper functions for m_expand_body.
5415
5416 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5417 expand user defined macros. Fixed handling of the definition/
5418 expression boundary. Fixed handling of definitions grouped with
5419 'begin. Use canonicalize_define to expand definitions.
5420
3890131a
MV
54212003-11-13 Marius Vollmer <mvo@zagadka.de>
5422
b58e7420
MV
5423 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5424 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5425
5df36eac
MV
5426 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5427 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5428 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5429 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5430 New macros from Paul Jarc. Thanks!
5431
3890131a
MV
5432 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5433 return NULL when the machine type is unknown. Previously,
5434 gc_os_dep.c would refuse to compile.
5435
430b8401
DH
54362003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5437
5438 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5439 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5440 scm_m_body to m_body.
5441
328dc9a3
DH
54422003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5443
5444 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5445 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5446 scm_m_expand_body to m_expand_body and made it static. Added
5447 deprecated wrapper scm_m_expand_body.
5448
5449 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5450 of scm_m_expand_body.
5451
c2337a61
KR
54522003-11-09 Kevin Ryde <user42@zip.com.au>
5453
5454 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5455 argument. Reported by Mike Gran.
5456
ced8edb0
DH
54572003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5458
5459 * eval.c (s_missing_body_expression): New static identifier.
5460
5461 (s_body): Removed.
5462
5463 (scm_m_expand_body): Fixed core dump when passing a body with
5464 defines, but without expressions (see additions to syntax.test).
5465 Use ASSERT_SYNTAX to signal syntax errors.
5466
0f572ba7
DH
54672003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5468
5469 * eval.c (canonicalize_define): New static helper function.
5470
5471 (memoize_define, canonicalize_define): Extract handling of
5472 function currying to canonicalize_define.
5473
2510c810
DH
54742003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5475
5476 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5477 Make sure that error checking in debug mode is not worse than in
5478 standard mode.
5479
34adf7ea
DH
54802003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5481
5482 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5483 handled in scm_m_body any more, but rather in scm_m_lambda.
5484
5485 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5486 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5487 calling functions of scm_m_body.
5488
5489 (scm_m_lambda): Avoid unnecessary consing when creating the
5490 memoized code.
5491
89bff2fc
DH
54922003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5493
5494 * eval.c (s_expression): Added comment.
5495
5496 (s_empty_combination, error_unbound_variable): New static
5497 identifiers.
5498
5499 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5500 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5501 signal syntax errors.
5502
5503 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5504 scheme objects.
5505
60a49842
DH
55062003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5507
5508 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5509 Grouped together with unmemocopy, without modifications.
5510
5511 (build_binding_list, unmemocopy): Renamed names of list arguments
5512 and variables to reflect the actual order of the list elements.
5513
70c1c108
DH
55142003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5515
5516 * eval.c (s_defun): New static identifier.
5517
5518 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5519 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5520 when creating the memoized code.
5521
0ee39677
KR
55222003-10-19 Kevin Ryde <user42@zip.com.au>
5523
5524 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5525
5526 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5527 in accordance with R5RS, which just mpz_get_d doesn't really give.
5528
9a848baf
DH
55292003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5530
5531 * eval.c (s_bad_slot_number): New static identifier.
5532
5533 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5534 signal syntax errors. Avoid unnecessary consing when creating the
5535 memoized code.
5536
da48db62
DH
55372003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5538
5539 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5540 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5541 errors. Avoid unnecessary consing when creating the memoized
5542 code.
5543
5544 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5545 standard case. Make sure line and file information are copied to
5546 every created expression.
5547
82b3e2c6
DH
55482003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5549
5550 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5551 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5552 when creating the memoized code.
5553
5554 (scm_m_atbind): Reversed the order, in which the init expressions
5555 are stored and executed. The order of execution is now equal to
5556 the order in which the initializers of the let-forms are executed.
5557 Use check_bindings and transform_bindings.
5558
5559 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5560 !SCM_NULLP. Added some comments.
5561
21628685
DH
55622003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5563
5564 * eval.c: Sorted include files alphabetically.
5565
5566 (scm_m_begin): Added comment.
5567
5568 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5569 unnecessary consing when creating the memoized code.
5570
5571 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5572 syntax errors. Be more specific about the kind of error that was
5573 detected.
5574
5575 (scm_m_quote, unmemocopy): As an optimization, vector constants
5576 are now inserted unquoted into the memoized code. During
5577 unmemoization the quotes are added again to provide syntactically
5578 correct code.
5579
d6754c23
DH
55802003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5581
5582 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5583 scm_m_expand_body, check_bindings): Extracted syntax checking of
5584 bindings to new static function check_bindings.
5585
5586 (scm_m_let, memoize_named_let): Extracted handling of named let to
5587 new static function memoize_named_let.
5588
5589 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5590 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5591 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5592 unnecessary consing when creating the memoized code.
5593
03a3e941
DH
55942003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5595
5596 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5597 static identifiers.
5598
5599 (s_clauses, s_formals, s_duplicate_formals): Removed.
5600
5601 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5602 specific about the kind of error that was detected. Prepare for
5603 easier integration of changes for separated memoization.
5604
da48db62 56052003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5606
5607 * eval.c (s_duplicate_binding): New static identifier.
5608
5609 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5610
5611 (scm_m_define): Added comment about how we check for duplicate
5612 formals.
5613
5614 (scm_m_do): Added check for duplicate bindings.
5615
5616 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5617 unnecessary consing when creating the memoized code.
5618
5619 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5620 scm_c_improper_memq to c_improper_memq, since it is not exported.
5621
5622 (transform_bindings): Call scm_c_memq rather than
5623 scm_c_improper_memq.
5624
5625 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5626
da48db62 56272003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5628
5629 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5630 static identifiers.
5631
5632 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5633 specific about the kind of error that was detected. Avoid use of
5634 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5635 code, this way also making sure that file name, line number
5636 information etc. remain available.
5637
da48db62 56382003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5639
5640 * eval.c (memoize_as_thunk_prototype): New static function.
5641
5642 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5643 Avoid unnecessary consing when creating the memoized code.
5644
9b9a35b6
KR
56452003-10-12 Kevin Ryde <user42@zip.com.au>
5646
5647 * list.c (scm_append): Track argument number and use in error.
5648
cc56ba80
DH
56492003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5650
5651 * eval.c (s_missing_expression, s_bad_variable): New static
5652 identifiers.
5653
5654 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5655 R5RS terminology for the naming of variables. Be more specific
5656 about the kind of error that was detected. Make sure file name,
5657 line number etc. are added to all freshly created expressions.
5658 Avoid unnecessary consing when creating the memoized code.
5659
609a8b86
DH
56602003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5661
5662 * eval.c (s_extra_expression, s_misplaced_else_clause,
5663 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5664
5665 (s_extra_case_clause): Removed.
5666
5667 (scm_m_case, scm_m_cond): If a clause appears after an else
5668 clause, report a misplaced else clause.
5669
5670 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5671 specific about the kind of error that was detected. Handle bound
5672 'else and '=>. Avoid unnecessary consing when creating the
5673 memoized code.
5674
5675 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5676 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5677 syntactic keyword '=>.
5678
58a2510b
DH
56792003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5680
5681 * eval.c (scm_m_case): Allow empty lists of case labels.
5682
2a6f7afe
DH
56832003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5684
5685 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5686
5687 * print.c (scm_isymnames): Add names for the new memoizer codes.
5688
5689 * eval.c (s_missing_clauses, s_bad_case_clause,
5690 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5691 literal_p): New static identifiers.
5692
5693 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5694 specific about the kind of error that was detected. Check for
5695 duplicate case labels. Handle bound 'else. Avoid unnecessary
5696 consing when creating the memoized code.
5697
5698 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5699 the syntactic keyword 'else.
5700
e6729603
DH
57012003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5702
5703 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5704 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5705
5706 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5707 unnecessary consing when creating the memoized code.
5708
9ddeb776
KR
57092003-10-09 Kevin Ryde <user42@zip.com.au>
5710
5711 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5712 cast gives for values bigger than a long, or for nan or inf.
5713
df5af69a
DH
57142003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5715
5716 * smob.h (scm_make_smob_type): Made the declaration match the
5717 definition.
5718
da0e6c2b
MV
57192003-10-07 Marius Vollmer <mvo@zagadka.de>
5720
5721 * goops.c, objects.h, smob.c, smob.h: Make type names char
5722 const * instead of char *. Thanks to Paul Jarc!
5723
591924eb
KR
57242003-10-02 Kevin Ryde <user42@zip.com.au>
5725
ff6ea7b9 5726 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5727 rather than scm_strport_to_string, so as to guard against the port
5728 having been closed by the called procedure. Reported by Nic Ferrier.
5729
f03314f9
DH
57302003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5731
5732 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5733
5734 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5735 tags.h to deprecated.h.
5736
534c55a9
DH
57372003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5738
5739 This set of patches introduces a new tc7 code scm_tc7_number for
5740 numbers. Bignums, reals and complex numbers are turned from smobs
5741 into subtypes of scm_tc7_number.
5742
5743 * tags.h (scm_tc7_number): New.
5744
5745 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5746 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5747 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5748 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5749 (scm_class_of), print.c (scm_iprin1), smob.c
5750 (scm_smob_prehistory): Don't handle bignums, reals and complex
5751 numbers as subtypes of scm_tc7_smob any more.
5752
5753 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5754 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5755
29c4382a
DH
57562003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5757
5758 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5759 sizeof (scm_t_complex) to determine the memory size of the
5760 malloc'd area for complex numbers.
5761
47ae1f0e
DH
57622003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5763
5764 * numbers.c (scm_bigequal): Fixed.
5765
859b6b2f
MV
57662003-09-16 Marius Vollmer <mvo@zagadka.de>
5767
5768 * stime.c (scm_current_time): 'time' does not set errno so don't
5769 use SCM_SYSERROR for reporting errors.
5770
e17d318f
DH
57712003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5772
5773 This set of patches eliminates the dependency between the
5774 implementation of evaluator specific memoization codes and special
5775 constants like #f, '() etc. ('flags'), which are not evaluator
5776 specific. The goal is to remove definitions of evaluator
5777 memoization codes completely from the public interface. This will
5778 make it possible to experiment more freely with optimizations of
5779 guile's internal representation of memoized code.
5780
5781 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5782
5783 * print.c (iflagnames): New array, holding the printed names of
5784 guile's special constants ('flags').
5785
5786 (scm_isymnames): Now holds only the printed names of the
5787 memoization codes.
5788
5789 (scm_iprin1): Separate the handling of memoization codes and
5790 guile's special constants.
5791
5792 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5793 SCM_IFLAGNUM): new
5794
5795 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5796 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5797 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5798 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5799 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5800 values.
5801
5802 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5803
5804 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5805 tc9 macros and scm_tc9_flag.
5806
eecac806
MV
58072003-09-15 Marius Vollmer <mvo@zagadka.de>
5808
5809 * posix.c (scm_setgroups): Check that the gid list is not too
5810 long. Thanks to Paul Jarc!
5811
22f2cf2d
DH
58122003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5813
5814 * tags.h: Reduced the number of short instructions from 14 to 13.
5815 The typecode of the former 14th short instruction is now used to
5816 represent long instructions. Changed some comments to reflect
5817 this fact.
5818
5819 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5820 previously used by SCM_IM_DEFINE.
5821
5822 (SCM_IM_DEFINE): Turned into a long instruction.
5823
5824 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5825 instruction.
5826
5827 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5828 code that is separate from all instructions, one level of dispatch
5829 for long instructions can be eliminated.
5830
5831 * print.c (scm_isymnames): Removed some commented code.
5832
62f548e1
MV
58332003-09-12 Marius Vollmer <mvo@zagadka.de>
5834
97a61c5f
MV
5835 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5836 compiler on IA64.
5837
50e0ba57
MV
5838 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5839
5840 * modules.c (scm_module_reverse_lookup): Check that the obarray
5841 really is a hashtable and do nothing if not.
5842
62f548e1
MV
5843 * inline.h: Use "extern inline" only with GCC. Use "static
5844 inline" else.
5845
0d5e3480
DH
58462003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5847
5848 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5849 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5850
5851 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5852 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5853 deprecated.h.
5854
6b412e91
DH
58552003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5856
5857 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5858 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5859
5860 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5861 0.0==some_expression to some_expression==0.0. The latter is
5862 better readable. The former is preferred by some people, since it
5863 leads to a compiler error when confusing == with =. However, when
5864 using gcc, a warning will be issued if in an if-statement an
5865 assigment appears. Since many Guile developers are using gcc,
5866 such errors will not remain unnoticed anyway. We can therefore
5867 focus on better readability.
5868
7e3b25bf
DH
58692003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5870
5871 * tags.h: Added description of Guile's type system. Removed some
5872 old and misleading comments.
5873
3ea39242
DH
58742003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5875
5876 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5877 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5878
5d7d39ff
DH
58792003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5880
5881 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5882
5883 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5884 respective SLOPPY macro.
5885
baa84a20
DH
58862003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5887
5888 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5889 type string, not SCM_TYP7S.
5890
ba15f500
KR
58912003-09-03 Kevin Ryde <user42@zip.com.au>
5892
5893 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5894 2s-complement.
5895
53bb8782
KR
5896 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5897 current timezone requiring SCM_DEFER_INTS.
5898
defdc4b4
NJ
58992003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5900
5901 * script.c (scm_compile_shell_switches): Make -s switch optional
5902 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5903 VanDevender for the patch!)
5904
0f008a15
KR
59052003-08-30 Kevin Ryde <user42@zip.com.au>
5906
5907 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5908 and to have non-integer types rejected as per other logical funcs.
5909
438a3ba1
KR
59102003-08-28 Kevin Ryde <user42@zip.com.au>
5911
5912 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5913
98dceb37
KR
59142003-08-23 Kevin Ryde <user42@zip.com.au>
5915
5916 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5917 thread safe, and could take a long time too.
5918
1fa79a38
KR
59192003-08-22 Kevin Ryde <user42@zip.com.au>
5920
5921 * numbers.c (scm_difference): Correction to bignum - negative inum.
5922
d97f9b42
KR
59232003-08-14 Kevin Ryde <user42@zip.com.au>
5924
5925 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5926 [__GNUC__]: Use volatile asm macros rather than a function call.
5927 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5928 macros while defining functions.
5929
5930 * simpos.c (getenv): Use <stdlib.h> for prototype.
5931 (scm_system): In docstring, refer to status:exit-val rather than
5932 "functions above".
5933
b9052fcc
KR
59342003-08-09 Kevin Ryde <user42@zip.com.au>
5935
5936 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5937 list set by source-properties! rather than an SRCPROPS object,
5938
8e5b4b9e
KR
59392003-07-29 Kevin Ryde <user42@zip.com.au>
5940
5941 * properties.c (scm_primitive_property_ref): In docstring, note
5942 parameters to not-found-proc, use hyphens rather than underscores for
5943 that parameter name.
5944 (scm_primitive_property_set_x): In docstring, VAL is the value
5945 parameter not CODE.
5946
20703ac4
MV
59472003-07-27 Marius Vollmer <mvo@zagadka.de>
5948
c6ccee34
MV
5949 * print.c (scm_print_symbol_name): handle more weird characters by
5950 escaping the symbol name properly. Thanks to Paul Jarc!
5951
2f4931bf
MV
5952 * posix.h (scm_setgroups): New prototype.
5953 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5954 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5955 Don't use SCM_WRITABLE_VELTS.
5956
265c456f
MV
5957 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5958 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5959 Matthias Koeppe!
5960
20703ac4
MV
5961 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5962 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5963 compiles when SCM_C_INLINE is undefined.
5964
59c4bb82
DH
59652003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5966
5967 * __scm.h: Reformulated the architecture and compiler properties
5968 in terms of properties of scm_t_bits and SCM variables rather than
5969 in terms of c standard types. This is since it is not known which
5970 of the standard types scm_t_bits and SCM variables will be defined
5971 to.
5972
d7850c8d
KR
59732003-07-24 Kevin Ryde <user42@zip.com.au>
5974
5975 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5976 and real.
5977
8a0c514f
KR
59782003-07-18 Kevin Ryde <user42@zip.com.au>
5979
5980 * numbers.c (scm_product): In complex * bignum, correction to
5981 REAL/IMAG fetch, x is the complex, not y.
5982
0aacf84e
MD
59832003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5984
5985 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5986 scm_inf_p test as Scheme values.
5987 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5988 and a positive inum.
5989 Use GNU indentation style.
5990
192de9a4
DH
59912003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5992
5993 * values.c (scm_values): Build lists of length 1 by using
5994 scm_list_1 instead of using scm_cons.
5995
bbb4438a
KR
59962003-07-10 Kevin Ryde <user42@zip.com.au>
5997
b58c85ce
KR
5998 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5999 * list.c (scm_list_n): Ditto.
6000
bbb4438a
KR
6001 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
6002
287f8ad1
KR
60032003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
6004
6005 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
6006 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
6007 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
6008 the other using intptr_t.
6009
005d2366
KR
60102003-07-08 Kevin Ryde <user42@zip.com.au>
6011
0aacf84e 6012 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
6013 (scm_magnitude): Use hypot.
6014
6015 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
6016 @footnote since it doesn't go through to guile-procedures.txt.
6017
6018 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
6019 outside @var to quieten makeinfo, and use @code.
6020
cbfe8e62
HWN
60212003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6022
6023 * gc-malloc.c (decrease_mtrigger): new function
6024 (increase_mtrigger): new function, separate debug registering and
6025 mtrigger administration.
6026 (scm_gc_realloc): bugfix: do mtrigger administration before the
6027 actual realloc, for the realloc might invalidate a GC-d segment of
6028 memory. Thanks to Sam Hocevar for pointing this out.
6029 (scm_gc_realloc): use scm_malloc_reregister instead of
6030 unregistering and registering in sequence.
6031
aeb4c2e1
HWN
60322003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6033
6034 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
6035
4c27f8d2
HWN
60362003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6037
6038 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6039 clauses.
6040
983e697d
MV
60412003-06-29 Marius Vollmer <mvo@zagadka.de>
6042
6043 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6044 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6045 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6046 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6047 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6048 the release_1_6 branch.
6049
78b6566e
SJ
60502003-06-25 Stefan Jahn <stefan@lkcc.org>
6051
6052 * continuations.c: Redeclaration of getcontext() via the
6053 __asm__ ("getcontext") directive.
6054
6055 * continuations.h: Include <ucontext.h> instead of
6056 <sys/ucontext.h>.
6057
1ebb8497
KR
60582003-06-21 Kevin Ryde <user42@zip.com.au>
6059
6060 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6061 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6062 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6063 available.
6064 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6065 (isfinite): Remove, conflicts with C99 isfinite().
6066
fbf85ba4
MV
60672003-06-19 Marius Vollmer <mvo@zagadka.de>
6068
6069 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6070 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6071 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6072 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6073 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6074 the release_1_6 branch.
6075
fcc5d734
SJ
60762003-06-14 Stefan Jahn <stefan@lkcc.org>
6077
6078 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6079 to be functions instead of macros.
6080
6081 * threads.c: Conditionalized inclusion of <sys/time.h> and
6082 <unistd.h>.
6083 (scm_getspecific, scm_setspecific): Made these two function
6084 real part of the API.
6085
6086 * posix.c (s_scm_putenv): Added some code to make a
6087 (putenv "FOO="), i.e. setting an empty string, work also on
6088 Win32 systems. Thanks to Kevin Ryde for the proposal.
6089
c3ae8e07
KR
60902003-06-12 Kevin Ryde <user42@zip.com.au>
6091
75b14838
KR
6092 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6093 freebsd to comment about need to use unsetenv.
c3ae8e07 6094
9d9fa092
MV
60952003-06-02 Marius Vollmer <mvo@zagadka.de>
6096
6097 * ports.c (scm_peek_char): Safe the column of the port around the
6098 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6099
f2478375
KR
61002003-06-07 Kevin Ryde <user42@zip.com.au>
6101
6102 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6103 and friends required by scm_t_bits setups.
6104
6375e040
DH
61052003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6106
6107 * tags.h (scm_tc2_int): Added.
6108
6109 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6110 scm_tc2_int.
6111
6112 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6113 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6114
f5c6ec2f
DH
61152003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6116
6117 * eval.c: Partially undid my patch from 2003-05-31. This patch
6118 caused the segfault referenced in the previous changelog entry.
6119
47dbd81e
DH
61202003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6121
6122 * tags.h: Fixed comment about the immediate type code layout.
6123
6124 * eval.c: Fixed handling of non-special instructions. Without
6125 this patch, guile will segfault on (#\0) and similar instructions.
6126
3ec52c51
KR
61272003-06-05 Kevin Ryde <user42@zip.com.au>
6128
6129 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6130 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6131
e418bd7c
KR
6132 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6133 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6134
d0624e39
DH
61352003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6136
6137 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6138 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6139 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6140 generalized it to apply not only to C level functions but also to
6141 scheme level functions.
6142
6143 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6144 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6145 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6146 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6147 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6148 respectively.
6149
6150 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6151 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6152 eval.h into eval.c and a copy is placed into deprecated.h.
6153
6154 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6155 into eval.c. This definition was not part of the API in any
6156 officially released version of guile and thus does not need to go
6157 through a phase of deprecation.
6158
e90c3a89
DH
61592003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6160
d0624e39
DH
6161 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6162 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6163 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6164 definitions are make static and renamed from scm_s_xxx to s_xxx.
6165 In deprecated.c the original definitions are copied.
6166
d0624e39
DH
6167 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6168 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6169 eval.h into eval.c and a copy (slightly modified to work in user
6170 code) is placed into deprecated.h.
6171
6172 * eval.c: Use the local static s_xxx definitions instead of the
6173 scm_s_xxx definitions throughout.
6174
14b18ed6
DH
61752003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6176
6177 This set of patches separates the representation of the cxr family
6178 of functions (car, cdr etc.) from the dsubr family of functions
6179 (i. e. functions that take a double precision floating point
6180 argument). Further, the algorithm for handling the cxr function
6181 is improved.
6182
6183 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6184 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6185 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6186 cosh, tanh), objects.c (scm_class_of), procprop.c
6187 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6188 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6189 typecode for the dsubr family of functions.
6190
6191 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6192 ramap_dsubr.
6193
6194 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6195 (scm_init_pairs): Make use of the (now usable) second cell element
6196 of a scm_tc7_cxr function to implement the cxr family of functions
6197 more efficiently.
6198
2ca0d207
DH
61992003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6200
6201 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6202 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6203 end of an if-else-if-sequence of checks.
6204
9a069bdd
DH
62052003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6206
6207 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6208 execution. Generalize apply_closure to apply_proc and use that
6209 for call-with-values.
6210
e910e9d2
DH
62112003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6212
6213 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6214 a non closure.
6215
1e498fbd
SJ
62162003-05-30 Stefan Jahn <stefan@lkcc.org>
6217
6218 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6219 appropriately for mingw32 hosts.
6220
6221 * numbers.h: Defining copysign(), isnan() and finite() to
6222 be prefixed by a single '_' for mingw32 hosts.
6223
c47e2599
KR
62242003-05-30 Kevin Ryde <user42@zip.com.au>
6225
6226 * numbers.c (z_negative_one): New variable.
6227 (scm_init_numbers): Initialize it.
6228 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6229
2e945bcc
SJ
62302003-05-29 Stefan Jahn <stefan@lkcc.org>
6231
6232 * win32-dirent.c: Use malloc() instead of scm_malloc().
6233
6234 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6235 warning.
6236
6237 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6238 mingw32 build.
6239
6240 * modules.c (s_scm_module_import_interface): Renamed local
6241 variable interface to _interface. Seems like 'interface'
6242 is a special compiler directive for the mingw32 compiler.
6243
6244 * mkstemp.c: Provide prototype to avoid compiler warning.
6245
6246 * load.c (s_scm_search_path): Fixed absolute and relative
6247 path detections for native Windows platforms.
6248
6249 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6250 to build on mingw32).
6251
6252 * gc-freelist.c ("s_scm_map_free_list",
6253 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6254
6255 * fports.c (fport_fill_input): Disable use of
6256 fport_wait_for_input() on Win32 platforms.
6257
6258 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6259
6260 * Makefile.am: Modified some rules for cross compiling.
6261
ddd8f927
DH
62622003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6263
6264 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6265 proper function object and the correct number of arguments are now
6266 performed in the application part of SCM_CEVAL.
6267
6268 (scm_badformalsp): Removed.
6269
f8ba2197
DH
62702003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6271
6272 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6273
79f55b7c
MD
62742003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6275
a502595f
MD
6276 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6277 always being false by inserting preprocessor conditional. (Thanks
6278 to Bruce Korb.)
6279
79f55b7c
MD
6280 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6281 (void *) in order to avoid an aliasing warning; thanks to Bruce
6282 Korb.)
6283
6284 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6285
6286 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6287 SCM_STACK_PTR.
6288
6289 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6290 thread->base --> t->base.
6291
6292 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6293
47dee228
MV
62942003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6295
6296 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6297 scm_variable_set_name_hint, scm_builtin_variable,
6298 scm_internal_with_fluids, scm_make_gsubr,
6299 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6300 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6301 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6302 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6303 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6304 scm_make_subr_with_generic, scm_make_subr_opt,
6305 scm_call_catching_errors, scm_make_smob_type_mfpe,
6306 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6307 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6308 branch. Some have been slightly rewritten.
6309 (scm_i_object_chars, scm_i_object_length): New, to support
6310 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6311
e681d187
DH
63122003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6313
6314 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6315 names and inits in the memoized code of do.
6316
7e59d9d4
MD
63172003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6318
6319 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6320 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6321 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6322 a compilation error if error-on-warning is enabled).
6323
9950a42c
MV
63242003-05-17 Marius Vollmer <mvo@zagadka.de>
6325
6326 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6327 removes preprocessor directives from the snarfage that might
6328 otherwise confuse us. These directives appear when compiling with
6329 "-g3", for example.
6330
0068984b
HWN
63312003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6332
26e68795
HWN
6333 * ChangeLog: add my surname
6334
0068984b
HWN
6335 * srcprop.c (scm_finish_srcprop): use
6336 scm_gc_register_collectable_memory()
6337 (scm_make_srcprops): idem.
6338
131805f0
HWN
63392003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6340
6341 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6342 wrap-around for scm_mtrigger
6343 (scm_gc_register_collectable_memory): abort on overflowing
6344 scm_mallocated().
6345
d4611024
KR
63462003-05-13 Kevin Ryde <user42@zip.com.au>
6347
6348 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6349 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6350
7aaf8dc9
MD
63512003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6352
dfd03fb9
MD
6353 * backtrace.c (scm_display_error_message): Introduced fancy
6354 printing with max level 7 and length 10. (Purpose: avoid printing
6355 gigantic objects in error messages.)
6356
6357 * print.c, print.h (scm_i_port_with_print_state): New function.
6358
6359 * print.c (scm_iprin1, scm_printer_apply,
6360 scm_port_with_print_state): Use scm_i_port_with_print_state.
6361 (scm_simple_format): Modified not to destroy print states.
6362 (print_state_mutex): New mutex.
6363 (scm_make_print_state, scm_free_print_state, scm_prin1):
6364 Lock/unlock print_state_mutex.
6365
7aaf8dc9
MD
6366 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6367 Use current names in definitions.
6368
a4d9ffa1
KR
63692003-05-10 Kevin Ryde <user42@zip.com.au>
6370
6371 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6372
d25e96a4
KR
6373 * numbers.c (scm_integer_length): On negative bignums, adjust
6374 mpz_sizeinbase to account for it looking at absolute value where we
6375 want ones-complement.
6376
6377 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6378 since we're only using the ulong return value, and x might not fit.
6379
5bf6a6f0
DH
63802003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6381
6382 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6383 read. This will allow to make the definition in read.c static.
6384
f58c472a
DH
63852003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6386
6387 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6388 from evalext to eval. This will allow to make some of the
6389 definitions in eval.c static.
6390
90382aeb
KR
63912003-05-06 Kevin Ryde <user42@zip.com.au>
6392
6393 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6394 (scm_logcount): Use mpz_com, not mpz_neg.
6395
3b88ed2a
DH
63962003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6397
6398 The purpose of this patch is to make guile's internal memoizers
6399 distinguishable from memoizing macros created on the scheme level
6400 or from user provided primitive memoizing macros. The reason is,
6401 that the internal memoizers are the only ones that are allowed to
6402 transform their scheme input into memoizer byte code, while all
6403 other memoizing macros may only transform scheme code into new
6404 scheme code.
6405
6406 To achieve this, a new macro type 'builtin-macro!' is introduced.
6407 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6408 this will change when the memoizer and executor are separated.
6409
6410 * macros.[ch] (scm_i_makbimacro): New.
6411
6412 * macros.h (SCM_BUILTIN_MACRO_P): New.
6413
6414 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6415
6416 * eval.c, goops.c: All of guile's primitive memoizing macros are
6417 primitive builtin-macros now.
6418
6419 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6420 builtin-macros are handled equally to memoizing macros.
6421
b0780eb1
MV
64222003-05-04 Marius Vollmer <mvo@zagadka.de>
6423
6424 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6425 work around a bug in GCC 2.95.2 but is now a bug in itself.
6426
1cbf4fe9
MV
64272003-05-02 Marius Vollmer <mvo@zagadka.de>
6428
6429 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6430 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6431 scm_tcs_symbols): New.
6432
1a61d41b
MV
64332003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6434
096ecbaf
MV
6435 * deprecated.h, deprecated.c (scm_protect_object,
6436 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6437 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6438 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6439 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6440 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6441 scm_ptob_descriptor, scm_port_rw_active,
6442 scm_close_all_ports_except): New.
6443
1a61d41b
MV
6444 * ports.c (scm_c_port_for_each): New function, mostly copied from
6445 scm_port_for_each.
6446 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6447 * ports.h (scm_c_port_for_each): New prototype.
6448
c8e1d354
MD
64492003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6450
6451 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6452 macro was introduced in anticipation of GOOPS method compilation
6453 code.)
6454
6455 * goops.c: Removed binding of @dispatch.
6456
a4aa2134
DH
64572003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6458
6459 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6460 instructions that bind the macros on the scheme level back to
6461 goops.c in order to make sure again that the bindings go into the
6462 (oop goops) module and are not visible from the outside.
6463
9fbee57e
DH
64642003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6465
6466 * eval.c: Non functional change: Separated R5RS and non-R5RS
6467 macros into different sections of the file and ordered the
6468 memoizers alphabetically.
6469
12841895
DH
64702003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6471
6472 * eval.c (scm_ilookup): Rewritten to improve readability.
6473
6a3f13f0
DH
64742003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6475
6476 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6477 Partially reverted patch from 2003-04-23 in oder to find a better
6478 compromise between readability and debuggability.
6479
b0c5d67b
DH
64802003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6481
6482 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6483 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6484 definitions of the special goops memoizers from goops.[ch] to
6485 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6486 throughout guile.
6487
b9ad392e
MD
64882003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6489
6490 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6491
6492 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6493
6494 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6495
6496 * ioext.c (scm_fdes_to_ports): Ditto.
6497
6498 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6499 lock/unlock scm_i_port_table_mutex.
6500
6501 * strports.c (scm_mkstrport): Ditto.
6502
6503 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6504
6505 * fports.c (scm_fdes_to_port): Ditto.
6506
d0b07b5d
DH
65072003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6508
6509 This set of patches contains no functional changes, only debatable
6510 minor stylistic ones. Still, in order to prepare a patch between
6511 my local copy and the CVS version, I decided to submit the changes
6512 below. Then, the patch will hopefully only contain relevant
6513 modifications :-)
6514
6515 * eval.c (iqq): Added const specifier.
6516
6517 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6518 Use NULL instead of 0 to indicate that a pointer is returned.
6519 Removed some misleading 'fall through' comments.
6520
6521 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6522 Split up long expressions into smaller ones to be more debugging
6523 friendly.
6524
a98e8e98
DH
65252003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6526
6527 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6528 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6529 rather than casting to SCM.
6530
c178c3a6
DH
65312003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6532
6533 * sort.c, pairs.h: Removed unnecessary includes.
6534
d339981a
DH
65352003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6536
6537 * sort.c: Replaced hand-made trampline code by the new official
6538 mechanism from eval.c. This fixes a segfault in the new test file
6539 sort.test.
6540
6541 (quicksort, compare_function, scm_restricted_vector_sort_x,
6542 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6543 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6544 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6545 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6546 eval.c.
6547
6548 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6549 cmp_fun_t): Removed.
6550
6551 (compare_function): Added.
6552
6553 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6554 arithmetics with index arithmetics. Changed quicksort to work on
6555 an array of SCM values instead of an array of characters. Avoid
6556 bytewise copying of SCM elements. Avoid allocating memory on the
6557 stack with alloca. Fixed some comments.
6558
821f18a4
DH
65592003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6560
6561 * eval.c (EXTEND_ENV): Eliminated.
6562
6563 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6564 EXTEND_ENV.
6565
94fb5a6e
DH
65662003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6567
6568 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6569
6570 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6571 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6572
6573 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6574 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6575 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6576 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6577 functions such that they check if the object is a non-immediate.
6578 Further, renamed identifiers to use the scm_dbg_ prefix and made
6579 their inclusion into the lib dependent of the
6580 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6581
fce0b22d
DH
65822003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6583
6584 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6585 debug option.
6586
1685446c
DH
65872003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6588
821f18a4 6589 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6590 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6591 any calls to SCM_NCONSP any more.
6592
6593 * unif.c (l2ra): Eliminate redundant check.
6594
9ff1720f
DH
65952003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6596
6597 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6598 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6599 SCM_NNULLP. Now, guile itself does not include any calls to
6600 SCM_NNULLP any more.
6601
05b15362
DH
66022003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6603
6604 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6605 scm_copy_tree): Place assignment expressions which are part of
6606 other expressions into an expression of their own.
6607
0c88d7df
DH
66082003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6609
6610 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6611 compare SCM values with !=.
6612
5cb22e96
DH
66132003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6614
6615 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6616 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6617 and definition of the memoizer for the generalized set! macro from
6618 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6619 define the macro object.
6620
6621 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6622 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6623 eval.c, it is made static and renamed to s_set_x.
6624
6625 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6626 over SCM_N<foo>.
6627
a44a9715
DH
66282003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6629
6630 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6631 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6632 to undefineds and registered the object as a permanent object.
6633
6634 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6635 static in eval.c, renamed it to f_apply and registered the object
6636 as a permanent object.
6637
1b43d24c
DH
66382003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6639
5cb22e96 6640 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6641 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6642
aec16f99
DH
66432003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6644
6645 * numbers.c (scm_logtest): Fixed argument bug in the call to
6646 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6647
f96460ce
DH
66482003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6649
6650 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6651 type errors that showed up when compiling with SCM_DEBUG defined.
6652
d0f6ceb8
DH
66532003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6654
6655 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6656 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6657 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6658 fix compile errors with --disable-deprecated.
6659
19a7a089
RB
66602003-04-17 Rob Browning <rlb@defaultvalue.org>
6661
6662 * numbers.c (scm_integer_expt): fix case where we were declaring
6663 vars in the middle of a statement block. Thanks to Thamer
6664 Al-Harbash.
6665
47cd67db
MD
66662003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6667
0fd7dcd3
MD
6668 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6669 change.
6670
47cd67db
MD
6671 * eq.c (scm_eqv_p): Turned into a primitive generic.
6672
3b8b889c
RB
66732003-04-16 Rob Browning <rlb@defaultvalue.org>
6674
312006bb
RB
6675 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6676 Thanks to Boyd Gerber.
6677 Added check for __arm__ in addition to arm for LINUX and copied
6678 __s390__ defines from upstream libgc. Thanks to James Treacy for
6679 reporting the problems.
c7ef2ea1 6680
3b8b889c
RB
6681 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6682
6683 * socket.c: use SCM_CHAR_BIT.
6684
6685 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6686
6687 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6688
43261b39
MD
66892003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6690
6691 * feature.c (scm_init_feature): Always add threads feature.
6692
58241edc
MD
66932003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6694
6695 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6696 scm_at_assert_bound_ref. (We don't want the unbound check. See
6697 oop/goops/active-slot.scm.)
6698
94e91275
RB
66992003-04-14 Rob Browning <rlb@defaultvalue.org>
6700
6701 * tags.h: scm_t_intptr should have been intptr_t.
6702
3071ea27
RB
67032003-04-13 Rob Browning <rlb@defaultvalue.org>
6704
6705 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6706 test. Instead use
6707 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6708 as gc_os_dep.c suggests is appropriate.
6709
6710 * goops.c (prep_hashsets): make static to match prototype.
6711 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6712 Chin.
6713
6714 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6715 Albert Chin.
6716
6717 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6718 Klausner.
6719
21ab2aeb
MD
67202003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6721
6722 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6723 indicated through extra fields in getters-n-setters.
6724 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6725 (Thanks to Andy Wingo.)
6726
dff96e95
HWN
67272003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6728
6729 * gc-segment.c: add comment
6730
07921c76
RB
67312003-04-07 Rob Browning <rlb@defaultvalue.org>
6732
b5331f10
RB
6733 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6734 clash.
6735
07921c76
RB
6736 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6737 and add regression test to standalone/.
6738
67392003-04-06 Rob Browning <rlb@defaultvalue.org>
6740
6741 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6742 Thanks to Dale P. Smith.
6743
6744 * random.c: #include gmp.h.
6745 (scm_c_random_bignum): normalize result on return.
6746
6747 * init.c: #include gmp.h.
6748
6749 * numbers.h: remove the gmp.h #include (not needed now).
6750
6751 * posix.h: change occurences of "id" to something else so we don't
6752 cause trouble when included via objective-c (can't hurt, might
6753 help). Still have usage in debug.h, though.
6754
938f6b7c
MD
67552003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6756
372691d8
MD
6757 * random.c (scm_c_random_bignum): Don't generate a random number
6758 equal to m (the second argument of scm_c_random_bignum); only
6759 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6760 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6761 scm_var_random_state.
372691d8 6762
938f6b7c
MD
6763 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6764 clause.
6765
6cdb8c3f
RB
67662003-04-05 Rob Browning <rlb@defaultvalue.org>
6767
938f6b7c 6768 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6769 uses before any code.
6770
15635be5
MD
67712003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6772
1ecfd013
MD
6773 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6774 not top_srcdir.
6775
15635be5
MD
6776 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6777 processing it in order to avoid an infinite loop.
6778
6779 * print.c (scm_prin1): Remember old state of pstate->writingp.
6780
73be1d9e
MV
67812003-04-05 Marius Vollmer <mvo@zagadka.de>
6782
6783 * Changed license terms to the plain LGPL thru-out.
6784
ad815c06
RB
67852003-04-04 Rob Browning <rlb@defaultvalue.org>
6786
6787 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6788 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6789 rewrite to handle GMP bignums.
6790
6791
6792 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6793
6794 * ports.c (scm_getc): minor tweak.
6795
6796 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6797 rewrite to handle GMP bignums.
6798
6799 * numbers.c: rewrite *many* functions to handle GMP bignums.
6800
6801 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6802 handle GMP bignums.
6803
6804 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6805
6806 * init.c (check_config): remove SCM_BIGDIG conditionals.
6807 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6808
6809 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6810
6811 * eval.c: remove SCM_BIGDIG conditionals.
6812
6813 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6814
6cdb8c3f
RB
68152003-03-31 Rob Browning <rlb@defaultvalue.org>
6816
6817 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6818 to Kevin Ryde.)
6819
68202003-03-27 Rob Browning <rlb@defaultvalue.org>
6821
6822 * threads.h: fix various preprocessor usages of new public
6823 symbols to expect 0 or 1 values rather than 1 or undefined.
6824 i.e. change #ifdef to #if, etc.
6825
6826 * threads.c: fix various preprocessor usages of new public
6827 symbols to expect 0 or 1 values rather than 1 or undefined.
6828 i.e. change #ifdef to #if, etc.
6829
6830 * tags.h: fix various preprocessor usages of new public
6831 symbols to expect 0 or 1 values rather than 1 or undefined.
6832 i.e. change #ifdef to #if, etc.
6833
6834 * stacks.c: fix various preprocessor usages of new public
6835 symbols to expect 0 or 1 values rather than 1 or undefined.
6836 i.e. change #ifdef to #if, etc.
6837
6838 * stackchk.h: fix various preprocessor usages of new public
6839 symbols to expect 0 or 1 values rather than 1 or undefined.
6840 i.e. change #ifdef to #if, etc.
6841
6842 * stackchk.c: fix various preprocessor usages of new public
6843 symbols to expect 0 or 1 values rather than 1 or undefined.
6844 i.e. change #ifdef to #if, etc.
6845
6846 * sort.c: fix various preprocessor usages of new public
6847 symbols to expect 0 or 1 values rather than 1 or undefined.
6848 i.e. change #ifdef to #if, etc.
6849
6850 * read.c: fix various preprocessor usages of new public
6851 symbols to expect 0 or 1 values rather than 1 or undefined.
6852 i.e. change #ifdef to #if, etc.
6853
6854 * random.c: fix various preprocessor usages of new public
6855 symbols to expect 0 or 1 values rather than 1 or undefined.
6856 i.e. change #ifdef to #if, etc.
6857
6858 * print.c: fix various preprocessor usages of new public
6859 symbols to expect 0 or 1 values rather than 1 or undefined.
6860 i.e. change #ifdef to #if, etc.
6861
6862 * objects.c: fix various preprocessor usages of new public
6863 symbols to expect 0 or 1 values rather than 1 or undefined.
6864 i.e. change #ifdef to #if, etc.
6865
6866 * numbers.h: fix various preprocessor usages of new public
6867 symbols to expect 0 or 1 values rather than 1 or undefined.
6868 i.e. change #ifdef to #if, etc.
6869
6870 * null-threads.c: fix various preprocessor usages of new public
6871 symbols to expect 0 or 1 values rather than 1 or undefined.
6872 i.e. change #ifdef to #if, etc.
6873
6874 * lang.c: fix various preprocessor usages of new public
6875 symbols to expect 0 or 1 values rather than 1 or undefined.
6876 i.e. change #ifdef to #if, etc.
6877
6878 * lang.h: fix various preprocessor usages of new public
6879 symbols to expect 0 or 1 values rather than 1 or undefined.
6880 i.e. change #ifdef to #if, etc.
6881
6882 * iselect.h: fix various preprocessor usages of new public
6883 symbols to expect 0 or 1 values rather than 1 or undefined.
6884 i.e. change #ifdef to #if, etc.
6885
6886 * init.c: fix various preprocessor usages of new public
6887 symbols to expect 0 or 1 values rather than 1 or undefined.
6888 i.e. change #ifdef to #if, etc.
6889
6890 * gh_data.c: fix various preprocessor usages of new public
6891 symbols to expect 0 or 1 values rather than 1 or undefined.
6892 i.e. change #ifdef to #if, etc.
6893
6894 * gh.h: fix various preprocessor usages of new public
6895 symbols to expect 0 or 1 values rather than 1 or undefined.
6896 i.e. change #ifdef to #if, etc.
6897
6898 * gen-scmconfig.c: change most new public symbols to be defined to
6899 0 or 1 rather than being either 1 or undefined.
6900
6901 * gc_os_dep.c: fix various preprocessor usages of new public
6902 symbols to expect 0 or 1 values rather than 1 or undefined.
6903 i.e. change #ifdef to #if, etc.
6904 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6905
6906 * gc.h: fix various preprocessor usages of new public
6907 symbols to expect 0 or 1 values rather than 1 or undefined.
6908 i.e. change #ifdef to #if, etc.
6909
6910 * gc-card.c: fix various preprocessor usages of new public
6911 symbols to expect 0 or 1 values rather than 1 or undefined.
6912 i.e. change #ifdef to #if, etc.
6913
6914 * gc-mark.c: fix various preprocessor usages of new public
6915 symbols to expect 0 or 1 values rather than 1 or undefined.
6916 i.e. change #ifdef to #if, etc.
6917
6918 * feature.c: fix various preprocessor usages of new public
6919 symbols to expect 0 or 1 values rather than 1 or undefined.
6920 i.e. change #ifdef to #if, etc.
6921
6922 * evalext.c: fix various preprocessor usages of new public
6923 symbols to expect 0 or 1 values rather than 1 or undefined.
6924 i.e. change #ifdef to #if, etc.
6925
6926 * eval.h: fix various preprocessor usages of new public
6927 symbols to expect 0 or 1 values rather than 1 or undefined.
6928 i.e. change #ifdef to #if, etc.
6929
6930 * eval.c: fix various preprocessor usages of new public
6931 symbols to expect 0 or 1 values rather than 1 or undefined.
6932 i.e. change #ifdef to #if, etc.
6933
6934 * eq.c: fix various preprocessor usages of new public
6935 symbols to expect 0 or 1 values rather than 1 or undefined.
6936 i.e. change #ifdef to #if, etc.
6937
6938 * coop.c: fix various preprocessor usages of new public
6939 symbols to expect 0 or 1 values rather than 1 or undefined.
6940 i.e. change #ifdef to #if, etc.
6941
6942 * coop-threads.c: fix various preprocessor usages of new public
6943 symbols to expect 0 or 1 values rather than 1 or undefined.
6944 i.e. change #ifdef to #if, etc.
6945
6946 * coop-pthreads.c: fix various preprocessor usages of new public
6947 symbols to expect 0 or 1 values rather than 1 or undefined.
6948 i.e. change #ifdef to #if, etc.
6949
6950 * coop-defs.h: fix various preprocessor usages of new public
6951 symbols to expect 0 or 1 values rather than 1 or undefined.
6952 i.e. change #ifdef to #if, etc.
6953
6954 * convert.i.c: fix various preprocessor usages of new public
6955 symbols to expect 0 or 1 values rather than 1 or undefined.
6956 i.e. change #ifdef to #if, etc.
6957
6958 * continuations.c: fix various preprocessor usages of new public
6959 symbols to expect 0 or 1 values rather than 1 or undefined.
6960 i.e. change #ifdef to #if, etc.
6961
6962 * _scm.h: fix various preprocessor usages of new public symbols to
6963 expect 0 or 1 values rather than 1 or undefined. i.e. change
6964 #ifdef to #if, etc.
6965
d11d697a
MV
69662003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6967
9686f86d
MV
6968 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6969
6970 * deprecated.c, deprecated.h: New files, to collect deprecated
6971 things in one place.
6972 * Makefile.am: Added them in all the right places.
6973
d11d697a
MV
6974 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6975 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6976 builds work.
9686f86d
MV
6977 (DOT_X_FILES): Removed "iselect.x".
6978 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 6979
e3c0c3b9
RB
69802003-03-25 Rob Browning <rlb@defaultvalue.org>
6981
6982 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6983 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6984
6985 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6986
6987 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6988
6989 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6990 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6991
6992 * threads.h: replace usage of struct timespect with
6993 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6994 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6995 favor of scm_t_timespec from scmconfig.h.
6996
6997 * threads.c: move libguile/_scm.h include to the top so we pick up
6998 any critical defines like _GNU_SOURCE early. Replace usage of
6999 struct timespect with scm_t_timespec. Replace usage of
7000 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
7001 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
7002
7003 * threads-plugin.h: replace usage of struct timespect with
7004 scm_t_timespec.
7005
7006 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
7007 usage of struct timespect with scm_t_timespec.
7008
7009 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
7010 HAVE_INTTYPES_H handling to scmconfig.h. #include
7011 "libguile/__scm.h". Rework handling for scm_t_bits,
7012 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7013 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
7014 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
7015 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
7016 SCM_HAVE_ARRAYS.
7017
7018 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
7019
7020 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7021
7022 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7023
7024 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7025
7026 * stime.h: move handling of time related headers to scmconfig.h.
7027
7028 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7029
7030 * stacks.c: replace usage of STACK_GROWS_UP with
7031 SCM_STACK_GROWS_UP.
7032
7033 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7034 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7035
7036 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7037 of uint32 and HAVE_UINT_32 with scm_t_int32.
7038
7039 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7040
7041 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7042
7043 * script.c: #include <config.h> if HAVE_CONFIG_H.
7044
7045 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7046
7047 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7048
7049 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7050
7051 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7052
7053 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7054
7055 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7056
7057 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7058 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7059 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7060 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7061
7062 * ramap.c: replace usage of HAVE_LONG_LONGS with
7063 "SCM_SIZEOF_LONG_LONG != 0".
7064
7065 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7066 "libguile/scmconfig.h".
7067
7068 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7069
7070 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7071 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7072
7073 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7074
7075 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7076
7077 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7078
7079 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7080 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7081 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7082 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7083 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7084 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7085 "SCM_SIZEOF_LONG_LONG != 0".
7086
7087 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7088 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7089 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7090 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7091
7092 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7093
7094 * null-threads.h: replace usage of struct timespect with
7095 scm_t_timespec.
7096
7097 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7098
7099 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7100 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7101 scm_t_uint64 and rename usages.
7102
7103 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7104
7105 * load.c: #include <config.h> if HAVE_CONFIG_H.
7106
7107 * iselect.h: move handling of time related headers to scmconfig.h.
7108 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7109 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7110 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7111
7112 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7113 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7114 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7115
7116 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7117
7118 * inline.h: #include "libguile/__scm.h" at the top. Change code
7119 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7120 what to do instead of creating a new public #define. Rename usage
7121 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7122 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7123 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7124
7125 * inline.c: rearrange handling -- now we just #define
7126 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7127 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7128 appropriate, and we use that in inline.h along with the above
7129 define to determine how to respond.
7130
7131 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7132 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7133
7134 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7135
7136 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7137 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7138
7139 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7140
7141 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7142
7143 * gen-scmconfig.c: new file -- see comments in file for details.
7144
7145 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7146
7147 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7148 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7149
7150 * gc.h: replace usage of SIZEOF_LONG with
7151 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7152 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7153 since we handle that in scmconfig.h now.
7154
7155 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7156
7157 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7158 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7159 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7160
7161 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7162
7163 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7164 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7165
7166 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7167
7168 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7169
7170 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7171 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7172
7173 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7174
7175 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7176 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7177
7178 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7179 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7180 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7181 with "SCM_SIZEOF_LONG_LONG != 0".
7182
7183 * error.c: #include <config.h> if HAVE_CONFIG_H.
7184
7185 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7186 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7187 with "SCM_SIZEOF_LONG_LONG != 0".
7188
7189 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7190
7191 * coop.c: replace usage of struct timespect with scm_t_timespec.
7192 #include <config.h> if HAVE_CONFIG_H.
7193
7194 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7195 usage of struct timespect with scm_t_timespec. Replace usage of
7196 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7197
7198 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7199 usage of struct timespect with scm_t_timespec. Replace usage of
7200 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7201
7202 * coop-defs.h: move handling of time related headers to
7203 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7204 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7205 timespect with scm_t_timespec.
7206
7207 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7208
7209 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7210
7211 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7212 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7213
7214 * continuations.c: move libguile/_scm.h include to the top so we
7215 pick up any critical defines like _GNU_SOURCE early.
7216
7217 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7218
7219 * async.c: #include <config.h> if HAVE_CONFIG_H.
7220
7221 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7222
7223 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7224 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7225
7226 * __scm.h: move libguile/scmconfig.h include up to the top, so
7227 we're sure to pick up any critical defines like _GNU_SOURCE early.
7228 #include <limits.h> removed in favor of scmconfig.h inclusion when
7229 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7230 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7231 scmconfig.h inclusion when appropriate. Various Win32 related
7232 definitions removed in favor of scmconfig.h inclusion when
7233 appropriate.
7234 (HAVE_UINTPTR_T): definition removed (see NEWS).
7235 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7236 (HAVE_LONG_LONGS): definition removed (see NEWS).
7237 (HAVE_LONG_LONG): definition removed (see NEWS).
7238 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7239
7240 * Makefile.am: scmconfig.h is now generated by building and
7241 running gen-scmconfig.h and capturing its output. gen-scmconfig
7242 uses config.h and the configure.in generated gen-scmconfig.h to
7243 decide what to output. See gen-scmconfig.c for details.
7244 (noinst_PROGRAMS): add gen-scmconfig.
7245 (gen_scmconfig_SOURCES): new variable.
7246 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7247 cross-compiling right.
7248 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7249 (BUILT_SOURCES): add scmconfig.h.
7250
25e0bf97
MV
72512003-03-19 Marius Vollmer <mvo@zagadka.de>
7252
7253 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7254 Adrian Bunk. Thanks!
7255
74b6d6e4
MD
72562003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7257
7258 * goops.c (make_class_from_template): New fourth arg:
7259 applicablep.
7260 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7261 cpls.
7262
7263 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7264
7265 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7266 second arg: applicablep.
7267 (scm_i_inherit_applicable): New function.
7268
7269 * goops.c, goops.h (scm_class_applicable,
7270 scm_class_extended_accessor): New classes.
7271
5c9e7dad
DH
72722003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7273
7274 * procs.c (scm_procedure_documentation): Removed redundant
7275 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7276 predicates.
7277
f8af5c6d
MD
72782003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7279
c614a00b
MD
7280 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7281
109c2c9f
MD
7282 * modules.c (scm_module_import_interface): New function.
7283
f8af5c6d
MD
7284 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7285 scm_class_accessor.
7286 (scm_class_accessor): New class.
7287
a48d60b1
MD
72882003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7289
7290 * goops.c (scm_primitive_generic_generic): Enable primitive
7291 generic if not enabled.
7292 (scm_sys_goops_loaded): Setup unextended primitive generics.
7293
7294 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7295
7296 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7297 snarf macros.
7298
7299 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7300 testing example. All uses of SCM_GPROC should be converted.)
7301
7302 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7303 scm_assoc.
7304
7305 * eq.c (scm_equal_p): Turned into a primitive generic.
7306
84edc049
RB
73072003-02-27 Rob Browning <rlb@defaultvalue.org>
7308
7309 * Makefile.am (scmconfig.h): new target -- generate file from
7310 ../config.h.
7311 (modinclude_HEADERS): remove version.h.
7312 (nodist_modinclude_HEADERS): add version.h.
7313
ea5c9285
MD
73142003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7315
b4a1358c
MD
7316 This fixes a serious GC bug, introduced during the latest
7317 reorganization of the GC, which disabled freeing of structs and
7318 GOOPS objects:
7319
7320 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7321 SCM_EOL.
53af8255
MD
7322 (scm_struct_prehistory): Move scm_free_structs to
7323 scm_before_mark_c_hook.
ea5c9285 7324
b4a1358c
MD
7325 * gc-card.c (sweep_card): Check that we haven't swept structs on
7326 this card before. That can happen if scm_i_sweep_all_segments has
7327 been called from some other place than scm_igc.
7328
c35738c1
MD
73292003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7330
231a4ea8
MD
7331 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7332 (since hash tables now adapt their size).
7333
7334 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7335 (current number of prehistory bindings; hashtable code will select
7336 a prime which is greater than this value).
7337
7338 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7339 (current number of initial symbols).
7340
7341 * properties.c (scm_init_properties): Don't specify size of
7342 scm_properties_whash.
7343
7344 * objprop.c (scm_init_objprop): Don't specify size of
7345 scm_object_whash.
7346
7347 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7348
c35738c1
MD
7349 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7350
7351 The following changes introduce the use of resizable hash tables
7352 throughout Guile. It also renames the old *-hash-table* functions
7353 to *-alist-vector* and places them, together with the rest of the
7354 weak vector support, in the module (ice-9 weak-vector). We should
7355 probably introduce a new, better, API for weak references, for
7356 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7357 look like and are used like ordinary pairs.)
7358
7359 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7360 leaf_environment_fold, obarray_remove_all): Use hashtable
7361 accessors.
7362
7363 * gc.c (scm_init_storage): Moved hook initialization to
7364 scm_storage_prehistory.
7365 (scm_storage_prehistory): New function.
7366 (scm_igc): Added commentary about placement of
7367 scm_after_sweep_c_hook.
7368
7369 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7370 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7371 SCM_WVECT_WEAK_VALUE_P.
7372
7373 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7374 functions.
7375 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7376 Removed.
7377 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7378 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7379
7380 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7381 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7382
7383 * modules.c (module-reverse-lookup): Use hashtable accessors.
7384
7385 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7386
7387 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7388 scm_make_weak_value_alist_vector,
7389 scm_make_doubly_weak_alist_vector): New functions.
7390
7391 * weaks.c (scm_init_weaks_builtins): New function.
7392
7393 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7394 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7395 SCM_WVECT_NOSCAN_P): New macros.
7396
7397 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7398 and SCM_WVECT_WEAK_VALUE_P.
7399
7400 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7401 allocate_weak_vector and exported.
7402
0a4c1355
MD
74032003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7404
7405 * hashtab.c: Undid thread safety. (We decided that it's better to
7406 let the user explicitly protect the tables (or not) according what
7407 is suitable for the application.)
7408
87ca11ff
MD
74092003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7410
7411 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7412 thread safe and handle resizing tables.
7413 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7414 SCM_DEFER/ALLOW_INTS.
7415
f59a096e
MD
74162003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7417
7418 * hashtab.c (scm_vector_to_hash_table,
7419 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7420 functions.
7421 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7422 safe and handle resizing tables.
7423
7424 * weaks.c (scm_make_weak_key_hash_table,
7425 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7426 Size argument made optional. Return resizable table if not
7427 specified.
7428
4b612c5b
MD
74292003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7430
7431 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7432 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7433
b3d7f6df
MD
74342003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7435
7436 * debug.c (scm_procedure_source): Handle all objects for which
7437 procedure? is #t. (Thanks to Bill Schottstaedt.)
7438
756414cf
MD
74392003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7440
361d631f
MD
7441 * futures.c (mark_futures): Don't need to mark data of recycled
7442 futures.
7443 (scan_futures, cleanup_undead): Be smarter about marking
7444 futures---avoid unnecessary passes through future lists.
7445
756414cf
MD
7446 * futures.h, futures.c: New files; Introduced recycling of
7447 futures. For fine-grained threading this lifts performance to
7448 another level. We can now use parallelization in inner loops of
7449 Guile programs without impossible overhead.
7450
7451 * threads.h, threads.c: Moved futures to their own file.
7452
7453 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7454 (DOT_X_FILES): Added futures.x.
7455 (DOT_DOC_FILES): Added futures.doc.
7456 (modinclude_HEADERS): Added futures.h.
7457
7458 * threads.c, threads.h (scm_i_create_thread): Renamed from
7459 create_thread and made global.
7460
7461 * futures.c (scm_make_future): New procedure.
7462
7463 * eval.c: #include "libguile/futures.h".
7464
7465 * init.c: #include "futures.h"
7466 (scm_init_guile_1): Call scm_init_futures.
7467
7468 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7469
7470 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7471
7472 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7473 functions.
7474
7475 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7476
b4debead
MD
74772003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7478
7479 * threads.c (create_thread): Don't unwind dynwind chain of parent
7480 thread before creation. Just start the new thread with an empty
7481 dynwind chain.
7482
93f26b7b
MD
74832003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7484
7485 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7486
38d8927c
MD
74872003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7488
41c96c32
MD
7489 * threads.c (scm_timed_wait_condition_variable): Support timed
7490 waiting also for simple condition variables.
7491
38d8927c
MD
7492 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7493 of calling the procedure change-object-class.
7494
9cf5d9b7
MD
74952003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7496
7497 * ramap.c (scm_ramapc): Typo in error message.
7498
bbf8d523
MD
74992003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7500
b46fae00
MD
7501 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7502 slots with instance allocation.
7503
bbf8d523
MD
7504 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7505 class.
7506 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7507
7508 * goops.c (scm_generic_function_methods): Support extended
7509 generic functions.
7510
ebf9b47c
MD
75112002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7512
7513 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7514 Thanks to Neil for pointing this out!
ebf9b47c 7515
14a9ba3f
NJ
75162002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7517
7518 * lang.h: Remove declarations matching definitions removed from
7519 lang.c (just below).
7520
c6a040a8
NJ
75212002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7522
6054d805
NJ
7523 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7524 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7525 and already commented out.
7526
c6a040a8
NJ
7527 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7528 scm_lreadparen): Support reading vectors with Elisp syntax if
7529 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7530 is not currently defined, and there isn't even a configure switch
7531 to enable it yet.)
7532
3742c12f
MV
75332002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7534
7535 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7536 builds work.
7537 (EXTRA_DIST): Added version.h.in.
7538
fb50ef08
MD
75392002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7540
7541 This change makes it possible for one thread to do lazy sweeping
7542 while other threads are running. Now only the mark phase need to
7543 have all threads asleep. We should look further into this issue.
7544 Presently, I've put the locking of scm_i_sweep_mutex at
7545 "conservative" places due to my current lack of knowledge about
7546 the garbage collector. Please feel free to restrict these regions
7547 further to allow for maximal parallelism!
7548
7549 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7550
7551 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7552 scm_gc_register_collectable_memory): Substitute locking of
7553 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7554 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7555 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7556 the single-thread section (which now only contains the mark
7557 phase).
7558 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7559 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7560
7561 * threads.c (gc_section_mutex): Removed.
7562
9ed24633
MD
75632002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7564
0d48aca5
MD
7565 * threads.c (create_thread): Clear parent field in root state in
7566 order not to unnecessarily remember dead threads.
7567
9ed24633
MD
7568 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7569 (scm_trampoline_1, scm_trampoline_2): Use them.
7570
29717c89
MD
75712002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7572
7573 Partial introduction of real plugin interface.
7574
7575 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7576 (EXTRA_DIST): Added threads-plugin.c.
7577
7578 * threads-plugin.h, threads-plugin.c: New files.
7579
7580 * threads.h: #include "libguile/threads-plugin.h".
7581
7582 * threads.c: #include "libguile/threads-plugin.c".
7583
7584 * pthread-threads.c: Temporarily remove debugging functions.
7585
7586 * threads.c, threads.h (scm_yield): Added back.
7587
e29e0b09
MD
75882002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7589
7590 * threads.c (really_launch): Detach before unlocking
7591 thread_admin_mutex in order not to risk being joined.
7592 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7593 thread_admin_mutex locked during GC.
7594
7595 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7596 functions.
7597
0b6843b1 75982002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7599
6da2dfc4
MD
7600 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7601 support for debugging mutex operations.
7602
1b92fb6b
MD
7603 * threads.c (scm_thread): Removed filed joining_threads.
7604 (thread_print): Print thread number as well as address of thread
7605 structure.
0b6843b1
MD
7606 (scm_join_thread): Bugfix.
7607 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7608 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7609 scm_broadcast_condition_variable): Use the low-level API.
7610 (scm_all_threads): Return copy of thread list (to prevent
7611 unintended destruction).
7612 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7613
93cd4dcd
MD
7614 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7615 pthread "native" recursive mutex support.
7616
2ff4f181
MD
76172002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7618
28d52ebb
MD
7619 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7620 Simply lock a thread C API recursive mutex.
7621 (SCM_NONREC_CRITICAL_SECTION_START,
7622 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7623 SCM_REC_CRITICAL_SECTION_END): Removed.
7624
7625 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7626 direct calls to scm_rec_mutex_lock / unlock around the three calls
7627 to scm_m_expand_body.
7628
7629 * eval.c, eval.h (promise_free): New function.
7630 (scm_force): Rewritten; Now thread-safe; Removed
7631 SCM_DEFER/ALLOW_INTS.
7632
7633 * pthread-threads.h: Added partially implemented plugin interface
7634 for recursive mutexes. These are, for now, only intended to be
7635 used internally within the Guile implementation.
7636
7637 * pthread-threads.c: New file.
7638
7639 * threads.c: Conditionally #include "pthread-threads.c".
7640
7641 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7642 thread-safe;
7643
7644 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7645 SCM_GLOBAL_REC_MUTEX): New macros.
7646
7647 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7648 macros---use mutexes instead.
7649
7650 * tags.h (SCM_IM_FUTURE): New tag.
7651
7652 * eval.c (scm_m_future): New primitive macro.
7653 (SCM_CEVAL): Support futures.
7654 (unmemocopy): Support unmemoization of futures.
7655
7656 * print.c (scm_isymnames): Name of future isym.
7657
2ff4f181
MD
7658 * version.c: Unmade some changes to my private copy that got
7659 committed by mistake.
7660
392d2833
MD
76612002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7662
e200ddee
MD
7663 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7664 2002-12-10.
7665
392d2833
MD
7666 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7667
7668 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7669 logical place.
7670
7671 * threads.c (create_thread): Remember root object until the handle
7672 of the new thread is on all_threads list.
7673
7674 * root.c (scm_make_root): Moved copying of fluids until after
7675 creation of root handle so that the fluids are GC protected. Also
7676 removed the critical section.
7677
c4c52ebe
MD
76782002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7679
960c408c
MD
7680 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7681
3cdde9d6 7682 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7683 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7684 (scm_realloc): Serialize call to realloc
7685 (scm_calloc): Same for calloc.
7686 Thanks to Wolfgang Jaehrling!
7687 (Now we have to make sure all calls to malloc/realloc are made
7688 through scm_malloc.)
7689
960c408c
MD
7690 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7691
c4c52ebe
MD
7692 * threads.c (really_launch): Release heap (to prevent deadlock).
7693 (create_thread): Release heap before locking thread admin mutex.
7694
b0dc3d71
MD
76952002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7696
7697 * threads.c (scm_i_thread_invalidate_freelists): New
7698 function.
7699
7700 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7701
7702 * modules.c (scm_export): Inserted a return statement.
7703
06e80f59
HWN
77042002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7705
7706 * modules.c (scm_export): new function
7707
7708 * gc-card.c: add a note about malloc()/free() overhead.
7709
a12611c3
MD
77102002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7711
7712 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7713 in srcdir.
7714
c7fabadf
MD
77152002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7716
7717 These changes remove scm_ints_disabled (which hasn't has any
7718 effect in Guile for quite some time).
7719
7720 * async.c, error.h (scm_ints_disabled): Removed.
7721
7722 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7723 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7724 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7725 (old_ints): Removed.
7726
7727 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7728 critical section.
7729 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7730 SCM_ALLOW_INTS.
7731
9bc4701c
MD
77322002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7733
52340b65
MD
7734 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7735 Removed accidental #if 0 around these functions.
7736
9bc4701c
MD
7737 These changes are the start of support for preemptive
7738 multithreading. Marius and I have agreed that I commit this code
7739 into the repository although it isn't thoroughly tested and surely
7740 introduces many bugs. The bugs should only be exposed when using
7741 threads, though. Signalling and error handling for threads is
7742 very likely broken. Work on making the implementation cleaner and
7743 more efficient is needed.
7744
7745 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7746 (SCM_NONREC_CRITICAL_SECTION_START,
7747 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7748 SCM_REC_CRITICAL_SECTION_END): New macros.
7749 (SCM_CRITICAL_SECTION_START/END): Defined here.
7750
7751 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7752 the three calls to scm_m_expand_body.
7753
7754 * gc.h: #include "libguile/pthread-threads.h";
7755 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7756
7757 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7758 scm_t_key;
7759
7760 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7761 access.
7762
7763 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7764
7765 * gc-freelist.c, threads.c (really_launch): Use
7766 SCM_FREELIST_CREATE.
7767
7768 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7769
7770 * gc.c (scm_i_expensive_validation_check, scm_gc,
7771 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7772 heap administration so that those pieces of code are executed
7773 single-threaded. We might consider rewriting these code sections
7774 in terms of a "call_gc_code_singly_threaded" construct instead of
7775 calling the pair of scm_i_thread_put_to_sleep () and
7776 scm_i_thread_wake_up (). Also, we would want to have as many of
7777 these sections eleminated.
7778
7779 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7780
7781 * inline.h: #include "libguile/threads.h"
7782
7783 * pthread-threads.h: Macros now conform more closely to the
7784 pthreads interface. Some of them now take a second argument.
7785
7786 * threads.c, threads.h: Many changes.
7787
77882002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7789
7790 * Makefile.am (version.h): Changed $^ --> $< in rule for
7791 version.h.
7792
b2cbe8d8
RB
77932002-12-08 Rob Browning <rlb@defaultvalue.org>
7794
7795 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7796 (SCM_MINOR_VERSION): use @--@ substitution now.
7797 (SCM_MICRO_VERSION): use @--@ substitution now.
7798 (scm_effective_version): new function prototype.
7799
7800 * version.c (scm_effective_version): new function, also add
7801 effective-version.
7802
7803 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7804 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7805 SCM_LIBRARY_DIR.
7806 (version.h): generate this here rather than configure.in. This
7807 approach tracks source edits better (i.e. more immediately).
7808 Might be worth considering for other .in files too.
7809
5441c65c
MV
78102002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7811
7812 Reorganized thread package selection. A thread package now only
7813 implements a small set of pthread like functions and Guile
7814 implements the rest on top of that. Guile's implementation is
7815 what the "coop-pthreads" package has been previously. Support for
7816 "coop" threads has been removed until I get time to add it again.
7817
7818 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7819 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7820 null-threads.c, coop-pthreads.c.
7821 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7822 pthread-threads.h.
7823
7824 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7825
7826 * threads.h: Do not include "libguile/coop-defs.h". Include
7827 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7828 (previously deprecated) C level thread API prototypes. They are
7829 now in the thread package specific headers, "null-threads.h" and
7830 "pthread-threads.h".
7831 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7832 New.
7833 (scm_threads_init): Removed.
7834 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7835 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7836 SCM_I_THREAD_SWITCH_COUNT): Define here.
7837 (scm_single_thread_p): Removed.
7838 (scm_call_with_new_thread): Take two args directly instead of list
7839 of two args.
7840 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7841 SCM_SET_THREAD_LOCAL_DATA): Define here.
7842
7843 * threads.c: Merged with "coop-pthreads.c".
7844
7845 * null-threads.h: Implement pthread-like API as a set of macros.
7846
7847 * pthread-threads.h: New, implement pthread-like API by deferring
7848 to pthread itself.
7849
7850 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7851 has been lost in the reorganization.
7852
504d99c5
MD
78532002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7854
7855 The following change makes it possible to move procedure
7856 application dispatch outside inner loops. The motivation was
7857 clean implementation of efficient replacements of R5RS primitives
7858 in SRFI-1.
7859
7860 The semantics is clear: scm_trampoline_N returns an optimized
7861 version of scm_call_N (or NULL if the procedure isn't applicable
7862 on N args).
7863
7864 Applying the optimization to map and for-each increases efficiency
7865 noticeably. For example, (map abs ls) is 8 times faster than
7866 before.
7867
7868 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7869
7870 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7871
7872 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7873 (map, for-each): Handle also application on two args as a special
7874 case; Use trampolines.
7875
7876 Other changes:
7877
7878 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7879 (subr2oless): Removed.
7880 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7881 vector GC protected.
7882
7883 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7884 scm_out_of_range.
7885
63dd3413
DH
78862002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7887
7888 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7889
4ba5f279
MD
78902002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7891
7892 * debug.c (scm_make_iloc): Added missing "return".
7893
56ae231f
MV
78942002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7895
7896 * strports.c (scm_eval_string_in_module): Validate second arg to
7897 be a module. Thanks to Arno Peters!
7898
80b28865
DH
78992002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7900
7901 * .cvsignore: remove goops.c
7902
c88b1456
DH
79032002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7904
7905 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7906 module_variable, scm_module_lookup_closure,
7907 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7908 scm_system_module_env_p): Don't compare SCM values with C
7909 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7910 over SCM_NFALSEP.
7911
a8a19efc
DH
79122002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7913
7914 * eval.h (SCM_MAKE_ILOC): New macro.
7915
7916 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7917 the iloc bitpattern here.
7918
76734914
MD
79192002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7920
7921 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7922 part of the API, otherwise it's difficult to write Guile
7923 extensions using non-blocking I/O => moved #include
7924 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7925
7926 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7927 s_unlock_mutex.
7928
8b5b4a75
MV
79292002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7930
7931 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7932 are defined in configure.in.
7933
7934 * threads.c: Removed SCM_API from function definitions. SCM_API
7935 is only for declarations.
7936
e5a83084
MD
79372002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7938
9be8bb45
MD
7939 * coop-pthreads.h: Added support for thread specific data to the
7940 generic C API for the coop-pthreads case.
7941
e5a83084
MD
7942 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7943 change.
6c214b62 7944 (scm_cond_broadcast): Added missing function.
e5a83084 7945
7edf178e
MV
79462002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7947
7948 * coop.c (coop_next_runnable_thread): Removed, wich should have
7949 happened when GUILE_ISELECT was hard-wired.
7950
7f5b1b77
MV
79512002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7952
7caa1b07
MV
7953 * Makefile.am (libguile_la_SOURCES): Added threads.c
7954 (DOT_DOC_FILES): Added threads.doc.
7955 (DOT_X_FILES): Added threads.x.
7956 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7957 (noinst_HEADERS): Added coop-pthreads.c.
7958 (modinclude_HEADERS): Added coop-pthreads.h.
7959
7960 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7961 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7962
bb11cbf4
MV
7963 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7964 Thanks to Bill Schottstaedt!
7965
1d4cbbed
MV
7966 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7967
7f5b1b77
MV
7968 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7969 SCM_COPT_THREADS is defined.
7970 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7971 is defined.
7972
7973 * coop-pthreads.c: Some harmless renamings of internal stuff.
7974 (create_thread): New, generalized version of
7975 scm_call_with_new_thread.
7976 (scm_call_with_new_thread): Use it.
7977 (scm_spawn_thread): New, use create_thread.
7978
d52f53b1
MV
79792002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7980
7981 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7982 start testing it now.
7983
7984 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7985 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7986 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7987 is defined.
7988
30f920c3
MV
79892002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7990
7991 * scmsigs.c (signal_cell_handlers, install_handler_data,
7992 scm_delq_spine_x, really_install_handler, install_handler): New
7993 scheme for triggering signal handlers, to simplify take_signal.
7994 (take_signal): Simplified, to avoid race conditions.
7995 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7996 hasn't exited yet.
7997
7998 * async.c (scm_async_click): Reset pending_asyncs, handle
7999 signal_asyncs. Don't set cdr of a non-signal async to #f.
8000 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
8001 always. Set pending_asyncs.
8002 (scm_system_async_mark_for_thread): Check that thread has not
8003 exited.
8004 (scm_unmask_signals, decrease_block): Call scm_async_click after
8005 block_asyncs becomes zero.
8006
8007 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
8008 active_asyncs.
8009
8010 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
8011 fields.
8012 * root.c (root_mark): Mark them.
8013 (make_root): Initialize them.
8014
8015 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
8016 USE_COOP_THREADS.
8017 (scm_internal_select): Define one version for USE_COOP_THREADS and
8018 one for USE_NULL_THREADS.
8019 (scm_init_iselect): Likewise.
8020
8021 * inline.h (scm_cell, scm_double_cell): Also allow
8022 USE_COPT_THREADS to not protect the slot initializers.
8023
8024 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8025 because threads need to be initialized before the stack, but
8026 gsubrs such as scm_timed_condition_variable_wait can only be
8027 created later.
8028
8029 * threads.h: Include "coop-pthreads.h" when requested.
8030 (scm_threads_make_mutex, scm_threads_lock_mutex,
8031 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8032 not implemented anyway.
8033 (scm_init_thread_procs, scm_try_mutex,
8034 scm_timed_condition_variable_wait,
8035 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8036 scm_thread_exited_p): New prototypes.
8037 (struct timespec): Define if not already defined.
8038 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8039 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8040 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8041 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8042 deprecated.
8043
8044 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8045 requested.
8046 (scm_thread_exited_p): New.
8047 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8048 registered procedures.
8049 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8050 Use the latter as the procedure for "wait-condition-variable",
8051 thus offering a optional timeout parameter to Scheme.
8052 (scm_wait_condition_variable): Implement in terms of
8053 scm_timed_wait_condition_variable.
8054 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8055 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8056 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8057 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8058 scm_make_mutex, etc, and deprecate.
8059 (scm_init_threads): Do not create smobs, leave this to
8060 scm_threads_init. Do not include "threads.x" file.
8061 (scm_init_thread_procs): New, include "threads.x" here.
8062
8063 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8064 scm_null_mutex_lock, scm_null_mutex_unlock,
8065 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8066 scm_null_condvar_wait, scm_null_condvar_signal,
8067 scm_null_condvar_destroy): Removed.
8068 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8069 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8070 scm_cond_destory): Do not define, they are now deprecated and
8071 handled by threads.{h,c}.
8072
8073 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8074 (scm_threads_init): Create smobs here, using the appropriate
8075 sizes.
8076 (block): Removed, now unused.
8077 (scm_c_thread_exited_p): New.
8078 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8079 scm_null_mutex_destroy, scm_null_condvar_init,
8080 scm_null_condvar_wait, scm_null_condvar_signal,
8081 scm_null_condvar_destroy): Removed and updated users to do their
8082 task directly.
8083 (scm_try_mutex, timeval_subtract,
8084 scm_timed_wait_condition_variable,
8085 scm_broadcast_condition_variable): New.
8086 (scm_wait_condition_variable): Removed.
8087
8088 * coop-defs.h (coop_m): Added 'level' field.
8089 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8090 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8091 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8092 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8093 define.
8094 (coop_condition_variable_broadcast): New.
8095
8096 * coop-threads.c (scm_threads_init): Create smobs here, using the
8097 appropriate sizes.
8098 (scm_c_thread_exited_p, scm_try_mutex,
8099 scm_timed_wait_condition_variable,
8100 scm_broadcast_condition_variable): New.
8101 (scm_wait_condition_variable): Removed.
8102
8103 * coop.c (coop_new_mutex_init): Initialize level.
8104 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8105 level.
8106 (coop_condition_variable_signal): Renamed to
8107 coop_condition_variable_broadcast and reimplemented in terms of
8108 that. Thus...
8109 (coop_condition_variable_broadcast): New.
8110
8111 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8112
8113 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8114
087ed40d
MV
81152002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8116
65a23095
MV
8117 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8118 of system headers.
8119
087ed40d
MV
8120 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8121 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8122 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8123
5ec1d2c8
DH
81242002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8125
8126 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8127 scm_definedp to scm_defined_p and deprecated scm_definedp.
8128
100ae50d
DH
81292002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8130
8131 * async.h, async.c (scm_system_async): Fixed deprecation to work
8132 correctly when deprecated features are excluded.
8133
2794cb50
MV
81342002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8135
8136 * async.c (scm_system_async_mark_for_thread): Validate thread
8137 argument.
8138
8139 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8140
8141 * feature.c (scm_init_feature): Don't add 'threads' for
8142 USE_NULL_THREADS.
8143
8144 * inline.h (scm_cell, scm_double_cell): Also allow
8145 USE_NULL_THREADS to not protect the slot initializers.
8146
8147 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8148 "USE_THREAD".
8149
8150 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8151 (modinclude_HEADERS): Added null-threads.h.
8152
8153 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8154 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8155 (scm_init_threads): Use generic type names scm_t_mutex and
8156 scm_t_cond instead of coop_m and coop_c.
8157
8158 * null-threads.c, null-threads.h: New files.
8159
ff810d7a
MV
81602002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8161
8162 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8163 This is to support makes that know about "$<" only in pattern
8164 rules, like Sun's make.
8165
a90bdb73
MV
81662002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8167
8168 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8169 substitution. Thanks to David Allouche!
8170
e71a8bf2
DH
81712002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8172
8173 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8174 !SCM_ENABLE_DEPRECATED.
8175
41f77ff5
MV
81762002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8177
504d99c5 8178 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8179 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8180 otherwise.
8181
8182 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8183 USE_THREADS is defined. Use scm_root otherwise.
8184 (scm_sigaction_for_thread): Ignore THREAD argument when
8185 USE_THREADS is not defined. Also, move THREAD argument defaulting
8186 out of HAVE_SIGACTION section, which was a bug.
8187
6d16b125
MV
81882002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8189
8190 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8191 signal_handlers, not the closure that is used as the async.
8192 The closure is stored in signal_handler_cells, as previously.
8193
acfa1f52
MV
81942002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8195
8196 * root.h (scm_root_state): Added 'block_async' slot.
8197 (scm_active_asyncs): Removed abbrev.
8198 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8199
8200 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8201 abbrev.
8202
8203 * async.h (scm_call_with_blocked_asyncs,
8204 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8205 scm_c_call_with_unblocked_asyncs): New prototypes.
8206 (scm_mask_signals, scm_unmask_signals): Deprecated.
8207 (scm_mask_ints): Turned into a macro.
8208 * async.c (scm_mask_ints): Removed.
8209 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8210 this should not be necessary.
8211 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8212 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8213 deprecation warning and check for errornous use. Set block_asyncs
8214 instead of scm_mask_ints.
8215 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8216 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8217 scm_c_call_with_unblocked_asyncs): New.
8218
8219 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8220 Asyncs are enabled by default.
8221
34010f56
NJ
82222002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8223
8224 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8225 6th element: an input waiting thunk.
8226 (sf_input_waiting): New.
8227
9310d6f2
MV
82282002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8229
8230 * root.c (root_mark): Mark active_asyncs slot.
8231
8232 * async.c (scm_async_click): Set the cdr of a executed handler
8233 cell to SCM_BOOL_F, not SCM_EOL.
8234 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8235 and only if the handler procedure is not already present.
8236 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8237 with SCM_BOOL_F.
8238 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8239
ac48c719
RB
82402002-10-04 Rob Browning <rlb@defaultvalue.org>
8241
1360a142
RB
8242 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8243
8244 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8245 scm_lt_dlopenext, and scm_lt_dlerror.
8246 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8247 and scm_lt_dlerror.
8248 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8249 and scm_lt_dlerror.
8250 (sysdep_dynl_init): switch to scm_lt_dlinit();
8251
8252 * Makefile.am (libguile_la_LIBADD): switch to use
8253 libguile-ltdl.la.
8254
504d99c5 8255 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8256
497092c9
MV
82572002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8258
8259 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8260 * scmsigs.c (got_signal): Removed.
8261 (signal_handler_cells, signal_handler_threads): New.
8262 (take_signal): Queue the cell of the signal for the specified
8263 thread. Reset the signal handler on systems that don't have
8264 sigaction.
8265 (sys_deliver_signals): Removed.
8266 (close_1): New.
8267 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8268 extended to also set the thread of a signal and allocate a cell
8269 for it. Keep the Scheme name "sigaction". Check that signum is
8270 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8271 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8272 (scm_init_scmsigs): Allocate signal_handler_cells and
8273 signal_handler_threads vectors.
8274
8275 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8276 that system asnycs and user asyncs are separated. Reimplemented
8277 system asyncs to work per-thread.
8278
8279 * gc.c (scm_init_gc): Do not use scm_system_async.
8280
8281 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8282 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8283 Removed prototypes.
8284 (scm_i_queue_async_cell): New.
8285
8286 * __scm.h (scm_asyncs_pending_p): Removed.
8287 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8288 scm_asyncs_pending_p.
8289
8290 * async.h (scm_system_async_mark_for_thread): New prototype.
8291
8292 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8293
8294 * root.h (scm_root_state): Added new "active_asyncs" slot.
8295 * root.c (scm_make_root): Initialize it to SCM_EOL.
8296
8297 * coop-defs.h (coop_t): Added new "handle" slot.
8298 * coop-threads.c (all_threads, scm_current_thread,
8299 scm_all_threads, scm_i_thread_root): New.
8300 (scm_threads_init): Add main thread to all_threads.
8301 (scheme_launch_thread): Remove thread from all_threads when it
8302 terminates.
8303 (scm_call_with_new_thread): Initialize handle slot of coop_t
8304 structure and add new thread to all_threads.
8305 (scm_spawn_thread): Likewise.
8306
8307 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8308 * threads.c (scm_current_thread, scm_all_threads): Register as
8309 primitives.
8310
8311 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8312
480fa28d
NJ
83132002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8314
8315 * script.c (scm_compile_shell_switches): Fix bad spelling of
8316 `explicitly' in comment.
8317
83182002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8319
8320 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8321 Refer to provided? in doc string rather than deprecated feature?.
8322
3553e1d1
GH
83232002-09-24 Gary Houston <ghouston@arglist.com>
8324
8325 * inline.h (scm_double_cell): prevent reordering of statements
8326 with any following code (for GCC 3 strict-aliasing).
8327 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8328 the earlier version of the reordering prevention.
8329
4ad0814a
HWN
83302002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8331
8332 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8333
e88e4f2e
HWN
83342002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8335
8336 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8337 protection.
8338
1e71eafb
HWN
83392002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8340
8341 * inline.h: include stdio.h
8342
8343 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8344
61ef9c1f
HWN
83452002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8346
dac04e9f
HWN
8347 * gc-segment.c (scm_i_make_initial_segment): check user settings
8348 for sanity.
8349
8350 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8351 sanity.
dac04e9f
HWN
8352
8353 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8354
ffd72400
HWN
8355 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8356
8357 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8358 these won't ever wrap around with high memory usage. Thanks to
8359 Sven Hartrumpf for finding this.
ffd72400 8360
5bd4a949
HWN
8361 * gc-freelist.c: include <stdio.h>
8362
61ef9c1f
HWN
8363 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8364
ffd0ef3b
MV
83652002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8366
a27e3d14
MV
8367 * vectors.h (SCM_VECTOR_REF): New.
8368
ffd0ef3b
MV
8369 * snarf.h (SCM_DEFINE_PUBLIC): New.
8370
f8a1712b
MV
83712002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8372
8373 * socket.c (scm_addr_vector): Added size of address to arguments.
8374 Use it to avoid accessing a non-existent path in a sockaddr_un.
8375 Changed all callers.
8376
7200a36b
HWN
83772002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8378
1383773b
HWN
8379 * gc.h: remove DOUBLECELL card flags.
8380
8381 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8382 scm_realloc().
8383
8384 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8385 init loop; handle this from scm_init_card_freelist()
8386
8387 * gc-card.c (scm_init_card_freelist): init bit vector here.
8388
7200a36b 8389 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8390 num2float.i.c (FLOAT2NUM): idem
7200a36b 8391
9981de3a
HWN
83922002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8393
8394 * eval.h: prepend libguile/ to include path
8395
19647556
MV
83962002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8397
8398 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8399 years. Thanks to Martin Grabmüller!
19647556 8400
38d1262a
HWN
84012002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8402
8403 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8404 unsigned numbers for computing minimum heap increment. This
8405 prevents weird results when a a negative minimum increment is
8406 computed.
8407
f800ebfb
MV
84082002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8409
8410 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8411 instead of the old tricks.
f800ebfb
MV
8412
8413 * guile-snarf.in: Do not expect the input file to be the first
8414 argument after the optional "-o" option, just pass everything to
8415 the pre-processor without extracting the input file name.
8416
4a5309c9
HWN
84172002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8418
8419 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8420 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8421
f2893a25
HWN
84222002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8423
8424 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8425 Bill Schottstaedt for the bug report
8426
483f518b
MV
84272002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8428
8429 * print.c (scm_iprin1): Print primitives generics always as
8430 "primitive-generic" even when they have no primitive methods yet.
8431
917adc55
GH
84322002-08-17 Gary Houston <ghouston@arglist.com>
8433
8434 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8435 call.
8436
67329a9e
HWN
84372002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8438
85835e59 8439 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8440
8441 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8442 malloc.
8443
8444 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8445 only use SCM_MIN_HEAP_SEG_SIZE.
8446
8447 * ports.c (scm_add_to_port_table): add backwards compatibility
8448 function
8449
8450 * ports.h: use scm_i_ prefix for port table and port table size.
8451
f07c886a
MD
84522002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8453
8454 * vports.c (scm_make_soft_port): Initialize pt variable.
8455
dc61cbc6
MV
84562002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8457
8458 * strports.h (scm_c_eval_string_in_module,
8459 scm_eval_string_in_module): New prototypes.
8460 * strports.c (scm_eval_string_in_module): New, but use
8461 "eval-string" as the Scheme name and make second parameter
8462 optional.
8463 (scm_eval_string): Implement using scm_eval_string_in_module.
8464 (scm_c_eval_string_in_module): New.
8465 Thanks to Ralf Mattes for the suggestion!
8466
da220f27
HWN
84672002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8468
be3ff021
HWN
8469 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8470 message and abort.
8471
8472 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8473
da220f27
HWN
8474 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8475 stead of scm_t_port*. The function now takes a tag argument.
8476
eab1b259
HWN
84772002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8478
8479 * gc.h: add scm_debug_cells_gc_interval to public interface
8480
8481 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8482
8483 * gc.c (scm_i_expensive_validation_check): separate expensive
8484 validation checks from cheap ones.
8485
ba1b2226
HWN
84862002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8487
8488 * read.c (scm_input_error): new function: give meaningful error
8489 messages, and throw read-error
8490
8491 * gc-malloc.c (scm_calloc): add scm_calloc.
8492
39e8f371
HWN
84932002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8494
33138b05
HWN
8495 * tags.h: remove GC bits documentation from the tags table.
8496
39e8f371
HWN
8497 * read.c (INPUT_ERROR): Prepare for file:line:column error
8498 messages for errors in scm_lreadr() and friends.
8499
85002002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8501
8502 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8503 implementation).
8504 (scm_gc_calloc): new function
8505
26e68795 85062002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8507
5f16b897
HWN
8508 * ports.c (scm_new_port_table_entry): init port entry to 0
8509 completely.
402788a9
HWN
8510
8511 * ports.c (scm_new_port_table_entry): change function from
8512 scm_add_to_port_table. This prevents cells with null-pointers from
8513 being exposed to GC.
8514
504d99c5 8515 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8516 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8517
504d99c5 8518 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8519 to gc-stats.
8520
c8a1bdc4
HWN
8521 * numbers.c (big2str): return "0" for 0 iso. ""
8522
c2cbcc57
HWN
8523 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8524 private-gc.h: new file
c8a1bdc4
HWN
8525
8526 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8527 sweeping. More documentation in workbook/newgc.text
8528
aea06b34
MV
85292002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8530
8531 * random.c (rstate_free): Return zero.
8532
35060ae9
DH
85332002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8534
8535 * environments.c (remove_key_from_alist): Removed.
8536
8537 (obarray_remove): Simplified.
8538
6a535440
SJ
85392002-07-24 Stefan Jahn <stefan@lkcc.org>
8540
8541 * continuations.h: ia64: Include <signal.h> before
8542 <sys/ucontext.h>.
8543
bcbd25b7
DH
85442002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8545
8546 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8547
26e68795 85482002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8549
8550 * goops.c (scm_compute_applicable_methods): use
8551 scm_remember_upto_here_1 iso scm_remember_upto_here
8552
8553 * macros.c: include deprecation.h
8554
504d99c5 8555 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8556 macro arg.
504d99c5 8557 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8558
8559 * net_db.c, posix.c, socket.c: variable naming: change ans to
8560 result.
8561
8562 * sort.c (scm_merge_vector_x): accept vector as argument
8563 iso. SCM*. This is needed for full GC correctness.
8564
8565 * gc.h: undo previous undocumented changes related to #ifdef
8566 GENGC.
8567
26e68795 85682002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8569
8570 * *.c: add space after commas everywhere.
8571
8572 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8573 Document cases where SCM_WRITABLE_VELTS() is used.
8574
8575 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8576 SCM_VELTS() return a const pointer
8577 (SCM_VECTOR_SET): add macro.
8578
3063e30a
DH
85792002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8580
8581 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8582 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8583 Deprecated the special kind of built-in dynamic syntax transformer
8584 that was inaccurately named "macro". Note: The built-in syntax
8585 transformers that are named "mmacro" or "memoizing-macro" still
8586 exist, and it is these which come much closer to what one would
8587 call a macro.
8588
4c5f8e8f
NJ
85892002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8590
8591 * eval.c (unmemocopy): Fix for
8592 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8593 with internal definitions and local-eval).
8594
4f6f9ae3
GH
85952002-07-12 Gary Houston <ghouston@arglist.com>
8596
8597 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8598 defined. They don't do anything useful, especially since the
8599 only case where DYNAMIC_LINKING is undefined seems to be
8600 when --with-modules=no is given to configure, which is basically
8601 requesting that the "dynamic linking module" be omitted.
8602
8603 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8604 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8605
8606 * extensions.c (load_extension): check DYNAMIC_LINKING for
8607 scm_dynamic_call.
8608 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8609 scm_init_dynamic_linking.
8610
c21935e6
MV
86112002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8612
8613 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8614 check for Cygwin when including <winsock2.h>, this is already
8615 check for by configure. Thus, revert change from 2002-07-07.
8616
ee95d597
GH
86172002-07-10 Gary Houston <ghouston@arglist.com>
8618
9540b68f 8619 * eq.c: include <string.h>
ee95d597
GH
8620 * dynl.c: docstring editing.
8621
46732b54
GH
86222002-07-09 Gary Houston <ghouston@arglist.com>
8623
8624 * dynl.c (scm_dynamic_call): docstring editing.
8625
c09d12e0
RB
86262002-07-08 Rob Browning <rlb@defaultvalue.org>
8627
8628 * gc_os_dep.c: HURD fixes.
8629
3f6571eb
MV
86302002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8631
8632 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8633
8634 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8635 this should be compiled for BUILD host.
8636 Override default rule for
8637 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8638 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8639 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8640
8641 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8642 <winsock2.h> on Cygwin even when we have it.
8643
bd987b8e
DH
86442002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8645
8646 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8647 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8648 the code. Full number of arguments checking of closures is
8649 mandatory now. However, the option to disable the checking has
8650 most probably not been used anyway.
8651
8505e285
DH
86522002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8653
bd987b8e
DH
8654 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8655 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8656 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8657 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8658 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8659 (scm_source_properties, scm_set_source_properties_x,
8660 scm_source_property): Removed compile time option SCM_RECKLESS to
8661 clean up the code. Full number of arguments checking of closures
8662 is mandatory now. However, the option to disable the checking has
8663 most probably not been used anyway.
8505e285
DH
8664
8665 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8666 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8667
2ee08a28
GH
86682002-06-30 Gary Houston <ghouston@arglist.com>
8669
732b9327
GH
8670 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8671 do anything useful. Added a comment about need for a mutex if
8672 pre-emptive threading is supported.
8673
2ee08a28
GH
8674 * posix.c (scm_convert_exec_args), dynl.c
8675 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8676 allocate_string_pointers. 2) simplified: don't reallocate the
8677 strings, just make an array of pointers 3) avoid memory leaks on
8678 error 4) let the procedure report errors in its own name.
8679 Consequences: 1) the procedures now assume that SCM strings are
8680 nul-terminated, which should always be the case. 2) Since strings
8681 are not reallocated, it's now possible for strings passed to
8682 dynamic-args-call to be mutated.
8683
c136c920
DH
86842002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8685
8686 * __scm.h, eval.c, eval.h: Removed compile time option
8687 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8688 variable positions during memoization is mandatory. However, the
8689 option to disable the caching has most probably not been used
8690 anyway.
8691
e540802f
MV
86922002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8693
8694 * print.c (scm_simple_format): Print missing part of format before
8695 ~% control. Thanks to Daniel Skarda!
8696
4c1ffcdd
MV
86972002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8698
8699 * mkstemp.c: Added exception notice to license statement.
8700
ba1b077b
MV
87012002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8702
8dc434c7
MV
8703 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8704 it is represented as a floating point value so that we can change
8705 its sign.
8706
ba1b077b
MV
8707 From John W. Eaton <jwe@bevo.che.wisc.edu>
8708
8709 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8710
74c58131
TTN
87112002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8712
8713 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8714 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8715
8766d4b5
MV
87162002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8717
8718 * eq.c (real_eqv): New.
8719 (scm_eqv_p): Use it when comparing reals and complexes.
8720
8721 * numbers.c: Include <string.h>, for strncmp.
8722 (mem2complex): Do not create negative NaNs.
8723 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8724 NaN.
8725 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8726
1d8c3cad
MV
87272002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8728
8729 * posix.c (scm_putenv): Handle removing variables explicitely by
8730 calling unsetenv.
8731
8732 From John W. Eaton.
74c58131 8733
1d8c3cad
MV
8734 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8735 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8736 and scm_nan.
8737 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8738 [SCO && ! HAVE_ISINF] (isinf): New function.
8739 (xisinf, xisnan): New functions.
8740 (IS_INF): Delete.
8741 (isfinite): Define in terms of xisinf.
8742 (scm_inf_p, scm_nan_p): New functions.
8743 (guile_Inf, guile_NaN): New file-scope vars.
8744 (guile_ieee_init): New function.
8745 (scm_inf, scm_nan): New functions.
8746 (idbl2str): Handle Inf and NaN. Remove funny label and
8747 corresponding gotos.
8748 (ALLOW_DIVIDE_BY_ZERO): New macro.
8749 (scm_divide): Allow division by zero to occur if
8750 ALLOW_DIVIDE_BY_ZERO is defined.
8751 Handle bignums and ints as special cases.
8752
8753 Additional stuff by me:
8754
8755 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8756 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8757 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8758 NaN. They will provide their own sign.
8759 (scm_divide): Only allow divides by inexact zeros. Dividing by
8760 exact zeros still signals an errors.
74c58131 8761
7a0c65eb
TTN
87622002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8763
87b72063 8764 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8765 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8766 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8767 Thanks to Andreas Rottmann.
8768
5e423a39
GH
87692002-04-20 Gary Houston <ghouston@arglist.com>
8770
8771 * removal of unused fields in root state (thanks to Christopher
8772 Cramer for pointing out the disuse.)
8773 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8774 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8775
5e423a39
GH
8776 * root.c (root_mark): don't mark them.
8777 (scm_make_root): don't set them to #f.
8778 * init.c (scm_init_standard_ports): don't initialise with the
8779 default ports.
8780
9d2cce76
MV
87812002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8782
8783 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8784 cpp_sig_symbols.c.
8785
87862002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8787
8788 * guile-snarf.in: Do not clean input file. This would write to
8789 the $(srcdir) during a VPATH build, which is not allowed. It also
8790 isn't needed since it only works when an output filename has been
8791 specified and in that case we don't need to clean the input file
8792 because the output file will already exist.
8793
6f79b6cc
MV
87942002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8795
8796 * guile-snarf: Install the trap for removing $cleanfile only when
8797 the value of $cleanfile is actually known.
8798
21550b10
RB
87992002-04-10 Rob Browning <rlb@defaultvalue.org>
8800
8801 * .cvsignore: add versiondat.h and *.c.clean.c.
8802
bc76d628
DH
88032002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8804
8805 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8806 function, replaces macro SRCBRKP.
8807
8808 (SRCBRKP): Deprecated.
8809
8810 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8811 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8812 temporary variable.
8813
5132eef0
DH
88142002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8815
8816 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8817 CHECK_EXIT and removed all references to them.
8818
680516ba
DH
88192002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8820
8821 * debug.h (scm_ready_p, debug_print): Removed declarations.
8822
8823 * eval.c (EVALCELLCAR): Removed.
8824
8825 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8826 operation from condition.
8827
e2bd68e0
MV
88282002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8829
8830 * guile-snarf.in: When the output filename is "-", write to
8831 stdout. When no "-o" option is given, use "-" as the output
8832 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8833 output file on error when the output file name is not "-". Define
8834 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8835
8836 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8837
ab1f1094
DH
88382002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8839
8840 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8841 and the corresponding goto statements. Removed redundant code.
8842
42030fb2
DH
88432002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8844
8845 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8846 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8847 Re-enabled handing of rpsubrs and asubrs.
8848
e050d4f8
DH
88492002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8850
8851 * eval.c (SIDEVAL): Removed.
8852
8853 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8854 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8855 argument checking order for set! to locals, variables and symbols.
8856 Improvements to control structure. Removed some uses of arg1 and
8857 arg2 as temporary variables.
8858
a6d344d3
TTN
88592002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8860
8861 * guile-snarf.in: Remove "--compat=1.4" support.
8862 Add "-d" and "-D" support.
8863
8864 (deprecated_list): New var.
8865 (compat_mode_clean_xxx): Delete.
8866 (grep_deprecated): New func.
8867 ("main"): If "-d" or "-D", call `grep_deprecated'.
8868
3939e9df
NJ
88692002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8870
387d418c
NJ
8871 * hooks.h: Change scm_t_c_hookype_t everywhere to
8872 scm_t_c_hook_type.
8873
bb2c02f2 8874 Docstring fixes:
a6d344d3 8875
bb2c02f2
NJ
8876 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8877
8878 * ports.c (scm_sys_make_void_port): Use `@file'.
8879
8880 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8881 than `else'.
8882
8883 * macros.c (scm_makmacro): Don't say that the form replaces its
8884 source, because it doesn't.
8885 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8886
8887 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8888 scm_select, scm_basename), goops.c (scm_method_generic_function),
8889 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8890 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8891 spelling mistakes.
8892
3939e9df
NJ
8893 * debug.c (scm_debug_options), eval.c
8894 (scm_eval_options_interface), read.c (scm_read_options): Change
8895 incorrect @var in docstring to @code.
8896
3b3cc781
MV
88972002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8898
500b0d5b
MV
8899 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8900
3b3cc781
MV
8901 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8902 guile-snarf can remove trailing non-init code.
8903
8904 * guile-snarf.in (modern_snarf): Remove everything following and
8905 including "^:^" from the output.
8906
dff98306
DH
89072002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8908
8909 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8910
8911 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8912
2287fb53
TTN
89132002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8914
8915 * guile-snarf.in: Update copyright.
8916 Rewrite to internalize error handling.
8917 Add "--compat=1.4" handling.
8918 Add commentary.
8919
8920 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8921 (snarfcppopts): New var.
8922 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8923 (.c.doc): Use $(snarfcppopts).
8924
822250a4
TTN
8925 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8926 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8927 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8928 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8929 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8930 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8931 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8932 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8933 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8934 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8935 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8936 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8937 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8938 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8939
b7798e10
DH
89402002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8941
8942 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8943 The next step will be to remove the union 't' and simplify the
8944 code of SCM_CEVAL that way.
8945
04a98cff
NJ
89462002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8947
8948 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8949 rreadfds, rwritefds, rexceptfds): Made static.
8950
8951 * gc.c (terminating), fports.c (terminating): Renamed
8952 scm_i_terminating.
8953
16d98032
MV
89542002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8955
5046250e
MV
8956 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8957 potential overflow problems. Thanks to John W Eaton!
8958
8794207d
MV
8959 * strop.c (string_capitalize_x): Treat characters as unsigned so
8960 that 8-bit chars work. Thanks to David Pirotte!
16d98032 8961
1d15ecd3
DH
89622002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8963
8964 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8965 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8966 proc as temporary variables. Introduced temporary variables with
8967 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8968 by a more explicit predicate in some places.
8969
89702002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
8971
8972 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8973 Added lots of comments regarding the implementation of #@dispatch.
8974 Changed intra-procedure communication to use t.arg1 instead of
8975 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8976 variables. Introduced temporary variables with hopefully
8977 descriptive names for clarification. Replaced SCM_N?IMP by a more
8978 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8979 of computing the expression explicitly. Eliminate now unused
8980 label nontoplevel_cdrxbegin.
8981
8982 * goops.h (SCM_INSTANCE_HASH): New macro.
8983
8984 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8985
1ebf1566
TTN
89862002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8987
8988 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8989 "guile-snarf" moved back from `noinst_SCRIPTS'.
8990
020c890c
NJ
89912002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8992
58d233cc
NJ
8993 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8994 exists when adding a source property other than those that are
8995 handled explicitly, add the new property to the SRCPROPS obj's
8996 plist.
8997
020c890c
NJ
8998 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8999 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
9000
9001 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
9002 debug.status. It isn't needed, and it can overflow the bits
9003 reserved for it (which may lead to a segv or a GC abort).
9004
3f04400d
DH
90052002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9006
9007 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
9008 side-effecting operations from conditions and macro calls.
9009 Replaced SCM_N?IMP by a more explicit predicate in some places.
9010 Minimized the scope of some variables.
9011
97820583
SJ
90122002-03-02 Stefan Jahn <stefan@lkcc.org>
9013
9014 * convert.i.c: Fixed int <-> long conversions which would have
9015 failed if their sizes were different.
9016
38ace99e
DH
90172002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9018
9019 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9020 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9021 as temporary variables. Removed side-effecting operations from
9022 conditions and macro calls. Introduced temporary variables with
9023 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9024 by a more explicit predicate in some places. Removed code that
9025 was conditionally compiled if SICP was defined - which it never
9026 is.
9027
e5cb71a0
DH
90282002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9029
9030 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9031 Removed some uses of t.arg1 and proc as temporary variables.
9032 Removed side-effecting operations from conditions and macro calls.
9033 Introduced temporary variables with hopefully descriptive names
9034 for clarification. Replaced SCM_N?IMP by a more explicit
9035 predicate in some places.
9036
6a0f6ff3
DH
90372002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9038
9039 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9040 explicit predicate in some places.
9041
9042 (CHECK_EQVISH): Removed.
9043
9044 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9045 variables. Removed side-effecting operations from conditions and
9046 macro calls. Introduced temporary variables for clarification.
9047 Sorted if-else-if check for the type of the last form in a list by
9048 frequency. Avoided some unnecessary tail-recursion calls.
9049
228a24ef
DH
90502002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9051
9052 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9053 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9054 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9055 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9056 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9057 naming scheme for types.
9058
9059 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9060 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9061 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9062 (scm_make_environment), eval.c (scm_closure), fports.c
9063 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9064 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9065 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9066 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9067 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9068 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9069 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9070 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9071 scm_alloc_cell to scm_cell.
9072
9073 * environments.c (core_environments_observe), gc.c
9074 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9075 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9076 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9077 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9078 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9079 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9080 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9081 scm_double_cell.
9082
edb810bb
SJ
90832002-02-27 Stefan Jahn <stefan@lkcc.org>
9084
9085 * convert.i.c, convert.c: Better range checking.
9086
9087 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9088
1ebf1566 9089 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9090 Windows (MinGW).
9091
327d4dd3
TTN
90922002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9093
9094 * Makefile.am: Update path to pre-inst-guile automake frag.
9095
89d7a92c 90962002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9097
9098 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9099 features are excluded.
9100
89d7a92c 91012002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9102
9103 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9104
4f2716b6
GH
91052002-02-25 Gary Houston <ghouston@arglist.com>
9106
9107 * convert.c: include <string.h> for convert_i.c.
9108
46151112
RB
91092002-02-24 Rob Browning <rlb@defaultvalue.org>
9110
9111 * .cvsignore: add stamp-h1.
9112
cd328b4f
NJ
91132002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9114
9115 * unif.c (scm_array_to_list): Correct name, which had been
9116 accidentally changed to scm_t_arrayo_list!
9117
c709de7f
MD
91182002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9119
9120 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9121 underflowing scm_mallocated.
9122
c1965d31
MV
91232002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9124
9125 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9126 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9127 Reimplemented using the new scm_gc_malloc, etc., functions and
9128 deprecated.
9129
b606945b
TTN
91302002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9131
9132 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9133 to `noinst_PROGRAMS'.
9134 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9135 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9136
7c686ba8
MV
91372002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9138
9139 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9140 non-zero is returned from a port or smob free function.
9141 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9142 scm_gc_register_collectable_memory,
9143 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9144 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9145
9146 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9147 debug-malloc.c, dynl.c, environments.c, environments.h,
9148 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9149 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9150 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9151 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9152 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9153 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9154 appropriate. Return zero from smob and port free functions.
9155
9156 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9157
9158 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9159 messages while the GC is running.
9160 (scm_c_issue_deprecation_warning_fmt): New.
9161
9162 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9163 it is pointing to the putback buffer.
9164
66adc0a6
TTN
91652002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9166
9167 * gsubr.c (create_gsubr): On "too many args" error,
9168 also display arg count and name. Thanks to Bill Schottstaedt.
9169
0187b4f4
TTN
91702002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9171
9172 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9173
9174 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9175 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9176 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9177
9178 * guile-snarf-docs-texi.in: Bye bye.
9179
402e687c
MV
91802002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9181
9182 * symbols.c (scm_make_symbol): Fix typo in docstring.
9183
9184 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9185 scm_make_symbol): New prototypes.
9186
319b98ed
MV
91872002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9188
9189 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9190 (SCM_SYMBOL_INTERNED_P): New.
9191 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9192 SCM_MAKINUM since hash values can well be bignums.
9193 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9194 This signals a interned symbol.
9195 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9196 scm_make_symbol): New.
0187b4f4 9197
319b98ed
MV
9198 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9199
34472dfe
TTN
92002002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9201
9202 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9203 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9204 Thanks to Dave Love.
34472dfe 9205
1b39c2e3
MV
92062002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9207
9208 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9209 This might help to make unintended clashes less likely.
1b39c2e3
MV
9210 (scm_string_to_symbol): Protect the string until the symbols is
9211 created.
9212
1fa86ca5
SJ
92132002-01-31 Stefan Jahn <stefan@lkcc.org>
9214
9215 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9216 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9217 functions for the deprecated gh interface.
9218
9219 * Makefile.am: Setup rules for new `convert.*' files.
9220
af68e5e5
SJ
92212002-01-28 Stefan Jahn <stefan@lkcc.org>
9222
9223 * symbols.c (scm_c_symbol2str): New function, replacement for
9224 `gh_scm2newsymbol()'.
9225
34472dfe 9226 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9227 replacement for `gh_get_substr()'.
9228
9229 * socket.c: Include `stdint.h' if available for the `uint32_t'
9230 declaration.
9231
504d99c5 9232 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9233 compiler warning).
9234
9235 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9236
c96d76b8 92372002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9238
c96d76b8 9239 Other changes unrelated to Elisp...
34472dfe 9240
c96d76b8
NJ
9241 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9242 "if".
9243 (comments): Fix a few typos.
9244 (scm_for_each): Add parentheses around oddly unparenthesized
9245 if/while conditions.
9246
9247 * read.c (scm_read_opts): Add full stop at end of doc for
9248 `keywords' option.
9249
9250 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9251 instead of gh_symbol2scm.
9252
9253 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9254 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9255
9256 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9257 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9258
9259 First batch of changes for Elisp support...
9260
9261 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9262 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9263 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9264
9265 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9266 conditionalize compilation and initialization of Elisp support
9267 function.
34472dfe 9268
c96d76b8
NJ
9269 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9270 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9271 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9272 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9273 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9274 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9275 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9276 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9277 options.c (change_option_setting, scm_options), posix.c
9278 (environ_list_to_c), print.c (scm_iprlist), throw.c
9279 (scm_exit_status), vectors.c (scm_vector), weaks.c
9280 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9281
9282 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9283 just SCM_FALSEP.
34472dfe 9284
c96d76b8
NJ
9285 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9286 of just SCM_BOOLP.
9287
9288 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9289 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9290 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9291 (scm_m_atfop): Support function aliasing. Support both function
9292 args, which need transformation, and macro args, which do not.
9293 Add explanatory comments.
9294 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9295 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9296 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9297 SCM_NULLP || SCM_NILP instead of checks against (removed)
9298 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9299 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9300
9301 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9302 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9303 these, but I don't want to remove them yet, just in case.
9304 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9305 Elisp nil value.
9306
9307 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9308 against (removed) scm_lisp_nil.
9309 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9310 (SCM_NULL_OR_NIL_P): New.
9311
9312 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9313 SCM_VALIDATE_NULL.
9314
9315 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9316 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9317 value).
9318
9319 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9320 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9321 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9322 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9323
9324 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9325 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9326 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9327 Numbering shifted down accordingly.
9328 (SCM_ELISP_NIL): New IFLAG.
9329
9330 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9331
a392ee15
DH
93322002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9333
9334 * eval.c: Removed outdated references to "everr". Improved some
9335 comments.
9336
9337 (scm_deval_args, deval_args): Renamed scm_deval_args to
9338 deval_args, since it is not part of the interface.
9339
9340 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9341 use references to debug.vect[0] before it exists. Add parentheses
9342 to switch statement.
9343
9344 * goops.h: Added local emacs variables.
9345
24933780
DH
93462002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9347
9348 * eval.[ch] (scm_deval_args): Made static.
9349
9350 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9351 test.
9352
9353 * strings.c (scm_c_string2str): Clarified comment. Replaced
9354 THINKME by FIXME for uniformness. Removed question about whether
9355 arguments need to be protected from garbage collection: Arguments
9356 must be protected as any other variable.
9357
f9450cdb
DH
93582002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9359
9360 * procs.h (SCM_CLOSURE_BODY): New Macro.
9361
9362 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9363 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9364 get_slot_value, set_slot_value), procs.c
9365 (scm_procedure_documentation), sort.c (closureless), stacks.c
9366 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9367 SCM_CLOSURE_BODY.
9368
9369 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9370
5dc64f64
MV
93712001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9372
9373 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9374 use "cp" instead.
9375
197ee3d3
MV
93762001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9377
9378 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9379 everywhere.
9380
9381 * continuations.c (scm_make_continuation): Do not retain the
9382 throw_value when the continuation is invoked.
9383
4d4528e7
SJ
93842001-12-08 Stefan Jahn <stefan@lkcc.org>
9385
9386 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9387 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9388 THINKME's regarding the malloc policy for the missing converter
9389 routines.
9390
98347362
NJ
93912001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9392
9393 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9394 gh_symbol2scm.
9395
1fc8902f
DH
93962001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9397
9398 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9399 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9400
9401 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9402 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9403 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9404 macros.
9405
9406 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9407
9408 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9409 SCM_GC_CELL_* macros when accessing free cells.
9410
4878beec
MV
94112001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9412
9413 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9414 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9415 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9416 * strings.h (SCM_MAKE_STRING_TAG): New.
9417 * procs.h (SCM_MAKE_CCLO_TAG): New.
9418 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9419
9420 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9421 !SCM_ENABLE_DEPRECATED.
9422
9423 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9424 New.
9425
9426 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9427 signal handlers are allowed to divert the flow of control. Call
9428 scm_system_async_mark_from_signal_handler instead of
9429 scm_system_async_mark.
9430
9431
9432 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9433 scm_alloc_double_cell in their place.
34472dfe 9434
4878beec
MV
9435 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9436 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9437 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9438 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9439 scm_deprecated_newcell and scm_deprecated_newcell2.
9440
9441 gc.c (scm_tc16_allocated): Only define when including deprecated
9442 features.
9443 (scm_debug_newcell, scm_debug_newcell2): Removed.
9444 (scm_init_storage): Do not initialize scm_tc16_allocated.
9445 (scm_init_gc): Do it here.
9446 (allocated_mark): New, from old code.
9447 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9448
4878beec 9449 * inline.c, inline.h: New files.
34472dfe 9450 * Makefile.am: Added them in all the right places.
4878beec 9451
34472dfe 9452 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9453
9454 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9455 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9456 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9457 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9458 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9459 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9460 scm_alloc_double_cell, respectively.
9461
d2bc7fae
MV
94622001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9463
9464 * modules.c (scm_c_use_module): Adapt to changes to
9465 `process-use-modules'.
9466
5eec27e9
DH
94672001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9468
9469 * numbers.c (scm_divide): Fix more division by zero errors.
9470
8978878f
GH
94712001-11-21 Gary Houston <ghouston@arglist.com>
9472
9473 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9474 obsolete. autogen.sh says:
9475 invalid unused variable name: `OMIT_DEPENDENCIES'
9476
164826d3
DH
94772001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9478
9479 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9480 reporting the bug.
9481
84aff7a7
MV
94822001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9483
9484 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9485 Thanks to Eric Gillespie, Jr!
34472dfe 9486
6063dc1d
SJ
94872001-11-21 Stefan Jahn <stefan@lkcc.org>
9488
34472dfe
TTN
9489 * win32-socket.c (getservent, setservent, endservent,
9490 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9491 Appropriate replacements for M$-Windows.
9492
9493 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9494 these definitions for GUILE_DEBUG.
9495
9496 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9497 M$-Windows compiler. Include some pieces of code (protoent and
9498 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9499 native M$-Windows compiler.
9500
351982f6
MV
95012001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9502
9503 * modules.c (scm_c_export): Do nothing when the first argument is
9504 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9505
849038b5
TTN
95062001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9507
9508 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9509 also include `buildstamp'.
9510
5c790b44
RB
95112001-11-18 Rob Browning <rlb@defaultvalue.org>
9512
9513 * version.c
9514 (s_scm_major_version): use SCM_MAJOR_VERSION.
9515 (s_scm_minor_version): use SCM_MINOR_VERSION.
9516 (s_scm_micro_version): use SCM_MICRO_VERSION.
9517 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9518 SCM_MICRO_VERSION.
9519
9520 * version.h.in
9521 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9522 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9523 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9524
694a9bb3
NJ
95252001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9526
9527 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9528 Rewrite docstrings without reference to substring-move-left/right,
9529 since the latter no longer exist.
9530
302c12b4
DH
95312001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9532
9533 * eval.c: Removed bogus comment about acros.
9534
9535 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9536 Minimize scope of local variable. Eliminate dependency on
9537 macro DEBUG_EXTENSIONS.
9538
9539 (s_splicing): New error message string.
9540
9541 (scm_m_body): Issue 'bad body' message rather than 'missing
9542 expression' message.
9543
9544 (scm_m_quote): Eliminate unnecessary copying.
9545
9546 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9547 checking of the body to scm_m_body.
9548
9549 (scm_m_do): Move comment to function header. Rename arg1 to
9550 binding. Made the code a bit easier to read.
9551
9552 (evalcar): Removed.
9553
9554 (iqq): Added a comment. Changed the depth parameter to
9555 unsigned. Use size_t for vector lengths. Make sure vector object
9556 is gc protected as long as its contents are read. Add some syntax
9557 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9558 control structure a bit.
9559
9560 (scm_m_delay): Added comment about the implementation of
9561 scm_m_delay.
9562
9563 (scm_m_define): Add comment about guile's currying define
9564 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9565 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9566
9567 (scm_m_letrec1): Removed. Part of the functionality is taken
9568 over by the new function 'transform_bindings'.
9569
9570 (transform_bindings): New function. Takes over some of the
9571 functionality of removed function 'scm_m_letrec1', namely to split
9572 a list of bindings into a reversed list of variables and a list of
9573 initializers.
9574
9575 (scm_m_letrec): Call 'transform_bindings'.
9576
9577 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9578 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9579 test. Use 'transform_bindings'. Fixed scoping error with named
9580 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9581 Jerram for suggesting the fix). Cleaned up the control structure
9582 a bit.
9583
9584 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9585 unnecessary consing. Eliminated unnecessary
9586 SCM_DEFER/ALLOW_INTS.
9587
9588 (SCM_CEVAL): Un-obfuscated some loops.
9589
cecb4a5e
NJ
95902001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9591
8f85c0c6
NJ
9592 * gc.h (scm_unhash_name): Old declaration removed.
9593
9594 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9595 @code{primitive-eval}.
9596
9597 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9598 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9599 Change @deffnx lines in docstrings to say {Scheme Procedure}
9600 rather than primitive or procedure.
9601
9602 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9603 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9604 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9605 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9606 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9607 (scm_string_split, scm_string_ci_to_symbol), strings.c
9608 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9609 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9610 Docstring fixes and improvements reflecting edits that have been
9611 made in the reference manual source.
9612
9613 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9614 scm_object_property, scm_set_object_property_x): Remove invalid
9615 @deffnx lines for corresponding procedure property primitives.
9616
cecb4a5e
NJ
9617 These changes add a @deffnx C function declaration and function
9618 index entries for each Guile primitive to the copy of the doc
9619 snarf output that is used for reference manual synchronization.
9620 Online help is unchanged.
849038b5 9621
cecb4a5e
NJ
9622 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9623 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9624 name to SCM_SNARF_DOCS.
849038b5 9625
cecb4a5e
NJ
9626 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9627 snarf-check-and-output-texi.
9628
9629 * Makefile.am (guile-procedures.texi): New rule.
9630 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9631 Changed so that the last stage of doc snarfing is now performed
9632 twice, once to produce guile-procedures.txt for online help, and
9633 once to produce guile.texi for reference manual synchronization.
9634
ddea3325
DH
96352001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9636
9637 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9638 safely usable as a single statement followed by a ';', for example
9639 in an if statement.
9640
9641 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9642
72dd0a03
NJ
96432001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9644
9645 * random.c (scm_random_solid_sphere_x,
9646 scm_random_hollow_sphere_x): Correct "shere" typos.
9647
9648 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9649
9650 * version.c (scm_version): Update docstring to include
9651 `micro-version'.
9652
6558eda6
MV
96532001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9654
409b8588
MV
9655 * modules.c (scm_c_export): Call va_end after collecting the
9656 symbols.
9657
adb8c0f2
MV
9658 * strop.h, strop.c (scm_substring_move_left_x,
9659 scm_substring_move_right_x): Removed.
9660
6558eda6
MV
9661 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9662 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9663 configure does.
9664
5d8fc640
MV
96652001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9666
9667 * numbers.c: Document macros to define when including
9668 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9669 now rely on SIZEOF_ macros that have been figured out at
9670 configure time.
9671
9672 * num2integral.i.c: Adapt to new interface.
9673 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9674 target type by casting it and checking whether it is still the
9675 same. Do not try to handle bignums for integral types that are
9676 smaller than fixnums. When handling bignums, collect the
9677 magnituse first into a unsigned type, and correctly check for
9678 overflow.
9679 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9680 only -MIN_VALUE can still be negative of all negative numbers (in
9681 twos-complement).
9682
849038b5 9683 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9684
9685 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9686 HAVE_LONG_LONG depending on whether their size is non-zero.
9687
d6b8cf11
TTN
96882001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9689
9690 * strop.c (scm_string_null_p): Docfix; nfc.
9691 Thanks to Scott Lenser.
9692
9401323e
NJ
96932001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9694
9695 * extensions.c (scm_load_extension): Canonicalize docstring
9696 whitespace.
9697
9698 * unif.c (scm_uniform_array_write), ports.c
9699 (scm_current_output_port, scm_force_output), dynwind.c
9700 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9701 filesys.c (scm_open, scm_lstat), struct.c
9702 (scm_make_struct_layout), random.c (scm_random,
9703 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9704 (scm_i_index): Remove superfluous whitespace from end of docstring
9705 lines.
9706
9707 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9708 strings.c (scm_make_string), variable.c (scm_make_variable,
9709 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9710 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9711 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9712 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9713 newline at end of docstrings.
9714
9715 * modules.c (scm_set_current_module): Add missing newline to
9716 docstring.
9717
b4e15479
SJ
97182001-11-07 Stefan Jahn <stefan@lkcc.org>
9719
9720 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9721 and makes them available through Guile. That is because the
9722 Winsock-API does not store its errors in `errno' and thus cannot
9723 return error messages via `strerror (errno)'.
9724
9725 * socket.c (scm_init_socket): Initialize `win32-socket' part
9726 here under M$-Windows.
9727
d6b8cf11 9728 * numbers.h: Added missing declaration of
b4e15479
SJ
9729 `scm_sys_check_number_conversions()'.
9730
9731 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9732 and use in `(strerror)' and `(system-error)'.
9733
d6b8cf11 9734 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9735 `win32-socket.[ch]' to extra source and header files.
9736
7ab89df1
MV
97372001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9738
9739 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9740 a call to turn-on-debugging when --debug has been given instead of
9741 turning it on directly. Also, handle new `--no-debug' option,
9742 which might suppress the call to turn-on-debugging.
9743
0233bfc1
SJ
97442001-11-05 Stefan Jahn <stefan@lkcc.org>
9745
9746 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9747
8f99e3f3
SJ
97482001-11-04 Stefan Jahn <stefan@lkcc.org>
9749
9750 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9751 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9752 correctly and allows a clean build on Win32.
9753
d6b8cf11 9754 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9755 into FOO.
9756
9757 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9758 import macros for external libraries (libcrypt, libqthreads,
9759 libreadline and libregex).
9760
9761 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9762
9763 * posix.c (flock): Added support for flock() in M$-Windows.
9764
9765 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9766 of __SCM_IMPORT__.
9767
9768 * fports.c (getflags): Differentiate reading and writing pipes
9769 descriptors.
9770
9771 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9772 M$-Windows.
9773
9774 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9775 conditionalized error code if `ETIMEDOUT' is not available.
9776 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9777 timeout'.
9778
9779 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9780 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9781 each inclusion of `num2integral.i.c'.
9782 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9783
4e21fa60
MV
97842001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9785
9786 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9787 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9788
08112c95
MD
97892001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9790
7663c008
MD
9791 * print.c (scm_iprin1): Mark print state as revealed when
9792 dispatching to generic write or display.
9793
08112c95
MD
9794 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9795
f712d833
MV
97962001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9797
9798 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9799
f712d833
MV
9800 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9801 and win32-dirent.h to extra source and header files. These
9802 include the uname() and the POSIX dirent interface implementation
9803 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9804 linkers which do not allow unresolved symbols inside shared
9805 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9806 dependency.
9807
d6b8cf11
TTN
9808 * __scm.h: Defined SCM_API. This macro gets prepended to all
9809 function and data definitions which should be exported or imported
f712d833
MV
9810 in the resulting dynamic link library in the Win32 port.
9811
9812 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9813 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9814 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9815 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9816 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9817 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9818 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9819 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9820 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9821 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9822 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9823 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9824 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9825 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9826 vports.h, weaks.h:
9827 Prefixed each each exported symbol with SCM_API.
9828
d6b8cf11 9829 * continuations.c: Added comment about the use of the extern
f712d833
MV
9830 declarations of {get,set}context() functions used in the ia64 port.
9831
9832 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9833 is meant to be a `unsigned long *'.
9834
9835 * filesys.c: Include `direct.h' if possible. Use local
9836 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9837 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9838 able to differentiate between sockets and other file descriptors.
9839 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9840 `scm_dirname()'.
9841
9842 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9843 statement block in `scm_fport_buffer_add()'.
9844 Some corrections in `getflags()'.
d6b8cf11 9845
f712d833
MV
9846 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9847
9848 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9849 build on Win32. Disable preloaded symbols on Win2 platforms.
9850
9851 * ioext.c, ports.c: Include `io.h' is possible.
9852
9853 * mkstemp.c: Include `process.h' is possible.
9854
9855 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9856 too.
9857 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9858
9859 * posix.c: Remove unnecessary dirent includes and defines. Include
9860 local `win32-uname.h' for MinGW. Extern declaration of
9861 `mkstemp()' for systems where it does not exists. Make
9862 `getlogin()' available on M$-Windows.
9863
9864 * scmsigs.c: Made `usleep()' avalable on MinGW.
9865
9866 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9867
9868 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9869
9870 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9871
d245ce23
MD
98722001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9873
9874 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9875 Don't apply scm_uniform_vector_length on arrays.
9876
8ea46249
DH
98772001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9878
9879 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9880 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9881 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9882 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9883 scm_list_<n> over scm_cons[2]?.
9884
9885 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9886 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9887 SCM_C[AD][AD]R instead of explicit form.
9888
9889 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9890 comparison parameters.
9891
9892 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9893 !SCM_NULLP instead of SCM_NIMP.
9894
9895 (scm_m_case): Don't copy the form. Renamed proc to clause and
9896 minimized its scope. Renamed x to clauses. Removed side
9897 effecting operation from macro call.
9898
9899 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9900 minimized its scope. Renamed x to clauses. Minimized the scope
9901 of variable 'len'. Make sure the else clause is treated specially
9902 even in case of '=>' occurences. Don't change the else to #t in
9903 order to be able to distinguish this case in the evaluator. Leave
9904 type checking of the recipient to the evaluator.
9905
9906 (scm_c_improper_memq): Made the comment somewhat clearer.
9907
9908 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9909 test for SCM_IM_LET at the place of the formal parameters.
9910 Simplified the formal parameter checking.
9911
9912 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9913 Renamed arg1 to binding and minimized its scope. Eliminated
9914 unnecessary consing.
9915
9916 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9917 variable 'len'.
9918
9919 (build_binding_list): New static function.
9920
9921 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9922 Further, split up the 'letrec' unmemoizing code to the
9923 corresponding parts for 'do', 'let' and 'letrec', adding comments
9924 to each form. Cleanup the handling of the do form (This removes
9925 some *real* code :-).
9926
9927 (SCM_CEVAL): Removed side effecting operation from macro call.
9928 Handle the 'else clause of the 'cond form specially - the symbol
9929 'else is not replaced with #t any more.
9930
8186c4f5
GH
99312001-10-14 Gary Houston <ghouston@arglist.com>
9932
9933 * version.c (scm_version): use sprintf instead of snprintf,
9934 for portability. thanks to Bill Schottstaedt.
9935
89759084
MD
99362001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9937
9938 * read.c (scm_lreadr): When user-defined hash procedure returns
9939 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9940 an exception. (This prevents parsing of uniform vectors from
9941 interfering with parsing of numbers.)
9942
9c7ce563
MV
99432001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9944
9945 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9946 PTRDIFF_MIN. Thanks to Ken Raeburn.
9947
99482001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9949
9950 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9951
9952 * eval.c (scm_m_atbind): First try to find the variable without
9953 defining it locally; when it has not been found, define it
9954 locally.
9955
9956 * modules.c (module_variable): Pass over variables that exist but
9957 are unbound.
9958
99592001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9960
9961 * backtrace.c (display_backtrace_file_and_line): Only use
9962 scm_basename when POSIX support is compiled in. Thanks to Chris
9963 Cramer.
9964
1fe5e088
DH
99652001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9966
9967 * numbers.c (mem2uinteger): Return number read so far when coming
9968 across a hexdigit after having read a # or if not reading a hex
9969 value. This will enable the calling code to correctly handle
9970 forms like 1e2. (The background is, that the exponent markers d,
9971 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9972 providing this patch.
9973
9974 (mem2complex): Fix erroneous double-negation. Now, numbers like
9975 1-i will be read correctly.
9976
68665a97
MD
99772001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9978
9979 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9980
9981 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9982
d5cf5324
DH
99832001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9984
9985 * print.c (scm_print_state_vtable, print_state_pool):
9986 Initialize. These variables are now registered as gc roots.
9987
9988 (scm_current_pstate): Update documentation.
9989
9990 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9991 scm_prin1, scm_init_print): print_state_pool is registered as a
9992 gc root and thus does not need to be protected by a surrounding
9993 pair any more.
9994
9995 (make_print_state): The car of print_state_pool no longer holds
9996 the scm_print_state_vtable.
9997
9998 (scm_current_pstate, scm_make_print_state, print_circref,
9999 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
10000 SCM_N<foo>.
10001
10002 (scm_prin1): When building lists, prefer scm_list_<n> over
10003 scm_cons[2]?.
10004
10005 (scm_iprlist): Removed a redundant SCM_IMP test.
10006
10007 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
10008
37c56aec
DH
100092001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
10010
10011 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
10012
10013 (scm_memcons, scm_mem_to_proc): When building lists, prefer
10014 scm_list_<n> over scm_cons[2]?.
10015
10016 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
10017
10018 (scm_procedure_name): Use SCM_CADR instead of explicit form.
10019
10020 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10021 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10022 for some reason his patch didn't make it into the cvs.
10023
79d34f68
DH
100242001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10025
10026 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10027 little bit - should even be somewhat more accurate now.
10028
5e137c65
RB
100292001-10-08 Rob Browning <rlb@defaultvalue.org>
10030
10031 * gc.c: support ia64 register backing store.
10032 (SCM_MARK_BACKING_STORE): new macro.
10033
10034 * continuations.h: support ia64 register backing store.
10035 (struct scm_t_contregs): add ia64 register backing store.
10036
10037 * continuations.c: support ia64 register backing store.
10038 (continuation_mark): mark ia64 register backing store.
10039 (continuation_free): free ia64 register backing store.
10040 (scm_make_continuation): capture ia64 register backing store.
10041 (copy_stack_and_call): copy ia64 register backing store.
10042
ee083ac2
DH
100432001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10044
10045 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10046 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10047 instead of SCM_NIMP to test for that case.
10048
10049 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10050 scm_t_bits instead of long.
10051
71dcdbf9
MV
100522001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10053
10054 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10055 SCM_T_SIGNED_BITS_MIN): New.
10056 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10057 Use them to make these macros computable by the preprocessor.
10058
10059 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10060 whether the integral type fits in a fixnum, not the compiler.
10061 This removes a spurious compiler warning. Also, honor the
10062 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10063 needed for `long long's.
10064
10065 * numbers.c: Define NO_PREPRO_MAGOC when including
10066 num2integral.c.i for `long long' and `signed long long'.
10067
152812c0
MD
100682001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10069
10070 These changes fixes a race condition in the Guile coop - pthread
10071 compatibility code.
d6b8cf11 10072
152812c0
MD
10073 * coop.c (mother_awake_p): New variable.
10074 (coop_create): Set mother_awake_p before creating or signalling
10075 mother; wait until mother is going to sleep before returning.
10076 (mother): Reset mother_awake_p before going to sleep.
10077
11d49f54
DH
100782001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10079
10080 * options.c (protected_objects, scm_init_options): The content of
10081 protected_objects is now protected from garbage collection using
10082 scm_gc_register_root instead of scm_permanent_object.
10083
10084 (get_option_setting): New static function that computes an option
10085 setting as it was formerly done in the function scm_options.
10086
10087 (get_documented_option_setting): New static function that
10088 returns option documentation as it was formerly done in the
10089 function scm_options. Note that documentation C strings are no
10090 longer precomputed into SCM objects. Instead, they are converted
10091 into SCM strings every time get_documented_option_setting is
10092 called.
10093
10094 (change_option_setting): New static functions that modifies the
10095 option setting as it was formerly done in the function
10096 scm_options. The function is now exception safe, i. e. won't
10097 cause a memory leak when interrupted. Further, only non-immediate
10098 option values are added to the protection list.
10099
10100 (scm_options): This function now has only the purpose to dispatch
10101 to to get_option_setting, get_documented_option_setting or
10102 change_option_setting, depending on the arguments given to
10103 scm_options.
10104
10105 (scm_init_opts): Don't convert documentation C strings into SCM
10106 strings. Further, don't protect any object values: They _must_
10107 be immediate values, otherwise there is no guarantee that they
10108 have not been collected before anyway.
10109
10110 * options.[ch] (scm_t_option): Made type unsigned, name into a
10111 constant char* and val into a scm_t_bits type.
10112
10113 (scm_options, scm_init_opts): The number of options is guaranteed
10114 to be larger or equal to zero. Thus, the type is changed to
10115 unsigned.
10116
3dbacabc
DH
101172001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10118
10119 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10120 testing an unsigned value for being >= 0.
10121
14282d0f
DH
101222001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10123
10124 * numbers.h: Removed old comment about using SCM_CAR to access
10125 non-pair cells.
10126
10127 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10128 the return value is signed. Thanks to Brian Crowder for the bug
10129 report.
10130
10131 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10132 values. With this patch, SCM_SRS can be safely used for other
10133 types than scm_t_signed_bits. However, it should still better be
10134 an internal macro and thus be renamed to SCM_I_SRS.
10135
10136 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10137
2dbec7b5
GH
101382001-10-03 Gary Houston <ghouston@arglist.com>
10139
10140 * continuations.h, unif.h: in the descriptions of the bit patterns
10141 of the heap cells, make bit 0 the least significant.
10142
cf4ee841
TTN
101432001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10144
10145 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10146 Thanks to Golubev I. N.
10147
4a151b3d
GH
101482001-09-25 Gary Houston <ghouston@arglist.com>
10149
10150 * ports.c (scm_drain_input): extended the docstring. thanks to
10151 Alex Schroeder and Thien-Thi Nguyen.
10152
581ded70
MD
101532001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10154
10155 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10156 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10157 macros. (The NUM names might soon change.)
10158
10159 * numbers.h: Added missing declarations.
10160
5437598b
MD
101612001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10162
10163 * Makefile.am: Distribute num2float.i.c.
10164
10165 * num2float.i.c: New file, multiply included by numbers.c, used
10166 to "templatize" the float <-> num conversion routines.
10167
10168 * numbers.c: New functions: scm_num2float, scm_float2num,
10169 scm_num2double, scm_double2num.
10170
0b073f0f
RB
101712001-09-21 Rob Browning <rlb@defaultvalue.org>
10172
10173 * .cvsignore: really add version.h
10174
10175 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10176 Otherwise it fails on the alpha. However, we might rather choose
10177 this size conditionally.
10178
10179 * numbers.c (scm_gcd): change "k" to a long from an int.
10180 Otherwise it fails on the alpha. However, we might rather choose
10181 this size conditionally.
10182
10183 * error.c (scm_wta): coerce char* to intptr_t before int
10184 assignment.
10185
10186 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10187 int.
10188
10189 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10190
2830fd91
MD
101912001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10192
10193 * numbers.c (scm_integer_expt): Accept inexact integer in second
10194 argument. (Thanks to Bill Schottstaedt.)
10195
c13f0a90
RB
101962001-09-20 Rob Browning <rlb@defaultvalue.org>
10197
10198 * .cvsignore: add version.h
10199
10200 * versiondat.h.in: removed (obsolete).
10201
10202 * version.h.in: renamed from version.h.
10203 (SCM_GUILE_MAJOR_VERSION): new public macro.
10204 (SCM_GUILE_MINOR_VERSION): new public macro.
10205 (SCM_GUILE_MICRO_VERSION): new public macro.
10206
10207 * version.h: renamed to version.h.in.
10208
10209 * version.c
10210 (scm_major_version): support integer *_VERSION macros.
10211 (scm_minor_version): support integer *_VERSION macros.
10212 (scm_micro_version): support integer *_VERSION macros.
10213 (scm_version): support integer *_VERSION macros.
10214
147c18a0
MD
102152001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10216
10217 * error.c, error.h: Made error keys globally accessible.
10218 Applications might want to test for these or use them in a direct
10219 call to scm_error.
10220
10221 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10222 routines are passed an inexact. This change in behavior is
10223 motivated by concordance with R5RS: It is more common that a
10224 primitive doesn't want to accept an inexact for an exact.
10225
662c5539
DH
102262001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10227
10228 The following patch partially undoes my patch from 2001-06-30,
10229 where I added the function scm_gc_mark_cell_conservatively. The
10230 function is buggy, since it breaks guile during conservative
10231 marking if a pointer on the stack points directly into the list of
10232 free cells on the heap: With conservative cell marking this will
10233 cause the whole free list to be scanned and marked - boom!
10234
10235 * gc.c (allocated_mark, MARK, heap_segment,
10236 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10237 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10238 scm_gc_mark_cell_conservatively and update the corresponding
10239 comments and uses accordingly. Thanks to Christopher Cramer for
10240 the patch. (Minor corrections by me.)
10241
6c1b7628
GH
102422001-09-15 Gary Houston <ghouston@arglist.com>
10243
10244 * root.h (scm_root_state): removed the continuation_stack and
10245 continuation_stack_ptr members, which have no apparent purpose.
10246 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10247 removed.
662c5539 10248
6c1b7628
GH
10249 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10250 (scm_igc): remove all references to contination_stack and
10251 continuation_stack_ptr, avoiding allocation of a vector and
10252 useless processing during gc.
10253
455c0ac8
DH
102542001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10255
10256 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10257
10258 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10259
10260 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10261
10262 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10263
10264 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10265 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10266
22ba637b
DH
102672001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10268
10269 * guardians.c (mark_dependencies_in_tconc,
10270 whine_about_self_centered_zombies, scm_init_guardians): Register
10271 the static global variable `self_centered_zombies' via
10272 scm_gc_register_root, to make some cdr-ing unnecessary.
10273
c3c4d801
DH
102742001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10275
10276 * backtrace.c (display_backtrace_file,
10277 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10278 values, use SCM_FALSEP when comparing SCM values against #f.
10279 Thanks to Rob Browning for the bug report.
10280
b00418df
DH
102812001-09-12 Martin Baulig <martin@home-of-linux.org>
10282
10283 * strings.[ch] (scm_str2string): New function.
10284
a0d34a0b
MV
102852001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10286
10287 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10288 when computing nm, even if it's negative.
10289 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10290 (scm_must_realloc): Likewise.
10291
b10586f0
ML
102922001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10293
10294 * numbers.c (scm_sys_check_number_conversions): new function,
10295 defined if Guile is compiled in debugging mode. currently checks
10296 `scm_num2ulong', should check much much more.
10297
10298 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10299 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10300
8c494e99
DH
103012001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10302
10303 * __scm.h: Added new section about compile time selectable
10304 features.
10305
10306 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10307 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10308 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10309 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10310 Removed.
10311
10312 * deprecation.c (scm_include_deprecated_features): Simplified.
10313
10314 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10315 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10316
10317 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10318 Extract side-effecting operations from macros.
10319
10320 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10321 scm_top_level_lookup_closure_var and scm_system_transformer.
10322
10323 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10324
10325 (heap_segment): Use CELL_P instead of SCM_CELLP.
10326
10327 * init.c (start_stack): Don't initialize
10328 scm_top_level_lookup_closure_var and scm_system_transformer.
10329
10330 * modules.c (scm_set_current_module): Don't access
10331 scm_top_level_lookup_closure_var and scm_system_transformer.
10332
10333 (scm_sym2var): Don't call scm_variable_set_name_hint.
10334
10335 (scm_post_boot_init_modules): Removed deprecated initializations.
10336
10337 * print.c (scm_ipruk): Don't access cell contents of non cells.
10338
10339 * strings.c (scm_string_set_x): All strings are writable.
10340
10341 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10342 type. There is only one string type now.
10343
10344 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10345
10346 * tags.h: Remove comments about two different string types.
10347
10348 (SCM_CELLP, SCM_NCELLP): Deprecated.
10349
10350 * variable.c (make_variable): Remove code variant for vcells.
10351
10352 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10353 SCM_VARIABLE_LOC): Remove code variant for vcells.
10354
10355 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10356 SCM_ENABLE_DEPRECATED with the logic reversed.
10357
10358 * dynl.c (moddata, registered_mods), dynl.[ch]
10359 (scm_register_module_xxx, scm_registered_modules,
10360 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10361 (*top-level-lookup-closure*), eval.[ch]
10362 (scm_top_level_lookup_closure_var, scm_system_transformer,
10363 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10364 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10365 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10366 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10367 scm_unprotect_object), modules.c (root_module_lookup_closure,
10368 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10369 beautify_user_module_x_var, try_module_autoload_var,
10370 scm_module_full_name), modules.[ch] (scm_the_root_module,
10371 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10372 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10373 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10374 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10375 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10376 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10377 scm_make_shared_substring), tags.h (scm_tc7_substring,
10378 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10379 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10380 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10381 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10382 Removed.
10383
10384 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10385 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10386 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10387 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10388 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10389 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10390 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10391 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10392 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10393 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10394 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10395 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10396 (setzone, scm_strftime, scm_strptime), vports.c
10397 (scm_make_soft_port): Remove calls to
10398 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10399 gone, all strings are 0-terminated anyway.
10400
10401 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10402 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10403 double inclusion of the same headers to the SCM_<filename>_H
10404 format.
10405
10406 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10407 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10408 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10409 any more.
10410
10411 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10412 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10413 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10414 !SCM_<foo> over SCM_N<foo>.
10415
dee01b01
DH
104162001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10417
10418 * Makefile.am: Remove references to symbols-deprecated.c.
10419
10420 * symbols.c (scm_init_symbols): Don't initialize deprecated
10421 symbol functions.
10422
10423 * symbols-deprecated.c: Removed.
10424
10425 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10426 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10427 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10428 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10429 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10430 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10431 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10432 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10433 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10434 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10435 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10436 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10437 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10438 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10439 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10440 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10441 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10442 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10443 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10444 scm_intern0, scm_sysintern, scm_sysintern0,
10445 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10446 scm_string_to_obarray_symbol, scm_intern_symbol,
10447 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10448 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10449 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10450 vectors.[ch] (scm_vector_set_length_x): Removed.
10451
10452 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10453 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10454 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10455 Renamed the macros that are defined to inhibit double inclusion of
10456 the same headers to the SCM_<filename>_H format.
10457
10458 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10459 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10460 SCM_N<foo>.
10461
b29058ff
DH
104622001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10463
10464 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10465 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10466 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10467 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10468 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10469 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10470 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10471 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10472 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10473 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10474 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10475 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10476
10477 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10478 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10479 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10480 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10481 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10482 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10483 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10484 double inclusion of the same headers to the SCM_<filename>_H
10485 format.
10486
10487 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10488 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10489 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10490 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10491 !SCM_<foo> over SCM_N<foo>.
10492
0527e687
DH
104932001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10494
10495 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10496 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10497 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10498 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10499 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10500 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10501 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10502 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10503 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10504 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10505 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10506 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10507 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10508 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10509 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10510 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10511 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10512 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10513 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10514 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10515 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10516 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10517 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10518 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10519 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10520 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10521 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10522 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10523 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10524 the macros that are defined to inhibit double inclusion of the
10525 same headers to the SCM_<filename>_H format.
10526
fada26b2
MV
105272001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10528
10529 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10530 "scm_t_portable" with "scm_port_table" which was an artifact from
10531 the great "scm_*_t -> scm_t_" renaming.
10532
e4d1c1ea
TTN
105332001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10534
10535 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10536 used; nfc. Thanks to Bill Schottstaedt.
10537
10538 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10539 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10540 Thanks to Chris Cramer.
10541
b573e744
MV
105422001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10543
10544 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10545
10546 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10547 dynamic scope.
10548 * dynwind.h (scm_swap_bindings): Declare.
10549 * dynwind.c (scm_swap_bindings): Make non-static.
10550
8a3e715b
ML
105512001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10552
10553 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10554 doing exactly nothing about them). thanks Neil!
10555
cf504ee0
NJ
105562001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10557
10558 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10559
43b83b54
TTN
105602001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10561
10562 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10563 (proto) in the case when either `GUILE_DEBUG' or
10564 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10565
10566 (map_free_list): Fix typo: Ref `f' correctly.
10567
10568 Thanks to Chris Cramer.
10569
ab4cd34b
RB
105702001-08-15 Rob Browning <rlb@defaultvalue.org>
10571
10572 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10573 variables.
10574 (libpath.h): change libguileversion to libguileinterface.
10575
b754e3d1
MV
105762001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10577
10578 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10579 ChangeLog-2000. Thanks to Daniel Skarda!
10580
8b1d12c7
ML
105812001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10582
10583 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10584 do it from the Makefile.
10585
10586 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10587 are of a reasonable size.
10588
baffb19f
NJ
105892001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10590
10591 * stacks.c (scm_make_stack): Improve docstring by explaining use
10592 of cutting args.
10593
c1151355
MV
105942001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10595
10596 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10597 scm_char_whitespace_p, scm_char_upper_case_p,
10598 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10599 characters to fulfill isascii in addition to the primary
10600 predicate.
10601
3c9a524f
DH
106022001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10603
10604 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10605 scm_istr2flo, scm_istring2number): Removed.
10606
10607 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10608 SCM_SLOPPY_<foo>.
10609
10610 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10611 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10612 Added.
10613
10614 (scm_string_to_number): Use new number parser.
10615
10616 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10617 handles complex numbers.
10618
10619 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10620 SCM_<foo>_H.
10621
10622 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10623 SCM_N<pred>.
10624
10625 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10626
10627 (scm_i_mem2number): Added.
10628
10629 (scm_exact_to_inexact): Changed signature.
10630
10631 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10632 here instead of within scm_i_mem2number. Call scm_i_mem2number
10633 instead of scm_istr2int and scm_istring2number.
10634
01f11e02
DH
106352001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10636
10637 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10638 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10639 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10640 !SCM_<pred> over SCM_N<pred>.
10641
10642 (scm_eval_body): Remove side effecting code from macro call.
10643
10644 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10645 SCM_NIMP test.
10646
6cf69537
DH
106472001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10648
10649 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10650
54866b6c
MV
106512001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10652
10653 Removed vcell slot from structs.
43b83b54 10654
54866b6c
MV
10655 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10656 subsequent indices.
10657
10658 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10659 zero. Use scm_vtable_index_layout instead of "0" when accessing
10660 said slot.
10661 (scm_init_struct): Remove vcell slot layout code from
10662 required_vtable_fields.
10663
10664 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10665
10666 * goops.c (build_class_class_slots): Removed vcell slot
10667 definition.
10668
10669 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10670 Removed vcell slot layout code.
10671 (scm_si_vcell): Removed.
10672
5b54c4da
MV
106732001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10674
a0f5718e 10675 "Glocs" have been removed.
43b83b54 10676
a0f5718e
MV
10677 * tags.h: Update tag system docs.
10678 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10679 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10680 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10681 or SCM_NCONSP, respectively.
10682
10683 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10684 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10685 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10686
10687 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10688 tell glocs from structs.
43b83b54 10689
a0f5718e
MV
10690 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10691
10692 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10693 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10694 instead of with glocs.
10695 (EVALCAR): Do not test for glocs.
10696 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10697 condition.
10698 (scm_unmemocar): Do not handle glocs.
10699 (scm_m_atfop): Memoize as a variable, not as a gloc.
10700 (scm_eval_args, scm_deval_args): Do not handle glocs.
10701 (scm_ceval, scm_deval): Likewise.
43b83b54 10702
a0f5718e
MV
10703 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10704 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10705 Removed.
10706
10707 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10708
10709 * dynwind.c (scm_swap_bindings): Likewise.
10710 (scm_dowinds): Updated to recognize lists of variables instead of
10711 lists of glocs.
10712
10713 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10714
43b83b54 10715
5b54c4da
MV
10716 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10717 where it is needed.
43b83b54 10718
3c3db128
GH
107192001-07-25 Gary Houston <ghouston@arglist.com>
10720
10721 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10722 docstrings to reflect the n-ary implementation.
10723
dd29a169
MV
107242001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10725
10726 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10727 value of a variable, not the plain "return" statement.
10728
f5fe6c2f
MV
107292001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10730
10731 * eval.c: Allow variables in memoized code (in addition to glocs).
10732 (scm_lookupcar): Handle variables in lost races. Replace symbol
10733 with variable directly, do not make a gloc.
10734 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10735 like glocs.
10736 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10737 the main switch.
10738
ee0c7345
MV
107392001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10740
6d9ad98a
MV
10741 * variable.c (scm_i_variable_print): Use "value" instead of
10742 "binding" since a binding is the mapping between symbols and
10743 variables, not between variables and their values.
10744
ee0c7345
MV
10745 * tags.h (scm_tc7_variable): New.
10746 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10747 * print.c (scm_iprin1): Likewise.
10748
10749 * variable.h (scm_tc16_variable): Removed.
10750 (SCM_VARIABLEP): Test for new tc7 code.
10751 (scm_i_variable_print): New.
10752 * variable.c (scm_tc16_variable): Removed.
10753 (variable_print): Renamed to scm_i_variable_print and made
10754 non-static.
10755 (variable_equal_p): Removed.
10756 (make_variable): Construct a tc7 object instead of a smob.
10757 (scm_init_variable): Do not register smob.
43b83b54 10758
f3805ebb
MV
107592001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10760
10761 * tags.h: Include inttypes.h when we have it.
10762
107632001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10764
10765 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10766 is taken by the new SCM_IM_CALL_WITH_VALUES.
10767 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10768
6a1677a3
GH
107692001-07-22 Gary Houston <ghouston@arglist.com>
10770
10771 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10772 SCM_MAKINUM to convert regoff_t value to SCM.
10773
1bed8c28
GH
107742001-07-21 Gary Houston <ghouston@arglist.com>
10775
10776 * scmsigs.c: include sys/time.h for itimer stuff.
10777
e658215a
RB
107782001-07-19 Rob Browning <rlb@defaultvalue.org>
10779
10780 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10781
10782 * c-tokenize.lex: add option %nounput to quiet warning.
10783 Add prototype for yylex to quiet warning.
10784
10785 * scmconfig.h.in: add flags for setitimer and getitimer.
10786
10787 * scmsigs.h (scm_init_scmsigs): new prototype.
10788 (scm_init_scmsigs): new prototype.
10789
10790 * scmsigs.c (s_scm_setitimer): new function.
10791 (s_scm_setitimer): new function.
10792
58ade102
MG
107932001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10794
10795 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10796 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10797 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10798 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10799 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10800 guile-func-name-check.in, guile-snarf-docs-texi.in,
10801 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10802 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10803 objprop.c, objprop.h, options.c, options.h, random.h,
10804 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10805 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10806 version.c, version.h: Updated copyright notice.
10807
6b80d352
DH
108082001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10809
10810 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10811 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10812 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10813 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10814 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10815 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10816 sym_environment, scm_sym_change_class): New static variables to
10817 hold predefined symbols.
10818
10819 (build_class_class_slots): Build the list using scm_list_n
10820 instead of cons. Also, slots are already created as lists, thus
10821 making a call to maplist unnecessary.
10822
10823 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10824 scm_class_direct_subclasses, scm_class_direct_methods,
10825 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10826 scm_method_procedure, create_standard_classes, purgatory): Use
10827 predefined symbols.
10828
10829 (build_slots_list, compute_getters_n_setters,
10830 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10831 get_slot_value_using_name, set_slot_value_using_name,
10832 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10833 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10834 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10835
10836 (scm_sys_prep_layout_x): Minimize variable scopes.
10837
10838 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10839 scm_sys_fast_slot_set_x): Fix signedness.
10840
10841 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10842 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10843 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10844 when converting to and from SCM values.
10845
10846 (scm_enable_primitive_generic_x): Add rest argument checking.
10847
10848 (map, filter_cpl, maplist, scm_sys_initialize_object,
10849 scm_sys_prep_layout_x, slot_definition_using_name,
10850 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10851 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10852 predicates over SCM_N?IMP tests.
10853
10854 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10855 checking.
10856
10857 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10858 alias.
10859
63bcad19
DH
108602001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10861
10862 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10863
10864 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10865
10866 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10867
10868 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10869
4d6aae71
ML
108702001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10871
10872 * strings.c (s_scm_string): fix arg position in assert.
10873
4b8ec619
GH
108742001-07-11 Gary Houston <ghouston@arglist.com>
10875
10876 * strports.c (st_write): use memcpy, not strncpy. thanks to
10877 Dale P. Smith.
10878
dbb640bd
TTN
108792001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10880
10881 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10882 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10883 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10884 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10885 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10886 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10887 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10888 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10889 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10890 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10891 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10892 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10893 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10894 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10895 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10896 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10897 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10898 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10899 weaks.c, weaks.h: Remove "face-lift" comment.
10900
fd6c6321
RB
109012001-07-08 Rob Browning <rlb@defaultvalue.org>
10902
10903 * .cvsignore: add stamp-h.in.
10904
f91e4547
MG
109052001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10906
10907 * hooks.c (scm_make_hook, scm_add_hook_x),
10908 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10909 value info to the docstrings.
10910
7beabedb
MG
109112001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10912
10913 Some more compatibility patches for Windows.
dbb640bd 10914
7beabedb
MG
10915 * posix.c (getlogin): getlogin() implementation for Windows.
10916
10917 * backtrace.c, ioext.c: Include <stdio.h>.
10918
10919 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10920 exist.
10921
10922 * cpp_sig_symbols.in: Added SIGBREAK.
10923
0d0560d0
MV
109242001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10925
10926 * strports.c (scm_read_0str, scm_eval_0str): Call
10927 scm_c_read_string and scm_c_eval_string respectively, not
10928 themselves. Thanks to Dale P. Smith!
10929
9a97e362
DH
109302001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10931
10932 * unif.c (scm_array_set_x): The variable args does not
10933 necessarily have to be a list. Further, got rid of a redundant
10934 SCM_NIMP test.
10935
592996c9
DH
109362001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10937
10938 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10939 last.
10940
10941 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 10942 init_heap_seg): Fixed signedness.
592996c9
DH
10943
10944 (init_heap_seg): Replaced strange for-loop with a while loop.
10945
10946 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10947
10948 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10949
10950 The following patch adds conservative marking for the elements of
10951 free or allocated cells.
10952
10953 * gc.c (allocated_mark, heap_segment): New static functions.
10954
10955 (which_seg): Deleted, since the functionality is now provided by
10956 function heap_segment.
10957
10958 (map_free_list): Use heap_segment instead of which_seg.
10959
10960 (MARK): If cell debugging is disabled, mark free cells
10961 conservatively.
10962
10963 (scm_mark_locations, scm_cellp): Extracted the search for the
10964 heap segment of a SCM value into function heap_segment.
10965
10966 (scm_init_storage): Allocated cells must be marked
10967 conservatively.
10968
10969 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10970
10971 The following patch changes the representation of weak vectors to
10972 double cells instead of using an extension of the vector's
10973 allocated memory.
10974
10975 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10976 the result of SCM_WVECT_GC_CHAIN.
10977
10978 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10979
10980 * weaks.c (allocate_weak_vector): New static function. It does
10981 not patch any previously created vector object during the
10982 construction of a weak vector, and thus doesn't need to switch
10983 off interrupts during vector creation.
10984
10985 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10986 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10987 Use allocate_weak_vector to provide the new weak vector object.
10988
10989 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10990 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10991 now stored in the double cell.
10992
10993 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10994 Use SCM_WVECT_TYPE.
10995
10996 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10997 using an entry of the double cell.
10998
4dadf664
TTN
109992001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
11000
11001 * stamp-h.in: bye bye
11002
02202352
MV
110032001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
11004
11005 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
11006 scm_eval_0str.
11007
11008 * load.c, load.h (scm_c_primitive_load,
11009 scm_c_primitive_load_path): New.
11010
11011 * strports.c, strports.h (scm_c_read_string): Renamed from
11012 scm_read_0str. Also, added "const" qualifier to argument.
11013 (scm_c_eval_string): Renamed from scm_eval_0str.
11014 (scm_read_0str, scm_eval_0str): Deprecated.
11015
df1ad0d1
MG
110162001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11017
11018 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
11019 SCM_LIST1.
11020
1afff620
KN
110212001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11022
11023 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11024 scm_list_n): New functions.
11025 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11026 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11027 (lots of files): Use the new functions.
4dadf664 11028
1afff620
KN
11029 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11030
11031 * strings.c: #include "libguile/deprecation.h".
11032
b858464a
MG
110332001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11034
11035 * read.c (scm_lreadr): When reading a hash token, check for a
11036 user-defined hash procedure first, so that overriding the builtin
11037 hash characters is possible (this was needed for implementing
11038 SRFI-4's read synax `f32(...)').
4dadf664 11039
b858464a
MG
11040 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11041 because the latter is unsigned now and breaks comparisons like
11042 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11043
d95c0b76
NJ
110442001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11045
11046 * eval.h, eval.c (scm_call_4): New function.
11047
11048 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11049 directly rather than dispatching to them via scm_ithrow and a lazy
11050 catch.
4dadf664 11051
d95c0b76
NJ
11052 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11053 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11054 for trap handler procedures.
11055
11056 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11057 procedures not being #f.
11058
30e3be5a
ML
110592001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11060
11061 * Makefile.am (c-tokenize.c): add rule to generate it.
11062 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11063
11064 filter-doc-snarfage.c: remove.
11065
82893676
MG
110662001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11067
11068 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11069
11070 The following set of changes makes compiling Guile under various
11071 Windows compilers easier. Compilation under GNU systems should
11072 not be affected at all.
11073
11074 Thanks to Stefan Jahn for all necessary information, patches and
11075 testing.
4dadf664 11076
82893676
MG
11077 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11078 getpgrp, ttyname, primitive-fork and some header inclusion for
11079 Windows.
11080
11081 * random.c: Define M_PI, if not predefined and use __int64 for
11082 LONG64 under Windows.
11083
11084 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11085 Windows and conditionalize some signal names.
11086
4dadf664 11087 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11088 Include socket library header under Windows.
11089
11090 * stime.c (CLKTCK): Add cast to int, to make it compile under
11091 Windows.
11092
11093 * ports.c (truncate): New function, compiled only under Windows.
11094
11095 * net_db.c: Do not declare errno under Windows.
11096
11097 * iselect.h, inet_aton.c: Include socket library headers under
11098 Windows.
11099
11100 * guile.c (inner_main): Under Windows, initialize socket library
11101 and initialize gdb_interface data structures.
11102
11103 * gdb_interface.h: Under Windows, gdb_interface cannot be
11104 initialized statically. Initialize at runtime instead.
11105
11106 * fports.c (write_all): ssize_t -> size_t.
11107 (fport_print): Conditionalize call to ttyname().
11108 (getflags): New function, compiled only under Windows.
11109
11110 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11111 primitives chown, link, fcntl.
11112 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11113 as path seperator.
11114
11115 * backtrace.c: Include <io.h> under Windows.
11116
11117 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11118
11119 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11120 declaration.
11121
fdc28395
KN
111222001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11123
11124 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11125 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11126 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11127 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11128 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11129 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11130 (scm_dynamic_wind, scm_dowinds), environments.c
11131 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11132 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11133 goops.c (GETVAR, purgatory, make_class_from_template,
11134 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11135 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11136 (scm_primitive_load), modules.c (scm_resolve_module,
11137 scm_c_define_module, scm_c_use_module, scm_c_export,
11138 module_variable, scm_eval_closure_lookup, scm_sym2var,
11139 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11140 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11141 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11142 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11143 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11144 (scm_object_to_string, scm_call_with_output_string,
11145 scm_call_with_input_string), throw.c (scm_body_thunk,
11146 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11147 scm_make_shared_array), vports.c (sf_flush, sf_write,
11148 sf_fill_input, sf_close): Use one of the above functions.
11149 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11150
36284627
DH
111512001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11152
11153 * filesys.c (scm_close), ports.c (scm_close_port,
11154 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11155 instead of SCM_NEGATE_BOOL.
11156
11157 * filesys.c (scm_stat): Clean up type dispatch.
11158
11159 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11160 scm_output_port_p): Get rid of redundant IM type check.
11161
11162 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11163 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11164 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11165 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11166 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11167 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11168 scm_addr_vector), stime.c (scm_strftime), strings.c
11169 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11170 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11171 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11172 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11173 instead of scm_makfromstr.
11174
11175 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11176 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11177 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11178 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11179 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11180 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11181 !SCM_<pred> over SCM_N<pred>.
11182
11183 * strings.[ch] (scm_makfromstr): Deprecated.
11184
11185 (scm_mem2string): New function, replaces scm_makfromstr.
11186
11187 * strings.c (scm_substring), strop.c (string_copy,
11188 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11189 (scm_symbol_to_string): Fix gc problem.
11190
11191 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11192 SCM_<foo>_H.
11193
11194 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11195 warning about comparing signed and unsigned values. This fix is
11196 not optimal, since it won't work reliably if sizeof (c_start) >
11197 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11198 solution is to define this macro as an inline function, thus
11199 allowing to specifiy the types of c_start and c_end.
11200
13dcb666
DH
112012001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11202
11203 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11204 scm_t_debug_frame*.
11205
11206 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11207 Rename <foo>H to SCM_<foo>_H.
11208
11209 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11210 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11211
11212 (narrow_stack): Make i unsigned. Don't use side-effecting
11213 operations in conditions.
11214
11215 (narrow_stack, scm_make_stack, scm_stack_id,
11216 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11217
11218 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11219 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11220 more.
11221
11222 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11223 signedness.
11224
ea2c3968 11225 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11226
11227 * stacks.h (SCM_FRAMEP): Fix type check.
11228
ac13d9d2
ML
112292001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11230
ee0c0e03
ML
11231 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11232 c-tokenize.c when doing maintainer-clean.
11233
ac13d9d2
ML
11234 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11235
11236 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11237 simplify.
11238
11239 * eval.c: all hash signs are in column 0.
11240
11241 * Makefile.am (guile_filter_doc_snarfage): build using
11242 c-tokenize.c, not filter-doc-snarfage.c.
11243 rearrange snarfing dependencies a bit.
11244
11245 * c-tokenize.lex: new file.
11246
16be44e5
MV
112472001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11248
11249 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11250 scm_t_srcpropso_plist. See the big type renaming.
11251 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11252 Thanks to Seth Alves!
4dadf664 11253
16be44e5
MV
11254 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11255 they aren't defined already.
11256
5843e5c9
DH
112572001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11258
11259 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11260 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11261 problem.
11262
11263 * backtrace.c (display_expression, scm_set_print_params_x,
11264 display_application, display_frame, scm_backtrace), numbers.c
11265 (scm_istring2number), objects.c (scm_class_of,
11266 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11267 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11268
11269 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11270 always positive.
11271
11272 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11273 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11274
11275 * objects.c (scm_class_of): Type fix.
11276
11277 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11278 eliminated goto.
11279
11280 * pairs.h (scm_error_pair_access): The function can return if
11281 called recursively.
11282
6b41a313
MG
112832001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11284
11285 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11286
11287 * gdbint.c, init.c: Removed inclusion of tag.h.
11288
11289 * tag.h, tag.c: Removed files.
11290
11291 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11292
fbbdb121
GH
112932001-06-20 Gary Houston <ghouston@arglist.com>
11294
11295 * deprecation.c, extensions.c, rw.c: include string.h.
11296
72c17ed0
GH
112972001-06-19 Gary Houston <ghouston@arglist.com>
11298
11299 * filter-doc-snarfage.c (process): added ungetc in
11300 MULTILINE_COOKIE case since otherwise it fails when there's no
11301 space between the '(' and the quote of the following string
11302 (gcc 3.0).
11303
4ff9f825
MV
113042001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11305
4927dd28
MV
11306 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11307
b629af45
MV
113082001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11309
11310 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11311 extension takes place.
11312 * strings.h (SCM_STRING_LENGTH): Likewise.
11313 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11314
4ff9f825
MV
11315 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11316 it.
11317
11318 * tags.h: Include <stdint.h> when we have it.
11319 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11320 available. Else use "unsigned long".
11321 (scm_signed_bits_t): New.
11322
11323 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11324 (SCM_INUM): Cast result to scm_signed_bits_t.
11325
58bee6a8
TTN
113262001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11327
11328 * mkstemp.c: Update path to #include file scmconfig.h.
11329 Thanks to Golubev I. N.
11330
00d8d838
DH
113312001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11332
11333 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11334
ea2c3968 11335 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11336 the macro definition.
11337
11338 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11339 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11340 instead of SCM_INST_TYPE.
11341
11342 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11343 the object is a struct before accessing its struct flags.
11344
11345 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11346
495c67e5
GH
113472001-06-10 Gary Houston <ghouston@arglist.com>
11348
11349 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11350 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11351 work reliably anymore. try it from boot-9.scm instead.
11352
6a9003d3
MV
113532001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11354
11355 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11356 Thanks to Matthias Köppe!
58bee6a8 11357
47bcd646
ML
113582001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11359
a88ff5b6
ML
11360 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11361 space-happy C preprocessors.
11362
47bcd646 11363 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11364 inside cookies. thanks to Matthias Köppe!
47bcd646 11365
bab246f3
DH
113662001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11367
11368 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11369 keywords. Fix gc protection.
11370
11371 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11372 operations in macro calls.
11373
11374 * pairs.c (scm_error_pair_access): Avoid recursion.
11375
11376 Thanks to Matthias Koeppe for reporting the bugs that correspond
11377 to the following set of patches.
11378
11379 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11380 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11381 bitvector base address using SCM_BITVECTOR_BASE.
11382
11383 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11384 unsigned long*.
11385
dcb410ec
DH
113862001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11387
11388 * goops.c (SCM_CLASS_REDEF): Removed.
11389
11390 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11391 SCM_<foo>_H.
11392
11393 Thanks to Matthias Koeppe for reporting the bugs that correspond
11394 to the following set of patches.
11395
11396 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11397 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11398 scm_sys_allocate_instance, clear_method_cache,
11399 scm_sys_invalidate_method_cache_x, scm_make,
11400 create_standard_classes, scm_make_port_classes, scm_make_class,
11401 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11402
11403 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11404
11405 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11406
11407 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11408 UNARY_ELTS_CODE): Remove bogus break statement.
11409
11410 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11411 Don't access bit vectors elements as SCM objects.
11412
11413 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11414 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11415 Don't assign to an unpacked value.
11416
e81d98ec
DH
114172001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11418
11419 * __scm.h (SCM_NORETURN): Moved here from error.h.
11420
11421 (SCM_UNUSED): New macro.
11422
11423 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11424
11425 * backtrace.c (display_error_handler), continuations.c
11426 (continuation_print), debug.c (debugobj_print), dynwind.c
11427 (guards_print), environments.c (observer_print,
11428 core_environments_finalize, leaf_environment_cell,
11429 leaf_environment_print, eval_environment_print,
11430 eval_environment_observer, import_environment_define,
11431 import_environment_undefine, import_environment_print,
11432 import_environment_observer, export_environment_define,
11433 export_environment_undefine, export_environment_print,
11434 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11435 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11436 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11437 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11438 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11439 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11440 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11441 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11442 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11443 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11444 set_slot_value, test_slot_existence, scm_change_object_class,
11445 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11446 default_setter), guardians.c (guardian_print, guardian_gc_init,
11447 guardian_zombify, whine_about_self_centered_zombies), guile.c
11448 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11449 mallocs.c (malloc_print), numbers.c (scm_print_real,
11450 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11451 end_input_default, scm_port_print, fill_input_void_port,
11452 write_void_port), root.c (root_print), smob.c (scm_mark0,
11453 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11454 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11455 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11456 (scm_struct_free_0, scm_struct_free_standard,
11457 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11458 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11459 scm_handle_by_throw, scm_ithrow), weaks.c
11460 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11461 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11462 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11463
11464 * error.h (SCM_NORETURN): Moved to __scm.h.
11465
11466 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11467 Renamed <foo>H to SCM_<foo>_H.
11468
11469 * gc.c (debug_cells_gc_interval): New static variable.
11470
11471 (scm_assert_cell_valid): If selected by the user, perform
11472 additional garbage collections.
11473
11474 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11475 if additional garbage collections are desired.
11476
11477 (mark_gc_async): If additional garbage collections are selected
11478 by the user, don't call the after-gc-hook. Instead require the
11479 user to run the hook manually.
11480
11481 * pairs.c (scm_error_pair_access): New function. Only compiled
11482 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11483
11484 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11485
11486 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11487 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11488 is a real pair object. (Glocs are also accepted, but that may
11489 change.) If not, abort with an error message.
11490
17fa3fcf
DH
114912001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11492
11493 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11494
11495 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11496 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11497
feeedafb
MV
114982001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11499
11500 * extensions.c (scm_c_register_extension): Allow NULL as library
11501 name.
11502 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11503
feeedafb
MV
11504 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11505 non-pointers are being compared. Thanks to Alexander Klimov!
11506
4bcdfe46
GH
115072001-06-04 Gary Houston <ghouston@arglist.com>
11508
11509 * rw.c (scm_write_string_partial): new procedure implementing
11510 write-string/partial in (ice-9 rw).
11511 * rw.h: declare scm_write_string_partial.
58bee6a8 11512
f480396b
MV
115132001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11514
feeedafb
MV
11515 * keywords.c (keyword_print): Substract 1 from length of symbol
11516 name, accounting for the silly dash.
11517
11518 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11519 Do not emit deprecation warning.
11520
f480396b
MV
11521 Added exception notice to all files.
11522
11523 * dynl.c: Include "deprecation.h".
11524
c794483c
MV
115252001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11526
11527 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11528 scm_clear_registered_modules): Deprecated.
11529
9454d8d5
RB
115302001-06-02 Rob Browning <rlb@cs.utexas.edu>
11531
11532 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11533 guile-snarf-docs-texi.
11534
11535 * fports.c: HAVE_ST_BLKSIZE changed to
11536 HAVE_STRUCT_STAT_ST_BLKSIZE.
11537 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11538 HAVE_STRUCT_STAT_ST_BLKSIZE.
11539
11540 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11541 HAVE_STRUCT_STAT_ST_RDEV.
11542 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11543 HAVE_STRUCT_STAT_ST_BLKSIZE.
11544 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11545 HAVE_STRUCT_STAT_ST_BLOCKS.
11546
114f9bab
MV
115472001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11548
b0c16cd9
MV
11549 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11550 of scm_eval_x to allow module changes between the forms in the
11551 string. Set/restore module using scm_c_call_with_current_module.
11552
114f9bab
MV
11553 * mkstemp.c: New file, slightly modified from libiberties
11554 mkstemps.c.
11555
c99f9605
ML
115562001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11557
11558 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11559 filter-doc-snarfage.c: new files.
11560
11561 * Makefile.am: add stuff to [build,] use and distribute
11562 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11563
11564 * guile-snarf.in: grok the new snarf output.
11565
11566 * snarf.h: make the output both texttools- and `read'-friendly.
11567
47bcd646
ML
11568 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11569 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11570
7eb5d7b2
MV
115712001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11572
11573 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11574 error for unsupported format controls and for superflous
ec2667f0 11575 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11576
11577 * print.h, print.c (scm_print_symbol_name): Factored out of
11578 scm_iprin1.
11579 (scm_iprin1): Call it.
58bee6a8 11580
7eb5d7b2
MV
11581 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11582 weird names are printed correctly.
11583
11584 * print.c (scm_print_symbol_name): Symbols whose name starts with
11585 `#' or `:' or ends with `:' are considered weird.
11586
609c3d30
MG
115872001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11588
11589 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11590 and /.
11591
115922001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11593
11594 * debug.h: Removed prototype for scm_eval_string.
11595
8d09eb04
MG
115962001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11597
11598 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11599 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11600
11601 Change strncpy to memcpy to allow embedded NUL characters in
11602 symbol prefix.
11603
dd85ce47
ML
116042001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11605
fde50407
ML
11606 * hooks.c (scm_create_hook): deprecated.
11607 (make_hook): deleted.
11608 (scm_make_hook): all the hook creation code is now here.
11609
11610 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11611 a hook, make it permanent, and do a `scm_c_define' on it.
11612
dd85ce47
ML
11613 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11614
11615 * socket.c (s_scm_inet_pton): fix docstring quoting.
11616 (s_scm_inet_ntop): ditto.
11617
11618 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11619
11620 * hashtab.c (scm_internal_hash_fold): fix argument position in
11621 SCM_ASSERT.
11622
11623 * environments.c (s_scm_import_environment_set_imports_x): fix
11624 argument position in SCM_ASSERT.
11625
11626 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11627 (s_scm_make_iloc): ditto.
11628
729dbac3
DH
116292001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11630
11631 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11632
11633 * eval.c (promise_print): Read the promise's value as an object.
11634
11635 (SCM_CEVAL): Don't perform side-effecting operations in macro
11636 parameters.
11637
11638 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11639 conditional expression.
11640
11641 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11642 initializer.
11643
11644 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11645 text, removed redundant computation of effective_length and fixed
11646 the overflow check.
11647
11648 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11649 values.
11650
11651 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11652
11653 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11654
11655 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11656 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11657
11658 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11659
11660 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11661 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11662 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11663 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11664
11665 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11666
11667 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11668
ea2c3968 11669 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11670
11671 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11672 problem.
11673
11674 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11675 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11676 Read SCM objects rather than scm_bits_t values.
11677
11678 * tags.h (SCM_VOIDP_TEST): Removed.
11679
11680 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11681 value of 2 now corresponds to the former 1, the current 1
11682 corresponds to the former situation that SCM_VOIDP_TEST was
11683 defined.
11684
58bee6a8
TTN
11685 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11686 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11687 typedef struct scm_unused_struct { } * SCM;
11688 Thanks to Han-Wen Nienhuys for the suggestion.
11689
11690 * unif.c (scm_array_set_x): Fix typing problem, and use
11691 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11692 dealing with uniform vectors.
11693
6b1b030e
ML
116942001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11695
11696 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11697 (scm_igc): mark from them, too (precisely, not conservatively!).
11698
11699 * root.h (scm_gc_registered_roots): new object in
11700 scm_sys_protects.
11701
11702 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11703 `scm_protect_object'. shouldn't call it at all, though, it seems.
11704
11705 * gc.c (scm_[un]protect_object): deprecated.
11706 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11707 (scm_gc_[un]register_root[s]): new.
11708
11709 * gc.h: add prototypes for scm_gc_[un]protect_object,
11710 scm_gc_[un]register_root[s].
11711
c014a02e
ML
117122001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11713
11714 revert the controversial part of the 2001-05-24 changes.
11715
0120801d
MV
117162001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11717
f4e0611e
MV
11718 * modules.c (scm_env_module): Exported to Scheme.
11719
0120801d 11720 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11721
0120801d 11722 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11723
0120801d
MV
11724 * backtrace.c: Include "libguile/filesys.h".
11725 (sym_base, display_backtrace_get_file_line,
11726 display_backtrace_file, display_backtrace_file_and_line): New.
11727 (display_frame): Call display_backtrace_file_and_line if that is
11728 requested.
11729 (display_backtrace_body): Call scm_display_backtrace_file if
11730 requested.
11731
11732 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11733 Prototypes removed since there's no definition for these
11734 functions.
11735
880a7d13
MG
117362001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11737
11738 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11739 Changed use of scm_array->scm_array_t and
11740 scm_array_dim->scm_array_dim_t to enable build with
11741 --disable-deprecated.
11742
1be6b49c
ML
117432001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11744
11745 The purpose of this set of changes is to regularize Guile's usage
11746 of ANSI C integral types, with the following ideas in mind:
11747
d69c867a
ML
11748 - SCM does not nesessarily have to be long.
11749 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11750 - long is not nesessarily the same size as int.
11751
11752 The changes are incomplete and possibly buggy. Please test on
11753 something exotic.
11754
11755 * validate.h
11756 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11757 new macros.
11758
11759 * unif.h: type renaming:
11760 scm_array -> scm_array_t
11761 scm_array_dim -> scm_array_dim_t
11762 the old names are deprecated, all in-Guile uses changed.
11763
11764 * tags.h (scm_ubits_t): new typedef, representing unsigned
11765 scm_bits_t.
11766
11767 * stacks.h: type renaming:
11768 scm_info_frame -> scm_info_frame_t
11769 scm_stack -> scm_stack_t
11770 the old names are deprecated, all in-Guile uses changed.
11771
11772 * srcprop.h: type renaming:
11773 scm_srcprops -> scm_srcprops_t
11774 scm_srcprops_chunk -> scm_srcprops_chunk_t
11775 the old names are deprecated, all in-Guile uses changed.
11776
11777 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11778 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11779 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11780 vectors.c, vports.c, weaks.c:
11781 various int/size_t -> size_t/scm_bits_t changes.
11782
11783 * random.h: type renaming:
11784 scm_rstate -> scm_rstate_t
11785 scm_rng -> scm_rng_t
11786 scm_i_rstate -> scm_i_rstate_t
11787 the old names are deprecated, all in-Guile uses changed.
11788
11789 * procs.h: type renaming:
11790 scm_subr_entry -> scm_subr_entry_t
11791 the old name is deprecated, all in-Guile uses changed.
11792
11793 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11794 type renaming:
11795 scm_option -> scm_option_t
11796 the old name is deprecated, all in-Guile uses changed.
11797
11798 * objects.c: various long -> scm_bits_t changes.
11799 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11800
11801 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11802 SCM_I_FIXNUM_BIT.
11803
11804 * num2integral.i.c: new file, multiply included by numbers.c, used
11805 to "templatize" the various integral <-> num conversion routines.
11806
11807 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11808 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11809 deprecated.
11810 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11811 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11812 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11813 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11814 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11815 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11816 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11817 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11818 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11819 scm_num2size): new functions.
11820
d69c867a 11821 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11822
11823 * load.c: change int -> size_t in various places (where the
11824 variable is used to store a string length).
11825 (search-path): call scm_done_free, not scm_done_malloc.
11826
11827 * list.c (scm_ilength): return a scm_bits_t, not long.
11828 some other {int,long} -> scm_bits_t changes.
11829
11830 * hashtab.c: various [u]int -> scm_bits_t changes.
11831 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11832 (scm_ihashx): n: uint -> scm_bits_t
11833 use scm_bits2num instead of scm_ulong2num.
11834
11835 * gsubr.c: various int -> scm_bits_t changes.
11836
11837 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11838
d69c867a 11839 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
11840
11841 * gh.h (gh_str2scm): len: int -> size_t
11842 (gh_{get,set}_substr): start: int -> scm_bits_t,
11843 len: int -> size_t
11844 (gh_<num>2scm): n: int -> scm_bits_t
11845 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11846 (gh_length): return scm_bits_t, not unsigned long.
11847
11848 * gc.[hc]: various small changes relating to many things stopping
11849 being long and starting being scm_[u]bits_t instead.
11850 scm_mallocated should no longer wrap around.
11851
11852 * fports.h: type renaming:
11853 scm_fport -> scm_fport_t
11854 the old name is deprecated, all in-Guile uses changed.
11855
11856 * fports.c (fport_fill_input): count: int -> scm_bits_t
11857 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11858
11859 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11860 those prototypes, as the functions they prototype don't exist.
11861
11862 * fports.c (default_buffer_size): int -> size_t
11863 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11864 default_size: int -> size_t
11865 (scm_setvbuf): csize: int -> scm_bits_t
11866
11867 * fluids.c (n_fluids): int -> scm_bits_t
11868 (grow_fluids): old_length, i: int -> scm_bits_t
11869 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11870 scm_bits_t
11871 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11872
11873 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11874 the new and shiny SCM_NUM2INT.
11875
11876 * extensions.c: extension -> extension_t (and made a typedef).
11877
11878 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11879 there are no nasty surprises if/when the various deeply magic tag
11880 bits move somewhere else.
11881
11882 * eval.c: changed the locals used to store results of SCM_IFRAME,
11883 scm_ilength and such to be of type scm_bits_t (and not int/long).
11884 (iqq): depth, edepth: int -> scm_bits_t
11885 (scm_eval_stack): int -> scm_bits_t
11886 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11887 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11888 i: int -> scm_bits_t
11889
11890 * environments.c: changed the many calls to scm_ulong2num to
11891 scm_ubits2num.
11892 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11893
11894 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11895
11896 * debug.h: type renaming:
11897 scm_debug_info -> scm_debug_info_t
11898 scm_debug_frame -> scm_debug_frame_t
11899 the old names are deprecated, all in-Guile uses changed.
11900 (scm_debug_eframe_size): int -> scm_bits_t
11901
11902 * debug.c (scm_init_debug): use scm_c_define instead of the
11903 deprecated scm_define.
11904
11905 * continuations.h: type renaming:
11906 scm_contregs -> scm_contregs_t
11907 the old name is deprecated, all in-Guile uses changed.
11908 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11909 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11910
11911 * continuations.c (scm_make_continuation): change the type of
d69c867a 11912 stack_size from long to scm_bits_t.
1be6b49c
ML
11913
11914 * ports.h: type renaming:
11915 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11916 scm_port -> scm_port_t
11917 scm_ptob_descriptor -> scm_ptob_descriptor_t
11918 the old names are deprecated, all in-Guile uses changed.
11919 (scm_port_t.entry): int -> scm_bits_t.
11920 (scm_port_t.line_number): int -> long.
11921 (scm_port_t.putback_buf_size): int -> size_t.
11922
11923 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 11924 global namespace and have little value beside that).
1be6b49c
ML
11925 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11926 SCM handle).
11927 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 11928 exist (for size_t & ptrdiff_t).
1be6b49c
ML
11929 (scm_sizet): deprecated.
11930
11931 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11932
a6219f22
MV
119332001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11934
11935 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11936 SCM_VARIABLE_INIT since that it what it used to be.
11937
11938 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 11939 ANSIsh. Thanks to Matthias Köppe!
a6219f22 11940
311b6a3c
MV
119412001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11942
9dfc4faa
MV
11943 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11944 needed for weak-key hashtables.
11945
11946 * procs.c (scm_make_subr_with_generic): Add missing last argument
11947 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11948
11949 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11950 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
11951
11952 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11953
2fc933fe
MV
119542001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11955
57ae112d
MV
11956 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11957 `duplicate_string'. Do not use an indirect cell, store symbol
11958 directly in collision list of hash table.
11959 (duplicate_string): Removed.
58bee6a8 11960
57ae112d
MV
11961 * init.c (scm_init_guile_1): Call scm_init_extensions.
11962
11963 * Makefile.am: Add "extensions.c" and related files in all the
11964 right places.
11965
11966 * extensions.h, extension.c: New files.
11967
11968 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11969
2fc933fe
MV
11970 * modules.h (scm_system_module_env_p): Move out of deprecated
11971 section.
11972
11973 * rw.h (scm_init_rw): Added prototype.
11974
11975 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11976 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11977 New functions. They replace scm_make_gsubr and
11978 scm_make_gsubr_with_generic. The `make' variants only create the
11979 gsubr object, while the `define' variants also put it into the
11980 current module. Changed all callers.
11981 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11982
11983 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11984 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11985 functions. They replace scm_make_subr, scm_make_subr_opt and
11986 scm_make_subr_with_generic. The `make' variants only create the
11987 subr object, while the `define' variants also put it into the
11988 current module. Changed all callers.
11989 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11990 Deprecated.
11991
11992 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11993 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11994 the comments above.
58bee6a8 11995
18928596
NJ
119962001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11997
11998 * throw.c (scm_lazy_catch): Slight docstring clarification.
11999
21a13beb
MV
120002001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
12001
e2b6ddc6
MV
12002 * throw.c: Lazy-catch handlers are no longer allowed to return.
12003 Fixed comments throughout.
12004 (scm_ithrow): Signal an error when a lazy-catch handler returns.
12005 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
12006 recognized as such.
12007
21a13beb
MV
12008 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
12009 refered to s_scm_minor_version previously.
12010
12011 * modules.h, modules.c: Moved around a lot of code so that
12012 deprecated features appear at the bottom.
12013 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
12014 module_prefix, make_modules_in_var, beautify_user_module_x_var,
12015 scm_the_root_module, scm_make_module, scm_ensure_user_module,
12016 scm_load_scheme_module): Deprecated.
12017 (scm_system_module_env_p): Return SCM_BOOL_T directly for
12018 environments corresponding to the root module.
12019 (convert_module_name, scm_c_resolve_module,
12020 scm_c_call_with_current_module, scm_c_define_module,
12021 scm_c_use_module, scm_c_export): New.
12022 (the_root_module): New static variant of scm_the_root_module. Use
12023 it everywhere instead of scm_the_root_module.
58bee6a8 12024
21a13beb
MV
12025 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12026 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12027 (scm_c_with_fluid): New.
12028 (scm_with_fluids): Use scm_c_with_fluids instead of
12029 scm_internal_with_fluids.
58bee6a8 12030
21a13beb
MV
12031 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12032 `scm_init_goops'. Do not explicitly create/switch modules.
12033 Return SCM_UNSPECIFIED.
12034 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12035 (scm_load_goops): Use scm_c_resolve_module instead of
12036 scm_resolve_module.
58bee6a8 12037
21a13beb
MV
12038 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12039 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12040 `scm_init_rw' prior to loading the startup files.
12041
12042 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12043 scm_init_rdelim. Do not explicitly create/switch modules.
12044 Return SCM_UNSPECIFIED.
12045 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12046 procedure.
58bee6a8 12047
21a13beb
MV
12048 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12049 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12050 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12051
12052 * script.c (scm_shell): Evaluate the compiled switches in the
12053 current module, not in the root module.
12054
120552001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12056
12057 * fluids.c (scm_c_with_fluids): Rename from
12058 scm_internal_with_fluids.
12059 (scm_internal_with_fluids): Deprecated.
12060 (scm_c_with_fluid): New.
12061
09cb9e73
DH
120622001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12063
12064 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12065
12066 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12067 accessed with SCM_C[AD]R.
12068
12069 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12070
c81ea65d
RB
120712001-05-16 Rob Browning <rlb@cs.utexas.edu>
12072
12073 * version.c (s_scm_major_version): doc fixes.
12074 (s_scm_minor_version): doc fixes.
12075 (s_scm_minor_version): new function.
12076
12077 * version.h (scm_init_version): new function.
12078
12079 * versiondat.h.in: add GUILE_MICRO_VERSION.
12080
887dfa7d
DH
120812001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12082
12083 * deprecation.c (scm_init_deprecation): Renamed
12084 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12085
78930a69
MV
120862001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12087
12088 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12089 dependent on cpp_cnvt.awk
12090
39cde5c5
MG
120912001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12092
12093 * script.c (scm_compile_shell_switches): New command line option
12094 `--use-srfi' for loading a list of SRFIs on startup.
12095 (scm_shell_usage): Added `--use-srfi' to help message.
12096
f3f9dcbc
MV
120972001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12098
78930a69 12099 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12100
f3f9dcbc
MV
12101 The concept of vcells has been removed from Guile. With it,
12102 explicit obarrays and associated operations are gone. Use
12103 hashtables instead of obarrays.
887dfa7d 12104
f3f9dcbc
MV
12105 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12106 result as variable instead of vcell. Glocs no longer point to a
12107 vcell but to a variable. Use scm_c_define instead of
12108 scm_sysintern and treat the result as a variable (which it is),
12109 not a vcell.
887dfa7d 12110
f3f9dcbc
MV
12111 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12112 SCM_DEFVARIABLEP): Deprecated.
12113 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12114 (variable_print): Do not print name of variable.
12115 (variable_equalp): Compare values, not vcells.
12116 (anonymous_variable_sym): Removed.
12117 (make_vcell_variable): Removed.
12118 (make_variable): New, as replacement.
12119 (scm_make_variable, scm_make_undefined_variable): Do not take name
12120 hint parameter.
12121 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12122 error in that case.
12123 (scm_builtin_variable): Deprecated.
12124
12125 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12126 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12127 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12128 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12129 scm_string_to_obarray_symbol, scm_intern_symbol,
12130 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12131 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12132 Deprecated and moved to "symbols-deprecated.c".
12133 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12134 (scm_init_symbols): Call scm_init_symbols_deprecated.
12135 * symbols-deprecated.c: New file.
12136 * Makefile.am: Added symbols-deprecated.c and related files in all
12137 the right places.
887dfa7d 12138
f3f9dcbc
MV
12139 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12140 SCM_GLOBAL_VCELL_INIT): Deprecated.
12141 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12142 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12143
f3f9dcbc
MV
12144 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12145 SCM_GLOC_SYM.
12146
12147 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12148 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12149 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12150 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12151 Changed according to the `throughout' comments.
12152
12153 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12154 to `int'.
12155 (scm_module_type): Removed.
12156 (the_root_module): Renamed to the_root_module_var. Now points to
12157 a variable instead of a vcell. Updated all uses.
12158 (scm_the_root_module): Return SCM_BOOL_F when module systems
12159 hasn't been booted yet.
12160 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12161 (scm_post_boot_init_modules): Made static.
12162 (scm_set_current_module): Call scm_post_boot_init_modules on first
12163 call.
12164 (make_modules_in, beautify_user_module_x, resolve_module,
12165 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12166 suffix. Now point to variables instead of vcells. Updated all
12167 uses.
12168 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12169 and return SCM_BOOL_F in that case.
12170 (scm_module_transformer): Likewise.
12171 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12172 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12173 (scm_eval_closure_lookup): Do not allow new definitions when
12174 `interface' flag is set.
12175 (scm_standard_interface_eval_closure): New.
12176 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12177 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12178 scm_c_lookup, scm_c_module_define, scm_c_define,
12179 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12180 scm_modules_prehistory): New.
12181 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12182 instead of scm_intern0.
887dfa7d 12183
f3f9dcbc
MV
12184 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12185 symbol.
12186
12187 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12188 hashtable operations to maintain the keywords, not obarray ones.
12189
12190 * init.c (scm_load_startup_files): Do not call
12191 scm_post_boot_init_modules. This is done by
12192 scm_set_current_module now.
12193 (scm_init_guile_1): Call scm_modules_prehistory. Call
12194 scm_init_variable early on.
12195
12196 * goops.c (s_scm_sys_goops_loaded): Get
12197 var_compute_applicable_methods from scm_sym2var, not from a direct
12198 invocation of scm_goops_lookup_closure.
12199
12200 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12201
12202 * gc.c: Added simple debugging hack to mark phase of GC: When
12203 activated, do not tail-call scm_gc_mark. This gives nice
12204 backtraces.
12205 (scm_unhash_name): Removed.
12206
12207 * feature.c (features): Renamed to features_var. Now points to a
12208 variable instead of a vcell. Updated all uses.
12209
12210 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12211 `scm_current_module_lookup_closure' which will do the right thing
12212 when the module system hasn't been booted yet.
12213 (SCM_GLOC_SYM): Removed.
12214 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12215 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12216
f3f9dcbc
MV
12217 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12218 instead of with vcells. Do not overwrite `var' with the result of
12219 the lookup, use the new `real_var' instead. Remove `var2' in
12220 exchange (which was only used with threads).
12221 (sym_three_question_marks): New.
12222 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12223 `SCM_GLOC_SYM'.
12224 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12225 (scm_m_atfop): Expect the function definition to be a variable
12226 instead of a vcell.
12227 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12228 symbol instead.
12229 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12230 (scm_eval_args): Use more explicit code in the gloc branch of the
12231 atrocious struct ambiguity test. The optimizer will sort this
12232 out.
12233 (scm_deval_args): Likewise.
12234 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12235 remember the symbol instead. Added some comments where
12236 scm_tc3_cons_gloc really exclusively refers to structs.
12237 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12238 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12239 of scm_sysintern in general.
12240
12241 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12242 explicit magic.
12243
12244 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12245 pairs. Put the variable directly in the gloc.
12246 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12247 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12248
12249 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12250
12251 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12252 scm_the_last_stack_fluid_var. It now points to a variable instead
12253 of a vcell. Updated all uses.
12254 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12255 instead of a vcell. Updated all uses.
12256
12257 * _scm.h: Include "variables.h" and "modules.h" since almost
12258 everybody needs them now.
12259
12260 * root.h (scm_symhash, scm_symhash_vars): Removed.
12261 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12262
7c33806a
DH
122632001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12264
12265 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12266 scm_listofnull.
7c33806a
DH
12267
12268 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12269 like the SCM_NEWCELL macro counterparts.
12270
12271 (scm_init_storage, scm_init_gc): Moved initialization of
12272 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12273
12274 (scm_init_storage): Moved initialization of scm_undefineds and
12275 scm_listofnull to eval.c, initializion of scm_nullstr to
12276 strings.c, initializion of scm_nullvect to vectors.c.
12277
12278 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12279 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12280
12281 * init.c (scm_init_guile_1): Reordered some initializations and
12282 added dependcy information comments.
12283
12284 * load.c (scm_init_load): Use scm_nullstr.
12285
12286 * strings.c (scm_init_strings): Initialize scm_nullstr.
12287
12288 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12289
11bbab47
MV
122902001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12291
12292 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12293 multiple lines. Thanks to Matthias Köppe!
11bbab47 12294
5cd06d5e
DH
122952001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12296
12297 * deprecation.c: Fixed copyright date.
12298
12299 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12300 DEPRECATION_H to SCM_DEPRECATION_H.
12301
32bac999
TTN
123022001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12303
12304 * guile-doc-snarf.in: Update copyright.
12305 Fix relative path bug. Thanks to Sergey Poznyakoff.
12306
c9dcc5ae
MV
123072001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12308
12309 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12310 accept open ports. Thanks to Quetzalcoatl Bradley!
12311
7c582ec9
MG
123122001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12313
12314 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12315 has 779 primitives on startup.
12316
284ab601
MV
123172001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12318
12319 * eval.c (scm_i_eval): Copy expression before passing it to
12320 SCM_XEVAL. The copy operation was removed unintendedly during my
12321 change on 2001-03-25.
12322
910d1e40
ML
123232001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12324
9a5fa6e9 12325 from Matthias Köppe (thanks!):
910d1e40
ML
12326
12327 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12328 portable.
12329
12330 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12331 docstring.
12332
56e55ac7
DH
123332001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12334
12335 * gc.c (scm_init_gc): Added FIXME comment.
12336
12337 * hooks.c: Since hooks don't have a name any more, it is not
12338 necessary to include objprop.h.
12339
12340 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12341
12342 (symbol_name, scm_make_hook_with_name): Removed.
12343
12344 (scm_create_hook): Don't set the hook's name property.
12345
12346 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12347
12348 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12349
12350 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12351
12352 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12353 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12354 FLOBUFLEN and define it unconditionally.
12355
d204b24c
MV
123562001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12357
438201b4
MV
12358 * gh_data.c (gh_lookup): Call gh_module_lookup with
12359 `scm_current_module ()', not `#f'.
12360 (gh_module_lookup): Expect a module instead of an obarray as first
12361 argument and do lookup in that module.
56e55ac7 12362
d204b24c
MV
12363 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12364 arrays. The length of array is already determined differently and
12365 scm_uniform_vector_length does not work on arrays.
12366
26c1d549
MV
123672001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12368
fe7c2f88
MV
12369 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12370 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12371
26c1d549
MV
12372 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12373 they are not used. Changed `wrong type' error into `wrong num
12374 args' error. Changed all callers.
56e55ac7 12375
26c1d549
MV
12376 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12377 arguments are supplied.
12378
1c938eb8
TTN
123792001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12380
12381 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12382 describe `regexp/notbol' and `regexp/noteol' execution flags.
12383
3a6379f7
TTN
12384 * strop.c (scm_substring_move_x): Doc fix; nfc.
12385
c10ecc4c
MV
123862001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12387
12388 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12389 (scm_set_object_procedure_x): Use it to check argument. Fix
12390 docstring.
12391
12392 * evalext.c (scm_definedp): Fix docstring.
12393
a57a0b1e
GH
123942001-05-05 Gary Houston <ghouston@arglist.com>
12395
12396 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12397 support.
12398
7a095584
NJ
123992001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12400
12401 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12402 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12403 Change R4RS references to R5RS.
12404
12405 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12406 docstring source are correctly reproduced in the output (ii)
12407 we don't anymore get occasional trailing quotes. Also reorganized
12408 and commented the code a little.
12409
12410 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12411 fixes.
12412
dd2a6f3a
MG
124132001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12414
12415 * strop.c (scm_string_split): New procedure.
12416
12417 * strop.h (scm_string_split): Added prototype.
12418
00120130
GH
124192001-05-04 Gary Houston <ghouston@arglist.com>
12420
12421 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12422 Dale P. Smith.
12423
b65e6bfe
MV
124242001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12425
12426 * rw.c: Include "modules.h" and "strports.h".
12427
12428 * net_db.h (scm_gethost): Added prototype.
12429
12430 * deprecation.h, deprecation.c: New.
12431 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12432 (DOT_X_FILES): Added "deprecation.x".
12433 (modinclude_HEADERS): Added "deprecation.h".
12434
12435 * init.c: Include "deprecation.h".
12436 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12437
b65e6bfe
MV
124382001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12439
12440 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12441 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12442 New.
12443
b0e5fd8c
GH
124442001-04-29 Gary Houston <ghouston@arglist.com>
12445
12446 * rw.c: new file, implementing C part of module (ice-9 rw).
12447 (scm_read_string_x_partial): moved from ioext.c
12448 (scm_init_rw): new proc.
12449 * rw.h: new file.
12450 init.c: include rw.h and call scm_init_rw.
12451 Makefile.am: include rw.c and rw.h.
12452
0b2da99c
RB
124532001-04-28 Rob Browning <rlb@cs.utexas.edu>
12454
12455 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12456 know what's supposed to happen to it.
12457
12458 * list.h (scm_list_star): deprecation expired - removed.
12459
12460 * numbers.h (scm_dblproc): deprecation expired - removed.
12461 (SCM_UNEGFIXABLE): deprecation expired - removed.
12462 (SCM_FLOBUFLEN): deprecation expired - removed.
12463 (SCM_INEXP): deprecation expired - removed.
12464 (SCM_CPLXP): deprecation expired - removed.
12465 (SCM_REAL): deprecation expired - removed.
12466 (SCM_IMAG): deprecation expired - removed.
12467 (SCM_REALPART): deprecation expired - removed.
12468 (scm_makdbl): deprecation expired - removed.
12469 (SCM_SINGP): deprecation expired - removed.
12470 (SCM_NUM2DBL): deprecation expired - removed.
12471 (SCM_NO_BIGDIG): deprecation expired - removed.
12472
12473 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12474 (scm_tc_dblr): deprecation expired - removed.
12475 (scm_tc_dblc): deprecation expired - removed.
12476 (scm_tc16_flo): deprecation expired - removed.
12477 (scm_tc_flo): deprecation expired - removed.
12478
12479 * tag.h (scm_tag): deprecation expired - removed.
12480
12481 * tag.c: (scm_tag): deprecation expired - removed.
12482
12483 * ioext.c: (scm_fseek): deprecation expired - removed.
12484
12485 * ioext.h (scm_fseek): deprecation expired - removed.
12486
12487 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12488
12489 * gh.h (gh_int2scmb): deprecation expired - removed.
12490
e3334972
NJ
124912001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12492
12493 * stacks.c (scm_make_stack): Fix typo in docstring.
12494
a0f979ac
RB
124952001-04-27 Rob Browning <rlb@cs.utexas.edu>
12496
12497 * error.c (scm_sysmissing): deprecation expired - removed.
12498
12499 * error.h (scm_sysmissing): deprecation expired - removed.
12500
12501 * gc.c
12502 (scm_init_gc): gc-thunk deprecation expired - removed.
12503 (scm_gc_vcell): deprecation expired - removed.
12504 (gc_async_thunk): scm_gc_vcell related code removed.
12505
12506 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12507
12508 * strings.h
12509 (SCM_NSTRINGP): deprecation expired - removed.
12510 (SCM_NRWSTRINGP): deprecation expired - removed.
12511
12512 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12513
12514 * chars.h
12515 (SCM_ICHRP): deprecation expired - removed.
12516 (SCM_ICHR): deprecation expired - removed.
12517 (SCM_MAKICHR): deprecation expired - removed.
12518
12519 * ports.h
12520 (SCM_INPORTP): deprecation expired - removed.
12521 (SCM_OUTPORTP): deprecation expired - removed.
12522
253081cf
MV
125232001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12524
12525 * modules.c (scm_module_type): New.
12526 (scm_post_boot_init_modules): Initialize from Scheme value.
12527 (the_module, scm_current_module, scm_init_modules): the_module is
12528 now a C only fluid.
12529 (scm_current_module): Export to Scheme.
12530 (scm_set_current_module): Do not call out to Scheme, do all the
12531 work in C. Export procedure to Scheme. Only accept modules, `#f'
12532 is no longer valid as the current module. Only set
12533 scm_top_level_lookup_closure_var and scm_system_transformer when
12534 they are not deprecated.
12535 (scm_module_transformer, scm_current_module_transformer): New.
12536
12537 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12538 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12539
253081cf
MV
12540 * gh_data.c: Removed FIXME comment about gh_lookup returning
12541 SCM_UNDEFINED. That's the right thing to do.
12542
12543 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12544 into the conditionally compiled sections.
12545 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12546 scm_current_module_transformer instead of scm_system_transformer.
12547 * init.c (start_stack): Move initialization of
12548 scm_system_transformer to the deprecated section.
1c938eb8 12549
1f7f9ed4
NJ
125502001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12551
12552 * throw.c (scm_throw): Correct docstring.
12553
66c73b76
GH
125542001-04-22 Gary Houston <ghouston@arglist.com>
12555
eefae538
GH
12556 * socket.c: attempted to improve the docstrings slightly.
12557
66c73b76
GH
12558 * net_db.c: remove bogus "close" declaration.
12559 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12560 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12561 moved to socket.c.
12562 * net_db.h: declarations moved too.
12563
12564 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12565 long.
12566 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12567 (VALIDATE_INET6): new macro.
12568 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12569 inet-pton and inet-ntop.
12570 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12571 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12572
7a7f7c53
DH
125732001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12574
12575 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12576 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12577
12578 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12579 when compiled in debug mode.
12580
12581 (scm_gc_sweep): Only call smob's free function if it is defined.
12582
12583 * print.c (scm_iprin1): No need to check for validity of smob
12584 type or existence of print function.
12585
12586 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12587 Resizing will not work well with preemptive threading.
12588
12589 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12590
12591 (scm_make_smob_type): Extracted initialization of smob
12592 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12593 of the critical section.
12594
12595 (scm_smob_prehistory): Initialize all smob descriptors. By
12596 default, don't assign a smob free function: Most smob types don't
12597 need one.
12598
12599 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12600
e1368a8d
GH
126012001-04-21 Gary Houston <ghouston@arglist.com>
12602
12603 * socket.c (FLIP_NET_HOST_128): new macro.
12604 (scm_fill_sockaddr): use new macro.
12605 (scm_addr_vector): completed IPv6 address support. added const
12606 to the address parameter.
12607
5a525b84
GH
126082001-04-20 Gary Houston <ghouston@arglist.com>
12609
12610 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12611 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12612 is defined.
12613 (scm_addr_vector): use a switch instead of multiple if statements.
12614 Add support for IPv6 (incomplete) .
e1368a8d 12615 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12616
1a551638
DH
126172001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12618
12619 * struct.c (scm_free_structs): Only pairs may be accessed with
12620 SCM_C[AD]R.
12621
c07b3fef
MD
126222001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12623
a9d861e3
MD
12624 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12625
c07b3fef
MD
12626 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12627 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12628 parentheses in order to get the correct associativity.
12629
af7546eb
DH
126302001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12631
12632 * unif.c (scm_array_to_list): Added missing handling of arrays of
12633 bytes. Thanks to Masao Uebayashi for the bug report.
12634
4daecfee
DH
126352001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12636
12637 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12638 consistently.
12639
726d810a
DH
126402001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12641
12642 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12643
12644 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12645 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12646 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12647 SCM_CLOSURE_FORMALS.
12648
12649 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12650 (scm_i_procedure_arity): Prefer stronger predicates like
12651 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12652
12653 * macros.c (macro_print): Extracted macro printing code from
12654 print.c and simplified it.
12655
12656 (scm_macro_type): Use SCM_MACRO_TYPE;
12657
12658 (scm_init_macros): Use macro_print for printing macros.
12659
12660 * print.c (scm_print_opts): Improved option documentation.
12661
12662 (scm_iprin1): Extracted printing of macros to macros.c.
12663 Simplified printing of ordinary closures.
12664
12665 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12666 Martin Grabmueller for the bug report.
12667
e038c042
DH
126682001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12669
12670 This patch eliminates some further applications of SCM_C[AD]R to
12671 non pair cells.
12672
12673 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12674 never been applied to real pairs.
12675
12676 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12677
12678 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12679
12680 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12681 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12682 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12683
12684 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12685 Added.
12686
12687 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12688 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12689
12690 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12691 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12692 SCM_SET{AND,OR}_CAR.
12693
3453619b
GH
126942001-04-17 Gary Houston <ghouston@arglist.com>
12695
12696 * some initial support for IPv6:
1c938eb8 12697
3453619b
GH
12698 * socket.c (scm_fill_sockaddr): improve the argument validation.
12699 don't allocate memory until all args are checked. instead of
12700 unconditional memset of soka, try setting sin_len to 0 if
12701 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12702 (scm_socket, scm_connect): extend docstrings for IPv6.
12703 (scm_init_socket): intern AF_INET6 and PF_INET6.
12704
216eedfc
DH
127052001-04-17 Niibe Yutaka <gniibe@m17n.org>
12706
12707 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12708 matches SCM_DEFER_INTS at the beginning of the function.
12709
12710 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12711
12712 * gc.c (scm_igc): Unconditionally call
12713 SCM_CRITICAL_SECTION_START/END.
12714
12715 * fluids.c (next_fluid_num): Unconditionally call
12716 SCM_CRITICAL_SECTION_START/END.
12717 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12718
12719 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12720 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12721 Removed.
12722
12723 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12724 Defined as nothing for the case of !defined(USE_THREADS).
12725 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12726 Removed.
12727 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12728 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12729 LINE.
12730 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12731 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12732 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12733 SCM_CRITICAL_SECTION_START/END.
12734 (SCM_REALLOW_INTS: Bug fix. Don't call
12735 SCM_THREAD_SWITCHING_CODE.
12736 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12737 SCM_THREAD_SWITCHING_CODE directly.
12738 (SCM_ENTER_A_SECTION): Unconditionally use
12739 SCM_CRITICAL_SECTION_START/END. (was:
12740 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12741
127422001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12743
12744 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12745 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12746 allowed to explicitly set this macro via the CFLAGS variable
12747 during make.
12748
12749 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12750 (SCM_THREAD_CRITICAL_SECTION_START,
12751 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12752 SCM_THREAD_CRITICAL_SECTION_START/END to
12753 SCM_CRITICAL_SECTION_START/END.
12754
f22ed5a0
KN
127552001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12756
12757 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12758 instead of bzero.
1c938eb8 12759
f22ed5a0 12760 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12761 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12762
12763 Thanks to NIIBE Yutaka.
12764
508ded1c
MD
127652001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12766
a087ba81
MD
12767 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12768 goops module should be registered in order to work for an
12769 application which uses libguile statically linked.)
508ded1c 12770
e4b265d8
DH
127712001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12772
12773 * numbers.[ch] (scm_num2long, scm_num2long_long,
12774 scm_num2ulong_long, scm_num2ulong): Argument position is an
12775 unsigned integer.
12776
12777 * environments.c (eval_environment_folder,
12778 import_environment_folder), gh_data.c (gh_scm2longs,
12779 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12780 for integers and pointers, respectively.
12781
12782 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12783 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12784 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12785 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12786
12787 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12788 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12789 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12790 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12791 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12792 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12793
89d04205
NJ
127942001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12795
12796 * strings.c (scm_read_only_string_p): Update docstring to reflect
12797 current (non-)usage of "read only" strings.
40f83c3e
NJ
12798 (scm_make_shared_substring): Clarify docstring by changing
12799 "semantics" to "arguments".
89d04205 12800
4d66be54
MG
128012001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12802
12803 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12804 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12805 improvements.
12806
1e6808ea
MG
128072001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12808
12809 The following changes make the documentation more consistent.
1c938eb8 12810
1e6808ea
MG
12811 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12812 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12813 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12814 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12815 ... @end lisp.
12816
12817 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12818 (scm_array_dimensions, scm_make_shared_array),
12819 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12820 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12821 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12822 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12823 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12824 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12825 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12826 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12827 @example ... @end example to @lisp ... @end lisp.
12828
12829 * weaks.c (scm_weak_vector): Corrected docstring.
12830
12831 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12832 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12833 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12834 (scm_hashx_set_x, scm_hashx_get_handle),
12835 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12836 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12837 vectors.c (scm_vector_fill_x), strings.c
12838 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12839 objprop.c (scm_set_object_properties_x):
12840 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12841 strports.c (scm_call_with_input_string), ports.c
12842 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12843 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12844 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12845 (scm_make_weak_vector,scm_weak_vector_p),
12846 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12847 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12848 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12849 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12850 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12851 Made parameter names match documentation by renaming parameters
12852 and/or fixing docstrings.
1c938eb8 12853
1e6808ea
MG
12854 * numbers.c (scm_ash): Corrected Texinfo markup.
12855
12856 * strop.c (scm_string_index, scm_string_rindex),
12857 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12858
12859 * vports.c (scm_make_soft_port), unif.c
12860 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12861 (scm_dimensions_to_uniform_array, scm_transpose_array),
12862 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12863 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12864 (scm_array_to_list, scm_list_to_uniform_array),
12865 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12866 (scm_open_input_string, scm_open_output_string),
12867 (scm_get_output_string), strop.c (scm_string_copy),
12868 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12869 (scm_get_internal_real_time, scm_times),
12870 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12871 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12872 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12873 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12874 simpos.c (scm_system), random.c (scm_random_uniform),
12875 (scm_random_normal, scm_random_exp), ramap.c
12876 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12877 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12878 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12879 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12880 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12881 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12882 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12883 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12884 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12885 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12886 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12887 (scm_integer_expt, scm_bit_extract, scm_logcount),
12888 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12889 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12890 (scm_interaction_environment), macros.c (scm_makacro),
12891 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12892 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12893 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12894 (scm_fluid_ref), filesys.c (scm_open_fdes),
12895 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12896 Docstring correction: `Returns' -> `Return'
12897
1c938eb8
TTN
12898 * gc.c (scm_set_debug_cell_accesses_x):
12899 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
12900 * fluids.c (scm_fluid_p): Added texinfo markup.
12901
12902 * error.c (scm_strerror): Made docstring more precise.
12903
12904 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12905 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12906 (scm_symbol_p, scm_symbol_to_string), strorder.c
12907 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12908 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12909 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12910 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12911 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12912
9a6976cd
DH
129132001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12914
12915 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12916 mode, as suggested by Michael Livshin.
12917
463b2219
ML
129182001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12919
12920 * backtrace.c (display_backtrace_body): since the `print_state'
12921 variable is not used (instead its data field is used directly as
12922 `pstate'), protect it from the hungry compiler optimizations.
12923 thanks to Bill Schottstaedt for the report.
12924
61045190
DH
129252001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12926
12927 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12928 It is only defined and used if guile is compiled with
12929 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12930 let cells with a free_cell type tag be visible outside of the
12931 garbage collector when in debug mode.
12932
12933 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12934
12935 (scm_assert_cell_valid): Use a local static variable to avoid
12936 recursion.
12937
12938 (MARK): Only check for rogue cell pointers in debug mode. Use
12939 scm_cellp for this purpose and place all checks for rogue pointers
12940 into that function. Further, since due to conservative scanning
12941 we may encounter free cells during marking, don't use the standard
12942 cell type accessor macro to determine the cell type.
12943
12944 (scm_cellp): Check if the cell pointer actually points into a
12945 card header.
12946
12947 (scm_init_gc): Initalize scm_tc16_allocated.
12948
12949 * gc.h (GCH): Renamed to SCM_GC_H.
12950
12951 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12952 might be unnecessary, but I feel better this way :-)
12953
12954 (SCM_GC_CELL_TYPE): New macro.
12955
12956 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12957 in guile, and it is unlikely that they will be applied to real
12958 pairs anyway.
12959
12960 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12961
12962 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12963 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12964
12965 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12966 make sure that in debug mode no free cell will ever be visible
12967 outside of the garbage collector.
12968
85d6df6a
DH
129692001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12970
12971 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12972 values.
12973
12974 * async.c (scm_system_async), variable.c (scm_make_variable,
12975 scm_make_undefined_variable): Use scm_cons to create a pair.
12976
12977 * debug.c (scm_reverse_lookup): Perform proper type checking.
12978 Remove suspicious use of SCM_SLOPPY_CONSP.
12979
12980 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12981 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12982 the corresponding optimization.
12983
12984 * eval.c (iqq): Use proper type check.
12985
12986 (scm_m_expand_body): Remove redundant type checks.
12987
12988 (promise_print): Don't access promise cells as pairs.
12989
12990 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12991 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12992 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12993 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12994 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12995
12996 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12997 (scm_iprin1): Use new macro predicate and accessors.
12998
12999 * eval.h (scm_tc16_macro): Removed declaration. It is declared
13000 in macros.h.
13001
13002 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
13003 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
13004 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
13005 SCM_VARIABLE_H. Even the macros that are used to inhibit
13006 including a header file twice should be in the SCM_ namespace.
13007
13008 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
13009 properties.c (scm_primitive_property_ref,
13010 scm_primitive_property_del_x): Prefer stronger predicates like
13011 SCM_NULLP or SCM_FALSEP over SCM_IMP.
13012
13013 * gc.c (MARK): Use proper macros to access procedure-with-setter
13014 cell elements and closure cell elements.
13015
13016 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
13017 access free cells as pairs.
13018
13019 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13020 no hashtab entry is found.
13021
13022 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13023 SCM_CLR_PORT_OPEN_FLAG.
13024
13025 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13026 use SCM_SET_C[AD]R for uninitialized cells.
13027
13028 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13029 If the hashtable has no slots, return #f instead of '(). This
13030 unifies the return value with most assoc-functions.
13031
13032 (scm_hash_fn_ref): Use proper type check.
13033
13034 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13035 Removed references to non-existing functions from documentation.
13036
13037 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13038 access keyword cell elements.
13039
13040 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13041 macros.
13042
13043 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13044
13045 * print.c (scm_iprlist): Added comment. Improved loop
13046 conditions.
13047
13048 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13049 pairs.
13050
13051 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13052
13053 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13054
13055 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13056 cells as pairs.
13057
13058 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13059 scm_variable_set_x): Use proper macros to access variable cell
13060 elements.
13061
13062 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13063
13064 * variable.h (SCM_VARVCELL): Don't access variable cells as
13065 pairs.
13066
13067 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13068 added FIXME comment, removed register specifier.
13069
1b27e91a
KN
130702001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13071
13072 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13073 * init.c (scm_init_guile_1): Don't init goopscore module.
13074
16c634ec
MV
130752001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13076
13077 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13078
91344ceb
MG
130792001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13080
13081 * strop.c (scm_string_to_list): Fixed docstring markup.
13082 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13083 (scm_string_downcase, scm_string_capitalize_x),
13084 (scm_string_capitalize): Rewrote and corrected docstrings.
13085 (scm_string_ci_to_symbol): Made docstring more explicit.
13086
07576812
MV
130872001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13088
13089 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13090 eval.c can use it.
13091 (scm_call_with_values): Removed.
13092 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13093 so that it can be exported.
13094 (scm_call_with_values): Removed.
1c938eb8 13095
07576812
MV
13096 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13097 * eval.c: Include "libguile/values.h"
13098 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13099 New.
13100 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13101 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13102 New delcarations to support above change.
13103
13104 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13105 errors with last change.
1c938eb8 13106
07576812
MV
131072001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13108
13109 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13110 scm_i_eval): Moved the application of the system transformer from
13111 scm_i_eval to scm_primitive_eval.
13112
a17bb5fd
NJ
131132001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13114
a6be01a4
NJ
13115 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13116
a17bb5fd
NJ
13117 * strop.c (scm_string_index): Fix docstring line break
13118 regression.
13119
13120 * list.c (scm_cons_star): Fix docstring typo.
13121
be54b15d
DH
131222001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13123
13124 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13125 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13126 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13127 scm_make_string, scm_string_append), strports.c (st_resize_port,
13128 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13129 scm_makstr with calls to scm_allocate_string.
13130
13131 * strings.[ch] (scm_allocate_string): New function.
13132
13133 * strings.[ch] (scm_makstr): Deprecated.
13134
789ecc05
GH
131352001-03-18 Gary Houston <ghouston@arglist.com>
13136
6d163216
GH
13137 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13138 NULL. rewrote the docstring.
13139 (scm_mkstemp): new procedure implementing "mkstemp!".
13140 * posix.h: declare scm_mkstemp.
13141
789ecc05
GH
13142 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13143 normally it would be found in netdb.h.
13144
c6c79933
GH
131452001-03-17 Gary Houston <ghouston@arglist.com>
13146
e9e225e5
GH
13147 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13148 warning when HAVE_ARRAYS is not defined. move len too.
13149
13150 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13151 (EXTRA_DOT_X_FILES): let configure set the value.
13152 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13153
c6c79933
GH
13154 * gc.c (scm_must_malloc): changed the comment explaining when
13155 scm_must variants of malloc/free etc., should be used, based on
13156 explanation from Dirk Herrmann.
13157 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13158 string with procedure name. use scm_must_malloc instead of malloc.
13159 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13160 of malloc/free.
13161 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13162 scm_ungetc): use scm_must variants of malloc/realloc/free.
13163 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13164
b3fcac34
DH
131652001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13166
13167 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13168 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13169 scm_wrong_type_arg instead.
13170
13171 (SCM_WNA): Deprecated.
13172
13173 * error.[ch] (scm_wta): Deprecated.
13174
13175 * numbers.c (s_i_log): Minor comment fix.
13176
13177 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13178 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13179 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13180 wrong-num-args or misc errors.
13181
13182 * unif.c (scm_make_shared_array, scm_transpose_array,
13183 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13184 Validate the rest argument (note: this is only done when guile is
13185 built with SCM_DEBUG_REST_ARGUMENT=1)
13186
13187 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13188 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13189
13190 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13191 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13192
68baa7e7
DH
131932001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13194
13195 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13196 instead of scm_wrong_num_args.
13197
13198 * coop-threads.c: Don't include libguile/strings.h. (Was only
13199 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13200
13201 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13202 wrong-num-args errors.
13203
9f40cd87
DH
132042001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13205
13206 * error.[ch] (scm_error_num_args_subr): New function.
13207
5352393c
MG
132082001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13209
13210 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13211 (scm_length, scm_append, scm_reverse, scm_list_ref),
13212 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13213 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13214 (scm_delete1_x), gc.c (scm_map_free_list),
13215 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13216 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13217 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13218 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13219 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13220 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13221 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13222
13223 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13224 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13225 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13226 symbols.c (scm_symbol_interned_p), numbers.c
13227 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13228 markup.
13229
a9205f07
KN
132302001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13231
13232 * snarf.h (SCM_CONST_LONG): Deprecated.
13233 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13234
6d583887
MV
132352001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13236
13237 * numbers.c (scm_num2ulong): Check that a bignum is positive
13238 before looking at the magnitude. Correctly check for overflow
13239 during conversion.
13240 (scm_num2long_long): Likewise.
13241 (scm_num2ulong_long): New.
13242 (ULONG_LONG_MAX): Define if not already defined.
13243 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13244
e87a03fc
MG
132452001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13246
13247 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13248
13249 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13250 (SCM_OPOUTSTRPORTP): New predicate macros.
13251 (scm_open_input_string, scm_open_output_string),
13252 (scm_get_output_string): New prototypes.
1c938eb8 13253
e87a03fc
MG
13254 * strports.c (scm_open_input_string, scm_open_output_string),
13255 (scm_get_output_string): New procedures (SRFI-6 compliant).
13256 Made scm_tc16_strport non-static.
13257
160bb34a
DH
132582001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13259
13260 * macros.h (SCM_ASSYNT): Removed unused object argument from
13261 signature.
13262
13263 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13264 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13265 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13266 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13267 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13268 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13269 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13270 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13271 scm_m_atdispatch): Removed unused object argument from call to
13272 SCM_ASSYNT.
13273
80dee77b
DH
132742001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13275
13276 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13277 const int* to reflect that the input array of integers remains
13278 unchanged. Thanks to Brett Viren for the hint.
13279
d3dd80ab
MG
132802001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13281
13282 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13283 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13284 in various places.
13285 (gh_scm2newstr, gh_symbol2newstr): Change call to
13286 scm_must_malloc() to malloc(), because user-free()able memory is
13287 allocated.
13288
13289 * gc.c: Added declaration of `scm_debug_check_freelist'.
13290
26a3038d
MG
132912001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13292
13293 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13294
1f3908c4
KN
132952001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13296
13297 * strports.c (scm_object_to_string): New procedure.
13298 (scm_strprint_obj): Deprecated.
13299 * strports.h: Reflect the changes.
13300
e11208ca
DH
133012001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13302
13303 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13304
13305 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13306 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13307 SCM_ASSYNT to check for correct argument types. Either use some
13308 SCM_VALIDATE_* macro or an explicit test.
13309
13310 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13311 misc-errors.
13312
13313 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13314 instead of calling scm_wta.
13315
67e8151b
MG
133162001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13317
13318 * load.c (scm_primitive_load, scm_primitive_load_path),
13319 (scm_sys_search_load_path): Corrected docstrings (file ->
13320 filename).
13321
13322 * eval.c (scm_force): Added texinfo markup to docstring.
13323 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13324
13325 * debug-malloc.c: Reinserted #include <stdio.h>.
13326
e0c08f17
KN
133272001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13328
e39c3de4
KN
13329 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13330
e0c08f17
KN
13331 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13332 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13333 Use SCM_LISTn instead of scm_listify.
13334
e6e2e95a
MD
133352001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13336
13337 * _scm.h: Removed #include <errno.h>.
13338
13339 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13340 errno variable (can be a macro on some systems, for example when
13341 using linux libc with threads).
13342
13343 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13344 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13345 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13346 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13347
97d0e20b
GH
133482001-03-10 Gary Houston <ghouston@arglist.com>
13349
13350 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13351 not already defined.
13352
e75341b3
MD
133532001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13354
13355 * coop.c: Inserted #include <stdio.h>.
13356
13357 * iselect.c: Reinserted #include <stdio.h>.
13358
74355186
MV
133592001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13360
13361 * posix.c: Replaced `#define' of __USE_XOPEN right before
13362 including unistd.h with a define of _GNU_SOURCE at the very top of
13363 the file.
13364
783e7774
KN
133652001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13366
13367 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13368 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13369 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13370 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13371 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13372 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13373 print.c, procprop.c, procs.c, properties.c, ramap.c,
13374 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13375 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13376 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13377 Remove #include <stdio.h>
783e7774
KN
13378 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13379
13380 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13381
9a677c37
MG
133822001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13383
13384 * posix.c (scm_gethostname): Set initial name length to 256 for
13385 Solaris.
13386
94e6d793
MG
133872001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13388
13389 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13390 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13391 (scm_sethostname, scm_gethostname): New prototypes.
13392
13393 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13394 <sys/file.h>, if present.
13395 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13396 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13397 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13398 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13399 (scm_sethostname, scm_gethostname): New procedures.
13400
650a1cf9
NJ
134012001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13402
13403 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13404 not optional (ii) "recommend" spelling correction.
13405
9636b49c
MD
134062001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13407
5e4a4d09
MD
13408 * ramap.c (racp): Removed optimization which caused array copying
13409 to fail if the two arrays shared storage. Re-inserted the IVDEP
13410 macros removed in the change of 2000-03-09. (Don't really have a
13411 complete grasp of what they are for, but they seem to be necessary
13412 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13413
9636b49c
MD
13414 * hash.c (scm_string_hash): Don't downcase characters.
13415
04a4d666
MD
134162001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13417
9636b49c 13418 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13419 size from 277 --> 1009.
13420
13421 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13422 function.
13423
13424 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13425
04a4d666
MD
13426 * validate.h: Code formatting.
13427
66418d34
KN
134282001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13429
13430 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13431 (*.doc): Add dependency on guile-snarf.awk.in.
13432
13433 * guile-snarf.awk.in: Neglect spaces at the end of
13434 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13435 middle of docstrings. (To avoid the problem with gcc-2.96.)
13436
2ade72d7
DH
134372001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13438
13439 * coop-threads.c (scm_call_with_new_thread), load.c
13440 (scm_primitive_load, scm_sys_search_load_path), random.c
13441 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13442 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13443 (potentially) issue a scm-misc-error or wrong-num-args error
13444 message.
13445
13446 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13447 about the expected type with the wrong-type-arg error message.
13448
13449 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13450 a C level bug that can't be fixed from scheme anyway.
13451
586d7da2
MD
134522001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13453
13454 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13455 Duplicate bindings are OK in a let* since a let* is semantically
13456 equivalent to a nested set of let:s.
13457
1dd05fd8
MG
134582001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13459
13460 * print.c (scm_print_options): Fixed texinfo in docstring.
13461
13462 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13463 the underlying functions getservent, getprotoent or getnetent
13464 return NULL instead of signalling an error.
13465
439006bf
GH
134662001-03-04 Gary Houston <ghouston@arglist.com>
13467
13468 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13469 taking an unexpectedly large filename for an AF_UNIX socket from
13470 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13471
439006bf
GH
13472 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13473 former and adjusted the latter.
13474 (scm_socket, scm_socketpair): cosmetic changes.
13475 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13476 size_t as socklen_t substitute. don't restrict args/return values
13477 to INUM: allow full range of int or size_t.
13478 (scm_fill_sockaddr): check arguments before allocating memory, to
13479 avoid leakage. use malloc, not scm_must_malloc.
13480 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13481 substitute. free the sockaddr structure before throwing an error.
13482 (scm_init_add_buffer): procedure removed, together with its static
13483 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13484 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13485 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13486 scm_sendto): use a local buffer instead of scm_addr_buffer.
13487 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13488 not size_t.
13489 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13490 call to detect whether recvfrom could be bothered to set the address.
13491 (scm_init_socket): don't call scm_init_addr_buffer.
13492
276dd677
DH
134932001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13494
13495 * debug.c (scm_procedure_source, scm_procedure_environment),
13496 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13497 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13498 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13499 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13500 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13501 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13502 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13503 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13504 scm_array_to_list, scm_array_prototype), validate.h
13505 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13506 scm_misc_error or scm_wrong_type_arg instead.
13507
13508 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13509
5e03762c
MD
135102001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13511
13512 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13513 (scm_sys_tag_body): Added.
13514
db4b4ca6
DH
135152001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13516
13517 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13518 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13519 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13520 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13521 options.c (scm_options), ports.c (scm_remove_from_port_table),
13522 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13523 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13524 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13525 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13526 instead.
13527
87e7741d
MD
135282001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13529
13530 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13531
d19b0aac
MV
135322001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13533
13534 * eval.c (scm_s_duplicate_bindings): New error message.
13535 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13536
2fd945df
MV
135372001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13538
13539 * eval.h (SCM_EVALIM2): New macro. Use it when a
13540 immediate, literal constant should be evaluated.
13541 * eval.c (scm_s_duplicate_formals): New error message string.
13542 (scm_c_improper_memq): New function.
13543 (scm_m_lambda): Check for duplicate arguments.
13544 (scm_ceval, scm_deval): When executing a body: only cons a new
13545 toplevel environment frame when it is different from the
13546 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13547 check for empty combinations; use SCM_EVALIM2 for the same reason
13548 in the non-toplevel loop.
13549 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13550 New labels with the meaning of their non-"nontoplevel" partners,
13551 but they are used when it is known that the body is not evaluated at
13552 top-level.
13553 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13554 reporting for empty combinations.
13555
9e6fc585
KN
135562001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13557
13558 * Remove dump facilities.
13559 * dump.c, dump.h: Removed.
13560 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13561 * init.c: Remove #include "libguile/dump.h".
13562 (scm_init_guile_1): Remove scm_init_dump.
13563 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13564 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13565 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13566 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13567
13568 * keywords.c: Remove #include "libguile/dump.h".
13569 (keyword_dump, keyword_undump): Removed.
13570 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13571
eae54bf0
MG
135722001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13573
13574 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13575 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13576 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13577 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13578 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13579 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13580 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13581 to @code{} as the texinfo manual recommends, converted the
13582 examples to use a @lisp{}-environment.
13583
13584 * strports.c (scm_eval_string): Cleaned up the docstring.
13585
13586 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13587 markup.
13588
13589 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13590 (scm_number_to_string, scm_string_to_number, scm_number_p)
13591 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13592 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13593 (scm_ash): Added texinfo markup and removed obsolete @refill.
13594 (scm_gr_p): Corrected comment.
13595 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13596 docstring) comments.
13597 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13598 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13599 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13600 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13601 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13602 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13603 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13604 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13605
23deee81
DH
136062001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13607
13608 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13609 (Obviously nobody compiles with SCM_RECKLESS defined...)
13610
13611 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13612
6fe692e9
MD
136132001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13614
13615 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13616
13617 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13618
27c37006
NJ
136192001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13620
13621 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13622 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13623 since use of `z' suggests that the arguments may be complex.
13624
13625 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13626 typos.
13627
2069af38
NJ
136282001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13629
13630 * dump.c (scm_binary_write, scm_binary_read), eval.c
13631 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13632 scm_guardian_greedy_p, scm_make_guardian), fports.c
13633 (scm_file_port_p): Minor docstring fixes.
13634
b42ff180
MV
136352001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13636
2069af38 13637 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13638
13639 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13640 scm_i_eval.
13641 (make_class_from_template): Do not bother to set the current
13642 module around the call to DEFVAR, scm_eval takes care of that.
13643 (scm_init_goops): Make scm_module_goops and
13644 scm_goops_lookup_closure permanent objects.
1c938eb8 13645
97ea55f8
MV
13646 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13647 top level, create a fresh top-level environment for each
13648 expression instead of mutating the exisint frame. This is
13649 important when that frame is closed over.
13650
b42ff180
MV
13651 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13652 SCM_DIGSPERLONG instead of DIGSPERLONG.
13653
09f2ab1e
MV
136542001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13655
13656 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13657 before applying arrow procedure in `cond' and before applying
13658 receiver procedure in call-with-current-continuation.
13659 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13660 macro. The argument is expanded more than one time.
13661
13662 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13663 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13664
136652001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13666
13667 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13668 notice and license.
13669
7090240c
MG
136702001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13671
13672 * variable.c (scm_make_variable, scm_make_undefined_variable)
13673 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13674 (scm_variable_bound_p), values.c (scm_values)
13675 (scm_call_with_values), unif.c (scm_bit_count)
13676 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13677 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13678 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13679 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13680 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13681 (scm_copy_random_state, scm_random), print.c (scm_newline)
13682 (scm_write_char, scm_simple_format), debug-malloc.c
13683 (scm_malloc_stats), environments.c (scm_environment_p)
13684 (scm_environment_bound_p, scm_environment_ref)
13685 (scm_environment_fold, scm_environment_define)
13686 (scm_environment_undefine, scm_environment_set_x)
13687 (scm_environment_cell, scm_environment_observe)
13688 (scm_environment_observe_weak, scm_environment_unobserve)
13689 (scm_make_eval_environment, scm_eval_environment_p)
13690 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13691 (scm_eval_environment_imported)
13692 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13693 (scm_import_environment_p, scm_import_environment_imports)
13694 (scm_import_environment_set_imports_x, scm_make_export_environment)
13695 (scm_export_environment_p, scm_export_environment_private)
13696 (scm_export_environment_set_private_x)
13697 (scm_export_environment_signature)
13698 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13699 Added texinfo markup.
13700
13701 * ports.c (scm_drain_input): Lowercased argument to @var.
13702 (scm_current_input_port, scm_current_output_port): Filled in
13703 missing explanation.
13704 (scm_current_load_port, scm_set_current_output_port)
13705 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13706 Added texinfo markup.
13707
13708 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13709 (scm_release_arbiter): Added texinfo markup to docstrings.
13710 Changed `Returns' to `Return'.
13711 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13712
25703850
NJ
137132001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13714
13715 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13716 by doubling them to `@@'.
13717
73c0fdce
MG
137182001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13719
13720 * numbers.c (scm_lognot), random.c (scm_random,
13721 scm_random_normal, scm_random_solid_sphere_x,
13722 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13723 scm_random_exp), dynwind.c
13724 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13725
73c0fdce
MG
13726 * goops.c (scm_sys_initialize_object, scm_instance_p,
13727 scm_class_name, scm_class_precedence_list, scm_class_slots,
13728 scm_class_environment, scm_generic_function_name,
13729 scm_generic_function_methods, scm_method_generic_function,
13730 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13731 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13732 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13733 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13734 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13735 scm_class_direct_supers, scm_class_direct_slots,
13736 scm_class_direct_subclasses, scm_class_direct_methods,
13737 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13738 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13739 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13740 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13741 scm_memoized_environment, scm_procedure_name,
13742 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13743 objects.c
13744 (scm_class_of, scm_entity_p, scm_operator_p,
13745 scm_set_object_procedure_x, scm_object_procedure,
13746 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13747 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13748 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13749 scm_hook_to_list), lang.c
13750 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13751 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13752 (scm_print_options, scm_port_with_print_state,
13753 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13754 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13755 scm_make_procedure_with_setter, scm_procedure), throw.c
13756 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13757 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13758 scm_stack_ref, scm_stack_length, scm_frame_p,
13759 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13760 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13761 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13762 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13763 (scm_dirname, scm_basename), dynwind.c
13764 (scm_wind_chain), read.c (scm_read_options, scm_read,
13765 scm_read_hash_extend), gc.c
13766 (scm_unhash_name), eval.c (scm_eval_options_interface,
13767 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13768 (scm_display_error, scm_set_print_params_x,
13769 scm_display_application, scm_display_backtrace, scm_backtrace),
13770 async.c (scm_async, scm_system_async, scm_async_mark,
13771 scm_system_async_mark, scm_run_asyncs, scm_noop,
13772 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13773 scm_mask_signals): Added docstrings.
13774
e228a203
KN
137752001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13776
13777 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13778 address of car/cdr. (Thanks to Dirk Herrmann)
13779 Use scm_sizet to obtain the length of strings.
13780 (Thanks to Matthias Koeppe)
13781
1552a59d
MV
137822001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13783
13784 * symbols.c (scm_mem2symbol): Put a empty statement after the
13785 next_symbol label. This is mandated by ANSI, appearantly.
13786
3178f751
MV
137872001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13788
13789 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13790 sense to compile for a specific kernel version. Do not include
13791 <asm/signal.h> while defining __KERNEL__. This hack should no
13792 longer be needed and caused problems.
13793
7af4defe
MV
137942001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13795
13796 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13797 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13798 can not deal with immediates.
13799
5d6bb349
KN
138002001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13801
13802 * list.c (scm_list_copy): Validate the first argument.
13803
ec9709f0
MV
138042001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13805
13806 Fix evaluator so that top-level expressions are correctly
13807 evaluated with respect to the module system.
1c938eb8 13808
ec9709f0
MV
13809 * modules.h. modules.c (scm_current_module_lookup_closure): New
13810 function.
13811
13812 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13813 prototypes.
13814 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13815 names to better reflect their meaning.
13816
13817 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13818 evaluated at top-level and synronize lookup closure before
13819 executing every subform.
13820 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13821 (scm_eval_x, scm_eval): Reimplement in terms of
13822 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13823
ec9709f0
MV
138242001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13825
13826 * macros.c (scm_macro_name, scm_macro_transformer): Use
13827 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13828 Thanks!
13829
42417394
KN
138302001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13831
13832 * dump.c (scm_store_bytes): Store data size before data.
13833 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13834 * dump.h (scm_restore_bytes): Updated.
13835
bf942687
KN
138362001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13837
13838 * dump.c: Use double cells for update schedule.
13839
1be4270a
KN
138402001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13841
13842 * ports.c (scm_unread_char): Take an optional argument.
13843
548728ea
MV
138442001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13845
13846 * modules.h (scm_selected_module, scm_current_module): Renamed
13847 scm_selected_module to scm_current_module to synchronize Scheme
13848 and C names.
13849 (scm_select_module, scm_set_current_module): Likewise. Changed
13850 all uses.
1c938eb8 13851
548728ea
MV
13852 * ports.c (scm_port_for_each): Make a snapshot of the port table
13853 before iterating over it. The table might change while the user
13854 code is running. With the snapshot, the user can depend on the
c5408bc3 13855 fact that each port that existed at the start of the iteration is
548728ea
MV
13856 encountered exactly once. (ice-9 popen) depends on this.
13857
cb0d8be2
DH
138582001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13859
13860 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13861
13862 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13863 range checking for the size parameter. Thanks to Martin
13864 Grabmueller for the hint.
13865
13866 (scm_makstr): Reordered string initialization to make interrupt
13867 deferring unnecessary.
13868
13869 * vectors.c (scm_make_vector): Fixed range checking.
13870
e382fdbe
DH
138712001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13872
13873 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13874
13875 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13876 checking of the size parameter for type correctness and valid
13877 range. Thanks to Rob Browning for reporting the problem. Instead
13878 of deferring interrupts, scm_remember_upto_here_1 is used.
13879
bf8f0922
KN
138802001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13881
13882 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13883 (scm_dump_cell_update): Removed.
13884 (scm_dump_update): Renamed from scm_dump_object_update.
13885 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13886 a pointer instead of returning a value.
13887 * keywords.c (keyword_undump): Updated.
13888
914cceec
KN
138892001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13890
13891 * dump.c, dump.h: Modified a lot.
5f17c66f 13892 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
13893 (scm_dump_mark): Removed.
13894 (scm_restore_cell_object, scm_store_cell_object): New functions.
13895
13896 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13897 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13898 New slots: dump, undump.
13899 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13900 Updated.
13901
13902 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13903 (keyword_undump): Renamed from keyword_alloc.
13904 (scm_init_keywords): Set keyword_dump and keyword_undump.
13905
ecf470a2
ML
139062001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13907
13908 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13909 the deprecated SCM_DOUBLE_CELLP.
13910
13911 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13912
03416a99
KN
139132001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13914
13915 * dump.c, dump.h: New files.
13916 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13917 * init.c: #include "libguile/dump.h".
13918 (scm_init_guile_1): Call scm_init_dump.
13919 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13920 dump_dealloc, dump_store, undump_alloc, undump_restore,
13921 undump_init.
13922 * smob.c (scm_make_smob_type): Init the new slots.
13923 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13924 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13925
13926 * keywords.c: #include "libguile/dump.h".
13927 (keyword_dealloc, keyword_alloc): New functions.
13928 (scm_init_keywords): Set smob_dump and smob_undump.
13929
00ffa0e7
KN
139302001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13931
13932 * vectors.c (scm_c_make_vector): New function.
13933 * vectors.h (scm_c_make_vector): Declared.
13934 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13935 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13936 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13937 (scm_make_method_cache, scm_i_vector2list,
13938 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13939 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13940 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13941 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13942 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13943 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13944 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13945 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13946
13947 * hashtab.c (scm_c_make_hash_table): New function.
13948 * hashtab.h (scm_c_make_hash_table): Declared.
13949 * environments.c (scm_make_leaf_environment,
13950 scm_make_eval_environment), gc.c (scm_init_storage),
13951 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13952 Use scm_c_make_hash_table.
13953
b8446ce8
MD
139542001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13955
13956 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13957
e3239868
DH
139582001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13959
13960 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13961 end of docstring.
13962
13963 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13964 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13965 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13966 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13967 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13968 scm_source_property, scm_set_source_property_x), sort.c
13969 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13970 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13971 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13972 docstrings.
13973
41ee56dd
MD
139742001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13975
13976 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13977 really get that arg.
13978
b6311c08
KN
139792001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13980
13981 * goops.c (s_scm_get_keyword): Bug fix.
13982
a49af0c0
DH
139832001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13984
13985 The following patch was sent by Martin Grabmueller. It makes sure
13986 that in case of parameter errors the correct function name is
13987 shown, and that parameter types are only checked once.
13988
13989 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13990 string_capitalize_x): New functions. Each one performs the core
13991 functionality of the corresponding scm_* function.
13992
13993 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13994 scm_string_downcase_x, scm_string_downcase,
13995 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13996 parameter checking wrappers of the above functions.
13997
13070bd3
DH
139982001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13999
14000 * continuations.c, dynl.c, keywords.c, load.c: Include
14001 strings.h. Thanks to Bill Schottstaedt for the bug report.
14002
2f2b390c
DH
140032001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14004
14005 * backtrace.c (display_header): Make sure that line and column
14006 information is shown independent of whether the port the code was
14007 read from had an associated filename. Thanks to Martin
14008 Grabmueller for providing this patch.
14009
efa40607
DH
140102001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14011
14012 * fports.[ch] (scm_file_port_p): New primitive.
14013
a98bddfd
DH
140142001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14015
14016 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
14017 These are now defined in fports.c, strports.c and vports.c.
14018
14019 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14020 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14021 tags.h).
14022
14023 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14024 (scm_make_sfptob): Made static. These return a type code now.
14025
14026 fports.c (scm_init_fports), strports.c (scm_init_strports),
14027 vports.c (scm_init_vports): Create the corresponding port types.
14028
14029 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14030 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14031
14032 * init.c (scm_init_guile_1): Make sure strports are initialized
14033 before gdbint.
14034
14035 * ports.[ch] (scm_make_port_type): Changed the return type to
14036 scm_bits_t.
14037
14038 * ports.c (scm_ports_prehistory): Don't create any port types
14039 here.
14040
14041 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14042 against scm_tc16_fport directly.
14043
0419a528
DH
140442001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14045
14046 * srcprop.c (scm_set_source_property_x): Fix to handle
14047 (set-source-property! <obj> 'copy <datum>) correctly.
14048
6d36532c
GH
140492001-01-24 Gary Houston <ghouston@arglist.com>
14050
14051 * filesys.c (scm_link): docstring fix.
14052 * fports.h (scm_setfileno): obsolete declaration removed.
14053 * posix.c: bogus popen declaration removed.
14054
14055 * rdelim.c: new file, split from ioext.c.
14056 * rdelim.h: new file, split from ioext.h
14057 * Makefile.am: add rdelim.c and related files.
14058 * init.c: call scm_init_rdelim. include rdelim.h.
14059
3ba5a6c2
DH
140602001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14061
14062 This patch was sent by Martin Grabmueller and makes sure that
14063 parameter errors are reported correctly by the lexicographic
14064 ordering predicates.
14065
14066 * strorder.c (string_less_p, string_ci_less_p): New functions.
14067
14068 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14069 functionality into string_less_p, string_ci_less_p respectively.
14070 The remaining code is just a wrapper to do the parameter
14071 checking.
14072
14073 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14074 parameters and call string_less_p instead of scm_string_less_p.
14075
14076 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14077 Check the parameters and call string_less_ci_p instead of
14078 scm_string_ci_less_p.
14079
e40a4095
DH
140802001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14081
ed6a2db9
DH
14082 This patch modifies scm_display_error to perform parameter
14083 checking. Thanks to Neil Jerram for the bug report.
14084
e40a4095
DH
14085 * backtrace.[ch] (scm_i_display_error): New function.
14086
14087 * backtrace.c (scm_display_error): Added parameter check and
14088 extracted the core functionality into function
14089 scm_i_display_error.
14090
14091 * throw.c (handler_message): Call scm_i_display_error to display
14092 the error message.
14093
f1e06a96
MD
140942001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14095
14096 * eval.c (SCM_APPLY): Added # args check for application of
14097 procedures with arity 3. (Thanks to Anders Holst.)
14098
30ea841d
DH
140992001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14100
14101 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14102
14103 (SCM_OPDIRP): Deprecated.
14104
14105 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14106 SCM_OPN.
14107
14108 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14109 Instead, give an explicit error message in case the directory is
14110 closed.
14111
14112 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14113 instead of SCM_OPENP and SCM_CLOSEDP.
14114
14115 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14116
312ae976
DH
141172001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14118
14119 * eval.c (inner_eval, scm_eval): Move all real functionality into
14120 inner_eval. Avoid to copy the expression twice by inlining some
14121 code from scm_i_eval.
14122
4567ed78
DH
141232001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14124
14125 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14126 now has to be the last clause, as required by R5RS. Thanks to
14127 Martin Grabmueller for the patch.
14128
10288a09
GH
141292001-01-18 Gary Houston <ghouston@arglist.com>
14130
14131 * ioext.c: further simplify scm_read_string_x_partial by defining
14132 a macro SCM_EBLOCK.
14133
8f379a8f
DH
141342001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14135
14136 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14137
5c75b29f
DH
141382001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14139
14140 * __scm.h: Added comment about architecture and compiler
14141 properties that are required by guile.
14142
14143 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14144 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14145
14146 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14147
14148 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14149
14150 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14151 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14152
ac0c002c
DH
141532001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14154
14155 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14156 to the names in limits.h.
14157
14158 * numbers.c (abs_most_negative_fixnum): Added.
14159
14160 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14161 fixnum-min) special case.
14162
14163 (scm_big_and): Fix for negative first parameter.
14164
14165 (scm_bit_extract): Fix for fixnum paramters.
14166 Thanks to Rob Browning for the bug report.
14167
14168 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14169
debe0dc2
DH
141702001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14171
14172 * symbols.c (scm_symbol_bound_p): Fixed comment.
14173 Thanks to Chris Cramer.
14174
8a39e3fc
DH
141752001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14176
14177 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14178 Thanks to Bill Schottstaedt.
14179
322ec19d
ML
141802001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14181
9a5fa6e9 14182 from Matthias Köppe:
1c938eb8 14183
322ec19d
ML
14184 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14185 casts its result, so doesn't yield an lvalue per ANSI C.
14186
14187 * goops.c (s_scm_sys_set_object_setter_x): use
14188 SCM_SET_ENTITY_SETTER.
14189 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14190
14191 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14192 its result, so doesn't yield an lvalue per ANSI C.
14193 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14194 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14195 SCM_GC_SET_CARD_FLAGS.
14196 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14197
14198 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14199
60d02d09
GH
142002001-01-08 Gary Houston <ghouston@arglist.com>
14201
14202 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14203 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14204 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14205 changes.
14206 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14207 for fdes. if current input port is used, check that it's a file
14208 port.
14209
c2da2648
GH
142102001-01-06 Gary Houston <ghouston@arglist.com>
14211
14212 * ioext.c (scm_read_string_x_partial): new procedure, implements
14213 read-string!/partial.
14214 * ports.c (scm_take_from_input_buffers): new procedure used by
14215 scm_read_string_x_partial.
14216 (scm_drain_input): use scm_take_from_input_buffers.
14217
4651d663
MV
142182001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14219
14220 * validate.h (SCM_VALIDATE_NUMBER): New.
14221
c0a5d888
ML
142222001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14223
14224 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14225 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14226 SET_DESTROYED): new defines/macros.
14227 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14228 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14229 (guardian_print): print more info.
14230 (guardian_apply): check if the guardian is destroyed, and throw an
14231 error if so. take one more optional argument `throw_p'.
14232 (scm_guard): depending on the value of `throw_p', return a boolean
14233 result.
14234 (scm_get_one_zombie): remove redundant property test.
14235 (guardian_t): represent the various (currently 3, I hope nothing
14236 more gets added) boolean fields as bit flags.
14237 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14238 (scm_destroy_guardian_x): new procedure.
14239
14240 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14241 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14242
0c6d2191
GH
142432001-01-01 Gary Houston <ghouston@arglist.com>
14244
14245 * fports.c (fport_write): bugfix: handle short writes for
14246 unbuffered ports too. optimize the buffered case by minimizing
14247 the number of write/flush calls.
14248 (write_all): new helper procedure.
14249
a51fe247 14250The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14251
14252;; Local Variables:
14253;; coding: utf-8
14254;; End: