Recent gnulib adds gl_PO_BASE and gl_PO_DOMAIN
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
5c004b6d
NJ
12007-12-29 Neil Jerram <neil@ossau.uklinux.net>
2
3 * gc.c (mark_gc_async): Change "func_data" to "fn_data", to avoid
4 clash with AIX header file.
5 * hooks.c (scm_c_hook_add, scm_c_hook_remove): Same again.
6 * hooks.h (scm_t_c_hook_function, scm_c_hook_add,
7 scm_c_hook_remove): Same again.
8
9cc37597
LC
92007-12-08 Ludovic Courtès <ludo@gnu.org>
10
11 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
12 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
13 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
14 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
15 * eval.i.c (CEVAL): Use branch prediction hints for syntax
16 errors, wrong number of arguments and similar.
17 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
18 immediate numbers.
19 (scm_difference, scm_product, scm_i_divide): Likewise.
20 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
21
7d1fc872
LC
222007-12-04 Ludovic Courtès <ludo@gnu.org>
23
693758d5
LC
24 * ports.c (scm_c_read): Validate PORT as an open input port.
25 (scm_c_write): Validate PORT as an open output port.
26
7d1fc872
LC
27 * socket.c (scm_accept): Leave guile mode using
28 `scm_std_select ()' before calling `accept(2)'. Reported by
29 dskr <dskr@mac.com>.
30
ee834df4
LC
312007-10-27 Ludovic Courtès <ludo@gnu.org>
32
33 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
34 containing the port. Fixes a bug in the new port table (2007-08-26).
35 (scm_evict_ports): Use `scm_c_port_for_each ()'.
36
acbfb594
NJ
372007-10-21 Neil Jerram <neil@ossau.uklinux.net>
38
39 * eval.c (unmemoize_delay): Extend the environment before
40 unmemoizing the promise thunk. This fixes a segmentation fault
41 reported by Frank Schwidom.
42
2e77f720
LC
432007-10-20 Julian Graham <joolean@gmail.com>
44
45 Add support for thread cancellation and user-defined thread
46 cleanup handlers. Small rework by Ludovic Courtès.
47
48 * null-threads.h (scm_i_pthread_cancel,
49 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
50 * pthread-threads.h (scm_i_pthread_cancel,
51 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
52 * scmsigs.c (scm_i_signal_delivery_thread,
53 signal_delivery_thread_mutex): New.
54 (signal_delivery_thread): Leave when `read_without_guile ()'
55 returns zero.
56 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
57 before spawning the thread. Initialize
58 SCM_I_SIGNAL_DELIVERY_THREAD.
59 (ensure_signal_delivery_thread): Renamed to...
60 (scm_i_ensure_signal_delivery_thread): this.
61 (scm_i_close_signal_pipe): New.
62 * scmsigs.h: Updated.
63 * threads.c (thread_mark): Mark `t->cleanup_handler'.
64 (guilify_self_1): Initialize `t->cleanup_handler' and
65 `t->canceled'.
66 (do_thread_exit): Invoke `t->cleanup_handler'.
67 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
68 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
69 vanishes.
70 (scm_leave_guile_cleanup): New.
71 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
72 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
73 than call `scm_leave_guile ()' after FUNC.
74 (scm_cancel_thread, scm_set_thread_cleanup_x,
75 scm_threads_cleanup): New.
76 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
77 returned list.
78 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
79 fields.
80 Add declarations of new functions.
81
d41668fa
LC
822007-10-17 Ludovic Courtès <ludo@gnu.org>
83
84 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
85 regression compared to 1.8.2. Reported by Puneet
86 <schemer@gmail.com>.
87
66302618
LC
882007-10-10 Ludovic Courtès <ludo@gnu.org>
89
90 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
91 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
92 * gen-scmconfig.h.in
93 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
94 * gen-scmconfig.c (main): Define
95 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
96
1445e449
LC
972007-10-04 Ludovic Courtès <ludo@gnu.org>
98
99 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
100 `leave_locale_section ()' on failure of
101 `enter_locale_section ()' since the mutex is not held and locale
102 settings are unchanged.
103 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
104 `restore_locale_settings ()' instead of `leave_locale_section ()'
105 since the mutex is not held.
106
29776e85
LC
1072007-10-02 Ludovic Courtès <ludo@gnu.org>
108
109 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
110 since we're already in non-guile mode. Reported by Greg Toxel
111 for NetBSD.
112
61d3568b
LC
1132007-10-01 Ludovic Courtès <ludo@gnu.org>
114
115 * ports.c (flush_output_port): Expect directly a port instead of
116 a pair. Fixes a bug in the new port table (2007-08-26).
117
68eccd8b
KR
1182007-09-11 Kevin Ryde <user42@zip.com.au>
119
120 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
121 putenv("NAME") as the fallback everywhere else. In particular this is
122 needed for solaris 9. Reported by Frank Storbeck.
123
454866e0
LC
1242007-09-03 Ludovic Courtès <ludo@gnu.org>
125
126 * read.c (flush_ws): Handle SCSH block comments.
127
f43f3620
LC
1282007-09-03 Ludovic Courtès <ludo@gnu.org>
129
130 Fix alignment issues which showed up at least on SPARC.
131
132 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
133 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
134 alignment.
135 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
136 correct alignment.
137 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
138 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
139 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
140 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
141 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
142
8d4d5dfc
KR
1432007-09-03 Kevin Ryde <user42@zip.com.au>
144
145 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
146 before using clog(). It's possible for gcc to provide the "complex
147 double" type, but for the system not to have the complex funcs.
148 (scm_exp): Ditto HAVE_CEXP for cexp().
149 (clog, cexp, carg): Remove fallback definitions. These only
150 duplicated the code within scm_log and scm_exp, and the latter have to
151 exist for the case when there's no "complex double". So better just
152 fix up the conditionals selecting between the complex funcs and plain
153 doubles than worry about fallbacks.
154
1ac5fb45
LC
1552007-09-02 Ludovic Courtès <ludo@gnu.org>
156
157 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
158 This fixes a memory leak.
159
b87e6d04
HWN
1602007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
161
5dbc6c06
HWN
162 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
163 gc.c: replace port table with weak hash table. This simplifies
164 memory management, and fixes freed cells appearing in
165 port-for-each output.
166
b87e6d04
HWN
167 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
168 held.
169
2baec6a9
LC
1702007-08-23 Ludovic Courtès <ludo@gnu.org>
171
492faee1 172 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 173 expression when asked to. Reported by Kevin.
492faee1 174
2baec6a9
LC
175 * stime.c: Define `_REENTRANT' only if not already defined.
176
1f11c61a
KR
1772007-08-21 Kevin Ryde <user42@zip.com.au>
178
179 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
180 tc16 values so big, real, complex and fraction can be distinguished.
181
182 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
183 was making numbers come out as "type 23" in gc-live-object-stats.
184 Fix tests of the tc16 number types, they were checked under
185 scm_tc7_number, but the values went down the tag>=255 smob case.
186 Put smob case under scm_tc7_smob instead of using tag>=255, per
187 recommendation in comments with scm_tc7_smob to use symbolic values.
188 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
189 code. Lose some unnecessary "break" statements.
190
191 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
192 element returned, rather than two lookups scm_hashq_ref and
193 scm_hashq_set_x.
194
949ec9f9
KR
1952007-08-17 Kevin Ryde <user42@zip.com.au>
196
197 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
198 solaris 2.6. Reported by anirkko.
199
6caac03c
LC
2002007-07-29 Ludovic Courtès <ludo@gnu.org>
201
202 * Makefile.am (INCLUDES): Added Gnulib includes.
203 (gnulib_library): New.
204 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
205 `$(gnulib_library)'.
206 (libguile_la_LIBADD): Likewise.
207
208 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
209 to define it when available.
210 * srfi-14.c: Likewise.
f7439099
LC
211 * i18n.c: Likewise. Include Gnulib's <alloca.h>
212 * eval.c: Include Gnulib's <alloca.h>.
213 * filesys.c: Likewise.
214 * read.c: Don't include <strings.h> and don't provide an
215 `strncasecmp ()' replacement; use Gnulib's <string.h> and
216 `strncasecmp ()' instead.
6caac03c 217
e08f3f7a
LC
2182007-07-25 Ludovic Courtès <ludo@gnu.org>
219
220 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
221 immediately. This used to produce a circular memoized
222 expression, e.g., for `(set (quote x) #t)'.
223
7337d56d
LC
2242007-07-22 Ludovic Courtès <ludo@gnu.org>
225
226 Overhauled the reader, making it faster.
227
228 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
229 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
230 of `scm_lreadr ()'.
231
232 * read.c: Overhauled. No longer use a token buffer. Use a
233 on-stack C buffer in the common case and use Scheme strings when
234 larger buffers are needed.
235 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
236 scm_lreadr, scm_lreadrecparen): Removed.
237 (scm_i_input_error): Marked as `SCM_NORETURN'.
238
df449722
LC
2392007-07-15 Ludovic Courtès <ludo@gnu.org>
240
241 * script.c (scm_compile_shell_switches): Updated copyright year.
242
b1f57ea4
LC
2432007-07-11 Ludovic Courtès <ludo@gnu.org>
244
245 * goops.c (scm_sys_method_more_specific_p): Added docstring.
246 Make sure LEN is greater than or equal to the minimum length of
247 specializers of M1 and M2. This fixes a segfault later on in
248 `more_specificp ()' if TARGS is too small. Reported by Marco
249 Maggi <marco.maggi-ipsu@poste.it>.
250
d3075c52
LC
2512007-06-26 Ludovic Courtès <ludo@gnu.org>
252
253 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
254 sure to free the previous array after the new one has been
255 installed. This leak is made visible by running
256 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
257 from the REPL within Valgrind.
258
7a5fb796
LC
2592007-06-12 Ludovic Courtès <ludo@chbouib.org>
260
261 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
262 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
263 bus error on SPARC (and possibly others) due to unaligned access.
264
a1ef7406
LC
2652007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
266
267 * posix.c (scm_ttyname): Check whether RESULT is NULL before
268 making a string from it (reported by Dan McMahill). Don't call
269 `scm_from_locale_string ()' before the mutex is released.
270
3dcf3373
LC
2712007-05-26 Ludovic Courtès <ludo@chbouib.org>
272
273 * eval.c (scm_m_define): Updated comment. Changed order for value
274 evaluation and `scm_sym2var ()' call, which is perfectly valid per
275 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
276
608860a5
LC
2772007-05-05 Ludovic Courtès <ludo@chbouib.org>
278
279 Implemented lazy duplicate binding handling.
280
281 * modules.c (scm_export): Renamed to...
282 (scm_module_export): This. Now public.
283 (module_variable): Removed.
284 (default_duplicate_binding_procedures_var): New variable.
285 (default_duplicate_binding_handlers, resolve_duplicate_binding,
286 module_imported_variable, scm_module_local_variable,
287 scm_module_variable): New functions.
288 (scm_module_import_interface): Rewritten.
289 (scm_module_reverse_lookup): Exported as a Scheme function.
290 * modules.h (scm_module_index_duplicate_handlers,
291 scm_module_index_import_obarray): New macros.
292 (scm_module_variable, scm_module_local_variable,
293 scm_module_export): New declarations.
294
1911e3da
LC
2952007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
296
297 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
298 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
299
1d8ce4c0
HWN
3002007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
301
302 * numbers.c (carg): provide carg, cexp, clog in case they are
303 missing.
304
afb49959
LC
3052007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
306
307 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
308 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
309 Steven Wu.
310
b3aa4626
KR
3112007-03-08 Kevin Ryde <user42@zip.com.au>
312
313 * struct.c, struct.h (scm_make_vtable): New function, providing
314 `make-vtable'.
315 * stacks.c (scm_init_stacks): Use it.
316
3172007-03-06 Kevin Ryde <user42@zip.com.au>
318
319 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
320 allocating a tail array. If there's no such then those tail fields
321 are uninitialized and garbage SCMs there can cause a segv if printed
322 (after fetching with struct-ref).
323
3242007-02-22 Kevin Ryde <user42@zip.com.au>
325
326 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
327 (scm_usleep): Update docstring per manual, cross reference sleep.
328
329 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
330 scm_struct_init is not within that section. scm_struct_init can
331 thrown an error, which within a critical section results in an
332 abort().
333
03291373
NJ
3342007-02-19 Neil Jerram <neil@ossau.uklinux.net>
335
336 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
337 is included in the distribution.
652dbce6 338 (noinst_HEADERS): And the same for eval.i.c.
03291373 339
a2f00b9b
LC
3402007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
341
342 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
343 unconditionally. Include <langinfo.h> and <nl_types.h> when
344 available.
345 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
346 SCM_LIST_OR_INTEGER_P): New macros.
347 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
348 as powers of two instead of `(1 << LC_*)'.
349 (scm_i_locale_free): New function/macro.
350 (scm_global_locale): New global variable.
351 (smob_locale_free): Use `scm_i_locale_free ()'.
352 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
353 (get_current_locale_settings): Return `EINVAL' instead of `errno'
354 when `setlocale' fails.
355 (restore_locale_settings): Likewise.
356 (install_locale_categories): Likewise.
357 (install_locale): Likewise. Stop the locale stack traversal when
358 all categories have been handled.
359 (get_current_locale, category_to_category_mask,
360 category_list_to_category_mask): New function.
361 (scm_make_locale): Use them. Accept both lists of `LC_*' values
362 and single `LC_*' values as the first argument. Handle the case
363 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
364 duplicate C_BASE_LOCALE before using it.
365 (scm_nl_langinfo, define_langinfo_items): New functions.
366 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
367 `nl-langinfo' and invoke `define_langinfo_items ()'.
368 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
369 * posix.c: Include <xlocale.h> when available.
370 (scm_i_locale_mutex): Always define it. Statically initialized.
371 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
372 acquiring the locale mutex.
373 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
374
b3aa4626
KR
3752007-01-27 Kevin Ryde <user42@zip.com.au>
376
377 * ports.c (scm_port_line, scm_set_port_line_x), read.c
378 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
379 port line number type, should be "long" not "int", as per line_number
380 field of scm_t_port. (Makes a difference only on 64-bit systems, and
381 only then for a linenum above 2Gig.)
382
2a8d66b0
HWN
3832007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
384
385 * vector.c: remove comment as per kryde's request.
386
b3aa4626
KR
3872007-01-25 Kevin Ryde <user42@zip.com.au>
388
389 * sort.c (scm_stable_sort): Return empty list for input empty list, as
390 done in guile 1.6 and as always done by plain `sort'. Was falling
391 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
392
cb90e2cb
HWN
3932007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
394
8cb7939c
HWN
395 * vectors.c (s_scm_vector_move_right_x): complain about naming.
396
d00a0704
HWN
397 * srcprop.c: regularize comments.
398
3d178652
HWN
399 * eval.c: remove superfluous ifndef DEVAL.
400
243ebb61
HWN
401 * private-options.h: idem.
402
403 * eval.i.c: copyright nitpicking.
404
0ee05b85
HWN
405 * eval.c: distangle. move duplicate code to eval.i.c and include
406 twice.
407
408 * eval.i.c: new file.
409
22fc179a
HWN
410 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
411 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
412 read.h, stacks.c, symbols.c, throw.c: use private-options.h
413
414 * private-options.h: new file: contain hardcoded option
415 definitions.
416
cb90e2cb
HWN
417 * private-gc.h: add FSF header.
418
62560650
HWN
4192007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
420
72f19c26
HWN
421 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
422 memoize-symbol is set.
423
424 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
425
426 * eval.c (CEVAL): add memoize_symbol trap.
427
03347a97
HWN
428 * options.c (scm_options_try): new function. This allows error
429 reporting before changing options in a critical section.
430
b0763985
HWN
431 * srcprop.c: use double cell for storing source-properties. Put
432 filename in the plist, and share between srcprops if possible.
433 Remove specialized storage.
434
435 * srcprop.h: remove macros without SCM_ prefix from
436 interface. Remove specialized storage/type definitions.
437
62560650
HWN
438 * read.c: idem.
439
440 * print.c: idem.
441
442 * eval.c: terminate option lists with 0.
443
444 * options.c: remove n (for length) from scm_option_X
445 functions. Detect option list length by looking for NULL name.
446
42ddb3cb
LC
4472007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
448
449 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
450 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
451 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
452 added by `make-vtable-vtable'. Reported by Marco Maggi.
453
937038e8
HWN
4542007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
455
456 * throw.c (scm_ithrow): more refined error message: print symbols
457 too.
458
23d72566
KR
4592007-01-16 Kevin Ryde <user42@zip.com.au>
460
461 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
462 implementing `set-program-arguments'.
463
464 * filesys.c (scm_init_filesys): Use scm_from_int rather than
465 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
466 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
467 O_LARGEFILE. These are all int not long, per arg to open().
468 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
469 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
470 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
471 an int arg to fcntl.
472
473 * posix.c (scm_putenv): Correction to "len" variable, was defined only
474 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
475 Move it to where it's used. Reported by Hugh Sasse.
476
477 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
478 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
479 meant #\nul in the input (detected by scm_to_locale_string) and a bad
480 flags arg (detected by scm_to_int) would throw from a critical
481 section, causing an abort().
482
483 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
484 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
485 REG_NOTEOL; they're all ints not longs (per args to regcomp and
486 regexec).
487
a2c40dc7
HWN
4882007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
489
490 * throw.c (scm_ithrow): print out key symbol and string arguments
491 when error happens inside a critical section, and document why.
492
391f57e6
HWN
4932007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
494
495 * read.c (s_scm_read_hash_extend): document #f argument to
496 read-hash-extend.
497
23d72566
KR
4982007-01-04 Kevin Ryde <user42@zip.com.au>
499
500 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
501 scm_minor_version, scm_micro_version, scm_effective_version,
502 scm_version, scm_init_version): Use SCM_API instead of just extern,
503 for the benefit of mingw. Reported by Cesar Strauss.
504
93632e3c
HWN
5052007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
506
507 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
508 too.
509 (gc_update_stats): update scm_gc_cells_allocated_acc too.
510
23d72566
KR
5112006-12-27 Kevin Ryde <user42@zip.com.au>
512
513 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
514 the basic scm_get_stack_base. As advised by Nils Durner.
515
516 * threads.c (get_thread_stack_base): Add a version using
517 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
518 As advised by Heikki Lindholm.
519
520 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
521 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
522 Durner.
523
5242006-12-24 Kevin Ryde <user42@zip.com.au>
525
526 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
527 error if pid is not our own process, instead of silently doing nothing.
528
529 * print.c (scm_write, scm_display, scm_write_char): Disable port close
530 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
531 check in configure.in unintentionally enabled it. Believe that
532 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
533 can leave errno in that state. popen.test "no duplicates" output test
534 provoked that.
535
e2bf3b19
HWN
5362006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
537
538 * numbers.c (scm_i_fraction_reduce): move logic into
539 scm_i_make_ratio(), so fractions are only read.
540 scm_i_fraction_reduce() modifies a fraction when reading it. A
541 race condition might lead to fractions being corrupted by reading
542 them concurrently.
543
544 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
545 comparisons between reduced and unreduced fractions go wrong.
546
547 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
548 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
549 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
550 SCM_FRACTION_REDUCED.
551
23d72566
KR
5522006-12-16 Kevin Ryde <user42@zip.com.au>
553
554 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
555 more direct for a procedure called raise.
556 (kill): Remove mingw fake fallback.
557
5582006-12-15 Kevin Ryde <user42@zip.com.au>
559
560 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
561 _pipe on mingw.
562
5632006-12-14 Kevin Ryde <user42@zip.com.au>
564
565 * threads.c (thread_print): Cope with the case where pthread_t is a
566 struct, as found on mingw. Can't just cast to size_t for printing.
567 Reported by Nils Durner.
568
569 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
570 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
571
5722006-12-13 Kevin Ryde <user42@zip.com.au>
573
574 * eval.c (scm_m_define): Set 'name procedure property on any
575 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
576 procedures with setters as used in srfi-17.
577
578 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
579 linux man page says is a possibility.
580
f30e1bdf
LC
5812006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
582
583 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 584 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
585 negative lower bounds.
586 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 587 Szavai Gyula).
f30e1bdf
LC
588
589 (scm_array_in_bounds_p): Iterate over S instead of always
590 comparing indices with the bounds of S[0]. This fixes
591 `array-in-bounds?' for arrays with a rank greater than one and
592 with different lower bounds for each dimension.
593
23d72566
KR
5942006-12-05 Kevin Ryde <user42@zip.com.au>
595
596 * numbers.c (scm_product): For flonum*inum and complex*inum, return
597 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
598 and as per R5RS section "Exactness".
599
6002006-12-03 Kevin Ryde <user42@zip.com.au>
601
602 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
603 allow $AWK from the environment to override. It had syntax gremlins,
604 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
605 Makefile stopped it having any effect. Use just $(AWK), which can be
606 overridden with "make AWK=xxx" in the usual way if desired.
607
22be72d3
LC
6082006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
609
610 * libguile/vectors.c (scm_vector_to_list): Fixed list
611 construction: elements were not copied when INC is zero (see
612 "shared array" example in `vectors.test'). Reported by
613 Szavai Gyula.
614
b89c4943
LC
6152006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
616
617 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
618 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
619 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
620 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
621 (DOT_X_FILES): Added `gettext.x'.
622 (DOT_DOC_FILES): Likewise.
623 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
624 (modinclude_HEADERS): Added `gettext.h'.
625 (EXTRA_DIST): Added `libgettext.h'.
626
627 * gettext.h: Renamed to...
628 * libgettext.h: New file.
629
630 * i18n.c: Renamed to...
631 * gettext.c: New file.
632
633 * i18n.h: Renamed to...
634 * gettext.h: New file.
635
636 * i18n.c, i18n.h, locale-categories.h: New files.
637
638 * init.c: Include "libguile/gettext.h" instead of
639 "libguile/i18n.h".
640 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
641 `scm_init_i18n ()'.
642
643 * posix.c: Include "libguile/gettext.h" instead of
644 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
645 (USE_GNU_LOCALE_API): New macro.
646 (scm_i_locale_mutex): New variable.
647 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
648
649 * posix.h: Include "libguile/threads.h".
650 (scm_i_locale_mutex): New declaration.
651
f3e3f530
NJ
6522006-11-17 Neil Jerram <neil@ossau.uklinux.net>
653
654 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
655
d9f71a07
LC
6562006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
657
658 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
659 "sweep_stats" arguments; use them instead of accessing the global
660 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
661
662 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
663 before each iteration of the loop.
664 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
665 (scm_i_get_new_heap_segment): Take an additional argument
666 SWEEP_STATS. Compute MIN_CELLS as a function of it.
667
668 * libguile/gc.c (scm_gc_cells_collected,
669 scm_gc_cells_collected_1): Removed.
670 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
671 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
672 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
673 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
674 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
675 `scm_gc_cells_(collected|swept)'.
676 (gc_update_stats): New.
677 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
678 `scm_i_gc_sweep_stats_1' instead of the former globals.
679 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
680 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
681 would keep allocating new segments instead of re-using collected
682 cells (because `scm_gc_cells_collected' would remain zero).
683
684 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
685 scm_gc_cell_yield_percentage): Removed.
686
687 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
688 (scm_i_adjust_min_yield): Updated.
689 (scm_i_get_new_heap_segment): Updated.
690
dd18d312
NJ
6912006-11-02 Neil Jerram <neil@ossau.uklinux.net>
692
693 * modules.c: Correct comment saying that low-level environments
694 will be used "in the next release".
695
696 * init.c: Comment out #include of environments.h.
697 (scm_i_init_guile): Comment out scm_environments_prehistory() and
698 scm_init_environments() calls.
699
700 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
701 (DOT_X_FILES): Remove environments.x.
702 (DOT_DOC_FILES): Remove environments.doc.
703 (modinclude_HEADERS): Remove environments.h.
704
9a5fa6e9
NJ
7052006-10-25 Neil Jerram <neil@ossau.uklinux.net>
706
707 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
708
709 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
710 scm_ia64_register_backing_store_base() instead of Linux-specific
711 implementations.
712
713 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
714 New declarations.
715
716 * gc.c (__libc_ia64_register_backing_store_base): Declaration
717 removed.
718 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
719 implementations for Linux and HP-UX.
720
721 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
722 and scm_ia64_register_backing_store_base() instead of
723 Linux-specific implementations.
724
725 * continuations.h (__libc_ia64_register_backing_store_base):
726 Declaration removed.
727 (scm_t_contregs): New "fresh" field.
728
729 * continuations.c (ia64_getcontext): Removed.
730 (scm_make_continuation): Use continuation fresh field instead of
731 interpreting getcontext return values (which isn't portable). Use
732 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
733 instead of Linux-specific implementations.
734 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
735 instead of Linux-specific implementation.
736
737 * _scm.h (__ia64__): Also detect __ia64.
738
8ab3d8a0
KR
7392006-10-03 Kevin Ryde <user42@zip.com.au>
740
741 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
742 arguments or 3 or more arguments. Previously 0 called proc with
743 SCM_UNDEFINED, and 3 or more silently used just the first 2.
744
7452006-09-28 Kevin Ryde <user42@zip.com.au>
746
747 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
748 for chsize fallback, instead of hard-coding mingw. Mingw in fact
749 supplies ftruncate itself these days.
750
751 * ports.c (fcntl.h): Can include this unconditionally, no need for
752 __MINGW32__.
753
754 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
755 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
756 "off_t" for parameters, per usual definition of this function, rather
757 than "char *" and "int". Use ftruncate instead of chsize. Check for
758 error on final close.
759
7602006-09-27 Kevin Ryde <user42@zip.com.au>
761
762 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
763 in mingw.
764
765 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
766 const *" for mingw to suppress warnings from gcc (which are errors
767 under the configure default -Werror). Reported by Nils Durner.
768
7692006-09-26 Kevin Ryde <user42@zip.com.au>
770
771 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
772 * fports.c (scm_open_file): Use open_or_open64.
773 (fport_seek_or_seek64): New function, adapting fport_seek.
774 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
775 functions.
776 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
777 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
778
779 * ports.c (scm_truncate_file): Update docstring per manual.
780
7812006-09-23 Kevin Ryde <user42@zip.com.au>
782
783 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
784 functions.
785
9a5fa6e9 7862006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
787
788 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
789 (make_predset, define_predset, make_strset, define_strset, false,
790 true): Removed.
791 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
792 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
793 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
794 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
795 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
796 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
797 (define_charset, scm_srfi_14_compute_char_sets): New functions.
798 (scm_init_srfi_14): Use `define_charset ()' instead of
799 `define_predset ()' and `define_strset ()'.
800
801 * srfi-14.h (scm_c_init_srfi_14): Removed.
802 (scm_srfi_14_compute_char_sets): New declaration.
803
804 * posix.h: Include "srfi-14.h".
805 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
806 successful `setlocale ()' call.
807
8ab3d8a0
KR
8082006-09-08 Kevin Ryde <user42@zip.com.au>
809
810 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
811 (scm_recvfrom): Update docstring from manual.
812
418122ce
RB
8132006-08-31 Rob Browning <rlb@defaultvalue.org>
814
815 * ports.c (scm_c_port_for_each): Add a
816 scm_remember_upto_here_1(ports) at the end of the function to fix
817 a GC bug.
818
b5944f66
NJ
8192006-08-28 Neil Jerram <neil@ossau.uklinux.net>
820
821 * backtrace.c (scm_display_backtrace_with_highlights): Minor
822 improvements to docstring.
823 (scm_backtrace_with_highlights): Analogous improvements.
824
8ab3d8a0
KR
8252006-08-12 Kevin Ryde <user42@zip.com.au>
826
827 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
828 New, set from configure.
829 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
830 to scmconfig.h.
831 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
832 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
833 Reported by Claes Wallin.
834
b0b0deff
NJ
8352006-08-11 Neil Jerram <neil@ossau.uklinux.net>
836
837 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
838 frame, not a stack).
839
8ab3d8a0
KR
8402006-07-25 Kevin Ryde <user42@zip.com.au>
841
842 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
843 on pthreads version, since pthread_getattr_np not available on solaris
844 and macos. Reported by Claes Wallin.
845
8462006-07-24 Kevin Ryde <user42@zip.com.au>
847
848 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
849 it's a macro on MacOS X. Reported by Claes Wallin.
850
851 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
852 for the benefit of Solaris 10. Reported by Claes Wallin.
853
854 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
855 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
856
8572006-07-21 Kevin Ryde <user42@zip.com.au>
858
859 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
860 autoconf recommendation. Should fix Solaris 10 reported by Claes
861 Wallin.
862
863 * threads.c: Include <string.h>, needed for memset() which is used by
864 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
865
b4912378
RB
8662006-07-18 Rob Browning <rlb@defaultvalue.org>
867
868 * continuations.c: Add __attribute__ ((returns_twice)) to the
869 ia64_getcontext prototype so that gcc will make the right
870 arrangements and avoid an illegal instruction during
871 call-with-current-continuation.
872
9a5fa6e9 8732006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
874
875 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
876 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
877
8ab3d8a0
KR
8782006-07-08 Kevin Ryde <user42@zip.com.au>
879
880 * environments.c (core_environments_unobserve): Use if/else rather
881 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
882 about them not being rvalues. Reported by Mike Gran.
883
884 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
885 portable and in particular fails on OpenBSD and AIX (see autoconf
886 manual too). Reported by Mike Gran.
887
8882006-06-25 Kevin Ryde <user42@zip.com.au>
889
890 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
891 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
892 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
893 HAVE_TM_ZONE.
894 (scm_strptime): Use tm_gmtoff from the strptime result when that field
895 exists, it's set by glibc strptime "%s".
896
9a5fa6e9 8972006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
898
899 * eq.c: Include "struct.h", "goops.h" and "objects.h".
900 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
901 are not GOOPS instances.
902 * struct.c: Include "eq.h".
903 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
904 hand-written code.
905 (scm_i_struct_equalp): New.
906 * struct.h (scm_i_struct_equalp): New declaration.
907
c862d0e0
KR
9082006-06-06 Kevin Ryde <user42@zip.com.au>
909
910 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
911 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
912 reported by Mattias Holm.
b4912378 913
c862d0e0
KR
9142006-06-03 Kevin Ryde <user42@zip.com.au>
915
916 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
917 unused variable warning when elisp disabled. Reported by Ryan
918 VanderBijl.
919
920 * throw.c (scm_handle_by_message): Add dummy return value to avoid
921 compiler warning on cygwin. Reported by Ryan VanderBijl.
922
923 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
924 duplicate of EXTRA_DOT_DOC_FILES.
925 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
926 Add scmconfig.h to dependencies, since these all run cpp. Helps a
927 parallel "make -j2". Reported by Mattias Holm.
928
9292006-05-30 Kevin Ryde <user42@zip.com.au>
930
931 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
932 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
933 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
934 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
935 port type descriptor, same as scm_make_port_type return value.
936
af4f8612
MV
9372006-05-30 Marius Vollmer <mvo@zagadka.de>
938
939 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
940 of the arguments is a array. This allows vectors to be equal to
941 one-dimensional arrays.
942
18bffcd0
MV
9432006-05-29 Marius Vollmer <mvo@zagadka.de>
944
945 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
946 that we have a pair before accessing its cdr. Thanks to Bill
947 Schottstaedt!
948
c862d0e0
KR
9492006-05-28 Kevin Ryde <user42@zip.com.au>
950
951 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
952 by "The Senator".
953
9542006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
955
956 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
957 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
958
c862d0e0
KR
9592006-05-26 Kevin Ryde <user42@zip.com.au>
960
961 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
962 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
963 Reported by "The Senator".
964 For select and ioctl, move fdes into those conditionals, to avoid
965 unused variable warning when neither of those used.
966
9672006-05-23 Kevin Ryde <user42@zip.com.au>
968
969 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
970 It's unused and will be in stdio.h anyway (if it's anywhere).
971
9722006-05-20 Kevin Ryde <user42@zip.com.au>
973
974 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
975 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
976
977 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
978 symlink). Probably can't create symlinks with mknod anyway though.
979
980 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
981 generation.
982
9832006-05-15 Kevin Ryde <user42@zip.com.au>
984
985 * simpos.c, simpos.h (scm_primitive__exit): New function.
986 (scm_primitive_exit): Update docstring, no longer the best exit after
987 a fork.
988
9892006-05-09 Kevin Ryde <user42@zip.com.au>
990
991 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
992 rather than converting to doubles, to avoid inf or nan when the inputs
993 are too big for a double but the quotient does fit. This affects
994 conversions exact->inexact of big fractions.
995
996 * filesys.c (scm_open_fdes): Use open64.
997 (scm_init_filesys): Add O_LARGEFILE.
998
999 * ports.c (scm_seek): Use lseek64.
1000 (scm_truncate_file): Use ftruncate64.
1001
4a342b19
MV
10022006-05-08 Marius Vollmer <mvo@zagadka.de>
1003
1004 * private-gc.h (CELL_P): Also check that the potential pointer is
1005 correctly aligned for a cell. Thanks to Miroslav Lichvar!
1006
c862d0e0
KR
10072006-04-18 Rob Browning <rlb@defaultvalue.org>
1008
1009 * _scm.h: Add back error if the size of off_t is unknown. The bug
1010 was actually in guile-readline's configuration.
1011
10122006-04-18 Kevin Ryde <user42@zip.com.au>
1013
1014 * posix.c (scm_mkstemp): Update docstring from the manual, in
1015 particular file mode 0600 is not guaranteed.
1016
281ab5e2
KR
10172006-04-17 Kevin Ryde <user42@zip.com.au>
1018
1019 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1020 size, to help the guile-readline build where off_t is unused.
1021
2b829bbb
KR
10222006-04-16 Kevin Ryde <user42@zip.com.au>
1023
1024 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1025 (scm_readdir): Use readdir64.
1026 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1027 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1028 and ftruncate take off_t not size_t.
1029 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1030 available.
1031
10322006-04-06 Kevin Ryde <user42@zip.com.au>
1033
1034 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1035 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
1036
10372006-03-26 Marius Vollmer <mvo@zagadka.de>
1038
1039 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1040 instead of accessing __libc_stack_end directly, and only do this
1041 when pthread_attr_getstack is known not to work for the main
1042 thread or when not using pthreads at all.
1043
1044 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1045 unknown instead of returning NULL.
1046
9a5fa6e9 10472006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1048
1049 * numbers.c (scm_i_mem2number): Renamed to
1050 scm_c_locale_stringn_to_number.
1051 * numbers.c, print.c, read.c: Updated callers.
1052 * numbers.h: Update function declaration.
1053
10542006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1055
1056 * unif.c (string_set): Don't return in a void function. (Reported
1057 by Mike Gran.)
1058
1059 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1060 rather than void*, so we can do pointer arithmetic on it.
1061 (Reported by Mike Gran.)
1062 (s_scm_uniform_vector_write): Ditto.
1063
10642006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1065
1066 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1067 oldra is not an array. (Reported by Steve Juranich.)
1068
1069 * threads.c (do_unlock): Renamed from "unlock", which is defined
1070 in unistd.h on QNX. (Reported by Matt Kraai.)
1071
10722006-03-04 Kevin Ryde <user42@zip.com.au>
1073
1074 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1075 not SCM_CRITICAL_SECTION_START.
1076
1077 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1078 Mike Gran.
1079
10802006-02-28 Kevin Ryde <user42@zip.com.au>
1081
1082 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1083
10842006-02-26 Kevin Ryde <user42@zip.com.au>
1085
1086 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1087 NAME_MAX is not available, which is so on Solaris 10. Report and help
1088 by Bill Schottstaedt.
1089
1090 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1091 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1092 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1093 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1094 use "unsigned char", not signed char. This ensures comparisons are
1095 the same as `char<?' etc, and is also the same as guile 1.6 did.
1096 Reported by Sven Hartrumpf.
1097
4a9f83ff
MD
10982006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1099
1100 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1101 SCM_HAVE_T_INT64.
1102 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1103 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1104 scm_t_int32.
1105
29d8c124 11062006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1107
1108 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1109 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1110 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1111 Take into account SEG->SPAN when computing CELLS_SWEPT.
1112 (scm_i_sweep_segment): Take one more argument, similarly.
1113 (scm_i_sweep_all_segments): Likewise.
1114 (scm_i_sweep_some_segments): Likewise.
1115 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1116 refer to SCM_GC_CELLS_COLLECTED.
1117
1118 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1119 argument, an `scm_i_sweep_statistics' object.
1120 Change the way DELTA is collected: don't take into account
1121 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1122
1123 * gc-malloc.c (scm_realloc): Pass an extra argument
1124 to `scm_i_sweep_all_segments ()'.
1125
1126 * gc.c (gc_start_stats): Updated accordingly.
1127 (gc_end_stats): Take an additional SWEEP_STATS argument.
1128 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1129 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1130 Decrement SCM_CELLS_ALLOCATED.
1131 (scm_i_gc): Likewise.
1132
1133 * private-gc.h (scm_i_sweep_*): Updated function
1134 prototypes accordingly.
1135 (scm_t_sweep_statistics): New type.
1136 (scm_i_sweep_statistics_init): New macro.
1137 (scm_i_sweep_statistics_sum): New macro
1138
9a5fa6e9 11392006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1140
1141 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1142 LEN. Without this, too much collectable memory gets unregistered,
1143 which results in an underflow of SCM_MALLOCATED in
1144 `decrease_mtrigger()'.
1145
1146 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1147 equal to SCM_MALLOCATED.
1148
11492006-02-13 Marius Vollmer <mvo@zagadka.de>
1150
1151 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1152 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1153 configured --without-threads.
1154 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1155
1aaa1c17
MV
11562006-02-12 Marius Vollmer <mvo@zagadka.de>
1157
1158 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1159 filling when the fill parameter is omitted, as documented, but
1160 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1161 can not store characters.
1162
d7c6575f
NJ
11632006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1164
1165 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1166 on to scm_fill_sockaddr call.
1167
43e01b1e
NJ
11682006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1169
1170 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1171 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1172
1173 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1174 (struct pre_unwind_data): New, replaces struct lazy_catch.
1175 (scm_c_catch): New, replaces scm_internal_catch as the primary
1176 catch API for C code; adds pre-unwind handler support.
1177 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1178 compatibility.
1179 (tc16_pre_unwind_data, pre_unwind_data_print,
1180 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1181 "lazy_catch" equivalents.
1182 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1183 as the primary C API for a "lazy" catch.
1184 (scm_internal_lazy_catch): Now just a wrapper for
1185 scm_c_with_throw_handler, for back compatibility.
1186 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1187 pre-unwind handler support.
1188 (scm_catch): Now just a wrapper for
1189 scm_catch_with_pre_unwind_handler, for back compatibility.
1190 (scm_with_throw_handler): New.
1191 (scm_lazy_catch): Update comment to say that the handler can
1192 return, and what happens if it does.
1193 (toggle_pre_unwind_running): New.
1194 (scm_ithrow): When identifying the throw target, take running
1195 flags into account. In general, change naming of things from
1196 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1197 don't unwind the dynamic context first. Add dynwind framing to
1198 manage the running flag of a throw handler. If a lazy catch or
1199 throw handler returns, rethrow the same exception again. Add
1200 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1201
1202 * root.c (scm_internal_cwdr): Add NULL args to
1203 scm_i_with_continuation_barrier call.
1204
1205 * dynwind.c: Change comment mentioning lazy-catch to mention
1206 pre-unwind data and throw handler also.
1207
1208 * continuations.h (scm_i_with_continuation_barrier): Add
1209 pre-unwind handler args.
1210
1211 * continuations.c (scm_i_with_continuation_barrier): Add
1212 pre-unwind handler args, and pass on to scm_c_catch (changed from
1213 scm_internal_catch).
1214 (c_handler): Remove scm_handle_by_message_noexit call.
1215 (scm_c_with_continuation_barrier): Call
1216 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1217 as the pre-unwind handler.
1218 (scm_handler): Remove scm_handle_by_message_noexit call.
1219 (s_scm_with_continuation_barrier): Call
1220 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1221 as the pre-unwind handler.
1222
2b829bbb
KR
12232006-02-04 Kevin Ryde <user42@zip.com.au>
1224
1225 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1226
72098928
KR
12272006-02-03 Kevin Ryde <user42@zip.com.au>
1228
1229 * list.c, list.h (scm_list): Restore this function for use from C.
1230 It's a complete no-op but in theory might used by someone.
1231
aa092c5d
MV
12322006-01-30 Marius Vollmer <mvo@zagadka.de>
1233
1234 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1235 so that it gets unlocked in all cases.
1236 (SCM_APPLY, CEVAL): Likewise.
1237
661ae7ab
MV
12382006-01-29 Marius Vollmer <mvo@zagadka.de>
1239
ee51ba31
MV
1240 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1241 scm_is_typed_array instead.
1242
661ae7ab
MV
1243 Renamed the "frames" that are related to dynamic-wind to "dynamic
1244 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1245 Updated documentation.
1246
99e370f6
MV
1247 Disabled "futures":
1248
1249 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1250 * eval.c, init.c: Comment out all 'future' related things.
1251
15ccf10b
MV
12522006-01-28 Marius Vollmer <mvo@zagadka.de>
1253
1254 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1255 to inline.h to make it inline.
1256
9a5fa6e9 12572005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1258
1259 * strings.c (scm_i_take_stringbufn): New.
1260 (scm_i_c_take_symbol): New.
1261 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1262
1263 * strings.h (scm_i_c_take_symbol): New.
1264 (scm_i_take_stringbufn): New.
1265
1266 * symbols.c (lookup_interned_symbol): New function.
1267 (scm_i_c_mem2symbol): New function.
1268 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1269 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1270 creating a new Scheme string.
1271 (scm_from_locale_symboln): Likewise.
1272 (scm_take_locale_symbol): New.
1273 (scm_take_locale_symboln): New.
1274
1275 * symbols.h (scm_take_locale_symbol): New.
1276 (scm_take_locale_symboln): New.
1277
2ca2ffe6
HWN
12782006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1279
1280 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1281 free_count.
1282
c255614e
HWN
12832005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1284
1285 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1286 upon error
1287
29295b0c
NJ
12882005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1289
9a5fa6e9 1290 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1291 the GC when allocated_fluids_len is zero.
1292
2824f4dc
NJ
12932005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1294
ec3a8ace
NJ
1295 * load.c (the_reader, the_reader_fluid_num): New.
1296 (scm_primitive_load): Support custom reader.
1297 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1298 the_reader as `current-reader'.
1299
2824f4dc
NJ
1300 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1301 (rather than an uninitialized pointer on the stack).
1302
d9c36d2a
MV
13032005-12-07 Marius Vollmer <mvo@zagadka.de>
1304
6a88895b
MV
1305 Reported by Bruce Korb:
1306
1307 * init.c (invoke_main_func): Don't call exit here. Throws that
1308 are only caught by scm_with_guile will bypass us and would cause
1309 scm_boot_guile to return erroneously.
1310 (scm_boot_guile): Expect scm_with_guile to return and call exit
1311 here, passing it an appropriate exit code.
1312
1313 From Andy Wingo:
d9c36d2a
MV
1314
1315 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1316 unsigned char cast to an int, or -1 for EOS.
1317
b54df254
MV
13182005-12-06 Marius Vollmer <mvo@zagadka.de>
1319
08f489c9
MV
1320 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1321 non-const.
9a5fa6e9 1322 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1323
b54df254
MV
1324 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1325 scm_enter_guile): Removed from public API. See comment at
1326 scm_without_guile for the rationale.
1327
1328 * scmsigs.c (read_without_guile): New.
1329 (signal_delivery_thread): Use it instead of
1330 scm_leave_guile/read/scm_enter_guile.
1331
9d9ce2b5
MV
1332 From Stephen Compall:
1333
1334 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1335 (CEVAL): Evaluate SRFI 61 cond clauses.
1336
9a5fa6e9 13372005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1338
1339 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1340 This was typically hit when running `gc-live-object-stats' right
1341 after starting Guile.
1342
efeac8ae
KR
13432005-11-30 Kevin Ryde <user42@zip.com.au>
1344
1345 * srfi-13.c (scm_string_append_shared): No copying if just one
1346 non-empty string in args.
1347
606183ba
KR
13482005-11-26 Kevin Ryde <user42@zip.com.au>
1349
1350 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1351 by Ludovic Courtès.
606183ba
KR
1352
1353 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1354 "register".
1355
1356 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1357 scm_malloc returning NULL, it never does that.
1358 * putenv.c (putenv): Likewise.
1359
1360 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1361 much too big to want to inline.
1362
9a5fa6e9 13632005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1364
1365 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1366 the value at its top. This fixes a reference leak.
1367 (PUSH_REF): Perform `pstate->top++' after calling
1368 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1369 effects.
1370
9a5fa6e9 13712005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1372
1373 * gc.c (scm_weak_vectors): Removed.
1374
f07d2b20
KR
13752005-11-12 Kevin Ryde <user42@zip.com.au>
1376
1377 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1378 by Ludovic Courtès.
f07d2b20 1379
bedd3f5f
MV
13802005-11-07 Marius Vollmer <mvo@zagadka.de>
1381
1382 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1383 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1384 section might exit non-locally.
1385
7c9c0169
NJ
13862005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1387
1388 * eval.c (sym_instead): New symbol.
1389 (ENTER_APPLY): Remove optional use of a continuation when making
1390 trap call.
1391 (scm_debug_opts): Change doc for 'cheap option to make clear that
1392 it is now obsolete.
1393 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1394 making trap calls, and implement substitution of eval expressions
1395 and return values using the values that the trap call handlers
1396 return.
1397
1398 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1399
9a5fa6e9 14002005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1401
1402 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1403 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1404 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1405 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1406 scm_c_make_socket_address): New functions.
1407 * socket.h: Add prototypes.
1408
fc9f596c
KR
14092005-10-24 Kevin Ryde <user42@zip.com.au>
1410
1411 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1412 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1413 POSIX spec examples, the latter are not available on for instance
1414 NetBSD.
1415
1416 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1417 posix.texi.
1418
1419 * stime.c (scm_strftime): Update docstring from posix.texi.
1420
0460c6e1
MV
14212005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1422
1423 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1424
1425 * null-threads.h, pthread-threads.h
1426 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1427 (scm_i_pthread_mutexattr_recursive): New.
1428
1429 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1430 (scm_i_critical_section_mutex): Do not initialize statically.
1431 (scm_threads_prehistory): Initialize
1432 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1433 here.
1434
1435 * eval.c (source_mutex): Do not initialiaze statically.
1436 (scm_init_eval): Do it here, using
1437 scm_i_pthread_mutexattr_recursive.
1438
7b4a9e52
MV
14392005-09-05 Marius Vollmer <mvo@zagadka.de>
1440
1441 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1442 New.
1443 (sym_reader): New.
1444 (scm_print_opts): Added "quote-keywordish-symbols" option.
1445 (quote_keywordish_symbol): New, for evaluating the option.
1446 (scm_print_symbol_name): Use it.
1447 (scm_init_print): Initialize new option to sym_reader.
1448
5defc05d
NJ
14492005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1450
1451 * eval.c (eval_letrec_inits): New.
1452 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1453
036482e9
MV
14542005-08-12 Marius Vollmer <mvo@zagadka.de>
1455
1456 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1457 Peter Gavin!
1458
5c347f8c
KR
14592005-08-12 Kevin Ryde <user42@zip.com.au>
1460
1461 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1462
bc721aa2
KR
14632005-08-06 Kevin Ryde <user42@zip.com.au>
1464
1465 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1466 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1467 scm_string_index, scm_string_index_right, scm_string_skip,
1468 scm_string_skip_right, scm_string_count, scm_string_map,
1469 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1470 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1471 procedures called in loops.
1472
126c81db
KR
14732005-08-02 Kevin Ryde <user42@zip.com.au>
1474
1475 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1476 avoid lots of copying where previoulsy growing by only 80 bytes at a
1477 time.
1478
7f278dc6
MV
14792005-08-01 Marius Vollmer <mvo@zagadka.de>
1480
1481 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1482 already have scm_lookup_closure_module, which does the same thing.
1483
cb5c4b07
MV
14842005-08-01 Marius Vollmer <mvo@zagadka.de>
1485
1486 New marking algorithm for weak hashtables that fixes the problem
1487 that references from the non-weak value to the associated weak
1488 key (for example) would prevent the entry from ever being dropped.
1489
1490 Guardians have been changed back to their original semantics and
1491 are no longer greedy and no longer drop cycles.
1492
1493 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1494 hashtable and guardian machinery but call the relevant functions
1495 directly.
1496
1497 * guardians.h, guardians.c, deprecated.h,
1498 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1499 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1500 Deprecated and moved into deprecated.[ch].
1501
1502 * guardians.h, guardians.c: Mostly rewritten.
1503 (scm_i_init_guardians_for_gc,
1504 scm_i_identify_inaccessible_guardeds,
1505 scm_i_mark_inaccessible_guardeds): New.
930888e8 1506 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1507
1508 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1509 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1510 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1511 (scm_weaks_prehistory): Removed.
1512 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1513 scm_i_mark_weak_vectors_non_weaks,
1514 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1515 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1516 scm_scan_weak_vectors): Removed.
1517
1518 * hashtab.h (scm_i_scan_weak_hashtables): New.
1519 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1520 SCM_WVECTF_NOSCAN.
1521 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1522 t->n_items.
1523 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1524 to latter. Do not scan the alists themselves, this is done by the
1525 weak vector code now. Just update the element count.
1526
1527 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1528 to latter. The type is now only part of the cell word.
1529 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1530
1531 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1532
3e2073bd
MD
15332005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1534
1535 Some changes towards making it possible to run Guile on the EM64T
1536 platform.
1537
1538 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1539 mallocating for (unsigned long *bounds).
1540
1541 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1542 scm_t_bits before storing them in the type word.
1543
1544 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1545 scm_t_bits to int.
1546
e8ac8e75
KR
15472005-07-12 Kevin Ryde <user42@zip.com.au>
1548
1549 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1550 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1551 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1552 than scm_makfrom0str.
1553 Reported by Ken Raeburn.
1554
1555 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1556 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1557 returning SCM_GC_CARD_BVEC.
1558
1559 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1560 rather than latin-1 acute accent, the latter may not print on all
1561 terminals.
1562
1563 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1564 trailing deletions, so as to return a substring if those are the only
1565 changes.
1566
adc0677d
KR
15672005-07-10 Kevin Ryde <user42@zip.com.au>
1568
1569 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1570 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1571 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1572 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1573
8fecbb19
HWN
15742005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1575
1576 * gc-card.c (scm_i_card_statistics): init tag.
1577
1578 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1579
fc9c5d06
HWN
15802005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1581
8fecbb19
HWN
1582 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1583 string.
fc9c5d06 1584
08fce816
KR
15852005-06-25 Kevin Ryde <user42@zip.com.au>
1586
1587 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1588 last change, use plain copy-on-write substrings, the individual
1589 descriptions in the srfi don't mention shared storage (only the
1590 introduction does).
1591
1592 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1593 null-terminator, rather than mallocing a whole new block.
1594 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1595
fc4abd0e
MV
15962005-06-12 Marius Vollmer <mvo@zagadka.de>
1597
e3da8a30
MV
1598 * ramap.c (scm_array_index_map_x): First test for real arrays,
1599 then check for generalized vectors. This ensures that the
1600 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1601 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1602 to access the target array, making these functions work with all
1603 kinds of arrays, not just bit arrays.
e3da8a30 1604
fc4abd0e
MV
1605 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1606 gh_list.c, gh_predicates.c: Deprecated everything.
1607
1608 * environments.c (environment_default_folder,
1609 environment_default_observer): Do not use gh_call3, gh_call1.
1610
e4da0740
HWN
16112005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1612
1613 * modules.c (s_scm_eval_closure_module): new function. Return the
1614 module inside an eval-closure.
1615
1616 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1617 table. This means that procedure properties are GC'd if the
1618 procedure dies.
1619
27667158
KR
16202005-06-11 Kevin Ryde <user42@zip.com.au>
1621
1622 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1623 charset cases, count chars kept and build a string in a second pass,
1624 rather than using a cons cell for every char kept. Use a shared
1625 substring when nothing removed (such sharing is allowed by the srfi).
1626
8a00ba71
HWN
16272005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1628
1629 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1630 string, so live object stats can be sorted with string<?.
1631
a677679f
MV
16322005-06-06 Marius Vollmer <mvo@zagadka.de>
1633
2ff668b0
MV
1634 * print.c (iprin1): When writing a string, collect all characters
1635 that can be printed directly into one call to scm_lfwrite.
1636 Previously, every character was output with its own call to
1637 write(2) on unbuffered ports.
1638
589f22f6
MV
1639 * eval.c (scm_eval_options_interface): Use
1640 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1641 and SCM_CRITICAL_SECTION_END.
1642
a677679f
MV
1643 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1644 check for generalized vectors. This ensures that the generalized
1645 vector case need only work with zero-origin ranges.
1646
f8cda9ee
KR
16472005-06-06 Kevin Ryde <user42@zip.com.au>
1648
1649 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1650 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1651 matched.
1652
cdac1be4
MV
16532005-06-05 Marius Vollmer <mvo@zagadka.de>
1654
6642f7ac
MV
1655 * eval.c: Added comment on how to make case 1.1 of
1656 r5rs_pitfall.test succeed.
1657
cdac1be4
MV
1658 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1659
1660 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1661
1662 * socket.c: Remove obsolete comment about socklen_t.
1663 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1664
1665 * numbers.h (isnan)[__MINGW32__]: Remove.
1666
1667 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1668 DEFAULT_INCLUDES when cross compiling.
1669
1670 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1671
a677679f 1672 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1673 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1674 from Jan's patch.)
1675
9e664475
MV
16762005-05-22 Marius Vollmer <mvo@zagadka.de>
1677
188d0c5e
MV
1678 * unif.c (scm_make_shared_array): Add old base to new base since
1679 scm_array_handle_pos does not include the base.
1680 (scm_aind): Likewise.
1681
9e664475
MV
1682 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1683 output port.
1684
5a6d139b
NJ
16852005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1686
1687 Mac OS X compile warning fixes, reported by Richard Todd.
1688
1689 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1690 that it is signed.
1691
1692 * strports.c (st_resize_port): Add unsigned char cast.
1693 (scm_mkstrport): Make read/write_buf cast unsigned.
1694
1695 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1696
1697 * rdelim.c (scm_read_line): Initialize slen.
1698
1699 * load.c (scm_search_path): Remove weird >=1, and add
1700 parentheses to clarify conditions.
1701
1702 * hash.c (scm_hasher): Add const unsigned char cast.
1703
1704 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1705
b01532af
NJ
17062005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1707
9a5fa6e9 1708 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1709
1710 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1711 code.
1712
1713 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1714 of code.
1715
1716 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1717 of code.
1718 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1719 and current.
1720
229a0710
NJ
17212005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1722
1723 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1724 compile warning reported by Werner Scheinast.
1725
645dd3fc
HWN
17262005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1727
80038021
HWN
1728 * list.h: remove scm_list()
1729
645dd3fc
HWN
1730 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1731 SCM_DEBUG_CELL_ACCESSES
1732 (FLUID_NEXT_LOC): idem.
1733
9a68a4a8
KR
17342005-04-30 Kevin Ryde <user42@zip.com.au>
1735
1736 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1737 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1738 zero when re==0 and im<0. Reported by Jean Crepeau.
1739
0640cdaa
KR
17402005-04-25 Kevin Ryde <user42@zip.com.au>
1741
1742 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1743 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1744 few sensible uses (like filling with a random number generator say),
1745 but has been allowed in the past and so should be kept.
0640cdaa 1746
c0b85e9c
KR
17472005-04-23 Kevin Ryde <user42@zip.com.au>
1748
1749 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1750 scm_hash_fn_remove_x.
1751
1752 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1753 the caller when cons* is reached through apply.
1754
1755 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1756 list is called using apply, under the debugging evaluator.
1757 (scm_list): Remove.
1758
c51682b4
KR
1759 * list.c, list.h (scm_make_list): New code, moving make-list from
1760 boot-9.scm.
8cb2eff8 1761
c0575bde
KR
17622005-04-14 Kevin Ryde <user42@zip.com.au>
1763
1764 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1765 converted from scheme code in boot-9.scm.
1766
47a298d9
KR
17672005-04-11 Kevin Ryde <user42@zip.com.au>
1768
1769 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1770 Validate list argument, scm_string_append and scm_string_append_shared
1771 don't do that to their rest argument (in a normal build).
1772
8ea3dc2e
MV
17732005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1774
1775 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1776 closure can not be stored since it is no longer valid at GC time.
1777 (make_hash_table): Initialize 'hash_fn' field.
1778 (scm_i_rehash): Only store hash_fn in hash table when closre is
1779 NULL.
1780 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1781 non-NULL. Always use a NULL closure.
1782 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1783 few entries.
1784
08d2020d
MV
17852005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1786
1787 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1788 argument; always use scm_delq_x. The delete_fn function works on
1789 the handle, not the key, and it therefore makes no sense to make
1790 it configurable. Changed all callers.
1791 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1792 (scm_hash_clear): Accept plain vectors as hashtables.
1793 (scm_delx_x): Removed.
1794
cb975c21
HWN
17952005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1796
1797 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1798 compatibility with gcc -std=c99.
1799
4c908f2c
MD
18002005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1801
1802 * async.h (scm_mask_ints): Removed left over reference to
1803 scm_root.
1804
1805 * threads.c: Removed fprintf debug statements.
1806
d193b04b
NJ
18072005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1808
1809 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1810
c29748cd
NJ
18112005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1812
1813 * debug.c (scm_make_memoized): Remove unnecessary critical
1814 section, and simplify by using SCM_RETURN_NEWSMOB.
1815
e654b062
MD
18162005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1817
1818 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1819
4bc6f1c6
KR
18202005-03-18 Kevin Ryde <user42@zip.com.au>
1821
1822 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 1823 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 1824
f1531813
KR
18252005-03-13 Kevin Ryde <user42@zip.com.au>
1826
1827 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1828 srfi-60.
1829
1830 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1831 because OR-ing bits into a negative can reduce the value to an inum.
1832
1833 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1834 casting inum to double since that can lose precision.
1835
a9fae247
MV
18362005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1837
1838 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1839 (guilify_self_1): Initialize it.
1840
1841 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1842 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1843 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1844 field.
1845 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1846 recursively.
1847 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1848 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1849 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1850 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1851 scm_after_gc_c_hook here.
1852 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1853 scm_after_gc_c_hook when a full GC has in fact been performed.
1854 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1855
1856 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1857 scm_gc_heap_lock.
1858
1859 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1860 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1861
1862 * inline.h (scm_cell, scm_double_cell): Do not check
1863 scm_gc_running_p, allocation during sweeping is OK.
1864
1865 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1866 not set scm_block_gc.
1867
1868 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1869
1870 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1871 instead of scm_malloc. The latter can not be used during GC.
1872
d1c38e11
MV
18732005-03-09 Marius Vollmer <mvo@zagadka.de>
1874
1875 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1876 years.
1877
99ec43c1
MV
18782005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1879
1880 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1881 scm_gc_running_p. Sweeping can happen in parallel with
1882 allocation.
1883
1884 * inline.h: Updated comments for current threading implementation.
1885
1886 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1887 (scm_i_thread): Removed unused signal_asyncs field.
1888 (threads_mark): Do not mark it.
1889 (guilify_self_1): Do not initialize it. Do initialize
1890 continuation_root field.
1891 (do_thread_exit): Do not remove thread from all_threads list.
1892 (on_thread_exit): Do it here, after leaving guile mode.
1893 (sleep_level): Removed.
1894 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1895 returning. Do not support recursive sleeps.
1896 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1897 entry. Do not support recursive sleeps.
1898
1899 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1900 resize_all_states): Collapsed ensure_state_size and
1901 ensure_all_state_sizes into one function named resize_all_states.
1902 Allocate new vectors outside of single threaded region. Do only
1903 simple things inside that region.
1904 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1905 while adding to the global lists.
1906
1907
461f34aa
MV
19082005-03-08 Marius Vollmer <mvo@zagadka.de>
1909
1910 libltdl is no longer distributed. We expect it to be installed
1911 already.
1912
1913 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1914 (libguile_la_LIBADD): Removed @LIBLTDL@.
1915
4e047c3e
MV
19162005-03-07 Marius Vollmer <mvo@zagadka.de>
1917
1918 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1919 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1920 they also block/unblock execution of asyncs and call
1921 scm_async_click which is declared in async.h but threads.h can not
1922 include async.h since async.h already includes threads.h.
1923 (scm_i_critical_section_level): New, for checking mistakes in the
1924 use of the SCM_CRITICAL_SECTION_* macros.
1925 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1926 critical sections can be nested.
1927
1928 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1929 not zero.
1930
1931 * threads.h, threads.c (scm_frame_lock_mutex): New.
1932 (scm_frame_critical_section): Take mutex as argument.
1933 (framed_critical_section_mutex): New, used as default for above.
1934 (scm_init_threads): Initialize it.
1935 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1936 scm_i_critical_section_mutex; both are initialized statically.
1937
1938 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1939 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
1940 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1941 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
1942
1943 * debug.c (scm_debug_options): Replace
1944 SCM_CRITICAL_SECTION_START/END with a frame and
1945 scm_frame_critical_section.
1946
1947 * continuations.c (scm_make_continuation): No longer a critical
1948 section.
1949 (scm_dynthrow): Abort when scm_i_critical_section_level is
1950 not zero.
1951
d0a45bff
MV
19522005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1953
db6673e5
MV
1954 * threads.c (scm_try_mutex): Renamed argument for consistency.
1955
d0a45bff
MV
1956 * root.c (scm_call_with_dynamic_root): New docstring.
1957
1958 * eval.c: Define _GNU_SOURCE.
1959
9de87eea
MV
19602005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1961
1962 Big merge from the mvo-thread-cleanup branch. The main changes
1963 are:
1964
1965 - The dynamic roots functionality has been split into dynamic
1966 states and continuations barriers. Fluids have been
1967 reimplemented and can now be garbage collected.
1968
1969 - Initialization of Guile now works in a multi-thread friendly
1970 manner. Threads can freely enter and leave guile mode.
1971
1972 - Blocking on mutexes or condition variables or while selecting
1973 can now be reliably interrupted via system asyncs.
1974
1975 - The low-level threading interface has been removed.
1976
1977 - Signals are delivered via a pipe to a dedicated 'signal delivery
1978 thread'.
1979
1980 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1981
1982 * throw.c (scm_handle_by_message): Exit only the current thread,
1983 not the whole process.
1984 (scm_handle_by_message_noexit): Exit when catching 'quit.
1985
1986 * scmsigs.c (take_signal, signal_delivery_thread,
1987 start_signal_delivery_thread, ensure_signal_delivery_thread,
1988 install_handler): Reimplemented signal delivery as explained in
1989 the comments.
1990
1991 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1992 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1993 scm_i_sched_yield, scm_i_pthread_sigmask,
1994 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1995 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1996 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1997 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1998 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1999 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
2000 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
2001 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
2002 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
2003 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
2004 scm_i_pthread_key_create, scm_i_pthread_setspecific,
2005 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
2006 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
2007 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2008 when using pthreads.
2009 * null-threads.c, null-threads.h: Provide dummy definitions for
2010 the above symbols when not using pthreads.
2011
2012 * modules.h, modules.c (scm_frame_current_module): New.
2013
2014 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2015 instead of scm_internal_dynamic_wind.
2016
2017 * init.h, init.c (restart_stack, start_stack): Removed.
2018 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2019 (scm_boot_guile_1): Removed.
2020 (scm_i_init_mutex): New.
2021 (really_cleanup_for_exit, cleanup_for_exit): New.
2022 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2023 Moved around some init funcs. Call
2024 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2025 with atexit.
2026
2027 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2028 Use "!scm_is_eq" instead of "!=".
2029
2030 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2031 SCM_USE_COOP_THREADS): Removed.
2032
2033 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2034 maintained. Unlock scm_i_sweep_mutex before running
2035 scm_after_gc_c_hook.
2036 (scm_permanent_object): Allocate outside of critical section.
2037 (cleanup): Removed.
2038
2039 * fluids.h, fluids.c: Reimplemented completely.
2040 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2041 SCM_FAST_FLUID_SET): Reimplemented as functions.
2042 (scm_is_fluid): New.
2043 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2044 (scm_make_dynamic_state, scm_dynamic_state_p,
2045 scm_is_dynamic_state, scm_current_dynamic_state,
2046 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2047 scm_c_with_dynamic_state, scm_with_dynamic_state,
2048 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2049
2050 * feature.c (progargs_fluid): New.
2051 (scm_program_arguments, scm_set_program_arguments): Use it instead
2052 of scm_progargs.
2053 (scm_init_feature): Allocate it. Also, only add "threads" feature
2054 when SCM_USE_PTHREAD_THREADS is true.
2055
2056 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2057 scm_make_rec_mutex, with all the consequences.
2058 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2059 scm_internal_dynamic_wind. Handle dynamic states as second
2060 argument.
2061
2062 * threads.h, threads.c (scm_internal_select): Renamed to
2063 scm_std_select and discouraged old name.
2064 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2065 and scm_std_usleep.
2066 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2067 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2068 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2069 SCM_THREAD_DATA): Removed.
2070 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2071 (scm_i_thread): New.
2072 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2073 Use scm_assert_smob_type.
2074 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2075 scm_thread_self, scm_thread_yield, scm_mutex_init,
2076 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2077 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2078 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2079 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2080 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2081 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2082 scm_thread_select): Removed. Replaced with scm_i_pthread
2083 functions as appropriate.
2084 (scm_in_guile, scm_outside_guile): Removed.
2085 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2086 take a ticket.
2087 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2088 New.
2089 (scm_i_frame_single_threaded): New.
2090 (scm_init_threads_default_dynamic_state): New.
2091 (scm_i_create_thread): Removed.
2092 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2093 (scm_make_recursive_mutex): New.
2094 (scm_frame_critical_section): New.
2095 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2096 latter, changed all uses.
2097 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2098 scm_i_set_last_debug_frame): New, use them instead of scm_root
2099 stuff.
2100 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2101 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2102 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2103 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2104 (remqueue): Allow the removal of already removed cells. Indicate
2105 whether a real removal has happened.
2106 (scm_thread): Removed, replaced with scm_i_thread.
2107 (make_thread, init_thread_creatant): Removed.
2108 (cur_thread): Removed.
2109 (block_self, unblock_from_queue): New.
2110 (block, timed_block, unblock): Removed.
2111 (guilify_self_1, guilify_self_2, do_thread_exit,
2112 init_thread_key_once, init_thread_key,
2113 scm_i_init_thread_for_guile, get_thread_stack_base,
2114 scm_init_guile): New initialisation method.
2115 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2116 thread creation.
2117 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2118 "fair" to fat and implemented new semantics, including reliable
2119 interruption.
2120 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2121 (scm_threads_mark_stacks): Explicitly mark handle.
2122 (scm_std_select): Allow interruption by also selecting on the
2123 sleep_pipe.
2124 (scm_i_thread_put_to_sleep): Handle recursive requests for
2125 single-threadedness.
2126 (scm_threads_prehistory, scm_init_threads): Put current thread
2127 into guile mode via guileify_self_1 and guileify_self_2,
2128 respectively.
2129
2130 * fluid.h (SCM_FLUIDP): Deprecated.
2131
2132 * coop-threads.c: Removed.
2133
2134 * continuations.h, continuations.c (scm_with_continuation_barrier,
2135 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2136 New.
2137
2138 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2139 (async_mutex): New.
2140 (scm_async_click): Protected with async_mutex. Do not deal with
2141 signal_asyncs, which are gone. Set cdr of handled async cell to
2142 #f.
2143 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2144 current sleep.
2145 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2146 since that might not work during early initialization.
2147
2148 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2149 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2150 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2151 and SCM_CRITICAL_SECTION_END.
2152 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2153 SCM_CRITICAL_SECTION_START/END.
2154
2155 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2156 (libguile_la_SOURCES): Added null-threads.c
2157 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2158 threads-plugin.c.
2159 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2160
2161 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2162 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2163 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2164 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2165 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2166 scm_make_root): Removed or deprecated. Replaced with references
2167 to the current thread, dynamic state, continuation barrier, or
2168 some fluid, as appropriate.
2169 (root_mark, root_print): Removed.
2170 (scm_internal_cwdr): Reimplemented guts with
2171 scm_frame_current_dynamic_state and
2172 scm_i_with_continuation_barrier.
2173 (scm_dynamic_root): Return current continuation barrier.
2174
2175
ad3d5a65
MV
21762005-02-28 Marius Vollmer <mvo@zagadka.de>
2177
2178 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2179 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2180 cleanliness.
2181 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2182 IP_DROP_MEMBERSHIP.
2183 Thanks to Greg Troxel!
2184
73a90115
MD
21852005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2186
2187 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2188 block.
2189
5d2cb3ab
MV
21902005-02-25 Marius Vollmer <mvo@zagadka.de>
2191
2192 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2193 so that no two weak alist vectors share a spine.
2194 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2195 during GC before inserting the new alist cell.
2196
838c4126
MV
21972005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2198
2199 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2200 the hashtable.
2201 (scm_hash_fn_create_handle_x): Likewise.
2202 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2203
29fed193
MD
22042005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2205
2206 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2207 the prototypical examples mentioned in the old reference manual.
2208 Instead keep the old semantics of dispatching on type. (Yes, this
2209 is extremely ugly, but the whole point of keeping the deprecated
2210 interface is not to break old code.)
2211
9cc49060
MD
22122005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2213
2214 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2215 scm_i_array_dims.
2216
8447f463
KR
22172005-01-28 Kevin Ryde <user42@zip.com.au>
2218
2219 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2220 integer-expt and multiply/divide. Inexacts and fractions no longer
2221 supported (they happened to work before for left shifts, but not
2222 right). Don't really need inexacts and fractions, since ash is
2223 documented as a "bitwise operation", and all the rest of those only
2224 take exact integers.
2225
1367aa5e
HWN
22262005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2227
856fca7e
HWN
2228 * gc-card.c (scm_i_card_statistics): map structs, closures and
2229 subrs to one tag.
2230
1367aa5e 2231 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2232 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2233
2234 * gc-segment.c (scm_i_all_segments_statistics): new function.
2235 (scm_i_heap_segment_statistics): new function
2236
2237 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2238 statistics on the number of live objects of each type.
2239
2240 * gc-card.c (scm_i_tag_name): new function.
2241 (scm_i_card_statistics): new function.
2242
333db3b8
KR
22432005-01-24 Kevin Ryde <user42@zip.com.au>
2244
2245 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2246 POSIX and C99 don't document errno being set. Reported by Bruno
2247 Haible.
2248 (scm_flock): Update docstring from manual.
2249
8447f463
KR
2250 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2251 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2252 a 64-bit system.
2253
2254 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2255 sa_handler, needs to be a long on 64-bit systems where int is only 32
2256 bits.
2257
88f59e53
MV
22582005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2259
0eeb2611
MV
2260 * environments.c (obarray_enter, obarray_replace): Call
2261 SCM_HASHTABLE_INCREMENT when adding a new entry.
2262
88f59e53
MV
2263 * objects.c: Include goops.h for the scm_class_of prototype.
2264
2265 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2266 sizes to be smaller than the maximum lengths of vectors.
2267
219b2868
MV
22682005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2269
2270 * ports.c, smob.c: Include "libguile/goops.h".
2271
2272 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2273 scm_class_char, scm_class_pair, scm_class_procedure,
2274 scm_class_string, scm_class_symbol,
2275 scm_class_procedure_with_setter, scm_class_primitive_generic,
2276 scm_class_vector, scm_class_null, scm_class_real,
2277 scm_class_complex, scm_class_integer, scm_class_fraction,
2278 scm_class_unknown, scm_port_class, scm_smob_class,
2279 scm_no_applicable_method, scm_class_of): Moved from objects to
2280 goops since they are only useable once goops has been loaded.
2281 (scm_classes_initialized): Removed.
2282 (scm_class_of): Do not check it.
2283 (create_standard_classes): Do not set it.
2284
009c6b9c
MV
22852005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2286
50472546
MV
2287 * objects.h, objects.c (scm_classes_initialized): New.
2288 (scm_class_of): Signal error when scm_classes_initialized is zero.
2289 * goops.c (create_standard_classes): Set scm_classes_initialized
2290 to one.
2291
009c6b9c
MV
2292 * random.c (scm_random_solid_sphere_x): Use
2293 scm_c_generalized_vector_length instead of
2294 scm_uniform_vector_length.
2295
7719cbe9
MV
22962005-01-16 Marius Vollmer <mvo@zagadka.de>
2297
2298 * script.c (scm_compile_shell_switches): Removed debugging output.
2299
1ec44fed
KR
23002005-01-15 Kevin Ryde <user42@zip.com.au>
2301
2302 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2303 docstrings from manual.
2304 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2305
6e4cd850
MV
23062005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2307
0b5a0521
MV
2308 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2309 its value.
2310
2311 Implement u64 and s64 uniform numeric vectors with bignums when
2312 scm_t_uint64 and scm_t_int64 are not available.
2313
2314 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2315 scm_array_handle_u64_elements,
2316 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2317 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2318 is not available.
2319 (scm_take_s64vector, scm_array_handle_s64_elements,
2320 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2321 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2322 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2323 scm_t_int64/scm_t_uint64 are not available.
2324 (uvec_mark): New, to mark the bignums.
2325 (alloc_uvec): Initialize bignums.
2326 (uvec_fast_ref): Return bignums directly.
2327 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2328 assert_exact_integer): New.
2329 (uvec_fast_set): Use them to validate the bignums.
2330 (scm_init_srfi_4): Set mark function of smob when needed.
2331 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2332 scm_int64_max.
2333
6e4cd850
MV
2334 Recognize 1.4 -e syntax.
2335
2336 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2337 (scm_compile_shell_switches): Use them to recognize and convert
2338 1.4 "-e" syntax.
2339
3b698afe
MV
23402005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2341
2342 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2343 deprecated features that once were macros but are now functions
2344 back into macros.
2345
d6dc83a9
MV
23462005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2347
49086691
MV
2348 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2349 * deprecation.c (scm_issue_deprecation_warning,
2350 scm_c_issue_deprecation_warning_fmt): Use it.
2351 (mode): Removed.
2352 (print_summary): New.
2353 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2354 mode.
2355
d6dc83a9
MV
2356 Deprecated SCM_ARRAY* macros.
2357
2358 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2359 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2360 version. Changed all uses.
2361 (scm_tc16_array, scm_i_tc16_array,
2362 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2363 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2364 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2365 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2366 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2367 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2368 SCM_ARRAY_V, SCM_I_ARRAY_V,
2369 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2370 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2371 scm_t_array, scm_i_t_array): Likewise.
2372 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2373 Moved from unif.h to unif.c.
2374 (scm_c_array_rank): New.
2375 (scm_array_rank): Reimplement using it.
2376
2377 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2378 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2379 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2380
dc91d8de
MV
23812005-01-11 Marius Vollmer <mvo@zagadka.de>
2382
2383 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2384 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2385 scm_c_generalized_vector_ref and scm_cvref, and
2386 scm_c_generalized_vector_set_x, respectively.
2387 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2388 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2389
2390 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2391 former to latter and made public. Changed all uses.
2392 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2393 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2394 (scm_i_shap2ra): New internal version of scm_shap2ra.
2395 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2396 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2397 (scm_ra_set_contp): Deprecated, changed all uses to
2398 scm_i_ra_set_contp.
2399 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2400
66d33784
MV
24012005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2402
b06f099d
MV
2403 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2404 Trotts!
2405
5d35ad81
MV
2406 * unif.c (scm_list_to_typed_array): Allow the specification of the
2407 upper bound as well. This is needed for empty arrays.
2408 (l2ra): Give needed number of elements in error message.
2409 (scm_i_print_array): Print length information for arrays that need
2410 it.
2411 (scm_i_read_array): Parse it.
2412
66d33784
MV
2413 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2414 scm_i_object_chars, scm_i_object_length): Brought back from the
2415 dead.
2416
d7d7d401
MV
24172005-01-10 Marius Vollmer <mvo@zagadka.de>
2418
74c58fce
MV
2419 * ramap.c: Replaced single-index uses of scm_array_set_x with
2420 scm_c_generalized_vector_set_x.
2421
d7d7d401
MV
2422 * unif.c (scm_array_rank, scm_array_dimensions,
2423 scm_shared_array_offset, scm_shared_array_increments,
2424 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2425 to simplify code and make it more general.
2426 (scm_shared_array_root): Work with all kinds of arrays, including
2427 naked vectors.
2428 (indices_to_pos): New.
74c58fce
MV
2429 (scm_make_shared_array): Use it instead of scm_aind; use handle
2430 for oldra.
2431
4475d3fe
KR
24322005-01-10 Kevin Ryde <user42@zip.com.au>
2433
2434 * posix.c (scm_mkstemp): Update docstring from manual.
2435
d3ddc95e
KR
2436 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2437
8c8491f5
MV
24382005-01-09 Marius Vollmer <mvo@zagadka.de>
2439
b89ecc6f
MV
2440 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2441 scm_i_uniform_vector_set_proc): New.
2442 (u8ref, u8set, s8ref, s8set, etc): New.
2443 (uvec_reffers, uvec_setters): New.
2444 (uvec_to_list): Use generic scm_array_handle_ref instead of
2445 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2446 (coerce_to_uvec, scm_c_uniform_vector_ref,
2447 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2448
2449 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2450 New.
2451 (scm_t_array_handle): Added ref, set, elements and
2452 writable_elements for fast inline operation of
2453 scm_array_handle_ref and scm_array_handle_set.
2454 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2455 and replaced with inline code that simply calls the ref/set
2456 members of the handle.
2457 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2458 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2459 New.
2460 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2461 and memoize_set.
2462 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2463 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2464 scm_bit_invert_x): Correctly multiply index with increment in the
2465 general case.
2466
8c8491f5
MV
2467 * unif.c (scm_array_handle_set): Correctly execute only one
2468 alternative. D'Oh!
2469 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2470 the array; this covers all cases with much simpler code.
2471
2472 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2473 as well.
2474
cd5d55c7
MV
24752005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2476
2477 * srfi-4.c (uvec_type): New.
2478 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2479 scm_c_uniform_vector_x): Use it to get concrete type.
2480
2481 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2482 fit the docs.
2483
2484 * unif.c (ra2l): Handle zero rank arrays.
2485 (scm_i_print_array): Print zero rank arrays specially.
2486 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2487 (scm_i_read_array): Allow zero rank arrays.
2488
a4aad74e
MV
24892005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2490
2491 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2492 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2493 and SCM_SET_HASHTAB_BUCKET.
2494
2495 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2496 Removed ref_stack field.
2497 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2498 of a print state. Use them everywhere instead of ref_stack.
2499
3a40d5e1
MV
2500 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2501
a4aad74e
MV
2502 * srfi-4.c: Include deprecation.h.
2503
2504 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2505 deprecated.c, eq.c
2506 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2507 (scm_vector_elements, scm_vector_writable_elements,
2508 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2509 unif.[hc].
2510 (SCM_SIMPLE_VECTOR_LOC): Removed.
2511 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2512 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2513 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2514 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2515 latter. Changed use in eq.c.
2516
f01fe441
MV
25172005-01-07 Marius Vollmer <mvo@zagadka.de>
2518
2519 Make the uniform vector routines also deal with one dimensional
2520 arrays.
2521
2522 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2523 SCM_SMOB_PREDICATE in this file.
2524 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2525 of the right type.
2526 (scm_is_uniform_vector): Likewise.
2527 (uvec_fast_ref): Made BASE param const.
2528 (uvec_writable_elements, uvec_elements): New.
2529 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2530 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2531 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2532 arrays.
2533 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2534 argument convention.
2535 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2536 checking.
2537 (scm_uniform_vector_length): Use uvec_length.
2538
2aaf5726
MV
25392005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2540
2541 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2542 scm_c_uniform_vector_size): Removed.
2543 (scm_array_handle_uniform_element_size): New.
2544
2545
2546 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2547 type of POS parameter to be signed, positions can be negative.
2548 (scm_array_handle_release): New, changed all uses of
2549 scm_t_array_handle to properly call it.
2550 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2551 Renamed former to latter, changed all uses.
2552
34ae52fc
MV
25532005-01-05 Marius Vollmer <mvo@zagadka.de>
2554
2555 Updated bitvector routines to also use scm_t_array_handles.
2556
2557 * unif.h (scm_bitvector_elements,
2558 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2559 deliver offset, length and increment to caller. Changed all uses.
2560 (scm_bitvector_release_elements,
2561 scm_frame_bitvector_release_elements,
2562 scm_bitvector_release_writable_elements,
2563 scm_frame_bitvector_release_writable_elements): Removed.
2564 (scm_array_handle_bit_elements,
2565 scm_array_handle_bit_writable_elements,
2566 scm_array_handle_bit_elements_offset): New.
2567 (scm_make_typed_array): The special value for non-initialized
2568 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2569 was a valid value to fill bitvectors with, so it can't really be
2570 specialed out.
2571
c4cb7628
KR
25722005-01-04 Kevin Ryde <user42@zip.com.au>
2573
2574 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2575 Reported by Bill Schottstaedt.
2576
0356881d
MV
25772005-01-02 Marius Vollmer <mvo@zagadka.de>
2578
2579 * sort.c (quicksort): Added INC parameter for non-contigous
2580 vectors.
2581 (quicksort1): New, for contigous vectors. Both functions are
2582 generated from the same code by including "quicksort.i.c".
2583 (scm_restricted_vector_sort_x): Call one of quicksort and
2584 quicksort1, depending on increment of vector.
2585 (scm_sort): Simply call scm_sort_x on a copy of the list or
2586 vector.
2587 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2588 size_t, added inc parameter.
2589 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2590 so that it doesn't leak.
2591 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2592 list or vector.
2593
2594 * ramap.c (scm_array_map_x): Do not try to convert fill value
2595 before filling, any necessary conversion is done while storing.
2596
2597 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2598 doing it inline.
2599
2600 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2601 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2602 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2603
2604 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2605 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2606 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2607 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2608 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2609 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2610 vector elements API or simple vector API, as appropriate. Removed
2611 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2612 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2613
2614 * srfi-4.h, srfi-4.c,
2615 srfi-4.i.c (scm_array_handle_uniform_elements,
2616 scm_array_handle_uniform_writable_elements,
2617 scm_uniform_vector_elements,
2618 scm_uniform_vector_writable_elements):
2619 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2620 scm_t_array_handle, deliver length and increment.
2621 (scm_array_handle_<foo>_elements,
2622 scm_array_handle_<foo>_writable_elements): New.
2623
2624 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2625 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2626
2627 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2628 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2629 scm_array_handle_set, scm_array_handle_elements
2630 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2631 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2632 scm_dimensions_to_uniform_array): Deprecated for real.
2633 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2634 snarfing wont allow a mismatch between C and Scheme arglists.
2635 (scm_make_shared_array, scm_enclose_array): Correctly use
2636 scm_c_generalized_vector_length instead of
2637 scm_uniform_vector_length.
2638
2639 * validate.h (SCM_VALIDATE_VECTOR,
2640 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2641 of SCM_VECTORP.
2642
2643 * weaks.h, weaks.c: Use new internal weak vector API from
2644 vectors.h.
2645
2646 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2647 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2648 'extra' to being regular sources.
2649 (noinst_HEADERS): Added quicksort.i.c.
2650 * quicksort.i.c: New file.
2651
2652 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2653 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2654 and reimplemented. Replaced all uses with scm_vector_elements,
2655 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2656 appropriate.
2657 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2658 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2659 SCM_SIMPLE_VECTOR_LOC): New.
2660 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2661 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2662 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2663 Removed.
2664 (scm_vector_copy): New.
2665 (scm_vector_elements, scm_vector_writable_elements): Use
2666 scm_t_array_handle, deliver length and increment. Moved to
2667 unif.h. Changed all uses.
2668 (scm_vector_release_elements,
2669 scm_vector_release_writable_elements,
2670 (scm_frame_vector_release_elements,
2671 scm_frame_vector_release_writable_elements): Removed.
2672 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2673 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2674 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2675 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2676 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2677 weak vectors.
2678
0336d18b
MV
26792004-12-29 Marius Vollmer <mvo@zagadka.de>
2680
2681 No longer use creators to specify the type of an array. Creators
2682 expose the fact that arrays are wrapped around vectors, but that
2683 might change.
2684
2685 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2686 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2687 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2688 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2689 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2690 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2691 uvec_proc_vars): Removed.
2692 (scm_i_generalized_vector_creator): Removed.
2693 (scm_i_generalized_vector_type): New.
2694
2695 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2696 scm_make_typed_array, scm_array_type, scm_list_to_array,
2697 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2698 (scm_array_creator): Removed.
2699 (scm_array_p): Deprecated second PROT argument.
2700 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2701 Deprecated, reimplemented in terms of scm_make_typed_array and
2702 scm_list_to_typed_array.
2703 (scm_i_proc_make_vector, scm_i_proc_make_string,
2704 scm_i_proc_make_bitvector): Removed.
2705 (type_creator_table, init_type_creator_table, type_to_creator,
2706 make_typed_vector): New.
2707 (scm_i_convert_old_prototype): Removed.
2708 (prototype_to_type): New.
2709 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2710 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2711 minor added clarity.
2712 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2713 instead of scm_make_uve.
2714 (tag_creator_table, scm_i_tag_to_creator): Removed.
2715 (tag_to_type): New.
2716 (scm_i_read_array): Use scm_list_to_typed_array instead of
2717 scm_list_to_uniform_array.
2718
277e8472
MV
27192004-12-27 Marius Vollmer <mvo@zagadka.de>
2720
32b26202
MV
2721 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2722 (scm_bitvector_writable_elements): New.
2723 (scm_bitvector_release, scm_bitvector_release_elements):
2724 Renamed former to latter. Added explicit call to
2725 scm_remember_upto_here_1.
2726 (scm_frame_bitvector_release,
2727 scm_frame_bitvector_release_elements): Renamed former to latter.
2728 (scm_bitvector_release_writable_elements,
2729 scm_bitvector_release_writable_elements): New.
2730 Changed all uses as required by the changes above.
2731
2732 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2733 scm_u8vector_elements, etc): Made return value "const".
2734 (scm_uniform_vector_writable_elements,
2735 scm_u8vector_writable_elements, etc): New.
2736 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2737 Renamed former to latter. Added explicit call to
2738 scm_remember_upto_here_1.
2739 (scm_frame_uniform_vector_release,
2740 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2741 (scm_uniform_vector_release_writable_elements,
2742 scm_frame_uniform_vector_release_writable_elements): New. Takes
2743 crown of longest identifier yet.
2744 Changed all uses as required by the changes above.
2745
277e8472
MV
2746 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2747 void.
2748 (scm_is_vector, scm_vector_p, scm_vector_length,
2749 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2750 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2751 scm_vector_move_left_x, scm_vector_move_right_x,
2752 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2753 (scm_vector_elements, scm_vector_release_elements,
2754 scm_vector_frame_release_elements, scm_vector_writable_elements,
2755 scm_vector_release_writable_elements,
2756 scm_vector_frame_release_writable_elements): New.
2757 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2758 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2759
2760 * ramap.c (scm_ramapc, scm_raeql): Use
2761 scm_c_generalized_vector_length instead of
2762 scm_uniform_vector_length.
2763 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2764 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2765
49c51610
MV
27662004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2767
2768 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2769 member for relocating debug frames.
2770 (scm_make_continuation): Set it.
2771
2772 * stacks.c (read_frame, read_frames, scm_make_stack,
2773 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2774 of continuations instead of calculating the offset ourselves.
2775 Relocate 'vect' member of scm_t_debug_frame.
2776
3b2ee265
KR
27772004-12-16 Kevin Ryde <user42@zip.com.au>
2778
2779 * ramap.c (scm_array_map_x): Check for at least one source argument.
2780
e120686a
KR
27812004-12-14 Kevin Ryde <user42@zip.com.au>
2782
2783 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2784 the C code so for the final call to the predicate procedure is a tail
2785 call, per SRFI-13 spec.
2786
680b5237
KR
27872004-12-10 Kevin Ryde <user42@zip.com.au>
2788
2789 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2790 recent revision to the reference manual.
2791
2792 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2793 with "%", C99 says it's well-defined.
2794
2795 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2796 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2797 bother trying to fit scm_from_ulong, not really worth the trouble if
2798 addresses are more than 4 bytes usually.
2799
446d320c
KR
28002004-11-30 Kevin Ryde <user42@zip.com.au>
2801
2802 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2803 arm32. Reported by Greg Troxel.
2804
f2654760
MV
28052004-11-14 mvo <mvo@zagadka.de>
2806
2807 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2808
2809 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2810
d550e35f
MV
28112004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2812
2813 Enclosed arrays are now their own smob. This has been done to
2814 make the code more explicit about them and to prepare for the time
f2654760
MV
2815 when generalized vectors include arbitrary one-dimensional
2816 arrays. (Uptonow, enclosed arrays have been recognized by their
2817 use of an array as their storage 'vector'. When all generalized
2818 vectors are allowed as storage, including one-dimensional arrays,
2819 this will no longer work.)
d550e35f
MV
2820
2821 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2822 New.
2823 (exactly_one_third, singp): Removed.
2824 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2825 scm_shared_array_offset, scm_shared_array_increments): Handle
2826 enclosed arrays explicitely.
2827 (scm_array_rank): Likewise. Also, do not return zero for
2828 non-arrays, signal an error instead since arrays with rank zero do
2829 exist.
2830 (scm_i_make_ra): New, for specifying the tag of the new array.
2831 (scm_make_enclosed_array): Use it.
2832 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2833 (scm_make_shared_array): Use scm_c_generalized_vector_length
2834 instead of scm_uniform_vector_length.
2835 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2836 (scm_i_cvref): New, doing the job of scm_cvref.
2837 (scm_cvref): Use scm_i_cvref.
2838 (scm_array_ref): Do not accept non-arrays when no indices are
2839 given. Use scm_i_cvref to do the actual access.
2840 ("uniform-array-set1"): Do not register.
2841 (scm_array_set_x, scm_uniform_array_read_x,
2842 scm_uniform_array_write): Handle enclosed arrays explicitly.
2843 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2844 handle enclosed arrays.
2845 (scm_array_to_list): Handle enclosed arrays explicitly.
2846 (rapr1): Removed.
2847 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2848 enclosed arrays.
2849 (scm_i_print_enclosed_array): New.
2850 (tag_proto_table, tag_creator_table): Renamed former to latter.
2851 Added "a" and "b" for strings and bitvectors, resp.
2852 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2853 latter. Tag "a" is in the table now, no need to handle it as a
2854 legacy tag.
2855 (scm_raprin1): Just call scm_iprin1.
2856 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2857 explicitly.
2858 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2859 Use scm_i_print_array as printer for scm_tc16_array.
2860
2ed34885
MV
28612004-11-10 Marius Vollmer <mvo@zagadka.de>
2862
823086c1
MV
2863 * ramap.c (cind): Changed second arg to be pointer to long instead
2864 of uniform vector.
2865 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 2866 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
2867 (scm_array_index_map_x): Likewise.
2868
2869 * unif.c: Changed all uses of scm_array_prototype to
2870 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2871 prototype is known.
2872 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2873 in terms of scm_uniform_vector_read_x and
2874 scm_uniform_vector_write, respectively. Strings and
2875 bitvector support has been dropped.
2876
2ed34885
MV
2877 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2878 needed files directly. Include config.h, <unistd.h> and <io.h>
2879 when available.
2880 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2881
2c72f253
MV
28822004-11-09 Marius Vollmer <mvo@zagadka.de>
2883
2884 * gh_data.c (gh_uniform_vector_length): Properly use
2885 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2886
3cc0a296
MV
28872004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2888
2889 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2890 New.
2891 (scm_i_uniform_vector_creator): Removed.
2892 (scm_i_generalized_vector_creator): New.
2893 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2894 handle generalized vectors, only uniform numeric vectors.
2895 (alloc_uvec): Do length check here...
2896 (make_uvec): ...but not here.
2897 (coerce_to_uvec): Use new generalized vector functions to handle
2898 all kinds of vectors in one go.
2899
2900 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2901 remaining scm_tc7_unused tags to get a neatly ordered list.
2902
2903 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2904 longer handle scm_tc7_bvect bitvectors.
2905
2906 * ramap.c: Use the new generalized vector functions to handle all
2907 vector like things.
2908
2909 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2910 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2911 scm_generalized_vector_length, scm_generalized_vector_ref,
2912 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2913 scm_is_generalized_vector, scm_c_generalized_vector_length,
2914 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2915 New.
2916
2917 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2918 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2919 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2920 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2921 scm_c_bitvector_length, scm_c_bitvector_ref,
2922 scm_c_bitvector_set_x, scm_bitvector_elements,
2923 scm_bitvector_release, scm_frame_bitvector_release,
2924 scm_tc16_bitvector, bitvector_free, bitvector_print,
2925 bitvector_equalp, count_ones, find_first_one): New.
2926 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2927 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2928 using the new C API for bitvectors and maybe count_ones or
2929 find_first_one, as appropriate.
2930 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2931 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2932 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2933 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2934 new functions from above.
2935 (scm_i_proc_make_vector, scm_i_proc_make_string,
2936 scm_i_proc_make_bitvector): Made non-static for use in
2937 scm_i_generalized_vector_creator.
2938 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2939 (scm_make_uve): Validate that the created object is a generalized
2940 vector.
2941 (scm_i_legacy_tag): Removed.
2942 (scm_i_print_array): Do it here.
2943 (scm_raprin1): Only print enclosed arrays.
2944
2945 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2946
c24d026b
MV
29472004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2948
1f2328fe
MV
2949 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2950 added portability.
2951
2952 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2953 for "space". Thanks to Bruce Korb!
2954
c24d026b
MV
2955 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2956 only after dest has been set. Thanks to Hyper Division!
2957
2958 * gh_data.c (gh_uniform_vector_length): Use
2959 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2960
d4ea47c8
MV
29612004-11-03 Marius Vollmer <mvo@zagadka.de>
2962
2963 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2964 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2965 SCM_SET_UVECTOR_LENGTH): Removed.
2966
236288e2
MV
29672004-11-02 Marius Vollmer <mvo@zagadka.de>
2968
9a5fa6e9 2969 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
2970 Thanks!
2971
2972 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2973 first and the second line of the SCM_DEFINE macro call, since old
2974 preprocessors cannot handle definitions that are split into two
2975 lines.
2976
2977 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2978 declarations.
2979
2980 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2981 scm_t_uint32 to fix the mismatch between the function declaration
2982 and definition.
2983
2984 * sort.c (quicksort): Don't use C99 variable declarations.
2985
2986 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2987 SCM_BOOL_F if no type matches.
2988
2989 * threads.c (thread_print): Cast a pointer to size_t when printing
2990 with scm_uintprint.
2991
2992 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2993 defined.
2994 (scm_array_prototype): Deprecated.
2995
f738b51d
MV
29962004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2997
5d1015ec
MV
2998 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2999 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
3000 more efficient access to the u32vector.
3001
034486df
MV
3002 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
3003 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
3004 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
3005
3006 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
3007 instead of the old-style dvectors.
3008
3009 * gh_data.c: Use new-style uniform arrays in place of old-style
3010 ones.
3011
3012 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3013 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3014
3015 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3016 instead of old-sytle uvectors.
3017
3018 * convert.c, convert.i.c: Rewritten completely, using
3019 scm_any_to_u8vector, etc and other new-style uniform vector
3020 functions.
3021
3022 * random.c (scm_random_solid_sphere_x,
3023 scm_random_hollow_sphere_x): Do not validate vector argument, this
3024 is already done elsewhere.
3025
3026 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3027 scm_any_to_u8vector, etc): New.
3028 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3029 longer handle old-style uniform vectors.
3030
f738b51d
MV
3031 * read.c (scm_lreadr): Bugfix: include the last bit in the
3032 bit vector.
3033
5e9c05a1
MV
30342004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3035
327114a2
MV
3036 * unif.h, unif.c (scm_array_creator): New.
3037 (scm_i_get_old_prototype): New.
3038 (scm_array_prototype): use it to return old-style prototype, never
3039 return creators.
3040 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3041 arg of SCM_UNDEFINED. The latter is wrong.
3042
5e9c05a1
MV
3043 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3044 (make_uve): Removed.
3045 (scm_i_proc_make_vector, scm_i_proc_make_string,
3046 scm_i_proc_make_u1vector): New.
3047 (scm_init_unif): Initialize them.
3048 (scm_i_convert_old_prototype): New.
3049 (scm_make_uve): Use it to get the creator procedure. Removed all
3050 old code that created old-style uniform vectors.
3051 (scm_array_p): Handle generic vectors.
3052 (scm_dimensions_to_uniform_array): Do not fill new array with
3053 prototype when that is a procedure.
3054 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3055 the NDIM argument.
3056 (scm_i_print_array): Print rank for shared or non-zero-origin
3057 vectors.
3058 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3059 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3060 which I do not understand yet.
3061 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3062
5e9c05a1
MV
3063 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3064 (iflo2str): Use icmplx2str for complex numbers.
3065
3066 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3067 scm_i_uniform_vector_prototype): Removed.
3068 (scm_i_uniform_vector_creator): New.
3069 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3070 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3071 Updated all tables and generic functions to support them.
3072 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3073 (scm_init_srfi_4): Initialize them.
3074
3075 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3076 sizeof(CTYPE) as explained in the comment.
3077
3078 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3079 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3080 'i' and 'e' between introducing numbers and uniform vectors. Do
3081 not call scm_i_read_homogenous_vector, since that is also handled
3082 by scm_i_read_array now.
3083
f984af07
MV
30842004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3085
3086 First cut at integrating uniform vectors from srfi-4 with the rest
3087 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3088 vector. The plan is to gradually replace one type after the other
3089 until none is left and then to consider general cleanups and
3090 optimizations.
3091
3092 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3093
3094 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3095 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3096 scm_uniform_vector_to_list, scm_is_uniform_vector,
3097 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3098 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3099 scm_uniform_vector_release): New.
3100 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3101 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3102 from unif.h, unif.c and extended to handle both the old and new
3103 uniform vectors.
3104
3105 * tags.h (scm_tc7_byvect): Commented out.
3106
3107 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3108 the former to the latter.
3109 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3110 srfi-4.h, srfi-4.c.
3111 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3112 (scm_array_p, scm_array_rank, scm_array_dimensions,
3113 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3114 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3115 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3116 vectors. Removed code for scm_tc7_byvect.
3117 (scm_dimensions_to_uniform_array): Fill array with 0 when
3118 prototype is #\nul.
3119 (scm_i_print_array_dimension, scm_i_legacy_tag,
3120 scm_i_print_array): New.
3121 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3122 for scm_tc7_byvect.
3123
3124 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3125 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3126 uniform vectors. Removed code for scm_tc7_byvect
3127
3128 * print.c (iprin1): Removed code for scm_tc7_byvect.
3129 * objects.c (scm_class_of): Likewise.
3130 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3131 * gc-card.c (scm_i_sweep_card): Likewise.
3132 * evalext.c (scm_self_evaluating_p): Likewise.
3133 * eq.c (scm_equal_p): Likewise.
3134
3135 * gh_data.c (gh_chars2byvect): Reimplemented with
3136 scm_make_s8vector.
3137 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3138
3139 * srfi-4.c (take_uvec): New.
3140 (alloc_uvec): Use it.
3141 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3142
3143 * random.c (vector_scale, vector_scale_x): Renamed former to the
3144 latter, since it modifies its argument.
3145 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3146 Do not use scm_universal_vector_length for non-uniform vectors.
3147 Use scm_f64vector_elements to access innards of uniform vectors.
3148
3149 * convert.i.c: Convert srfi-4 style uniform vectors when
3150 requested.
3151 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3152 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3153
79d52182
MV
31542004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3155
3156 * numbers.h, numbers.c (scm_i_print_double): New.
3157
3158 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3159 ../srfi/ but heavily modified.
3160 * Makefile.am: Add them in all the right places.
3161 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3162 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3163 '#u', and '#s'.
3164
3165 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3166 and made non-static. Changed all uses.
3167
6191ccec
MV
31682004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3169
e64e80b0
MV
3170 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3171 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3172 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3173 scm_uintprint to print unsigned integers, raw heap words, and
3174 adresses, using a cast to scm_t_bits to turn pointers into
3175 integers.
3176
3177 * unif.c: Include "libguile/print.h".
3178
c90ac3a8
MV
3179 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3180 scm_t_intmax values.
3181 (scm_uint2str): New, for scm_t_uintmax.
3182 (scm_iint2str): Argument type changed to scm_t_intmax,
3183 reimplemented in terms of scm_uint2str.
3184
3185 * print.c, print.h (scm_uintprint): New, for printing
3186 scm_t_uintmax values.
3187 (scm_intprint): Argument type changed to scm_t_intmax.
3188
77c2594f
MV
3189 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3190 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3191 strategic places so that the loops can be interrupted.
3192
6191ccec
MV
3193 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3194 "-I$(top_srcdir)/libguile-ltdl".
3195 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3196 "../libguile-ltdl/libguile-ltdl.a".
3197
3198 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3199 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3200 instead of <libguile-ltdl.h>.
3201
77600f3e
MV
32022004-10-20 Marius Vollmer <mvo@zagadka.de>
3203
3204 * sort.c (quicksort): Copy pivot out of the array while
3205 constructing the partitions; it could get overwritten otherwise.
3206 Because of the ultimate insertion sort, this bug did not cause
3207 quicksort to fail, it just put all the burdon on the insertion
3208 sort and was thus very slow. Thanks to Rolan Orre for reporting
3209 the slowness!
3210
5000379b
MV
32112004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3212
192cd792
MV
3213 * numbers.c (scm_i_range_error): New.
3214 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3215 scm_out_of_range.
3216
3217 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3218 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3219
3220 * unif.c (scm_array_p): When no prototype is given, explicitely
3221 test for allowable types, do not simply return true. Thanks to
3222 Roland Orre for reporting this!
3223
5000379b
MV
3224 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3225
3226 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3227 segment to scm_max_segment_size.
3228
497eb0b7
HWN
32292004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3230
1367aa5e
HWN
3231 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3232
497eb0b7
HWN
3233 * inline.h (scm_double_cell): abort if GC running.
3234 (scm_cell): idem.
3235
aef0bdb4
MV
32362004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3237
3238 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3239 pos == 0.
3240
3241 Keywords no longer store a 'dash symbol'. Instead, they store a
3242 symbol with their real name.
3243
3244 * keywords.h, keywords.c, deprecated.h, deprecated.c
3245 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3246 terms of scm_is_keyword and scm_keyword_dash_symbol.
3247
3248 * keywords.h, keywords.c, discouraged.h, discouraged.c
3249 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3250 scm_c_make_keyword): Discouraged.
3251
3252 * keywords.h, keywords.c (scm_symbol_to_keyword,
3253 scm_keyword_to_symbol): Implemented in C.
3254 (scm_is_keyword, scm_from_locale_keyword,
3255 scm_from_locale_keywordn): New.
3256
3257 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3258
3259 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3260 scm_from_locale_keyword instead of scm_c_make_keyword.
3261
3262 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3263 better error message.
3264
3265 * deprecated.c: Include discouraged.h and keywords.h.
3266
3267 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3268 reading '#:' or ':'. See NEWS for consequences.
3269
818deb11
MV
32702004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3271
43c25626
MV
3272 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3273 literals are now read-write again (until SCM_STRING_CHARS is
3274 removed).
3275
3276 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3277 strings with an error message that blames SCM_STRING_CHARS.
3278
3279 * options.c (change_option_setting): Use scm_car instead of
3280 explicit type check plus SCM_CAR.
3281
3282 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3283 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3284 (scm_iprin1): Use them instead of the previoulsy hardcoded
3285 strings.
3286 (scm_init_print): Initialize them.
3287
3288 * backtrace.c (display_frame_expr): Do not remove control
3289 characters from the final string. Print it directly using
3290 scm_display.
3291
818deb11
MV
3292 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3293 Thanks to Roland Orre!
3294
d748089e
KR
32952004-09-29 Kevin Ryde <user42@zip.com.au>
3296
3297 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3298 be whole original string in match struct, not offsetted substring.
3299
0ff7e3ff
HWN
33002004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3301
3302 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3303
ad7de4b8
MV
33042004-09-24 Marius Vollmer <mvo@zagadka.de>
3305
2edf319f
MV
3306 * Makefile.am (EXTRA_DIST): Added gettext.h.
3307
d180337b
MV
3308 * smob.c, smob.h (scm_assert_smob_type): New.
3309
05d7cf89 3310 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3311 Include GUILE_CFLAGS.
3312 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3313 now.
3314 (libpath.h): Put GUILE_CFLAGS in the build-info.
3315
c9fedf8a
MV
33162004-09-23 Marius Vollmer <mvo@zagadka.de>
3317
3318 * print.h (scm_print_state): Added highlight_objects.
3319 * print.c (make_print_state, scm_free_print_state): Initialize it
3320 to SCM_EOL.
3321 (scm_iprin1): Wrap output in '{...}' when object is contained in
3322 highlight_objects.
3323
3324 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3325 scm_backtrace_with_highlights): New. Set highlight_objects of
3326 printstate.
3327
3328 * error.c (scm_error_scm): Document new meaning of data/rest
3329 argument for out-of-range and wrong-type-arg errors.
3330 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3331 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3332 exception so that it gets highlighted in the backtrace.
3333 Don't talk about "argument" when not giving a position.
3334
3335 * throw.c (handler_message): The rest argument is the fourth
3336 argument, not everything after the third. Call
3337 scm_display_backtrace_with_highlights, passing the rest argument
3338 when appropriate.
3339
d5ac9b2a
MV
33402004-09-22 Marius Vollmer <mvo@zagadka.de>
3341
3342 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3343 <bruno@clisp.org>:
3344
3345 * i18n.c: Handle --disable-nls (thanks Bruno).
3346
3347 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3348 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3349
3350 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3351 LC categories.
05d7cf89 3352 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3353
3354 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3355 scm_bind_textdomain_codeset): Make wrappers similar to C function
3356 they wrap.
3357
3358 * i18n.h: New file.
3359 * i18n.c: New file.
3360 * gettext.h: New file, taken from GNU gettext.
3361 * init.c: Include libguile/i18n.h.
3362 (scm_init_guile_1): Add call to scm_init_i18n().
3363 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3364 (DOT_X_FILES): Add i18n.x.
3365 (DOT_DOC_FILES): Add i18n.doc.
3366 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3367 (modinclude_HEADERS): Add i18n.h.
3368
d2e53ed6
MV
33692004-09-22 Marius Vollmer <mvo@zagadka.de>
3370
2cdfe016
MV
3371 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3372
d2e53ed6
MV
3373 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3374 discouraged.h. Replaced all uses with scm_is_pair.
3375 (SCM_I_CONSP): New name for SCM_CONSP.
3376
3377 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3378 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3379 scm_cadr, etc): New.
3380 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3381 uses with scm_is_null.
5dd82006 3382
d2e53ed6
MV
3383 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3384 instead of explicit code.
5dd82006 3385
5dfdf243
MV
33862004-09-22 Marius Vollmer <mvo@zagadka.de>
3387
b50c53e5
MV
3388 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3389 Reworded logic a bit so that #f is returned immediately when s1 is
3390 too short to contain s2.
3391
5dfdf243 3392 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3393 zero-terminated locale string before matching against it.
5dfdf243
MV
3394
3395 * strings.h, strings.c (scm_substring_read_only,
3396 scm_c_substring_read_only, scm_i_substring_read_only): New.
3397 (RO_STRING_TAG, IS_RO_STRING): New.
3398 (scm_i_string_writable_chars): Bail on read-only strings.
3399
3400 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3401 literals, thus making them read-only as specified by R5RS.
3402
22ab5ba3
MV
34032004-09-22 Marius Vollmer <mvo@zagadka.de>
3404
3405 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3406 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3407
2663421c
MV
34082004-09-21 Marius Vollmer <mvo@zagadka.de>
3409
0d83cb90
MV
3410 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3411 numbers.c.
3412 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3413 Thanks to Andreas Vögele!
0d83cb90 3414
2663421c
MV
3415 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3416 just on a line of its own.
3417
3418 * srfi-13.c (scm_string_any, scm_string_every,
3419 scm_string_tabulate, string_upcase_x, string_down_case_x,
3420 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3421 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3422 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3423 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3424 indices, which can also be negative.
3425
b00b73f9
MV
34262004-09-20 Marius Vollmer <mvo@zagadka.de>
3427
3428 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3429
3430 * threads.c (scm_threads_mark_stacks): Call
3431 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3432 only used once.
3433
adba74f3
HWN
34342004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3435
05d7cf89 3436 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3437 Bugfix: when subtracting unsigned values, make sure that result
3438 does not wrap.
3439
f6de32c8
KR
34402004-09-09 Kevin Ryde <user42@zip.com.au>
3441
3442 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3443 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3444 by Andreas Vögele.
f6de32c8 3445
e548be5f
MV
34462004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3447
eb8d0af1
MV
3448 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3449
e548be5f
MV
3450 * eq.c (real_eqv): Pretend that all NaNs are equal.
3451
3452 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3453
e7acba81
MV
34542004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3455
874fbad1
MV
3456 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3457 use size_t for some locals instead of int.
3458
e7acba81
MV
3459 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3460 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3461 (skip_scsh_block_comment): Use scm_input_error instead of
3462 scm_misc_error in case of EOF.
3463
5de12658
KR
34642004-09-07 Kevin Ryde <user42@zip.com.au>
3465
3466 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3467 Bug report by Bill Schottstaedt.
3468
3469 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3470 column.
3471 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3472
3473 * posix.c (scm_access): Update docstring per manual.
3474
3475 * posix.c (scm_nice): Correction to error detection. Reported by
3476 Matthias Koeppe.
3477
3478 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3479 throw error before unlocking mutex with SCM_ALLOW_INTS.
3480
e227addf
KR
34812004-09-06 Kevin Ryde <user42@zip.com.au>
3482
3483 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3484 available. This also gets around CLK_TCK being absent when
3485 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3486
edea856c
SJ
34872004-09-03 Stefan Jahn <stefan@lkcc.org>
3488
3489 * threads.c (scm_threads_mark_stacks): Fixed local variable
3490 definitions.
3491
e7acba81 3492 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3493 local variable definitions.
3494
3495 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3496 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3497 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3498 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3499 scm_makfrom0str().
3500
874fbad1 3501 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3502 part.
3503
3504 * numbers.c (scm_init_numbers): Removed check_sanity() call
3505 inside GUILE_DEBUG. The function has been removed somewhen...
3506
3507 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3508 MinGW32 because it conflicts with its pthread headers.
3509
d9eb2d67
MV
35102004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3511
3512 * strings.c (SCM_STRINGP): Accept all strings.
3513 (SCM_STRING_CHARS): Reject shared substrings here.
3514
3515 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3516 the Copyright years.
3517
c495c342
KR
35182004-08-27 Kevin Ryde <user42@zip.com.au>
3519
3520 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3521 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3522 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3523
57aa5515
MV
35242004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3525
3526 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3527 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3528 scm_i_symbol_is_interned, scm_i_mem2symbol,
3529 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3530
ce25760f
MV
35312004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3532
19ff6ffc
MV
3533 * srfi-13.c: First cut at thread-safeness and proper use of
3534 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3535 been inserted. Made sure that no internal string pointer is used
3536 across a SCM_TICK or a possible GC.
3537
ce25760f
MV
3538 * script.c (scm_compile_shell_switches): Use
3539 scm_from_locale_string instead of scm_makfrom0str.
3540
3541 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3542 always been.
3543
c5080b51
MV
35442004-08-25 Marius Vollmer <mvo@zagadka.de>
3545
3546 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3547 strop.c.
3548
3549 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3550 * strop.h, strop.c: Removed, they are now empty.
3551 * Makefile.am: Updated for new and removed files.
3552
3553 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3554 to scm_string_to_symbol.
3555
3556 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3557 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3558 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3559 charset instead of libc functions.
3560
3561 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3562 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3563 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3564 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3565 instead of explicit code.
3566
3567 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3568 "srfi-13.h" instead of "strop.h".
3569
3570 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3571 scm_init_srfi_14. Do not call scm_init_strop.
3572
4b0d27f2
MV
35732004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3574
3575 * numbers.c (scm_inf_p): Synced docstring back from manual.
3576
3ece39d6
MV
35772004-08-22 Marius Vollmer <mvo@zagadka.de>
3578
3579 * strings.c (get_str_buf_start): New helper function.
3580 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3581 scm_i_string_char, scm_i_string_writable_chars): Use it.
3582 (scm_i_substring_copy): Make START argument optional for C
3583 callers, for upcoming SRFI-13 integration.
3584
35852004-08-21 Marius Vollmer <mvo@zagadka.de>
3586
3587 From Richard Todd, Thanks!
3588
3589 * script.c (scm_compile_shell_switches): added '-L' switch to add
3590 to the %load-path.
3591
5fa0939c
DH
35922004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3593
3594 * eval.c (unmemoize_exprs): When dropping internal body markers
3595 from the output during unmemoization, also drop those that are not
3596 immediately at the beginning of a body.
3597
2146fdeb
MV
35982004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3599
c1f54b3d
MV
3600 * eval.c (scm_lookupcar1): Report "Variable used before given a
3601 value" insetad of an "Unbound" one for variables that are found
3602 but still contain SCM_UNDEFINED.
2146fdeb
MV
3603
3604 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3605 expects a null-terminated string in the locale encoding, but
3606 scm_i_string_writable_chars doesn't give that. Fixed by letting
3607 mkstemp modify a locale version of the tmpl argument and copying
3608 the result back into tmpl.
3609
3610 * strop.c (scm_substring_move_x): Store into str2, not str1.
3611
d4f76919
KR
36122004-08-20 Kevin Ryde <user42@zip.com.au>
3613
3614 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3615 to modify the input string.
3616
b5247a6b
MV
36172004-08-19 Marius Vollmer <mvo@zagadka.de>
3618
3619 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3620 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3621 scm_c_symbol_length.
3622
f26b9395
MV
36232004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3624
3625 New string implementation, with copy-on-write strings and
3626 mutation-sharing substrings, and a new internal string API.
3627 Symbols can now share memory with strings.
3628
3629 * tags.h (scm_tc7_stringbuf): New tag.
3630
3631 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3632 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3633 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3634 uses.
3635 (scm_i_make_string, scm_c_make_string): New, to replace
3636 scm_allocate_string. Updated all uses.
3637 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3638 SCM_STRING_LENGTH): Deprecated.
3639 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3640 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3641 Discouraged. Replaced all uses with scm_from_locale_string or
3642 similar, as appropriate.
3643 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3644 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3645 scm_substring_shared, scm_substring_copy): New.
3646
3647 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3648 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3649 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3650 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3651 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3652 Deprecated.
3653 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3654 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3655 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3656 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3657 Updated all uses.
3658 (scm_gensym): Generate only the number suffix in the buffer, just
3659 string-append the prefix.
3660
3661 * error.c (scm_memory_error): Do not try to throw, just abort.
3662 Throwing will not work anyway.
3663
3664 * gh.h, gh-data.c (gh_set_substr): Made src const.
3665
3666 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3667 (scm_mode_bits): Use it.
3668 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3669 a vector normally and fill that instead of consing a list with a
3670 blocked GC.
3671
3672 * read.c (scm_i_casei_streq): New, for counted strings.
3673
3674 * threads.c (gc_section_count): Removed, thread-sleeping can not
3675 be nested.
3676 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3677 admin mutex so that we can be put to sleep by other threads while
3678 blocking on that mutex. Lock all the heap mutex of all threads,
3679 including ourselves.
3680 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3681 call scm_i_enter_guile.
3682 (scm_thread_mark_stacks): Expect all threads to be suspended.
3683
3684 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3685 scm_gc_mallocated, for now.
3686 (scm_init_storage): Initialize it.
3687 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3688
3689 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3690 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3691 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3692 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3693
cd505b38
MV
3694 * strop.c (scm_string_copy): Use scm_c_substring to get a
3695 copy-on-write string.
3696
8a807b26
KR
36972004-08-18 Kevin Ryde <user42@zip.com.au>
3698
3699 * arbiters.c (FETCH_STORE): New macro.
3700 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3701 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3702 scm_try_arbiter and scm_release_arbiter.
3703 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3704 for speed on i386, otherwise using mutex.
3705
3706 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3707 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3708 exact and inexact is #f.)
3709
3710 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3711 to get thread safety of scm_ttyname.
3712
3713 * ports.c (ttyname): Remove prototype, unused.
3714
d6cd4c36 3715 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3716 Reported by Michael Tuexen.
d6cd4c36 3717
fa0c0a4b
MV
37182004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3719
3720 * load.c (scm_init_load_path): Do not pass NULL to
3721 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3722 not set. Thanks to Bill Schottstaedt.
3723
70f7ee41
MV
37242004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3725
3726 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3727 locale strings instead of accessing their internals.
3728 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3729 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3730 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3731
3732 * simpos.c (scm_system): Convert SCM strings to locale strings
3733 instead of accessing their internals.
3734
3735 * script.c (scm_compile_shell_switches): Convert version to locale
3736 string before printing it.
3737
3738 * rdelim.c (scm_read_delimited_x): Avoid
3739 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3740 of scm_from_long for the returned number of read characters.
3741
3742 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3743 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3744
3745 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3746 Use them instead of SCM_SYSCALL when one or two strings need to be
3747 converted into locale strings.
3748 (my_rename): New, gathers platform dependent code for renaming.
3749 (scm_rename): Use it.
3750 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3751 strings instead of accessing their internals.
3752 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3753 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3754 SCM_STRING_LENGTH.
3755
3756 * extensions.c (load_extension): Convert lib and init to locale
3757 strings instead of accessing the internals directly.
3758 (scm_c_load_extension): Use scm_from_locale_string instead of
3759 scm_makfrom0str.
3760
3761 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3762 scm_fdes_to_port, but take mode bits directly instead of as a C
3763 string.
3764 (scm_i_fdes_to_port): Implement using above.
3765 (scm_open_file): Use scm_i_fdes_to_port together with
3766 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3767 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3768 with scm_i_mode_bits to avoid accessing internals of SCM string
3769 from C.
3770
3771 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3772 SCM string as argument.
3773
3774 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3775 bits directly instead of C string.
3776 (scm_void_port): Implement using above.
3777 (scm_sys_make_void_port): Use scm_i_void_port together with
3778 scm_i_mode_bits to avoid accessing internals of SCM string.
3779
3780 * strings.h, strings.c (scm_i_get_substring_spec): New.
3781
3782 * socket.c, rw.c, deprecated.h, validate.h
3783 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3784 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3785 scm_to_locale_string, etc.
3786 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3787 above, plus scm_i_get_substring_spec.
3788
3789 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3790 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3791 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3792 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3793 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3794 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3795 with more explicit scm_remember_upto_here_1, etc, or introduced
3796 them in the first place.
3797
3798 * posix.c (WITH_STRING): New helper macro. Use it where one
3799 locale string is needed for a short piece of code.
3800 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3801 when one locale string is needed.
3802 (scm_mkstemp): Convert tmpl to a locale string.
3803 (scm_putenv): Rewritten to use only C strings.
3804 (scm_setlocale, scm_crpt): Convert argument strings to locale
3805 strings.
3806
38072004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3808
3809 * load.c (scm_primitive_load_path): Do not check for absolute
3810 filenames when scm_sys_search_load_path returns false, which will
3811 return absolute filenames unchanged.
3812
bb26cc2d
MV
38132004-08-11 Marius Vollmer <mvo@zagadka.de>
3814
3815 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3816 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3817 of an alist. Thanks to Matthias Koeppe!
3818
02573e4c
MV
38192004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3820
3821 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3822 Moved from string.h to deprecated.h.
3823
3824 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3825
f9751e86 3826 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
3827 SCM_I_MAKE_STRING_TAG, changed all uses.
3828 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3829 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3830 respectively. For a short time, the old names are still there as
3831 aliases. Not all uses have been changed yet, but the ones in
3832 strings.c have.
3833 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3834 SCM_T_BITS_MAX.
3835 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3836 scm_take_locale_string, scm_take_locale_stringn,
3837 scm_to_locale_string, scm_to_locale_stringn,
3838 scm_to_locale_stringbuf): New.
3839 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3840 deprecated.[hc]. Implemented in terms of the new functions above.
3841 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3842 scm_makfrom0str): Reimplemented in terms of the new functions from
3843 above. They will be discouraged shortly.
3844 (scm_substring): Do not use scm_mem2string.
3845 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3846 to replace similar code from posix.c, simpos.c, and dynl.c.
3847 (scm_string_append): Use memcpy instead of explicit loop. Do not
3848 use register keyword. Use plain 'char' instead of 'unsigned
3849 char'.
3850
3851 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3852 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3853
3854 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3855 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3856 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3857 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3858
3859 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3860 string. This avoids a conversion round-trip.
3861
3862 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3863 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3864 SCM_I_STRING_LENGTH, respectively.
3865 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3866
3867 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3868 of a string, call scm_display on the string itself.
3869
3870 * dynwind.c, dynwind.h (scm_frame_free): New.
3871
3872 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3873 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3874 Replaced uses of SCM_STRING_CHARS with proper uses of
3875 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3876 Replaced scm_mem2string with scm_from_locale_string.
3877
3878 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3879 Removed, replaced all uses with scm_i_allocate_string_pointers.
3880
3881 * load.h, load.c (scm_internal_parse_path): Removed.
3882 (scm_parse_path): Use scm_string_split to do the work.
3883 (scm_init_load_path): Use scm_parse_path instead of
3884 scm_internal_parse_path.
3885 (scm_search_path): Rewritten string handling part of the code in
3886 terms of scm_to_locale_stringbuf and so that it is thread safe.
3887
3888 * error.c (scm_error_scm): Throw directly instead of calling
3889 scm_error, this avoids the back and forth conversion of SUBR and
3890 MESSAGE and also plugs a memory leak.
3891 (scm_error): Call scm_error_scm.
3892
3893 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3894 (display_header): Print FNAME when it is true, not
3895 merely when it is a string.
3896
3897 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3898 unceremoniously. They were unused by Guile itself, and external
3899 use should stop immediately.
3900
3901
409eb4e5
MV
39022004-08-10 Marius Vollmer <mvo@zagadka.de>
3903
3904 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3905 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3906 deprecated versions installed in deprecated.h and deprecated.c.
3907 Changed all uses.
3908
a00eaf19
RB
39092004-08-06 Rob Browning <rlb@defaultvalue.org>
3910
3911 * net_db.c (scm_resolv_error): don't cause an exception while
3912 trying to throw an exception -- call scm_misc_error with correct
3913 arguments. The previous arguments needed a format escape that
3914 wasn't in any of the format strings.
3915
bcb88c93
KR
39162004-08-06 Kevin Ryde <user42@zip.com.au>
3917
8f094b97
KR
3918 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3919 so as not to depend on signedness of plain char. For byvect range
3920 check, throw out-of-range rather than wrong-type-arg.
3921
bcb88c93
KR
3922 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3923 signed byte range checks by using scm_to_schar and scm_from_schar,
3924 don't want to depend on signedness of C char.
3925
29e61124
KR
39262004-08-05 Kevin Ryde <user42@zip.com.au>
3927
3928 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3929 SCM_DEFER_INTS.
3930 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3931 guaranteed if multiple threads compete to unlock.
3932 Update docstrings per doc/ref/api-scheduling.texi.
3933
99de794f
KR
3934 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3935 stat on the filename, to be certain a file rename can't mean we get
3936 info on one filesystem object but open another. This fstat usage is
3937 similar to Emacs copy-file.
3938
29e61124
KR
3939 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3940
3941 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3942 SIGINT and SIGQUIT, since those values are ints.
3943
759aa8f9
MV
39442004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3945
7241f213
MV
3946 * num2integral.i.c, num2float.i.c: Removed.
3947 * Makefile.am (noinst_HEADERS): Updated.
3948
f9656a9f
MV
3949 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3950 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
3951 (scm_complex_p): New, export as "complex?" to Scheme.
3952 (scm_number_p): Export as "number?" to Scheme.
3953 (scm_is_complex, scm_is_number): New.
3954 (scm_c_make_rectangular, scm_c_make_polar): New.
3955 (scm_make_rectangular, scm_make_polar): Use above.
3956 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3957 New.
3958 (scm_make_complex): Discouraged by moving to discouraged.h and
3959 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3960
759aa8f9
MV
3961 * discouraged.h, discouraged.c, numbers.c, numbers.h
3962 (scm_is_rational): New.
3963 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3964 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3965 Removed prototypes.
3966 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3967 Discouraged by moving to discouraged.h and discouraged.c.
3968 Replaced all uses with scm_from_double.
3969 (scm_num2float, scm_num2double): Discouraged by moving prototype
3970 to discouraged.h and rewriting in terms of scm_to_double.
3971 Replaced all uses with scm_to_double.
3972 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3973 explicit code.
3974 (scm_from_double): Do not implement in terms of scm_make_real, use
3975 explicit code.
3976
531bf3e6
MV
39772004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3978
759aa8f9
MV
3979 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3980
531bf3e6
MV
3981 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3982 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3983
3984 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3985 Renamed to SCM_I_* in order to avoid collisions with the versions
3986 defined in deprecated.h.
3987
3988 * discouraged.h, discouraged.c: New files.
3989
3990 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3991 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3992 deprecated to being discouraged by moving to discouraged.h.
3993
3994 * numbers.h, numbers.c, discouraged.h, discouraged.c
3995 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3996 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3997 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3998 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3999 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
4000 scm_num2ulong_long): Discouraged by moving to discouraged.h and
4001 discouraged.c and reimplementing in terms of scm_from_* and
4002 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
4003 functions.
4004
4005 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
4006 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
4007 scm_i_size2big, scm_i_ptrdiff2big): Removed.
4008 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
4009 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4010 explicit code.
4011
5ec82e96
KR
40122004-08-02 Kevin Ryde <user42@zip.com.au>
4013
4014 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4015 and current usage and migration.
4016
58f28989
KR
40172004-07-31 Kevin Ryde <user42@zip.com.au>
4018
4019 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4020 it's not thread safe.
4021 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4022 advantage of this.
4023 * fports.c (scm_open_file): Use scm_strerror likewise.
4024 * filesys.c (scm_stat, scm_lstat): Ditto.
4025
4026 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4027 cannot be opened.
4028
4029 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4030 update, for thread safety.
4031 (gensym_counter): Move into scm_gensym which is its only user.
4032 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4033
03696aab
MV
40342004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4035
51fdb325
MV
4036 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4037 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4038 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4039 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4040 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4041 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4042 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4043 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4044 defined in terms of scm_to_signed_integer, etc, but in terms of
4045 scm_to_int8, etc.
4046
4047 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4048
03696aab
MV
4049 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4050 no longer used.
4051
4052 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4053 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4054
4055 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4056 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4057 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4058 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4059 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4060 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4061 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4062
4063 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4064 the functions below.
4065
4066 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4067 conv-uinteger.i.c.
4068
4069 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4070 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4071 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4072 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4073 scm_from_uint64): Turned from macros into proper functions.
4074 (scm_to_signed_integer, scm_to_unsigned_integer,
4075 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4076 conv-integer.i.c and conv-uinteger.i.c, as well.
4077
4078 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4079 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4080 the limits. Those are always defined.
4081
1f15779e
KR
40822004-07-29 Kevin Ryde <user42@zip.com.au>
4083
4084 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4085
48360eb3
KR
40862004-07-28 Kevin Ryde <user42@zip.com.au>
4087
4088 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4089 safety.
4090
c3f3c841
KR
4091 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4092 consistency with other vector types and to get arg and func name into
4093 error message.
4094
c82f8ed6
MV
40952004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4096
4097 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4098 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4099 scm_from_bool, respectively.
4100 (SCM_NINUMP): Added.
4101
4102 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4103 deprecated.h. Replaced all uses with scm_is_eq.
4104
317b4c4a
KR
41052004-07-24 Kevin Ryde <user42@zip.com.au>
4106
4107 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4108 * posix.c (scm_crypt): Use it to protect static data in crypt().
4109
e11e83f3
MV
41102004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4111
4112 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4113 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4114 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4115 versions to deprecated.h and deprecated.c. Changed all uses to
4116 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4117 scm_from_*, as appropriate.
4118
4119 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4120 the unexisting scm_cross_dynwind_binding_scope for inums on the
4121 windlist.
4122
a55c2b68
MV
41232004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4124
4125 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4126 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4127 byte-wise address to a SCM integer. Changed all uses.
4128 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4129 scm_to_ipv6 and added type and range checking, for converting from
4130 an IPv& byte-wise address to a SCM integer. Changed all uses.
4131 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4132 is now done by scm_to_ipv6.
4133
4134 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4135 not accept inexact integers.
4136
4137 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4138 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4139 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4140 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4141 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4142 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4143 fixnum/bignum distinction visible. Changed all uses to
4144 scm_to_size_t or similar.
4145
41462004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4147
4148 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4149
48a06bd5
KR
41502004-07-10 Kevin Ryde <user42@zip.com.au>
4151
4152 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4153 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4154 such a size causes divide-by-zeros in scm_hasher.
4155
052fbfd9
KR
4156 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4157 leak.
4158
43240c9c
MV
41592004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4160
4161 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4162 Rewritten using the same logic as scm_to_signed_integer and
4163 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4164 use CHAR_BIT instead of hardcoding 8.
4165 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4166 SCM_I_LLONG_MIN etc. instead.
4167
4168 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4169 SCM_I_MAKINUM and changed all uses.
4170 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4171
a3de8e7b
MV
4172 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4173 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4174 them by assuming twos-complement.
4175
c9eb03bb
MV
41762004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4177
4178 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4179 configure now produces.
4180 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4181 definitions, giving the limits of the integer types defined by
4182 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4183 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4184
4185 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4186 SHORT_MIN.
4187 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4188 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4189 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4190 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4191 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4192 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4193 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4194 scm_from_uintmax): New.
4195
7888309b
MV
41962004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4197
4198 * tags.h (scm_is_eq): New.
4199
4200 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4201 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4202 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4203 scm_from_bool, and scm_is_bool, respectively.
4204
4205 * boolean.h (scm_is_bool): Fix bug in prototype.
4206 (scm_from_bool): The argument is "x" not "f", stupid.
4207
4208 * boolean.c (scm_is_bool): Fix typo.
4209
4210 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4211 scm_is_unsigned_integer, scm_to_signed_integer,
4212 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4213 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4214 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4215 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4216 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4217 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4218 New.
4219
800570a6
MV
42202004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4221
4222 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4223 scm_to_bool): New.
4224
9fcf3cbb
DH
42252004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4226
4227 * backtrace.c (display_expression, display_frame): Call
4228 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4229 single memoized expression.
4230
4231 * debug.c (memoized_print): Don't try to unmemoize the memoized
4232 object, since we can't know whether it holds a single expression
4233 or a body.
4234
4235 (scm_mem_to_proc): Removed check for lambda expression, since it
4236 was moot anyway. Whoever uses these functions for debugging
4237 purposes should know what they do: Creating invalid memoized code
4238 will cause crashes, independent of whether this check is present
4239 or not.
4240
4241 (scm_proc_to_mem): Take the closure's code as it is and don't
4242 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4243 memoized code should not be modified.
4244
4245 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4246 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4247 available as a guile internal function instead. However,
4248 scm_i_unmemoize_expr will only work on memoized objects that hold
4249 a single memoized expression. It won't work with bodies.
4250
4251 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4252 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4253 i. e. a list of expressions.
4254
4255 * eval.c (unmemoize_exprs): Drop internal body markers from the
4256 output during unmemoization.
4257
4258 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4259 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4260 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4261 as guile internal functions instead. scm_i_unmemoize_expr will
4262 only work on a single memoized expression, while
4263 scm_i_unmemocopy_body will only work on bodies.
4264
90df793f
DH
42652004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4266
4267 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4268
4269 (scm_cons_source, scm_primitive_eval): Prefer higher level
4270 predicate SCM_FALSEP over SCM_IMP.
4271
8048c00b
RB
42722004-06-15 Rob Browning <rlb@defaultvalue.org>
4273
4274 * script.c (scm_shell_usage): minor phrasing change.
4275
4276 * gc_os_dep.c: update ifdefery for macosx.
4277 (scm_get_stack_base): separate result initialization from
4278 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4279 3.3. Thanks to Andreas Vögele.
8048c00b 4280
d93294d4
HWN
42812004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4282
4283 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4284
212e58ed
DH
42852004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4286
4287 * list.[ch] (scm_i_finite_list_copy): New internal function to
4288 copy lists that are known to be finite (though not necessarily
4289 proper).
4290
4291 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4292 a closure's argument list like an expression of a body.
4293
4294 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4295 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4296 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4297 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4298 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4299 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4300 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4301 unmemoize_builtin_macro): New static functions and symbols.
4302
4303 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4304 now has a slightly different meaning: The memoized form that is
4305 receives as its argument is now interpreted as a sequence of
4306 expressions from a body.
4307
4308 (unmemocar, scm_unmemocar): Since the whole functionality of
4309 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4310 has its old content back and is deprecated, while unmemocar has
4311 been removed.
4312
4313 (SCM_BIT7): Removed.
4314
4315 (CEVAL): For unmemoizing a single expression, call
4316 unmemoize_expression instead of scm_unmemocopy, which now expects
4317 a sequence of body expressions. Eliminated unnecessary empty
4318 environment frame when executing let* forms. Eliminated
4319 unmemoization step from evaluator.
4320
9ccea370
MV
43212004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4322
4323 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4324 macroexp and made static. Added new version of scm_macroexp that
4325 emits a deprecation warning and then calls macroexp.
4326 (scm_m_undefine): Issue deprecation warning.
4327
57d23e25
DH
43282004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4329
4330 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4331 Modified to make set! work on symbols that represent syntactic
4332 keywords.
4333
141521ad
HWN
43342004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4335
4336 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4337 compound expression as lvalue errors.
4338
7c2f56a4
MV
43392004-05-24 Marius Vollmer <mvo@zagadka.de>
4340
4341 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4342 WINDER_DATA to a SCM.
4343
366ecaec
DH
43442004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4345
4346 * goops.c (compute_getters_n_setters, create_standard_classes,
4347 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4348 lambda expression rather than creating them with scm_closure.
4349
26ecfa39
DH
43502004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4351
4352 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4353 misplaced syntactic keywords. This will not work unless guile's
4354 defmacro feature is deprecated.
4355
4356 (scm_m_case): Fixed a bug that caused the list of labels to grow
4357 with every case form.
4358
f865229a
KR
43592004-05-19 Kevin Ryde <user42@zip.com.au>
4360
4361 * numbers.c (scm_round_number): For inum and big, just return x. For
4362 real, use scm_round for 2^54-1 etc problems covered there.
4363
4364 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4365 doesn't provide trunc. This was for when `truncate' was done as a
4366 scm_tc7_dsubr, no longer required.
4367
4368 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4369 to stack marking call, two parameters and no cast on t->base.
4370
63947c7a
MV
43712004-05-18 Marius Vollmer <mvo@zagadka.de>
4372
4373 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4374 processed hashtables back into the weak_hashtables list. Thanks
4375 to Bill Schottstaedt!
4376
e7313a9d
DH
43772004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4378
4379 * eval.c (unmemoize_quote): New static function.
4380
4381 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4382 representation of 'quote' and '@slot-ref' to an improper list.
4383 This reduces execution time, the number of cells used to hold the
4384 memoized code, and thus also reduces garbage collection time.
4385
4386 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4387
4388 (SCM_CEVAL): Changed macro handling to also work with macros that
4389 return improper lists. Added an assertion, that the code returned
4390 by a macro transformer will not lead to cycles in the memoized
4391 code.
4392
e5156567
DH
43932004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4394
4395 No functional change, just rearrangements of functions within the
4396 file.
4397
4398 * eval.c (scm_ilookup, scm_unbound_variable_key,
4399 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4400 the definitions used for execution, since that's where they will
4401 belong to later.
4402
651f07f8
DH
44032004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4404
4405 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4406 throughout guile, has not been part of an official release yet,
4407 and the concept of sloppy predicates has never been a good idea.
4408
4409 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4410 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4411 Simplified.
4412
770e048f
DH
44132004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4414
4415 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4416 to make explicit what happens.
4417
2ff08405
DH
44182004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4419
4420 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4421 explicit what happens.
4422
4423 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4424 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4425
89afb9cd
MV
44262004-05-11 Marius Vollmer <mvo@zagadka.de>
4427
4428 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4429 is indeed a procedure when it isn't a number.
4430
3d5ebfa9
MV
44312004-05-10 Marius Vollmer <mvo@zagadka.de>
4432
4433 Convert floating point numbers into strings with an arbitrary
4434 radix. Thanks to Richard Todd!
4435
4436 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4437 fit.
4438 (fx): Removed.
4439 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4440 number_chars): New, to support variable radices.
4441 (idbl2str): Use above instead of the old base-10 only tables.
4442 (iflo2str): Pass on new RADIX argument to idbl2str.
4443 (scm_number_to_string): Pass radix to iflo2str.
4444 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4445 iflo2str.
4446 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4447 possible radices.
4448
3ae69bb4
KR
44492004-05-10 Kevin Ryde <user42@zip.com.au>
4450
4451 * numbers.c (scm_logbit_p): Correction to test above the end of an
4452 inum. Reported by Jan Konecny.
4453
27968825
MV
44542004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4455
4456 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4457 scm_t_bits. Updated all users.
4458 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4459 duplicating the code.
4460 (SCM_CELL_OBJECT_LOC): New.
4461 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4462 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4463
4464 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4465 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4466 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4467 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4468 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4469 SCM_SMOB_OBJECT_3_LOC): New.
4470 * smob.c (scm_i_set_smob_flags): New function.
4471
4472 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4473 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4474 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4475 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4476 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4477 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4478
4479 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4480 taking the address of SCM_CELL_WORD_1, the latter being no longer
4481 an lvalue.
4482
4483 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4484 of casting SCM_CELL_WORD_LOC.
4485
3cf17ef0
KR
44862004-05-02 Kevin Ryde <user42@zip.com.au>
4487
37026925 4488 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4489 --disable-deprecated. Reported by Andreas Vögele.
37026925 4490
3cf17ef0 4491 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4492 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4493
c5854598
KR
4494 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4495 code has support for. Fixes building with AIX cc, which is ansi but
4496 doesn't define __STDC__. Reported by Keith Crane.
4497 (var_start): Remove macro, this variation no longer required.
4498 (scm_list_n): Use va_start directly.
4499
f26c1a32
KR
45002004-05-01 Kevin Ryde <user42@zip.com.au>
4501
4502 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4503 is now gone. Reported by Andreas Vögele.
f26c1a32 4504
dfa6017e
KR
45052004-04-28 Kevin Ryde <user42@zip.com.au>
4506
4507 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4508 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4509 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4510 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4511 Also cast through unsigned char to avoid passing negatives to those
4512 macros if input contains 8-bit values.
4513
4514 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4515 corrections to range check for signed numbers. Remove
4516 scm_remember_upto_here_1(num) from these checks, since num is used
4517 subsequently anyway.
4518
4519 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4520 avoid warning from gcc 3.4. Reported by Hyperdivision.
4521
4522 * numbers.c (scm_bit_extract): Use min instead of MIN.
4523 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4524 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4525
4526 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4527 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4528
a0d06a00 4529 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4530 Reported by Andreas Vögele.
a0d06a00 4531
dfa6017e
KR
4532 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4533 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4534 by Andreas Vögele.
dfa6017e 4535
36245b66
DH
45362004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4537
4538 * eval.c (s_macro_keyword): New static identifier.
4539
4540 (scm_m_define): Change order to first create binding and
4541 evaluating the expression afterwards.
4542
4543 (scm_m_set_x): Memoize complete set! expression. Only leave
4544 symbols if no binding exists at memoization time. Throw error if
4545 assigning to a syntactic keyword.
4546
4547 (lazy_memoize_variable): New function.
4548
4549 (CEVAL): When execution set!, perform lazy memoization if
4550 unmemoized symbol is detected.
4551
4552 * modules.c (module_variable): Return variables with unbound
4553 value.
4554
4555 * tags.h: Fix comment.
4556
4d81111e
KR
45572004-04-25 Kevin Ryde <user42@zip.com.au>
4558
da8bcb2f
KR
4559 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4560 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4561 in 8-bit locales, and ensures consistency with char-upper-case? and
4562 char-lower-case? which already use ctype.h.
4563 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4564 Remove.
4565 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4566
4d81111e
KR
4567 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4568 call. Reported by Hyperdivision.
4569
4570 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4571 Reported by Hyperdivision.
4572
4573 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4574 Hyperdivision.
4575
7e6e6b37
DH
45762004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4577
4578 Hide the implementation of ilocs and isyms in eval.c.
4579
4580 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4581 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4582 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4583 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4584 eval.h to eval.c.
4585
4586 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4587 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4588 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4589 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4590 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4591 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4592 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4593 renamed to ISYMNUM.
4594
4595 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4596 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4597 Extracted printing of ilocs and isyms to guile internal functions
4598 scm_i_print_iloc, scm_i_print_isym of eval.c.
4599
caab294f
KR
46002004-04-22 Kevin Ryde <user42@zip.com.au>
4601
7aaf4758
KR
4602 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4603
caab294f
KR
4604 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4605 rounding in x+0.5 when x is a big value already an integer. In
4606 certain hardware rounding cases x+0.5 can give an adjacent integer,
4607 leading to that as the result, when we really just wanted x itself.
4608
b1cb24ff
DH
46092004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4610
4611 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4612
4613 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4614 added const qualifiers, cast intentionally unused expressions to
4615 void for emphasis, improved comment.
4616
5065b40d
DH
46172004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4618
4619 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4620 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4621 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4622 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4623 Defined the tc8-tag for flags to be 0x04, which will mean that
4624 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4625 to the reduced number of bits and the simpler bit pattern for
4626 SCM_BOOL_F, certain machines may be able to use more efficient
4627 processor instructions to deal with SCM_BOOL_F.
4628
4629 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4630 never been defined in a released version, thus no need to
4631 deprecate them.
4632
4633 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4634 instead of tc9 tags.
4635
4636 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4637 of tc9 tags.
4638
4639 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4640 could have used this definition.
4641
4642 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4643 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4644 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4645 as isyms, as special isyms don't exist any more.
4646
9fa6c119
KR
46472004-04-18 Kevin Ryde <user42@zip.com.au>
4648
e08d2eee
KR
4649 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4650 safety.
4651
9fa6c119
KR
4652 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4653 explicit swapping code.
4654
c9cdd396
KR
46552004-04-15 Kevin Ryde <user42@zip.com.au>
4656
4657 * cpp_sig_symbols.in: Add SIGSYS.
4658
4659 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4660 recursion.
4661
4662 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4663 frac/big and frac/frac, use scm_less_p for exact comparison.
4664
83ac9c59
KR
4665 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4666 with big/inum.
4667
84a4be9a
KR
4668 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4669
84fad130
HWN
46702004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4671
6b69393d
HWN
4672 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4673
84fad130
HWN
4674 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4675 scm_c_{up,down}case.
4676 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4677 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4678
c3110a30
KR
46792004-04-06 Kevin Ryde <user42@zip.com.au>
4680
0b288f36
KR
4681 * numbers.c (scm_ash): Remove stray "}" in docstring.
4682
ea2508c8
KR
4683 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4684 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4685 calling mpz_cmp_ui in most cases.
4686
c3110a30
KR
4687 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4688 for big == abs(most-negative-fixnum) special case.
4689 (abs_most_negative_fixnum): Remove, no longer used.
4690
4691 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4692 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4693 calling (sigaction NSIG).
4694
4695 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4696 and fork error cases to do this.
4697
dec40cd2
DH
46982004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4699
4700 * eval.c (CEVAL): Don't distinguish between short and long
4701 instructions when dispatching - just always dispatch on the
4702 instruction code, which is common for short and long instructions.
4703 Further, removed unnecessary goto statements and added comment.
4704
0e7bb795
DH
47052004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4706
4707 * eval.c (scm_unmemocopy): Don't distinguish between short and
4708 long instructions when dispatching - just always dispatch on the
4709 instruction code, which is common for short and long instructions.
4710 Further, removed unnecessary goto statements, fixed indentation
4711 and replaced SCM_IMP predicates by SCM_NULLP.
4712
f9986767
DH
47132004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4714
4715 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4716 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4717 'checkmacro'.
4718
fbc42231
KR
47192004-03-31 Kevin Ryde <user42@zip.com.au>
4720
4721 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4722
434f2f7a
DH
47232004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4724
4725 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4726 SCM_DEBUGGINGP:
4727
4728 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4729 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4730 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4731 single interface that also matches the naming conventions.
4732 Probably scm_debug_mode_p should be part of the private interface
4733 anyway.
4734
4735 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4736 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4737 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4738 to scm_debug_mode_p.
4739
4740
4741 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4742
4743 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4744 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4745 from debug.h to eval.h.
4746
4747 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4748 more, just leave it with setting scm_debug_mode_p, which is
4749 equivalent for practical purposes.
4750
4751 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4752 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4753
4754 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4755
4756 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4757 static and renamed it to ceval throughout. Provide a new exported
4758 but deprecated function scm_ceval as a wrapper for backwards
4759 compatibility. The same is done for the deval/scm_deval pair of
4760 functions.
4761
4762 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4763 throughout. Defined CEVAL to ceval or deval, based on compilation
4764 phase.
4765
4766 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4767 to ceval and deval instead of calling *scm_ceval_ptr.
4768
4769 * eval.c (dispatching_eval): New deprecated static function.
4770
4771 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4772 to emulate its old behaviour as closely as possible.
4773
4774
4775 Change the evaluator such that only expressions for which pair? is
4776 true are passed to CEVAL, and such that all other expressions are
4777 evaluated outside of CEVAL:
4778
4779 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4780 expression that is assumed to be memoized already. All but
4781 expressions of the form '(<form> <form> ...)' are evaluated inline
4782 without calling an evaluator.
4783
4784 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4785 expressions of the form '(<form> <form> ...)' inline without
4786 calling an evaluator.
4787
4788 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4789 the special case of unmemoized symbols passed on the top level.
4790
4791 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4792 is known that the expression passed to CEVAL is of the form
4793 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4794 now it is known that the input expression of CEVAL is a pair.
4795
47962004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4797
4798 * eval.c (is_self_quoting_p): New static function.
4799
4800 (scm_m_quote): Use is_self_quoting_p.
4801
4802 (copy_tree): Corrected typo in comment.
4803
702551e6
HWN
48042004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4805
bfefbf18
HWN
4806 * eval.c (s_scm_copy_tree): idem.
4807
4808 * list.c (s_scm_filter): remove "pointer" from doc string.
4809
702551e6
HWN
4810 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4811
4812 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4813
4814 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4815 (display_frame): idem.
4816 (display_backtrace_file_and_line): idem.
4817
4818 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4819 arguments.
4820
3cd23214
KR
48212004-03-26 Kevin Ryde <user42@zip.com.au>
4822
88a7ae1f
KR
4823 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4824
3cd23214
KR
4825 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4826 big==0 since that never occurs.
4827
4828 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4829 scm_modular_expt, matching scheme level name `modulo-expt'.
4830
4831 * numbers.c (scm_modular_expt): Return a negative remainder for a
4832 negative divisor, the same as `modulo' does.
4833
48342004-03-26 Eric Hanchrow <offby1@blarg.net>
4835
4836 * numbers.c, numbers.h (scm_modular_expt): New function.
4837
2926035a
KR
48382004-03-25 Kevin Ryde <user42@zip.com.au>
4839
4840 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4841 return inexact as required by r5rs.
4842
62360b89
DH
48432004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4844
4845 * eval.c: Separated some definitions relevant for execution from
4846 the memoization part of the file.
4847
4848 (copy_tree): New static function
4849
4850 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4851 structures are detected now and will lead to an exception instead
4852 of forcing guile to run in an endless loop, using up all the
4853 system's memory. Second, arrays in the cdr of an improper list
4854 are now copied. See the new test cases in eval.test.
4855
48562004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
4857
4858 * posix.c (scm_gethostname): Make sure len is initialised before
4859 it is used. Restructured to (hopefully) represent possible
4860 configurations more clearly in the code. Added unwind handler.
4861
3bd3bae8
KR
48622004-03-23 Kevin Ryde <user42@zip.com.au>
4863
4864 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4865 MAXHOSTNAMELEN when available.
4866
254bf78d
MV
48672004-03-21 Marius Vollmer <mvo@zagadka.de>
4868
4869 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4870 terminator. Rewritten the logic as a state machine, I must have
4871 been doing too much VHDL lately...
4872
4873 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4874 themselves. Thanks to Han-Wen Nienhuys!
4875
4876 * list.c: Changed docstrings so that they no longer talk about
4877 returning 'pointers' to something.
4878
009c34a2
HWN
48792004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4880
4881 * gc.c: remove set_debug_cell_accesses! when
4882 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4883 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4884 debugging conditionally.
4885
54733c95
KR
48862004-03-21 Kevin Ryde <user42@zip.com.au>
4887
4888 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4889
bbaf8747
KR
48902004-03-20 Kevin Ryde <user42@zip.com.au>
4891
4892 * posix.c (scm_gethostname): Preserve errno across free() call.
4893
726f82e7
HWN
48942004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4895
4896 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4897 free cells.
4898
e1350d6a
KR
48992004-03-14 Kevin Ryde <user42@zip.com.au>
4900
4901 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4902 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4903
62055253
KR
49042004-03-07 Kevin Ryde <user42@zip.com.au>
4905
4906 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4907 than "GMT" always.
4908 (filltime): Make zname parameter "const".
4909
92e64b87
MD
49102004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4911
4912 * threads.c, threads.h (scm_c_scm2thread): New function.
4913
004ad931
KR
49142004-02-29 Kevin Ryde <user42@zip.com.au>
4915
4916 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4917 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4918 particular don't assume "defined (__alpha__) && ! defined (linux)"
4919 means OSF. Remove "SCO" code, which was not really SCO specific and
4920 which John W. Eaton advises should be long past being needed.
4921
4922 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4923 error throw.
4924
72ea45ac
KR
49252004-02-24 Kevin Ryde <user42@zip.com.au>
4926
4927 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4928
2af0602e
KR
49292004-02-22 Kevin Ryde <user42@zip.com.au>
4930
4931 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4932 complex, same as for two args. (Handle only inum, big, real, frac).
4933
b114eafe
KR
49342004-02-21 Kevin Ryde <user42@zip.com.au>
4935
4936 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4937 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 4938 Reported by Andreas Voegele.
b114eafe 4939
1e55d288
NJ
49402004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4941
4942 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4943 validation.
4944
4945 * read.c (scm_lreadparen): Removed.
4946 (scm_lreadparen1): Renamed scm_i_lreadparen.
4947
eb741d98
HWN
49482004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4949
4950 * list.c (scm_list_n): validate non-immediate arguments;
4951 this will catch forgotten a SCM_UNDEFINED.
4952
4e28ba5e
MV
49532004-02-18 Marius Vollmer <mvo@zagadka.de>
4954
4955 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4956 Thanks to Bill Schottstaedt!
4957
4958 * socket.h (scm_gethost): Removed prototype it is already in
4959 "net_db.h". Thanks to Bill Schottstaedt!
4960
ef861ead
KR
49612004-02-18 Kevin Ryde <user42@zip.com.au>
4962
4963 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4964 order parameter to mpz_import, in fact with just one word there's no
4965 order to worry about at all.
4966
4967 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4968 and frac==complex, make an exact comparison rather than converting
4969 with fraction2double.
4970
4971 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4972 shared library, since environ is not directly available there.
4973
4974 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4975 standard.
4976
4977 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4978 errno EINVAL in case localtime and gmtime don't set it.
4979 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4980 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4981
ae43d08e 49822004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 4983
c9ea6462
KR
4984 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4985 which were permitted in the past for these.
4986
292dfa7f
KR
4987 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4988 previous change to numbers.c.
4989
ae43d08e
KR
4990 * script.c (scm_shell_usage): Print bug-guile email address, as per
4991 GNU standard. Reported by Han-Wen Nienhuys.
4992
711a9fd7
MD
49932004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4994
4995 * unif.c (scm_make_uve): Removed local variable and simplified
4996 code in order to avoid compiler used uninitialized warnings.
4997
4998 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4999 scm_hash_map.
5000 (scm_hash_fold): Use scm_call_3 directly in the call to
5001 scm_internal_hash_fold instead of going via fold_proc (which is
5002 now removed).
5003 (scm_hash_for_each): Use a trampoline +
5004 scm_internal_hash_for_each_handle.
5005 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
5006 functions.
5007
3da7f6b2
KR
50082004-02-12 Kevin Ryde <user42@zip.com.au>
5009
344a212f
KR
5010 * ports.c (scm_port_line): In docstring, note first line is 0.
5011 (scm_set_port_line_x): In docstring, note first line is 0.
5012 (scm_port_column): In docstring, there's no default to current input
5013 port, and remove shared port-line @defun.
5014 (scm_set_port_column_x): In docstring, there's no default to current
5015 input port, note first column is 0, remove shared set-port-line!
5016 @defun.
5017
3da7f6b2
KR
5018 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5019 convert args the same way that array-set! does.
5020
5021 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5022 for dvect.
5023 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5024 for "l" not "s", fix dvect to be false for singp(prot) since such a
5025 value is for fvect.
5026 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5027 (exactly_one_third): New variable.
5028 (scm_init_unif): Initialize it.
3da7f6b2 5029
cd21f5eb
NJ
50302004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5031
5032 * read.c (scm_read_opts): Change `escaped-parens' to
5033 `elisp-strings'.
5034
16353acc
NJ
50352004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5036
5037 * read.c (scm_read_opts): New opts `elisp-vectors' and
5038 `escaped-parens'.
5039 (s_vector): New.
5040 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5041 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5042 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5043 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5044 `escaped-parens' option set.
5045 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5046 in tokens.
5047 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5048 (scm_lreadparen1): New.
5049
5050 * read.h: Remove conditionally compiled last arg to
5051 scm_lreadparen.
5052 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5053
f62b9dff
HWN
50542004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5055
5056 * eval.c (m_expand_body): remove stray variable new_body.
5057
ef5b6b61
MV
50582004-01-22 Marius Vollmer <mvo@zagadka.de>
5059
5060 * eval.c (m_expand_body): Rewrite the expression in place (by
5061 overwriting FORMS) also when a letrec is constructed, not only
5062 when no definitions are found. Do not return rewritten expression
5063 to emphasize the in-place rewriting. Changed all users.
5064
7eec4c37
HWN
50652004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5066
5067 * gc.c: add protected_object_count, a number that is dumped from
5068 gc_stats()
5069
25ffbdac
MV
50702004-01-11 Marius Vollmer <mvo@zagadka.de>
5071
5072 * dynwind.h, dynwind.c (scm_frame_unwind,
5073 scm_frame_unwind_handler): Renamed and changed all uses.
5074 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5075
08568c95
KR
50762004-01-11 Kevin Ryde <user42@zip.com.au>
5077
5078 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5079 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5080 changes made to scheme-compound.texi.
5081
5565749c
MV
50822004-01-10 Marius Vollmer <mvo@zagadka.de>
5083
25ffbdac
MV
5084 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5085 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5086
5087 * guile-snarf.in: Use mkdir to create a unique temporary directory
5088 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5089
fc6bb283
MV
50902004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5091
7ebccde8
MV
5092 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5093 argument since it is always zero now. Changed all callers.
5094 Removed code for handling fluids.
96e3b2f8
MV
5095
5096 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5097 the wind chain explicitely. Use scm_c_with_fluid for the common
5098 case of only one fluid.
5099 (scm_with_fluid): New.
5100 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5101
fc6bb283 5102 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5103 (scm_with_fluid): New.
5104 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5105
5106 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5107 do the unwinding directly. It is simple enough.
5108
5109 * dynwind.h, dynwind.c: Did the following renamings:
5110 scm_begin_frame -> scm_frame_begin,
5111 scm_end_frame -> scm_frame_end,
5112 scm_on_unwind -> scm_frame_unwind,
5113 scm_on_rewind -> scm_frame_rewind,
5114 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5115 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5116 Changed all uses.
5117
5118 * aync.h, async.c: Did the follwing renamings:
5119 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5120 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5121 Changed all uses.
5122
5123 * ports.h, ports.c: Did the follwing renamings:
5124 scm_with_current_input_port -> scm_frame_current_input_port,
5125 scm_with_current_output_port -> scm_frame_current_output_port,
5126 scm_with_current_error_port -> scm_frame_current_error_port.
5127 Changed all uses.
5128
298ab996
KR
51292004-01-07 Kevin Ryde <user42@zip.com.au>
5130
5131 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5132 Reported by Richard Todd.
5133
ba40113e
KR
5134 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5135 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5136
298ab996
KR
5137 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5138 traversing the args list, fixes segv if an improper list is given.
5139 Reported by Rouben Rostamian.
5140
aacff585
MV
51412004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5142
5143 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5144 swap_data on stack, use a 'malloc obj'.
5145
5146 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5147 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5148 scm_i_... since they are internal. Changed all uses.
5149
5150 * dynwind.c (frame_print): Removed, use the default printer.
5151 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5152 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5153 to protect SCM values.
5154
5155 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5156 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5157 Changed all uses.
5158 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5159
49c00ecc
MV
51602004-01-05 Marius Vollmer <mvo@zagadka.de>
5161
5162 * ports.h, ports.c (scm_with_current_input_port,
5163 scm_with_current_output_port, scm_with_current_error_port): New.
5164
5165 * async.h, async.c (scm_with_blocked_asyncs,
5166 scm_with_unblocked_asyncs): New.
5167
dab514a8
MV
51682004-01-03 Marius Vollmer <mvo@zagadka.de>
5169
5170 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5171 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5172 New.
5173 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5174 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5175 function when the outermost wind point has been reached. The
5176 latter is used to copy a continuation stack at the right time.
5177 scm_dowinds remains available.
5178 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5179 tc16_guard, guards_print): Removed.
5180 (scm_internal_dynamic_wind): Reimplemented using frames.
5181
5182 * continuations.c (copy_stack): New, do only the stack copying
5183 part of copy_stack_and_call.
5184 (copy_stack_and_call): Copy the stack after unwinding and before
5185 rewinding.
5186 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5187 copy_stack_and_call.
5188
441a25d9
KR
51892004-01-04 Kevin Ryde <user42@zip.com.au>
5190
5191 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5192 can give bad results due to rounding.
441a25d9 5193
e0499207
KR
5194 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5195 setzone/restorezone protection for DOS.
5196
89fcf1b4
MV
51972003-12-26 Marius Vollmer <mvo@zagadka.de>
5198
5199 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5200 and scm_t_uintmax to be defined in scmconfig.h
5201
caff34d4
KR
52022003-12-03 Kevin Ryde <user42@zip.com.au>
5203
5204 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5205
5206 * numbers.c (scm_make_ratio): Check for numerator equal to
5207 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5208 giving integer -1.
5209
5210 * numbers.c (scm_real_part): Return fraction unchanged rather than
5211 converting to flonum.
5212
2d0b85ac
DH
52132003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5214
5215 * modules.c (module_variable): Fixed (and thus simplified) the
5216 definition of SCM_BOUND_THING_P to reflect the fact that since
5217 after the 1.4 series of guile, obarrays only hold variable
5218 objects.
5219
2297981d
MV
52202003-11-30 Marius Vollmer <mvo@zagadka.de>
5221
5222 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5223
5224 From Paul Jarc:
5225
5226 * read.c (scm_lreadr): Signal an error for invalid escape
5227 sequences in strings. Code cleanups too.
5228
5229 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5230 writing control characters in strings.
5231
52322003-11-21 Marius Vollmer <mvo@zagadka.de>
5233
5234 * ports.c (scm_drain_input): Bug fix: only access the port after
5235 checking that it indeed is one.
5236
5c264007
DH
52372003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5238
5239 * eval.c (s_bad_define): New static identifier.
5240
5241 (m_body): Fixed comment.
5242
5243 (scm_m_define): Don't generate memoized code for definitions that
5244 are not on the top level. As a consequence, no memoized code at
5245 all is generated for definitions any more: Top level definitions
5246 are executed immediately during memoization and internal
5247 definitions are handled separately in m_expand_body.
5248
5249 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5250 definitions. Consequently, there is no unmemoizing code any more
5251 that might modify the environment. Thus, the old scm_unmemocopy
5252 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5253
5254 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5255 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5256 over SCM_NIMP in places, where the argument is known to be part of
5257 a proper list.
5258
018d4730
KR
52592003-11-21 Kevin Ryde <user42@zip.com.au>
5260
5261 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5262 for bignums.
5263
5264 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5265 to share some shifting.
5266
5267 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5268 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5269 since gc does this.
5270
4bca30d8
MV
52712003-11-19 Marius Vollmer <mvo@zagadka.de>
5272
fb16d26e
MV
5273 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5274 structure. Previously, not all cases with a negative denominator
5275 were covered.
5276
4bca30d8
MV
5277 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5278 scm_divide2real when forming the fractional part. This allows
5279 "#e1.2" to yield 6/5.
5280
5281 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5282 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5283 fractions were equal to each other regardless of value. Ooops.
5284
5285 * numbers.c (scm_rationalize): Return an inexact result when given
5286 inexact arguments.
5287
5288 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5289 non-numbers.
5290
bdf26b60
MV
52912003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5292
5293 Support for exact fractions from Bill Schottstaedt! Thanks!
5294
5295 * print.c (scm_iprin1): Handle fractions.
5296
5297 * objects.h (scm_class_fraction): New.
5298 * objects.c (scm_class_fraction): New.
5299 (scm_class_of): Handle fractions.
5300
5301 * hash.c (scm_hasher): Handle fractions.
5302
5303 * numbers.c: New code for handling fraction all over the place.
5304 (scm_odd_p, scm_even_p): Handle inexact integers.
5305 (scm_rational_p): New function, same as scm_real_p.
5306 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5307 New exact functions that replace the inexact 'dsubr'
5308 implementations.
5309 (scm_numerator, scm_denominator): New.
5310
5311 * numbers.h (SCM_NUMP): Recognize fractions.
5312 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5313 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5314 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5315 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5316 SCM_FRACTION_REDUCED): New.
5317 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5318 New prototypes.
5319 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5320 scm_rational_p): New prototypes.
5321 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5322 scm_i_print_fraction): New prototypes.
5323
5324 * goops.c (create_standard_classes): Create "<fraction>" class.
5325
5326 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5327
5328 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5329 case in the switch, but do nothing for now.
5330
5331 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5332 to doubles when calling 'dsubr' functions.
5333
5334 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5335
28fda544
RB
53362003-11-18 Rob Browning <rlb@defaultvalue.org>
5337
5338 * gen-scmconfig.c (main): remove public definition of
5339 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5340 direct typedef of long_long and ulong_long inside deprecated block
5341 when appropriate.
5342
5343 * deprecated.h: move long_long and ulong_long definitions to
5344 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5345 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5346
b58e7420
MV
53472003-11-17 Marius Vollmer <mvo@zagadka.de>
5348
9a1d7d7c
MV
5349 * hash.c (scm_string_hash): New hashing algorithm that takes the
5350 complete string into account.
5351
b58e7420
MV
5352 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5353 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5354 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5355 SCM_ASSYNT.
b58e7420
MV
5356
5357 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5358 the "-e" option instead of scm_str2symbol. This allows things
5359 like (@ ...) to be specified for the entry point.
5360
461bffb1
DH
53612003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5362
5363 * eval.c (scm_m_letstar): Create memoized code in place to
5364 minimize consing.
5365
6f81708a
DH
53662003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5367
5368 * eval.c (s_splicing): Commented and reformulated.
5369
5370 (lookup_global_symbol, lookup_symbol): New static functions.
5371
5372 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5373
5374 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5375 creating a temporary pair for scm_lookupcar.
5376
5377 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5378 created deprecated wrapper function scm_unmemocar.
5379
5380 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5381 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5382 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5383 undefineds, sym_three_question_marks): Moved around without
5384 modifications.
5385
5386 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5387
910b5125
DH
53882003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5389
5390 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5391 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5392 No further modifications.
5393
c86c440b
DH
53942003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5395
5396 * eval.c (s_mixed_body_forms): New static identifier.
5397
5398 (canonicalize_define, scm_m_define): The check for a bad
5399 expression is performed in canonicalize_define now.
5400
5401 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5402 static helper functions for m_expand_body.
5403
5404 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5405 expand user defined macros. Fixed handling of the definition/
5406 expression boundary. Fixed handling of definitions grouped with
5407 'begin. Use canonicalize_define to expand definitions.
5408
3890131a
MV
54092003-11-13 Marius Vollmer <mvo@zagadka.de>
5410
b58e7420
MV
5411 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5412 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5413
5df36eac
MV
5414 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5415 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5416 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5417 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5418 New macros from Paul Jarc. Thanks!
5419
3890131a
MV
5420 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5421 return NULL when the machine type is unknown. Previously,
5422 gc_os_dep.c would refuse to compile.
5423
430b8401
DH
54242003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5425
5426 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5427 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5428 scm_m_body to m_body.
5429
328dc9a3
DH
54302003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5431
5432 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5433 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5434 scm_m_expand_body to m_expand_body and made it static. Added
5435 deprecated wrapper scm_m_expand_body.
5436
5437 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5438 of scm_m_expand_body.
5439
c2337a61
KR
54402003-11-09 Kevin Ryde <user42@zip.com.au>
5441
5442 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5443 argument. Reported by Mike Gran.
5444
ced8edb0
DH
54452003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5446
5447 * eval.c (s_missing_body_expression): New static identifier.
5448
5449 (s_body): Removed.
5450
5451 (scm_m_expand_body): Fixed core dump when passing a body with
5452 defines, but without expressions (see additions to syntax.test).
5453 Use ASSERT_SYNTAX to signal syntax errors.
5454
0f572ba7
DH
54552003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5456
5457 * eval.c (canonicalize_define): New static helper function.
5458
5459 (memoize_define, canonicalize_define): Extract handling of
5460 function currying to canonicalize_define.
5461
2510c810
DH
54622003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5463
5464 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5465 Make sure that error checking in debug mode is not worse than in
5466 standard mode.
5467
34adf7ea
DH
54682003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5469
5470 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5471 handled in scm_m_body any more, but rather in scm_m_lambda.
5472
5473 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5474 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5475 calling functions of scm_m_body.
5476
5477 (scm_m_lambda): Avoid unnecessary consing when creating the
5478 memoized code.
5479
89bff2fc
DH
54802003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5481
5482 * eval.c (s_expression): Added comment.
5483
5484 (s_empty_combination, error_unbound_variable): New static
5485 identifiers.
5486
5487 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5488 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5489 signal syntax errors.
5490
5491 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5492 scheme objects.
5493
60a49842
DH
54942003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5495
5496 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5497 Grouped together with unmemocopy, without modifications.
5498
5499 (build_binding_list, unmemocopy): Renamed names of list arguments
5500 and variables to reflect the actual order of the list elements.
5501
70c1c108
DH
55022003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5503
5504 * eval.c (s_defun): New static identifier.
5505
5506 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5507 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5508 when creating the memoized code.
5509
0ee39677
KR
55102003-10-19 Kevin Ryde <user42@zip.com.au>
5511
5512 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5513
5514 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5515 in accordance with R5RS, which just mpz_get_d doesn't really give.
5516
9a848baf
DH
55172003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5518
5519 * eval.c (s_bad_slot_number): New static identifier.
5520
5521 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5522 signal syntax errors. Avoid unnecessary consing when creating the
5523 memoized code.
5524
da48db62
DH
55252003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5526
5527 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5528 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5529 errors. Avoid unnecessary consing when creating the memoized
5530 code.
5531
5532 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5533 standard case. Make sure line and file information are copied to
5534 every created expression.
5535
82b3e2c6
DH
55362003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5537
5538 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5539 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5540 when creating the memoized code.
5541
5542 (scm_m_atbind): Reversed the order, in which the init expressions
5543 are stored and executed. The order of execution is now equal to
5544 the order in which the initializers of the let-forms are executed.
5545 Use check_bindings and transform_bindings.
5546
5547 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5548 !SCM_NULLP. Added some comments.
5549
21628685
DH
55502003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5551
5552 * eval.c: Sorted include files alphabetically.
5553
5554 (scm_m_begin): Added comment.
5555
5556 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5557 unnecessary consing when creating the memoized code.
5558
5559 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5560 syntax errors. Be more specific about the kind of error that was
5561 detected.
5562
5563 (scm_m_quote, unmemocopy): As an optimization, vector constants
5564 are now inserted unquoted into the memoized code. During
5565 unmemoization the quotes are added again to provide syntactically
5566 correct code.
5567
d6754c23
DH
55682003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5569
5570 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5571 scm_m_expand_body, check_bindings): Extracted syntax checking of
5572 bindings to new static function check_bindings.
5573
5574 (scm_m_let, memoize_named_let): Extracted handling of named let to
5575 new static function memoize_named_let.
5576
5577 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5578 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5579 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5580 unnecessary consing when creating the memoized code.
5581
03a3e941
DH
55822003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5583
5584 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5585 static identifiers.
5586
5587 (s_clauses, s_formals, s_duplicate_formals): Removed.
5588
5589 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5590 specific about the kind of error that was detected. Prepare for
5591 easier integration of changes for separated memoization.
5592
da48db62 55932003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5594
5595 * eval.c (s_duplicate_binding): New static identifier.
5596
5597 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5598
5599 (scm_m_define): Added comment about how we check for duplicate
5600 formals.
5601
5602 (scm_m_do): Added check for duplicate bindings.
5603
5604 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5605 unnecessary consing when creating the memoized code.
5606
5607 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5608 scm_c_improper_memq to c_improper_memq, since it is not exported.
5609
5610 (transform_bindings): Call scm_c_memq rather than
5611 scm_c_improper_memq.
5612
5613 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5614
da48db62 56152003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5616
5617 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5618 static identifiers.
5619
5620 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5621 specific about the kind of error that was detected. Avoid use of
5622 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5623 code, this way also making sure that file name, line number
5624 information etc. remain available.
5625
da48db62 56262003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5627
5628 * eval.c (memoize_as_thunk_prototype): New static function.
5629
5630 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5631 Avoid unnecessary consing when creating the memoized code.
5632
9b9a35b6
KR
56332003-10-12 Kevin Ryde <user42@zip.com.au>
5634
5635 * list.c (scm_append): Track argument number and use in error.
5636
cc56ba80
DH
56372003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5638
5639 * eval.c (s_missing_expression, s_bad_variable): New static
5640 identifiers.
5641
5642 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5643 R5RS terminology for the naming of variables. Be more specific
5644 about the kind of error that was detected. Make sure file name,
5645 line number etc. are added to all freshly created expressions.
5646 Avoid unnecessary consing when creating the memoized code.
5647
609a8b86
DH
56482003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5649
5650 * eval.c (s_extra_expression, s_misplaced_else_clause,
5651 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5652
5653 (s_extra_case_clause): Removed.
5654
5655 (scm_m_case, scm_m_cond): If a clause appears after an else
5656 clause, report a misplaced else clause.
5657
5658 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5659 specific about the kind of error that was detected. Handle bound
5660 'else and '=>. Avoid unnecessary consing when creating the
5661 memoized code.
5662
5663 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5664 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5665 syntactic keyword '=>.
5666
58a2510b
DH
56672003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5668
5669 * eval.c (scm_m_case): Allow empty lists of case labels.
5670
2a6f7afe
DH
56712003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5672
5673 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5674
5675 * print.c (scm_isymnames): Add names for the new memoizer codes.
5676
5677 * eval.c (s_missing_clauses, s_bad_case_clause,
5678 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5679 literal_p): New static identifiers.
5680
5681 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5682 specific about the kind of error that was detected. Check for
5683 duplicate case labels. Handle bound 'else. Avoid unnecessary
5684 consing when creating the memoized code.
5685
5686 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5687 the syntactic keyword 'else.
5688
e6729603
DH
56892003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5690
5691 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5692 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5693
5694 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5695 unnecessary consing when creating the memoized code.
5696
9ddeb776
KR
56972003-10-09 Kevin Ryde <user42@zip.com.au>
5698
5699 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5700 cast gives for values bigger than a long, or for nan or inf.
5701
df5af69a
DH
57022003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5703
5704 * smob.h (scm_make_smob_type): Made the declaration match the
5705 definition.
5706
da0e6c2b
MV
57072003-10-07 Marius Vollmer <mvo@zagadka.de>
5708
5709 * goops.c, objects.h, smob.c, smob.h: Make type names char
5710 const * instead of char *. Thanks to Paul Jarc!
5711
591924eb
KR
57122003-10-02 Kevin Ryde <user42@zip.com.au>
5713
ff6ea7b9 5714 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5715 rather than scm_strport_to_string, so as to guard against the port
5716 having been closed by the called procedure. Reported by Nic Ferrier.
5717
f03314f9
DH
57182003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5719
5720 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5721
5722 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5723 tags.h to deprecated.h.
5724
534c55a9
DH
57252003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5726
5727 This set of patches introduces a new tc7 code scm_tc7_number for
5728 numbers. Bignums, reals and complex numbers are turned from smobs
5729 into subtypes of scm_tc7_number.
5730
5731 * tags.h (scm_tc7_number): New.
5732
5733 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5734 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5735 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5736 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5737 (scm_class_of), print.c (scm_iprin1), smob.c
5738 (scm_smob_prehistory): Don't handle bignums, reals and complex
5739 numbers as subtypes of scm_tc7_smob any more.
5740
5741 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5742 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5743
29c4382a
DH
57442003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5745
5746 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5747 sizeof (scm_t_complex) to determine the memory size of the
5748 malloc'd area for complex numbers.
5749
47ae1f0e
DH
57502003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5751
5752 * numbers.c (scm_bigequal): Fixed.
5753
859b6b2f
MV
57542003-09-16 Marius Vollmer <mvo@zagadka.de>
5755
5756 * stime.c (scm_current_time): 'time' does not set errno so don't
5757 use SCM_SYSERROR for reporting errors.
5758
e17d318f
DH
57592003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5760
5761 This set of patches eliminates the dependency between the
5762 implementation of evaluator specific memoization codes and special
5763 constants like #f, '() etc. ('flags'), which are not evaluator
5764 specific. The goal is to remove definitions of evaluator
5765 memoization codes completely from the public interface. This will
5766 make it possible to experiment more freely with optimizations of
5767 guile's internal representation of memoized code.
5768
5769 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5770
5771 * print.c (iflagnames): New array, holding the printed names of
5772 guile's special constants ('flags').
5773
5774 (scm_isymnames): Now holds only the printed names of the
5775 memoization codes.
5776
5777 (scm_iprin1): Separate the handling of memoization codes and
5778 guile's special constants.
5779
5780 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5781 SCM_IFLAGNUM): new
5782
5783 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5784 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5785 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5786 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5787 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5788 values.
5789
5790 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5791
5792 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5793 tc9 macros and scm_tc9_flag.
5794
eecac806
MV
57952003-09-15 Marius Vollmer <mvo@zagadka.de>
5796
5797 * posix.c (scm_setgroups): Check that the gid list is not too
5798 long. Thanks to Paul Jarc!
5799
22f2cf2d
DH
58002003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5801
5802 * tags.h: Reduced the number of short instructions from 14 to 13.
5803 The typecode of the former 14th short instruction is now used to
5804 represent long instructions. Changed some comments to reflect
5805 this fact.
5806
5807 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5808 previously used by SCM_IM_DEFINE.
5809
5810 (SCM_IM_DEFINE): Turned into a long instruction.
5811
5812 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5813 instruction.
5814
5815 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5816 code that is separate from all instructions, one level of dispatch
5817 for long instructions can be eliminated.
5818
5819 * print.c (scm_isymnames): Removed some commented code.
5820
62f548e1
MV
58212003-09-12 Marius Vollmer <mvo@zagadka.de>
5822
97a61c5f
MV
5823 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5824 compiler on IA64.
5825
50e0ba57
MV
5826 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5827
5828 * modules.c (scm_module_reverse_lookup): Check that the obarray
5829 really is a hashtable and do nothing if not.
5830
62f548e1
MV
5831 * inline.h: Use "extern inline" only with GCC. Use "static
5832 inline" else.
5833
0d5e3480
DH
58342003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5835
5836 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5837 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5838
5839 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5840 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5841 deprecated.h.
5842
6b412e91
DH
58432003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5844
5845 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5846 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5847
5848 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5849 0.0==some_expression to some_expression==0.0. The latter is
5850 better readable. The former is preferred by some people, since it
5851 leads to a compiler error when confusing == with =. However, when
5852 using gcc, a warning will be issued if in an if-statement an
5853 assigment appears. Since many Guile developers are using gcc,
5854 such errors will not remain unnoticed anyway. We can therefore
5855 focus on better readability.
5856
7e3b25bf
DH
58572003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5858
5859 * tags.h: Added description of Guile's type system. Removed some
5860 old and misleading comments.
5861
3ea39242
DH
58622003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5863
5864 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5865 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5866
5d7d39ff
DH
58672003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5868
5869 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5870
5871 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5872 respective SLOPPY macro.
5873
baa84a20
DH
58742003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5875
5876 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5877 type string, not SCM_TYP7S.
5878
ba15f500
KR
58792003-09-03 Kevin Ryde <user42@zip.com.au>
5880
5881 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5882 2s-complement.
5883
53bb8782
KR
5884 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5885 current timezone requiring SCM_DEFER_INTS.
5886
defdc4b4
NJ
58872003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5888
5889 * script.c (scm_compile_shell_switches): Make -s switch optional
5890 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5891 VanDevender for the patch!)
5892
0f008a15
KR
58932003-08-30 Kevin Ryde <user42@zip.com.au>
5894
5895 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5896 and to have non-integer types rejected as per other logical funcs.
5897
438a3ba1
KR
58982003-08-28 Kevin Ryde <user42@zip.com.au>
5899
5900 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5901
98dceb37
KR
59022003-08-23 Kevin Ryde <user42@zip.com.au>
5903
5904 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5905 thread safe, and could take a long time too.
5906
1fa79a38
KR
59072003-08-22 Kevin Ryde <user42@zip.com.au>
5908
5909 * numbers.c (scm_difference): Correction to bignum - negative inum.
5910
d97f9b42
KR
59112003-08-14 Kevin Ryde <user42@zip.com.au>
5912
5913 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5914 [__GNUC__]: Use volatile asm macros rather than a function call.
5915 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5916 macros while defining functions.
5917
5918 * simpos.c (getenv): Use <stdlib.h> for prototype.
5919 (scm_system): In docstring, refer to status:exit-val rather than
5920 "functions above".
5921
b9052fcc
KR
59222003-08-09 Kevin Ryde <user42@zip.com.au>
5923
5924 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5925 list set by source-properties! rather than an SRCPROPS object,
5926
8e5b4b9e
KR
59272003-07-29 Kevin Ryde <user42@zip.com.au>
5928
5929 * properties.c (scm_primitive_property_ref): In docstring, note
5930 parameters to not-found-proc, use hyphens rather than underscores for
5931 that parameter name.
5932 (scm_primitive_property_set_x): In docstring, VAL is the value
5933 parameter not CODE.
5934
20703ac4
MV
59352003-07-27 Marius Vollmer <mvo@zagadka.de>
5936
c6ccee34
MV
5937 * print.c (scm_print_symbol_name): handle more weird characters by
5938 escaping the symbol name properly. Thanks to Paul Jarc!
5939
2f4931bf
MV
5940 * posix.h (scm_setgroups): New prototype.
5941 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5942 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5943 Don't use SCM_WRITABLE_VELTS.
5944
265c456f
MV
5945 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5946 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5947 Matthias Koeppe!
5948
20703ac4
MV
5949 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5950 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5951 compiles when SCM_C_INLINE is undefined.
5952
59c4bb82
DH
59532003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5954
5955 * __scm.h: Reformulated the architecture and compiler properties
5956 in terms of properties of scm_t_bits and SCM variables rather than
5957 in terms of c standard types. This is since it is not known which
5958 of the standard types scm_t_bits and SCM variables will be defined
5959 to.
5960
d7850c8d
KR
59612003-07-24 Kevin Ryde <user42@zip.com.au>
5962
5963 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5964 and real.
5965
8a0c514f
KR
59662003-07-18 Kevin Ryde <user42@zip.com.au>
5967
5968 * numbers.c (scm_product): In complex * bignum, correction to
5969 REAL/IMAG fetch, x is the complex, not y.
5970
0aacf84e
MD
59712003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5972
5973 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5974 scm_inf_p test as Scheme values.
5975 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5976 and a positive inum.
5977 Use GNU indentation style.
5978
192de9a4
DH
59792003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5980
5981 * values.c (scm_values): Build lists of length 1 by using
5982 scm_list_1 instead of using scm_cons.
5983
bbb4438a
KR
59842003-07-10 Kevin Ryde <user42@zip.com.au>
5985
b58c85ce
KR
5986 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5987 * list.c (scm_list_n): Ditto.
5988
bbb4438a
KR
5989 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5990
287f8ad1
KR
59912003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5992
5993 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5994 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5995 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5996 the other using intptr_t.
5997
005d2366
KR
59982003-07-08 Kevin Ryde <user42@zip.com.au>
5999
0aacf84e 6000 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
6001 (scm_magnitude): Use hypot.
6002
6003 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
6004 @footnote since it doesn't go through to guile-procedures.txt.
6005
6006 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
6007 outside @var to quieten makeinfo, and use @code.
6008
cbfe8e62
HWN
60092003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6010
6011 * gc-malloc.c (decrease_mtrigger): new function
6012 (increase_mtrigger): new function, separate debug registering and
6013 mtrigger administration.
6014 (scm_gc_realloc): bugfix: do mtrigger administration before the
6015 actual realloc, for the realloc might invalidate a GC-d segment of
6016 memory. Thanks to Sam Hocevar for pointing this out.
6017 (scm_gc_realloc): use scm_malloc_reregister instead of
6018 unregistering and registering in sequence.
6019
aeb4c2e1
HWN
60202003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6021
6022 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
6023
4c27f8d2
HWN
60242003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6025
6026 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6027 clauses.
6028
983e697d
MV
60292003-06-29 Marius Vollmer <mvo@zagadka.de>
6030
6031 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6032 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6033 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6034 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6035 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6036 the release_1_6 branch.
6037
78b6566e
SJ
60382003-06-25 Stefan Jahn <stefan@lkcc.org>
6039
6040 * continuations.c: Redeclaration of getcontext() via the
6041 __asm__ ("getcontext") directive.
6042
6043 * continuations.h: Include <ucontext.h> instead of
6044 <sys/ucontext.h>.
6045
1ebb8497
KR
60462003-06-21 Kevin Ryde <user42@zip.com.au>
6047
6048 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6049 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6050 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6051 available.
6052 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6053 (isfinite): Remove, conflicts with C99 isfinite().
6054
fbf85ba4
MV
60552003-06-19 Marius Vollmer <mvo@zagadka.de>
6056
6057 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6058 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6059 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6060 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6061 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6062 the release_1_6 branch.
6063
fcc5d734
SJ
60642003-06-14 Stefan Jahn <stefan@lkcc.org>
6065
6066 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6067 to be functions instead of macros.
6068
6069 * threads.c: Conditionalized inclusion of <sys/time.h> and
6070 <unistd.h>.
6071 (scm_getspecific, scm_setspecific): Made these two function
6072 real part of the API.
6073
6074 * posix.c (s_scm_putenv): Added some code to make a
6075 (putenv "FOO="), i.e. setting an empty string, work also on
6076 Win32 systems. Thanks to Kevin Ryde for the proposal.
6077
c3ae8e07
KR
60782003-06-12 Kevin Ryde <user42@zip.com.au>
6079
75b14838
KR
6080 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6081 freebsd to comment about need to use unsetenv.
c3ae8e07 6082
9d9fa092
MV
60832003-06-02 Marius Vollmer <mvo@zagadka.de>
6084
6085 * ports.c (scm_peek_char): Safe the column of the port around the
6086 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6087
f2478375
KR
60882003-06-07 Kevin Ryde <user42@zip.com.au>
6089
6090 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6091 and friends required by scm_t_bits setups.
6092
6375e040
DH
60932003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6094
6095 * tags.h (scm_tc2_int): Added.
6096
6097 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6098 scm_tc2_int.
6099
6100 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6101 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6102
f5c6ec2f
DH
61032003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6104
6105 * eval.c: Partially undid my patch from 2003-05-31. This patch
6106 caused the segfault referenced in the previous changelog entry.
6107
47dbd81e
DH
61082003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6109
6110 * tags.h: Fixed comment about the immediate type code layout.
6111
6112 * eval.c: Fixed handling of non-special instructions. Without
6113 this patch, guile will segfault on (#\0) and similar instructions.
6114
3ec52c51
KR
61152003-06-05 Kevin Ryde <user42@zip.com.au>
6116
6117 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6118 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6119
e418bd7c
KR
6120 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6121 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6122
d0624e39
DH
61232003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6124
6125 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6126 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6127 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6128 generalized it to apply not only to C level functions but also to
6129 scheme level functions.
6130
6131 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6132 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6133 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6134 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6135 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6136 respectively.
6137
6138 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6139 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6140 eval.h into eval.c and a copy is placed into deprecated.h.
6141
6142 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6143 into eval.c. This definition was not part of the API in any
6144 officially released version of guile and thus does not need to go
6145 through a phase of deprecation.
6146
e90c3a89
DH
61472003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6148
d0624e39
DH
6149 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6150 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6151 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6152 definitions are make static and renamed from scm_s_xxx to s_xxx.
6153 In deprecated.c the original definitions are copied.
6154
d0624e39
DH
6155 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6156 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6157 eval.h into eval.c and a copy (slightly modified to work in user
6158 code) is placed into deprecated.h.
6159
6160 * eval.c: Use the local static s_xxx definitions instead of the
6161 scm_s_xxx definitions throughout.
6162
14b18ed6
DH
61632003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6164
6165 This set of patches separates the representation of the cxr family
6166 of functions (car, cdr etc.) from the dsubr family of functions
6167 (i. e. functions that take a double precision floating point
6168 argument). Further, the algorithm for handling the cxr function
6169 is improved.
6170
6171 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6172 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6173 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6174 cosh, tanh), objects.c (scm_class_of), procprop.c
6175 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6176 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6177 typecode for the dsubr family of functions.
6178
6179 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6180 ramap_dsubr.
6181
6182 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6183 (scm_init_pairs): Make use of the (now usable) second cell element
6184 of a scm_tc7_cxr function to implement the cxr family of functions
6185 more efficiently.
6186
2ca0d207
DH
61872003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6188
6189 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6190 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6191 end of an if-else-if-sequence of checks.
6192
9a069bdd
DH
61932003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6194
6195 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6196 execution. Generalize apply_closure to apply_proc and use that
6197 for call-with-values.
6198
e910e9d2
DH
61992003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6200
6201 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6202 a non closure.
6203
1e498fbd
SJ
62042003-05-30 Stefan Jahn <stefan@lkcc.org>
6205
6206 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6207 appropriately for mingw32 hosts.
6208
6209 * numbers.h: Defining copysign(), isnan() and finite() to
6210 be prefixed by a single '_' for mingw32 hosts.
6211
c47e2599
KR
62122003-05-30 Kevin Ryde <user42@zip.com.au>
6213
6214 * numbers.c (z_negative_one): New variable.
6215 (scm_init_numbers): Initialize it.
6216 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6217
2e945bcc
SJ
62182003-05-29 Stefan Jahn <stefan@lkcc.org>
6219
6220 * win32-dirent.c: Use malloc() instead of scm_malloc().
6221
6222 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6223 warning.
6224
6225 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6226 mingw32 build.
6227
6228 * modules.c (s_scm_module_import_interface): Renamed local
6229 variable interface to _interface. Seems like 'interface'
6230 is a special compiler directive for the mingw32 compiler.
6231
6232 * mkstemp.c: Provide prototype to avoid compiler warning.
6233
6234 * load.c (s_scm_search_path): Fixed absolute and relative
6235 path detections for native Windows platforms.
6236
6237 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6238 to build on mingw32).
6239
6240 * gc-freelist.c ("s_scm_map_free_list",
6241 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6242
6243 * fports.c (fport_fill_input): Disable use of
6244 fport_wait_for_input() on Win32 platforms.
6245
6246 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6247
6248 * Makefile.am: Modified some rules for cross compiling.
6249
ddd8f927
DH
62502003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6251
6252 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6253 proper function object and the correct number of arguments are now
6254 performed in the application part of SCM_CEVAL.
6255
6256 (scm_badformalsp): Removed.
6257
f8ba2197
DH
62582003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6259
6260 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6261
79f55b7c
MD
62622003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6263
a502595f
MD
6264 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6265 always being false by inserting preprocessor conditional. (Thanks
6266 to Bruce Korb.)
6267
79f55b7c
MD
6268 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6269 (void *) in order to avoid an aliasing warning; thanks to Bruce
6270 Korb.)
6271
6272 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6273
6274 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6275 SCM_STACK_PTR.
6276
6277 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6278 thread->base --> t->base.
6279
6280 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6281
47dee228
MV
62822003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6283
6284 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6285 scm_variable_set_name_hint, scm_builtin_variable,
6286 scm_internal_with_fluids, scm_make_gsubr,
6287 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6288 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6289 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6290 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6291 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6292 scm_make_subr_with_generic, scm_make_subr_opt,
6293 scm_call_catching_errors, scm_make_smob_type_mfpe,
6294 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6295 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6296 branch. Some have been slightly rewritten.
6297 (scm_i_object_chars, scm_i_object_length): New, to support
6298 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6299
e681d187
DH
63002003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6301
6302 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6303 names and inits in the memoized code of do.
6304
7e59d9d4
MD
63052003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6306
6307 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6308 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6309 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6310 a compilation error if error-on-warning is enabled).
6311
9950a42c
MV
63122003-05-17 Marius Vollmer <mvo@zagadka.de>
6313
6314 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6315 removes preprocessor directives from the snarfage that might
6316 otherwise confuse us. These directives appear when compiling with
6317 "-g3", for example.
6318
0068984b
HWN
63192003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6320
26e68795
HWN
6321 * ChangeLog: add my surname
6322
0068984b
HWN
6323 * srcprop.c (scm_finish_srcprop): use
6324 scm_gc_register_collectable_memory()
6325 (scm_make_srcprops): idem.
6326
131805f0
HWN
63272003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6328
6329 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6330 wrap-around for scm_mtrigger
6331 (scm_gc_register_collectable_memory): abort on overflowing
6332 scm_mallocated().
6333
d4611024
KR
63342003-05-13 Kevin Ryde <user42@zip.com.au>
6335
6336 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6337 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6338
7aaf8dc9
MD
63392003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6340
dfd03fb9
MD
6341 * backtrace.c (scm_display_error_message): Introduced fancy
6342 printing with max level 7 and length 10. (Purpose: avoid printing
6343 gigantic objects in error messages.)
6344
6345 * print.c, print.h (scm_i_port_with_print_state): New function.
6346
6347 * print.c (scm_iprin1, scm_printer_apply,
6348 scm_port_with_print_state): Use scm_i_port_with_print_state.
6349 (scm_simple_format): Modified not to destroy print states.
6350 (print_state_mutex): New mutex.
6351 (scm_make_print_state, scm_free_print_state, scm_prin1):
6352 Lock/unlock print_state_mutex.
6353
7aaf8dc9
MD
6354 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6355 Use current names in definitions.
6356
a4d9ffa1
KR
63572003-05-10 Kevin Ryde <user42@zip.com.au>
6358
6359 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6360
d25e96a4
KR
6361 * numbers.c (scm_integer_length): On negative bignums, adjust
6362 mpz_sizeinbase to account for it looking at absolute value where we
6363 want ones-complement.
6364
6365 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6366 since we're only using the ulong return value, and x might not fit.
6367
5bf6a6f0
DH
63682003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6369
6370 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6371 read. This will allow to make the definition in read.c static.
6372
f58c472a
DH
63732003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6374
6375 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6376 from evalext to eval. This will allow to make some of the
6377 definitions in eval.c static.
6378
90382aeb
KR
63792003-05-06 Kevin Ryde <user42@zip.com.au>
6380
6381 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6382 (scm_logcount): Use mpz_com, not mpz_neg.
6383
3b88ed2a
DH
63842003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6385
6386 The purpose of this patch is to make guile's internal memoizers
6387 distinguishable from memoizing macros created on the scheme level
6388 or from user provided primitive memoizing macros. The reason is,
6389 that the internal memoizers are the only ones that are allowed to
6390 transform their scheme input into memoizer byte code, while all
6391 other memoizing macros may only transform scheme code into new
6392 scheme code.
6393
6394 To achieve this, a new macro type 'builtin-macro!' is introduced.
6395 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6396 this will change when the memoizer and executor are separated.
6397
6398 * macros.[ch] (scm_i_makbimacro): New.
6399
6400 * macros.h (SCM_BUILTIN_MACRO_P): New.
6401
6402 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6403
6404 * eval.c, goops.c: All of guile's primitive memoizing macros are
6405 primitive builtin-macros now.
6406
6407 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6408 builtin-macros are handled equally to memoizing macros.
6409
b0780eb1
MV
64102003-05-04 Marius Vollmer <mvo@zagadka.de>
6411
6412 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6413 work around a bug in GCC 2.95.2 but is now a bug in itself.
6414
1cbf4fe9
MV
64152003-05-02 Marius Vollmer <mvo@zagadka.de>
6416
6417 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6418 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6419 scm_tcs_symbols): New.
6420
1a61d41b
MV
64212003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6422
096ecbaf
MV
6423 * deprecated.h, deprecated.c (scm_protect_object,
6424 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6425 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6426 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6427 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6428 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6429 scm_ptob_descriptor, scm_port_rw_active,
6430 scm_close_all_ports_except): New.
6431
1a61d41b
MV
6432 * ports.c (scm_c_port_for_each): New function, mostly copied from
6433 scm_port_for_each.
6434 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6435 * ports.h (scm_c_port_for_each): New prototype.
6436
c8e1d354
MD
64372003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6438
6439 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6440 macro was introduced in anticipation of GOOPS method compilation
6441 code.)
6442
6443 * goops.c: Removed binding of @dispatch.
6444
a4aa2134
DH
64452003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6446
6447 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6448 instructions that bind the macros on the scheme level back to
6449 goops.c in order to make sure again that the bindings go into the
6450 (oop goops) module and are not visible from the outside.
6451
9fbee57e
DH
64522003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6453
6454 * eval.c: Non functional change: Separated R5RS and non-R5RS
6455 macros into different sections of the file and ordered the
6456 memoizers alphabetically.
6457
12841895
DH
64582003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6459
6460 * eval.c (scm_ilookup): Rewritten to improve readability.
6461
6a3f13f0
DH
64622003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6463
6464 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6465 Partially reverted patch from 2003-04-23 in oder to find a better
6466 compromise between readability and debuggability.
6467
b0c5d67b
DH
64682003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6469
6470 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6471 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6472 definitions of the special goops memoizers from goops.[ch] to
6473 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6474 throughout guile.
6475
b9ad392e
MD
64762003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6477
6478 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6479
6480 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6481
6482 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6483
6484 * ioext.c (scm_fdes_to_ports): Ditto.
6485
6486 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6487 lock/unlock scm_i_port_table_mutex.
6488
6489 * strports.c (scm_mkstrport): Ditto.
6490
6491 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6492
6493 * fports.c (scm_fdes_to_port): Ditto.
6494
d0b07b5d
DH
64952003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6496
6497 This set of patches contains no functional changes, only debatable
6498 minor stylistic ones. Still, in order to prepare a patch between
6499 my local copy and the CVS version, I decided to submit the changes
6500 below. Then, the patch will hopefully only contain relevant
6501 modifications :-)
6502
6503 * eval.c (iqq): Added const specifier.
6504
6505 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6506 Use NULL instead of 0 to indicate that a pointer is returned.
6507 Removed some misleading 'fall through' comments.
6508
6509 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6510 Split up long expressions into smaller ones to be more debugging
6511 friendly.
6512
a98e8e98
DH
65132003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6514
6515 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6516 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6517 rather than casting to SCM.
6518
c178c3a6
DH
65192003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6520
6521 * sort.c, pairs.h: Removed unnecessary includes.
6522
d339981a
DH
65232003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6524
6525 * sort.c: Replaced hand-made trampline code by the new official
6526 mechanism from eval.c. This fixes a segfault in the new test file
6527 sort.test.
6528
6529 (quicksort, compare_function, scm_restricted_vector_sort_x,
6530 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6531 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6532 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6533 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6534 eval.c.
6535
6536 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6537 cmp_fun_t): Removed.
6538
6539 (compare_function): Added.
6540
6541 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6542 arithmetics with index arithmetics. Changed quicksort to work on
6543 an array of SCM values instead of an array of characters. Avoid
6544 bytewise copying of SCM elements. Avoid allocating memory on the
6545 stack with alloca. Fixed some comments.
6546
821f18a4
DH
65472003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6548
6549 * eval.c (EXTEND_ENV): Eliminated.
6550
6551 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6552 EXTEND_ENV.
6553
94fb5a6e
DH
65542003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6555
6556 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6557
6558 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6559 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6560
6561 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6562 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6563 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6564 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6565 functions such that they check if the object is a non-immediate.
6566 Further, renamed identifiers to use the scm_dbg_ prefix and made
6567 their inclusion into the lib dependent of the
6568 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6569
fce0b22d
DH
65702003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6571
6572 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6573 debug option.
6574
1685446c
DH
65752003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6576
821f18a4 6577 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6578 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6579 any calls to SCM_NCONSP any more.
6580
6581 * unif.c (l2ra): Eliminate redundant check.
6582
9ff1720f
DH
65832003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6584
6585 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6586 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6587 SCM_NNULLP. Now, guile itself does not include any calls to
6588 SCM_NNULLP any more.
6589
05b15362
DH
65902003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6591
6592 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6593 scm_copy_tree): Place assignment expressions which are part of
6594 other expressions into an expression of their own.
6595
0c88d7df
DH
65962003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6597
6598 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6599 compare SCM values with !=.
6600
5cb22e96
DH
66012003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6602
6603 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6604 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6605 and definition of the memoizer for the generalized set! macro from
6606 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6607 define the macro object.
6608
6609 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6610 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6611 eval.c, it is made static and renamed to s_set_x.
6612
6613 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6614 over SCM_N<foo>.
6615
a44a9715
DH
66162003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6617
6618 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6619 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6620 to undefineds and registered the object as a permanent object.
6621
6622 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6623 static in eval.c, renamed it to f_apply and registered the object
6624 as a permanent object.
6625
1b43d24c
DH
66262003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6627
5cb22e96 6628 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6629 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6630
aec16f99
DH
66312003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6632
6633 * numbers.c (scm_logtest): Fixed argument bug in the call to
6634 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6635
f96460ce
DH
66362003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6637
6638 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6639 type errors that showed up when compiling with SCM_DEBUG defined.
6640
d0f6ceb8
DH
66412003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6642
6643 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6644 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6645 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6646 fix compile errors with --disable-deprecated.
6647
19a7a089
RB
66482003-04-17 Rob Browning <rlb@defaultvalue.org>
6649
6650 * numbers.c (scm_integer_expt): fix case where we were declaring
6651 vars in the middle of a statement block. Thanks to Thamer
6652 Al-Harbash.
6653
47cd67db
MD
66542003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6655
0fd7dcd3
MD
6656 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6657 change.
6658
47cd67db
MD
6659 * eq.c (scm_eqv_p): Turned into a primitive generic.
6660
3b8b889c
RB
66612003-04-16 Rob Browning <rlb@defaultvalue.org>
6662
312006bb
RB
6663 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6664 Thanks to Boyd Gerber.
6665 Added check for __arm__ in addition to arm for LINUX and copied
6666 __s390__ defines from upstream libgc. Thanks to James Treacy for
6667 reporting the problems.
c7ef2ea1 6668
3b8b889c
RB
6669 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6670
6671 * socket.c: use SCM_CHAR_BIT.
6672
6673 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6674
6675 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6676
43261b39
MD
66772003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6678
6679 * feature.c (scm_init_feature): Always add threads feature.
6680
58241edc
MD
66812003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6682
6683 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6684 scm_at_assert_bound_ref. (We don't want the unbound check. See
6685 oop/goops/active-slot.scm.)
6686
94e91275
RB
66872003-04-14 Rob Browning <rlb@defaultvalue.org>
6688
6689 * tags.h: scm_t_intptr should have been intptr_t.
6690
3071ea27
RB
66912003-04-13 Rob Browning <rlb@defaultvalue.org>
6692
6693 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6694 test. Instead use
6695 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6696 as gc_os_dep.c suggests is appropriate.
6697
6698 * goops.c (prep_hashsets): make static to match prototype.
6699 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6700 Chin.
6701
6702 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6703 Albert Chin.
6704
6705 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6706 Klausner.
6707
21ab2aeb
MD
67082003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6709
6710 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6711 indicated through extra fields in getters-n-setters.
6712 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6713 (Thanks to Andy Wingo.)
6714
dff96e95
HWN
67152003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6716
6717 * gc-segment.c: add comment
6718
07921c76
RB
67192003-04-07 Rob Browning <rlb@defaultvalue.org>
6720
b5331f10
RB
6721 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6722 clash.
6723
07921c76
RB
6724 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6725 and add regression test to standalone/.
6726
67272003-04-06 Rob Browning <rlb@defaultvalue.org>
6728
6729 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6730 Thanks to Dale P. Smith.
6731
6732 * random.c: #include gmp.h.
6733 (scm_c_random_bignum): normalize result on return.
6734
6735 * init.c: #include gmp.h.
6736
6737 * numbers.h: remove the gmp.h #include (not needed now).
6738
6739 * posix.h: change occurences of "id" to something else so we don't
6740 cause trouble when included via objective-c (can't hurt, might
6741 help). Still have usage in debug.h, though.
6742
938f6b7c
MD
67432003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6744
372691d8
MD
6745 * random.c (scm_c_random_bignum): Don't generate a random number
6746 equal to m (the second argument of scm_c_random_bignum); only
6747 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6748 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6749 scm_var_random_state.
372691d8 6750
938f6b7c
MD
6751 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6752 clause.
6753
6cdb8c3f
RB
67542003-04-05 Rob Browning <rlb@defaultvalue.org>
6755
938f6b7c 6756 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6757 uses before any code.
6758
15635be5
MD
67592003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6760
1ecfd013
MD
6761 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6762 not top_srcdir.
6763
15635be5
MD
6764 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6765 processing it in order to avoid an infinite loop.
6766
6767 * print.c (scm_prin1): Remember old state of pstate->writingp.
6768
73be1d9e
MV
67692003-04-05 Marius Vollmer <mvo@zagadka.de>
6770
6771 * Changed license terms to the plain LGPL thru-out.
6772
ad815c06
RB
67732003-04-04 Rob Browning <rlb@defaultvalue.org>
6774
6775 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6776 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6777 rewrite to handle GMP bignums.
6778
6779
6780 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6781
6782 * ports.c (scm_getc): minor tweak.
6783
6784 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6785 rewrite to handle GMP bignums.
6786
6787 * numbers.c: rewrite *many* functions to handle GMP bignums.
6788
6789 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6790 handle GMP bignums.
6791
6792 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6793
6794 * init.c (check_config): remove SCM_BIGDIG conditionals.
6795 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6796
6797 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6798
6799 * eval.c: remove SCM_BIGDIG conditionals.
6800
6801 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6802
6cdb8c3f
RB
68032003-03-31 Rob Browning <rlb@defaultvalue.org>
6804
6805 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6806 to Kevin Ryde.)
6807
68082003-03-27 Rob Browning <rlb@defaultvalue.org>
6809
6810 * threads.h: fix various preprocessor usages of new public
6811 symbols to expect 0 or 1 values rather than 1 or undefined.
6812 i.e. change #ifdef to #if, etc.
6813
6814 * threads.c: fix various preprocessor usages of new public
6815 symbols to expect 0 or 1 values rather than 1 or undefined.
6816 i.e. change #ifdef to #if, etc.
6817
6818 * tags.h: fix various preprocessor usages of new public
6819 symbols to expect 0 or 1 values rather than 1 or undefined.
6820 i.e. change #ifdef to #if, etc.
6821
6822 * stacks.c: 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 * stackchk.h: 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 * stackchk.c: 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 * sort.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 * read.c: 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 * random.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 * print.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 * objects.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 * numbers.h: 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 * null-threads.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 * lang.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 * lang.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 * iselect.h: 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 * init.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 * gh_data.c: 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 * gh.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 * gen-scmconfig.c: change most new public symbols to be defined to
6887 0 or 1 rather than being either 1 or undefined.
6888
6889 * gc_os_dep.c: fix various preprocessor usages of new public
6890 symbols to expect 0 or 1 values rather than 1 or undefined.
6891 i.e. change #ifdef to #if, etc.
6892 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6893
6894 * gc.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 * gc-card.c: fix various preprocessor usages of new public
6899 symbols to expect 0 or 1 values rather than 1 or undefined.
6900 i.e. change #ifdef to #if, etc.
6901
6902 * gc-mark.c: fix various preprocessor usages of new public
6903 symbols to expect 0 or 1 values rather than 1 or undefined.
6904 i.e. change #ifdef to #if, etc.
6905
6906 * feature.c: 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 * evalext.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 * eval.h: 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 * eval.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 * eq.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 * coop.c: 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 * coop-threads.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 * coop-pthreads.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-defs.h: 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 * convert.i.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 * continuations.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 * _scm.h: fix various preprocessor usages of new public symbols to
6951 expect 0 or 1 values rather than 1 or undefined. i.e. change
6952 #ifdef to #if, etc.
6953
d11d697a
MV
69542003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6955
9686f86d
MV
6956 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6957
6958 * deprecated.c, deprecated.h: New files, to collect deprecated
6959 things in one place.
6960 * Makefile.am: Added them in all the right places.
6961
d11d697a
MV
6962 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6963 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6964 builds work.
9686f86d
MV
6965 (DOT_X_FILES): Removed "iselect.x".
6966 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 6967
e3c0c3b9
RB
69682003-03-25 Rob Browning <rlb@defaultvalue.org>
6969
6970 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6971 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6972
6973 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6974
6975 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6976
6977 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6978 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6979
6980 * threads.h: replace usage of struct timespect with
6981 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6982 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6983 favor of scm_t_timespec from scmconfig.h.
6984
6985 * threads.c: move libguile/_scm.h include to the top so we pick up
6986 any critical defines like _GNU_SOURCE early. Replace usage of
6987 struct timespect with scm_t_timespec. Replace usage of
6988 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6989 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6990
6991 * threads-plugin.h: replace usage of struct timespect with
6992 scm_t_timespec.
6993
6994 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6995 usage of struct timespect with scm_t_timespec.
6996
6997 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6998 HAVE_INTTYPES_H handling to scmconfig.h. #include
6999 "libguile/__scm.h". Rework handling for scm_t_bits,
7000 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
7001 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
7002 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
7003 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
7004 SCM_HAVE_ARRAYS.
7005
7006 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
7007
7008 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7009
7010 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7011
7012 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7013
7014 * stime.h: move handling of time related headers to scmconfig.h.
7015
7016 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7017
7018 * stacks.c: replace usage of STACK_GROWS_UP with
7019 SCM_STACK_GROWS_UP.
7020
7021 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7022 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7023
7024 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7025 of uint32 and HAVE_UINT_32 with scm_t_int32.
7026
7027 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7028
7029 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7030
7031 * script.c: #include <config.h> if HAVE_CONFIG_H.
7032
7033 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7034
7035 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7036
7037 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7038
7039 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7040
7041 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7042
7043 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7044
7045 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7046 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7047 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7048 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7049
7050 * ramap.c: replace usage of HAVE_LONG_LONGS with
7051 "SCM_SIZEOF_LONG_LONG != 0".
7052
7053 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7054 "libguile/scmconfig.h".
7055
7056 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7057
7058 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7059 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7060
7061 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7062
7063 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7064
7065 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7066
7067 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7068 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7069 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7070 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7071 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7072 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7073 "SCM_SIZEOF_LONG_LONG != 0".
7074
7075 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7076 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7077 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7078 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7079
7080 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7081
7082 * null-threads.h: replace usage of struct timespect with
7083 scm_t_timespec.
7084
7085 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7086
7087 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7088 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7089 scm_t_uint64 and rename usages.
7090
7091 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7092
7093 * load.c: #include <config.h> if HAVE_CONFIG_H.
7094
7095 * iselect.h: move handling of time related headers to scmconfig.h.
7096 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7097 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7098 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7099
7100 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7101 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7102 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7103
7104 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7105
7106 * inline.h: #include "libguile/__scm.h" at the top. Change code
7107 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7108 what to do instead of creating a new public #define. Rename usage
7109 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7110 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7111 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7112
7113 * inline.c: rearrange handling -- now we just #define
7114 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7115 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7116 appropriate, and we use that in inline.h along with the above
7117 define to determine how to respond.
7118
7119 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7120 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7121
7122 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7123
7124 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7125 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7126
7127 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7128
7129 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7130
7131 * gen-scmconfig.c: new file -- see comments in file for details.
7132
7133 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7134
7135 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7136 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7137
7138 * gc.h: replace usage of SIZEOF_LONG with
7139 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7140 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7141 since we handle that in scmconfig.h now.
7142
7143 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7144
7145 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7146 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7147 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7148
7149 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7150
7151 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7152 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7153
7154 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7155
7156 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7157
7158 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7159 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7160
7161 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7162
7163 * evalext.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 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7167 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7168 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7169 with "SCM_SIZEOF_LONG_LONG != 0".
7170
7171 * error.c: #include <config.h> if HAVE_CONFIG_H.
7172
7173 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7174 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7175 with "SCM_SIZEOF_LONG_LONG != 0".
7176
7177 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7178
7179 * coop.c: replace usage of struct timespect with scm_t_timespec.
7180 #include <config.h> if HAVE_CONFIG_H.
7181
7182 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7183 usage of struct timespect with scm_t_timespec. Replace usage of
7184 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7185
7186 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7187 usage of struct timespect with scm_t_timespec. Replace usage of
7188 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7189
7190 * coop-defs.h: move handling of time related headers to
7191 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7192 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7193 timespect with scm_t_timespec.
7194
7195 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7196
7197 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7198
7199 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7200 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7201
7202 * continuations.c: move libguile/_scm.h include to the top so we
7203 pick up any critical defines like _GNU_SOURCE early.
7204
7205 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7206
7207 * async.c: #include <config.h> if HAVE_CONFIG_H.
7208
7209 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7210
7211 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7212 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7213
7214 * __scm.h: move libguile/scmconfig.h include up to the top, so
7215 we're sure to pick up any critical defines like _GNU_SOURCE early.
7216 #include <limits.h> removed in favor of scmconfig.h inclusion when
7217 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7218 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7219 scmconfig.h inclusion when appropriate. Various Win32 related
7220 definitions removed in favor of scmconfig.h inclusion when
7221 appropriate.
7222 (HAVE_UINTPTR_T): definition removed (see NEWS).
7223 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7224 (HAVE_LONG_LONGS): definition removed (see NEWS).
7225 (HAVE_LONG_LONG): definition removed (see NEWS).
7226 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7227
7228 * Makefile.am: scmconfig.h is now generated by building and
7229 running gen-scmconfig.h and capturing its output. gen-scmconfig
7230 uses config.h and the configure.in generated gen-scmconfig.h to
7231 decide what to output. See gen-scmconfig.c for details.
7232 (noinst_PROGRAMS): add gen-scmconfig.
7233 (gen_scmconfig_SOURCES): new variable.
7234 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7235 cross-compiling right.
7236 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7237 (BUILT_SOURCES): add scmconfig.h.
7238
25e0bf97
MV
72392003-03-19 Marius Vollmer <mvo@zagadka.de>
7240
7241 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7242 Adrian Bunk. Thanks!
7243
74b6d6e4
MD
72442003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7245
7246 * goops.c (make_class_from_template): New fourth arg:
7247 applicablep.
7248 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7249 cpls.
7250
7251 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7252
7253 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7254 second arg: applicablep.
7255 (scm_i_inherit_applicable): New function.
7256
7257 * goops.c, goops.h (scm_class_applicable,
7258 scm_class_extended_accessor): New classes.
7259
5c9e7dad
DH
72602003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7261
7262 * procs.c (scm_procedure_documentation): Removed redundant
7263 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7264 predicates.
7265
f8af5c6d
MD
72662003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7267
c614a00b
MD
7268 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7269
109c2c9f
MD
7270 * modules.c (scm_module_import_interface): New function.
7271
f8af5c6d
MD
7272 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7273 scm_class_accessor.
7274 (scm_class_accessor): New class.
7275
a48d60b1
MD
72762003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7277
7278 * goops.c (scm_primitive_generic_generic): Enable primitive
7279 generic if not enabled.
7280 (scm_sys_goops_loaded): Setup unextended primitive generics.
7281
7282 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7283
7284 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7285 snarf macros.
7286
7287 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7288 testing example. All uses of SCM_GPROC should be converted.)
7289
7290 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7291 scm_assoc.
7292
7293 * eq.c (scm_equal_p): Turned into a primitive generic.
7294
84edc049
RB
72952003-02-27 Rob Browning <rlb@defaultvalue.org>
7296
7297 * Makefile.am (scmconfig.h): new target -- generate file from
7298 ../config.h.
7299 (modinclude_HEADERS): remove version.h.
7300 (nodist_modinclude_HEADERS): add version.h.
7301
ea5c9285
MD
73022003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7303
b4a1358c
MD
7304 This fixes a serious GC bug, introduced during the latest
7305 reorganization of the GC, which disabled freeing of structs and
7306 GOOPS objects:
7307
7308 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7309 SCM_EOL.
53af8255
MD
7310 (scm_struct_prehistory): Move scm_free_structs to
7311 scm_before_mark_c_hook.
ea5c9285 7312
b4a1358c
MD
7313 * gc-card.c (sweep_card): Check that we haven't swept structs on
7314 this card before. That can happen if scm_i_sweep_all_segments has
7315 been called from some other place than scm_igc.
7316
c35738c1
MD
73172003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7318
231a4ea8
MD
7319 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7320 (since hash tables now adapt their size).
7321
7322 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7323 (current number of prehistory bindings; hashtable code will select
7324 a prime which is greater than this value).
7325
7326 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7327 (current number of initial symbols).
7328
7329 * properties.c (scm_init_properties): Don't specify size of
7330 scm_properties_whash.
7331
7332 * objprop.c (scm_init_objprop): Don't specify size of
7333 scm_object_whash.
7334
7335 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7336
c35738c1
MD
7337 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7338
7339 The following changes introduce the use of resizable hash tables
7340 throughout Guile. It also renames the old *-hash-table* functions
7341 to *-alist-vector* and places them, together with the rest of the
7342 weak vector support, in the module (ice-9 weak-vector). We should
7343 probably introduce a new, better, API for weak references, for
7344 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7345 look like and are used like ordinary pairs.)
7346
7347 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7348 leaf_environment_fold, obarray_remove_all): Use hashtable
7349 accessors.
7350
7351 * gc.c (scm_init_storage): Moved hook initialization to
7352 scm_storage_prehistory.
7353 (scm_storage_prehistory): New function.
7354 (scm_igc): Added commentary about placement of
7355 scm_after_sweep_c_hook.
7356
7357 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7358 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7359 SCM_WVECT_WEAK_VALUE_P.
7360
7361 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7362 functions.
7363 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7364 Removed.
7365 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7366 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7367
7368 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7369 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7370
7371 * modules.c (module-reverse-lookup): Use hashtable accessors.
7372
7373 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7374
7375 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7376 scm_make_weak_value_alist_vector,
7377 scm_make_doubly_weak_alist_vector): New functions.
7378
7379 * weaks.c (scm_init_weaks_builtins): New function.
7380
7381 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7382 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7383 SCM_WVECT_NOSCAN_P): New macros.
7384
7385 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7386 and SCM_WVECT_WEAK_VALUE_P.
7387
7388 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7389 allocate_weak_vector and exported.
7390
0a4c1355
MD
73912003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7392
7393 * hashtab.c: Undid thread safety. (We decided that it's better to
7394 let the user explicitly protect the tables (or not) according what
7395 is suitable for the application.)
7396
87ca11ff
MD
73972003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7398
7399 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7400 thread safe and handle resizing tables.
7401 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7402 SCM_DEFER/ALLOW_INTS.
7403
f59a096e
MD
74042003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7405
7406 * hashtab.c (scm_vector_to_hash_table,
7407 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7408 functions.
7409 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7410 safe and handle resizing tables.
7411
7412 * weaks.c (scm_make_weak_key_hash_table,
7413 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7414 Size argument made optional. Return resizable table if not
7415 specified.
7416
4b612c5b
MD
74172003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7418
7419 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7420 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7421
b3d7f6df
MD
74222003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7423
7424 * debug.c (scm_procedure_source): Handle all objects for which
7425 procedure? is #t. (Thanks to Bill Schottstaedt.)
7426
756414cf
MD
74272003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7428
361d631f
MD
7429 * futures.c (mark_futures): Don't need to mark data of recycled
7430 futures.
7431 (scan_futures, cleanup_undead): Be smarter about marking
7432 futures---avoid unnecessary passes through future lists.
7433
756414cf
MD
7434 * futures.h, futures.c: New files; Introduced recycling of
7435 futures. For fine-grained threading this lifts performance to
7436 another level. We can now use parallelization in inner loops of
7437 Guile programs without impossible overhead.
7438
7439 * threads.h, threads.c: Moved futures to their own file.
7440
7441 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7442 (DOT_X_FILES): Added futures.x.
7443 (DOT_DOC_FILES): Added futures.doc.
7444 (modinclude_HEADERS): Added futures.h.
7445
7446 * threads.c, threads.h (scm_i_create_thread): Renamed from
7447 create_thread and made global.
7448
7449 * futures.c (scm_make_future): New procedure.
7450
7451 * eval.c: #include "libguile/futures.h".
7452
7453 * init.c: #include "futures.h"
7454 (scm_init_guile_1): Call scm_init_futures.
7455
7456 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7457
7458 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7459
7460 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7461 functions.
7462
7463 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7464
b4debead
MD
74652003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7466
7467 * threads.c (create_thread): Don't unwind dynwind chain of parent
7468 thread before creation. Just start the new thread with an empty
7469 dynwind chain.
7470
93f26b7b
MD
74712003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7472
7473 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7474
38d8927c
MD
74752003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7476
41c96c32
MD
7477 * threads.c (scm_timed_wait_condition_variable): Support timed
7478 waiting also for simple condition variables.
7479
38d8927c
MD
7480 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7481 of calling the procedure change-object-class.
7482
9cf5d9b7
MD
74832003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7484
7485 * ramap.c (scm_ramapc): Typo in error message.
7486
bbf8d523
MD
74872003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7488
b46fae00
MD
7489 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7490 slots with instance allocation.
7491
bbf8d523
MD
7492 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7493 class.
7494 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7495
7496 * goops.c (scm_generic_function_methods): Support extended
7497 generic functions.
7498
ebf9b47c
MD
74992002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7500
7501 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7502 Thanks to Neil for pointing this out!
ebf9b47c 7503
14a9ba3f
NJ
75042002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7505
7506 * lang.h: Remove declarations matching definitions removed from
7507 lang.c (just below).
7508
c6a040a8
NJ
75092002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7510
6054d805
NJ
7511 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7512 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7513 and already commented out.
7514
c6a040a8
NJ
7515 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7516 scm_lreadparen): Support reading vectors with Elisp syntax if
7517 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7518 is not currently defined, and there isn't even a configure switch
7519 to enable it yet.)
7520
3742c12f
MV
75212002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7522
7523 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7524 builds work.
7525 (EXTRA_DIST): Added version.h.in.
7526
fb50ef08
MD
75272002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7528
7529 This change makes it possible for one thread to do lazy sweeping
7530 while other threads are running. Now only the mark phase need to
7531 have all threads asleep. We should look further into this issue.
7532 Presently, I've put the locking of scm_i_sweep_mutex at
7533 "conservative" places due to my current lack of knowledge about
7534 the garbage collector. Please feel free to restrict these regions
7535 further to allow for maximal parallelism!
7536
7537 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7538
7539 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7540 scm_gc_register_collectable_memory): Substitute locking of
7541 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7542 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7543 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7544 the single-thread section (which now only contains the mark
7545 phase).
7546 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7547 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7548
7549 * threads.c (gc_section_mutex): Removed.
7550
9ed24633
MD
75512002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7552
0d48aca5
MD
7553 * threads.c (create_thread): Clear parent field in root state in
7554 order not to unnecessarily remember dead threads.
7555
9ed24633
MD
7556 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7557 (scm_trampoline_1, scm_trampoline_2): Use them.
7558
29717c89
MD
75592002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7560
7561 Partial introduction of real plugin interface.
7562
7563 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7564 (EXTRA_DIST): Added threads-plugin.c.
7565
7566 * threads-plugin.h, threads-plugin.c: New files.
7567
7568 * threads.h: #include "libguile/threads-plugin.h".
7569
7570 * threads.c: #include "libguile/threads-plugin.c".
7571
7572 * pthread-threads.c: Temporarily remove debugging functions.
7573
7574 * threads.c, threads.h (scm_yield): Added back.
7575
e29e0b09
MD
75762002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7577
7578 * threads.c (really_launch): Detach before unlocking
7579 thread_admin_mutex in order not to risk being joined.
7580 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7581 thread_admin_mutex locked during GC.
7582
7583 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7584 functions.
7585
0b6843b1 75862002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7587
6da2dfc4
MD
7588 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7589 support for debugging mutex operations.
7590
1b92fb6b
MD
7591 * threads.c (scm_thread): Removed filed joining_threads.
7592 (thread_print): Print thread number as well as address of thread
7593 structure.
0b6843b1
MD
7594 (scm_join_thread): Bugfix.
7595 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7596 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7597 scm_broadcast_condition_variable): Use the low-level API.
7598 (scm_all_threads): Return copy of thread list (to prevent
7599 unintended destruction).
7600 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7601
93cd4dcd
MD
7602 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7603 pthread "native" recursive mutex support.
7604
2ff4f181
MD
76052002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7606
28d52ebb
MD
7607 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7608 Simply lock a thread C API recursive mutex.
7609 (SCM_NONREC_CRITICAL_SECTION_START,
7610 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7611 SCM_REC_CRITICAL_SECTION_END): Removed.
7612
7613 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7614 direct calls to scm_rec_mutex_lock / unlock around the three calls
7615 to scm_m_expand_body.
7616
7617 * eval.c, eval.h (promise_free): New function.
7618 (scm_force): Rewritten; Now thread-safe; Removed
7619 SCM_DEFER/ALLOW_INTS.
7620
7621 * pthread-threads.h: Added partially implemented plugin interface
7622 for recursive mutexes. These are, for now, only intended to be
7623 used internally within the Guile implementation.
7624
7625 * pthread-threads.c: New file.
7626
7627 * threads.c: Conditionally #include "pthread-threads.c".
7628
7629 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7630 thread-safe;
7631
7632 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7633 SCM_GLOBAL_REC_MUTEX): New macros.
7634
7635 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7636 macros---use mutexes instead.
7637
7638 * tags.h (SCM_IM_FUTURE): New tag.
7639
7640 * eval.c (scm_m_future): New primitive macro.
7641 (SCM_CEVAL): Support futures.
7642 (unmemocopy): Support unmemoization of futures.
7643
7644 * print.c (scm_isymnames): Name of future isym.
7645
2ff4f181
MD
7646 * version.c: Unmade some changes to my private copy that got
7647 committed by mistake.
7648
392d2833
MD
76492002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7650
e200ddee
MD
7651 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7652 2002-12-10.
7653
392d2833
MD
7654 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7655
7656 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7657 logical place.
7658
7659 * threads.c (create_thread): Remember root object until the handle
7660 of the new thread is on all_threads list.
7661
7662 * root.c (scm_make_root): Moved copying of fluids until after
7663 creation of root handle so that the fluids are GC protected. Also
7664 removed the critical section.
7665
c4c52ebe
MD
76662002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7667
960c408c
MD
7668 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7669
3cdde9d6 7670 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7671 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7672 (scm_realloc): Serialize call to realloc
7673 (scm_calloc): Same for calloc.
7674 Thanks to Wolfgang Jaehrling!
7675 (Now we have to make sure all calls to malloc/realloc are made
7676 through scm_malloc.)
7677
960c408c
MD
7678 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7679
c4c52ebe
MD
7680 * threads.c (really_launch): Release heap (to prevent deadlock).
7681 (create_thread): Release heap before locking thread admin mutex.
7682
b0dc3d71
MD
76832002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7684
7685 * threads.c (scm_i_thread_invalidate_freelists): New
7686 function.
7687
7688 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7689
7690 * modules.c (scm_export): Inserted a return statement.
7691
06e80f59
HWN
76922002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7693
7694 * modules.c (scm_export): new function
7695
7696 * gc-card.c: add a note about malloc()/free() overhead.
7697
a12611c3
MD
76982002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7699
7700 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7701 in srcdir.
7702
c7fabadf
MD
77032002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7704
7705 These changes remove scm_ints_disabled (which hasn't has any
7706 effect in Guile for quite some time).
7707
7708 * async.c, error.h (scm_ints_disabled): Removed.
7709
7710 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7711 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7712 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7713 (old_ints): Removed.
7714
7715 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7716 critical section.
7717 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7718 SCM_ALLOW_INTS.
7719
9bc4701c
MD
77202002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7721
52340b65
MD
7722 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7723 Removed accidental #if 0 around these functions.
7724
9bc4701c
MD
7725 These changes are the start of support for preemptive
7726 multithreading. Marius and I have agreed that I commit this code
7727 into the repository although it isn't thoroughly tested and surely
7728 introduces many bugs. The bugs should only be exposed when using
7729 threads, though. Signalling and error handling for threads is
7730 very likely broken. Work on making the implementation cleaner and
7731 more efficient is needed.
7732
7733 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7734 (SCM_NONREC_CRITICAL_SECTION_START,
7735 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7736 SCM_REC_CRITICAL_SECTION_END): New macros.
7737 (SCM_CRITICAL_SECTION_START/END): Defined here.
7738
7739 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7740 the three calls to scm_m_expand_body.
7741
7742 * gc.h: #include "libguile/pthread-threads.h";
7743 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7744
7745 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7746 scm_t_key;
7747
7748 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7749 access.
7750
7751 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7752
7753 * gc-freelist.c, threads.c (really_launch): Use
7754 SCM_FREELIST_CREATE.
7755
7756 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7757
7758 * gc.c (scm_i_expensive_validation_check, scm_gc,
7759 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7760 heap administration so that those pieces of code are executed
7761 single-threaded. We might consider rewriting these code sections
7762 in terms of a "call_gc_code_singly_threaded" construct instead of
7763 calling the pair of scm_i_thread_put_to_sleep () and
7764 scm_i_thread_wake_up (). Also, we would want to have as many of
7765 these sections eleminated.
7766
7767 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7768
7769 * inline.h: #include "libguile/threads.h"
7770
7771 * pthread-threads.h: Macros now conform more closely to the
7772 pthreads interface. Some of them now take a second argument.
7773
7774 * threads.c, threads.h: Many changes.
7775
77762002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7777
7778 * Makefile.am (version.h): Changed $^ --> $< in rule for
7779 version.h.
7780
b2cbe8d8
RB
77812002-12-08 Rob Browning <rlb@defaultvalue.org>
7782
7783 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7784 (SCM_MINOR_VERSION): use @--@ substitution now.
7785 (SCM_MICRO_VERSION): use @--@ substitution now.
7786 (scm_effective_version): new function prototype.
7787
7788 * version.c (scm_effective_version): new function, also add
7789 effective-version.
7790
7791 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7792 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7793 SCM_LIBRARY_DIR.
7794 (version.h): generate this here rather than configure.in. This
7795 approach tracks source edits better (i.e. more immediately).
7796 Might be worth considering for other .in files too.
7797
5441c65c
MV
77982002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7799
7800 Reorganized thread package selection. A thread package now only
7801 implements a small set of pthread like functions and Guile
7802 implements the rest on top of that. Guile's implementation is
7803 what the "coop-pthreads" package has been previously. Support for
7804 "coop" threads has been removed until I get time to add it again.
7805
7806 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7807 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7808 null-threads.c, coop-pthreads.c.
7809 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7810 pthread-threads.h.
7811
7812 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7813
7814 * threads.h: Do not include "libguile/coop-defs.h". Include
7815 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7816 (previously deprecated) C level thread API prototypes. They are
7817 now in the thread package specific headers, "null-threads.h" and
7818 "pthread-threads.h".
7819 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7820 New.
7821 (scm_threads_init): Removed.
7822 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7823 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7824 SCM_I_THREAD_SWITCH_COUNT): Define here.
7825 (scm_single_thread_p): Removed.
7826 (scm_call_with_new_thread): Take two args directly instead of list
7827 of two args.
7828 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7829 SCM_SET_THREAD_LOCAL_DATA): Define here.
7830
7831 * threads.c: Merged with "coop-pthreads.c".
7832
7833 * null-threads.h: Implement pthread-like API as a set of macros.
7834
7835 * pthread-threads.h: New, implement pthread-like API by deferring
7836 to pthread itself.
7837
7838 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7839 has been lost in the reorganization.
7840
504d99c5
MD
78412002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7842
7843 The following change makes it possible to move procedure
7844 application dispatch outside inner loops. The motivation was
7845 clean implementation of efficient replacements of R5RS primitives
7846 in SRFI-1.
7847
7848 The semantics is clear: scm_trampoline_N returns an optimized
7849 version of scm_call_N (or NULL if the procedure isn't applicable
7850 on N args).
7851
7852 Applying the optimization to map and for-each increases efficiency
7853 noticeably. For example, (map abs ls) is 8 times faster than
7854 before.
7855
7856 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7857
7858 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7859
7860 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7861 (map, for-each): Handle also application on two args as a special
7862 case; Use trampolines.
7863
7864 Other changes:
7865
7866 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7867 (subr2oless): Removed.
7868 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7869 vector GC protected.
7870
7871 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7872 scm_out_of_range.
7873
63dd3413
DH
78742002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7875
7876 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7877
4ba5f279
MD
78782002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7879
7880 * debug.c (scm_make_iloc): Added missing "return".
7881
56ae231f
MV
78822002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7883
7884 * strports.c (scm_eval_string_in_module): Validate second arg to
7885 be a module. Thanks to Arno Peters!
7886
80b28865
DH
78872002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7888
7889 * .cvsignore: remove goops.c
7890
c88b1456
DH
78912002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7892
7893 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7894 module_variable, scm_module_lookup_closure,
7895 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7896 scm_system_module_env_p): Don't compare SCM values with C
7897 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7898 over SCM_NFALSEP.
7899
a8a19efc
DH
79002002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7901
7902 * eval.h (SCM_MAKE_ILOC): New macro.
7903
7904 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7905 the iloc bitpattern here.
7906
76734914
MD
79072002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7908
7909 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7910 part of the API, otherwise it's difficult to write Guile
7911 extensions using non-blocking I/O => moved #include
7912 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7913
7914 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7915 s_unlock_mutex.
7916
8b5b4a75
MV
79172002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7918
7919 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7920 are defined in configure.in.
7921
7922 * threads.c: Removed SCM_API from function definitions. SCM_API
7923 is only for declarations.
7924
e5a83084
MD
79252002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7926
9be8bb45
MD
7927 * coop-pthreads.h: Added support for thread specific data to the
7928 generic C API for the coop-pthreads case.
7929
e5a83084
MD
7930 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7931 change.
6c214b62 7932 (scm_cond_broadcast): Added missing function.
e5a83084 7933
7edf178e
MV
79342002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7935
7936 * coop.c (coop_next_runnable_thread): Removed, wich should have
7937 happened when GUILE_ISELECT was hard-wired.
7938
7f5b1b77
MV
79392002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7940
7caa1b07
MV
7941 * Makefile.am (libguile_la_SOURCES): Added threads.c
7942 (DOT_DOC_FILES): Added threads.doc.
7943 (DOT_X_FILES): Added threads.x.
7944 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7945 (noinst_HEADERS): Added coop-pthreads.c.
7946 (modinclude_HEADERS): Added coop-pthreads.h.
7947
7948 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7949 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7950
bb11cbf4
MV
7951 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7952 Thanks to Bill Schottstaedt!
7953
1d4cbbed
MV
7954 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7955
7f5b1b77
MV
7956 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7957 SCM_COPT_THREADS is defined.
7958 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7959 is defined.
7960
7961 * coop-pthreads.c: Some harmless renamings of internal stuff.
7962 (create_thread): New, generalized version of
7963 scm_call_with_new_thread.
7964 (scm_call_with_new_thread): Use it.
7965 (scm_spawn_thread): New, use create_thread.
7966
d52f53b1
MV
79672002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7968
7969 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7970 start testing it now.
7971
7972 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7973 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7974 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7975 is defined.
7976
30f920c3
MV
79772002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7978
7979 * scmsigs.c (signal_cell_handlers, install_handler_data,
7980 scm_delq_spine_x, really_install_handler, install_handler): New
7981 scheme for triggering signal handlers, to simplify take_signal.
7982 (take_signal): Simplified, to avoid race conditions.
7983 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7984 hasn't exited yet.
7985
7986 * async.c (scm_async_click): Reset pending_asyncs, handle
7987 signal_asyncs. Don't set cdr of a non-signal async to #f.
7988 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7989 always. Set pending_asyncs.
7990 (scm_system_async_mark_for_thread): Check that thread has not
7991 exited.
7992 (scm_unmask_signals, decrease_block): Call scm_async_click after
7993 block_asyncs becomes zero.
7994
7995 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7996 active_asyncs.
7997
7998 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7999 fields.
8000 * root.c (root_mark): Mark them.
8001 (make_root): Initialize them.
8002
8003 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
8004 USE_COOP_THREADS.
8005 (scm_internal_select): Define one version for USE_COOP_THREADS and
8006 one for USE_NULL_THREADS.
8007 (scm_init_iselect): Likewise.
8008
8009 * inline.h (scm_cell, scm_double_cell): Also allow
8010 USE_COPT_THREADS to not protect the slot initializers.
8011
8012 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8013 because threads need to be initialized before the stack, but
8014 gsubrs such as scm_timed_condition_variable_wait can only be
8015 created later.
8016
8017 * threads.h: Include "coop-pthreads.h" when requested.
8018 (scm_threads_make_mutex, scm_threads_lock_mutex,
8019 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8020 not implemented anyway.
8021 (scm_init_thread_procs, scm_try_mutex,
8022 scm_timed_condition_variable_wait,
8023 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8024 scm_thread_exited_p): New prototypes.
8025 (struct timespec): Define if not already defined.
8026 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8027 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8028 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8029 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8030 deprecated.
8031
8032 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8033 requested.
8034 (scm_thread_exited_p): New.
8035 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8036 registered procedures.
8037 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8038 Use the latter as the procedure for "wait-condition-variable",
8039 thus offering a optional timeout parameter to Scheme.
8040 (scm_wait_condition_variable): Implement in terms of
8041 scm_timed_wait_condition_variable.
8042 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8043 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8044 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8045 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8046 scm_make_mutex, etc, and deprecate.
8047 (scm_init_threads): Do not create smobs, leave this to
8048 scm_threads_init. Do not include "threads.x" file.
8049 (scm_init_thread_procs): New, include "threads.x" here.
8050
8051 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8052 scm_null_mutex_lock, scm_null_mutex_unlock,
8053 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8054 scm_null_condvar_wait, scm_null_condvar_signal,
8055 scm_null_condvar_destroy): Removed.
8056 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8057 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8058 scm_cond_destory): Do not define, they are now deprecated and
8059 handled by threads.{h,c}.
8060
8061 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8062 (scm_threads_init): Create smobs here, using the appropriate
8063 sizes.
8064 (block): Removed, now unused.
8065 (scm_c_thread_exited_p): New.
8066 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8067 scm_null_mutex_destroy, scm_null_condvar_init,
8068 scm_null_condvar_wait, scm_null_condvar_signal,
8069 scm_null_condvar_destroy): Removed and updated users to do their
8070 task directly.
8071 (scm_try_mutex, timeval_subtract,
8072 scm_timed_wait_condition_variable,
8073 scm_broadcast_condition_variable): New.
8074 (scm_wait_condition_variable): Removed.
8075
8076 * coop-defs.h (coop_m): Added 'level' field.
8077 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8078 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8079 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8080 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8081 define.
8082 (coop_condition_variable_broadcast): New.
8083
8084 * coop-threads.c (scm_threads_init): Create smobs here, using the
8085 appropriate sizes.
8086 (scm_c_thread_exited_p, scm_try_mutex,
8087 scm_timed_wait_condition_variable,
8088 scm_broadcast_condition_variable): New.
8089 (scm_wait_condition_variable): Removed.
8090
8091 * coop.c (coop_new_mutex_init): Initialize level.
8092 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8093 level.
8094 (coop_condition_variable_signal): Renamed to
8095 coop_condition_variable_broadcast and reimplemented in terms of
8096 that. Thus...
8097 (coop_condition_variable_broadcast): New.
8098
8099 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8100
8101 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8102
087ed40d
MV
81032002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8104
65a23095
MV
8105 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8106 of system headers.
8107
087ed40d
MV
8108 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8109 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8110 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8111
5ec1d2c8
DH
81122002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8113
8114 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8115 scm_definedp to scm_defined_p and deprecated scm_definedp.
8116
100ae50d
DH
81172002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8118
8119 * async.h, async.c (scm_system_async): Fixed deprecation to work
8120 correctly when deprecated features are excluded.
8121
2794cb50
MV
81222002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8123
8124 * async.c (scm_system_async_mark_for_thread): Validate thread
8125 argument.
8126
8127 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8128
8129 * feature.c (scm_init_feature): Don't add 'threads' for
8130 USE_NULL_THREADS.
8131
8132 * inline.h (scm_cell, scm_double_cell): Also allow
8133 USE_NULL_THREADS to not protect the slot initializers.
8134
8135 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8136 "USE_THREAD".
8137
8138 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8139 (modinclude_HEADERS): Added null-threads.h.
8140
8141 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8142 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8143 (scm_init_threads): Use generic type names scm_t_mutex and
8144 scm_t_cond instead of coop_m and coop_c.
8145
8146 * null-threads.c, null-threads.h: New files.
8147
ff810d7a
MV
81482002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8149
8150 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8151 This is to support makes that know about "$<" only in pattern
8152 rules, like Sun's make.
8153
a90bdb73
MV
81542002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8155
8156 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8157 substitution. Thanks to David Allouche!
8158
e71a8bf2
DH
81592002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8160
8161 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8162 !SCM_ENABLE_DEPRECATED.
8163
41f77ff5
MV
81642002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8165
504d99c5 8166 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8167 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8168 otherwise.
8169
8170 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8171 USE_THREADS is defined. Use scm_root otherwise.
8172 (scm_sigaction_for_thread): Ignore THREAD argument when
8173 USE_THREADS is not defined. Also, move THREAD argument defaulting
8174 out of HAVE_SIGACTION section, which was a bug.
8175
6d16b125
MV
81762002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8177
8178 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8179 signal_handlers, not the closure that is used as the async.
8180 The closure is stored in signal_handler_cells, as previously.
8181
acfa1f52
MV
81822002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8183
8184 * root.h (scm_root_state): Added 'block_async' slot.
8185 (scm_active_asyncs): Removed abbrev.
8186 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8187
8188 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8189 abbrev.
8190
8191 * async.h (scm_call_with_blocked_asyncs,
8192 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8193 scm_c_call_with_unblocked_asyncs): New prototypes.
8194 (scm_mask_signals, scm_unmask_signals): Deprecated.
8195 (scm_mask_ints): Turned into a macro.
8196 * async.c (scm_mask_ints): Removed.
8197 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8198 this should not be necessary.
8199 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8200 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8201 deprecation warning and check for errornous use. Set block_asyncs
8202 instead of scm_mask_ints.
8203 (increase_block, decrease_block, 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.
8206
8207 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8208 Asyncs are enabled by default.
8209
34010f56
NJ
82102002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8211
8212 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8213 6th element: an input waiting thunk.
8214 (sf_input_waiting): New.
8215
9310d6f2
MV
82162002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8217
8218 * root.c (root_mark): Mark active_asyncs slot.
8219
8220 * async.c (scm_async_click): Set the cdr of a executed handler
8221 cell to SCM_BOOL_F, not SCM_EOL.
8222 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8223 and only if the handler procedure is not already present.
8224 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8225 with SCM_BOOL_F.
8226 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8227
ac48c719
RB
82282002-10-04 Rob Browning <rlb@defaultvalue.org>
8229
1360a142
RB
8230 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8231
8232 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8233 scm_lt_dlopenext, and scm_lt_dlerror.
8234 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8235 and scm_lt_dlerror.
8236 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8237 and scm_lt_dlerror.
8238 (sysdep_dynl_init): switch to scm_lt_dlinit();
8239
8240 * Makefile.am (libguile_la_LIBADD): switch to use
8241 libguile-ltdl.la.
8242
504d99c5 8243 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8244
497092c9
MV
82452002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8246
8247 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8248 * scmsigs.c (got_signal): Removed.
8249 (signal_handler_cells, signal_handler_threads): New.
8250 (take_signal): Queue the cell of the signal for the specified
8251 thread. Reset the signal handler on systems that don't have
8252 sigaction.
8253 (sys_deliver_signals): Removed.
8254 (close_1): New.
8255 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8256 extended to also set the thread of a signal and allocate a cell
8257 for it. Keep the Scheme name "sigaction". Check that signum is
8258 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8259 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8260 (scm_init_scmsigs): Allocate signal_handler_cells and
8261 signal_handler_threads vectors.
8262
8263 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8264 that system asnycs and user asyncs are separated. Reimplemented
8265 system asyncs to work per-thread.
8266
8267 * gc.c (scm_init_gc): Do not use scm_system_async.
8268
8269 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8270 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8271 Removed prototypes.
8272 (scm_i_queue_async_cell): New.
8273
8274 * __scm.h (scm_asyncs_pending_p): Removed.
8275 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8276 scm_asyncs_pending_p.
8277
8278 * async.h (scm_system_async_mark_for_thread): New prototype.
8279
8280 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8281
8282 * root.h (scm_root_state): Added new "active_asyncs" slot.
8283 * root.c (scm_make_root): Initialize it to SCM_EOL.
8284
8285 * coop-defs.h (coop_t): Added new "handle" slot.
8286 * coop-threads.c (all_threads, scm_current_thread,
8287 scm_all_threads, scm_i_thread_root): New.
8288 (scm_threads_init): Add main thread to all_threads.
8289 (scheme_launch_thread): Remove thread from all_threads when it
8290 terminates.
8291 (scm_call_with_new_thread): Initialize handle slot of coop_t
8292 structure and add new thread to all_threads.
8293 (scm_spawn_thread): Likewise.
8294
8295 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8296 * threads.c (scm_current_thread, scm_all_threads): Register as
8297 primitives.
8298
8299 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8300
480fa28d
NJ
83012002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8302
8303 * script.c (scm_compile_shell_switches): Fix bad spelling of
8304 `explicitly' in comment.
8305
83062002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8307
8308 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8309 Refer to provided? in doc string rather than deprecated feature?.
8310
3553e1d1
GH
83112002-09-24 Gary Houston <ghouston@arglist.com>
8312
8313 * inline.h (scm_double_cell): prevent reordering of statements
8314 with any following code (for GCC 3 strict-aliasing).
8315 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8316 the earlier version of the reordering prevention.
8317
4ad0814a
HWN
83182002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8319
8320 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8321
e88e4f2e
HWN
83222002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8323
8324 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8325 protection.
8326
1e71eafb
HWN
83272002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8328
8329 * inline.h: include stdio.h
8330
8331 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8332
61ef9c1f
HWN
83332002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8334
dac04e9f
HWN
8335 * gc-segment.c (scm_i_make_initial_segment): check user settings
8336 for sanity.
8337
8338 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8339 sanity.
dac04e9f
HWN
8340
8341 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8342
ffd72400
HWN
8343 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8344
8345 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8346 these won't ever wrap around with high memory usage. Thanks to
8347 Sven Hartrumpf for finding this.
ffd72400 8348
5bd4a949
HWN
8349 * gc-freelist.c: include <stdio.h>
8350
61ef9c1f
HWN
8351 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8352
ffd0ef3b
MV
83532002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8354
a27e3d14
MV
8355 * vectors.h (SCM_VECTOR_REF): New.
8356
ffd0ef3b
MV
8357 * snarf.h (SCM_DEFINE_PUBLIC): New.
8358
f8a1712b
MV
83592002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8360
8361 * socket.c (scm_addr_vector): Added size of address to arguments.
8362 Use it to avoid accessing a non-existent path in a sockaddr_un.
8363 Changed all callers.
8364
7200a36b
HWN
83652002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8366
1383773b
HWN
8367 * gc.h: remove DOUBLECELL card flags.
8368
8369 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8370 scm_realloc().
8371
8372 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8373 init loop; handle this from scm_init_card_freelist()
8374
8375 * gc-card.c (scm_init_card_freelist): init bit vector here.
8376
7200a36b 8377 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8378 num2float.i.c (FLOAT2NUM): idem
7200a36b 8379
9981de3a
HWN
83802002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8381
8382 * eval.h: prepend libguile/ to include path
8383
19647556
MV
83842002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8385
8386 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8387 years. Thanks to Martin Grabmüller!
19647556 8388
38d1262a
HWN
83892002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8390
8391 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8392 unsigned numbers for computing minimum heap increment. This
8393 prevents weird results when a a negative minimum increment is
8394 computed.
8395
f800ebfb
MV
83962002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8397
8398 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8399 instead of the old tricks.
f800ebfb
MV
8400
8401 * guile-snarf.in: Do not expect the input file to be the first
8402 argument after the optional "-o" option, just pass everything to
8403 the pre-processor without extracting the input file name.
8404
4a5309c9
HWN
84052002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8406
8407 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8408 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8409
f2893a25
HWN
84102002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8411
8412 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8413 Bill Schottstaedt for the bug report
8414
483f518b
MV
84152002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8416
8417 * print.c (scm_iprin1): Print primitives generics always as
8418 "primitive-generic" even when they have no primitive methods yet.
8419
917adc55
GH
84202002-08-17 Gary Houston <ghouston@arglist.com>
8421
8422 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8423 call.
8424
67329a9e
HWN
84252002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8426
85835e59 8427 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8428
8429 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8430 malloc.
8431
8432 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8433 only use SCM_MIN_HEAP_SEG_SIZE.
8434
8435 * ports.c (scm_add_to_port_table): add backwards compatibility
8436 function
8437
8438 * ports.h: use scm_i_ prefix for port table and port table size.
8439
f07c886a
MD
84402002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8441
8442 * vports.c (scm_make_soft_port): Initialize pt variable.
8443
dc61cbc6
MV
84442002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8445
8446 * strports.h (scm_c_eval_string_in_module,
8447 scm_eval_string_in_module): New prototypes.
8448 * strports.c (scm_eval_string_in_module): New, but use
8449 "eval-string" as the Scheme name and make second parameter
8450 optional.
8451 (scm_eval_string): Implement using scm_eval_string_in_module.
8452 (scm_c_eval_string_in_module): New.
8453 Thanks to Ralf Mattes for the suggestion!
8454
da220f27
HWN
84552002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8456
be3ff021
HWN
8457 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8458 message and abort.
8459
8460 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8461
da220f27
HWN
8462 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8463 stead of scm_t_port*. The function now takes a tag argument.
8464
eab1b259
HWN
84652002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8466
8467 * gc.h: add scm_debug_cells_gc_interval to public interface
8468
8469 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8470
8471 * gc.c (scm_i_expensive_validation_check): separate expensive
8472 validation checks from cheap ones.
8473
ba1b2226
HWN
84742002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8475
8476 * read.c (scm_input_error): new function: give meaningful error
8477 messages, and throw read-error
8478
8479 * gc-malloc.c (scm_calloc): add scm_calloc.
8480
39e8f371
HWN
84812002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8482
33138b05
HWN
8483 * tags.h: remove GC bits documentation from the tags table.
8484
39e8f371
HWN
8485 * read.c (INPUT_ERROR): Prepare for file:line:column error
8486 messages for errors in scm_lreadr() and friends.
8487
84882002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8489
8490 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8491 implementation).
8492 (scm_gc_calloc): new function
8493
26e68795 84942002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8495
5f16b897
HWN
8496 * ports.c (scm_new_port_table_entry): init port entry to 0
8497 completely.
402788a9
HWN
8498
8499 * ports.c (scm_new_port_table_entry): change function from
8500 scm_add_to_port_table. This prevents cells with null-pointers from
8501 being exposed to GC.
8502
504d99c5 8503 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8504 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8505
504d99c5 8506 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8507 to gc-stats.
8508
c8a1bdc4
HWN
8509 * numbers.c (big2str): return "0" for 0 iso. ""
8510
c2cbcc57
HWN
8511 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8512 private-gc.h: new file
c8a1bdc4
HWN
8513
8514 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8515 sweeping. More documentation in workbook/newgc.text
8516
aea06b34
MV
85172002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8518
8519 * random.c (rstate_free): Return zero.
8520
35060ae9
DH
85212002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8522
8523 * environments.c (remove_key_from_alist): Removed.
8524
8525 (obarray_remove): Simplified.
8526
6a535440
SJ
85272002-07-24 Stefan Jahn <stefan@lkcc.org>
8528
8529 * continuations.h: ia64: Include <signal.h> before
8530 <sys/ucontext.h>.
8531
bcbd25b7
DH
85322002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8533
8534 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8535
26e68795 85362002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8537
8538 * goops.c (scm_compute_applicable_methods): use
8539 scm_remember_upto_here_1 iso scm_remember_upto_here
8540
8541 * macros.c: include deprecation.h
8542
504d99c5 8543 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8544 macro arg.
504d99c5 8545 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8546
8547 * net_db.c, posix.c, socket.c: variable naming: change ans to
8548 result.
8549
8550 * sort.c (scm_merge_vector_x): accept vector as argument
8551 iso. SCM*. This is needed for full GC correctness.
8552
8553 * gc.h: undo previous undocumented changes related to #ifdef
8554 GENGC.
8555
26e68795 85562002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8557
8558 * *.c: add space after commas everywhere.
8559
8560 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8561 Document cases where SCM_WRITABLE_VELTS() is used.
8562
8563 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8564 SCM_VELTS() return a const pointer
8565 (SCM_VECTOR_SET): add macro.
8566
3063e30a
DH
85672002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8568
8569 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8570 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8571 Deprecated the special kind of built-in dynamic syntax transformer
8572 that was inaccurately named "macro". Note: The built-in syntax
8573 transformers that are named "mmacro" or "memoizing-macro" still
8574 exist, and it is these which come much closer to what one would
8575 call a macro.
8576
4c5f8e8f
NJ
85772002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8578
8579 * eval.c (unmemocopy): Fix for
8580 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8581 with internal definitions and local-eval).
8582
4f6f9ae3
GH
85832002-07-12 Gary Houston <ghouston@arglist.com>
8584
8585 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8586 defined. They don't do anything useful, especially since the
8587 only case where DYNAMIC_LINKING is undefined seems to be
8588 when --with-modules=no is given to configure, which is basically
8589 requesting that the "dynamic linking module" be omitted.
8590
8591 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8592 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8593
8594 * extensions.c (load_extension): check DYNAMIC_LINKING for
8595 scm_dynamic_call.
8596 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8597 scm_init_dynamic_linking.
8598
c21935e6
MV
85992002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8600
8601 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8602 check for Cygwin when including <winsock2.h>, this is already
8603 check for by configure. Thus, revert change from 2002-07-07.
8604
ee95d597
GH
86052002-07-10 Gary Houston <ghouston@arglist.com>
8606
9540b68f 8607 * eq.c: include <string.h>
ee95d597
GH
8608 * dynl.c: docstring editing.
8609
46732b54
GH
86102002-07-09 Gary Houston <ghouston@arglist.com>
8611
8612 * dynl.c (scm_dynamic_call): docstring editing.
8613
c09d12e0
RB
86142002-07-08 Rob Browning <rlb@defaultvalue.org>
8615
8616 * gc_os_dep.c: HURD fixes.
8617
3f6571eb
MV
86182002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8619
8620 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8621
8622 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8623 this should be compiled for BUILD host.
8624 Override default rule for
8625 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8626 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8627 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8628
8629 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8630 <winsock2.h> on Cygwin even when we have it.
8631
bd987b8e
DH
86322002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8633
8634 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8635 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8636 the code. Full number of arguments checking of closures is
8637 mandatory now. However, the option to disable the checking has
8638 most probably not been used anyway.
8639
8505e285
DH
86402002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8641
bd987b8e
DH
8642 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8643 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8644 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8645 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8646 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8647 (scm_source_properties, scm_set_source_properties_x,
8648 scm_source_property): Removed compile time option SCM_RECKLESS to
8649 clean up the code. Full number of arguments checking of closures
8650 is mandatory now. However, the option to disable the checking has
8651 most probably not been used anyway.
8505e285
DH
8652
8653 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8654 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8655
2ee08a28
GH
86562002-06-30 Gary Houston <ghouston@arglist.com>
8657
732b9327
GH
8658 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8659 do anything useful. Added a comment about need for a mutex if
8660 pre-emptive threading is supported.
8661
2ee08a28
GH
8662 * posix.c (scm_convert_exec_args), dynl.c
8663 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8664 allocate_string_pointers. 2) simplified: don't reallocate the
8665 strings, just make an array of pointers 3) avoid memory leaks on
8666 error 4) let the procedure report errors in its own name.
8667 Consequences: 1) the procedures now assume that SCM strings are
8668 nul-terminated, which should always be the case. 2) Since strings
8669 are not reallocated, it's now possible for strings passed to
8670 dynamic-args-call to be mutated.
8671
c136c920
DH
86722002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8673
8674 * __scm.h, eval.c, eval.h: Removed compile time option
8675 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8676 variable positions during memoization is mandatory. However, the
8677 option to disable the caching has most probably not been used
8678 anyway.
8679
e540802f
MV
86802002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8681
8682 * print.c (scm_simple_format): Print missing part of format before
8683 ~% control. Thanks to Daniel Skarda!
8684
4c1ffcdd
MV
86852002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8686
8687 * mkstemp.c: Added exception notice to license statement.
8688
ba1b077b
MV
86892002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8690
8dc434c7
MV
8691 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8692 it is represented as a floating point value so that we can change
8693 its sign.
8694
ba1b077b
MV
8695 From John W. Eaton <jwe@bevo.che.wisc.edu>
8696
8697 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8698
74c58131
TTN
86992002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8700
8701 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8702 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8703
8766d4b5
MV
87042002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8705
8706 * eq.c (real_eqv): New.
8707 (scm_eqv_p): Use it when comparing reals and complexes.
8708
8709 * numbers.c: Include <string.h>, for strncmp.
8710 (mem2complex): Do not create negative NaNs.
8711 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8712 NaN.
8713 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8714
1d8c3cad
MV
87152002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8716
8717 * posix.c (scm_putenv): Handle removing variables explicitely by
8718 calling unsetenv.
8719
8720 From John W. Eaton.
74c58131 8721
1d8c3cad
MV
8722 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8723 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8724 and scm_nan.
8725 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8726 [SCO && ! HAVE_ISINF] (isinf): New function.
8727 (xisinf, xisnan): New functions.
8728 (IS_INF): Delete.
8729 (isfinite): Define in terms of xisinf.
8730 (scm_inf_p, scm_nan_p): New functions.
8731 (guile_Inf, guile_NaN): New file-scope vars.
8732 (guile_ieee_init): New function.
8733 (scm_inf, scm_nan): New functions.
8734 (idbl2str): Handle Inf and NaN. Remove funny label and
8735 corresponding gotos.
8736 (ALLOW_DIVIDE_BY_ZERO): New macro.
8737 (scm_divide): Allow division by zero to occur if
8738 ALLOW_DIVIDE_BY_ZERO is defined.
8739 Handle bignums and ints as special cases.
8740
8741 Additional stuff by me:
8742
8743 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8744 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8745 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8746 NaN. They will provide their own sign.
8747 (scm_divide): Only allow divides by inexact zeros. Dividing by
8748 exact zeros still signals an errors.
74c58131 8749
7a0c65eb
TTN
87502002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8751
87b72063 8752 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8753 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8754 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8755 Thanks to Andreas Rottmann.
8756
5e423a39
GH
87572002-04-20 Gary Houston <ghouston@arglist.com>
8758
8759 * removal of unused fields in root state (thanks to Christopher
8760 Cramer for pointing out the disuse.)
8761 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8762 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8763
5e423a39
GH
8764 * root.c (root_mark): don't mark them.
8765 (scm_make_root): don't set them to #f.
8766 * init.c (scm_init_standard_ports): don't initialise with the
8767 default ports.
8768
9d2cce76
MV
87692002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8770
8771 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8772 cpp_sig_symbols.c.
8773
87742002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8775
8776 * guile-snarf.in: Do not clean input file. This would write to
8777 the $(srcdir) during a VPATH build, which is not allowed. It also
8778 isn't needed since it only works when an output filename has been
8779 specified and in that case we don't need to clean the input file
8780 because the output file will already exist.
8781
6f79b6cc
MV
87822002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8783
8784 * guile-snarf: Install the trap for removing $cleanfile only when
8785 the value of $cleanfile is actually known.
8786
21550b10
RB
87872002-04-10 Rob Browning <rlb@defaultvalue.org>
8788
8789 * .cvsignore: add versiondat.h and *.c.clean.c.
8790
bc76d628
DH
87912002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8792
8793 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8794 function, replaces macro SRCBRKP.
8795
8796 (SRCBRKP): Deprecated.
8797
8798 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8799 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8800 temporary variable.
8801
5132eef0
DH
88022002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8803
8804 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8805 CHECK_EXIT and removed all references to them.
8806
680516ba
DH
88072002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8808
8809 * debug.h (scm_ready_p, debug_print): Removed declarations.
8810
8811 * eval.c (EVALCELLCAR): Removed.
8812
8813 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8814 operation from condition.
8815
e2bd68e0
MV
88162002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8817
8818 * guile-snarf.in: When the output filename is "-", write to
8819 stdout. When no "-o" option is given, use "-" as the output
8820 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8821 output file on error when the output file name is not "-". Define
8822 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8823
8824 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8825
ab1f1094
DH
88262002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8827
8828 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8829 and the corresponding goto statements. Removed redundant code.
8830
42030fb2
DH
88312002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8832
8833 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8834 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8835 Re-enabled handing of rpsubrs and asubrs.
8836
e050d4f8
DH
88372002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8838
8839 * eval.c (SIDEVAL): Removed.
8840
8841 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8842 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8843 argument checking order for set! to locals, variables and symbols.
8844 Improvements to control structure. Removed some uses of arg1 and
8845 arg2 as temporary variables.
8846
a6d344d3
TTN
88472002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8848
8849 * guile-snarf.in: Remove "--compat=1.4" support.
8850 Add "-d" and "-D" support.
8851
8852 (deprecated_list): New var.
8853 (compat_mode_clean_xxx): Delete.
8854 (grep_deprecated): New func.
8855 ("main"): If "-d" or "-D", call `grep_deprecated'.
8856
3939e9df
NJ
88572002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8858
387d418c
NJ
8859 * hooks.h: Change scm_t_c_hookype_t everywhere to
8860 scm_t_c_hook_type.
8861
bb2c02f2 8862 Docstring fixes:
a6d344d3 8863
bb2c02f2
NJ
8864 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8865
8866 * ports.c (scm_sys_make_void_port): Use `@file'.
8867
8868 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8869 than `else'.
8870
8871 * macros.c (scm_makmacro): Don't say that the form replaces its
8872 source, because it doesn't.
8873 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8874
8875 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8876 scm_select, scm_basename), goops.c (scm_method_generic_function),
8877 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8878 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8879 spelling mistakes.
8880
3939e9df
NJ
8881 * debug.c (scm_debug_options), eval.c
8882 (scm_eval_options_interface), read.c (scm_read_options): Change
8883 incorrect @var in docstring to @code.
8884
3b3cc781
MV
88852002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8886
500b0d5b
MV
8887 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8888
3b3cc781
MV
8889 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8890 guile-snarf can remove trailing non-init code.
8891
8892 * guile-snarf.in (modern_snarf): Remove everything following and
8893 including "^:^" from the output.
8894
dff98306
DH
88952002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8896
8897 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8898
8899 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8900
2287fb53
TTN
89012002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8902
8903 * guile-snarf.in: Update copyright.
8904 Rewrite to internalize error handling.
8905 Add "--compat=1.4" handling.
8906 Add commentary.
8907
8908 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8909 (snarfcppopts): New var.
8910 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8911 (.c.doc): Use $(snarfcppopts).
8912
822250a4
TTN
8913 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8914 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8915 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8916 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8917 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8918 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8919 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8920 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8921 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8922 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8923 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8924 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8925 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8926 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8927
b7798e10
DH
89282002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8929
8930 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8931 The next step will be to remove the union 't' and simplify the
8932 code of SCM_CEVAL that way.
8933
04a98cff
NJ
89342002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8935
8936 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8937 rreadfds, rwritefds, rexceptfds): Made static.
8938
8939 * gc.c (terminating), fports.c (terminating): Renamed
8940 scm_i_terminating.
8941
16d98032
MV
89422002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8943
5046250e
MV
8944 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8945 potential overflow problems. Thanks to John W Eaton!
8946
8794207d
MV
8947 * strop.c (string_capitalize_x): Treat characters as unsigned so
8948 that 8-bit chars work. Thanks to David Pirotte!
16d98032 8949
1d15ecd3
DH
89502002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8951
8952 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8953 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8954 proc as temporary variables. Introduced temporary variables with
8955 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8956 by a more explicit predicate in some places.
8957
89582002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
8959
8960 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8961 Added lots of comments regarding the implementation of #@dispatch.
8962 Changed intra-procedure communication to use t.arg1 instead of
8963 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8964 variables. Introduced temporary variables with hopefully
8965 descriptive names for clarification. Replaced SCM_N?IMP by a more
8966 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8967 of computing the expression explicitly. Eliminate now unused
8968 label nontoplevel_cdrxbegin.
8969
8970 * goops.h (SCM_INSTANCE_HASH): New macro.
8971
8972 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8973
1ebf1566
TTN
89742002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8975
8976 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8977 "guile-snarf" moved back from `noinst_SCRIPTS'.
8978
020c890c
NJ
89792002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8980
58d233cc
NJ
8981 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8982 exists when adding a source property other than those that are
8983 handled explicitly, add the new property to the SRCPROPS obj's
8984 plist.
8985
020c890c
NJ
8986 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8987 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8988
8989 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8990 debug.status. It isn't needed, and it can overflow the bits
8991 reserved for it (which may lead to a segv or a GC abort).
8992
3f04400d
DH
89932002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8994
8995 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8996 side-effecting operations from conditions and macro calls.
8997 Replaced SCM_N?IMP by a more explicit predicate in some places.
8998 Minimized the scope of some variables.
8999
97820583
SJ
90002002-03-02 Stefan Jahn <stefan@lkcc.org>
9001
9002 * convert.i.c: Fixed int <-> long conversions which would have
9003 failed if their sizes were different.
9004
38ace99e
DH
90052002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9006
9007 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9008 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9009 as temporary variables. Removed side-effecting operations from
9010 conditions and macro calls. Introduced temporary variables with
9011 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9012 by a more explicit predicate in some places. Removed code that
9013 was conditionally compiled if SICP was defined - which it never
9014 is.
9015
e5cb71a0
DH
90162002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9017
9018 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9019 Removed some uses of t.arg1 and proc as temporary variables.
9020 Removed side-effecting operations from conditions and macro calls.
9021 Introduced temporary variables with hopefully descriptive names
9022 for clarification. Replaced SCM_N?IMP by a more explicit
9023 predicate in some places.
9024
6a0f6ff3
DH
90252002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9026
9027 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9028 explicit predicate in some places.
9029
9030 (CHECK_EQVISH): Removed.
9031
9032 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9033 variables. Removed side-effecting operations from conditions and
9034 macro calls. Introduced temporary variables for clarification.
9035 Sorted if-else-if check for the type of the last form in a list by
9036 frequency. Avoided some unnecessary tail-recursion calls.
9037
228a24ef
DH
90382002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9039
9040 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9041 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9042 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9043 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9044 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9045 naming scheme for types.
9046
9047 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9048 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9049 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9050 (scm_make_environment), eval.c (scm_closure), fports.c
9051 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9052 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9053 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9054 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9055 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9056 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9057 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9058 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9059 scm_alloc_cell to scm_cell.
9060
9061 * environments.c (core_environments_observe), gc.c
9062 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9063 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9064 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9065 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9066 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9067 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9068 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9069 scm_double_cell.
9070
edb810bb
SJ
90712002-02-27 Stefan Jahn <stefan@lkcc.org>
9072
9073 * convert.i.c, convert.c: Better range checking.
9074
9075 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9076
1ebf1566 9077 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9078 Windows (MinGW).
9079
327d4dd3
TTN
90802002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9081
9082 * Makefile.am: Update path to pre-inst-guile automake frag.
9083
89d7a92c 90842002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9085
9086 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9087 features are excluded.
9088
89d7a92c 90892002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9090
9091 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9092
4f2716b6
GH
90932002-02-25 Gary Houston <ghouston@arglist.com>
9094
9095 * convert.c: include <string.h> for convert_i.c.
9096
46151112
RB
90972002-02-24 Rob Browning <rlb@defaultvalue.org>
9098
9099 * .cvsignore: add stamp-h1.
9100
cd328b4f
NJ
91012002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9102
9103 * unif.c (scm_array_to_list): Correct name, which had been
9104 accidentally changed to scm_t_arrayo_list!
9105
c709de7f
MD
91062002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9107
9108 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9109 underflowing scm_mallocated.
9110
c1965d31
MV
91112002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9112
9113 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9114 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9115 Reimplemented using the new scm_gc_malloc, etc., functions and
9116 deprecated.
9117
b606945b
TTN
91182002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9119
9120 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9121 to `noinst_PROGRAMS'.
9122 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9123 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9124
7c686ba8
MV
91252002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9126
9127 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9128 non-zero is returned from a port or smob free function.
9129 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9130 scm_gc_register_collectable_memory,
9131 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9132 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9133
9134 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9135 debug-malloc.c, dynl.c, environments.c, environments.h,
9136 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9137 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9138 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9139 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9140 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9141 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9142 appropriate. Return zero from smob and port free functions.
9143
9144 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9145
9146 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9147 messages while the GC is running.
9148 (scm_c_issue_deprecation_warning_fmt): New.
9149
9150 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9151 it is pointing to the putback buffer.
9152
66adc0a6
TTN
91532002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9154
9155 * gsubr.c (create_gsubr): On "too many args" error,
9156 also display arg count and name. Thanks to Bill Schottstaedt.
9157
0187b4f4
TTN
91582002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9159
9160 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9161
9162 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9163 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9164 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9165
9166 * guile-snarf-docs-texi.in: Bye bye.
9167
402e687c
MV
91682002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9169
9170 * symbols.c (scm_make_symbol): Fix typo in docstring.
9171
9172 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9173 scm_make_symbol): New prototypes.
9174
319b98ed
MV
91752002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9176
9177 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9178 (SCM_SYMBOL_INTERNED_P): New.
9179 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9180 SCM_MAKINUM since hash values can well be bignums.
9181 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9182 This signals a interned symbol.
9183 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9184 scm_make_symbol): New.
0187b4f4 9185
319b98ed
MV
9186 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9187
34472dfe
TTN
91882002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9189
9190 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9191 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9192 Thanks to Dave Love.
34472dfe 9193
1b39c2e3
MV
91942002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9195
9196 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9197 This might help to make unintended clashes less likely.
1b39c2e3
MV
9198 (scm_string_to_symbol): Protect the string until the symbols is
9199 created.
9200
1fa86ca5
SJ
92012002-01-31 Stefan Jahn <stefan@lkcc.org>
9202
9203 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9204 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9205 functions for the deprecated gh interface.
9206
9207 * Makefile.am: Setup rules for new `convert.*' files.
9208
af68e5e5
SJ
92092002-01-28 Stefan Jahn <stefan@lkcc.org>
9210
9211 * symbols.c (scm_c_symbol2str): New function, replacement for
9212 `gh_scm2newsymbol()'.
9213
34472dfe 9214 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9215 replacement for `gh_get_substr()'.
9216
9217 * socket.c: Include `stdint.h' if available for the `uint32_t'
9218 declaration.
9219
504d99c5 9220 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9221 compiler warning).
9222
9223 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9224
c96d76b8 92252002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9226
c96d76b8 9227 Other changes unrelated to Elisp...
34472dfe 9228
c96d76b8
NJ
9229 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9230 "if".
9231 (comments): Fix a few typos.
9232 (scm_for_each): Add parentheses around oddly unparenthesized
9233 if/while conditions.
9234
9235 * read.c (scm_read_opts): Add full stop at end of doc for
9236 `keywords' option.
9237
9238 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9239 instead of gh_symbol2scm.
9240
9241 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9242 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9243
9244 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9245 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9246
9247 First batch of changes for Elisp support...
9248
9249 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9250 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9251 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9252
9253 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9254 conditionalize compilation and initialization of Elisp support
9255 function.
34472dfe 9256
c96d76b8
NJ
9257 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9258 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9259 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9260 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9261 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9262 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9263 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9264 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9265 options.c (change_option_setting, scm_options), posix.c
9266 (environ_list_to_c), print.c (scm_iprlist), throw.c
9267 (scm_exit_status), vectors.c (scm_vector), weaks.c
9268 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9269
9270 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9271 just SCM_FALSEP.
34472dfe 9272
c96d76b8
NJ
9273 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9274 of just SCM_BOOLP.
9275
9276 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9277 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9278 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9279 (scm_m_atfop): Support function aliasing. Support both function
9280 args, which need transformation, and macro args, which do not.
9281 Add explanatory comments.
9282 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9283 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9284 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9285 SCM_NULLP || SCM_NILP instead of checks against (removed)
9286 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9287 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9288
9289 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9290 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9291 these, but I don't want to remove them yet, just in case.
9292 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9293 Elisp nil value.
9294
9295 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9296 against (removed) scm_lisp_nil.
9297 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9298 (SCM_NULL_OR_NIL_P): New.
9299
9300 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9301 SCM_VALIDATE_NULL.
9302
9303 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9304 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9305 value).
9306
9307 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9308 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9309 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9310 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9311
9312 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9313 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9314 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9315 Numbering shifted down accordingly.
9316 (SCM_ELISP_NIL): New IFLAG.
9317
9318 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9319
a392ee15
DH
93202002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9321
9322 * eval.c: Removed outdated references to "everr". Improved some
9323 comments.
9324
9325 (scm_deval_args, deval_args): Renamed scm_deval_args to
9326 deval_args, since it is not part of the interface.
9327
9328 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9329 use references to debug.vect[0] before it exists. Add parentheses
9330 to switch statement.
9331
9332 * goops.h: Added local emacs variables.
9333
24933780
DH
93342002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9335
9336 * eval.[ch] (scm_deval_args): Made static.
9337
9338 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9339 test.
9340
9341 * strings.c (scm_c_string2str): Clarified comment. Replaced
9342 THINKME by FIXME for uniformness. Removed question about whether
9343 arguments need to be protected from garbage collection: Arguments
9344 must be protected as any other variable.
9345
f9450cdb
DH
93462002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9347
9348 * procs.h (SCM_CLOSURE_BODY): New Macro.
9349
9350 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9351 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9352 get_slot_value, set_slot_value), procs.c
9353 (scm_procedure_documentation), sort.c (closureless), stacks.c
9354 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9355 SCM_CLOSURE_BODY.
9356
9357 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9358
5dc64f64
MV
93592001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9360
9361 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9362 use "cp" instead.
9363
197ee3d3
MV
93642001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9365
9366 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9367 everywhere.
9368
9369 * continuations.c (scm_make_continuation): Do not retain the
9370 throw_value when the continuation is invoked.
9371
4d4528e7
SJ
93722001-12-08 Stefan Jahn <stefan@lkcc.org>
9373
9374 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9375 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9376 THINKME's regarding the malloc policy for the missing converter
9377 routines.
9378
98347362
NJ
93792001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9380
9381 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9382 gh_symbol2scm.
9383
1fc8902f
DH
93842001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9385
9386 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9387 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9388
9389 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9390 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9391 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9392 macros.
9393
9394 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9395
9396 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9397 SCM_GC_CELL_* macros when accessing free cells.
9398
4878beec
MV
93992001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9400
9401 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9402 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9403 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9404 * strings.h (SCM_MAKE_STRING_TAG): New.
9405 * procs.h (SCM_MAKE_CCLO_TAG): New.
9406 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9407
9408 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9409 !SCM_ENABLE_DEPRECATED.
9410
9411 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9412 New.
9413
9414 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9415 signal handlers are allowed to divert the flow of control. Call
9416 scm_system_async_mark_from_signal_handler instead of
9417 scm_system_async_mark.
9418
9419
9420 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9421 scm_alloc_double_cell in their place.
34472dfe 9422
4878beec
MV
9423 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9424 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9425 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9426 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9427 scm_deprecated_newcell and scm_deprecated_newcell2.
9428
9429 gc.c (scm_tc16_allocated): Only define when including deprecated
9430 features.
9431 (scm_debug_newcell, scm_debug_newcell2): Removed.
9432 (scm_init_storage): Do not initialize scm_tc16_allocated.
9433 (scm_init_gc): Do it here.
9434 (allocated_mark): New, from old code.
9435 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9436
4878beec 9437 * inline.c, inline.h: New files.
34472dfe 9438 * Makefile.am: Added them in all the right places.
4878beec 9439
34472dfe 9440 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9441
9442 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9443 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9444 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9445 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9446 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9447 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9448 scm_alloc_double_cell, respectively.
9449
d2bc7fae
MV
94502001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9451
9452 * modules.c (scm_c_use_module): Adapt to changes to
9453 `process-use-modules'.
9454
5eec27e9
DH
94552001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9456
9457 * numbers.c (scm_divide): Fix more division by zero errors.
9458
8978878f
GH
94592001-11-21 Gary Houston <ghouston@arglist.com>
9460
9461 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9462 obsolete. autogen.sh says:
9463 invalid unused variable name: `OMIT_DEPENDENCIES'
9464
164826d3
DH
94652001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9466
9467 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9468 reporting the bug.
9469
84aff7a7
MV
94702001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9471
9472 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9473 Thanks to Eric Gillespie, Jr!
34472dfe 9474
6063dc1d
SJ
94752001-11-21 Stefan Jahn <stefan@lkcc.org>
9476
34472dfe
TTN
9477 * win32-socket.c (getservent, setservent, endservent,
9478 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9479 Appropriate replacements for M$-Windows.
9480
9481 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9482 these definitions for GUILE_DEBUG.
9483
9484 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9485 M$-Windows compiler. Include some pieces of code (protoent and
9486 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9487 native M$-Windows compiler.
9488
351982f6
MV
94892001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9490
9491 * modules.c (scm_c_export): Do nothing when the first argument is
9492 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9493
849038b5
TTN
94942001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9495
9496 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9497 also include `buildstamp'.
9498
5c790b44
RB
94992001-11-18 Rob Browning <rlb@defaultvalue.org>
9500
9501 * version.c
9502 (s_scm_major_version): use SCM_MAJOR_VERSION.
9503 (s_scm_minor_version): use SCM_MINOR_VERSION.
9504 (s_scm_micro_version): use SCM_MICRO_VERSION.
9505 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9506 SCM_MICRO_VERSION.
9507
9508 * version.h.in
9509 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9510 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9511 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9512
694a9bb3
NJ
95132001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9514
9515 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9516 Rewrite docstrings without reference to substring-move-left/right,
9517 since the latter no longer exist.
9518
302c12b4
DH
95192001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9520
9521 * eval.c: Removed bogus comment about acros.
9522
9523 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9524 Minimize scope of local variable. Eliminate dependency on
9525 macro DEBUG_EXTENSIONS.
9526
9527 (s_splicing): New error message string.
9528
9529 (scm_m_body): Issue 'bad body' message rather than 'missing
9530 expression' message.
9531
9532 (scm_m_quote): Eliminate unnecessary copying.
9533
9534 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9535 checking of the body to scm_m_body.
9536
9537 (scm_m_do): Move comment to function header. Rename arg1 to
9538 binding. Made the code a bit easier to read.
9539
9540 (evalcar): Removed.
9541
9542 (iqq): Added a comment. Changed the depth parameter to
9543 unsigned. Use size_t for vector lengths. Make sure vector object
9544 is gc protected as long as its contents are read. Add some syntax
9545 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9546 control structure a bit.
9547
9548 (scm_m_delay): Added comment about the implementation of
9549 scm_m_delay.
9550
9551 (scm_m_define): Add comment about guile's currying define
9552 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9553 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9554
9555 (scm_m_letrec1): Removed. Part of the functionality is taken
9556 over by the new function 'transform_bindings'.
9557
9558 (transform_bindings): New function. Takes over some of the
9559 functionality of removed function 'scm_m_letrec1', namely to split
9560 a list of bindings into a reversed list of variables and a list of
9561 initializers.
9562
9563 (scm_m_letrec): Call 'transform_bindings'.
9564
9565 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9566 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9567 test. Use 'transform_bindings'. Fixed scoping error with named
9568 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9569 Jerram for suggesting the fix). Cleaned up the control structure
9570 a bit.
9571
9572 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9573 unnecessary consing. Eliminated unnecessary
9574 SCM_DEFER/ALLOW_INTS.
9575
9576 (SCM_CEVAL): Un-obfuscated some loops.
9577
cecb4a5e
NJ
95782001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9579
8f85c0c6
NJ
9580 * gc.h (scm_unhash_name): Old declaration removed.
9581
9582 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9583 @code{primitive-eval}.
9584
9585 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9586 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9587 Change @deffnx lines in docstrings to say {Scheme Procedure}
9588 rather than primitive or procedure.
9589
9590 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9591 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9592 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9593 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9594 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9595 (scm_string_split, scm_string_ci_to_symbol), strings.c
9596 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9597 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9598 Docstring fixes and improvements reflecting edits that have been
9599 made in the reference manual source.
9600
9601 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9602 scm_object_property, scm_set_object_property_x): Remove invalid
9603 @deffnx lines for corresponding procedure property primitives.
9604
cecb4a5e
NJ
9605 These changes add a @deffnx C function declaration and function
9606 index entries for each Guile primitive to the copy of the doc
9607 snarf output that is used for reference manual synchronization.
9608 Online help is unchanged.
849038b5 9609
cecb4a5e
NJ
9610 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9611 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9612 name to SCM_SNARF_DOCS.
849038b5 9613
cecb4a5e
NJ
9614 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9615 snarf-check-and-output-texi.
9616
9617 * Makefile.am (guile-procedures.texi): New rule.
9618 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9619 Changed so that the last stage of doc snarfing is now performed
9620 twice, once to produce guile-procedures.txt for online help, and
9621 once to produce guile.texi for reference manual synchronization.
9622
ddea3325
DH
96232001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9624
9625 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9626 safely usable as a single statement followed by a ';', for example
9627 in an if statement.
9628
9629 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9630
72dd0a03
NJ
96312001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9632
9633 * random.c (scm_random_solid_sphere_x,
9634 scm_random_hollow_sphere_x): Correct "shere" typos.
9635
9636 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9637
9638 * version.c (scm_version): Update docstring to include
9639 `micro-version'.
9640
6558eda6
MV
96412001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9642
409b8588
MV
9643 * modules.c (scm_c_export): Call va_end after collecting the
9644 symbols.
9645
adb8c0f2
MV
9646 * strop.h, strop.c (scm_substring_move_left_x,
9647 scm_substring_move_right_x): Removed.
9648
6558eda6
MV
9649 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9650 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9651 configure does.
9652
5d8fc640
MV
96532001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9654
9655 * numbers.c: Document macros to define when including
9656 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9657 now rely on SIZEOF_ macros that have been figured out at
9658 configure time.
9659
9660 * num2integral.i.c: Adapt to new interface.
9661 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9662 target type by casting it and checking whether it is still the
9663 same. Do not try to handle bignums for integral types that are
9664 smaller than fixnums. When handling bignums, collect the
9665 magnituse first into a unsigned type, and correctly check for
9666 overflow.
9667 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9668 only -MIN_VALUE can still be negative of all negative numbers (in
9669 twos-complement).
9670
849038b5 9671 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9672
9673 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9674 HAVE_LONG_LONG depending on whether their size is non-zero.
9675
d6b8cf11
TTN
96762001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9677
9678 * strop.c (scm_string_null_p): Docfix; nfc.
9679 Thanks to Scott Lenser.
9680
9401323e
NJ
96812001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9682
9683 * extensions.c (scm_load_extension): Canonicalize docstring
9684 whitespace.
9685
9686 * unif.c (scm_uniform_array_write), ports.c
9687 (scm_current_output_port, scm_force_output), dynwind.c
9688 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9689 filesys.c (scm_open, scm_lstat), struct.c
9690 (scm_make_struct_layout), random.c (scm_random,
9691 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9692 (scm_i_index): Remove superfluous whitespace from end of docstring
9693 lines.
9694
9695 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9696 strings.c (scm_make_string), variable.c (scm_make_variable,
9697 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9698 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9699 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9700 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9701 newline at end of docstrings.
9702
9703 * modules.c (scm_set_current_module): Add missing newline to
9704 docstring.
9705
b4e15479
SJ
97062001-11-07 Stefan Jahn <stefan@lkcc.org>
9707
9708 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9709 and makes them available through Guile. That is because the
9710 Winsock-API does not store its errors in `errno' and thus cannot
9711 return error messages via `strerror (errno)'.
9712
9713 * socket.c (scm_init_socket): Initialize `win32-socket' part
9714 here under M$-Windows.
9715
d6b8cf11 9716 * numbers.h: Added missing declaration of
b4e15479
SJ
9717 `scm_sys_check_number_conversions()'.
9718
9719 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9720 and use in `(strerror)' and `(system-error)'.
9721
d6b8cf11 9722 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9723 `win32-socket.[ch]' to extra source and header files.
9724
7ab89df1
MV
97252001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9726
9727 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9728 a call to turn-on-debugging when --debug has been given instead of
9729 turning it on directly. Also, handle new `--no-debug' option,
9730 which might suppress the call to turn-on-debugging.
9731
0233bfc1
SJ
97322001-11-05 Stefan Jahn <stefan@lkcc.org>
9733
9734 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9735
8f99e3f3
SJ
97362001-11-04 Stefan Jahn <stefan@lkcc.org>
9737
9738 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9739 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9740 correctly and allows a clean build on Win32.
9741
d6b8cf11 9742 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9743 into FOO.
9744
9745 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9746 import macros for external libraries (libcrypt, libqthreads,
9747 libreadline and libregex).
9748
9749 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9750
9751 * posix.c (flock): Added support for flock() in M$-Windows.
9752
9753 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9754 of __SCM_IMPORT__.
9755
9756 * fports.c (getflags): Differentiate reading and writing pipes
9757 descriptors.
9758
9759 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9760 M$-Windows.
9761
9762 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9763 conditionalized error code if `ETIMEDOUT' is not available.
9764 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9765 timeout'.
9766
9767 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9768 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9769 each inclusion of `num2integral.i.c'.
9770 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9771
4e21fa60
MV
97722001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9773
9774 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9775 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9776
08112c95
MD
97772001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9778
7663c008
MD
9779 * print.c (scm_iprin1): Mark print state as revealed when
9780 dispatching to generic write or display.
9781
08112c95
MD
9782 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9783
f712d833
MV
97842001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9785
9786 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9787
f712d833
MV
9788 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9789 and win32-dirent.h to extra source and header files. These
9790 include the uname() and the POSIX dirent interface implementation
9791 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9792 linkers which do not allow unresolved symbols inside shared
9793 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9794 dependency.
9795
d6b8cf11
TTN
9796 * __scm.h: Defined SCM_API. This macro gets prepended to all
9797 function and data definitions which should be exported or imported
f712d833
MV
9798 in the resulting dynamic link library in the Win32 port.
9799
9800 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9801 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9802 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9803 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9804 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9805 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9806 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9807 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9808 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9809 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9810 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9811 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9812 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9813 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9814 vports.h, weaks.h:
9815 Prefixed each each exported symbol with SCM_API.
9816
d6b8cf11 9817 * continuations.c: Added comment about the use of the extern
f712d833
MV
9818 declarations of {get,set}context() functions used in the ia64 port.
9819
9820 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9821 is meant to be a `unsigned long *'.
9822
9823 * filesys.c: Include `direct.h' if possible. Use local
9824 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9825 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9826 able to differentiate between sockets and other file descriptors.
9827 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9828 `scm_dirname()'.
9829
9830 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9831 statement block in `scm_fport_buffer_add()'.
9832 Some corrections in `getflags()'.
d6b8cf11 9833
f712d833
MV
9834 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9835
9836 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9837 build on Win32. Disable preloaded symbols on Win2 platforms.
9838
9839 * ioext.c, ports.c: Include `io.h' is possible.
9840
9841 * mkstemp.c: Include `process.h' is possible.
9842
9843 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9844 too.
9845 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9846
9847 * posix.c: Remove unnecessary dirent includes and defines. Include
9848 local `win32-uname.h' for MinGW. Extern declaration of
9849 `mkstemp()' for systems where it does not exists. Make
9850 `getlogin()' available on M$-Windows.
9851
9852 * scmsigs.c: Made `usleep()' avalable on MinGW.
9853
9854 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9855
9856 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9857
9858 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9859
d245ce23
MD
98602001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9861
9862 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9863 Don't apply scm_uniform_vector_length on arrays.
9864
8ea46249
DH
98652001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9866
9867 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9868 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9869 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9870 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9871 scm_list_<n> over scm_cons[2]?.
9872
9873 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9874 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9875 SCM_C[AD][AD]R instead of explicit form.
9876
9877 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9878 comparison parameters.
9879
9880 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9881 !SCM_NULLP instead of SCM_NIMP.
9882
9883 (scm_m_case): Don't copy the form. Renamed proc to clause and
9884 minimized its scope. Renamed x to clauses. Removed side
9885 effecting operation from macro call.
9886
9887 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9888 minimized its scope. Renamed x to clauses. Minimized the scope
9889 of variable 'len'. Make sure the else clause is treated specially
9890 even in case of '=>' occurences. Don't change the else to #t in
9891 order to be able to distinguish this case in the evaluator. Leave
9892 type checking of the recipient to the evaluator.
9893
9894 (scm_c_improper_memq): Made the comment somewhat clearer.
9895
9896 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9897 test for SCM_IM_LET at the place of the formal parameters.
9898 Simplified the formal parameter checking.
9899
9900 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9901 Renamed arg1 to binding and minimized its scope. Eliminated
9902 unnecessary consing.
9903
9904 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9905 variable 'len'.
9906
9907 (build_binding_list): New static function.
9908
9909 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9910 Further, split up the 'letrec' unmemoizing code to the
9911 corresponding parts for 'do', 'let' and 'letrec', adding comments
9912 to each form. Cleanup the handling of the do form (This removes
9913 some *real* code :-).
9914
9915 (SCM_CEVAL): Removed side effecting operation from macro call.
9916 Handle the 'else clause of the 'cond form specially - the symbol
9917 'else is not replaced with #t any more.
9918
8186c4f5
GH
99192001-10-14 Gary Houston <ghouston@arglist.com>
9920
9921 * version.c (scm_version): use sprintf instead of snprintf,
9922 for portability. thanks to Bill Schottstaedt.
9923
89759084
MD
99242001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9925
9926 * read.c (scm_lreadr): When user-defined hash procedure returns
9927 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9928 an exception. (This prevents parsing of uniform vectors from
9929 interfering with parsing of numbers.)
9930
9c7ce563
MV
99312001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9932
9933 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9934 PTRDIFF_MIN. Thanks to Ken Raeburn.
9935
99362001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9937
9938 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9939
9940 * eval.c (scm_m_atbind): First try to find the variable without
9941 defining it locally; when it has not been found, define it
9942 locally.
9943
9944 * modules.c (module_variable): Pass over variables that exist but
9945 are unbound.
9946
99472001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9948
9949 * backtrace.c (display_backtrace_file_and_line): Only use
9950 scm_basename when POSIX support is compiled in. Thanks to Chris
9951 Cramer.
9952
1fe5e088
DH
99532001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9954
9955 * numbers.c (mem2uinteger): Return number read so far when coming
9956 across a hexdigit after having read a # or if not reading a hex
9957 value. This will enable the calling code to correctly handle
9958 forms like 1e2. (The background is, that the exponent markers d,
9959 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9960 providing this patch.
9961
9962 (mem2complex): Fix erroneous double-negation. Now, numbers like
9963 1-i will be read correctly.
9964
68665a97
MD
99652001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9966
9967 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9968
9969 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9970
d5cf5324
DH
99712001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9972
9973 * print.c (scm_print_state_vtable, print_state_pool):
9974 Initialize. These variables are now registered as gc roots.
9975
9976 (scm_current_pstate): Update documentation.
9977
9978 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9979 scm_prin1, scm_init_print): print_state_pool is registered as a
9980 gc root and thus does not need to be protected by a surrounding
9981 pair any more.
9982
9983 (make_print_state): The car of print_state_pool no longer holds
9984 the scm_print_state_vtable.
9985
9986 (scm_current_pstate, scm_make_print_state, print_circref,
9987 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9988 SCM_N<foo>.
9989
9990 (scm_prin1): When building lists, prefer scm_list_<n> over
9991 scm_cons[2]?.
9992
9993 (scm_iprlist): Removed a redundant SCM_IMP test.
9994
9995 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9996
37c56aec
DH
99972001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9998
9999 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
10000
10001 (scm_memcons, scm_mem_to_proc): When building lists, prefer
10002 scm_list_<n> over scm_cons[2]?.
10003
10004 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
10005
10006 (scm_procedure_name): Use SCM_CADR instead of explicit form.
10007
10008 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10009 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10010 for some reason his patch didn't make it into the cvs.
10011
79d34f68
DH
100122001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10013
10014 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10015 little bit - should even be somewhat more accurate now.
10016
5e137c65
RB
100172001-10-08 Rob Browning <rlb@defaultvalue.org>
10018
10019 * gc.c: support ia64 register backing store.
10020 (SCM_MARK_BACKING_STORE): new macro.
10021
10022 * continuations.h: support ia64 register backing store.
10023 (struct scm_t_contregs): add ia64 register backing store.
10024
10025 * continuations.c: support ia64 register backing store.
10026 (continuation_mark): mark ia64 register backing store.
10027 (continuation_free): free ia64 register backing store.
10028 (scm_make_continuation): capture ia64 register backing store.
10029 (copy_stack_and_call): copy ia64 register backing store.
10030
ee083ac2
DH
100312001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10032
10033 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10034 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10035 instead of SCM_NIMP to test for that case.
10036
10037 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10038 scm_t_bits instead of long.
10039
71dcdbf9
MV
100402001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10041
10042 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10043 SCM_T_SIGNED_BITS_MIN): New.
10044 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10045 Use them to make these macros computable by the preprocessor.
10046
10047 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10048 whether the integral type fits in a fixnum, not the compiler.
10049 This removes a spurious compiler warning. Also, honor the
10050 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10051 needed for `long long's.
10052
10053 * numbers.c: Define NO_PREPRO_MAGOC when including
10054 num2integral.c.i for `long long' and `signed long long'.
10055
152812c0
MD
100562001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10057
10058 These changes fixes a race condition in the Guile coop - pthread
10059 compatibility code.
d6b8cf11 10060
152812c0
MD
10061 * coop.c (mother_awake_p): New variable.
10062 (coop_create): Set mother_awake_p before creating or signalling
10063 mother; wait until mother is going to sleep before returning.
10064 (mother): Reset mother_awake_p before going to sleep.
10065
11d49f54
DH
100662001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10067
10068 * options.c (protected_objects, scm_init_options): The content of
10069 protected_objects is now protected from garbage collection using
10070 scm_gc_register_root instead of scm_permanent_object.
10071
10072 (get_option_setting): New static function that computes an option
10073 setting as it was formerly done in the function scm_options.
10074
10075 (get_documented_option_setting): New static function that
10076 returns option documentation as it was formerly done in the
10077 function scm_options. Note that documentation C strings are no
10078 longer precomputed into SCM objects. Instead, they are converted
10079 into SCM strings every time get_documented_option_setting is
10080 called.
10081
10082 (change_option_setting): New static functions that modifies the
10083 option setting as it was formerly done in the function
10084 scm_options. The function is now exception safe, i. e. won't
10085 cause a memory leak when interrupted. Further, only non-immediate
10086 option values are added to the protection list.
10087
10088 (scm_options): This function now has only the purpose to dispatch
10089 to to get_option_setting, get_documented_option_setting or
10090 change_option_setting, depending on the arguments given to
10091 scm_options.
10092
10093 (scm_init_opts): Don't convert documentation C strings into SCM
10094 strings. Further, don't protect any object values: They _must_
10095 be immediate values, otherwise there is no guarantee that they
10096 have not been collected before anyway.
10097
10098 * options.[ch] (scm_t_option): Made type unsigned, name into a
10099 constant char* and val into a scm_t_bits type.
10100
10101 (scm_options, scm_init_opts): The number of options is guaranteed
10102 to be larger or equal to zero. Thus, the type is changed to
10103 unsigned.
10104
3dbacabc
DH
101052001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10106
10107 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10108 testing an unsigned value for being >= 0.
10109
14282d0f
DH
101102001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10111
10112 * numbers.h: Removed old comment about using SCM_CAR to access
10113 non-pair cells.
10114
10115 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10116 the return value is signed. Thanks to Brian Crowder for the bug
10117 report.
10118
10119 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10120 values. With this patch, SCM_SRS can be safely used for other
10121 types than scm_t_signed_bits. However, it should still better be
10122 an internal macro and thus be renamed to SCM_I_SRS.
10123
10124 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10125
2dbec7b5
GH
101262001-10-03 Gary Houston <ghouston@arglist.com>
10127
10128 * continuations.h, unif.h: in the descriptions of the bit patterns
10129 of the heap cells, make bit 0 the least significant.
10130
cf4ee841
TTN
101312001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10132
10133 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10134 Thanks to Golubev I. N.
10135
4a151b3d
GH
101362001-09-25 Gary Houston <ghouston@arglist.com>
10137
10138 * ports.c (scm_drain_input): extended the docstring. thanks to
10139 Alex Schroeder and Thien-Thi Nguyen.
10140
581ded70
MD
101412001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10142
10143 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10144 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10145 macros. (The NUM names might soon change.)
10146
10147 * numbers.h: Added missing declarations.
10148
5437598b
MD
101492001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10150
10151 * Makefile.am: Distribute num2float.i.c.
10152
10153 * num2float.i.c: New file, multiply included by numbers.c, used
10154 to "templatize" the float <-> num conversion routines.
10155
10156 * numbers.c: New functions: scm_num2float, scm_float2num,
10157 scm_num2double, scm_double2num.
10158
0b073f0f
RB
101592001-09-21 Rob Browning <rlb@defaultvalue.org>
10160
10161 * .cvsignore: really add version.h
10162
10163 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10164 Otherwise it fails on the alpha. However, we might rather choose
10165 this size conditionally.
10166
10167 * numbers.c (scm_gcd): change "k" to a long from an int.
10168 Otherwise it fails on the alpha. However, we might rather choose
10169 this size conditionally.
10170
10171 * error.c (scm_wta): coerce char* to intptr_t before int
10172 assignment.
10173
10174 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10175 int.
10176
10177 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10178
2830fd91
MD
101792001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10180
10181 * numbers.c (scm_integer_expt): Accept inexact integer in second
10182 argument. (Thanks to Bill Schottstaedt.)
10183
c13f0a90
RB
101842001-09-20 Rob Browning <rlb@defaultvalue.org>
10185
10186 * .cvsignore: add version.h
10187
10188 * versiondat.h.in: removed (obsolete).
10189
10190 * version.h.in: renamed from version.h.
10191 (SCM_GUILE_MAJOR_VERSION): new public macro.
10192 (SCM_GUILE_MINOR_VERSION): new public macro.
10193 (SCM_GUILE_MICRO_VERSION): new public macro.
10194
10195 * version.h: renamed to version.h.in.
10196
10197 * version.c
10198 (scm_major_version): support integer *_VERSION macros.
10199 (scm_minor_version): support integer *_VERSION macros.
10200 (scm_micro_version): support integer *_VERSION macros.
10201 (scm_version): support integer *_VERSION macros.
10202
147c18a0
MD
102032001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10204
10205 * error.c, error.h: Made error keys globally accessible.
10206 Applications might want to test for these or use them in a direct
10207 call to scm_error.
10208
10209 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10210 routines are passed an inexact. This change in behavior is
10211 motivated by concordance with R5RS: It is more common that a
10212 primitive doesn't want to accept an inexact for an exact.
10213
662c5539
DH
102142001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10215
10216 The following patch partially undoes my patch from 2001-06-30,
10217 where I added the function scm_gc_mark_cell_conservatively. The
10218 function is buggy, since it breaks guile during conservative
10219 marking if a pointer on the stack points directly into the list of
10220 free cells on the heap: With conservative cell marking this will
10221 cause the whole free list to be scanned and marked - boom!
10222
10223 * gc.c (allocated_mark, MARK, heap_segment,
10224 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10225 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10226 scm_gc_mark_cell_conservatively and update the corresponding
10227 comments and uses accordingly. Thanks to Christopher Cramer for
10228 the patch. (Minor corrections by me.)
10229
6c1b7628
GH
102302001-09-15 Gary Houston <ghouston@arglist.com>
10231
10232 * root.h (scm_root_state): removed the continuation_stack and
10233 continuation_stack_ptr members, which have no apparent purpose.
10234 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10235 removed.
662c5539 10236
6c1b7628
GH
10237 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10238 (scm_igc): remove all references to contination_stack and
10239 continuation_stack_ptr, avoiding allocation of a vector and
10240 useless processing during gc.
10241
455c0ac8
DH
102422001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10243
10244 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10245
10246 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10247
10248 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10249
10250 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10251
10252 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10253 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10254
22ba637b
DH
102552001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10256
10257 * guardians.c (mark_dependencies_in_tconc,
10258 whine_about_self_centered_zombies, scm_init_guardians): Register
10259 the static global variable `self_centered_zombies' via
10260 scm_gc_register_root, to make some cdr-ing unnecessary.
10261
c3c4d801
DH
102622001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10263
10264 * backtrace.c (display_backtrace_file,
10265 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10266 values, use SCM_FALSEP when comparing SCM values against #f.
10267 Thanks to Rob Browning for the bug report.
10268
b00418df
DH
102692001-09-12 Martin Baulig <martin@home-of-linux.org>
10270
10271 * strings.[ch] (scm_str2string): New function.
10272
a0d34a0b
MV
102732001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10274
10275 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10276 when computing nm, even if it's negative.
10277 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10278 (scm_must_realloc): Likewise.
10279
b10586f0
ML
102802001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10281
10282 * numbers.c (scm_sys_check_number_conversions): new function,
10283 defined if Guile is compiled in debugging mode. currently checks
10284 `scm_num2ulong', should check much much more.
10285
10286 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10287 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10288
8c494e99
DH
102892001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10290
10291 * __scm.h: Added new section about compile time selectable
10292 features.
10293
10294 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10295 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10296 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10297 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10298 Removed.
10299
10300 * deprecation.c (scm_include_deprecated_features): Simplified.
10301
10302 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10303 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10304
10305 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10306 Extract side-effecting operations from macros.
10307
10308 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10309 scm_top_level_lookup_closure_var and scm_system_transformer.
10310
10311 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10312
10313 (heap_segment): Use CELL_P instead of SCM_CELLP.
10314
10315 * init.c (start_stack): Don't initialize
10316 scm_top_level_lookup_closure_var and scm_system_transformer.
10317
10318 * modules.c (scm_set_current_module): Don't access
10319 scm_top_level_lookup_closure_var and scm_system_transformer.
10320
10321 (scm_sym2var): Don't call scm_variable_set_name_hint.
10322
10323 (scm_post_boot_init_modules): Removed deprecated initializations.
10324
10325 * print.c (scm_ipruk): Don't access cell contents of non cells.
10326
10327 * strings.c (scm_string_set_x): All strings are writable.
10328
10329 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10330 type. There is only one string type now.
10331
10332 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10333
10334 * tags.h: Remove comments about two different string types.
10335
10336 (SCM_CELLP, SCM_NCELLP): Deprecated.
10337
10338 * variable.c (make_variable): Remove code variant for vcells.
10339
10340 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10341 SCM_VARIABLE_LOC): Remove code variant for vcells.
10342
10343 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10344 SCM_ENABLE_DEPRECATED with the logic reversed.
10345
10346 * dynl.c (moddata, registered_mods), dynl.[ch]
10347 (scm_register_module_xxx, scm_registered_modules,
10348 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10349 (*top-level-lookup-closure*), eval.[ch]
10350 (scm_top_level_lookup_closure_var, scm_system_transformer,
10351 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10352 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10353 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10354 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10355 scm_unprotect_object), modules.c (root_module_lookup_closure,
10356 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10357 beautify_user_module_x_var, try_module_autoload_var,
10358 scm_module_full_name), modules.[ch] (scm_the_root_module,
10359 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10360 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10361 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10362 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10363 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10364 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10365 scm_make_shared_substring), tags.h (scm_tc7_substring,
10366 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10367 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10368 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10369 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10370 Removed.
10371
10372 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10373 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10374 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10375 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10376 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10377 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10378 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10379 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10380 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10381 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10382 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10383 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10384 (setzone, scm_strftime, scm_strptime), vports.c
10385 (scm_make_soft_port): Remove calls to
10386 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10387 gone, all strings are 0-terminated anyway.
10388
10389 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10390 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10391 double inclusion of the same headers to the SCM_<filename>_H
10392 format.
10393
10394 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10395 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10396 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10397 any more.
10398
10399 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10400 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10401 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10402 !SCM_<foo> over SCM_N<foo>.
10403
dee01b01
DH
104042001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10405
10406 * Makefile.am: Remove references to symbols-deprecated.c.
10407
10408 * symbols.c (scm_init_symbols): Don't initialize deprecated
10409 symbol functions.
10410
10411 * symbols-deprecated.c: Removed.
10412
10413 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10414 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10415 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10416 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10417 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10418 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10419 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10420 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10421 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10422 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10423 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10424 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10425 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10426 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10427 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10428 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10429 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10430 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10431 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10432 scm_intern0, scm_sysintern, scm_sysintern0,
10433 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10434 scm_string_to_obarray_symbol, scm_intern_symbol,
10435 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10436 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10437 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10438 vectors.[ch] (scm_vector_set_length_x): Removed.
10439
10440 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10441 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10442 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10443 Renamed the macros that are defined to inhibit double inclusion of
10444 the same headers to the SCM_<filename>_H format.
10445
10446 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10447 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10448 SCM_N<foo>.
10449
b29058ff
DH
104502001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10451
10452 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10453 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10454 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10455 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10456 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10457 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10458 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10459 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10460 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10461 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10462 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10463 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10464
10465 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10466 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10467 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10468 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10469 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10470 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10471 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10472 double inclusion of the same headers to the SCM_<filename>_H
10473 format.
10474
10475 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10476 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10477 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10478 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10479 !SCM_<foo> over SCM_N<foo>.
10480
0527e687
DH
104812001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10482
10483 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10484 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10485 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10486 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10487 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10488 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10489 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10490 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10491 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10492 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10493 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10494 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10495 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10496 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10497 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10498 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10499 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10500 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10501 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10502 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10503 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10504 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10505 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10506 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10507 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10508 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10509 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10510 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10511 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10512 the macros that are defined to inhibit double inclusion of the
10513 same headers to the SCM_<filename>_H format.
10514
fada26b2
MV
105152001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10516
10517 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10518 "scm_t_portable" with "scm_port_table" which was an artifact from
10519 the great "scm_*_t -> scm_t_" renaming.
10520
e4d1c1ea
TTN
105212001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10522
10523 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10524 used; nfc. Thanks to Bill Schottstaedt.
10525
10526 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10527 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10528 Thanks to Chris Cramer.
10529
b573e744
MV
105302001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10531
10532 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10533
10534 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10535 dynamic scope.
10536 * dynwind.h (scm_swap_bindings): Declare.
10537 * dynwind.c (scm_swap_bindings): Make non-static.
10538
8a3e715b
ML
105392001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10540
10541 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10542 doing exactly nothing about them). thanks Neil!
10543
cf504ee0
NJ
105442001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10545
10546 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10547
43b83b54
TTN
105482001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10549
10550 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10551 (proto) in the case when either `GUILE_DEBUG' or
10552 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10553
10554 (map_free_list): Fix typo: Ref `f' correctly.
10555
10556 Thanks to Chris Cramer.
10557
ab4cd34b
RB
105582001-08-15 Rob Browning <rlb@defaultvalue.org>
10559
10560 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10561 variables.
10562 (libpath.h): change libguileversion to libguileinterface.
10563
b754e3d1
MV
105642001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10565
10566 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10567 ChangeLog-2000. Thanks to Daniel Skarda!
10568
8b1d12c7
ML
105692001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10570
10571 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10572 do it from the Makefile.
10573
10574 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10575 are of a reasonable size.
10576
baffb19f
NJ
105772001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10578
10579 * stacks.c (scm_make_stack): Improve docstring by explaining use
10580 of cutting args.
10581
c1151355
MV
105822001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10583
10584 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10585 scm_char_whitespace_p, scm_char_upper_case_p,
10586 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10587 characters to fulfill isascii in addition to the primary
10588 predicate.
10589
3c9a524f
DH
105902001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10591
10592 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10593 scm_istr2flo, scm_istring2number): Removed.
10594
10595 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10596 SCM_SLOPPY_<foo>.
10597
10598 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10599 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10600 Added.
10601
10602 (scm_string_to_number): Use new number parser.
10603
10604 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10605 handles complex numbers.
10606
10607 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10608 SCM_<foo>_H.
10609
10610 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10611 SCM_N<pred>.
10612
10613 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10614
10615 (scm_i_mem2number): Added.
10616
10617 (scm_exact_to_inexact): Changed signature.
10618
10619 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10620 here instead of within scm_i_mem2number. Call scm_i_mem2number
10621 instead of scm_istr2int and scm_istring2number.
10622
01f11e02
DH
106232001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10624
10625 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10626 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10627 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10628 !SCM_<pred> over SCM_N<pred>.
10629
10630 (scm_eval_body): Remove side effecting code from macro call.
10631
10632 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10633 SCM_NIMP test.
10634
6cf69537
DH
106352001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10636
10637 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10638
54866b6c
MV
106392001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10640
10641 Removed vcell slot from structs.
43b83b54 10642
54866b6c
MV
10643 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10644 subsequent indices.
10645
10646 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10647 zero. Use scm_vtable_index_layout instead of "0" when accessing
10648 said slot.
10649 (scm_init_struct): Remove vcell slot layout code from
10650 required_vtable_fields.
10651
10652 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10653
10654 * goops.c (build_class_class_slots): Removed vcell slot
10655 definition.
10656
10657 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10658 Removed vcell slot layout code.
10659 (scm_si_vcell): Removed.
10660
5b54c4da
MV
106612001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10662
a0f5718e 10663 "Glocs" have been removed.
43b83b54 10664
a0f5718e
MV
10665 * tags.h: Update tag system docs.
10666 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10667 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10668 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10669 or SCM_NCONSP, respectively.
10670
10671 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10672 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10673 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10674
10675 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10676 tell glocs from structs.
43b83b54 10677
a0f5718e
MV
10678 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10679
10680 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10681 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10682 instead of with glocs.
10683 (EVALCAR): Do not test for glocs.
10684 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10685 condition.
10686 (scm_unmemocar): Do not handle glocs.
10687 (scm_m_atfop): Memoize as a variable, not as a gloc.
10688 (scm_eval_args, scm_deval_args): Do not handle glocs.
10689 (scm_ceval, scm_deval): Likewise.
43b83b54 10690
a0f5718e
MV
10691 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10692 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10693 Removed.
10694
10695 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10696
10697 * dynwind.c (scm_swap_bindings): Likewise.
10698 (scm_dowinds): Updated to recognize lists of variables instead of
10699 lists of glocs.
10700
10701 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10702
43b83b54 10703
5b54c4da
MV
10704 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10705 where it is needed.
43b83b54 10706
3c3db128
GH
107072001-07-25 Gary Houston <ghouston@arglist.com>
10708
10709 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10710 docstrings to reflect the n-ary implementation.
10711
dd29a169
MV
107122001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10713
10714 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10715 value of a variable, not the plain "return" statement.
10716
f5fe6c2f
MV
107172001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10718
10719 * eval.c: Allow variables in memoized code (in addition to glocs).
10720 (scm_lookupcar): Handle variables in lost races. Replace symbol
10721 with variable directly, do not make a gloc.
10722 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10723 like glocs.
10724 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10725 the main switch.
10726
ee0c7345
MV
107272001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10728
6d9ad98a
MV
10729 * variable.c (scm_i_variable_print): Use "value" instead of
10730 "binding" since a binding is the mapping between symbols and
10731 variables, not between variables and their values.
10732
ee0c7345
MV
10733 * tags.h (scm_tc7_variable): New.
10734 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10735 * print.c (scm_iprin1): Likewise.
10736
10737 * variable.h (scm_tc16_variable): Removed.
10738 (SCM_VARIABLEP): Test for new tc7 code.
10739 (scm_i_variable_print): New.
10740 * variable.c (scm_tc16_variable): Removed.
10741 (variable_print): Renamed to scm_i_variable_print and made
10742 non-static.
10743 (variable_equal_p): Removed.
10744 (make_variable): Construct a tc7 object instead of a smob.
10745 (scm_init_variable): Do not register smob.
43b83b54 10746
f3805ebb
MV
107472001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10748
10749 * tags.h: Include inttypes.h when we have it.
10750
107512001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10752
10753 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10754 is taken by the new SCM_IM_CALL_WITH_VALUES.
10755 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10756
6a1677a3
GH
107572001-07-22 Gary Houston <ghouston@arglist.com>
10758
10759 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10760 SCM_MAKINUM to convert regoff_t value to SCM.
10761
1bed8c28
GH
107622001-07-21 Gary Houston <ghouston@arglist.com>
10763
10764 * scmsigs.c: include sys/time.h for itimer stuff.
10765
e658215a
RB
107662001-07-19 Rob Browning <rlb@defaultvalue.org>
10767
10768 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10769
10770 * c-tokenize.lex: add option %nounput to quiet warning.
10771 Add prototype for yylex to quiet warning.
10772
10773 * scmconfig.h.in: add flags for setitimer and getitimer.
10774
10775 * scmsigs.h (scm_init_scmsigs): new prototype.
10776 (scm_init_scmsigs): new prototype.
10777
10778 * scmsigs.c (s_scm_setitimer): new function.
10779 (s_scm_setitimer): new function.
10780
58ade102
MG
107812001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10782
10783 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10784 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10785 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10786 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10787 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10788 guile-func-name-check.in, guile-snarf-docs-texi.in,
10789 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10790 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10791 objprop.c, objprop.h, options.c, options.h, random.h,
10792 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10793 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10794 version.c, version.h: Updated copyright notice.
10795
6b80d352
DH
107962001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10797
10798 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10799 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10800 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10801 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10802 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10803 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10804 sym_environment, scm_sym_change_class): New static variables to
10805 hold predefined symbols.
10806
10807 (build_class_class_slots): Build the list using scm_list_n
10808 instead of cons. Also, slots are already created as lists, thus
10809 making a call to maplist unnecessary.
10810
10811 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10812 scm_class_direct_subclasses, scm_class_direct_methods,
10813 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10814 scm_method_procedure, create_standard_classes, purgatory): Use
10815 predefined symbols.
10816
10817 (build_slots_list, compute_getters_n_setters,
10818 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10819 get_slot_value_using_name, set_slot_value_using_name,
10820 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10821 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10822 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10823
10824 (scm_sys_prep_layout_x): Minimize variable scopes.
10825
10826 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10827 scm_sys_fast_slot_set_x): Fix signedness.
10828
10829 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10830 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10831 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10832 when converting to and from SCM values.
10833
10834 (scm_enable_primitive_generic_x): Add rest argument checking.
10835
10836 (map, filter_cpl, maplist, scm_sys_initialize_object,
10837 scm_sys_prep_layout_x, slot_definition_using_name,
10838 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10839 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10840 predicates over SCM_N?IMP tests.
10841
10842 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10843 checking.
10844
10845 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10846 alias.
10847
63bcad19
DH
108482001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10849
10850 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10851
10852 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10853
10854 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10855
10856 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10857
4d6aae71
ML
108582001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10859
10860 * strings.c (s_scm_string): fix arg position in assert.
10861
4b8ec619
GH
108622001-07-11 Gary Houston <ghouston@arglist.com>
10863
10864 * strports.c (st_write): use memcpy, not strncpy. thanks to
10865 Dale P. Smith.
10866
dbb640bd
TTN
108672001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10868
10869 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10870 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10871 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10872 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10873 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10874 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10875 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10876 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10877 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10878 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10879 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10880 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10881 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10882 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10883 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10884 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10885 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10886 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10887 weaks.c, weaks.h: Remove "face-lift" comment.
10888
fd6c6321
RB
108892001-07-08 Rob Browning <rlb@defaultvalue.org>
10890
10891 * .cvsignore: add stamp-h.in.
10892
f91e4547
MG
108932001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10894
10895 * hooks.c (scm_make_hook, scm_add_hook_x),
10896 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10897 value info to the docstrings.
10898
7beabedb
MG
108992001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10900
10901 Some more compatibility patches for Windows.
dbb640bd 10902
7beabedb
MG
10903 * posix.c (getlogin): getlogin() implementation for Windows.
10904
10905 * backtrace.c, ioext.c: Include <stdio.h>.
10906
10907 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10908 exist.
10909
10910 * cpp_sig_symbols.in: Added SIGBREAK.
10911
0d0560d0
MV
109122001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10913
10914 * strports.c (scm_read_0str, scm_eval_0str): Call
10915 scm_c_read_string and scm_c_eval_string respectively, not
10916 themselves. Thanks to Dale P. Smith!
10917
9a97e362
DH
109182001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10919
10920 * unif.c (scm_array_set_x): The variable args does not
10921 necessarily have to be a list. Further, got rid of a redundant
10922 SCM_NIMP test.
10923
592996c9
DH
109242001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10925
10926 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10927 last.
10928
10929 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 10930 init_heap_seg): Fixed signedness.
592996c9
DH
10931
10932 (init_heap_seg): Replaced strange for-loop with a while loop.
10933
10934 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10935
10936 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10937
10938 The following patch adds conservative marking for the elements of
10939 free or allocated cells.
10940
10941 * gc.c (allocated_mark, heap_segment): New static functions.
10942
10943 (which_seg): Deleted, since the functionality is now provided by
10944 function heap_segment.
10945
10946 (map_free_list): Use heap_segment instead of which_seg.
10947
10948 (MARK): If cell debugging is disabled, mark free cells
10949 conservatively.
10950
10951 (scm_mark_locations, scm_cellp): Extracted the search for the
10952 heap segment of a SCM value into function heap_segment.
10953
10954 (scm_init_storage): Allocated cells must be marked
10955 conservatively.
10956
10957 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10958
10959 The following patch changes the representation of weak vectors to
10960 double cells instead of using an extension of the vector's
10961 allocated memory.
10962
10963 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10964 the result of SCM_WVECT_GC_CHAIN.
10965
10966 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10967
10968 * weaks.c (allocate_weak_vector): New static function. It does
10969 not patch any previously created vector object during the
10970 construction of a weak vector, and thus doesn't need to switch
10971 off interrupts during vector creation.
10972
10973 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10974 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10975 Use allocate_weak_vector to provide the new weak vector object.
10976
10977 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10978 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10979 now stored in the double cell.
10980
10981 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10982 Use SCM_WVECT_TYPE.
10983
10984 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10985 using an entry of the double cell.
10986
4dadf664
TTN
109872001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10988
10989 * stamp-h.in: bye bye
10990
02202352
MV
109912001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10992
10993 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10994 scm_eval_0str.
10995
10996 * load.c, load.h (scm_c_primitive_load,
10997 scm_c_primitive_load_path): New.
10998
10999 * strports.c, strports.h (scm_c_read_string): Renamed from
11000 scm_read_0str. Also, added "const" qualifier to argument.
11001 (scm_c_eval_string): Renamed from scm_eval_0str.
11002 (scm_read_0str, scm_eval_0str): Deprecated.
11003
df1ad0d1
MG
110042001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11005
11006 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
11007 SCM_LIST1.
11008
1afff620
KN
110092001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11010
11011 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11012 scm_list_n): New functions.
11013 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11014 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11015 (lots of files): Use the new functions.
4dadf664 11016
1afff620
KN
11017 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11018
11019 * strings.c: #include "libguile/deprecation.h".
11020
b858464a
MG
110212001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11022
11023 * read.c (scm_lreadr): When reading a hash token, check for a
11024 user-defined hash procedure first, so that overriding the builtin
11025 hash characters is possible (this was needed for implementing
11026 SRFI-4's read synax `f32(...)').
4dadf664 11027
b858464a
MG
11028 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11029 because the latter is unsigned now and breaks comparisons like
11030 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11031
d95c0b76
NJ
110322001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11033
11034 * eval.h, eval.c (scm_call_4): New function.
11035
11036 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11037 directly rather than dispatching to them via scm_ithrow and a lazy
11038 catch.
4dadf664 11039
d95c0b76
NJ
11040 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11041 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11042 for trap handler procedures.
11043
11044 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11045 procedures not being #f.
11046
30e3be5a
ML
110472001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11048
11049 * Makefile.am (c-tokenize.c): add rule to generate it.
11050 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11051
11052 filter-doc-snarfage.c: remove.
11053
82893676
MG
110542001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11055
11056 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11057
11058 The following set of changes makes compiling Guile under various
11059 Windows compilers easier. Compilation under GNU systems should
11060 not be affected at all.
11061
11062 Thanks to Stefan Jahn for all necessary information, patches and
11063 testing.
4dadf664 11064
82893676
MG
11065 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11066 getpgrp, ttyname, primitive-fork and some header inclusion for
11067 Windows.
11068
11069 * random.c: Define M_PI, if not predefined and use __int64 for
11070 LONG64 under Windows.
11071
11072 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11073 Windows and conditionalize some signal names.
11074
4dadf664 11075 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11076 Include socket library header under Windows.
11077
11078 * stime.c (CLKTCK): Add cast to int, to make it compile under
11079 Windows.
11080
11081 * ports.c (truncate): New function, compiled only under Windows.
11082
11083 * net_db.c: Do not declare errno under Windows.
11084
11085 * iselect.h, inet_aton.c: Include socket library headers under
11086 Windows.
11087
11088 * guile.c (inner_main): Under Windows, initialize socket library
11089 and initialize gdb_interface data structures.
11090
11091 * gdb_interface.h: Under Windows, gdb_interface cannot be
11092 initialized statically. Initialize at runtime instead.
11093
11094 * fports.c (write_all): ssize_t -> size_t.
11095 (fport_print): Conditionalize call to ttyname().
11096 (getflags): New function, compiled only under Windows.
11097
11098 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11099 primitives chown, link, fcntl.
11100 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11101 as path seperator.
11102
11103 * backtrace.c: Include <io.h> under Windows.
11104
11105 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11106
11107 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11108 declaration.
11109
fdc28395
KN
111102001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11111
11112 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11113 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11114 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11115 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11116 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11117 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11118 (scm_dynamic_wind, scm_dowinds), environments.c
11119 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11120 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11121 goops.c (GETVAR, purgatory, make_class_from_template,
11122 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11123 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11124 (scm_primitive_load), modules.c (scm_resolve_module,
11125 scm_c_define_module, scm_c_use_module, scm_c_export,
11126 module_variable, scm_eval_closure_lookup, scm_sym2var,
11127 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11128 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11129 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11130 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11131 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11132 (scm_object_to_string, scm_call_with_output_string,
11133 scm_call_with_input_string), throw.c (scm_body_thunk,
11134 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11135 scm_make_shared_array), vports.c (sf_flush, sf_write,
11136 sf_fill_input, sf_close): Use one of the above functions.
11137 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11138
36284627
DH
111392001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11140
11141 * filesys.c (scm_close), ports.c (scm_close_port,
11142 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11143 instead of SCM_NEGATE_BOOL.
11144
11145 * filesys.c (scm_stat): Clean up type dispatch.
11146
11147 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11148 scm_output_port_p): Get rid of redundant IM type check.
11149
11150 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11151 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11152 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11153 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11154 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11155 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11156 scm_addr_vector), stime.c (scm_strftime), strings.c
11157 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11158 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11159 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11160 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11161 instead of scm_makfromstr.
11162
11163 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11164 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11165 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11166 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11167 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11168 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11169 !SCM_<pred> over SCM_N<pred>.
11170
11171 * strings.[ch] (scm_makfromstr): Deprecated.
11172
11173 (scm_mem2string): New function, replaces scm_makfromstr.
11174
11175 * strings.c (scm_substring), strop.c (string_copy,
11176 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11177 (scm_symbol_to_string): Fix gc problem.
11178
11179 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11180 SCM_<foo>_H.
11181
11182 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11183 warning about comparing signed and unsigned values. This fix is
11184 not optimal, since it won't work reliably if sizeof (c_start) >
11185 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11186 solution is to define this macro as an inline function, thus
11187 allowing to specifiy the types of c_start and c_end.
11188
13dcb666
DH
111892001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11190
11191 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11192 scm_t_debug_frame*.
11193
11194 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11195 Rename <foo>H to SCM_<foo>_H.
11196
11197 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11198 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11199
11200 (narrow_stack): Make i unsigned. Don't use side-effecting
11201 operations in conditions.
11202
11203 (narrow_stack, scm_make_stack, scm_stack_id,
11204 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11205
11206 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11207 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11208 more.
11209
11210 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11211 signedness.
11212
ea2c3968 11213 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11214
11215 * stacks.h (SCM_FRAMEP): Fix type check.
11216
ac13d9d2
ML
112172001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11218
ee0c0e03
ML
11219 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11220 c-tokenize.c when doing maintainer-clean.
11221
ac13d9d2
ML
11222 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11223
11224 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11225 simplify.
11226
11227 * eval.c: all hash signs are in column 0.
11228
11229 * Makefile.am (guile_filter_doc_snarfage): build using
11230 c-tokenize.c, not filter-doc-snarfage.c.
11231 rearrange snarfing dependencies a bit.
11232
11233 * c-tokenize.lex: new file.
11234
16be44e5
MV
112352001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11236
11237 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11238 scm_t_srcpropso_plist. See the big type renaming.
11239 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11240 Thanks to Seth Alves!
4dadf664 11241
16be44e5
MV
11242 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11243 they aren't defined already.
11244
5843e5c9
DH
112452001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11246
11247 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11248 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11249 problem.
11250
11251 * backtrace.c (display_expression, scm_set_print_params_x,
11252 display_application, display_frame, scm_backtrace), numbers.c
11253 (scm_istring2number), objects.c (scm_class_of,
11254 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11255 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11256
11257 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11258 always positive.
11259
11260 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11261 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11262
11263 * objects.c (scm_class_of): Type fix.
11264
11265 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11266 eliminated goto.
11267
11268 * pairs.h (scm_error_pair_access): The function can return if
11269 called recursively.
11270
6b41a313
MG
112712001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11272
11273 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11274
11275 * gdbint.c, init.c: Removed inclusion of tag.h.
11276
11277 * tag.h, tag.c: Removed files.
11278
11279 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11280
fbbdb121
GH
112812001-06-20 Gary Houston <ghouston@arglist.com>
11282
11283 * deprecation.c, extensions.c, rw.c: include string.h.
11284
72c17ed0
GH
112852001-06-19 Gary Houston <ghouston@arglist.com>
11286
11287 * filter-doc-snarfage.c (process): added ungetc in
11288 MULTILINE_COOKIE case since otherwise it fails when there's no
11289 space between the '(' and the quote of the following string
11290 (gcc 3.0).
11291
4ff9f825
MV
112922001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11293
4927dd28
MV
11294 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11295
b629af45
MV
112962001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11297
11298 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11299 extension takes place.
11300 * strings.h (SCM_STRING_LENGTH): Likewise.
11301 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11302
4ff9f825
MV
11303 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11304 it.
11305
11306 * tags.h: Include <stdint.h> when we have it.
11307 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11308 available. Else use "unsigned long".
11309 (scm_signed_bits_t): New.
11310
11311 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11312 (SCM_INUM): Cast result to scm_signed_bits_t.
11313
58bee6a8
TTN
113142001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11315
11316 * mkstemp.c: Update path to #include file scmconfig.h.
11317 Thanks to Golubev I. N.
11318
00d8d838
DH
113192001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11320
11321 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11322
ea2c3968 11323 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11324 the macro definition.
11325
11326 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11327 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11328 instead of SCM_INST_TYPE.
11329
11330 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11331 the object is a struct before accessing its struct flags.
11332
11333 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11334
495c67e5
GH
113352001-06-10 Gary Houston <ghouston@arglist.com>
11336
11337 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11338 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11339 work reliably anymore. try it from boot-9.scm instead.
11340
6a9003d3
MV
113412001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11342
11343 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11344 Thanks to Matthias Köppe!
58bee6a8 11345
47bcd646
ML
113462001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11347
a88ff5b6
ML
11348 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11349 space-happy C preprocessors.
11350
47bcd646 11351 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11352 inside cookies. thanks to Matthias Köppe!
47bcd646 11353
bab246f3
DH
113542001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11355
11356 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11357 keywords. Fix gc protection.
11358
11359 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11360 operations in macro calls.
11361
11362 * pairs.c (scm_error_pair_access): Avoid recursion.
11363
11364 Thanks to Matthias Koeppe for reporting the bugs that correspond
11365 to the following set of patches.
11366
11367 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11368 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11369 bitvector base address using SCM_BITVECTOR_BASE.
11370
11371 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11372 unsigned long*.
11373
dcb410ec
DH
113742001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11375
11376 * goops.c (SCM_CLASS_REDEF): Removed.
11377
11378 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11379 SCM_<foo>_H.
11380
11381 Thanks to Matthias Koeppe for reporting the bugs that correspond
11382 to the following set of patches.
11383
11384 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11385 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11386 scm_sys_allocate_instance, clear_method_cache,
11387 scm_sys_invalidate_method_cache_x, scm_make,
11388 create_standard_classes, scm_make_port_classes, scm_make_class,
11389 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11390
11391 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11392
11393 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11394
11395 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11396 UNARY_ELTS_CODE): Remove bogus break statement.
11397
11398 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11399 Don't access bit vectors elements as SCM objects.
11400
11401 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11402 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11403 Don't assign to an unpacked value.
11404
e81d98ec
DH
114052001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11406
11407 * __scm.h (SCM_NORETURN): Moved here from error.h.
11408
11409 (SCM_UNUSED): New macro.
11410
11411 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11412
11413 * backtrace.c (display_error_handler), continuations.c
11414 (continuation_print), debug.c (debugobj_print), dynwind.c
11415 (guards_print), environments.c (observer_print,
11416 core_environments_finalize, leaf_environment_cell,
11417 leaf_environment_print, eval_environment_print,
11418 eval_environment_observer, import_environment_define,
11419 import_environment_undefine, import_environment_print,
11420 import_environment_observer, export_environment_define,
11421 export_environment_undefine, export_environment_print,
11422 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11423 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11424 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11425 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11426 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11427 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11428 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11429 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11430 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11431 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11432 set_slot_value, test_slot_existence, scm_change_object_class,
11433 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11434 default_setter), guardians.c (guardian_print, guardian_gc_init,
11435 guardian_zombify, whine_about_self_centered_zombies), guile.c
11436 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11437 mallocs.c (malloc_print), numbers.c (scm_print_real,
11438 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11439 end_input_default, scm_port_print, fill_input_void_port,
11440 write_void_port), root.c (root_print), smob.c (scm_mark0,
11441 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11442 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11443 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11444 (scm_struct_free_0, scm_struct_free_standard,
11445 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11446 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11447 scm_handle_by_throw, scm_ithrow), weaks.c
11448 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11449 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11450 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11451
11452 * error.h (SCM_NORETURN): Moved to __scm.h.
11453
11454 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11455 Renamed <foo>H to SCM_<foo>_H.
11456
11457 * gc.c (debug_cells_gc_interval): New static variable.
11458
11459 (scm_assert_cell_valid): If selected by the user, perform
11460 additional garbage collections.
11461
11462 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11463 if additional garbage collections are desired.
11464
11465 (mark_gc_async): If additional garbage collections are selected
11466 by the user, don't call the after-gc-hook. Instead require the
11467 user to run the hook manually.
11468
11469 * pairs.c (scm_error_pair_access): New function. Only compiled
11470 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11471
11472 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11473
11474 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11475 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11476 is a real pair object. (Glocs are also accepted, but that may
11477 change.) If not, abort with an error message.
11478
17fa3fcf
DH
114792001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11480
11481 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11482
11483 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11484 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11485
feeedafb
MV
114862001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11487
11488 * extensions.c (scm_c_register_extension): Allow NULL as library
11489 name.
11490 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11491
feeedafb
MV
11492 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11493 non-pointers are being compared. Thanks to Alexander Klimov!
11494
4bcdfe46
GH
114952001-06-04 Gary Houston <ghouston@arglist.com>
11496
11497 * rw.c (scm_write_string_partial): new procedure implementing
11498 write-string/partial in (ice-9 rw).
11499 * rw.h: declare scm_write_string_partial.
58bee6a8 11500
f480396b
MV
115012001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11502
feeedafb
MV
11503 * keywords.c (keyword_print): Substract 1 from length of symbol
11504 name, accounting for the silly dash.
11505
11506 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11507 Do not emit deprecation warning.
11508
f480396b
MV
11509 Added exception notice to all files.
11510
11511 * dynl.c: Include "deprecation.h".
11512
c794483c
MV
115132001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11514
11515 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11516 scm_clear_registered_modules): Deprecated.
11517
9454d8d5
RB
115182001-06-02 Rob Browning <rlb@cs.utexas.edu>
11519
11520 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11521 guile-snarf-docs-texi.
11522
11523 * fports.c: HAVE_ST_BLKSIZE changed to
11524 HAVE_STRUCT_STAT_ST_BLKSIZE.
11525 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11526 HAVE_STRUCT_STAT_ST_BLKSIZE.
11527
11528 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11529 HAVE_STRUCT_STAT_ST_RDEV.
11530 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11531 HAVE_STRUCT_STAT_ST_BLKSIZE.
11532 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11533 HAVE_STRUCT_STAT_ST_BLOCKS.
11534
114f9bab
MV
115352001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11536
b0c16cd9
MV
11537 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11538 of scm_eval_x to allow module changes between the forms in the
11539 string. Set/restore module using scm_c_call_with_current_module.
11540
114f9bab
MV
11541 * mkstemp.c: New file, slightly modified from libiberties
11542 mkstemps.c.
11543
c99f9605
ML
115442001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11545
11546 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11547 filter-doc-snarfage.c: new files.
11548
11549 * Makefile.am: add stuff to [build,] use and distribute
11550 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11551
11552 * guile-snarf.in: grok the new snarf output.
11553
11554 * snarf.h: make the output both texttools- and `read'-friendly.
11555
47bcd646
ML
11556 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11557 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11558
7eb5d7b2
MV
115592001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11560
11561 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11562 error for unsupported format controls and for superflous
ec2667f0 11563 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11564
11565 * print.h, print.c (scm_print_symbol_name): Factored out of
11566 scm_iprin1.
11567 (scm_iprin1): Call it.
58bee6a8 11568
7eb5d7b2
MV
11569 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11570 weird names are printed correctly.
11571
11572 * print.c (scm_print_symbol_name): Symbols whose name starts with
11573 `#' or `:' or ends with `:' are considered weird.
11574
609c3d30
MG
115752001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11576
11577 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11578 and /.
11579
115802001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11581
11582 * debug.h: Removed prototype for scm_eval_string.
11583
8d09eb04
MG
115842001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11585
11586 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11587 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11588
11589 Change strncpy to memcpy to allow embedded NUL characters in
11590 symbol prefix.
11591
dd85ce47
ML
115922001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11593
fde50407
ML
11594 * hooks.c (scm_create_hook): deprecated.
11595 (make_hook): deleted.
11596 (scm_make_hook): all the hook creation code is now here.
11597
11598 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11599 a hook, make it permanent, and do a `scm_c_define' on it.
11600
dd85ce47
ML
11601 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11602
11603 * socket.c (s_scm_inet_pton): fix docstring quoting.
11604 (s_scm_inet_ntop): ditto.
11605
11606 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11607
11608 * hashtab.c (scm_internal_hash_fold): fix argument position in
11609 SCM_ASSERT.
11610
11611 * environments.c (s_scm_import_environment_set_imports_x): fix
11612 argument position in SCM_ASSERT.
11613
11614 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11615 (s_scm_make_iloc): ditto.
11616
729dbac3
DH
116172001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11618
11619 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11620
11621 * eval.c (promise_print): Read the promise's value as an object.
11622
11623 (SCM_CEVAL): Don't perform side-effecting operations in macro
11624 parameters.
11625
11626 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11627 conditional expression.
11628
11629 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11630 initializer.
11631
11632 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11633 text, removed redundant computation of effective_length and fixed
11634 the overflow check.
11635
11636 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11637 values.
11638
11639 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11640
11641 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11642
11643 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11644 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11645
11646 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11647
11648 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11649 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11650 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11651 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11652
11653 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11654
11655 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11656
ea2c3968 11657 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11658
11659 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11660 problem.
11661
11662 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11663 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11664 Read SCM objects rather than scm_bits_t values.
11665
11666 * tags.h (SCM_VOIDP_TEST): Removed.
11667
11668 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11669 value of 2 now corresponds to the former 1, the current 1
11670 corresponds to the former situation that SCM_VOIDP_TEST was
11671 defined.
11672
58bee6a8
TTN
11673 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11674 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11675 typedef struct scm_unused_struct { } * SCM;
11676 Thanks to Han-Wen Nienhuys for the suggestion.
11677
11678 * unif.c (scm_array_set_x): Fix typing problem, and use
11679 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11680 dealing with uniform vectors.
11681
6b1b030e
ML
116822001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11683
11684 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11685 (scm_igc): mark from them, too (precisely, not conservatively!).
11686
11687 * root.h (scm_gc_registered_roots): new object in
11688 scm_sys_protects.
11689
11690 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11691 `scm_protect_object'. shouldn't call it at all, though, it seems.
11692
11693 * gc.c (scm_[un]protect_object): deprecated.
11694 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11695 (scm_gc_[un]register_root[s]): new.
11696
11697 * gc.h: add prototypes for scm_gc_[un]protect_object,
11698 scm_gc_[un]register_root[s].
11699
c014a02e
ML
117002001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11701
11702 revert the controversial part of the 2001-05-24 changes.
11703
0120801d
MV
117042001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11705
f4e0611e
MV
11706 * modules.c (scm_env_module): Exported to Scheme.
11707
0120801d 11708 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11709
0120801d 11710 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11711
0120801d
MV
11712 * backtrace.c: Include "libguile/filesys.h".
11713 (sym_base, display_backtrace_get_file_line,
11714 display_backtrace_file, display_backtrace_file_and_line): New.
11715 (display_frame): Call display_backtrace_file_and_line if that is
11716 requested.
11717 (display_backtrace_body): Call scm_display_backtrace_file if
11718 requested.
11719
11720 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11721 Prototypes removed since there's no definition for these
11722 functions.
11723
880a7d13
MG
117242001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11725
11726 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11727 Changed use of scm_array->scm_array_t and
11728 scm_array_dim->scm_array_dim_t to enable build with
11729 --disable-deprecated.
11730
1be6b49c
ML
117312001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11732
11733 The purpose of this set of changes is to regularize Guile's usage
11734 of ANSI C integral types, with the following ideas in mind:
11735
d69c867a
ML
11736 - SCM does not nesessarily have to be long.
11737 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11738 - long is not nesessarily the same size as int.
11739
11740 The changes are incomplete and possibly buggy. Please test on
11741 something exotic.
11742
11743 * validate.h
11744 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11745 new macros.
11746
11747 * unif.h: type renaming:
11748 scm_array -> scm_array_t
11749 scm_array_dim -> scm_array_dim_t
11750 the old names are deprecated, all in-Guile uses changed.
11751
11752 * tags.h (scm_ubits_t): new typedef, representing unsigned
11753 scm_bits_t.
11754
11755 * stacks.h: type renaming:
11756 scm_info_frame -> scm_info_frame_t
11757 scm_stack -> scm_stack_t
11758 the old names are deprecated, all in-Guile uses changed.
11759
11760 * srcprop.h: type renaming:
11761 scm_srcprops -> scm_srcprops_t
11762 scm_srcprops_chunk -> scm_srcprops_chunk_t
11763 the old names are deprecated, all in-Guile uses changed.
11764
11765 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11766 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11767 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11768 vectors.c, vports.c, weaks.c:
11769 various int/size_t -> size_t/scm_bits_t changes.
11770
11771 * random.h: type renaming:
11772 scm_rstate -> scm_rstate_t
11773 scm_rng -> scm_rng_t
11774 scm_i_rstate -> scm_i_rstate_t
11775 the old names are deprecated, all in-Guile uses changed.
11776
11777 * procs.h: type renaming:
11778 scm_subr_entry -> scm_subr_entry_t
11779 the old name is deprecated, all in-Guile uses changed.
11780
11781 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11782 type renaming:
11783 scm_option -> scm_option_t
11784 the old name is deprecated, all in-Guile uses changed.
11785
11786 * objects.c: various long -> scm_bits_t changes.
11787 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11788
11789 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11790 SCM_I_FIXNUM_BIT.
11791
11792 * num2integral.i.c: new file, multiply included by numbers.c, used
11793 to "templatize" the various integral <-> num conversion routines.
11794
11795 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11796 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11797 deprecated.
11798 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11799 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11800 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11801 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11802 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11803 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11804 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11805 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11806 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11807 scm_num2size): new functions.
11808
d69c867a 11809 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11810
11811 * load.c: change int -> size_t in various places (where the
11812 variable is used to store a string length).
11813 (search-path): call scm_done_free, not scm_done_malloc.
11814
11815 * list.c (scm_ilength): return a scm_bits_t, not long.
11816 some other {int,long} -> scm_bits_t changes.
11817
11818 * hashtab.c: various [u]int -> scm_bits_t changes.
11819 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11820 (scm_ihashx): n: uint -> scm_bits_t
11821 use scm_bits2num instead of scm_ulong2num.
11822
11823 * gsubr.c: various int -> scm_bits_t changes.
11824
11825 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11826
d69c867a 11827 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
11828
11829 * gh.h (gh_str2scm): len: int -> size_t
11830 (gh_{get,set}_substr): start: int -> scm_bits_t,
11831 len: int -> size_t
11832 (gh_<num>2scm): n: int -> scm_bits_t
11833 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11834 (gh_length): return scm_bits_t, not unsigned long.
11835
11836 * gc.[hc]: various small changes relating to many things stopping
11837 being long and starting being scm_[u]bits_t instead.
11838 scm_mallocated should no longer wrap around.
11839
11840 * fports.h: type renaming:
11841 scm_fport -> scm_fport_t
11842 the old name is deprecated, all in-Guile uses changed.
11843
11844 * fports.c (fport_fill_input): count: int -> scm_bits_t
11845 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11846
11847 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11848 those prototypes, as the functions they prototype don't exist.
11849
11850 * fports.c (default_buffer_size): int -> size_t
11851 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11852 default_size: int -> size_t
11853 (scm_setvbuf): csize: int -> scm_bits_t
11854
11855 * fluids.c (n_fluids): int -> scm_bits_t
11856 (grow_fluids): old_length, i: int -> scm_bits_t
11857 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11858 scm_bits_t
11859 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11860
11861 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11862 the new and shiny SCM_NUM2INT.
11863
11864 * extensions.c: extension -> extension_t (and made a typedef).
11865
11866 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11867 there are no nasty surprises if/when the various deeply magic tag
11868 bits move somewhere else.
11869
11870 * eval.c: changed the locals used to store results of SCM_IFRAME,
11871 scm_ilength and such to be of type scm_bits_t (and not int/long).
11872 (iqq): depth, edepth: int -> scm_bits_t
11873 (scm_eval_stack): int -> scm_bits_t
11874 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11875 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11876 i: int -> scm_bits_t
11877
11878 * environments.c: changed the many calls to scm_ulong2num to
11879 scm_ubits2num.
11880 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11881
11882 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11883
11884 * debug.h: type renaming:
11885 scm_debug_info -> scm_debug_info_t
11886 scm_debug_frame -> scm_debug_frame_t
11887 the old names are deprecated, all in-Guile uses changed.
11888 (scm_debug_eframe_size): int -> scm_bits_t
11889
11890 * debug.c (scm_init_debug): use scm_c_define instead of the
11891 deprecated scm_define.
11892
11893 * continuations.h: type renaming:
11894 scm_contregs -> scm_contregs_t
11895 the old name is deprecated, all in-Guile uses changed.
11896 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11897 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11898
11899 * continuations.c (scm_make_continuation): change the type of
d69c867a 11900 stack_size from long to scm_bits_t.
1be6b49c
ML
11901
11902 * ports.h: type renaming:
11903 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11904 scm_port -> scm_port_t
11905 scm_ptob_descriptor -> scm_ptob_descriptor_t
11906 the old names are deprecated, all in-Guile uses changed.
11907 (scm_port_t.entry): int -> scm_bits_t.
11908 (scm_port_t.line_number): int -> long.
11909 (scm_port_t.putback_buf_size): int -> size_t.
11910
11911 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 11912 global namespace and have little value beside that).
1be6b49c
ML
11913 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11914 SCM handle).
11915 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 11916 exist (for size_t & ptrdiff_t).
1be6b49c
ML
11917 (scm_sizet): deprecated.
11918
11919 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11920
a6219f22
MV
119212001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11922
11923 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11924 SCM_VARIABLE_INIT since that it what it used to be.
11925
11926 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 11927 ANSIsh. Thanks to Matthias Köppe!
a6219f22 11928
311b6a3c
MV
119292001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11930
9dfc4faa
MV
11931 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11932 needed for weak-key hashtables.
11933
11934 * procs.c (scm_make_subr_with_generic): Add missing last argument
11935 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11936
11937 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11938 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
11939
11940 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11941
2fc933fe
MV
119422001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11943
57ae112d
MV
11944 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11945 `duplicate_string'. Do not use an indirect cell, store symbol
11946 directly in collision list of hash table.
11947 (duplicate_string): Removed.
58bee6a8 11948
57ae112d
MV
11949 * init.c (scm_init_guile_1): Call scm_init_extensions.
11950
11951 * Makefile.am: Add "extensions.c" and related files in all the
11952 right places.
11953
11954 * extensions.h, extension.c: New files.
11955
11956 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11957
2fc933fe
MV
11958 * modules.h (scm_system_module_env_p): Move out of deprecated
11959 section.
11960
11961 * rw.h (scm_init_rw): Added prototype.
11962
11963 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11964 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11965 New functions. They replace scm_make_gsubr and
11966 scm_make_gsubr_with_generic. The `make' variants only create the
11967 gsubr object, while the `define' variants also put it into the
11968 current module. Changed all callers.
11969 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11970
11971 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11972 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11973 functions. They replace scm_make_subr, scm_make_subr_opt and
11974 scm_make_subr_with_generic. The `make' variants only create the
11975 subr object, while the `define' variants also put it into the
11976 current module. Changed all callers.
11977 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11978 Deprecated.
11979
11980 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11981 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11982 the comments above.
58bee6a8 11983
18928596
NJ
119842001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11985
11986 * throw.c (scm_lazy_catch): Slight docstring clarification.
11987
21a13beb
MV
119882001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11989
e2b6ddc6
MV
11990 * throw.c: Lazy-catch handlers are no longer allowed to return.
11991 Fixed comments throughout.
11992 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11993 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11994 recognized as such.
11995
21a13beb
MV
11996 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11997 refered to s_scm_minor_version previously.
11998
11999 * modules.h, modules.c: Moved around a lot of code so that
12000 deprecated features appear at the bottom.
12001 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
12002 module_prefix, make_modules_in_var, beautify_user_module_x_var,
12003 scm_the_root_module, scm_make_module, scm_ensure_user_module,
12004 scm_load_scheme_module): Deprecated.
12005 (scm_system_module_env_p): Return SCM_BOOL_T directly for
12006 environments corresponding to the root module.
12007 (convert_module_name, scm_c_resolve_module,
12008 scm_c_call_with_current_module, scm_c_define_module,
12009 scm_c_use_module, scm_c_export): New.
12010 (the_root_module): New static variant of scm_the_root_module. Use
12011 it everywhere instead of scm_the_root_module.
58bee6a8 12012
21a13beb
MV
12013 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12014 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12015 (scm_c_with_fluid): New.
12016 (scm_with_fluids): Use scm_c_with_fluids instead of
12017 scm_internal_with_fluids.
58bee6a8 12018
21a13beb
MV
12019 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12020 `scm_init_goops'. Do not explicitly create/switch modules.
12021 Return SCM_UNSPECIFIED.
12022 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12023 (scm_load_goops): Use scm_c_resolve_module instead of
12024 scm_resolve_module.
58bee6a8 12025
21a13beb
MV
12026 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12027 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12028 `scm_init_rw' prior to loading the startup files.
12029
12030 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12031 scm_init_rdelim. Do not explicitly create/switch modules.
12032 Return SCM_UNSPECIFIED.
12033 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12034 procedure.
58bee6a8 12035
21a13beb
MV
12036 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12037 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12038 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12039
12040 * script.c (scm_shell): Evaluate the compiled switches in the
12041 current module, not in the root module.
12042
120432001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12044
12045 * fluids.c (scm_c_with_fluids): Rename from
12046 scm_internal_with_fluids.
12047 (scm_internal_with_fluids): Deprecated.
12048 (scm_c_with_fluid): New.
12049
09cb9e73
DH
120502001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12051
12052 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12053
12054 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12055 accessed with SCM_C[AD]R.
12056
12057 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12058
c81ea65d
RB
120592001-05-16 Rob Browning <rlb@cs.utexas.edu>
12060
12061 * version.c (s_scm_major_version): doc fixes.
12062 (s_scm_minor_version): doc fixes.
12063 (s_scm_minor_version): new function.
12064
12065 * version.h (scm_init_version): new function.
12066
12067 * versiondat.h.in: add GUILE_MICRO_VERSION.
12068
887dfa7d
DH
120692001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12070
12071 * deprecation.c (scm_init_deprecation): Renamed
12072 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12073
78930a69
MV
120742001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12075
12076 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12077 dependent on cpp_cnvt.awk
12078
39cde5c5
MG
120792001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12080
12081 * script.c (scm_compile_shell_switches): New command line option
12082 `--use-srfi' for loading a list of SRFIs on startup.
12083 (scm_shell_usage): Added `--use-srfi' to help message.
12084
f3f9dcbc
MV
120852001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12086
78930a69 12087 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12088
f3f9dcbc
MV
12089 The concept of vcells has been removed from Guile. With it,
12090 explicit obarrays and associated operations are gone. Use
12091 hashtables instead of obarrays.
887dfa7d 12092
f3f9dcbc
MV
12093 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12094 result as variable instead of vcell. Glocs no longer point to a
12095 vcell but to a variable. Use scm_c_define instead of
12096 scm_sysintern and treat the result as a variable (which it is),
12097 not a vcell.
887dfa7d 12098
f3f9dcbc
MV
12099 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12100 SCM_DEFVARIABLEP): Deprecated.
12101 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12102 (variable_print): Do not print name of variable.
12103 (variable_equalp): Compare values, not vcells.
12104 (anonymous_variable_sym): Removed.
12105 (make_vcell_variable): Removed.
12106 (make_variable): New, as replacement.
12107 (scm_make_variable, scm_make_undefined_variable): Do not take name
12108 hint parameter.
12109 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12110 error in that case.
12111 (scm_builtin_variable): Deprecated.
12112
12113 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12114 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12115 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12116 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12117 scm_string_to_obarray_symbol, scm_intern_symbol,
12118 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12119 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12120 Deprecated and moved to "symbols-deprecated.c".
12121 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12122 (scm_init_symbols): Call scm_init_symbols_deprecated.
12123 * symbols-deprecated.c: New file.
12124 * Makefile.am: Added symbols-deprecated.c and related files in all
12125 the right places.
887dfa7d 12126
f3f9dcbc
MV
12127 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12128 SCM_GLOBAL_VCELL_INIT): Deprecated.
12129 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12130 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12131
f3f9dcbc
MV
12132 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12133 SCM_GLOC_SYM.
12134
12135 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12136 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12137 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12138 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12139 Changed according to the `throughout' comments.
12140
12141 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12142 to `int'.
12143 (scm_module_type): Removed.
12144 (the_root_module): Renamed to the_root_module_var. Now points to
12145 a variable instead of a vcell. Updated all uses.
12146 (scm_the_root_module): Return SCM_BOOL_F when module systems
12147 hasn't been booted yet.
12148 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12149 (scm_post_boot_init_modules): Made static.
12150 (scm_set_current_module): Call scm_post_boot_init_modules on first
12151 call.
12152 (make_modules_in, beautify_user_module_x, resolve_module,
12153 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12154 suffix. Now point to variables instead of vcells. Updated all
12155 uses.
12156 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12157 and return SCM_BOOL_F in that case.
12158 (scm_module_transformer): Likewise.
12159 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12160 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12161 (scm_eval_closure_lookup): Do not allow new definitions when
12162 `interface' flag is set.
12163 (scm_standard_interface_eval_closure): New.
12164 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12165 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12166 scm_c_lookup, scm_c_module_define, scm_c_define,
12167 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12168 scm_modules_prehistory): New.
12169 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12170 instead of scm_intern0.
887dfa7d 12171
f3f9dcbc
MV
12172 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12173 symbol.
12174
12175 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12176 hashtable operations to maintain the keywords, not obarray ones.
12177
12178 * init.c (scm_load_startup_files): Do not call
12179 scm_post_boot_init_modules. This is done by
12180 scm_set_current_module now.
12181 (scm_init_guile_1): Call scm_modules_prehistory. Call
12182 scm_init_variable early on.
12183
12184 * goops.c (s_scm_sys_goops_loaded): Get
12185 var_compute_applicable_methods from scm_sym2var, not from a direct
12186 invocation of scm_goops_lookup_closure.
12187
12188 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12189
12190 * gc.c: Added simple debugging hack to mark phase of GC: When
12191 activated, do not tail-call scm_gc_mark. This gives nice
12192 backtraces.
12193 (scm_unhash_name): Removed.
12194
12195 * feature.c (features): Renamed to features_var. Now points to a
12196 variable instead of a vcell. Updated all uses.
12197
12198 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12199 `scm_current_module_lookup_closure' which will do the right thing
12200 when the module system hasn't been booted yet.
12201 (SCM_GLOC_SYM): Removed.
12202 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12203 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12204
f3f9dcbc
MV
12205 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12206 instead of with vcells. Do not overwrite `var' with the result of
12207 the lookup, use the new `real_var' instead. Remove `var2' in
12208 exchange (which was only used with threads).
12209 (sym_three_question_marks): New.
12210 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12211 `SCM_GLOC_SYM'.
12212 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12213 (scm_m_atfop): Expect the function definition to be a variable
12214 instead of a vcell.
12215 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12216 symbol instead.
12217 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12218 (scm_eval_args): Use more explicit code in the gloc branch of the
12219 atrocious struct ambiguity test. The optimizer will sort this
12220 out.
12221 (scm_deval_args): Likewise.
12222 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12223 remember the symbol instead. Added some comments where
12224 scm_tc3_cons_gloc really exclusively refers to structs.
12225 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12226 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12227 of scm_sysintern in general.
12228
12229 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12230 explicit magic.
12231
12232 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12233 pairs. Put the variable directly in the gloc.
12234 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12235 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12236
12237 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12238
12239 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12240 scm_the_last_stack_fluid_var. It now points to a variable instead
12241 of a vcell. Updated all uses.
12242 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12243 instead of a vcell. Updated all uses.
12244
12245 * _scm.h: Include "variables.h" and "modules.h" since almost
12246 everybody needs them now.
12247
12248 * root.h (scm_symhash, scm_symhash_vars): Removed.
12249 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12250
7c33806a
DH
122512001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12252
12253 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12254 scm_listofnull.
7c33806a
DH
12255
12256 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12257 like the SCM_NEWCELL macro counterparts.
12258
12259 (scm_init_storage, scm_init_gc): Moved initialization of
12260 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12261
12262 (scm_init_storage): Moved initialization of scm_undefineds and
12263 scm_listofnull to eval.c, initializion of scm_nullstr to
12264 strings.c, initializion of scm_nullvect to vectors.c.
12265
12266 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12267 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12268
12269 * init.c (scm_init_guile_1): Reordered some initializations and
12270 added dependcy information comments.
12271
12272 * load.c (scm_init_load): Use scm_nullstr.
12273
12274 * strings.c (scm_init_strings): Initialize scm_nullstr.
12275
12276 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12277
11bbab47
MV
122782001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12279
12280 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12281 multiple lines. Thanks to Matthias Köppe!
11bbab47 12282
5cd06d5e
DH
122832001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12284
12285 * deprecation.c: Fixed copyright date.
12286
12287 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12288 DEPRECATION_H to SCM_DEPRECATION_H.
12289
32bac999
TTN
122902001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12291
12292 * guile-doc-snarf.in: Update copyright.
12293 Fix relative path bug. Thanks to Sergey Poznyakoff.
12294
c9dcc5ae
MV
122952001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12296
12297 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12298 accept open ports. Thanks to Quetzalcoatl Bradley!
12299
7c582ec9
MG
123002001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12301
12302 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12303 has 779 primitives on startup.
12304
284ab601
MV
123052001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12306
12307 * eval.c (scm_i_eval): Copy expression before passing it to
12308 SCM_XEVAL. The copy operation was removed unintendedly during my
12309 change on 2001-03-25.
12310
910d1e40
ML
123112001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12312
9a5fa6e9 12313 from Matthias Köppe (thanks!):
910d1e40
ML
12314
12315 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12316 portable.
12317
12318 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12319 docstring.
12320
56e55ac7
DH
123212001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12322
12323 * gc.c (scm_init_gc): Added FIXME comment.
12324
12325 * hooks.c: Since hooks don't have a name any more, it is not
12326 necessary to include objprop.h.
12327
12328 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12329
12330 (symbol_name, scm_make_hook_with_name): Removed.
12331
12332 (scm_create_hook): Don't set the hook's name property.
12333
12334 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12335
12336 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12337
12338 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12339
12340 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12341 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12342 FLOBUFLEN and define it unconditionally.
12343
d204b24c
MV
123442001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12345
438201b4
MV
12346 * gh_data.c (gh_lookup): Call gh_module_lookup with
12347 `scm_current_module ()', not `#f'.
12348 (gh_module_lookup): Expect a module instead of an obarray as first
12349 argument and do lookup in that module.
56e55ac7 12350
d204b24c
MV
12351 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12352 arrays. The length of array is already determined differently and
12353 scm_uniform_vector_length does not work on arrays.
12354
26c1d549
MV
123552001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12356
fe7c2f88
MV
12357 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12358 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12359
26c1d549
MV
12360 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12361 they are not used. Changed `wrong type' error into `wrong num
12362 args' error. Changed all callers.
56e55ac7 12363
26c1d549
MV
12364 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12365 arguments are supplied.
12366
1c938eb8
TTN
123672001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12368
12369 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12370 describe `regexp/notbol' and `regexp/noteol' execution flags.
12371
3a6379f7
TTN
12372 * strop.c (scm_substring_move_x): Doc fix; nfc.
12373
c10ecc4c
MV
123742001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12375
12376 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12377 (scm_set_object_procedure_x): Use it to check argument. Fix
12378 docstring.
12379
12380 * evalext.c (scm_definedp): Fix docstring.
12381
a57a0b1e
GH
123822001-05-05 Gary Houston <ghouston@arglist.com>
12383
12384 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12385 support.
12386
7a095584
NJ
123872001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12388
12389 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12390 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12391 Change R4RS references to R5RS.
12392
12393 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12394 docstring source are correctly reproduced in the output (ii)
12395 we don't anymore get occasional trailing quotes. Also reorganized
12396 and commented the code a little.
12397
12398 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12399 fixes.
12400
dd2a6f3a
MG
124012001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12402
12403 * strop.c (scm_string_split): New procedure.
12404
12405 * strop.h (scm_string_split): Added prototype.
12406
00120130
GH
124072001-05-04 Gary Houston <ghouston@arglist.com>
12408
12409 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12410 Dale P. Smith.
12411
b65e6bfe
MV
124122001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12413
12414 * rw.c: Include "modules.h" and "strports.h".
12415
12416 * net_db.h (scm_gethost): Added prototype.
12417
12418 * deprecation.h, deprecation.c: New.
12419 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12420 (DOT_X_FILES): Added "deprecation.x".
12421 (modinclude_HEADERS): Added "deprecation.h".
12422
12423 * init.c: Include "deprecation.h".
12424 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12425
b65e6bfe
MV
124262001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12427
12428 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12429 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12430 New.
12431
b0e5fd8c
GH
124322001-04-29 Gary Houston <ghouston@arglist.com>
12433
12434 * rw.c: new file, implementing C part of module (ice-9 rw).
12435 (scm_read_string_x_partial): moved from ioext.c
12436 (scm_init_rw): new proc.
12437 * rw.h: new file.
12438 init.c: include rw.h and call scm_init_rw.
12439 Makefile.am: include rw.c and rw.h.
12440
0b2da99c
RB
124412001-04-28 Rob Browning <rlb@cs.utexas.edu>
12442
12443 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12444 know what's supposed to happen to it.
12445
12446 * list.h (scm_list_star): deprecation expired - removed.
12447
12448 * numbers.h (scm_dblproc): deprecation expired - removed.
12449 (SCM_UNEGFIXABLE): deprecation expired - removed.
12450 (SCM_FLOBUFLEN): deprecation expired - removed.
12451 (SCM_INEXP): deprecation expired - removed.
12452 (SCM_CPLXP): deprecation expired - removed.
12453 (SCM_REAL): deprecation expired - removed.
12454 (SCM_IMAG): deprecation expired - removed.
12455 (SCM_REALPART): deprecation expired - removed.
12456 (scm_makdbl): deprecation expired - removed.
12457 (SCM_SINGP): deprecation expired - removed.
12458 (SCM_NUM2DBL): deprecation expired - removed.
12459 (SCM_NO_BIGDIG): deprecation expired - removed.
12460
12461 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12462 (scm_tc_dblr): deprecation expired - removed.
12463 (scm_tc_dblc): deprecation expired - removed.
12464 (scm_tc16_flo): deprecation expired - removed.
12465 (scm_tc_flo): deprecation expired - removed.
12466
12467 * tag.h (scm_tag): deprecation expired - removed.
12468
12469 * tag.c: (scm_tag): deprecation expired - removed.
12470
12471 * ioext.c: (scm_fseek): deprecation expired - removed.
12472
12473 * ioext.h (scm_fseek): deprecation expired - removed.
12474
12475 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12476
12477 * gh.h (gh_int2scmb): deprecation expired - removed.
12478
e3334972
NJ
124792001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12480
12481 * stacks.c (scm_make_stack): Fix typo in docstring.
12482
a0f979ac
RB
124832001-04-27 Rob Browning <rlb@cs.utexas.edu>
12484
12485 * error.c (scm_sysmissing): deprecation expired - removed.
12486
12487 * error.h (scm_sysmissing): deprecation expired - removed.
12488
12489 * gc.c
12490 (scm_init_gc): gc-thunk deprecation expired - removed.
12491 (scm_gc_vcell): deprecation expired - removed.
12492 (gc_async_thunk): scm_gc_vcell related code removed.
12493
12494 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12495
12496 * strings.h
12497 (SCM_NSTRINGP): deprecation expired - removed.
12498 (SCM_NRWSTRINGP): deprecation expired - removed.
12499
12500 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12501
12502 * chars.h
12503 (SCM_ICHRP): deprecation expired - removed.
12504 (SCM_ICHR): deprecation expired - removed.
12505 (SCM_MAKICHR): deprecation expired - removed.
12506
12507 * ports.h
12508 (SCM_INPORTP): deprecation expired - removed.
12509 (SCM_OUTPORTP): deprecation expired - removed.
12510
253081cf
MV
125112001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12512
12513 * modules.c (scm_module_type): New.
12514 (scm_post_boot_init_modules): Initialize from Scheme value.
12515 (the_module, scm_current_module, scm_init_modules): the_module is
12516 now a C only fluid.
12517 (scm_current_module): Export to Scheme.
12518 (scm_set_current_module): Do not call out to Scheme, do all the
12519 work in C. Export procedure to Scheme. Only accept modules, `#f'
12520 is no longer valid as the current module. Only set
12521 scm_top_level_lookup_closure_var and scm_system_transformer when
12522 they are not deprecated.
12523 (scm_module_transformer, scm_current_module_transformer): New.
12524
12525 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12526 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12527
253081cf
MV
12528 * gh_data.c: Removed FIXME comment about gh_lookup returning
12529 SCM_UNDEFINED. That's the right thing to do.
12530
12531 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12532 into the conditionally compiled sections.
12533 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12534 scm_current_module_transformer instead of scm_system_transformer.
12535 * init.c (start_stack): Move initialization of
12536 scm_system_transformer to the deprecated section.
1c938eb8 12537
1f7f9ed4
NJ
125382001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12539
12540 * throw.c (scm_throw): Correct docstring.
12541
66c73b76
GH
125422001-04-22 Gary Houston <ghouston@arglist.com>
12543
eefae538
GH
12544 * socket.c: attempted to improve the docstrings slightly.
12545
66c73b76
GH
12546 * net_db.c: remove bogus "close" declaration.
12547 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12548 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12549 moved to socket.c.
12550 * net_db.h: declarations moved too.
12551
12552 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12553 long.
12554 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12555 (VALIDATE_INET6): new macro.
12556 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12557 inet-pton and inet-ntop.
12558 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12559 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12560
7a7f7c53
DH
125612001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12562
12563 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12564 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12565
12566 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12567 when compiled in debug mode.
12568
12569 (scm_gc_sweep): Only call smob's free function if it is defined.
12570
12571 * print.c (scm_iprin1): No need to check for validity of smob
12572 type or existence of print function.
12573
12574 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12575 Resizing will not work well with preemptive threading.
12576
12577 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12578
12579 (scm_make_smob_type): Extracted initialization of smob
12580 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12581 of the critical section.
12582
12583 (scm_smob_prehistory): Initialize all smob descriptors. By
12584 default, don't assign a smob free function: Most smob types don't
12585 need one.
12586
12587 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12588
e1368a8d
GH
125892001-04-21 Gary Houston <ghouston@arglist.com>
12590
12591 * socket.c (FLIP_NET_HOST_128): new macro.
12592 (scm_fill_sockaddr): use new macro.
12593 (scm_addr_vector): completed IPv6 address support. added const
12594 to the address parameter.
12595
5a525b84
GH
125962001-04-20 Gary Houston <ghouston@arglist.com>
12597
12598 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12599 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12600 is defined.
12601 (scm_addr_vector): use a switch instead of multiple if statements.
12602 Add support for IPv6 (incomplete) .
e1368a8d 12603 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12604
1a551638
DH
126052001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12606
12607 * struct.c (scm_free_structs): Only pairs may be accessed with
12608 SCM_C[AD]R.
12609
c07b3fef
MD
126102001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12611
a9d861e3
MD
12612 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12613
c07b3fef
MD
12614 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12615 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12616 parentheses in order to get the correct associativity.
12617
af7546eb
DH
126182001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12619
12620 * unif.c (scm_array_to_list): Added missing handling of arrays of
12621 bytes. Thanks to Masao Uebayashi for the bug report.
12622
4daecfee
DH
126232001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12624
12625 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12626 consistently.
12627
726d810a
DH
126282001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12629
12630 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12631
12632 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12633 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12634 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12635 SCM_CLOSURE_FORMALS.
12636
12637 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12638 (scm_i_procedure_arity): Prefer stronger predicates like
12639 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12640
12641 * macros.c (macro_print): Extracted macro printing code from
12642 print.c and simplified it.
12643
12644 (scm_macro_type): Use SCM_MACRO_TYPE;
12645
12646 (scm_init_macros): Use macro_print for printing macros.
12647
12648 * print.c (scm_print_opts): Improved option documentation.
12649
12650 (scm_iprin1): Extracted printing of macros to macros.c.
12651 Simplified printing of ordinary closures.
12652
12653 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12654 Martin Grabmueller for the bug report.
12655
e038c042
DH
126562001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12657
12658 This patch eliminates some further applications of SCM_C[AD]R to
12659 non pair cells.
12660
12661 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12662 never been applied to real pairs.
12663
12664 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12665
12666 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12667
12668 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12669 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12670 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12671
12672 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12673 Added.
12674
12675 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12676 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12677
12678 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12679 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12680 SCM_SET{AND,OR}_CAR.
12681
3453619b
GH
126822001-04-17 Gary Houston <ghouston@arglist.com>
12683
12684 * some initial support for IPv6:
1c938eb8 12685
3453619b
GH
12686 * socket.c (scm_fill_sockaddr): improve the argument validation.
12687 don't allocate memory until all args are checked. instead of
12688 unconditional memset of soka, try setting sin_len to 0 if
12689 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12690 (scm_socket, scm_connect): extend docstrings for IPv6.
12691 (scm_init_socket): intern AF_INET6 and PF_INET6.
12692
216eedfc
DH
126932001-04-17 Niibe Yutaka <gniibe@m17n.org>
12694
12695 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12696 matches SCM_DEFER_INTS at the beginning of the function.
12697
12698 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12699
12700 * gc.c (scm_igc): Unconditionally call
12701 SCM_CRITICAL_SECTION_START/END.
12702
12703 * fluids.c (next_fluid_num): Unconditionally call
12704 SCM_CRITICAL_SECTION_START/END.
12705 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12706
12707 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12708 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12709 Removed.
12710
12711 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12712 Defined as nothing for the case of !defined(USE_THREADS).
12713 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12714 Removed.
12715 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12716 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12717 LINE.
12718 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12719 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12720 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12721 SCM_CRITICAL_SECTION_START/END.
12722 (SCM_REALLOW_INTS: Bug fix. Don't call
12723 SCM_THREAD_SWITCHING_CODE.
12724 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12725 SCM_THREAD_SWITCHING_CODE directly.
12726 (SCM_ENTER_A_SECTION): Unconditionally use
12727 SCM_CRITICAL_SECTION_START/END. (was:
12728 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12729
127302001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12731
12732 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12733 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12734 allowed to explicitly set this macro via the CFLAGS variable
12735 during make.
12736
12737 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12738 (SCM_THREAD_CRITICAL_SECTION_START,
12739 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12740 SCM_THREAD_CRITICAL_SECTION_START/END to
12741 SCM_CRITICAL_SECTION_START/END.
12742
f22ed5a0
KN
127432001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12744
12745 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12746 instead of bzero.
1c938eb8 12747
f22ed5a0 12748 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12749 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12750
12751 Thanks to NIIBE Yutaka.
12752
508ded1c
MD
127532001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12754
a087ba81
MD
12755 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12756 goops module should be registered in order to work for an
12757 application which uses libguile statically linked.)
508ded1c 12758
e4b265d8
DH
127592001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12760
12761 * numbers.[ch] (scm_num2long, scm_num2long_long,
12762 scm_num2ulong_long, scm_num2ulong): Argument position is an
12763 unsigned integer.
12764
12765 * environments.c (eval_environment_folder,
12766 import_environment_folder), gh_data.c (gh_scm2longs,
12767 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12768 for integers and pointers, respectively.
12769
12770 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12771 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12772 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12773 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12774
12775 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12776 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12777 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12778 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12779 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12780 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12781
89d04205
NJ
127822001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12783
12784 * strings.c (scm_read_only_string_p): Update docstring to reflect
12785 current (non-)usage of "read only" strings.
40f83c3e
NJ
12786 (scm_make_shared_substring): Clarify docstring by changing
12787 "semantics" to "arguments".
89d04205 12788
4d66be54
MG
127892001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12790
12791 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12792 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12793 improvements.
12794
1e6808ea
MG
127952001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12796
12797 The following changes make the documentation more consistent.
1c938eb8 12798
1e6808ea
MG
12799 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12800 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12801 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12802 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12803 ... @end lisp.
12804
12805 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12806 (scm_array_dimensions, scm_make_shared_array),
12807 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12808 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12809 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12810 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12811 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12812 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12813 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12814 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12815 @example ... @end example to @lisp ... @end lisp.
12816
12817 * weaks.c (scm_weak_vector): Corrected docstring.
12818
12819 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12820 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12821 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12822 (scm_hashx_set_x, scm_hashx_get_handle),
12823 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12824 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12825 vectors.c (scm_vector_fill_x), strings.c
12826 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12827 objprop.c (scm_set_object_properties_x):
12828 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12829 strports.c (scm_call_with_input_string), ports.c
12830 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12831 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12832 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12833 (scm_make_weak_vector,scm_weak_vector_p),
12834 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12835 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12836 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12837 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12838 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12839 Made parameter names match documentation by renaming parameters
12840 and/or fixing docstrings.
1c938eb8 12841
1e6808ea
MG
12842 * numbers.c (scm_ash): Corrected Texinfo markup.
12843
12844 * strop.c (scm_string_index, scm_string_rindex),
12845 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12846
12847 * vports.c (scm_make_soft_port), unif.c
12848 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12849 (scm_dimensions_to_uniform_array, scm_transpose_array),
12850 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12851 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12852 (scm_array_to_list, scm_list_to_uniform_array),
12853 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12854 (scm_open_input_string, scm_open_output_string),
12855 (scm_get_output_string), strop.c (scm_string_copy),
12856 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12857 (scm_get_internal_real_time, scm_times),
12858 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12859 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12860 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12861 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12862 simpos.c (scm_system), random.c (scm_random_uniform),
12863 (scm_random_normal, scm_random_exp), ramap.c
12864 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12865 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12866 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12867 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12868 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12869 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12870 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12871 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12872 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12873 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12874 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12875 (scm_integer_expt, scm_bit_extract, scm_logcount),
12876 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12877 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12878 (scm_interaction_environment), macros.c (scm_makacro),
12879 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12880 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12881 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12882 (scm_fluid_ref), filesys.c (scm_open_fdes),
12883 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12884 Docstring correction: `Returns' -> `Return'
12885
1c938eb8
TTN
12886 * gc.c (scm_set_debug_cell_accesses_x):
12887 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
12888 * fluids.c (scm_fluid_p): Added texinfo markup.
12889
12890 * error.c (scm_strerror): Made docstring more precise.
12891
12892 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12893 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12894 (scm_symbol_p, scm_symbol_to_string), strorder.c
12895 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12896 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12897 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12898 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12899 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12900
9a6976cd
DH
129012001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12902
12903 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12904 mode, as suggested by Michael Livshin.
12905
463b2219
ML
129062001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12907
12908 * backtrace.c (display_backtrace_body): since the `print_state'
12909 variable is not used (instead its data field is used directly as
12910 `pstate'), protect it from the hungry compiler optimizations.
12911 thanks to Bill Schottstaedt for the report.
12912
61045190
DH
129132001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12914
12915 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12916 It is only defined and used if guile is compiled with
12917 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12918 let cells with a free_cell type tag be visible outside of the
12919 garbage collector when in debug mode.
12920
12921 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12922
12923 (scm_assert_cell_valid): Use a local static variable to avoid
12924 recursion.
12925
12926 (MARK): Only check for rogue cell pointers in debug mode. Use
12927 scm_cellp for this purpose and place all checks for rogue pointers
12928 into that function. Further, since due to conservative scanning
12929 we may encounter free cells during marking, don't use the standard
12930 cell type accessor macro to determine the cell type.
12931
12932 (scm_cellp): Check if the cell pointer actually points into a
12933 card header.
12934
12935 (scm_init_gc): Initalize scm_tc16_allocated.
12936
12937 * gc.h (GCH): Renamed to SCM_GC_H.
12938
12939 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12940 might be unnecessary, but I feel better this way :-)
12941
12942 (SCM_GC_CELL_TYPE): New macro.
12943
12944 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12945 in guile, and it is unlikely that they will be applied to real
12946 pairs anyway.
12947
12948 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12949
12950 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12951 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12952
12953 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12954 make sure that in debug mode no free cell will ever be visible
12955 outside of the garbage collector.
12956
85d6df6a
DH
129572001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12958
12959 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12960 values.
12961
12962 * async.c (scm_system_async), variable.c (scm_make_variable,
12963 scm_make_undefined_variable): Use scm_cons to create a pair.
12964
12965 * debug.c (scm_reverse_lookup): Perform proper type checking.
12966 Remove suspicious use of SCM_SLOPPY_CONSP.
12967
12968 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12969 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12970 the corresponding optimization.
12971
12972 * eval.c (iqq): Use proper type check.
12973
12974 (scm_m_expand_body): Remove redundant type checks.
12975
12976 (promise_print): Don't access promise cells as pairs.
12977
12978 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12979 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12980 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12981 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12982 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12983
12984 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12985 (scm_iprin1): Use new macro predicate and accessors.
12986
12987 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12988 in macros.h.
12989
12990 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12991 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12992 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12993 SCM_VARIABLE_H. Even the macros that are used to inhibit
12994 including a header file twice should be in the SCM_ namespace.
12995
12996 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12997 properties.c (scm_primitive_property_ref,
12998 scm_primitive_property_del_x): Prefer stronger predicates like
12999 SCM_NULLP or SCM_FALSEP over SCM_IMP.
13000
13001 * gc.c (MARK): Use proper macros to access procedure-with-setter
13002 cell elements and closure cell elements.
13003
13004 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
13005 access free cells as pairs.
13006
13007 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13008 no hashtab entry is found.
13009
13010 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13011 SCM_CLR_PORT_OPEN_FLAG.
13012
13013 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13014 use SCM_SET_C[AD]R for uninitialized cells.
13015
13016 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13017 If the hashtable has no slots, return #f instead of '(). This
13018 unifies the return value with most assoc-functions.
13019
13020 (scm_hash_fn_ref): Use proper type check.
13021
13022 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13023 Removed references to non-existing functions from documentation.
13024
13025 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13026 access keyword cell elements.
13027
13028 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13029 macros.
13030
13031 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13032
13033 * print.c (scm_iprlist): Added comment. Improved loop
13034 conditions.
13035
13036 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13037 pairs.
13038
13039 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13040
13041 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13042
13043 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13044 cells as pairs.
13045
13046 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13047 scm_variable_set_x): Use proper macros to access variable cell
13048 elements.
13049
13050 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13051
13052 * variable.h (SCM_VARVCELL): Don't access variable cells as
13053 pairs.
13054
13055 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13056 added FIXME comment, removed register specifier.
13057
1b27e91a
KN
130582001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13059
13060 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13061 * init.c (scm_init_guile_1): Don't init goopscore module.
13062
16c634ec
MV
130632001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13064
13065 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13066
91344ceb
MG
130672001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13068
13069 * strop.c (scm_string_to_list): Fixed docstring markup.
13070 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13071 (scm_string_downcase, scm_string_capitalize_x),
13072 (scm_string_capitalize): Rewrote and corrected docstrings.
13073 (scm_string_ci_to_symbol): Made docstring more explicit.
13074
07576812
MV
130752001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13076
13077 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13078 eval.c can use it.
13079 (scm_call_with_values): Removed.
13080 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13081 so that it can be exported.
13082 (scm_call_with_values): Removed.
1c938eb8 13083
07576812
MV
13084 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13085 * eval.c: Include "libguile/values.h"
13086 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13087 New.
13088 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13089 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13090 New delcarations to support above change.
13091
13092 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13093 errors with last change.
1c938eb8 13094
07576812
MV
130952001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13096
13097 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13098 scm_i_eval): Moved the application of the system transformer from
13099 scm_i_eval to scm_primitive_eval.
13100
a17bb5fd
NJ
131012001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13102
a6be01a4
NJ
13103 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13104
a17bb5fd
NJ
13105 * strop.c (scm_string_index): Fix docstring line break
13106 regression.
13107
13108 * list.c (scm_cons_star): Fix docstring typo.
13109
be54b15d
DH
131102001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13111
13112 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13113 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13114 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13115 scm_make_string, scm_string_append), strports.c (st_resize_port,
13116 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13117 scm_makstr with calls to scm_allocate_string.
13118
13119 * strings.[ch] (scm_allocate_string): New function.
13120
13121 * strings.[ch] (scm_makstr): Deprecated.
13122
789ecc05
GH
131232001-03-18 Gary Houston <ghouston@arglist.com>
13124
6d163216
GH
13125 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13126 NULL. rewrote the docstring.
13127 (scm_mkstemp): new procedure implementing "mkstemp!".
13128 * posix.h: declare scm_mkstemp.
13129
789ecc05
GH
13130 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13131 normally it would be found in netdb.h.
13132
c6c79933
GH
131332001-03-17 Gary Houston <ghouston@arglist.com>
13134
e9e225e5
GH
13135 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13136 warning when HAVE_ARRAYS is not defined. move len too.
13137
13138 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13139 (EXTRA_DOT_X_FILES): let configure set the value.
13140 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13141
c6c79933
GH
13142 * gc.c (scm_must_malloc): changed the comment explaining when
13143 scm_must variants of malloc/free etc., should be used, based on
13144 explanation from Dirk Herrmann.
13145 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13146 string with procedure name. use scm_must_malloc instead of malloc.
13147 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13148 of malloc/free.
13149 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13150 scm_ungetc): use scm_must variants of malloc/realloc/free.
13151 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13152
b3fcac34
DH
131532001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13154
13155 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13156 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13157 scm_wrong_type_arg instead.
13158
13159 (SCM_WNA): Deprecated.
13160
13161 * error.[ch] (scm_wta): Deprecated.
13162
13163 * numbers.c (s_i_log): Minor comment fix.
13164
13165 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13166 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13167 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13168 wrong-num-args or misc errors.
13169
13170 * unif.c (scm_make_shared_array, scm_transpose_array,
13171 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13172 Validate the rest argument (note: this is only done when guile is
13173 built with SCM_DEBUG_REST_ARGUMENT=1)
13174
13175 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13176 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13177
13178 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13179 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13180
68baa7e7
DH
131812001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13182
13183 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13184 instead of scm_wrong_num_args.
13185
13186 * coop-threads.c: Don't include libguile/strings.h. (Was only
13187 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13188
13189 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13190 wrong-num-args errors.
13191
9f40cd87
DH
131922001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13193
13194 * error.[ch] (scm_error_num_args_subr): New function.
13195
5352393c
MG
131962001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13197
13198 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13199 (scm_length, scm_append, scm_reverse, scm_list_ref),
13200 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13201 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13202 (scm_delete1_x), gc.c (scm_map_free_list),
13203 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13204 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13205 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13206 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13207 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13208 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13209 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13210
13211 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13212 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13213 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13214 symbols.c (scm_symbol_interned_p), numbers.c
13215 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13216 markup.
13217
a9205f07
KN
132182001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13219
13220 * snarf.h (SCM_CONST_LONG): Deprecated.
13221 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13222
6d583887
MV
132232001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13224
13225 * numbers.c (scm_num2ulong): Check that a bignum is positive
13226 before looking at the magnitude. Correctly check for overflow
13227 during conversion.
13228 (scm_num2long_long): Likewise.
13229 (scm_num2ulong_long): New.
13230 (ULONG_LONG_MAX): Define if not already defined.
13231 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13232
e87a03fc
MG
132332001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13234
13235 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13236
13237 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13238 (SCM_OPOUTSTRPORTP): New predicate macros.
13239 (scm_open_input_string, scm_open_output_string),
13240 (scm_get_output_string): New prototypes.
1c938eb8 13241
e87a03fc
MG
13242 * strports.c (scm_open_input_string, scm_open_output_string),
13243 (scm_get_output_string): New procedures (SRFI-6 compliant).
13244 Made scm_tc16_strport non-static.
13245
160bb34a
DH
132462001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13247
13248 * macros.h (SCM_ASSYNT): Removed unused object argument from
13249 signature.
13250
13251 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13252 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13253 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13254 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13255 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13256 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13257 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13258 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13259 scm_m_atdispatch): Removed unused object argument from call to
13260 SCM_ASSYNT.
13261
80dee77b
DH
132622001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13263
13264 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13265 const int* to reflect that the input array of integers remains
13266 unchanged. Thanks to Brett Viren for the hint.
13267
d3dd80ab
MG
132682001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13269
13270 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13271 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13272 in various places.
13273 (gh_scm2newstr, gh_symbol2newstr): Change call to
13274 scm_must_malloc() to malloc(), because user-free()able memory is
13275 allocated.
13276
13277 * gc.c: Added declaration of `scm_debug_check_freelist'.
13278
26a3038d
MG
132792001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13280
13281 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13282
1f3908c4
KN
132832001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13284
13285 * strports.c (scm_object_to_string): New procedure.
13286 (scm_strprint_obj): Deprecated.
13287 * strports.h: Reflect the changes.
13288
e11208ca
DH
132892001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13290
13291 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13292
13293 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13294 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13295 SCM_ASSYNT to check for correct argument types. Either use some
13296 SCM_VALIDATE_* macro or an explicit test.
13297
13298 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13299 misc-errors.
13300
13301 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13302 instead of calling scm_wta.
13303
67e8151b
MG
133042001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13305
13306 * load.c (scm_primitive_load, scm_primitive_load_path),
13307 (scm_sys_search_load_path): Corrected docstrings (file ->
13308 filename).
13309
13310 * eval.c (scm_force): Added texinfo markup to docstring.
13311 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13312
13313 * debug-malloc.c: Reinserted #include <stdio.h>.
13314
e0c08f17
KN
133152001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13316
e39c3de4
KN
13317 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13318
e0c08f17
KN
13319 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13320 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13321 Use SCM_LISTn instead of scm_listify.
13322
e6e2e95a
MD
133232001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13324
13325 * _scm.h: Removed #include <errno.h>.
13326
13327 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13328 errno variable (can be a macro on some systems, for example when
13329 using linux libc with threads).
13330
13331 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13332 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13333 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13334 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13335
97d0e20b
GH
133362001-03-10 Gary Houston <ghouston@arglist.com>
13337
13338 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13339 not already defined.
13340
e75341b3
MD
133412001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13342
13343 * coop.c: Inserted #include <stdio.h>.
13344
13345 * iselect.c: Reinserted #include <stdio.h>.
13346
74355186
MV
133472001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13348
13349 * posix.c: Replaced `#define' of __USE_XOPEN right before
13350 including unistd.h with a define of _GNU_SOURCE at the very top of
13351 the file.
13352
783e7774
KN
133532001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13354
13355 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13356 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13357 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13358 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13359 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13360 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13361 print.c, procprop.c, procs.c, properties.c, ramap.c,
13362 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13363 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13364 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13365 Remove #include <stdio.h>
783e7774
KN
13366 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13367
13368 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13369
9a677c37
MG
133702001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13371
13372 * posix.c (scm_gethostname): Set initial name length to 256 for
13373 Solaris.
13374
94e6d793
MG
133752001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13376
13377 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13378 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13379 (scm_sethostname, scm_gethostname): New prototypes.
13380
13381 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13382 <sys/file.h>, if present.
13383 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13384 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13385 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13386 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13387 (scm_sethostname, scm_gethostname): New procedures.
13388
650a1cf9
NJ
133892001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13390
13391 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13392 not optional (ii) "recommend" spelling correction.
13393
9636b49c
MD
133942001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13395
5e4a4d09
MD
13396 * ramap.c (racp): Removed optimization which caused array copying
13397 to fail if the two arrays shared storage. Re-inserted the IVDEP
13398 macros removed in the change of 2000-03-09. (Don't really have a
13399 complete grasp of what they are for, but they seem to be necessary
13400 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13401
9636b49c
MD
13402 * hash.c (scm_string_hash): Don't downcase characters.
13403
04a4d666
MD
134042001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13405
9636b49c 13406 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13407 size from 277 --> 1009.
13408
13409 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13410 function.
13411
13412 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13413
04a4d666
MD
13414 * validate.h: Code formatting.
13415
66418d34
KN
134162001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13417
13418 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13419 (*.doc): Add dependency on guile-snarf.awk.in.
13420
13421 * guile-snarf.awk.in: Neglect spaces at the end of
13422 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13423 middle of docstrings. (To avoid the problem with gcc-2.96.)
13424
2ade72d7
DH
134252001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13426
13427 * coop-threads.c (scm_call_with_new_thread), load.c
13428 (scm_primitive_load, scm_sys_search_load_path), random.c
13429 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13430 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13431 (potentially) issue a scm-misc-error or wrong-num-args error
13432 message.
13433
13434 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13435 about the expected type with the wrong-type-arg error message.
13436
13437 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13438 a C level bug that can't be fixed from scheme anyway.
13439
586d7da2
MD
134402001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13441
13442 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13443 Duplicate bindings are OK in a let* since a let* is semantically
13444 equivalent to a nested set of let:s.
13445
1dd05fd8
MG
134462001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13447
13448 * print.c (scm_print_options): Fixed texinfo in docstring.
13449
13450 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13451 the underlying functions getservent, getprotoent or getnetent
13452 return NULL instead of signalling an error.
13453
439006bf
GH
134542001-03-04 Gary Houston <ghouston@arglist.com>
13455
13456 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13457 taking an unexpectedly large filename for an AF_UNIX socket from
13458 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13459
439006bf
GH
13460 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13461 former and adjusted the latter.
13462 (scm_socket, scm_socketpair): cosmetic changes.
13463 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13464 size_t as socklen_t substitute. don't restrict args/return values
13465 to INUM: allow full range of int or size_t.
13466 (scm_fill_sockaddr): check arguments before allocating memory, to
13467 avoid leakage. use malloc, not scm_must_malloc.
13468 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13469 substitute. free the sockaddr structure before throwing an error.
13470 (scm_init_add_buffer): procedure removed, together with its static
13471 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13472 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13473 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13474 scm_sendto): use a local buffer instead of scm_addr_buffer.
13475 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13476 not size_t.
13477 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13478 call to detect whether recvfrom could be bothered to set the address.
13479 (scm_init_socket): don't call scm_init_addr_buffer.
13480
276dd677
DH
134812001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13482
13483 * debug.c (scm_procedure_source, scm_procedure_environment),
13484 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13485 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13486 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13487 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13488 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13489 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13490 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13491 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13492 scm_array_to_list, scm_array_prototype), validate.h
13493 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13494 scm_misc_error or scm_wrong_type_arg instead.
13495
13496 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13497
5e03762c
MD
134982001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13499
13500 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13501 (scm_sys_tag_body): Added.
13502
db4b4ca6
DH
135032001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13504
13505 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13506 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13507 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13508 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13509 options.c (scm_options), ports.c (scm_remove_from_port_table),
13510 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13511 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13512 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13513 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13514 instead.
13515
87e7741d
MD
135162001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13517
13518 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13519
d19b0aac
MV
135202001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13521
13522 * eval.c (scm_s_duplicate_bindings): New error message.
13523 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13524
2fd945df
MV
135252001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13526
13527 * eval.h (SCM_EVALIM2): New macro. Use it when a
13528 immediate, literal constant should be evaluated.
13529 * eval.c (scm_s_duplicate_formals): New error message string.
13530 (scm_c_improper_memq): New function.
13531 (scm_m_lambda): Check for duplicate arguments.
13532 (scm_ceval, scm_deval): When executing a body: only cons a new
13533 toplevel environment frame when it is different from the
13534 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13535 check for empty combinations; use SCM_EVALIM2 for the same reason
13536 in the non-toplevel loop.
13537 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13538 New labels with the meaning of their non-"nontoplevel" partners,
13539 but they are used when it is known that the body is not evaluated at
13540 top-level.
13541 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13542 reporting for empty combinations.
13543
9e6fc585
KN
135442001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13545
13546 * Remove dump facilities.
13547 * dump.c, dump.h: Removed.
13548 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13549 * init.c: Remove #include "libguile/dump.h".
13550 (scm_init_guile_1): Remove scm_init_dump.
13551 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13552 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13553 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13554 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13555
13556 * keywords.c: Remove #include "libguile/dump.h".
13557 (keyword_dump, keyword_undump): Removed.
13558 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13559
eae54bf0
MG
135602001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13561
13562 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13563 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13564 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13565 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13566 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13567 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13568 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13569 to @code{} as the texinfo manual recommends, converted the
13570 examples to use a @lisp{}-environment.
13571
13572 * strports.c (scm_eval_string): Cleaned up the docstring.
13573
13574 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13575 markup.
13576
13577 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13578 (scm_number_to_string, scm_string_to_number, scm_number_p)
13579 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13580 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13581 (scm_ash): Added texinfo markup and removed obsolete @refill.
13582 (scm_gr_p): Corrected comment.
13583 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13584 docstring) comments.
13585 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13586 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13587 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13588 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13589 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13590 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13591 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13592 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13593
23deee81
DH
135942001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13595
13596 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13597 (Obviously nobody compiles with SCM_RECKLESS defined...)
13598
13599 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13600
6fe692e9
MD
136012001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13602
13603 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13604
13605 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13606
27c37006
NJ
136072001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13608
13609 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13610 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13611 since use of `z' suggests that the arguments may be complex.
13612
13613 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13614 typos.
13615
2069af38
NJ
136162001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13617
13618 * dump.c (scm_binary_write, scm_binary_read), eval.c
13619 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13620 scm_guardian_greedy_p, scm_make_guardian), fports.c
13621 (scm_file_port_p): Minor docstring fixes.
13622
b42ff180
MV
136232001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13624
2069af38 13625 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13626
13627 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13628 scm_i_eval.
13629 (make_class_from_template): Do not bother to set the current
13630 module around the call to DEFVAR, scm_eval takes care of that.
13631 (scm_init_goops): Make scm_module_goops and
13632 scm_goops_lookup_closure permanent objects.
1c938eb8 13633
97ea55f8
MV
13634 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13635 top level, create a fresh top-level environment for each
13636 expression instead of mutating the exisint frame. This is
13637 important when that frame is closed over.
13638
b42ff180
MV
13639 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13640 SCM_DIGSPERLONG instead of DIGSPERLONG.
13641
09f2ab1e
MV
136422001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13643
13644 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13645 before applying arrow procedure in `cond' and before applying
13646 receiver procedure in call-with-current-continuation.
13647 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13648 macro. The argument is expanded more than one time.
13649
13650 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13651 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13652
136532001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13654
13655 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13656 notice and license.
13657
7090240c
MG
136582001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13659
13660 * variable.c (scm_make_variable, scm_make_undefined_variable)
13661 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13662 (scm_variable_bound_p), values.c (scm_values)
13663 (scm_call_with_values), unif.c (scm_bit_count)
13664 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13665 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13666 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13667 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13668 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13669 (scm_copy_random_state, scm_random), print.c (scm_newline)
13670 (scm_write_char, scm_simple_format), debug-malloc.c
13671 (scm_malloc_stats), environments.c (scm_environment_p)
13672 (scm_environment_bound_p, scm_environment_ref)
13673 (scm_environment_fold, scm_environment_define)
13674 (scm_environment_undefine, scm_environment_set_x)
13675 (scm_environment_cell, scm_environment_observe)
13676 (scm_environment_observe_weak, scm_environment_unobserve)
13677 (scm_make_eval_environment, scm_eval_environment_p)
13678 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13679 (scm_eval_environment_imported)
13680 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13681 (scm_import_environment_p, scm_import_environment_imports)
13682 (scm_import_environment_set_imports_x, scm_make_export_environment)
13683 (scm_export_environment_p, scm_export_environment_private)
13684 (scm_export_environment_set_private_x)
13685 (scm_export_environment_signature)
13686 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13687 Added texinfo markup.
13688
13689 * ports.c (scm_drain_input): Lowercased argument to @var.
13690 (scm_current_input_port, scm_current_output_port): Filled in
13691 missing explanation.
13692 (scm_current_load_port, scm_set_current_output_port)
13693 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13694 Added texinfo markup.
13695
13696 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13697 (scm_release_arbiter): Added texinfo markup to docstrings.
13698 Changed `Returns' to `Return'.
13699 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13700
25703850
NJ
137012001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13702
13703 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13704 by doubling them to `@@'.
13705
73c0fdce
MG
137062001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13707
13708 * numbers.c (scm_lognot), random.c (scm_random,
13709 scm_random_normal, scm_random_solid_sphere_x,
13710 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13711 scm_random_exp), dynwind.c
13712 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13713
73c0fdce
MG
13714 * goops.c (scm_sys_initialize_object, scm_instance_p,
13715 scm_class_name, scm_class_precedence_list, scm_class_slots,
13716 scm_class_environment, scm_generic_function_name,
13717 scm_generic_function_methods, scm_method_generic_function,
13718 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13719 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13720 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13721 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13722 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13723 scm_class_direct_supers, scm_class_direct_slots,
13724 scm_class_direct_subclasses, scm_class_direct_methods,
13725 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13726 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13727 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13728 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13729 scm_memoized_environment, scm_procedure_name,
13730 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13731 objects.c
13732 (scm_class_of, scm_entity_p, scm_operator_p,
13733 scm_set_object_procedure_x, scm_object_procedure,
13734 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13735 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13736 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13737 scm_hook_to_list), lang.c
13738 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13739 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13740 (scm_print_options, scm_port_with_print_state,
13741 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13742 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13743 scm_make_procedure_with_setter, scm_procedure), throw.c
13744 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13745 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13746 scm_stack_ref, scm_stack_length, scm_frame_p,
13747 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13748 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13749 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13750 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13751 (scm_dirname, scm_basename), dynwind.c
13752 (scm_wind_chain), read.c (scm_read_options, scm_read,
13753 scm_read_hash_extend), gc.c
13754 (scm_unhash_name), eval.c (scm_eval_options_interface,
13755 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13756 (scm_display_error, scm_set_print_params_x,
13757 scm_display_application, scm_display_backtrace, scm_backtrace),
13758 async.c (scm_async, scm_system_async, scm_async_mark,
13759 scm_system_async_mark, scm_run_asyncs, scm_noop,
13760 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13761 scm_mask_signals): Added docstrings.
13762
e228a203
KN
137632001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13764
13765 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13766 address of car/cdr. (Thanks to Dirk Herrmann)
13767 Use scm_sizet to obtain the length of strings.
13768 (Thanks to Matthias Koeppe)
13769
1552a59d
MV
137702001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13771
13772 * symbols.c (scm_mem2symbol): Put a empty statement after the
13773 next_symbol label. This is mandated by ANSI, appearantly.
13774
3178f751
MV
137752001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13776
13777 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13778 sense to compile for a specific kernel version. Do not include
13779 <asm/signal.h> while defining __KERNEL__. This hack should no
13780 longer be needed and caused problems.
13781
7af4defe
MV
137822001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13783
13784 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13785 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13786 can not deal with immediates.
13787
5d6bb349
KN
137882001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13789
13790 * list.c (scm_list_copy): Validate the first argument.
13791
ec9709f0
MV
137922001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13793
13794 Fix evaluator so that top-level expressions are correctly
13795 evaluated with respect to the module system.
1c938eb8 13796
ec9709f0
MV
13797 * modules.h. modules.c (scm_current_module_lookup_closure): New
13798 function.
13799
13800 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13801 prototypes.
13802 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13803 names to better reflect their meaning.
13804
13805 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13806 evaluated at top-level and synronize lookup closure before
13807 executing every subform.
13808 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13809 (scm_eval_x, scm_eval): Reimplement in terms of
13810 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13811
ec9709f0
MV
138122001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13813
13814 * macros.c (scm_macro_name, scm_macro_transformer): Use
13815 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13816 Thanks!
13817
42417394
KN
138182001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13819
13820 * dump.c (scm_store_bytes): Store data size before data.
13821 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13822 * dump.h (scm_restore_bytes): Updated.
13823
bf942687
KN
138242001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13825
13826 * dump.c: Use double cells for update schedule.
13827
1be4270a
KN
138282001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13829
13830 * ports.c (scm_unread_char): Take an optional argument.
13831
548728ea
MV
138322001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13833
13834 * modules.h (scm_selected_module, scm_current_module): Renamed
13835 scm_selected_module to scm_current_module to synchronize Scheme
13836 and C names.
13837 (scm_select_module, scm_set_current_module): Likewise. Changed
13838 all uses.
1c938eb8 13839
548728ea
MV
13840 * ports.c (scm_port_for_each): Make a snapshot of the port table
13841 before iterating over it. The table might change while the user
13842 code is running. With the snapshot, the user can depend on the
c5408bc3 13843 fact that each port that existed at the start of the iteration is
548728ea
MV
13844 encountered exactly once. (ice-9 popen) depends on this.
13845
cb0d8be2
DH
138462001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13847
13848 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13849
13850 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13851 range checking for the size parameter. Thanks to Martin
13852 Grabmueller for the hint.
13853
13854 (scm_makstr): Reordered string initialization to make interrupt
13855 deferring unnecessary.
13856
13857 * vectors.c (scm_make_vector): Fixed range checking.
13858
e382fdbe
DH
138592001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13860
13861 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13862
13863 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13864 checking of the size parameter for type correctness and valid
13865 range. Thanks to Rob Browning for reporting the problem. Instead
13866 of deferring interrupts, scm_remember_upto_here_1 is used.
13867
bf8f0922
KN
138682001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13869
13870 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13871 (scm_dump_cell_update): Removed.
13872 (scm_dump_update): Renamed from scm_dump_object_update.
13873 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13874 a pointer instead of returning a value.
13875 * keywords.c (keyword_undump): Updated.
13876
914cceec
KN
138772001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13878
13879 * dump.c, dump.h: Modified a lot.
5f17c66f 13880 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
13881 (scm_dump_mark): Removed.
13882 (scm_restore_cell_object, scm_store_cell_object): New functions.
13883
13884 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13885 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13886 New slots: dump, undump.
13887 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13888 Updated.
13889
13890 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13891 (keyword_undump): Renamed from keyword_alloc.
13892 (scm_init_keywords): Set keyword_dump and keyword_undump.
13893
ecf470a2
ML
138942001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13895
13896 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13897 the deprecated SCM_DOUBLE_CELLP.
13898
13899 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13900
03416a99
KN
139012001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13902
13903 * dump.c, dump.h: New files.
13904 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13905 * init.c: #include "libguile/dump.h".
13906 (scm_init_guile_1): Call scm_init_dump.
13907 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13908 dump_dealloc, dump_store, undump_alloc, undump_restore,
13909 undump_init.
13910 * smob.c (scm_make_smob_type): Init the new slots.
13911 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13912 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13913
13914 * keywords.c: #include "libguile/dump.h".
13915 (keyword_dealloc, keyword_alloc): New functions.
13916 (scm_init_keywords): Set smob_dump and smob_undump.
13917
00ffa0e7
KN
139182001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13919
13920 * vectors.c (scm_c_make_vector): New function.
13921 * vectors.h (scm_c_make_vector): Declared.
13922 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13923 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13924 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13925 (scm_make_method_cache, scm_i_vector2list,
13926 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13927 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13928 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13929 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13930 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13931 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13932 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13933 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13934
13935 * hashtab.c (scm_c_make_hash_table): New function.
13936 * hashtab.h (scm_c_make_hash_table): Declared.
13937 * environments.c (scm_make_leaf_environment,
13938 scm_make_eval_environment), gc.c (scm_init_storage),
13939 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13940 Use scm_c_make_hash_table.
13941
b8446ce8
MD
139422001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13943
13944 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13945
e3239868
DH
139462001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13947
13948 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13949 end of docstring.
13950
13951 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13952 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13953 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13954 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13955 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13956 scm_source_property, scm_set_source_property_x), sort.c
13957 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13958 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13959 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13960 docstrings.
13961
41ee56dd
MD
139622001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13963
13964 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13965 really get that arg.
13966
b6311c08
KN
139672001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13968
13969 * goops.c (s_scm_get_keyword): Bug fix.
13970
a49af0c0
DH
139712001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13972
13973 The following patch was sent by Martin Grabmueller. It makes sure
13974 that in case of parameter errors the correct function name is
13975 shown, and that parameter types are only checked once.
13976
13977 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13978 string_capitalize_x): New functions. Each one performs the core
13979 functionality of the corresponding scm_* function.
13980
13981 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13982 scm_string_downcase_x, scm_string_downcase,
13983 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13984 parameter checking wrappers of the above functions.
13985
13070bd3
DH
139862001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13987
13988 * continuations.c, dynl.c, keywords.c, load.c: Include
13989 strings.h. Thanks to Bill Schottstaedt for the bug report.
13990
2f2b390c
DH
139912001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13992
13993 * backtrace.c (display_header): Make sure that line and column
13994 information is shown independent of whether the port the code was
13995 read from had an associated filename. Thanks to Martin
13996 Grabmueller for providing this patch.
13997
efa40607
DH
139982001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13999
14000 * fports.[ch] (scm_file_port_p): New primitive.
14001
a98bddfd
DH
140022001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14003
14004 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
14005 These are now defined in fports.c, strports.c and vports.c.
14006
14007 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14008 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14009 tags.h).
14010
14011 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14012 (scm_make_sfptob): Made static. These return a type code now.
14013
14014 fports.c (scm_init_fports), strports.c (scm_init_strports),
14015 vports.c (scm_init_vports): Create the corresponding port types.
14016
14017 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14018 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14019
14020 * init.c (scm_init_guile_1): Make sure strports are initialized
14021 before gdbint.
14022
14023 * ports.[ch] (scm_make_port_type): Changed the return type to
14024 scm_bits_t.
14025
14026 * ports.c (scm_ports_prehistory): Don't create any port types
14027 here.
14028
14029 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14030 against scm_tc16_fport directly.
14031
0419a528
DH
140322001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14033
14034 * srcprop.c (scm_set_source_property_x): Fix to handle
14035 (set-source-property! <obj> 'copy <datum>) correctly.
14036
6d36532c
GH
140372001-01-24 Gary Houston <ghouston@arglist.com>
14038
14039 * filesys.c (scm_link): docstring fix.
14040 * fports.h (scm_setfileno): obsolete declaration removed.
14041 * posix.c: bogus popen declaration removed.
14042
14043 * rdelim.c: new file, split from ioext.c.
14044 * rdelim.h: new file, split from ioext.h
14045 * Makefile.am: add rdelim.c and related files.
14046 * init.c: call scm_init_rdelim. include rdelim.h.
14047
3ba5a6c2
DH
140482001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14049
14050 This patch was sent by Martin Grabmueller and makes sure that
14051 parameter errors are reported correctly by the lexicographic
14052 ordering predicates.
14053
14054 * strorder.c (string_less_p, string_ci_less_p): New functions.
14055
14056 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14057 functionality into string_less_p, string_ci_less_p respectively.
14058 The remaining code is just a wrapper to do the parameter
14059 checking.
14060
14061 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14062 parameters and call string_less_p instead of scm_string_less_p.
14063
14064 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14065 Check the parameters and call string_less_ci_p instead of
14066 scm_string_ci_less_p.
14067
e40a4095
DH
140682001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14069
ed6a2db9
DH
14070 This patch modifies scm_display_error to perform parameter
14071 checking. Thanks to Neil Jerram for the bug report.
14072
e40a4095
DH
14073 * backtrace.[ch] (scm_i_display_error): New function.
14074
14075 * backtrace.c (scm_display_error): Added parameter check and
14076 extracted the core functionality into function
14077 scm_i_display_error.
14078
14079 * throw.c (handler_message): Call scm_i_display_error to display
14080 the error message.
14081
f1e06a96
MD
140822001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14083
14084 * eval.c (SCM_APPLY): Added # args check for application of
14085 procedures with arity 3. (Thanks to Anders Holst.)
14086
30ea841d
DH
140872001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14088
14089 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14090
14091 (SCM_OPDIRP): Deprecated.
14092
14093 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14094 SCM_OPN.
14095
14096 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14097 Instead, give an explicit error message in case the directory is
14098 closed.
14099
14100 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14101 instead of SCM_OPENP and SCM_CLOSEDP.
14102
14103 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14104
312ae976
DH
141052001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14106
14107 * eval.c (inner_eval, scm_eval): Move all real functionality into
14108 inner_eval. Avoid to copy the expression twice by inlining some
14109 code from scm_i_eval.
14110
4567ed78
DH
141112001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14112
14113 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14114 now has to be the last clause, as required by R5RS. Thanks to
14115 Martin Grabmueller for the patch.
14116
10288a09
GH
141172001-01-18 Gary Houston <ghouston@arglist.com>
14118
14119 * ioext.c: further simplify scm_read_string_x_partial by defining
14120 a macro SCM_EBLOCK.
14121
8f379a8f
DH
141222001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14123
14124 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14125
5c75b29f
DH
141262001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14127
14128 * __scm.h: Added comment about architecture and compiler
14129 properties that are required by guile.
14130
14131 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14132 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14133
14134 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14135
14136 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14137
14138 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14139 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14140
ac0c002c
DH
141412001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14142
14143 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14144 to the names in limits.h.
14145
14146 * numbers.c (abs_most_negative_fixnum): Added.
14147
14148 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14149 fixnum-min) special case.
14150
14151 (scm_big_and): Fix for negative first parameter.
14152
14153 (scm_bit_extract): Fix for fixnum paramters.
14154 Thanks to Rob Browning for the bug report.
14155
14156 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14157
debe0dc2
DH
141582001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14159
14160 * symbols.c (scm_symbol_bound_p): Fixed comment.
14161 Thanks to Chris Cramer.
14162
8a39e3fc
DH
141632001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14164
14165 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14166 Thanks to Bill Schottstaedt.
14167
322ec19d
ML
141682001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14169
9a5fa6e9 14170 from Matthias Köppe:
1c938eb8 14171
322ec19d
ML
14172 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14173 casts its result, so doesn't yield an lvalue per ANSI C.
14174
14175 * goops.c (s_scm_sys_set_object_setter_x): use
14176 SCM_SET_ENTITY_SETTER.
14177 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14178
14179 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14180 its result, so doesn't yield an lvalue per ANSI C.
14181 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14182 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14183 SCM_GC_SET_CARD_FLAGS.
14184 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14185
14186 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14187
60d02d09
GH
141882001-01-08 Gary Houston <ghouston@arglist.com>
14189
14190 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14191 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14192 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14193 changes.
14194 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14195 for fdes. if current input port is used, check that it's a file
14196 port.
14197
c2da2648
GH
141982001-01-06 Gary Houston <ghouston@arglist.com>
14199
14200 * ioext.c (scm_read_string_x_partial): new procedure, implements
14201 read-string!/partial.
14202 * ports.c (scm_take_from_input_buffers): new procedure used by
14203 scm_read_string_x_partial.
14204 (scm_drain_input): use scm_take_from_input_buffers.
14205
4651d663
MV
142062001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14207
14208 * validate.h (SCM_VALIDATE_NUMBER): New.
14209
c0a5d888
ML
142102001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14211
14212 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14213 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14214 SET_DESTROYED): new defines/macros.
14215 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14216 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14217 (guardian_print): print more info.
14218 (guardian_apply): check if the guardian is destroyed, and throw an
14219 error if so. take one more optional argument `throw_p'.
14220 (scm_guard): depending on the value of `throw_p', return a boolean
14221 result.
14222 (scm_get_one_zombie): remove redundant property test.
14223 (guardian_t): represent the various (currently 3, I hope nothing
14224 more gets added) boolean fields as bit flags.
14225 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14226 (scm_destroy_guardian_x): new procedure.
14227
14228 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14229 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14230
0c6d2191
GH
142312001-01-01 Gary Houston <ghouston@arglist.com>
14232
14233 * fports.c (fport_write): bugfix: handle short writes for
14234 unbuffered ports too. optimize the buffered case by minimizing
14235 the number of write/flush calls.
14236 (write_all): new helper procedure.
14237
a51fe247 14238The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14239
14240;; Local Variables:
14241;; coding: utf-8
14242;; End: