Changes from arch/CVS synchronization
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
9cc37597
LC
12007-12-08 Ludovic Courtès <ludo@gnu.org>
2
3 * __scm.h (SCM_EXPECT, SCM_LIKELY, SCM_UNLIKELY): New macros.
4 (SCM_ASSERT, SCM_ASSERT_TYPE, SCM_ASRTGO, SCM_GASSERT0,
5 SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn): Use them.
6 * eval.c (ASSERT_SYNTAX, ASSERT_SYNTAX_2): Likewise.
7 * eval.i.c (CEVAL): Use branch prediction hints for syntax
8 errors, wrong number of arguments and similar.
9 * numbers.c (scm_sum): Use `SCM_LIKELY' for the sum of two
10 immediate numbers.
11 (scm_difference, scm_product, scm_i_divide): Likewise.
12 * validate.h (SCM_ASSERT_RANGE): Use `SCM_UNLIKELY'.
13
7d1fc872
LC
142007-12-04 Ludovic Courtès <ludo@gnu.org>
15
693758d5
LC
16 * ports.c (scm_c_read): Validate PORT as an open input port.
17 (scm_c_write): Validate PORT as an open output port.
18
7d1fc872
LC
19 * socket.c (scm_accept): Leave guile mode using
20 `scm_std_select ()' before calling `accept(2)'. Reported by
21 dskr <dskr@mac.com>.
22
ee834df4
LC
232007-10-27 Ludovic Courtès <ludo@gnu.org>
24
25 * fports.c (scm_i_evict_port): Expect a port, rather than a pair
26 containing the port. Fixes a bug in the new port table (2007-08-26).
27 (scm_evict_ports): Use `scm_c_port_for_each ()'.
28
acbfb594
NJ
292007-10-21 Neil Jerram <neil@ossau.uklinux.net>
30
31 * eval.c (unmemoize_delay): Extend the environment before
32 unmemoizing the promise thunk. This fixes a segmentation fault
33 reported by Frank Schwidom.
34
2e77f720
LC
352007-10-20 Julian Graham <joolean@gmail.com>
36
37 Add support for thread cancellation and user-defined thread
38 cleanup handlers. Small rework by Ludovic Courtès.
39
40 * null-threads.h (scm_i_pthread_cancel,
41 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
42 * pthread-threads.h (scm_i_pthread_cancel,
43 scm_i_pthread_cleanup_push, scm_i_pthread_cleanup_pop): New.
44 * scmsigs.c (scm_i_signal_delivery_thread,
45 signal_delivery_thread_mutex): New.
46 (signal_delivery_thread): Leave when `read_without_guile ()'
47 returns zero.
48 (start_signal_delivery_thread): Acquire SIGNAL_DELIVERY_THREAD
49 before spawning the thread. Initialize
50 SCM_I_SIGNAL_DELIVERY_THREAD.
51 (ensure_signal_delivery_thread): Renamed to...
52 (scm_i_ensure_signal_delivery_thread): this.
53 (scm_i_close_signal_pipe): New.
54 * scmsigs.h: Updated.
55 * threads.c (thread_mark): Mark `t->cleanup_handler'.
56 (guilify_self_1): Initialize `t->cleanup_handler' and
57 `t->canceled'.
58 (do_thread_exit): Invoke `t->cleanup_handler'.
59 (on_thread_exit): Call `scm_i_ensure_signal_delivery_thread ()'.
60 Call `scm_i_close_signal_pipe ()' when the next-to-last thread
61 vanishes.
62 (scm_leave_guile_cleanup): New.
63 (scm_i_with_guile_and_parent): Use `scm_i_pthread_cleanup_push ()'
64 and `scm_leave_guile_cleanup ()' to leave guile mode, rather
65 than call `scm_leave_guile ()' after FUNC.
66 (scm_cancel_thread, scm_set_thread_cleanup_x,
67 scm_threads_cleanup): New.
68 (scm_all_threads): Remove SCM_I_SIGNAL_DELIVERY_THREAD from the
69 returned list.
70 * threads.h (scm_i_thread)[cleanup_handler, canceled]: New
71 fields.
72 Add declarations of new functions.
73
d41668fa
LC
742007-10-17 Ludovic Courtès <ludo@gnu.org>
75
76 * read.c (CHAR_IS_BLANK_): Add `\r' (ASCII 0x0d). This fixes a
77 regression compared to 1.8.2. Reported by Puneet
78 <schemer@gmail.com>.
79
66302618
LC
802007-10-10 Ludovic Courtès <ludo@gnu.org>
81
82 * pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
83 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
84 * gen-scmconfig.h.in
85 (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
86 * gen-scmconfig.c (main): Define
87 `SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
88
1445e449
LC
892007-10-04 Ludovic Courtès <ludo@gnu.org>
90
91 * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
92 `leave_locale_section ()' on failure of
93 `enter_locale_section ()' since the mutex is not held and locale
94 settings are unchanged.
95 (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
96 `restore_locale_settings ()' instead of `leave_locale_section ()'
97 since the mutex is not held.
98
29776e85
LC
992007-10-02 Ludovic Courtès <ludo@gnu.org>
100
101 * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
102 since we're already in non-guile mode. Reported by Greg Toxel
103 for NetBSD.
104
61d3568b
LC
1052007-10-01 Ludovic Courtès <ludo@gnu.org>
106
107 * ports.c (flush_output_port): Expect directly a port instead of
108 a pair. Fixes a bug in the new port table (2007-08-26).
109
68eccd8b
KR
1102007-09-11 Kevin Ryde <user42@zip.com.au>
111
112 * posix.c (scm_putenv): Confine the putenv("NAME=") bit to mingw, use
113 putenv("NAME") as the fallback everywhere else. In particular this is
114 needed for solaris 9. Reported by Frank Storbeck.
115
454866e0
LC
1162007-09-03 Ludovic Courtès <ludo@gnu.org>
117
118 * read.c (flush_ws): Handle SCSH block comments.
119
f43f3620
LC
1202007-09-03 Ludovic Courtès <ludo@gnu.org>
121
122 Fix alignment issues which showed up at least on SPARC.
123
124 * socket.c (scm_t_max_sockaddr, scm_t_getsockopt_result): New.
125 (scm_inet_pton): Change DST to `scm_t_uint32' for correct
126 alignment.
127 (scm_getsockopt): Change OPTVAL to `scm_t_getsockopt_result' for
128 correct alignment.
129 (_scm_from_sockaddr): Change ADDRESS to `scm_t_max_sockaddr *'.
130 (scm_from_sockaddr): Cast ADDRESS to `scm_t_max_sockaddr *'.
131 (MAX_SIZE_UN, MAX_SIZE_IN6): Removed.
132 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
133 Use `scm_t_max_sockaddr' instead of "char max_addr[MAX_ADDR_SIZE]".
134
8d4d5dfc
KR
1352007-09-03 Kevin Ryde <user42@zip.com.au>
136
137 * numbers.c (scm_log): Test HAVE_CLOG as well as HAVE_COMPLEX_DOUBLE
138 before using clog(). It's possible for gcc to provide the "complex
139 double" type, but for the system not to have the complex funcs.
140 (scm_exp): Ditto HAVE_CEXP for cexp().
141 (clog, cexp, carg): Remove fallback definitions. These only
142 duplicated the code within scm_log and scm_exp, and the latter have to
143 exist for the case when there's no "complex double". So better just
144 fix up the conditionals selecting between the complex funcs and plain
145 doubles than worry about fallbacks.
146
1ac5fb45
LC
1472007-09-02 Ludovic Courtès <ludo@gnu.org>
148
149 * socket.c (scm_make_socket_address): Free C_ADDRESS after use.
150 This fixes a memory leak.
151
b87e6d04
HWN
1522007-08-26 Han-Wen Nienhuys <hanwen@lilypond.org>
153
5dbc6c06
HWN
154 * fports.c gc-card.c gc.c gc.h ioext.c ports.c ports.h weaks.h
155 gc.c: replace port table with weak hash table. This simplifies
156 memory management, and fixes freed cells appearing in
157 port-for-each output.
158
b87e6d04
HWN
159 * init.c (cleanup_for_exit): abort cleanup if init_mutex is still
160 held.
161
2baec6a9
LC
1622007-08-23 Ludovic Courtès <ludo@gnu.org>
163
492faee1 164 * read.c (scm_read_quote): Record position and copy source
8d4d5dfc 165 expression when asked to. Reported by Kevin.
492faee1 166
2baec6a9
LC
167 * stime.c: Define `_REENTRANT' only if not already defined.
168
1f11c61a
KR
1692007-08-21 Kevin Ryde <user42@zip.com.au>
170
171 * gc-card.c (scm_i_card_statistics): Record scm_tc7_number types as
172 tc16 values so big, real, complex and fraction can be distinguished.
173
174 (scm_i_tag_name): Return "number" for scm_tc7_number, not NULL. NULL
175 was making numbers come out as "type 23" in gc-live-object-stats.
176 Fix tests of the tc16 number types, they were checked under
177 scm_tc7_number, but the values went down the tag>=255 smob case.
178 Put smob case under scm_tc7_smob instead of using tag>=255, per
179 recommendation in comments with scm_tc7_smob to use symbolic values.
180 Use SCM_TC2SMOBNUM to extract scm_smobs index, instead of explicit
181 code. Lose some unnecessary "break" statements.
182
183 (scm_i_card_statistics): Use scm_hashq_create_handle_x and modify the
184 element returned, rather than two lookups scm_hashq_ref and
185 scm_hashq_set_x.
186
949ec9f9
KR
1872007-08-17 Kevin Ryde <user42@zip.com.au>
188
189 * stime.c: Add #define _REENTRANT, to get gmtime_r() prototype on
190 solaris 2.6. Reported by anirkko.
191
6caac03c
LC
1922007-07-29 Ludovic Courtès <ludo@gnu.org>
193
194 * Makefile.am (INCLUDES): Added Gnulib includes.
195 (gnulib_library): New.
196 (libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD): Added
197 `$(gnulib_library)'.
198 (libguile_la_LIBADD): Likewise.
199
200 * posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
201 to define it when available.
202 * srfi-14.c: Likewise.
f7439099
LC
203 * i18n.c: Likewise. Include Gnulib's <alloca.h>
204 * eval.c: Include Gnulib's <alloca.h>.
205 * filesys.c: Likewise.
206 * read.c: Don't include <strings.h> and don't provide an
207 `strncasecmp ()' replacement; use Gnulib's <string.h> and
208 `strncasecmp ()' instead.
6caac03c 209
e08f3f7a
LC
2102007-07-25 Ludovic Courtès <ludo@gnu.org>
211
212 * eval.c (macroexp): When `scm_ilength (res) <= 0', return
213 immediately. This used to produce a circular memoized
214 expression, e.g., for `(set (quote x) #t)'.
215
7337d56d
LC
2162007-07-22 Ludovic Courtès <ludo@gnu.org>
217
218 Overhauled the reader, making it faster.
219
220 * gdbint.c (tok_buf, tok_buf_mark_p): Removed.
221 (gdb_read): Don't use a token buffer. Use `scm_read ()' instead
222 of `scm_lreadr ()'.
223
224 * read.c: Overhauled. No longer use a token buffer. Use a
225 on-stack C buffer in the common case and use Scheme strings when
226 larger buffers are needed.
227 * read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
228 scm_lreadr, scm_lreadrecparen): Removed.
229 (scm_i_input_error): Marked as `SCM_NORETURN'.
230
df449722
LC
2312007-07-15 Ludovic Courtès <ludo@gnu.org>
232
233 * script.c (scm_compile_shell_switches): Updated copyright year.
234
b1f57ea4
LC
2352007-07-11 Ludovic Courtès <ludo@gnu.org>
236
237 * goops.c (scm_sys_method_more_specific_p): Added docstring.
238 Make sure LEN is greater than or equal to the minimum length of
239 specializers of M1 and M2. This fixes a segfault later on in
240 `more_specificp ()' if TARGS is too small. Reported by Marco
241 Maggi <marco.maggi-ipsu@poste.it>.
242
d3075c52
LC
2432007-06-26 Ludovic Courtès <ludo@gnu.org>
244
245 * fluids.c (next_fluid_num): When growing ALLOCATED_FLUIDS, make
246 sure to free the previous array after the new one has been
247 installed. This leak is made visible by running
248 "(define l (map (lambda (i) (make-fluid)) (iota 255)))"
249 from the REPL within Valgrind.
250
7a5fb796
LC
2512007-06-12 Ludovic Courtès <ludo@chbouib.org>
252
253 * socket.c (scm_inet_ntop): In the `AF_INET' case, declare `addr4'
254 as an `scm_t_uint32' rather than re-using `addr6'. This fixes a
255 bus error on SPARC (and possibly others) due to unaligned access.
256
a1ef7406
LC
2572007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
258
259 * posix.c (scm_ttyname): Check whether RESULT is NULL before
260 making a string from it (reported by Dan McMahill). Don't call
261 `scm_from_locale_string ()' before the mutex is released.
262
3dcf3373
LC
2632007-05-26 Ludovic Courtès <ludo@chbouib.org>
264
265 * eval.c (scm_m_define): Updated comment. Changed order for value
266 evaluation and `scm_sym2var ()' call, which is perfectly valid per
267 R5RS. This reverts the change dated 2004-04-22 by Dirk Herrmann.
268
608860a5
LC
2692007-05-05 Ludovic Courtès <ludo@chbouib.org>
270
271 Implemented lazy duplicate binding handling.
272
273 * modules.c (scm_export): Renamed to...
274 (scm_module_export): This. Now public.
275 (module_variable): Removed.
276 (default_duplicate_binding_procedures_var): New variable.
277 (default_duplicate_binding_handlers, resolve_duplicate_binding,
278 module_imported_variable, scm_module_local_variable,
279 scm_module_variable): New functions.
280 (scm_module_import_interface): Rewritten.
281 (scm_module_reverse_lookup): Exported as a Scheme function.
282 * modules.h (scm_module_index_duplicate_handlers,
283 scm_module_index_import_obarray): New macros.
284 (scm_module_variable, scm_module_local_variable,
285 scm_module_export): New declarations.
286
1911e3da
LC
2872007-04-17 Ludovic Courtès <ludovic.courtes@laas.fr>
288
289 * numbers.c: Commented out trailing `HAVE_COMPLEX_DOUBLE' after
290 `#endif'. Use `#ifndef HAVE_XXX' rather than `#if !HAVE_XXX'.
291
1d8ce4c0
HWN
2922007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
293
294 * numbers.c (carg): provide carg, cexp, clog in case they are
295 missing.
296
afb49959
LC
2972007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
298
299 * i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
300 `FRAC_DIGITS', etc., which are GNU extensions. Reported by
301 Steven Wu.
302
b3aa4626
KR
3032007-03-08 Kevin Ryde <user42@zip.com.au>
304
305 * struct.c, struct.h (scm_make_vtable): New function, providing
306 `make-vtable'.
307 * stacks.c (scm_init_stacks): Use it.
308
3092007-03-06 Kevin Ryde <user42@zip.com.au>
310
311 * struct.c (scm_make_struct): Check for R,W,O at end of layout when
312 allocating a tail array. If there's no such then those tail fields
313 are uninitialized and garbage SCMs there can cause a segv if printed
314 (after fetching with struct-ref).
315
3162007-02-22 Kevin Ryde <user42@zip.com.au>
317
318 * scmsigs.c (scm_sleep): In docstring, cross refence usleep.
319 (scm_usleep): Update docstring per manual, cross reference sleep.
320
321 * struct.c (scm_make_struct): Move SCM_CRITICAL_SECTION_END up so that
322 scm_struct_init is not within that section. scm_struct_init can
323 thrown an error, which within a critical section results in an
324 abort().
325
03291373
NJ
3262007-02-19 Neil Jerram <neil@ossau.uklinux.net>
327
328 * Makefile.am (noinst_HEADERS): Add private-options.h, so that it
329 is included in the distribution.
652dbce6 330 (noinst_HEADERS): And the same for eval.i.c.
03291373 331
a2f00b9b
LC
3322007-01-31 Ludovic Courtès <ludovic.courtes@laas.fr>
333
334 * i18n.c: Include "libguile/threads.h" and "libguile/posix.h"
335 unconditionally. Include <langinfo.h> and <nl_types.h> when
336 available.
337 (SCM_I18N_STRINGIFY, SCM_LOCALE_CATEGORY_MASK,
338 SCM_LIST_OR_INTEGER_P): New macros.
339 (LC_*_MASK): When `USE_GNU_LOCALE_API' is undefined, define them
340 as powers of two instead of `(1 << LC_*)'.
341 (scm_i_locale_free): New function/macro.
342 (scm_global_locale): New global variable.
343 (smob_locale_free): Use `scm_i_locale_free ()'.
344 (smob_locale_mark): Check whether the SMOB is `%global-locale'.
345 (get_current_locale_settings): Return `EINVAL' instead of `errno'
346 when `setlocale' fails.
347 (restore_locale_settings): Likewise.
348 (install_locale_categories): Likewise.
349 (install_locale): Likewise. Stop the locale stack traversal when
350 all categories have been handled.
351 (get_current_locale, category_to_category_mask,
352 category_list_to_category_mask): New function.
353 (scm_make_locale): Use them. Accept both lists of `LC_*' values
354 and single `LC_*' values as the first argument. Handle the case
355 where BASE_LOCALE is `%global-locale'. When `USE_GNU_LOCALE_API',
356 duplicate C_BASE_LOCALE before using it.
357 (scm_nl_langinfo, define_langinfo_items): New functions.
358 (scm_init_i18n): When `HAVE_NL_LANGINFO', add feature
359 `nl-langinfo' and invoke `define_langinfo_items ()'.
360 * i18n.h (scm_global_locale, scm_nl_langinfo): New declarations.
361 * posix.c: Include <xlocale.h> when available.
362 (scm_i_locale_mutex): Always define it. Statically initialized.
363 (scm_set_locale): Invoke `scm_i_to_lc_category ()' before
364 acquiring the locale mutex.
365 (scm_init_posix): No longer initialize SCM_I_LOCALE_MUTEX here.
366
b3aa4626
KR
3672007-01-27 Kevin Ryde <user42@zip.com.au>
368
369 * ports.c (scm_port_line, scm_set_port_line_x), read.c
370 (scm_i_input_error, scm_lreadr, scm_lreadrecparen): Corrections to
371 port line number type, should be "long" not "int", as per line_number
372 field of scm_t_port. (Makes a difference only on 64-bit systems, and
373 only then for a linenum above 2Gig.)
374
2a8d66b0
HWN
3752007-01-25 Han-Wen Nienhuys <hanwen@lilypond.org>
376
377 * vector.c: remove comment as per kryde's request.
378
b3aa4626
KR
3792007-01-25 Kevin Ryde <user42@zip.com.au>
380
381 * sort.c (scm_stable_sort): Return empty list for input empty list, as
382 done in guile 1.6 and as always done by plain `sort'. Was falling
383 through to SCM_WRONG_TYPE_ARG. Reported by Ales Hvezda.
384
cb90e2cb
HWN
3852007-01-22 Han-Wen Nienhuys <hanwen@lilypond.org>
386
8cb7939c
HWN
387 * vectors.c (s_scm_vector_move_right_x): complain about naming.
388
d00a0704
HWN
389 * srcprop.c: regularize comments.
390
3d178652
HWN
391 * eval.c: remove superfluous ifndef DEVAL.
392
243ebb61
HWN
393 * private-options.h: idem.
394
395 * eval.i.c: copyright nitpicking.
396
0ee05b85
HWN
397 * eval.c: distangle. move duplicate code to eval.i.c and include
398 twice.
399
400 * eval.i.c: new file.
401
22fc179a
HWN
402 * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c
403 eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
404 read.h, stacks.c, symbols.c, throw.c: use private-options.h
405
406 * private-options.h: new file: contain hardcoded option
407 definitions.
408
cb90e2cb
HWN
409 * private-gc.h: add FSF header.
410
62560650
HWN
4112007-01-19 Han-Wen Nienhuys <hanwen@lilypond.org>
412
72f19c26
HWN
413 * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if
414 memoize-symbol is set.
415
416 * eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
417
418 * eval.c (CEVAL): add memoize_symbol trap.
419
03347a97
HWN
420 * options.c (scm_options_try): new function. This allows error
421 reporting before changing options in a critical section.
422
b0763985
HWN
423 * srcprop.c: use double cell for storing source-properties. Put
424 filename in the plist, and share between srcprops if possible.
425 Remove specialized storage.
426
427 * srcprop.h: remove macros without SCM_ prefix from
428 interface. Remove specialized storage/type definitions.
429
62560650
HWN
430 * read.c: idem.
431
432 * print.c: idem.
433
434 * eval.c: terminate option lists with 0.
435
436 * options.c: remove n (for length) from scm_option_X
437 functions. Detect option list length by looking for NULL name.
438
42ddb3cb
LC
4392007-01-19 Ludovic Courtès <ludovic.courtes@laas.fr>
440
441 * struct.c (scm_i_struct_equalp): Skip comparison if both FIELD1
442 is equal to S1 and FIELD2 is equal to S2. This avoids infinite
443 recursion when comparing `s' fields, as the REQUIRED_VTABLE_FIELDS
444 added by `make-vtable-vtable'. Reported by Marco Maggi.
445
937038e8
HWN
4462007-01-18 Han-Wen Nienhuys <hanwen@lilypond.org>
447
448 * throw.c (scm_ithrow): more refined error message: print symbols
449 too.
450
23d72566
KR
4512007-01-16 Kevin Ryde <user42@zip.com.au>
452
453 * feature.c, feature.h (scm_set_program_arguments_scm): New function,
454 implementing `set-program-arguments'.
455
456 * filesys.c (scm_init_filesys): Use scm_from_int rather than
457 scm_from_long for O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL,
458 O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_NDELAY, O_SYNC and
459 O_LARGEFILE. These are all int not long, per arg to open().
460 (scm_init_filesys): Use scm_from_int rather than scm_from_long for
461 F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_SETFL, F_GETOWN, F_SETOWN, these
462 are all ints (per command arg to fcntl). Likewise FD_CLOEXEC which is
463 an int arg to fcntl.
464
465 * posix.c (scm_putenv): Correction to "len" variable, was defined only
466 for __MINGW32__ but used under any !HAVE_UNSETENV (such as solaris).
467 Move it to where it's used. Reported by Hugh Sasse.
468
469 * regex-posix.c (scm_regexp_exec): Remove SCM_CRITICAL_SECTION_START
470 and SCM_CRITICAL_SECTION_END, believe not needed. Their placement
471 meant #\nul in the input (detected by scm_to_locale_string) and a bad
472 flags arg (detected by scm_to_int) would throw from a critical
473 section, causing an abort().
474
475 * regex-posix.c (scm_init_regex_posix): Use scm_from_int for
476 REG_BASIC, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOTBOL,
477 REG_NOTEOL; they're all ints not longs (per args to regcomp and
478 regexec).
479
a2c40dc7
HWN
4802007-01-10 Han-Wen Nienhuys <hanwen@lilypond.org>
481
482 * throw.c (scm_ithrow): print out key symbol and string arguments
483 when error happens inside a critical section, and document why.
484
391f57e6
HWN
4852007-01-06 Han-Wen Nienhuys <hanwen@lilypond.org>
486
487 * read.c (s_scm_read_hash_extend): document #f argument to
488 read-hash-extend.
489
23d72566
KR
4902007-01-04 Kevin Ryde <user42@zip.com.au>
491
492 * deprecated.h (scm_create_hook), version.h.in (scm_major_version,
493 scm_minor_version, scm_micro_version, scm_effective_version,
494 scm_version, scm_init_version): Use SCM_API instead of just extern,
495 for the benefit of mingw. Reported by Cesar Strauss.
496
93632e3c
HWN
4972007-01-03 Han-Wen Nienhuys <hanwen@lilypond.org>
498
499 * gc.c (s_scm_gc_stats): return an entry for total-cells-allocated
500 too.
501 (gc_update_stats): update scm_gc_cells_allocated_acc too.
502
23d72566
KR
5032006-12-27 Kevin Ryde <user42@zip.com.au>
504
505 * threads.c (get_thread_stack_base): In mingw with pthreads we can use
506 the basic scm_get_stack_base. As advised by Nils Durner.
507
508 * threads.c (get_thread_stack_base): Add a version using
509 pthread_get_stackaddr_np (when available), for the benefit of MacOS.
510 As advised by Heikki Lindholm.
511
512 * scmsigs.c (signal_delivery_thread): Restrict scm_i_pthread_sigmask
513 to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils
514 Durner.
515
5162006-12-24 Kevin Ryde <user42@zip.com.au>
517
518 * posix.c (scm_kill): When only raise() is available, throw an ENOSYS
519 error if pid is not our own process, instead of silently doing nothing.
520
521 * print.c (scm_write, scm_display, scm_write_char): Disable port close
522 on EPIPE. This was previously disabled but introduction of HAVE_PIPE
523 check in configure.in unintentionally enabled it. Believe that
524 testing errno after scm_prin1 or scm_putc is bogus, a long ago error
525 can leave errno in that state. popen.test "no duplicates" output test
526 provoked that.
527
e2bf3b19
HWN
5282006-12-23 Han-Wen Nienhuys <hanwen@lilypond.org>
529
530 * numbers.c (scm_i_fraction_reduce): move logic into
531 scm_i_make_ratio(), so fractions are only read.
532 scm_i_fraction_reduce() modifies a fraction when reading it. A
533 race condition might lead to fractions being corrupted by reading
534 them concurrently.
535
536 Also, the REDUCED bit alters the SCM_CELL_TYPE(), making
537 comparisons between reduced and unreduced fractions go wrong.
538
539 * numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
540 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
541 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
542 SCM_FRACTION_REDUCED.
543
23d72566
KR
5442006-12-16 Kevin Ryde <user42@zip.com.au>
545
546 * scmsigs.c (scm_raise): Use raise() rather than kill(), as this is
547 more direct for a procedure called raise.
548 (kill): Remove mingw fake fallback.
549
5502006-12-15 Kevin Ryde <user42@zip.com.au>
551
552 * scmsigs.c: Conditionalize process.h, add io.h believe needed for
553 _pipe on mingw.
554
5552006-12-14 Kevin Ryde <user42@zip.com.au>
556
557 * threads.c (thread_print): Cope with the case where pthread_t is a
558 struct, as found on mingw. Can't just cast to size_t for printing.
559 Reported by Nils Durner.
560
561 * scmsigs.c: Add <fcntl.h> and <process.h> needed by mingw. Copy the
562 fallback pipe() using _pipe() from posix.c. Reported by Nils Durner.
563
5642006-12-13 Kevin Ryde <user42@zip.com.au>
565
566 * eval.c (scm_m_define): Set 'name procedure property on any
567 scm_procedure_p, not just SCM_CLOSUREP. In particular this picks up
568 procedures with setters as used in srfi-17.
569
570 * posix.c (scm_crypt): Check for NULL return from crypt(), which the
571 linux man page says is a possibility.
572
f30e1bdf
LC
5732006-12-12 Ludovic Courtès <ludovic.courtes@laas.fr>
574
575 * libguile/unif.c (read_decimal_integer): Let RESP be SIGN * RES
42ddb3cb 576 instead of RES (reported by Szavai Gyula). This allows the use of
f30e1bdf
LC
577 negative lower bounds.
578 (scm_i_read_array): Make sure LEN is non-negative (reported by
42ddb3cb 579 Szavai Gyula).
f30e1bdf
LC
580
581 (scm_array_in_bounds_p): Iterate over S instead of always
582 comparing indices with the bounds of S[0]. This fixes
583 `array-in-bounds?' for arrays with a rank greater than one and
584 with different lower bounds for each dimension.
585
23d72566
KR
5862006-12-05 Kevin Ryde <user42@zip.com.au>
587
588 * numbers.c (scm_product): For flonum*inum and complex*inum, return
589 exact 0 if inum==0. Already done for inum*flonum and inum*complex,
590 and as per R5RS section "Exactness".
591
5922006-12-03 Kevin Ryde <user42@zip.com.au>
593
594 * Makefile.am (.c.doc): Remove the "test -n" apparently attempting to
595 allow $AWK from the environment to override. It had syntax gremlins,
596 and the presence of a $(AWK) variable set by AC_PROG_AWK in the
597 Makefile stopped it having any effect. Use just $(AWK), which can be
598 overridden with "make AWK=xxx" in the usual way if desired.
599
22be72d3
LC
6002006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
601
602 * libguile/vectors.c (scm_vector_to_list): Fixed list
603 construction: elements were not copied when INC is zero (see
604 "shared array" example in `vectors.test'). Reported by
605 Szavai Gyula.
606
b89c4943
LC
6072006-11-18 Ludovic Courtès <ludovic.courtes@laas.fr>
608
609 * Makefile.am (lib_LTLIBRARIES): Added `libguile-i18n-v-XX.la'.
610 (libguile_la_SOURCES): Added `gettext.c', removed `i18n.c'.
611 (libguile_i18n_v_XX_la_SOURCES, libguile_i18n_v_XX_la_CFLAGS,
612 libguile_i18n_v_XX_la_LIBADD, libguile_i18n_v_XX_la_LDFLAGS): New.
613 (DOT_X_FILES): Added `gettext.x'.
614 (DOT_DOC_FILES): Likewise.
615 (EXTRA_libguile_la_SOURCES): Added `locale-categories.h'.
616 (modinclude_HEADERS): Added `gettext.h'.
617 (EXTRA_DIST): Added `libgettext.h'.
618
619 * gettext.h: Renamed to...
620 * libgettext.h: New file.
621
622 * i18n.c: Renamed to...
623 * gettext.c: New file.
624
625 * i18n.h: Renamed to...
626 * gettext.h: New file.
627
628 * i18n.c, i18n.h, locale-categories.h: New files.
629
630 * init.c: Include "libguile/gettext.h" instead of
631 "libguile/i18n.h".
632 (scm_i_init_guile): Invoke `scm_init_gettext ()' instead of
633 `scm_init_i18n ()'.
634
635 * posix.c: Include "libguile/gettext.h" instead of
636 "libguile/i18n.h" Test `HAVE_NEWLOCALE' and `HAVE_STRCOLL_L'.
637 (USE_GNU_LOCALE_API): New macro.
638 (scm_i_locale_mutex): New variable.
639 (scm_setlocale): Lock and unlock it around `setlocale ()' calls.
640
641 * posix.h: Include "libguile/threads.h".
642 (scm_i_locale_mutex): New declaration.
643
f3e3f530
NJ
6442006-11-17 Neil Jerram <neil@ossau.uklinux.net>
645
646 * script.c (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.
647
d9f71a07
LC
6482006-11-08 Ludovic Courtès <ludovic.courtes@laas.fr>
649
650 * libguile/gc-freelist.c (scm_i_adjust_min_yield): Take two
651 "sweep_stats" arguments; use them instead of accessing the global
652 variables `scm_gc_cells_collected' and `scm_gc_cells_collected_1'.
653
654 * libguile/gc-segment.c (scm_i_sweep_some_cards): Reset SWEEP
655 before each iteration of the loop.
656 (scm_i_sweep_some_segments): Reset SWEEP at each iteration.
657 (scm_i_get_new_heap_segment): Take an additional argument
658 SWEEP_STATS. Compute MIN_CELLS as a function of it.
659
660 * libguile/gc.c (scm_gc_cells_collected,
661 scm_gc_cells_collected_1): Removed.
662 (scm_i_gc_sweep_stats, scm_i_gc_sweep_stats_1): New.
663 (scm_gc_cells_marked_acc, scm_gc_cells_swept_acc,
664 scm_gc_time_taken, scm_gc_mark_time_taken, scm_gc_times,
665 scm_gc_cell_yield_percentage, protected_obj_count): Made `static'.
666 (scm_gc_stats): Use `scm_i_gc_sweep_stats' instead of
667 `scm_gc_cells_(collected|swept)'.
668 (gc_update_stats): New.
669 (gc_end_stats): Use `scm_i_gc_sweep_stats' and
670 `scm_i_gc_sweep_stats_1' instead of the former globals.
671 (scm_gc_for_newcell): Invoke `gc_update_stats ()' after each
672 `scm_i_sweep_some_segments' call. This fixes a bug where the GC
673 would keep allocating new segments instead of re-using collected
674 cells (because `scm_gc_cells_collected' would remain zero).
675
676 * libguile/gc.h (scm_gc_cells_swept, scm_gc_cells_collected,
677 scm_gc_cell_yield_percentage): Removed.
678
679 * libguile/private-gc.h (scm_gc_cells_collected_1): Removed.
680 (scm_i_adjust_min_yield): Updated.
681 (scm_i_get_new_heap_segment): Updated.
682
dd18d312
NJ
6832006-11-02 Neil Jerram <neil@ossau.uklinux.net>
684
685 * modules.c: Correct comment saying that low-level environments
686 will be used "in the next release".
687
688 * init.c: Comment out #include of environments.h.
689 (scm_i_init_guile): Comment out scm_environments_prehistory() and
690 scm_init_environments() calls.
691
692 * Makefile.am (libguile_la_SOURCES): Remove environments.c.
693 (DOT_X_FILES): Remove environments.x.
694 (DOT_DOC_FILES): Remove environments.doc.
695 (modinclude_HEADERS): Remove environments.h.
696
9a5fa6e9
NJ
6972006-10-25 Neil Jerram <neil@ossau.uklinux.net>
698
699 IA64 HP-UX GC patch from Hrvoje Nikšić. (Thanks!)
700
701 * threads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp() and
702 scm_ia64_register_backing_store_base() instead of Linux-specific
703 implementations.
704
705 * gc.h (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp):
706 New declarations.
707
708 * gc.c (__libc_ia64_register_backing_store_base): Declaration
709 removed.
710 (scm_ia64_register_backing_store_base, scm_ia64_ar_bsp): New, with
711 implementations for Linux and HP-UX.
712
713 * coop-pthreads.c (SCM_MARK_BACKING_STORE): Use scm_ia64_ar_bsp()
714 and scm_ia64_register_backing_store_base() instead of
715 Linux-specific implementations.
716
717 * continuations.h (__libc_ia64_register_backing_store_base):
718 Declaration removed.
719 (scm_t_contregs): New "fresh" field.
720
721 * continuations.c (ia64_getcontext): Removed.
722 (scm_make_continuation): Use continuation fresh field instead of
723 interpreting getcontext return values (which isn't portable). Use
724 scm_ia64_ar_bsp() and scm_ia64_register_backing_store_base()
725 instead of Linux-specific implementations.
726 (copy_stack_and_call): Use scm_ia64_register_backing_store_base()
727 instead of Linux-specific implementation.
728
729 * _scm.h (__ia64__): Also detect __ia64.
730
8ab3d8a0
KR
7312006-10-03 Kevin Ryde <user42@zip.com.au>
732
733 * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0
734 arguments or 3 or more arguments. Previously 0 called proc with
735 SCM_UNDEFINED, and 3 or more silently used just the first 2.
736
7372006-09-28 Kevin Ryde <user42@zip.com.au>
738
739 * fports.c, ports.c (ftruncate): Use "HAVE_CHSIZE && ! HAVE_FTRUNCATE"
740 for chsize fallback, instead of hard-coding mingw. Mingw in fact
741 supplies ftruncate itself these days.
742
743 * ports.c (fcntl.h): Can include this unconditionally, no need for
744 __MINGW32__.
745
746 * ports.c (truncate): Conditionalize on "HAVE_FTRUNCATE && !
747 HAVE_TRUNCATE" so as not to hard-code mingw. Use "const char *" and
748 "off_t" for parameters, per usual definition of this function, rather
749 than "char *" and "int". Use ftruncate instead of chsize. Check for
750 error on final close.
751
7522006-09-27 Kevin Ryde <user42@zip.com.au>
753
754 * numbers.c (scm_log10): Check HAVE_CLOG10, clog10() is not available
755 in mingw.
756
757 * posix.c (scm_execl, scm_execlp, scm_execle): Cast "const char *
758 const *" for mingw to suppress warnings from gcc (which are errors
759 under the configure default -Werror). Reported by Nils Durner.
760
7612006-09-26 Kevin Ryde <user42@zip.com.au>
762
763 * _scm.h (scm_to_off64_t, scm_from_off64_t): New macros.
764 * fports.c (scm_open_file): Use open_or_open64.
765 (fport_seek_or_seek64): New function, adapting fport_seek.
766 * fports.c, fports.h (scm_i_fport_seek, scm_i_fport_truncate): New
767 functions.
768 * ports.c (scm_seek, scm_truncate_file): Use scm_i_fport_seek and
769 scm_i_fport_truncate to allow 64-bit seeks and truncates on fports.
770
771 * ports.c (scm_truncate_file): Update docstring per manual.
772
7732006-09-23 Kevin Ryde <user42@zip.com.au>
774
775 * numbers.c, numbers.h (scm_log, scm_log10, scm_exp, scm_sqrt): New
776 functions.
777
9a5fa6e9 7782006-09-20 Ludovic Courtès <ludovic.courtes@laas.fr>
a17d2654
LC
779
780 * srfi-14.c: Include <config.h>. Define `_GNU_SOURCE'.
781 (make_predset, define_predset, make_strset, define_strset, false,
782 true): Removed.
783 (SCM_CHARSET_UNSET, CSET_BLANK_PRED, CSET_SYMBOL_PRED,
784 CSET_PUNCT_PRED, CSET_LOWER_PRED, CSET_UPPER_PRED,
785 CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED,
786 CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED,
787 CSET_LETTER_AND_DIGIT_PRED, CSET_GRAPHIC_PRED, CSET_PRINTING_PRED,
788 CSET_TRUE_PRED, CSET_FALSE_PRED, UPDATE_CSET): New macros.
789 (define_charset, scm_srfi_14_compute_char_sets): New functions.
790 (scm_init_srfi_14): Use `define_charset ()' instead of
791 `define_predset ()' and `define_strset ()'.
792
793 * srfi-14.h (scm_c_init_srfi_14): Removed.
794 (scm_srfi_14_compute_char_sets): New declaration.
795
796 * posix.h: Include "srfi-14.h".
797 (scm_setlocale): Invoke `scm_srfi_14_compute_char_sets ()' after a
798 successful `setlocale ()' call.
799
8ab3d8a0
KR
8002006-09-08 Kevin Ryde <user42@zip.com.au>
801
802 * socket.c (scm_init_socket): Add MSG_DONTWAIT.
803 (scm_recvfrom): Update docstring from manual.
804
418122ce
RB
8052006-08-31 Rob Browning <rlb@defaultvalue.org>
806
807 * ports.c (scm_c_port_for_each): Add a
808 scm_remember_upto_here_1(ports) at the end of the function to fix
809 a GC bug.
810
b5944f66
NJ
8112006-08-28 Neil Jerram <neil@ossau.uklinux.net>
812
813 * backtrace.c (scm_display_backtrace_with_highlights): Minor
814 improvements to docstring.
815 (scm_backtrace_with_highlights): Analogous improvements.
816
8ab3d8a0
KR
8172006-08-12 Kevin Ryde <user42@zip.com.au>
818
819 * gen-scmconfig.h.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
820 New, set from configure.
821 * gen-scmconfig.c (SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT): New output
822 to scmconfig.h.
823 * pthread-threads.h (SCM_I_PTHREAD_ONCE_INIT): Use
824 SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT to cope with Solaris.
825 Reported by Claes Wallin.
826
b0b0deff
NJ
8272006-08-11 Neil Jerram <neil@ossau.uklinux.net>
828
829 * stacks.c (scm_last_stack_frame): Correct docstring (returns a
830 frame, not a stack).
831
8ab3d8a0
KR
8322006-07-25 Kevin Ryde <user42@zip.com.au>
833
834 * threads.c (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
835 on pthreads version, since pthread_getattr_np not available on solaris
836 and macos. Reported by Claes Wallin.
837
8382006-07-24 Kevin Ryde <user42@zip.com.au>
839
840 * filesys.c (dirfd): Test with #ifndef rather than HAVE_DIRFD, since
841 it's a macro on MacOS X. Reported by Claes Wallin.
842
843 * posix.c (sethostname): Give prototype if not HAVE_DECL_SETHOSTNAME,
844 for the benefit of Solaris 10. Reported by Claes Wallin.
845
846 * socket.c (scm_htonl, scm_ntohl): Use scm_to_uint32 rather than
847 NUM2ULONG, to enforce 32-bit range check on systems with 64-bit long.
848
8492006-07-21 Kevin Ryde <user42@zip.com.au>
850
851 * eval.c, filesys.c (alloca): Update <alloca.h> etc blob, per current
852 autoconf recommendation. Should fix Solaris 10 reported by Claes
853 Wallin.
854
855 * threads.c: Include <string.h>, needed for memset() which is used by
856 FD_ZERO() on Solaris 10. Reported by Claes Wallin.
857
b4912378
RB
8582006-07-18 Rob Browning <rlb@defaultvalue.org>
859
860 * continuations.c: Add __attribute__ ((returns_twice)) to the
861 ia64_getcontext prototype so that gcc will make the right
862 arrangements and avoid an illegal instruction during
863 call-with-current-continuation.
864
9a5fa6e9 8652006-07-12 Ludovic Courtès <ludovic.courtes@laas.fr>
eaa94eaa
LC
866
867 * numbers.c (guile_ieee_init): Use regular ANSI C casts rather
868 than C++-style `X_CAST ()'. Patch posted by by Mike Gran.
869
8ab3d8a0
KR
8702006-07-08 Kevin Ryde <user42@zip.com.au>
871
872 * environments.c (core_environments_unobserve): Use if/else rather
873 than ?: for "SET" bits, avoiding complaints from AIX xlc compiler
874 about them not being rvalues. Reported by Mike Gran.
875
876 * Makefile.am (version.h): Don't use $< in an explicit rule, it's not
877 portable and in particular fails on OpenBSD and AIX (see autoconf
878 manual too). Reported by Mike Gran.
879
8802006-06-25 Kevin Ryde <user42@zip.com.au>
881
882 * stime.c (bdtime2c): tm_gmtoff is seconds East, so take negative of
883 tm:gmtoff which is seconds West. Reported by Aaron VanDevender.
884 (bdtime2c): Test HAVE_STRUCT_TM_TM_GMTOFF for tm_gmtoff, rather than
885 HAVE_TM_ZONE.
886 (scm_strptime): Use tm_gmtoff from the strptime result when that field
887 exists, it's set by glibc strptime "%s".
888
9a5fa6e9 8892006-06-13 Ludovic Courtès <ludovic.courtes@laas.fr>
d15ad007
LC
890
891 * eq.c: Include "struct.h", "goops.h" and "objects.h".
892 (scm_equal_p): Invoke `scm_i_struct_equalp ()' on structures that
893 are not GOOPS instances.
894 * struct.c: Include "eq.h".
895 (scm_free_structs): Use `SCM_STRUCT_VTABLE_DATA ()' instead of
896 hand-written code.
897 (scm_i_struct_equalp): New.
898 * struct.h (scm_i_struct_equalp): New declaration.
899
c862d0e0
KR
9002006-06-06 Kevin Ryde <user42@zip.com.au>
901
902 * Makefile.am (BUILT_SOURCES): Remove guile.texi, only used by
903 maintainers (with doc/maint/docstring.el). Fixes parallel "make -j2"
904 reported by Mattias Holm.
b4912378 905
c862d0e0
KR
9062006-06-03 Kevin Ryde <user42@zip.com.au>
907
908 * read.c (s_vector): Conditionalize on SCM_ENABLE_ELISP, to avoid
909 unused variable warning when elisp disabled. Reported by Ryan
910 VanderBijl.
911
912 * throw.c (scm_handle_by_message): Add dummy return value to avoid
913 compiler warning on cygwin. Reported by Ryan VanderBijl.
914
915 * Makefile.am (EXTRA_DOT_X_FILES): Typo in dependency rule, was a
916 duplicate of EXTRA_DOT_DOC_FILES.
917 (DOT_X_FILES, EXTRA_DOT_X_FILES, DOT_DOC_FILES, EXTRA_DOT_DOC_FILES):
918 Add scmconfig.h to dependencies, since these all run cpp. Helps a
919 parallel "make -j2". Reported by Mattias Holm.
920
9212006-05-30 Kevin Ryde <user42@zip.com.au>
922
923 * ports.c, ports.h (scm_set_port_mark, scm_set_port_free,
924 scm_set_port_print, scm_set_port_equalp, scm_set_port_flush,
925 scm_set_port_end_input, scm_set_port_close, scm_set_port_seek,
926 scm_set_port_truncate, scm_set_port_input_waiting): Use scm_t_bits for
927 port type descriptor, same as scm_make_port_type return value.
928
af4f8612
MV
9292006-05-30 Marius Vollmer <mvo@zagadka.de>
930
931 * eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
932 of the arguments is a array. This allows vectors to be equal to
933 one-dimensional arrays.
934
18bffcd0
MV
9352006-05-29 Marius Vollmer <mvo@zagadka.de>
936
937 * throw.c (scm_ithrow): When looking for the jmpbuf, first test
938 that we have a pair before accessing its cdr. Thanks to Bill
939 Schottstaedt!
940
c862d0e0
KR
9412006-05-28 Kevin Ryde <user42@zip.com.au>
942
943 * eval.c, filesys.c: Add malloc.h to get alloca() on mingw. Reported
944 by "The Senator".
945
9462006-05-27 Marius Vollmer <mvo@zagadka.de>
b0c0a310
MV
947
948 * srfi-4.c, strings.c: Replace SCM_C_INLINE with
949 SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
950
c862d0e0
KR
9512006-05-26 Kevin Ryde <user42@zip.com.au>
952
953 * fports.c (fport_input_waiting): For ioctl, check HAVE_IOCTL as well
954 as defined(FIONREAD), since mingw has FIONREAD but not ioctl().
955 Reported by "The Senator".
956 For select and ioctl, move fdes into those conditionals, to avoid
957 unused variable warning when neither of those used.
958
9592006-05-23 Kevin Ryde <user42@zip.com.au>
960
961 * fports.c: Remove "fwrite" declaration under "! HAVE_UNISTD_H".
962 It's unused and will be in stdio.h anyway (if it's anywhere).
963
9642006-05-20 Kevin Ryde <user42@zip.com.au>
965
966 * filesys.c (scm_stat2scm): Test #ifdef S_ISLNK directly, rather than
967 HAVE_S_ISLNK from configure (it was only a #ifdef test anyway).
968
969 * posix.c (scm_mknod): Test #ifdef S_IFLNK before using that (for
970 symlink). Probably can't create symlinks with mknod anyway though.
971
972 * inline.h (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code
973 generation.
974
9752006-05-15 Kevin Ryde <user42@zip.com.au>
976
977 * simpos.c, simpos.h (scm_primitive__exit): New function.
978 (scm_primitive_exit): Update docstring, no longer the best exit after
979 a fork.
980
9812006-05-09 Kevin Ryde <user42@zip.com.au>
982
983 * numbers.c (scm_i_divide): For big/big wanting inexact, use mpq_get_d
984 rather than converting to doubles, to avoid inf or nan when the inputs
985 are too big for a double but the quotient does fit. This affects
986 conversions exact->inexact of big fractions.
987
988 * filesys.c (scm_open_fdes): Use open64.
989 (scm_init_filesys): Add O_LARGEFILE.
990
991 * ports.c (scm_seek): Use lseek64.
992 (scm_truncate_file): Use ftruncate64.
993
4a342b19
MV
9942006-05-08 Marius Vollmer <mvo@zagadka.de>
995
996 * private-gc.h (CELL_P): Also check that the potential pointer is
997 correctly aligned for a cell. Thanks to Miroslav Lichvar!
998
c862d0e0
KR
9992006-04-18 Rob Browning <rlb@defaultvalue.org>
1000
1001 * _scm.h: Add back error if the size of off_t is unknown. The bug
1002 was actually in guile-readline's configuration.
1003
10042006-04-18 Kevin Ryde <user42@zip.com.au>
1005
1006 * posix.c (scm_mkstemp): Update docstring from the manual, in
1007 particular file mode 0600 is not guaranteed.
1008
281ab5e2
KR
10092006-04-17 Kevin Ryde <user42@zip.com.au>
1010
1011 * _scm.h (scm_to_off_t, scm_from_off_t): No error if unknown off_t
1012 size, to help the guile-readline build where off_t is unused.
1013
2b829bbb
KR
10142006-04-16 Kevin Ryde <user42@zip.com.au>
1015
1016 * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64.
1017 (scm_readdir): Use readdir64.
1018 (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files.
1019 * ports.c (scm_truncate_file): Use truncate64. Correction truncate
1020 and ftruncate take off_t not size_t.
1021 * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when
1022 available.
1023
10242006-04-06 Kevin Ryde <user42@zip.com.au>
1025
1026 * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE
9a5fa6e9 1027 instead of toggling it. Reported by Ludovic Courtès.
2b829bbb
KR
1028
10292006-03-26 Marius Vollmer <mvo@zagadka.de>
1030
1031 * threads.c (get_thread_stack_base): Use scm_get_stack_base
1032 instead of accessing __libc_stack_end directly, and only do this
1033 when pthread_attr_getstack is known not to work for the main
1034 thread or when not using pthreads at all.
1035
1036 * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
1037 unknown instead of returning NULL.
1038
9a5fa6e9 10392006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1040
1041 * numbers.c (scm_i_mem2number): Renamed to
1042 scm_c_locale_stringn_to_number.
1043 * numbers.c, print.c, read.c: Updated callers.
1044 * numbers.h: Update function declaration.
1045
10462006-03-11 Neil Jerram <neil@ossau.uklinux.net>
1047
1048 * unif.c (string_set): Don't return in a void function. (Reported
1049 by Mike Gran.)
1050
1051 * srfi-4.c (scm_uniform_vector_read_x): Declare base as char*
1052 rather than void*, so we can do pointer arithmetic on it.
1053 (Reported by Mike Gran.)
1054 (s_scm_uniform_vector_write): Ditto.
1055
10562006-03-10 Neil Jerram <neil@ossau.uklinux.net>
1057
1058 * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when
1059 oldra is not an array. (Reported by Steve Juranich.)
1060
1061 * threads.c (do_unlock): Renamed from "unlock", which is defined
1062 in unistd.h on QNX. (Reported by Matt Kraai.)
1063
10642006-03-04 Kevin Ryde <user42@zip.com.au>
1065
1066 * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message,
1067 not SCM_CRITICAL_SECTION_START.
1068
1069 * eval.c, posix.c: Change comments from C++ to C style. Reported by
1070 Mike Gran.
1071
10722006-02-28 Kevin Ryde <user42@zip.com.au>
1073
1074 * unif.c (bitvector_set): Use h->writable_elements not h->elements.
1075
10762006-02-26 Kevin Ryde <user42@zip.com.au>
1077
1078 * filesys.c (scm_readdir): Use fpathconf for the dirent size when
1079 NAME_MAX is not available, which is so on Solaris 10. Report and help
1080 by Bill Schottstaedt.
1081
1082 * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro.
1083 (scm_string_compare, scm_string_compare_ci, scm_string_lt,
1084 scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt,
1085 scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons
1086 use "unsigned char", not signed char. This ensures comparisons are
1087 the same as `char<?' etc, and is also the same as guile 1.6 did.
1088 Reported by Sven Hartrumpf.
1089
4a9f83ff
MD
10902006-02-19 Mikael Djurfeldt <mdj@neurologic.cc>
1091
1092 * random.c: Test for SCM_HAVE_T_UINT64 instead of
1093 SCM_HAVE_T_INT64.
1094 (scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
1095 scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
1096 scm_t_int32.
1097
29d8c124 10982006-01-04 Ludovic Courtès <ludovic.courtes@laas.fr>
4c7016dc
HWN
1099
1100 * gc-segment.c (scm_i_sweep_some_cards): Take a SWEEP_STATS
1101 argument. Don't refer to SCM_GC_CELLS_COLLECTED and
1102 SCM_CELLS_ALLOCATED. If SEG->FIRST_TIME, let CELLS_COLLECTED as zero.
1103 Take into account SEG->SPAN when computing CELLS_SWEPT.
1104 (scm_i_sweep_segment): Take one more argument, similarly.
1105 (scm_i_sweep_all_segments): Likewise.
1106 (scm_i_sweep_some_segments): Likewise.
1107 (scm_i_adjust_min_yield): Change the way MIN_CELLS is computed: do not
1108 refer to SCM_GC_CELLS_COLLECTED.
1109
1110 * gc-freelist.c (scm_i_adjust_min_yield): Take one more
1111 argument, an `scm_i_sweep_statistics' object.
1112 Change the way DELTA is collected: don't take into account
1113 SCM_GC_CELLS_COLLECTED_1, only SWEEP_STATS.COLLECTED.
1114
1115 * gc-malloc.c (scm_realloc): Pass an extra argument
1116 to `scm_i_sweep_all_segments ()'.
1117
1118 * gc.c (gc_start_stats): Updated accordingly.
1119 (gc_end_stats): Take an additional SWEEP_STATS argument.
1120 Decrement SCM_CELLS_ALLOCATED after calls to `scm_i_sweep_* ()'.
1121 (scm_gc_for_newcell): Updated callers of `scm_i_sweep_*'.
1122 Decrement SCM_CELLS_ALLOCATED.
1123 (scm_i_gc): Likewise.
1124
1125 * private-gc.h (scm_i_sweep_*): Updated function
1126 prototypes accordingly.
1127 (scm_t_sweep_statistics): New type.
1128 (scm_i_sweep_statistics_init): New macro.
1129 (scm_i_sweep_statistics_sum): New macro
1130
9a5fa6e9 11312006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr>
2b829bbb
KR
1132
1133 * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of
1134 LEN. Without this, too much collectable memory gets unregistered,
1135 which results in an underflow of SCM_MALLOCATED in
1136 `decrease_mtrigger()'.
1137
1138 * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or
1139 equal to SCM_MALLOCATED.
1140
11412006-02-13 Marius Vollmer <mvo@zagadka.de>
1142
1143 * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock
1144 oinstead of scm_dynwind_pthread_mutex_lock so that it works when
1145 configured --without-threads.
1146 (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys!
1147
1aaa1c17
MV
11482006-02-12 Marius Vollmer <mvo@zagadka.de>
1149
1150 * unif.c (scm_dimensions_to_uniform_array): Use the prototype for
1151 filling when the fill parameter is omitted, as documented, but
1152 turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
1153 can not store characters.
1154
d7c6575f
NJ
11552006-02-09 Neil Jerram <neil@ossau.uklinux.net>
1156
1157 * socket.c (scm_c_make_socket_address): Pass address_size pointer
1158 on to scm_fill_sockaddr call.
1159
43e01b1e
NJ
11602006-02-04 Neil Jerram <neil@ossau.uklinux.net>
1161
1162 * throw.h (scm_c_catch, scm_c_with_throw_handler,
1163 scm_catch_with_pre_unwind_handler, scm_with_throw_handler): New.
1164
1165 * throw.c (SCM_JBPREUNWIND, SCM_SETJBPREUNWIND): New.
1166 (struct pre_unwind_data): New, replaces struct lazy_catch.
1167 (scm_c_catch): New, replaces scm_internal_catch as the primary
1168 catch API for C code; adds pre-unwind handler support.
1169 (scm_internal_catch): Now just a wrapper for scm_c_catch, for back
1170 compatibility.
1171 (tc16_pre_unwind_data, pre_unwind_data_print,
1172 make_pre_unwind_data, SCM_PRE_UNWIND_DATA_P): Renamed from
1173 "lazy_catch" equivalents.
1174 (scm_c_with_throw_handler): New, replaces scm_internal_lazy_catch
1175 as the primary C API for a "lazy" catch.
1176 (scm_internal_lazy_catch): Now just a wrapper for
1177 scm_c_with_throw_handler, for back compatibility.
1178 (scm_catch_with_pre_unwind_handler): Renamed from scm_catch; adds
1179 pre-unwind handler support.
1180 (scm_catch): Now just a wrapper for
1181 scm_catch_with_pre_unwind_handler, for back compatibility.
1182 (scm_with_throw_handler): New.
1183 (scm_lazy_catch): Update comment to say that the handler can
1184 return, and what happens if it does.
1185 (toggle_pre_unwind_running): New.
1186 (scm_ithrow): When identifying the throw target, take running
1187 flags into account. In general, change naming of things from
1188 "lazy_catch" to "pre_unwind". When throwing to a throw handler,
1189 don't unwind the dynamic context first. Add dynwind framing to
1190 manage the running flag of a throw handler. If a lazy catch or
1191 throw handler returns, rethrow the same exception again. Add
1192 pre-unwind support to the normal catch case (SCM_JMPBUFP).
1193
1194 * root.c (scm_internal_cwdr): Add NULL args to
1195 scm_i_with_continuation_barrier call.
1196
1197 * dynwind.c: Change comment mentioning lazy-catch to mention
1198 pre-unwind data and throw handler also.
1199
1200 * continuations.h (scm_i_with_continuation_barrier): Add
1201 pre-unwind handler args.
1202
1203 * continuations.c (scm_i_with_continuation_barrier): Add
1204 pre-unwind handler args, and pass on to scm_c_catch (changed from
1205 scm_internal_catch).
1206 (c_handler): Remove scm_handle_by_message_noexit call.
1207 (scm_c_with_continuation_barrier): Call
1208 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1209 as the pre-unwind handler.
1210 (scm_handler): Remove scm_handle_by_message_noexit call.
1211 (s_scm_with_continuation_barrier): Call
1212 scm_i_with_continuation_barrier with scm_handle_by_message_noexit
1213 as the pre-unwind handler.
1214
2b829bbb
KR
12152006-02-04 Kevin Ryde <user42@zip.com.au>
1216
1217 * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables.
1218
72098928
KR
12192006-02-03 Kevin Ryde <user42@zip.com.au>
1220
1221 * list.c, list.h (scm_list): Restore this function for use from C.
1222 It's a complete no-op but in theory might used by someone.
1223
aa092c5d
MV
12242006-01-30 Marius Vollmer <mvo@zagadka.de>
1225
1226 * eval.c (scm_eval_body): Lock source_mutex with a dynwind context
1227 so that it gets unlocked in all cases.
1228 (SCM_APPLY, CEVAL): Likewise.
1229
661ae7ab
MV
12302006-01-29 Marius Vollmer <mvo@zagadka.de>
1231
ee51ba31
MV
1232 * ramap.c: (scm_array_map_x): Don't use scm_array_p, use
1233 scm_is_typed_array instead.
1234
661ae7ab
MV
1235 Renamed the "frames" that are related to dynamic-wind to "dynamic
1236 contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
1237 Updated documentation.
1238
99e370f6
MV
1239 Disabled "futures":
1240
1241 * futures.h, futures.c: Wrap whole contents in "#if 0"/"#endif".
1242 * eval.c, init.c: Comment out all 'future' related things.
1243
15ccf10b
MV
12442006-01-28 Marius Vollmer <mvo@zagadka.de>
1245
1246 * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
1247 to inline.h to make it inline.
1248
9a5fa6e9 12492005-12-19 Ludovic Courtès <ludovic.courtes@laas.fr>
fd0a5bbc
HWN
1250
1251 * strings.c (scm_i_take_stringbufn): New.
1252 (scm_i_c_take_symbol): New.
1253 (scm_take_locale_stringn): Use `scm_i_take_stringbufn ()'.
1254
1255 * strings.h (scm_i_c_take_symbol): New.
1256 (scm_i_take_stringbufn): New.
1257
1258 * symbols.c (lookup_interned_symbol): New function.
1259 (scm_i_c_mem2symbol): New function.
1260 (scm_i_mem2symbol): Use `lookup_symbol ()'.
1261 (scm_from_locale_symbol): Use `scm_i_c_mem2symbol ()'. This avoids
1262 creating a new Scheme string.
1263 (scm_from_locale_symboln): Likewise.
1264 (scm_take_locale_symbol): New.
1265 (scm_take_locale_symboln): New.
1266
1267 * symbols.h (scm_take_locale_symbol): New.
1268 (scm_take_locale_symboln): New.
1269
2ca2ffe6
HWN
12702006-01-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1271
1272 * gc-card.c ("sweep_card"): don't count scm_tc_free_cell for
1273 free_count.
1274
c255614e
HWN
12752005-11-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
1276
1277 * regex-posix.c (s_scm_regexp_exec): list the offending pattern
1278 upon error
1279
29295b0c
NJ
12802005-12-29 Neil Jerram <neil@ossau.uklinux.net>
1281
9a5fa6e9 1282 * fluids.c (next_fluid_num): [From Ludovic Courtès:] Don't trigger
29295b0c
NJ
1283 the GC when allocated_fluids_len is zero.
1284
2824f4dc
NJ
12852005-12-14 Neil Jerram <neil@ossau.uklinux.net>
1286
ec3a8ace
NJ
1287 * load.c (the_reader, the_reader_fluid_num): New.
1288 (scm_primitive_load): Support custom reader.
1289 (scm_init_load): Init the_reader and the_reader_fluid_num; export
1290 the_reader as `current-reader'.
1291
2824f4dc
NJ
1292 * scmsigs.c (do_read_without_guile): Use the "raw_data" passed in
1293 (rather than an uninitialized pointer on the stack).
1294
d9c36d2a
MV
12952005-12-07 Marius Vollmer <mvo@zagadka.de>
1296
6a88895b
MV
1297 Reported by Bruce Korb:
1298
1299 * init.c (invoke_main_func): Don't call exit here. Throws that
1300 are only caught by scm_with_guile will bypass us and would cause
1301 scm_boot_guile to return erroneously.
1302 (scm_boot_guile): Expect scm_with_guile to return and call exit
1303 here, passing it an appropriate exit code.
1304
1305 From Andy Wingo:
d9c36d2a
MV
1306
1307 * script.c (scm_find_executable): Compile fix -- fgetc returns an
1308 unsigned char cast to an int, or -1 for EOS.
1309
b54df254
MV
13102005-12-06 Marius Vollmer <mvo@zagadka.de>
1311
08f489c9
MV
1312 * srfi-4.h, srfi-4.c, srfi-4.i.c (take_uvec): Make BASE pointer
1313 non-const.
9a5fa6e9 1314 (scm_take_u8vector, etc): Likewise. Thanks to Ludovic Courtès!
08f489c9 1315
b54df254
MV
1316 * threads.h, threads.c (scm_t_guile_ticket, scm_leave_guile,
1317 scm_enter_guile): Removed from public API. See comment at
1318 scm_without_guile for the rationale.
1319
1320 * scmsigs.c (read_without_guile): New.
1321 (signal_delivery_thread): Use it instead of
1322 scm_leave_guile/read/scm_enter_guile.
1323
9d9ce2b5
MV
1324 From Stephen Compall:
1325
1326 * eval.c (scm_m_cond): Recognize SRFI 61 cond syntax.
1327 (CEVAL): Evaluate SRFI 61 cond clauses.
1328
9a5fa6e9 13292005-12-06 Ludovic Courtès <ludovic.courtes@laas.fr>
9fb5c8f9
NJ
1330
1331 * gc-card.c (scm_i_card_statistics): Return if BITVEC is NULL.
1332 This was typically hit when running `gc-live-object-stats' right
1333 after starting Guile.
1334
efeac8ae
KR
13352005-11-30 Kevin Ryde <user42@zip.com.au>
1336
1337 * srfi-13.c (scm_string_append_shared): No copying if just one
1338 non-empty string in args.
1339
606183ba
KR
13402005-11-26 Kevin Ryde <user42@zip.com.au>
1341
1342 * gc-mark.c (scm_mark_all): Change C++ comment to C comment. Reported
9a5fa6e9 1343 by Ludovic Courtès.
606183ba
KR
1344
1345 * list.c (list): Should be "primitive" in SCM_SNARF_DOCS, not
1346 "register".
1347
1348 * random.c (scm_i_copy_rstate, scm_c_make_rstate): Don't test for
1349 scm_malloc returning NULL, it never does that.
1350 * putenv.c (putenv): Likewise.
1351
1352 * socket.c (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
1353 much too big to want to inline.
1354
9a5fa6e9 13552005-11-17 Ludovic Courtès <ludovic.courtes@laas.fr>
dbb5de29
NJ
1356
1357 * print.c (EXIT_NESTED_DATA): Before popping from the stack, reset
1358 the value at its top. This fixes a reference leak.
1359 (PUSH_REF): Perform `pstate->top++' after calling
1360 `PSTATE_STACK_SET ()' in order to avoid undesired potential side
1361 effects.
1362
9a5fa6e9 13632005-11-12 Ludovic Courtès <ludovic.courtes@laas.fr>
3f98874a
NJ
1364
1365 * gc.c (scm_weak_vectors): Removed.
1366
f07d2b20
KR
13672005-11-12 Kevin Ryde <user42@zip.com.au>
1368
1369 * socket.c (scm_setsockopt): Missing @defvar in docstring. Reported
9a5fa6e9 1370 by Ludovic Courtès.
f07d2b20 1371
bedd3f5f
MV
13722005-11-07 Marius Vollmer <mvo@zagadka.de>
1373
1374 * stime.c (scm_mktime): Use scm_frame_critical_section instead of
1375 SCM_CRITICAL_SECTION_START/END since the code inside the critical
1376 section might exit non-locally.
1377
7c9c0169
NJ
13782005-11-04 Neil Jerram <neil@ossau.uklinux.net>
1379
1380 * eval.c (sym_instead): New symbol.
1381 (ENTER_APPLY): Remove optional use of a continuation when making
1382 trap call.
1383 (scm_debug_opts): Change doc for 'cheap option to make clear that
1384 it is now obsolete.
1385 (CEVAL, SCM_APPLY): Remove optional use of a continuation when
1386 making trap calls, and implement substitution of eval expressions
1387 and return values using the values that the trap call handlers
1388 return.
1389
1390 * debug.h (SCM_CHEAPTRAPS_P): Removed.
1391
9a5fa6e9 13922005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
64cdbfc7
KR
1393
1394 * socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
1395 (scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
1396 (scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
1397 (scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
1398 scm_c_make_socket_address): New functions.
1399 * socket.h: Add prototypes.
1400
fc9f596c
KR
14012005-10-24 Kevin Ryde <user42@zip.com.au>
1402
1403 * socket.c (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
1404 IPPROTO_UDP. Remove SOL_IP, SOL_TCP, SOL_UDP. The former are in
1405 POSIX spec examples, the latter are not available on for instance
1406 NetBSD.
1407
1408 * socket.c (scm_getsockopt, scm_setsockopt): Update docstrings from
1409 posix.texi.
1410
1411 * stime.c (scm_strftime): Update docstring from posix.texi.
1412
0460c6e1
MV
14132005-10-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1414
1415 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not portable enough.
1416
1417 * null-threads.h, pthread-threads.h
1418 (SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
1419 (scm_i_pthread_mutexattr_recursive): New.
1420
1421 * threads.c (scm_i_pthread_mutexattr_recursive): Declare.
1422 (scm_i_critical_section_mutex): Do not initialize statically.
1423 (scm_threads_prehistory): Initialize
1424 scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
1425 here.
1426
1427 * eval.c (source_mutex): Do not initialiaze statically.
1428 (scm_init_eval): Do it here, using
1429 scm_i_pthread_mutexattr_recursive.
1430
7b4a9e52
MV
14312005-09-05 Marius Vollmer <mvo@zagadka.de>
1432
1433 * print.h (SCM_PRINT_KEYWORD_STYLE_I, SCM_PRINT_KEYWORD_STYLE):
1434 New.
1435 (sym_reader): New.
1436 (scm_print_opts): Added "quote-keywordish-symbols" option.
1437 (quote_keywordish_symbol): New, for evaluating the option.
1438 (scm_print_symbol_name): Use it.
1439 (scm_init_print): Initialize new option to sym_reader.
1440
5defc05d
NJ
14412005-08-15 Neil Jerram <neil@ossau.uklinux.net>
1442
1443 * eval.c (eval_letrec_inits): New.
1444 (CEVAL): Eval letrec initializer forms using eval_letrec_inits.
1445
036482e9
MV
14462005-08-12 Marius Vollmer <mvo@zagadka.de>
1447
1448 * numbers.c: Use scm_from_bool instead of SCM_BOOL. Thanks to
1449 Peter Gavin!
1450
5c347f8c
KR
14512005-08-12 Kevin Ryde <user42@zip.com.au>
1452
1453 * srfi-13.c (scm_string_for_each_index): Correction to docstring.
1454
bc721aa2
KR
14552005-08-06 Kevin Ryde <user42@zip.com.au>
1456
1457 * srfi-13.c (scm_string_any, scm_string_every, scm_string_tabulate,
1458 scm_string_trim, scm_string_trim_right, scm_string_trim_both,
1459 scm_string_index, scm_string_index_right, scm_string_skip,
1460 scm_string_skip_right, scm_string_count, scm_string_map,
1461 scm_string_map_x, scm_string_for_each, scm_string_for_each_index,
1462 scm_string_filter, scm_string_delete): Use scm_t_trampoline_1 for
1463 procedures called in loops.
1464
126c81db
KR
14652005-08-02 Kevin Ryde <user42@zip.com.au>
1466
1467 * strports.c (st_flush): Increase buffer by 1.5x when growing, to
1468 avoid lots of copying where previoulsy growing by only 80 bytes at a
1469 time.
1470
7f278dc6
MV
14712005-08-01 Marius Vollmer <mvo@zagadka.de>
1472
1473 * modules.h, modules.c (scm_eval_closure_module): Removed, we
1474 already have scm_lookup_closure_module, which does the same thing.
1475
cb5c4b07
MV
14762005-08-01 Marius Vollmer <mvo@zagadka.de>
1477
1478 New marking algorithm for weak hashtables that fixes the problem
1479 that references from the non-weak value to the associated weak
1480 key (for example) would prevent the entry from ever being dropped.
1481
1482 Guardians have been changed back to their original semantics and
1483 are no longer greedy and no longer drop cycles.
1484
1485 * gc-mark.c (scm_mark_all): Do not rely on hooks to run the weak
1486 hashtable and guardian machinery but call the relevant functions
1487 directly.
1488
1489 * guardians.h, guardians.c, deprecated.h,
1490 deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
1491 scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
1492 Deprecated and moved into deprecated.[ch].
1493
1494 * guardians.h, guardians.c: Mostly rewritten.
1495 (scm_i_init_guardians_for_gc,
1496 scm_i_identify_inaccessible_guardeds,
1497 scm_i_mark_inaccessible_guardeds): New.
930888e8 1498 (scm_make_guardian): Removed greedy_p argument.
cb5c4b07
MV
1499
1500 * weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
1501 (SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
1502 (SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
1503 (scm_weaks_prehistory): Removed.
1504 (scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
1505 scm_i_mark_weak_vectors_non_weaks,
1506 scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
1507 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
1508 scm_scan_weak_vectors): Removed.
1509
1510 * hashtab.h (scm_i_scan_weak_hashtables): New.
1511 * hashtab.c (make_hash_table, scm_i_rehash): Do not use
1512 SCM_WVECTF_NOSCAN.
1513 (hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
1514 t->n_items.
1515 (scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
1516 to latter. Do not scan the alists themselves, this is done by the
1517 weak vector code now. Just update the element count.
1518
1519 * vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
1520 to latter. The type is now only part of the cell word.
1521 (SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
1522
1523 * init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
1524
3e2073bd
MD
15252005-07-18 Mikael Djurfeldt <mdj@d14n36.pdc.kth.se>
1526
1527 Some changes towards making it possible to run Guile on the EM64T
1528 platform.
1529
1530 * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are
1531 mallocating for (unsigned long *bounds).
1532
1533 * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to
1534 scm_t_bits before storing them in the type word.
1535
1536 * gc.c (tag_table_to_type_alist): Modified type of c_tag from
1537 scm_t_bits to int.
1538
e8ac8e75
KR
15392005-07-12 Kevin Ryde <user42@zip.com.au>
1540
1541 * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and
1542 SCM_IDISTMAX, and cast uints through scm_t_bits to make gcc happy.
1543 * pairs.c (scm_error_pair_access): Use scm_from_locale_string rather
1544 than scm_makfrom0str.
1545 Reported by Ken Raeburn.
1546
1547 * gc-card.c (scm_dbg_gc_get_bvec): Change return from long* to
1548 scm_t_c_bvec_long*, gcc 4 doesn't like different pointer targets when
1549 returning SCM_GC_CARD_BVEC.
1550
1551 * pairs.c (scm_error_pair_access): Plain ascii ' in error message
1552 rather than latin-1 acute accent, the latter may not print on all
1553 terminals.
1554
1555 * srfi-13.c (scm_string_filter, scm_string_delete): Strip leading and
1556 trailing deletions, so as to return a substring if those are the only
1557 changes.
1558
adc0677d
KR
15592005-07-10 Kevin Ryde <user42@zip.com.au>
1560
1561 * socket.c (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
1562 for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
1563 (scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
1564 scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
1565
8fecbb19
HWN
15662005-07-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
1567
1568 * gc-card.c (scm_i_card_statistics): init tag.
1569
1570 * gc.c (tag_table_to_type_alist): check type of tag. Should be integer.
1571
fc9c5d06
HWN
15722005-06-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
1573
8fecbb19
HWN
1574 * fports.c (s_scm_open_file): add the b flag for binary to the doc
1575 string.
fc9c5d06 1576
08fce816
KR
15772005-06-25 Kevin Ryde <user42@zip.com.au>
1578
1579 * srfi-13.c (scm_string_filter, scm_string_delete): Partial revert
1580 last change, use plain copy-on-write substrings, the individual
1581 descriptions in the srfi don't mention shared storage (only the
1582 introduction does).
1583
1584 * strings.c (scm_take_locale_stringn): Use realloc to make room for
1585 null-terminator, rather than mallocing a whole new block.
1586 (scm_take_locale_string): Use scm_take_locale_stringn len==-1.
1587
fc4abd0e
MV
15882005-06-12 Marius Vollmer <mvo@zagadka.de>
1589
e3da8a30
MV
1590 * ramap.c (scm_array_index_map_x): First test for real arrays,
1591 then check for generalized vectors. This ensures that the
1592 generalized vector case need only work with zero-origin ranges.
12097c77
MV
1593 (scm_ra_eqp, scm_ra_compare): Use the new array handle functions
1594 to access the target array, making these functions work with all
1595 kinds of arrays, not just bit arrays.
e3da8a30 1596
fc4abd0e
MV
1597 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
1598 gh_list.c, gh_predicates.c: Deprecated everything.
1599
1600 * environments.c (environment_default_folder,
1601 environment_default_observer): Do not use gh_call3, gh_call1.
1602
e4da0740
HWN
16032005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
1604
1605 * modules.c (s_scm_eval_closure_module): new function. Return the
1606 module inside an eval-closure.
1607
1608 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
1609 table. This means that procedure properties are GC'd if the
1610 procedure dies.
1611
27667158
KR
16122005-06-11 Kevin Ryde <user42@zip.com.au>
1613
1614 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
1615 charset cases, count chars kept and build a string in a second pass,
1616 rather than using a cons cell for every char kept. Use a shared
1617 substring when nothing removed (such sharing is allowed by the srfi).
1618
8a00ba71
HWN
16192005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
1620
1621 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
1622 string, so live object stats can be sorted with string<?.
1623
a677679f
MV
16242005-06-06 Marius Vollmer <mvo@zagadka.de>
1625
2ff668b0
MV
1626 * print.c (iprin1): When writing a string, collect all characters
1627 that can be printed directly into one call to scm_lfwrite.
1628 Previously, every character was output with its own call to
1629 write(2) on unbuffered ports.
1630
589f22f6
MV
1631 * eval.c (scm_eval_options_interface): Use
1632 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
1633 and SCM_CRITICAL_SECTION_END.
1634
a677679f
MV
1635 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
1636 check for generalized vectors. This ensures that the generalized
1637 vector case need only work with zero-origin ranges.
1638
f8cda9ee
KR
16392005-06-06 Kevin Ryde <user42@zip.com.au>
1640
1641 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
1642 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
1643 matched.
1644
cdac1be4
MV
16452005-06-05 Marius Vollmer <mvo@zagadka.de>
1646
6642f7ac
MV
1647 * eval.c: Added comment on how to make case 1.1 of
1648 r5rs_pitfall.test succeed.
1649
cdac1be4
MV
1650 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
1651
1652 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
1653
1654 * socket.c: Remove obsolete comment about socklen_t.
1655 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
1656
1657 * numbers.h (isnan)[__MINGW32__]: Remove.
1658
1659 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
1660 DEFAULT_INCLUDES when cross compiling.
1661
1662 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
1663
a677679f 1664 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
cdac1be4
MV
1665 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
1666 from Jan's patch.)
1667
9e664475
MV
16682005-05-22 Marius Vollmer <mvo@zagadka.de>
1669
188d0c5e
MV
1670 * unif.c (scm_make_shared_array): Add old base to new base since
1671 scm_array_handle_pos does not include the base.
1672 (scm_aind): Likewise.
1673
9e664475
MV
1674 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
1675 output port.
1676
5a6d139b
NJ
16772005-05-12 Neil Jerram <neil@ossau.uklinux.net>
1678
1679 Mac OS X compile warning fixes, reported by Richard Todd.
1680
1681 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
1682 that it is signed.
1683
1684 * strports.c (st_resize_port): Add unsigned char cast.
1685 (scm_mkstrport): Make read/write_buf cast unsigned.
1686
1687 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
1688
1689 * rdelim.c (scm_read_line): Initialize slen.
1690
1691 * load.c (scm_search_path): Remove weird >=1, and add
1692 parentheses to clarify conditions.
1693
1694 * hash.c (scm_hasher): Add const unsigned char cast.
1695
1696 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
1697
b01532af
NJ
16982005-05-11 Neil Jerram <neil@ossau.uklinux.net>
1699
9a5fa6e9 1700 Fix C99isms reported by Ludovic Courtès:
b01532af
NJ
1701
1702 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
1703 code.
1704
1705 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
1706 of code.
1707
1708 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
1709 of code.
1710 (scm_i_card_statistics): Add block for declarations of tag_as_scm
1711 and current.
1712
229a0710
NJ
17132005-05-10 Neil Jerram <neil@ossau.uklinux.net>
1714
1715 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
1716 compile warning reported by Werner Scheinast.
1717
645dd3fc
HWN
17182005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
1719
80038021
HWN
1720 * list.h: remove scm_list()
1721
645dd3fc
HWN
1722 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
1723 SCM_DEBUG_CELL_ACCESSES
1724 (FLUID_NEXT_LOC): idem.
1725
9a68a4a8
KR
17262005-04-30 Kevin Ryde <user42@zip.com.au>
1727
1728 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
1729 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
1730 zero when re==0 and im<0. Reported by Jean Crepeau.
1731
0640cdaa
KR
17322005-04-25 Kevin Ryde <user42@zip.com.au>
1733
1734 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
4d54ee35
KR
1735 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
1736 few sensible uses (like filling with a random number generator say),
1737 but has been allowed in the past and so should be kept.
0640cdaa 1738
c0b85e9c
KR
17392005-04-23 Kevin Ryde <user42@zip.com.au>
1740
1741 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
1742 scm_hash_fn_remove_x.
1743
1744 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
1745 the caller when cons* is reached through apply.
1746
1747 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
1748 list is called using apply, under the debugging evaluator.
1749 (scm_list): Remove.
1750
c51682b4
KR
1751 * list.c, list.h (scm_make_list): New code, moving make-list from
1752 boot-9.scm.
8cb2eff8 1753
c0575bde
KR
17542005-04-14 Kevin Ryde <user42@zip.com.au>
1755
1756 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
1757 converted from scheme code in boot-9.scm.
1758
47a298d9
KR
17592005-04-11 Kevin Ryde <user42@zip.com.au>
1760
1761 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
1762 Validate list argument, scm_string_append and scm_string_append_shared
1763 don't do that to their rest argument (in a normal build).
1764
8ea3dc2e
MV
17652005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1766
1767 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
1768 closure can not be stored since it is no longer valid at GC time.
1769 (make_hash_table): Initialize 'hash_fn' field.
1770 (scm_i_rehash): Only store hash_fn in hash table when closre is
1771 NULL.
1772 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
1773 non-NULL. Always use a NULL closure.
1774 (scm_hash_fn_create_handle_x): Also rehash when table contains too
1775 few entries.
1776
08d2020d
MV
17772005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1778
1779 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
1780 argument; always use scm_delq_x. The delete_fn function works on
1781 the handle, not the key, and it therefore makes no sense to make
1782 it configurable. Changed all callers.
1783 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
1784 (scm_hash_clear): Accept plain vectors as hashtables.
1785 (scm_delx_x): Removed.
1786
cb975c21
HWN
17872005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
1788
1789 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
1790 compatibility with gcc -std=c99.
1791
4c908f2c
MD
17922005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1793
1794 * async.h (scm_mask_ints): Removed left over reference to
1795 scm_root.
1796
1797 * threads.c: Removed fprintf debug statements.
1798
d193b04b
NJ
17992005-03-24 Neil Jerram <neil@ossau.uklinux.net>
1800
1801 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
1802
c29748cd
NJ
18032005-03-23 Neil Jerram <neil@ossau.uklinux.net>
1804
1805 * debug.c (scm_make_memoized): Remove unnecessary critical
1806 section, and simplify by using SCM_RETURN_NEWSMOB.
1807
e654b062
MD
18082005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1809
1810 * strings.h (SCM_STRING_UCHARS): Added missing argument.
1811
4bc6f1c6
KR
18122005-03-18 Kevin Ryde <user42@zip.com.au>
1813
1814 * arbiters.c (FETCH_STORE) [generic C]: Should be
9a5fa6e9 1815 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
4bc6f1c6 1816
f1531813
KR
18172005-03-13 Kevin Ryde <user42@zip.com.au>
1818
1819 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
1820 srfi-60.
1821
1822 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
1823 because OR-ing bits into a negative can reduce the value to an inum.
1824
1825 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
1826 casting inum to double since that can lose precision.
1827
a9fae247
MV
18282005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1829
1830 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
1831 (guilify_self_1): Initialize it.
1832
1833 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
1834 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
1835 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
1836 field.
1837 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
1838 recursively.
1839 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
1840 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
1841 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
1842 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
1843 scm_after_gc_c_hook here.
1844 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
1845 scm_after_gc_c_hook when a full GC has in fact been performed.
1846 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
1847
1848 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
1849 scm_gc_heap_lock.
1850
1851 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
1852 scm_gc_running_p while the scm_i_sweep_mutex is locked.
1853
1854 * inline.h (scm_cell, scm_double_cell): Do not check
1855 scm_gc_running_p, allocation during sweeping is OK.
1856
1857 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
1858 not set scm_block_gc.
1859
1860 * init.c (scm_i_init_guile): Do not set scm_block_gc.
1861
1862 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
1863 instead of scm_malloc. The latter can not be used during GC.
1864
d1c38e11
MV
18652005-03-09 Marius Vollmer <mvo@zagadka.de>
1866
1867 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
1868 years.
1869
99ec43c1
MV
18702005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1871
1872 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
1873 scm_gc_running_p. Sweeping can happen in parallel with
1874 allocation.
1875
1876 * inline.h: Updated comments for current threading implementation.
1877
1878 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
1879 (scm_i_thread): Removed unused signal_asyncs field.
1880 (threads_mark): Do not mark it.
1881 (guilify_self_1): Do not initialize it. Do initialize
1882 continuation_root field.
1883 (do_thread_exit): Do not remove thread from all_threads list.
1884 (on_thread_exit): Do it here, after leaving guile mode.
1885 (sleep_level): Removed.
1886 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
1887 returning. Do not support recursive sleeps.
1888 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
1889 entry. Do not support recursive sleeps.
1890
1891 * fluids.c (ensure_state_size, ensure_all_state_sizes,
1892 resize_all_states): Collapsed ensure_state_size and
1893 ensure_all_state_sizes into one function named resize_all_states.
1894 Allocate new vectors outside of single threaded region. Do only
1895 simple things inside that region.
1896 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
1897 while adding to the global lists.
1898
1899
461f34aa
MV
19002005-03-08 Marius Vollmer <mvo@zagadka.de>
1901
1902 libltdl is no longer distributed. We expect it to be installed
1903 already.
1904
1905 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
1906 (libguile_la_LIBADD): Removed @LIBLTDL@.
1907
4e047c3e
MV
19082005-03-07 Marius Vollmer <mvo@zagadka.de>
1909
1910 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
1911 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
1912 they also block/unblock execution of asyncs and call
1913 scm_async_click which is declared in async.h but threads.h can not
1914 include async.h since async.h already includes threads.h.
1915 (scm_i_critical_section_level): New, for checking mistakes in the
1916 use of the SCM_CRITICAL_SECTION_* macros.
1917 (scm_i_critical_section_mutex): Make it a recursive mutex so that
1918 critical sections can be nested.
1919
1920 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
1921 not zero.
1922
1923 * threads.h, threads.c (scm_frame_lock_mutex): New.
1924 (scm_frame_critical_section): Take mutex as argument.
1925 (framed_critical_section_mutex): New, used as default for above.
1926 (scm_init_threads): Initialize it.
1927 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
1928 scm_i_critical_section_mutex; both are initialized statically.
1929
1930 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
1931 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
1932 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
1933 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
1934
1935 * debug.c (scm_debug_options): Replace
1936 SCM_CRITICAL_SECTION_START/END with a frame and
1937 scm_frame_critical_section.
1938
1939 * continuations.c (scm_make_continuation): No longer a critical
1940 section.
1941 (scm_dynthrow): Abort when scm_i_critical_section_level is
1942 not zero.
1943
d0a45bff
MV
19442005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1945
db6673e5
MV
1946 * threads.c (scm_try_mutex): Renamed argument for consistency.
1947
d0a45bff
MV
1948 * root.c (scm_call_with_dynamic_root): New docstring.
1949
1950 * eval.c: Define _GNU_SOURCE.
1951
9de87eea
MV
19522005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1953
1954 Big merge from the mvo-thread-cleanup branch. The main changes
1955 are:
1956
1957 - The dynamic roots functionality has been split into dynamic
1958 states and continuations barriers. Fluids have been
1959 reimplemented and can now be garbage collected.
1960
1961 - Initialization of Guile now works in a multi-thread friendly
1962 manner. Threads can freely enter and leave guile mode.
1963
1964 - Blocking on mutexes or condition variables or while selecting
1965 can now be reliably interrupted via system asyncs.
1966
1967 - The low-level threading interface has been removed.
1968
1969 - Signals are delivered via a pipe to a dedicated 'signal delivery
1970 thread'.
1971
1972 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
1973
1974 * throw.c (scm_handle_by_message): Exit only the current thread,
1975 not the whole process.
1976 (scm_handle_by_message_noexit): Exit when catching 'quit.
1977
1978 * scmsigs.c (take_signal, signal_delivery_thread,
1979 start_signal_delivery_thread, ensure_signal_delivery_thread,
1980 install_handler): Reimplemented signal delivery as explained in
1981 the comments.
1982
1983 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
1984 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
1985 scm_i_sched_yield, scm_i_pthread_sigmask,
1986 SCM_I_PTHREAD_MUTEX_INITIALIZER,
1987 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
1988 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
1989 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
1990 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
1991 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
1992 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
1993 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
1994 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
1995 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
1996 scm_i_pthread_key_create, scm_i_pthread_setspecific,
1997 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
1998 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
1999 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
2000 when using pthreads.
2001 * null-threads.c, null-threads.h: Provide dummy definitions for
2002 the above symbols when not using pthreads.
2003
2004 * modules.h, modules.c (scm_frame_current_module): New.
2005
2006 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
2007 instead of scm_internal_dynamic_wind.
2008
2009 * init.h, init.c (restart_stack, start_stack): Removed.
2010 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
2011 (scm_boot_guile_1): Removed.
2012 (scm_i_init_mutex): New.
2013 (really_cleanup_for_exit, cleanup_for_exit): New.
2014 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
2015 Moved around some init funcs. Call
2016 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
2017 with atexit.
2018
2019 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
2020 Use "!scm_is_eq" instead of "!=".
2021
2022 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
2023 SCM_USE_COOP_THREADS): Removed.
2024
2025 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
2026 maintained. Unlock scm_i_sweep_mutex before running
2027 scm_after_gc_c_hook.
2028 (scm_permanent_object): Allocate outside of critical section.
2029 (cleanup): Removed.
2030
2031 * fluids.h, fluids.c: Reimplemented completely.
2032 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
2033 SCM_FAST_FLUID_SET): Reimplemented as functions.
2034 (scm_is_fluid): New.
2035 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
2036 (scm_make_dynamic_state, scm_dynamic_state_p,
2037 scm_is_dynamic_state, scm_current_dynamic_state,
2038 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
2039 scm_c_with_dynamic_state, scm_with_dynamic_state,
2040 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
2041
2042 * feature.c (progargs_fluid): New.
2043 (scm_program_arguments, scm_set_program_arguments): Use it instead
2044 of scm_progargs.
2045 (scm_init_feature): Allocate it. Also, only add "threads" feature
2046 when SCM_USE_PTHREAD_THREADS is true.
2047
2048 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
2049 scm_make_rec_mutex, with all the consequences.
2050 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
2051 scm_internal_dynamic_wind. Handle dynamic states as second
2052 argument.
2053
2054 * threads.h, threads.c (scm_internal_select): Renamed to
2055 scm_std_select and discouraged old name.
2056 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
2057 and scm_std_usleep.
2058 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
2059 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
2060 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
2061 SCM_THREAD_DATA): Removed.
2062 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
2063 (scm_i_thread): New.
2064 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2065 Use scm_assert_smob_type.
2066 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
2067 scm_thread_self, scm_thread_yield, scm_mutex_init,
2068 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
2069 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
2070 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
2071 scm_cond_init, scm_cond_destroy, scm_cond_wait,
2072 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
2073 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
2074 scm_thread_select): Removed. Replaced with scm_i_pthread
2075 functions as appropriate.
2076 (scm_in_guile, scm_outside_guile): Removed.
2077 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
2078 take a ticket.
2079 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
2080 New.
2081 (scm_i_frame_single_threaded): New.
2082 (scm_init_threads_default_dynamic_state): New.
2083 (scm_i_create_thread): Removed.
2084 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
2085 (scm_make_recursive_mutex): New.
2086 (scm_frame_critical_section): New.
2087 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
2088 latter, changed all uses.
2089 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
2090 scm_i_set_last_debug_frame): New, use them instead of scm_root
2091 stuff.
2092 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
2093 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
2094 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
2095 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
2096 (remqueue): Allow the removal of already removed cells. Indicate
2097 whether a real removal has happened.
2098 (scm_thread): Removed, replaced with scm_i_thread.
2099 (make_thread, init_thread_creatant): Removed.
2100 (cur_thread): Removed.
2101 (block_self, unblock_from_queue): New.
2102 (block, timed_block, unblock): Removed.
2103 (guilify_self_1, guilify_self_2, do_thread_exit,
2104 init_thread_key_once, init_thread_key,
2105 scm_i_init_thread_for_guile, get_thread_stack_base,
2106 scm_init_guile): New initialisation method.
2107 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
2108 thread creation.
2109 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
2110 "fair" to fat and implemented new semantics, including reliable
2111 interruption.
2112 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
2113 (scm_threads_mark_stacks): Explicitly mark handle.
2114 (scm_std_select): Allow interruption by also selecting on the
2115 sleep_pipe.
2116 (scm_i_thread_put_to_sleep): Handle recursive requests for
2117 single-threadedness.
2118 (scm_threads_prehistory, scm_init_threads): Put current thread
2119 into guile mode via guileify_self_1 and guileify_self_2,
2120 respectively.
2121
2122 * fluid.h (SCM_FLUIDP): Deprecated.
2123
2124 * coop-threads.c: Removed.
2125
2126 * continuations.h, continuations.c (scm_with_continuation_barrier,
2127 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
2128 New.
2129
2130 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
2131 (async_mutex): New.
2132 (scm_async_click): Protected with async_mutex. Do not deal with
2133 signal_asyncs, which are gone. Set cdr of handled async cell to
2134 #f.
2135 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
2136 current sleep.
2137 (scm_system_async_mark_for_thread): Do not use scm_current_thread
2138 since that might not work during early initialization.
2139
2140 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
2141 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
2142 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
2143 and SCM_CRITICAL_SECTION_END.
2144 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
2145 SCM_CRITICAL_SECTION_START/END.
2146
2147 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
2148 (libguile_la_SOURCES): Added null-threads.c
2149 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
2150 threads-plugin.c.
2151 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2152
2153 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
2154 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
2155 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
2156 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
2157 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
2158 scm_make_root): Removed or deprecated. Replaced with references
2159 to the current thread, dynamic state, continuation barrier, or
2160 some fluid, as appropriate.
2161 (root_mark, root_print): Removed.
2162 (scm_internal_cwdr): Reimplemented guts with
2163 scm_frame_current_dynamic_state and
2164 scm_i_with_continuation_barrier.
2165 (scm_dynamic_root): Return current continuation barrier.
2166
2167
ad3d5a65
MV
21682005-02-28 Marius Vollmer <mvo@zagadka.de>
2169
2170 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
2171 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
2172 cleanliness.
2173 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
2174 IP_DROP_MEMBERSHIP.
2175 Thanks to Greg Troxel!
2176
73a90115
MD
21772005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2178
2179 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
2180 block.
2181
5d2cb3ab
MV
21822005-02-25 Marius Vollmer <mvo@zagadka.de>
2183
2184 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
2185 so that no two weak alist vectors share a spine.
2186 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
2187 during GC before inserting the new alist cell.
2188
838c4126
MV
21892005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2190
2191 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
2192 the hashtable.
2193 (scm_hash_fn_create_handle_x): Likewise.
2194 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2195
29fed193
MD
21962005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2197
2198 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
2199 the prototypical examples mentioned in the old reference manual.
2200 Instead keep the old semantics of dispatching on type. (Yes, this
2201 is extremely ugly, but the whole point of keeping the deprecated
2202 interface is not to break old code.)
2203
9cc49060
MD
22042005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2205
2206 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
2207 scm_i_array_dims.
2208
8447f463
KR
22092005-01-28 Kevin Ryde <user42@zip.com.au>
2210
2211 * numbers.c (scm_ash): Rewrite using shifts, much faster than
2212 integer-expt and multiply/divide. Inexacts and fractions no longer
2213 supported (they happened to work before for left shifts, but not
2214 right). Don't really need inexacts and fractions, since ash is
2215 documented as a "bitwise operation", and all the rest of those only
2216 take exact integers.
2217
1367aa5e
HWN
22182005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2219
856fca7e
HWN
2220 * gc-card.c (scm_i_card_statistics): map structs, closures and
2221 subrs to one tag.
2222
1367aa5e 2223 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 2224 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
2225
2226 * gc-segment.c (scm_i_all_segments_statistics): new function.
2227 (scm_i_heap_segment_statistics): new function
2228
2229 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
2230 statistics on the number of live objects of each type.
2231
2232 * gc-card.c (scm_i_tag_name): new function.
2233 (scm_i_card_statistics): new function.
2234
333db3b8
KR
22352005-01-24 Kevin Ryde <user42@zip.com.au>
2236
2237 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
2238 POSIX and C99 don't document errno being set. Reported by Bruno
2239 Haible.
2240 (scm_flock): Update docstring from manual.
2241
8447f463
KR
2242 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
2243 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
2244 a 64-bit system.
2245
2246 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
2247 sa_handler, needs to be a long on 64-bit systems where int is only 32
2248 bits.
2249
88f59e53
MV
22502005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2251
0eeb2611
MV
2252 * environments.c (obarray_enter, obarray_replace): Call
2253 SCM_HASHTABLE_INCREMENT when adding a new entry.
2254
88f59e53
MV
2255 * objects.c: Include goops.h for the scm_class_of prototype.
2256
2257 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
2258 sizes to be smaller than the maximum lengths of vectors.
2259
219b2868
MV
22602005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2261
2262 * ports.c, smob.c: Include "libguile/goops.h".
2263
2264 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
2265 scm_class_char, scm_class_pair, scm_class_procedure,
2266 scm_class_string, scm_class_symbol,
2267 scm_class_procedure_with_setter, scm_class_primitive_generic,
2268 scm_class_vector, scm_class_null, scm_class_real,
2269 scm_class_complex, scm_class_integer, scm_class_fraction,
2270 scm_class_unknown, scm_port_class, scm_smob_class,
2271 scm_no_applicable_method, scm_class_of): Moved from objects to
2272 goops since they are only useable once goops has been loaded.
2273 (scm_classes_initialized): Removed.
2274 (scm_class_of): Do not check it.
2275 (create_standard_classes): Do not set it.
2276
009c6b9c
MV
22772005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2278
50472546
MV
2279 * objects.h, objects.c (scm_classes_initialized): New.
2280 (scm_class_of): Signal error when scm_classes_initialized is zero.
2281 * goops.c (create_standard_classes): Set scm_classes_initialized
2282 to one.
2283
009c6b9c
MV
2284 * random.c (scm_random_solid_sphere_x): Use
2285 scm_c_generalized_vector_length instead of
2286 scm_uniform_vector_length.
2287
7719cbe9
MV
22882005-01-16 Marius Vollmer <mvo@zagadka.de>
2289
2290 * script.c (scm_compile_shell_switches): Removed debugging output.
2291
1ec44fed
KR
22922005-01-15 Kevin Ryde <user42@zip.com.au>
2293
2294 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
2295 docstrings from manual.
2296 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
2297
6e4cd850
MV
22982005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2299
0b5a0521
MV
2300 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
2301 its value.
2302
2303 Implement u64 and s64 uniform numeric vectors with bignums when
2304 scm_t_uint64 and scm_t_int64 are not available.
2305
2306 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
2307 scm_array_handle_u64_elements,
2308 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
2309 scm_u64vector_writable_elements): Do not define when scm_t_uint64
2310 is not available.
2311 (scm_take_s64vector, scm_array_handle_s64_elements,
2312 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
2313 scm_s64vector_writable_elements): Likewise for scm_t_int64.
2314 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
2315 scm_t_int64/scm_t_uint64 are not available.
2316 (uvec_mark): New, to mark the bignums.
2317 (alloc_uvec): Initialize bignums.
2318 (uvec_fast_ref): Return bignums directly.
2319 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
2320 assert_exact_integer): New.
2321 (uvec_fast_set): Use them to validate the bignums.
2322 (scm_init_srfi_4): Set mark function of smob when needed.
2323 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
2324 scm_int64_max.
2325
6e4cd850
MV
2326 Recognize 1.4 -e syntax.
2327
2328 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
2329 (scm_compile_shell_switches): Use them to recognize and convert
2330 1.4 "-e" syntax.
2331
3b698afe
MV
23322005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2333
2334 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
2335 deprecated features that once were macros but are now functions
2336 back into macros.
2337
d6dc83a9
MV
23382005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2339
49086691
MV
2340 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
2341 * deprecation.c (scm_issue_deprecation_warning,
2342 scm_c_issue_deprecation_warning_fmt): Use it.
2343 (mode): Removed.
2344 (print_summary): New.
2345 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
2346 mode.
2347
d6dc83a9
MV
2348 Deprecated SCM_ARRAY* macros.
2349
2350 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
2351 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
2352 version. Changed all uses.
2353 (scm_tc16_array, scm_i_tc16_array,
2354 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
2355 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
2356 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
2357 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
2358 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
2359 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
2360 SCM_ARRAY_V, SCM_I_ARRAY_V,
2361 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
2362 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
2363 scm_t_array, scm_i_t_array): Likewise.
2364 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
2365 Moved from unif.h to unif.c.
2366 (scm_c_array_rank): New.
2367 (scm_array_rank): Reimplement using it.
2368
2369 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
2370 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
2371 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
2372
dc91d8de
MV
23732005-01-11 Marius Vollmer <mvo@zagadka.de>
2374
2375 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
2376 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
2377 scm_c_generalized_vector_ref and scm_cvref, and
2378 scm_c_generalized_vector_set_x, respectively.
2379 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
2380 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
2381
2382 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
2383 former to latter and made public. Changed all uses.
2384 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
2385 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
2386 (scm_i_shap2ra): New internal version of scm_shap2ra.
2387 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
2388 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
2389 (scm_ra_set_contp): Deprecated, changed all uses to
2390 scm_i_ra_set_contp.
2391 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2392
66d33784
MV
23932005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2394
b06f099d
MV
2395 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
2396 Trotts!
2397
5d35ad81
MV
2398 * unif.c (scm_list_to_typed_array): Allow the specification of the
2399 upper bound as well. This is needed for empty arrays.
2400 (l2ra): Give needed number of elements in error message.
2401 (scm_i_print_array): Print length information for arrays that need
2402 it.
2403 (scm_i_read_array): Parse it.
2404
66d33784
MV
2405 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
2406 scm_i_object_chars, scm_i_object_length): Brought back from the
2407 dead.
2408
d7d7d401
MV
24092005-01-10 Marius Vollmer <mvo@zagadka.de>
2410
74c58fce
MV
2411 * ramap.c: Replaced single-index uses of scm_array_set_x with
2412 scm_c_generalized_vector_set_x.
2413
d7d7d401
MV
2414 * unif.c (scm_array_rank, scm_array_dimensions,
2415 scm_shared_array_offset, scm_shared_array_increments,
2416 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
2417 to simplify code and make it more general.
2418 (scm_shared_array_root): Work with all kinds of arrays, including
2419 naked vectors.
2420 (indices_to_pos): New.
74c58fce
MV
2421 (scm_make_shared_array): Use it instead of scm_aind; use handle
2422 for oldra.
2423
4475d3fe
KR
24242005-01-10 Kevin Ryde <user42@zip.com.au>
2425
2426 * posix.c (scm_mkstemp): Update docstring from manual.
2427
d3ddc95e
KR
2428 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
2429
8c8491f5
MV
24302005-01-09 Marius Vollmer <mvo@zagadka.de>
2431
b89ecc6f
MV
2432 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
2433 scm_i_uniform_vector_set_proc): New.
2434 (u8ref, u8set, s8ref, s8set, etc): New.
2435 (uvec_reffers, uvec_setters): New.
2436 (uvec_to_list): Use generic scm_array_handle_ref instead of
2437 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
2438 (coerce_to_uvec, scm_c_uniform_vector_ref,
2439 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
2440
2441 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
2442 New.
2443 (scm_t_array_handle): Added ref, set, elements and
2444 writable_elements for fast inline operation of
2445 scm_array_handle_ref and scm_array_handle_set.
2446 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
2447 and replaced with inline code that simply calls the ref/set
2448 members of the handle.
2449 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
2450 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
2451 New.
2452 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
2453 and memoize_set.
2454 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
2455 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
2456 scm_bit_invert_x): Correctly multiply index with increment in the
2457 general case.
2458
8c8491f5
MV
2459 * unif.c (scm_array_handle_set): Correctly execute only one
2460 alternative. D'Oh!
2461 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
2462 the array; this covers all cases with much simpler code.
2463
2464 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
2465 as well.
2466
cd5d55c7
MV
24672005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2468
2469 * srfi-4.c (uvec_type): New.
2470 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
2471 scm_c_uniform_vector_x): Use it to get concrete type.
2472
2473 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
2474 fit the docs.
2475
2476 * unif.c (ra2l): Handle zero rank arrays.
2477 (scm_i_print_array): Print zero rank arrays specially.
2478 (tag_to_type): Return #t for an empty tag, not the empty symbol.
2479 (scm_i_read_array): Allow zero rank arrays.
2480
a4aad74e
MV
24812005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2482
2483 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
2484 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
2485 and SCM_SET_HASHTAB_BUCKET.
2486
2487 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
2488 Removed ref_stack field.
2489 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
2490 of a print state. Use them everywhere instead of ref_stack.
2491
3a40d5e1
MV
2492 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
2493
a4aad74e
MV
2494 * srfi-4.c: Include deprecation.h.
2495
2496 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
2497 deprecated.c, eq.c
2498 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
2499 (scm_vector_elements, scm_vector_writable_elements,
2500 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
2501 unif.[hc].
2502 (SCM_SIMPLE_VECTOR_LOC): Removed.
2503 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
2504 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
2505 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
2506 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
2507 latter. Changed use in eq.c.
2508
f01fe441
MV
25092005-01-07 Marius Vollmer <mvo@zagadka.de>
2510
2511 Make the uniform vector routines also deal with one dimensional
2512 arrays.
2513
2514 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
2515 SCM_SMOB_PREDICATE in this file.
2516 (is_uvec): Also recognize one-dimensional uniform numeric arrays
2517 of the right type.
2518 (scm_is_uniform_vector): Likewise.
2519 (uvec_fast_ref): Made BASE param const.
2520 (uvec_writable_elements, uvec_elements): New.
2521 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
2522 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
2523 scm_c_uniform_set_x): Use them to also deal with one-dimensional
2524 arrays.
2525 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
2526 argument convention.
2527 (scm_uniform_vector_to_list): Let uvec_to_list do all the
2528 checking.
2529 (scm_uniform_vector_length): Use uvec_length.
2530
2aaf5726
MV
25312005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2532
2533 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
2534 scm_c_uniform_vector_size): Removed.
2535 (scm_array_handle_uniform_element_size): New.
2536
2537
2538 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
2539 type of POS parameter to be signed, positions can be negative.
2540 (scm_array_handle_release): New, changed all uses of
2541 scm_t_array_handle to properly call it.
2542 (scm_vector_get_handle, scm_generalized_vector_get_handle):
2543 Renamed former to latter, changed all uses.
2544
34ae52fc
MV
25452005-01-05 Marius Vollmer <mvo@zagadka.de>
2546
2547 Updated bitvector routines to also use scm_t_array_handles.
2548
2549 * unif.h (scm_bitvector_elements,
2550 scm_bitvector_writable_elements): Use a scm_t_array_handle and
2551 deliver offset, length and increment to caller. Changed all uses.
2552 (scm_bitvector_release_elements,
2553 scm_frame_bitvector_release_elements,
2554 scm_bitvector_release_writable_elements,
2555 scm_frame_bitvector_release_writable_elements): Removed.
2556 (scm_array_handle_bit_elements,
2557 scm_array_handle_bit_writable_elements,
2558 scm_array_handle_bit_elements_offset): New.
2559 (scm_make_typed_array): The special value for non-initialized
2560 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
2561 was a valid value to fill bitvectors with, so it can't really be
2562 specialed out.
2563
c4cb7628
KR
25642005-01-04 Kevin Ryde <user42@zip.com.au>
2565
2566 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
2567 Reported by Bill Schottstaedt.
2568
0356881d
MV
25692005-01-02 Marius Vollmer <mvo@zagadka.de>
2570
2571 * sort.c (quicksort): Added INC parameter for non-contigous
2572 vectors.
2573 (quicksort1): New, for contigous vectors. Both functions are
2574 generated from the same code by including "quicksort.i.c".
2575 (scm_restricted_vector_sort_x): Call one of quicksort and
2576 quicksort1, depending on increment of vector.
2577 (scm_sort): Simply call scm_sort_x on a copy of the list or
2578 vector.
2579 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
2580 size_t, added inc parameter.
2581 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
2582 so that it doesn't leak.
2583 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
2584 list or vector.
2585
2586 * ramap.c (scm_array_map_x): Do not try to convert fill value
2587 before filling, any necessary conversion is done while storing.
2588
2589 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
2590 doing it inline.
2591
2592 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
2593 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
2594 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2595
2596 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
2597 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
2598 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
2599 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
2600 objects.c, ports.c, posix.c, print.c, random.c, read.c,
2601 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
2602 vector elements API or simple vector API, as appropriate. Removed
2603 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
2604 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2605
2606 * srfi-4.h, srfi-4.c,
2607 srfi-4.i.c (scm_array_handle_uniform_elements,
2608 scm_array_handle_uniform_writable_elements,
2609 scm_uniform_vector_elements,
2610 scm_uniform_vector_writable_elements):
2611 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
2612 scm_t_array_handle, deliver length and increment.
2613 (scm_array_handle_<foo>_elements,
2614 scm_array_handle_<foo>_writable_elements): New.
2615
2616 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
2617 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2618
2619 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
2620 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
2621 scm_array_handle_set, scm_array_handle_elements
2622 scm_array_handle_writable_elements, scm_vector_get_handle): New.
2623 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
2624 scm_dimensions_to_uniform_array): Deprecated for real.
2625 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
2626 snarfing wont allow a mismatch between C and Scheme arglists.
2627 (scm_make_shared_array, scm_enclose_array): Correctly use
2628 scm_c_generalized_vector_length instead of
2629 scm_uniform_vector_length.
2630
2631 * validate.h (SCM_VALIDATE_VECTOR,
2632 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
2633 of SCM_VECTORP.
2634
2635 * weaks.h, weaks.c: Use new internal weak vector API from
2636 vectors.h.
2637
2638 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
2639 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
2640 'extra' to being regular sources.
2641 (noinst_HEADERS): Added quicksort.i.c.
2642 * quicksort.i.c: New file.
2643
2644 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
2645 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
2646 and reimplemented. Replaced all uses with scm_vector_elements,
2647 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
2648 appropriate.
2649 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
2650 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
2651 SCM_SIMPLE_VECTOR_LOC): New.
2652 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
2653 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
2654 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
2655 Removed.
2656 (scm_vector_copy): New.
2657 (scm_vector_elements, scm_vector_writable_elements): Use
2658 scm_t_array_handle, deliver length and increment. Moved to
2659 unif.h. Changed all uses.
2660 (scm_vector_release_elements,
2661 scm_vector_release_writable_elements,
2662 (scm_frame_vector_release_elements,
2663 scm_frame_vector_release_writable_elements): Removed.
2664 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
2665 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
2666 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
2667 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
2668 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
2669 weak vectors.
2670
0336d18b
MV
26712004-12-29 Marius Vollmer <mvo@zagadka.de>
2672
2673 No longer use creators to specify the type of an array. Creators
2674 expose the fact that arrays are wrapped around vectors, but that
2675 might change.
2676
2677 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
2678 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
2679 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
2680 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
2681 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
2682 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
2683 uvec_proc_vars): Removed.
2684 (scm_i_generalized_vector_creator): Removed.
2685 (scm_i_generalized_vector_type): New.
2686
2687 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
2688 scm_make_typed_array, scm_array_type, scm_list_to_array,
2689 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
2690 (scm_array_creator): Removed.
2691 (scm_array_p): Deprecated second PROT argument.
2692 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
2693 Deprecated, reimplemented in terms of scm_make_typed_array and
2694 scm_list_to_typed_array.
2695 (scm_i_proc_make_vector, scm_i_proc_make_string,
2696 scm_i_proc_make_bitvector): Removed.
2697 (type_creator_table, init_type_creator_table, type_to_creator,
2698 make_typed_vector): New.
2699 (scm_i_convert_old_prototype): Removed.
2700 (prototype_to_type): New.
2701 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
2702 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
2703 minor added clarity.
2704 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
2705 instead of scm_make_uve.
2706 (tag_creator_table, scm_i_tag_to_creator): Removed.
2707 (tag_to_type): New.
2708 (scm_i_read_array): Use scm_list_to_typed_array instead of
2709 scm_list_to_uniform_array.
2710
277e8472
MV
27112004-12-27 Marius Vollmer <mvo@zagadka.de>
2712
32b26202
MV
2713 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
2714 (scm_bitvector_writable_elements): New.
2715 (scm_bitvector_release, scm_bitvector_release_elements):
2716 Renamed former to latter. Added explicit call to
2717 scm_remember_upto_here_1.
2718 (scm_frame_bitvector_release,
2719 scm_frame_bitvector_release_elements): Renamed former to latter.
2720 (scm_bitvector_release_writable_elements,
2721 scm_bitvector_release_writable_elements): New.
2722 Changed all uses as required by the changes above.
2723
2724 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
2725 scm_u8vector_elements, etc): Made return value "const".
2726 (scm_uniform_vector_writable_elements,
2727 scm_u8vector_writable_elements, etc): New.
2728 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
2729 Renamed former to latter. Added explicit call to
2730 scm_remember_upto_here_1.
2731 (scm_frame_uniform_vector_release,
2732 scm_frame_uniform_vector_release_elements): Renamed former to latter.
2733 (scm_uniform_vector_release_writable_elements,
2734 scm_frame_uniform_vector_release_writable_elements): New. Takes
2735 crown of longest identifier yet.
2736 Changed all uses as required by the changes above.
2737
277e8472
MV
2738 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
2739 void.
2740 (scm_is_vector, scm_vector_p, scm_vector_length,
2741 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
2742 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
2743 scm_vector_move_left_x, scm_vector_move_right_x,
2744 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
2745 (scm_vector_elements, scm_vector_release_elements,
2746 scm_vector_frame_release_elements, scm_vector_writable_elements,
2747 scm_vector_release_writable_elements,
2748 scm_vector_frame_release_writable_elements): New.
2749 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
2750 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
2751
2752 * ramap.c (scm_ramapc, scm_raeql): Use
2753 scm_c_generalized_vector_length instead of
2754 scm_uniform_vector_length.
2755 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
2756 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
2757
49c51610
MV
27582004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2759
2760 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
2761 member for relocating debug frames.
2762 (scm_make_continuation): Set it.
2763
2764 * stacks.c (read_frame, read_frames, scm_make_stack,
2765 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
2766 of continuations instead of calculating the offset ourselves.
2767 Relocate 'vect' member of scm_t_debug_frame.
2768
3b2ee265
KR
27692004-12-16 Kevin Ryde <user42@zip.com.au>
2770
2771 * ramap.c (scm_array_map_x): Check for at least one source argument.
2772
e120686a
KR
27732004-12-14 Kevin Ryde <user42@zip.com.au>
2774
2775 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
2776 the C code so for the final call to the predicate procedure is a tail
2777 call, per SRFI-13 spec.
2778
680b5237
KR
27792004-12-10 Kevin Ryde <user42@zip.com.au>
2780
2781 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
2782 recent revision to the reference manual.
2783
2784 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
2785 with "%", C99 says it's well-defined.
2786
2787 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
2788 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
2789 bother trying to fit scm_from_ulong, not really worth the trouble if
2790 addresses are more than 4 bytes usually.
2791
446d320c
KR
27922004-11-30 Kevin Ryde <user42@zip.com.au>
2793
2794 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
2795 arm32. Reported by Greg Troxel.
2796
f2654760
MV
27972004-11-14 mvo <mvo@zagadka.de>
2798
2799 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
2800
2801 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
2802
d550e35f
MV
28032004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2804
2805 Enclosed arrays are now their own smob. This has been done to
2806 make the code more explicit about them and to prepare for the time
f2654760
MV
2807 when generalized vectors include arbitrary one-dimensional
2808 arrays. (Uptonow, enclosed arrays have been recognized by their
2809 use of an array as their storage 'vector'. When all generalized
2810 vectors are allowed as storage, including one-dimensional arrays,
2811 this will no longer work.)
d550e35f
MV
2812
2813 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
2814 New.
2815 (exactly_one_third, singp): Removed.
2816 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
2817 scm_shared_array_offset, scm_shared_array_increments): Handle
2818 enclosed arrays explicitely.
2819 (scm_array_rank): Likewise. Also, do not return zero for
2820 non-arrays, signal an error instead since arrays with rank zero do
2821 exist.
2822 (scm_i_make_ra): New, for specifying the tag of the new array.
2823 (scm_make_enclosed_array): Use it.
2824 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
2825 (scm_make_shared_array): Use scm_c_generalized_vector_length
2826 instead of scm_uniform_vector_length.
2827 (scm_array_in_bounds_p): Rewritten to be much cleaner.
2828 (scm_i_cvref): New, doing the job of scm_cvref.
2829 (scm_cvref): Use scm_i_cvref.
2830 (scm_array_ref): Do not accept non-arrays when no indices are
2831 given. Use scm_i_cvref to do the actual access.
2832 ("uniform-array-set1"): Do not register.
2833 (scm_array_set_x, scm_uniform_array_read_x,
2834 scm_uniform_array_write): Handle enclosed arrays explicitly.
2835 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
2836 handle enclosed arrays.
2837 (scm_array_to_list): Handle enclosed arrays explicitly.
2838 (rapr1): Removed.
2839 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
2840 enclosed arrays.
2841 (scm_i_print_enclosed_array): New.
2842 (tag_proto_table, tag_creator_table): Renamed former to latter.
2843 Added "a" and "b" for strings and bitvectors, resp.
2844 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
2845 latter. Tag "a" is in the table now, no need to handle it as a
2846 legacy tag.
2847 (scm_raprin1): Just call scm_iprin1.
2848 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
2849 explicitly.
2850 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
2851 Use scm_i_print_array as printer for scm_tc16_array.
2852
2ed34885
MV
28532004-11-10 Marius Vollmer <mvo@zagadka.de>
2854
823086c1
MV
2855 * ramap.c (cind): Changed second arg to be pointer to long instead
2856 of uniform vector.
2857 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 2858 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
2859 (scm_array_index_map_x): Likewise.
2860
2861 * unif.c: Changed all uses of scm_array_prototype to
2862 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
2863 prototype is known.
2864 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
2865 in terms of scm_uniform_vector_read_x and
2866 scm_uniform_vector_write, respectively. Strings and
2867 bitvector support has been dropped.
2868
2ed34885
MV
2869 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
2870 needed files directly. Include config.h, <unistd.h> and <io.h>
2871 when available.
2872 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2873
2c72f253
MV
28742004-11-09 Marius Vollmer <mvo@zagadka.de>
2875
2876 * gh_data.c (gh_uniform_vector_length): Properly use
2877 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
2878
3cc0a296
MV
28792004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2880
2881 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
2882 New.
2883 (scm_i_uniform_vector_creator): Removed.
2884 (scm_i_generalized_vector_creator): New.
2885 (scm_uniform_vector_length, scm_uniform_element_size): Do not
2886 handle generalized vectors, only uniform numeric vectors.
2887 (alloc_uvec): Do length check here...
2888 (make_uvec): ...but not here.
2889 (coerce_to_uvec): Use new generalized vector functions to handle
2890 all kinds of vectors in one go.
2891
2892 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
2893 remaining scm_tc7_unused tags to get a neatly ordered list.
2894
2895 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
2896 longer handle scm_tc7_bvect bitvectors.
2897
2898 * ramap.c: Use the new generalized vector functions to handle all
2899 vector like things.
2900
2901 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
2902 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
2903 scm_generalized_vector_length, scm_generalized_vector_ref,
2904 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
2905 scm_is_generalized_vector, scm_c_generalized_vector_length,
2906 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
2907 New.
2908
2909 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
2910 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
2911 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
2912 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
2913 scm_c_bitvector_length, scm_c_bitvector_ref,
2914 scm_c_bitvector_set_x, scm_bitvector_elements,
2915 scm_bitvector_release, scm_frame_bitvector_release,
2916 scm_tc16_bitvector, bitvector_free, bitvector_print,
2917 bitvector_equalp, count_ones, find_first_one): New.
2918 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
2919 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
2920 using the new C API for bitvectors and maybe count_ones or
2921 find_first_one, as appropriate.
2922 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
2923 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
2924 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
2925 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
2926 new functions from above.
2927 (scm_i_proc_make_vector, scm_i_proc_make_string,
2928 scm_i_proc_make_bitvector): Made non-static for use in
2929 scm_i_generalized_vector_creator.
2930 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
2931 (scm_make_uve): Validate that the created object is a generalized
2932 vector.
2933 (scm_i_legacy_tag): Removed.
2934 (scm_i_print_array): Do it here.
2935 (scm_raprin1): Only print enclosed arrays.
2936
2937 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
2938
c24d026b
MV
29392004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2940
1f2328fe
MV
2941 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
2942 added portability.
2943
2944 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
2945 for "space". Thanks to Bruce Korb!
2946
c24d026b
MV
2947 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
2948 only after dest has been set. Thanks to Hyper Division!
2949
2950 * gh_data.c (gh_uniform_vector_length): Use
2951 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
2952
d4ea47c8
MV
29532004-11-03 Marius Vollmer <mvo@zagadka.de>
2954
2955 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
2956 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
2957 SCM_SET_UVECTOR_LENGTH): Removed.
2958
236288e2
MV
29592004-11-02 Marius Vollmer <mvo@zagadka.de>
2960
9a5fa6e9 2961 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
236288e2
MV
2962 Thanks!
2963
2964 * backtrace.c (scm_display_backtrace_with_highlights): Join the
2965 first and the second line of the SCM_DEFINE macro call, since old
2966 preprocessors cannot handle definitions that are split into two
2967 lines.
2968
2969 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
2970 declarations.
2971
2972 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
2973 scm_t_uint32 to fix the mismatch between the function declaration
2974 and definition.
2975
2976 * sort.c (quicksort): Don't use C99 variable declarations.
2977
2978 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
2979 SCM_BOOL_F if no type matches.
2980
2981 * threads.c (thread_print): Cast a pointer to size_t when printing
2982 with scm_uintprint.
2983
2984 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
2985 defined.
2986 (scm_array_prototype): Deprecated.
2987
f738b51d
MV
29882004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2989
5d1015ec
MV
2990 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
2991 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
2992 more efficient access to the u32vector.
2993
034486df
MV
2994 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
2995 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
2996 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
2997
2998 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
2999 instead of the old-style dvectors.
3000
3001 * gh_data.c: Use new-style uniform arrays in place of old-style
3002 ones.
3003
3004 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
3005 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
3006
3007 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
3008 instead of old-sytle uvectors.
3009
3010 * convert.c, convert.i.c: Rewritten completely, using
3011 scm_any_to_u8vector, etc and other new-style uniform vector
3012 functions.
3013
3014 * random.c (scm_random_solid_sphere_x,
3015 scm_random_hollow_sphere_x): Do not validate vector argument, this
3016 is already done elsewhere.
3017
3018 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
3019 scm_any_to_u8vector, etc): New.
3020 (scm_uniform_element_size, scm_uniform_vector_length): Do no
3021 longer handle old-style uniform vectors.
3022
f738b51d
MV
3023 * read.c (scm_lreadr): Bugfix: include the last bit in the
3024 bit vector.
3025
5e9c05a1
MV
30262004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3027
327114a2
MV
3028 * unif.h, unif.c (scm_array_creator): New.
3029 (scm_i_get_old_prototype): New.
3030 (scm_array_prototype): use it to return old-style prototype, never
3031 return creators.
3032 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
3033 arg of SCM_UNDEFINED. The latter is wrong.
3034
5e9c05a1
MV
3035 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
3036 (make_uve): Removed.
3037 (scm_i_proc_make_vector, scm_i_proc_make_string,
3038 scm_i_proc_make_u1vector): New.
3039 (scm_init_unif): Initialize them.
3040 (scm_i_convert_old_prototype): New.
3041 (scm_make_uve): Use it to get the creator procedure. Removed all
3042 old code that created old-style uniform vectors.
3043 (scm_array_p): Handle generic vectors.
3044 (scm_dimensions_to_uniform_array): Do not fill new array with
3045 prototype when that is a procedure.
3046 (scm_list_to_uniform_array): Also accept a list of lower bounds as
3047 the NDIM argument.
3048 (scm_i_print_array): Print rank for shared or non-zero-origin
3049 vectors.
3050 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
3051 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
3052 which I do not understand yet.
3053 (scm_array_prototype): Explicitely handle generic vectors.
327114a2 3054
5e9c05a1
MV
3055 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
3056 (iflo2str): Use icmplx2str for complex numbers.
3057
3058 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
3059 scm_i_uniform_vector_prototype): Removed.
3060 (scm_i_uniform_vector_creator): New.
3061 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
3062 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
3063 Updated all tables and generic functions to support them.
3064 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
3065 (scm_init_srfi_4): Initialize them.
3066
3067 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
3068 sizeof(CTYPE) as explained in the comment.
3069
3070 * read.c (scm_lreadr): Call scm_i_read_array for all characters
50472546 3071 following '#' that can start an array. Explicitely disambiguate
5e9c05a1
MV
3072 'i' and 'e' between introducing numbers and uniform vectors. Do
3073 not call scm_i_read_homogenous_vector, since that is also handled
3074 by scm_i_read_array now.
3075
f984af07
MV
30762004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3077
3078 First cut at integrating uniform vectors from srfi-4 with the rest
3079 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
3080 vector. The plan is to gradually replace one type after the other
3081 until none is left and then to consider general cleanups and
3082 optimizations.
3083
3084 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
3085
3086 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
3087 scm_uniform_vector_ref, scm_uniform_vector_set_x,
3088 scm_uniform_vector_to_list, scm_is_uniform_vector,
3089 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
3090 scm_uniform_vector_elements, scm_uniform_vector_element_size,
3091 scm_uniform_vector_release): New.
3092 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
3093 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
3094 from unif.h, unif.c and extended to handle both the old and new
3095 uniform vectors.
3096
3097 * tags.h (scm_tc7_byvect): Commented out.
3098
3099 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
3100 the former to the latter.
3101 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
3102 srfi-4.h, srfi-4.c.
3103 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
3104 (scm_array_p, scm_array_rank, scm_array_dimensions,
3105 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
3106 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
3107 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
3108 vectors. Removed code for scm_tc7_byvect.
3109 (scm_dimensions_to_uniform_array): Fill array with 0 when
3110 prototype is #\nul.
3111 (scm_i_print_array_dimension, scm_i_legacy_tag,
3112 scm_i_print_array): New.
3113 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
3114 for scm_tc7_byvect.
3115
3116 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
3117 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
3118 uniform vectors. Removed code for scm_tc7_byvect
3119
3120 * print.c (iprin1): Removed code for scm_tc7_byvect.
3121 * objects.c (scm_class_of): Likewise.
3122 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
3123 * gc-card.c (scm_i_sweep_card): Likewise.
3124 * evalext.c (scm_self_evaluating_p): Likewise.
3125 * eq.c (scm_equal_p): Likewise.
3126
3127 * gh_data.c (gh_chars2byvect): Reimplemented with
3128 scm_make_s8vector.
3129 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
3130
3131 * srfi-4.c (take_uvec): New.
3132 (alloc_uvec): Use it.
3133 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
3134
3135 * random.c (vector_scale, vector_scale_x): Renamed former to the
3136 latter, since it modifies its argument.
3137 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
3138 Do not use scm_universal_vector_length for non-uniform vectors.
3139 Use scm_f64vector_elements to access innards of uniform vectors.
3140
3141 * convert.i.c: Convert srfi-4 style uniform vectors when
3142 requested.
3143 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
3144 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
3145
79d52182
MV
31462004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3147
3148 * numbers.h, numbers.c (scm_i_print_double): New.
3149
3150 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
3151 ../srfi/ but heavily modified.
3152 * Makefile.am: Add them in all the right places.
3153 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
3154 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
3155 '#u', and '#s'.
3156
3157 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
3158 and made non-static. Changed all uses.
3159
6191ccec
MV
31602004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3161
e64e80b0
MV
3162 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
3163 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
3164 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
3165 scm_uintprint to print unsigned integers, raw heap words, and
3166 adresses, using a cast to scm_t_bits to turn pointers into
3167 integers.
3168
3169 * unif.c: Include "libguile/print.h".
3170
c90ac3a8
MV
3171 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
3172 scm_t_intmax values.
3173 (scm_uint2str): New, for scm_t_uintmax.
3174 (scm_iint2str): Argument type changed to scm_t_intmax,
3175 reimplemented in terms of scm_uint2str.
3176
3177 * print.c, print.h (scm_uintprint): New, for printing
3178 scm_t_uintmax values.
3179 (scm_intprint): Argument type changed to scm_t_intmax.
3180
77c2594f
MV
3181 * sort.c (quicksort, scm_merge, scm_merge_list_x,
3182 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
3183 strategic places so that the loops can be interrupted.
3184
6191ccec
MV
3185 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
3186 "-I$(top_srcdir)/libguile-ltdl".
3187 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
3188 "../libguile-ltdl/libguile-ltdl.a".
3189
3190 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
3191 all references to scm_lt_* with just lt_*. Include <ltdl.h>
3192 instead of <libguile-ltdl.h>.
3193
77600f3e
MV
31942004-10-20 Marius Vollmer <mvo@zagadka.de>
3195
3196 * sort.c (quicksort): Copy pivot out of the array while
3197 constructing the partitions; it could get overwritten otherwise.
3198 Because of the ultimate insertion sort, this bug did not cause
3199 quicksort to fail, it just put all the burdon on the insertion
3200 sort and was thus very slow. Thanks to Rolan Orre for reporting
3201 the slowness!
3202
5000379b
MV
32032004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3204
192cd792
MV
3205 * numbers.c (scm_i_range_error): New.
3206 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
3207 scm_out_of_range.
3208
3209 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
6191ccec 3210 endpos. State inclusiveness/exclusiveness of bounds in docstring.
192cd792
MV
3211
3212 * unif.c (scm_array_p): When no prototype is given, explicitely
3213 test for allowable types, do not simply return true. Thanks to
3214 Roland Orre for reporting this!
3215
5000379b
MV
3216 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
3217
3218 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
3219 segment to scm_max_segment_size.
3220
497eb0b7
HWN
32212004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
3222
1367aa5e
HWN
3223 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
3224
497eb0b7
HWN
3225 * inline.h (scm_double_cell): abort if GC running.
3226 (scm_cell): idem.
3227
aef0bdb4
MV
32282004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3229
3230 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
3231 pos == 0.
3232
3233 Keywords no longer store a 'dash symbol'. Instead, they store a
3234 symbol with their real name.
3235
3236 * keywords.h, keywords.c, deprecated.h, deprecated.c
3237 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
3238 terms of scm_is_keyword and scm_keyword_dash_symbol.
3239
3240 * keywords.h, keywords.c, discouraged.h, discouraged.c
3241 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
3242 scm_c_make_keyword): Discouraged.
3243
3244 * keywords.h, keywords.c (scm_symbol_to_keyword,
3245 scm_keyword_to_symbol): Implemented in C.
3246 (scm_is_keyword, scm_from_locale_keyword,
3247 scm_from_locale_keywordn): New.
3248
3249 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
3250
3251 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
3252 scm_from_locale_keyword instead of scm_c_make_keyword.
3253
3254 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
3255 better error message.
3256
3257 * deprecated.c: Include discouraged.h and keywords.h.
3258
3259 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
3260 reading '#:' or ':'. See NEWS for consequences.
3261
818deb11
MV
32622004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3263
43c25626
MV
3264 * read.c (scm_lreadr): Revert change from 2004-09-22: string
3265 literals are now read-write again (until SCM_STRING_CHARS is
3266 removed).
3267
3268 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
3269 strings with an error message that blames SCM_STRING_CHARS.
3270
3271 * options.c (change_option_setting): Use scm_car instead of
3272 explicit type check plus SCM_CAR.
3273
3274 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
3275 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
3276 (scm_iprin1): Use them instead of the previoulsy hardcoded
3277 strings.
3278 (scm_init_print): Initialize them.
3279
3280 * backtrace.c (display_frame_expr): Do not remove control
3281 characters from the final string. Print it directly using
3282 scm_display.
3283
818deb11
MV
3284 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
3285 Thanks to Roland Orre!
3286
d748089e
KR
32872004-09-29 Kevin Ryde <user42@zip.com.au>
3288
3289 * regex-posix.c (scm_regexp_exec): Correction to last change, should
3290 be whole original string in match struct, not offsetted substring.
3291
0ff7e3ff
HWN
32922004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
3293
3294 * gc.c (scm_gc_unprotect_object): abort if called during GC.
3295
ad7de4b8
MV
32962004-09-24 Marius Vollmer <mvo@zagadka.de>
3297
2edf319f
MV
3298 * Makefile.am (EXTRA_DIST): Added gettext.h.
3299
d180337b
MV
3300 * smob.c, smob.h (scm_assert_smob_type): New.
3301
05d7cf89 3302 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
ad7de4b8
MV
3303 Include GUILE_CFLAGS.
3304 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
3305 now.
3306 (libpath.h): Put GUILE_CFLAGS in the build-info.
3307
c9fedf8a
MV
33082004-09-23 Marius Vollmer <mvo@zagadka.de>
3309
3310 * print.h (scm_print_state): Added highlight_objects.
3311 * print.c (make_print_state, scm_free_print_state): Initialize it
3312 to SCM_EOL.
3313 (scm_iprin1): Wrap output in '{...}' when object is contained in
3314 highlight_objects.
3315
3316 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
3317 scm_backtrace_with_highlights): New. Set highlight_objects of
3318 printstate.
3319
3320 * error.c (scm_error_scm): Document new meaning of data/rest
3321 argument for out-of-range and wrong-type-arg errors.
3322 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
3323 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
3324 exception so that it gets highlighted in the backtrace.
3325 Don't talk about "argument" when not giving a position.
3326
3327 * throw.c (handler_message): The rest argument is the fourth
3328 argument, not everything after the third. Call
3329 scm_display_backtrace_with_highlights, passing the rest argument
3330 when appropriate.
3331
d5ac9b2a
MV
33322004-09-22 Marius Vollmer <mvo@zagadka.de>
3333
3334 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
3335 <bruno@clisp.org>:
3336
3337 * i18n.c: Handle --disable-nls (thanks Bruno).
3338
3339 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
3340 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
3341
3342 * i18n.c (scm_i_to_lc_category): New name and export. Support all
3343 LC categories.
05d7cf89 3344 * posix.c (scm_setlocale): Use it.
d5ac9b2a
MV
3345
3346 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
3347 scm_bind_textdomain_codeset): Make wrappers similar to C function
3348 they wrap.
3349
3350 * i18n.h: New file.
3351 * i18n.c: New file.
3352 * gettext.h: New file, taken from GNU gettext.
3353 * init.c: Include libguile/i18n.h.
3354 (scm_init_guile_1): Add call to scm_init_i18n().
3355 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
3356 (DOT_X_FILES): Add i18n.x.
3357 (DOT_DOC_FILES): Add i18n.doc.
3358 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
3359 (modinclude_HEADERS): Add i18n.h.
3360
d2e53ed6
MV
33612004-09-22 Marius Vollmer <mvo@zagadka.de>
3362
2cdfe016
MV
3363 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
3364
d2e53ed6
MV
3365 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
3366 discouraged.h. Replaced all uses with scm_is_pair.
3367 (SCM_I_CONSP): New name for SCM_CONSP.
3368
3369 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
3370 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
3371 scm_cadr, etc): New.
3372 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
3373 uses with scm_is_null.
5dd82006 3374
d2e53ed6
MV
3375 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
3376 instead of explicit code.
5dd82006 3377
5dfdf243
MV
33782004-09-22 Marius Vollmer <mvo@zagadka.de>
3379
b50c53e5
MV
3380 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
3381 Reworded logic a bit so that #f is returned immediately when s1 is
3382 too short to contain s2.
3383
5dfdf243 3384 * regex-posix.c (scm_regexp_exec): Convert string to
05d7cf89 3385 zero-terminated locale string before matching against it.
5dfdf243
MV
3386
3387 * strings.h, strings.c (scm_substring_read_only,
3388 scm_c_substring_read_only, scm_i_substring_read_only): New.
3389 (RO_STRING_TAG, IS_RO_STRING): New.
3390 (scm_i_string_writable_chars): Bail on read-only strings.
3391
3392 * read.c (scm_lreadr): use scm_c_substring_read_only for string
3393 literals, thus making them read-only as specified by R5RS.
3394
22ab5ba3
MV
33952004-09-22 Marius Vollmer <mvo@zagadka.de>
3396
3397 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
3398 by testing for smobs before insisting on equal SCM_CELL_TYPES.
3399
2663421c
MV
34002004-09-21 Marius Vollmer <mvo@zagadka.de>
3401
0d83cb90
MV
3402 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
3403 numbers.c.
3404 (scm_to_mpz, scm_from_mpz): New.
9a5fa6e9 3405 Thanks to Andreas Vögele!
0d83cb90 3406
2663421c
MV
3407 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
3408 just on a line of its own.
3409
3410 * srfi-13.c (scm_string_any, scm_string_every,
3411 scm_string_tabulate, string_upcase_x, string_down_case_x,
3412 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
3413 size_t instead of int for indices into strings. Make sure that no
9a5fa6e9 3414 over- or underflow occurs. Thanks to Andreas Vögele!
2663421c
MV
3415 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
3416 indices, which can also be negative.
3417
b00b73f9
MV
34182004-09-20 Marius Vollmer <mvo@zagadka.de>
3419
3420 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
3421
3422 * threads.c (scm_threads_mark_stacks): Call
3423 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
3424 only used once.
3425
adba74f3
HWN
34262004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
3427
05d7cf89 3428 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
adba74f3
HWN
3429 Bugfix: when subtracting unsigned values, make sure that result
3430 does not wrap.
3431
f6de32c8
KR
34322004-09-09 Kevin Ryde <user42@zip.com.au>
3433
3434 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
3435 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
9a5fa6e9 3436 by Andreas Vögele.
f6de32c8 3437
e548be5f
MV
34382004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3439
eb8d0af1
MV
3440 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
3441
e548be5f
MV
3442 * eq.c (real_eqv): Pretend that all NaNs are equal.
3443
3444 * numbers.c (scm_integer_expt): Do not accept inexact integers.
3445
e7acba81
MV
34462004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3447
874fbad1
MV
3448 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
3449 use size_t for some locals instead of int.
3450
e7acba81
MV
3451 * read.c (scm_flush_ws): Detect "#!"-style comments here.
3452 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
3453 (skip_scsh_block_comment): Use scm_input_error instead of
3454 scm_misc_error in case of EOF.
3455
5de12658
KR
34562004-09-07 Kevin Ryde <user42@zip.com.au>
3457
3458 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
5de12658
KR
3459 Bug report by Bill Schottstaedt.
3460
3461 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
3462 column.
3463 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
3464
3465 * posix.c (scm_access): Update docstring per manual.
3466
3467 * posix.c (scm_nice): Correction to error detection. Reported by
3468 Matthias Koeppe.
3469
3470 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
3471 throw error before unlocking mutex with SCM_ALLOW_INTS.
3472
e227addf
KR
34732004-09-06 Kevin Ryde <user42@zip.com.au>
3474
3475 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
3476 available. This also gets around CLK_TCK being absent when
3477 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
3478
edea856c
SJ
34792004-09-03 Stefan Jahn <stefan@lkcc.org>
3480
3481 * threads.c (scm_threads_mark_stacks): Fixed local variable
3482 definitions.
3483
e7acba81 3484 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
edea856c
SJ
3485 local variable definitions.
3486
3487 * stime.c (_POSIX_C_SOURCE): Do not define this item on
3488 MinGW32 because it conflicts with its pthread headers.
874fbad1
MV
3489 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
3490 (scm_strftime): Using scm_from_locale_string() instead of
edea856c
SJ
3491 scm_makfrom0str().
3492
874fbad1 3493 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
edea856c
SJ
3494 part.
3495
3496 * numbers.c (scm_init_numbers): Removed check_sanity() call
3497 inside GUILE_DEBUG. The function has been removed somewhen...
3498
3499 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
3500 MinGW32 because it conflicts with its pthread headers.
3501
d9eb2d67
MV
35022004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3503
3504 * strings.c (SCM_STRINGP): Accept all strings.
3505 (SCM_STRING_CHARS): Reject shared substrings here.
3506
3507 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
3508 the Copyright years.
3509
c495c342
KR
35102004-08-27 Kevin Ryde <user42@zip.com.au>
3511
3512 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
3513 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
3514 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
3515
57aa5515
MV
35162004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3517
3518 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
3519 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
3520 scm_i_symbol_is_interned, scm_i_mem2symbol,
3521 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
3522
ce25760f
MV
35232004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3524
19ff6ffc
MV
3525 * srfi-13.c: First cut at thread-safeness and proper use of
3526 scm_i_string_chars et al. Copious scm_remember_upto_heres have
3527 been inserted. Made sure that no internal string pointer is used
3528 across a SCM_TICK or a possible GC.
3529
ce25760f
MV
3530 * script.c (scm_compile_shell_switches): Use
3531 scm_from_locale_string instead of scm_makfrom0str.
3532
3533 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
3534 always been.
3535
c5080b51
MV
35362004-08-25 Marius Vollmer <mvo@zagadka.de>
3537
3538 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
3539 strop.c.
3540
3541 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
3542 * strop.h, strop.c: Removed, they are now empty.
3543 * Makefile.am: Updated for new and removed files.
3544
3545 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
3546 to scm_string_to_symbol.
3547
3548 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
3549 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
3550 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
3551 charset instead of libc functions.
3552
3553 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
3554 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
3555 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
3556 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
3557 instead of explicit code.
3558
3559 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
3560 "srfi-13.h" instead of "strop.h".
3561
3562 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
3563 scm_init_srfi_14. Do not call scm_init_strop.
3564
4b0d27f2
MV
35652004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3566
3567 * numbers.c (scm_inf_p): Synced docstring back from manual.
3568
3ece39d6
MV
35692004-08-22 Marius Vollmer <mvo@zagadka.de>
3570
3571 * strings.c (get_str_buf_start): New helper function.
3572 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
3573 scm_i_string_char, scm_i_string_writable_chars): Use it.
3574 (scm_i_substring_copy): Make START argument optional for C
3575 callers, for upcoming SRFI-13 integration.
3576
35772004-08-21 Marius Vollmer <mvo@zagadka.de>
3578
3579 From Richard Todd, Thanks!
3580
3581 * script.c (scm_compile_shell_switches): added '-L' switch to add
3582 to the %load-path.
3583
5fa0939c
DH
35842004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3585
3586 * eval.c (unmemoize_exprs): When dropping internal body markers
3587 from the output during unmemoization, also drop those that are not
3588 immediately at the beginning of a body.
3589
2146fdeb
MV
35902004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3591
c1f54b3d
MV
3592 * eval.c (scm_lookupcar1): Report "Variable used before given a
3593 value" insetad of an "Unbound" one for variables that are found
3594 but still contain SCM_UNDEFINED.
2146fdeb
MV
3595
3596 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
3597 expects a null-terminated string in the locale encoding, but
3598 scm_i_string_writable_chars doesn't give that. Fixed by letting
3599 mkstemp modify a locale version of the tmpl argument and copying
3600 the result back into tmpl.
3601
3602 * strop.c (scm_substring_move_x): Store into str2, not str1.
3603
d4f76919
KR
36042004-08-20 Kevin Ryde <user42@zip.com.au>
3605
3606 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
3607 to modify the input string.
3608
b5247a6b
MV
36092004-08-19 Marius Vollmer <mvo@zagadka.de>
3610
3611 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
3612 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
3613 scm_c_symbol_length.
3614
f26b9395
MV
36152004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3616
3617 New string implementation, with copy-on-write strings and
3618 mutation-sharing substrings, and a new internal string API.
3619 Symbols can now share memory with strings.
3620
3621 * tags.h (scm_tc7_stringbuf): New tag.
3622
3623 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
3624 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
3625 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
3626 uses.
3627 (scm_i_make_string, scm_c_make_string): New, to replace
3628 scm_allocate_string. Updated all uses.
3629 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
3630 SCM_STRING_LENGTH): Deprecated.
3631 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
3632 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
3633 Discouraged. Replaced all uses with scm_from_locale_string or
3634 similar, as appropriate.
3635 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
3636 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
3637 scm_substring_shared, scm_substring_copy): New.
3638
3639 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
3640 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
3641 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
3642 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
3643 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
3644 Deprecated.
3645 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
3646 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
3647 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
3648 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
3649 Updated all uses.
3650 (scm_gensym): Generate only the number suffix in the buffer, just
3651 string-append the prefix.
3652
3653 * error.c (scm_memory_error): Do not try to throw, just abort.
3654 Throwing will not work anyway.
3655
3656 * gh.h, gh-data.c (gh_set_substr): Made src const.
3657
3658 * ports.c (scm_i_mode_bits_n): New, for counted strings.
3659 (scm_mode_bits): Use it.
3660 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
3661 a vector normally and fill that instead of consing a list with a
3662 blocked GC.
3663
3664 * read.c (scm_i_casei_streq): New, for counted strings.
3665
3666 * threads.c (gc_section_count): Removed, thread-sleeping can not
3667 be nested.
3668 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
3669 admin mutex so that we can be put to sleep by other threads while
3670 blocking on that mutex. Lock all the heap mutex of all threads,
3671 including ourselves.
3672 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
3673 call scm_i_enter_guile.
3674 (scm_thread_mark_stacks): Expect all threads to be suspended.
3675
3676 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
3677 scm_gc_mallocated, for now.
3678 (scm_init_storage): Initialize it.
3679 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
3680
3681 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
3682 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
3683 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
3684 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
3685
cd505b38
MV
3686 * strop.c (scm_string_copy): Use scm_c_substring to get a
3687 copy-on-write string.
3688
8a807b26
KR
36892004-08-18 Kevin Ryde <user42@zip.com.au>
3690
3691 * arbiters.c (FETCH_STORE): New macro.
3692 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
3693 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
3694 scm_try_arbiter and scm_release_arbiter.
3695 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
3696 for speed on i386, otherwise using mutex.
3697
3698 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
3699 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
3700 exact and inexact is #f.)
3701
3702 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
3703 to get thread safety of scm_ttyname.
3704
3705 * ports.c (ttyname): Remove prototype, unused.
3706
d6cd4c36 3707 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1f3cc0d3 3708 Reported by Michael Tuexen.
d6cd4c36 3709
fa0c0a4b
MV
37102004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3711
3712 * load.c (scm_init_load_path): Do not pass NULL to
3713 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
3714 not set. Thanks to Bill Schottstaedt.
3715
70f7ee41
MV
37162004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3717
3718 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
3719 locale strings instead of accessing their internals.
3720 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
3721 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
3722 SCM_STRING_CHARS and SCM_STRING_LENGTH.
3723
3724 * simpos.c (scm_system): Convert SCM strings to locale strings
3725 instead of accessing their internals.
3726
3727 * script.c (scm_compile_shell_switches): Convert version to locale
3728 string before printing it.
3729
3730 * rdelim.c (scm_read_delimited_x): Avoid
3731 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
3732 of scm_from_long for the returned number of read characters.
3733
3734 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
3735 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3736
3737 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
3738 Use them instead of SCM_SYSCALL when one or two strings need to be
3739 converted into locale strings.
3740 (my_rename): New, gathers platform dependent code for renaming.
3741 (scm_rename): Use it.
3742 (scm_readlink, scm_copy_file): Convert SCM strings to locale
3743 strings instead of accessing their internals.
3744 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
3745 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
3746 SCM_STRING_LENGTH.
3747
3748 * extensions.c (load_extension): Convert lib and init to locale
3749 strings instead of accessing the internals directly.
3750 (scm_c_load_extension): Use scm_from_locale_string instead of
3751 scm_makfrom0str.
3752
3753 * fports.h, fports.c (scm_i_fdes_to_port): New, like
3754 scm_fdes_to_port, but take mode bits directly instead of as a C
3755 string.
3756 (scm_i_fdes_to_port): Implement using above.
3757 (scm_open_file): Use scm_i_fdes_to_port together with
3758 scm_i_mode_bits to avoid accessing internals of SCM string from C.
3759 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
3760 with scm_i_mode_bits to avoid accessing internals of SCM string
3761 from C.
3762
3763 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
3764 SCM string as argument.
3765
3766 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
3767 bits directly instead of C string.
3768 (scm_void_port): Implement using above.
3769 (scm_sys_make_void_port): Use scm_i_void_port together with
3770 scm_i_mode_bits to avoid accessing internals of SCM string.
3771
3772 * strings.h, strings.c (scm_i_get_substring_spec): New.
3773
3774 * socket.c, rw.c, deprecated.h, validate.h
3775 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
3776 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
3777 scm_to_locale_string, etc.
3778 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
3779 above, plus scm_i_get_substring_spec.
3780
3781 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
3782 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
3783 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
3784 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
3785 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
3786 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
3787 with more explicit scm_remember_upto_here_1, etc, or introduced
3788 them in the first place.
3789
3790 * posix.c (WITH_STRING): New helper macro. Use it where one
3791 locale string is needed for a short piece of code.
3792 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
3793 when one locale string is needed.
3794 (scm_mkstemp): Convert tmpl to a locale string.
3795 (scm_putenv): Rewritten to use only C strings.
3796 (scm_setlocale, scm_crpt): Convert argument strings to locale
3797 strings.
3798
37992004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3800
3801 * load.c (scm_primitive_load_path): Do not check for absolute
3802 filenames when scm_sys_search_load_path returns false, which will
3803 return absolute filenames unchanged.
3804
bb26cc2d
MV
38052004-08-11 Marius Vollmer <mvo@zagadka.de>
3806
3807 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
3808 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
3809 of an alist. Thanks to Matthias Koeppe!
3810
02573e4c
MV
38112004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3812
3813 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
3814 Moved from string.h to deprecated.h.
3815
3816 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
3817
f9751e86 3818 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
02573e4c
MV
3819 SCM_I_MAKE_STRING_TAG, changed all uses.
3820 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
3821 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
3822 respectively. For a short time, the old names are still there as
3823 aliases. Not all uses have been changed yet, but the ones in
3824 strings.c have.
3825 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
3826 SCM_T_BITS_MAX.
3827 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
3828 scm_take_locale_string, scm_take_locale_stringn,
3829 scm_to_locale_string, scm_to_locale_stringn,
3830 scm_to_locale_stringbuf): New.
3831 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
3832 deprecated.[hc]. Implemented in terms of the new functions above.
3833 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
3834 scm_makfrom0str): Reimplemented in terms of the new functions from
3835 above. They will be discouraged shortly.
3836 (scm_substring): Do not use scm_mem2string.
3837 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
3838 to replace similar code from posix.c, simpos.c, and dynl.c.
3839 (scm_string_append): Use memcpy instead of explicit loop. Do not
3840 use register keyword. Use plain 'char' instead of 'unsigned
3841 char'.
3842
3843 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
3844 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
3845
3846 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
3847 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3848 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
3849 not as a pointer. Use scm_remember_upto_here_1 to protect it.
3850
3851 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
3852 string. This avoids a conversion round-trip.
3853
3854 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
3855 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
3856 SCM_I_STRING_LENGTH, respectively.
3857 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
3858
3859 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
3860 of a string, call scm_display on the string itself.
3861
3862 * dynwind.c, dynwind.h (scm_frame_free): New.
3863
3864 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
3865 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
3866 Replaced uses of SCM_STRING_CHARS with proper uses of
3867 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
3868 Replaced scm_mem2string with scm_from_locale_string.
3869
3870 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
3871 Removed, replaced all uses with scm_i_allocate_string_pointers.
3872
3873 * load.h, load.c (scm_internal_parse_path): Removed.
3874 (scm_parse_path): Use scm_string_split to do the work.
3875 (scm_init_load_path): Use scm_parse_path instead of
3876 scm_internal_parse_path.
3877 (scm_search_path): Rewritten string handling part of the code in
3878 terms of scm_to_locale_stringbuf and so that it is thread safe.
3879
3880 * error.c (scm_error_scm): Throw directly instead of calling
3881 scm_error, this avoids the back and forth conversion of SUBR and
3882 MESSAGE and also plugs a memory leak.
3883 (scm_error): Call scm_error_scm.
3884
3885 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
3886 (display_header): Print FNAME when it is true, not
3887 merely when it is a string.
3888
3889 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
3890 unceremoniously. They were unused by Guile itself, and external
3891 use should stop immediately.
3892
3893
409eb4e5
MV
38942004-08-10 Marius Vollmer <mvo@zagadka.de>
3895
3896 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
3897 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
3898 deprecated versions installed in deprecated.h and deprecated.c.
3899 Changed all uses.
3900
a00eaf19
RB
39012004-08-06 Rob Browning <rlb@defaultvalue.org>
3902
3903 * net_db.c (scm_resolv_error): don't cause an exception while
3904 trying to throw an exception -- call scm_misc_error with correct
3905 arguments. The previous arguments needed a format escape that
3906 wasn't in any of the format strings.
3907
bcb88c93
KR
39082004-08-06 Kevin Ryde <user42@zip.com.au>
3909
8f094b97
KR
3910 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
3911 so as not to depend on signedness of plain char. For byvect range
3912 check, throw out-of-range rather than wrong-type-arg.
3913
bcb88c93
KR
3914 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
3915 signed byte range checks by using scm_to_schar and scm_from_schar,
3916 don't want to depend on signedness of C char.
3917
29e61124
KR
39182004-08-05 Kevin Ryde <user42@zip.com.au>
3919
3920 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
3921 SCM_DEFER_INTS.
3922 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
3923 guaranteed if multiple threads compete to unlock.
3924 Update docstrings per doc/ref/api-scheduling.texi.
3925
99de794f
KR
3926 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
3927 stat on the filename, to be certain a file rename can't mean we get
3928 info on one filesystem object but open another. This fstat usage is
3929 similar to Emacs copy-file.
3930
29e61124
KR
3931 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
3932
3933 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
3934 SIGINT and SIGQUIT, since those values are ints.
3935
759aa8f9
MV
39362004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3937
7241f213
MV
3938 * num2integral.i.c, num2float.i.c: Removed.
3939 * Makefile.am (noinst_HEADERS): Updated.
3940
f9656a9f
MV
3941 * numbers.h. numbers.c (scm_make_ratio): Renamed to
3942 scm_i_make_ratio and made static, replaced uses with scm_divide.
96d8c217
MV
3943 (scm_complex_p): New, export as "complex?" to Scheme.
3944 (scm_number_p): Export as "number?" to Scheme.
3945 (scm_is_complex, scm_is_number): New.
3946 (scm_c_make_rectangular, scm_c_make_polar): New.
3947 (scm_make_rectangular, scm_make_polar): Use above.
3948 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
3949 New.
3950 (scm_make_complex): Discouraged by moving to discouraged.h and
3951 discouraged.c. Replaced all uses with scm_c_make_rectangular.
3952
759aa8f9
MV
3953 * discouraged.h, discouraged.c, numbers.c, numbers.h
3954 (scm_is_rational): New.
3955 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
3956 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
3957 Removed prototypes.
3958 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
3959 Discouraged by moving to discouraged.h and discouraged.c.
3960 Replaced all uses with scm_from_double.
3961 (scm_num2float, scm_num2double): Discouraged by moving prototype
3962 to discouraged.h and rewriting in terms of scm_to_double.
3963 Replaced all uses with scm_to_double.
3964 (scm_to_double): Do not implement in terms of scm_num2dbl, use
3965 explicit code.
3966 (scm_from_double): Do not implement in terms of scm_make_real, use
3967 explicit code.
3968
531bf3e6
MV
39692004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3970
759aa8f9
MV
3971 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
3972
531bf3e6
MV
3973 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
3974 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
3975
3976 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
3977 Renamed to SCM_I_* in order to avoid collisions with the versions
3978 defined in deprecated.h.
3979
3980 * discouraged.h, discouraged.c: New files.
3981
3982 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
3983 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
3984 deprecated to being discouraged by moving to discouraged.h.
3985
3986 * numbers.h, numbers.c, discouraged.h, discouraged.c
3987 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
3988 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
3989 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
3990 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
3991 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
3992 scm_num2ulong_long): Discouraged by moving to discouraged.h and
3993 discouraged.c and reimplementing in terms of scm_from_* and
3994 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
3995 functions.
3996
3997 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
3998 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
3999 scm_i_size2big, scm_i_ptrdiff2big): Removed.
4000 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
4001 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
4002 explicit code.
4003
5ec82e96
KR
40042004-08-02 Kevin Ryde <user42@zip.com.au>
4005
4006 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
4007 and current usage and migration.
4008
58f28989
KR
40092004-07-31 Kevin Ryde <user42@zip.com.au>
4010
4011 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
4012 it's not thread safe.
4013 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
4014 advantage of this.
4015 * fports.c (scm_open_file): Use scm_strerror likewise.
4016 * filesys.c (scm_stat, scm_lstat): Ditto.
4017
4018 * filesys.c (scm_copy_file): Avoid fd leak when destination file
4019 cannot be opened.
4020
4021 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
4022 update, for thread safety.
4023 (gensym_counter): Move into scm_gensym which is its only user.
4024 (scm_init_symbols): No need to explicitly initialize gensym_counter.
4025
03696aab
MV
40262004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4027
51fdb325
MV
4028 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
4029 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
4030 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
4031 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
4032 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
4033 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
4034 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
4035 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
4036 defined in terms of scm_to_signed_integer, etc, but in terms of
4037 scm_to_int8, etc.
4038
4039 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
4040
03696aab
MV
4041 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
4042 no longer used.
4043
4044 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
4045 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
4046
4047 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
4048 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
4049 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
4050 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
4051 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
4052 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
4053 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
4054
4055 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
4056 the functions below.
4057
4058 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
4059 conv-uinteger.i.c.
4060
4061 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
4062 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
4063 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
4064 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
4065 scm_from_uint64): Turned from macros into proper functions.
4066 (scm_to_signed_integer, scm_to_unsigned_integer,
4067 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
4068 conv-integer.i.c and conv-uinteger.i.c, as well.
4069
4070 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
4071 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
4072 the limits. Those are always defined.
4073
1f15779e
KR
40742004-07-29 Kevin Ryde <user42@zip.com.au>
4075
4076 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
4077
48360eb3
KR
40782004-07-28 Kevin Ryde <user42@zip.com.au>
4079
4080 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
4081 safety.
4082
c3f3c841
KR
4083 * unif.c (scm_array_set_x): For svect, use scm_num2short for
4084 consistency with other vector types and to get arg and func name into
4085 error message.
4086
c82f8ed6
MV
40872004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4088
4089 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
4090 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
4091 scm_from_bool, respectively.
4092 (SCM_NINUMP): Added.
4093
4094 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
4095 deprecated.h. Replaced all uses with scm_is_eq.
4096
317b4c4a
KR
40972004-07-24 Kevin Ryde <user42@zip.com.au>
4098
4099 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
4100 * posix.c (scm_crypt): Use it to protect static data in crypt().
4101
e11e83f3
MV
41022004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4103
4104 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
c82f8ed6 4105 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
e11e83f3
MV
4106 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
4107 versions to deprecated.h and deprecated.c. Changed all uses to
4108 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
4109 scm_from_*, as appropriate.
4110
4111 * dynwind.c (scm_i_dowinds): Removed unused code that would call
4112 the unexisting scm_cross_dynwind_binding_scope for inums on the
4113 windlist.
4114
a55c2b68
MV
41152004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4116
4117 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
e11e83f3 4118 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
a55c2b68
MV
4119 byte-wise address to a SCM integer. Changed all uses.
4120 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
4121 scm_to_ipv6 and added type and range checking, for converting from
4122 an IPv& byte-wise address to a SCM integer. Changed all uses.
4123 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
4124 is now done by scm_to_ipv6.
4125
4126 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
4127 not accept inexact integers.
4128
4129 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
4130 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
4131 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
4132 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
4133 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
4134 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
4135 fixnum/bignum distinction visible. Changed all uses to
4136 scm_to_size_t or similar.
4137
41382004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4139
4140 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
4141
48a06bd5
KR
41422004-07-10 Kevin Ryde <user42@zip.com.au>
4143
4144 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
4145 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
4146 such a size causes divide-by-zeros in scm_hasher.
4147
052fbfd9
KR
4148 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
4149 leak.
4150
43240c9c
MV
41512004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4152
4153 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
4154 Rewritten using the same logic as scm_to_signed_integer and
4155 scm_to_unsigned_integer, respectively, which is better(tm). Also,
4156 use CHAR_BIT instead of hardcoding 8.
4157 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
4158 SCM_I_LLONG_MIN etc. instead.
4159
4160 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
4161 SCM_I_MAKINUM and changed all uses.
4162 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
4163
a3de8e7b
MV
4164 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
4165 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
43240c9c
MV
4166 them by assuming twos-complement.
4167
c9eb03bb
MV
41682004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4169
4170 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
4171 configure now produces.
4172 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
4173 definitions, giving the limits of the integer types defined by
4174 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
4175 LLONG_MIN or LONG_LONG_MIN is hard to get at.
4176
4177 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
4178 SHORT_MIN.
4179 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
4180 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
4181 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
4182 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
4183 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
4184 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
4185 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
4186 scm_from_uintmax): New.
4187
7888309b
MV
41882004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4189
4190 * tags.h (scm_is_eq): New.
4191
4192 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
4193 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
4194 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
4195 scm_from_bool, and scm_is_bool, respectively.
4196
4197 * boolean.h (scm_is_bool): Fix bug in prototype.
4198 (scm_from_bool): The argument is "x" not "f", stupid.
4199
4200 * boolean.c (scm_is_bool): Fix typo.
4201
4202 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
4203 scm_is_unsigned_integer, scm_to_signed_integer,
4204 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
4205 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
4206 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
4207 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
4208 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
4209 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
4210 New.
4211
800570a6
MV
42122004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4213
4214 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
4215 scm_to_bool): New.
4216
9fcf3cbb
DH
42172004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4218
4219 * backtrace.c (display_expression, display_frame): Call
4220 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
4221 single memoized expression.
4222
4223 * debug.c (memoized_print): Don't try to unmemoize the memoized
4224 object, since we can't know whether it holds a single expression
4225 or a body.
4226
4227 (scm_mem_to_proc): Removed check for lambda expression, since it
4228 was moot anyway. Whoever uses these functions for debugging
4229 purposes should know what they do: Creating invalid memoized code
4230 will cause crashes, independent of whether this check is present
4231 or not.
4232
4233 (scm_proc_to_mem): Take the closure's code as it is and don't
4234 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
4235 memoized code should not be modified.
4236
4237 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
4238 scm_unmemoize from public use, but made scm_i_unmemoize_expr
4239 available as a guile internal function instead. However,
4240 scm_i_unmemoize_expr will only work on memoized objects that hold
4241 a single memoized expression. It won't work with bodies.
4242
4243 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
4244 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
4245 i. e. a list of expressions.
4246
4247 * eval.c (unmemoize_exprs): Drop internal body markers from the
4248 output during unmemoization.
4249
4250 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
4251 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
4252 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
4253 as guile internal functions instead. scm_i_unmemoize_expr will
4254 only work on a single memoized expression, while
4255 scm_i_unmemocopy_body will only work on bodies.
4256
90df793f
DH
42572004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4258
4259 * eval.c (unmemoize_exprs): Handle semi-memoized code.
4260
4261 (scm_cons_source, scm_primitive_eval): Prefer higher level
4262 predicate SCM_FALSEP over SCM_IMP.
4263
8048c00b
RB
42642004-06-15 Rob Browning <rlb@defaultvalue.org>
4265
4266 * script.c (scm_shell_usage): minor phrasing change.
4267
4268 * gc_os_dep.c: update ifdefery for macosx.
4269 (scm_get_stack_base): separate result initialization from
4270 declaration to slience warnings with macosx and hp-ux using gcc
9a5fa6e9 4271 3.3. Thanks to Andreas Vögele.
8048c00b 4272
d93294d4
HWN
42732004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
4274
4275 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
4276
212e58ed
DH
42772004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4278
4279 * list.[ch] (scm_i_finite_list_copy): New internal function to
4280 copy lists that are known to be finite (though not necessarily
4281 proper).
4282
4283 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
4284 a closure's argument list like an expression of a body.
4285
4286 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
4287 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
4288 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
4289 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
4290 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
4291 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
4292 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
4293 unmemoize_builtin_macro): New static functions and symbols.
4294
4295 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
4296 now has a slightly different meaning: The memoized form that is
4297 receives as its argument is now interpreted as a sequence of
4298 expressions from a body.
4299
4300 (unmemocar, scm_unmemocar): Since the whole functionality of
4301 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
4302 has its old content back and is deprecated, while unmemocar has
4303 been removed.
4304
4305 (SCM_BIT7): Removed.
4306
4307 (CEVAL): For unmemoizing a single expression, call
4308 unmemoize_expression instead of scm_unmemocopy, which now expects
4309 a sequence of body expressions. Eliminated unnecessary empty
4310 environment frame when executing let* forms. Eliminated
4311 unmemoization step from evaluator.
4312
9ccea370
MV
43132004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4314
4315 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
4316 macroexp and made static. Added new version of scm_macroexp that
4317 emits a deprecation warning and then calls macroexp.
4318 (scm_m_undefine): Issue deprecation warning.
4319
57d23e25
DH
43202004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4321
4322 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
4323 Modified to make set! work on symbols that represent syntactic
4324 keywords.
4325
141521ad
HWN
43262004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
4327
4328 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
4329 compound expression as lvalue errors.
4330
7c2f56a4
MV
43312004-05-24 Marius Vollmer <mvo@zagadka.de>
4332
4333 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
4334 WINDER_DATA to a SCM.
4335
366ecaec
DH
43362004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4337
4338 * goops.c (compute_getters_n_setters, create_standard_classes,
4339 scm_add_slot): Compute closures by calling scm_i_eval_x on a
4340 lambda expression rather than creating them with scm_closure.
4341
26ecfa39
DH
43422004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4343
4344 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
4345 misplaced syntactic keywords. This will not work unless guile's
4346 defmacro feature is deprecated.
4347
4348 (scm_m_case): Fixed a bug that caused the list of labels to grow
4349 with every case form.
4350
f865229a
KR
43512004-05-19 Kevin Ryde <user42@zip.com.au>
4352
4353 * numbers.c (scm_round_number): For inum and big, just return x. For
4354 real, use scm_round for 2^54-1 etc problems covered there.
4355
4356 * numbers.c (trunc): Remove #define to scm_truncate when the C library
4357 doesn't provide trunc. This was for when `truncate' was done as a
4358 scm_tc7_dsubr, no longer required.
4359
4360 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
4361 to stack marking call, two parameters and no cast on t->base.
4362
63947c7a
MV
43632004-05-18 Marius Vollmer <mvo@zagadka.de>
4364
4365 * hashtab.c (rehash_after_gc): Bug fix: properly link the
4366 processed hashtables back into the weak_hashtables list. Thanks
4367 to Bill Schottstaedt!
4368
e7313a9d
DH
43692004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4370
4371 * eval.c (unmemoize_quote): New static function.
4372
4373 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
4374 representation of 'quote' and '@slot-ref' to an improper list.
4375 This reduces execution time, the number of cells used to hold the
4376 memoized code, and thus also reduces garbage collection time.
4377
4378 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
4379
4380 (SCM_CEVAL): Changed macro handling to also work with macros that
4381 return improper lists. Added an assertion, that the code returned
4382 by a macro transformer will not lead to cycles in the memoized
4383 code.
4384
e5156567
DH
43852004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4386
4387 No functional change, just rearrangements of functions within the
4388 file.
4389
4390 * eval.c (scm_ilookup, scm_unbound_variable_key,
4391 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
4392 the definitions used for execution, since that's where they will
4393 belong to later.
4394
651f07f8
DH
43952004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4396
4397 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
4398 throughout guile, has not been part of an official release yet,
4399 and the concept of sloppy predicates has never been a good idea.
4400
4401 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
4402 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
4403 Simplified.
4404
770e048f
DH
44052004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4406
4407 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
4408 to make explicit what happens.
4409
2ff08405
DH
44102004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4411
4412 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
4413 explicit what happens.
4414
4415 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
4416 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
4417
89afb9cd
MV
44182004-05-11 Marius Vollmer <mvo@zagadka.de>
4419
4420 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
4421 is indeed a procedure when it isn't a number.
4422
3d5ebfa9
MV
44232004-05-10 Marius Vollmer <mvo@zagadka.de>
4424
4425 Convert floating point numbers into strings with an arbitrary
4426 radix. Thanks to Richard Todd!
4427
4428 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
4429 fit.
4430 (fx): Removed.
4431 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
4432 number_chars): New, to support variable radices.
4433 (idbl2str): Use above instead of the old base-10 only tables.
4434 (iflo2str): Pass on new RADIX argument to idbl2str.
4435 (scm_number_to_string): Pass radix to iflo2str.
4436 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
4437 iflo2str.
4438 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
4439 possible radices.
4440
3ae69bb4
KR
44412004-05-10 Kevin Ryde <user42@zip.com.au>
4442
4443 * numbers.c (scm_logbit_p): Correction to test above the end of an
4444 inum. Reported by Jan Konecny.
4445
27968825
MV
44462004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4447
4448 * gc.h (scm_t_cell): Fields are now of type SCM instead of
4449 scm_t_bits. Updated all users.
4450 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
4451 duplicating the code.
4452 (SCM_CELL_OBJECT_LOC): New.
4453 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
4454 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
4455
4456 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
4457 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
4458 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
4459 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
4460 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
4461 SCM_SMOB_OBJECT_3_LOC): New.
4462 * smob.c (scm_i_set_smob_flags): New function.
4463
4464 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
4465 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
4466 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
4467 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
4468 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
4469 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
4470
4471 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
4472 taking the address of SCM_CELL_WORD_1, the latter being no longer
4473 an lvalue.
4474
4475 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
4476 of casting SCM_CELL_WORD_LOC.
4477
3cf17ef0
KR
44782004-05-02 Kevin Ryde <user42@zip.com.au>
4479
37026925 4480 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
9a5fa6e9 4481 --disable-deprecated. Reported by Andreas Vögele.
37026925 4482
3cf17ef0 4483 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
9a5fa6e9 4484 particular on HP-UX). Reported by Andreas Vögele.
3cf17ef0 4485
c5854598
KR
4486 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
4487 code has support for. Fixes building with AIX cc, which is ansi but
4488 doesn't define __STDC__. Reported by Keith Crane.
4489 (var_start): Remove macro, this variation no longer required.
4490 (scm_list_n): Use va_start directly.
4491
f26c1a32
KR
44922004-05-01 Kevin Ryde <user42@zip.com.au>
4493
4494 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
9a5fa6e9 4495 is now gone. Reported by Andreas Vögele.
f26c1a32 4496
dfa6017e
KR
44972004-04-28 Kevin Ryde <user42@zip.com.au>
4498
4499 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
4500 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
4501 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
9a5fa6e9 4502 subscript. Reported by Andreas Vögele.
dfa6017e
KR
4503 Also cast through unsigned char to avoid passing negatives to those
4504 macros if input contains 8-bit values.
4505
4506 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
4507 corrections to range check for signed numbers. Remove
4508 scm_remember_upto_here_1(num) from these checks, since num is used
4509 subsequently anyway.
4510
4511 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
4512 avoid warning from gcc 3.4. Reported by Hyperdivision.
4513
4514 * numbers.c (scm_bit_extract): Use min instead of MIN.
4515 (MIN): Remove, this conflicts with similar macro defined by limits.h
9a5fa6e9 4516 on HP-UX. Reported by Andreas Vögele.
dfa6017e
KR
4517
4518 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
9a5fa6e9 4519 particular on HP-UX). Reported by Andreas Vögele.
dfa6017e 4520
a0d06a00 4521 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
9a5fa6e9 4522 Reported by Andreas Vögele.
a0d06a00 4523
dfa6017e
KR
4524 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
4525 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
9a5fa6e9 4526 by Andreas Vögele.
dfa6017e 4527
36245b66
DH
45282004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4529
4530 * eval.c (s_macro_keyword): New static identifier.
4531
4532 (scm_m_define): Change order to first create binding and
4533 evaluating the expression afterwards.
4534
4535 (scm_m_set_x): Memoize complete set! expression. Only leave
4536 symbols if no binding exists at memoization time. Throw error if
4537 assigning to a syntactic keyword.
4538
4539 (lazy_memoize_variable): New function.
4540
4541 (CEVAL): When execution set!, perform lazy memoization if
4542 unmemoized symbol is detected.
4543
4544 * modules.c (module_variable): Return variables with unbound
4545 value.
4546
4547 * tags.h: Fix comment.
4548
4d81111e
KR
45492004-04-25 Kevin Ryde <user42@zip.com.au>
4550
da8bcb2f
KR
4551 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4552 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
4553 in 8-bit locales, and ensures consistency with char-upper-case? and
4554 char-lower-case? which already use ctype.h.
4555 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
4556 Remove.
4557 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
4558
4d81111e
KR
4559 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4560 call. Reported by Hyperdivision.
4561
4562 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
4563 Reported by Hyperdivision.
4564
4565 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
4566 Hyperdivision.
4567
7e6e6b37
DH
45682004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4569
4570 Hide the implementation of ilocs and isyms in eval.c.
4571
4572 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4573 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
4574 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
4575 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
4576 eval.h to eval.c.
4577
4578 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
4579 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
4580 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
4581 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
4582 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
4583 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
4584 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
4585 renamed to ISYMNUM.
4586
4587 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
4588 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
4589 Extracted printing of ilocs and isyms to guile internal functions
4590 scm_i_print_iloc, scm_i_print_isym of eval.c.
4591
caab294f
KR
45922004-04-22 Kevin Ryde <user42@zip.com.au>
4593
7aaf4758
KR
4594 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
4595
caab294f
KR
4596 * numbers.c (scm_round): Test for x already an integer, to avoid bad
4597 rounding in x+0.5 when x is a big value already an integer. In
4598 certain hardware rounding cases x+0.5 can give an adjacent integer,
4599 leading to that as the result, when we really just wanted x itself.
4600
b1cb24ff
DH
46012004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4602
4603 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
4604
4605 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
4606 added const qualifiers, cast intentionally unused expressions to
4607 void for emphasis, improved comment.
4608
5065b40d
DH
46092004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4610
4611 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
4612 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
4613 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
4614 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
4615 Defined the tc8-tag for flags to be 0x04, which will mean that
4616 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
4617 to the reduced number of bits and the simpler bit pattern for
4618 SCM_BOOL_F, certain machines may be able to use more efficient
4619 processor instructions to deal with SCM_BOOL_F.
4620
4621 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
4622 never been defined in a released version, thus no need to
4623 deprecate them.
4624
4625 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
4626 instead of tc9 tags.
4627
4628 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
4629 of tc9 tags.
4630
4631 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
4632 could have used this definition.
4633
4634 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
4635 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
4636 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
4637 as isyms, as special isyms don't exist any more.
4638
9fa6c119
KR
46392004-04-18 Kevin Ryde <user42@zip.com.au>
4640
e08d2eee
KR
4641 * filesys.c (scm_readdir): Use readdir_r when available, for thread
4642 safety.
4643
9fa6c119
KR
4644 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
4645 explicit swapping code.
4646
c9cdd396
KR
46472004-04-15 Kevin Ryde <user42@zip.com.au>
4648
4649 * cpp_sig_symbols.in: Add SIGSYS.
4650
4651 * list.c (scm_append_x): Use iterative style, to avoid non-tail
4652 recursion.
4653
4654 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
4655 frac/big and frac/frac, use scm_less_p for exact comparison.
4656
83ac9c59
KR
4657 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
4658 with big/inum.
4659
84a4be9a
KR
4660 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
4661
84fad130
HWN
46622004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
4663
6b69393d
HWN
4664 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
4665
84fad130
HWN
4666 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
4667 scm_c_{up,down}case.
4668 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
4669 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
4670
c3110a30
KR
46712004-04-06 Kevin Ryde <user42@zip.com.au>
4672
0b288f36
KR
4673 * numbers.c (scm_ash): Remove stray "}" in docstring.
4674
ea2508c8
KR
4675 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
4676 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
4677 calling mpz_cmp_ui in most cases.
4678
c3110a30
KR
4679 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
4680 for big == abs(most-negative-fixnum) special case.
4681 (abs_most_negative_fixnum): Remove, no longer used.
4682
4683 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
4684 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
4685 calling (sigaction NSIG).
4686
4687 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
4688 and fork error cases to do this.
4689
dec40cd2
DH
46902004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4691
4692 * eval.c (CEVAL): Don't distinguish between short and long
4693 instructions when dispatching - just always dispatch on the
4694 instruction code, which is common for short and long instructions.
4695 Further, removed unnecessary goto statements and added comment.
4696
0e7bb795
DH
46972004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4698
4699 * eval.c (scm_unmemocopy): Don't distinguish between short and
4700 long instructions when dispatching - just always dispatch on the
4701 instruction code, which is common for short and long instructions.
4702 Further, removed unnecessary goto statements, fixed indentation
4703 and replaced SCM_IMP predicates by SCM_NULLP.
4704
f9986767
DH
47052004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4706
4707 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
4708 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
4709 'checkmacro'.
4710
fbc42231
KR
47112004-03-31 Kevin Ryde <user42@zip.com.au>
4712
4713 * simpos.c: Include <signal.h> for SIG_IGN and friends.
4714
434f2f7a
DH
47152004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4716
4717 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
4718 SCM_DEBUGGINGP:
4719
4720 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
4721 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
4722 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
4723 single interface that also matches the naming conventions.
4724 Probably scm_debug_mode_p should be part of the private interface
4725 anyway.
4726
4727 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
4728 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
4729 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
4730 to scm_debug_mode_p.
4731
4732
4733 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
4734
4735 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
4736 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
4737 from debug.h to eval.h.
4738
4739 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
4740 more, just leave it with setting scm_debug_mode_p, which is
4741 equivalent for practical purposes.
4742
4743 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
4744 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
4745
4746 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
4747
4748 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
4749 static and renamed it to ceval throughout. Provide a new exported
4750 but deprecated function scm_ceval as a wrapper for backwards
4751 compatibility. The same is done for the deval/scm_deval pair of
4752 functions.
4753
4754 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
4755 throughout. Defined CEVAL to ceval or deval, based on compilation
4756 phase.
4757
4758 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
4759 to ceval and deval instead of calling *scm_ceval_ptr.
4760
4761 * eval.c (dispatching_eval): New deprecated static function.
4762
4763 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
4764 to emulate its old behaviour as closely as possible.
4765
4766
4767 Change the evaluator such that only expressions for which pair? is
4768 true are passed to CEVAL, and such that all other expressions are
4769 evaluated outside of CEVAL:
4770
4771 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
4772 expression that is assumed to be memoized already. All but
4773 expressions of the form '(<form> <form> ...)' are evaluated inline
4774 without calling an evaluator.
4775
4776 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
4777 expressions of the form '(<form> <form> ...)' inline without
4778 calling an evaluator.
4779
4780 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
4781 the special case of unmemoized symbols passed on the top level.
4782
4783 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
4784 is known that the expression passed to CEVAL is of the form
4785 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
4786 now it is known that the input expression of CEVAL is a pair.
4787
47882004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
4789
4790 * eval.c (is_self_quoting_p): New static function.
4791
4792 (scm_m_quote): Use is_self_quoting_p.
4793
4794 (copy_tree): Corrected typo in comment.
4795
702551e6
HWN
47962004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
4797
bfefbf18
HWN
4798 * eval.c (s_scm_copy_tree): idem.
4799
4800 * list.c (s_scm_filter): remove "pointer" from doc string.
4801
702551e6
HWN
4802 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
4803
4804 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
4805
4806 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
4807 (display_frame): idem.
4808 (display_backtrace_file_and_line): idem.
4809
4810 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
4811 arguments.
4812
3cd23214
KR
48132004-03-26 Kevin Ryde <user42@zip.com.au>
4814
88a7ae1f
KR
4815 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
4816
3cd23214
KR
4817 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
4818 big==0 since that never occurs.
4819
4820 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
4821 scm_modular_expt, matching scheme level name `modulo-expt'.
4822
4823 * numbers.c (scm_modular_expt): Return a negative remainder for a
4824 negative divisor, the same as `modulo' does.
4825
48262004-03-26 Eric Hanchrow <offby1@blarg.net>
4827
4828 * numbers.c, numbers.h (scm_modular_expt): New function.
4829
2926035a
KR
48302004-03-25 Kevin Ryde <user42@zip.com.au>
4831
4832 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
4833 return inexact as required by r5rs.
4834
62360b89
DH
48352004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
4836
4837 * eval.c: Separated some definitions relevant for execution from
4838 the memoization part of the file.
4839
4840 (copy_tree): New static function
4841
4842 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
4843 structures are detected now and will lead to an exception instead
4844 of forcing guile to run in an endless loop, using up all the
4845 system's memory. Second, arrays in the cdr of an improper list
4846 are now copied. See the new test cases in eval.test.
4847
48482004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
4849
4850 * posix.c (scm_gethostname): Make sure len is initialised before
4851 it is used. Restructured to (hopefully) represent possible
4852 configurations more clearly in the code. Added unwind handler.
4853
3bd3bae8
KR
48542004-03-23 Kevin Ryde <user42@zip.com.au>
4855
4856 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
4857 MAXHOSTNAMELEN when available.
4858
254bf78d
MV
48592004-03-21 Marius Vollmer <mvo@zagadka.de>
4860
4861 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
4862 terminator. Rewritten the logic as a state machine, I must have
4863 been doing too much VHDL lately...
4864
4865 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
4866 themselves. Thanks to Han-Wen Nienhuys!
4867
4868 * list.c: Changed docstrings so that they no longer talk about
4869 returning 'pointers' to something.
4870
009c34a2
HWN
48712004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4872
4873 * gc.c: remove set_debug_cell_accesses! when
4874 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
4875 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
4876 debugging conditionally.
4877
54733c95
KR
48782004-03-21 Kevin Ryde <user42@zip.com.au>
4879
4880 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
4881
bbaf8747
KR
48822004-03-20 Kevin Ryde <user42@zip.com.au>
4883
4884 * posix.c (scm_gethostname): Preserve errno across free() call.
4885
726f82e7
HWN
48862004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
4887
4888 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
4889 free cells.
4890
e1350d6a
KR
48912004-03-14 Kevin Ryde <user42@zip.com.au>
4892
4893 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
4894 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
4895
62055253
KR
48962004-03-07 Kevin Ryde <user42@zip.com.au>
4897
4898 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
4899 than "GMT" always.
4900 (filltime): Make zname parameter "const".
4901
92e64b87
MD
49022004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
4903
4904 * threads.c, threads.h (scm_c_scm2thread): New function.
4905
004ad931
KR
49062004-02-29 Kevin Ryde <user42@zip.com.au>
4907
4908 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
4909 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
4910 particular don't assume "defined (__alpha__) && ! defined (linux)"
4911 means OSF. Remove "SCO" code, which was not really SCO specific and
4912 which John W. Eaton advises should be long past being needed.
4913
4914 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
4915 error throw.
4916
72ea45ac
KR
49172004-02-24 Kevin Ryde <user42@zip.com.au>
4918
4919 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
4920
2af0602e
KR
49212004-02-22 Kevin Ryde <user42@zip.com.au>
4922
4923 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
4924 complex, same as for two args. (Handle only inum, big, real, frac).
4925
b114eafe
KR
49262004-02-21 Kevin Ryde <user42@zip.com.au>
4927
4928 * posix.c (scm_crypt): Use new HAVE_CRYPT.
4929 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 4930 Reported by Andreas Voegele.
b114eafe 4931
1e55d288
NJ
49322004-02-20 Neil Jerram <neil@ossau.uklinux.net>
4933
4934 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
4935 validation.
4936
4937 * read.c (scm_lreadparen): Removed.
4938 (scm_lreadparen1): Renamed scm_i_lreadparen.
4939
eb741d98
HWN
49402004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
4941
4942 * list.c (scm_list_n): validate non-immediate arguments;
4943 this will catch forgotten a SCM_UNDEFINED.
4944
4e28ba5e
MV
49452004-02-18 Marius Vollmer <mvo@zagadka.de>
4946
4947 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
4948 Thanks to Bill Schottstaedt!
4949
4950 * socket.h (scm_gethost): Removed prototype it is already in
4951 "net_db.h". Thanks to Bill Schottstaedt!
4952
ef861ead
KR
49532004-02-18 Kevin Ryde <user42@zip.com.au>
4954
4955 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
4956 order parameter to mpz_import, in fact with just one word there's no
4957 order to worry about at all.
4958
4959 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
4960 and frac==complex, make an exact comparison rather than converting
4961 with fraction2double.
4962
4963 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
4964 shared library, since environ is not directly available there.
4965
4966 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
4967 standard.
4968
4969 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
4970 errno EINVAL in case localtime and gmtime don't set it.
4971 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
4972 SCM_SYSERROR, since mktime and strptime generally don't set errno.
4973
ae43d08e 49742004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 4975
c9ea6462
KR
4976 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
4977 which were permitted in the past for these.
4978
292dfa7f
KR
4979 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
4980 previous change to numbers.c.
4981
ae43d08e
KR
4982 * script.c (scm_shell_usage): Print bug-guile email address, as per
4983 GNU standard. Reported by Han-Wen Nienhuys.
4984
711a9fd7
MD
49852004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4986
4987 * unif.c (scm_make_uve): Removed local variable and simplified
4988 code in order to avoid compiler used uninitialized warnings.
4989
4990 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
4991 scm_hash_map.
4992 (scm_hash_fold): Use scm_call_3 directly in the call to
4993 scm_internal_hash_fold instead of going via fold_proc (which is
4994 now removed).
4995 (scm_hash_for_each): Use a trampoline +
4996 scm_internal_hash_for_each_handle.
4997 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
4998 functions.
4999
3da7f6b2
KR
50002004-02-12 Kevin Ryde <user42@zip.com.au>
5001
344a212f
KR
5002 * ports.c (scm_port_line): In docstring, note first line is 0.
5003 (scm_set_port_line_x): In docstring, note first line is 0.
5004 (scm_port_column): In docstring, there's no default to current input
5005 port, and remove shared port-line @defun.
5006 (scm_set_port_column_x): In docstring, there's no default to current
5007 input port, note first column is 0, remove shared set-port-line!
5008 @defun.
5009
3da7f6b2
KR
5010 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
5011 convert args the same way that array-set! does.
5012
5013 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
5014 for dvect.
5015 (scm_array_p): Add missing "break"s in switch, fix llvect test look
5016 for "l" not "s", fix dvect to be false for singp(prot) since such a
5017 value is for fvect.
5018 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
5019 (exactly_one_third): New variable.
5020 (scm_init_unif): Initialize it.
3da7f6b2 5021
cd21f5eb
NJ
50222004-02-10 Neil Jerram <neil@ossau.uklinux.net>
5023
5024 * read.c (scm_read_opts): Change `escaped-parens' to
5025 `elisp-strings'.
5026
16353acc
NJ
50272004-02-08 Neil Jerram <neil@ossau.uklinux.net>
5028
5029 * read.c (scm_read_opts): New opts `elisp-vectors' and
5030 `escaped-parens'.
5031 (s_vector): New.
5032 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
5033 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
5034 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
5035 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
5036 `escaped-parens' option set.
5037 (scm_read_token): If elisp vector syntax active, disallow [ and ]
5038 in tokens.
5039 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
5040 (scm_lreadparen1): New.
5041
5042 * read.h: Remove conditionally compiled last arg to
5043 scm_lreadparen.
5044 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
5045
f62b9dff
HWN
50462004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
5047
5048 * eval.c (m_expand_body): remove stray variable new_body.
5049
ef5b6b61
MV
50502004-01-22 Marius Vollmer <mvo@zagadka.de>
5051
5052 * eval.c (m_expand_body): Rewrite the expression in place (by
5053 overwriting FORMS) also when a letrec is constructed, not only
5054 when no definitions are found. Do not return rewritten expression
5055 to emphasize the in-place rewriting. Changed all users.
5056
7eec4c37
HWN
50572004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
5058
5059 * gc.c: add protected_object_count, a number that is dumped from
5060 gc_stats()
5061
25ffbdac
MV
50622004-01-11 Marius Vollmer <mvo@zagadka.de>
5063
5064 * dynwind.h, dynwind.c (scm_frame_unwind,
5065 scm_frame_unwind_handler): Renamed and changed all uses.
5066 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
5067
08568c95
KR
50682004-01-11 Kevin Ryde <user42@zip.com.au>
5069
5070 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
5071 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
5072 changes made to scheme-compound.texi.
5073
5565749c
MV
50742004-01-10 Marius Vollmer <mvo@zagadka.de>
5075
25ffbdac
MV
5076 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
5077 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
5078
5079 * guile-snarf.in: Use mkdir to create a unique temporary directory
5080 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 5081
fc6bb283
MV
50822004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5083
7ebccde8
MV
5084 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
5085 argument since it is always zero now. Changed all callers.
5086 Removed code for handling fluids.
96e3b2f8
MV
5087
5088 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
5089 the wind chain explicitely. Use scm_c_with_fluid for the common
5090 case of only one fluid.
5091 (scm_with_fluid): New.
5092 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
5093
fc6bb283 5094 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
5095 (scm_with_fluid): New.
5096 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
5097
5098 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
5099 do the unwinding directly. It is simple enough.
5100
5101 * dynwind.h, dynwind.c: Did the following renamings:
5102 scm_begin_frame -> scm_frame_begin,
5103 scm_end_frame -> scm_frame_end,
5104 scm_on_unwind -> scm_frame_unwind,
5105 scm_on_rewind -> scm_frame_rewind,
5106 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
5107 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
5108 Changed all uses.
5109
5110 * aync.h, async.c: Did the follwing renamings:
5111 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
5112 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
5113 Changed all uses.
5114
5115 * ports.h, ports.c: Did the follwing renamings:
5116 scm_with_current_input_port -> scm_frame_current_input_port,
5117 scm_with_current_output_port -> scm_frame_current_output_port,
5118 scm_with_current_error_port -> scm_frame_current_error_port.
5119 Changed all uses.
5120
298ab996
KR
51212004-01-07 Kevin Ryde <user42@zip.com.au>
5122
5123 * numbers.c (s_bignum): Remove, not used since gmp bignums.
5124 Reported by Richard Todd.
5125
ba40113e
KR
5126 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
5127 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
5128
298ab996
KR
5129 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
5130 traversing the args list, fixes segv if an improper list is given.
5131 Reported by Rouben Rostamian.
5132
aacff585
MV
51332004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5134
5135 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
5136 swap_data on stack, use a 'malloc obj'.
5137
5138 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
5139 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
5140 scm_i_... since they are internal. Changed all uses.
5141
5142 * dynwind.c (frame_print): Removed, use the default printer.
5143 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
5144 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
5145 to protect SCM values.
5146
5147 * dynwind.h (SCM_F_WIND_EXPLICITELY,
5148 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
5149 Changed all uses.
5150 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
5151
49c00ecc
MV
51522004-01-05 Marius Vollmer <mvo@zagadka.de>
5153
5154 * ports.h, ports.c (scm_with_current_input_port,
5155 scm_with_current_output_port, scm_with_current_error_port): New.
5156
5157 * async.h, async.c (scm_with_blocked_asyncs,
5158 scm_with_unblocked_asyncs): New.
5159
dab514a8
MV
51602004-01-03 Marius Vollmer <mvo@zagadka.de>
5161
5162 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
5163 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
5164 New.
5165 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
5166 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
5167 function when the outermost wind point has been reached. The
5168 latter is used to copy a continuation stack at the right time.
5169 scm_dowinds remains available.
5170 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
5171 tc16_guard, guards_print): Removed.
5172 (scm_internal_dynamic_wind): Reimplemented using frames.
5173
5174 * continuations.c (copy_stack): New, do only the stack copying
5175 part of copy_stack_and_call.
5176 (copy_stack_and_call): Copy the stack after unwinding and before
5177 rewinding.
5178 (scm_dynthrow): Do not call scm_dowinds, this is now done by
5179 copy_stack_and_call.
5180
441a25d9
KR
51812004-01-04 Kevin Ryde <user42@zip.com.au>
5182
5183 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 5184 can give bad results due to rounding.
441a25d9 5185
e0499207
KR
5186 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
5187 setzone/restorezone protection for DOS.
5188
89fcf1b4
MV
51892003-12-26 Marius Vollmer <mvo@zagadka.de>
5190
5191 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
5192 and scm_t_uintmax to be defined in scmconfig.h
5193
caff34d4
KR
51942003-12-03 Kevin Ryde <user42@zip.com.au>
5195
5196 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
5197
5198 * numbers.c (scm_make_ratio): Check for numerator equal to
5199 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
5200 giving integer -1.
5201
5202 * numbers.c (scm_real_part): Return fraction unchanged rather than
5203 converting to flonum.
5204
2d0b85ac
DH
52052003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
5206
5207 * modules.c (module_variable): Fixed (and thus simplified) the
5208 definition of SCM_BOUND_THING_P to reflect the fact that since
5209 after the 1.4 series of guile, obarrays only hold variable
5210 objects.
5211
2297981d
MV
52122003-11-30 Marius Vollmer <mvo@zagadka.de>
5213
5214 * numbers.c (scm_logand): It's "#b...", not "#\b...".
5215
5216 From Paul Jarc:
5217
5218 * read.c (scm_lreadr): Signal an error for invalid escape
5219 sequences in strings. Code cleanups too.
5220
5221 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
5222 writing control characters in strings.
5223
52242003-11-21 Marius Vollmer <mvo@zagadka.de>
5225
5226 * ports.c (scm_drain_input): Bug fix: only access the port after
5227 checking that it indeed is one.
5228
5c264007
DH
52292003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5230
5231 * eval.c (s_bad_define): New static identifier.
5232
5233 (m_body): Fixed comment.
5234
5235 (scm_m_define): Don't generate memoized code for definitions that
5236 are not on the top level. As a consequence, no memoized code at
5237 all is generated for definitions any more: Top level definitions
5238 are executed immediately during memoization and internal
5239 definitions are handled separately in m_expand_body.
5240
5241 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
5242 definitions. Consequently, there is no unmemoizing code any more
5243 that might modify the environment. Thus, the old scm_unmemocopy
5244 is removed and the old unmemocopy is renamed to scm_unmemocopy.
5245
5246 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
5247 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
5248 over SCM_NIMP in places, where the argument is known to be part of
5249 a proper list.
5250
018d4730
KR
52512003-11-21 Kevin Ryde <user42@zip.com.au>
5252
5253 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
5254 for bignums.
5255
5256 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
5257 to share some shifting.
5258
5259 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
5260 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
5261 since gc does this.
5262
4bca30d8
MV
52632003-11-19 Marius Vollmer <mvo@zagadka.de>
5264
fb16d26e
MV
5265 * numbers.c (scm_make_ratio): Rewritten to have a simpler
5266 structure. Previously, not all cases with a negative denominator
5267 were covered.
5268
4bca30d8
MV
5269 * numbers.c (mem2decimal_from_point): use scm_divide instead of
5270 scm_divide2real when forming the fractional part. This allows
5271 "#e1.2" to yield 6/5.
5272
5273 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
5274 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
5275 fractions were equal to each other regardless of value. Ooops.
5276
5277 * numbers.c (scm_rationalize): Return an inexact result when given
5278 inexact arguments.
5279
5280 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
5281 non-numbers.
5282
bdf26b60
MV
52832003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5284
5285 Support for exact fractions from Bill Schottstaedt! Thanks!
5286
5287 * print.c (scm_iprin1): Handle fractions.
5288
5289 * objects.h (scm_class_fraction): New.
5290 * objects.c (scm_class_fraction): New.
5291 (scm_class_of): Handle fractions.
5292
5293 * hash.c (scm_hasher): Handle fractions.
5294
5295 * numbers.c: New code for handling fraction all over the place.
5296 (scm_odd_p, scm_even_p): Handle inexact integers.
5297 (scm_rational_p): New function, same as scm_real_p.
5298 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
5299 New exact functions that replace the inexact 'dsubr'
5300 implementations.
5301 (scm_numerator, scm_denominator): New.
5302
5303 * numbers.h (SCM_NUMP): Recognize fractions.
5304 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
5305 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
5306 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
5307 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
5308 SCM_FRACTION_REDUCED): New.
5309 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
5310 New prototypes.
5311 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
5312 scm_rational_p): New prototypes.
5313 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
5314 scm_i_print_fraction): New prototypes.
5315
5316 * goops.c (create_standard_classes): Create "<fraction>" class.
5317
5318 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
5319
5320 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
5321 case in the switch, but do nothing for now.
5322
5323 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
5324 to doubles when calling 'dsubr' functions.
5325
5326 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
5327
28fda544
RB
53282003-11-18 Rob Browning <rlb@defaultvalue.org>
5329
5330 * gen-scmconfig.c (main): remove public definition of
5331 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
5332 direct typedef of long_long and ulong_long inside deprecated block
5333 when appropriate.
5334
5335 * deprecated.h: move long_long and ulong_long definitions to
5336 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
5337 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
5338
b58e7420
MV
53392003-11-17 Marius Vollmer <mvo@zagadka.de>
5340
9a1d7d7c
MV
5341 * hash.c (scm_string_hash): New hashing algorithm that takes the
5342 complete string into account.
5343
b58e7420
MV
5344 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
5345 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
5346 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
5347 SCM_ASSYNT.
b58e7420
MV
5348
5349 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
5350 the "-e" option instead of scm_str2symbol. This allows things
5351 like (@ ...) to be specified for the entry point.
5352
461bffb1
DH
53532003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5354
5355 * eval.c (scm_m_letstar): Create memoized code in place to
5356 minimize consing.
5357
6f81708a
DH
53582003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5359
5360 * eval.c (s_splicing): Commented and reformulated.
5361
5362 (lookup_global_symbol, lookup_symbol): New static functions.
5363
5364 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
5365
5366 (try_macro_lookup, literal_p): Use lookup_symbol instead of
5367 creating a temporary pair for scm_lookupcar.
5368
5369 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
5370 created deprecated wrapper function scm_unmemocar.
5371
5372 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
5373 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
5374 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
5375 undefineds, sym_three_question_marks): Moved around without
5376 modifications.
5377
5378 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
5379
910b5125
DH
53802003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5381
5382 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
5383 m_expand_body, scm_m_expand_body): Grouped together with m_body.
5384 No further modifications.
5385
c86c440b
DH
53862003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
5387
5388 * eval.c (s_mixed_body_forms): New static identifier.
5389
5390 (canonicalize_define, scm_m_define): The check for a bad
5391 expression is performed in canonicalize_define now.
5392
5393 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
5394 static helper functions for m_expand_body.
5395
5396 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
5397 expand user defined macros. Fixed handling of the definition/
5398 expression boundary. Fixed handling of definitions grouped with
5399 'begin. Use canonicalize_define to expand definitions.
5400
3890131a
MV
54012003-11-13 Marius Vollmer <mvo@zagadka.de>
5402
b58e7420
MV
5403 * read.c (scm_lreadr): detect EOF after backslash, and interpret
5404 \xNN hexadecimal sequences. From Paul Jarc, thanks!
5405
5df36eac
MV
5406 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
5407 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
5408 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
5409 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
5410 New macros from Paul Jarc. Thanks!
5411
3890131a
MV
5412 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
5413 return NULL when the machine type is unknown. Previously,
5414 gc_os_dep.c would refuse to compile.
5415
430b8401
DH
54162003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5417
5418 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
5419 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
5420 scm_m_body to m_body.
5421
328dc9a3
DH
54222003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
5423
5424 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
5425 public use of scm_m_expand_body in eval.h. In eval.c, renamed
5426 scm_m_expand_body to m_expand_body and made it static. Added
5427 deprecated wrapper scm_m_expand_body.
5428
5429 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
5430 of scm_m_expand_body.
5431
c2337a61
KR
54322003-11-09 Kevin Ryde <user42@zip.com.au>
5433
5434 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
5435 argument. Reported by Mike Gran.
5436
ced8edb0
DH
54372003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5438
5439 * eval.c (s_missing_body_expression): New static identifier.
5440
5441 (s_body): Removed.
5442
5443 (scm_m_expand_body): Fixed core dump when passing a body with
5444 defines, but without expressions (see additions to syntax.test).
5445 Use ASSERT_SYNTAX to signal syntax errors.
5446
0f572ba7
DH
54472003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5448
5449 * eval.c (canonicalize_define): New static helper function.
5450
5451 (memoize_define, canonicalize_define): Extract handling of
5452 function currying to canonicalize_define.
5453
2510c810
DH
54542003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
5455
5456 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5457 Make sure that error checking in debug mode is not worse than in
5458 standard mode.
5459
34adf7ea
DH
54602003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5461
5462 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
5463 handled in scm_m_body any more, but rather in scm_m_lambda.
5464
5465 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
5466 scm_m_letrec, scm_m_expand_body): Check for validity is done by
5467 calling functions of scm_m_body.
5468
5469 (scm_m_lambda): Avoid unnecessary consing when creating the
5470 memoized code.
5471
89bff2fc
DH
54722003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
5473
5474 * eval.c (s_expression): Added comment.
5475
5476 (s_empty_combination, error_unbound_variable): New static
5477 identifiers.
5478
5479 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
5480 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
5481 signal syntax errors.
5482
5483 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
5484 scheme objects.
5485
60a49842
DH
54862003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
5487
5488 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
5489 Grouped together with unmemocopy, without modifications.
5490
5491 (build_binding_list, unmemocopy): Renamed names of list arguments
5492 and variables to reflect the actual order of the list elements.
5493
70c1c108
DH
54942003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
5495
5496 * eval.c (s_defun): New static identifier.
5497
5498 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
5499 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5500 when creating the memoized code.
5501
0ee39677
KR
55022003-10-19 Kevin Ryde <user42@zip.com.au>
5503
5504 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
5505
5506 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
5507 in accordance with R5RS, which just mpz_get_d doesn't really give.
5508
9a848baf
DH
55092003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5510
5511 * eval.c (s_bad_slot_number): New static identifier.
5512
5513 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
5514 signal syntax errors. Avoid unnecessary consing when creating the
5515 memoized code.
5516
da48db62
DH
55172003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5518
5519 * eval.c (scm_m_cont, scm_m_at_call_with_values,
5520 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
5521 errors. Avoid unnecessary consing when creating the memoized
5522 code.
5523
5524 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
5525 standard case. Make sure line and file information are copied to
5526 every created expression.
5527
82b3e2c6
DH
55282003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5529
5530 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
5531 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
5532 when creating the memoized code.
5533
5534 (scm_m_atbind): Reversed the order, in which the init expressions
5535 are stored and executed. The order of execution is now equal to
5536 the order in which the initializers of the let-forms are executed.
5537 Use check_bindings and transform_bindings.
5538
5539 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
5540 !SCM_NULLP. Added some comments.
5541
21628685
DH
55422003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5543
5544 * eval.c: Sorted include files alphabetically.
5545
5546 (scm_m_begin): Added comment.
5547
5548 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5549 unnecessary consing when creating the memoized code.
5550
5551 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
5552 syntax errors. Be more specific about the kind of error that was
5553 detected.
5554
5555 (scm_m_quote, unmemocopy): As an optimization, vector constants
5556 are now inserted unquoted into the memoized code. During
5557 unmemoization the quotes are added again to provide syntactically
5558 correct code.
5559
d6754c23
DH
55602003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5561
5562 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
5563 scm_m_expand_body, check_bindings): Extracted syntax checking of
5564 bindings to new static function check_bindings.
5565
5566 (scm_m_let, memoize_named_let): Extracted handling of named let to
5567 new static function memoize_named_let.
5568
5569 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
5570 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
5571 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
5572 unnecessary consing when creating the memoized code.
5573
03a3e941
DH
55742003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5575
5576 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
5577 static identifiers.
5578
5579 (s_clauses, s_formals, s_duplicate_formals): Removed.
5580
5581 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
5582 specific about the kind of error that was detected. Prepare for
5583 easier integration of changes for separated memoization.
5584
da48db62 55852003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
5586
5587 * eval.c (s_duplicate_binding): New static identifier.
5588
5589 (scm_m_case): Call scm_c_memq instead of implementing it inline.
5590
5591 (scm_m_define): Added comment about how we check for duplicate
5592 formals.
5593
5594 (scm_m_do): Added check for duplicate bindings.
5595
5596 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5597 unnecessary consing when creating the memoized code.
5598
5599 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
5600 scm_c_improper_memq to c_improper_memq, since it is not exported.
5601
5602 (transform_bindings): Call scm_c_memq rather than
5603 scm_c_improper_memq.
5604
5605 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
5606
da48db62 56072003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
5608
5609 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
5610 static identifiers.
5611
5612 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
5613 specific about the kind of error that was detected. Avoid use of
5614 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
5615 code, this way also making sure that file name, line number
5616 information etc. remain available.
5617
da48db62 56182003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
5619
5620 * eval.c (memoize_as_thunk_prototype): New static function.
5621
5622 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
5623 Avoid unnecessary consing when creating the memoized code.
5624
9b9a35b6
KR
56252003-10-12 Kevin Ryde <user42@zip.com.au>
5626
5627 * list.c (scm_append): Track argument number and use in error.
5628
cc56ba80
DH
56292003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5630
5631 * eval.c (s_missing_expression, s_bad_variable): New static
5632 identifiers.
5633
5634 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
5635 R5RS terminology for the naming of variables. Be more specific
5636 about the kind of error that was detected. Make sure file name,
5637 line number etc. are added to all freshly created expressions.
5638 Avoid unnecessary consing when creating the memoized code.
5639
609a8b86
DH
56402003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5641
5642 * eval.c (s_extra_expression, s_misplaced_else_clause,
5643 s_bad_cond_clause, s_missing_recipient): New static identifiers.
5644
5645 (s_extra_case_clause): Removed.
5646
5647 (scm_m_case, scm_m_cond): If a clause appears after an else
5648 clause, report a misplaced else clause.
5649
5650 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
5651 specific about the kind of error that was detected. Handle bound
5652 'else and '=>. Avoid unnecessary consing when creating the
5653 memoized code.
5654
5655 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5656 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
5657 syntactic keyword '=>.
5658
58a2510b
DH
56592003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5660
5661 * eval.c (scm_m_case): Allow empty lists of case labels.
5662
2a6f7afe
DH
56632003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
5664
5665 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
5666
5667 * print.c (scm_isymnames): Add names for the new memoizer codes.
5668
5669 * eval.c (s_missing_clauses, s_bad_case_clause,
5670 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
5671 literal_p): New static identifiers.
5672
5673 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
5674 specific about the kind of error that was detected. Check for
5675 duplicate case labels. Handle bound 'else. Avoid unnecessary
5676 consing when creating the memoized code.
5677
5678 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
5679 the syntactic keyword 'else.
5680
e6729603
DH
56812003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
5682
5683 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
5684 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
5685
5686 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
5687 unnecessary consing when creating the memoized code.
5688
9ddeb776
KR
56892003-10-09 Kevin Ryde <user42@zip.com.au>
5690
5691 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
5692 cast gives for values bigger than a long, or for nan or inf.
5693
df5af69a
DH
56942003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
5695
5696 * smob.h (scm_make_smob_type): Made the declaration match the
5697 definition.
5698
da0e6c2b
MV
56992003-10-07 Marius Vollmer <mvo@zagadka.de>
5700
5701 * goops.c, objects.h, smob.c, smob.h: Make type names char
5702 const * instead of char *. Thanks to Paul Jarc!
5703
591924eb
KR
57042003-10-02 Kevin Ryde <user42@zip.com.au>
5705
ff6ea7b9 5706 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
5707 rather than scm_strport_to_string, so as to guard against the port
5708 having been closed by the called procedure. Reported by Nic Ferrier.
5709
f03314f9
DH
57102003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5711
5712 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
5713
5714 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
5715 tags.h to deprecated.h.
5716
534c55a9
DH
57172003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5718
5719 This set of patches introduces a new tc7 code scm_tc7_number for
5720 numbers. Bignums, reals and complex numbers are turned from smobs
5721 into subtypes of scm_tc7_number.
5722
5723 * tags.h (scm_tc7_number): New.
5724
5725 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
5726 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
5727 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
5728 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
5729 (scm_class_of), print.c (scm_iprin1), smob.c
5730 (scm_smob_prehistory): Don't handle bignums, reals and complex
5731 numbers as subtypes of scm_tc7_smob any more.
5732
5733 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
5734 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
5735
29c4382a
DH
57362003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5737
5738 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
5739 sizeof (scm_t_complex) to determine the memory size of the
5740 malloc'd area for complex numbers.
5741
47ae1f0e
DH
57422003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
5743
5744 * numbers.c (scm_bigequal): Fixed.
5745
859b6b2f
MV
57462003-09-16 Marius Vollmer <mvo@zagadka.de>
5747
5748 * stime.c (scm_current_time): 'time' does not set errno so don't
5749 use SCM_SYSERROR for reporting errors.
5750
e17d318f
DH
57512003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5752
5753 This set of patches eliminates the dependency between the
5754 implementation of evaluator specific memoization codes and special
5755 constants like #f, '() etc. ('flags'), which are not evaluator
5756 specific. The goal is to remove definitions of evaluator
5757 memoization codes completely from the public interface. This will
5758 make it possible to experiment more freely with optimizations of
5759 guile's internal representation of memoized code.
5760
5761 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
5762
5763 * print.c (iflagnames): New array, holding the printed names of
5764 guile's special constants ('flags').
5765
5766 (scm_isymnames): Now holds only the printed names of the
5767 memoization codes.
5768
5769 (scm_iprin1): Separate the handling of memoization codes and
5770 guile's special constants.
5771
5772 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
5773 SCM_IFLAGNUM): new
5774
5775 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
5776 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
5777 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
5778 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
5779 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
5780 values.
5781
5782 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
5783
5784 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
5785 tc9 macros and scm_tc9_flag.
5786
eecac806
MV
57872003-09-15 Marius Vollmer <mvo@zagadka.de>
5788
5789 * posix.c (scm_setgroups): Check that the gid list is not too
5790 long. Thanks to Paul Jarc!
5791
22f2cf2d
DH
57922003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
5793
5794 * tags.h: Reduced the number of short instructions from 14 to 13.
5795 The typecode of the former 14th short instruction is now used to
5796 represent long instructions. Changed some comments to reflect
5797 this fact.
5798
5799 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
5800 previously used by SCM_IM_DEFINE.
5801
5802 (SCM_IM_DEFINE): Turned into a long instruction.
5803
5804 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
5805 instruction.
5806
5807 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
5808 code that is separate from all instructions, one level of dispatch
5809 for long instructions can be eliminated.
5810
5811 * print.c (scm_isymnames): Removed some commented code.
5812
62f548e1
MV
58132003-09-12 Marius Vollmer <mvo@zagadka.de>
5814
97a61c5f
MV
5815 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
5816 compiler on IA64.
5817
50e0ba57
MV
5818 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
5819
5820 * modules.c (scm_module_reverse_lookup): Check that the obarray
5821 really is a hashtable and do nothing if not.
5822
62f548e1
MV
5823 * inline.h: Use "extern inline" only with GCC. Use "static
5824 inline" else.
5825
0d5e3480
DH
58262003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5827
5828 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
5829 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5830
5831 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
5832 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
5833 deprecated.h.
5834
6b412e91
DH
58352003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
5836
5837 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
5838 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5839
5840 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
5841 0.0==some_expression to some_expression==0.0. The latter is
5842 better readable. The former is preferred by some people, since it
5843 leads to a compiler error when confusing == with =. However, when
5844 using gcc, a warning will be issued if in an if-statement an
5845 assigment appears. Since many Guile developers are using gcc,
5846 such errors will not remain unnoticed anyway. We can therefore
5847 focus on better readability.
5848
7e3b25bf
DH
58492003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5850
5851 * tags.h: Added description of Guile's type system. Removed some
5852 old and misleading comments.
5853
3ea39242
DH
58542003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5855
5856 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
5857 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5858
5d7d39ff
DH
58592003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5860
5861 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
5862
5863 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
5864 respective SLOPPY macro.
5865
baa84a20
DH
58662003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
5867
5868 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
5869 type string, not SCM_TYP7S.
5870
ba15f500
KR
58712003-09-03 Kevin Ryde <user42@zip.com.au>
5872
5873 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
5874 2s-complement.
5875
53bb8782
KR
5876 * stime.c (scm_strptime): Add comment about glibc strptime %s and
5877 current timezone requiring SCM_DEFER_INTS.
5878
defdc4b4
NJ
58792003-08-30 Neil Jerram <neil@ossau.uklinux.net>
5880
5881 * script.c (scm_compile_shell_switches): Make -s switch optional
5882 if file to be loaded does not begin with a `-'. (Thanks to Aaron
5883 VanDevender for the patch!)
5884
0f008a15
KR
58852003-08-30 Kevin Ryde <user42@zip.com.au>
5886
5887 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
5888 and to have non-integer types rejected as per other logical funcs.
5889
438a3ba1
KR
58902003-08-28 Kevin Ryde <user42@zip.com.au>
5891
5892 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
5893
98dceb37
KR
58942003-08-23 Kevin Ryde <user42@zip.com.au>
5895
5896 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
5897 thread safe, and could take a long time too.
5898
1fa79a38
KR
58992003-08-22 Kevin Ryde <user42@zip.com.au>
5900
5901 * numbers.c (scm_difference): Correction to bignum - negative inum.
5902
d97f9b42
KR
59032003-08-14 Kevin Ryde <user42@zip.com.au>
5904
5905 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
5906 [__GNUC__]: Use volatile asm macros rather than a function call.
5907 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
5908 macros while defining functions.
5909
5910 * simpos.c (getenv): Use <stdlib.h> for prototype.
5911 (scm_system): In docstring, refer to status:exit-val rather than
5912 "functions above".
5913
b9052fcc
KR
59142003-08-09 Kevin Ryde <user42@zip.com.au>
5915
5916 * srcprop.c (scm_source_properties): Return plist from hash if it's a
5917 list set by source-properties! rather than an SRCPROPS object,
5918
8e5b4b9e
KR
59192003-07-29 Kevin Ryde <user42@zip.com.au>
5920
5921 * properties.c (scm_primitive_property_ref): In docstring, note
5922 parameters to not-found-proc, use hyphens rather than underscores for
5923 that parameter name.
5924 (scm_primitive_property_set_x): In docstring, VAL is the value
5925 parameter not CODE.
5926
20703ac4
MV
59272003-07-27 Marius Vollmer <mvo@zagadka.de>
5928
c6ccee34
MV
5929 * print.c (scm_print_symbol_name): handle more weird characters by
5930 escaping the symbol name properly. Thanks to Paul Jarc!
5931
2f4931bf
MV
5932 * posix.h (scm_setgroups): New prototype.
5933 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
5934 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
5935 Don't use SCM_WRITABLE_VELTS.
5936
265c456f
MV
5937 * gc.h (SCM_GC_SET_CELL_BVEC): New.
5938 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
5939 Matthias Koeppe!
5940
20703ac4
MV
5941 * __scm.h (SCM_C_INLINE_KEYWORD): New.
5942 * numbers.c: Use it in place of SCM_C_INLINE so that the code
5943 compiles when SCM_C_INLINE is undefined.
5944
59c4bb82
DH
59452003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5946
5947 * __scm.h: Reformulated the architecture and compiler properties
5948 in terms of properties of scm_t_bits and SCM variables rather than
5949 in terms of c standard types. This is since it is not known which
5950 of the standard types scm_t_bits and SCM variables will be defined
5951 to.
5952
d7850c8d
KR
59532003-07-24 Kevin Ryde <user42@zip.com.au>
5954
5955 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
5956 and real.
5957
8a0c514f
KR
59582003-07-18 Kevin Ryde <user42@zip.com.au>
5959
5960 * numbers.c (scm_product): In complex * bignum, correction to
5961 REAL/IMAG fetch, x is the complex, not y.
5962
0aacf84e
MD
59632003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5964
5965 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
5966 scm_inf_p test as Scheme values.
5967 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
5968 and a positive inum.
5969 Use GNU indentation style.
5970
192de9a4
DH
59712003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
5972
5973 * values.c (scm_values): Build lists of length 1 by using
5974 scm_list_1 instead of using scm_cons.
5975
bbb4438a
KR
59762003-07-10 Kevin Ryde <user42@zip.com.au>
5977
b58c85ce
KR
5978 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
5979 * list.c (scm_list_n): Ditto.
5980
bbb4438a
KR
5981 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
5982
287f8ad1
KR
59832003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
5984
5985 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
5986 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
5987 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
5988 the other using intptr_t.
5989
005d2366
KR
59902003-07-08 Kevin Ryde <user42@zip.com.au>
5991
0aacf84e 5992 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
5993 (scm_magnitude): Use hypot.
5994
5995 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
5996 @footnote since it doesn't go through to guile-procedures.txt.
5997
5998 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
5999 outside @var to quieten makeinfo, and use @code.
6000
cbfe8e62
HWN
60012003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6002
6003 * gc-malloc.c (decrease_mtrigger): new function
6004 (increase_mtrigger): new function, separate debug registering and
6005 mtrigger administration.
6006 (scm_gc_realloc): bugfix: do mtrigger administration before the
6007 actual realloc, for the realloc might invalidate a GC-d segment of
6008 memory. Thanks to Sam Hocevar for pointing this out.
6009 (scm_gc_realloc): use scm_malloc_reregister instead of
6010 unregistering and registering in sequence.
6011
aeb4c2e1
HWN
60122003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6013
6014 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
6015
4c27f8d2
HWN
60162003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6017
6018 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
6019 clauses.
6020
983e697d
MV
60212003-06-29 Marius Vollmer <mvo@zagadka.de>
6022
6023 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
6024 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
6025 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
6026 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
6027 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
6028 the release_1_6 branch.
6029
78b6566e
SJ
60302003-06-25 Stefan Jahn <stefan@lkcc.org>
6031
6032 * continuations.c: Redeclaration of getcontext() via the
6033 __asm__ ("getcontext") directive.
6034
6035 * continuations.h: Include <ucontext.h> instead of
6036 <sys/ucontext.h>.
6037
1ebb8497
KR
60382003-06-21 Kevin Ryde <user42@zip.com.au>
6039
6040 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
6041 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
6042 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
6043 available.
6044 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
6045 (isfinite): Remove, conflicts with C99 isfinite().
6046
fbf85ba4
MV
60472003-06-19 Marius Vollmer <mvo@zagadka.de>
6048
6049 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
6050 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
6051 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
6052 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
6053 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
6054 the release_1_6 branch.
6055
fcc5d734
SJ
60562003-06-14 Stefan Jahn <stefan@lkcc.org>
6057
6058 * threads.h: Redefined scm_getspecific() and scm_setspecific()
6059 to be functions instead of macros.
6060
6061 * threads.c: Conditionalized inclusion of <sys/time.h> and
6062 <unistd.h>.
6063 (scm_getspecific, scm_setspecific): Made these two function
6064 real part of the API.
6065
6066 * posix.c (s_scm_putenv): Added some code to make a
6067 (putenv "FOO="), i.e. setting an empty string, work also on
6068 Win32 systems. Thanks to Kevin Ryde for the proposal.
6069
c3ae8e07
KR
60702003-06-12 Kevin Ryde <user42@zip.com.au>
6071
75b14838
KR
6072 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
6073 freebsd to comment about need to use unsetenv.
c3ae8e07 6074
9d9fa092
MV
60752003-06-02 Marius Vollmer <mvo@zagadka.de>
6076
6077 * ports.c (scm_peek_char): Safe the column of the port around the
6078 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
6079
f2478375
KR
60802003-06-07 Kevin Ryde <user42@zip.com.au>
6081
6082 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
6083 and friends required by scm_t_bits setups.
6084
6375e040
DH
60852003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6086
6087 * tags.h (scm_tc2_int): Added.
6088
6089 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
6090 scm_tc2_int.
6091
6092 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
6093 scm_tcs_closures): Hard coded values replaced by symbolic ones.
6094
f5c6ec2f
DH
60952003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6096
6097 * eval.c: Partially undid my patch from 2003-05-31. This patch
6098 caused the segfault referenced in the previous changelog entry.
6099
47dbd81e
DH
61002003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
6101
6102 * tags.h: Fixed comment about the immediate type code layout.
6103
6104 * eval.c: Fixed handling of non-special instructions. Without
6105 this patch, guile will segfault on (#\0) and similar instructions.
6106
3ec52c51
KR
61072003-06-05 Kevin Ryde <user42@zip.com.au>
6108
6109 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
6110 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
6111
e418bd7c
KR
6112 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
6113 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
6114
d0624e39
DH
61152003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6116
6117 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
6118 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
6119 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
6120 generalized it to apply not only to C level functions but also to
6121 scheme level functions.
6122
6123 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
6124 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
6125 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
6126 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
6127 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
6128 respectively.
6129
6130 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
6131 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
6132 eval.h into eval.c and a copy is placed into deprecated.h.
6133
6134 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
6135 into eval.c. This definition was not part of the API in any
6136 officially released version of guile and thus does not need to go
6137 through a phase of deprecation.
6138
e90c3a89
DH
61392003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
6140
d0624e39
DH
6141 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
6142 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
6143 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
6144 definitions are make static and renamed from scm_s_xxx to s_xxx.
6145 In deprecated.c the original definitions are copied.
6146
d0624e39
DH
6147 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
6148 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
6149 eval.h into eval.c and a copy (slightly modified to work in user
6150 code) is placed into deprecated.h.
6151
6152 * eval.c: Use the local static s_xxx definitions instead of the
6153 scm_s_xxx definitions throughout.
6154
14b18ed6
DH
61552003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6156
6157 This set of patches separates the representation of the cxr family
6158 of functions (car, cdr etc.) from the dsubr family of functions
6159 (i. e. functions that take a double precision floating point
6160 argument). Further, the algorithm for handling the cxr function
6161 is improved.
6162
6163 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
6164 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
6165 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
6166 cosh, tanh), objects.c (scm_class_of), procprop.c
6167 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
6168 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
6169 typecode for the dsubr family of functions.
6170
6171 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
6172 ramap_dsubr.
6173
6174 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
6175 (scm_init_pairs): Make use of the (now usable) second cell element
6176 of a scm_tc7_cxr function to implement the cxr family of functions
6177 more efficiently.
6178
2ca0d207
DH
61792003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
6180
6181 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
6182 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
6183 end of an if-else-if-sequence of checks.
6184
9a069bdd
DH
61852003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6186
6187 * eval.c (SCM_CEVAL): Improved readability of call-with-values
6188 execution. Generalize apply_closure to apply_proc and use that
6189 for call-with-values.
6190
e910e9d2
DH
61912003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6192
6193 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
6194 a non closure.
6195
1e498fbd
SJ
61962003-05-30 Stefan Jahn <stefan@lkcc.org>
6197
6198 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
6199 appropriately for mingw32 hosts.
6200
6201 * numbers.h: Defining copysign(), isnan() and finite() to
6202 be prefixed by a single '_' for mingw32 hosts.
6203
c47e2599
KR
62042003-05-30 Kevin Ryde <user42@zip.com.au>
6205
6206 * numbers.c (z_negative_one): New variable.
6207 (scm_init_numbers): Initialize it.
6208 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6209
2e945bcc
SJ
62102003-05-29 Stefan Jahn <stefan@lkcc.org>
6211
6212 * win32-dirent.c: Use malloc() instead of scm_malloc().
6213
6214 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
6215 warning.
6216
6217 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
6218 mingw32 build.
6219
6220 * modules.c (s_scm_module_import_interface): Renamed local
6221 variable interface to _interface. Seems like 'interface'
6222 is a special compiler directive for the mingw32 compiler.
6223
6224 * mkstemp.c: Provide prototype to avoid compiler warning.
6225
6226 * load.c (s_scm_search_path): Fixed absolute and relative
6227 path detections for native Windows platforms.
6228
6229 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
6230 to build on mingw32).
6231
6232 * gc-freelist.c ("s_scm_map_free_list",
6233 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
6234
6235 * fports.c (fport_fill_input): Disable use of
6236 fport_wait_for_input() on Win32 platforms.
6237
6238 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
6239
6240 * Makefile.am: Modified some rules for cross compiling.
6241
ddd8f927
DH
62422003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6243
6244 * eval.c (SCM_CEVAL): In case of an application, all checks for a
6245 proper function object and the correct number of arguments are now
6246 performed in the application part of SCM_CEVAL.
6247
6248 (scm_badformalsp): Removed.
6249
f8ba2197
DH
62502003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6251
6252 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
6253
79f55b7c
MD
62542003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6255
a502595f
MD
6256 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
6257 always being false by inserting preprocessor conditional. (Thanks
6258 to Bruce Korb.)
6259
79f55b7c
MD
6260 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
6261 (void *) in order to avoid an aliasing warning; thanks to Bruce
6262 Korb.)
6263
6264 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
6265
6266 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
6267 SCM_STACK_PTR.
6268
6269 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
6270 thread->base --> t->base.
6271
6272 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
6273
47dee228
MV
62742003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6275
6276 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
6277 scm_variable_set_name_hint, scm_builtin_variable,
6278 scm_internal_with_fluids, scm_make_gsubr,
6279 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
6280 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
6281 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
6282 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
6283 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
6284 scm_make_subr_with_generic, scm_make_subr_opt,
6285 scm_call_catching_errors, scm_make_smob_type_mfpe,
6286 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
6287 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
6288 branch. Some have been slightly rewritten.
6289 (scm_i_object_chars, scm_i_object_length): New, to support
6290 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
6291
e681d187
DH
62922003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6293
6294 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
6295 names and inits in the memoized code of do.
6296
7e59d9d4
MD
62972003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6298
6299 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
6300 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
6301 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
6302 a compilation error if error-on-warning is enabled).
6303
9950a42c
MV
63042003-05-17 Marius Vollmer <mvo@zagadka.de>
6305
6306 * c-tokenize.lex: Gobble up complete lines after a '#'. This
6307 removes preprocessor directives from the snarfage that might
6308 otherwise confuse us. These directives appear when compiling with
6309 "-g3", for example.
6310
0068984b
HWN
63112003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6312
26e68795
HWN
6313 * ChangeLog: add my surname
6314
0068984b
HWN
6315 * srcprop.c (scm_finish_srcprop): use
6316 scm_gc_register_collectable_memory()
6317 (scm_make_srcprops): idem.
6318
131805f0
HWN
63192003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6320
6321 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
6322 wrap-around for scm_mtrigger
6323 (scm_gc_register_collectable_memory): abort on overflowing
6324 scm_mallocated().
6325
d4611024
KR
63262003-05-13 Kevin Ryde <user42@zip.com.au>
6327
6328 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
6329 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
6330
7aaf8dc9
MD
63312003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6332
dfd03fb9
MD
6333 * backtrace.c (scm_display_error_message): Introduced fancy
6334 printing with max level 7 and length 10. (Purpose: avoid printing
6335 gigantic objects in error messages.)
6336
6337 * print.c, print.h (scm_i_port_with_print_state): New function.
6338
6339 * print.c (scm_iprin1, scm_printer_apply,
6340 scm_port_with_print_state): Use scm_i_port_with_print_state.
6341 (scm_simple_format): Modified not to destroy print states.
6342 (print_state_mutex): New mutex.
6343 (scm_make_print_state, scm_free_print_state, scm_prin1):
6344 Lock/unlock print_state_mutex.
6345
7aaf8dc9
MD
6346 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
6347 Use current names in definitions.
6348
a4d9ffa1
KR
63492003-05-10 Kevin Ryde <user42@zip.com.au>
6350
6351 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
6352
d25e96a4
KR
6353 * numbers.c (scm_integer_length): On negative bignums, adjust
6354 mpz_sizeinbase to account for it looking at absolute value where we
6355 want ones-complement.
6356
6357 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
6358 since we're only using the ulong return value, and x might not fit.
6359
5bf6a6f0
DH
63602003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6361
6362 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
6363 read. This will allow to make the definition in read.c static.
6364
f58c472a
DH
63652003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
6366
6367 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
6368 from evalext to eval. This will allow to make some of the
6369 definitions in eval.c static.
6370
90382aeb
KR
63712003-05-06 Kevin Ryde <user42@zip.com.au>
6372
6373 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
6374 (scm_logcount): Use mpz_com, not mpz_neg.
6375
3b88ed2a
DH
63762003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
6377
6378 The purpose of this patch is to make guile's internal memoizers
6379 distinguishable from memoizing macros created on the scheme level
6380 or from user provided primitive memoizing macros. The reason is,
6381 that the internal memoizers are the only ones that are allowed to
6382 transform their scheme input into memoizer byte code, while all
6383 other memoizing macros may only transform scheme code into new
6384 scheme code.
6385
6386 To achieve this, a new macro type 'builtin-macro!' is introduced.
6387 Currently, 'builtin-macro!'s are handled as memoizing macros, but
6388 this will change when the memoizer and executor are separated.
6389
6390 * macros.[ch] (scm_i_makbimacro): New.
6391
6392 * macros.h (SCM_BUILTIN_MACRO_P): New.
6393
6394 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
6395
6396 * eval.c, goops.c: All of guile's primitive memoizing macros are
6397 primitive builtin-macros now.
6398
6399 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
6400 builtin-macros are handled equally to memoizing macros.
6401
b0780eb1
MV
64022003-05-04 Marius Vollmer <mvo@zagadka.de>
6403
6404 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
6405 work around a bug in GCC 2.95.2 but is now a bug in itself.
6406
1cbf4fe9
MV
64072003-05-02 Marius Vollmer <mvo@zagadka.de>
6408
6409 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
6410 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
6411 scm_tcs_symbols): New.
6412
1a61d41b
MV
64132003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6414
096ecbaf
MV
6415 * deprecated.h, deprecated.c (scm_protect_object,
6416 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
6417 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
6418 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
6419 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
6420 scm_ensure_user_module, scm_load_scheme_module, scm_port,
6421 scm_ptob_descriptor, scm_port_rw_active,
6422 scm_close_all_ports_except): New.
6423
1a61d41b
MV
6424 * ports.c (scm_c_port_for_each): New function, mostly copied from
6425 scm_port_for_each.
6426 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
6427 * ports.h (scm_c_port_for_each): New prototype.
6428
c8e1d354
MD
64292003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6430
6431 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
6432 macro was introduced in anticipation of GOOPS method compilation
6433 code.)
6434
6435 * goops.c: Removed binding of @dispatch.
6436
a4aa2134
DH
64372003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6438
6439 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
6440 instructions that bind the macros on the scheme level back to
6441 goops.c in order to make sure again that the bindings go into the
6442 (oop goops) module and are not visible from the outside.
6443
9fbee57e
DH
64442003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6445
6446 * eval.c: Non functional change: Separated R5RS and non-R5RS
6447 macros into different sections of the file and ordered the
6448 memoizers alphabetically.
6449
12841895
DH
64502003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6451
6452 * eval.c (scm_ilookup): Rewritten to improve readability.
6453
6a3f13f0
DH
64542003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
6455
6456 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6457 Partially reverted patch from 2003-04-23 in oder to find a better
6458 compromise between readability and debuggability.
6459
b0c5d67b
DH
64602003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6461
6462 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
6463 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
6464 definitions of the special goops memoizers from goops.[ch] to
6465 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
6466 throughout guile.
6467
b9ad392e
MD
64682003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6469
6470 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
6471
6472 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
6473
6474 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
6475
6476 * ioext.c (scm_fdes_to_ports): Ditto.
6477
6478 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
6479 lock/unlock scm_i_port_table_mutex.
6480
6481 * strports.c (scm_mkstrport): Ditto.
6482
6483 * ports.c (scm_void_port, scm_port_for_each): Ditto.
6484
6485 * fports.c (scm_fdes_to_port): Ditto.
6486
d0b07b5d
DH
64872003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6488
6489 This set of patches contains no functional changes, only debatable
6490 minor stylistic ones. Still, in order to prepare a patch between
6491 my local copy and the CVS version, I decided to submit the changes
6492 below. Then, the patch will hopefully only contain relevant
6493 modifications :-)
6494
6495 * eval.c (iqq): Added const specifier.
6496
6497 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
6498 Use NULL instead of 0 to indicate that a pointer is returned.
6499 Removed some misleading 'fall through' comments.
6500
6501 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
6502 Split up long expressions into smaller ones to be more debugging
6503 friendly.
6504
a98e8e98
DH
65052003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6506
6507 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
6508 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
6509 rather than casting to SCM.
6510
c178c3a6
DH
65112003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6512
6513 * sort.c, pairs.h: Removed unnecessary includes.
6514
d339981a
DH
65152003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6516
6517 * sort.c: Replaced hand-made trampline code by the new official
6518 mechanism from eval.c. This fixes a segfault in the new test file
6519 sort.test.
6520
6521 (quicksort, compare_function, scm_restricted_vector_sort_x,
6522 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
6523 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
6524 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
6525 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
6526 eval.c.
6527
6528 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
6529 cmp_fun_t): Removed.
6530
6531 (compare_function): Added.
6532
6533 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
6534 arithmetics with index arithmetics. Changed quicksort to work on
6535 an array of SCM values instead of an array of characters. Avoid
6536 bytewise copying of SCM elements. Avoid allocating memory on the
6537 stack with alloca. Fixed some comments.
6538
821f18a4
DH
65392003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6540
6541 * eval.c (EXTEND_ENV): Eliminated.
6542
6543 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
6544 EXTEND_ENV.
6545
94fb5a6e
DH
65462003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6547
6548 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
6549
6550 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
6551 compiling with SCM_DEBUG==1 by moving definition behind prototype.
6552
6553 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
6554 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
6555 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
6556 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
6557 functions such that they check if the object is a non-immediate.
6558 Further, renamed identifiers to use the scm_dbg_ prefix and made
6559 their inclusion into the lib dependent of the
6560 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
6561
fce0b22d
DH
65622003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6563
6564 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
6565 debug option.
6566
1685446c
DH
65672003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6568
821f18a4 6569 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
6570 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
6571 any calls to SCM_NCONSP any more.
6572
6573 * unif.c (l2ra): Eliminate redundant check.
6574
9ff1720f
DH
65752003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6576
6577 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
6578 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
6579 SCM_NNULLP. Now, guile itself does not include any calls to
6580 SCM_NNULLP any more.
6581
05b15362
DH
65822003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6583
6584 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
6585 scm_copy_tree): Place assignment expressions which are part of
6586 other expressions into an expression of their own.
6587
0c88d7df
DH
65882003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6589
6590 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
6591 compare SCM values with !=.
6592
5cb22e96
DH
65932003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6594
6595 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
6596 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
6597 and definition of the memoizer for the generalized set! macro from
6598 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
6599 define the macro object.
6600
6601 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
6602 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
6603 eval.c, it is made static and renamed to s_set_x.
6604
6605 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
6606 over SCM_N<foo>.
6607
a44a9715
DH
66082003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6609
6610 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
6611 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
6612 to undefineds and registered the object as a permanent object.
6613
6614 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
6615 static in eval.c, renamed it to f_apply and registered the object
6616 as a permanent object.
6617
1b43d24c
DH
66182003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6619
5cb22e96 6620 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
6621 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
6622
aec16f99
DH
66232003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6624
6625 * numbers.c (scm_logtest): Fixed argument bug in the call to
6626 mpz_and, which showed up when compiling with SCM_DEBUG defined.
6627
f96460ce
DH
66282003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6629
6630 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
6631 type errors that showed up when compiling with SCM_DEBUG defined.
6632
d0f6ceb8
DH
66332003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6634
6635 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
6636 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
6637 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
6638 fix compile errors with --disable-deprecated.
6639
19a7a089
RB
66402003-04-17 Rob Browning <rlb@defaultvalue.org>
6641
6642 * numbers.c (scm_integer_expt): fix case where we were declaring
6643 vars in the middle of a statement block. Thanks to Thamer
6644 Al-Harbash.
6645
47cd67db
MD
66462003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6647
0fd7dcd3
MD
6648 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
6649 change.
6650
47cd67db
MD
6651 * eq.c (scm_eqv_p): Turned into a primitive generic.
6652
3b8b889c
RB
66532003-04-16 Rob Browning <rlb@defaultvalue.org>
6654
312006bb
RB
6655 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
6656 Thanks to Boyd Gerber.
6657 Added check for __arm__ in addition to arm for LINUX and copied
6658 __s390__ defines from upstream libgc. Thanks to James Treacy for
6659 reporting the problems.
c7ef2ea1 6660
3b8b889c
RB
6661 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
6662
6663 * socket.c: use SCM_CHAR_BIT.
6664
6665 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
6666
6667 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
6668
43261b39
MD
66692003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6670
6671 * feature.c (scm_init_feature): Always add threads feature.
6672
58241edc
MD
66732003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6674
6675 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
6676 scm_at_assert_bound_ref. (We don't want the unbound check. See
6677 oop/goops/active-slot.scm.)
6678
94e91275
RB
66792003-04-14 Rob Browning <rlb@defaultvalue.org>
6680
6681 * tags.h: scm_t_intptr should have been intptr_t.
6682
3071ea27
RB
66832003-04-13 Rob Browning <rlb@defaultvalue.org>
6684
6685 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
6686 test. Instead use
6687 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
6688 as gc_os_dep.c suggests is appropriate.
6689
6690 * goops.c (prep_hashsets): make static to match prototype.
6691 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
6692 Chin.
6693
6694 * c-tokenize.lex: remove trailing comma from enum. Thanks to
6695 Albert Chin.
6696
6697 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
6698 Klausner.
6699
21ab2aeb
MD
67002003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6701
6702 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
6703 indicated through extra fields in getters-n-setters.
6704 (scm_add_slot): Adapted to new format of getters_n_setters slot.
6705 (Thanks to Andy Wingo.)
6706
dff96e95
HWN
67072003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6708
6709 * gc-segment.c: add comment
6710
07921c76
RB
67112003-04-07 Rob Browning <rlb@defaultvalue.org>
6712
b5331f10
RB
6713 * debug.h: change "id" arg name to "info_id" to avoid objective-c
6714 clash.
6715
07921c76
RB
6716 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
6717 and add regression test to standalone/.
6718
67192003-04-06 Rob Browning <rlb@defaultvalue.org>
6720
6721 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
6722 Thanks to Dale P. Smith.
6723
6724 * random.c: #include gmp.h.
6725 (scm_c_random_bignum): normalize result on return.
6726
6727 * init.c: #include gmp.h.
6728
6729 * numbers.h: remove the gmp.h #include (not needed now).
6730
6731 * posix.h: change occurences of "id" to something else so we don't
6732 cause trouble when included via objective-c (can't hurt, might
6733 help). Still have usage in debug.h, though.
6734
938f6b7c
MD
67352003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6736
372691d8
MD
6737 * random.c (scm_c_random_bignum): Don't generate a random number
6738 equal to m (the second argument of scm_c_random_bignum); only
6739 generate numbers in the range 0 <= r < m.
c5f268f8
MD
6740 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
6741 scm_var_random_state.
372691d8 6742
938f6b7c
MD
6743 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
6744 clause.
6745
6cdb8c3f
RB
67462003-04-05 Rob Browning <rlb@defaultvalue.org>
6747
938f6b7c 6748 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
6749 uses before any code.
6750
15635be5
MD
67512003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6752
1ecfd013
MD
6753 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
6754 not top_srcdir.
6755
15635be5
MD
6756 * hashtab.c (rehash_after_gc): Clear to_rehash list before
6757 processing it in order to avoid an infinite loop.
6758
6759 * print.c (scm_prin1): Remember old state of pstate->writingp.
6760
73be1d9e
MV
67612003-04-05 Marius Vollmer <mvo@zagadka.de>
6762
6763 * Changed license terms to the plain LGPL thru-out.
6764
ad815c06
RB
67652003-04-04 Rob Browning <rlb@defaultvalue.org>
6766
6767 * socket.c (FLIPCPY_NET_HOST_128): new macro.
6768 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
6769 rewrite to handle GMP bignums.
6770
6771
6772 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
6773
6774 * ports.c (scm_getc): minor tweak.
6775
6776 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
6777 rewrite to handle GMP bignums.
6778
6779 * numbers.c: rewrite *many* functions to handle GMP bignums.
6780
6781 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
6782 handle GMP bignums.
6783
6784 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
6785
6786 * init.c (check_config): remove SCM_BIGDIG conditionals.
6787 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
6788
6789 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
6790
6791 * eval.c: remove SCM_BIGDIG conditionals.
6792
6793 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
6794
6cdb8c3f
RB
67952003-03-31 Rob Browning <rlb@defaultvalue.org>
6796
6797 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
6798 to Kevin Ryde.)
6799
68002003-03-27 Rob Browning <rlb@defaultvalue.org>
6801
6802 * threads.h: fix various preprocessor usages of new public
6803 symbols to expect 0 or 1 values rather than 1 or undefined.
6804 i.e. change #ifdef to #if, etc.
6805
6806 * threads.c: fix various preprocessor usages of new public
6807 symbols to expect 0 or 1 values rather than 1 or undefined.
6808 i.e. change #ifdef to #if, etc.
6809
6810 * tags.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 * stacks.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 * stackchk.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 * stackchk.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 * sort.c: fix various preprocessor usages of new public
6827 symbols to expect 0 or 1 values rather than 1 or undefined.
6828 i.e. change #ifdef to #if, etc.
6829
6830 * read.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 * random.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 * print.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 * objects.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 * numbers.h: 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 * null-threads.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 * lang.c: fix various preprocessor usages of new public
6855 symbols to expect 0 or 1 values rather than 1 or undefined.
6856 i.e. change #ifdef to #if, etc.
6857
6858 * lang.h: 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 * iselect.h: 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 * init.c: 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 * gh_data.c: fix various preprocessor usages of new public
6871 symbols to expect 0 or 1 values rather than 1 or undefined.
6872 i.e. change #ifdef to #if, etc.
6873
6874 * gh.h: 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 * gen-scmconfig.c: change most new public symbols to be defined to
6879 0 or 1 rather than being either 1 or undefined.
6880
6881 * gc_os_dep.c: fix various preprocessor usages of new public
6882 symbols to expect 0 or 1 values rather than 1 or undefined.
6883 i.e. change #ifdef to #if, etc.
6884 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
6885
6886 * gc.h: fix various preprocessor usages of new public
6887 symbols to expect 0 or 1 values rather than 1 or undefined.
6888 i.e. change #ifdef to #if, etc.
6889
6890 * gc-card.c: fix various preprocessor usages of new public
6891 symbols to expect 0 or 1 values rather than 1 or undefined.
6892 i.e. change #ifdef to #if, etc.
6893
6894 * gc-mark.c: 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 * feature.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 * evalext.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 * eval.h: fix various preprocessor usages of new public
6907 symbols to expect 0 or 1 values rather than 1 or undefined.
6908 i.e. change #ifdef to #if, etc.
6909
6910 * eval.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 * eq.c: fix various preprocessor usages of new public
6915 symbols to expect 0 or 1 values rather than 1 or undefined.
6916 i.e. change #ifdef to #if, etc.
6917
6918 * coop.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 * coop-threads.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-pthreads.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-defs.h: 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 * convert.i.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 * continuations.c: fix various preprocessor usages of new public
6939 symbols to expect 0 or 1 values rather than 1 or undefined.
6940 i.e. change #ifdef to #if, etc.
6941
6942 * _scm.h: fix various preprocessor usages of new public symbols to
6943 expect 0 or 1 values rather than 1 or undefined. i.e. change
6944 #ifdef to #if, etc.
6945
d11d697a
MV
69462003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6947
9686f86d
MV
6948 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
6949
6950 * deprecated.c, deprecated.h: New files, to collect deprecated
6951 things in one place.
6952 * Makefile.am: Added them in all the right places.
6953
d11d697a
MV
6954 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
6955 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
6956 builds work.
9686f86d
MV
6957 (DOT_X_FILES): Removed "iselect.x".
6958 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 6959
e3c0c3b9
RB
69602003-03-25 Rob Browning <rlb@defaultvalue.org>
6961
6962 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
6963 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
6964
6965 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
6966
6967 * vports.c: #include <config.h> if HAVE_CONFIG_H.
6968
6969 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
6970 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
6971
6972 * threads.h: replace usage of struct timespect with
6973 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
6974 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
6975 favor of scm_t_timespec from scmconfig.h.
6976
6977 * threads.c: move libguile/_scm.h include to the top so we pick up
6978 any critical defines like _GNU_SOURCE early. Replace usage of
6979 struct timespect with scm_t_timespec. Replace usage of
6980 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
6981 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
6982
6983 * threads-plugin.h: replace usage of struct timespect with
6984 scm_t_timespec.
6985
6986 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
6987 usage of struct timespect with scm_t_timespec.
6988
6989 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
6990 HAVE_INTTYPES_H handling to scmconfig.h. #include
6991 "libguile/__scm.h". Rework handling for scm_t_bits,
6992 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
6993 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
6994 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
6995 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
6996 SCM_HAVE_ARRAYS.
6997
6998 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
6999
7000 * struct.c: #include <config.h> if HAVE_CONFIG_H.
7001
7002 * strports.c: #include <config.h> if HAVE_CONFIG_H.
7003
7004 * strop.c: #include <config.h> if HAVE_CONFIG_H.
7005
7006 * stime.h: move handling of time related headers to scmconfig.h.
7007
7008 * stime.c: #include <config.h> if HAVE_CONFIG_H.
7009
7010 * stacks.c: replace usage of STACK_GROWS_UP with
7011 SCM_STACK_GROWS_UP.
7012
7013 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7014 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7015
7016 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7017 of uint32 and HAVE_UINT_32 with scm_t_int32.
7018
7019 * smob.c: #include <config.h> if HAVE_CONFIG_H.
7020
7021 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
7022
7023 * script.c: #include <config.h> if HAVE_CONFIG_H.
7024
7025 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
7026
7027 * scmconfig.h.top: new file -- preamble for scmconfig.h.
7028
7029 * rw.c: #include <config.h> if HAVE_CONFIG_H.
7030
7031 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
7032
7033 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7034
7035 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
7036
7037 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7038 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
7039 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
7040 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7041
7042 * ramap.c: replace usage of HAVE_LONG_LONGS with
7043 "SCM_SIZEOF_LONG_LONG != 0".
7044
7045 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
7046 "libguile/scmconfig.h".
7047
7048 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
7049
7050 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7051 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7052
7053 * posix.c: #include <config.h> if HAVE_CONFIG_H.
7054
7055 * ports.c: #include <config.h> if HAVE_CONFIG_H.
7056
7057 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7058
7059 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
7060 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
7061 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
7062 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
7063 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
7064 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
7065 "SCM_SIZEOF_LONG_LONG != 0".
7066
7067 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
7068 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
7069 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
7070 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
7071
7072 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
7073
7074 * null-threads.h: replace usage of struct timespect with
7075 scm_t_timespec.
7076
7077 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
7078
7079 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
7080 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
7081 scm_t_uint64 and rename usages.
7082
7083 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
7084
7085 * load.c: #include <config.h> if HAVE_CONFIG_H.
7086
7087 * iselect.h: move handling of time related headers to scmconfig.h.
7088 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
7089 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
7090 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
7091
7092 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7093 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7094 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7095
7096 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
7097
7098 * inline.h: #include "libguile/__scm.h" at the top. Change code
7099 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
7100 what to do instead of creating a new public #define. Rename usage
7101 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
7102 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
7103 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
7104
7105 * inline.c: rearrange handling -- now we just #define
7106 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
7107 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
7108 appropriate, and we use that in inline.h along with the above
7109 define to determine how to respond.
7110
7111 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7112 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7113
7114 * guile.c: #include <config.h> if HAVE_CONFIG_H.
7115
7116 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7117 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7118
7119 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7120
7121 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
7122
7123 * gen-scmconfig.c: new file -- see comments in file for details.
7124
7125 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
7126
7127 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
7128 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7129
7130 * gc.h: replace usage of SIZEOF_LONG with
7131 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
7132 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
7133 since we handle that in scmconfig.h now.
7134
7135 * gc.c: #include <config.h> if HAVE_CONFIG_H.
7136
7137 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7138 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
7139 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7140
7141 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
7142
7143 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7144 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7145
7146 * fports.c: #include <config.h> if HAVE_CONFIG_H.
7147
7148 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
7149
7150 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7151 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
7152
7153 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
7154
7155 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7156 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
7157
7158 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
7159 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
7160 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7161 with "SCM_SIZEOF_LONG_LONG != 0".
7162
7163 * error.c: #include <config.h> if HAVE_CONFIG_H.
7164
7165 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
7166 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
7167 with "SCM_SIZEOF_LONG_LONG != 0".
7168
7169 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
7170
7171 * coop.c: replace usage of struct timespect with scm_t_timespec.
7172 #include <config.h> if HAVE_CONFIG_H.
7173
7174 * coop-threads.c: #include "libguile/_scm.h" early. Replace
7175 usage of struct timespect with scm_t_timespec. Replace usage of
7176 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7177
7178 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
7179 usage of struct timespect with scm_t_timespec. Replace usage of
7180 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
7181
7182 * coop-defs.h: move handling of time related headers to
7183 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
7184 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
7185 timespect with scm_t_timespec.
7186
7187 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7188
7189 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7190
7191 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
7192 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
7193
7194 * continuations.c: move libguile/_scm.h include to the top so we
7195 pick up any critical defines like _GNU_SOURCE early.
7196
7197 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
7198
7199 * async.c: #include <config.h> if HAVE_CONFIG_H.
7200
7201 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
7202
7203 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
7204 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
7205
7206 * __scm.h: move libguile/scmconfig.h include up to the top, so
7207 we're sure to pick up any critical defines like _GNU_SOURCE early.
7208 #include <limits.h> removed in favor of scmconfig.h inclusion when
7209 appropriate. STDC_HEADERS based inclusion of stdlib.h,
7210 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
7211 scmconfig.h inclusion when appropriate. Various Win32 related
7212 definitions removed in favor of scmconfig.h inclusion when
7213 appropriate.
7214 (HAVE_UINTPTR_T): definition removed (see NEWS).
7215 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
7216 (HAVE_LONG_LONGS): definition removed (see NEWS).
7217 (HAVE_LONG_LONG): definition removed (see NEWS).
7218 (HAVE_PTRDIFF_T): definition removed (see NEWS).
7219
7220 * Makefile.am: scmconfig.h is now generated by building and
7221 running gen-scmconfig.h and capturing its output. gen-scmconfig
7222 uses config.h and the configure.in generated gen-scmconfig.h to
7223 decide what to output. See gen-scmconfig.c for details.
7224 (noinst_PROGRAMS): add gen-scmconfig.
7225 (gen_scmconfig_SOURCES): new variable.
7226 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
7227 cross-compiling right.
7228 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
7229 (BUILT_SOURCES): add scmconfig.h.
7230
25e0bf97
MV
72312003-03-19 Marius Vollmer <mvo@zagadka.de>
7232
7233 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
7234 Adrian Bunk. Thanks!
7235
74b6d6e4
MD
72362003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7237
7238 * goops.c (make_class_from_template): New fourth arg:
7239 applicablep.
7240 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
7241 cpls.
7242
7243 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
7244
7245 * goops.c, objects.c, objects.h (scm_make_extended_class): New
7246 second arg: applicablep.
7247 (scm_i_inherit_applicable): New function.
7248
7249 * goops.c, goops.h (scm_class_applicable,
7250 scm_class_extended_accessor): New classes.
7251
5c9e7dad
DH
72522003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
7253
7254 * procs.c (scm_procedure_documentation): Removed redundant
7255 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
7256 predicates.
7257
f8af5c6d
MD
72582003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7259
c614a00b
MD
7260 * list.c, list.h (scm_filter, scm_filter_x): New functions.
7261
109c2c9f
MD
7262 * modules.c (scm_module_import_interface): New function.
7263
f8af5c6d
MD
7264 * goops.c, goops.h (scm_class_accessor_method): Renamed from
7265 scm_class_accessor.
7266 (scm_class_accessor): New class.
7267
a48d60b1
MD
72682003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7269
7270 * goops.c (scm_primitive_generic_generic): Enable primitive
7271 generic if not enabled.
7272 (scm_sys_goops_loaded): Setup unextended primitive generics.
7273
7274 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
7275
7276 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
7277 snarf macros.
7278
7279 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
7280 testing example. All uses of SCM_GPROC should be converted.)
7281
7282 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
7283 scm_assoc.
7284
7285 * eq.c (scm_equal_p): Turned into a primitive generic.
7286
84edc049
RB
72872003-02-27 Rob Browning <rlb@defaultvalue.org>
7288
7289 * Makefile.am (scmconfig.h): new target -- generate file from
7290 ../config.h.
7291 (modinclude_HEADERS): remove version.h.
7292 (nodist_modinclude_HEADERS): add version.h.
7293
ea5c9285
MD
72942003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7295
b4a1358c
MD
7296 This fixes a serious GC bug, introduced during the latest
7297 reorganization of the GC, which disabled freeing of structs and
7298 GOOPS objects:
7299
7300 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
7301 SCM_EOL.
53af8255
MD
7302 (scm_struct_prehistory): Move scm_free_structs to
7303 scm_before_mark_c_hook.
ea5c9285 7304
b4a1358c
MD
7305 * gc-card.c (sweep_card): Check that we haven't swept structs on
7306 this card before. That can happen if scm_i_sweep_all_segments has
7307 been called from some other place than scm_igc.
7308
c35738c1
MD
73092003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7310
231a4ea8
MD
7311 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
7312 (since hash tables now adapt their size).
7313
7314 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
7315 (current number of prehistory bindings; hashtable code will select
7316 a prime which is greater than this value).
7317
7318 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
7319 (current number of initial symbols).
7320
7321 * properties.c (scm_init_properties): Don't specify size of
7322 scm_properties_whash.
7323
7324 * objprop.c (scm_init_objprop): Don't specify size of
7325 scm_object_whash.
7326
7327 * keywords.c (scm_init_keywords): Don't specify a hash table size.
7328
c35738c1
MD
7329 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
7330
7331 The following changes introduce the use of resizable hash tables
7332 throughout Guile. It also renames the old *-hash-table* functions
7333 to *-alist-vector* and places them, together with the rest of the
7334 weak vector support, in the module (ice-9 weak-vector). We should
7335 probably introduce a new, better, API for weak references, for
7336 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
7337 look like and are used like ordinary pairs.)
7338
7339 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
7340 leaf_environment_fold, obarray_remove_all): Use hashtable
7341 accessors.
7342
7343 * gc.c (scm_init_storage): Moved hook initialization to
7344 scm_storage_prehistory.
7345 (scm_storage_prehistory): New function.
7346 (scm_igc): Added commentary about placement of
7347 scm_after_sweep_c_hook.
7348
7349 * gc-mark.c (scm_mark_all): Use hashtable accessors.
7350 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
7351 SCM_WVECT_WEAK_VALUE_P.
7352
7353 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
7354 functions.
7355 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
7356 Removed.
7357 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
7358 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
7359
7360 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
7361 calls to scm_storage_prehistory and scm_hashtab_prehistory.
7362
7363 * modules.c (module-reverse-lookup): Use hashtable accessors.
7364
7365 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
7366
7367 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
7368 scm_make_weak_value_alist_vector,
7369 scm_make_doubly_weak_alist_vector): New functions.
7370
7371 * weaks.c (scm_init_weaks_builtins): New function.
7372
7373 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
7374 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
7375 SCM_WVECT_NOSCAN_P): New macros.
7376
7377 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
7378 and SCM_WVECT_WEAK_VALUE_P.
7379
7380 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
7381 allocate_weak_vector and exported.
7382
0a4c1355
MD
73832003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7384
7385 * hashtab.c: Undid thread safety. (We decided that it's better to
7386 let the user explicitly protect the tables (or not) according what
7387 is suitable for the application.)
7388
87ca11ff
MD
73892003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7390
7391 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
7392 thread safe and handle resizing tables.
7393 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
7394 SCM_DEFER/ALLOW_INTS.
7395
f59a096e
MD
73962003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7397
7398 * hashtab.c (scm_vector_to_hash_table,
7399 scm_c_make_resizing_hash_table, scm_make_hash_table): New
7400 functions.
7401 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
7402 safe and handle resizing tables.
7403
7404 * weaks.c (scm_make_weak_key_hash_table,
7405 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
7406 Size argument made optional. Return resizable table if not
7407 specified.
7408
4b612c5b
MD
74092003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7410
7411 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
7412 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
7413
b3d7f6df
MD
74142003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7415
7416 * debug.c (scm_procedure_source): Handle all objects for which
7417 procedure? is #t. (Thanks to Bill Schottstaedt.)
7418
756414cf
MD
74192003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7420
361d631f
MD
7421 * futures.c (mark_futures): Don't need to mark data of recycled
7422 futures.
7423 (scan_futures, cleanup_undead): Be smarter about marking
7424 futures---avoid unnecessary passes through future lists.
7425
756414cf
MD
7426 * futures.h, futures.c: New files; Introduced recycling of
7427 futures. For fine-grained threading this lifts performance to
7428 another level. We can now use parallelization in inner loops of
7429 Guile programs without impossible overhead.
7430
7431 * threads.h, threads.c: Moved futures to their own file.
7432
7433 * Makefile.am (libguile_la_SOURCES): Added futures.c.
7434 (DOT_X_FILES): Added futures.x.
7435 (DOT_DOC_FILES): Added futures.doc.
7436 (modinclude_HEADERS): Added futures.h.
7437
7438 * threads.c, threads.h (scm_i_create_thread): Renamed from
7439 create_thread and made global.
7440
7441 * futures.c (scm_make_future): New procedure.
7442
7443 * eval.c: #include "libguile/futures.h".
7444
7445 * init.c: #include "futures.h"
7446 (scm_init_guile_1): Call scm_init_futures.
7447
7448 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
7449
7450 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
7451
7452 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
7453 functions.
7454
7455 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
7456
b4debead
MD
74572003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7458
7459 * threads.c (create_thread): Don't unwind dynwind chain of parent
7460 thread before creation. Just start the new thread with an empty
7461 dynwind chain.
7462
93f26b7b
MD
74632003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7464
7465 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
7466
38d8927c
MD
74672003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7468
41c96c32
MD
7469 * threads.c (scm_timed_wait_condition_variable): Support timed
7470 waiting also for simple condition variables.
7471
38d8927c
MD
7472 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
7473 of calling the procedure change-object-class.
7474
9cf5d9b7
MD
74752003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7476
7477 * ramap.c (scm_ramapc): Typo in error message.
7478
bbf8d523
MD
74792003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7480
b46fae00
MD
7481 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
7482 slots with instance allocation.
7483
bbf8d523
MD
7484 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
7485 class.
7486 (scm_compute_applicable_methods): Use scm_generic_function_methods.
7487
7488 * goops.c (scm_generic_function_methods): Support extended
7489 generic functions.
7490
ebf9b47c
MD
74912002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7492
7493 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 7494 Thanks to Neil for pointing this out!
ebf9b47c 7495
14a9ba3f
NJ
74962002-12-29 Neil Jerram <neil@ossau.uklinux.net>
7497
7498 * lang.h: Remove declarations matching definitions removed from
7499 lang.c (just below).
7500
c6a040a8
NJ
75012002-12-28 Neil Jerram <neil@ossau.uklinux.net>
7502
6054d805
NJ
7503 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7504 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
7505 and already commented out.
7506
c6a040a8
NJ
7507 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
7508 scm_lreadparen): Support reading vectors with Elisp syntax if
7509 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
7510 is not currently defined, and there isn't even a configure switch
7511 to enable it yet.)
7512
3742c12f
MV
75132002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7514
7515 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
7516 builds work.
7517 (EXTRA_DIST): Added version.h.in.
7518
fb50ef08
MD
75192002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7520
7521 This change makes it possible for one thread to do lazy sweeping
7522 while other threads are running. Now only the mark phase need to
7523 have all threads asleep. We should look further into this issue.
7524 Presently, I've put the locking of scm_i_sweep_mutex at
7525 "conservative" places due to my current lack of knowledge about
7526 the garbage collector. Please feel free to restrict these regions
7527 further to allow for maximal parallelism!
7528
7529 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
7530
7531 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
7532 scm_gc_register_collectable_memory): Substitute locking of
7533 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
7534 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
7535 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
7536 the single-thread section (which now only contains the mark
7537 phase).
7538 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
7539 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
7540
7541 * threads.c (gc_section_mutex): Removed.
7542
9ed24633
MD
75432002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7544
0d48aca5
MD
7545 * threads.c (create_thread): Clear parent field in root state in
7546 order not to unnecessarily remember dead threads.
7547
9ed24633
MD
7548 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
7549 (scm_trampoline_1, scm_trampoline_2): Use them.
7550
29717c89
MD
75512002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7552
7553 Partial introduction of real plugin interface.
7554
7555 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
7556 (EXTRA_DIST): Added threads-plugin.c.
7557
7558 * threads-plugin.h, threads-plugin.c: New files.
7559
7560 * threads.h: #include "libguile/threads-plugin.h".
7561
7562 * threads.c: #include "libguile/threads-plugin.c".
7563
7564 * pthread-threads.c: Temporarily remove debugging functions.
7565
7566 * threads.c, threads.h (scm_yield): Added back.
7567
e29e0b09
MD
75682002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7569
7570 * threads.c (really_launch): Detach before unlocking
7571 thread_admin_mutex in order not to risk being joined.
7572 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
7573 thread_admin_mutex locked during GC.
7574
7575 * pthread-threads.c, pthread-threads.h: Improvements to debugging
7576 functions.
7577
0b6843b1 75782002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 7579
6da2dfc4
MD
7580 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
7581 support for debugging mutex operations.
7582
1b92fb6b
MD
7583 * threads.c (scm_thread): Removed filed joining_threads.
7584 (thread_print): Print thread number as well as address of thread
7585 structure.
0b6843b1
MD
7586 (scm_join_thread): Bugfix.
7587 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
7588 scm_timed_wait_condition_variable, scm_signal_condition_variable,
7589 scm_broadcast_condition_variable): Use the low-level API.
7590 (scm_all_threads): Return copy of thread list (to prevent
7591 unintended destruction).
7592 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 7593
93cd4dcd
MD
7594 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
7595 pthread "native" recursive mutex support.
7596
2ff4f181
MD
75972002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7598
28d52ebb
MD
7599 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
7600 Simply lock a thread C API recursive mutex.
7601 (SCM_NONREC_CRITICAL_SECTION_START,
7602 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7603 SCM_REC_CRITICAL_SECTION_END): Removed.
7604
7605 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
7606 direct calls to scm_rec_mutex_lock / unlock around the three calls
7607 to scm_m_expand_body.
7608
7609 * eval.c, eval.h (promise_free): New function.
7610 (scm_force): Rewritten; Now thread-safe; Removed
7611 SCM_DEFER/ALLOW_INTS.
7612
7613 * pthread-threads.h: Added partially implemented plugin interface
7614 for recursive mutexes. These are, for now, only intended to be
7615 used internally within the Guile implementation.
7616
7617 * pthread-threads.c: New file.
7618
7619 * threads.c: Conditionally #include "pthread-threads.c".
7620
7621 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
7622 thread-safe;
7623
7624 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
7625 SCM_GLOBAL_REC_MUTEX): New macros.
7626
7627 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
7628 macros---use mutexes instead.
7629
7630 * tags.h (SCM_IM_FUTURE): New tag.
7631
7632 * eval.c (scm_m_future): New primitive macro.
7633 (SCM_CEVAL): Support futures.
7634 (unmemocopy): Support unmemoization of futures.
7635
7636 * print.c (scm_isymnames): Name of future isym.
7637
2ff4f181
MD
7638 * version.c: Unmade some changes to my private copy that got
7639 committed by mistake.
7640
392d2833
MD
76412002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7642
e200ddee
MD
7643 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
7644 2002-12-10.
7645
392d2833
MD
7646 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
7647
7648 * gc.c (scm_gc_sweep): Call it here instead, which is a more
7649 logical place.
7650
7651 * threads.c (create_thread): Remember root object until the handle
7652 of the new thread is on all_threads list.
7653
7654 * root.c (scm_make_root): Moved copying of fluids until after
7655 creation of root handle so that the fluids are GC protected. Also
7656 removed the critical section.
7657
c4c52ebe
MD
76582002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7659
960c408c
MD
7660 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
7661
3cdde9d6 7662 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 7663 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
7664 (scm_realloc): Serialize call to realloc
7665 (scm_calloc): Same for calloc.
7666 Thanks to Wolfgang Jaehrling!
7667 (Now we have to make sure all calls to malloc/realloc are made
7668 through scm_malloc.)
7669
960c408c
MD
7670 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
7671
c4c52ebe
MD
7672 * threads.c (really_launch): Release heap (to prevent deadlock).
7673 (create_thread): Release heap before locking thread admin mutex.
7674
b0dc3d71
MD
76752002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7676
7677 * threads.c (scm_i_thread_invalidate_freelists): New
7678 function.
7679
7680 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
7681
7682 * modules.c (scm_export): Inserted a return statement.
7683
06e80f59
HWN
76842002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7685
7686 * modules.c (scm_export): new function
7687
7688 * gc-card.c: add a note about malloc()/free() overhead.
7689
a12611c3
MD
76902002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7691
7692 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
7693 in srcdir.
7694
c7fabadf
MD
76952002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7696
7697 These changes remove scm_ints_disabled (which hasn't has any
7698 effect in Guile for quite some time).
7699
7700 * async.c, error.h (scm_ints_disabled): Removed.
7701
7702 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
7703 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
7704 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
7705 (old_ints): Removed.
7706
7707 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
7708 critical section.
7709 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
7710 SCM_ALLOW_INTS.
7711
9bc4701c
MD
77122002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7713
52340b65
MD
7714 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
7715 Removed accidental #if 0 around these functions.
7716
9bc4701c
MD
7717 These changes are the start of support for preemptive
7718 multithreading. Marius and I have agreed that I commit this code
7719 into the repository although it isn't thoroughly tested and surely
7720 introduces many bugs. The bugs should only be exposed when using
7721 threads, though. Signalling and error handling for threads is
7722 very likely broken. Work on making the implementation cleaner and
7723 more efficient is needed.
7724
7725 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
7726 (SCM_NONREC_CRITICAL_SECTION_START,
7727 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
7728 SCM_REC_CRITICAL_SECTION_END): New macros.
7729 (SCM_CRITICAL_SECTION_START/END): Defined here.
7730
7731 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
7732 the three calls to scm_m_expand_body.
7733
7734 * gc.h: #include "libguile/pthread-threads.h";
7735 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
7736
7737 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
7738 scm_t_key;
7739
7740 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
7741 access.
7742
7743 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
7744
7745 * gc-freelist.c, threads.c (really_launch): Use
7746 SCM_FREELIST_CREATE.
7747
7748 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
7749
7750 * gc.c (scm_i_expensive_validation_check, scm_gc,
7751 scm_gc_for_newcell): Put threads to sleep before doing GC-related
7752 heap administration so that those pieces of code are executed
7753 single-threaded. We might consider rewriting these code sections
7754 in terms of a "call_gc_code_singly_threaded" construct instead of
7755 calling the pair of scm_i_thread_put_to_sleep () and
7756 scm_i_thread_wake_up (). Also, we would want to have as many of
7757 these sections eleminated.
7758
7759 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
7760
7761 * inline.h: #include "libguile/threads.h"
7762
7763 * pthread-threads.h: Macros now conform more closely to the
7764 pthreads interface. Some of them now take a second argument.
7765
7766 * threads.c, threads.h: Many changes.
7767
77682002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7769
7770 * Makefile.am (version.h): Changed $^ --> $< in rule for
7771 version.h.
7772
b2cbe8d8
RB
77732002-12-08 Rob Browning <rlb@defaultvalue.org>
7774
7775 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
7776 (SCM_MINOR_VERSION): use @--@ substitution now.
7777 (SCM_MICRO_VERSION): use @--@ substitution now.
7778 (scm_effective_version): new function prototype.
7779
7780 * version.c (scm_effective_version): new function, also add
7781 effective-version.
7782
7783 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
7784 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
7785 SCM_LIBRARY_DIR.
7786 (version.h): generate this here rather than configure.in. This
7787 approach tracks source edits better (i.e. more immediately).
7788 Might be worth considering for other .in files too.
7789
5441c65c
MV
77902002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
7791
7792 Reorganized thread package selection. A thread package now only
7793 implements a small set of pthread like functions and Guile
7794 implements the rest on top of that. Guile's implementation is
7795 what the "coop-pthreads" package has been previously. Support for
7796 "coop" threads has been removed until I get time to add it again.
7797
7798 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
7799 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
7800 null-threads.c, coop-pthreads.c.
7801 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
7802 pthread-threads.h.
7803
7804 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
7805
7806 * threads.h: Do not include "libguile/coop-defs.h". Include
7807 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
7808 (previously deprecated) C level thread API prototypes. They are
7809 now in the thread package specific headers, "null-threads.h" and
7810 "pthread-threads.h".
7811 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
7812 New.
7813 (scm_threads_init): Removed.
7814 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
7815 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
7816 SCM_I_THREAD_SWITCH_COUNT): Define here.
7817 (scm_single_thread_p): Removed.
7818 (scm_call_with_new_thread): Take two args directly instead of list
7819 of two args.
7820 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
7821 SCM_SET_THREAD_LOCAL_DATA): Define here.
7822
7823 * threads.c: Merged with "coop-pthreads.c".
7824
7825 * null-threads.h: Implement pthread-like API as a set of macros.
7826
7827 * pthread-threads.h: New, implement pthread-like API by deferring
7828 to pthread itself.
7829
7830 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
7831 has been lost in the reorganization.
7832
504d99c5
MD
78332002-12-01 Mikael Djurfeldt <mdj@linnaeus>
7834
7835 The following change makes it possible to move procedure
7836 application dispatch outside inner loops. The motivation was
7837 clean implementation of efficient replacements of R5RS primitives
7838 in SRFI-1.
7839
7840 The semantics is clear: scm_trampoline_N returns an optimized
7841 version of scm_call_N (or NULL if the procedure isn't applicable
7842 on N args).
7843
7844 Applying the optimization to map and for-each increases efficiency
7845 noticeably. For example, (map abs ls) is 8 times faster than
7846 before.
7847
7848 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
7849
7850 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
7851
7852 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
7853 (map, for-each): Handle also application on two args as a special
7854 case; Use trampolines.
7855
7856 Other changes:
7857
7858 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
7859 (subr2oless): Removed.
7860 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
7861 vector GC protected.
7862
7863 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
7864 scm_out_of_range.
7865
63dd3413
DH
78662002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7867
7868 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
7869
4ba5f279
MD
78702002-11-17 Mikael Djurfeldt <mdj@linnaeus>
7871
7872 * debug.c (scm_make_iloc): Added missing "return".
7873
56ae231f
MV
78742002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
7875
7876 * strports.c (scm_eval_string_in_module): Validate second arg to
7877 be a module. Thanks to Arno Peters!
7878
80b28865
DH
78792002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7880
7881 * .cvsignore: remove goops.c
7882
c88b1456
DH
78832002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7884
7885 * modules.c (scm_env_top_level, scm_lookup_closure_module,
7886 module_variable, scm_module_lookup_closure,
7887 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
7888 scm_system_module_env_p): Don't compare SCM values with C
7889 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
7890 over SCM_NFALSEP.
7891
a8a19efc
DH
78922002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
7893
7894 * eval.h (SCM_MAKE_ILOC): New macro.
7895
7896 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
7897 the iloc bitpattern here.
7898
76734914
MD
78992002-11-14 Mikael Djurfeldt <mdj@linnaeus>
7900
7901 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
7902 part of the API, otherwise it's difficult to write Guile
7903 extensions using non-blocking I/O => moved #include
7904 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
7905
7906 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
7907 s_unlock_mutex.
7908
8b5b4a75
MV
79092002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
7910
7911 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
7912 are defined in configure.in.
7913
7914 * threads.c: Removed SCM_API from function definitions. SCM_API
7915 is only for declarations.
7916
e5a83084
MD
79172002-11-07 Mikael Djurfeldt <mdj@linnaeus>
7918
9be8bb45
MD
7919 * coop-pthreads.h: Added support for thread specific data to the
7920 generic C API for the coop-pthreads case.
7921
e5a83084
MD
7922 * threads.c, threads.h (scm_cond_init): Undo unintentional API
7923 change.
6c214b62 7924 (scm_cond_broadcast): Added missing function.
e5a83084 7925
7edf178e
MV
79262002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7927
7928 * coop.c (coop_next_runnable_thread): Removed, wich should have
7929 happened when GUILE_ISELECT was hard-wired.
7930
7f5b1b77
MV
79312002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7932
7caa1b07
MV
7933 * Makefile.am (libguile_la_SOURCES): Added threads.c
7934 (DOT_DOC_FILES): Added threads.doc.
7935 (DOT_X_FILES): Added threads.x.
7936 (EXTRA_libguile_la_SOURCES): Removed threads.c.
7937 (noinst_HEADERS): Added coop-pthreads.c.
7938 (modinclude_HEADERS): Added coop-pthreads.h.
7939
7940 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
7941 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
7942
bb11cbf4
MV
7943 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
7944 Thanks to Bill Schottstaedt!
7945
1d4cbbed
MV
7946 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
7947
7f5b1b77
MV
7948 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
7949 SCM_COPT_THREADS is defined.
7950 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
7951 is defined.
7952
7953 * coop-pthreads.c: Some harmless renamings of internal stuff.
7954 (create_thread): New, generalized version of
7955 scm_call_with_new_thread.
7956 (scm_call_with_new_thread): Use it.
7957 (scm_spawn_thread): New, use create_thread.
7958
d52f53b1
MV
79592002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7960
7961 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
7962 start testing it now.
7963
7964 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
7965 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
7966 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
7967 is defined.
7968
30f920c3
MV
79692002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
7970
7971 * scmsigs.c (signal_cell_handlers, install_handler_data,
7972 scm_delq_spine_x, really_install_handler, install_handler): New
7973 scheme for triggering signal handlers, to simplify take_signal.
7974 (take_signal): Simplified, to avoid race conditions.
7975 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
7976 hasn't exited yet.
7977
7978 * async.c (scm_async_click): Reset pending_asyncs, handle
7979 signal_asyncs. Don't set cdr of a non-signal async to #f.
7980 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
7981 always. Set pending_asyncs.
7982 (scm_system_async_mark_for_thread): Check that thread has not
7983 exited.
7984 (scm_unmask_signals, decrease_block): Call scm_async_click after
7985 block_asyncs becomes zero.
7986
7987 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
7988 active_asyncs.
7989
7990 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
7991 fields.
7992 * root.c (root_mark): Mark them.
7993 (make_root): Initialize them.
7994
7995 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
7996 USE_COOP_THREADS.
7997 (scm_internal_select): Define one version for USE_COOP_THREADS and
7998 one for USE_NULL_THREADS.
7999 (scm_init_iselect): Likewise.
8000
8001 * inline.h (scm_cell, scm_double_cell): Also allow
8002 USE_COPT_THREADS to not protect the slot initializers.
8003
8004 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
8005 because threads need to be initialized before the stack, but
8006 gsubrs such as scm_timed_condition_variable_wait can only be
8007 created later.
8008
8009 * threads.h: Include "coop-pthreads.h" when requested.
8010 (scm_threads_make_mutex, scm_threads_lock_mutex,
8011 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
8012 not implemented anyway.
8013 (scm_init_thread_procs, scm_try_mutex,
8014 scm_timed_condition_variable_wait,
8015 scm_broadcast_condition_variable, scm_c_thread_exited_p,
8016 scm_thread_exited_p): New prototypes.
8017 (struct timespec): Define if not already defined.
8018 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8019 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8020 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8021 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
8022 deprecated.
8023
8024 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
8025 requested.
8026 (scm_thread_exited_p): New.
8027 (scm_try_mutex, scm_broadcast_condition_variable): Newly
8028 registered procedures.
8029 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
8030 Use the latter as the procedure for "wait-condition-variable",
8031 thus offering a optional timeout parameter to Scheme.
8032 (scm_wait_condition_variable): Implement in terms of
8033 scm_timed_wait_condition_variable.
8034 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8035 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
8036 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8037 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
8038 scm_make_mutex, etc, and deprecate.
8039 (scm_init_threads): Do not create smobs, leave this to
8040 scm_threads_init. Do not include "threads.x" file.
8041 (scm_init_thread_procs): New, include "threads.x" here.
8042
8043 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
8044 scm_null_mutex_lock, scm_null_mutex_unlock,
8045 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
8046 scm_null_condvar_wait, scm_null_condvar_signal,
8047 scm_null_condvar_destroy): Removed.
8048 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
8049 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
8050 scm_cond_destory): Do not define, they are now deprecated and
8051 handled by threads.{h,c}.
8052
8053 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
8054 (scm_threads_init): Create smobs here, using the appropriate
8055 sizes.
8056 (block): Removed, now unused.
8057 (scm_c_thread_exited_p): New.
8058 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
8059 scm_null_mutex_destroy, scm_null_condvar_init,
8060 scm_null_condvar_wait, scm_null_condvar_signal,
8061 scm_null_condvar_destroy): Removed and updated users to do their
8062 task directly.
8063 (scm_try_mutex, timeval_subtract,
8064 scm_timed_wait_condition_variable,
8065 scm_broadcast_condition_variable): New.
8066 (scm_wait_condition_variable): Removed.
8067
8068 * coop-defs.h (coop_m): Added 'level' field.
8069 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
8070 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
8071 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
8072 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
8073 define.
8074 (coop_condition_variable_broadcast): New.
8075
8076 * coop-threads.c (scm_threads_init): Create smobs here, using the
8077 appropriate sizes.
8078 (scm_c_thread_exited_p, scm_try_mutex,
8079 scm_timed_wait_condition_variable,
8080 scm_broadcast_condition_variable): New.
8081 (scm_wait_condition_variable): Removed.
8082
8083 * coop.c (coop_new_mutex_init): Initialize level.
8084 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
8085 level.
8086 (coop_condition_variable_signal): Renamed to
8087 coop_condition_variable_broadcast and reimplemented in terms of
8088 that. Thus...
8089 (coop_condition_variable_broadcast): New.
8090
8091 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
8092
8093 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
8094
087ed40d
MV
80952002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
8096
65a23095
MV
8097 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
8098 of system headers.
8099
087ed40d
MV
8100 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
8101 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 8102 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 8103
5ec1d2c8
DH
81042002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8105
8106 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
8107 scm_definedp to scm_defined_p and deprecated scm_definedp.
8108
100ae50d
DH
81092002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
8110
8111 * async.h, async.c (scm_system_async): Fixed deprecation to work
8112 correctly when deprecated features are excluded.
8113
2794cb50
MV
81142002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8115
8116 * async.c (scm_system_async_mark_for_thread): Validate thread
8117 argument.
8118
8119 * coop-threads.c (scm_i_thread_root): Do not validate argument.
8120
8121 * feature.c (scm_init_feature): Don't add 'threads' for
8122 USE_NULL_THREADS.
8123
8124 * inline.h (scm_cell, scm_double_cell): Also allow
8125 USE_NULL_THREADS to not protect the slot initializers.
8126
8127 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
8128 "USE_THREAD".
8129
8130 * Makefile.am (noinst_HEADERS): Added null-threads.c.
8131 (modinclude_HEADERS): Added null-threads.h.
8132
8133 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
8134 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
8135 (scm_init_threads): Use generic type names scm_t_mutex and
8136 scm_t_cond instead of coop_m and coop_c.
8137
8138 * null-threads.c, null-threads.h: New files.
8139
ff810d7a
MV
81402002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
8141
8142 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
8143 This is to support makes that know about "$<" only in pattern
8144 rules, like Sun's make.
8145
a90bdb73
MV
81462002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8147
8148 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
8149 substitution. Thanks to David Allouche!
8150
e71a8bf2
DH
81512002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8152
8153 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
8154 !SCM_ENABLE_DEPRECATED.
8155
41f77ff5
MV
81562002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8157
504d99c5 8158 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
8159 scm_i_thread_root when USE_THREADS is defined. Use scm_root
8160 otherwise.
8161
8162 * scmsigs.c (take_signal): Only call scm_i_thread_root when
8163 USE_THREADS is defined. Use scm_root otherwise.
8164 (scm_sigaction_for_thread): Ignore THREAD argument when
8165 USE_THREADS is not defined. Also, move THREAD argument defaulting
8166 out of HAVE_SIGACTION section, which was a bug.
8167
6d16b125
MV
81682002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8169
8170 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
8171 signal_handlers, not the closure that is used as the async.
8172 The closure is stored in signal_handler_cells, as previously.
8173
acfa1f52
MV
81742002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
8175
8176 * root.h (scm_root_state): Added 'block_async' slot.
8177 (scm_active_asyncs): Removed abbrev.
8178 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
8179
8180 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
8181 abbrev.
8182
8183 * async.h (scm_call_with_blocked_asyncs,
8184 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8185 scm_c_call_with_unblocked_asyncs): New prototypes.
8186 (scm_mask_signals, scm_unmask_signals): Deprecated.
8187 (scm_mask_ints): Turned into a macro.
8188 * async.c (scm_mask_ints): Removed.
8189 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
8190 this should not be necessary.
8191 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
8192 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
8193 deprecation warning and check for errornous use. Set block_asyncs
8194 instead of scm_mask_ints.
8195 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
8196 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
8197 scm_c_call_with_unblocked_asyncs): New.
8198
8199 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
8200 Asyncs are enabled by default.
8201
34010f56
NJ
82022002-10-09 Neil Jerram <neil@ossau.uklinux.net>
8203
8204 * vports.c (scm_make_soft_port): Allow vector argument to carry a
8205 6th element: an input waiting thunk.
8206 (sf_input_waiting): New.
8207
9310d6f2
MV
82082002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
8209
8210 * root.c (root_mark): Mark active_asyncs slot.
8211
8212 * async.c (scm_async_click): Set the cdr of a executed handler
8213 cell to SCM_BOOL_F, not SCM_EOL.
8214 (scm_i_queue_async_cell): Queue the cell at the end of the list,
8215 and only if the handler procedure is not already present.
8216 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
8217 with SCM_BOOL_F.
8218 * scmsigs.c (scm_sigaction_for_thread): Likewise.
8219
ac48c719
RB
82202002-10-04 Rob Browning <rlb@defaultvalue.org>
8221
1360a142
RB
8222 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
8223
8224 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
8225 scm_lt_dlopenext, and scm_lt_dlerror.
8226 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
8227 and scm_lt_dlerror.
8228 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
8229 and scm_lt_dlerror.
8230 (sysdep_dynl_init): switch to scm_lt_dlinit();
8231
8232 * Makefile.am (libguile_la_LIBADD): switch to use
8233 libguile-ltdl.la.
8234
504d99c5 8235 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 8236
497092c9
MV
82372002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
8238
8239 * scmsigs.h (scm_sigaction_for_thread): New prototype.
8240 * scmsigs.c (got_signal): Removed.
8241 (signal_handler_cells, signal_handler_threads): New.
8242 (take_signal): Queue the cell of the signal for the specified
8243 thread. Reset the signal handler on systems that don't have
8244 sigaction.
8245 (sys_deliver_signals): Removed.
8246 (close_1): New.
8247 (scm_sigaction_for_thread): Renamed from scm_sigaction and
8248 extended to also set the thread of a signal and allocate a cell
8249 for it. Keep the Scheme name "sigaction". Check that signum is
8250 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
8251 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
8252 (scm_init_scmsigs): Allocate signal_handler_cells and
8253 signal_handler_threads vectors.
8254
8255 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
8256 that system asnycs and user asyncs are separated. Reimplemented
8257 system asyncs to work per-thread.
8258
8259 * gc.c (scm_init_gc): Do not use scm_system_async.
8260
8261 * async.h (scm_asyncs_pending, scm_set_tick_rate,
8262 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
8263 Removed prototypes.
8264 (scm_i_queue_async_cell): New.
8265
8266 * __scm.h (scm_asyncs_pending_p): Removed.
8267 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
8268 scm_asyncs_pending_p.
8269
8270 * async.h (scm_system_async_mark_for_thread): New prototype.
8271
8272 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
8273
8274 * root.h (scm_root_state): Added new "active_asyncs" slot.
8275 * root.c (scm_make_root): Initialize it to SCM_EOL.
8276
8277 * coop-defs.h (coop_t): Added new "handle" slot.
8278 * coop-threads.c (all_threads, scm_current_thread,
8279 scm_all_threads, scm_i_thread_root): New.
8280 (scm_threads_init): Add main thread to all_threads.
8281 (scheme_launch_thread): Remove thread from all_threads when it
8282 terminates.
8283 (scm_call_with_new_thread): Initialize handle slot of coop_t
8284 structure and add new thread to all_threads.
8285 (scm_spawn_thread): Likewise.
8286
8287 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
8288 * threads.c (scm_current_thread, scm_all_threads): Register as
8289 primitives.
8290
8291 * dynl.c: Use scm_lt_ prefix for libltdl functions.
8292
480fa28d
NJ
82932002-09-29 Neil Jerram <neil@ossau.uklinux.net>
8294
8295 * script.c (scm_compile_shell_switches): Fix bad spelling of
8296 `explicitly' in comment.
8297
82982002-09-28 Neil Jerram <neil@ossau.uklinux.net>
8299
8300 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
8301 Refer to provided? in doc string rather than deprecated feature?.
8302
3553e1d1
GH
83032002-09-24 Gary Houston <ghouston@arglist.com>
8304
8305 * inline.h (scm_double_cell): prevent reordering of statements
8306 with any following code (for GCC 3 strict-aliasing).
8307 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
8308 the earlier version of the reordering prevention.
8309
4ad0814a
HWN
83102002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8311
8312 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
8313
e88e4f2e
HWN
83142002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8315
8316 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
8317 protection.
8318
1e71eafb
HWN
83192002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8320
8321 * inline.h: include stdio.h
8322
8323 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
8324
61ef9c1f
HWN
83252002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8326
dac04e9f
HWN
8327 * gc-segment.c (scm_i_make_initial_segment): check user settings
8328 for sanity.
8329
8330 * gc-malloc.c (scm_gc_init_malloc): check user settings for
8331 sanity.
dac04e9f
HWN
8332
8333 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
8334
ffd72400
HWN
8335 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
8336
8337 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
8338 these won't ever wrap around with high memory usage. Thanks to
8339 Sven Hartrumpf for finding this.
ffd72400 8340
5bd4a949
HWN
8341 * gc-freelist.c: include <stdio.h>
8342
61ef9c1f
HWN
8343 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
8344
ffd0ef3b
MV
83452002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
8346
a27e3d14
MV
8347 * vectors.h (SCM_VECTOR_REF): New.
8348
ffd0ef3b
MV
8349 * snarf.h (SCM_DEFINE_PUBLIC): New.
8350
f8a1712b
MV
83512002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
8352
8353 * socket.c (scm_addr_vector): Added size of address to arguments.
8354 Use it to avoid accessing a non-existent path in a sockaddr_un.
8355 Changed all callers.
8356
7200a36b
HWN
83572002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8358
1383773b
HWN
8359 * gc.h: remove DOUBLECELL card flags.
8360
8361 * gc-malloc.c (scm_calloc): try to use calloc() before calling
8362 scm_realloc().
8363
8364 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
8365 init loop; handle this from scm_init_card_freelist()
8366
8367 * gc-card.c (scm_init_card_freelist): init bit vector here.
8368
7200a36b 8369 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 8370 num2float.i.c (FLOAT2NUM): idem
7200a36b 8371
9981de3a
HWN
83722002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8373
8374 * eval.h: prepend libguile/ to include path
8375
19647556
MV
83762002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
8377
8378 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
9a5fa6e9 8379 years. Thanks to Martin Grabmüller!
19647556 8380
38d1262a
HWN
83812002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8382
8383 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
8384 unsigned numbers for computing minimum heap increment. This
8385 prevents weird results when a a negative minimum increment is
8386 computed.
8387
f800ebfb
MV
83882002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
8389
8390 * gc_os_dep.c: When we have __libc_stack_end, use that directly
19647556 8391 instead of the old tricks.
f800ebfb
MV
8392
8393 * guile-snarf.in: Do not expect the input file to be the first
8394 argument after the optional "-o" option, just pass everything to
8395 the pre-processor without extracting the input file name.
8396
4a5309c9
HWN
83972002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8398
8399 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
8400 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
8401
f2893a25
HWN
84022002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8403
8404 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
8405 Bill Schottstaedt for the bug report
8406
483f518b
MV
84072002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
8408
8409 * print.c (scm_iprin1): Print primitives generics always as
8410 "primitive-generic" even when they have no primitive methods yet.
8411
917adc55
GH
84122002-08-17 Gary Houston <ghouston@arglist.com>
8413
8414 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
8415 call.
8416
67329a9e
HWN
84172002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8418
85835e59 8419 * ports.c (scm_add_to_port_table): small bugfix.
67329a9e
HWN
8420
8421 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
8422 malloc.
8423
8424 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
8425 only use SCM_MIN_HEAP_SEG_SIZE.
8426
8427 * ports.c (scm_add_to_port_table): add backwards compatibility
8428 function
8429
8430 * ports.h: use scm_i_ prefix for port table and port table size.
8431
f07c886a
MD
84322002-08-15 Mikael Djurfeldt <mdj@linnaeus>
8433
8434 * vports.c (scm_make_soft_port): Initialize pt variable.
8435
dc61cbc6
MV
84362002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
8437
8438 * strports.h (scm_c_eval_string_in_module,
8439 scm_eval_string_in_module): New prototypes.
8440 * strports.c (scm_eval_string_in_module): New, but use
8441 "eval-string" as the Scheme name and make second parameter
8442 optional.
8443 (scm_eval_string): Implement using scm_eval_string_in_module.
8444 (scm_c_eval_string_in_module): New.
8445 Thanks to Ralf Mattes for the suggestion!
8446
da220f27
HWN
84472002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8448
be3ff021
HWN
8449 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
8450 message and abort.
8451
8452 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
8453
da220f27
HWN
8454 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
8455 stead of scm_t_port*. The function now takes a tag argument.
8456
eab1b259
HWN
84572002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8458
8459 * gc.h: add scm_debug_cells_gc_interval to public interface
8460
8461 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
8462
8463 * gc.c (scm_i_expensive_validation_check): separate expensive
8464 validation checks from cheap ones.
8465
ba1b2226
HWN
84662002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8467
8468 * read.c (scm_input_error): new function: give meaningful error
8469 messages, and throw read-error
8470
8471 * gc-malloc.c (scm_calloc): add scm_calloc.
8472
39e8f371
HWN
84732002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8474
33138b05
HWN
8475 * tags.h: remove GC bits documentation from the tags table.
8476
39e8f371
HWN
8477 * read.c (INPUT_ERROR): Prepare for file:line:column error
8478 messages for errors in scm_lreadr() and friends.
8479
84802002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8481
8482 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
8483 implementation).
8484 (scm_gc_calloc): new function
8485
26e68795 84862002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
402788a9 8487
5f16b897
HWN
8488 * ports.c (scm_new_port_table_entry): init port entry to 0
8489 completely.
402788a9
HWN
8490
8491 * ports.c (scm_new_port_table_entry): change function from
8492 scm_add_to_port_table. This prevents cells with null-pointers from
8493 being exposed to GC.
8494
504d99c5 8495 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
402788a9 8496 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
c8a1bdc4 8497
504d99c5 8498 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
c2cbcc57
HWN
8499 to gc-stats.
8500
c8a1bdc4
HWN
8501 * numbers.c (big2str): return "0" for 0 iso. ""
8502
c2cbcc57
HWN
8503 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
8504 private-gc.h: new file
c8a1bdc4
HWN
8505
8506 * gc.c: completely revised and cleaned up the GC. It now uses lazy
8507 sweeping. More documentation in workbook/newgc.text
8508
aea06b34
MV
85092002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8510
8511 * random.c (rstate_free): Return zero.
8512
35060ae9
DH
85132002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8514
8515 * environments.c (remove_key_from_alist): Removed.
8516
8517 (obarray_remove): Simplified.
8518
6a535440
SJ
85192002-07-24 Stefan Jahn <stefan@lkcc.org>
8520
8521 * continuations.h: ia64: Include <signal.h> before
8522 <sys/ucontext.h>.
8523
bcbd25b7
DH
85242002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8525
8526 * modules.c (scm_sym2var): Don't compare SCM values with ==.
8527
26e68795 85282002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1d1559ce
HWN
8529
8530 * goops.c (scm_compute_applicable_methods): use
8531 scm_remember_upto_here_1 iso scm_remember_upto_here
8532
8533 * macros.c: include deprecation.h
8534
504d99c5 8535 * vectors.c (scm_vector_move_right_x): remove side effect in
1d1559ce 8536 macro arg.
504d99c5 8537 (scm_vector_move_left_x): idem.
1d1559ce
HWN
8538
8539 * net_db.c, posix.c, socket.c: variable naming: change ans to
8540 result.
8541
8542 * sort.c (scm_merge_vector_x): accept vector as argument
8543 iso. SCM*. This is needed for full GC correctness.
8544
8545 * gc.h: undo previous undocumented changes related to #ifdef
8546 GENGC.
8547
26e68795 85482002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
34d19ef6
HWN
8549
8550 * *.c: add space after commas everywhere.
8551
8552 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
8553 Document cases where SCM_WRITABLE_VELTS() is used.
8554
8555 * vectors.h (SCM_VELTS): prepare for write barrier, and let
8556 SCM_VELTS() return a const pointer
8557 (SCM_VECTOR_SET): add macro.
8558
3063e30a
DH
85592002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8560
8561 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
8562 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
8563 Deprecated the special kind of built-in dynamic syntax transformer
8564 that was inaccurately named "macro". Note: The built-in syntax
8565 transformers that are named "mmacro" or "memoizing-macro" still
8566 exist, and it is these which come much closer to what one would
8567 call a macro.
8568
4c5f8e8f
NJ
85692002-07-13 Neil Jerram <neil@ossau.uklinux.net>
8570
8571 * eval.c (unmemocopy): Fix for
8572 1001-local-eval-error-backtrace-segfaults (unmemoization crash
8573 with internal definitions and local-eval).
8574
4f6f9ae3
GH
85752002-07-12 Gary Houston <ghouston@arglist.com>
8576
8577 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
8578 defined. They don't do anything useful, especially since the
8579 only case where DYNAMIC_LINKING is undefined seems to be
8580 when --with-modules=no is given to configure, which is basically
8581 requesting that the "dynamic linking module" be omitted.
8582
8583 * Makefile.am (libguile_la_SOURCES): move dynl.c from
8584 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
8585
8586 * extensions.c (load_extension): check DYNAMIC_LINKING for
8587 scm_dynamic_call.
8588 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
8589 scm_init_dynamic_linking.
8590
c21935e6
MV
85912002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
8592
8593 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
8594 check for Cygwin when including <winsock2.h>, this is already
8595 check for by configure. Thus, revert change from 2002-07-07.
8596
ee95d597
GH
85972002-07-10 Gary Houston <ghouston@arglist.com>
8598
9540b68f 8599 * eq.c: include <string.h>
ee95d597
GH
8600 * dynl.c: docstring editing.
8601
46732b54
GH
86022002-07-09 Gary Houston <ghouston@arglist.com>
8603
8604 * dynl.c (scm_dynamic_call): docstring editing.
8605
c09d12e0
RB
86062002-07-08 Rob Browning <rlb@defaultvalue.org>
8607
8608 * gc_os_dep.c: HURD fixes.
8609
3f6571eb
MV
86102002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
8611
8612 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
8613
8614 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
8615 this should be compiled for BUILD host.
8616 Override default rule for
8617 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
8618 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
8619 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
8620
8621 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
8622 <winsock2.h> on Cygwin even when we have it.
8623
bd987b8e
DH
86242002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
8625
8626 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
8627 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
8628 the code. Full number of arguments checking of closures is
8629 mandatory now. However, the option to disable the checking has
8630 most probably not been used anyway.
8631
8505e285
DH
86322002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8633
bd987b8e
DH
8634 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
8635 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
8636 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
8637 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
8638 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
8639 (scm_source_properties, scm_set_source_properties_x,
8640 scm_source_property): Removed compile time option SCM_RECKLESS to
8641 clean up the code. Full number of arguments checking of closures
8642 is mandatory now. However, the option to disable the checking has
8643 most probably not been used anyway.
8505e285
DH
8644
8645 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
8646 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
8647
2ee08a28
GH
86482002-06-30 Gary Houston <ghouston@arglist.com>
8649
732b9327
GH
8650 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
8651 do anything useful. Added a comment about need for a mutex if
8652 pre-emptive threading is supported.
8653
2ee08a28
GH
8654 * posix.c (scm_convert_exec_args), dynl.c
8655 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
8656 allocate_string_pointers. 2) simplified: don't reallocate the
8657 strings, just make an array of pointers 3) avoid memory leaks on
8658 error 4) let the procedure report errors in its own name.
8659 Consequences: 1) the procedures now assume that SCM strings are
8660 nul-terminated, which should always be the case. 2) Since strings
8661 are not reallocated, it's now possible for strings passed to
8662 dynamic-args-call to be mutated.
8663
c136c920
DH
86642002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
8665
8666 * __scm.h, eval.c, eval.h: Removed compile time option
8667 MEMOIZE_LOCALS to clean up the code. Now, caching of local
8668 variable positions during memoization is mandatory. However, the
8669 option to disable the caching has most probably not been used
8670 anyway.
8671
e540802f
MV
86722002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
8673
8674 * print.c (scm_simple_format): Print missing part of format before
8675 ~% control. Thanks to Daniel Skarda!
8676
4c1ffcdd
MV
86772002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
8678
8679 * mkstemp.c: Added exception notice to license statement.
8680
ba1b077b
MV
86812002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
8682
8dc434c7
MV
8683 * numbers.c (mem2ureal): When returning an inexact zero, make sure
8684 it is represented as a floating point value so that we can change
8685 its sign.
8686
ba1b077b
MV
8687 From John W. Eaton <jwe@bevo.che.wisc.edu>
8688
8689 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
8690
74c58131
TTN
86912002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
8692
8693 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
0926d46e 8694 in addition to `i386'. Thanks to Dale P. Smith.
74c58131 8695
8766d4b5
MV
86962002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
8697
8698 * eq.c (real_eqv): New.
8699 (scm_eqv_p): Use it when comparing reals and complexes.
8700
8701 * numbers.c: Include <string.h>, for strncmp.
8702 (mem2complex): Do not create negative NaNs.
8703 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
8704 NaN.
8705 (scm_inexact_to_exact): Signal error when converting a NaN.
74c58131 8706
1d8c3cad
MV
87072002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
8708
8709 * posix.c (scm_putenv): Handle removing variables explicitely by
8710 calling unsetenv.
8711
8712 From John W. Eaton.
74c58131 8713
1d8c3cad
MV
8714 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
8715 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
8716 and scm_nan.
8717 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
8718 [SCO && ! HAVE_ISINF] (isinf): New function.
8719 (xisinf, xisnan): New functions.
8720 (IS_INF): Delete.
8721 (isfinite): Define in terms of xisinf.
8722 (scm_inf_p, scm_nan_p): New functions.
8723 (guile_Inf, guile_NaN): New file-scope vars.
8724 (guile_ieee_init): New function.
8725 (scm_inf, scm_nan): New functions.
8726 (idbl2str): Handle Inf and NaN. Remove funny label and
8727 corresponding gotos.
8728 (ALLOW_DIVIDE_BY_ZERO): New macro.
8729 (scm_divide): Allow division by zero to occur if
8730 ALLOW_DIVIDE_BY_ZERO is defined.
8731 Handle bignums and ints as special cases.
8732
8733 Additional stuff by me:
8734
8735 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
8736 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
8737 (iflo2str): Don't output a '+' for negative numbers or for Inf and
8738 NaN. They will provide their own sign.
8739 (scm_divide): Only allow divides by inexact zeros. Dividing by
8740 exact zeros still signals an errors.
74c58131 8741
7a0c65eb
TTN
87422002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
8743
87b72063 8744 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb 8745 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
504d99c5 8746 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7a0c65eb
TTN
8747 Thanks to Andreas Rottmann.
8748
5e423a39
GH
87492002-04-20 Gary Houston <ghouston@arglist.com>
8750
8751 * removal of unused fields in root state (thanks to Christopher
8752 Cramer for pointing out the disuse.)
8753 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
1841c44a 8754 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
b6287a25 8755
5e423a39
GH
8756 * root.c (root_mark): don't mark them.
8757 (scm_make_root): don't set them to #f.
8758 * init.c (scm_init_standard_ports): don't initialise with the
8759 default ports.
8760
9d2cce76
MV
87612002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
8762
8763 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
8764 cpp_sig_symbols.c.
8765
87662002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
8767
8768 * guile-snarf.in: Do not clean input file. This would write to
8769 the $(srcdir) during a VPATH build, which is not allowed. It also
8770 isn't needed since it only works when an output filename has been
8771 specified and in that case we don't need to clean the input file
8772 because the output file will already exist.
8773
6f79b6cc
MV
87742002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
8775
8776 * guile-snarf: Install the trap for removing $cleanfile only when
8777 the value of $cleanfile is actually known.
8778
21550b10
RB
87792002-04-10 Rob Browning <rlb@defaultvalue.org>
8780
8781 * .cvsignore: add versiondat.h and *.c.clean.c.
8782
bc76d628
DH
87832002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
8784
8785 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
8786 function, replaces macro SRCBRKP.
8787
8788 (SRCBRKP): Deprecated.
8789
8790 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
8791 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
8792 temporary variable.
8793
5132eef0
DH
87942002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
8795
8796 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
8797 CHECK_EXIT and removed all references to them.
8798
680516ba
DH
87992002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
8800
8801 * debug.h (scm_ready_p, debug_print): Removed declarations.
8802
8803 * eval.c (EVALCELLCAR): Removed.
8804
8805 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
8806 operation from condition.
8807
e2bd68e0
MV
88082002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
8809
8810 * guile-snarf.in: When the output filename is "-", write to
8811 stdout. When no "-o" option is given, use "-" as the output
8812 filename (i.e., stdout). Only 'clean' the inputfile or remove the
8813 output file on error when the output file name is not "-". Define
8814 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
8815
8816 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
8817
ab1f1094
DH
88182002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
8819
8820 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
8821 and the corresponding goto statements. Removed redundant code.
8822
42030fb2
DH
88232002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
8824
8825 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
8826 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
8827 Re-enabled handing of rpsubrs and asubrs.
8828
e050d4f8
DH
88292002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
8830
8831 * eval.c (SIDEVAL): Removed.
8832
8833 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
8834 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
8835 argument checking order for set! to locals, variables and symbols.
8836 Improvements to control structure. Removed some uses of arg1 and
8837 arg2 as temporary variables.
8838
a6d344d3
TTN
88392002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
8840
8841 * guile-snarf.in: Remove "--compat=1.4" support.
8842 Add "-d" and "-D" support.
8843
8844 (deprecated_list): New var.
8845 (compat_mode_clean_xxx): Delete.
8846 (grep_deprecated): New func.
8847 ("main"): If "-d" or "-D", call `grep_deprecated'.
8848
3939e9df
NJ
88492002-03-15 Neil Jerram <neil@ossau.uklinux.net>
8850
387d418c
NJ
8851 * hooks.h: Change scm_t_c_hookype_t everywhere to
8852 scm_t_c_hook_type.
8853
bb2c02f2 8854 Docstring fixes:
a6d344d3 8855
bb2c02f2
NJ
8856 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
8857
8858 * ports.c (scm_sys_make_void_port): Use `@file'.
8859
8860 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
8861 than `else'.
8862
8863 * macros.c (scm_makmacro): Don't say that the form replaces its
8864 source, because it doesn't.
8865 (scm_makmmacro): Clarify difference between this and scm_makmacro.
8866
8867 * backtrace.c (scm_display_error), filesys.c (scm_umask,
8868 scm_select, scm_basename), goops.c (scm_method_generic_function),
8869 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
8870 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
8871 spelling mistakes.
8872
3939e9df
NJ
8873 * debug.c (scm_debug_options), eval.c
8874 (scm_eval_options_interface), read.c (scm_read_options): Change
8875 incorrect @var in docstring to @code.
8876
3b3cc781
MV
88772002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
8878
500b0d5b
MV
8879 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
8880
3b3cc781
MV
8881 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
8882 guile-snarf can remove trailing non-init code.
8883
8884 * guile-snarf.in (modern_snarf): Remove everything following and
8885 including "^:^" from the output.
8886
dff98306
DH
88872002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8888
8889 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
8890
8891 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
8892
2287fb53
TTN
88932002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
8894
8895 * guile-snarf.in: Update copyright.
8896 Rewrite to internalize error handling.
8897 Add "--compat=1.4" handling.
8898 Add commentary.
8899
8900 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
8901 (snarfcppopts): New var.
8902 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
8903 (.c.doc): Use $(snarfcppopts).
8904
822250a4
TTN
8905 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
8906 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
8907 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
8908 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
8909 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8910 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
8911 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
8912 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
8913 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
8914 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
8915 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
8916 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
8917 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
8918 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
8919
b7798e10
DH
89202002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8921
8922 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
8923 The next step will be to remove the union 't' and simplify the
8924 code of SCM_CEVAL that way.
8925
04a98cff
NJ
89262002-03-12 Neil Jerram <neil@ossau.uklinux.net>
8927
8928 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
8929 rreadfds, rwritefds, rexceptfds): Made static.
8930
8931 * gc.c (terminating), fports.c (terminating): Renamed
8932 scm_i_terminating.
8933
16d98032
MV
89342002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
8935
5046250e
MV
8936 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
8937 potential overflow problems. Thanks to John W Eaton!
8938
8794207d
MV
8939 * strop.c (string_capitalize_x): Treat characters as unsigned so
8940 that 8-bit chars work. Thanks to David Pirotte!
16d98032 8941
1d15ecd3
DH
89422002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
8943
8944 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
8945 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
8946 proc as temporary variables. Introduced temporary variables with
8947 hopefully descriptive names for clarification. Replaced SCM_N?IMP
8948 by a more explicit predicate in some places.
8949
89502002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
f12745b6
DH
8951
8952 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
8953 Added lots of comments regarding the implementation of #@dispatch.
8954 Changed intra-procedure communication to use t.arg1 instead of
8955 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
8956 variables. Introduced temporary variables with hopefully
8957 descriptive names for clarification. Replaced SCM_N?IMP by a more
8958 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
8959 of computing the expression explicitly. Eliminate now unused
8960 label nontoplevel_cdrxbegin.
8961
8962 * goops.h (SCM_INSTANCE_HASH): New macro.
8963
8964 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
8965
1ebf1566
TTN
89662002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
8967
8968 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
8969 "guile-snarf" moved back from `noinst_SCRIPTS'.
8970
020c890c
NJ
89712002-03-08 Neil Jerram <neil@ossau.uklinux.net>
8972
58d233cc
NJ
8973 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
8974 exists when adding a source property other than those that are
8975 handled explicitly, add the new property to the SRCPROPS obj's
8976 plist.
8977
020c890c
NJ
8978 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
8979 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
8980
8981 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
8982 debug.status. It isn't needed, and it can overflow the bits
8983 reserved for it (which may lead to a segv or a GC abort).
8984
3f04400d
DH
89852002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8986
8987 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
8988 side-effecting operations from conditions and macro calls.
8989 Replaced SCM_N?IMP by a more explicit predicate in some places.
8990 Minimized the scope of some variables.
8991
97820583
SJ
89922002-03-02 Stefan Jahn <stefan@lkcc.org>
8993
8994 * convert.i.c: Fixed int <-> long conversions which would have
8995 failed if their sizes were different.
8996
38ace99e
DH
89972002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
8998
8999 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
9000 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
9001 as temporary variables. Removed side-effecting operations from
9002 conditions and macro calls. Introduced temporary variables with
9003 hopefully descriptive names for clarification. Replaced SCM_N?IMP
9004 by a more explicit predicate in some places. Removed code that
9005 was conditionally compiled if SICP was defined - which it never
9006 is.
9007
e5cb71a0
DH
90082002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9009
9010 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
9011 Removed some uses of t.arg1 and proc as temporary variables.
9012 Removed side-effecting operations from conditions and macro calls.
9013 Introduced temporary variables with hopefully descriptive names
9014 for clarification. Replaced SCM_N?IMP by a more explicit
9015 predicate in some places.
9016
6a0f6ff3
DH
90172002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
9018
9019 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
9020 explicit predicate in some places.
9021
9022 (CHECK_EQVISH): Removed.
9023
9024 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
9025 variables. Removed side-effecting operations from conditions and
9026 macro calls. Introduced temporary variables for clarification.
9027 Sorted if-else-if check for the type of the last form in a list by
9028 frequency. Avoided some unnecessary tail-recursion calls.
9029
228a24ef
DH
90302002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
9031
9032 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
9033 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
9034 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
9035 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
9036 scm_cell and all its uses to scm_t_cell in accordance to Guile's
9037 naming scheme for types.
9038
9039 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
9040 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
9041 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
9042 (scm_make_environment), eval.c (scm_closure), fports.c
9043 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
9044 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
9045 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
9046 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
9047 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
9048 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
9049 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
9050 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
9051 scm_alloc_cell to scm_cell.
9052
9053 * environments.c (core_environments_observe), gc.c
9054 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
9055 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
9056 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
9057 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
9058 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
9059 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
9060 (allocate_weak_vector): Renamed scm_alloc_double_cell to
9061 scm_double_cell.
9062
edb810bb
SJ
90632002-02-27 Stefan Jahn <stefan@lkcc.org>
9064
9065 * convert.i.c, convert.c: Better range checking.
9066
9067 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
9068
1ebf1566 9069 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
edb810bb
SJ
9070 Windows (MinGW).
9071
327d4dd3
TTN
90722002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
9073
9074 * Makefile.am: Update path to pre-inst-guile automake frag.
9075
89d7a92c 90762002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
646052c0
DH
9077
9078 * gc.c (scm_gc_sweep): Make it compile even when deprecated
9079 features are excluded.
9080
89d7a92c 90812002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
bac0e232
DH
9082
9083 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
9084
4f2716b6
GH
90852002-02-25 Gary Houston <ghouston@arglist.com>
9086
9087 * convert.c: include <string.h> for convert_i.c.
9088
46151112
RB
90892002-02-24 Rob Browning <rlb@defaultvalue.org>
9090
9091 * .cvsignore: add stamp-h1.
9092
cd328b4f
NJ
90932002-02-21 Neil Jerram <neil@ossau.uklinux.net>
9094
9095 * unif.c (scm_array_to_list): Correct name, which had been
9096 accidentally changed to scm_t_arrayo_list!
9097
c709de7f
MD
90982002-02-20 Mikael Djurfeldt <mdj@linnaeus>
9099
9100 * gc.c (scm_gc_sweep): Print an error message when aborting due to
9101 underflowing scm_mallocated.
9102
c1965d31
MV
91032002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9104
9105 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
9106 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
9107 Reimplemented using the new scm_gc_malloc, etc., functions and
9108 deprecated.
9109
b606945b
TTN
91102002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
9111
9112 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
9113 to `noinst_PROGRAMS'.
9114 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
9115 (noinst_PROGRAMS, noinst_SCRIPTS): New.
9116
7c686ba8
MV
91172002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9118
9119 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
9120 non-zero is returned from a port or smob free function.
9121 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
9122 scm_gc_register_collectable_memory,
9123 scm_gc_unregister_collectable_memory, scm_gc_malloc,
9124 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
9125
9126 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
9127 debug-malloc.c, dynl.c, environments.c, environments.h,
9128 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
9129 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
9130 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
9131 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
9132 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
9133 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
9134 appropriate. Return zero from smob and port free functions.
9135
9136 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
9137
9138 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
9139 messages while the GC is running.
9140 (scm_c_issue_deprecation_warning_fmt): New.
9141
9142 * fports.c (scm_setvbuf): Reset read buffer to saved values when
9143 it is pointing to the putback buffer.
9144
66adc0a6
TTN
91452002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
9146
9147 * gsubr.c (create_gsubr): On "too many args" error,
9148 also display arg count and name. Thanks to Bill Schottstaedt.
9149
0187b4f4
TTN
91502002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
9151
9152 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
9153
9154 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
9155 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
9156 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
9157
9158 * guile-snarf-docs-texi.in: Bye bye.
9159
402e687c
MV
91602002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9161
9162 * symbols.c (scm_make_symbol): Fix typo in docstring.
9163
9164 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9165 scm_make_symbol): New prototypes.
9166
319b98ed
MV
91672002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
9168
9169 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
9170 (SCM_SYMBOL_INTERNED_P): New.
9171 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
9172 SCM_MAKINUM since hash values can well be bignums.
9173 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
9174 This signals a interned symbol.
9175 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
9176 scm_make_symbol): New.
0187b4f4 9177
319b98ed
MV
9178 * print.c (scm_iprin1): Print uninterned symbols unreadably.
9179
34472dfe
TTN
91802002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
9181
9182 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
9183 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
0187b4f4 9184 Thanks to Dave Love.
34472dfe 9185
1b39c2e3
MV
91862002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
9187
9188 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
319b98ed 9189 This might help to make unintended clashes less likely.
1b39c2e3
MV
9190 (scm_string_to_symbol): Protect the string until the symbols is
9191 created.
9192
1fa86ca5
SJ
91932002-01-31 Stefan Jahn <stefan@lkcc.org>
9194
9195 * convert.c, convert.h, convert.i.c: New files containing C
34472dfe 9196 array to Scheme conversion helpers meant to be replacement
1fa86ca5
SJ
9197 functions for the deprecated gh interface.
9198
9199 * Makefile.am: Setup rules for new `convert.*' files.
9200
af68e5e5
SJ
92012002-01-28 Stefan Jahn <stefan@lkcc.org>
9202
9203 * symbols.c (scm_c_symbol2str): New function, replacement for
9204 `gh_scm2newsymbol()'.
9205
34472dfe 9206 * strings.c (scm_c_substring2str): New function. Proper
af68e5e5
SJ
9207 replacement for `gh_get_substr()'.
9208
9209 * socket.c: Include `stdint.h' if available for the `uint32_t'
9210 declaration.
9211
504d99c5 9212 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
af68e5e5
SJ
9213 compiler warning).
9214
9215 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
9216
c96d76b8 92172002-01-22 Neil Jerram <neil@ossau.uklinux.net>
34472dfe 9218
c96d76b8 9219 Other changes unrelated to Elisp...
34472dfe 9220
c96d76b8
NJ
9221 * eval.c (scm_m_if): Use s_if rather than repeating string literal
9222 "if".
9223 (comments): Fix a few typos.
9224 (scm_for_each): Add parentheses around oddly unparenthesized
9225 if/while conditions.
9226
9227 * read.c (scm_read_opts): Add full stop at end of doc for
9228 `keywords' option.
9229
9230 * script.c (scm_compile_shell_switches): Use scm_str2symbol
9231 instead of gh_symbol2scm.
9232
9233 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
9234 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
9235
9236 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
9237 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
9238
9239 First batch of changes for Elisp support...
9240
9241 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
9242 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
9243 throw.c, vectors.c, weaks.c: Add #include for lang.h.
9244
9245 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
9246 conditionalize compilation and initialization of Elisp support
9247 function.
34472dfe 9248
c96d76b8
NJ
9249 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
9250 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
9251 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
9252 filesys.c (fill_select_type, retrieve_select_type), fluids.c
9253 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
9254 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
9255 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
bbd26b5a
NJ
9256 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
9257 options.c (change_option_setting, scm_options), posix.c
9258 (environ_list_to_c), print.c (scm_iprlist), throw.c
9259 (scm_exit_status), vectors.c (scm_vector), weaks.c
9260 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
c96d76b8
NJ
9261
9262 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
9263 just SCM_FALSEP.
34472dfe 9264
c96d76b8
NJ
9265 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
9266 of just SCM_BOOLP.
9267
9268 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
9269 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
9270 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
9271 (scm_m_atfop): Support function aliasing. Support both function
9272 args, which need transformation, and macro args, which do not.
9273 Add explanatory comments.
9274 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
9275 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
9276 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
9277 SCM_NULLP || SCM_NILP instead of checks against (removed)
9278 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
9279 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
9280
9281 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
9282 scm_m_while, scm_nil_eq): Commented out; I don't think we need
9283 these, but I don't want to remove them yet, just in case.
9284 (scm_init_lang): Define `%nil' variable on Scheme level to hold
9285 Elisp nil value.
9286
9287 * lang.h (SCM_NILP): Test against Elisp nil value instead of
9288 against (removed) scm_lisp_nil.
9289 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
9290 (SCM_NULL_OR_NIL_P): New.
9291
9292 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
9293 SCM_VALIDATE_NULL.
9294
9295 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
9296 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
9297 value).
9298
9299 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
9300 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
9301 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
9302 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
9303
9304 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
9305 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
9306 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
9307 Numbering shifted down accordingly.
9308 (SCM_ELISP_NIL): New IFLAG.
9309
9310 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
34472dfe 9311
a392ee15
DH
93122002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9313
9314 * eval.c: Removed outdated references to "everr". Improved some
9315 comments.
9316
9317 (scm_deval_args, deval_args): Renamed scm_deval_args to
9318 deval_args, since it is not part of the interface.
9319
9320 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
9321 use references to debug.vect[0] before it exists. Add parentheses
9322 to switch statement.
9323
9324 * goops.h: Added local emacs variables.
9325
24933780
DH
93262002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9327
9328 * eval.[ch] (scm_deval_args): Made static.
9329
9330 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
9331 test.
9332
9333 * strings.c (scm_c_string2str): Clarified comment. Replaced
9334 THINKME by FIXME for uniformness. Removed question about whether
9335 arguments need to be protected from garbage collection: Arguments
9336 must be protected as any other variable.
9337
f9450cdb
DH
93382002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
9339
9340 * procs.h (SCM_CLOSURE_BODY): New Macro.
9341
9342 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
9343 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
9344 get_slot_value, set_slot_value), procs.c
9345 (scm_procedure_documentation), sort.c (closureless), stacks.c
9346 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
9347 SCM_CLOSURE_BODY.
9348
9349 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
9350
5dc64f64
MV
93512001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
9352
9353 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
9354 use "cp" instead.
9355
197ee3d3
MV
93562001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
9357
9358 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
9359 everywhere.
9360
9361 * continuations.c (scm_make_continuation): Do not retain the
9362 throw_value when the continuation is invoked.
9363
4d4528e7
SJ
93642001-12-08 Stefan Jahn <stefan@lkcc.org>
9365
9366 * strings.c (scm_c_string2str): New function. Converts a
34472dfe 9367 given Scheme string into a C string. Also put in two
4d4528e7
SJ
9368 THINKME's regarding the malloc policy for the missing converter
9369 routines.
9370
98347362
NJ
93712001-12-01 Neil Jerram <neil@ossau.uklinux.net>
9372
9373 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
9374 gh_symbol2scm.
9375
1fc8902f
DH
93762001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
9377
9378 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
9379 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
9380
9381 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
9382 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
9383 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
9384 macros.
9385
9386 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
9387
9388 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
9389 SCM_GC_CELL_* macros when accessing free cells.
9390
4878beec
MV
93912001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
9392
9393 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
34472dfe 9394 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
4878beec
MV
9395 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
9396 * strings.h (SCM_MAKE_STRING_TAG): New.
9397 * procs.h (SCM_MAKE_CCLO_TAG): New.
9398 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
9399
9400 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
9401 !SCM_ENABLE_DEPRECATED.
9402
9403 * async.c, async.h (scm_system_async_mark_from_signal_handler):
9404 New.
9405
9406 * scmsigs.c (scm_take_signal): Removed all code that assumes that
9407 signal handlers are allowed to divert the flow of control. Call
9408 scm_system_async_mark_from_signal_handler instead of
9409 scm_system_async_mark.
9410
9411
9412 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
9413 scm_alloc_double_cell in their place.
34472dfe 9414
4878beec
MV
9415 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
9416 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
9417 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
9418 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
9419 scm_deprecated_newcell and scm_deprecated_newcell2.
9420
9421 gc.c (scm_tc16_allocated): Only define when including deprecated
9422 features.
9423 (scm_debug_newcell, scm_debug_newcell2): Removed.
9424 (scm_init_storage): Do not initialize scm_tc16_allocated.
9425 (scm_init_gc): Do it here.
9426 (allocated_mark): New, from old code.
9427 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
34472dfe 9428
4878beec 9429 * inline.c, inline.h: New files.
34472dfe 9430 * Makefile.am: Added them in all the right places.
4878beec 9431
34472dfe 9432 * _scm.h: Include "libguile/inline.h".
4878beec
MV
9433
9434 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
9435 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
9436 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
9437 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
9438 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
9439 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
9440 scm_alloc_double_cell, respectively.
9441
d2bc7fae
MV
94422001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
9443
9444 * modules.c (scm_c_use_module): Adapt to changes to
9445 `process-use-modules'.
9446
5eec27e9
DH
94472001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9448
9449 * numbers.c (scm_divide): Fix more division by zero errors.
9450
8978878f
GH
94512001-11-21 Gary Houston <ghouston@arglist.com>
9452
9453 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
9454 obsolete. autogen.sh says:
9455 invalid unused variable name: `OMIT_DEPENDENCIES'
9456
164826d3
DH
94572001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
9458
9459 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
9460 reporting the bug.
9461
84aff7a7
MV
94622001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
9463
9464 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
9465 Thanks to Eric Gillespie, Jr!
34472dfe 9466
6063dc1d
SJ
94672001-11-21 Stefan Jahn <stefan@lkcc.org>
9468
34472dfe
TTN
9469 * win32-socket.c (getservent, setservent, endservent,
9470 getprotoent, setprotoent, endprotoent): New functions.
6063dc1d
SJ
9471 Appropriate replacements for M$-Windows.
9472
9473 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
9474 these definitions for GUILE_DEBUG.
9475
9476 * net_db.c: Include "win32-socket.h" if compiling with a native
34472dfe
TTN
9477 M$-Windows compiler. Include some pieces of code (protoent and
9478 servent interface) protected by HAVE_* macros when using a
6063dc1d
SJ
9479 native M$-Windows compiler.
9480
351982f6
MV
94812001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
9482
9483 * modules.c (scm_c_export): Do nothing when the first argument is
9484 already the terminating NULL. Thanks to Han-Wen Nienhuys!
9485
849038b5
TTN
94862001-11-20 Thien-Thi Nguyen <ttn@glug.org>
9487
9488 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
9489 also include `buildstamp'.
9490
5c790b44
RB
94912001-11-18 Rob Browning <rlb@defaultvalue.org>
9492
9493 * version.c
9494 (s_scm_major_version): use SCM_MAJOR_VERSION.
9495 (s_scm_minor_version): use SCM_MINOR_VERSION.
9496 (s_scm_micro_version): use SCM_MICRO_VERSION.
9497 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
9498 SCM_MICRO_VERSION.
9499
9500 * version.h.in
9501 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
9502 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
9503 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
9504
694a9bb3
NJ
95052001-11-18 Neil Jerram <neil@ossau.uklinux.net>
9506
9507 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9508 Rewrite docstrings without reference to substring-move-left/right,
9509 since the latter no longer exist.
9510
302c12b4
DH
95112001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9512
9513 * eval.c: Removed bogus comment about acros.
9514
9515 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
9516 Minimize scope of local variable. Eliminate dependency on
9517 macro DEBUG_EXTENSIONS.
9518
9519 (s_splicing): New error message string.
9520
9521 (scm_m_body): Issue 'bad body' message rather than 'missing
9522 expression' message.
9523
9524 (scm_m_quote): Eliminate unnecessary copying.
9525
9526 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
9527 checking of the body to scm_m_body.
9528
9529 (scm_m_do): Move comment to function header. Rename arg1 to
9530 binding. Made the code a bit easier to read.
9531
9532 (evalcar): Removed.
9533
9534 (iqq): Added a comment. Changed the depth parameter to
9535 unsigned. Use size_t for vector lengths. Make sure vector object
9536 is gc protected as long as its contents are read. Add some syntax
9537 checks. Get rid of unnecessary SCM_IMP test. Clean up the
9538 control structure a bit.
9539
9540 (scm_m_delay): Added comment about the implementation of
9541 scm_m_delay.
9542
9543 (scm_m_define): Add comment about guile's currying define
9544 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
9545 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
9546
9547 (scm_m_letrec1): Removed. Part of the functionality is taken
9548 over by the new function 'transform_bindings'.
9549
9550 (transform_bindings): New function. Takes over some of the
9551 functionality of removed function 'scm_m_letrec1', namely to split
9552 a list of bindings into a reversed list of variables and a list of
9553 initializers.
9554
9555 (scm_m_letrec): Call 'transform_bindings'.
9556
9557 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
9558 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
9559 test. Use 'transform_bindings'. Fixed scoping error with named
9560 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
9561 Jerram for suggesting the fix). Cleaned up the control structure
9562 a bit.
9563
9564 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
9565 unnecessary consing. Eliminated unnecessary
9566 SCM_DEFER/ALLOW_INTS.
9567
9568 (SCM_CEVAL): Un-obfuscated some loops.
9569
cecb4a5e
NJ
95702001-11-16 Neil Jerram <neil@ossau.uklinux.net>
9571
8f85c0c6
NJ
9572 * gc.h (scm_unhash_name): Old declaration removed.
9573
9574 * eval.c (s_scm_eval): Change @var{primitive-eval} to
9575 @code{primitive-eval}.
9576
9577 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
9578 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
9579 Change @deffnx lines in docstrings to say {Scheme Procedure}
9580 rather than primitive or procedure.
9581
9582 * posix.c (scm_execl), filesys.c (scm_close), unif.c
9583 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
9584 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
9585 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
9586 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
9587 (scm_string_split, scm_string_ci_to_symbol), strings.c
9588 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
9589 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
9590 Docstring fixes and improvements reflecting edits that have been
9591 made in the reference manual source.
9592
9593 * objprop.c (scm_object_properties, scm_set_object_properties_x,
9594 scm_object_property, scm_set_object_property_x): Remove invalid
9595 @deffnx lines for corresponding procedure property primitives.
9596
cecb4a5e
NJ
9597 These changes add a @deffnx C function declaration and function
9598 index entries for each Guile primitive to the copy of the doc
9599 snarf output that is used for reference manual synchronization.
9600 Online help is unchanged.
849038b5 9601
cecb4a5e
NJ
9602 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
9603 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
9604 name to SCM_SNARF_DOCS.
849038b5 9605
cecb4a5e
NJ
9606 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
9607 snarf-check-and-output-texi.
9608
9609 * Makefile.am (guile-procedures.texi): New rule.
9610 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
9611 Changed so that the last stage of doc snarfing is now performed
9612 twice, once to produce guile-procedures.txt for online help, and
9613 once to produce guile.texi for reference manual synchronization.
9614
ddea3325
DH
96152001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
9616
9617 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
9618 safely usable as a single statement followed by a ';', for example
9619 in an if statement.
9620
9621 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
9622
72dd0a03
NJ
96232001-11-13 Neil Jerram <neil@ossau.uklinux.net>
9624
9625 * random.c (scm_random_solid_sphere_x,
9626 scm_random_hollow_sphere_x): Correct "shere" typos.
9627
9628 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
9629
9630 * version.c (scm_version): Update docstring to include
9631 `micro-version'.
9632
6558eda6
MV
96332001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
9634
409b8588
MV
9635 * modules.c (scm_c_export): Call va_end after collecting the
9636 symbols.
9637
adb8c0f2
MV
9638 * strop.h, strop.c (scm_substring_move_left_x,
9639 scm_substring_move_right_x): Removed.
9640
6558eda6
MV
9641 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
9642 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
9643 configure does.
9644
5d8fc640
MV
96452001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
9646
9647 * numbers.c: Document macros to define when including
9648 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
9649 now rely on SIZEOF_ macros that have been figured out at
9650 configure time.
9651
9652 * num2integral.i.c: Adapt to new interface.
9653 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
9654 target type by casting it and checking whether it is still the
9655 same. Do not try to handle bignums for integral types that are
9656 smaller than fixnums. When handling bignums, collect the
9657 magnituse first into a unsigned type, and correctly check for
9658 overflow.
9659 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
9660 only -MIN_VALUE can still be negative of all negative numbers (in
9661 twos-complement).
9662
849038b5 9663 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
5d8fc640
MV
9664
9665 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
9666 HAVE_LONG_LONG depending on whether their size is non-zero.
9667
d6b8cf11
TTN
96682001-11-11 Thien-Thi Nguyen <ttn@glug.org>
9669
9670 * strop.c (scm_string_null_p): Docfix; nfc.
9671 Thanks to Scott Lenser.
9672
9401323e
NJ
96732001-11-07 Neil Jerram <neil@ossau.uklinux.net>
9674
9675 * extensions.c (scm_load_extension): Canonicalize docstring
9676 whitespace.
9677
9678 * unif.c (scm_uniform_array_write), ports.c
9679 (scm_current_output_port, scm_force_output), dynwind.c
9680 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
9681 filesys.c (scm_open, scm_lstat), struct.c
9682 (scm_make_struct_layout), random.c (scm_random,
9683 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
9684 (scm_i_index): Remove superfluous whitespace from end of docstring
9685 lines.
9686
9687 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
9688 strings.c (scm_make_string), variable.c (scm_make_variable,
9689 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
9690 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
9691 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
9692 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
9693 newline at end of docstrings.
9694
9695 * modules.c (scm_set_current_module): Add missing newline to
9696 docstring.
9697
b4e15479
SJ
96982001-11-07 Stefan Jahn <stefan@lkcc.org>
9699
9700 * win32-socket.[ch]: New files. Defines Winsock-API error codes
9701 and makes them available through Guile. That is because the
9702 Winsock-API does not store its errors in `errno' and thus cannot
9703 return error messages via `strerror (errno)'.
9704
9705 * socket.c (scm_init_socket): Initialize `win32-socket' part
9706 here under M$-Windows.
9707
d6b8cf11 9708 * numbers.h: Added missing declaration of
b4e15479
SJ
9709 `scm_sys_check_number_conversions()'.
9710
9711 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
9712 and use in `(strerror)' and `(system-error)'.
9713
d6b8cf11 9714 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
b4e15479
SJ
9715 `win32-socket.[ch]' to extra source and header files.
9716
7ab89df1
MV
97172001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
9718
9719 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
9720 a call to turn-on-debugging when --debug has been given instead of
9721 turning it on directly. Also, handle new `--no-debug' option,
9722 which might suppress the call to turn-on-debugging.
9723
0233bfc1
SJ
97242001-11-05 Stefan Jahn <stefan@lkcc.org>
9725
9726 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
9727
8f99e3f3
SJ
97282001-11-04 Stefan Jahn <stefan@lkcc.org>
9729
9730 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
d6b8cf11 9731 here (was at guile_LDADD) which describes the dependency
8f99e3f3
SJ
9732 correctly and allows a clean build on Win32.
9733
d6b8cf11 9734 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8f99e3f3
SJ
9735 into FOO.
9736
9737 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
9738 import macros for external libraries (libcrypt, libqthreads,
9739 libreadline and libregex).
9740
9741 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
9742
9743 * posix.c (flock): Added support for flock() in M$-Windows.
9744
9745 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
9746 of __SCM_IMPORT__.
9747
9748 * fports.c (getflags): Differentiate reading and writing pipes
9749 descriptors.
9750
9751 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
9752 M$-Windows.
9753
9754 * coop.c (coop_condition_variable_timed_wait_mutex): Use
9755 conditionalized error code if `ETIMEDOUT' is not available.
9756 (scm_thread_usleep): Remove bogus declaration of `struct timeval
9757 timeout'.
9758
9759 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
9760 belongs. That is because NO_PREPRO_MAGIC gets undefined after
9761 each inclusion of `num2integral.i.c'.
9762 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
9763
4e21fa60
MV
97642001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
9765
9766 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
9767 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
9768
08112c95
MD
97692001-11-02 Mikael Djurfeldt <mdj@linnaeus>
9770
7663c008
MD
9771 * print.c (scm_iprin1): Mark print state as revealed when
9772 dispatching to generic write or display.
9773
08112c95
MD
9774 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
9775
f712d833
MV
97762001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
9777
9778 Support for native Win32. Thanks to Stefan Jahn!
d6b8cf11 9779
f712d833
MV
9780 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
9781 and win32-dirent.h to extra source and header files. These
9782 include the uname() and the POSIX dirent interface implementation
9783 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
9784 linkers which do not allow unresolved symbols inside shared
9785 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
9786 dependency.
9787
d6b8cf11
TTN
9788 * __scm.h: Defined SCM_API. This macro gets prepended to all
9789 function and data definitions which should be exported or imported
f712d833
MV
9790 in the resulting dynamic link library in the Win32 port.
9791
9792 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
d6b8cf11 9793 chars.h, continuations.h, coop-defs.h, coop-threads.h,
f712d833
MV
9794 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
9795 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
9796 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
9797 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
9798 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
d6b8cf11 9799 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
f712d833
MV
9800 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
9801 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
9802 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
9803 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
9804 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
9805 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
9806 vports.h, weaks.h:
9807 Prefixed each each exported symbol with SCM_API.
9808
d6b8cf11 9809 * continuations.c: Added comment about the use of the extern
f712d833
MV
9810 declarations of {get,set}context() functions used in the ia64 port.
9811
9812 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
9813 is meant to be a `unsigned long *'.
9814
9815 * filesys.c: Include `direct.h' if possible. Use local
9816 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
9817 macros for M$-Windows. Implementation of `fstat_Win32()' which is
9818 able to differentiate between sockets and other file descriptors.
9819 Use this function as wrapper in `scm_fstat()'. Fixed typo in
9820 `scm_dirname()'.
9821
9822 * fports.c: Include `io.h' is possible. Put `*fp' into referring
9823 statement block in `scm_fport_buffer_add()'.
9824 Some corrections in `getflags()'.
d6b8cf11 9825
f712d833
MV
9826 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
9827
9828 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
9829 build on Win32. Disable preloaded symbols on Win2 platforms.
9830
9831 * ioext.c, ports.c: Include `io.h' is possible.
9832
9833 * mkstemp.c: Include `process.h' is possible.
9834
9835 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
9836 too.
9837 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
9838
9839 * posix.c: Remove unnecessary dirent includes and defines. Include
9840 local `win32-uname.h' for MinGW. Extern declaration of
9841 `mkstemp()' for systems where it does not exists. Make
9842 `getlogin()' available on M$-Windows.
9843
9844 * scmsigs.c: Made `usleep()' avalable on MinGW.
9845
9846 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
9847
9848 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
9849
9850 * win32-uname.c: Include "win32-uname.h", not "uname.h".
9851
d245ce23
MD
98522001-10-28 Mikael Djurfeldt <mdj@linnaeus>
9853
9854 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
9855 Don't apply scm_uniform_vector_length on arrays.
9856
8ea46249
DH
98572001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
9858
9859 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
9860 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
9861 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
9862 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
9863 scm_list_<n> over scm_cons[2]?.
9864
9865 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
9866 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
9867 SCM_C[AD][AD]R instead of explicit form.
9868
9869 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
9870 comparison parameters.
9871
9872 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
9873 !SCM_NULLP instead of SCM_NIMP.
9874
9875 (scm_m_case): Don't copy the form. Renamed proc to clause and
9876 minimized its scope. Renamed x to clauses. Removed side
9877 effecting operation from macro call.
9878
9879 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
9880 minimized its scope. Renamed x to clauses. Minimized the scope
9881 of variable 'len'. Make sure the else clause is treated specially
9882 even in case of '=>' occurences. Don't change the else to #t in
9883 order to be able to distinguish this case in the evaluator. Leave
9884 type checking of the recipient to the evaluator.
9885
9886 (scm_c_improper_memq): Made the comment somewhat clearer.
9887
9888 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
9889 test for SCM_IM_LET at the place of the formal parameters.
9890 Simplified the formal parameter checking.
9891
9892 (scm_m_letstar): Added Comment. Renamed proc to bindings.
9893 Renamed arg1 to binding and minimized its scope. Eliminated
9894 unnecessary consing.
9895
9896 (scm_m_do): Renamed proc to bindings. Minimized the scope of
9897 variable 'len'.
9898
9899 (build_binding_list): New static function.
9900
9901 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
9902 Further, split up the 'letrec' unmemoizing code to the
9903 corresponding parts for 'do', 'let' and 'letrec', adding comments
9904 to each form. Cleanup the handling of the do form (This removes
9905 some *real* code :-).
9906
9907 (SCM_CEVAL): Removed side effecting operation from macro call.
9908 Handle the 'else clause of the 'cond form specially - the symbol
9909 'else is not replaced with #t any more.
9910
8186c4f5
GH
99112001-10-14 Gary Houston <ghouston@arglist.com>
9912
9913 * version.c (scm_version): use sprintf instead of snprintf,
9914 for portability. thanks to Bill Schottstaedt.
9915
89759084
MD
99162001-10-14 Mikael Djurfeldt <mdj@linnaeus>
9917
9918 * read.c (scm_lreadr): When user-defined hash procedure returns
9919 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
9920 an exception. (This prevents parsing of uniform vectors from
9921 interfering with parsing of numbers.)
9922
9c7ce563
MV
99232001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
9924
9925 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
9926 PTRDIFF_MIN. Thanks to Ken Raeburn.
9927
99282001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
9929
9930 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
9931
9932 * eval.c (scm_m_atbind): First try to find the variable without
9933 defining it locally; when it has not been found, define it
9934 locally.
9935
9936 * modules.c (module_variable): Pass over variables that exist but
9937 are unbound.
9938
99392001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
9940
9941 * backtrace.c (display_backtrace_file_and_line): Only use
9942 scm_basename when POSIX support is compiled in. Thanks to Chris
9943 Cramer.
9944
1fe5e088
DH
99452001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
9946
9947 * numbers.c (mem2uinteger): Return number read so far when coming
9948 across a hexdigit after having read a # or if not reading a hex
9949 value. This will enable the calling code to correctly handle
9950 forms like 1e2. (The background is, that the exponent markers d,
9951 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
9952 providing this patch.
9953
9954 (mem2complex): Fix erroneous double-negation. Now, numbers like
9955 1-i will be read correctly.
9956
68665a97
MD
99572001-10-12 Mikael Djurfeldt <mdj@linnaeus>
9958
9959 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
9960
9961 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
9962
d5cf5324
DH
99632001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
9964
9965 * print.c (scm_print_state_vtable, print_state_pool):
9966 Initialize. These variables are now registered as gc roots.
9967
9968 (scm_current_pstate): Update documentation.
9969
9970 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
9971 scm_prin1, scm_init_print): print_state_pool is registered as a
9972 gc root and thus does not need to be protected by a surrounding
9973 pair any more.
9974
9975 (make_print_state): The car of print_state_pool no longer holds
9976 the scm_print_state_vtable.
9977
9978 (scm_current_pstate, scm_make_print_state, print_circref,
9979 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
9980 SCM_N<foo>.
9981
9982 (scm_prin1): When building lists, prefer scm_list_<n> over
9983 scm_cons[2]?.
9984
9985 (scm_iprlist): Removed a redundant SCM_IMP test.
9986
9987 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
9988
37c56aec
DH
99892001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9990
9991 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
9992
9993 (scm_memcons, scm_mem_to_proc): When building lists, prefer
9994 scm_list_<n> over scm_cons[2]?.
9995
9996 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
9997
9998 (scm_procedure_name): Use SCM_CADR instead of explicit form.
9999
10000 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
10001 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
10002 for some reason his patch didn't make it into the cvs.
10003
79d34f68
DH
100042001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
10005
10006 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
10007 little bit - should even be somewhat more accurate now.
10008
5e137c65
RB
100092001-10-08 Rob Browning <rlb@defaultvalue.org>
10010
10011 * gc.c: support ia64 register backing store.
10012 (SCM_MARK_BACKING_STORE): new macro.
10013
10014 * continuations.h: support ia64 register backing store.
10015 (struct scm_t_contregs): add ia64 register backing store.
10016
10017 * continuations.c: support ia64 register backing store.
10018 (continuation_mark): mark ia64 register backing store.
10019 (continuation_free): free ia64 register backing store.
10020 (scm_make_continuation): capture ia64 register backing store.
10021 (copy_stack_and_call): copy ia64 register backing store.
10022
ee083ac2
DH
100232001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
10024
10025 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
10026 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
10027 instead of SCM_NIMP to test for that case.
10028
10029 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
10030 scm_t_bits instead of long.
10031
71dcdbf9
MV
100322001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
10033
10034 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
10035 SCM_T_SIGNED_BITS_MIN): New.
10036 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
10037 Use them to make these macros computable by the preprocessor.
10038
10039 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
10040 whether the integral type fits in a fixnum, not the compiler.
10041 This removes a spurious compiler warning. Also, honor the
10042 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
10043 needed for `long long's.
10044
10045 * numbers.c: Define NO_PREPRO_MAGOC when including
10046 num2integral.c.i for `long long' and `signed long long'.
10047
152812c0
MD
100482001-10-06 Mikael Djurfeldt <mdj@linnaeus>
10049
10050 These changes fixes a race condition in the Guile coop - pthread
10051 compatibility code.
d6b8cf11 10052
152812c0
MD
10053 * coop.c (mother_awake_p): New variable.
10054 (coop_create): Set mother_awake_p before creating or signalling
10055 mother; wait until mother is going to sleep before returning.
10056 (mother): Reset mother_awake_p before going to sleep.
10057
11d49f54
DH
100582001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10059
10060 * options.c (protected_objects, scm_init_options): The content of
10061 protected_objects is now protected from garbage collection using
10062 scm_gc_register_root instead of scm_permanent_object.
10063
10064 (get_option_setting): New static function that computes an option
10065 setting as it was formerly done in the function scm_options.
10066
10067 (get_documented_option_setting): New static function that
10068 returns option documentation as it was formerly done in the
10069 function scm_options. Note that documentation C strings are no
10070 longer precomputed into SCM objects. Instead, they are converted
10071 into SCM strings every time get_documented_option_setting is
10072 called.
10073
10074 (change_option_setting): New static functions that modifies the
10075 option setting as it was formerly done in the function
10076 scm_options. The function is now exception safe, i. e. won't
10077 cause a memory leak when interrupted. Further, only non-immediate
10078 option values are added to the protection list.
10079
10080 (scm_options): This function now has only the purpose to dispatch
10081 to to get_option_setting, get_documented_option_setting or
10082 change_option_setting, depending on the arguments given to
10083 scm_options.
10084
10085 (scm_init_opts): Don't convert documentation C strings into SCM
10086 strings. Further, don't protect any object values: They _must_
10087 be immediate values, otherwise there is no guarantee that they
10088 have not been collected before anyway.
10089
10090 * options.[ch] (scm_t_option): Made type unsigned, name into a
10091 constant char* and val into a scm_t_bits type.
10092
10093 (scm_options, scm_init_opts): The number of options is guaranteed
10094 to be larger or equal to zero. Thus, the type is changed to
10095 unsigned.
10096
3dbacabc
DH
100972001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10098
10099 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
10100 testing an unsigned value for being >= 0.
10101
14282d0f
DH
101022001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
10103
10104 * numbers.h: Removed old comment about using SCM_CAR to access
10105 non-pair cells.
10106
10107 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
10108 the return value is signed. Thanks to Brian Crowder for the bug
10109 report.
10110
10111 (SCM_SRS): Avoid unnecessary casting and don't unpack input
10112 values. With this patch, SCM_SRS can be safely used for other
10113 types than scm_t_signed_bits. However, it should still better be
10114 an internal macro and thus be renamed to SCM_I_SRS.
10115
10116 (SCM_MAKINUM, SCM_INUM): Use proper casting.
10117
2dbec7b5
GH
101182001-10-03 Gary Houston <ghouston@arglist.com>
10119
10120 * continuations.h, unif.h: in the descriptions of the bit patterns
10121 of the heap cells, make bit 0 the least significant.
10122
cf4ee841
TTN
101232001-09-25 Thien-Thi Nguyen <ttn@glug.org>
10124
10125 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
10126 Thanks to Golubev I. N.
10127
4a151b3d
GH
101282001-09-25 Gary Houston <ghouston@arglist.com>
10129
10130 * ports.c (scm_drain_input): extended the docstring. thanks to
10131 Alex Schroeder and Thien-Thi Nguyen.
10132
581ded70
MD
101332001-09-23 Mikael Djurfeldt <mdj@linnaeus>
10134
10135 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
10136 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
10137 macros. (The NUM names might soon change.)
10138
10139 * numbers.h: Added missing declarations.
10140
5437598b
MD
101412001-09-22 Mikael Djurfeldt <mdj@linnaeus>
10142
10143 * Makefile.am: Distribute num2float.i.c.
10144
10145 * num2float.i.c: New file, multiply included by numbers.c, used
10146 to "templatize" the float <-> num conversion routines.
10147
10148 * numbers.c: New functions: scm_num2float, scm_float2num,
10149 scm_num2double, scm_double2num.
10150
0b073f0f
RB
101512001-09-21 Rob Browning <rlb@defaultvalue.org>
10152
10153 * .cvsignore: really add version.h
10154
10155 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
10156 Otherwise it fails on the alpha. However, we might rather choose
10157 this size conditionally.
10158
10159 * numbers.c (scm_gcd): change "k" to a long from an int.
10160 Otherwise it fails on the alpha. However, we might rather choose
10161 this size conditionally.
10162
10163 * error.c (scm_wta): coerce char* to intptr_t before int
10164 assignment.
10165
10166 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
10167 int.
10168
10169 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
10170
2830fd91
MD
101712001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10172
10173 * numbers.c (scm_integer_expt): Accept inexact integer in second
10174 argument. (Thanks to Bill Schottstaedt.)
10175
c13f0a90
RB
101762001-09-20 Rob Browning <rlb@defaultvalue.org>
10177
10178 * .cvsignore: add version.h
10179
10180 * versiondat.h.in: removed (obsolete).
10181
10182 * version.h.in: renamed from version.h.
10183 (SCM_GUILE_MAJOR_VERSION): new public macro.
10184 (SCM_GUILE_MINOR_VERSION): new public macro.
10185 (SCM_GUILE_MICRO_VERSION): new public macro.
10186
10187 * version.h: renamed to version.h.in.
10188
10189 * version.c
10190 (scm_major_version): support integer *_VERSION macros.
10191 (scm_minor_version): support integer *_VERSION macros.
10192 (scm_micro_version): support integer *_VERSION macros.
10193 (scm_version): support integer *_VERSION macros.
10194
147c18a0
MD
101952001-09-20 Mikael Djurfeldt <mdj@linnaeus>
10196
10197 * error.c, error.h: Made error keys globally accessible.
10198 Applications might want to test for these or use them in a direct
10199 call to scm_error.
10200
10201 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
10202 routines are passed an inexact. This change in behavior is
10203 motivated by concordance with R5RS: It is more common that a
10204 primitive doesn't want to accept an inexact for an exact.
10205
662c5539
DH
102062001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10207
10208 The following patch partially undoes my patch from 2001-06-30,
10209 where I added the function scm_gc_mark_cell_conservatively. The
10210 function is buggy, since it breaks guile during conservative
10211 marking if a pointer on the stack points directly into the list of
10212 free cells on the heap: With conservative cell marking this will
10213 cause the whole free list to be scanned and marked - boom!
10214
10215 * gc.c (allocated_mark, MARK, heap_segment,
10216 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
cf4ee841 10217 (scm_gc_mark_cell_conservatively): Remove function
662c5539
DH
10218 scm_gc_mark_cell_conservatively and update the corresponding
10219 comments and uses accordingly. Thanks to Christopher Cramer for
10220 the patch. (Minor corrections by me.)
10221
6c1b7628
GH
102222001-09-15 Gary Houston <ghouston@arglist.com>
10223
10224 * root.h (scm_root_state): removed the continuation_stack and
10225 continuation_stack_ptr members, which have no apparent purpose.
10226 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
10227 removed.
662c5539 10228
6c1b7628
GH
10229 * root.c (root_mark), init.c (restart_stack, start_stack), gc
10230 (scm_igc): remove all references to contination_stack and
10231 continuation_stack_ptr, avoiding allocation of a vector and
10232 useless processing during gc.
10233
455c0ac8
DH
102342001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10235
10236 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
10237
10238 (TCONC_IN): Make sure that the cell word 0 is initialized last.
10239
10240 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
10241
10242 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
10243
10244 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
10245 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
10246
22ba637b
DH
102472001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10248
10249 * guardians.c (mark_dependencies_in_tconc,
10250 whine_about_self_centered_zombies, scm_init_guardians): Register
10251 the static global variable `self_centered_zombies' via
10252 scm_gc_register_root, to make some cdr-ing unnecessary.
10253
c3c4d801
DH
102542001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
10255
10256 * backtrace.c (display_backtrace_file,
10257 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
10258 values, use SCM_FALSEP when comparing SCM values against #f.
10259 Thanks to Rob Browning for the bug report.
10260
b00418df
DH
102612001-09-12 Martin Baulig <martin@home-of-linux.org>
10262
10263 * strings.[ch] (scm_str2string): New function.
10264
a0d34a0b
MV
102652001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
10266
10267 * gc.c (scm_done_free): Always subtract size from scm_mallocated
10268 when computing nm, even if it's negative.
10269 (scm_must_malloc): Abort on overflow of scm_mtrigger.
10270 (scm_must_realloc): Likewise.
10271
b10586f0
ML
102722001-09-01 Michael Livshin <mlivshin@bigfoot.com>
10273
10274 * numbers.c (scm_sys_check_number_conversions): new function,
10275 defined if Guile is compiled in debugging mode. currently checks
10276 `scm_num2ulong', should check much much more.
10277
10278 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
10279 unsigned, ensure that it's positive. thanks to Martin Baulig!
cf4ee841 10280
8c494e99
DH
102812001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10282
10283 * __scm.h: Added new section about compile time selectable
10284 features.
10285
10286 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
10287 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
10288 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
10289 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
10290 Removed.
10291
10292 * deprecation.c (scm_include_deprecated_features): Simplified.
10293
10294 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
9a5fa6e9 10295 `SCM_IMP' instead of `!SCM_CELLP´.
8c494e99
DH
10296
10297 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
10298 Extract side-effecting operations from macros.
10299
10300 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
10301 scm_top_level_lookup_closure_var and scm_system_transformer.
10302
10303 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
10304
10305 (heap_segment): Use CELL_P instead of SCM_CELLP.
10306
10307 * init.c (start_stack): Don't initialize
10308 scm_top_level_lookup_closure_var and scm_system_transformer.
10309
10310 * modules.c (scm_set_current_module): Don't access
10311 scm_top_level_lookup_closure_var and scm_system_transformer.
10312
10313 (scm_sym2var): Don't call scm_variable_set_name_hint.
10314
10315 (scm_post_boot_init_modules): Removed deprecated initializations.
10316
10317 * print.c (scm_ipruk): Don't access cell contents of non cells.
10318
10319 * strings.c (scm_string_set_x): All strings are writable.
10320
10321 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
10322 type. There is only one string type now.
10323
10324 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
10325
10326 * tags.h: Remove comments about two different string types.
10327
10328 (SCM_CELLP, SCM_NCELLP): Deprecated.
10329
10330 * variable.c (make_variable): Remove code variant for vcells.
10331
10332 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
10333 SCM_VARIABLE_LOC): Remove code variant for vcells.
10334
10335 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
10336 SCM_ENABLE_DEPRECATED with the logic reversed.
10337
10338 * dynl.c (moddata, registered_mods), dynl.[ch]
10339 (scm_register_module_xxx, scm_registered_modules,
10340 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
10341 (*top-level-lookup-closure*), eval.[ch]
10342 (scm_top_level_lookup_closure_var, scm_system_transformer,
10343 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
10344 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
10345 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
10346 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
10347 scm_unprotect_object), modules.c (root_module_lookup_closure,
10348 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
10349 beautify_user_module_x_var, try_module_autoload_var,
10350 scm_module_full_name), modules.[ch] (scm_the_root_module,
10351 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
cf4ee841 10352 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8c494e99
DH
10353 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
10354 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
10355 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
10356 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
10357 scm_make_shared_substring), tags.h (scm_tc7_substring,
10358 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
10359 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
10360 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
10361 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
10362 Removed.
10363
10364 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
10365 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
10366 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
10367 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
10368 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
10369 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
10370 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
10371 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
10372 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
10373 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
10374 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
10375 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
10376 (setzone, scm_strftime, scm_strptime), vports.c
10377 (scm_make_soft_port): Remove calls to
10378 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
10379 gone, all strings are 0-terminated anyway.
10380
10381 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
10382 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
10383 double inclusion of the same headers to the SCM_<filename>_H
10384 format.
10385
10386 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
10387 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
10388 print.c (scm_iprin1): The type scm_tc7_substring does not exist
10389 any more.
10390
10391 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
10392 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
10393 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
10394 !SCM_<foo> over SCM_N<foo>.
10395
dee01b01
DH
103962001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10397
10398 * Makefile.am: Remove references to symbols-deprecated.c.
10399
10400 * symbols.c (scm_init_symbols): Don't initialize deprecated
10401 symbol functions.
10402
10403 * symbols-deprecated.c: Removed.
10404
10405 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
10406 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
10407 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
10408 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
10409 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
10410 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
10411 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
10412 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
10413 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
10414 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
10415 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
10416 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
10417 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
10418 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
10419 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
10420 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
10421 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
10422 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
10423 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
10424 scm_intern0, scm_sysintern, scm_sysintern0,
10425 scm_sysintern0_no_module_lookup, scm_symbol_value0,
10426 scm_string_to_obarray_symbol, scm_intern_symbol,
10427 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
10428 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
10429 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
10430 vectors.[ch] (scm_vector_set_length_x): Removed.
10431
10432 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
10433 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
10434 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
10435 Renamed the macros that are defined to inhibit double inclusion of
10436 the same headers to the SCM_<filename>_H format.
10437
10438 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
10439 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
10440 SCM_N<foo>.
10441
b29058ff
DH
104422001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10443
10444 * continuations.h (scm_contregs), debug.h (scm_debug_info,
10445 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
10446 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
10447 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10448 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
10449 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
10450 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
10451 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
10452 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
10453 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
10454 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
10455 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
10456
10457 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
10458 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
10459 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
10460 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
10461 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
10462 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
10463 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
10464 double inclusion of the same headers to the SCM_<filename>_H
10465 format.
10466
10467 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
10468 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
10469 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
10470 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
10471 !SCM_<foo> over SCM_N<foo>.
10472
0527e687
DH
104732001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
10474
10475 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
10476 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
10477 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
10478 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
10479 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
10480 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
10481 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
10482 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
10483 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
10484 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
10485 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
10486 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
10487 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
10488 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
10489 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
10490 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
10491 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
10492 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
10493 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
10494 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
10495 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
10496 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
10497 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
10498 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
10499 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
10500 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
10501 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
10502 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
10503 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
10504 the macros that are defined to inhibit double inclusion of the
10505 same headers to the SCM_<filename>_H format.
10506
fada26b2
MV
105072001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
10508
10509 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
10510 "scm_t_portable" with "scm_port_table" which was an artifact from
10511 the great "scm_*_t -> scm_t_" renaming.
10512
e4d1c1ea
TTN
105132001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
10514
10515 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
10516 used; nfc. Thanks to Bill Schottstaedt.
10517
10518 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
10519 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
10520 Thanks to Chris Cramer.
10521
b573e744
MV
105222001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
10523
10524 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
10525
10526 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
10527 dynamic scope.
10528 * dynwind.h (scm_swap_bindings): Declare.
10529 * dynwind.c (scm_swap_bindings): Make non-static.
10530
8a3e715b
ML
105312001-08-25 Michael Livshin <mlivshin@bigfoot.com>
10532
10533 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
10534 doing exactly nothing about them). thanks Neil!
10535
cf504ee0
NJ
105362001-08-18 Neil Jerram <neil@ossau.uklinux.net>
10537
10538 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
ec2667f0 10539
43b83b54
TTN
105402001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
10541
10542 * gc.c: Fix omission bug: Add `heap_segment' forward decl
10543 (proto) in the case when either `GUILE_DEBUG' or
10544 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
10545
10546 (map_free_list): Fix typo: Ref `f' correctly.
10547
10548 Thanks to Chris Cramer.
10549
ab4cd34b
RB
105502001-08-15 Rob Browning <rlb@defaultvalue.org>
10551
10552 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
10553 variables.
10554 (libpath.h): change libguileversion to libguileinterface.
10555
b754e3d1
MV
105562001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
10557
10558 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
10559 ChangeLog-2000. Thanks to Daniel Skarda!
10560
8b1d12c7
ML
105612001-08-07 Michael Livshin <mlivshin@bigfoot.com>
10562
10563 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
10564 do it from the Makefile.
10565
10566 * Makefile.am: rearrange the snarfing slightly, so that .doc files
10567 are of a reasonable size.
10568
baffb19f
NJ
105692001-08-02 Neil Jerram <neil@ossau.uklinux.net>
10570
10571 * stacks.c (scm_make_stack): Improve docstring by explaining use
10572 of cutting args.
10573
c1151355
MV
105742001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
10575
10576 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
10577 scm_char_whitespace_p, scm_char_upper_case_p,
10578 scm_char_lower_case_p, scm_char_is_both_p): Do not require
10579 characters to fulfill isascii in addition to the primary
10580 predicate.
10581
3c9a524f
DH
105822001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10583
10584 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
10585 scm_istr2flo, scm_istring2number): Removed.
10586
10587 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
10588 SCM_SLOPPY_<foo>.
10589
10590 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
10591 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
10592 Added.
10593
10594 (scm_string_to_number): Use new number parser.
10595
10596 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
10597 handles complex numbers.
10598
10599 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
10600 SCM_<foo>_H.
10601
10602 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
10603 SCM_N<pred>.
10604
10605 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
10606
10607 (scm_i_mem2number): Added.
10608
10609 (scm_exact_to_inexact): Changed signature.
10610
10611 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
10612 here instead of within scm_i_mem2number. Call scm_i_mem2number
10613 instead of scm_istr2int and scm_istring2number.
10614
01f11e02
DH
106152001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10616
10617 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
10618 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
10619 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
10620 !SCM_<pred> over SCM_N<pred>.
10621
10622 (scm_eval_body): Remove side effecting code from macro call.
10623
10624 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
10625 SCM_NIMP test.
10626
6cf69537
DH
106272001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10628
10629 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
10630
54866b6c
MV
106312001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
10632
10633 Removed vcell slot from structs.
43b83b54 10634
54866b6c
MV
10635 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
10636 subsequent indices.
10637
10638 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
10639 zero. Use scm_vtable_index_layout instead of "0" when accessing
10640 said slot.
10641 (scm_init_struct): Remove vcell slot layout code from
10642 required_vtable_fields.
10643
10644 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
10645
10646 * goops.c (build_class_class_slots): Removed vcell slot
10647 definition.
10648
10649 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
10650 Removed vcell slot layout code.
10651 (scm_si_vcell): Removed.
10652
5b54c4da
MV
106532001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10654
a0f5718e 10655 "Glocs" have been removed.
43b83b54 10656
a0f5718e
MV
10657 * tags.h: Update tag system docs.
10658 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
10659 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
10660 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
10661 or SCM_NCONSP, respectively.
10662
10663 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
10664 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
10665 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
10666
10667 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
10668 tell glocs from structs.
43b83b54 10669
a0f5718e
MV
10670 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
10671
10672 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
10673 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
10674 instead of with glocs.
10675 (EVALCAR): Do not test for glocs.
10676 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
10677 condition.
10678 (scm_unmemocar): Do not handle glocs.
10679 (scm_m_atfop): Memoize as a variable, not as a gloc.
10680 (scm_eval_args, scm_deval_args): Do not handle glocs.
10681 (scm_ceval, scm_deval): Likewise.
43b83b54 10682
a0f5718e
MV
10683 * eval.h (SCM_XEVALCAR): Do not test for glocs.
10684 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
10685 Removed.
10686
10687 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
10688
10689 * dynwind.c (scm_swap_bindings): Likewise.
10690 (scm_dowinds): Updated to recognize lists of variables instead of
10691 lists of glocs.
10692
10693 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
10694
43b83b54 10695
5b54c4da
MV
10696 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
10697 where it is needed.
43b83b54 10698
3c3db128
GH
106992001-07-25 Gary Houston <ghouston@arglist.com>
10700
10701 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
10702 docstrings to reflect the n-ary implementation.
10703
dd29a169
MV
107042001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
10705
10706 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
10707 value of a variable, not the plain "return" statement.
10708
f5fe6c2f
MV
107092001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
10710
10711 * eval.c: Allow variables in memoized code (in addition to glocs).
10712 (scm_lookupcar): Handle variables in lost races. Replace symbol
10713 with variable directly, do not make a gloc.
10714 (scm_unmemocar): Rewrite variables using a reverse lookup, just
10715 like glocs.
10716 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
10717 the main switch.
10718
ee0c7345
MV
107192001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
10720
6d9ad98a
MV
10721 * variable.c (scm_i_variable_print): Use "value" instead of
10722 "binding" since a binding is the mapping between symbols and
10723 variables, not between variables and their values.
10724
ee0c7345
MV
10725 * tags.h (scm_tc7_variable): New.
10726 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
10727 * print.c (scm_iprin1): Likewise.
10728
10729 * variable.h (scm_tc16_variable): Removed.
10730 (SCM_VARIABLEP): Test for new tc7 code.
10731 (scm_i_variable_print): New.
10732 * variable.c (scm_tc16_variable): Removed.
10733 (variable_print): Renamed to scm_i_variable_print and made
10734 non-static.
10735 (variable_equal_p): Removed.
10736 (make_variable): Construct a tc7 object instead of a smob.
10737 (scm_init_variable): Do not register smob.
43b83b54 10738
f3805ebb
MV
107392001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
10740
10741 * tags.h: Include inttypes.h when we have it.
10742
107432001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
10744
10745 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
10746 is taken by the new SCM_IM_CALL_WITH_VALUES.
10747 * print.c (scm_isymnames): Update table accordingly.
43b83b54 10748
6a1677a3
GH
107492001-07-22 Gary Houston <ghouston@arglist.com>
10750
10751 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
10752 SCM_MAKINUM to convert regoff_t value to SCM.
10753
1bed8c28
GH
107542001-07-21 Gary Houston <ghouston@arglist.com>
10755
10756 * scmsigs.c: include sys/time.h for itimer stuff.
10757
e658215a
RB
107582001-07-19 Rob Browning <rlb@defaultvalue.org>
10759
10760 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
10761
10762 * c-tokenize.lex: add option %nounput to quiet warning.
10763 Add prototype for yylex to quiet warning.
10764
10765 * scmconfig.h.in: add flags for setitimer and getitimer.
10766
10767 * scmsigs.h (scm_init_scmsigs): new prototype.
10768 (scm_init_scmsigs): new prototype.
10769
10770 * scmsigs.c (s_scm_setitimer): new function.
10771 (s_scm_setitimer): new function.
10772
58ade102
MG
107732001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10774
10775 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
10776 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
10777 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
10778 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
10779 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
10780 guile-func-name-check.in, guile-snarf-docs-texi.in,
10781 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
10782 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
10783 objprop.c, objprop.h, options.c, options.h, random.h,
10784 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
10785 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
10786 version.c, version.h: Updated copyright notice.
10787
6b80d352
DH
107882001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10789
10790 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
10791 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
10792 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
10793 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
10794 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
10795 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
10796 sym_environment, scm_sym_change_class): New static variables to
10797 hold predefined symbols.
10798
10799 (build_class_class_slots): Build the list using scm_list_n
10800 instead of cons. Also, slots are already created as lists, thus
10801 making a call to maplist unnecessary.
10802
10803 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
10804 scm_class_direct_subclasses, scm_class_direct_methods,
10805 scm_class_precedence_list, scm_class_slots, scm_class_environment,
10806 scm_method_procedure, create_standard_classes, purgatory): Use
10807 predefined symbols.
10808
10809 (build_slots_list, compute_getters_n_setters,
10810 scm_sys_initialize_object, scm_sys_inherit_magic_x,
10811 get_slot_value_using_name, set_slot_value_using_name,
10812 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
10813 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
10814 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
10815
10816 (scm_sys_prep_layout_x): Minimize variable scopes.
10817
10818 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
10819 scm_sys_fast_slot_set_x): Fix signedness.
10820
10821 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
10822 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
10823 scm_memoize_method, scm_wrap_object): Use packing and unpacking
10824 when converting to and from SCM values.
10825
10826 (scm_enable_primitive_generic_x): Add rest argument checking.
10827
10828 (map, filter_cpl, maplist, scm_sys_initialize_object,
10829 scm_sys_prep_layout_x, slot_definition_using_name,
10830 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
10831 call_memoize_method, scm_make, scm_make_class): Prefer explicit
10832 predicates over SCM_N?IMP tests.
10833
10834 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
10835 checking.
10836
10837 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
10838 alias.
10839
63bcad19
DH
108402001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10841
10842 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
10843
10844 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
10845
10846 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
10847
10848 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
10849
4d6aae71
ML
108502001-07-12 Michael Livshin <mlivshin@bigfoot.com>
10851
10852 * strings.c (s_scm_string): fix arg position in assert.
10853
4b8ec619
GH
108542001-07-11 Gary Houston <ghouston@arglist.com>
10855
10856 * strports.c (st_write): use memcpy, not strncpy. thanks to
10857 Dale P. Smith.
10858
dbb640bd
TTN
108592001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
10860
10861 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
10862 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
10863 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
10864 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
10865 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
10866 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
10867 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
10868 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
10869 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
10870 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
10871 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
10872 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
10873 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
10874 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
10875 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
10876 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
10877 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
10878 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
10879 weaks.c, weaks.h: Remove "face-lift" comment.
10880
fd6c6321
RB
108812001-07-08 Rob Browning <rlb@defaultvalue.org>
10882
10883 * .cvsignore: add stamp-h.in.
10884
f91e4547
MG
108852001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10886
10887 * hooks.c (scm_make_hook, scm_add_hook_x),
10888 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
10889 value info to the docstrings.
10890
7beabedb
MG
108912001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10892
10893 Some more compatibility patches for Windows.
dbb640bd 10894
7beabedb
MG
10895 * posix.c (getlogin): getlogin() implementation for Windows.
10896
10897 * backtrace.c, ioext.c: Include <stdio.h>.
10898
10899 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
10900 exist.
10901
10902 * cpp_sig_symbols.in: Added SIGBREAK.
10903
0d0560d0
MV
109042001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
10905
10906 * strports.c (scm_read_0str, scm_eval_0str): Call
10907 scm_c_read_string and scm_c_eval_string respectively, not
10908 themselves. Thanks to Dale P. Smith!
10909
9a97e362
DH
109102001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10911
10912 * unif.c (scm_array_set_x): The variable args does not
10913 necessarily have to be a list. Further, got rid of a redundant
10914 SCM_NIMP test.
10915
592996c9
DH
109162001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10917
10918 * list.c (SCM_I_CONS): Make sure the cell type is initialized
10919 last.
10920
10921 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
f91e4547 10922 init_heap_seg): Fixed signedness.
592996c9
DH
10923
10924 (init_heap_seg): Replaced strange for-loop with a while loop.
10925
10926 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
10927
10928 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
10929
10930 The following patch adds conservative marking for the elements of
10931 free or allocated cells.
10932
10933 * gc.c (allocated_mark, heap_segment): New static functions.
10934
10935 (which_seg): Deleted, since the functionality is now provided by
10936 function heap_segment.
10937
10938 (map_free_list): Use heap_segment instead of which_seg.
10939
10940 (MARK): If cell debugging is disabled, mark free cells
10941 conservatively.
10942
10943 (scm_mark_locations, scm_cellp): Extracted the search for the
10944 heap segment of a SCM value into function heap_segment.
10945
10946 (scm_init_storage): Allocated cells must be marked
10947 conservatively.
10948
10949 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
10950
10951 The following patch changes the representation of weak vectors to
10952 double cells instead of using an extension of the vector's
10953 allocated memory.
10954
10955 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
10956 the result of SCM_WVECT_GC_CHAIN.
10957
10958 (scm_gc_sweep): Weak vectors don't have extra fields any more.
10959
10960 * weaks.c (allocate_weak_vector): New static function. It does
10961 not patch any previously created vector object during the
10962 construction of a weak vector, and thus doesn't need to switch
10963 off interrupts during vector creation.
10964
10965 (scm_make_weak_vector, scm_make_weak_key_hash_table,
10966 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
10967 Use allocate_weak_vector to provide the new weak vector object.
10968
10969 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
10970 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
10971 now stored in the double cell.
10972
10973 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
10974 Use SCM_WVECT_TYPE.
10975
10976 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
10977 using an entry of the double cell.
10978
4dadf664
TTN
109792001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
10980
10981 * stamp-h.in: bye bye
10982
02202352
MV
109832001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
10984
10985 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
10986 scm_eval_0str.
10987
10988 * load.c, load.h (scm_c_primitive_load,
10989 scm_c_primitive_load_path): New.
10990
10991 * strports.c, strports.h (scm_c_read_string): Renamed from
10992 scm_read_0str. Also, added "const" qualifier to argument.
10993 (scm_c_eval_string): Renamed from scm_eval_0str.
10994 (scm_read_0str, scm_eval_0str): Deprecated.
10995
df1ad0d1
MG
109962001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10997
10998 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
10999 SCM_LIST1.
11000
1afff620
KN
110012001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
11002
11003 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
11004 scm_list_n): New functions.
11005 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
11006 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
11007 (lots of files): Use the new functions.
4dadf664 11008
1afff620
KN
11009 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
11010
11011 * strings.c: #include "libguile/deprecation.h".
11012
b858464a
MG
110132001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11014
11015 * read.c (scm_lreadr): When reading a hash token, check for a
11016 user-defined hash procedure first, so that overriding the builtin
11017 hash characters is possible (this was needed for implementing
11018 SRFI-4's read synax `f32(...)').
4dadf664 11019
b858464a
MG
11020 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
11021 because the latter is unsigned now and breaks comparisons like
11022 (n < (scm_t_signed_bits)MIN_VALUE).
4dadf664 11023
d95c0b76
NJ
110242001-06-26 Neil Jerram <neil@ossau.uklinux.net>
11025
11026 * eval.h, eval.c (scm_call_4): New function.
11027
11028 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
11029 directly rather than dispatching to them via scm_ithrow and a lazy
11030 catch.
4dadf664 11031
d95c0b76
NJ
11032 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
11033 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
11034 for trap handler procedures.
11035
11036 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
11037 procedures not being #f.
11038
30e3be5a
ML
110392001-06-27 Michael Livshin <mlivshin@bigfoot.com>
11040
11041 * Makefile.am (c-tokenize.c): add rule to generate it.
11042 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
11043
11044 filter-doc-snarfage.c: remove.
11045
82893676
MG
110462001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11047
11048 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
11049
11050 The following set of changes makes compiling Guile under various
11051 Windows compilers easier. Compilation under GNU systems should
11052 not be affected at all.
11053
11054 Thanks to Stefan Jahn for all necessary information, patches and
11055 testing.
4dadf664 11056
82893676
MG
11057 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
11058 getpgrp, ttyname, primitive-fork and some header inclusion for
11059 Windows.
11060
11061 * random.c: Define M_PI, if not predefined and use __int64 for
11062 LONG64 under Windows.
11063
11064 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
11065 Windows and conditionalize some signal names.
11066
4dadf664 11067 * socket.c (scm_getsockopt): Added missing comma.
82893676
MG
11068 Include socket library header under Windows.
11069
11070 * stime.c (CLKTCK): Add cast to int, to make it compile under
11071 Windows.
11072
11073 * ports.c (truncate): New function, compiled only under Windows.
11074
11075 * net_db.c: Do not declare errno under Windows.
11076
11077 * iselect.h, inet_aton.c: Include socket library headers under
11078 Windows.
11079
11080 * guile.c (inner_main): Under Windows, initialize socket library
11081 and initialize gdb_interface data structures.
11082
11083 * gdb_interface.h: Under Windows, gdb_interface cannot be
11084 initialized statically. Initialize at runtime instead.
11085
11086 * fports.c (write_all): ssize_t -> size_t.
11087 (fport_print): Conditionalize call to ttyname().
11088 (getflags): New function, compiled only under Windows.
11089
11090 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
11091 primitives chown, link, fcntl.
11092 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
11093 as path seperator.
11094
11095 * backtrace.c: Include <io.h> under Windows.
11096
11097 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
11098
11099 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
11100 declaration.
11101
fdc28395
KN
111022001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
11103
11104 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11105 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
11106 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
11107 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
11108 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
11109 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
11110 (scm_dynamic_wind, scm_dowinds), environments.c
11111 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
11112 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
11113 goops.c (GETVAR, purgatory, make_class_from_template,
11114 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
11115 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
11116 (scm_primitive_load), modules.c (scm_resolve_module,
11117 scm_c_define_module, scm_c_use_module, scm_c_export,
11118 module_variable, scm_eval_closure_lookup, scm_sym2var,
11119 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
11120 ports.c (scm_port_for_each), print.c (scm_printer_apply),
11121 properties.c (scm_primitive_property_ref), ramap.c (ramap,
11122 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
11123 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
11124 (scm_object_to_string, scm_call_with_output_string,
11125 scm_call_with_input_string), throw.c (scm_body_thunk,
11126 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
11127 scm_make_shared_array), vports.c (sf_flush, sf_write,
11128 sf_fill_input, sf_close): Use one of the above functions.
11129 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
11130
36284627
DH
111312001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11132
11133 * filesys.c (scm_close), ports.c (scm_close_port,
11134 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
11135 instead of SCM_NEGATE_BOOL.
11136
11137 * filesys.c (scm_stat): Clean up type dispatch.
11138
11139 * filesys.c (scm_stat), ports.c (scm_input_port_p,
11140 scm_output_port_p): Get rid of redundant IM type check.
11141
11142 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
11143 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
11144 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
11145 scm_return_entry), numbers.c (scm_number_to_string), objects.c
11146 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
11147 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
11148 scm_addr_vector), stime.c (scm_strftime), strings.c
11149 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
11150 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
11151 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11152 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
11153 instead of scm_makfromstr.
11154
11155 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
11156 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
11157 scm_read_hash_extend), stime.c (scm_strftime), strings.c
11158 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
11159 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
11160 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
11161 !SCM_<pred> over SCM_N<pred>.
11162
11163 * strings.[ch] (scm_makfromstr): Deprecated.
11164
11165 (scm_mem2string): New function, replaces scm_makfromstr.
11166
11167 * strings.c (scm_substring), strop.c (string_copy,
11168 scm_string_split), strports.c (scm_strport_to_string), symbols.c
11169 (scm_symbol_to_string): Fix gc problem.
11170
11171 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
11172 SCM_<foo>_H.
11173
11174 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
11175 warning about comparing signed and unsigned values. This fix is
11176 not optimal, since it won't work reliably if sizeof (c_start) >
11177 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
11178 solution is to define this macro as an inline function, thus
11179 allowing to specifiy the types of c_start and c_end.
11180
13dcb666
DH
111812001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
11182
11183 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
11184 scm_t_debug_frame*.
11185
11186 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
11187 Rename <foo>H to SCM_<foo>_H.
11188
11189 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
11190 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11191
11192 (narrow_stack): Make i unsigned. Don't use side-effecting
11193 operations in conditions.
11194
11195 (narrow_stack, scm_make_stack, scm_stack_id,
11196 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
11197
11198 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
11199 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
11200 more.
11201
11202 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
11203 signedness.
11204
ea2c3968 11205 (scm_last_stack_frame): Remove bogus `;'.
13dcb666
DH
11206
11207 * stacks.h (SCM_FRAMEP): Fix type check.
11208
ac13d9d2
ML
112092001-06-25 Michael Livshin <mlivshin@bigfoot.com>
11210
ee0c0e03
ML
11211 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
11212 c-tokenize.c when doing maintainer-clean.
11213
ac13d9d2
ML
11214 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
11215
11216 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
11217 simplify.
11218
11219 * eval.c: all hash signs are in column 0.
11220
11221 * Makefile.am (guile_filter_doc_snarfage): build using
11222 c-tokenize.c, not filter-doc-snarfage.c.
11223 rearrange snarfing dependencies a bit.
11224
11225 * c-tokenize.lex: new file.
11226
16be44e5
MV
112272001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
11228
11229 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
11230 scm_t_srcpropso_plist. See the big type renaming.
11231 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
11232 Thanks to Seth Alves!
4dadf664 11233
16be44e5
MV
11234 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
11235 they aren't defined already.
11236
5843e5c9
DH
112372001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
11238
11239 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
11240 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
11241 problem.
11242
11243 * backtrace.c (display_expression, scm_set_print_params_x,
11244 display_application, display_frame, scm_backtrace), numbers.c
11245 (scm_istring2number), objects.c (scm_class_of,
11246 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
11247 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
11248
11249 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
11250 always positive.
11251
11252 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
11253 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
11254
11255 * objects.c (scm_class_of): Type fix.
11256
11257 (scm_mcache_lookup_cmethod): Improved comment, simplified,
11258 eliminated goto.
11259
11260 * pairs.h (scm_error_pair_access): The function can return if
11261 called recursively.
11262
6b41a313
MG
112632001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11264
11265 * init.c (scm_init_guile_1): Removed initialization of tag.c.
11266
11267 * gdbint.c, init.c: Removed inclusion of tag.h.
11268
11269 * tag.h, tag.c: Removed files.
11270
11271 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
11272
fbbdb121
GH
112732001-06-20 Gary Houston <ghouston@arglist.com>
11274
11275 * deprecation.c, extensions.c, rw.c: include string.h.
11276
72c17ed0
GH
112772001-06-19 Gary Houston <ghouston@arglist.com>
11278
11279 * filter-doc-snarfage.c (process): added ungetc in
11280 MULTILINE_COOKIE case since otherwise it fails when there's no
11281 space between the '(' and the quote of the following string
11282 (gcc 3.0).
11283
4ff9f825
MV
112842001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11285
4927dd28
MV
11286 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
11287
b629af45
MV
112882001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
11289
11290 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
0f002b27
MV
11291 extension takes place.
11292 * strings.h (SCM_STRING_LENGTH): Likewise.
11293 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
4dadf664 11294
4ff9f825
MV
11295 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
11296 it.
11297
11298 * tags.h: Include <stdint.h> when we have it.
11299 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
11300 available. Else use "unsigned long".
11301 (scm_signed_bits_t): New.
11302
11303 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
11304 (SCM_INUM): Cast result to scm_signed_bits_t.
11305
58bee6a8
TTN
113062001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
11307
11308 * mkstemp.c: Update path to #include file scmconfig.h.
11309 Thanks to Golubev I. N.
11310
00d8d838
DH
113112001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
11312
11313 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
11314
ea2c3968 11315 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\' at the end of
00d8d838
DH
11316 the macro definition.
11317
11318 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
11319 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
11320 instead of SCM_INST_TYPE.
11321
11322 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
11323 the object is a struct before accessing its struct flags.
11324
11325 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
11326
495c67e5
GH
113272001-06-10 Gary Houston <ghouston@arglist.com>
11328
11329 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
11330 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
11331 work reliably anymore. try it from boot-9.scm instead.
11332
6a9003d3
MV
113332001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
11334
11335 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9a5fa6e9 11336 Thanks to Matthias Köppe!
58bee6a8 11337
47bcd646
ML
113382001-06-08 Michael Livshin <mlivshin@bigfoot.com>
11339
a88ff5b6
ML
11340 * snarf.h, filter-doc-snarfage.c: more changes to cope with
11341 space-happy C preprocessors.
11342
47bcd646 11343 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9a5fa6e9 11344 inside cookies. thanks to Matthias Köppe!
47bcd646 11345
bab246f3
DH
113462001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11347
11348 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
11349 keywords. Fix gc protection.
11350
11351 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
11352 operations in macro calls.
11353
11354 * pairs.c (scm_error_pair_access): Avoid recursion.
11355
11356 Thanks to Matthias Koeppe for reporting the bugs that correspond
11357 to the following set of patches.
11358
11359 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
11360 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
11361 bitvector base address using SCM_BITVECTOR_BASE.
11362
11363 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
11364 unsigned long*.
11365
dcb410ec
DH
113662001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11367
11368 * goops.c (SCM_CLASS_REDEF): Removed.
11369
11370 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
11371 SCM_<foo>_H.
11372
11373 Thanks to Matthias Koeppe for reporting the bugs that correspond
11374 to the following set of patches.
11375
11376 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
11377 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
11378 scm_sys_allocate_instance, clear_method_cache,
11379 scm_sys_invalidate_method_cache_x, scm_make,
11380 create_standard_classes, scm_make_port_classes, scm_make_class,
11381 scm_add_slot): Use SCM_SET_SLOT to set slot values.
11382
11383 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
11384
11385 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
11386
11387 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
11388 UNARY_ELTS_CODE): Remove bogus break statement.
11389
11390 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
11391 Don't access bit vectors elements as SCM objects.
11392
11393 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
11394 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
11395 Don't assign to an unpacked value.
11396
e81d98ec
DH
113972001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
11398
11399 * __scm.h (SCM_NORETURN): Moved here from error.h.
11400
11401 (SCM_UNUSED): New macro.
11402
11403 (SCM_DEBUG_PAIR_ACCESSES): New macro.
11404
11405 * backtrace.c (display_error_handler), continuations.c
11406 (continuation_print), debug.c (debugobj_print), dynwind.c
11407 (guards_print), environments.c (observer_print,
11408 core_environments_finalize, leaf_environment_cell,
11409 leaf_environment_print, eval_environment_print,
11410 eval_environment_observer, import_environment_define,
11411 import_environment_undefine, import_environment_print,
11412 import_environment_observer, export_environment_define,
11413 export_environment_undefine, export_environment_print,
11414 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
11415 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
11416 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
11417 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
11418 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
11419 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
11420 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
11421 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
11422 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
11423 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
11424 set_slot_value, test_slot_existence, scm_change_object_class,
11425 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
11426 default_setter), guardians.c (guardian_print, guardian_gc_init,
11427 guardian_zombify, whine_about_self_centered_zombies), guile.c
11428 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
11429 mallocs.c (malloc_print), numbers.c (scm_print_real,
11430 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
11431 end_input_default, scm_port_print, fill_input_void_port,
11432 write_void_port), root.c (root_print), smob.c (scm_mark0,
11433 scm_free0, scm_smob_print, scm_smob_apply_1_error,
11434 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
11435 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
11436 (scm_struct_free_0, scm_struct_free_standard,
11437 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
11438 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
11439 scm_handle_by_throw, scm_ithrow), weaks.c
11440 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
11441 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
11442 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
11443
11444 * error.h (SCM_NORETURN): Moved to __scm.h.
11445
11446 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
11447 Renamed <foo>H to SCM_<foo>_H.
11448
11449 * gc.c (debug_cells_gc_interval): New static variable.
11450
11451 (scm_assert_cell_valid): If selected by the user, perform
11452 additional garbage collections.
11453
11454 (scm_set_debug_cell_accesses_x): Extended to let the user specify
11455 if additional garbage collections are desired.
11456
11457 (mark_gc_async): If additional garbage collections are selected
11458 by the user, don't call the after-gc-hook. Instead require the
11459 user to run the hook manually.
11460
11461 * pairs.c (scm_error_pair_access): New function. Only compiled
11462 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
11463
11464 * pairs.h (SCM_VALIDATE_PAIR): New macro.
11465
11466 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
11467 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
11468 is a real pair object. (Glocs are also accepted, but that may
11469 change.) If not, abort with an error message.
11470
17fa3fcf
DH
114712001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
11472
11473 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
11474
11475 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
11476 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
11477
feeedafb
MV
114782001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
11479
11480 * extensions.c (scm_c_register_extension): Allow NULL as library
11481 name.
11482 (load_extension): Ignore NULL library names when comparing.
58bee6a8 11483
feeedafb
MV
11484 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
11485 non-pointers are being compared. Thanks to Alexander Klimov!
11486
4bcdfe46
GH
114872001-06-04 Gary Houston <ghouston@arglist.com>
11488
11489 * rw.c (scm_write_string_partial): new procedure implementing
11490 write-string/partial in (ice-9 rw).
11491 * rw.h: declare scm_write_string_partial.
58bee6a8 11492
f480396b
MV
114932001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
11494
feeedafb
MV
11495 * keywords.c (keyword_print): Substract 1 from length of symbol
11496 name, accounting for the silly dash.
11497
11498 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
11499 Do not emit deprecation warning.
11500
f480396b
MV
11501 Added exception notice to all files.
11502
11503 * dynl.c: Include "deprecation.h".
11504
c794483c
MV
115052001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
11506
11507 * dynl.c (scm_register_module_xxx, scm_registered_modules,
11508 scm_clear_registered_modules): Deprecated.
11509
9454d8d5
RB
115102001-06-02 Rob Browning <rlb@cs.utexas.edu>
11511
11512 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
11513 guile-snarf-docs-texi.
11514
11515 * fports.c: HAVE_ST_BLKSIZE changed to
11516 HAVE_STRUCT_STAT_ST_BLKSIZE.
11517 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
11518 HAVE_STRUCT_STAT_ST_BLKSIZE.
11519
11520 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
11521 HAVE_STRUCT_STAT_ST_RDEV.
11522 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
11523 HAVE_STRUCT_STAT_ST_BLKSIZE.
11524 (scm_stat2scm): HAVE_ST_BLOCKS changed to
11525 HAVE_STRUCT_STAT_ST_BLOCKS.
11526
114f9bab
MV
115272001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
11528
b0c16cd9
MV
11529 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
11530 of scm_eval_x to allow module changes between the forms in the
11531 string. Set/restore module using scm_c_call_with_current_module.
11532
114f9bab
MV
11533 * mkstemp.c: New file, slightly modified from libiberties
11534 mkstemps.c.
11535
c99f9605
ML
115362001-05-31 Michael Livshin <mlivshin@bigfoot.com>
11537
11538 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
11539 filter-doc-snarfage.c: new files.
11540
11541 * Makefile.am: add stuff to [build,] use and distribute
11542 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
11543
11544 * guile-snarf.in: grok the new snarf output.
11545
11546 * snarf.h: make the output both texttools- and `read'-friendly.
11547
47bcd646
ML
11548 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
11549 guile-snarf-docs. (should also deprecate, I guess. maybe not).
c99f9605 11550
7eb5d7b2
MV
115512001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
11552
11553 * print.c (scm_simple_format): Support "~~" and "~%". Signal
11554 error for unsupported format controls and for superflous
ec2667f0 11555 arguments. Thanks to Daniel Skarda!
7eb5d7b2
MV
11556
11557 * print.h, print.c (scm_print_symbol_name): Factored out of
11558 scm_iprin1.
11559 (scm_iprin1): Call it.
58bee6a8 11560
7eb5d7b2
MV
11561 * keywords.c (keyword_print): Use scm_print_symbol_name so that
11562 weird names are printed correctly.
11563
11564 * print.c (scm_print_symbol_name): Symbols whose name starts with
11565 `#' or `:' or ends with `:' are considered weird.
11566
609c3d30
MG
115672001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11568
11569 * numbers.c (scm_difference, scm_divide): Clarified comments for -
11570 and /.
11571
115722001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11573
11574 * debug.h: Removed prototype for scm_eval_string.
11575
8d09eb04
MG
115762001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11577
11578 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
58bee6a8 11579 (make-string 2000 #\!))' in an older version).
8d09eb04
MG
11580
11581 Change strncpy to memcpy to allow embedded NUL characters in
11582 symbol prefix.
11583
dd85ce47
ML
115842001-05-28 Michael Livshin <mlivshin@bigfoot.com>
11585
fde50407
ML
11586 * hooks.c (scm_create_hook): deprecated.
11587 (make_hook): deleted.
11588 (scm_make_hook): all the hook creation code is now here.
11589
11590 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
11591 a hook, make it permanent, and do a `scm_c_define' on it.
11592
dd85ce47
ML
11593 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
11594
11595 * socket.c (s_scm_inet_pton): fix docstring quoting.
11596 (s_scm_inet_ntop): ditto.
11597
11598 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
11599
11600 * hashtab.c (scm_internal_hash_fold): fix argument position in
11601 SCM_ASSERT.
11602
11603 * environments.c (s_scm_import_environment_set_imports_x): fix
11604 argument position in SCM_ASSERT.
11605
11606 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
11607 (s_scm_make_iloc): ditto.
11608
729dbac3
DH
116092001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
11610
11611 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
11612
11613 * eval.c (promise_print): Read the promise's value as an object.
11614
11615 (SCM_CEVAL): Don't perform side-effecting operations in macro
11616 parameters.
11617
11618 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
11619 conditional expression.
11620
11621 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
11622 initializer.
11623
11624 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
11625 text, removed redundant computation of effective_length and fixed
11626 the overflow check.
11627
11628 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
11629 values.
11630
11631 (wrap_init): Don't use SCM_C[AD]R for non pairs.
11632
11633 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
11634
11635 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
11636 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
11637
11638 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
11639
11640 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
11641 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
11642 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
11643 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
11644
11645 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
11646
11647 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
11648
ea2c3968 11649 * ramap.c (ramap_rp): Removed bogus `;'.
729dbac3
DH
11650
11651 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
11652 problem.
11653
11654 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
11655 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
11656 Read SCM objects rather than scm_bits_t values.
11657
11658 * tags.h (SCM_VOIDP_TEST): Removed.
11659
11660 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
11661 value of 2 now corresponds to the former 1, the current 1
11662 corresponds to the former situation that SCM_VOIDP_TEST was
11663 defined.
11664
58bee6a8
TTN
11665 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
11666 If this appears to be not ANSI compliant, we will change it to
729dbac3
DH
11667 typedef struct scm_unused_struct { } * SCM;
11668 Thanks to Han-Wen Nienhuys for the suggestion.
11669
11670 * unif.c (scm_array_set_x): Fix typing problem, and use
11671 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
11672 dealing with uniform vectors.
11673
6b1b030e
ML
116742001-05-27 Michael Livshin <mlivshin@bigfoot.com>
11675
11676 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
11677 (scm_igc): mark from them, too (precisely, not conservatively!).
11678
11679 * root.h (scm_gc_registered_roots): new object in
11680 scm_sys_protects.
11681
11682 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
11683 `scm_protect_object'. shouldn't call it at all, though, it seems.
11684
11685 * gc.c (scm_[un]protect_object): deprecated.
11686 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
11687 (scm_gc_[un]register_root[s]): new.
11688
11689 * gc.h: add prototypes for scm_gc_[un]protect_object,
11690 scm_gc_[un]register_root[s].
11691
c014a02e
ML
116922001-05-26 Michael Livshin <mlivshin@bigfoot.com>
11693
11694 revert the controversial part of the 2001-05-24 changes.
11695
0120801d
MV
116962001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
11697
f4e0611e
MV
11698 * modules.c (scm_env_module): Exported to Scheme.
11699
0120801d 11700 * eval.c (scm_debug_opts): New option `show-file-name'.
729dbac3 11701
0120801d 11702 * debug.h (SCM_SHOW_FILE_NAME): New.
729dbac3 11703
0120801d
MV
11704 * backtrace.c: Include "libguile/filesys.h".
11705 (sym_base, display_backtrace_get_file_line,
11706 display_backtrace_file, display_backtrace_file_and_line): New.
11707 (display_frame): Call display_backtrace_file_and_line if that is
11708 requested.
11709 (display_backtrace_body): Call scm_display_backtrace_file if
11710 requested.
11711
11712 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
11713 Prototypes removed since there's no definition for these
11714 functions.
11715
880a7d13
MG
117162001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11717
11718 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
11719 Changed use of scm_array->scm_array_t and
11720 scm_array_dim->scm_array_dim_t to enable build with
11721 --disable-deprecated.
11722
1be6b49c
ML
117232001-05-24 Michael Livshin <mlivshin@bigfoot.com>
11724
11725 The purpose of this set of changes is to regularize Guile's usage
11726 of ANSI C integral types, with the following ideas in mind:
11727
d69c867a
ML
11728 - SCM does not nesessarily have to be long.
11729 - long is not nesessarily enough to store pointers.
1be6b49c
ML
11730 - long is not nesessarily the same size as int.
11731
11732 The changes are incomplete and possibly buggy. Please test on
11733 something exotic.
11734
11735 * validate.h
11736 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
11737 new macros.
11738
11739 * unif.h: type renaming:
11740 scm_array -> scm_array_t
11741 scm_array_dim -> scm_array_dim_t
11742 the old names are deprecated, all in-Guile uses changed.
11743
11744 * tags.h (scm_ubits_t): new typedef, representing unsigned
11745 scm_bits_t.
11746
11747 * stacks.h: type renaming:
11748 scm_info_frame -> scm_info_frame_t
11749 scm_stack -> scm_stack_t
11750 the old names are deprecated, all in-Guile uses changed.
11751
11752 * srcprop.h: type renaming:
11753 scm_srcprops -> scm_srcprops_t
11754 scm_srcprops_chunk -> scm_srcprops_chunk_t
11755 the old names are deprecated, all in-Guile uses changed.
11756
11757 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
11758 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
11759 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
11760 vectors.c, vports.c, weaks.c:
11761 various int/size_t -> size_t/scm_bits_t changes.
11762
11763 * random.h: type renaming:
11764 scm_rstate -> scm_rstate_t
11765 scm_rng -> scm_rng_t
11766 scm_i_rstate -> scm_i_rstate_t
11767 the old names are deprecated, all in-Guile uses changed.
11768
11769 * procs.h: type renaming:
11770 scm_subr_entry -> scm_subr_entry_t
11771 the old name is deprecated, all in-Guile uses changed.
11772
11773 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
11774 type renaming:
11775 scm_option -> scm_option_t
11776 the old name is deprecated, all in-Guile uses changed.
11777
11778 * objects.c: various long -> scm_bits_t changes.
11779 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
11780
11781 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
11782 SCM_I_FIXNUM_BIT.
11783
11784 * num2integral.i.c: new file, multiply included by numbers.c, used
11785 to "templatize" the various integral <-> num conversion routines.
11786
11787 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
11788 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
11789 deprecated.
11790 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
11791 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
11792 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
11793 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
11794 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
11795 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
11796 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
11797 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
11798 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
11799 scm_num2size): new functions.
11800
d69c867a 11801 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
1be6b49c
ML
11802
11803 * load.c: change int -> size_t in various places (where the
11804 variable is used to store a string length).
11805 (search-path): call scm_done_free, not scm_done_malloc.
11806
11807 * list.c (scm_ilength): return a scm_bits_t, not long.
11808 some other {int,long} -> scm_bits_t changes.
11809
11810 * hashtab.c: various [u]int -> scm_bits_t changes.
11811 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
11812 (scm_ihashx): n: uint -> scm_bits_t
11813 use scm_bits2num instead of scm_ulong2num.
11814
11815 * gsubr.c: various int -> scm_bits_t changes.
11816
11817 * goops.[hc]: various {int,long} -> scm_bits_t changes.
11818
d69c867a 11819 * gh_data.c (gh_num2int): no loss of precision any more.
1be6b49c
ML
11820
11821 * gh.h (gh_str2scm): len: int -> size_t
11822 (gh_{get,set}_substr): start: int -> scm_bits_t,
11823 len: int -> size_t
11824 (gh_<num>2scm): n: int -> scm_bits_t
11825 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
11826 (gh_length): return scm_bits_t, not unsigned long.
11827
11828 * gc.[hc]: various small changes relating to many things stopping
11829 being long and starting being scm_[u]bits_t instead.
11830 scm_mallocated should no longer wrap around.
11831
11832 * fports.h: type renaming:
11833 scm_fport -> scm_fport_t
11834 the old name is deprecated, all in-Guile uses changed.
11835
11836 * fports.c (fport_fill_input): count: int -> scm_bits_t
11837 (fport_flush): init_size, remaining, count: int -> scm_bits_t
11838
11839 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
11840 those prototypes, as the functions they prototype don't exist.
11841
11842 * fports.c (default_buffer_size): int -> size_t
11843 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
11844 default_size: int -> size_t
11845 (scm_setvbuf): csize: int -> scm_bits_t
11846
11847 * fluids.c (n_fluids): int -> scm_bits_t
11848 (grow_fluids): old_length, i: int -> scm_bits_t
11849 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
11850 scm_bits_t
11851 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
11852
11853 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
11854 the new and shiny SCM_NUM2INT.
11855
11856 * extensions.c: extension -> extension_t (and made a typedef).
11857
11858 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
11859 there are no nasty surprises if/when the various deeply magic tag
11860 bits move somewhere else.
11861
11862 * eval.c: changed the locals used to store results of SCM_IFRAME,
11863 scm_ilength and such to be of type scm_bits_t (and not int/long).
11864 (iqq): depth, edepth: int -> scm_bits_t
11865 (scm_eval_stack): int -> scm_bits_t
11866 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
11867 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
11868 i: int -> scm_bits_t
11869
11870 * environments.c: changed the many calls to scm_ulong2num to
11871 scm_ubits2num.
11872 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
11873
11874 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
11875
11876 * debug.h: type renaming:
11877 scm_debug_info -> scm_debug_info_t
11878 scm_debug_frame -> scm_debug_frame_t
11879 the old names are deprecated, all in-Guile uses changed.
11880 (scm_debug_eframe_size): int -> scm_bits_t
11881
11882 * debug.c (scm_init_debug): use scm_c_define instead of the
11883 deprecated scm_define.
11884
11885 * continuations.h: type renaming:
11886 scm_contregs -> scm_contregs_t
11887 the old name is deprecated, all in-Guile uses changed.
11888 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
11889 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
11890
11891 * continuations.c (scm_make_continuation): change the type of
d69c867a 11892 stack_size from long to scm_bits_t.
1be6b49c
ML
11893
11894 * ports.h: type renaming:
11895 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
11896 scm_port -> scm_port_t
11897 scm_ptob_descriptor -> scm_ptob_descriptor_t
11898 the old names are deprecated, all in-Guile uses changed.
11899 (scm_port_t.entry): int -> scm_bits_t.
11900 (scm_port_t.line_number): int -> long.
11901 (scm_port_t.putback_buf_size): int -> size_t.
11902
11903 * __scm.h (long_long, ulong_long): deprecated (they pollute the
d69c867a 11904 global namespace and have little value beside that).
1be6b49c
ML
11905 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
11906 SCM handle).
11907 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
d69c867a 11908 exist (for size_t & ptrdiff_t).
1be6b49c
ML
11909 (scm_sizet): deprecated.
11910
11911 * Makefile.am (noinst_HEADERS): add num2integral.i.c
11912
a6219f22
MV
119132001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
11914
11915 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
11916 SCM_VARIABLE_INIT since that it what it used to be.
11917
11918 * deprecation.c (scm_include_deprecated_features): Make docstring
9a5fa6e9 11919 ANSIsh. Thanks to Matthias Köppe!
a6219f22 11920
311b6a3c
MV
119212001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
11922
9dfc4faa
MV
11923 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
11924 needed for weak-key hashtables.
11925
11926 * procs.c (scm_make_subr_with_generic): Add missing last argument
11927 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
11928
11929 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
11930 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
311b6a3c
MV
11931
11932 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
11933
2fc933fe
MV
119342001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
11935
57ae112d
MV
11936 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
11937 `duplicate_string'. Do not use an indirect cell, store symbol
11938 directly in collision list of hash table.
11939 (duplicate_string): Removed.
58bee6a8 11940
57ae112d
MV
11941 * init.c (scm_init_guile_1): Call scm_init_extensions.
11942
11943 * Makefile.am: Add "extensions.c" and related files in all the
11944 right places.
11945
11946 * extensions.h, extension.c: New files.
11947
11948 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
11949
2fc933fe
MV
11950 * modules.h (scm_system_module_env_p): Move out of deprecated
11951 section.
11952
11953 * rw.h (scm_init_rw): Added prototype.
11954
11955 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
11956 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
11957 New functions. They replace scm_make_gsubr and
11958 scm_make_gsubr_with_generic. The `make' variants only create the
11959 gsubr object, while the `define' variants also put it into the
11960 current module. Changed all callers.
11961 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
11962
11963 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
11964 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
11965 functions. They replace scm_make_subr, scm_make_subr_opt and
11966 scm_make_subr_with_generic. The `make' variants only create the
11967 subr object, while the `define' variants also put it into the
11968 current module. Changed all callers.
11969 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
11970 Deprecated.
11971
11972 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
11973 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
11974 the comments above.
58bee6a8 11975
18928596
NJ
119762001-05-19 Neil Jerram <neil@ossau.uklinux.net>
11977
11978 * throw.c (scm_lazy_catch): Slight docstring clarification.
11979
21a13beb
MV
119802001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
11981
e2b6ddc6
MV
11982 * throw.c: Lazy-catch handlers are no longer allowed to return.
11983 Fixed comments throughout.
11984 (scm_ithrow): Signal an error when a lazy-catch handler returns.
11985 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
11986 recognized as such.
11987
21a13beb
MV
11988 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
11989 refered to s_scm_minor_version previously.
11990
11991 * modules.h, modules.c: Moved around a lot of code so that
11992 deprecated features appear at the bottom.
11993 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
11994 module_prefix, make_modules_in_var, beautify_user_module_x_var,
11995 scm_the_root_module, scm_make_module, scm_ensure_user_module,
11996 scm_load_scheme_module): Deprecated.
11997 (scm_system_module_env_p): Return SCM_BOOL_T directly for
11998 environments corresponding to the root module.
11999 (convert_module_name, scm_c_resolve_module,
12000 scm_c_call_with_current_module, scm_c_define_module,
12001 scm_c_use_module, scm_c_export): New.
12002 (the_root_module): New static variant of scm_the_root_module. Use
12003 it everywhere instead of scm_the_root_module.
58bee6a8 12004
21a13beb
MV
12005 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
12006 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
12007 (scm_c_with_fluid): New.
12008 (scm_with_fluids): Use scm_c_with_fluids instead of
12009 scm_internal_with_fluids.
58bee6a8 12010
21a13beb
MV
12011 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
12012 `scm_init_goops'. Do not explicitly create/switch modules.
12013 Return SCM_UNSPECIFIED.
12014 (scm_init_goops): Only register `%init-goops-builtins' procedure.
12015 (scm_load_goops): Use scm_c_resolve_module instead of
12016 scm_resolve_module.
58bee6a8 12017
21a13beb
MV
12018 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
12019 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
12020 `scm_init_rw' prior to loading the startup files.
12021
12022 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
12023 scm_init_rdelim. Do not explicitly create/switch modules.
12024 Return SCM_UNSPECIFIED.
12025 (scm_init_rdelim): Only register `%init-rdelim-builtins'
12026 procedure.
58bee6a8 12027
21a13beb
MV
12028 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
12029 explicitly create/switch modules. Return SCM_UNSPECIFIED.
12030 (scm_init_rw): Only register `%init-rw-builtins' procedure.
12031
12032 * script.c (scm_shell): Evaluate the compiled switches in the
12033 current module, not in the root module.
12034
120352001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
12036
12037 * fluids.c (scm_c_with_fluids): Rename from
12038 scm_internal_with_fluids.
12039 (scm_internal_with_fluids): Deprecated.
12040 (scm_c_with_fluid): New.
12041
09cb9e73
DH
120422001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12043
12044 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
12045
12046 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
12047 accessed with SCM_C[AD]R.
12048
12049 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
12050
c81ea65d
RB
120512001-05-16 Rob Browning <rlb@cs.utexas.edu>
12052
12053 * version.c (s_scm_major_version): doc fixes.
12054 (s_scm_minor_version): doc fixes.
12055 (s_scm_minor_version): new function.
12056
12057 * version.h (scm_init_version): new function.
12058
12059 * versiondat.h.in: add GUILE_MICRO_VERSION.
12060
887dfa7d
DH
120612001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12062
12063 * deprecation.c (scm_init_deprecation): Renamed
12064 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
12065
78930a69
MV
120662001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
12067
12068 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
12069 dependent on cpp_cnvt.awk
12070
39cde5c5
MG
120712001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12072
12073 * script.c (scm_compile_shell_switches): New command line option
12074 `--use-srfi' for loading a list of SRFIs on startup.
12075 (scm_shell_usage): Added `--use-srfi' to help message.
12076
f3f9dcbc
MV
120772001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12078
78930a69 12079 Merged from mvo-vcell-cleanup-1-branch.
887dfa7d 12080
f3f9dcbc
MV
12081 The concept of vcells has been removed from Guile. With it,
12082 explicit obarrays and associated operations are gone. Use
12083 hashtables instead of obarrays.
887dfa7d 12084
f3f9dcbc
MV
12085 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
12086 result as variable instead of vcell. Glocs no longer point to a
12087 vcell but to a variable. Use scm_c_define instead of
12088 scm_sysintern and treat the result as a variable (which it is),
12089 not a vcell.
887dfa7d 12090
f3f9dcbc
MV
12091 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
12092 SCM_DEFVARIABLEP): Deprecated.
12093 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
12094 (variable_print): Do not print name of variable.
12095 (variable_equalp): Compare values, not vcells.
12096 (anonymous_variable_sym): Removed.
12097 (make_vcell_variable): Removed.
12098 (make_variable): New, as replacement.
12099 (scm_make_variable, scm_make_undefined_variable): Do not take name
12100 hint parameter.
12101 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
12102 error in that case.
12103 (scm_builtin_variable): Deprecated.
12104
12105 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
12106 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
12107 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
12108 scm_sysintern, scm_sysintern0, scm_symbol_value0,
12109 scm_string_to_obarray_symbol, scm_intern_symbol,
12110 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
12111 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
12112 Deprecated and moved to "symbols-deprecated.c".
12113 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
12114 (scm_init_symbols): Call scm_init_symbols_deprecated.
12115 * symbols-deprecated.c: New file.
12116 * Makefile.am: Added symbols-deprecated.c and related files in all
12117 the right places.
887dfa7d 12118
f3f9dcbc
MV
12119 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
12120 SCM_GLOBAL_VCELL_INIT): Deprecated.
12121 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
12122 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
887dfa7d 12123
f3f9dcbc
MV
12124 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
12125 SCM_GLOC_SYM.
12126
12127 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
12128 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
12129 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
12130 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
12131 Changed according to the `throughout' comments.
12132
12133 * modules.h, modules.c (scm_module_system_booted_p): Changed type
12134 to `int'.
12135 (scm_module_type): Removed.
12136 (the_root_module): Renamed to the_root_module_var. Now points to
12137 a variable instead of a vcell. Updated all uses.
12138 (scm_the_root_module): Return SCM_BOOL_F when module systems
12139 hasn't been booted yet.
12140 (SCM_VALIDATE_STRUCT_TYPE): Removed.
12141 (scm_post_boot_init_modules): Made static.
12142 (scm_set_current_module): Call scm_post_boot_init_modules on first
12143 call.
12144 (make_modules_in, beautify_user_module_x, resolve_module,
12145 try_module_autoload, module_make_local_var_x): Tacked on "_var"
12146 suffix. Now point to variables instead of vcells. Updated all
12147 uses.
12148 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
12149 and return SCM_BOOL_F in that case.
12150 (scm_module_transformer): Likewise.
12151 (sym_module, scm_lookup_closure_module, scm_env_module): New.
12152 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
12153 (scm_eval_closure_lookup): Do not allow new definitions when
12154 `interface' flag is set.
12155 (scm_standard_interface_eval_closure): New.
12156 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
12157 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
12158 scm_c_lookup, scm_c_module_define, scm_c_define,
12159 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
12160 scm_modules_prehistory): New.
12161 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
12162 instead of scm_intern0.
887dfa7d 12163
f3f9dcbc
MV
12164 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
12165 symbol.
12166
12167 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
12168 hashtable operations to maintain the keywords, not obarray ones.
12169
12170 * init.c (scm_load_startup_files): Do not call
12171 scm_post_boot_init_modules. This is done by
12172 scm_set_current_module now.
12173 (scm_init_guile_1): Call scm_modules_prehistory. Call
12174 scm_init_variable early on.
12175
12176 * goops.c (s_scm_sys_goops_loaded): Get
12177 var_compute_applicable_methods from scm_sym2var, not from a direct
12178 invocation of scm_goops_lookup_closure.
12179
12180 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
12181
12182 * gc.c: Added simple debugging hack to mark phase of GC: When
12183 activated, do not tail-call scm_gc_mark. This gives nice
12184 backtraces.
12185 (scm_unhash_name): Removed.
12186
12187 * feature.c (features): Renamed to features_var. Now points to a
12188 variable instead of a vcell. Updated all uses.
12189
12190 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
12191 `scm_current_module_lookup_closure' which will do the right thing
12192 when the module system hasn't been booted yet.
12193 (SCM_GLOC_SYM): Removed.
12194 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
12195 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
887dfa7d 12196
f3f9dcbc
MV
12197 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
12198 instead of with vcells. Do not overwrite `var' with the result of
12199 the lookup, use the new `real_var' instead. Remove `var2' in
12200 exchange (which was only used with threads).
12201 (sym_three_question_marks): New.
12202 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
12203 `SCM_GLOC_SYM'.
12204 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
12205 (scm_m_atfop): Expect the function definition to be a variable
12206 instead of a vcell.
12207 (scm_macroexp): Do not use `unmemocar', explicitely remember the
12208 symbol instead.
12209 (scm_unmemocopy): Removed thoughts about anti-macro interface.
12210 (scm_eval_args): Use more explicit code in the gloc branch of the
12211 atrocious struct ambiguity test. The optimizer will sort this
12212 out.
12213 (scm_deval_args): Likewise.
12214 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
12215 remember the symbol instead. Added some comments where
12216 scm_tc3_cons_gloc really exclusively refers to structs.
12217 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
12218 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
12219 of scm_sysintern in general.
12220
12221 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
12222 explicit magic.
12223
12224 * debug.c (s_scm_make_gloc): Only allow proper variables, no
12225 pairs. Put the variable directly in the gloc.
12226 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
12227 (scm_init_debug): Use scm_c_define instead scm_sysintern.
12228
12229 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
12230
12231 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
12232 scm_the_last_stack_fluid_var. It now points to a variable instead
12233 of a vcell. Updated all uses.
12234 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
12235 instead of a vcell. Updated all uses.
12236
12237 * _scm.h: Include "variables.h" and "modules.h" since almost
12238 everybody needs them now.
12239
12240 * root.h (scm_symhash, scm_symhash_vars): Removed.
12241 * gc.c (scm_init_storage): Do not initialize them.
887dfa7d 12242
7c33806a
DH
122432001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12244
12245 * eval.c (scm_init_eval): Initialize scm_undefineds and
58bee6a8 12246 scm_listofnull.
7c33806a
DH
12247
12248 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
12249 like the SCM_NEWCELL macro counterparts.
12250
12251 (scm_init_storage, scm_init_gc): Moved initialization of
12252 scm_tc16_allocated from scm_init_gc to scm_init_storage.
12253
12254 (scm_init_storage): Moved initialization of scm_undefineds and
12255 scm_listofnull to eval.c, initializion of scm_nullstr to
12256 strings.c, initializion of scm_nullvect to vectors.c.
12257
12258 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
12259 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
12260
12261 * init.c (scm_init_guile_1): Reordered some initializations and
12262 added dependcy information comments.
12263
12264 * load.c (scm_init_load): Use scm_nullstr.
12265
12266 * strings.c (scm_init_strings): Initialize scm_nullstr.
12267
12268 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
12269
11bbab47
MV
122702001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
12271
12272 * values.c (print_values): Print as a unreadable object, not as
9a5fa6e9 12273 multiple lines. Thanks to Matthias Köppe!
11bbab47 12274
5cd06d5e
DH
122752001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
12276
12277 * deprecation.c: Fixed copyright date.
12278
12279 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
12280 DEPRECATION_H to SCM_DEPRECATION_H.
12281
32bac999
TTN
122822001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
12283
12284 * guile-doc-snarf.in: Update copyright.
12285 Fix relative path bug. Thanks to Sergey Poznyakoff.
12286
c9dcc5ae
MV
122872001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
12288
12289 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
12290 accept open ports. Thanks to Quetzalcoatl Bradley!
12291
7c582ec9
MG
122922001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12293
12294 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
12295 has 779 primitives on startup.
12296
284ab601
MV
122972001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
12298
12299 * eval.c (scm_i_eval): Copy expression before passing it to
12300 SCM_XEVAL. The copy operation was removed unintendedly during my
12301 change on 2001-03-25.
12302
910d1e40
ML
123032001-05-09 Michael Livshin <mlivshin@bigfoot.com>
12304
9a5fa6e9 12305 from Matthias Köppe (thanks!):
910d1e40
ML
12306
12307 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
12308 portable.
12309
12310 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
12311 docstring.
12312
56e55ac7
DH
123132001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12314
12315 * gc.c (scm_init_gc): Added FIXME comment.
12316
12317 * hooks.c: Since hooks don't have a name any more, it is not
12318 necessary to include objprop.h.
12319
12320 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
12321
12322 (symbol_name, scm_make_hook_with_name): Removed.
12323
12324 (scm_create_hook): Don't set the hook's name property.
12325
12326 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
12327
12328 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
12329
12330 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
12331
12332 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
12333 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
12334 FLOBUFLEN and define it unconditionally.
12335
d204b24c
MV
123362001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
12337
438201b4
MV
12338 * gh_data.c (gh_lookup): Call gh_module_lookup with
12339 `scm_current_module ()', not `#f'.
12340 (gh_module_lookup): Expect a module instead of an obarray as first
12341 argument and do lookup in that module.
56e55ac7 12342
d204b24c
MV
12343 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
12344 arrays. The length of array is already determined differently and
12345 scm_uniform_vector_length does not work on arrays.
12346
26c1d549
MV
123472001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
12348
fe7c2f88
MV
12349 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
12350 as well. "SCM (*)(...)" does not work on RedHat 7.1.
12351
26c1d549
MV
12352 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
12353 they are not used. Changed `wrong type' error into `wrong num
12354 args' error. Changed all callers.
56e55ac7 12355
26c1d549
MV
12356 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
12357 arguments are supplied.
12358
1c938eb8
TTN
123592001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
12360
12361 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
12362 describe `regexp/notbol' and `regexp/noteol' execution flags.
12363
3a6379f7
TTN
12364 * strop.c (scm_substring_move_x): Doc fix; nfc.
12365
c10ecc4c
MV
123662001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
12367
12368 * objects.c, objects.h (scm_valid_object_procedure_p): New.
12369 (scm_set_object_procedure_x): Use it to check argument. Fix
12370 docstring.
12371
12372 * evalext.c (scm_definedp): Fix docstring.
12373
a57a0b1e
GH
123742001-05-05 Gary Houston <ghouston@arglist.com>
12375
12376 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
12377 support.
12378
7a095584
NJ
123792001-05-04 Neil Jerram <neil@ossau.uklinux.net>
12380
12381 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
12382 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
12383 Change R4RS references to R5RS.
12384
12385 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
12386 docstring source are correctly reproduced in the output (ii)
12387 we don't anymore get occasional trailing quotes. Also reorganized
12388 and commented the code a little.
12389
12390 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
12391 fixes.
12392
dd2a6f3a
MG
123932001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12394
12395 * strop.c (scm_string_split): New procedure.
12396
12397 * strop.h (scm_string_split): Added prototype.
12398
00120130
GH
123992001-05-04 Gary Houston <ghouston@arglist.com>
12400
12401 * socket.c: define uint32_t if netdb.h doesn't. thanks to
12402 Dale P. Smith.
12403
b65e6bfe
MV
124042001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
12405
12406 * rw.c: Include "modules.h" and "strports.h".
12407
12408 * net_db.h (scm_gethost): Added prototype.
12409
12410 * deprecation.h, deprecation.c: New.
12411 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
12412 (DOT_X_FILES): Added "deprecation.x".
12413 (modinclude_HEADERS): Added "deprecation.h".
12414
12415 * init.c: Include "deprecation.h".
12416 (scm_init_guile_1): Call scm_init_deprecation.
1c938eb8 12417
b65e6bfe
MV
124182001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
12419
12420 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
12421 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
12422 New.
12423
b0e5fd8c
GH
124242001-04-29 Gary Houston <ghouston@arglist.com>
12425
12426 * rw.c: new file, implementing C part of module (ice-9 rw).
12427 (scm_read_string_x_partial): moved from ioext.c
12428 (scm_init_rw): new proc.
12429 * rw.h: new file.
12430 init.c: include rw.h and call scm_init_rw.
12431 Makefile.am: include rw.c and rw.h.
12432
0b2da99c
RB
124332001-04-28 Rob Browning <rlb@cs.utexas.edu>
12434
12435 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
12436 know what's supposed to happen to it.
12437
12438 * list.h (scm_list_star): deprecation expired - removed.
12439
12440 * numbers.h (scm_dblproc): deprecation expired - removed.
12441 (SCM_UNEGFIXABLE): deprecation expired - removed.
12442 (SCM_FLOBUFLEN): deprecation expired - removed.
12443 (SCM_INEXP): deprecation expired - removed.
12444 (SCM_CPLXP): deprecation expired - removed.
12445 (SCM_REAL): deprecation expired - removed.
12446 (SCM_IMAG): deprecation expired - removed.
12447 (SCM_REALPART): deprecation expired - removed.
12448 (scm_makdbl): deprecation expired - removed.
12449 (SCM_SINGP): deprecation expired - removed.
12450 (SCM_NUM2DBL): deprecation expired - removed.
12451 (SCM_NO_BIGDIG): deprecation expired - removed.
12452
12453 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
12454 (scm_tc_dblr): deprecation expired - removed.
12455 (scm_tc_dblc): deprecation expired - removed.
12456 (scm_tc16_flo): deprecation expired - removed.
12457 (scm_tc_flo): deprecation expired - removed.
12458
12459 * tag.h (scm_tag): deprecation expired - removed.
12460
12461 * tag.c: (scm_tag): deprecation expired - removed.
12462
12463 * ioext.c: (scm_fseek): deprecation expired - removed.
12464
12465 * ioext.h (scm_fseek): deprecation expired - removed.
12466
12467 * gh_data.c (gh_int2scmb): deprecation expired - removed.
12468
12469 * gh.h (gh_int2scmb): deprecation expired - removed.
12470
e3334972
NJ
124712001-04-28 Neil Jerram <neil@ossau.uklinux.net>
12472
12473 * stacks.c (scm_make_stack): Fix typo in docstring.
12474
a0f979ac
RB
124752001-04-27 Rob Browning <rlb@cs.utexas.edu>
12476
12477 * error.c (scm_sysmissing): deprecation expired - removed.
12478
12479 * error.h (scm_sysmissing): deprecation expired - removed.
12480
12481 * gc.c
12482 (scm_init_gc): gc-thunk deprecation expired - removed.
12483 (scm_gc_vcell): deprecation expired - removed.
12484 (gc_async_thunk): scm_gc_vcell related code removed.
12485
12486 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
12487
12488 * strings.h
12489 (SCM_NSTRINGP): deprecation expired - removed.
12490 (SCM_NRWSTRINGP): deprecation expired - removed.
12491
12492 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
12493
12494 * chars.h
12495 (SCM_ICHRP): deprecation expired - removed.
12496 (SCM_ICHR): deprecation expired - removed.
12497 (SCM_MAKICHR): deprecation expired - removed.
12498
12499 * ports.h
12500 (SCM_INPORTP): deprecation expired - removed.
12501 (SCM_OUTPORTP): deprecation expired - removed.
12502
253081cf
MV
125032001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
12504
12505 * modules.c (scm_module_type): New.
12506 (scm_post_boot_init_modules): Initialize from Scheme value.
12507 (the_module, scm_current_module, scm_init_modules): the_module is
12508 now a C only fluid.
12509 (scm_current_module): Export to Scheme.
12510 (scm_set_current_module): Do not call out to Scheme, do all the
12511 work in C. Export procedure to Scheme. Only accept modules, `#f'
12512 is no longer valid as the current module. Only set
12513 scm_top_level_lookup_closure_var and scm_system_transformer when
12514 they are not deprecated.
12515 (scm_module_transformer, scm_current_module_transformer): New.
12516
12517 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
12518 scm_current_module_transformer, scm_module_transformer): New.
1c938eb8 12519
253081cf
MV
12520 * gh_data.c: Removed FIXME comment about gh_lookup returning
12521 SCM_UNDEFINED. That's the right thing to do.
12522
12523 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
12524 into the conditionally compiled sections.
12525 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
12526 scm_current_module_transformer instead of scm_system_transformer.
12527 * init.c (start_stack): Move initialization of
12528 scm_system_transformer to the deprecated section.
1c938eb8 12529
1f7f9ed4
NJ
125302001-04-22 Neil Jerram <neil@ossau.uklinux.net>
12531
12532 * throw.c (scm_throw): Correct docstring.
12533
66c73b76
GH
125342001-04-22 Gary Houston <ghouston@arglist.com>
12535
eefae538
GH
12536 * socket.c: attempted to improve the docstrings slightly.
12537
66c73b76
GH
12538 * net_db.c: remove bogus "close" declaration.
12539 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
12540 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
12541 moved to socket.c.
12542 * net_db.h: declarations moved too.
12543
12544 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
12545 long.
12546 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
12547 (VALIDATE_INET6): new macro.
12548 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
12549 inet-pton and inet-ntop.
12550 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
12551 (scm_addr_vector): use ipv6_net_to_num.
1c938eb8 12552
7a7f7c53
DH
125532001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
12554
12555 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
12556 smob number explicitly. Use SCM_TC2SMOBNUM instead.
12557
12558 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
12559 when compiled in debug mode.
12560
12561 (scm_gc_sweep): Only call smob's free function if it is defined.
12562
12563 * print.c (scm_iprin1): No need to check for validity of smob
12564 type or existence of print function.
12565
12566 * smob.[ch] (scm_smobs): Made into a fixed size global array.
12567 Resizing will not work well with preemptive threading.
12568
12569 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
12570
12571 (scm_make_smob_type): Extracted initialization of smob
12572 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
12573 of the critical section.
12574
12575 (scm_smob_prehistory): Initialize all smob descriptors. By
12576 default, don't assign a smob free function: Most smob types don't
12577 need one.
12578
12579 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
12580
e1368a8d
GH
125812001-04-21 Gary Houston <ghouston@arglist.com>
12582
12583 * socket.c (FLIP_NET_HOST_128): new macro.
12584 (scm_fill_sockaddr): use new macro.
12585 (scm_addr_vector): completed IPv6 address support. added const
12586 to the address parameter.
12587
5a525b84
GH
125882001-04-20 Gary Houston <ghouston@arglist.com>
12589
12590 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
12591 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
12592 is defined.
12593 (scm_addr_vector): use a switch instead of multiple if statements.
12594 Add support for IPv6 (incomplete) .
e1368a8d 12595 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
5a525b84 12596
1a551638
DH
125972001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12598
12599 * struct.c (scm_free_structs): Only pairs may be accessed with
12600 SCM_C[AD]R.
12601
c07b3fef
MD
126022001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12603
a9d861e3
MD
12604 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
12605
c07b3fef
MD
12606 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
12607 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
12608 parentheses in order to get the correct associativity.
12609
af7546eb
DH
126102001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12611
12612 * unif.c (scm_array_to_list): Added missing handling of arrays of
12613 bytes. Thanks to Masao Uebayashi for the bug report.
12614
4daecfee
DH
126152001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12616
12617 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
12618 consistently.
12619
726d810a
DH
126202001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12621
12622 * procs.h (SCM_CLOSURE_FORMALS): New macro.
12623
12624 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
12625 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
1c938eb8 12626 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
726d810a
DH
12627 SCM_CLOSURE_FORMALS.
12628
12629 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
12630 (scm_i_procedure_arity): Prefer stronger predicates like
12631 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12632
12633 * macros.c (macro_print): Extracted macro printing code from
12634 print.c and simplified it.
12635
12636 (scm_macro_type): Use SCM_MACRO_TYPE;
12637
12638 (scm_init_macros): Use macro_print for printing macros.
12639
12640 * print.c (scm_print_opts): Improved option documentation.
12641
12642 (scm_iprin1): Extracted printing of macros to macros.c.
12643 Simplified printing of ordinary closures.
12644
12645 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
12646 Martin Grabmueller for the bug report.
12647
e038c042
DH
126482001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12649
12650 This patch eliminates some further applications of SCM_C[AD]R to
12651 non pair cells.
12652
12653 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
12654 never been applied to real pairs.
12655
12656 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
12657
12658 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
12659
12660 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
12661 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
12662 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
12663
12664 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
12665 Added.
12666
12667 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
12668 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
12669
12670 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
12671 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
12672 SCM_SET{AND,OR}_CAR.
12673
3453619b
GH
126742001-04-17 Gary Houston <ghouston@arglist.com>
12675
12676 * some initial support for IPv6:
1c938eb8 12677
3453619b
GH
12678 * socket.c (scm_fill_sockaddr): improve the argument validation.
12679 don't allocate memory until all args are checked. instead of
12680 unconditional memset of soka, try setting sin_len to 0 if
12681 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
12682 (scm_socket, scm_connect): extend docstrings for IPv6.
12683 (scm_init_socket): intern AF_INET6 and PF_INET6.
12684
216eedfc
DH
126852001-04-17 Niibe Yutaka <gniibe@m17n.org>
12686
12687 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
12688 matches SCM_DEFER_INTS at the beginning of the function.
12689
12690 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
12691
12692 * gc.c (scm_igc): Unconditionally call
12693 SCM_CRITICAL_SECTION_START/END.
12694
12695 * fluids.c (next_fluid_num): Unconditionally call
12696 SCM_CRITICAL_SECTION_START/END.
12697 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
12698
12699 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
12700 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
12701 Removed.
12702
12703 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
12704 Defined as nothing for the case of !defined(USE_THREADS).
12705 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
12706 Removed.
12707 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
12708 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
12709 LINE.
12710 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
12711 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
12712 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
12713 SCM_CRITICAL_SECTION_START/END.
12714 (SCM_REALLOW_INTS: Bug fix. Don't call
12715 SCM_THREAD_SWITCHING_CODE.
12716 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
12717 SCM_THREAD_SWITCHING_CODE directly.
12718 (SCM_ENTER_A_SECTION): Unconditionally use
12719 SCM_CRITICAL_SECTION_START/END. (was:
12720 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
12721
127222001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12723
12724 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
12725 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
12726 allowed to explicitly set this macro via the CFLAGS variable
12727 during make.
12728
12729 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
12730 (SCM_THREAD_CRITICAL_SECTION_START,
12731 SCM_THREAD_CRITICAL_SECTION_END): Renamed
12732 SCM_THREAD_CRITICAL_SECTION_START/END to
12733 SCM_CRITICAL_SECTION_START/END.
12734
f22ed5a0
KN
127352001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
12736
12737 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
12738 instead of bzero.
1c938eb8 12739
f22ed5a0 12740 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
1c938eb8 12741 (MISSING_BZERO_DECL): Remove the declaration.
f22ed5a0
KN
12742
12743 Thanks to NIIBE Yutaka.
12744
508ded1c
MD
127452001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12746
a087ba81
MD
12747 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
12748 goops module should be registered in order to work for an
12749 application which uses libguile statically linked.)
508ded1c 12750
e4b265d8
DH
127512001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
12752
12753 * numbers.[ch] (scm_num2long, scm_num2long_long,
12754 scm_num2ulong_long, scm_num2ulong): Argument position is an
12755 unsigned integer.
12756
12757 * environments.c (eval_environment_folder,
12758 import_environment_folder), gh_data.c (gh_scm2longs,
12759 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
12760 for integers and pointers, respectively.
12761
12762 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
12763 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
12764 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
12765 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
12766
12767 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
12768 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
12769 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
12770 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
12771 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
12772 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
12773
89d04205
NJ
127742001-04-09 Neil Jerram <neil@ossau.uklinux.net>
12775
12776 * strings.c (scm_read_only_string_p): Update docstring to reflect
12777 current (non-)usage of "read only" strings.
40f83c3e
NJ
12778 (scm_make_shared_substring): Clarify docstring by changing
12779 "semantics" to "arguments".
89d04205 12780
4d66be54
MG
127812001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12782
12783 * hooks.c (scm_make_hook, scm_make_hook_with_name),
12784 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
12785 improvements.
12786
1e6808ea
MG
127872001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12788
12789 The following changes make the documentation more consistent.
1c938eb8 12790
1e6808ea
MG
12791 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
12792 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
12793 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
12794 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
12795 ... @end lisp.
12796
12797 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
12798 (scm_array_dimensions, scm_make_shared_array),
12799 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
12800 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
12801 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
12802 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
12803 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
12804 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
12805 macros.c (scm_makmmacro), list.c (scm_append), environments.c
12806 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
12807 @example ... @end example to @lisp ... @end lisp.
12808
12809 * weaks.c (scm_weak_vector): Corrected docstring.
12810
12811 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
12812 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
12813 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
12814 (scm_hashx_set_x, scm_hashx_get_handle),
12815 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
12816 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
12817 vectors.c (scm_vector_fill_x), strings.c
12818 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
12819 objprop.c (scm_set_object_properties_x):
12820 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
12821 strports.c (scm_call_with_input_string), ports.c
12822 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
12823 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
12824 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
12825 (scm_make_weak_vector,scm_weak_vector_p),
12826 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
12827 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
12828 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12829 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
12830 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
12831 Made parameter names match documentation by renaming parameters
12832 and/or fixing docstrings.
1c938eb8 12833
1e6808ea
MG
12834 * numbers.c (scm_ash): Corrected Texinfo markup.
12835
12836 * strop.c (scm_string_index, scm_string_rindex),
12837 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
12838
12839 * vports.c (scm_make_soft_port), unif.c
12840 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
12841 (scm_dimensions_to_uniform_array, scm_transpose_array),
12842 (scm_array_in_bounds_p, scm_uniform_vector_ref),
12843 (scm_bit_count, scm_bit_position, scm_bit_count_star),
12844 (scm_array_to_list, scm_list_to_uniform_array),
12845 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
12846 (scm_open_input_string, scm_open_output_string),
12847 (scm_get_output_string), strop.c (scm_string_copy),
12848 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
12849 (scm_get_internal_real_time, scm_times),
12850 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
12851 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
12852 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
12853 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
12854 simpos.c (scm_system), random.c (scm_random_uniform),
12855 (scm_random_normal, scm_random_exp), ramap.c
12856 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
12857 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
12858 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
12859 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
12860 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
12861 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
12862 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
12863 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
12864 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
12865 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
12866 (scm_logand, scm_logior, scm_logxor, scm_lognot),
12867 (scm_integer_expt, scm_bit_extract, scm_logcount),
12868 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
12869 net_db.c (scm_inet_netof, scm_lnaof), modules.c
12870 (scm_interaction_environment), macros.c (scm_makacro),
12871 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
12872 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
12873 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
12874 (scm_fluid_ref), filesys.c (scm_open_fdes),
12875 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
12876 Docstring correction: `Returns' -> `Return'
12877
1c938eb8
TTN
12878 * gc.c (scm_set_debug_cell_accesses_x):
12879 (s_scm_gc_set_debug_check_freelist_x):
1e6808ea
MG
12880 * fluids.c (scm_fluid_p): Added texinfo markup.
12881
12882 * error.c (scm_strerror): Made docstring more precise.
12883
12884 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
12885 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
12886 (scm_symbol_p, scm_symbol_to_string), strorder.c
12887 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
12888 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
12889 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
12890 (scm_string_ci_geq_p), strop.c (scm_string_copy),
12891 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
12892
9a6976cd
DH
128932001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
12894
12895 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
12896 mode, as suggested by Michael Livshin.
12897
463b2219
ML
128982001-03-31 Michael Livshin <mlivshin@bigfoot.com>
12899
12900 * backtrace.c (display_backtrace_body): since the `print_state'
12901 variable is not used (instead its data field is used directly as
12902 `pstate'), protect it from the hungry compiler optimizations.
12903 thanks to Bill Schottstaedt for the report.
12904
61045190
DH
129052001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12906
12907 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
12908 It is only defined and used if guile is compiled with
12909 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
12910 let cells with a free_cell type tag be visible outside of the
12911 garbage collector when in debug mode.
12912
12913 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
12914
12915 (scm_assert_cell_valid): Use a local static variable to avoid
12916 recursion.
12917
12918 (MARK): Only check for rogue cell pointers in debug mode. Use
12919 scm_cellp for this purpose and place all checks for rogue pointers
12920 into that function. Further, since due to conservative scanning
12921 we may encounter free cells during marking, don't use the standard
12922 cell type accessor macro to determine the cell type.
12923
12924 (scm_cellp): Check if the cell pointer actually points into a
12925 card header.
12926
12927 (scm_init_gc): Initalize scm_tc16_allocated.
12928
12929 * gc.h (GCH): Renamed to SCM_GC_H.
12930
12931 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
12932 might be unnecessary, but I feel better this way :-)
12933
12934 (SCM_GC_CELL_TYPE): New macro.
12935
12936 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
12937 in guile, and it is unlikely that they will be applied to real
12938 pairs anyway.
12939
12940 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
12941
12942 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
12943 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
12944
12945 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
12946 make sure that in debug mode no free cell will ever be visible
12947 outside of the garbage collector.
12948
85d6df6a
DH
129492001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
12950
12951 * async.c (scm_asyncs_pending): Don't use != to compare SCM
12952 values.
12953
12954 * async.c (scm_system_async), variable.c (scm_make_variable,
12955 scm_make_undefined_variable): Use scm_cons to create a pair.
12956
12957 * debug.c (scm_reverse_lookup): Perform proper type checking.
12958 Remove suspicious use of SCM_SLOPPY_CONSP.
12959
12960 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
12961 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
12962 the corresponding optimization.
12963
12964 * eval.c (iqq): Use proper type check.
12965
12966 (scm_m_expand_body): Remove redundant type checks.
12967
12968 (promise_print): Don't access promise cells as pairs.
12969
12970 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
12971 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
12972 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
12973 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
12974 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
12975
12976 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
12977 (scm_iprin1): Use new macro predicate and accessors.
12978
12979 * eval.h (scm_tc16_macro): Removed declaration. It is declared
12980 in macros.h.
12981
12982 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
12983 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
12984 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
12985 SCM_VARIABLE_H. Even the macros that are used to inhibit
12986 including a header file twice should be in the SCM_ namespace.
12987
12988 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
12989 properties.c (scm_primitive_property_ref,
12990 scm_primitive_property_del_x): Prefer stronger predicates like
12991 SCM_NULLP or SCM_FALSEP over SCM_IMP.
12992
12993 * gc.c (MARK): Use proper macros to access procedure-with-setter
12994 cell elements and closure cell elements.
12995
12996 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
12997 access free cells as pairs.
12998
12999 (scm_unprotect_object): scm_hashq_get_handle returns #f if
13000 no hashtab entry is found.
13001
13002 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
13003 SCM_CLR_PORT_OPEN_FLAG.
13004
13005 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
13006 use SCM_SET_C[AD]R for uninitialized cells.
13007
13008 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
13009 If the hashtable has no slots, return #f instead of '(). This
13010 unifies the return value with most assoc-functions.
13011
13012 (scm_hash_fn_ref): Use proper type check.
13013
13014 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
13015 Removed references to non-existing functions from documentation.
13016
13017 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
13018 access keyword cell elements.
13019
13020 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
13021 macros.
13022
13023 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
13024
13025 * print.c (scm_iprlist): Added comment. Improved loop
13026 conditions.
13027
13028 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
13029 pairs.
13030
13031 * smob.c (scm_markcdr): Don't access smob cells as pairs.
13032
13033 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
13034
13035 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
13036 cells as pairs.
13037
13038 * variable.c (variable_print, variable_equalp, scm_variable_ref,
13039 scm_variable_set_x): Use proper macros to access variable cell
13040 elements.
13041
13042 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
13043
13044 * variable.h (SCM_VARVCELL): Don't access variable cells as
13045 pairs.
13046
13047 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
13048 added FIXME comment, removed register specifier.
13049
1b27e91a
KN
130502001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
13051
13052 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
13053 * init.c (scm_init_guile_1): Don't init goopscore module.
13054
16c634ec
MV
130552001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13056
13057 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
13058
91344ceb
MG
130592001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13060
13061 * strop.c (scm_string_to_list): Fixed docstring markup.
13062 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
13063 (scm_string_downcase, scm_string_capitalize_x),
13064 (scm_string_capitalize): Rewrote and corrected docstrings.
13065 (scm_string_ci_to_symbol): Made docstring more explicit.
13066
07576812
MV
130672001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
13068
13069 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
13070 eval.c can use it.
13071 (scm_call_with_values): Removed.
13072 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
13073 so that it can be exported.
13074 (scm_call_with_values): Removed.
1c938eb8 13075
07576812
MV
13076 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
13077 * eval.c: Include "libguile/values.h"
13078 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
13079 New.
13080 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
13081 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
13082 New delcarations to support above change.
13083
13084 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
13085 errors with last change.
1c938eb8 13086
07576812
MV
130872001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
13088
13089 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
13090 scm_i_eval): Moved the application of the system transformer from
13091 scm_i_eval to scm_primitive_eval.
13092
a17bb5fd
NJ
130932001-03-23 Neil Jerram <neil@ossau.uklinux.net>
13094
a6be01a4
NJ
13095 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
13096
a17bb5fd
NJ
13097 * strop.c (scm_string_index): Fix docstring line break
13098 regression.
13099
13100 * list.c (scm_cons_star): Fix docstring typo.
13101
be54b15d
DH
131022001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
13103
13104 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
13105 (big2str), ports.c (scm_drain_input), read.c (scm_read,
13106 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
13107 scm_make_string, scm_string_append), strports.c (st_resize_port,
13108 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
13109 scm_makstr with calls to scm_allocate_string.
13110
13111 * strings.[ch] (scm_allocate_string): New function.
13112
13113 * strings.[ch] (scm_makstr): Deprecated.
13114
789ecc05
GH
131152001-03-18 Gary Houston <ghouston@arglist.com>
13116
6d163216
GH
13117 * posix.c (scm_tmpnam): check that return value from tmpnam is not
13118 NULL. rewrote the docstring.
13119 (scm_mkstemp): new procedure implementing "mkstemp!".
13120 * posix.h: declare scm_mkstemp.
13121
789ecc05
GH
13122 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
13123 normally it would be found in netdb.h.
13124
c6c79933
GH
131252001-03-17 Gary Houston <ghouston@arglist.com>
13126
e9e225e5
GH
13127 * sort.c (scm_sort): move sortvec variable to avoid a compiler
13128 warning when HAVE_ARRAYS is not defined. move len too.
13129
13130 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
13131 (EXTRA_DOT_X_FILES): let configure set the value.
13132 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
13133
c6c79933
GH
13134 * gc.c (scm_must_malloc): changed the comment explaining when
13135 scm_must variants of malloc/free etc., should be used, based on
13136 explanation from Dirk Herrmann.
13137 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
13138 string with procedure name. use scm_must_malloc instead of malloc.
13139 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
13140 of malloc/free.
13141 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
13142 scm_ungetc): use scm_must variants of malloc/realloc/free.
13143 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
13144
b3fcac34
DH
131452001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13146
13147 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
13148 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
13149 scm_wrong_type_arg instead.
13150
13151 (SCM_WNA): Deprecated.
13152
13153 * error.[ch] (scm_wta): Deprecated.
13154
13155 * numbers.c (s_i_log): Minor comment fix.
13156
13157 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
13158 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
13159 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
13160 wrong-num-args or misc errors.
13161
13162 * unif.c (scm_make_shared_array, scm_transpose_array,
13163 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
13164 Validate the rest argument (note: this is only done when guile is
13165 built with SCM_DEBUG_REST_ARGUMENT=1)
13166
13167 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
13168 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
13169
13170 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
13171 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
13172
68baa7e7
DH
131732001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13174
13175 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
13176 instead of scm_wrong_num_args.
13177
13178 * coop-threads.c: Don't include libguile/strings.h. (Was only
13179 needed for former implementation of SCM_WRONG_NUM_ARGS.)
13180
13181 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
13182 wrong-num-args errors.
13183
9f40cd87
DH
131842001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
13185
13186 * error.[ch] (scm_error_num_args_subr): New function.
13187
5352393c
MG
131882001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13189
13190 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
13191 (scm_length, scm_append, scm_reverse, scm_list_ref),
13192 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
13193 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
13194 (scm_delete1_x), gc.c (scm_map_free_list),
13195 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
13196 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
13197 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
13198 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
13199 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
13200 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
13201 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
13202
13203 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
13204 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13205 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
13206 symbols.c (scm_symbol_interned_p), numbers.c
13207 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
13208 markup.
13209
a9205f07
KN
132102001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
13211
13212 * snarf.h (SCM_CONST_LONG): Deprecated.
13213 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
13214
6d583887
MV
132152001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13216
13217 * numbers.c (scm_num2ulong): Check that a bignum is positive
13218 before looking at the magnitude. Correctly check for overflow
13219 during conversion.
13220 (scm_num2long_long): Likewise.
13221 (scm_num2ulong_long): New.
13222 (ULONG_LONG_MAX): Define if not already defined.
13223 * numbers.h: (scm_num2ulong_long): New prototype.
1c938eb8 13224
e87a03fc
MG
132252001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13226
13227 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
13228
13229 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
13230 (SCM_OPOUTSTRPORTP): New predicate macros.
13231 (scm_open_input_string, scm_open_output_string),
13232 (scm_get_output_string): New prototypes.
1c938eb8 13233
e87a03fc
MG
13234 * strports.c (scm_open_input_string, scm_open_output_string),
13235 (scm_get_output_string): New procedures (SRFI-6 compliant).
13236 Made scm_tc16_strport non-static.
13237
160bb34a
DH
132382001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13239
13240 * macros.h (SCM_ASSYNT): Removed unused object argument from
13241 signature.
13242
13243 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
13244 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
13245 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
13246 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
13247 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
13248 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
13249 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
13250 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13251 scm_m_atdispatch): Removed unused object argument from call to
13252 SCM_ASSYNT.
13253
80dee77b
DH
132542001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
13255
13256 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
13257 const int* to reflect that the input array of integers remains
13258 unchanged. Thanks to Brett Viren for the hint.
13259
d3dd80ab
MG
132602001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13261
13262 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
13263 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
13264 in various places.
13265 (gh_scm2newstr, gh_symbol2newstr): Change call to
13266 scm_must_malloc() to malloc(), because user-free()able memory is
13267 allocated.
13268
13269 * gc.c: Added declaration of `scm_debug_check_freelist'.
13270
26a3038d
MG
132712001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13272
13273 * ports.c (scm_port_mode): Changed `mode' array size to 4.
13274
1f3908c4
KN
132752001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
13276
13277 * strports.c (scm_object_to_string): New procedure.
13278 (scm_strprint_obj): Deprecated.
13279 * strports.h: Reflect the changes.
13280
e11208ca
DH
132812001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
13282
13283 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
13284
13285 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
13286 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
13287 SCM_ASSYNT to check for correct argument types. Either use some
13288 SCM_VALIDATE_* macro or an explicit test.
13289
13290 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
13291 misc-errors.
13292
13293 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
13294 instead of calling scm_wta.
13295
67e8151b
MG
132962001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13297
13298 * load.c (scm_primitive_load, scm_primitive_load_path),
13299 (scm_sys_search_load_path): Corrected docstrings (file ->
13300 filename).
13301
13302 * eval.c (scm_force): Added texinfo markup to docstring.
13303 (scm_promise_p): Renamed parameter to `obj' to match docstring.
13304
13305 * debug-malloc.c: Reinserted #include <stdio.h>.
13306
e0c08f17
KN
133072001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
13308
e39c3de4
KN
13309 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
13310
e0c08f17
KN
13311 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
13312 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
13313 Use SCM_LISTn instead of scm_listify.
13314
e6e2e95a
MD
133152001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13316
13317 * _scm.h: Removed #include <errno.h>.
13318
13319 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
13320 errno variable (can be a macro on some systems, for example when
13321 using linux libc with threads).
13322
13323 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
13324 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
13325 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
13326 #include <errno.h> in these 20 out of 100 files.
1c938eb8 13327
97d0e20b
GH
133282001-03-10 Gary Houston <ghouston@arglist.com>
13329
13330 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
13331 not already defined.
13332
e75341b3
MD
133332001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13334
13335 * coop.c: Inserted #include <stdio.h>.
13336
13337 * iselect.c: Reinserted #include <stdio.h>.
13338
74355186
MV
133392001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
13340
13341 * posix.c: Replaced `#define' of __USE_XOPEN right before
13342 including unistd.h with a define of _GNU_SOURCE at the very top of
13343 the file.
13344
783e7774
KN
133452001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
13346
13347 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
13348 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
13349 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
13350 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
13351 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
13352 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
13353 print.c, procprop.c, procs.c, properties.c, ramap.c,
13354 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
13355 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
13356 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
1c938eb8 13357 Remove #include <stdio.h>
783e7774
KN
13358 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
13359
13360 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
13361
9a677c37
MG
133622001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13363
13364 * posix.c (scm_gethostname): Set initial name length to 256 for
13365 Solaris.
13366
94e6d793
MG
133672001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13368
13369 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13370 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13371 (scm_sethostname, scm_gethostname): New prototypes.
13372
13373 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
13374 <sys/file.h>, if present.
13375 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
13376 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
13377 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
13378 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
13379 (scm_sethostname, scm_gethostname): New procedures.
13380
650a1cf9
NJ
133812001-03-08 Neil Jerram <neil@ossau.uklinux.net>
13382
13383 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
13384 not optional (ii) "recommend" spelling correction.
13385
9636b49c
MD
133862001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13387
5e4a4d09
MD
13388 * ramap.c (racp): Removed optimization which caused array copying
13389 to fail if the two arrays shared storage. Re-inserted the IVDEP
13390 macros removed in the change of 2000-03-09. (Don't really have a
13391 complete grasp of what they are for, but they seem to be necessary
13392 on Crays. This needs testing!) Thanks to Miroslav Silovic.
13393
9636b49c
MD
13394 * hash.c (scm_string_hash): Don't downcase characters.
13395
04a4d666
MD
133962001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13397
9636b49c 13398 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
04a4d666
MD
13399 size from 277 --> 1009.
13400
13401 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
13402 function.
13403
13404 * coop-threads.c: Fixed change of 2001-03-06.
1c938eb8 13405
04a4d666
MD
13406 * validate.h: Code formatting.
13407
66418d34
KN
134082001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
13409
13410 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
13411 (*.doc): Add dependency on guile-snarf.awk.in.
13412
13413 * guile-snarf.awk.in: Neglect spaces at the end of
13414 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
13415 middle of docstrings. (To avoid the problem with gcc-2.96.)
13416
2ade72d7
DH
134172001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
13418
13419 * coop-threads.c (scm_call_with_new_thread), load.c
13420 (scm_primitive_load, scm_sys_search_load_path), random.c
13421 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
13422 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
13423 (potentially) issue a scm-misc-error or wrong-num-args error
13424 message.
13425
13426 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
13427 about the expected type with the wrong-type-arg error message.
13428
13429 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
13430 a C level bug that can't be fixed from scheme anyway.
13431
586d7da2
MD
134322001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13433
13434 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
13435 Duplicate bindings are OK in a let* since a let* is semantically
13436 equivalent to a nested set of let:s.
13437
1dd05fd8
MG
134382001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13439
13440 * print.c (scm_print_options): Fixed texinfo in docstring.
13441
13442 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
13443 the underlying functions getservent, getprotoent or getnetent
13444 return NULL instead of signalling an error.
13445
439006bf
GH
134462001-03-04 Gary Houston <ghouston@arglist.com>
13447
13448 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
13449 taking an unexpectedly large filename for an AF_UNIX socket from
13450 bind/connect/sendto (thanks to Martin Grabmueller).
1c938eb8 13451
439006bf
GH
13452 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
13453 former and adjusted the latter.
13454 (scm_socket, scm_socketpair): cosmetic changes.
13455 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
13456 size_t as socklen_t substitute. don't restrict args/return values
13457 to INUM: allow full range of int or size_t.
13458 (scm_fill_sockaddr): check arguments before allocating memory, to
13459 avoid leakage. use malloc, not scm_must_malloc.
13460 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
13461 substitute. free the sockaddr structure before throwing an error.
13462 (scm_init_add_buffer): procedure removed, together with its static
13463 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
13464 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
13465 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
13466 scm_sendto): use a local buffer instead of scm_addr_buffer.
13467 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
13468 not size_t.
13469 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
13470 call to detect whether recvfrom could be bothered to set the address.
13471 (scm_init_socket): don't call scm_init_addr_buffer.
13472
276dd677
DH
134732001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13474
13475 * debug.c (scm_procedure_source, scm_procedure_environment),
13476 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
13477 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
13478 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
13479 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
13480 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
13481 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
13482 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
13483 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
13484 scm_array_to_list, scm_array_prototype), validate.h
13485 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
13486 scm_misc_error or scm_wrong_type_arg instead.
13487
13488 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
13489
5e03762c
MD
134902001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13491
13492 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
13493 (scm_sys_tag_body): Added.
13494
db4b4ca6
DH
134952001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
13496
13497 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
13498 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
13499 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
13500 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
13501 options.c (scm_options), ports.c (scm_remove_from_port_table),
13502 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
13503 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
13504 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
13505 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
13506 instead.
13507
87e7741d
MD
135082001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13509
13510 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
13511
d19b0aac
MV
135122001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
13513
13514 * eval.c (scm_s_duplicate_bindings): New error message.
13515 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
13516
2fd945df
MV
135172001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
13518
13519 * eval.h (SCM_EVALIM2): New macro. Use it when a
13520 immediate, literal constant should be evaluated.
13521 * eval.c (scm_s_duplicate_formals): New error message string.
13522 (scm_c_improper_memq): New function.
13523 (scm_m_lambda): Check for duplicate arguments.
13524 (scm_ceval, scm_deval): When executing a body: only cons a new
13525 toplevel environment frame when it is different from the
13526 existing one; use EVALCAR instead of SIDEVAL so that we can properly
13527 check for empty combinations; use SCM_EVALIM2 for the same reason
13528 in the non-toplevel loop.
13529 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
13530 New labels with the meaning of their non-"nontoplevel" partners,
13531 but they are used when it is known that the body is not evaluated at
13532 top-level.
13533 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
13534 reporting for empty combinations.
13535
9e6fc585
KN
135362001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
13537
13538 * Remove dump facilities.
13539 * dump.c, dump.h: Removed.
13540 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
13541 * init.c: Remove #include "libguile/dump.h".
13542 (scm_init_guile_1): Remove scm_init_dump.
13543 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
13544 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
13545 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
13546 (scm_set_smob_dump, scm_set_smob_undump): Removed.
13547
13548 * keywords.c: Remove #include "libguile/dump.h".
13549 (keyword_dump, keyword_undump): Removed.
13550 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
13551
eae54bf0
MG
135522001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13553
13554 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
13555 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
13556 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
13557 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
13558 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
13559 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
13560 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
13561 to @code{} as the texinfo manual recommends, converted the
13562 examples to use a @lisp{}-environment.
13563
13564 * strports.c (scm_eval_string): Cleaned up the docstring.
13565
13566 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
13567 markup.
13568
13569 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
13570 (scm_number_to_string, scm_string_to_number, scm_number_p)
13571 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
13572 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
13573 (scm_ash): Added texinfo markup and removed obsolete @refill.
13574 (scm_gr_p): Corrected comment.
13575 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
13576 docstring) comments.
13577 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
13578 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
13579 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
13580 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
13581 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
13582 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
13583 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
13584 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
13585
23deee81
DH
135862001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
13587
13588 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
13589 (Obviously nobody compiles with SCM_RECKLESS defined...)
13590
13591 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
13592
6fe692e9
MD
135932001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13594
13595 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
13596
13597 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
13598
27c37006
NJ
135992001-02-24 Neil Jerram <neil@ossau.uklinux.net>
13600
13601 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
13602 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
13603 since use of `z' suggests that the arguments may be complex.
13604
13605 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
13606 typos.
13607
2069af38
NJ
136082001-02-23 Neil Jerram <neil@ossau.uklinux.net>
13609
13610 * dump.c (scm_binary_write, scm_binary_read), eval.c
13611 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
13612 scm_guardian_greedy_p, scm_make_guardian), fports.c
13613 (scm_file_port_p): Minor docstring fixes.
13614
b42ff180
MV
136152001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
13616
2069af38 13617 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
97ea55f8
MV
13618
13619 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
13620 scm_i_eval.
13621 (make_class_from_template): Do not bother to set the current
13622 module around the call to DEFVAR, scm_eval takes care of that.
13623 (scm_init_goops): Make scm_module_goops and
13624 scm_goops_lookup_closure permanent objects.
1c938eb8 13625
97ea55f8
MV
13626 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
13627 top level, create a fresh top-level environment for each
13628 expression instead of mutating the exisint frame. This is
13629 important when that frame is closed over.
13630
b42ff180
MV
13631 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
13632 SCM_DIGSPERLONG instead of DIGSPERLONG.
13633
09f2ab1e
MV
136342001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
13635
13636 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
13637 before applying arrow procedure in `cond' and before applying
13638 receiver procedure in call-with-current-continuation.
13639 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
13640 macro. The argument is expanded more than one time.
13641
13642 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
13643 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
13644
136452001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
13646
13647 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
13648 notice and license.
13649
7090240c
MG
136502001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13651
13652 * variable.c (scm_make_variable, scm_make_undefined_variable)
13653 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
13654 (scm_variable_bound_p), values.c (scm_values)
13655 (scm_call_with_values), unif.c (scm_bit_count)
13656 (scm_bit_set_star_x), symbols.c (scm_gentemp)
13657 (scm_gensym), strings.c (scm_string_p, scm_make_string)
13658 (scm_read_only_string_p, scm_string_length, scm_string_ref)
13659 (scm_string_set_x, scm_substring, scm_string_append), stime.c
13660 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
13661 (scm_copy_random_state, scm_random), print.c (scm_newline)
13662 (scm_write_char, scm_simple_format), debug-malloc.c
13663 (scm_malloc_stats), environments.c (scm_environment_p)
13664 (scm_environment_bound_p, scm_environment_ref)
13665 (scm_environment_fold, scm_environment_define)
13666 (scm_environment_undefine, scm_environment_set_x)
13667 (scm_environment_cell, scm_environment_observe)
13668 (scm_environment_observe_weak, scm_environment_unobserve)
13669 (scm_make_eval_environment, scm_eval_environment_p)
13670 (scm_eval_environment_set_local_x, scm_eval_environment_local)
13671 (scm_eval_environment_imported)
13672 (scm_eval_environment_set_imported_x, scm_make_import_environment)
13673 (scm_import_environment_p, scm_import_environment_imports)
13674 (scm_import_environment_set_imports_x, scm_make_export_environment)
13675 (scm_export_environment_p, scm_export_environment_private)
13676 (scm_export_environment_set_private_x)
13677 (scm_export_environment_signature)
13678 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
13679 Added texinfo markup.
13680
13681 * ports.c (scm_drain_input): Lowercased argument to @var.
13682 (scm_current_input_port, scm_current_output_port): Filled in
13683 missing explanation.
13684 (scm_current_load_port, scm_set_current_output_port)
13685 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
13686 Added texinfo markup.
13687
13688 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
13689 (scm_release_arbiter): Added texinfo markup to docstrings.
13690 Changed `Returns' to `Return'.
13691 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
13692
25703850
NJ
136932001-02-16 Neil Jerram <neil@ossau.uklinux.net>
13694
13695 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
13696 by doubling them to `@@'.
13697
73c0fdce
MG
136982001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13699
13700 * numbers.c (scm_lognot), random.c (scm_random,
13701 scm_random_normal, scm_random_solid_sphere_x,
13702 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
13703 scm_random_exp), dynwind.c
13704 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
1c938eb8 13705
73c0fdce
MG
13706 * goops.c (scm_sys_initialize_object, scm_instance_p,
13707 scm_class_name, scm_class_precedence_list, scm_class_slots,
13708 scm_class_environment, scm_generic_function_name,
13709 scm_generic_function_methods, scm_method_generic_function,
13710 scm_method_specializers, scm_method_procedure, scm_make_unbound,
13711 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
13712 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
13713 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
13714 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
13715 scm_class_direct_supers, scm_class_direct_slots,
13716 scm_class_direct_subclasses, scm_class_direct_methods,
13717 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
13718 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
13719 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
13720 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
13721 scm_memoized_environment, scm_procedure_name,
13722 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
13723 objects.c
13724 (scm_class_of, scm_entity_p, scm_operator_p,
13725 scm_set_object_procedure_x, scm_object_procedure,
13726 scm_make_class_object), hooks.c (scm_make_hook_with_name,
13727 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
13728 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
13729 scm_hook_to_list), lang.c
13730 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
13731 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
13732 (scm_print_options, scm_port_with_print_state,
13733 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
13734 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
13735 scm_make_procedure_with_setter, scm_procedure), throw.c
13736 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
13737 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
13738 scm_stack_ref, scm_stack_length, scm_frame_p,
13739 scm_last_stack_frame, scm_frame_number, scm_frame_source,
13740 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
13741 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
13742 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
13743 (scm_dirname, scm_basename), dynwind.c
13744 (scm_wind_chain), read.c (scm_read_options, scm_read,
13745 scm_read_hash_extend), gc.c
13746 (scm_unhash_name), eval.c (scm_eval_options_interface,
13747 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
13748 (scm_display_error, scm_set_print_params_x,
13749 scm_display_application, scm_display_backtrace, scm_backtrace),
13750 async.c (scm_async, scm_system_async, scm_async_mark,
13751 scm_system_async_mark, scm_run_asyncs, scm_noop,
13752 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
13753 scm_mask_signals): Added docstrings.
13754
e228a203
KN
137552001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
13756
13757 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
13758 address of car/cdr. (Thanks to Dirk Herrmann)
13759 Use scm_sizet to obtain the length of strings.
13760 (Thanks to Matthias Koeppe)
13761
1552a59d
MV
137622001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
13763
13764 * symbols.c (scm_mem2symbol): Put a empty statement after the
13765 next_symbol label. This is mandated by ANSI, appearantly.
13766
3178f751
MV
137672001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13768
13769 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
13770 sense to compile for a specific kernel version. Do not include
13771 <asm/signal.h> while defining __KERNEL__. This hack should no
13772 longer be needed and caused problems.
13773
7af4defe
MV
137742001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
13775
13776 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
13777 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
13778 can not deal with immediates.
13779
5d6bb349
KN
137802001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
13781
13782 * list.c (scm_list_copy): Validate the first argument.
13783
ec9709f0
MV
137842001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
13785
13786 Fix evaluator so that top-level expressions are correctly
13787 evaluated with respect to the module system.
1c938eb8 13788
ec9709f0
MV
13789 * modules.h. modules.c (scm_current_module_lookup_closure): New
13790 function.
13791
13792 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
13793 prototypes.
13794 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
13795 names to better reflect their meaning.
13796
13797 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
13798 evaluated at top-level and synronize lookup closure before
13799 executing every subform.
13800 (scm_primitve_eval_x, scm_primitive_eval): New functions.
13801 (scm_eval_x, scm_eval): Reimplement in terms of
13802 scm_primitive_eval_x and scm_primitive_eval, respectively.
1c938eb8 13803
ec9709f0
MV
138042001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
13805
13806 * macros.c (scm_macro_name, scm_macro_transformer): Use
13807 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
13808 Thanks!
13809
42417394
KN
138102001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
13811
13812 * dump.c (scm_store_bytes): Store data size before data.
13813 (scm_restore_bytes): Restore data size. Takes a pointer to size.
13814 * dump.h (scm_restore_bytes): Updated.
13815
bf942687
KN
138162001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
13817
13818 * dump.c: Use double cells for update schedule.
13819
1be4270a
KN
138202001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
13821
13822 * ports.c (scm_unread_char): Take an optional argument.
13823
548728ea
MV
138242001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
13825
13826 * modules.h (scm_selected_module, scm_current_module): Renamed
13827 scm_selected_module to scm_current_module to synchronize Scheme
13828 and C names.
13829 (scm_select_module, scm_set_current_module): Likewise. Changed
13830 all uses.
1c938eb8 13831
548728ea
MV
13832 * ports.c (scm_port_for_each): Make a snapshot of the port table
13833 before iterating over it. The table might change while the user
13834 code is running. With the snapshot, the user can depend on the
c5408bc3 13835 fact that each port that existed at the start of the iteration is
548728ea
MV
13836 encountered exactly once. (ice-9 popen) depends on this.
13837
cb0d8be2
DH
138382001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13839
13840 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
13841
13842 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
13843 range checking for the size parameter. Thanks to Martin
13844 Grabmueller for the hint.
13845
13846 (scm_makstr): Reordered string initialization to make interrupt
13847 deferring unnecessary.
13848
13849 * vectors.c (scm_make_vector): Fixed range checking.
13850
e382fdbe
DH
138512001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
13852
13853 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
13854
13855 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
13856 checking of the size parameter for type correctness and valid
13857 range. Thanks to Rob Browning for reporting the problem. Instead
13858 of deferring interrupts, scm_remember_upto_here_1 is used.
13859
bf8f0922
KN
138602001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13861
13862 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
13863 (scm_dump_cell_update): Removed.
13864 (scm_dump_update): Renamed from scm_dump_object_update.
13865 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
13866 a pointer instead of returning a value.
13867 * keywords.c (keyword_undump): Updated.
13868
914cceec
KN
138692001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
13870
13871 * dump.c, dump.h: Modified a lot.
5f17c66f 13872 (SCM_DUMP_COOKIE): Version 0.1
914cceec
KN
13873 (scm_dump_mark): Removed.
13874 (scm_restore_cell_object, scm_store_cell_object): New functions.
13875
13876 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
13877 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
13878 New slots: dump, undump.
13879 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
13880 Updated.
13881
13882 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
13883 (keyword_undump): Renamed from keyword_alloc.
13884 (scm_init_keywords): Set keyword_dump and keyword_undump.
13885
ecf470a2
ML
138862001-02-03 Michael Livshin <mlivshin@bigfoot.com>
13887
13888 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
13889 the deprecated SCM_DOUBLE_CELLP.
13890
13891 * tags.h (SCM_DOUBLE_CELLP): deprecated.
13892
03416a99
KN
138932001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
13894
13895 * dump.c, dump.h: New files.
13896 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
13897 * init.c: #include "libguile/dump.h".
13898 (scm_init_guile_1): Call scm_init_dump.
13899 * smob.h (scm_smob_descriptor): New slots: dump_mark,
13900 dump_dealloc, dump_store, undump_alloc, undump_restore,
13901 undump_init.
13902 * smob.c (scm_make_smob_type): Init the new slots.
13903 (scm_set_smob_dump, scm_set_smob_undump): New functions.
13904 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
13905
13906 * keywords.c: #include "libguile/dump.h".
13907 (keyword_dealloc, keyword_alloc): New functions.
13908 (scm_init_keywords): Set smob_dump and smob_undump.
13909
00ffa0e7
KN
139102001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
13911
13912 * vectors.c (scm_c_make_vector): New function.
13913 * vectors.h (scm_c_make_vector): Declared.
13914 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
13915 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
13916 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
13917 (scm_make_method_cache, scm_i_vector2list,
13918 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
13919 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
13920 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
13921 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
13922 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
13923 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
13924 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
13925 (scm_vector, scm_make_vector): Use scm_c_make_vector.
13926
13927 * hashtab.c (scm_c_make_hash_table): New function.
13928 * hashtab.h (scm_c_make_hash_table): Declared.
13929 * environments.c (scm_make_leaf_environment,
13930 scm_make_eval_environment), gc.c (scm_init_storage),
13931 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
13932 Use scm_c_make_hash_table.
13933
b8446ce8
MD
139342001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13935
13936 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
13937
e3239868
DH
139382001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
13939
13940 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
13941 end of docstring.
13942
13943 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
13944 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
13945 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
13946 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
13947 srcprop.c (scm_source_properties, scm_set_source_properties_x,
13948 scm_source_property, scm_set_source_property_x), sort.c
13949 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
13950 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
13951 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
13952 docstrings.
13953
41ee56dd
MD
139542001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
13955
13956 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
13957 really get that arg.
13958
b6311c08
KN
139592001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
13960
13961 * goops.c (s_scm_get_keyword): Bug fix.
13962
a49af0c0
DH
139632001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13964
13965 The following patch was sent by Martin Grabmueller. It makes sure
13966 that in case of parameter errors the correct function name is
13967 shown, and that parameter types are only checked once.
13968
13969 * strop.c (string_copy, string_upcase_x, string_downcase_x,
13970 string_capitalize_x): New functions. Each one performs the core
13971 functionality of the corresponding scm_* function.
13972
13973 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
13974 scm_string_downcase_x, scm_string_downcase,
13975 scm_string_capitalize_x, scm_string_capitalize): Reduced to
13976 parameter checking wrappers of the above functions.
13977
13070bd3
DH
139782001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
13979
13980 * continuations.c, dynl.c, keywords.c, load.c: Include
13981 strings.h. Thanks to Bill Schottstaedt for the bug report.
13982
2f2b390c
DH
139832001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13984
13985 * backtrace.c (display_header): Make sure that line and column
13986 information is shown independent of whether the port the code was
13987 read from had an associated filename. Thanks to Martin
13988 Grabmueller for providing this patch.
13989
efa40607
DH
139902001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13991
13992 * fports.[ch] (scm_file_port_p): New primitive.
13993
a98bddfd
DH
139942001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
13995
13996 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
13997 These are now defined in fports.c, strports.c and vports.c.
13998
13999 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
14000 vports.c (scm_tc16_sfport): Made variables (were macros defined in
14001 tags.h).
14002
14003 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
14004 (scm_make_sfptob): Made static. These return a type code now.
14005
14006 fports.c (scm_init_fports), strports.c (scm_init_strports),
14007 vports.c (scm_init_vports): Create the corresponding port types.
14008
14009 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
14010 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
14011
14012 * init.c (scm_init_guile_1): Make sure strports are initialized
14013 before gdbint.
14014
14015 * ports.[ch] (scm_make_port_type): Changed the return type to
14016 scm_bits_t.
14017
14018 * ports.c (scm_ports_prehistory): Don't create any port types
14019 here.
14020
14021 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
14022 against scm_tc16_fport directly.
14023
0419a528
DH
140242001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
14025
14026 * srcprop.c (scm_set_source_property_x): Fix to handle
14027 (set-source-property! <obj> 'copy <datum>) correctly.
14028
6d36532c
GH
140292001-01-24 Gary Houston <ghouston@arglist.com>
14030
14031 * filesys.c (scm_link): docstring fix.
14032 * fports.h (scm_setfileno): obsolete declaration removed.
14033 * posix.c: bogus popen declaration removed.
14034
14035 * rdelim.c: new file, split from ioext.c.
14036 * rdelim.h: new file, split from ioext.h
14037 * Makefile.am: add rdelim.c and related files.
14038 * init.c: call scm_init_rdelim. include rdelim.h.
14039
3ba5a6c2
DH
140402001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14041
14042 This patch was sent by Martin Grabmueller and makes sure that
14043 parameter errors are reported correctly by the lexicographic
14044 ordering predicates.
14045
14046 * strorder.c (string_less_p, string_ci_less_p): New functions.
14047
14048 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
14049 functionality into string_less_p, string_ci_less_p respectively.
14050 The remaining code is just a wrapper to do the parameter
14051 checking.
14052
14053 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
14054 parameters and call string_less_p instead of scm_string_less_p.
14055
14056 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
14057 Check the parameters and call string_less_ci_p instead of
14058 scm_string_ci_less_p.
14059
e40a4095
DH
140602001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14061
ed6a2db9
DH
14062 This patch modifies scm_display_error to perform parameter
14063 checking. Thanks to Neil Jerram for the bug report.
14064
e40a4095
DH
14065 * backtrace.[ch] (scm_i_display_error): New function.
14066
14067 * backtrace.c (scm_display_error): Added parameter check and
14068 extracted the core functionality into function
14069 scm_i_display_error.
14070
14071 * throw.c (handler_message): Call scm_i_display_error to display
14072 the error message.
14073
f1e06a96
MD
140742001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
14075
14076 * eval.c (SCM_APPLY): Added # args check for application of
14077 procedures with arity 3. (Thanks to Anders Holst.)
14078
30ea841d
DH
140792001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
14080
14081 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
14082
14083 (SCM_OPDIRP): Deprecated.
14084
14085 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
14086 SCM_OPN.
14087
14088 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
14089 Instead, give an explicit error message in case the directory is
14090 closed.
14091
14092 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
14093 instead of SCM_OPENP and SCM_CLOSEDP.
14094
14095 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
14096
312ae976
DH
140972001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
14098
14099 * eval.c (inner_eval, scm_eval): Move all real functionality into
14100 inner_eval. Avoid to copy the expression twice by inlining some
14101 code from scm_i_eval.
14102
4567ed78
DH
141032001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
14104
14105 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
14106 now has to be the last clause, as required by R5RS. Thanks to
14107 Martin Grabmueller for the patch.
14108
10288a09
GH
141092001-01-18 Gary Houston <ghouston@arglist.com>
14110
14111 * ioext.c: further simplify scm_read_string_x_partial by defining
14112 a macro SCM_EBLOCK.
14113
8f379a8f
DH
141142001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14115
14116 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
14117
5c75b29f
DH
141182001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
14119
14120 * __scm.h: Added comment about architecture and compiler
14121 properties that are required by guile.
14122
14123 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14124 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
14125
14126 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
14127
14128 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
14129
14130 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
14131 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
14132
ac0c002c
DH
141332001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
14134
14135 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
14136 to the names in limits.h.
14137
14138 * numbers.c (abs_most_negative_fixnum): Added.
14139
14140 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
14141 fixnum-min) special case.
14142
14143 (scm_big_and): Fix for negative first parameter.
14144
14145 (scm_bit_extract): Fix for fixnum paramters.
14146 Thanks to Rob Browning for the bug report.
14147
14148 (scm_init_numbers): Initialize abs_most_negative_fixnum.
14149
debe0dc2
DH
141502001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
14151
14152 * symbols.c (scm_symbol_bound_p): Fixed comment.
14153 Thanks to Chris Cramer.
14154
8a39e3fc
DH
141552001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
14156
14157 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
14158 Thanks to Bill Schottstaedt.
14159
322ec19d
ML
141602001-01-11 Michael Livshin <mlivshin@bigfoot.com>
14161
9a5fa6e9 14162 from Matthias Köppe:
1c938eb8 14163
322ec19d
ML
14164 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
14165 casts its result, so doesn't yield an lvalue per ANSI C.
14166
14167 * goops.c (s_scm_sys_set_object_setter_x): use
14168 SCM_SET_ENTITY_SETTER.
14169 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
14170
14171 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
14172 its result, so doesn't yield an lvalue per ANSI C.
14173 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
14174 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
14175 SCM_GC_SET_CARD_FLAGS.
14176 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
14177
14178 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
14179
60d02d09
GH
141802001-01-08 Gary Houston <ghouston@arglist.com>
14181
14182 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
14183 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
14184 socket.c (scm_recvfrom): use the new macro, plus minor docstring
14185 changes.
14186 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
14187 for fdes. if current input port is used, check that it's a file
14188 port.
14189
c2da2648
GH
141902001-01-06 Gary Houston <ghouston@arglist.com>
14191
14192 * ioext.c (scm_read_string_x_partial): new procedure, implements
14193 read-string!/partial.
14194 * ports.c (scm_take_from_input_buffers): new procedure used by
14195 scm_read_string_x_partial.
14196 (scm_drain_input): use scm_take_from_input_buffers.
14197
4651d663
MV
141982001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
14199
14200 * validate.h (SCM_VALIDATE_NUMBER): New.
14201
c0a5d888
ML
142022001-01-03 Michael Livshin <mlivshin@bigfoot.com>
14203
14204 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
14205 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
14206 SET_DESTROYED): new defines/macros.
14207 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
14208 (add_to_live_list): takes a `guardian_t *' now, not SCM.
14209 (guardian_print): print more info.
14210 (guardian_apply): check if the guardian is destroyed, and throw an
14211 error if so. take one more optional argument `throw_p'.
14212 (scm_guard): depending on the value of `throw_p', return a boolean
14213 result.
14214 (scm_get_one_zombie): remove redundant property test.
14215 (guardian_t): represent the various (currently 3, I hope nothing
14216 more gets added) boolean fields as bit flags.
14217 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
14218 (scm_destroy_guardian_x): new procedure.
14219
14220 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
14221 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
14222
0c6d2191
GH
142232001-01-01 Gary Houston <ghouston@arglist.com>
14224
14225 * fports.c (fport_write): bugfix: handle short writes for
14226 unbuffered ports too. optimize the buffered case by minimizing
14227 the number of write/flush calls.
14228 (write_all): new helper procedure.
14229
a51fe247 14230The ChangeLog continues in the file: "ChangeLog-2000"
d9f71a07
LC
14231
14232;; Local Variables:
14233;; coding: utf-8
14234;; End: